Search
K

FAQs

What libraries are available for handling queries?

The Query TypeScript SDK 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 Solidity QueryResponse Abstract Contract can be used to parse and verify query responses on EVM chains.
The Go query package 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.

Are there any examples?

There sure are!

What is the format of the response signature?

The guardian node calculates an ECDSA signature using crypto.Sign where the digest hash is keccak256("query_response_0000000000000000000|"+keccak256(responseBytes)). See the Guardian Key Usage whitepaper for more background. This signature then has the guardian's index in the guardian set appended to the end.
💡 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 Query TypeScript SDK accounts for this as well as structuring the signatures into an IWormhole.SignatureStruct[].

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.
Last modified 25d ago