TypeScript SDK

Specifications

Core types and functions shared between Node.js and browser environments

ShelbyBlobClient

Blockchain-focused client for managing blob commitments and metadata on-chain.

Prop

Type

Methods

registerBlob({account, blobName, blobMerkleRoot, size, expirationMicros, options})

Registers a blob on the blockchain by writing its commitments.

ParameterTypeDescription
accountAccountThe account to register the blob for
blobNameBlobNameThe name/path of the blob
blobMerkleRootstringThe merkle root of the blob
sizenumberThe size of the blob in bytes
expirationMicrosnumberThe expiration time in microseconds
optionsWriteBlobCommitmentsOptionsOptional write blob commitments options

Returns: Promise<{ transaction: PendingTransactionResponse }>

confirmBlobChunks({signer, account, blobName, signedChunksetChunkCommitments, options})

Confirms the blob chunks for a given blob.

ParameterTypeDescription
signerAccountThe account to confirm the blob chunks for
accountAccountAddressInputThe account address
blobNamestringThe name/path of the blob
signedChunksetChunkCommitmentsSignedChunkCommitment[][]The signed chunk commitments for the blob
optionsConfirmBlobChunksOptionsOptional confirm blob chunks options

Returns: Promise<{ transaction: PendingTransactionResponse }>

getBlobMetadata({account, name})

Retrieves blob metadata from the blockchain.

ParameterTypeDescription
accountAccountAddressInputThe account address
namestringThe name/path of the blob

Returns: Promise<BlobMetadata>

getAccountBlobs({account})

Gets all blob metadata for a specific account.

ParameterTypeDescription
accountAccountAddressInputThe account address

Returns: Promise<BlobMetadata[]>


ShelbyRPCClient

The client to interact with the Shelby RPC node which is responsible for storing, confirming, and retrieving blobs from the storage layer.

Prop

Type

Methods

putBlob({account, blobName, blobData})

Uploads blob data to Shelby storage using multipart upload for reliability.

ParameterTypeDescription
accountAccountAddressInputThe account address to store the blob under
blobNamestringThe name/path of the blob
blobDataUint8ArrayThe blob data to upload

getBlob({account, blobName, range?})

Downloads blob data as a readable stream with optional byte range support.

ParameterTypeDescription
accountAccountAddressInputThe account address
blobNamestringThe name/path of the blob
range{ start: number; end?: number }Optional byte range

Returns: Promise<ShelbyBlob>


ShelbyBlob

A blob is a representation of a file (or a part of a file) that is stored on the Shelby network.

Prop

Type

BlobMetadata

The metadata of a blob that describes the blob and its properties.

Prop

Type

ClayEncoding

The encoding of a blob that describes the encoding of the blob.

Prop

Type