Hedera JSON-RPC Methods
signerAccountId
utilized in the methods below is specified by HIP-30hedera_signAndExecuteTransaction
hedera_signTransaction
hedera_executeTransaction
hedera_signAndExecuteQuery
hedera_signMessage
hedera_getNodeAddresses
hedera_signAndExecuteTransaction
method is a generic method for executing a transaction on the Hedera network. A dApp can begin by constructing a transaction with one of the Hedera SDKs or by constructing the raw protobuf messages and may select one or more consensus nodes that are authorized to execute the transaction.
The dApp then constructs a list of valid transaction bytes that differ only in the node account id and serializes the list, for example by using the toBytes()
method of an SDK. Finally, the dApp base64 encodes the resulting bytes. This final base64 encoded string of bytes is sent as a method param titled transactionList
to the wallet.
Wallets and SDKs must take special care to deserialize the list of transactions and validate that each transaction in the list differs only in the node authorized to receive the transaction and does NOT differ in intent before submitting to an end user for approval and ultimately signing.
Object
- signAndExecuteTransaction parameters
1.1. signerAccountId
: String
- Hedera account id in the format <network>:<shard>.<realm>.<num><-optional-checksum>
1.2. transactionList
: String
- Base64 encoded string of TransactionList bytesObject
- Result of transaction submission to Hedera network
1.1. nodeId
: String
- The Hedera node the transaction was submitted to
1.2. transactionHash
: String
- The hash of the transaction
1.3. transactionId
: String
- Transaction ID, which includes the payer account id and the valid start timestampObject
- Result of transaction submission to Hedera network
1.1. code
: 9000 - The reserved WalletConnect error code for unknown errors or errors not related to the WalletConnect protocol
1.2. message
: String
- A human readable string describing the nature of the failure
1.3. data
: Number
- An integer representing the ResponseCodeEnum value returned from the Hedera Node, which indicates the reason for the failurehedera_signTransaction
signs a TransactionBody
and returns a SignatureMap
to the caller.
Object
- signTransaction parameters
1.1 signerAccountId
: String
- Hedera account id in the format <network>:<shard>.<realm>.<num><-optional-checksum>
1.2 transactionBody
: String
- Base64 encoded string representation of TransactionBodyObject
- SignatureMap of related signed TransactionBody
1.1 signatureMap
: String
- Base64 encoded string of SignatureMaphedera_executeTransaction
method.
Object
- executeTransaction parameters
1.1 transactionList
: String
Base64 encoded TransactionListObject
- Result of transaction submission to the Hedera network
1.1. nodeId
: String
- The Hedera node the transaction was submitted to
1.1. transactionHash
: String
- The hash of the transaction
1.1. transactionId
: String
- Transaction ID, which includes the payer account id and the valid start timestampObject
- Result of transaction submission to the Hedera network
1.1. code
: 9000 - The reserved WalletConnect error code for unknown errors or errors not related to the WalletConnect protocol
1.1. message
: String
- A human readable string describing the nature of the failure
1.1. data
: Number
- An integer representing the ResponseCodeEnum value returned from the Hedera Node, which indicates the reason for the failureObject
- signAndExecuteQuery parameters
1.1 signerAccountId
: String
- Hedera account id in the format <network>:<shard>.<realm>.<num><-optional-checksum>
1.2 query
: String
- base64 encoded QueryObject
- Result of the Query submitted to a Hedera consensus node
1.1. response
: String
- Base64 encoding of the Hedera API responseObject
- signMessage parameters
1.1 signerAccountId
: String
- Hedera account id in the format <network>:<shard>.<realm>.<num><-optional-checksum>
1.2 message
: String
Object
- signMessage result
1.1 signatureMap
: String
- Base64 encoded SignatureMaphedera_getNodeAddresses
method allows a dApp to request a list of node wallet addresses known to the controller. The controller should only include nodes in this list that it is willing and able to submit transactions to at the time of the request.
Object
- signMessage result
1.1 nodes
: Array
- an array of strings in <shard>.<realm>.<num><-optional-checksum>
format, each identifying a node by its Hedera Address