SignIdentity
Defined in: packages/agent/src/auth.ts:57
An Identity that can sign blobs.
Extended by
Section titled “Extended by”Implements
Section titled “Implements”Constructors
Section titled “Constructors”Constructor
Section titled “Constructor”new SignIdentity():
SignIdentity
Returns
Section titled “Returns”SignIdentity
Properties
Section titled “Properties”_principal
Section titled “_principal”
protected_principal:undefined|Principal
Defined in: packages/agent/src/auth.ts:58
Methods
Section titled “Methods”getPrincipal()
Section titled “getPrincipal()”getPrincipal():
Principal
Defined in: packages/agent/src/auth.ts:74
Get the principal represented by this identity. Normally should be a
Principal.selfAuthenticating().
Returns
Section titled “Returns”Implementation of
Section titled “Implementation of”getPublicKey()
Section titled “getPublicKey()”
abstractgetPublicKey():PublicKey
Defined in: packages/agent/src/auth.ts:63
Returns the public key that would match this identity’s signature.
Returns
Section titled “Returns”sign()
Section titled “sign()”
abstractsign(blob):Promise<Signature>
Defined in: packages/agent/src/auth.ts:68
Signs a blob of data, with this identity’s private key.
Parameters
Section titled “Parameters”Uint8Array
Returns
Section titled “Returns”Promise<Signature>
transformRequest()
Section titled “transformRequest()”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.
Parameters
Section titled “Parameters”request
Section titled “request”internet computer request to transform
Returns
Section titled “Returns”Promise<unknown>