For the complete documentation index, see llms.txt. This page is also available as Markdown.

author_submitExtrinsic - Midnight

Example code for the author_submitExtrinsic JSON-RPC method. Complete guide on how to use author_submitExtrinsic JSON-RPC in GetBlock Web3 documentation.

This method submits a signed extrinsic to the network for inclusion in a future block. The extrinsic must be SCALE-encoded and pre-signed; this is the Substrate equivalent of eth_sendRawTransaction. Returns the extrinsic hash for tracking.

Parameters

Parameter
Type
Required
Description

extrinsic

string

Yes

Hex-encoded SCALE-serialized signed extrinsic

Request Example

curl --location --request POST 'https://go.getblock.io/<ACCESS-TOKEN>/' \
--header 'Content-Type: application/json' \
--data-raw '{
    "jsonrpc": "2.0",
    "method": "author_submitExtrinsic",
    "params": [
        "0x280402000bf83d6e4d9101\u2026"
    ],
    "id": "getblock.io"
}'

Response Example

{
    "jsonrpc": "2.0",
    "id": "getblock.io",
    "result": "0x88df016429689c079f3b2f6ad39fa052532c56795b733da78a91ebe6a713944b"
}

Response Parameters

Field
Type
Description

result

string

Hash of the submitted extrinsic, used for tracking inclusion

Use Cases

  • Submitting NIGHT or DUST transfers

  • Broadcasting smart contract calls

  • Deploying Compact contracts

  • Any state-changing interaction with Midnight

Error Handling

Status Code
Error Message
Cause

404

Missing or invalid <ACCESS-TOKEN>

-32602

Invalid params

Request parameters are missing or malformed

-32053

Method not found

API key is not allowed to access method

429

Too Many Requests

Rate limit exceeded for your plan

1010

Invalid Transaction

Signature invalid, nonce mismatch, or extrinsic malformed

1011

Pool error

Transaction pool rejected the extrinsic (full, banned, or replaced)

SDK Integration

Last updated

Was this helpful?