LogoLogo
  • Introduction
  • Quick Start
    • Developing Cross Chain Dapps
      • Standard Relayer
      • Specialized Relayer
    • Tutorials
      • Hello Wormhole
        • Hello Wormhole Explained
        • Beyond Hello Wormhole
      • Hello Token
      • CCTP
        • USDC Transfers With Connect SDK
      • Simple Relayer
        • Advanced Relayer Example
    • Demos
    • Wormhole Connect: Bridging Made Easy
  • Explore Wormhole
    • Architecture
    • Security
    • Core Contracts
    • Guardians
    • VAAs
    • Relayers
    • Spy
    • Gateway
      • Onboarding
  • Reference
    • Constants Reference
    • Development Environment
      • Tilt
      • Tooling
    • Blockchain Platforms
      • Algorand
      • Aptos
      • CosmWasm
      • EVM
        • Relayer
      • Near
      • Solana
      • Sui
    • API Docs
      • Wormholescan API
    • SDK Docs
      • Legacy SDK
    • CLI Docs
    • Glossary
  • Wormhole Connect
    • Overview
    • Routes
    • Features
    • Configuration
  • Native Token Transfers
    • Overview
      • System Components
      • Deployment Models
    • Deployment
      • Installation
      • Deploy to EVM
      • Deploy to Solana
      • Post Deployment
    • Configuration
      • Rate Limiting
      • Access Control
    • Security
    • Custom Transceivers
    • Architecture
      • EVM Message Lifecycle
      • Solana Message Lifecycle
  • Queries
    • Overview
    • Getting Started
    • FAQs
  • MultiGov
    • Overview
    • Getting Started
    • Deployment
      • Configuration
    • Upgrading
    • Architecture
    • Guides
    • FAQs
  • External Links
    • Explorer
    • Ecosystem
    • Guardian Dashboard
    • Portal Bridge Docs
    • Discord
    • Twitter
    • Github
Powered by GitBook
On this page
  • What libraries are available for handling queries?
  • Are there any examples?
  • What is the format of the response signature?
  • Can anyone run a Query Proxy server?
  • What does Queries offer over an RPC service?

Was this helpful?

Edit on GitHub
  1. Queries

FAQs

Last updated 9 months ago

Was this helpful?

What libraries are available for handling queries?

The can be used to create query requests, mock query responses for testing, and parse query responses along with some utilities for posting query responses.

The can be used to parse and verify query responses on EVM chains. Simply forge install wormhole-foundation/wormhole-solidity-sdk. See the repo as an example use case. The SDK also contains for mocking query requests and responses in forge tests.

The can also be used to create query requests and parse query responses.

💡 A Rust SDK for Solana is being actively investigated by the Wormhole Contributors. See the repo as a proof of concept.

Are there any examples?

There sure are!

What is the format of the response signature?

The guardian node calculates an ECDSA signature using where the digest hash is keccak256("query_response_0000000000000000000|"+keccak256(responseBytes)). See the whitepaper for more background. This signature then has the guardian's index in the guardian set appended to the end.

Can anyone run a Query Proxy server?

The Query Proxy is currently permissioned by the Guardians. The guardian nodes are configured to only listen to a set of allow-listed proxies. However, it is possible that this restriction may be lifted in the future and/or more proxies could be added.

It is also important to note that the proxies do not impact the verifiability the request and result - i.e. their role in the process is trustless.

What does Queries offer over an RPC service?

Wormhole Queries provides on-demand, attested, on-chain verifiable RPC results. Each guardian independently executes the specified query and returns the result and their signature - the proxy handles aggregating the results and signatures, giving you a single result (all within one REST call) with a quorum of signatures suitable for on-chain submission, parsing, and verification using one of our examples / SDKs.

💡 If you are used to ecrecover you will notice that the v byte is 0 or 1 as opposed to 27 or 28. The signaturesToEvmStruct method in the accounts for this as well as structuring the signatures into an IWormhole.SignatureStruct[].

Query TypeScript SDK
Solidity QueryResponse Abstract Contract
Solana Stake Pool
QueryTest.sol
Go query package
Solana Queries Verification
Getting Started
Basic Demo
Solana Stake Pool
Solana PDA / Token Account Balance
Solana Queries Verification
crypto.Sign
Guardian Key Usage
Query TypeScript SDK