Skip to content

SignIdentity

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

An Identity that can sign blobs.

new SignIdentity(): SignIdentity

SignIdentity

protected _principal: undefined | Principal

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

getPrincipal(): Principal

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

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

Principal

Identity.getPrincipal


abstract getPublicKey(): PublicKey

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

Returns the public key that would match this identity’s signature.

PublicKey


abstract sign(blob): Promise<Signature>

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

Signs a blob of data, with this identity’s private key.

Uint8Array

Promise<Signature>


transformRequest(request): Promise<unknown>

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

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

internet computer request to transform

Promise<unknown>

Identity.transformRequest