avalanche_signTransaction
Takes an unsigned transaction, prompts the user for approval, and returns the signed transaction to the caller.
Params
(3)1. transactionHex (required)
string
The unsigned transaction in hexadecimal format.
2. chainAlias (required)
string
The chain alias for which the transaction is meant.
Allowed values:
XP
3. utxos
array[string]
Array of the UTXO ids consumed by the transaction.
Result
(AvalancheSignTransactionResult)signedTransactionHex
stringThe signed transaction in a hexadecimal format.
signatures
array[object]signature
stringSignature of the transaction
sigIndices
array[number]Contains input - signature index pair
Errors
Code | Message |
---|---|
-32602 | Missing mandatory param(s) |
-32600 | No active account found |
-32602 | Missing signer address |
-32600 | This account has nothing to sign |
-32000 | Unable to parse transaction data. Unsupported tx type |
-32000 | Expected a signedTx to be returned by the wallet, {value} returned. |
-32000 | Failed to sign [${inputIndex}, ${sigIndex}] |
4001 | User rejected the request. |