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.
Parameters
namespace20 character hexadecimal stringREQUIRED
datahexadecimal stringREQUIRED
asynchronousbooleanREQUIRED
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. 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`.
networkstringOPTIONAL
Response
twinkleRequestIduuid string
The ID of your request in the Twinkle system, used to query its status.
blockHeightnumber
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.
blockExplorer.transactionURI
A block explorer link to the transaction in which the data blob was included.
blockExplorer.blockURI
A block explorer link to the block in which the transaction containing the data blob was included.
Example Response
{
"twinkleRequestId": "0ca0796f-ea9f-485a-9fc1-26c600bd21f7",
"blockHeight": 6391303,
"celestiaTransactionId": "144c468ea851fb8abf499d4f6563784b33f0e7bfa7a1f854a26e31b59f735de7",
"blockExplorer": {
"transaction": "https://mocha-4.celenium.io/tx/144c468ea851fb8abf499d4f6563784b33f0e7bfa7a1f854a26e31b59f735de7",
"block": "https://mocha-4.celenium.io/block/6391303"
}
}