account_nextIndex - JSON-RPC Method
Description
Returns the next usable transaction index (nonce) for the given account. On Moonriver, accounts are H160 (Ethereum-style) by default; you may pass either a 0x
H160 address or its SS58-encoded representation.
Parameters
Parameter | Type | Required | Description |
---|---|---|---|
accountId | string | Yes | Account identifier (H160 hex or SS58 string) |
Returns
Field | Type | Description |
---|---|---|
result | number | Next transaction nonce for the account |
Request Example (H160 address)
curl -s https://api-moonriver.n.dwellir.com/YOUR_API_KEY \
-H 'Content-Type: application/json' \
-d '{
"jsonrpc":"2.0",
"id":1,
"method":"account_nextIndex",
"params":["0x6bEc0BCA2F15876f675f2C38958Ff986551e4db1"]
}'
Example response:
{
"jsonrpc": "2.0",
"id": 1,
"result": 1347
}
Notes
- For SS58 formatting, ensure you use Moonriver’s prefix
1285
if you choose to encode the H160 into SS58 form. - Nonce increases with each included extrinsic signed by the account.