Skip to content

Overview

Defined in: packages/core/src/identity/identity/attributes.ts:54

An Identity decorator that injects sender_info into the request body before delegating to an inner identity for signing.

Because sender_info is part of the request content, it is included in the representation-independent hash (requestIdOf) and covered by the sender’s signature for call and query endpoints.

The IC does not hash sender_info for read_state requests, so the decorator skips injection for that endpoint to avoid signature verification failures on update-call polls.

const inner = DelegationIdentity.fromDelegation(key, chain);
const identity = new AttributesIdentity({
inner,
attributes: { data: new Uint8Array([...]), signature: new Uint8Array([...]) },
signer: { canisterId: Principal.fromText('aaaaa-aa') },
});
const agent = HttpAgent.create({ identity });

new AttributesIdentity(options): AttributesIdentity

Defined in: packages/core/src/identity/identity/attributes.ts:65

AttributesIdentityOptions

Configuration for the identity.

AttributesIdentity

getPrincipal(): Principal

Defined in: packages/core/src/identity/identity/attributes.ts:71

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

Principal

Identity.getPrincipal

transformRequest(request): Promise<unknown>

Defined in: packages/core/src/identity/identity/attributes.ts:75

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>

Identity.transformRequest


Defined in: packages/core/src/identity/identity/ecdsa.ts:13

  • Error

new CryptoError(message): CryptoError

Defined in: packages/core/src/identity/identity/ecdsa.ts:14

string

CryptoError

Error.constructor

optional cause?: unknown

Defined in: node_modules/.pnpm/typescript@5.9.3/node_modules/typescript/lib/lib.es2022.error.d.ts:26

Error.cause

readonly message: string

Defined in: packages/core/src/identity/identity/ecdsa.ts:14

Error.message

name: string

Defined in: node_modules/.pnpm/typescript@5.9.3/node_modules/typescript/lib/lib.es5.d.ts:1076

Error.name

optional stack?: string

Defined in: node_modules/.pnpm/typescript@5.9.3/node_modules/typescript/lib/lib.es5.d.ts:1078

Error.stack

static stackTraceLimit: number

Defined in: node_modules/.pnpm/@types+node@25.5.0/node_modules/@types/node/globals.d.ts:67

The Error.stackTraceLimit property specifies the number of stack frames collected by a stack trace (whether generated by new Error().stack or Error.captureStackTrace(obj)).

The default value is 10 but may be set to any valid JavaScript number. Changes will affect any stack trace captured after the value has been changed.

If set to a non-number value, or set to a negative number, stack traces will not capture any frames.

Error.stackTraceLimit

static captureStackTrace(targetObject, constructorOpt?): void

Defined in: node_modules/.pnpm/@types+node@25.5.0/node_modules/@types/node/globals.d.ts:51

Creates a .stack property on targetObject, which when accessed returns a string representing the location in the code at which Error.captureStackTrace() was called.

const myObject = {};
Error.captureStackTrace(myObject);
myObject.stack; // Similar to `new Error().stack`

The first line of the trace will be prefixed with ${myObject.name}: ${myObject.message}.

The optional constructorOpt argument accepts a function. If given, all frames above constructorOpt, including constructorOpt, will be omitted from the generated stack trace.

The constructorOpt argument is useful for hiding implementation details of error generation from the user. For instance:

function a() {
b();
}
function b() {
c();
}
function c() {
// Create an error without stack trace to avoid calculating the stack trace twice.
const { stackTraceLimit } = Error;
Error.stackTraceLimit = 0;
const error = new Error();
Error.stackTraceLimit = stackTraceLimit;
// Capture the stack trace above function b
Error.captureStackTrace(error, b); // Neither function c, nor b is included in the stack trace
throw error;
}
a();

object

Function

void

Error.captureStackTrace

static prepareStackTrace(err, stackTraces): any

Defined in: node_modules/.pnpm/@types+node@25.5.0/node_modules/@types/node/globals.d.ts:55

Error

CallSite[]

any

https://v8.dev/docs/stack-trace-api#customizing-stack-traces

Error.prepareStackTrace


Defined in: packages/core/src/identity/identity/delegation.ts:42

A single delegation object that is signed by a private key. This is constructed by DelegationChain.create().

DelegationChain

new Delegation(pubkey, expiration, targets?): Delegation

Defined in: packages/core/src/identity/identity/delegation.ts:43

Uint8Array

bigint

Principal[]

Delegation

readonly expiration: bigint

Defined in: packages/core/src/identity/identity/delegation.ts:45

readonly pubkey: Uint8Array

Defined in: packages/core/src/identity/identity/delegation.ts:44

readonly optional targets?: Principal[]

Defined in: packages/core/src/identity/identity/delegation.ts:46

toCborValue(): object

Defined in: packages/core/src/identity/identity/delegation.ts:49

Returns a value that can be encoded with CBOR. Typically called in the replacer function of the encode function.

object

expiration: bigint

pubkey: Uint8Array<ArrayBufferLike>

optional targets?: Principal[]

ToCborValue.toCborValue

toJSON(): JsonnableDelegation

Defined in: packages/core/src/identity/identity/delegation.ts:59

JsonnableDelegation


Defined in: packages/core/src/identity/identity/delegation.ts:149

A chain of delegations. This is JSON Serializable. This is the object to serialize and pass to a DelegationIdentity. It does not keep any private keys.

protected new DelegationChain(delegations, publicKey): DelegationChain

Defined in: packages/core/src/identity/identity/delegation.ts:243

SignedDelegation[]

DerEncodedPublicKey

DelegationChain

readonly delegations: SignedDelegation[]

Defined in: packages/core/src/identity/identity/delegation.ts:244

readonly publicKey: DerEncodedPublicKey

Defined in: packages/core/src/identity/identity/delegation.ts:245

toJSON(): JsonnableDelegationChain

Defined in: packages/core/src/identity/identity/delegation.ts:248

JsonnableDelegationChain

static create(from, to, expiration?, options?): Promise<DelegationChain>

Defined in: packages/core/src/identity/identity/delegation.ts:179

Create a delegation chain between two (or more) keys. By default, the expiration time will be very short (15 minutes).

To build a chain of more than 2 identities, this function needs to be called multiple times, passing the previous delegation chain into the options argument. For example:

SignIdentity

The identity that will delegate.

PublicKey

The identity that gets delegated. It can now sign messages as if it was the identity above.

Date = ...

The length the delegation is valid. By default, 15 minutes from calling this function.

A set of options for this delegation. expiration and previous

DelegationChain

Another DelegationChain that this chain should start with.

Principal[]

targets that scope the delegation (e.g. Canister Principals)

Promise<DelegationChain>

const rootKey = createKey();
const middleKey = createKey();
const bottomeKey = createKey();
const rootToMiddle = await DelegationChain.create(
root, middle.getPublicKey(), Date.parse('2100-01-01'),
);
const middleToBottom = await DelegationChain.create(
middle, bottom.getPublicKey(), Date.parse('2100-01-01'), { previous: rootToMiddle },
);
// We can now use a delegation identity that uses the delegation above:
const identity = DelegationIdentity.fromDelegation(bottomKey, middleToBottom);

static fromDelegations(delegations, publicKey): DelegationChain

Defined in: packages/core/src/identity/identity/delegation.ts:236

Creates a DelegationChain object from a list of delegations and a DER-encoded public key.

SignedDelegation[]

The list of delegations.

DerEncodedPublicKey

The DER-encoded public key of the key-pair signing the first delegation.

DelegationChain

static fromJSON(json): DelegationChain

Defined in: packages/core/src/identity/identity/delegation.ts:199

Creates a DelegationChain object from a JSON string.

string | JsonnableDelegationChain

The JSON string to parse.

DelegationChain


Defined in: packages/core/src/identity/identity/delegation.ts:275

An Identity that adds delegation to a request. Everywhere in this class, the name innerKey refers to the SignIdentity that is being used to sign the requests, while originalKey is the identity that is being borrowed. More identities can be used in the middle to delegate.

protected new DelegationIdentity(_inner, _delegation): DelegationIdentity

Defined in: packages/core/src/identity/identity/delegation.ts:288

Pick<SignIdentity, "sign">

DelegationChain

DelegationIdentity

SignIdentity.constructor

protected _principal: Principal | undefined

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

SignIdentity._principal

getDelegation(): DelegationChain

Defined in: packages/core/src/identity/identity/delegation.ts:295

DelegationChain

getPrincipal(): Principal

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

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

Principal

SignIdentity.getPrincipal

getPublicKey(): PublicKey

Defined in: packages/core/src/identity/identity/delegation.ts:299

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

PublicKey

SignIdentity.getPublicKey

sign(blob): Promise<Signature>

Defined in: packages/core/src/identity/identity/delegation.ts:305

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

Uint8Array

Promise<Signature>

SignIdentity.sign

transformRequest(request): Promise<unknown>

Defined in: packages/core/src/identity/identity/delegation.ts:309

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>

SignIdentity.transformRequest

static fromDelegation(key, delegation): DelegationIdentity

Defined in: packages/core/src/identity/identity/delegation.ts:281

Create a delegation without having access to delegateKey.

Pick<SignIdentity, "sign">

The key used to sign the requests.

DelegationChain

A delegation object created using createDelegation.

DelegationIdentity


Defined in: packages/core/src/identity/identity/ecdsa.ts:47

An identity interface that wraps an ECDSA keypair using the P-256 named curve. Supports DER-encoding and decoding for agent calls

protected new ECDSAKeyIdentity(keyPair, derKey, subtleCrypto): ECDSAKeyIdentity

Defined in: packages/core/src/identity/identity/ecdsa.ts:103

CryptoKeyPair

DerEncodedPublicKey

SubtleCrypto

ECDSAKeyIdentity

SignIdentity.constructor

protected _derKey: DerEncodedPublicKey

Defined in: packages/core/src/identity/identity/ecdsa.ts:98

protected _keyPair: CryptoKeyPair

Defined in: packages/core/src/identity/identity/ecdsa.ts:99

protected _principal: Principal | undefined

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

SignIdentity._principal

protected _subtleCrypto: SubtleCrypto

Defined in: packages/core/src/identity/identity/ecdsa.ts:100

getKeyPair(): CryptoKeyPair

Defined in: packages/core/src/identity/identity/ecdsa.ts:118

Return the internally-used key pair.

CryptoKeyPair

a CryptoKeyPair

getPrincipal(): Principal

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

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

Principal

SignIdentity.getPrincipal

getPublicKey(): PublicKey & DerCryptoKey

Defined in: packages/core/src/identity/identity/ecdsa.ts:126

Return the public key.

PublicKey & DerCryptoKey

an & DerCryptoKey

SignIdentity.getPublicKey

sign(challenge): Promise<Signature>

Defined in: packages/core/src/identity/identity/ecdsa.ts:141

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

Uint8Array

challenge to sign with this identity’s secretKey, producing a signature

Promise<Signature>

signature

SignIdentity.sign

transformRequest(request): Promise<unknown>

Defined in: packages/core/src/agent/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>

SignIdentity.transformRequest

static fromKeyPair(keyPair, subtleCrypto?): Promise<ECDSAKeyIdentity>

Defined in: packages/core/src/identity/identity/ecdsa.ts:84

generates an identity from a public and private key. Please ensure that you are generating these keys securely and protect the user’s private key

CryptoKeyPair | { privateKey: CryptoKey; publicKey: CryptoKey; }

a CryptoKeyPair

SubtleCrypto

a SubtleCrypto interface in case one is not available globally

Promise<ECDSAKeyIdentity>

an ECDSAKeyIdentity

static generate(options?): Promise<ECDSAKeyIdentity>

Defined in: packages/core/src/identity/identity/ecdsa.ts:56

Generates a randomly generated identity for use in calls to the Internet Computer.

CryptoKeyOptions

optional settings

Promise<ECDSAKeyIdentity>

a ECDSAKeyIdentity


Defined in: packages/core/src/identity/identity/ed25519.ts:115

Ed25519KeyIdentity is an implementation of SignIdentity that uses Ed25519 keys. This class is used to sign and verify messages for an agent.

protected new Ed25519KeyIdentity(publicKey, privateKey): Ed25519KeyIdentity

Defined in: packages/core/src/identity/identity/ed25519.ts:175

PublicKey

Uint8Array

Ed25519KeyIdentity

SignIdentity.constructor

protected _principal: Principal | undefined

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

SignIdentity._principal

getKeyPair(): KeyPair

Defined in: packages/core/src/identity/identity/ed25519.ts:191

Return a copy of the key pair.

KeyPair

getPrincipal(): Principal

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

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

Principal

SignIdentity.getPrincipal

getPublicKey(): Required<PublicKey>

Defined in: packages/core/src/identity/identity/ed25519.ts:201

Return the public key.

Required<PublicKey>

SignIdentity.getPublicKey

sign(challenge): Promise<Signature>

Defined in: packages/core/src/identity/identity/ed25519.ts:209

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

Uint8Array

challenge to sign with this identity’s secretKey, producing a signature

Promise<Signature>

SignIdentity.sign

toJSON(): JsonnableEd25519KeyIdentity

Defined in: packages/core/src/identity/identity/ed25519.ts:184

Serialize this key to JSON.

JsonnableEd25519KeyIdentity

transformRequest(request): Promise<unknown>

Defined in: packages/core/src/agent/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>

SignIdentity.transformRequest

static fromJSON(json): Ed25519KeyIdentity

Defined in: packages/core/src/identity/identity/ed25519.ts:151

string

Ed25519KeyIdentity

static fromKeyPair(publicKey, privateKey): Ed25519KeyIdentity

Defined in: packages/core/src/identity/identity/ed25519.ts:162

Uint8Array

Uint8Array

Ed25519KeyIdentity

static fromParsedJson(obj): Ed25519KeyIdentity

Defined in: packages/core/src/identity/identity/ed25519.ts:143

JsonnableEd25519KeyIdentity

Ed25519KeyIdentity

static fromSecretKey(secretKey): Ed25519KeyIdentity

Defined in: packages/core/src/identity/identity/ed25519.ts:166

Uint8Array

Ed25519KeyIdentity

static generate(seed?): Ed25519KeyIdentity

Defined in: packages/core/src/identity/identity/ed25519.ts:121

Generate a new Ed25519KeyIdentity.

Uint8Array<ArrayBufferLike>

a 32-byte seed for the private key. If not provided, a random seed will be generated.

Ed25519KeyIdentity

Ed25519KeyIdentity

static verify(sig, msg, pk): boolean

Defined in: packages/core/src/identity/identity/ed25519.ts:229

Verify

string | ArrayBuffer | Uint8Array<ArrayBufferLike>

signature to verify

string | ArrayBuffer | Uint8Array<ArrayBufferLike>

message to verify

string | ArrayBuffer | Uint8Array<ArrayBufferLike>

public key

boolean

  • true if the signature is valid, false otherwise

Defined in: packages/core/src/identity/identity/ed25519.ts:21

A Public Key implementation.

get derKey(): DerEncodedPublicKey

Defined in: packages/core/src/identity/identity/ed25519.ts:90

DerEncodedPublicKey

PublicKey.derKey

get rawKey(): Uint8Array

Defined in: packages/core/src/identity/identity/ed25519.ts:84

Uint8Array

PublicKey.rawKey

toDer(): DerEncodedPublicKey

Defined in: packages/core/src/identity/identity/ed25519.ts:103

DerEncodedPublicKey

PublicKey.toDer

toRaw(): Uint8Array

Defined in: packages/core/src/identity/identity/ed25519.ts:107

Uint8Array

PublicKey.toRaw

static from(maybeKey): Ed25519PublicKey

Defined in: packages/core/src/identity/identity/ed25519.ts:27

Construct Ed25519PublicKey from an existing PublicKey

unknown

existing PublicKey, ArrayBuffer, DerEncodedPublicKey, or hex string

Ed25519PublicKey

Instance of Ed25519PublicKey

static fromDer(derKey): Ed25519PublicKey

Defined in: packages/core/src/identity/identity/ed25519.ts:61

DerEncodedPublicKey

Ed25519PublicKey

static fromRaw(rawKey): Ed25519PublicKey

Defined in: packages/core/src/identity/identity/ed25519.ts:57

Uint8Array

Ed25519PublicKey


Defined in: packages/core/src/identity/identity/delegation.ts:329

A partial delegated identity, representing a delegation chain and the public key that it targets

get delegation(): DelegationChain

Defined in: packages/core/src/identity/identity/delegation.ts:335

The Delegation Chain of this identity.

DelegationChain

get derKey(): Uint8Array<ArrayBufferLike> | undefined

Defined in: packages/core/src/identity/identity/partial.ts:20

The DER-encoded public key of this identity.

Uint8Array<ArrayBufferLike> | undefined

PartialIdentity.derKey

get rawKey(): Uint8Array<ArrayBufferLike> | undefined

Defined in: packages/core/src/identity/identity/partial.ts:13

The raw public key of this identity.

Uint8Array<ArrayBufferLike> | undefined

PartialIdentity.rawKey

getPrincipal(): Principal

Defined in: packages/core/src/identity/identity/partial.ts:41

The Principal of this identity.

Principal

PartialIdentity.getPrincipal

getPublicKey(): PublicKey

Defined in: packages/core/src/identity/identity/partial.ts:34

The inner PublicKey used by this identity.

PublicKey

PartialIdentity.getPublicKey

toDer(): Uint8Array

Defined in: packages/core/src/identity/identity/partial.ts:27

The DER-encoded public key of this identity.

Uint8Array

PartialIdentity.toDer

transformRequest(): Promise<never>

Defined in: packages/core/src/identity/identity/partial.ts:51

Required for the Identity interface, but cannot implemented for just a public key.

Promise<never>

PartialIdentity.transformRequest

static fromDelegation(key, delegation): PartialDelegationIdentity

Defined in: packages/core/src/identity/identity/delegation.ts:349

Create a PartialDelegationIdentity from a PublicKey and a DelegationChain.

PublicKey

The PublicKey to delegate to.

DelegationChain

a DelegationChain targeting the inner key.

PartialDelegationIdentity


Defined in: packages/core/src/identity/identity/partial.ts:7

A partial delegated identity, representing a delegation chain and the public key that it targets

new PartialIdentity(inner): PartialIdentity

Defined in: packages/core/src/identity/identity/partial.ts:57

PublicKey

PartialIdentity

get derKey(): Uint8Array<ArrayBufferLike> | undefined

Defined in: packages/core/src/identity/identity/partial.ts:20

The DER-encoded public key of this identity.

Uint8Array<ArrayBufferLike> | undefined

get rawKey(): Uint8Array<ArrayBufferLike> | undefined

Defined in: packages/core/src/identity/identity/partial.ts:13

The raw public key of this identity.

Uint8Array<ArrayBufferLike> | undefined

getPrincipal(): Principal

Defined in: packages/core/src/identity/identity/partial.ts:41

The Principal of this identity.

Principal

Identity.getPrincipal

getPublicKey(): PublicKey

Defined in: packages/core/src/identity/identity/partial.ts:34

The inner PublicKey used by this identity.

PublicKey

toDer(): Uint8Array

Defined in: packages/core/src/identity/identity/partial.ts:27

The DER-encoded public key of this identity.

Uint8Array

transformRequest(): Promise<never>

Defined in: packages/core/src/identity/identity/partial.ts:51

Required for the Identity interface, but cannot implemented for just a public key.

Promise<never>

Identity.transformRequest


Defined in: packages/core/src/identity/identity/webauthn.ts:137

A SignIdentity that uses navigator.credentials. See https://webauthn.guide/ for more information about WebAuthentication.

new WebAuthnIdentity(rawId, cose, authenticatorAttachment): WebAuthnIdentity

Defined in: packages/core/src/identity/identity/webauthn.ts:184

Uint8Array

Uint8Array

AuthenticatorAttachment | undefined

WebAuthnIdentity

SignIdentity.constructor

protected _principal: Principal | undefined

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

SignIdentity._principal

protected _publicKey: CosePublicKey

Defined in: packages/core/src/identity/identity/webauthn.ts:182

protected authenticatorAttachment: AuthenticatorAttachment | undefined

Defined in: packages/core/src/identity/identity/webauthn.ts:187

readonly rawId: Uint8Array

Defined in: packages/core/src/identity/identity/webauthn.ts:185

getAuthenticatorAttachment(): AuthenticatorAttachment | undefined

Defined in: packages/core/src/identity/identity/webauthn.ts:205

WebAuthn level 3 spec introduces a new attribute on successful WebAuthn interactions, see https://w3c.github.io/webauthn/#dom-publickeycredential-authenticatorattachment. This attribute is already implemented for Chrome, Safari and Edge.

Given the attribute is only available after a successful interaction, the information is provided opportunistically and might also be undefined.

AuthenticatorAttachment | undefined

getPrincipal(): Principal

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

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

Principal

SignIdentity.getPrincipal

getPublicKey(): PublicKey

Defined in: packages/core/src/identity/identity/webauthn.ts:193

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

PublicKey

SignIdentity.getPublicKey

sign(blob): Promise<Signature>

Defined in: packages/core/src/identity/identity/webauthn.ts:209

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

Uint8Array

Promise<Signature>

SignIdentity.sign

toJSON(): JsonnableWebAuthnIdentity

Defined in: packages/core/src/identity/identity/webauthn.ts:249

Allow for JSON serialization of all information needed to reuse this identity.

JsonnableWebAuthnIdentity

transformRequest(request): Promise<unknown>

Defined in: packages/core/src/agent/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>

SignIdentity.transformRequest

static create(credentialCreationOptions?): Promise<WebAuthnIdentity>

Defined in: packages/core/src/identity/identity/webauthn.ts:156

Create an identity.

CredentialCreationOptions

an optional CredentialCreationOptions Challenge

Promise<WebAuthnIdentity>

static fromJSON(json): WebAuthnIdentity

Defined in: packages/core/src/identity/identity/webauthn.ts:142

Create an identity from a JSON serialization.

string

json to parse

WebAuthnIdentity

Defined in: packages/core/src/identity/identity/attributes.ts:22

Options for creating an AttributesIdentity.

attributes: SignedAttributes

Defined in: packages/core/src/identity/identity/attributes.ts:26

The signed attributes to include in the request.

inner: Identity

Defined in: packages/core/src/identity/identity/attributes.ts:24

The inner identity to delegate signing to.

signer: Signer

Defined in: packages/core/src/identity/identity/attributes.ts:28

The canister that signed the attributes.


Defined in: packages/core/src/identity/identity/ecdsa.ts:7

Options used in a ECDSAKeyIdentity

optional extractable?: boolean

Defined in: packages/core/src/identity/identity/ecdsa.ts:8

optional keyUsages?: KeyUsage[]

Defined in: packages/core/src/identity/identity/ecdsa.ts:9

optional subtleCrypto?: SubtleCrypto

Defined in: packages/core/src/identity/identity/ecdsa.ts:10


Defined in: packages/core/src/identity/identity/delegation.ts:357

List of things to check for a delegation chain validity.

optional scope?: string | Principal | (string | Principal)[]

Defined in: packages/core/src/identity/identity/delegation.ts:361

Check that the scope is amongst the scopes that this delegation has access to.


Defined in: packages/core/src/identity/identity/ecdsa.ts:20

  • CryptoKey

readonly algorithm: KeyAlgorithm

Defined in: node_modules/.pnpm/typescript@5.9.3/node_modules/typescript/lib/lib.dom.d.ts:8469

The read-only algorithm property of the CryptoKey interface returns an object describing the algorithm for which this key can be used, and any associated extra parameters.

MDN Reference

CryptoKey.algorithm

readonly extractable: boolean

Defined in: node_modules/.pnpm/typescript@5.9.3/node_modules/typescript/lib/lib.dom.d.ts:8475

The read-only extractable property of the CryptoKey interface indicates whether or not the key may be extracted using SubtleCrypto.exportKey() or SubtleCrypto.wrapKey().

MDN Reference

CryptoKey.extractable

toDer: () => DerEncodedPublicKey

Defined in: packages/core/src/identity/identity/ecdsa.ts:21

DerEncodedPublicKey

readonly type: KeyType

Defined in: node_modules/.pnpm/typescript@5.9.3/node_modules/typescript/lib/lib.dom.d.ts:8481

The read-only type property of the CryptoKey interface indicates which kind of key is represented by the object.

MDN Reference

CryptoKey.type

readonly usages: KeyUsage[]

Defined in: node_modules/.pnpm/typescript@5.9.3/node_modules/typescript/lib/lib.dom.d.ts:8487

The read-only usages property of the CryptoKey interface indicates what can be done with the key.

MDN Reference

CryptoKey.usages


Defined in: packages/core/src/identity/identity/delegation.ts:132

delegations: object[]

Defined in: packages/core/src/identity/identity/delegation.ts:134

delegation: object

expiration: string

pubkey: string

optional targets?: string[]

signature: string

publicKey: string

Defined in: packages/core/src/identity/identity/delegation.ts:133


Defined in: packages/core/src/identity/identity/attributes.ts:7

Signed attributes to be included as sender_info in the request content.

data: Uint8Array

Defined in: packages/core/src/identity/identity/attributes.ts:8

signature: Uint8Array

Defined in: packages/core/src/identity/identity/attributes.ts:9


Defined in: packages/core/src/identity/identity/delegation.ts:92

A signed delegation, which lends its identity to the public key in the delegation object. This is constructed by DelegationChain.create().

DelegationChain

delegation: Delegation

Defined in: packages/core/src/identity/identity/delegation.ts:93

signature: Signature

Defined in: packages/core/src/identity/identity/delegation.ts:94


Defined in: packages/core/src/identity/identity/attributes.ts:15

The canister that signed the attributes.

canisterId: Principal

Defined in: packages/core/src/identity/identity/attributes.ts:16

JsonnableEd25519KeyIdentity = [PublicKeyHex, SecretKeyHex]

Defined in: packages/core/src/identity/identity/ed25519.ts:246

isDelegationValid(chain, checks?): boolean

Defined in: packages/core/src/identity/identity/delegation.ts:370

Analyze a DelegationChain and validate that it’s valid, ie. not expired and apply to the scope.

DelegationChain

The chain to validate.

DelegationValidChecks

Various checks to validate on the chain.

boolean

Re-exports DER_COSE_OID


Re-exports ED25519_OID


Re-exports unwrapDER


Re-exports wrapDER