Chunk

Making an call to the chunk endpoint

Get chunk of a file as hex string from transaction id on blockchain

Retrieve chunk of blob.

GET https://api.bloqifi.com/v0/chunk/BLOCKCHAIN/TXID

Retrieve a chunk of a hex string of a blob from txid.

Headers

Name
Type
Description

Content-Type*

String

application/json

{
    hex: 'ee'
}
const rawResponse = await fetch(`https://api.bloqifi.com/v0/chunk/${blockchain}/${txid}`, {
  method: 'GET',
  headers: {
    'Content-Type': 'application/json'
  }
});

const json = await rawResponse.json();

if (rawResponse.status === 200) {

  const op_return = json.hex.toString();
}

The output received from this endpoint is immutable, raw data compressed using Brotli, except in the case of IPFS, which is vanilla raw data.

Good to know: You do not have to use Bloqifi endpoint for retrieving the hex op_return string. Any block explorer with API can provide the hex you'll need.

All you need is your transaction ids in the correct order, to merge the chunks of your content.

Last updated

Was this helpful?