⚠️Blast API (blastapi.io) ends Oct 31. Migrate to Dwellir and skip Alchemy's expensive compute units.
Switch Today →
Skip to main content

author_submitExtrinsic - JSON-RPC Method

Description

Submits a fully formatted and signed extrinsic (transaction) to the Moonriver network's transaction pool for inclusion in a block. This method is essential for broadcasting transactions to the network.

Parameters

ParameterTypeRequiredDescription
extrinsicstringYesHex-encoded signed extrinsic to submit to the network

Returns

FieldTypeDescription
resultstringTransaction hash of the submitted extrinsic

Request Example

{
"jsonrpc": "2.0",
"method": "author_submitExtrinsic",
"params": [
"0x450284008eaf04151687736326c9fea17e25fc5287613693c912909cb226aa4794f26a480284d717d5031504025a62020b00000000000000e143f23803ac50e8f6f8e62695d1ce9e4e1d68aa36c1cd2cfd15340213f3423e3aedc952073c01f1c4d76ccd8c18d0f900fcb6ac003a5f08709e3c9038b68055"
],
"id": 1
}

Response Example

{
"jsonrpc": "2.0",
"result": "0x7c8b4d5a6f2e3c9d8a7b5e4f3c2d1a9b8c7e6f5d4c3b2a1",
"id": 1
}

Code Examples

curl https://api-moonriver.n.dwellir.com/YOUR_API_KEY \
-X POST \
-H "Content-Type: application/json" \
-d '{
"jsonrpc": "2.0",
"method": "author_submitExtrinsic",
"params": ["SIGNED_EXTRINSIC_HEX"],
"id": 1
}'

Use Cases

  1. Token Transfers: Submit balance transfer transactions
  2. Staking Operations: Delegate, bond, or unbond DOT tokens
  3. Governance: Submit votes, proposals, or referenda
  4. Smart Contract Calls: Execute contract methods
  5. Parachain Operations: Cross-chain message passing

Error Handling

Common Errors

Error CodeDescriptionSolution
-32602Invalid extrinsic formatEnsure extrinsic is properly hex-encoded
-32603Invalid signatureVerify the extrinsic is correctly signed
1010Invalid transactionCheck nonce, mortality period, and account balance
1012Transaction pool fullRetry with higher priority fee
1013Already in poolTransaction already submitted

Error Response Example

{
"jsonrpc": "2.0",
"error": {
"code": 1010,
"message": "Invalid Transaction",
"data": "Inability to pay some fees (e.g. account balance too low)"
},
"id": 1
}

Best Practices

  1. Nonce Management: Always use the correct nonce to avoid transaction rejection
  2. Fee Estimation: Calculate fees before submission using payment_queryFeeDetails
  3. Mortality Period: Set appropriate mortality period for time-sensitive transactions
  4. Error Handling: Implement robust error handling for network issues
  5. Transaction Monitoring: Track transaction status after submission

Notes

  • Extrinsics must be properly formatted and signed before submission
  • The transaction hash returned is not a guarantee of inclusion in a block
  • Monitor transaction status using subscription methods for critical operations
  • Different transaction types require different encoding based on runtime metadata