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
Name | Type | Description |
---|---|---|
cidOrIpfsUri | string | The CID or IPFS URI of the data to retrieve. |
config? | StorageConfigOverrides | An optional configuration object. |
Returns
Promise
<unknown
>
A Promise that resolves to the retrieved data.
Defined in
getMetadata
• getMetadata: (cidOrIpfsUri
: string
, config?
: StorageConfigOverrides
) => Promise
<HypercertMetadata
>
Type declaration
▸ (cidOrIpfsUri
, config?
): Promise
<HypercertMetadata
>
Retrieves the metadata for a hypercerts.
Parameters
Name | Type | Description |
---|---|---|
cidOrIpfsUri | string | The CID or IPFS URI of the metadata to retrieve. |
config? | StorageConfigOverrides | An optional configuration object. |
Returns
Promise
<HypercertMetadata
>
A Promise that resolves to the retrieved metadata.
Defined in
storeAllowList
• storeAllowList: (allowList
: AllowlistEntry
[], totalUnits
: bigint
, config?
: StorageConfigOverrides
) => Promise
<string
>
Type declaration
▸ (allowList
, totalUnits
, config?
): Promise
<string
>
Stores the allowlost for a hypercert.
Parameters
Name | Type | Description |
---|---|---|
allowList | AllowlistEntry [] | The metadata to store. |
totalUnits | bigint | - |
config? | StorageConfigOverrides | An optional configuration object. |
Returns
Promise
<string
>
A Promise that resolves to the CID of the stored metadata.
Defined in
storeMetadata
• storeMetadata: (metadata
: HypercertMetadata
, config?
: StorageConfigOverrides
) => Promise
<string
>
Type declaration
▸ (metadata
, config?
): Promise
<string
>
Stores the metadata for a hypercert.
Parameters
Name | Type | Description |
---|---|---|
metadata | HypercertMetadata | The metadata to store. |
config? | StorageConfigOverrides | An optional configuration object. |
Returns
Promise
<string
>
A Promise that resolves to the CID of the stored metadata.