POST v0/blob

Submit a Data Blob to Celestia

Submits a data blob to the Celestia blockchain.

Note: It generally takes between 6 and 30 seconds for a blob to be included. If you call this endpoint in synchronous mode, that’s approximately how long you can expect to receive a response. You may need to configure your default timeouts accordingly if you see your requests timing out, as some HTTP tools have a default timeout of 10 or 15 seconds. Alternatively, you can use “asynchronous”: true to get an immediate confirmation that Twinkle has received your request, and poll GET v0/blob/status for its inclusion status.

Request

curl \
  -X POST 'https://t.tech/v0/blob' \
  -H 'Authorization: Bearer <YOUR API KEY>' \
  -H 'Content-Type: application/json' \
  -d '{"namespace": 10fd38d19529f08c9771, "data": e9e5231a0f5eecba3401}'

Body Parameters

namespace
20 character hexadecimal stringrequired

The namespace of the data blob you are posting. The namespace value must be exactly twenty characters of valid hexadecimal text. This corresponds to a V0 Celestia Namespace ID. Read more about namespace IDs at the Celestia Docs here.

data
hexadecimal stringrequired

The actual data to be posted, encoded in hexadecimal format. On mainnet, blob sizes can be a maximum of 1973786 bytes (just under two mibibytes (MiB)). On mocha-4, max sizes can be 7850000 bytes (just under 8 MiB), though we suggest 7500000 bytes for the blob to reliably make it into the block on Celestia. Read more about maximum blob size on the Celestia Docs here.

asynchronous
booleanoptional

Whether or not to post the data blob asynchronously. If true, the request will confirm the data blob is in the mempool of at least one celestia node, and it will be posted in the background. If false, the request will wait until the data blob is included into the next available block before returning. Defaults to false. Note: an asynchronous request will only return the twinkleRequestId, as the blob’s confirmation will not be finalized when we deliver a response. Use GET /blob/status to query a blob’s inclusion status by twinkleRequestId.

network
stringoptional

The Celestia network to which the data blob should be posted. Can be either mainnet or mocha-4. Defaults to mainnet if no value is specified. Read more about networks on the Celestia Docs here.

authored
booleanoptional

If true, includes the signer’s public key in the blob to create an authored blob. Defaults to false if no value is specified.

feePriority
stringoptional

How much to incentivize Celestia processing for the transaction. Can be slow, normal, or fast. Defaults to normal if no value is specified. Essentially serves as a multiplier to the gas price.

Response

JSON object
blockExplorerJSON object
blockURI

A block explorer link to the block in which the transaction containing the data blob was included.

transactionURI

A block explorer link to the transaction in which the data blob was included.

blockHeightinteger

The height of the block in which the Celestia transaction containing the data blob was included.

celestiaTransactionIdhexadecimal string

The Celestia transaction in which the data blob was included.

commitmentstring
gasFeeUsdCentsinteger
twinkleRequestIduuid string

The ID of your request in the Twinkle system, used to query its status.

Example Response