Private
#privateAdd a proof to the agent store.
Adds set of proofs to the agent store.
Creates a space signer and a delegation to the agent
Get current space DID, proofs and abilities
Get delegations created by the agent for others.
Optional
caps: CapabilityQuery[]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: CapabilityQuery[]Capabilities to filter by. Empty or undefined caps with return all the delegations.
Execute invocations on the agent's connection
Rest
...invocations: Iconst 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)
Get Space information from Access service
Optional
space: URI<"did:">Import a space from a delegation.
Optional
options: { Optional
name?: stringCreates 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, or with an audience matching the session DID.
Proof of session will also be included in the returned proofs if any proofs matching the passed capabilities require it.
Optional
caps: CapabilityQuery[]Capabilities to filter by. Empty or undefined caps with return all the proofs.
Optional
options: { Optional
sessiononly include session proofs for this issuer
Revoke a delegation by CID.
If the delegation was issued by this agent (and therefore is stored in the
delegation store) you can just pass the CID. If not, or if the current agent's
delegation store no longer contains the delegation, you MUST pass a chain of
proofs that proves your authority to revoke this delegation as options.proofs
.
Optional
options: { Optional
proofs?: Delegation<Capabilities>[]Static
createCreate a new Agent instance, optionally with the passed initialization data.
Optional
init: Partial<AgentDataModel>Optional
options: AgentOptions<R_2> & AgentDataOptionsStatic
fromInstantiate an Agent from pre-exported agent data.
Optional
options: AgentOptions<R_3> & AgentDataOptionsGenerated using TypeDoc
Agent
Usage: