Agent data
Optional
options: AgentOptionsPrivate
#privateAdd a proof to the agent store
A proof is a delegation with an audience matching agent DID
Creates a space signer and a delegation to the agent
Optional
name: stringGet current space DID, proofs and abilities
Get delegations created by the agent for others.
Optional
caps: Capability<Ability, `${string}:${string}`, any>[]Capabilities to filter by. Empty or undefined caps with return all the delegations.
Get delegations created by the agent for others and their metadata.
Optional
caps: Capability<Ability, `${string}:${string}`, any>[]Capabilities to filter by. Empty or undefined caps with return all the delegations.
Execute invocations on the agent's connection
const i1 = await agent.invoke(Space.info, {})
const i2 = await agent.invoke(Space.recover, {
nb: {
identity: 'mailto:hello@web3.storage',
},
})
const results = await agent.execute2(i1, i2)
Rest
...invocations: IGet Space information from Access service
Optional
space: URI<"did:">Import a space from a '*' delegation
Creates an invocation for the given capability with Agent's proofs, service, issuer and space.
const recoverInvocation = await agent.invoke(Space.recover, {
nb: {
identity: 'mailto: email@gmail.com',
},
})
await recoverInvocation.execute(agent.connection)
// or
await agent.execute(recoverInvocation)
Invoke and execute the given capability on the Access service connection
await agent.invokeAndExecute(Space.recover, {
nb: {
identity: 'mailto: email@gmail.com',
},
})
// sugar for
const recoverInvocation = await agent.invoke(Space.recover, {
nb: {
identity: 'mailto: email@gmail.com',
},
})
await recoverInvocation.execute(agent.connection)
Get all the proofs matching the capabilities
Proofs are delegations with an audience matching agent DID.
Optional
caps: Capability<Ability, `${string}:${string}`, any>[]Capabilities to filter by. Empty or undefined caps with return all the proofs.
Optional
opts: { Optional
signal?: AbortSignalInvokes voucher/redeem for the free tier, wait on the websocket for the voucher/claim and invokes it
It also adds a full space delegation to the service in the voucher/claim invocation to allow for recovery
Optional
opts: { Optional
signal?: AbortSignalStatic
createCreate a new Agent instance, optionally with the passed initialization data.
Optional
init: Partial<AgentDataModel>Optional
options: AgentOptions & AgentDataOptionsStatic
fromInstantiate an Agent from pre-exported agent data.
Optional
options: AgentOptions & AgentDataOptionsGenerated using TypeDoc
Agent
Usage: