Class: IpfsCasExecutor ​
Defined in: packages/api/src/cas.ts:31
Default CasExecutor backed by IPFS via Helia.
Stores/retrieves data as raw blocks (0x55 codec) with SHA-256 hashing. The CID is deterministically derived from the content hash, so lookups by base64url SHA-256 hash translate directly to CID lookups.
Implements ​
Constructors ​
Constructor ​
new IpfsCasExecutor(
helia):IpfsCasExecutor
Defined in: packages/api/src/cas.ts:34
Parameters ​
helia ​
Helia
Returns ​
IpfsCasExecutor
Methods ​
publish() ​
publish(
data):Promise<string>
Defined in: packages/api/src/cas.ts:48
Publish raw bytes and return the base64url SHA-256 hash.
Parameters ​
data ​
Uint8Array
Returns ​
Promise<string>
Implementation of ​
retrieve() ​
retrieve(
hash):Promise<Uint8Array<ArrayBufferLike> |null>
Defined in: packages/api/src/cas.ts:38
Retrieve raw bytes by base64url SHA-256 hash. Returns null if not found.
Parameters ​
hash ​
string
Returns ​
Promise<Uint8Array<ArrayBufferLike> | null>