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.
Parameter | Type | Description |
---|---|---|
account | Account | The account to register the blob for |
blobName | BlobName | The name/path of the blob |
blobMerkleRoot | string | The merkle root of the blob |
size | number | The size of the blob in bytes |
expirationMicros | number | The expiration time in microseconds |
options | WriteBlobCommitmentsOptions | Optional write blob commitments options |
Returns: Promise<{ transaction: PendingTransactionResponse }>
confirmBlobChunks({signer, account, blobName, signedChunksetChunkCommitments, options})
Confirms the blob chunks for a given blob.
Parameter | Type | Description |
---|---|---|
signer | Account | The account to confirm the blob chunks for |
account | AccountAddressInput | The account address |
blobName | string | The name/path of the blob |
signedChunksetChunkCommitments | SignedChunkCommitment[][] | The signed chunk commitments for the blob |
options | ConfirmBlobChunksOptions | Optional confirm blob chunks options |
Returns: Promise<{ transaction: PendingTransactionResponse }>
getBlobMetadata({account, name})
Retrieves blob metadata from the blockchain.
Parameter | Type | Description |
---|---|---|
account | AccountAddressInput | The account address |
name | string | The name/path of the blob |
Returns: Promise<BlobMetadata>
getAccountBlobs({account})
Gets all blob metadata for a specific account.
Parameter | Type | Description |
---|---|---|
account | AccountAddressInput | The 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.
Parameter | Type | Description |
---|---|---|
account | AccountAddressInput | The account address to store the blob under |
blobName | string | The name/path of the blob |
blobData | Uint8Array | The blob data to upload |
getBlob({account, blobName, range?})
Downloads blob data as a readable stream with optional byte range support.
Parameter | Type | Description |
---|---|---|
account | AccountAddressInput | The account address |
blobName | string | The 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