Skip to content

wormholelabs-xyz/example-queries-solana-verify

Repository files navigation

Queries Verification on Solana PoC

This is a demo of verifying and parsing Wormhole Queries on Solana.

This project was made with Anchor.

Learn more about developing with Queries in the docs.

Accounts

  • GuardianSignatures stores unverified guardian signatures for subsequent verification. These are created with post_signatures in service of verifying a root via Queries and closed when that root is verified with verify_query or can be explicitly closed with close_signatures by the initial payer.

Instructions

  • post_signatures posts unverified guardian signatures for verification during update_root_with_query.
  • verify_query with a Query response and GuardianSignatures account, verifies the signatures against an active guardian set and logs the Query response. This is where you would add additional verification relevant to your use case and process the result.
  • close_signatures allows the initial payer to close a GuardianSignatures account in case the query was invalid.

Testing

anchor test

Building

Wormhole Testnet / Solana Devnet

anchor build -- --no-default-features --features testnet

Mainnet

anchor build

This software is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License.

About

Queries Verification on Solana PoC

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published