submitpackage

Send a set of serialized, hex-encoded raw transactions to the local node.

Example Request and Result for submitpackage method

In this section, we provide an illustrative example of a request made to retrieve details contents using the submitpackage method. Additionally, we present the resulting response containing information about sending a set of serialized raw transactions.

Parameters

FieldTypeDescription

package*

array<string>

An array of raw transactions

The example in this section uses a non-existing project id.

Make sure you replace it with your Bitcoin mainnet or Bitcoin Testnet endpoint when issuing the API calls.

Don't have a project id? Here's a straightforward guide on how to obtain one!

Send a set of serialized, hex-encoded raw transactions to the local node.

POST https://bitcoin-mainnet.blastapi.io/<project-id>

Request Body

NameTypeDescription

jsonrpc*

string

1.0

id*

string

bwarelabs

method*

string

submitpackage

params*

string

["RAW_TXS_1","RAW_TXS_2"]

The transaction results keyed by wtxid

Curl Request example

curl --location 'https://bitcoin-mainnet.blastapi.io/<project-id>' \
--header 'content-type: application/json;' \
--data '{
    "jsonrpc": "1.0",
    "id": "bwarelabs",
    "method": "submitpackage",
    "params": ["RAW_TXS_1","RAW_TXS_2"]
}'

Last updated