The web3.storage aggregate client
npm install @web3-storage/aggregate-clientThe aggregate client for https://web3.storage
The @web3-storage/aggregate-client package provides the "low level" client API for aggregating data uploaded with the w3up platform. It is based on [web3-storage/specs/w3-aggregation.md])https://github.com/web3-storage/specs/blob/feat/filecoin-spec/w3-aggregation.md) and is not intended for web3.storage end users.
Install the package using npm:
``bash`
npm install @web3-storage/aggregate-client
`ts`
function aggregateOffer(
conf: InvocationConfig,
piece: Piece,
offer: Piece[],
): Promise<{ status: string }>
Ask the service to create an aggregate offer and put it available for Storage Providers.
More information: InvocationConfig
`ts`
function aggregateGet(
conf: InvocationConfig,
subject: PieceCID,
): Promise
Ask the service to get deal details of an aggregate.
More information: InvocationConfig
An offered CAR to be part of an Aggregate.
`ts
export interface Piece {
link: PieceCID
size: number
}
export type PieceCID = ReturnType
`
This is the configuration for the UCAN invocation. It is an object with issuer, audience, resource and proofs:
- The issuer is the signing authority that is issuing the UCAN invocation(s).audience
- The is the principal authority that the UCAN is delegated to.resource
- The (with field) points to a storage space.proofs` are a set of capability delegations that prove the issuer has the capability to perform the action. These might not be required.
- The
Feel free to join in. All welcome. Please open an issue!
Dual-licensed under MIT + Apache 2.0