Constructors
constructor
Properties
readBlob
readBlob: ( __namedParameters: ReadBlobOptions,) => Promise<Uint8Array<ArrayBufferLike>> = ... Methods
certifyBlob
Returns Promise<(tx: Transaction) => void>
certifyBlobTransaction
createStorage
createStorageTransaction
deleteBlob
deleteBlobTransaction
encodeBlob
encodeBlob( blob: Uint8Array,): Promise< { blobId: string; metadata: { V1: { encoding_type: | "RedStuff" | "RS2" | { RedStuff: null | boolean | object } | { RS2: null | boolean | object }; hashes: Iterable< { primary_hash: EnumInputShape< { Digest: Iterable<number, any, any>; Empty: null | boolean | object; }, >; secondary_hash: EnumInputShape< { Digest: Iterable<number, any, any>; Empty: null | boolean | object; }, >; }, any, any, > & { length: number }; unencoded_length: string | number | bigint; }; }; rootHash: Uint8Array<ArrayBufferLike>; sliversByNode: SliversForNode[]; },> Returns Promise<
{
blobId: string;
metadata: {
V1: {
encoding_type: | "RedStuff"
| "RS2"
| { RedStuff: null
| boolean
| object }
| { RS2: null | boolean | object };
hashes: Iterable<
{
primary_hash: EnumInputShape<
{
Digest: Iterable<number, any, any>;
Empty: null | boolean | object;
},
>;
secondary_hash: EnumInputShape<
{
Digest: Iterable<number, any, any>;
Empty: null | boolean | object;
},
>;
},
any,
any,
> & { length: number };
unencoded_length: string | number | bigint;
};
};
rootHash: Uint8Array<ArrayBufferLike>;
sliversByNode: SliversForNode[];
},
>
executeCertifyBlobTransaction
Returns Promise<{ digest: string }>
executeCreateStorageTransaction
executeCreateStorageTransaction( __namedParameters: StorageWithSizeOptions & { signer: Signer; transaction?: Transaction; },): Promise< { digest: string; storage: { end_epoch: number; id: { id: string }; start_epoch: number; storage_size: string; }; },> Returns Promise<
{
digest: string;
storage: {
end_epoch: number;
id: { id: string };
start_epoch: number;
storage_size: string;
};
},
>
executeDeleteBlobTransaction
Returns Promise<{ digest: string }>
executeExtendBlobTransaction
Returns Promise<{ digest: string }>
executeRegisterBlobTransaction
executeRegisterBlobTransaction( __namedParameters: RegisterBlobOptions & { signer: Signer; transaction?: Transaction; },): Promise< { blob: { blob_id: string; certified_epoch: null | number; deletable: boolean; encoding_type: number; id: { id: string }; registered_epoch: number; size: string; storage: { end_epoch: number; id: { id: string }; start_epoch: number; storage_size: string; }; }; digest: string; },> Returns Promise<
{
blob: {
blob_id: string;
certified_epoch: null
| number;
deletable: boolean;
encoding_type: number;
id: { id: string };
registered_epoch: number;
size: string;
storage: {
end_epoch: number;
id: { id: string };
start_epoch: number;
storage_size: string;
};
};
digest: string;
},
>
executeWriteBlobAttributesTransaction
Returns Promise<{ digest: string }>
extendBlob
Returns Promise<(_tx: Transaction) => void>
extendBlobTransaction
Returns Promise<
{
blob_id: string;
metadata: {
$kind: "V1";
V1: {
encoding_type: EnumOutputShapeWithKeys<
{ RedStuff: true; RS2: true },
"RedStuff" | "RS2",
>;
hashes: {
primary_hash: EnumOutputShapeWithKeys<
{ Digest: Uint8Array<ArrayBufferLike>; Empty: true },
"Empty" | "Digest",
>;
secondary_hash: EnumOutputShapeWithKeys<
{ Digest: Uint8Array<ArrayBufferLike>; Empty: true },
"Empty" | "Digest",
>;
}[];
unencoded_length: string;
};
};
},
>
getBlobType
getBlobType(): string | Promise<string> Returns string | Promise<string>
getSlivers
getSlivers( __namedParameters: ReadBlobOptions,): Promise< { index: number; symbols: { data: number[]; symbol_size: number } }[],> Returns Promise<{ index: number; symbols: { data: number[]; symbol_size: number } }[]>
getStorageConfirmationFromNode
Returns Promise<StorageConfirmation>
getVerifiedBlobStatus
getVerifiedBlobStatus(__namedParameters: ReadBlobOptions): Promise<BlobStatus> Returns Promise<BlobStatus>
readBlobAttributes
readBlobAttributes( __namedParameters: { blobObjectId: string },): Promise<null | Record<string, string>> Parameters
- __namedParameters: { blobObjectId: string }
Returns Promise<null | Record<string, string>>
registerBlob
registerBlobTransaction
reset
Returns void
stakingObject
stakingObject(): Promise< { id: { id: string }; new_package_id: null | string; package_id: string; version: string; },> Returns Promise<
{
id: { id: string };
new_package_id: null | string;
package_id: string;
version: string;
},
>
stakingState
stakingState(): Promise< { active_set: { id: { id: string } }; committee: { pos0: { contents: { key: string; value: number[] }[] } }; epoch: number; epoch_duration: string; epoch_state: EnumOutputShapeWithKeys< { EpochChangeDone: string; EpochChangeSync: number; NextParamsSelected: string; }, "EpochChangeSync" | "EpochChangeDone" | "NextParamsSelected", >; first_epoch_start: string; n_shards: number; next_committee: | null | { pos0: { contents: { key: string; value: number[] }[] } }; next_epoch_params: | null | { storage_price_per_unit_size: string; total_capacity_size: string; write_price_per_unit_size: string; }; next_epoch_public_keys: { id: { id: string } }; pools: { id: { id: string }; size: string }; previous_committee: { pos0: { contents: { key: string; value: number[] }[] }; }; },> Returns Promise<
{
active_set: { id: { id: string } };
committee: { pos0: { contents: { key: string; value: number[] }[] } };
epoch: number;
epoch_duration: string;
epoch_state: EnumOutputShapeWithKeys<
{
EpochChangeDone: string;
EpochChangeSync: number;
NextParamsSelected: string;
},
"EpochChangeSync"
| "EpochChangeDone"
| "NextParamsSelected",
>;
first_epoch_start: string;
n_shards: number;
next_committee:
| null
| { pos0: { contents: { key: string; value: number[] }[] } };
next_epoch_params:
| null
| {
storage_price_per_unit_size: string;
total_capacity_size: string;
write_price_per_unit_size: string;
};
next_epoch_public_keys: { id: { id: string } };
pools: { id: { id: string }; size: string };
previous_committee: {
pos0: { contents: { key: string; value: number[] }[] };
};
},
>
storageCost
storageCost( size: number, epochs: number,): Promise<{ storageCost: bigint; totalCost: bigint; writeCost: bigint }> Parameters
- size: number
- epochs: number
Returns Promise<{ storageCost: bigint; totalCost: bigint; writeCost: bigint }>
systemObject
systemObject(): Promise< { id: { id: string }; new_package_id: null | string; package_id: string; version: string; },> Returns Promise<
{
id: { id: string };
new_package_id: null | string;
package_id: string;
version: string;
},
>
systemState
systemState(): Promise< { committee: { epoch: number; members: { node_id: string; public_key: { bytes: number[] }; weight: number; }[]; n_shards: number; total_aggregated_key: { bytes: number[] }; }; deny_list_sizes: { id: { id: string } }; event_blob_certification_state: { aggregate_weight_per_blob: { contents: { key: { blob_id: string; ending_checkpoint_sequence_number: string }; value: number; }[]; }; latest_certified_blob: | null | { blob_id: string; ending_checkpoint_sequence_number: string }; }; future_accounting: { current_index: number; length: number; ring_buffer: { epoch: number; rewards_to_distribute: { value: string }; used_capacity: string; }[]; }; storage_price_per_unit_size: string; total_capacity_size: string; used_capacity_size: string; write_price_per_unit_size: string; },> Returns Promise<
{
committee: {
epoch: number;
members: {
node_id: string;
public_key: { bytes: number[] };
weight: number;
}[];
n_shards: number;
total_aggregated_key: { bytes: number[] };
};
deny_list_sizes: { id: { id: string } };
event_blob_certification_state: {
aggregate_weight_per_blob: {
contents: {
key: { blob_id: string; ending_checkpoint_sequence_number: string };
value: number;
}[];
};
latest_certified_blob: | null
| { blob_id: string; ending_checkpoint_sequence_number: string };
};
future_accounting: {
current_index: number;
length: number;
ring_buffer: {
epoch: number;
rewards_to_distribute: { value: string };
used_capacity: string;
}[];
};
storage_price_per_unit_size: string;
total_capacity_size: string;
used_capacity_size: string;
write_price_per_unit_size: string;
},
>
writeBlob
writeBlob( __namedParameters: WriteBlobOptions,): Promise< { blobId: string; blobObject: { blob_id: string; certified_epoch: null | number; deletable: boolean; encoding_type: number; id: { id: string }; registered_epoch: number; size: string; storage: { end_epoch: number; id: { id: string }; start_epoch: number; storage_size: string; }; }; },> Returns Promise<
{
blobId: string;
blobObject: {
blob_id: string;
certified_epoch: null
| number;
deletable: boolean;
encoding_type: number;
id: { id: string };
registered_epoch: number;
size: string;
storage: {
end_epoch: number;
id: { id: string };
start_epoch: number;
storage_size: string;
};
};
},
>
writeBlobAttributes
Returns Promise<(tx: Transaction) => void>
writeBlobAttributesTransaction
writeEncodedBlobToNode
Returns Promise<StorageConfirmation>
writeEncodedBlobToNodes
Returns Promise<(null | StorageConfirmation)[]>
Returns Promise<StoreBlobMetadataResponse>
writeSliver
Returns Promise<StoreSliverResponse>
writeSliversToNode
Returns Promise<void>
Static
experimental_asClientExtension
Read a blob from the storage nodes