hedera_signQueryAndSend
Closed this issue · 1 comments
Describe the spec as defined in HIP-820
When a dApp needs the services of the controller to perform an Hedera Network Query, it can use the hedera_signQueryAndSend method. This method accepts a base64 encoded protobuf representation of the Hedera API Query message as input. The controller decodes the message, interprets the contents, and if valid and approved, adds an appropriate signed transaction to the header field of the Query (if applicable), repackages the message as appropriate and sends the message to the network. The controller shall wait for the query response and returns the resulting base64 encoded protobuf Response message received from the network.
The controller is allowed to retry submitting the query to the Hedera Network for certain types of error conditions, such as gRPC connection droppage or Hedera BUSY signals. This specification does not obligate the controller to retry, but recommends the practice to help improve perceived user experience for consumer applications.
Parameters
query – a base64 encoding of the protobuf encoded Hedera API Query message. The message may or may not contain a preliminary QueryHeader value in the header field of the enclosed typed query message. It is the responsibility of the controller to complete the necessary information contained in the header field prior to submission to the network.
Note: the CAIP-217 Scope property of the RPC call shall be used to identify which network shall be assumed when signing and sending the query if multiple chainids were authorized in the pairing process. It is not necessary to transmit that value as a method parameter.
Returns
response – a base64 encoding of the protobuf encoded Hedera API Response message. The response is passed back to the caller without modification and may or may not indicate success. It is the responsibility of the dApp to decode this protobuf representation into the expected query response results.
Does this issue add new functionality to this repository or change functionality (such as a change in function signature)
This is a new JSON-RPC function, but will use some of the other pieces of this library.
hey @BeeJeeNinja @hgraphql just a note that we are approaching deadline on this