Skip to main content

Interface: HypercertStorageInterface

The interface for the Hypercert storage layer.

Implemented by​

Properties​

getData​

• getData: (cidOrIpfsUri: string, config?: StorageConfigOverrides) => Promise<unknown>

Type declaration​

▸ (cidOrIpfsUri, config?): Promise<unknown>

Retrieves arbitrary data from IPFS.

Parameters​
NameTypeDescription
cidOrIpfsUristringThe CID or IPFS URI of the data to retrieve.
config?StorageConfigOverridesAn optional configuration object.
Returns​

Promise<unknown>

A Promise that resolves to the retrieved data.

Defined in​

sdk/src/types/client.ts:147


getMetadata​

• getMetadata: (cidOrIpfsUri: string, config?: StorageConfigOverrides) => Promise<HypercertMetadata>

Type declaration​

▸ (cidOrIpfsUri, config?): Promise<HypercertMetadata>

Retrieves the metadata for a hypercerts.

Parameters​
NameTypeDescription
cidOrIpfsUristringThe CID or IPFS URI of the metadata to retrieve.
config?StorageConfigOverridesAn optional configuration object.
Returns​

Promise<HypercertMetadata>

A Promise that resolves to the retrieved metadata.

Defined in​

sdk/src/types/client.ts:139


storeAllowList​

• storeAllowList: (allowList: AllowlistEntry[], totalUnits: bigint, config?: StorageConfigOverrides) => Promise<string>

Type declaration​

▸ (allowList, totalUnits, config?): Promise<string>

Stores the allowlost for a hypercert.

Parameters​
NameTypeDescription
allowListAllowlistEntry[]The metadata to store.
totalUnitsbigint-
config?StorageConfigOverridesAn optional configuration object.
Returns​

Promise<string>

A Promise that resolves to the CID of the stored metadata.

Defined in​

sdk/src/types/client.ts:123


storeMetadata​

• storeMetadata: (metadata: HypercertMetadata, config?: StorageConfigOverrides) => Promise<string>

Type declaration​

▸ (metadata, config?): Promise<string>

Stores the metadata for a hypercert.

Parameters​
NameTypeDescription
metadataHypercertMetadataThe metadata to store.
config?StorageConfigOverridesAn optional configuration object.
Returns​

Promise<string>

A Promise that resolves to the CID of the stored metadata.

Defined in​

sdk/src/types/client.ts:131