avalanche_sendTransaction
This method processes an unsigned transaction, prompting the user for approval, and then sends the signed transaction to the network.
Params
(6)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:
XPC
3. externalIndices
array[number]
Array of external indices used in the transaction.
4. internalIndices
array[number]
Array of internal indices used in the transaction.
5. utxos
array[string]
Array of the UTXO ids consumed by the transaction.
6. feeTolerance
number
Tolerance percentage range where the burned amount is considered valid. e.g.: with FeeTolerance = 20% -> (expectedFee <= burnedAmount <= expectedFee * 1.2)
Result
(SendTransactionResult)txHash
stringThe hash of the successfully sent transaction.
Errors
Code | Message |
---|---|
-32602 | Missing mandatory param(s) |
-32600 | No active account found |
-32602 | Unable to parse transaction data. Unsupported tx type |
-32600 | The requested account and/or method has not been authorized by the user. |
-32000 | Transaction contains multiple addresses, but indices were not provided |
-32000 | Signing error, missing signatures. |
-32000 | Signing error, invalid result |
4001 | User rejected the request. |