Class: UploadClient
capability/upload.UploadClient
Client for interacting with the upload/*
capabilities.
Hierarchy
↳
UploadClient
Constructors
constructor
• new UploadClient(agentData
, options?
)
Parameters
Name | Type |
---|---|
agentData | AgentData |
options? | Object |
options.serviceConf | undefined | ServiceConf |
Inherited from
Defined in
Properties
_agent
• Protected
_agent: Agent
Inherited from
Defined in
_serviceConf
• Protected
_serviceConf: ServiceConf
Inherited from
Defined in
Methods
_invocationConfig
▸ Protected
_invocationConfig(abilities
): Promise
<{ audience
: Principal
<`did:${string}:${string}`> ; issuer
: Signer
<`did:${string}:${string}`, SigAlg
> ; proofs
: Delegation
<Capabilities
>[] ; with
: `did:${string}:${string}` = resource }>
Parameters
Name | Type |
---|---|
abilities | Ability [] |
Returns
Promise
<{ audience
: Principal
<`did:${string}:${string}`> ; issuer
: Signer
<`did:${string}:${string}`, SigAlg
> ; proofs
: Delegation
<Capabilities
>[] ; with
: `did:${string}:${string}` = resource }>
Inherited from
Defined in
add
▸ add(root
, shards
, options?
): Promise
<UploadAddResponse
>
Register an "upload" to the resource.
Parameters
Name | Type | Description |
---|---|---|
root | UnknownLink | Root data CID for the DAG that was stored. |
shards | CARLink [] | CIDs of CAR files that contain the DAG. |
options? | RequestOptions |
Returns
Promise
<UploadAddResponse
>
Defined in
list
▸ list(options?
): Promise
<ListResponse
<UploadListResult
>>
List uploads registered to the resource.
Parameters
Name | Type |
---|---|
options? | ListRequestOptions |
Returns
Promise
<ListResponse
<UploadListResult
>>
Defined in
remove
▸ remove(root
, options?
): Promise
<undefined
| UploadRemoveResponse
& { error?
: undefined
}>
Remove an upload by root data CID.
Parameters
Name | Type | Description |
---|---|---|
root | UnknownLink | Root data CID to remove. |
options? | RequestOptions |
Returns
Promise
<undefined
| UploadRemoveResponse
& { error?
: undefined
}>