Skip to content

Identity

Defined in: packages/agent/src/auth.ts:39

A General Identity object. This does not have to be a private key (for example, the Anonymous identity), but it must be able to transform request.

getPrincipal(): Principal

Defined in: packages/agent/src/auth.ts:44

Get the principal represented by this identity. Normally should be a Principal.selfAuthenticating().

Principal


transformRequest(request): Promise<unknown>

Defined in: packages/agent/src/auth.ts:51

Transform a request into a signed version of the request. This is done last after the transforms on the body of a request. The returned object can be anything, but must be serializable to CBOR.

HttpAgentRequest

Promise<unknown>