Overview
Namespaces
Section titled “Namespaces”Enumerations
Section titled “Enumerations”Endpoint
Section titled “Endpoint”Defined in: packages/core/src/agent/agent/http/types.ts:8
Internal
Enumeration Members
Section titled “Enumeration Members”Call:
"call"
Defined in: packages/core/src/agent/agent/http/types.ts:11
Query:
"read"
Defined in: packages/core/src/agent/agent/http/types.ts:9
ReadState
Section titled “ReadState”ReadState:
"read_state"
Defined in: packages/core/src/agent/agent/http/types.ts:10
ErrorKindEnum
Section titled “ErrorKindEnum”Defined in: packages/core/src/agent/errors.ts:15
Enumeration Members
Section titled “Enumeration Members”External
Section titled “External”External:
"External"
Defined in: packages/core/src/agent/errors.ts:20
Input:
"Input"
Defined in: packages/core/src/agent/errors.ts:22
Limit:
"Limit"
Defined in: packages/core/src/agent/errors.ts:21
Protocol
Section titled “Protocol”Protocol:
"Protocol"
Defined in: packages/core/src/agent/errors.ts:17
Reject
Section titled “Reject”Reject:
"Reject"
Defined in: packages/core/src/agent/errors.ts:18
Transport
Section titled “Transport”Transport:
"Transport"
Defined in: packages/core/src/agent/errors.ts:19
Trust:
"Trust"
Defined in: packages/core/src/agent/errors.ts:16
Unknown
Section titled “Unknown”Unknown:
"Unknown"
Defined in: packages/core/src/agent/errors.ts:23
ErrorVerbosity
Section titled “ErrorVerbosity”Defined in: packages/core/src/agent/errors.ts:55
Controls the level of detail included in error messages.
Normal(default): includes error message, call context, and HTTP details, but omits large binary fields (arg, certificate, nonce).Verbose: same as Normal, but includes hex-encoded binary fields.
To enable verbose mode: ErrorCode.verbosity = ErrorVerbosity.Verbose
Enumeration Members
Section titled “Enumeration Members”Normal
Section titled “Normal”Normal:
"normal"
Defined in: packages/core/src/agent/errors.ts:56
Verbose
Section titled “Verbose”Verbose:
"verbose"
Defined in: packages/core/src/agent/errors.ts:57
LookupLabelStatus
Section titled “LookupLabelStatus”Defined in: packages/core/src/agent/certificate.ts:571
Enumeration Members
Section titled “Enumeration Members”Absent
Section titled “Absent”Absent:
"Absent"
Defined in: packages/core/src/agent/certificate.ts:572
Found:
"Found"
Defined in: packages/core/src/agent/certificate.ts:574
Greater
Section titled “Greater”Greater:
"Greater"
Defined in: packages/core/src/agent/certificate.ts:576
Less:
"Less"
Defined in: packages/core/src/agent/certificate.ts:575
Unknown
Section titled “Unknown”Unknown:
"Unknown"
Defined in: packages/core/src/agent/certificate.ts:573
LookupPathStatus
Section titled “LookupPathStatus”Defined in: packages/core/src/agent/certificate.ts:517
Enumeration Members
Section titled “Enumeration Members”Absent
Section titled “Absent”Absent:
"Absent"
Defined in: packages/core/src/agent/certificate.ts:519
Error:
"Error"
Defined in: packages/core/src/agent/certificate.ts:521
Found:
"Found"
Defined in: packages/core/src/agent/certificate.ts:520
Unknown
Section titled “Unknown”Unknown:
"Unknown"
Defined in: packages/core/src/agent/certificate.ts:518
LookupSubtreeStatus
Section titled “LookupSubtreeStatus”Defined in: packages/core/src/agent/certificate.ts:547
Enumeration Members
Section titled “Enumeration Members”Absent
Section titled “Absent”Absent:
"Absent"
Defined in: packages/core/src/agent/certificate.ts:548
Found:
"Found"
Defined in: packages/core/src/agent/certificate.ts:550
Unknown
Section titled “Unknown”Unknown:
"Unknown"
Defined in: packages/core/src/agent/certificate.ts:549
NodeType
Section titled “NodeType”Defined in: packages/core/src/agent/certificate.ts:47
Enumeration Members
Section titled “Enumeration Members”Empty:
0
Defined in: packages/core/src/agent/certificate.ts:48
Fork:
1
Defined in: packages/core/src/agent/certificate.ts:49
Labeled
Section titled “Labeled”Labeled:
2
Defined in: packages/core/src/agent/certificate.ts:50
Leaf:
3
Defined in: packages/core/src/agent/certificate.ts:51
Pruned
Section titled “Pruned”Pruned:
4
Defined in: packages/core/src/agent/certificate.ts:52
QueryResponseStatus
Section titled “QueryResponseStatus”Defined in: packages/core/src/agent/agent/api.ts:35
Enumeration Members
Section titled “Enumeration Members”Rejected
Section titled “Rejected”Rejected:
"rejected"
Defined in: packages/core/src/agent/agent/api.ts:37
Replied
Section titled “Replied”Replied:
"replied"
Defined in: packages/core/src/agent/agent/api.ts:36
ReadRequestType
Section titled “ReadRequestType”Defined in: packages/core/src/agent/agent/http/types.ts:78
Enumeration Members
Section titled “Enumeration Members”Query:
"query"
Defined in: packages/core/src/agent/agent/http/types.ts:79
ReadState
Section titled “ReadState”ReadState:
"read_state"
Defined in: packages/core/src/agent/agent/http/types.ts:80
ReplicaRejectCode
Section titled “ReplicaRejectCode”Defined in: packages/core/src/agent/agent/api.ts:12
Codes used by the replica for rejecting a message. See the interface spec.
Enumeration Members
Section titled “Enumeration Members”CanisterError
Section titled “CanisterError”CanisterError:
5
Defined in: packages/core/src/agent/agent/api.ts:17
CanisterReject
Section titled “CanisterReject”CanisterReject:
4
Defined in: packages/core/src/agent/agent/api.ts:16
DestinationInvalid
Section titled “DestinationInvalid”DestinationInvalid:
3
Defined in: packages/core/src/agent/agent/api.ts:15
SysFatal
Section titled “SysFatal”SysFatal:
1
Defined in: packages/core/src/agent/agent/api.ts:13
SysTransient
Section titled “SysTransient”SysTransient:
2
Defined in: packages/core/src/agent/agent/api.ts:14
RequestStatusResponseStatus
Section titled “RequestStatusResponseStatus”Defined in: packages/core/src/agent/agent/http/types.ts:109
Possible values for the request status in the IC state tree.
https://internetcomputer.org/docs/references/ic-interface-spec#state-tree-request-status
Enumeration Members
Section titled “Enumeration Members”Done:
"done"
Defined in: packages/core/src/agent/agent/http/types.ts:121
The IC has pruned the response data but remembers the request to prevent replay attacks.
Processing
Section titled “Processing”Processing:
"processing"
Defined in: packages/core/src/agent/agent/http/types.ts:113
The initial effect of the call has happened or will happen.
Received
Section titled “Received”Received:
"received"
Defined in: packages/core/src/agent/agent/http/types.ts:111
The call has made it past the endpoint into the IC’s state.
Rejected
Section titled “Rejected”Rejected:
"rejected"
Defined in: packages/core/src/agent/agent/http/types.ts:117
The call failed; reject code and message are available at /request_status/<id>/reject_code and /request_status/<id>/reject_message.
Replied
Section titled “Replied”Replied:
"replied"
Defined in: packages/core/src/agent/agent/http/types.ts:115
The call completed successfully; the reply is available at /request_status/<id>/reply.
Unknown
Section titled “Unknown”Unknown:
"unknown"
Defined in: packages/core/src/agent/agent/http/types.ts:119
The request status path is absent from the state tree, the request is unknown to the IC (never received or pruned after expiry).
SubmitRequestType
Section titled “SubmitRequestType”Defined in: packages/core/src/agent/agent/http/types.ts:73
Enumeration Members
Section titled “Enumeration Members”Call:
"call"
Defined in: packages/core/src/agent/agent/http/types.ts:74
Classes
Section titled “Classes”Defined in: packages/core/src/agent/actor.ts:183
An actor base class. An actor is an object containing only functions that will return a promise. These functions are derived from the IDL definition.
Constructors
Section titled “Constructors”Constructor
Section titled “Constructor”
protectednew Actor(metadata):Actor
Defined in: packages/core/src/agent/actor.ts:350
Parameters
Section titled “Parameters”metadata
Section titled “metadata”ActorMetadata
Returns
Section titled “Returns”Methods
Section titled “Methods”agentOf()
Section titled “agentOf()”
staticagentOf(actor):Agent|undefined
Defined in: packages/core/src/agent/actor.ts:189
Get the Agent class this Actor would call, or undefined if the Actor would use the default agent (global.ic.agent).
Parameters
Section titled “Parameters”The actor to get the agent of.
Returns
Section titled “Returns”Agent | undefined
canisterIdOf()
Section titled “canisterIdOf()”
staticcanisterIdOf(actor):Principal
Defined in: packages/core/src/agent/actor.ts:201
Parameters
Section titled “Parameters”Returns
Section titled “Returns”createActor()
Section titled “createActor()”
staticcreateActor<T>(interfaceFactory,configuration):ActorSubclass<T>
Defined in: packages/core/src/agent/actor.ts:302
Creates an actor with the given interface factory and configuration.
The @icp-sdk/bindgen package can be used to generate the interface factory for your canister.
Type Parameters
Section titled “Type Parameters”T = Record<string, ActorMethod<unknown[], unknown>>
Parameters
Section titled “Parameters”interfaceFactory
Section titled “interfaceFactory”the interface factory for the actor, typically generated by the @icp-sdk/bindgen package
configuration
Section titled “configuration”the configuration for the actor
Returns
Section titled “Returns”an actor with the given interface factory and configuration
The Canister Environment Guide for more details on how to configure an actor using the canister environment.
Examples
Section titled “Examples”Using the interface factory generated by the @icp-sdk/bindgen package:
import { Actor, HttpAgent } from '@icp-sdk/core/agent';import { Principal } from '@icp-sdk/core/principal';import { idlFactory } from './api/declarations/hello-world.did';
// For a convenient way to get the canister ID,// see the https://js.icp.build/core/latest/canister-environment/ guide.const canisterId = Principal.fromText('rrkah-fqaaa-aaaaa-aaaaq-cai');
const agent = await HttpAgent.create({ host: 'https://icp-api.io',});
const actor = Actor.createActor(idlFactory, { agent, canisterId,});
const response = await actor.greet('world');console.log(response);Using the createActor wrapper function generated by the @icp-sdk/bindgen package:
import { HttpAgent } from '@icp-sdk/core/agent';import { Principal } from '@icp-sdk/core/principal';import { createActor } from './api/hello-world';
// For a convenient way to get the canister ID,// see the https://js.icp.build/core/latest/canister-environment/ guide.const canisterId = Principal.fromText('rrkah-fqaaa-aaaaa-aaaaq-cai');
const agent = await HttpAgent.create({ host: 'https://icp-api.io',});
const actor = createActor(canisterId, { agent,});
const response = await actor.greet('world');console.log(response);createActorClass()
Section titled “createActorClass()”
staticcreateActorClass(interfaceFactory,options?):ActorConstructor
Defined in: packages/core/src/agent/actor.ts:205
Parameters
Section titled “Parameters”interfaceFactory
Section titled “interfaceFactory”options?
Section titled “options?”Returns
Section titled “Returns”createActorWithExtendedDetails()
Section titled “createActorWithExtendedDetails()”
staticcreateActorWithExtendedDetails<T>(interfaceFactory,configuration,actorClassOptions?):ActorSubclass<ActorMethodMappedExtended<T>>
Defined in: packages/core/src/agent/actor.ts:335
Returns an actor with methods that return the http response details along with the result
Type Parameters
Section titled “Type Parameters”T = Record<string, ActorMethod<unknown[], unknown>>
Parameters
Section titled “Parameters”interfaceFactory
Section titled “interfaceFactory”the interface factory for the actor
configuration
Section titled “configuration”the configuration for the actor
actorClassOptions?
Section titled “actorClassOptions?”CreateActorClassOpts = ...
options for the actor class extended details to return with the result
Returns
Section titled “Returns”ActorSubclass<ActorMethodMappedExtended<T>>
createActorWithHttpDetails()
Section titled “createActorWithHttpDetails()”
staticcreateActorWithHttpDetails<T>(interfaceFactory,configuration):ActorSubclass<ActorMethodMappedWithHttpDetails<T>>
Defined in: packages/core/src/agent/actor.ts:320
Returns an actor with methods that return the http response details along with the result
Type Parameters
Section titled “Type Parameters”T = Record<string, ActorMethod<unknown[], unknown>>
Parameters
Section titled “Parameters”interfaceFactory
Section titled “interfaceFactory”the interface factory for the actor
configuration
Section titled “configuration”the configuration for the actor
Returns
Section titled “Returns”ActorSubclass<ActorMethodMappedWithHttpDetails<T>>
Deprecated
Section titled “Deprecated”- use createActor with actorClassOptions instead
interfaceOf()
Section titled “interfaceOf()”
staticinterfaceOf(actor):ServiceClass
Defined in: packages/core/src/agent/actor.ts:197
Get the interface of an actor, in the form of an instance of a Service.
Parameters
Section titled “Parameters”The actor to get the interface of.
Returns
Section titled “Returns”AgentError
Section titled “AgentError”Defined in: packages/core/src/agent/errors.ts:113
An error that happens in the Agent. This is the root of all errors and should be used everywhere in the Agent code (this package).
To know if the error is certified, use the isCertified getter.
Extends
Section titled “Extends”Error
Constructors
Section titled “Constructors”Constructor
Section titled “Constructor”new AgentError(
code,kind):AgentError
Defined in: packages/core/src/agent/errors.ts:140
Parameters
Section titled “Parameters”Returns
Section titled “Returns”Overrides
Section titled “Overrides”Error.constructor
Properties
Section titled “Properties”
readonlycause:object
Defined in: packages/core/src/agent/errors.ts:116
code:
ErrorCode
kind:
ErrorKindEnum
Overrides
Section titled “Overrides”Error.cause
message
Section titled “message”message:
string
Defined in: node_modules/.pnpm/typescript@5.9.3/node_modules/typescript/lib/lib.es5.d.ts:1077
Inherited from
Section titled “Inherited from”Error.message
name:
string='AgentError'
Defined in: packages/core/src/agent/errors.ts:114
Overrides
Section titled “Overrides”Error.name
stack?
Section titled “stack?”
optionalstack?:string
Defined in: node_modules/.pnpm/typescript@5.9.3/node_modules/typescript/lib/lib.es5.d.ts:1078
Inherited from
Section titled “Inherited from”Error.stack
stackTraceLimit
Section titled “stackTraceLimit”
staticstackTraceLimit: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.
Inherited from
Section titled “Inherited from”Error.stackTraceLimit
Accessors
Section titled “Accessors”Get Signature
Section titled “Get Signature”get code():
ErrorCode
Defined in: packages/core/src/agent/errors.ts:118
Returns
Section titled “Returns”Set Signature
Section titled “Set Signature”set code(
code):void
Defined in: packages/core/src/agent/errors.ts:121
Parameters
Section titled “Parameters”Returns
Section titled “Returns”void
isCertified
Section titled “isCertified”Get Signature
Section titled “Get Signature”get isCertified():
boolean
Defined in: packages/core/src/agent/errors.ts:136
Reads the isCertified property of the underlying error code.
Returns
Section titled “Returns”boolean
true if the error is certified, false otherwise.
Get Signature
Section titled “Get Signature”get kind():
ErrorKindEnum
Defined in: packages/core/src/agent/errors.ts:125
Returns
Section titled “Returns”Set Signature
Section titled “Set Signature”set kind(
kind):void
Defined in: packages/core/src/agent/errors.ts:128
Parameters
Section titled “Parameters”Returns
Section titled “Returns”void
Methods
Section titled “Methods”hasCode()
Section titled “hasCode()”hasCode<
C>(code):boolean
Defined in: packages/core/src/agent/errors.ts:146
Type Parameters
Section titled “Type Parameters”C extends ErrorCode
Parameters
Section titled “Parameters”(…args) => C
Returns
Section titled “Returns”boolean
toString()
Section titled “toString()”toString():
string
Defined in: packages/core/src/agent/errors.ts:150
Returns a string representation of an object.
Returns
Section titled “Returns”string
captureStackTrace()
Section titled “captureStackTrace()”
staticcaptureStackTrace(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();Parameters
Section titled “Parameters”targetObject
Section titled “targetObject”object
constructorOpt?
Section titled “constructorOpt?”Function
Returns
Section titled “Returns”void
Inherited from
Section titled “Inherited from”Error.captureStackTrace
prepareStackTrace()
Section titled “prepareStackTrace()”
staticprepareStackTrace(err,stackTraces):any
Defined in: node_modules/.pnpm/@types+node@25.5.0/node_modules/@types/node/globals.d.ts:55
Parameters
Section titled “Parameters”Error
stackTraces
Section titled “stackTraces”CallSite[]
Returns
Section titled “Returns”any
https://v8.dev/docs/stack-trace-api#customizing-stack-traces
Inherited from
Section titled “Inherited from”Error.prepareStackTrace
AnonymousIdentity
Section titled “AnonymousIdentity”Defined in: packages/core/src/agent/auth.ts:101
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.
Implements
Section titled “Implements”Constructors
Section titled “Constructors”Constructor
Section titled “Constructor”new AnonymousIdentity():
AnonymousIdentity
Returns
Section titled “Returns”Methods
Section titled “Methods”getPrincipal()
Section titled “getPrincipal()”getPrincipal():
Principal
Defined in: packages/core/src/agent/auth.ts:102
Get the principal represented by this identity. Normally should be a
Principal.selfAuthenticating().
Returns
Section titled “Returns”Implementation of
Section titled “Implementation of”transformRequest()
Section titled “transformRequest()”transformRequest(
request):Promise<unknown>
Defined in: packages/core/src/agent/auth.ts:106
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”Returns
Section titled “Returns”Promise<unknown>
Implementation of
Section titled “Implementation of”CborDecodeErrorCode
Section titled “CborDecodeErrorCode”Defined in: packages/core/src/agent/errors.ts:433
Extends
Section titled “Extends”Constructors
Section titled “Constructors”Constructor
Section titled “Constructor”new CborDecodeErrorCode(
error,input):CborDecodeErrorCode
Defined in: packages/core/src/agent/errors.ts:436
Parameters
Section titled “Parameters”unknown
Uint8Array
Returns
Section titled “Returns”Overrides
Section titled “Overrides”Properties
Section titled “Properties”callContext?
Section titled “callContext?”
optionalcallContext?:CallContext|PollingCallContext
Defined in: packages/core/src/agent/errors.ts:78
Inherited from
Section titled “Inherited from”
readonlyerror:unknown
Defined in: packages/core/src/agent/errors.ts:437
readonlyinput:Uint8Array
Defined in: packages/core/src/agent/errors.ts:438
isCertified
Section titled “isCertified”
readonlyisCertified:boolean=false
Defined in: packages/core/src/agent/errors.ts:80
Inherited from
Section titled “Inherited from”name:
string='CborDecodeErrorCode'
Defined in: packages/core/src/agent/errors.ts:434
requestContext?
Section titled “requestContext?”
optionalrequestContext?:RequestContext
Defined in: packages/core/src/agent/errors.ts:77
Inherited from
Section titled “Inherited from”verbosity
Section titled “verbosity”
staticverbosity:ErrorVerbosity=ErrorVerbosity.Normal
Defined in: packages/core/src/agent/errors.ts:75
Inherited from
Section titled “Inherited from”Methods
Section titled “Methods”toErrorMessage()
Section titled “toErrorMessage()”toErrorMessage():
string
Defined in: packages/core/src/agent/errors.ts:444
Returns
Section titled “Returns”string
Overrides
Section titled “Overrides”toString()
Section titled “toString()”toString():
string
Defined in: packages/core/src/agent/errors.ts:84
Returns
Section titled “Returns”string
Inherited from
Section titled “Inherited from”CborEncodeErrorCode
Section titled “CborEncodeErrorCode”Defined in: packages/core/src/agent/errors.ts:449
Extends
Section titled “Extends”Constructors
Section titled “Constructors”Constructor
Section titled “Constructor”new CborEncodeErrorCode(
error,value):CborEncodeErrorCode
Defined in: packages/core/src/agent/errors.ts:452
Parameters
Section titled “Parameters”unknown
unknown
Returns
Section titled “Returns”Overrides
Section titled “Overrides”Properties
Section titled “Properties”callContext?
Section titled “callContext?”
optionalcallContext?:CallContext|PollingCallContext
Defined in: packages/core/src/agent/errors.ts:78
Inherited from
Section titled “Inherited from”
readonlyerror:unknown
Defined in: packages/core/src/agent/errors.ts:453
isCertified
Section titled “isCertified”
readonlyisCertified:boolean=false
Defined in: packages/core/src/agent/errors.ts:80
Inherited from
Section titled “Inherited from”name:
string='CborEncodeErrorCode'
Defined in: packages/core/src/agent/errors.ts:450
requestContext?
Section titled “requestContext?”
optionalrequestContext?:RequestContext
Defined in: packages/core/src/agent/errors.ts:77
Inherited from
Section titled “Inherited from”
readonlyvalue:unknown
Defined in: packages/core/src/agent/errors.ts:454
verbosity
Section titled “verbosity”
staticverbosity:ErrorVerbosity=ErrorVerbosity.Normal
Defined in: packages/core/src/agent/errors.ts:75
Inherited from
Section titled “Inherited from”Methods
Section titled “Methods”toErrorMessage()
Section titled “toErrorMessage()”toErrorMessage():
string
Defined in: packages/core/src/agent/errors.ts:460
Returns
Section titled “Returns”string
Overrides
Section titled “Overrides”toString()
Section titled “toString()”toString():
string
Defined in: packages/core/src/agent/errors.ts:84
Returns
Section titled “Returns”string
Inherited from
Section titled “Inherited from”Certificate
Section titled “Certificate”Defined in: packages/core/src/agent/certificate.ts:212
Properties
Section titled “Properties”cert:
Cert
Defined in: packages/core/src/agent/certificate.ts:213
Methods
Section titled “Methods”lookup_path()
Section titled “lookup_path()”lookup_path(
path):LookupResult
Defined in: packages/core/src/agent/certificate.ts:274
Lookup a path in the certificate tree, using lookup_path.
Parameters
Section titled “Parameters”The path to lookup.
Returns
Section titled “Returns”The result of the lookup.
lookup_subtree()
Section titled “lookup_subtree()”lookup_subtree(
path):SubtreeLookupResult
Defined in: packages/core/src/agent/certificate.ts:283
Lookup a subtree in the certificate tree, using lookup_subtree.
Parameters
Section titled “Parameters”The path to lookup.
Returns
Section titled “Returns”The result of the lookup.
create()
Section titled “create()”
staticcreate(options):Promise<Certificate>
Defined in: packages/core/src/agent/certificate.ts:224
Create a new instance of a certificate, automatically verifying it.
Parameters
Section titled “Parameters”options
Section titled “options”Returns
Section titled “Returns”Promise<Certificate>
Throws
Section titled “Throws”if the verification of the certificate fails
CertificateHasTooManyDelegationsErrorCode
Section titled “CertificateHasTooManyDelegationsErrorCode”Defined in: packages/core/src/agent/errors.ts:275
Extends
Section titled “Extends”Constructors
Section titled “Constructors”Constructor
Section titled “Constructor”new CertificateHasTooManyDelegationsErrorCode():
CertificateHasTooManyDelegationsErrorCode
Defined in: packages/core/src/agent/errors.ts:278
Returns
Section titled “Returns”CertificateHasTooManyDelegationsErrorCode
Overrides
Section titled “Overrides”Properties
Section titled “Properties”callContext?
Section titled “callContext?”
optionalcallContext?:CallContext|PollingCallContext
Defined in: packages/core/src/agent/errors.ts:78
Inherited from
Section titled “Inherited from”isCertified
Section titled “isCertified”
readonlyisCertified:boolean=false
Defined in: packages/core/src/agent/errors.ts:80
Inherited from
Section titled “Inherited from”name:
string='CertificateHasTooManyDelegationsErrorCode'
Defined in: packages/core/src/agent/errors.ts:276
requestContext?
Section titled “requestContext?”
optionalrequestContext?:RequestContext
Defined in: packages/core/src/agent/errors.ts:77
Inherited from
Section titled “Inherited from”verbosity
Section titled “verbosity”
staticverbosity:ErrorVerbosity=ErrorVerbosity.Normal
Defined in: packages/core/src/agent/errors.ts:75
Inherited from
Section titled “Inherited from”Methods
Section titled “Methods”toErrorMessage()
Section titled “toErrorMessage()”toErrorMessage():
string
Defined in: packages/core/src/agent/errors.ts:283
Returns
Section titled “Returns”string
Overrides
Section titled “Overrides”toString()
Section titled “toString()”toString():
string
Defined in: packages/core/src/agent/errors.ts:84
Returns
Section titled “Returns”string
Inherited from
Section titled “Inherited from”CertificateNotAuthorizedErrorCode
Section titled “CertificateNotAuthorizedErrorCode”Defined in: packages/core/src/agent/errors.ts:288
Extends
Section titled “Extends”Constructors
Section titled “Constructors”Constructor
Section titled “Constructor”new CertificateNotAuthorizedErrorCode(
canisterId,subnetId):CertificateNotAuthorizedErrorCode
Defined in: packages/core/src/agent/errors.ts:291
Parameters
Section titled “Parameters”canisterId
Section titled “canisterId”subnetId
Section titled “subnetId”Returns
Section titled “Returns”CertificateNotAuthorizedErrorCode
Overrides
Section titled “Overrides”Properties
Section titled “Properties”callContext?
Section titled “callContext?”
optionalcallContext?:CallContext|PollingCallContext
Defined in: packages/core/src/agent/errors.ts:78
Inherited from
Section titled “Inherited from”canisterId
Section titled “canisterId”
readonlycanisterId:Principal
Defined in: packages/core/src/agent/errors.ts:292
isCertified
Section titled “isCertified”
readonlyisCertified:boolean=false
Defined in: packages/core/src/agent/errors.ts:80
Inherited from
Section titled “Inherited from”name:
string='CertificateNotAuthorizedErrorCode'
Defined in: packages/core/src/agent/errors.ts:289
requestContext?
Section titled “requestContext?”
optionalrequestContext?:RequestContext
Defined in: packages/core/src/agent/errors.ts:77
Inherited from
Section titled “Inherited from”subnetId
Section titled “subnetId”
readonlysubnetId:Principal
Defined in: packages/core/src/agent/errors.ts:293
verbosity
Section titled “verbosity”
staticverbosity:ErrorVerbosity=ErrorVerbosity.Normal
Defined in: packages/core/src/agent/errors.ts:75
Inherited from
Section titled “Inherited from”Methods
Section titled “Methods”toErrorMessage()
Section titled “toErrorMessage()”toErrorMessage():
string
Defined in: packages/core/src/agent/errors.ts:299
Returns
Section titled “Returns”string
Overrides
Section titled “Overrides”toString()
Section titled “toString()”toString():
string
Defined in: packages/core/src/agent/errors.ts:84
Returns
Section titled “Returns”string
Inherited from
Section titled “Inherited from”CertificateNotAuthorizedForSubnetErrorCode
Section titled “CertificateNotAuthorizedForSubnetErrorCode”Defined in: packages/core/src/agent/errors.ts:304
Extends
Section titled “Extends”Constructors
Section titled “Constructors”Constructor
Section titled “Constructor”new CertificateNotAuthorizedForSubnetErrorCode(
subnetId):CertificateNotAuthorizedForSubnetErrorCode
Defined in: packages/core/src/agent/errors.ts:307
Parameters
Section titled “Parameters”subnetId
Section titled “subnetId”Returns
Section titled “Returns”CertificateNotAuthorizedForSubnetErrorCode
Overrides
Section titled “Overrides”Properties
Section titled “Properties”callContext?
Section titled “callContext?”
optionalcallContext?:CallContext|PollingCallContext
Defined in: packages/core/src/agent/errors.ts:78
Inherited from
Section titled “Inherited from”isCertified
Section titled “isCertified”
readonlyisCertified:boolean=false
Defined in: packages/core/src/agent/errors.ts:80
Inherited from
Section titled “Inherited from”name:
string='CertificateNotAuthorizedForSubnetErrorCode'
Defined in: packages/core/src/agent/errors.ts:305
requestContext?
Section titled “requestContext?”
optionalrequestContext?:RequestContext
Defined in: packages/core/src/agent/errors.ts:77
Inherited from
Section titled “Inherited from”subnetId
Section titled “subnetId”
readonlysubnetId:Principal
Defined in: packages/core/src/agent/errors.ts:307
verbosity
Section titled “verbosity”
staticverbosity:ErrorVerbosity=ErrorVerbosity.Normal
Defined in: packages/core/src/agent/errors.ts:75
Inherited from
Section titled “Inherited from”Methods
Section titled “Methods”toErrorMessage()
Section titled “toErrorMessage()”toErrorMessage():
string
Defined in: packages/core/src/agent/errors.ts:312
Returns
Section titled “Returns”string
Overrides
Section titled “Overrides”toString()
Section titled “toString()”toString():
string
Defined in: packages/core/src/agent/errors.ts:84
Returns
Section titled “Returns”string
Inherited from
Section titled “Inherited from”CertificateOutdatedErrorCode
Section titled “CertificateOutdatedErrorCode”Defined in: packages/core/src/agent/errors.ts:502
Extends
Section titled “Extends”Constructors
Section titled “Constructors”Constructor
Section titled “Constructor”new CertificateOutdatedErrorCode(
maxIngressExpiryInMinutes,requestId,retryTimes?):CertificateOutdatedErrorCode
Defined in: packages/core/src/agent/errors.ts:505
Parameters
Section titled “Parameters”maxIngressExpiryInMinutes
Section titled “maxIngressExpiryInMinutes”number
requestId
Section titled “requestId”retryTimes?
Section titled “retryTimes?”number
Returns
Section titled “Returns”Overrides
Section titled “Overrides”Properties
Section titled “Properties”callContext?
Section titled “callContext?”
optionalcallContext?:CallContext|PollingCallContext
Defined in: packages/core/src/agent/errors.ts:78
Inherited from
Section titled “Inherited from”isCertified
Section titled “isCertified”
readonlyisCertified:boolean=false
Defined in: packages/core/src/agent/errors.ts:80
Inherited from
Section titled “Inherited from”maxIngressExpiryInMinutes
Section titled “maxIngressExpiryInMinutes”
readonlymaxIngressExpiryInMinutes:number
Defined in: packages/core/src/agent/errors.ts:506
name:
string='CertificateOutdatedErrorCode'
Defined in: packages/core/src/agent/errors.ts:503
requestContext?
Section titled “requestContext?”
optionalrequestContext?:RequestContext
Defined in: packages/core/src/agent/errors.ts:77
Inherited from
Section titled “Inherited from”requestId
Section titled “requestId”
readonlyrequestId:RequestId
Defined in: packages/core/src/agent/errors.ts:507
retryTimes?
Section titled “retryTimes?”
readonlyoptionalretryTimes?:number
Defined in: packages/core/src/agent/errors.ts:508
verbosity
Section titled “verbosity”
staticverbosity:ErrorVerbosity=ErrorVerbosity.Normal
Defined in: packages/core/src/agent/errors.ts:75
Inherited from
Section titled “Inherited from”Methods
Section titled “Methods”toErrorMessage()
Section titled “toErrorMessage()”toErrorMessage():
string
Defined in: packages/core/src/agent/errors.ts:514
Returns
Section titled “Returns”string
Overrides
Section titled “Overrides”toString()
Section titled “toString()”toString():
string
Defined in: packages/core/src/agent/errors.ts:84
Returns
Section titled “Returns”string
Inherited from
Section titled “Inherited from”CertificateTimeErrorCode
Section titled “CertificateTimeErrorCode”Defined in: packages/core/src/agent/errors.ts:256
Extends
Section titled “Extends”Constructors
Section titled “Constructors”Constructor
Section titled “Constructor”new CertificateTimeErrorCode(
maxAgeInMinutes,certificateTime,currentTime,timeDiffMsecs,ageType):CertificateTimeErrorCode
Defined in: packages/core/src/agent/errors.ts:259
Parameters
Section titled “Parameters”maxAgeInMinutes
Section titled “maxAgeInMinutes”number
certificateTime
Section titled “certificateTime”Date
currentTime
Section titled “currentTime”Date
timeDiffMsecs
Section titled “timeDiffMsecs”number
ageType
Section titled “ageType”"past" | "future"
Returns
Section titled “Returns”Overrides
Section titled “Overrides”Properties
Section titled “Properties”ageType
Section titled “ageType”
readonlyageType:"past"|"future"
Defined in: packages/core/src/agent/errors.ts:264
callContext?
Section titled “callContext?”
optionalcallContext?:CallContext|PollingCallContext
Defined in: packages/core/src/agent/errors.ts:78
Inherited from
Section titled “Inherited from”certificateTime
Section titled “certificateTime”
readonlycertificateTime:Date
Defined in: packages/core/src/agent/errors.ts:261
currentTime
Section titled “currentTime”
readonlycurrentTime:Date
Defined in: packages/core/src/agent/errors.ts:262
isCertified
Section titled “isCertified”
readonlyisCertified:boolean=false
Defined in: packages/core/src/agent/errors.ts:80
Inherited from
Section titled “Inherited from”maxAgeInMinutes
Section titled “maxAgeInMinutes”
readonlymaxAgeInMinutes:number
Defined in: packages/core/src/agent/errors.ts:260
name:
string='CertificateTimeErrorCode'
Defined in: packages/core/src/agent/errors.ts:257
requestContext?
Section titled “requestContext?”
optionalrequestContext?:RequestContext
Defined in: packages/core/src/agent/errors.ts:77
Inherited from
Section titled “Inherited from”timeDiffMsecs
Section titled “timeDiffMsecs”
readonlytimeDiffMsecs:number
Defined in: packages/core/src/agent/errors.ts:263
verbosity
Section titled “verbosity”
staticverbosity:ErrorVerbosity=ErrorVerbosity.Normal
Defined in: packages/core/src/agent/errors.ts:75
Inherited from
Section titled “Inherited from”Methods
Section titled “Methods”toErrorMessage()
Section titled “toErrorMessage()”toErrorMessage():
string
Defined in: packages/core/src/agent/errors.ts:270
Returns
Section titled “Returns”string
Overrides
Section titled “Overrides”toString()
Section titled “toString()”toString():
string
Defined in: packages/core/src/agent/errors.ts:84
Returns
Section titled “Returns”string
Inherited from
Section titled “Inherited from”CertificateVerificationErrorCode
Section titled “CertificateVerificationErrorCode”Defined in: packages/core/src/agent/errors.ts:236
Extends
Section titled “Extends”Constructors
Section titled “Constructors”Constructor
Section titled “Constructor”new CertificateVerificationErrorCode(
reason,error?):CertificateVerificationErrorCode
Defined in: packages/core/src/agent/errors.ts:239
Parameters
Section titled “Parameters”reason
Section titled “reason”string
error?
Section titled “error?”unknown
Returns
Section titled “Returns”CertificateVerificationErrorCode
Overrides
Section titled “Overrides”Properties
Section titled “Properties”callContext?
Section titled “callContext?”
optionalcallContext?:CallContext|PollingCallContext
Defined in: packages/core/src/agent/errors.ts:78
Inherited from
Section titled “Inherited from”error?
Section titled “error?”
readonlyoptionalerror?:unknown
Defined in: packages/core/src/agent/errors.ts:241
isCertified
Section titled “isCertified”
readonlyisCertified:boolean=false
Defined in: packages/core/src/agent/errors.ts:80
Inherited from
Section titled “Inherited from”name:
string='CertificateVerificationErrorCode'
Defined in: packages/core/src/agent/errors.ts:237
reason
Section titled “reason”
readonlyreason:string
Defined in: packages/core/src/agent/errors.ts:240
requestContext?
Section titled “requestContext?”
optionalrequestContext?:RequestContext
Defined in: packages/core/src/agent/errors.ts:77
Inherited from
Section titled “Inherited from”verbosity
Section titled “verbosity”
staticverbosity:ErrorVerbosity=ErrorVerbosity.Normal
Defined in: packages/core/src/agent/errors.ts:75
Inherited from
Section titled “Inherited from”Methods
Section titled “Methods”toErrorMessage()
Section titled “toErrorMessage()”toErrorMessage():
string
Defined in: packages/core/src/agent/errors.ts:247
Returns
Section titled “Returns”string
Overrides
Section titled “Overrides”toString()
Section titled “toString()”toString():
string
Defined in: packages/core/src/agent/errors.ts:84
Returns
Section titled “Returns”string
Inherited from
Section titled “Inherited from”CertifiedRejectErrorCode
Section titled “CertifiedRejectErrorCode”Defined in: packages/core/src/agent/errors.ts:523
Extends
Section titled “Extends”Constructors
Section titled “Constructors”Constructor
Section titled “Constructor”new CertifiedRejectErrorCode(
requestId,rejectCode,rejectMessage,rejectErrorCode):CertifiedRejectErrorCode
Defined in: packages/core/src/agent/errors.ts:526
Parameters
Section titled “Parameters”requestId
Section titled “requestId”rejectCode
Section titled “rejectCode”rejectMessage
Section titled “rejectMessage”string
rejectErrorCode
Section titled “rejectErrorCode”string | undefined
Returns
Section titled “Returns”Overrides
Section titled “Overrides”Properties
Section titled “Properties”callContext?
Section titled “callContext?”
optionalcallContext?:CallContext|PollingCallContext
Defined in: packages/core/src/agent/errors.ts:78
Inherited from
Section titled “Inherited from”isCertified
Section titled “isCertified”
readonlyisCertified:boolean=false
Defined in: packages/core/src/agent/errors.ts:80
Inherited from
Section titled “Inherited from”name:
string='CertifiedRejectErrorCode'
Defined in: packages/core/src/agent/errors.ts:524
rejectCode
Section titled “rejectCode”
readonlyrejectCode:ReplicaRejectCode
Defined in: packages/core/src/agent/errors.ts:528
rejectErrorCode
Section titled “rejectErrorCode”
readonlyrejectErrorCode:string|undefined
Defined in: packages/core/src/agent/errors.ts:530
rejectMessage
Section titled “rejectMessage”
readonlyrejectMessage:string
Defined in: packages/core/src/agent/errors.ts:529
requestContext?
Section titled “requestContext?”
optionalrequestContext?:RequestContext
Defined in: packages/core/src/agent/errors.ts:77
Inherited from
Section titled “Inherited from”requestId
Section titled “requestId”
readonlyrequestId:RequestId
Defined in: packages/core/src/agent/errors.ts:527
verbosity
Section titled “verbosity”
staticverbosity:ErrorVerbosity=ErrorVerbosity.Normal
Defined in: packages/core/src/agent/errors.ts:75
Inherited from
Section titled “Inherited from”Methods
Section titled “Methods”toErrorMessage()
Section titled “toErrorMessage()”toErrorMessage():
string
Defined in: packages/core/src/agent/errors.ts:536
Returns
Section titled “Returns”string
Overrides
Section titled “Overrides”toString()
Section titled “toString()”toString():
string
Defined in: packages/core/src/agent/errors.ts:84
Returns
Section titled “Returns”string
Inherited from
Section titled “Inherited from”CreateHttpAgentErrorCode
Section titled “CreateHttpAgentErrorCode”Defined in: packages/core/src/agent/errors.ts:683
Extends
Section titled “Extends”Constructors
Section titled “Constructors”Constructor
Section titled “Constructor”new CreateHttpAgentErrorCode():
CreateHttpAgentErrorCode
Defined in: packages/core/src/agent/errors.ts:686
Returns
Section titled “Returns”Overrides
Section titled “Overrides”Properties
Section titled “Properties”callContext?
Section titled “callContext?”
optionalcallContext?:CallContext|PollingCallContext
Defined in: packages/core/src/agent/errors.ts:78
Inherited from
Section titled “Inherited from”isCertified
Section titled “isCertified”
readonlyisCertified:boolean=false
Defined in: packages/core/src/agent/errors.ts:80
Inherited from
Section titled “Inherited from”name:
string='CreateHttpAgentErrorCode'
Defined in: packages/core/src/agent/errors.ts:684
requestContext?
Section titled “requestContext?”
optionalrequestContext?:RequestContext
Defined in: packages/core/src/agent/errors.ts:77
Inherited from
Section titled “Inherited from”verbosity
Section titled “verbosity”
staticverbosity:ErrorVerbosity=ErrorVerbosity.Normal
Defined in: packages/core/src/agent/errors.ts:75
Inherited from
Section titled “Inherited from”Methods
Section titled “Methods”toErrorMessage()
Section titled “toErrorMessage()”toErrorMessage():
string
Defined in: packages/core/src/agent/errors.ts:691
Returns
Section titled “Returns”string
Overrides
Section titled “Overrides”toString()
Section titled “toString()”toString():
string
Defined in: packages/core/src/agent/errors.ts:84
Returns
Section titled “Returns”string
Inherited from
Section titled “Inherited from”DerDecodeErrorCode
Section titled “DerDecodeErrorCode”Defined in: packages/core/src/agent/errors.ts:407
Extends
Section titled “Extends”Constructors
Section titled “Constructors”Constructor
Section titled “Constructor”new DerDecodeErrorCode(
error):DerDecodeErrorCode
Defined in: packages/core/src/agent/errors.ts:410
Parameters
Section titled “Parameters”string
Returns
Section titled “Returns”Overrides
Section titled “Overrides”Properties
Section titled “Properties”callContext?
Section titled “callContext?”
optionalcallContext?:CallContext|PollingCallContext
Defined in: packages/core/src/agent/errors.ts:78
Inherited from
Section titled “Inherited from”
readonlyerror:string
Defined in: packages/core/src/agent/errors.ts:410
isCertified
Section titled “isCertified”
readonlyisCertified:boolean=false
Defined in: packages/core/src/agent/errors.ts:80
Inherited from
Section titled “Inherited from”name:
string='DerDecodeErrorCode'
Defined in: packages/core/src/agent/errors.ts:408
requestContext?
Section titled “requestContext?”
optionalrequestContext?:RequestContext
Defined in: packages/core/src/agent/errors.ts:77
Inherited from
Section titled “Inherited from”verbosity
Section titled “verbosity”
staticverbosity:ErrorVerbosity=ErrorVerbosity.Normal
Defined in: packages/core/src/agent/errors.ts:75
Inherited from
Section titled “Inherited from”Methods
Section titled “Methods”toErrorMessage()
Section titled “toErrorMessage()”toErrorMessage():
string
Defined in: packages/core/src/agent/errors.ts:415
Returns
Section titled “Returns”string
Overrides
Section titled “Overrides”toString()
Section titled “toString()”toString():
string
Defined in: packages/core/src/agent/errors.ts:84
Returns
Section titled “Returns”string
Inherited from
Section titled “Inherited from”DerDecodeLengthMismatchErrorCode
Section titled “DerDecodeLengthMismatchErrorCode”Defined in: packages/core/src/agent/errors.ts:391
Extends
Section titled “Extends”Constructors
Section titled “Constructors”Constructor
Section titled “Constructor”new DerDecodeLengthMismatchErrorCode(
expectedLength,actualLength):DerDecodeLengthMismatchErrorCode
Defined in: packages/core/src/agent/errors.ts:394
Parameters
Section titled “Parameters”expectedLength
Section titled “expectedLength”number
actualLength
Section titled “actualLength”number
Returns
Section titled “Returns”DerDecodeLengthMismatchErrorCode
Overrides
Section titled “Overrides”Properties
Section titled “Properties”actualLength
Section titled “actualLength”
readonlyactualLength:number
Defined in: packages/core/src/agent/errors.ts:396
callContext?
Section titled “callContext?”
optionalcallContext?:CallContext|PollingCallContext
Defined in: packages/core/src/agent/errors.ts:78
Inherited from
Section titled “Inherited from”expectedLength
Section titled “expectedLength”
readonlyexpectedLength:number
Defined in: packages/core/src/agent/errors.ts:395
isCertified
Section titled “isCertified”
readonlyisCertified:boolean=false
Defined in: packages/core/src/agent/errors.ts:80
Inherited from
Section titled “Inherited from”name:
string='DerDecodeLengthMismatchErrorCode'
Defined in: packages/core/src/agent/errors.ts:392
requestContext?
Section titled “requestContext?”
optionalrequestContext?:RequestContext
Defined in: packages/core/src/agent/errors.ts:77
Inherited from
Section titled “Inherited from”verbosity
Section titled “verbosity”
staticverbosity:ErrorVerbosity=ErrorVerbosity.Normal
Defined in: packages/core/src/agent/errors.ts:75
Inherited from
Section titled “Inherited from”Methods
Section titled “Methods”toErrorMessage()
Section titled “toErrorMessage()”toErrorMessage():
string
Defined in: packages/core/src/agent/errors.ts:402
Returns
Section titled “Returns”string
Overrides
Section titled “Overrides”toString()
Section titled “toString()”toString():
string
Defined in: packages/core/src/agent/errors.ts:84
Returns
Section titled “Returns”string
Inherited from
Section titled “Inherited from”DerEncodeErrorCode
Section titled “DerEncodeErrorCode”Defined in: packages/core/src/agent/errors.ts:420
Extends
Section titled “Extends”Constructors
Section titled “Constructors”Constructor
Section titled “Constructor”new DerEncodeErrorCode(
error):DerEncodeErrorCode
Defined in: packages/core/src/agent/errors.ts:423
Parameters
Section titled “Parameters”string
Returns
Section titled “Returns”Overrides
Section titled “Overrides”Properties
Section titled “Properties”callContext?
Section titled “callContext?”
optionalcallContext?:CallContext|PollingCallContext
Defined in: packages/core/src/agent/errors.ts:78
Inherited from
Section titled “Inherited from”
readonlyerror:string
Defined in: packages/core/src/agent/errors.ts:423
isCertified
Section titled “isCertified”
readonlyisCertified:boolean=false
Defined in: packages/core/src/agent/errors.ts:80
Inherited from
Section titled “Inherited from”name:
string='DerEncodeErrorCode'
Defined in: packages/core/src/agent/errors.ts:421
requestContext?
Section titled “requestContext?”
optionalrequestContext?:RequestContext
Defined in: packages/core/src/agent/errors.ts:77
Inherited from
Section titled “Inherited from”verbosity
Section titled “verbosity”
staticverbosity:ErrorVerbosity=ErrorVerbosity.Normal
Defined in: packages/core/src/agent/errors.ts:75
Inherited from
Section titled “Inherited from”Methods
Section titled “Methods”toErrorMessage()
Section titled “toErrorMessage()”toErrorMessage():
string
Defined in: packages/core/src/agent/errors.ts:428
Returns
Section titled “Returns”string
Overrides
Section titled “Overrides”toString()
Section titled “toString()”toString():
string
Defined in: packages/core/src/agent/errors.ts:84
Returns
Section titled “Returns”string
Inherited from
Section titled “Inherited from”DerKeyLengthMismatchErrorCode
Section titled “DerKeyLengthMismatchErrorCode”Defined in: packages/core/src/agent/errors.ts:359
Extends
Section titled “Extends”Constructors
Section titled “Constructors”Constructor
Section titled “Constructor”new DerKeyLengthMismatchErrorCode(
expectedLength,actualLength):DerKeyLengthMismatchErrorCode
Defined in: packages/core/src/agent/errors.ts:362
Parameters
Section titled “Parameters”expectedLength
Section titled “expectedLength”number
actualLength
Section titled “actualLength”number
Returns
Section titled “Returns”Overrides
Section titled “Overrides”Properties
Section titled “Properties”actualLength
Section titled “actualLength”
readonlyactualLength:number
Defined in: packages/core/src/agent/errors.ts:364
callContext?
Section titled “callContext?”
optionalcallContext?:CallContext|PollingCallContext
Defined in: packages/core/src/agent/errors.ts:78
Inherited from
Section titled “Inherited from”expectedLength
Section titled “expectedLength”
readonlyexpectedLength:number
Defined in: packages/core/src/agent/errors.ts:363
isCertified
Section titled “isCertified”
readonlyisCertified:boolean=false
Defined in: packages/core/src/agent/errors.ts:80
Inherited from
Section titled “Inherited from”name:
string='DerKeyLengthMismatchErrorCode'
Defined in: packages/core/src/agent/errors.ts:360
requestContext?
Section titled “requestContext?”
optionalrequestContext?:RequestContext
Defined in: packages/core/src/agent/errors.ts:77
Inherited from
Section titled “Inherited from”verbosity
Section titled “verbosity”
staticverbosity:ErrorVerbosity=ErrorVerbosity.Normal
Defined in: packages/core/src/agent/errors.ts:75
Inherited from
Section titled “Inherited from”Methods
Section titled “Methods”toErrorMessage()
Section titled “toErrorMessage()”toErrorMessage():
string
Defined in: packages/core/src/agent/errors.ts:370
Returns
Section titled “Returns”string
Overrides
Section titled “Overrides”toString()
Section titled “toString()”toString():
string
Defined in: packages/core/src/agent/errors.ts:84
Returns
Section titled “Returns”string
Inherited from
Section titled “Inherited from”DerPrefixMismatchErrorCode
Section titled “DerPrefixMismatchErrorCode”Defined in: packages/core/src/agent/errors.ts:375
Extends
Section titled “Extends”Constructors
Section titled “Constructors”Constructor
Section titled “Constructor”new DerPrefixMismatchErrorCode(
expectedPrefix,actualPrefix):DerPrefixMismatchErrorCode
Defined in: packages/core/src/agent/errors.ts:378
Parameters
Section titled “Parameters”expectedPrefix
Section titled “expectedPrefix”Uint8Array
actualPrefix
Section titled “actualPrefix”Uint8Array
Returns
Section titled “Returns”Overrides
Section titled “Overrides”Properties
Section titled “Properties”actualPrefix
Section titled “actualPrefix”
readonlyactualPrefix:Uint8Array
Defined in: packages/core/src/agent/errors.ts:380
callContext?
Section titled “callContext?”
optionalcallContext?:CallContext|PollingCallContext
Defined in: packages/core/src/agent/errors.ts:78
Inherited from
Section titled “Inherited from”expectedPrefix
Section titled “expectedPrefix”
readonlyexpectedPrefix:Uint8Array
Defined in: packages/core/src/agent/errors.ts:379
isCertified
Section titled “isCertified”
readonlyisCertified:boolean=false
Defined in: packages/core/src/agent/errors.ts:80
Inherited from
Section titled “Inherited from”name:
string='DerPrefixMismatchErrorCode'
Defined in: packages/core/src/agent/errors.ts:376
requestContext?
Section titled “requestContext?”
optionalrequestContext?:RequestContext
Defined in: packages/core/src/agent/errors.ts:77
Inherited from
Section titled “Inherited from”verbosity
Section titled “verbosity”
staticverbosity:ErrorVerbosity=ErrorVerbosity.Normal
Defined in: packages/core/src/agent/errors.ts:75
Inherited from
Section titled “Inherited from”Methods
Section titled “Methods”toErrorMessage()
Section titled “toErrorMessage()”toErrorMessage():
string
Defined in: packages/core/src/agent/errors.ts:386
Returns
Section titled “Returns”string
Overrides
Section titled “Overrides”toString()
Section titled “toString()”toString():
string
Defined in: packages/core/src/agent/errors.ts:84
Returns
Section titled “Returns”string
Inherited from
Section titled “Inherited from”Ed25519PublicKey
Section titled “Ed25519PublicKey”Defined in: packages/core/src/agent/public_key.ts:5
A Public Key implementation.
Implements
Section titled “Implements”Accessors
Section titled “Accessors”derKey
Section titled “derKey”Get Signature
Section titled “Get Signature”get derKey():
DerEncodedPublicKey
Defined in: packages/core/src/agent/public_key.ts:43
Returns
Section titled “Returns”Implementation of
Section titled “Implementation of”rawKey
Section titled “rawKey”Get Signature
Section titled “Get Signature”get rawKey():
Uint8Array
Defined in: packages/core/src/agent/public_key.ts:37
Returns
Section titled “Returns”Uint8Array
Implementation of
Section titled “Implementation of”Methods
Section titled “Methods”toDer()
Section titled “toDer()”toDer():
DerEncodedPublicKey
Defined in: packages/core/src/agent/public_key.ts:58
Returns
Section titled “Returns”Implementation of
Section titled “Implementation of”toRaw()
Section titled “toRaw()”toRaw():
Uint8Array
Defined in: packages/core/src/agent/public_key.ts:62
Returns
Section titled “Returns”Uint8Array
Implementation of
Section titled “Implementation of”from()
Section titled “from()”
staticfrom(key):Ed25519PublicKey
Defined in: packages/core/src/agent/public_key.ts:6
Parameters
Section titled “Parameters”Returns
Section titled “Returns”fromDer()
Section titled “fromDer()”
staticfromDer(derKey):Ed25519PublicKey
Defined in: packages/core/src/agent/public_key.ts:14
Parameters
Section titled “Parameters”derKey
Section titled “derKey”Returns
Section titled “Returns”fromRaw()
Section titled “fromRaw()”
staticfromRaw(rawKey):Ed25519PublicKey
Defined in: packages/core/src/agent/public_key.ts:10
Parameters
Section titled “Parameters”rawKey
Section titled “rawKey”Uint8Array
Returns
Section titled “Returns”EmptyCookieErrorCode
Section titled “EmptyCookieErrorCode”Defined in: packages/core/src/agent/errors.ts:933
Extends
Section titled “Extends”Constructors
Section titled “Constructors”Constructor
Section titled “Constructor”new EmptyCookieErrorCode(
expectedCookieName):EmptyCookieErrorCode
Defined in: packages/core/src/agent/errors.ts:936
Parameters
Section titled “Parameters”expectedCookieName
Section titled “expectedCookieName”string
Returns
Section titled “Returns”Overrides
Section titled “Overrides”Properties
Section titled “Properties”callContext?
Section titled “callContext?”
optionalcallContext?:CallContext|PollingCallContext
Defined in: packages/core/src/agent/errors.ts:78
Inherited from
Section titled “Inherited from”expectedCookieName
Section titled “expectedCookieName”
readonlyexpectedCookieName:string
Defined in: packages/core/src/agent/errors.ts:936
isCertified
Section titled “isCertified”
readonlyisCertified:boolean=false
Defined in: packages/core/src/agent/errors.ts:80
Inherited from
Section titled “Inherited from”name:
string='EmptyCookieErrorCode'
Defined in: packages/core/src/agent/errors.ts:934
requestContext?
Section titled “requestContext?”
optionalrequestContext?:RequestContext
Defined in: packages/core/src/agent/errors.ts:77
Inherited from
Section titled “Inherited from”verbosity
Section titled “verbosity”
staticverbosity:ErrorVerbosity=ErrorVerbosity.Normal
Defined in: packages/core/src/agent/errors.ts:75
Inherited from
Section titled “Inherited from”Methods
Section titled “Methods”toErrorMessage()
Section titled “toErrorMessage()”toErrorMessage():
string
Defined in: packages/core/src/agent/errors.ts:941
Returns
Section titled “Returns”string
Overrides
Section titled “Overrides”toString()
Section titled “toString()”toString():
string
Defined in: packages/core/src/agent/errors.ts:84
Returns
Section titled “Returns”string
Inherited from
Section titled “Inherited from”abstract ErrorCode
Section titled “abstract ErrorCode”Defined in: packages/core/src/agent/errors.ts:74
Extended by
Section titled “Extended by”CertificateVerificationErrorCodeCertificateTimeErrorCodeCertificateHasTooManyDelegationsErrorCodeCertificateNotAuthorizedErrorCodeCertificateNotAuthorizedForSubnetErrorCodeLookupErrorCodeMalformedLookupFoundValueErrorCodeMissingLookupValueErrorCodeDerKeyLengthMismatchErrorCodeDerPrefixMismatchErrorCodeDerDecodeLengthMismatchErrorCodeDerDecodeErrorCodeDerEncodeErrorCodeCborDecodeErrorCodeCborEncodeErrorCodeHexDecodeErrorCodeTimeoutWaitingForResponseErrorCodeCertificateOutdatedErrorCodeCertifiedRejectErrorCodeUncertifiedRejectErrorCodeUncertifiedRejectUpdateErrorCodeRequestStatusDoneNoReplyErrorCodeMissingRootKeyErrorCodeHashValueErrorCodeIdentityInvalidErrorCodeIngressExpiryInvalidErrorCodeMissingFetchErrorCodeCreateHttpAgentErrorCodeExcessiveSignaturesErrorCodeMalformedSignatureErrorCodeMissingSignatureErrorCodeMalformedPublicKeyErrorCodeQuerySignatureVerificationFailedErrorCodeUnexpectedErrorCodeUnexpectedV4StatusErrorCodeHashTreeDecodeErrorCodeHttpErrorCodeHttpV4ApiNotSupportedErrorCodeHttpFetchErrorCodeMissingCanisterIdErrorCodeInvalidReadStateRequestErrorCodeExpiryJsonDeserializeErrorCodeInvalidRootKeyErrorCodeMissingCookieErrorCodeEmptyCookieErrorCode
Constructors
Section titled “Constructors”Constructor
Section titled “Constructor”new ErrorCode(
isCertified?):ErrorCode
Defined in: packages/core/src/agent/errors.ts:80
Parameters
Section titled “Parameters”isCertified?
Section titled “isCertified?”boolean = false
Returns
Section titled “Returns”Properties
Section titled “Properties”callContext?
Section titled “callContext?”
optionalcallContext?:CallContext|PollingCallContext
Defined in: packages/core/src/agent/errors.ts:78
isCertified
Section titled “isCertified”
readonlyisCertified:boolean=false
Defined in: packages/core/src/agent/errors.ts:80
requestContext?
Section titled “requestContext?”
optionalrequestContext?:RequestContext
Defined in: packages/core/src/agent/errors.ts:77
verbosity
Section titled “verbosity”
staticverbosity:ErrorVerbosity=ErrorVerbosity.Normal
Defined in: packages/core/src/agent/errors.ts:75
Methods
Section titled “Methods”toErrorMessage()
Section titled “toErrorMessage()”
abstracttoErrorMessage():string
Defined in: packages/core/src/agent/errors.ts:82
Returns
Section titled “Returns”string
toString()
Section titled “toString()”toString():
string
Defined in: packages/core/src/agent/errors.ts:84
Returns
Section titled “Returns”string
ExcessiveSignaturesErrorCode
Section titled “ExcessiveSignaturesErrorCode”Defined in: packages/core/src/agent/errors.ts:696
Extends
Section titled “Extends”Constructors
Section titled “Constructors”Constructor
Section titled “Constructor”new ExcessiveSignaturesErrorCode(
signatureCount,maxExpected):ExcessiveSignaturesErrorCode
Defined in: packages/core/src/agent/errors.ts:699
Parameters
Section titled “Parameters”signatureCount
Section titled “signatureCount”number
maxExpected
Section titled “maxExpected”number
Returns
Section titled “Returns”Overrides
Section titled “Overrides”Properties
Section titled “Properties”callContext?
Section titled “callContext?”
optionalcallContext?:CallContext|PollingCallContext
Defined in: packages/core/src/agent/errors.ts:78
Inherited from
Section titled “Inherited from”isCertified
Section titled “isCertified”
readonlyisCertified:boolean=false
Defined in: packages/core/src/agent/errors.ts:80
Inherited from
Section titled “Inherited from”maxExpected
Section titled “maxExpected”
readonlymaxExpected:number
Defined in: packages/core/src/agent/errors.ts:701
name:
string='ExcessiveSignaturesErrorCode'
Defined in: packages/core/src/agent/errors.ts:697
requestContext?
Section titled “requestContext?”
optionalrequestContext?:RequestContext
Defined in: packages/core/src/agent/errors.ts:77
Inherited from
Section titled “Inherited from”signatureCount
Section titled “signatureCount”
readonlysignatureCount:number
Defined in: packages/core/src/agent/errors.ts:700
verbosity
Section titled “verbosity”
staticverbosity:ErrorVerbosity=ErrorVerbosity.Normal
Defined in: packages/core/src/agent/errors.ts:75
Inherited from
Section titled “Inherited from”Methods
Section titled “Methods”toErrorMessage()
Section titled “toErrorMessage()”toErrorMessage():
string
Defined in: packages/core/src/agent/errors.ts:707
Returns
Section titled “Returns”string
Overrides
Section titled “Overrides”toString()
Section titled “toString()”toString():
string
Defined in: packages/core/src/agent/errors.ts:84
Returns
Section titled “Returns”string
Inherited from
Section titled “Inherited from”Expiry
Section titled “Expiry”Defined in: packages/core/src/agent/agent/http/expiry.ts:24
Properties
Section titled “Properties”_isExpiry
Section titled “_isExpiry”
readonly_isExpiry:true=true
Defined in: packages/core/src/agent/agent/http/expiry.ts:25
Methods
Section titled “Methods”toBigInt()
Section titled “toBigInt()”toBigInt():
bigint
Defined in: packages/core/src/agent/agent/http/expiry.ts:56
Returns
Section titled “Returns”bigint
toHash()
Section titled “toHash()”toHash():
Uint8Array
Defined in: packages/core/src/agent/agent/http/expiry.ts:60
Returns
Section titled “Returns”Uint8Array
toJSON()
Section titled “toJSON()”toJSON():
JsonnableExpiry
Defined in: packages/core/src/agent/agent/http/expiry.ts:72
Serializes to JSON
Returns
Section titled “Returns”a JSON object with a single key, JSON_KEY_EXPIRY, whose value is the expiry as a string
toString()
Section titled “toString()”toString():
string
Defined in: packages/core/src/agent/agent/http/expiry.ts:64
Returns
Section titled “Returns”string
fromDeltaInMilliseconds()
Section titled “fromDeltaInMilliseconds()”
staticfromDeltaInMilliseconds(deltaInMs,clockDriftInMs?):Expiry
Defined in: packages/core/src/agent/agent/http/expiry.ts:39
Creates an Expiry object from a delta in milliseconds. The expiry is calculated as: current_time + delta + clock_drift The resulting expiry is then rounded:
- If rounding down to the nearest minute still provides at least 60 seconds in the future, use minute precision
- Otherwise, use second precision
Parameters
Section titled “Parameters”deltaInMs
Section titled “deltaInMs”number
The milliseconds to add to the current time.
clockDriftInMs?
Section titled “clockDriftInMs?”number = 0
The milliseconds to add to the current time, typically the clock drift between IC network clock and the client’s clock. Defaults to 0 if not provided.
Returns
Section titled “Returns”The constructed Expiry object.
fromJSON()
Section titled “fromJSON()”
staticfromJSON(input):Expiry
Defined in: packages/core/src/agent/agent/http/expiry.ts:81
Deserializes a JsonnableExpiry object from a JSON string.
Parameters
Section titled “Parameters”string
The JSON string to deserialize.
Returns
Section titled “Returns”The deserialized Expiry object.
isExpiry()
Section titled “isExpiry()”
staticisExpiry(other):other is Expiry
Defined in: packages/core/src/agent/agent/http/expiry.ts:96
Parameters
Section titled “Parameters”unknown
Returns
Section titled “Returns”other is Expiry
ExpiryJsonDeserializeErrorCode
Section titled “ExpiryJsonDeserializeErrorCode”Defined in: packages/core/src/agent/errors.ts:891
Extends
Section titled “Extends”Constructors
Section titled “Constructors”Constructor
Section titled “Constructor”new ExpiryJsonDeserializeErrorCode(
error):ExpiryJsonDeserializeErrorCode
Defined in: packages/core/src/agent/errors.ts:894
Parameters
Section titled “Parameters”string
Returns
Section titled “Returns”ExpiryJsonDeserializeErrorCode
Overrides
Section titled “Overrides”Properties
Section titled “Properties”callContext?
Section titled “callContext?”
optionalcallContext?:CallContext|PollingCallContext
Defined in: packages/core/src/agent/errors.ts:78
Inherited from
Section titled “Inherited from”
readonlyerror:string
Defined in: packages/core/src/agent/errors.ts:894
isCertified
Section titled “isCertified”
readonlyisCertified:boolean=false
Defined in: packages/core/src/agent/errors.ts:80
Inherited from
Section titled “Inherited from”name:
string='ExpiryJsonDeserializeErrorCode'
Defined in: packages/core/src/agent/errors.ts:892
requestContext?
Section titled “requestContext?”
optionalrequestContext?:RequestContext
Defined in: packages/core/src/agent/errors.ts:77
Inherited from
Section titled “Inherited from”verbosity
Section titled “verbosity”
staticverbosity:ErrorVerbosity=ErrorVerbosity.Normal
Defined in: packages/core/src/agent/errors.ts:75
Inherited from
Section titled “Inherited from”Methods
Section titled “Methods”toErrorMessage()
Section titled “toErrorMessage()”toErrorMessage():
string
Defined in: packages/core/src/agent/errors.ts:899
Returns
Section titled “Returns”string
Overrides
Section titled “Overrides”toString()
Section titled “toString()”toString():
string
Defined in: packages/core/src/agent/errors.ts:84
Returns
Section titled “Returns”string
Inherited from
Section titled “Inherited from”ExternalError
Section titled “ExternalError”Defined in: packages/core/src/agent/errors.ts:200
Extends
Section titled “Extends”ErrorKind
Constructors
Section titled “Constructors”Constructor
Section titled “Constructor”new ExternalError(
code):ExternalError
Defined in: packages/core/src/agent/errors.ts:203
Parameters
Section titled “Parameters”Returns
Section titled “Returns”Overrides
Section titled “Overrides”ErrorKind.constructor
Properties
Section titled “Properties”
readonlycause:object
Defined in: packages/core/src/agent/errors.ts:116
code:
ErrorCode
kind:
ErrorKindEnum
Inherited from
Section titled “Inherited from”ErrorKind.cause
message
Section titled “message”message:
string
Defined in: node_modules/.pnpm/typescript@5.9.3/node_modules/typescript/lib/lib.es5.d.ts:1077
Inherited from
Section titled “Inherited from”ErrorKind.message
name:
string='ExternalError'
Defined in: packages/core/src/agent/errors.ts:201
Overrides
Section titled “Overrides”ErrorKind.name
stack?
Section titled “stack?”
optionalstack?:string
Defined in: node_modules/.pnpm/typescript@5.9.3/node_modules/typescript/lib/lib.es5.d.ts:1078
Inherited from
Section titled “Inherited from”ErrorKind.stack
stackTraceLimit
Section titled “stackTraceLimit”
staticstackTraceLimit: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.
Inherited from
Section titled “Inherited from”ErrorKind.stackTraceLimit
Accessors
Section titled “Accessors”Get Signature
Section titled “Get Signature”get code():
ErrorCode
Defined in: packages/core/src/agent/errors.ts:118
Returns
Section titled “Returns”Set Signature
Section titled “Set Signature”set code(
code):void
Defined in: packages/core/src/agent/errors.ts:121
Parameters
Section titled “Parameters”Returns
Section titled “Returns”void
Inherited from
Section titled “Inherited from”ErrorKind.code
isCertified
Section titled “isCertified”Get Signature
Section titled “Get Signature”get isCertified():
boolean
Defined in: packages/core/src/agent/errors.ts:136
Reads the isCertified property of the underlying error code.
Returns
Section titled “Returns”boolean
true if the error is certified, false otherwise.
Inherited from
Section titled “Inherited from”ErrorKind.isCertified
Get Signature
Section titled “Get Signature”get kind():
ErrorKindEnum
Defined in: packages/core/src/agent/errors.ts:125
Returns
Section titled “Returns”Set Signature
Section titled “Set Signature”set kind(
kind):void
Defined in: packages/core/src/agent/errors.ts:128
Parameters
Section titled “Parameters”Returns
Section titled “Returns”void
Inherited from
Section titled “Inherited from”ErrorKind.kind
Methods
Section titled “Methods”hasCode()
Section titled “hasCode()”hasCode<
C>(code):boolean
Defined in: packages/core/src/agent/errors.ts:146
Type Parameters
Section titled “Type Parameters”C extends ErrorCode
Parameters
Section titled “Parameters”(…args) => C
Returns
Section titled “Returns”boolean
Inherited from
Section titled “Inherited from”ErrorKind.hasCode
toString()
Section titled “toString()”toString():
string
Defined in: packages/core/src/agent/errors.ts:150
Returns a string representation of an object.
Returns
Section titled “Returns”string
Inherited from
Section titled “Inherited from”ErrorKind.toString
captureStackTrace()
Section titled “captureStackTrace()”
staticcaptureStackTrace(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();Parameters
Section titled “Parameters”targetObject
Section titled “targetObject”object
constructorOpt?
Section titled “constructorOpt?”Function
Returns
Section titled “Returns”void
Inherited from
Section titled “Inherited from”ErrorKind.captureStackTrace
fromCode()
Section titled “fromCode()”
staticfromCode<C,E>(this,code):E
Defined in: packages/core/src/agent/errors.ts:156
Type Parameters
Section titled “Type Parameters”C extends ErrorCode
E extends ErrorKind
Parameters
Section titled “Parameters”(code) => E
C
Returns
Section titled “Returns”E
Inherited from
Section titled “Inherited from”ErrorKind.fromCode
prepareStackTrace()
Section titled “prepareStackTrace()”
staticprepareStackTrace(err,stackTraces):any
Defined in: node_modules/.pnpm/@types+node@25.5.0/node_modules/@types/node/globals.d.ts:55
Parameters
Section titled “Parameters”Error
stackTraces
Section titled “stackTraces”CallSite[]
Returns
Section titled “Returns”any
https://v8.dev/docs/stack-trace-api#customizing-stack-traces
Inherited from
Section titled “Inherited from”ErrorKind.prepareStackTrace
HashTreeDecodeErrorCode
Section titled “HashTreeDecodeErrorCode”Defined in: packages/core/src/agent/errors.ts:801
Extends
Section titled “Extends”Constructors
Section titled “Constructors”Constructor
Section titled “Constructor”new HashTreeDecodeErrorCode(
error):HashTreeDecodeErrorCode
Defined in: packages/core/src/agent/errors.ts:804
Parameters
Section titled “Parameters”string
Returns
Section titled “Returns”Overrides
Section titled “Overrides”Properties
Section titled “Properties”callContext?
Section titled “callContext?”
optionalcallContext?:CallContext|PollingCallContext
Defined in: packages/core/src/agent/errors.ts:78
Inherited from
Section titled “Inherited from”
readonlyerror:string
Defined in: packages/core/src/agent/errors.ts:804
isCertified
Section titled “isCertified”
readonlyisCertified:boolean=false
Defined in: packages/core/src/agent/errors.ts:80
Inherited from
Section titled “Inherited from”name:
string='HashTreeDecodeErrorCode'
Defined in: packages/core/src/agent/errors.ts:802
requestContext?
Section titled “requestContext?”
optionalrequestContext?:RequestContext
Defined in: packages/core/src/agent/errors.ts:77
Inherited from
Section titled “Inherited from”verbosity
Section titled “verbosity”
staticverbosity:ErrorVerbosity=ErrorVerbosity.Normal
Defined in: packages/core/src/agent/errors.ts:75
Inherited from
Section titled “Inherited from”Methods
Section titled “Methods”toErrorMessage()
Section titled “toErrorMessage()”toErrorMessage():
string
Defined in: packages/core/src/agent/errors.ts:809
Returns
Section titled “Returns”string
Overrides
Section titled “Overrides”toString()
Section titled “toString()”toString():
string
Defined in: packages/core/src/agent/errors.ts:84
Returns
Section titled “Returns”string
Inherited from
Section titled “Inherited from”HashValueErrorCode
Section titled “HashValueErrorCode”Defined in: packages/core/src/agent/errors.ts:628
Extends
Section titled “Extends”Constructors
Section titled “Constructors”Constructor
Section titled “Constructor”new HashValueErrorCode(
value):HashValueErrorCode
Defined in: packages/core/src/agent/errors.ts:631
Parameters
Section titled “Parameters”unknown
Returns
Section titled “Returns”Overrides
Section titled “Overrides”Properties
Section titled “Properties”callContext?
Section titled “callContext?”
optionalcallContext?:CallContext|PollingCallContext
Defined in: packages/core/src/agent/errors.ts:78
Inherited from
Section titled “Inherited from”isCertified
Section titled “isCertified”
readonlyisCertified:boolean=false
Defined in: packages/core/src/agent/errors.ts:80
Inherited from
Section titled “Inherited from”name:
string='HashValueErrorCode'
Defined in: packages/core/src/agent/errors.ts:629
requestContext?
Section titled “requestContext?”
optionalrequestContext?:RequestContext
Defined in: packages/core/src/agent/errors.ts:77
Inherited from
Section titled “Inherited from”
readonlyvalue:unknown
Defined in: packages/core/src/agent/errors.ts:631
verbosity
Section titled “verbosity”
staticverbosity:ErrorVerbosity=ErrorVerbosity.Normal
Defined in: packages/core/src/agent/errors.ts:75
Inherited from
Section titled “Inherited from”Methods
Section titled “Methods”toErrorMessage()
Section titled “toErrorMessage()”toErrorMessage():
string
Defined in: packages/core/src/agent/errors.ts:636
Returns
Section titled “Returns”string
Overrides
Section titled “Overrides”toString()
Section titled “toString()”toString():
string
Defined in: packages/core/src/agent/errors.ts:84
Returns
Section titled “Returns”string
Inherited from
Section titled “Inherited from”HexDecodeErrorCode
Section titled “HexDecodeErrorCode”Defined in: packages/core/src/agent/errors.ts:465
Extends
Section titled “Extends”Constructors
Section titled “Constructors”Constructor
Section titled “Constructor”new HexDecodeErrorCode(
error):HexDecodeErrorCode
Defined in: packages/core/src/agent/errors.ts:468
Parameters
Section titled “Parameters”string
Returns
Section titled “Returns”Overrides
Section titled “Overrides”Properties
Section titled “Properties”callContext?
Section titled “callContext?”
optionalcallContext?:CallContext|PollingCallContext
Defined in: packages/core/src/agent/errors.ts:78
Inherited from
Section titled “Inherited from”
readonlyerror:string
Defined in: packages/core/src/agent/errors.ts:468
isCertified
Section titled “isCertified”
readonlyisCertified:boolean=false
Defined in: packages/core/src/agent/errors.ts:80
Inherited from
Section titled “Inherited from”name:
string='HexDecodeErrorCode'
Defined in: packages/core/src/agent/errors.ts:466
requestContext?
Section titled “requestContext?”
optionalrequestContext?:RequestContext
Defined in: packages/core/src/agent/errors.ts:77
Inherited from
Section titled “Inherited from”verbosity
Section titled “verbosity”
staticverbosity:ErrorVerbosity=ErrorVerbosity.Normal
Defined in: packages/core/src/agent/errors.ts:75
Inherited from
Section titled “Inherited from”Methods
Section titled “Methods”toErrorMessage()
Section titled “toErrorMessage()”toErrorMessage():
string
Defined in: packages/core/src/agent/errors.ts:473
Returns
Section titled “Returns”string
Overrides
Section titled “Overrides”toString()
Section titled “toString()”toString():
string
Defined in: packages/core/src/agent/errors.ts:84
Returns
Section titled “Returns”string
Inherited from
Section titled “Inherited from”HttpAgent
Section titled “HttpAgent”Defined in: packages/core/src/agent/agent/http/index.ts:269
A HTTP agent allows users to interact with a client of the internet computer using the available methods. It exposes an API that closely follows the public view of the internet computer, and is not intended to be exposed directly to the majority of users due to its low-level interface. There is a pipeline to apply transformations to the request before sending it to the client. This is to decouple signature, nonce generation and other computations so that this class can stay as simple as possible while allowing extensions.
Implements
Section titled “Implements”Constructors
Section titled “Constructors”Constructor
Section titled “Constructor”new HttpAgent(
options?):HttpAgent
Defined in: packages/core/src/agent/agent/http/index.ts:311
Parameters
Section titled “Parameters”options?
Section titled “options?”HttpAgentOptions = {}
Options for the HttpAgent
Returns
Section titled “Returns”Deprecated
Section titled “Deprecated”Use HttpAgent.create or HttpAgent.createSync instead
Properties
Section titled “Properties”_isAgent
Section titled “_isAgent”
readonly_isAgent:true=true
Defined in: packages/core/src/agent/agent/http/index.ts:294
config
Section titled “config”config:
HttpAgentOptions={}
Defined in: packages/core/src/agent/agent/http/index.ts:295
readonlyhost:URL
Defined in: packages/core/src/agent/agent/http/index.ts:283
log:
ObservableLog
Defined in: packages/core/src/agent/agent/http/index.ts:297
rootKey
Section titled “rootKey”rootKey:
Uint8Array<ArrayBufferLike> |null
Defined in: packages/core/src/agent/agent/http/index.ts:270
Implementation of
Section titled “Implementation of”Methods
Section titled “Methods”_transform()
Section titled “_transform()”
protected_transform(request):Promise<HttpAgentRequest>
Defined in: packages/core/src/agent/agent/http/index.ts:1668
Parameters
Section titled “Parameters”request
Section titled “request”Returns
Section titled “Returns”Promise<HttpAgentRequest>
addTransform()
Section titled “addTransform()”addTransform(
type,fn,priority?):void
Defined in: packages/core/src/agent/agent/http/index.ts:444
Parameters
Section titled “Parameters”"query" | "update"
priority?
Section titled “priority?”number = ...
Returns
Section titled “Returns”void
call()
Section titled “call()”call(
canisterId,options,identity?):Promise<SubmitResponse>
Defined in: packages/core/src/agent/agent/http/index.ts:482
Makes a call to a canister method.
Parameters
Section titled “Parameters”canisterId
Section titled “canisterId”string | Principal
The ID of the canister to call. Can be a Principal or a string.
options
Section titled “options”Options for the call.
identity?
Section titled “identity?”(Optional) The identity to use for the call. If not provided, the agent’s current identity will be used.
Returns
Section titled “Returns”Promise<SubmitResponse>
A promise that resolves to the response of the call, including the request ID and response details.
Implementation of
Section titled “Implementation of”createReadStateRequest()
Section titled “createReadStateRequest()”createReadStateRequest(
fields,identity?):Promise<any>
Defined in: packages/core/src/agent/agent/http/index.ts:1203
Create the request for the read state call.
readState uses this internally.
Useful to avoid signing the same request multiple times.
Parameters
Section titled “Parameters”fields
Section titled “fields”identity?
Section titled “identity?”Returns
Section titled “Returns”Promise<any>
Implementation of
Section titled “Implementation of”fetchRootKey()
Section titled “fetchRootKey()”fetchRootKey():
Promise<Uint8Array<ArrayBufferLike>>
Defined in: packages/core/src/agent/agent/http/index.ts:1537
By default, the agent is configured to talk to the main Internet Computer, and verifies responses using a hard-coded public key.
This function will instruct the agent to ask the endpoint for its public key, and use that instead. This is required when talking to a local test instance, for example.
Only use this when you are not talking to the main Internet Computer, otherwise you are prone to man-in-the-middle attacks! Do not call this function by default.
Returns
Section titled “Returns”Promise<Uint8Array<ArrayBufferLike>>
Implementation of
Section titled “Implementation of”fetchSubnetKeys()
Section titled “fetchSubnetKeys()”fetchSubnetKeys(
canisterId):Promise<SubnetNodeKeys>
Defined in: packages/core/src/agent/agent/http/index.ts:1587
Parameters
Section titled “Parameters”canisterId
Section titled “canisterId”string | Principal
Returns
Section titled “Returns”Promise<SubnetNodeKeys>
getPrincipal()
Section titled “getPrincipal()”getPrincipal():
Promise<Principal>
Defined in: packages/core/src/agent/agent/http/index.ts:468
Returns the principal ID associated with this agent (by default). It only shows the principal of the default identity in the agent, which is the principal used when calls don’t specify it.
Returns
Section titled “Returns”Promise<Principal>
Implementation of
Section titled “Implementation of”getSubnetIdFromCanister()
Section titled “getSubnetIdFromCanister()”getSubnetIdFromCanister(
canisterId):Promise<Principal>
Defined in: packages/core/src/agent/agent/http/index.ts:1651
Returns the subnet ID for a given canister ID, by looking at the certificate delegation
returned by the canister’s state obtained by requesting the /time path with readState.
Parameters
Section titled “Parameters”canisterId
Section titled “canisterId”string | Principal
The canister ID to get the subnet ID for.
Returns
Section titled “Returns”Promise<Principal>
The subnet ID for the given canister ID.
getTimeDiffMsecs()
Section titled “getTimeDiffMsecs()”getTimeDiffMsecs():
number
Defined in: packages/core/src/agent/agent/http/index.ts:1689
Returns the time difference in milliseconds between the IC network clock and the client’s clock, after the clock has been synced.
If the time has not been synced, returns 0.
Returns
Section titled “Returns”number
hasSyncedTime()
Section titled “hasSyncedTime()”hasSyncedTime():
boolean
Defined in: packages/core/src/agent/agent/http/index.ts:1696
Returns true if the time has been synced at least once with the IC network, false otherwise.
Returns
Section titled “Returns”boolean
invalidateIdentity()
Section titled “invalidateIdentity()”invalidateIdentity():
void
Defined in: packages/core/src/agent/agent/http/index.ts:1579
If an application needs to invalidate an identity under certain conditions, an Agent may expose an invalidateIdentity method.
Invoking this method will set the inner identity used by the Agent to null.
A use case for this would be - after a certain period of inactivity, a secure application chooses to invalidate the identity of any HttpAgent instances. An invalid identity can be replaced by Agent.replaceIdentity
Returns
Section titled “Returns”void
Implementation of
Section titled “Implementation of”isLocal()
Section titled “isLocal()”isLocal():
boolean
Defined in: packages/core/src/agent/agent/http/index.ts:439
Returns
Section titled “Returns”boolean
parseTimeFromResponse()
Section titled “parseTimeFromResponse()”parseTimeFromResponse(
response):number
Defined in: packages/core/src/agent/agent/http/index.ts:1358
Parameters
Section titled “Parameters”response
Section titled “response”certificate
Section titled “certificate”Uint8Array
Returns
Section titled “Returns”number
query()
Section titled “query()”query(
canisterId,fields,identity?):Promise<ApiQueryResponse>
Defined in: packages/core/src/agent/agent/http/index.ts:1016
Send a query call to a canister. See the interface spec.
Parameters
Section titled “Parameters”canisterId
Section titled “canisterId”string | Principal
The Principal of the Canister to send the query to. Sending a query to the management canister is not supported (as it has no meaning from an agent).
fields
Section titled “fields”identity?
Section titled “identity?”Sender principal to use when sending the query.
Returns
Section titled “Returns”Promise<ApiQueryResponse>
The response from the replica. The Promise will only reject when the communication failed. If the query itself failed but no protocol errors happened, the response will be of type QueryResponseRejected.
Implementation of
Section titled “Implementation of”readState()
Section titled “readState()”readState(
canisterId,fields,_identity?,request?):Promise<ReadStateResponse>
Defined in: packages/core/src/agent/agent/http/index.ts:1239
Send a read state query to the replica. This includes a list of paths to return, and will return a Certificate. This will only reject on communication errors, but the certificate might contain less information than requested.
Parameters
Section titled “Parameters”canisterId
Section titled “canisterId”string | Principal
fields
Section titled “fields”_identity?
Section titled “_identity?”request?
Section titled “request?”any
The request to send in case it has already been created.
Returns
Section titled “Returns”Promise<ReadStateResponse>
Implementation of
Section titled “Implementation of”readSubnetState()
Section titled “readSubnetState()”readSubnetState(
subnetId,options):Promise<ReadStateResponse>
Defined in: packages/core/src/agent/agent/http/index.ts:1289
Reads the state of a subnet from the /api/v3/subnet/{subnetId}/read_state endpoint.
Parameters
Section titled “Parameters”subnetId
Section titled “subnetId”string | Principal
The ID of the subnet to read the state of. If you have a canister ID, you can use getSubnetIdFromCanister to get the subnet ID.
options
Section titled “options”The options for the read state request.
Returns
Section titled “Returns”Promise<ReadStateResponse>
The response from the read state request.
replaceIdentity()
Section titled “replaceIdentity()”replaceIdentity(
identity):void
Defined in: packages/core/src/agent/agent/http/index.ts:1583
If an application needs to replace an identity under certain conditions, an Agent may expose a replaceIdentity method.
Invoking this method will set the inner identity used by the Agent to a newly provided identity.
A use case for this would be - after authenticating using @icp-sdk/auth/client, you can replace the AnonymousIdentity of your Actor with a DelegationIdentity.
Actor.agentOf(defaultActor).replaceIdentity(await authClient.getIdentity());Parameters
Section titled “Parameters”identity
Section titled “identity”Returns
Section titled “Returns”void
Implementation of
Section titled “Implementation of”status()
Section titled “status()”status():
Promise<JsonObject>
Defined in: packages/core/src/agent/agent/http/index.ts:1518
Query the status endpoint of the replica. This normally has a few fields that corresponds to the version of the replica, its root public key, and any other information made public.
Returns
Section titled “Returns”Promise<JsonObject>
A JsonObject that is essentially a record of fields from the status endpoint.
Implementation of
Section titled “Implementation of”syncTime()
Section titled “syncTime()”syncTime(
canisterIdOverride?):Promise<void>
Defined in: packages/core/src/agent/agent/http/index.ts:1398
Allows agent to sync its time with the network. Can be called during initialization or mid-lifecycle if the device’s clock has drifted away from the network time. This is necessary to set the Expiry for a request
Parameters
Section titled “Parameters”canisterIdOverride?
Section titled “canisterIdOverride?”Pass a canister ID if you need to sync the time with a particular subnet. Uses the ICP ledger canister by default.
Returns
Section titled “Returns”Promise<void>
syncTimeWithSubnet()
Section titled “syncTimeWithSubnet()”syncTimeWithSubnet(
subnetId):Promise<void>
Defined in: packages/core/src/agent/agent/http/index.ts:1461
Allows agent to sync its time with the network.
Parameters
Section titled “Parameters”subnetId
Section titled “subnetId”Pass the subnet ID you need to sync the time with.
Returns
Section titled “Returns”Promise<void>
update()
Section titled “update()”update(
canisterId,fields,pollingOptions?):Promise<UpdateResult>
Defined in: packages/core/src/agent/agent/http/index.ts:649
Executes an update call to a canister and returns the certified result.
Parameters
Section titled “Parameters”canisterId
Section titled “canisterId”string | Principal
The canister to call.
fields
Section titled “fields”The call options (method name, arg, effective canister ID, optional nonce).
pollingOptions?
Section titled “pollingOptions?”PollingOptions = {}
Optional polling configuration.
Returns
Section titled “Returns”Promise<UpdateResult>
The certified result including the certificate, reply bytes, and raw certificate bytes.
Implementation of
Section titled “Implementation of”create()
Section titled “create()”
staticcreate(options?):Promise<HttpAgent>
Defined in: packages/core/src/agent/agent/http/index.ts:414
Parameters
Section titled “Parameters”options?
Section titled “options?”HttpAgentOptions = {}
Returns
Section titled “Returns”Promise<HttpAgent>
createSync()
Section titled “createSync()”
staticcreateSync(options?):HttpAgent
Defined in: packages/core/src/agent/agent/http/index.ts:410
Parameters
Section titled “Parameters”options?
Section titled “options?”HttpAgentOptions = {}
Returns
Section titled “Returns”from()
Section titled “from()”
staticfrom(agent):Promise<HttpAgent>
Defined in: packages/core/src/agent/agent/http/index.ts:420
Parameters
Section titled “Parameters”V1HttpAgentInterface | Pick<HttpAgent, "config">
Returns
Section titled “Returns”Promise<HttpAgent>
HttpErrorCode
Section titled “HttpErrorCode”Defined in: packages/core/src/agent/errors.ts:814
Extends
Section titled “Extends”Constructors
Section titled “Constructors”Constructor
Section titled “Constructor”new HttpErrorCode(
status,statusText,headers,bodyText?):HttpErrorCode
Defined in: packages/core/src/agent/errors.ts:817
Parameters
Section titled “Parameters”status
Section titled “status”number
statusText
Section titled “statusText”string
headers
Section titled “headers”bodyText?
Section titled “bodyText?”string
Returns
Section titled “Returns”Overrides
Section titled “Overrides”Properties
Section titled “Properties”bodyText?
Section titled “bodyText?”
readonlyoptionalbodyText?:string
Defined in: packages/core/src/agent/errors.ts:821
callContext?
Section titled “callContext?”
optionalcallContext?:CallContext|PollingCallContext
Defined in: packages/core/src/agent/errors.ts:78
Inherited from
Section titled “Inherited from”headers
Section titled “headers”
readonlyheaders:HttpHeaderField[]
Defined in: packages/core/src/agent/errors.ts:820
isCertified
Section titled “isCertified”
readonlyisCertified:boolean=false
Defined in: packages/core/src/agent/errors.ts:80
Inherited from
Section titled “Inherited from”name:
string='HttpErrorCode'
Defined in: packages/core/src/agent/errors.ts:815
requestContext?
Section titled “requestContext?”
optionalrequestContext?:RequestContext
Defined in: packages/core/src/agent/errors.ts:77
Inherited from
Section titled “Inherited from”status
Section titled “status”
readonlystatus:number
Defined in: packages/core/src/agent/errors.ts:818
statusText
Section titled “statusText”
readonlystatusText:string
Defined in: packages/core/src/agent/errors.ts:819
verbosity
Section titled “verbosity”
staticverbosity:ErrorVerbosity=ErrorVerbosity.Normal
Defined in: packages/core/src/agent/errors.ts:75
Inherited from
Section titled “Inherited from”Methods
Section titled “Methods”toErrorMessage()
Section titled “toErrorMessage()”toErrorMessage():
string
Defined in: packages/core/src/agent/errors.ts:827
Returns
Section titled “Returns”string
Overrides
Section titled “Overrides”toString()
Section titled “toString()”toString():
string
Defined in: packages/core/src/agent/errors.ts:84
Returns
Section titled “Returns”string
Inherited from
Section titled “Inherited from”HttpFetchErrorCode
Section titled “HttpFetchErrorCode”Defined in: packages/core/src/agent/errors.ts:852
Extends
Section titled “Extends”Constructors
Section titled “Constructors”Constructor
Section titled “Constructor”new HttpFetchErrorCode(
error):HttpFetchErrorCode
Defined in: packages/core/src/agent/errors.ts:855
Parameters
Section titled “Parameters”unknown
Returns
Section titled “Returns”Overrides
Section titled “Overrides”Properties
Section titled “Properties”callContext?
Section titled “callContext?”
optionalcallContext?:CallContext|PollingCallContext
Defined in: packages/core/src/agent/errors.ts:78
Inherited from
Section titled “Inherited from”
readonlyerror:unknown
Defined in: packages/core/src/agent/errors.ts:855
isCertified
Section titled “isCertified”
readonlyisCertified:boolean=false
Defined in: packages/core/src/agent/errors.ts:80
Inherited from
Section titled “Inherited from”name:
string='HttpFetchErrorCode'
Defined in: packages/core/src/agent/errors.ts:853
requestContext?
Section titled “requestContext?”
optionalrequestContext?:RequestContext
Defined in: packages/core/src/agent/errors.ts:77
Inherited from
Section titled “Inherited from”verbosity
Section titled “verbosity”
staticverbosity:ErrorVerbosity=ErrorVerbosity.Normal
Defined in: packages/core/src/agent/errors.ts:75
Inherited from
Section titled “Inherited from”Methods
Section titled “Methods”toErrorMessage()
Section titled “toErrorMessage()”toErrorMessage():
string
Defined in: packages/core/src/agent/errors.ts:860
Returns
Section titled “Returns”string
Overrides
Section titled “Overrides”toString()
Section titled “toString()”toString():
string
Defined in: packages/core/src/agent/errors.ts:84
Returns
Section titled “Returns”string
Inherited from
Section titled “Inherited from”HttpV4ApiNotSupportedErrorCode
Section titled “HttpV4ApiNotSupportedErrorCode”Defined in: packages/core/src/agent/errors.ts:839
Extends
Section titled “Extends”Constructors
Section titled “Constructors”Constructor
Section titled “Constructor”new HttpV4ApiNotSupportedErrorCode():
HttpV4ApiNotSupportedErrorCode
Defined in: packages/core/src/agent/errors.ts:842
Returns
Section titled “Returns”HttpV4ApiNotSupportedErrorCode
Overrides
Section titled “Overrides”Properties
Section titled “Properties”callContext?
Section titled “callContext?”
optionalcallContext?:CallContext|PollingCallContext
Defined in: packages/core/src/agent/errors.ts:78
Inherited from
Section titled “Inherited from”isCertified
Section titled “isCertified”
readonlyisCertified:boolean=false
Defined in: packages/core/src/agent/errors.ts:80
Inherited from
Section titled “Inherited from”name:
string='HttpV4ApiNotSupportedErrorCode'
Defined in: packages/core/src/agent/errors.ts:840
requestContext?
Section titled “requestContext?”
optionalrequestContext?:RequestContext
Defined in: packages/core/src/agent/errors.ts:77
Inherited from
Section titled “Inherited from”verbosity
Section titled “verbosity”
staticverbosity:ErrorVerbosity=ErrorVerbosity.Normal
Defined in: packages/core/src/agent/errors.ts:75
Inherited from
Section titled “Inherited from”Methods
Section titled “Methods”toErrorMessage()
Section titled “toErrorMessage()”toErrorMessage():
string
Defined in: packages/core/src/agent/errors.ts:847
Returns
Section titled “Returns”string
Overrides
Section titled “Overrides”toString()
Section titled “toString()”toString():
string
Defined in: packages/core/src/agent/errors.ts:84
Returns
Section titled “Returns”string
Inherited from
Section titled “Inherited from”IdentityInvalidErrorCode
Section titled “IdentityInvalidErrorCode”Defined in: packages/core/src/agent/errors.ts:641
Extends
Section titled “Extends”Constructors
Section titled “Constructors”Constructor
Section titled “Constructor”new IdentityInvalidErrorCode():
IdentityInvalidErrorCode
Defined in: packages/core/src/agent/errors.ts:644
Returns
Section titled “Returns”Overrides
Section titled “Overrides”Properties
Section titled “Properties”callContext?
Section titled “callContext?”
optionalcallContext?:CallContext|PollingCallContext
Defined in: packages/core/src/agent/errors.ts:78
Inherited from
Section titled “Inherited from”isCertified
Section titled “isCertified”
readonlyisCertified:boolean=false
Defined in: packages/core/src/agent/errors.ts:80
Inherited from
Section titled “Inherited from”name:
string='IdentityInvalidErrorCode'
Defined in: packages/core/src/agent/errors.ts:642
requestContext?
Section titled “requestContext?”
optionalrequestContext?:RequestContext
Defined in: packages/core/src/agent/errors.ts:77
Inherited from
Section titled “Inherited from”verbosity
Section titled “verbosity”
staticverbosity:ErrorVerbosity=ErrorVerbosity.Normal
Defined in: packages/core/src/agent/errors.ts:75
Inherited from
Section titled “Inherited from”Methods
Section titled “Methods”toErrorMessage()
Section titled “toErrorMessage()”toErrorMessage():
string
Defined in: packages/core/src/agent/errors.ts:649
Returns
Section titled “Returns”string
Overrides
Section titled “Overrides”toString()
Section titled “toString()”toString():
string
Defined in: packages/core/src/agent/errors.ts:84
Returns
Section titled “Returns”string
Inherited from
Section titled “Inherited from”IngressExpiryInvalidErrorCode
Section titled “IngressExpiryInvalidErrorCode”Defined in: packages/core/src/agent/errors.ts:654
Extends
Section titled “Extends”Constructors
Section titled “Constructors”Constructor
Section titled “Constructor”new IngressExpiryInvalidErrorCode(
message,providedIngressExpiryInMinutes):IngressExpiryInvalidErrorCode
Defined in: packages/core/src/agent/errors.ts:657
Parameters
Section titled “Parameters”message
Section titled “message”string
providedIngressExpiryInMinutes
Section titled “providedIngressExpiryInMinutes”number
Returns
Section titled “Returns”Overrides
Section titled “Overrides”Properties
Section titled “Properties”callContext?
Section titled “callContext?”
optionalcallContext?:CallContext|PollingCallContext
Defined in: packages/core/src/agent/errors.ts:78
Inherited from
Section titled “Inherited from”isCertified
Section titled “isCertified”
readonlyisCertified:boolean=false
Defined in: packages/core/src/agent/errors.ts:80
Inherited from
Section titled “Inherited from”message
Section titled “message”
readonlymessage:string
Defined in: packages/core/src/agent/errors.ts:658
name:
string='IngressExpiryInvalidErrorCode'
Defined in: packages/core/src/agent/errors.ts:655
providedIngressExpiryInMinutes
Section titled “providedIngressExpiryInMinutes”
readonlyprovidedIngressExpiryInMinutes:number
Defined in: packages/core/src/agent/errors.ts:659
requestContext?
Section titled “requestContext?”
optionalrequestContext?:RequestContext
Defined in: packages/core/src/agent/errors.ts:77
Inherited from
Section titled “Inherited from”verbosity
Section titled “verbosity”
staticverbosity:ErrorVerbosity=ErrorVerbosity.Normal
Defined in: packages/core/src/agent/errors.ts:75
Inherited from
Section titled “Inherited from”Methods
Section titled “Methods”toErrorMessage()
Section titled “toErrorMessage()”toErrorMessage():
string
Defined in: packages/core/src/agent/errors.ts:665
Returns
Section titled “Returns”string
Overrides
Section titled “Overrides”toString()
Section titled “toString()”toString():
string
Defined in: packages/core/src/agent/errors.ts:84
Returns
Section titled “Returns”string
Inherited from
Section titled “Inherited from”InputError
Section titled “InputError”Defined in: packages/core/src/agent/errors.ts:218
Extends
Section titled “Extends”ErrorKind
Constructors
Section titled “Constructors”Constructor
Section titled “Constructor”new InputError(
code):InputError
Defined in: packages/core/src/agent/errors.ts:221
Parameters
Section titled “Parameters”Returns
Section titled “Returns”Overrides
Section titled “Overrides”ErrorKind.constructor
Properties
Section titled “Properties”
readonlycause:object
Defined in: packages/core/src/agent/errors.ts:116
code:
ErrorCode
kind:
ErrorKindEnum
Inherited from
Section titled “Inherited from”ErrorKind.cause
message
Section titled “message”message:
string
Defined in: node_modules/.pnpm/typescript@5.9.3/node_modules/typescript/lib/lib.es5.d.ts:1077
Inherited from
Section titled “Inherited from”ErrorKind.message
name:
string='InputError'
Defined in: packages/core/src/agent/errors.ts:219
Overrides
Section titled “Overrides”ErrorKind.name
stack?
Section titled “stack?”
optionalstack?:string
Defined in: node_modules/.pnpm/typescript@5.9.3/node_modules/typescript/lib/lib.es5.d.ts:1078
Inherited from
Section titled “Inherited from”ErrorKind.stack
stackTraceLimit
Section titled “stackTraceLimit”
staticstackTraceLimit: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.
Inherited from
Section titled “Inherited from”ErrorKind.stackTraceLimit
Accessors
Section titled “Accessors”Get Signature
Section titled “Get Signature”get code():
ErrorCode
Defined in: packages/core/src/agent/errors.ts:118
Returns
Section titled “Returns”Set Signature
Section titled “Set Signature”set code(
code):void
Defined in: packages/core/src/agent/errors.ts:121
Parameters
Section titled “Parameters”Returns
Section titled “Returns”void
Inherited from
Section titled “Inherited from”ErrorKind.code
isCertified
Section titled “isCertified”Get Signature
Section titled “Get Signature”get isCertified():
boolean
Defined in: packages/core/src/agent/errors.ts:136
Reads the isCertified property of the underlying error code.
Returns
Section titled “Returns”boolean
true if the error is certified, false otherwise.
Inherited from
Section titled “Inherited from”ErrorKind.isCertified
Get Signature
Section titled “Get Signature”get kind():
ErrorKindEnum
Defined in: packages/core/src/agent/errors.ts:125
Returns
Section titled “Returns”Set Signature
Section titled “Set Signature”set kind(
kind):void
Defined in: packages/core/src/agent/errors.ts:128
Parameters
Section titled “Parameters”Returns
Section titled “Returns”void
Inherited from
Section titled “Inherited from”ErrorKind.kind
Methods
Section titled “Methods”hasCode()
Section titled “hasCode()”hasCode<
C>(code):boolean
Defined in: packages/core/src/agent/errors.ts:146
Type Parameters
Section titled “Type Parameters”C extends ErrorCode
Parameters
Section titled “Parameters”(…args) => C
Returns
Section titled “Returns”boolean
Inherited from
Section titled “Inherited from”ErrorKind.hasCode
toString()
Section titled “toString()”toString():
string
Defined in: packages/core/src/agent/errors.ts:150
Returns a string representation of an object.
Returns
Section titled “Returns”string
Inherited from
Section titled “Inherited from”ErrorKind.toString
captureStackTrace()
Section titled “captureStackTrace()”
staticcaptureStackTrace(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();Parameters
Section titled “Parameters”targetObject
Section titled “targetObject”object
constructorOpt?
Section titled “constructorOpt?”Function
Returns
Section titled “Returns”void
Inherited from
Section titled “Inherited from”ErrorKind.captureStackTrace
fromCode()
Section titled “fromCode()”
staticfromCode<C,E>(this,code):E
Defined in: packages/core/src/agent/errors.ts:156
Type Parameters
Section titled “Type Parameters”C extends ErrorCode
E extends ErrorKind
Parameters
Section titled “Parameters”(code) => E
C
Returns
Section titled “Returns”E
Inherited from
Section titled “Inherited from”ErrorKind.fromCode
prepareStackTrace()
Section titled “prepareStackTrace()”
staticprepareStackTrace(err,stackTraces):any
Defined in: node_modules/.pnpm/@types+node@25.5.0/node_modules/@types/node/globals.d.ts:55
Parameters
Section titled “Parameters”Error
stackTraces
Section titled “stackTraces”CallSite[]
Returns
Section titled “Returns”any
https://v8.dev/docs/stack-trace-api#customizing-stack-traces
Inherited from
Section titled “Inherited from”ErrorKind.prepareStackTrace
InvalidReadStateRequestErrorCode
Section titled “InvalidReadStateRequestErrorCode”Defined in: packages/core/src/agent/errors.ts:878
Extends
Section titled “Extends”Constructors
Section titled “Constructors”Constructor
Section titled “Constructor”new InvalidReadStateRequestErrorCode(
request):InvalidReadStateRequestErrorCode
Defined in: packages/core/src/agent/errors.ts:881
Parameters
Section titled “Parameters”request
Section titled “request”unknown
Returns
Section titled “Returns”InvalidReadStateRequestErrorCode
Overrides
Section titled “Overrides”Properties
Section titled “Properties”callContext?
Section titled “callContext?”
optionalcallContext?:CallContext|PollingCallContext
Defined in: packages/core/src/agent/errors.ts:78
Inherited from
Section titled “Inherited from”isCertified
Section titled “isCertified”
readonlyisCertified:boolean=false
Defined in: packages/core/src/agent/errors.ts:80
Inherited from
Section titled “Inherited from”name:
string='InvalidReadStateRequestErrorCode'
Defined in: packages/core/src/agent/errors.ts:879
request
Section titled “request”
readonlyrequest:unknown
Defined in: packages/core/src/agent/errors.ts:881
requestContext?
Section titled “requestContext?”
optionalrequestContext?:RequestContext
Defined in: packages/core/src/agent/errors.ts:77
Inherited from
Section titled “Inherited from”verbosity
Section titled “verbosity”
staticverbosity:ErrorVerbosity=ErrorVerbosity.Normal
Defined in: packages/core/src/agent/errors.ts:75
Inherited from
Section titled “Inherited from”Methods
Section titled “Methods”toErrorMessage()
Section titled “toErrorMessage()”toErrorMessage():
string
Defined in: packages/core/src/agent/errors.ts:886
Returns
Section titled “Returns”string
Overrides
Section titled “Overrides”toString()
Section titled “toString()”toString():
string
Defined in: packages/core/src/agent/errors.ts:84
Returns
Section titled “Returns”string
Inherited from
Section titled “Inherited from”InvalidRootKeyErrorCode
Section titled “InvalidRootKeyErrorCode”Defined in: packages/core/src/agent/errors.ts:904
Extends
Section titled “Extends”Constructors
Section titled “Constructors”Constructor
Section titled “Constructor”new InvalidRootKeyErrorCode(
rootKey,expectedLength):InvalidRootKeyErrorCode
Defined in: packages/core/src/agent/errors.ts:907
Parameters
Section titled “Parameters”rootKey
Section titled “rootKey”Uint8Array
expectedLength
Section titled “expectedLength”number
Returns
Section titled “Returns”Overrides
Section titled “Overrides”Properties
Section titled “Properties”callContext?
Section titled “callContext?”
optionalcallContext?:CallContext|PollingCallContext
Defined in: packages/core/src/agent/errors.ts:78
Inherited from
Section titled “Inherited from”expectedLength
Section titled “expectedLength”
readonlyexpectedLength:number
Defined in: packages/core/src/agent/errors.ts:909
isCertified
Section titled “isCertified”
readonlyisCertified:boolean=false
Defined in: packages/core/src/agent/errors.ts:80
Inherited from
Section titled “Inherited from”name:
string='InvalidRootKeyErrorCode'
Defined in: packages/core/src/agent/errors.ts:905
requestContext?
Section titled “requestContext?”
optionalrequestContext?:RequestContext
Defined in: packages/core/src/agent/errors.ts:77
Inherited from
Section titled “Inherited from”rootKey
Section titled “rootKey”
readonlyrootKey:Uint8Array
Defined in: packages/core/src/agent/errors.ts:908
verbosity
Section titled “verbosity”
staticverbosity:ErrorVerbosity=ErrorVerbosity.Normal
Defined in: packages/core/src/agent/errors.ts:75
Inherited from
Section titled “Inherited from”Methods
Section titled “Methods”toErrorMessage()
Section titled “toErrorMessage()”toErrorMessage():
string
Defined in: packages/core/src/agent/errors.ts:915
Returns
Section titled “Returns”string
Overrides
Section titled “Overrides”toString()
Section titled “toString()”toString():
string
Defined in: packages/core/src/agent/errors.ts:84
Returns
Section titled “Returns”string
Inherited from
Section titled “Inherited from”LimitError
Section titled “LimitError”Defined in: packages/core/src/agent/errors.ts:209
Extends
Section titled “Extends”ErrorKind
Constructors
Section titled “Constructors”Constructor
Section titled “Constructor”new LimitError(
code):LimitError
Defined in: packages/core/src/agent/errors.ts:212
Parameters
Section titled “Parameters”Returns
Section titled “Returns”Overrides
Section titled “Overrides”ErrorKind.constructor
Properties
Section titled “Properties”
readonlycause:object
Defined in: packages/core/src/agent/errors.ts:116
code:
ErrorCode
kind:
ErrorKindEnum
Inherited from
Section titled “Inherited from”ErrorKind.cause
message
Section titled “message”message:
string
Defined in: node_modules/.pnpm/typescript@5.9.3/node_modules/typescript/lib/lib.es5.d.ts:1077
Inherited from
Section titled “Inherited from”ErrorKind.message
name:
string='LimitError'
Defined in: packages/core/src/agent/errors.ts:210
Overrides
Section titled “Overrides”ErrorKind.name
stack?
Section titled “stack?”
optionalstack?:string
Defined in: node_modules/.pnpm/typescript@5.9.3/node_modules/typescript/lib/lib.es5.d.ts:1078
Inherited from
Section titled “Inherited from”ErrorKind.stack
stackTraceLimit
Section titled “stackTraceLimit”
staticstackTraceLimit: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.
Inherited from
Section titled “Inherited from”ErrorKind.stackTraceLimit
Accessors
Section titled “Accessors”Get Signature
Section titled “Get Signature”get code():
ErrorCode
Defined in: packages/core/src/agent/errors.ts:118
Returns
Section titled “Returns”Set Signature
Section titled “Set Signature”set code(
code):void
Defined in: packages/core/src/agent/errors.ts:121
Parameters
Section titled “Parameters”Returns
Section titled “Returns”void
Inherited from
Section titled “Inherited from”ErrorKind.code
isCertified
Section titled “isCertified”Get Signature
Section titled “Get Signature”get isCertified():
boolean
Defined in: packages/core/src/agent/errors.ts:136
Reads the isCertified property of the underlying error code.
Returns
Section titled “Returns”boolean
true if the error is certified, false otherwise.
Inherited from
Section titled “Inherited from”ErrorKind.isCertified
Get Signature
Section titled “Get Signature”get kind():
ErrorKindEnum
Defined in: packages/core/src/agent/errors.ts:125
Returns
Section titled “Returns”Set Signature
Section titled “Set Signature”set kind(
kind):void
Defined in: packages/core/src/agent/errors.ts:128
Parameters
Section titled “Parameters”Returns
Section titled “Returns”void
Inherited from
Section titled “Inherited from”ErrorKind.kind
Methods
Section titled “Methods”hasCode()
Section titled “hasCode()”hasCode<
C>(code):boolean
Defined in: packages/core/src/agent/errors.ts:146
Type Parameters
Section titled “Type Parameters”C extends ErrorCode
Parameters
Section titled “Parameters”(…args) => C
Returns
Section titled “Returns”boolean
Inherited from
Section titled “Inherited from”ErrorKind.hasCode
toString()
Section titled “toString()”toString():
string
Defined in: packages/core/src/agent/errors.ts:150
Returns a string representation of an object.
Returns
Section titled “Returns”string
Inherited from
Section titled “Inherited from”ErrorKind.toString
captureStackTrace()
Section titled “captureStackTrace()”
staticcaptureStackTrace(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();Parameters
Section titled “Parameters”targetObject
Section titled “targetObject”object
constructorOpt?
Section titled “constructorOpt?”Function
Returns
Section titled “Returns”void
Inherited from
Section titled “Inherited from”ErrorKind.captureStackTrace
fromCode()
Section titled “fromCode()”
staticfromCode<C,E>(this,code):E
Defined in: packages/core/src/agent/errors.ts:156
Type Parameters
Section titled “Type Parameters”C extends ErrorCode
E extends ErrorKind
Parameters
Section titled “Parameters”(code) => E
C
Returns
Section titled “Returns”E
Inherited from
Section titled “Inherited from”ErrorKind.fromCode
prepareStackTrace()
Section titled “prepareStackTrace()”
staticprepareStackTrace(err,stackTraces):any
Defined in: node_modules/.pnpm/@types+node@25.5.0/node_modules/@types/node/globals.d.ts:55
Parameters
Section titled “Parameters”Error
stackTraces
Section titled “stackTraces”CallSite[]
Returns
Section titled “Returns”any
https://v8.dev/docs/stack-trace-api#customizing-stack-traces
Inherited from
Section titled “Inherited from”ErrorKind.prepareStackTrace
LookupErrorCode
Section titled “LookupErrorCode”Defined in: packages/core/src/agent/errors.ts:317
Extends
Section titled “Extends”Constructors
Section titled “Constructors”Constructor
Section titled “Constructor”new LookupErrorCode(
message,lookupStatus):LookupErrorCode
Defined in: packages/core/src/agent/errors.ts:320
Parameters
Section titled “Parameters”message
Section titled “message”string
lookupStatus
Section titled “lookupStatus”LookupSubtreeStatus | LookupPathStatus
Returns
Section titled “Returns”Overrides
Section titled “Overrides”Properties
Section titled “Properties”callContext?
Section titled “callContext?”
optionalcallContext?:CallContext|PollingCallContext
Defined in: packages/core/src/agent/errors.ts:78
Inherited from
Section titled “Inherited from”isCertified
Section titled “isCertified”
readonlyisCertified:boolean=false
Defined in: packages/core/src/agent/errors.ts:80
Inherited from
Section titled “Inherited from”lookupStatus
Section titled “lookupStatus”
readonlylookupStatus:LookupSubtreeStatus|LookupPathStatus
Defined in: packages/core/src/agent/errors.ts:322
message
Section titled “message”
readonlymessage:string
Defined in: packages/core/src/agent/errors.ts:321
name:
string='LookupErrorCode'
Defined in: packages/core/src/agent/errors.ts:318
requestContext?
Section titled “requestContext?”
optionalrequestContext?:RequestContext
Defined in: packages/core/src/agent/errors.ts:77
Inherited from
Section titled “Inherited from”verbosity
Section titled “verbosity”
staticverbosity:ErrorVerbosity=ErrorVerbosity.Normal
Defined in: packages/core/src/agent/errors.ts:75
Inherited from
Section titled “Inherited from”Methods
Section titled “Methods”toErrorMessage()
Section titled “toErrorMessage()”toErrorMessage():
string
Defined in: packages/core/src/agent/errors.ts:328
Returns
Section titled “Returns”string
Overrides
Section titled “Overrides”toString()
Section titled “toString()”toString():
string
Defined in: packages/core/src/agent/errors.ts:84
Returns
Section titled “Returns”string
Inherited from
Section titled “Inherited from”MalformedLookupFoundValueErrorCode
Section titled “MalformedLookupFoundValueErrorCode”Defined in: packages/core/src/agent/errors.ts:333
Extends
Section titled “Extends”Constructors
Section titled “Constructors”Constructor
Section titled “Constructor”new MalformedLookupFoundValueErrorCode(
message):MalformedLookupFoundValueErrorCode
Defined in: packages/core/src/agent/errors.ts:336
Parameters
Section titled “Parameters”message
Section titled “message”string
Returns
Section titled “Returns”MalformedLookupFoundValueErrorCode
Overrides
Section titled “Overrides”Properties
Section titled “Properties”callContext?
Section titled “callContext?”
optionalcallContext?:CallContext|PollingCallContext
Defined in: packages/core/src/agent/errors.ts:78
Inherited from
Section titled “Inherited from”isCertified
Section titled “isCertified”
readonlyisCertified:boolean=false
Defined in: packages/core/src/agent/errors.ts:80
Inherited from
Section titled “Inherited from”message
Section titled “message”
readonlymessage:string
Defined in: packages/core/src/agent/errors.ts:336
name:
string='MalformedLookupFoundValueErrorCode'
Defined in: packages/core/src/agent/errors.ts:334
requestContext?
Section titled “requestContext?”
optionalrequestContext?:RequestContext
Defined in: packages/core/src/agent/errors.ts:77
Inherited from
Section titled “Inherited from”verbosity
Section titled “verbosity”
staticverbosity:ErrorVerbosity=ErrorVerbosity.Normal
Defined in: packages/core/src/agent/errors.ts:75
Inherited from
Section titled “Inherited from”Methods
Section titled “Methods”toErrorMessage()
Section titled “toErrorMessage()”toErrorMessage():
string
Defined in: packages/core/src/agent/errors.ts:341
Returns
Section titled “Returns”string
Overrides
Section titled “Overrides”toString()
Section titled “toString()”toString():
string
Defined in: packages/core/src/agent/errors.ts:84
Returns
Section titled “Returns”string
Inherited from
Section titled “Inherited from”MalformedPublicKeyErrorCode
Section titled “MalformedPublicKeyErrorCode”Defined in: packages/core/src/agent/errors.ts:738
Extends
Section titled “Extends”Constructors
Section titled “Constructors”Constructor
Section titled “Constructor”new MalformedPublicKeyErrorCode():
MalformedPublicKeyErrorCode
Defined in: packages/core/src/agent/errors.ts:741
Returns
Section titled “Returns”Overrides
Section titled “Overrides”Properties
Section titled “Properties”callContext?
Section titled “callContext?”
optionalcallContext?:CallContext|PollingCallContext
Defined in: packages/core/src/agent/errors.ts:78
Inherited from
Section titled “Inherited from”isCertified
Section titled “isCertified”
readonlyisCertified:boolean=false
Defined in: packages/core/src/agent/errors.ts:80
Inherited from
Section titled “Inherited from”name:
string='MalformedPublicKeyErrorCode'
Defined in: packages/core/src/agent/errors.ts:739
requestContext?
Section titled “requestContext?”
optionalrequestContext?:RequestContext
Defined in: packages/core/src/agent/errors.ts:77
Inherited from
Section titled “Inherited from”verbosity
Section titled “verbosity”
staticverbosity:ErrorVerbosity=ErrorVerbosity.Normal
Defined in: packages/core/src/agent/errors.ts:75
Inherited from
Section titled “Inherited from”Methods
Section titled “Methods”toErrorMessage()
Section titled “toErrorMessage()”toErrorMessage():
string
Defined in: packages/core/src/agent/errors.ts:746
Returns
Section titled “Returns”string
Overrides
Section titled “Overrides”toString()
Section titled “toString()”toString():
string
Defined in: packages/core/src/agent/errors.ts:84
Returns
Section titled “Returns”string
Inherited from
Section titled “Inherited from”MalformedSignatureErrorCode
Section titled “MalformedSignatureErrorCode”Defined in: packages/core/src/agent/errors.ts:712
Extends
Section titled “Extends”Constructors
Section titled “Constructors”Constructor
Section titled “Constructor”new MalformedSignatureErrorCode(
error):MalformedSignatureErrorCode
Defined in: packages/core/src/agent/errors.ts:715
Parameters
Section titled “Parameters”string
Returns
Section titled “Returns”Overrides
Section titled “Overrides”Properties
Section titled “Properties”callContext?
Section titled “callContext?”
optionalcallContext?:CallContext|PollingCallContext
Defined in: packages/core/src/agent/errors.ts:78
Inherited from
Section titled “Inherited from”
readonlyerror:string
Defined in: packages/core/src/agent/errors.ts:715
isCertified
Section titled “isCertified”
readonlyisCertified:boolean=false
Defined in: packages/core/src/agent/errors.ts:80
Inherited from
Section titled “Inherited from”name:
string='MalformedSignatureErrorCode'
Defined in: packages/core/src/agent/errors.ts:713
requestContext?
Section titled “requestContext?”
optionalrequestContext?:RequestContext
Defined in: packages/core/src/agent/errors.ts:77
Inherited from
Section titled “Inherited from”verbosity
Section titled “verbosity”
staticverbosity:ErrorVerbosity=ErrorVerbosity.Normal
Defined in: packages/core/src/agent/errors.ts:75
Inherited from
Section titled “Inherited from”Methods
Section titled “Methods”toErrorMessage()
Section titled “toErrorMessage()”toErrorMessage():
string
Defined in: packages/core/src/agent/errors.ts:720
Returns
Section titled “Returns”string
Overrides
Section titled “Overrides”toString()
Section titled “toString()”toString():
string
Defined in: packages/core/src/agent/errors.ts:84
Returns
Section titled “Returns”string
Inherited from
Section titled “Inherited from”MissingCanisterIdErrorCode
Section titled “MissingCanisterIdErrorCode”Defined in: packages/core/src/agent/errors.ts:865
Extends
Section titled “Extends”Constructors
Section titled “Constructors”Constructor
Section titled “Constructor”new MissingCanisterIdErrorCode(
receivedCanisterId):MissingCanisterIdErrorCode
Defined in: packages/core/src/agent/errors.ts:868
Parameters
Section titled “Parameters”receivedCanisterId
Section titled “receivedCanisterId”unknown
Returns
Section titled “Returns”Overrides
Section titled “Overrides”Properties
Section titled “Properties”callContext?
Section titled “callContext?”
optionalcallContext?:CallContext|PollingCallContext
Defined in: packages/core/src/agent/errors.ts:78
Inherited from
Section titled “Inherited from”isCertified
Section titled “isCertified”
readonlyisCertified:boolean=false
Defined in: packages/core/src/agent/errors.ts:80
Inherited from
Section titled “Inherited from”name:
string='MissingCanisterIdErrorCode'
Defined in: packages/core/src/agent/errors.ts:866
receivedCanisterId
Section titled “receivedCanisterId”
readonlyreceivedCanisterId:unknown
Defined in: packages/core/src/agent/errors.ts:868
requestContext?
Section titled “requestContext?”
optionalrequestContext?:RequestContext
Defined in: packages/core/src/agent/errors.ts:77
Inherited from
Section titled “Inherited from”verbosity
Section titled “verbosity”
staticverbosity:ErrorVerbosity=ErrorVerbosity.Normal
Defined in: packages/core/src/agent/errors.ts:75
Inherited from
Section titled “Inherited from”Methods
Section titled “Methods”toErrorMessage()
Section titled “toErrorMessage()”toErrorMessage():
string
Defined in: packages/core/src/agent/errors.ts:873
Returns
Section titled “Returns”string
Overrides
Section titled “Overrides”toString()
Section titled “toString()”toString():
string
Defined in: packages/core/src/agent/errors.ts:84
Returns
Section titled “Returns”string
Inherited from
Section titled “Inherited from”MissingCookieErrorCode
Section titled “MissingCookieErrorCode”Defined in: packages/core/src/agent/errors.ts:920
Extends
Section titled “Extends”Constructors
Section titled “Constructors”Constructor
Section titled “Constructor”new MissingCookieErrorCode(
expectedCookieName):MissingCookieErrorCode
Defined in: packages/core/src/agent/errors.ts:923
Parameters
Section titled “Parameters”expectedCookieName
Section titled “expectedCookieName”string
Returns
Section titled “Returns”Overrides
Section titled “Overrides”Properties
Section titled “Properties”callContext?
Section titled “callContext?”
optionalcallContext?:CallContext|PollingCallContext
Defined in: packages/core/src/agent/errors.ts:78
Inherited from
Section titled “Inherited from”expectedCookieName
Section titled “expectedCookieName”
readonlyexpectedCookieName:string
Defined in: packages/core/src/agent/errors.ts:923
isCertified
Section titled “isCertified”
readonlyisCertified:boolean=false
Defined in: packages/core/src/agent/errors.ts:80
Inherited from
Section titled “Inherited from”name:
string='MissingCookieErrorCode'
Defined in: packages/core/src/agent/errors.ts:921
requestContext?
Section titled “requestContext?”
optionalrequestContext?:RequestContext
Defined in: packages/core/src/agent/errors.ts:77
Inherited from
Section titled “Inherited from”verbosity
Section titled “verbosity”
staticverbosity:ErrorVerbosity=ErrorVerbosity.Normal
Defined in: packages/core/src/agent/errors.ts:75
Inherited from
Section titled “Inherited from”Methods
Section titled “Methods”toErrorMessage()
Section titled “toErrorMessage()”toErrorMessage():
string
Defined in: packages/core/src/agent/errors.ts:928
Returns
Section titled “Returns”string
Overrides
Section titled “Overrides”toString()
Section titled “toString()”toString():
string
Defined in: packages/core/src/agent/errors.ts:84
Returns
Section titled “Returns”string
Inherited from
Section titled “Inherited from”MissingFetchErrorCode
Section titled “MissingFetchErrorCode”Defined in: packages/core/src/agent/errors.ts:670
Extends
Section titled “Extends”Constructors
Section titled “Constructors”Constructor
Section titled “Constructor”new MissingFetchErrorCode():
MissingFetchErrorCode
Defined in: packages/core/src/agent/errors.ts:673
Returns
Section titled “Returns”Overrides
Section titled “Overrides”Properties
Section titled “Properties”callContext?
Section titled “callContext?”
optionalcallContext?:CallContext|PollingCallContext
Defined in: packages/core/src/agent/errors.ts:78
Inherited from
Section titled “Inherited from”isCertified
Section titled “isCertified”
readonlyisCertified:boolean=false
Defined in: packages/core/src/agent/errors.ts:80
Inherited from
Section titled “Inherited from”name:
string='MissingFetchErrorCode'
Defined in: packages/core/src/agent/errors.ts:671
requestContext?
Section titled “requestContext?”
optionalrequestContext?:RequestContext
Defined in: packages/core/src/agent/errors.ts:77
Inherited from
Section titled “Inherited from”verbosity
Section titled “verbosity”
staticverbosity:ErrorVerbosity=ErrorVerbosity.Normal
Defined in: packages/core/src/agent/errors.ts:75
Inherited from
Section titled “Inherited from”Methods
Section titled “Methods”toErrorMessage()
Section titled “toErrorMessage()”toErrorMessage():
string
Defined in: packages/core/src/agent/errors.ts:678
Returns
Section titled “Returns”string
Overrides
Section titled “Overrides”toString()
Section titled “toString()”toString():
string
Defined in: packages/core/src/agent/errors.ts:84
Returns
Section titled “Returns”string
Inherited from
Section titled “Inherited from”MissingLookupValueErrorCode
Section titled “MissingLookupValueErrorCode”Defined in: packages/core/src/agent/errors.ts:346
Extends
Section titled “Extends”Constructors
Section titled “Constructors”Constructor
Section titled “Constructor”new MissingLookupValueErrorCode(
message):MissingLookupValueErrorCode
Defined in: packages/core/src/agent/errors.ts:349
Parameters
Section titled “Parameters”message
Section titled “message”string
Returns
Section titled “Returns”Overrides
Section titled “Overrides”Properties
Section titled “Properties”callContext?
Section titled “callContext?”
optionalcallContext?:CallContext|PollingCallContext
Defined in: packages/core/src/agent/errors.ts:78
Inherited from
Section titled “Inherited from”isCertified
Section titled “isCertified”
readonlyisCertified:boolean=false
Defined in: packages/core/src/agent/errors.ts:80
Inherited from
Section titled “Inherited from”message
Section titled “message”
readonlymessage:string
Defined in: packages/core/src/agent/errors.ts:349
name:
string='MissingLookupValueErrorCode'
Defined in: packages/core/src/agent/errors.ts:347
requestContext?
Section titled “requestContext?”
optionalrequestContext?:RequestContext
Defined in: packages/core/src/agent/errors.ts:77
Inherited from
Section titled “Inherited from”verbosity
Section titled “verbosity”
staticverbosity:ErrorVerbosity=ErrorVerbosity.Normal
Defined in: packages/core/src/agent/errors.ts:75
Inherited from
Section titled “Inherited from”Methods
Section titled “Methods”toErrorMessage()
Section titled “toErrorMessage()”toErrorMessage():
string
Defined in: packages/core/src/agent/errors.ts:354
Returns
Section titled “Returns”string
Overrides
Section titled “Overrides”toString()
Section titled “toString()”toString():
string
Defined in: packages/core/src/agent/errors.ts:84
Returns
Section titled “Returns”string
Inherited from
Section titled “Inherited from”MissingRootKeyErrorCode
Section titled “MissingRootKeyErrorCode”Defined in: packages/core/src/agent/errors.ts:612
Extends
Section titled “Extends”Constructors
Section titled “Constructors”Constructor
Section titled “Constructor”new MissingRootKeyErrorCode(
shouldFetchRootKey?):MissingRootKeyErrorCode
Defined in: packages/core/src/agent/errors.ts:615
Parameters
Section titled “Parameters”shouldFetchRootKey?
Section titled “shouldFetchRootKey?”boolean
Returns
Section titled “Returns”Overrides
Section titled “Overrides”Properties
Section titled “Properties”callContext?
Section titled “callContext?”
optionalcallContext?:CallContext|PollingCallContext
Defined in: packages/core/src/agent/errors.ts:78
Inherited from
Section titled “Inherited from”isCertified
Section titled “isCertified”
readonlyisCertified:boolean=false
Defined in: packages/core/src/agent/errors.ts:80
Inherited from
Section titled “Inherited from”name:
string='MissingRootKeyErrorCode'
Defined in: packages/core/src/agent/errors.ts:613
requestContext?
Section titled “requestContext?”
optionalrequestContext?:RequestContext
Defined in: packages/core/src/agent/errors.ts:77
Inherited from
Section titled “Inherited from”shouldFetchRootKey?
Section titled “shouldFetchRootKey?”
readonlyoptionalshouldFetchRootKey?:boolean
Defined in: packages/core/src/agent/errors.ts:615
verbosity
Section titled “verbosity”
staticverbosity:ErrorVerbosity=ErrorVerbosity.Normal
Defined in: packages/core/src/agent/errors.ts:75
Inherited from
Section titled “Inherited from”Methods
Section titled “Methods”toErrorMessage()
Section titled “toErrorMessage()”toErrorMessage():
string
Defined in: packages/core/src/agent/errors.ts:620
Returns
Section titled “Returns”string
Overrides
Section titled “Overrides”toString()
Section titled “toString()”toString():
string
Defined in: packages/core/src/agent/errors.ts:84
Returns
Section titled “Returns”string
Inherited from
Section titled “Inherited from”MissingSignatureErrorCode
Section titled “MissingSignatureErrorCode”Defined in: packages/core/src/agent/errors.ts:725
Extends
Section titled “Extends”Constructors
Section titled “Constructors”Constructor
Section titled “Constructor”new MissingSignatureErrorCode():
MissingSignatureErrorCode
Defined in: packages/core/src/agent/errors.ts:728
Returns
Section titled “Returns”Overrides
Section titled “Overrides”Properties
Section titled “Properties”callContext?
Section titled “callContext?”
optionalcallContext?:CallContext|PollingCallContext
Defined in: packages/core/src/agent/errors.ts:78
Inherited from
Section titled “Inherited from”isCertified
Section titled “isCertified”
readonlyisCertified:boolean=false
Defined in: packages/core/src/agent/errors.ts:80
Inherited from
Section titled “Inherited from”name:
string='MissingSignatureErrorCode'
Defined in: packages/core/src/agent/errors.ts:726
requestContext?
Section titled “requestContext?”
optionalrequestContext?:RequestContext
Defined in: packages/core/src/agent/errors.ts:77
Inherited from
Section titled “Inherited from”verbosity
Section titled “verbosity”
staticverbosity:ErrorVerbosity=ErrorVerbosity.Normal
Defined in: packages/core/src/agent/errors.ts:75
Inherited from
Section titled “Inherited from”Methods
Section titled “Methods”toErrorMessage()
Section titled “toErrorMessage()”toErrorMessage():
string
Defined in: packages/core/src/agent/errors.ts:733
Returns
Section titled “Returns”string
Overrides
Section titled “Overrides”toString()
Section titled “toString()”toString():
string
Defined in: packages/core/src/agent/errors.ts:84
Returns
Section titled “Returns”string
Inherited from
Section titled “Inherited from”Observable
Section titled “Observable”Defined in: packages/core/src/agent/observable.ts:5
Extended by
Section titled “Extended by”Type Parameters
Section titled “Type Parameters”T
Constructors
Section titled “Constructors”Constructor
Section titled “Constructor”new Observable<
T>():Observable<T>
Defined in: packages/core/src/agent/observable.ts:8
Returns
Section titled “Returns”Observable<T>
Properties
Section titled “Properties”observers
Section titled “observers”observers:
ObserveFunction<T>[]
Defined in: packages/core/src/agent/observable.ts:6
Methods
Section titled “Methods”notify()
Section titled “notify()”notify(
data, …rest):void
Defined in: packages/core/src/agent/observable.ts:20
Parameters
Section titled “Parameters”T
…unknown[]
Returns
Section titled “Returns”void
subscribe()
Section titled “subscribe()”subscribe(
func):void
Defined in: packages/core/src/agent/observable.ts:12
Parameters
Section titled “Parameters”Returns
Section titled “Returns”void
unsubscribe()
Section titled “unsubscribe()”unsubscribe(
func):void
Defined in: packages/core/src/agent/observable.ts:16
Parameters
Section titled “Parameters”Returns
Section titled “Returns”void
ObservableLog
Section titled “ObservableLog”Defined in: packages/core/src/agent/observable.ts:36
Extends
Section titled “Extends”Constructors
Section titled “Constructors”Constructor
Section titled “Constructor”new ObservableLog():
ObservableLog
Defined in: packages/core/src/agent/observable.ts:37
Returns
Section titled “Returns”Overrides
Section titled “Overrides”Properties
Section titled “Properties”observers
Section titled “observers”observers:
ObserveFunction<AgentLog>[]
Defined in: packages/core/src/agent/observable.ts:6
Inherited from
Section titled “Inherited from”Methods
Section titled “Methods”error()
Section titled “error()”error(
message,error, …rest):void
Defined in: packages/core/src/agent/observable.ts:46
Parameters
Section titled “Parameters”message
Section titled “message”string
…unknown[]
Returns
Section titled “Returns”void
notify()
Section titled “notify()”notify(
data, …rest):void
Defined in: packages/core/src/agent/observable.ts:20
Parameters
Section titled “Parameters”…unknown[]
Returns
Section titled “Returns”void
Inherited from
Section titled “Inherited from”print()
Section titled “print()”print(
message, …rest):void
Defined in: packages/core/src/agent/observable.ts:40
Parameters
Section titled “Parameters”message
Section titled “message”string
…unknown[]
Returns
Section titled “Returns”void
subscribe()
Section titled “subscribe()”subscribe(
func):void
Defined in: packages/core/src/agent/observable.ts:12
Parameters
Section titled “Parameters”Returns
Section titled “Returns”void
Inherited from
Section titled “Inherited from”unsubscribe()
Section titled “unsubscribe()”unsubscribe(
func):void
Defined in: packages/core/src/agent/observable.ts:16
Parameters
Section titled “Parameters”Returns
Section titled “Returns”void
Inherited from
Section titled “Inherited from”warn()
Section titled “warn()”warn(
message, …rest):void
Defined in: packages/core/src/agent/observable.ts:43
Parameters
Section titled “Parameters”message
Section titled “message”string
…unknown[]
Returns
Section titled “Returns”void
ProtocolError
Section titled “ProtocolError”Defined in: packages/core/src/agent/errors.ts:173
Extends
Section titled “Extends”ErrorKind
Constructors
Section titled “Constructors”Constructor
Section titled “Constructor”new ProtocolError(
code):ProtocolError
Defined in: packages/core/src/agent/errors.ts:176
Parameters
Section titled “Parameters”Returns
Section titled “Returns”Overrides
Section titled “Overrides”ErrorKind.constructor
Properties
Section titled “Properties”
readonlycause:object
Defined in: packages/core/src/agent/errors.ts:116
code:
ErrorCode
kind:
ErrorKindEnum
Inherited from
Section titled “Inherited from”ErrorKind.cause
message
Section titled “message”message:
string
Defined in: node_modules/.pnpm/typescript@5.9.3/node_modules/typescript/lib/lib.es5.d.ts:1077
Inherited from
Section titled “Inherited from”ErrorKind.message
name:
string='ProtocolError'
Defined in: packages/core/src/agent/errors.ts:174
Overrides
Section titled “Overrides”ErrorKind.name
stack?
Section titled “stack?”
optionalstack?:string
Defined in: node_modules/.pnpm/typescript@5.9.3/node_modules/typescript/lib/lib.es5.d.ts:1078
Inherited from
Section titled “Inherited from”ErrorKind.stack
stackTraceLimit
Section titled “stackTraceLimit”
staticstackTraceLimit: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.
Inherited from
Section titled “Inherited from”ErrorKind.stackTraceLimit
Accessors
Section titled “Accessors”Get Signature
Section titled “Get Signature”get code():
ErrorCode
Defined in: packages/core/src/agent/errors.ts:118
Returns
Section titled “Returns”Set Signature
Section titled “Set Signature”set code(
code):void
Defined in: packages/core/src/agent/errors.ts:121
Parameters
Section titled “Parameters”Returns
Section titled “Returns”void
Inherited from
Section titled “Inherited from”ErrorKind.code
isCertified
Section titled “isCertified”Get Signature
Section titled “Get Signature”get isCertified():
boolean
Defined in: packages/core/src/agent/errors.ts:136
Reads the isCertified property of the underlying error code.
Returns
Section titled “Returns”boolean
true if the error is certified, false otherwise.
Inherited from
Section titled “Inherited from”ErrorKind.isCertified
Get Signature
Section titled “Get Signature”get kind():
ErrorKindEnum
Defined in: packages/core/src/agent/errors.ts:125
Returns
Section titled “Returns”Set Signature
Section titled “Set Signature”set kind(
kind):void
Defined in: packages/core/src/agent/errors.ts:128
Parameters
Section titled “Parameters”Returns
Section titled “Returns”void
Inherited from
Section titled “Inherited from”ErrorKind.kind
Methods
Section titled “Methods”hasCode()
Section titled “hasCode()”hasCode<
C>(code):boolean
Defined in: packages/core/src/agent/errors.ts:146
Type Parameters
Section titled “Type Parameters”C extends ErrorCode
Parameters
Section titled “Parameters”(…args) => C
Returns
Section titled “Returns”boolean
Inherited from
Section titled “Inherited from”ErrorKind.hasCode
toString()
Section titled “toString()”toString():
string
Defined in: packages/core/src/agent/errors.ts:150
Returns a string representation of an object.
Returns
Section titled “Returns”string
Inherited from
Section titled “Inherited from”ErrorKind.toString
captureStackTrace()
Section titled “captureStackTrace()”
staticcaptureStackTrace(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();Parameters
Section titled “Parameters”targetObject
Section titled “targetObject”object
constructorOpt?
Section titled “constructorOpt?”Function
Returns
Section titled “Returns”void
Inherited from
Section titled “Inherited from”ErrorKind.captureStackTrace
fromCode()
Section titled “fromCode()”
staticfromCode<C,E>(this,code):E
Defined in: packages/core/src/agent/errors.ts:156
Type Parameters
Section titled “Type Parameters”C extends ErrorCode
E extends ErrorKind
Parameters
Section titled “Parameters”(code) => E
C
Returns
Section titled “Returns”E
Inherited from
Section titled “Inherited from”ErrorKind.fromCode
prepareStackTrace()
Section titled “prepareStackTrace()”
staticprepareStackTrace(err,stackTraces):any
Defined in: node_modules/.pnpm/@types+node@25.5.0/node_modules/@types/node/globals.d.ts:55
Parameters
Section titled “Parameters”Error
stackTraces
Section titled “stackTraces”CallSite[]
Returns
Section titled “Returns”any
https://v8.dev/docs/stack-trace-api#customizing-stack-traces
Inherited from
Section titled “Inherited from”ErrorKind.prepareStackTrace
QuerySignatureVerificationFailedErrorCode
Section titled “QuerySignatureVerificationFailedErrorCode”Defined in: packages/core/src/agent/errors.ts:751
Extends
Section titled “Extends”Constructors
Section titled “Constructors”Constructor
Section titled “Constructor”new QuerySignatureVerificationFailedErrorCode(
nodeId):QuerySignatureVerificationFailedErrorCode
Defined in: packages/core/src/agent/errors.ts:754
Parameters
Section titled “Parameters”nodeId
Section titled “nodeId”string
Returns
Section titled “Returns”QuerySignatureVerificationFailedErrorCode
Overrides
Section titled “Overrides”Properties
Section titled “Properties”callContext?
Section titled “callContext?”
optionalcallContext?:CallContext|PollingCallContext
Defined in: packages/core/src/agent/errors.ts:78
Inherited from
Section titled “Inherited from”isCertified
Section titled “isCertified”
readonlyisCertified:boolean=false
Defined in: packages/core/src/agent/errors.ts:80
Inherited from
Section titled “Inherited from”name:
string='QuerySignatureVerificationFailedErrorCode'
Defined in: packages/core/src/agent/errors.ts:752
nodeId
Section titled “nodeId”
readonlynodeId:string
Defined in: packages/core/src/agent/errors.ts:754
requestContext?
Section titled “requestContext?”
optionalrequestContext?:RequestContext
Defined in: packages/core/src/agent/errors.ts:77
Inherited from
Section titled “Inherited from”verbosity
Section titled “verbosity”
staticverbosity:ErrorVerbosity=ErrorVerbosity.Normal
Defined in: packages/core/src/agent/errors.ts:75
Inherited from
Section titled “Inherited from”Methods
Section titled “Methods”toErrorMessage()
Section titled “toErrorMessage()”toErrorMessage():
string
Defined in: packages/core/src/agent/errors.ts:759
Returns
Section titled “Returns”string
Overrides
Section titled “Overrides”toString()
Section titled “toString()”toString():
string
Defined in: packages/core/src/agent/errors.ts:84
Returns
Section titled “Returns”string
Inherited from
Section titled “Inherited from”RejectError
Section titled “RejectError”Defined in: packages/core/src/agent/errors.ts:182
Extends
Section titled “Extends”ErrorKind
Constructors
Section titled “Constructors”Constructor
Section titled “Constructor”new RejectError(
code):RejectError
Defined in: packages/core/src/agent/errors.ts:185
Parameters
Section titled “Parameters”Returns
Section titled “Returns”Overrides
Section titled “Overrides”ErrorKind.constructor
Properties
Section titled “Properties”
readonlycause:object
Defined in: packages/core/src/agent/errors.ts:116
code:
ErrorCode
kind:
ErrorKindEnum
Inherited from
Section titled “Inherited from”ErrorKind.cause
message
Section titled “message”message:
string
Defined in: node_modules/.pnpm/typescript@5.9.3/node_modules/typescript/lib/lib.es5.d.ts:1077
Inherited from
Section titled “Inherited from”ErrorKind.message
name:
string='RejectError'
Defined in: packages/core/src/agent/errors.ts:183
Overrides
Section titled “Overrides”ErrorKind.name
stack?
Section titled “stack?”
optionalstack?:string
Defined in: node_modules/.pnpm/typescript@5.9.3/node_modules/typescript/lib/lib.es5.d.ts:1078
Inherited from
Section titled “Inherited from”ErrorKind.stack
stackTraceLimit
Section titled “stackTraceLimit”
staticstackTraceLimit: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.
Inherited from
Section titled “Inherited from”ErrorKind.stackTraceLimit
Accessors
Section titled “Accessors”Get Signature
Section titled “Get Signature”get code():
ErrorCode
Defined in: packages/core/src/agent/errors.ts:118
Returns
Section titled “Returns”Set Signature
Section titled “Set Signature”set code(
code):void
Defined in: packages/core/src/agent/errors.ts:121
Parameters
Section titled “Parameters”Returns
Section titled “Returns”void
Inherited from
Section titled “Inherited from”ErrorKind.code
isCertified
Section titled “isCertified”Get Signature
Section titled “Get Signature”get isCertified():
boolean
Defined in: packages/core/src/agent/errors.ts:136
Reads the isCertified property of the underlying error code.
Returns
Section titled “Returns”boolean
true if the error is certified, false otherwise.
Inherited from
Section titled “Inherited from”ErrorKind.isCertified
Get Signature
Section titled “Get Signature”get kind():
ErrorKindEnum
Defined in: packages/core/src/agent/errors.ts:125
Returns
Section titled “Returns”Set Signature
Section titled “Set Signature”set kind(
kind):void
Defined in: packages/core/src/agent/errors.ts:128
Parameters
Section titled “Parameters”Returns
Section titled “Returns”void
Inherited from
Section titled “Inherited from”ErrorKind.kind
Methods
Section titled “Methods”hasCode()
Section titled “hasCode()”hasCode<
C>(code):boolean
Defined in: packages/core/src/agent/errors.ts:146
Type Parameters
Section titled “Type Parameters”C extends ErrorCode
Parameters
Section titled “Parameters”(…args) => C
Returns
Section titled “Returns”boolean
Inherited from
Section titled “Inherited from”ErrorKind.hasCode
toString()
Section titled “toString()”toString():
string
Defined in: packages/core/src/agent/errors.ts:150
Returns a string representation of an object.
Returns
Section titled “Returns”string
Inherited from
Section titled “Inherited from”ErrorKind.toString
captureStackTrace()
Section titled “captureStackTrace()”
staticcaptureStackTrace(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();Parameters
Section titled “Parameters”targetObject
Section titled “targetObject”object
constructorOpt?
Section titled “constructorOpt?”Function
Returns
Section titled “Returns”void
Inherited from
Section titled “Inherited from”ErrorKind.captureStackTrace
fromCode()
Section titled “fromCode()”
staticfromCode<C,E>(this,code):E
Defined in: packages/core/src/agent/errors.ts:156
Type Parameters
Section titled “Type Parameters”C extends ErrorCode
E extends ErrorKind
Parameters
Section titled “Parameters”(code) => E
C
Returns
Section titled “Returns”E
Inherited from
Section titled “Inherited from”ErrorKind.fromCode
prepareStackTrace()
Section titled “prepareStackTrace()”
staticprepareStackTrace(err,stackTraces):any
Defined in: node_modules/.pnpm/@types+node@25.5.0/node_modules/@types/node/globals.d.ts:55
Parameters
Section titled “Parameters”Error
stackTraces
Section titled “stackTraces”CallSite[]
Returns
Section titled “Returns”any
https://v8.dev/docs/stack-trace-api#customizing-stack-traces
Inherited from
Section titled “Inherited from”ErrorKind.prepareStackTrace
RequestStatusDoneNoReplyErrorCode
Section titled “RequestStatusDoneNoReplyErrorCode”Defined in: packages/core/src/agent/errors.ts:596
Extends
Section titled “Extends”Constructors
Section titled “Constructors”Constructor
Section titled “Constructor”new RequestStatusDoneNoReplyErrorCode(
requestId):RequestStatusDoneNoReplyErrorCode
Defined in: packages/core/src/agent/errors.ts:599
Parameters
Section titled “Parameters”requestId
Section titled “requestId”Returns
Section titled “Returns”RequestStatusDoneNoReplyErrorCode
Overrides
Section titled “Overrides”Properties
Section titled “Properties”callContext?
Section titled “callContext?”
optionalcallContext?:CallContext|PollingCallContext
Defined in: packages/core/src/agent/errors.ts:78
Inherited from
Section titled “Inherited from”isCertified
Section titled “isCertified”
readonlyisCertified:boolean=false
Defined in: packages/core/src/agent/errors.ts:80
Inherited from
Section titled “Inherited from”name:
string='RequestStatusDoneNoReplyErrorCode'
Defined in: packages/core/src/agent/errors.ts:597
requestContext?
Section titled “requestContext?”
optionalrequestContext?:RequestContext
Defined in: packages/core/src/agent/errors.ts:77
Inherited from
Section titled “Inherited from”requestId
Section titled “requestId”
readonlyrequestId:RequestId
Defined in: packages/core/src/agent/errors.ts:599
verbosity
Section titled “verbosity”
staticverbosity:ErrorVerbosity=ErrorVerbosity.Normal
Defined in: packages/core/src/agent/errors.ts:75
Inherited from
Section titled “Inherited from”Methods
Section titled “Methods”toErrorMessage()
Section titled “toErrorMessage()”toErrorMessage():
string
Defined in: packages/core/src/agent/errors.ts:604
Returns
Section titled “Returns”string
Overrides
Section titled “Overrides”toString()
Section titled “toString()”toString():
string
Defined in: packages/core/src/agent/errors.ts:84
Returns
Section titled “Returns”string
Inherited from
Section titled “Inherited from”abstract SignIdentity
Section titled “abstract SignIdentity”Defined in: packages/core/src/agent/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”Properties
Section titled “Properties”_principal
Section titled “_principal”
protected_principal:Principal|undefined
Defined in: packages/core/src/agent/auth.ts:58
Methods
Section titled “Methods”getPrincipal()
Section titled “getPrincipal()”getPrincipal():
Principal
Defined in: packages/core/src/agent/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/core/src/agent/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/core/src/agent/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/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.
Parameters
Section titled “Parameters”request
Section titled “request”internet computer request to transform
Returns
Section titled “Returns”Promise<unknown>
Implementation of
Section titled “Implementation of”TimeoutWaitingForResponseErrorCode
Section titled “TimeoutWaitingForResponseErrorCode”Defined in: packages/core/src/agent/errors.ts:478
Extends
Section titled “Extends”Constructors
Section titled “Constructors”Constructor
Section titled “Constructor”new TimeoutWaitingForResponseErrorCode(
message,requestId?,status?):TimeoutWaitingForResponseErrorCode
Defined in: packages/core/src/agent/errors.ts:481
Parameters
Section titled “Parameters”message
Section titled “message”string
requestId?
Section titled “requestId?”status?
Section titled “status?”Returns
Section titled “Returns”TimeoutWaitingForResponseErrorCode
Overrides
Section titled “Overrides”Properties
Section titled “Properties”callContext?
Section titled “callContext?”
optionalcallContext?:CallContext|PollingCallContext
Defined in: packages/core/src/agent/errors.ts:78
Inherited from
Section titled “Inherited from”isCertified
Section titled “isCertified”
readonlyisCertified:boolean=false
Defined in: packages/core/src/agent/errors.ts:80
Inherited from
Section titled “Inherited from”message
Section titled “message”
readonlymessage:string
Defined in: packages/core/src/agent/errors.ts:482
name:
string='TimeoutWaitingForResponseErrorCode'
Defined in: packages/core/src/agent/errors.ts:479
requestContext?
Section titled “requestContext?”
optionalrequestContext?:RequestContext
Defined in: packages/core/src/agent/errors.ts:77
Inherited from
Section titled “Inherited from”requestId?
Section titled “requestId?”
readonlyoptionalrequestId?:RequestId
Defined in: packages/core/src/agent/errors.ts:483
status?
Section titled “status?”
readonlyoptionalstatus?:RequestStatusResponseStatus
Defined in: packages/core/src/agent/errors.ts:484
verbosity
Section titled “verbosity”
staticverbosity:ErrorVerbosity=ErrorVerbosity.Normal
Defined in: packages/core/src/agent/errors.ts:75
Inherited from
Section titled “Inherited from”Methods
Section titled “Methods”toErrorMessage()
Section titled “toErrorMessage()”toErrorMessage():
string
Defined in: packages/core/src/agent/errors.ts:490
Returns
Section titled “Returns”string
Overrides
Section titled “Overrides”toString()
Section titled “toString()”toString():
string
Defined in: packages/core/src/agent/errors.ts:84
Returns
Section titled “Returns”string
Inherited from
Section titled “Inherited from”abstract ToCborValue
Section titled “abstract ToCborValue”Defined in: packages/core/src/agent/cbor.ts:9
Used to extend classes that need to provide a custom value for the CBOR encoding process.
Constructors
Section titled “Constructors”Constructor
Section titled “Constructor”new ToCborValue():
ToCborValue
Returns
Section titled “Returns”Methods
Section titled “Methods”toCborValue()
Section titled “toCborValue()”
abstracttoCborValue():any
Defined in: packages/core/src/agent/cbor.ts:13
Returns a value that can be encoded with CBOR. Typically called in the replacer function of the encode function.
Returns
Section titled “Returns”any
TransportError
Section titled “TransportError”Defined in: packages/core/src/agent/errors.ts:191
Extends
Section titled “Extends”ErrorKind
Constructors
Section titled “Constructors”Constructor
Section titled “Constructor”new TransportError(
code):TransportError
Defined in: packages/core/src/agent/errors.ts:194
Parameters
Section titled “Parameters”Returns
Section titled “Returns”Overrides
Section titled “Overrides”ErrorKind.constructor
Properties
Section titled “Properties”
readonlycause:object
Defined in: packages/core/src/agent/errors.ts:116
code:
ErrorCode
kind:
ErrorKindEnum
Inherited from
Section titled “Inherited from”ErrorKind.cause
message
Section titled “message”message:
string
Defined in: node_modules/.pnpm/typescript@5.9.3/node_modules/typescript/lib/lib.es5.d.ts:1077
Inherited from
Section titled “Inherited from”ErrorKind.message
name:
string='TransportError'
Defined in: packages/core/src/agent/errors.ts:192
Overrides
Section titled “Overrides”ErrorKind.name
stack?
Section titled “stack?”
optionalstack?:string
Defined in: node_modules/.pnpm/typescript@5.9.3/node_modules/typescript/lib/lib.es5.d.ts:1078
Inherited from
Section titled “Inherited from”ErrorKind.stack
stackTraceLimit
Section titled “stackTraceLimit”
staticstackTraceLimit: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.
Inherited from
Section titled “Inherited from”ErrorKind.stackTraceLimit
Accessors
Section titled “Accessors”Get Signature
Section titled “Get Signature”get code():
ErrorCode
Defined in: packages/core/src/agent/errors.ts:118
Returns
Section titled “Returns”Set Signature
Section titled “Set Signature”set code(
code):void
Defined in: packages/core/src/agent/errors.ts:121
Parameters
Section titled “Parameters”Returns
Section titled “Returns”void
Inherited from
Section titled “Inherited from”ErrorKind.code
isCertified
Section titled “isCertified”Get Signature
Section titled “Get Signature”get isCertified():
boolean
Defined in: packages/core/src/agent/errors.ts:136
Reads the isCertified property of the underlying error code.
Returns
Section titled “Returns”boolean
true if the error is certified, false otherwise.
Inherited from
Section titled “Inherited from”ErrorKind.isCertified
Get Signature
Section titled “Get Signature”get kind():
ErrorKindEnum
Defined in: packages/core/src/agent/errors.ts:125
Returns
Section titled “Returns”Set Signature
Section titled “Set Signature”set kind(
kind):void
Defined in: packages/core/src/agent/errors.ts:128
Parameters
Section titled “Parameters”Returns
Section titled “Returns”void
Inherited from
Section titled “Inherited from”ErrorKind.kind
Methods
Section titled “Methods”hasCode()
Section titled “hasCode()”hasCode<
C>(code):boolean
Defined in: packages/core/src/agent/errors.ts:146
Type Parameters
Section titled “Type Parameters”C extends ErrorCode
Parameters
Section titled “Parameters”(…args) => C
Returns
Section titled “Returns”boolean
Inherited from
Section titled “Inherited from”ErrorKind.hasCode
toString()
Section titled “toString()”toString():
string
Defined in: packages/core/src/agent/errors.ts:150
Returns a string representation of an object.
Returns
Section titled “Returns”string
Inherited from
Section titled “Inherited from”ErrorKind.toString
captureStackTrace()
Section titled “captureStackTrace()”
staticcaptureStackTrace(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();Parameters
Section titled “Parameters”targetObject
Section titled “targetObject”object
constructorOpt?
Section titled “constructorOpt?”Function
Returns
Section titled “Returns”void
Inherited from
Section titled “Inherited from”ErrorKind.captureStackTrace
fromCode()
Section titled “fromCode()”
staticfromCode<C,E>(this,code):E
Defined in: packages/core/src/agent/errors.ts:156
Type Parameters
Section titled “Type Parameters”C extends ErrorCode
E extends ErrorKind
Parameters
Section titled “Parameters”(code) => E
C
Returns
Section titled “Returns”E
Inherited from
Section titled “Inherited from”ErrorKind.fromCode
prepareStackTrace()
Section titled “prepareStackTrace()”
staticprepareStackTrace(err,stackTraces):any
Defined in: node_modules/.pnpm/@types+node@25.5.0/node_modules/@types/node/globals.d.ts:55
Parameters
Section titled “Parameters”Error
stackTraces
Section titled “stackTraces”CallSite[]
Returns
Section titled “Returns”any
https://v8.dev/docs/stack-trace-api#customizing-stack-traces
Inherited from
Section titled “Inherited from”ErrorKind.prepareStackTrace
TrustError
Section titled “TrustError”Defined in: packages/core/src/agent/errors.ts:164
Extends
Section titled “Extends”ErrorKind
Constructors
Section titled “Constructors”Constructor
Section titled “Constructor”new TrustError(
code):TrustError
Defined in: packages/core/src/agent/errors.ts:167
Parameters
Section titled “Parameters”Returns
Section titled “Returns”Overrides
Section titled “Overrides”ErrorKind.constructor
Properties
Section titled “Properties”
readonlycause:object
Defined in: packages/core/src/agent/errors.ts:116
code:
ErrorCode
kind:
ErrorKindEnum
Inherited from
Section titled “Inherited from”ErrorKind.cause
message
Section titled “message”message:
string
Defined in: node_modules/.pnpm/typescript@5.9.3/node_modules/typescript/lib/lib.es5.d.ts:1077
Inherited from
Section titled “Inherited from”ErrorKind.message
name:
string='TrustError'
Defined in: packages/core/src/agent/errors.ts:165
Overrides
Section titled “Overrides”ErrorKind.name
stack?
Section titled “stack?”
optionalstack?:string
Defined in: node_modules/.pnpm/typescript@5.9.3/node_modules/typescript/lib/lib.es5.d.ts:1078
Inherited from
Section titled “Inherited from”ErrorKind.stack
stackTraceLimit
Section titled “stackTraceLimit”
staticstackTraceLimit: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.
Inherited from
Section titled “Inherited from”ErrorKind.stackTraceLimit
Accessors
Section titled “Accessors”Get Signature
Section titled “Get Signature”get code():
ErrorCode
Defined in: packages/core/src/agent/errors.ts:118
Returns
Section titled “Returns”Set Signature
Section titled “Set Signature”set code(
code):void
Defined in: packages/core/src/agent/errors.ts:121
Parameters
Section titled “Parameters”Returns
Section titled “Returns”void
Inherited from
Section titled “Inherited from”ErrorKind.code
isCertified
Section titled “isCertified”Get Signature
Section titled “Get Signature”get isCertified():
boolean
Defined in: packages/core/src/agent/errors.ts:136
Reads the isCertified property of the underlying error code.
Returns
Section titled “Returns”boolean
true if the error is certified, false otherwise.
Inherited from
Section titled “Inherited from”ErrorKind.isCertified
Get Signature
Section titled “Get Signature”get kind():
ErrorKindEnum
Defined in: packages/core/src/agent/errors.ts:125
Returns
Section titled “Returns”Set Signature
Section titled “Set Signature”set kind(
kind):void
Defined in: packages/core/src/agent/errors.ts:128
Parameters
Section titled “Parameters”Returns
Section titled “Returns”void
Inherited from
Section titled “Inherited from”ErrorKind.kind
Methods
Section titled “Methods”hasCode()
Section titled “hasCode()”hasCode<
C>(code):boolean
Defined in: packages/core/src/agent/errors.ts:146
Type Parameters
Section titled “Type Parameters”C extends ErrorCode
Parameters
Section titled “Parameters”(…args) => C
Returns
Section titled “Returns”boolean
Inherited from
Section titled “Inherited from”ErrorKind.hasCode
toString()
Section titled “toString()”toString():
string
Defined in: packages/core/src/agent/errors.ts:150
Returns a string representation of an object.
Returns
Section titled “Returns”string
Inherited from
Section titled “Inherited from”ErrorKind.toString
captureStackTrace()
Section titled “captureStackTrace()”
staticcaptureStackTrace(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();Parameters
Section titled “Parameters”targetObject
Section titled “targetObject”object
constructorOpt?
Section titled “constructorOpt?”Function
Returns
Section titled “Returns”void
Inherited from
Section titled “Inherited from”ErrorKind.captureStackTrace
fromCode()
Section titled “fromCode()”
staticfromCode<C,E>(this,code):E
Defined in: packages/core/src/agent/errors.ts:156
Type Parameters
Section titled “Type Parameters”C extends ErrorCode
E extends ErrorKind
Parameters
Section titled “Parameters”(code) => E
C
Returns
Section titled “Returns”E
Inherited from
Section titled “Inherited from”ErrorKind.fromCode
prepareStackTrace()
Section titled “prepareStackTrace()”
staticprepareStackTrace(err,stackTraces):any
Defined in: node_modules/.pnpm/@types+node@25.5.0/node_modules/@types/node/globals.d.ts:55
Parameters
Section titled “Parameters”Error
stackTraces
Section titled “stackTraces”CallSite[]
Returns
Section titled “Returns”any
https://v8.dev/docs/stack-trace-api#customizing-stack-traces
Inherited from
Section titled “Inherited from”ErrorKind.prepareStackTrace
UncertifiedRejectErrorCode
Section titled “UncertifiedRejectErrorCode”Defined in: packages/core/src/agent/errors.ts:547
Extends
Section titled “Extends”Constructors
Section titled “Constructors”Constructor
Section titled “Constructor”new UncertifiedRejectErrorCode(
requestId,rejectCode,rejectMessage,rejectErrorCode,signatures):UncertifiedRejectErrorCode
Defined in: packages/core/src/agent/errors.ts:550
Parameters
Section titled “Parameters”requestId
Section titled “requestId”rejectCode
Section titled “rejectCode”rejectMessage
Section titled “rejectMessage”string
rejectErrorCode
Section titled “rejectErrorCode”string | undefined
signatures
Section titled “signatures”NodeSignature[] | undefined
Returns
Section titled “Returns”Overrides
Section titled “Overrides”Properties
Section titled “Properties”callContext?
Section titled “callContext?”
optionalcallContext?:CallContext|PollingCallContext
Defined in: packages/core/src/agent/errors.ts:78
Inherited from
Section titled “Inherited from”isCertified
Section titled “isCertified”
readonlyisCertified:boolean=false
Defined in: packages/core/src/agent/errors.ts:80
Inherited from
Section titled “Inherited from”name:
string='UncertifiedRejectErrorCode'
Defined in: packages/core/src/agent/errors.ts:548
rejectCode
Section titled “rejectCode”
readonlyrejectCode:ReplicaRejectCode
Defined in: packages/core/src/agent/errors.ts:552
rejectErrorCode
Section titled “rejectErrorCode”
readonlyrejectErrorCode:string|undefined
Defined in: packages/core/src/agent/errors.ts:554
rejectMessage
Section titled “rejectMessage”
readonlyrejectMessage:string
Defined in: packages/core/src/agent/errors.ts:553
requestContext?
Section titled “requestContext?”
optionalrequestContext?:RequestContext
Defined in: packages/core/src/agent/errors.ts:77
Inherited from
Section titled “Inherited from”requestId
Section titled “requestId”
readonlyrequestId:RequestId
Defined in: packages/core/src/agent/errors.ts:551
signatures
Section titled “signatures”
readonlysignatures:NodeSignature[] |undefined
Defined in: packages/core/src/agent/errors.ts:555
verbosity
Section titled “verbosity”
staticverbosity:ErrorVerbosity=ErrorVerbosity.Normal
Defined in: packages/core/src/agent/errors.ts:75
Inherited from
Section titled “Inherited from”Methods
Section titled “Methods”toErrorMessage()
Section titled “toErrorMessage()”toErrorMessage():
string
Defined in: packages/core/src/agent/errors.ts:561
Returns
Section titled “Returns”string
Overrides
Section titled “Overrides”toString()
Section titled “toString()”toString():
string
Defined in: packages/core/src/agent/errors.ts:84
Returns
Section titled “Returns”string
Inherited from
Section titled “Inherited from”UncertifiedRejectUpdateErrorCode
Section titled “UncertifiedRejectUpdateErrorCode”Defined in: packages/core/src/agent/errors.ts:572
Extends
Section titled “Extends”Constructors
Section titled “Constructors”Constructor
Section titled “Constructor”new UncertifiedRejectUpdateErrorCode(
requestId,rejectCode,rejectMessage,rejectErrorCode):UncertifiedRejectUpdateErrorCode
Defined in: packages/core/src/agent/errors.ts:575
Parameters
Section titled “Parameters”requestId
Section titled “requestId”rejectCode
Section titled “rejectCode”rejectMessage
Section titled “rejectMessage”string
rejectErrorCode
Section titled “rejectErrorCode”string | undefined
Returns
Section titled “Returns”UncertifiedRejectUpdateErrorCode
Overrides
Section titled “Overrides”Properties
Section titled “Properties”callContext?
Section titled “callContext?”
optionalcallContext?:CallContext|PollingCallContext
Defined in: packages/core/src/agent/errors.ts:78
Inherited from
Section titled “Inherited from”isCertified
Section titled “isCertified”
readonlyisCertified:boolean=false
Defined in: packages/core/src/agent/errors.ts:80
Inherited from
Section titled “Inherited from”name:
string='UncertifiedRejectUpdateErrorCode'
Defined in: packages/core/src/agent/errors.ts:573
rejectCode
Section titled “rejectCode”
readonlyrejectCode:ReplicaRejectCode
Defined in: packages/core/src/agent/errors.ts:577
rejectErrorCode
Section titled “rejectErrorCode”
readonlyrejectErrorCode:string|undefined
Defined in: packages/core/src/agent/errors.ts:579
rejectMessage
Section titled “rejectMessage”
readonlyrejectMessage:string
Defined in: packages/core/src/agent/errors.ts:578
requestContext?
Section titled “requestContext?”
optionalrequestContext?:RequestContext
Defined in: packages/core/src/agent/errors.ts:77
Inherited from
Section titled “Inherited from”requestId
Section titled “requestId”
readonlyrequestId:RequestId
Defined in: packages/core/src/agent/errors.ts:576
verbosity
Section titled “verbosity”
staticverbosity:ErrorVerbosity=ErrorVerbosity.Normal
Defined in: packages/core/src/agent/errors.ts:75
Inherited from
Section titled “Inherited from”Methods
Section titled “Methods”toErrorMessage()
Section titled “toErrorMessage()”toErrorMessage():
string
Defined in: packages/core/src/agent/errors.ts:585
Returns
Section titled “Returns”string
Overrides
Section titled “Overrides”toString()
Section titled “toString()”toString():
string
Defined in: packages/core/src/agent/errors.ts:84
Returns
Section titled “Returns”string
Inherited from
Section titled “Inherited from”UnexpectedErrorCode
Section titled “UnexpectedErrorCode”Defined in: packages/core/src/agent/errors.ts:764
Extends
Section titled “Extends”Constructors
Section titled “Constructors”Constructor
Section titled “Constructor”new UnexpectedErrorCode(
error):UnexpectedErrorCode
Defined in: packages/core/src/agent/errors.ts:767
Parameters
Section titled “Parameters”unknown
Returns
Section titled “Returns”Overrides
Section titled “Overrides”Properties
Section titled “Properties”callContext?
Section titled “callContext?”
optionalcallContext?:CallContext|PollingCallContext
Defined in: packages/core/src/agent/errors.ts:78
Inherited from
Section titled “Inherited from”
readonlyerror:unknown
Defined in: packages/core/src/agent/errors.ts:767
isCertified
Section titled “isCertified”
readonlyisCertified:boolean=false
Defined in: packages/core/src/agent/errors.ts:80
Inherited from
Section titled “Inherited from”name:
string='UnexpectedErrorCode'
Defined in: packages/core/src/agent/errors.ts:765
requestContext?
Section titled “requestContext?”
optionalrequestContext?:RequestContext
Defined in: packages/core/src/agent/errors.ts:77
Inherited from
Section titled “Inherited from”verbosity
Section titled “verbosity”
staticverbosity:ErrorVerbosity=ErrorVerbosity.Normal
Defined in: packages/core/src/agent/errors.ts:75
Inherited from
Section titled “Inherited from”Methods
Section titled “Methods”toErrorMessage()
Section titled “toErrorMessage()”toErrorMessage():
string
Defined in: packages/core/src/agent/errors.ts:772
Returns
Section titled “Returns”string
Overrides
Section titled “Overrides”toString()
Section titled “toString()”toString():
string
Defined in: packages/core/src/agent/errors.ts:84
Returns
Section titled “Returns”string
Inherited from
Section titled “Inherited from”UnexpectedV4StatusErrorCode
Section titled “UnexpectedV4StatusErrorCode”Defined in: packages/core/src/agent/errors.ts:777
Extends
Section titled “Extends”Constructors
Section titled “Constructors”Constructor
Section titled “Constructor”new UnexpectedV4StatusErrorCode(
status,requestId,response,rawCertificate):UnexpectedV4StatusErrorCode
Defined in: packages/core/src/agent/errors.ts:780
Parameters
Section titled “Parameters”status
Section titled “status”string | undefined
requestId
Section titled “requestId”response
Section titled “response”v2ResponseBody | v4ResponseBody | null
headers
Section titled “headers”boolean
status
Section titled “status”number
statusText
Section titled “statusText”string
rawCertificate
Section titled “rawCertificate”Uint8Array
Returns
Section titled “Returns”Overrides
Section titled “Overrides”Properties
Section titled “Properties”callContext?
Section titled “callContext?”
optionalcallContext?:CallContext|PollingCallContext
Defined in: packages/core/src/agent/errors.ts:78
Inherited from
Section titled “Inherited from”isCertified
Section titled “isCertified”
readonlyisCertified:boolean=false
Defined in: packages/core/src/agent/errors.ts:80
Inherited from
Section titled “Inherited from”name:
string='UnexpectedV4StatusErrorCode'
Defined in: packages/core/src/agent/errors.ts:778
rawCertificate
Section titled “rawCertificate”
readonlyrawCertificate:Uint8Array
Defined in: packages/core/src/agent/errors.ts:784
requestContext?
Section titled “requestContext?”
optionalrequestContext?:RequestContext
Defined in: packages/core/src/agent/errors.ts:77
Inherited from
Section titled “Inherited from”requestId
Section titled “requestId”
readonlyrequestId:RequestId
Defined in: packages/core/src/agent/errors.ts:782
response
Section titled “response”
readonlyresponse:object
Defined in: packages/core/src/agent/errors.ts:783
body:
v2ResponseBody|v4ResponseBody|null
headers
Section titled “headers”headers:
HttpHeaderField[]
ok:
boolean
status
Section titled “status”status:
number
statusText
Section titled “statusText”statusText:
string
status
Section titled “status”
readonlystatus:string|undefined
Defined in: packages/core/src/agent/errors.ts:781
verbosity
Section titled “verbosity”
staticverbosity:ErrorVerbosity=ErrorVerbosity.Normal
Defined in: packages/core/src/agent/errors.ts:75
Inherited from
Section titled “Inherited from”Methods
Section titled “Methods”toErrorMessage()
Section titled “toErrorMessage()”toErrorMessage():
string
Defined in: packages/core/src/agent/errors.ts:790
Returns
Section titled “Returns”string
Overrides
Section titled “Overrides”toString()
Section titled “toString()”toString():
string
Defined in: packages/core/src/agent/errors.ts:84
Returns
Section titled “Returns”string
Inherited from
Section titled “Inherited from”UnknownError
Section titled “UnknownError”Defined in: packages/core/src/agent/errors.ts:227
Extends
Section titled “Extends”ErrorKind
Constructors
Section titled “Constructors”Constructor
Section titled “Constructor”new UnknownError(
code):UnknownError
Defined in: packages/core/src/agent/errors.ts:230
Parameters
Section titled “Parameters”Returns
Section titled “Returns”Overrides
Section titled “Overrides”ErrorKind.constructor
Properties
Section titled “Properties”
readonlycause:object
Defined in: packages/core/src/agent/errors.ts:116
code:
ErrorCode
kind:
ErrorKindEnum
Inherited from
Section titled “Inherited from”ErrorKind.cause
message
Section titled “message”message:
string
Defined in: node_modules/.pnpm/typescript@5.9.3/node_modules/typescript/lib/lib.es5.d.ts:1077
Inherited from
Section titled “Inherited from”ErrorKind.message
name:
string='UnknownError'
Defined in: packages/core/src/agent/errors.ts:228
Overrides
Section titled “Overrides”ErrorKind.name
stack?
Section titled “stack?”
optionalstack?:string
Defined in: node_modules/.pnpm/typescript@5.9.3/node_modules/typescript/lib/lib.es5.d.ts:1078
Inherited from
Section titled “Inherited from”ErrorKind.stack
stackTraceLimit
Section titled “stackTraceLimit”
staticstackTraceLimit: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.
Inherited from
Section titled “Inherited from”ErrorKind.stackTraceLimit
Accessors
Section titled “Accessors”Get Signature
Section titled “Get Signature”get code():
ErrorCode
Defined in: packages/core/src/agent/errors.ts:118
Returns
Section titled “Returns”Set Signature
Section titled “Set Signature”set code(
code):void
Defined in: packages/core/src/agent/errors.ts:121
Parameters
Section titled “Parameters”Returns
Section titled “Returns”void
Inherited from
Section titled “Inherited from”ErrorKind.code
isCertified
Section titled “isCertified”Get Signature
Section titled “Get Signature”get isCertified():
boolean
Defined in: packages/core/src/agent/errors.ts:136
Reads the isCertified property of the underlying error code.
Returns
Section titled “Returns”boolean
true if the error is certified, false otherwise.
Inherited from
Section titled “Inherited from”ErrorKind.isCertified
Get Signature
Section titled “Get Signature”get kind():
ErrorKindEnum
Defined in: packages/core/src/agent/errors.ts:125
Returns
Section titled “Returns”Set Signature
Section titled “Set Signature”set kind(
kind):void
Defined in: packages/core/src/agent/errors.ts:128
Parameters
Section titled “Parameters”Returns
Section titled “Returns”void
Inherited from
Section titled “Inherited from”ErrorKind.kind
Methods
Section titled “Methods”hasCode()
Section titled “hasCode()”hasCode<
C>(code):boolean
Defined in: packages/core/src/agent/errors.ts:146
Type Parameters
Section titled “Type Parameters”C extends ErrorCode
Parameters
Section titled “Parameters”(…args) => C
Returns
Section titled “Returns”boolean
Inherited from
Section titled “Inherited from”ErrorKind.hasCode
toString()
Section titled “toString()”toString():
string
Defined in: packages/core/src/agent/errors.ts:150
Returns a string representation of an object.
Returns
Section titled “Returns”string
Inherited from
Section titled “Inherited from”ErrorKind.toString
captureStackTrace()
Section titled “captureStackTrace()”
staticcaptureStackTrace(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();Parameters
Section titled “Parameters”targetObject
Section titled “targetObject”object
constructorOpt?
Section titled “constructorOpt?”Function
Returns
Section titled “Returns”void
Inherited from
Section titled “Inherited from”ErrorKind.captureStackTrace
fromCode()
Section titled “fromCode()”
staticfromCode<C,E>(this,code):E
Defined in: packages/core/src/agent/errors.ts:156
Type Parameters
Section titled “Type Parameters”C extends ErrorCode
E extends ErrorKind
Parameters
Section titled “Parameters”(code) => E
C
Returns
Section titled “Returns”E
Inherited from
Section titled “Inherited from”ErrorKind.fromCode
prepareStackTrace()
Section titled “prepareStackTrace()”
staticprepareStackTrace(err,stackTraces):any
Defined in: node_modules/.pnpm/@types+node@25.5.0/node_modules/@types/node/globals.d.ts:55
Parameters
Section titled “Parameters”Error
stackTraces
Section titled “stackTraces”CallSite[]
Returns
Section titled “Returns”any
https://v8.dev/docs/stack-trace-api#customizing-stack-traces
Inherited from
Section titled “Inherited from”ErrorKind.prepareStackTrace
Interfaces
Section titled “Interfaces”ActorConfig
Section titled “ActorConfig”Defined in: packages/core/src/agent/actor.ts:61
Configuration that can be passed to customize the Actor behavior.
Extends
Section titled “Extends”Pick<CallConfig,"agent"|"effectiveCanisterId">
Properties
Section titled “Properties”agent?
Section titled “agent?”
optionalagent?:Agent
Defined in: packages/core/src/agent/actor.ts:35
An agent to use in this call, otherwise the actor or call will try to discover the agent to use.
Inherited from
Section titled “Inherited from”blsVerify?
Section titled “blsVerify?”
optionalblsVerify?:VerifyFunc
Defined in: packages/core/src/agent/actor.ts:88
Polyfill for BLS Certificate verification in case wasm is not supported
canisterId
Section titled “canisterId”canisterId:
string|Principal
Defined in: packages/core/src/agent/actor.ts:65
The Canister ID of this Actor. This is required for an Actor.
effectiveCanisterId?
Section titled “effectiveCanisterId?”
optionaleffectiveCanisterId?:Principal
Defined in: packages/core/src/agent/actor.ts:50
The effective canister ID.
Inherited from
Section titled “Inherited from”CallConfig.effectiveCanisterId
pollingOptions?
Section titled “pollingOptions?”
optionalpollingOptions?:PollingOptions
Defined in: packages/core/src/agent/actor.ts:93
Polling options to use when making update calls. This will override the default DEFAULT_POLLING_OPTIONS.
queryStrategy?
Section titled “queryStrategy?”
optionalqueryStrategy?:QueryStrategy
Defined in: packages/core/src/agent/actor.ts:101
Controls how query and composite_query methods are executed.
'query'(default) — standard non-replicated query call.'update'— send query methods as update calls that go through consensus.
Default
Section titled “Default”'query'Methods
Section titled “Methods”callTransform()?
Section titled “callTransform()?”
optionalcallTransform(methodName,args,callConfig):void|Partial<CallConfig>
Defined in: packages/core/src/agent/actor.ts:70
An override function for update calls’ CallConfig. This will be called on every calls.
Parameters
Section titled “Parameters”methodName
Section titled “methodName”string
unknown[]
callConfig
Section titled “callConfig”Returns
Section titled “Returns”void | Partial<CallConfig>
queryTransform()?
Section titled “queryTransform()?”
optionalqueryTransform(methodName,args,callConfig):void|Partial<CallConfig>
Defined in: packages/core/src/agent/actor.ts:79
An override function for query calls’ CallConfig. This will be called on every query.
Parameters
Section titled “Parameters”methodName
Section titled “methodName”string
unknown[]
callConfig
Section titled “callConfig”Returns
Section titled “Returns”void | Partial<CallConfig>
ActorMethod()
Section titled “ActorMethod()”Defined in: packages/core/src/agent/actor.ts:113
An actor method type, defined for each methods of the actor service.
Extended by
Section titled “Extended by”Type Parameters
Section titled “Type Parameters”Args extends unknown[] = unknown[]
Ret = unknown
ActorMethod(…
args):Promise<Ret>
Defined in: packages/core/src/agent/actor.ts:114
An actor method type, defined for each methods of the actor service.
Parameters
Section titled “Parameters”…Args
Returns
Section titled “Returns”Promise<Ret>
Methods
Section titled “Methods”withOptions()
Section titled “withOptions()”withOptions(
options): (…args) =>Promise<Ret>
Defined in: packages/core/src/agent/actor.ts:116
Parameters
Section titled “Parameters”options
Section titled “options”Returns
Section titled “Returns”(…args) => Promise<Ret>
ActorMethodExtended()
Section titled “ActorMethodExtended()”Defined in: packages/core/src/agent/actor.ts:132
An actor method type, defined for each methods of the actor service.
Extends
Section titled “Extends”Type Parameters
Section titled “Type Parameters”Args extends unknown[] = unknown[]
Ret = unknown
Call Signature
Section titled “Call Signature”ActorMethodExtended(…
args):Promise<{certificate?:Certificate;httpDetails?:HttpDetailsResponse;result:Ret; }>
Defined in: packages/core/src/agent/actor.ts:136
An actor method type, defined for each methods of the actor service.
Parameters
Section titled “Parameters”…Args
Returns
Section titled “Returns”Promise<{ certificate?: Certificate; httpDetails?: HttpDetailsResponse; result: Ret; }>
Call Signature
Section titled “Call Signature”ActorMethodExtended(…
args):Promise<unknown>
Defined in: packages/core/src/agent/actor.ts:132
An actor method type, defined for each methods of the actor service.
Parameters
Section titled “Parameters”…unknown[]
Returns
Section titled “Returns”Promise<unknown>
Methods
Section titled “Methods”withOptions()
Section titled “withOptions()”withOptions(
options): (…args) =>Promise<unknown>
Defined in: packages/core/src/agent/actor.ts:116
Parameters
Section titled “Parameters”options
Section titled “options”Returns
Section titled “Returns”(…args) => Promise<unknown>
Inherited from
Section titled “Inherited from”ActorMethodWithHttpDetails()
Section titled “ActorMethodWithHttpDetails()”Defined in: packages/core/src/agent/actor.ts:122
An actor method type, defined for each methods of the actor service.
Extends
Section titled “Extends”Type Parameters
Section titled “Type Parameters”Args extends unknown[] = unknown[]
Ret = unknown
Call Signature
Section titled “Call Signature”ActorMethodWithHttpDetails(…
args):Promise<{httpDetails:HttpDetailsResponse;result:Ret; }>
Defined in: packages/core/src/agent/actor.ts:126
An actor method type, defined for each methods of the actor service.
Parameters
Section titled “Parameters”…Args
Returns
Section titled “Returns”Promise<{ httpDetails: HttpDetailsResponse; result: Ret; }>
Call Signature
Section titled “Call Signature”ActorMethodWithHttpDetails(…
args):Promise<unknown>
Defined in: packages/core/src/agent/actor.ts:122
An actor method type, defined for each methods of the actor service.
Parameters
Section titled “Parameters”…unknown[]
Returns
Section titled “Returns”Promise<unknown>
Methods
Section titled “Methods”withOptions()
Section titled “withOptions()”withOptions(
options): (…args) =>Promise<unknown>
Defined in: packages/core/src/agent/actor.ts:116
Parameters
Section titled “Parameters”options
Section titled “options”Returns
Section titled “Returns”(…args) => Promise<unknown>
Inherited from
Section titled “Inherited from”Defined in: packages/core/src/agent/agent/api.ts:206
An Agent able to make calls and queries to a Replica.
Properties
Section titled “Properties”rootKey
Section titled “rootKey”
readonlyrootKey:Uint8Array<ArrayBufferLike> |null
Defined in: packages/core/src/agent/agent/api.ts:207
Methods
Section titled “Methods”call()
Section titled “call()”call(
canisterId,fields):Promise<SubmitResponse>
Defined in: packages/core/src/agent/agent/api.ts:238
Parameters
Section titled “Parameters”canisterId
Section titled “canisterId”string | Principal
fields
Section titled “fields”Returns
Section titled “Returns”Promise<SubmitResponse>
createReadStateRequest()?
Section titled “createReadStateRequest()?”
optionalcreateReadStateRequest(options,identity?):Promise<unknown>
Defined in: packages/core/src/agent/agent/api.ts:220
Create the request for the read state call.
readState uses this internally.
Useful to avoid signing the same request multiple times.
Parameters
Section titled “Parameters”options
Section titled “options”identity?
Section titled “identity?”Returns
Section titled “Returns”Promise<unknown>
fetchRootKey()
Section titled “fetchRootKey()”fetchRootKey():
Promise<Uint8Array<ArrayBufferLike>>
Defined in: packages/core/src/agent/agent/api.ts:291
By default, the agent is configured to talk to the main Internet Computer, and verifies responses using a hard-coded public key.
This function will instruct the agent to ask the endpoint for its public key, and use that instead. This is required when talking to a local test instance, for example.
Only use this when you are not talking to the main Internet Computer, otherwise you are prone to man-in-the-middle attacks! Do not call this function by default.
Returns
Section titled “Returns”Promise<Uint8Array<ArrayBufferLike>>
getPrincipal()
Section titled “getPrincipal()”getPrincipal():
Promise<Principal>
Defined in: packages/core/src/agent/agent/api.ts:213
Returns the principal ID associated with this agent (by default). It only shows the principal of the default identity in the agent, which is the principal used when calls don’t specify it.
Returns
Section titled “Returns”Promise<Principal>
invalidateIdentity()?
Section titled “invalidateIdentity()?”
optionalinvalidateIdentity():void
Defined in: packages/core/src/agent/agent/api.ts:298
If an application needs to invalidate an identity under certain conditions, an Agent may expose an invalidateIdentity method.
Invoking this method will set the inner identity used by the Agent to null.
A use case for this would be - after a certain period of inactivity, a secure application chooses to invalidate the identity of any HttpAgent instances. An invalid identity can be replaced by Agent.replaceIdentity
Returns
Section titled “Returns”void
query()
Section titled “query()”query(
canisterId,options,identity?):Promise<ApiQueryResponse>
Defined in: packages/core/src/agent/agent/api.ts:273
Send a query call to a canister. See the interface spec.
Parameters
Section titled “Parameters”canisterId
Section titled “canisterId”string | Principal
The Principal of the Canister to send the query to. Sending a query to the management canister is not supported (as it has no meaning from an agent).
options
Section titled “options”Options to use to create and send the query.
identity?
Section titled “identity?”Sender principal to use when sending the query.
Returns
Section titled “Returns”Promise<ApiQueryResponse>
The response from the replica. The Promise will only reject when the communication failed. If the query itself failed but no protocol errors happened, the response will be of type QueryResponseRejected.
readState()
Section titled “readState()”readState(
effectiveCanisterId,options,identity?,request?):Promise<ReadStateResponse>
Defined in: packages/core/src/agent/agent/api.ts:231
Send a read state query to the replica. This includes a list of paths to return, and will return a Certificate. This will only reject on communication errors, but the certificate might contain less information than requested.
Parameters
Section titled “Parameters”effectiveCanisterId
Section titled “effectiveCanisterId”string | Principal
A Canister ID related to this call.
options
Section titled “options”The options for this call.
identity?
Section titled “identity?”Identity for the call. If not specified, uses the instance identity.
request?
Section titled “request?”unknown
The request to send in case it has already been created.
Returns
Section titled “Returns”Promise<ReadStateResponse>
replaceIdentity()?
Section titled “replaceIdentity()?”
optionalreplaceIdentity(identity):void
Defined in: packages/core/src/agent/agent/api.ts:309
If an application needs to replace an identity under certain conditions, an Agent may expose a replaceIdentity method.
Invoking this method will set the inner identity used by the Agent to a newly provided identity.
A use case for this would be - after authenticating using @icp-sdk/auth/client, you can replace the AnonymousIdentity of your Actor with a DelegationIdentity.
Actor.agentOf(defaultActor).replaceIdentity(await authClient.getIdentity());Parameters
Section titled “Parameters”identity
Section titled “identity”Returns
Section titled “Returns”void
status()
Section titled “status()”status():
Promise<JsonObject>
Defined in: packages/core/src/agent/agent/api.ts:260
Query the status endpoint of the replica. This normally has a few fields that corresponds to the version of the replica, its root public key, and any other information made public.
Returns
Section titled “Returns”Promise<JsonObject>
A JsonObject that is essentially a record of fields from the status endpoint.
update()
Section titled “update()”update(
canisterId,fields,pollingOptions?):Promise<UpdateResult>
Defined in: packages/core/src/agent/agent/api.ts:247
Executes an update call to a canister and returns the certified result.
Parameters
Section titled “Parameters”canisterId
Section titled “canisterId”string | Principal
The canister to call.
fields
Section titled “fields”The call options (method name, arg, effective canister ID, optional nonce).
pollingOptions?
Section titled “pollingOptions?”Optional polling configuration.
Returns
Section titled “Returns”Promise<UpdateResult>
The certified result including the certificate, reply bytes, and raw certificate bytes.
AnonymousIdentityDescriptor
Section titled “AnonymousIdentityDescriptor”Defined in: packages/core/src/agent/auth.ts:126
Properties
Section titled “Properties”type:
"AnonymousIdentity"
Defined in: packages/core/src/agent/auth.ts:127
CallConfig
Section titled “CallConfig”Defined in: packages/core/src/agent/actor.ts:30
Configuration to make calls to the Replica.
Properties
Section titled “Properties”agent?
Section titled “agent?”
optionalagent?:Agent
Defined in: packages/core/src/agent/actor.ts:35
An agent to use in this call, otherwise the actor or call will try to discover the agent to use.
canisterId?
Section titled “canisterId?”
optionalcanisterId?:string|Principal
Defined in: packages/core/src/agent/actor.ts:45
The canister ID of this Actor.
effectiveCanisterId?
Section titled “effectiveCanisterId?”
optionaleffectiveCanisterId?:Principal
Defined in: packages/core/src/agent/actor.ts:50
The effective canister ID.
nonce?
Section titled “nonce?”
optionalnonce?:Uint8Array<ArrayBufferLike>
Defined in: packages/core/src/agent/actor.ts:55
The nonce to use for this call. This is used to prevent replay attacks.
pollingOptions?
Section titled “pollingOptions?”
optionalpollingOptions?:PollingOptions
Defined in: packages/core/src/agent/actor.ts:40
Options for controlling polling behavior.
CallContext
Section titled “CallContext”Defined in: packages/core/src/agent/errors.ts:44
Call context for errors that arise from a direct HTTP call response.
Extends
Section titled “Extends”Properties
Section titled “Properties”canisterId
Section titled “canisterId”canisterId:
Principal
Defined in: packages/core/src/agent/errors.ts:37
Inherited from
Section titled “Inherited from”httpDetails
Section titled “httpDetails”httpDetails:
HttpDetailsResponse
Defined in: packages/core/src/agent/errors.ts:45
methodName
Section titled “methodName”methodName:
string
Defined in: packages/core/src/agent/errors.ts:38
Inherited from
Section titled “Inherited from”CallOptions
Section titled “CallOptions”Defined in: packages/core/src/agent/agent/api.ts:103
Options when doing a Agent.call call.
Extended by
Section titled “Extended by”Properties
Section titled “Properties”arg:
Uint8Array
Defined in: packages/core/src/agent/agent/api.ts:112
A binary encoded argument. This is already encoded and will be sent as is.
callSync?
Section titled “callSync?”
optionalcallSync?:boolean
Defined in: packages/core/src/agent/agent/api.ts:123
Whether to use synchronous call mode. Defaults to true.
effectiveCanisterId
Section titled “effectiveCanisterId”effectiveCanisterId:
string|Principal
Defined in: packages/core/src/agent/agent/api.ts:118
An effective canister ID, used for routing. Usually the canister ID, except for management canister calls.
https://internetcomputer.org/docs/current/references/ic-interface-spec/#http-effective-canister-id
methodName
Section titled “methodName”methodName:
string
Defined in: packages/core/src/agent/agent/api.ts:107
The method name to call.
nonce?
Section titled “nonce?”
optionalnonce?:Uint8Array<ArrayBufferLike>
Defined in: packages/core/src/agent/agent/api.ts:128
An optional nonce to use for the call, used to prevent replay attacks.
CallRequest
Section titled “CallRequest”Defined in: packages/core/src/agent/agent/http/types.ts:62
Extends
Section titled “Extends”Record<string,any>
Indexable
Section titled “Indexable”[
key:string]:any
Properties
Section titled “Properties”arg:
Uint8Array
Defined in: packages/core/src/agent/agent/http/types.ts:66
canister_id
Section titled “canister_id”canister_id:
Principal
Defined in: packages/core/src/agent/agent/http/types.ts:64
ingress_expiry
Section titled “ingress_expiry”ingress_expiry:
Expiry
Defined in: packages/core/src/agent/agent/http/types.ts:68
method_name
Section titled “method_name”method_name:
string
Defined in: packages/core/src/agent/agent/http/types.ts:65
nonce?
Section titled “nonce?”
optionalnonce?:Nonce
Defined in: packages/core/src/agent/agent/http/types.ts:69
request_type
Section titled “request_type”request_type:
Call
Defined in: packages/core/src/agent/agent/http/types.ts:63
sender
Section titled “sender”sender:
Uint8Array<ArrayBufferLike> |Principal
Defined in: packages/core/src/agent/agent/http/types.ts:67
Defined in: packages/core/src/agent/certificate.ts:41
Properties
Section titled “Properties”delegation?
Section titled “delegation?”
optionaldelegation?:Delegation
Defined in: packages/core/src/agent/certificate.ts:44
signature
Section titled “signature”signature:
Uint8Array
Defined in: packages/core/src/agent/certificate.ts:43
tree:
HashTree
Defined in: packages/core/src/agent/certificate.ts:42
CheckCanisterRangesParams
Section titled “CheckCanisterRangesParams”Defined in: packages/core/src/agent/certificate.ts:876
Properties
Section titled “Properties”canisterId
Section titled “canisterId”canisterId:
Principal
Defined in: packages/core/src/agent/certificate.ts:877
subnetId
Section titled “subnetId”subnetId:
Principal
Defined in: packages/core/src/agent/certificate.ts:878
tree:
HashTree
Defined in: packages/core/src/agent/certificate.ts:879
CreateActorClassOpts
Section titled “CreateActorClassOpts”Defined in: packages/core/src/agent/actor.ts:174
Properties
Section titled “Properties”certificate?
Section titled “certificate?”
optionalcertificate?:boolean
Defined in: packages/core/src/agent/actor.ts:176
httpDetails?
Section titled “httpDetails?”
optionalhttpDetails?:boolean
Defined in: packages/core/src/agent/actor.ts:175
CreateCertificateOptions
Section titled “CreateCertificateOptions”Defined in: packages/core/src/agent/certificate.ts:170
Properties
Section titled “Properties”agent?
Section titled “agent?”
optionalagent?:Agent
Defined in: packages/core/src/agent/certificate.ts:209
The agent used to sync time with the IC network, if the certificate fails the freshness check. If the agent does not implement the HttpAgent.getTimeDiffMsecs, HttpAgent.hasSyncedTime, HttpAgent.syncTime and HttpAgent.syncTimeWithSubnet methods, time will not be synced in case of a freshness check failure.
Default
Section titled “Default”undefinedblsVerify?
Section titled “blsVerify?”
optionalblsVerify?:VerifyFunc
Defined in: packages/core/src/agent/certificate.ts:187
BLS Verification strategy. Default strategy uses bls12_381 from @noble/curves
certificate
Section titled “certificate”certificate:
Uint8Array
Defined in: packages/core/src/agent/certificate.ts:174
The bytes encoding the certificate to be verified
disableTimeVerification?
Section titled “disableTimeVerification?”
optionaldisableTimeVerification?:boolean
Defined in: packages/core/src/agent/certificate.ts:201
Overrides the maxAgeInMinutes setting and skips comparing the client’s time against the certificate. Used for scenarios where the machine’s clock is known to be out of sync, or for inspecting expired certificates.
Default
Section titled “Default”falsemaxAgeInMinutes?
Section titled “maxAgeInMinutes?”
optionalmaxAgeInMinutes?:number
Defined in: packages/core/src/agent/certificate.ts:195
The maximum age of the certificate in minutes. Default is 5 minutes. This is used to verify the time the certificate was signed, particularly for validating Delegation certificates, which can live for longer than the default window of +/- 5 minutes. If the certificate is older than the specified age, it will fail verification.
Default
Section titled “Default”5principal
Section titled “principal”principal:
CertificatePrincipal
Defined in: packages/core/src/agent/certificate.ts:183
The principal for which the certificate is being verified.
rootKey
Section titled “rootKey”rootKey:
Uint8Array
Defined in: packages/core/src/agent/certificate.ts:179
The root key against which to verify the certificate (normally, the root key of the IC main network)
ExpirableStore
Section titled “ExpirableStore”Defined in: packages/core/src/agent/utils/expirableStore.ts:6
Generic interface for a key-value store with time-based expiration. Keys are strings, values are of type V. Implementations must handle expiration internally.
Type Parameters
Section titled “Type Parameters”V
Properties
Section titled “Properties”expirationTime
Section titled “expirationTime”
readonlyexpirationTime:number
Defined in: packages/core/src/agent/utils/expirableStore.ts:10
Time in milliseconds after which entries expire.
Methods
Section titled “Methods”delete()
Section titled “delete()”delete(
key):Promise<void>
Defined in: packages/core/src/agent/utils/expirableStore.ts:27
Delete the entry for a key.
Parameters
Section titled “Parameters”string
Returns
Section titled “Returns”Promise<void>
get(
key):Promise<V|undefined>
Defined in: packages/core/src/agent/utils/expirableStore.ts:16
Get the value for a key. Returns undefined if the key is not present or has expired.
Parameters
Section titled “Parameters”string
Returns
Section titled “Returns”Promise<V | undefined>
set(
key,value):Promise<void>
Defined in: packages/core/src/agent/utils/expirableStore.ts:22
Store a value for a key. Prunes expired entries before inserting.
Parameters
Section titled “Parameters”string
V
Returns
Section titled “Returns”Promise<void>
HttpAgentBaseRequest
Section titled “HttpAgentBaseRequest”Defined in: packages/core/src/agent/agent/http/types.ts:21
Extended by
Section titled “Extended by”Properties
Section titled “Properties”endpoint
Section titled “endpoint”
readonlyendpoint:Endpoint
Defined in: packages/core/src/agent/agent/http/types.ts:22
request
Section titled “request”request:
RequestInit
Defined in: packages/core/src/agent/agent/http/types.ts:23
HttpAgentOptions
Section titled “HttpAgentOptions”Defined in: packages/core/src/agent/agent/http/index.ts:132
Properties
Section titled “Properties”backoffStrategy?
Section titled “backoffStrategy?”
optionalbackoffStrategy?:BackoffStrategyFactory
Defined in: packages/core/src/agent/agent/http/index.ts:179
The strategy to use for backoff when retrying requests
callOptions?
Section titled “callOptions?”
optionalcallOptions?:Record<string,unknown>
Defined in: packages/core/src/agent/agent/http/index.ts:142
credentials?
Section titled “credentials?”
optionalcredentials?:object
Defined in: packages/core/src/agent/agent/http/index.ts:158
name:
string
password?
Section titled “password?”
optionalpassword?:string
fetch?
Section titled “fetch?”
optionalfetch?: {(input,init?):Promise<Response>; (input,init?):Promise<Response>; }
Defined in: packages/core/src/agent/agent/http/index.ts:134
Call Signature
Section titled “Call Signature”(
input,init?):Promise<Response>
Parameters
Section titled “Parameters”URL | RequestInfo
RequestInit
Returns
Section titled “Returns”Promise<Response>
Call Signature
Section titled “Call Signature”(
input,init?):Promise<Response>
Parameters
Section titled “Parameters”string | URL | Request
RequestInit
Returns
Section titled “Returns”Promise<Response>
fetchOptions?
Section titled “fetchOptions?”
optionalfetchOptions?:Record<string,unknown>
Defined in: packages/core/src/agent/agent/http/index.ts:139
optionalhost?:string
Defined in: packages/core/src/agent/agent/http/index.ts:146
identity?
Section titled “identity?”Defined in: packages/core/src/agent/agent/http/index.ts:150
ingressExpiryInMinutes?
Section titled “ingressExpiryInMinutes?”
optionalingressExpiryInMinutes?:number
Defined in: packages/core/src/agent/agent/http/index.ts:156
The maximum time a request can be delayed before being rejected.
Default
Section titled “Default”5 minuteslogToConsole?
Section titled “logToConsole?”
optionallogToConsole?:boolean
Defined in: packages/core/src/agent/agent/http/index.ts:194
Whether to log to the console. Defaults to false.
retryTimes?
Section titled “retryTimes?”
optionalretryTimes?:number
Defined in: packages/core/src/agent/agent/http/index.ts:175
Number of times to retry requests before throwing an error
Default
Section titled “Default”3rootKey?
Section titled “rootKey?”
optionalrootKey?:Uint8Array<ArrayBufferLike>
Defined in: packages/core/src/agent/agent/http/index.ts:199
Alternate root key to use for verifying certificates. If not provided, the default IC root key will be used.
shouldFetchRootKey?
Section titled “shouldFetchRootKey?”
optionalshouldFetchRootKey?:boolean
Defined in: packages/core/src/agent/agent/http/index.ts:204
Whether or not the root key should be automatically fetched during construction. Defaults to false.
shouldSyncTime?
Section titled “shouldSyncTime?”
optionalshouldSyncTime?:boolean
Defined in: packages/core/src/agent/agent/http/index.ts:209
Whether or not to sync the time with the network during construction. Defaults to false.
subnetNodeKeyExpirableStore?
Section titled “subnetNodeKeyExpirableStore?”
optionalsubnetNodeKeyExpirableStore?:ExpirableStore<SubnetNodeKeys>
Defined in: packages/core/src/agent/agent/http/index.ts:190
Custom store for caching subnet node keys. Allows sharing the cache across multiple HttpAgent instances. Defaults to IndexedDB in browser environments, in-memory otherwise.
useQueryNonces?
Section titled “useQueryNonces?”
optionaluseQueryNonces?:boolean
Defined in: packages/core/src/agent/agent/http/index.ts:170
Adds a unique Nonce with each query. Enabling will prevent queries from being answered with a cached response.
Example
Section titled “Example”const agent = new HttpAgent({ useQueryNonces: true });agent.addTransform(makeNonceTransform(makeNonce);Default
Section titled “Default”falseverifyQuerySignatures?
Section titled “verifyQuerySignatures?”
optionalverifyQuerySignatures?:boolean
Defined in: packages/core/src/agent/agent/http/index.ts:184
Whether the agent should verify signatures signed by node keys on query responses. Increases security, but adds overhead and must make a separate request to cache the node keys for the canister’s subnet.
Default
Section titled “Default”trueHttpAgentQueryRequest
Section titled “HttpAgentQueryRequest”Defined in: packages/core/src/agent/agent/http/types.ts:33
Extends
Section titled “Extends”Properties
Section titled “Properties”body:
ReadRequest
Defined in: packages/core/src/agent/agent/http/types.ts:35
endpoint
Section titled “endpoint”
readonlyendpoint:Query
Defined in: packages/core/src/agent/agent/http/types.ts:34
Overrides
Section titled “Overrides”request
Section titled “request”request:
RequestInit
Defined in: packages/core/src/agent/agent/http/types.ts:23
Inherited from
Section titled “Inherited from”HttpAgentReadStateRequest
Section titled “HttpAgentReadStateRequest”Defined in: packages/core/src/agent/agent/http/types.ts:38
Extends
Section titled “Extends”Properties
Section titled “Properties”body:
ReadRequest
Defined in: packages/core/src/agent/agent/http/types.ts:40
endpoint
Section titled “endpoint”
readonlyendpoint:ReadState
Defined in: packages/core/src/agent/agent/http/types.ts:39
Overrides
Section titled “Overrides”request
Section titled “request”request:
RequestInit
Defined in: packages/core/src/agent/agent/http/types.ts:23
Inherited from
Section titled “Inherited from”HttpAgentRequestTransformFn()
Section titled “HttpAgentRequestTransformFn()”Defined in: packages/core/src/agent/agent/http/types.ts:55
HttpAgentRequestTransformFn(
args):Promise<void|HttpAgentRequest|undefined>
Defined in: packages/core/src/agent/agent/http/types.ts:56
Parameters
Section titled “Parameters”Returns
Section titled “Returns”Promise<void | HttpAgentRequest | undefined>
Properties
Section titled “Properties”priority?
Section titled “priority?”
optionalpriority?:number
Defined in: packages/core/src/agent/agent/http/types.ts:57
HttpAgentSubmitRequest
Section titled “HttpAgentSubmitRequest”Defined in: packages/core/src/agent/agent/http/types.ts:28
Extends
Section titled “Extends”Properties
Section titled “Properties”body:
CallRequest
Defined in: packages/core/src/agent/agent/http/types.ts:30
endpoint
Section titled “endpoint”
readonlyendpoint:Call
Defined in: packages/core/src/agent/agent/http/types.ts:29
Overrides
Section titled “Overrides”request
Section titled “request”request:
RequestInit
Defined in: packages/core/src/agent/agent/http/types.ts:23
Inherited from
Section titled “Inherited from”HttpDetailsResponse
Section titled “HttpDetailsResponse”Defined in: packages/core/src/agent/agent/api.ts:40
Properties
Section titled “Properties”headers
Section titled “headers”headers:
HttpHeaderField[]
Defined in: packages/core/src/agent/agent/api.ts:44
ok:
boolean
Defined in: packages/core/src/agent/agent/api.ts:41
status
Section titled “status”status:
number
Defined in: packages/core/src/agent/agent/api.ts:42
statusText
Section titled “statusText”statusText:
string
Defined in: packages/core/src/agent/agent/api.ts:43
Identity
Section titled “Identity”Defined in: packages/core/src/agent/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.
Methods
Section titled “Methods”getPrincipal()
Section titled “getPrincipal()”getPrincipal():
Principal
Defined in: packages/core/src/agent/auth.ts:44
Get the principal represented by this identity. Normally should be a
Principal.selfAuthenticating().
Returns
Section titled “Returns”transformRequest()
Section titled “transformRequest()”transformRequest(
request):Promise<unknown>
Defined in: packages/core/src/agent/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.
Parameters
Section titled “Parameters”request
Section titled “request”Returns
Section titled “Returns”Promise<unknown>
JsonnableExpiry
Section titled “JsonnableExpiry”Defined in: packages/core/src/agent/agent/http/expiry.ts:20
Properties
Section titled “Properties”__expiry__
Section titled “__expiry__”__expiry__:
string
Defined in: packages/core/src/agent/agent/http/expiry.ts:21
KeyPair
Section titled “KeyPair”Defined in: packages/core/src/agent/auth.ts:9
A Key Pair, containing a secret and public key.
Properties
Section titled “Properties”publicKey
Section titled “publicKey”publicKey:
PublicKey
Defined in: packages/core/src/agent/auth.ts:11
secretKey
Section titled “secretKey”secretKey:
Uint8Array
Defined in: packages/core/src/agent/auth.ts:10
LookupLabelResultAbsent
Section titled “LookupLabelResultAbsent”Defined in: packages/core/src/agent/certificate.ts:579
Properties
Section titled “Properties”status
Section titled “status”status:
Absent
Defined in: packages/core/src/agent/certificate.ts:580
LookupLabelResultFound
Section titled “LookupLabelResultFound”Defined in: packages/core/src/agent/certificate.ts:587
Properties
Section titled “Properties”status
Section titled “status”status:
Found
Defined in: packages/core/src/agent/certificate.ts:588
value:
HashTree
Defined in: packages/core/src/agent/certificate.ts:589
LookupLabelResultGreater
Section titled “LookupLabelResultGreater”Defined in: packages/core/src/agent/certificate.ts:592
Properties
Section titled “Properties”status
Section titled “status”status:
Greater
Defined in: packages/core/src/agent/certificate.ts:593
LookupLabelResultLess
Section titled “LookupLabelResultLess”Defined in: packages/core/src/agent/certificate.ts:596
Properties
Section titled “Properties”status
Section titled “status”status:
Less
Defined in: packages/core/src/agent/certificate.ts:597
LookupLabelResultUnknown
Section titled “LookupLabelResultUnknown”Defined in: packages/core/src/agent/certificate.ts:583
Properties
Section titled “Properties”status
Section titled “status”status:
Unknown
Defined in: packages/core/src/agent/certificate.ts:584
LookupPathResultAbsent
Section titled “LookupPathResultAbsent”Defined in: packages/core/src/agent/certificate.ts:524
Properties
Section titled “Properties”status
Section titled “status”status:
Absent
Defined in: packages/core/src/agent/certificate.ts:525
LookupPathResultError
Section titled “LookupPathResultError”Defined in: packages/core/src/agent/certificate.ts:537
Properties
Section titled “Properties”status
Section titled “status”status:
Error
Defined in: packages/core/src/agent/certificate.ts:538
LookupPathResultFound
Section titled “LookupPathResultFound”Defined in: packages/core/src/agent/certificate.ts:532
Properties
Section titled “Properties”status
Section titled “status”status:
Found
Defined in: packages/core/src/agent/certificate.ts:533
value:
Uint8Array
Defined in: packages/core/src/agent/certificate.ts:534
LookupPathResultUnknown
Section titled “LookupPathResultUnknown”Defined in: packages/core/src/agent/certificate.ts:528
Properties
Section titled “Properties”status
Section titled “status”status:
Unknown
Defined in: packages/core/src/agent/certificate.ts:529
LookupSubtreeResultAbsent
Section titled “LookupSubtreeResultAbsent”Defined in: packages/core/src/agent/certificate.ts:553
Properties
Section titled “Properties”status
Section titled “status”status:
Absent
Defined in: packages/core/src/agent/certificate.ts:554
LookupSubtreeResultFound
Section titled “LookupSubtreeResultFound”Defined in: packages/core/src/agent/certificate.ts:561
Properties
Section titled “Properties”status
Section titled “status”status:
Found
Defined in: packages/core/src/agent/certificate.ts:562
value:
HashTree
Defined in: packages/core/src/agent/certificate.ts:563
LookupSubtreeResultUnknown
Section titled “LookupSubtreeResultUnknown”Defined in: packages/core/src/agent/certificate.ts:557
Properties
Section titled “Properties”status
Section titled “status”status:
Unknown
Defined in: packages/core/src/agent/certificate.ts:558
NodeSignature
Section titled “NodeSignature”Defined in: packages/core/src/agent/agent/api.ts:57
Properties
Section titled “Properties”identity
Section titled “identity”identity:
Uint8Array
Defined in: packages/core/src/agent/agent/api.ts:63
signature
Section titled “signature”signature:
Uint8Array
Defined in: packages/core/src/agent/agent/api.ts:61
timestamp
Section titled “timestamp”timestamp:
bigint
Defined in: packages/core/src/agent/agent/api.ts:59
PollForResponseResult
Section titled “PollForResponseResult”Defined in: packages/core/src/agent/polling/types.ts:21
The result of polling for a response, including the certificate, reply bytes, and raw certificate bytes.
Extended by
Section titled “Extended by”Properties
Section titled “Properties”certificate
Section titled “certificate”certificate:
Certificate
Defined in: packages/core/src/agent/polling/types.ts:23
The certificate for the request, which can be used to verify the reply.
rawCertificate
Section titled “rawCertificate”rawCertificate:
Uint8Array
Defined in: packages/core/src/agent/polling/types.ts:27
The raw certificate bytes for the request.
reply:
Uint8Array
Defined in: packages/core/src/agent/polling/types.ts:25
The reply bytes for the request.
PollingCallContext
Section titled “PollingCallContext”Defined in: packages/core/src/agent/errors.ts:36
Call context for errors that arise during polling.
Extended by
Section titled “Extended by”Properties
Section titled “Properties”canisterId
Section titled “canisterId”canisterId:
Principal
Defined in: packages/core/src/agent/errors.ts:37
methodName
Section titled “methodName”methodName:
string
Defined in: packages/core/src/agent/errors.ts:38
PollingOptions
Section titled “PollingOptions”Defined in: packages/core/src/agent/polling/index.ts:39
Options for controlling polling behavior
Properties
Section titled “Properties”blsVerify?
Section titled “blsVerify?”
optionalblsVerify?:VerifyFunc
Defined in: packages/core/src/agent/polling/index.ts:56
Optional replacement function that verifies the BLS signature of a certificate.
preSignReadStateRequest?
Section titled “preSignReadStateRequest?”
optionalpreSignReadStateRequest?:boolean
Defined in: packages/core/src/agent/polling/index.ts:51
Whether to reuse the same signed request for polling or create a new unsigned request each time.
Default
Section titled “Default”falserequest?
Section titled “request?”
optionalrequest?:ReadStateRequest
Defined in: packages/core/src/agent/polling/index.ts:62
The request to use for polling. If not provided, a new request will be created.
This is only used if preSignReadStateRequest is set to false.
strategy?
Section titled “strategy?”
optionalstrategy?:PollStrategy
Defined in: packages/core/src/agent/polling/index.ts:45
A polling strategy that dictates how much and often we should poll the read_state endpoint to get the result of an update call.
Default
Section titled “Default”PublicKey
Section titled “PublicKey”Defined in: packages/core/src/agent/auth.ts:27
A Public Key implementation.
Properties
Section titled “Properties”derKey?
Section titled “derKey?”
optionalderKey?:DerEncodedPublicKey
Defined in: packages/core/src/agent/auth.ts:32
rawKey?
Section titled “rawKey?”
optionalrawKey?:Uint8Array<ArrayBufferLike>
Defined in: packages/core/src/agent/auth.ts:31
Methods
Section titled “Methods”toDer()
Section titled “toDer()”toDer():
DerEncodedPublicKey
Defined in: packages/core/src/agent/auth.ts:28
Returns
Section titled “Returns”toRaw()?
Section titled “toRaw()?”
optionaltoRaw():Uint8Array
Defined in: packages/core/src/agent/auth.ts:30
Returns
Section titled “Returns”Uint8Array
PublicKeyIdentityDescriptor
Section titled “PublicKeyIdentityDescriptor”Defined in: packages/core/src/agent/auth.ts:129
Properties
Section titled “Properties”publicKey
Section titled “publicKey”publicKey:
string
Defined in: packages/core/src/agent/auth.ts:131
type:
"PublicKeyIdentity"
Defined in: packages/core/src/agent/auth.ts:130
QueryFields
Section titled “QueryFields”Defined in: packages/core/src/agent/agent/api.ts:83
Options when doing a Agent.query call.
Properties
Section titled “Properties”arg:
Uint8Array
Defined in: packages/core/src/agent/agent/api.ts:92
A binary encoded argument. This is already encoded and will be sent as is.
effectiveCanisterId?
Section titled “effectiveCanisterId?”
optionaleffectiveCanisterId?:Principal
Defined in: packages/core/src/agent/agent/api.ts:97
Overrides canister id for path to fetch. This is used for management canister calls.
methodName
Section titled “methodName”methodName:
string
Defined in: packages/core/src/agent/agent/api.ts:87
The method name to call.
QueryRequest
Section titled “QueryRequest”Defined in: packages/core/src/agent/agent/http/types.ts:85
Extends
Section titled “Extends”Record<string,any>
Indexable
Section titled “Indexable”[
key:string]:any
Properties
Section titled “Properties”arg:
Uint8Array
Defined in: packages/core/src/agent/agent/http/types.ts:89
canister_id
Section titled “canister_id”canister_id:
Principal
Defined in: packages/core/src/agent/agent/http/types.ts:87
ingress_expiry
Section titled “ingress_expiry”ingress_expiry:
Expiry
Defined in: packages/core/src/agent/agent/http/types.ts:91
method_name
Section titled “method_name”method_name:
string
Defined in: packages/core/src/agent/agent/http/types.ts:88
nonce?
Section titled “nonce?”
optionalnonce?:Nonce
Defined in: packages/core/src/agent/agent/http/types.ts:92
request_type
Section titled “request_type”request_type:
Query
Defined in: packages/core/src/agent/agent/http/types.ts:86
sender
Section titled “sender”sender:
Uint8Array<ArrayBufferLike> |Principal
Defined in: packages/core/src/agent/agent/http/types.ts:90
QueryResponseBase
Section titled “QueryResponseBase”Defined in: packages/core/src/agent/agent/api.ts:52
Extended by
Section titled “Extended by”Properties
Section titled “Properties”requestDetails?
Section titled “requestDetails?”
optionalrequestDetails?:QueryRequest
Defined in: packages/core/src/agent/agent/api.ts:54
status
Section titled “status”status:
QueryResponseStatus
Defined in: packages/core/src/agent/agent/api.ts:53
QueryResponseRejected
Section titled “QueryResponseRejected”Defined in: packages/core/src/agent/agent/api.ts:72
Extends
Section titled “Extends”Properties
Section titled “Properties”error_code
Section titled “error_code”error_code:
string
Defined in: packages/core/src/agent/agent/api.ts:76
reject_code
Section titled “reject_code”reject_code:
ReplicaRejectCode
Defined in: packages/core/src/agent/agent/api.ts:74
reject_message
Section titled “reject_message”reject_message:
string
Defined in: packages/core/src/agent/agent/api.ts:75
requestDetails?
Section titled “requestDetails?”
optionalrequestDetails?:QueryRequest
Defined in: packages/core/src/agent/agent/api.ts:54
Inherited from
Section titled “Inherited from”QueryResponseBase.requestDetails
signatures?
Section titled “signatures?”
optionalsignatures?:NodeSignature[]
Defined in: packages/core/src/agent/agent/api.ts:77
status
Section titled “status”status:
Rejected
Defined in: packages/core/src/agent/agent/api.ts:73
Overrides
Section titled “Overrides”QueryResponseReplied
Section titled “QueryResponseReplied”Defined in: packages/core/src/agent/agent/api.ts:66
Extends
Section titled “Extends”Properties
Section titled “Properties”reply:
object
Defined in: packages/core/src/agent/agent/api.ts:68
arg:
Uint8Array
requestDetails?
Section titled “requestDetails?”
optionalrequestDetails?:QueryRequest
Defined in: packages/core/src/agent/agent/api.ts:54
Inherited from
Section titled “Inherited from”QueryResponseBase.requestDetails
signatures?
Section titled “signatures?”
optionalsignatures?:NodeSignature[]
Defined in: packages/core/src/agent/agent/api.ts:69
status
Section titled “status”status:
Replied
Defined in: packages/core/src/agent/agent/api.ts:67
Overrides
Section titled “Overrides”ReadStateOptions
Section titled “ReadStateOptions”Defined in: packages/core/src/agent/agent/api.ts:23
Options when doing a Agent.readState call.
Properties
Section titled “Properties”paths:
Uint8Array<ArrayBufferLike>[][]
Defined in: packages/core/src/agent/agent/api.ts:27
A list of paths to read the state of.
ReadStateRequest
Section titled “ReadStateRequest”Defined in: packages/core/src/agent/agent/http/types.ts:96
Extends
Section titled “Extends”Record<string,any>
Indexable
Section titled “Indexable”[
key:string]:any
Properties
Section titled “Properties”ingress_expiry
Section titled “ingress_expiry”ingress_expiry:
Expiry
Defined in: packages/core/src/agent/agent/http/types.ts:99
paths:
Uint8Array<ArrayBufferLike>[][]
Defined in: packages/core/src/agent/agent/http/types.ts:98
request_type
Section titled “request_type”request_type:
ReadState
Defined in: packages/core/src/agent/agent/http/types.ts:97
sender
Section titled “sender”sender:
Uint8Array<ArrayBufferLike> |Principal
Defined in: packages/core/src/agent/agent/http/types.ts:100
ReadStateResponse
Section titled “ReadStateResponse”Defined in: packages/core/src/agent/agent/api.ts:144
Properties
Section titled “Properties”certificate
Section titled “certificate”certificate:
Uint8Array
Defined in: packages/core/src/agent/agent/api.ts:145
RequestContext
Section titled “RequestContext”Defined in: packages/core/src/agent/errors.ts:26
Properties
Section titled “Properties”ingressExpiry
Section titled “ingressExpiry”ingressExpiry:
Expiry
Defined in: packages/core/src/agent/errors.ts:30
requestId?
Section titled “requestId?”
optionalrequestId?:RequestId
Defined in: packages/core/src/agent/errors.ts:27
senderPubKey
Section titled “senderPubKey”senderPubKey:
Uint8Array
Defined in: packages/core/src/agent/errors.ts:28
senderSignature
Section titled “senderSignature”senderSignature:
Uint8Array
Defined in: packages/core/src/agent/errors.ts:29
Signed
Section titled “Signed”Defined in: packages/core/src/agent/agent/http/types.ts:43
Type Parameters
Section titled “Type Parameters”T
Properties
Section titled “Properties”content
Section titled “content”content:
T
Defined in: packages/core/src/agent/agent/http/types.ts:44
sender_pubkey
Section titled “sender_pubkey”sender_pubkey:
ArrayBuffer
Defined in: packages/core/src/agent/agent/http/types.ts:45
sender_sig
Section titled “sender_sig”sender_sig:
ArrayBuffer
Defined in: packages/core/src/agent/agent/http/types.ts:46
SubmitResponse
Section titled “SubmitResponse”Defined in: packages/core/src/agent/agent/api.ts:180
Properties
Section titled “Properties”requestDetails?
Section titled “requestDetails?”
optionalrequestDetails?:CallRequest
Defined in: packages/core/src/agent/agent/api.ts:189
requestId
Section titled “requestId”requestId:
RequestId
Defined in: packages/core/src/agent/agent/api.ts:181
response
Section titled “response”response:
object
Defined in: packages/core/src/agent/agent/api.ts:182
body:
v2ResponseBody|v4ResponseBody|null
headers
Section titled “headers”headers:
HttpHeaderField[]
ok:
boolean
status
Section titled “status”status:
number
statusText
Section titled “statusText”statusText:
string
UnSigned
Section titled “UnSigned”Defined in: packages/core/src/agent/agent/http/types.ts:49
Type Parameters
Section titled “Type Parameters”T
Properties
Section titled “Properties”content
Section titled “content”content:
T
Defined in: packages/core/src/agent/agent/http/types.ts:50
UpdateOptions
Section titled “UpdateOptions”Defined in: packages/core/src/agent/agent/api.ts:131
Options when doing a Agent.call call.
Extends
Section titled “Extends”Properties
Section titled “Properties”arg:
Uint8Array
Defined in: packages/core/src/agent/agent/api.ts:112
A binary encoded argument. This is already encoded and will be sent as is.
Inherited from
Section titled “Inherited from”callSync?
Section titled “callSync?”
optionalcallSync?:boolean
Defined in: packages/core/src/agent/agent/api.ts:123
Whether to use synchronous call mode. Defaults to true.
Inherited from
Section titled “Inherited from”effectiveCanisterId
Section titled “effectiveCanisterId”effectiveCanisterId:
string|Principal
Defined in: packages/core/src/agent/agent/api.ts:118
An effective canister ID, used for routing. Usually the canister ID, except for management canister calls.
https://internetcomputer.org/docs/current/references/ic-interface-spec/#http-effective-canister-id
Inherited from
Section titled “Inherited from”CallOptions.effectiveCanisterId
methodName
Section titled “methodName”methodName:
string
Defined in: packages/core/src/agent/agent/api.ts:107
The method name to call.
Inherited from
Section titled “Inherited from”nonce?
Section titled “nonce?”
optionalnonce?:Uint8Array<ArrayBufferLike>
Defined in: packages/core/src/agent/agent/api.ts:128
An optional nonce to use for the call, used to prevent replay attacks.
Inherited from
Section titled “Inherited from”onPollingStarted?
Section titled “onPollingStarted?”
optionalonPollingStarted?: () =>void
Defined in: packages/core/src/agent/agent/api.ts:141
An optional callback that will be invoked once the agent starts polling for the result of the update call.
If callSync is set to false, polling will start, and the callback will be invoked, once the
request has been accepted by a single node. If callSync is set to true, the IC will first
try to process the request synchronously. But if the synchronous request timeout is exceeded,
the agent will start polling for the result, at which point the callback will be invoked.
Returns
Section titled “Returns”void
UpdateResult
Section titled “UpdateResult”Defined in: packages/core/src/agent/agent/api.ts:196
The result of Agent.update, extending PollForResponseResult with the request details and raw HTTP response from the call.
Extends
Section titled “Extends”Properties
Section titled “Properties”callResponse
Section titled “callResponse”callResponse:
object
Defined in: packages/core/src/agent/agent/api.ts:200
The raw HTTP response from the call endpoint.
body:
v2ResponseBody|v4ResponseBody|null
headers
Section titled “headers”headers:
HttpHeaderField[]
ok:
boolean
status
Section titled “status”status:
number
statusText
Section titled “statusText”statusText:
string
certificate
Section titled “certificate”certificate:
Certificate
Defined in: packages/core/src/agent/polling/types.ts:23
The certificate for the request, which can be used to verify the reply.
Inherited from
Section titled “Inherited from”PollForResponseResult.certificate
rawCertificate
Section titled “rawCertificate”rawCertificate:
Uint8Array
Defined in: packages/core/src/agent/polling/types.ts:27
The raw certificate bytes for the request.
Inherited from
Section titled “Inherited from”PollForResponseResult.rawCertificate
reply:
Uint8Array
Defined in: packages/core/src/agent/polling/types.ts:25
The reply bytes for the request.
Inherited from
Section titled “Inherited from”requestDetails?
Section titled “requestDetails?”
optionalrequestDetails?:CallRequest
Defined in: packages/core/src/agent/agent/api.ts:198
The request details from the call, if available.
v2ResponseBody
Section titled “v2ResponseBody”Defined in: packages/core/src/agent/agent/api.ts:148
Properties
Section titled “Properties”error_code?
Section titled “error_code?”
optionalerror_code?:string
Defined in: packages/core/src/agent/agent/api.ts:149
reject_code
Section titled “reject_code”reject_code:
number
Defined in: packages/core/src/agent/agent/api.ts:150
reject_message
Section titled “reject_message”reject_message:
string
Defined in: packages/core/src/agent/agent/api.ts:151
v4ResponseBody
Section titled “v4ResponseBody”Defined in: packages/core/src/agent/agent/api.ts:165
Properties
Section titled “Properties”certificate
Section titled “certificate”certificate:
Uint8Array
Defined in: packages/core/src/agent/agent/api.ts:166
Type Aliases
Section titled “Type Aliases”ActorConstructor
Section titled “ActorConstructor”ActorConstructor = (
config) =>ActorSubclass
Defined in: packages/core/src/agent/actor.ts:375
Parameters
Section titled “Parameters”config
Section titled “config”Returns
Section titled “Returns”ActorMethodMappedExtended
Section titled “ActorMethodMappedExtended”ActorMethodMappedExtended<
T> ={ [K in keyof T]: T[K] extends FunctionWithArgsAndReturn<infer Args, infer Ret> ? ActorMethodExtended<Args, Ret> : never }
Defined in: packages/core/src/agent/actor.ts:155
Type Parameters
Section titled “Type Parameters”T
ActorMethodMappedWithHttpDetails
Section titled “ActorMethodMappedWithHttpDetails”ActorMethodMappedWithHttpDetails<
T> ={ [K in keyof T]: T[K] extends FunctionWithArgsAndReturn<infer Args, infer Ret> ? ActorMethodWithHttpDetails<Args, Ret> : never }
Defined in: packages/core/src/agent/actor.ts:148
Type Parameters
Section titled “Type Parameters”T
ActorSubclass
Section titled “ActorSubclass”ActorSubclass<
T> =Actor&T
Defined in: packages/core/src/agent/actor.ts:108
A subclass of an actor. Actor class itself is meant to be a based class.
Type Parameters
Section titled “Type Parameters”T = Record<string, ActorMethod>
AgentLog
Section titled “AgentLog”AgentLog = {
level:"warn"|"info";message:string; } | {error:AgentError;level:"error";message:string; }
Defined in: packages/core/src/agent/observable.ts:25
ApiQueryResponse
Section titled “ApiQueryResponse”ApiQueryResponse =
QueryResponse&object
Defined in: packages/core/src/agent/agent/api.ts:47
Type Declaration
Section titled “Type Declaration”httpDetails
Section titled “httpDetails”httpDetails:
HttpDetailsResponse
requestId
Section titled “requestId”requestId:
RequestId
CanisterRanges
Section titled “CanisterRanges”Defined in: packages/core/src/agent/certificate.ts:886
Canister ranges in the form of an array of [start, end] principal tuples, usually decoded from the certificate.
CertificatePrincipal
Section titled “CertificatePrincipal”CertificatePrincipal = {
canisterId:Principal; } | {subnetId:Principal; }
Defined in: packages/core/src/agent/certificate.ts:155
Union Members
Section titled “Union Members”Type Literal
Section titled “Type Literal”{ canisterId: Principal; }
canisterId
Section titled “canisterId”canisterId:
Principal
The effective canister ID of the request when verifying a response, or the signing canister ID when verifying a certified variable.
Type Literal
Section titled “Type Literal”{ subnetId: Principal; }
subnetId
Section titled “subnetId”subnetId:
Principal
The subnet ID when verifying a certificate from a subnet.
DerEncodedPublicKey
Section titled “DerEncodedPublicKey”DerEncodedPublicKey =
Uint8Array&object
Defined in: packages/core/src/agent/auth.ts:17
A public key that is DER encoded. This is a branded Uint8Array.
Type Declaration
Section titled “Type Declaration”__derEncodedPublicKey__?
Section titled “__derEncodedPublicKey__?”
optional__derEncodedPublicKey__?:void
EmptyHashTree
Section titled “EmptyHashTree”EmptyHashTree = [
Empty]
Defined in: packages/core/src/agent/certificate.ts:60
Envelope
Section titled “Envelope”Defined in: packages/core/src/agent/agent/http/types.ts:53
Type Parameters
Section titled “Type Parameters”T
ForkHashTree
Section titled “ForkHashTree”Defined in: packages/core/src/agent/certificate.ts:61
FunctionWithArgsAndReturn
Section titled “FunctionWithArgsAndReturn”FunctionWithArgsAndReturn<
Args,Ret> = (…args) =>Ret
Defined in: packages/core/src/agent/actor.ts:143
Type Parameters
Section titled “Type Parameters”Args extends unknown[] = unknown[]
Ret = unknown
Parameters
Section titled “Parameters”…Args
Returns
Section titled “Returns”Ret
HashTree
Section titled “HashTree”HashTree =
EmptyHashTree|ForkHashTree|LabeledHashTree|LeafHashTree|PrunedHashTree
Defined in: packages/core/src/agent/certificate.ts:66
HttpAgentRequest
Section titled “HttpAgentRequest”HttpAgentRequest =
HttpAgentQueryRequest|HttpAgentSubmitRequest|HttpAgentReadStateRequest
Defined in: packages/core/src/agent/agent/http/types.ts:16
HttpHeaderField
Section titled “HttpHeaderField”HttpHeaderField = [
string,string]
Defined in: packages/core/src/agent/agent/http/types.ts:26
IdentityDescriptor
Section titled “IdentityDescriptor”IdentityDescriptor =
AnonymousIdentityDescriptor|PublicKeyIdentityDescriptor
Defined in: packages/core/src/agent/auth.ts:133
LabeledHashTree
Section titled “LabeledHashTree”Defined in: packages/core/src/agent/certificate.ts:62
LabelLookupResult
Section titled “LabelLookupResult”LabelLookupResult =
LookupLabelResultAbsent|LookupLabelResultUnknown|LookupLabelResultFound|LookupLabelResultGreater|LookupLabelResultLess
Defined in: packages/core/src/agent/certificate.ts:600
LeafHashTree
Section titled “LeafHashTree”Defined in: packages/core/src/agent/certificate.ts:63
LookupResult
Section titled “LookupResult”LookupResult =
LookupPathResultAbsent|LookupPathResultUnknown|LookupPathResultFound|LookupPathResultError
Defined in: packages/core/src/agent/certificate.ts:541
NodeHash
Section titled “NodeHash”NodeHash =
Uint8Array&object
Defined in: packages/core/src/agent/certificate.ts:58
Type Declaration
Section titled “Type Declaration”__nodeHash__
Section titled “__nodeHash__”__nodeHash__:
void
NodeLabel
Section titled “NodeLabel”NodeLabel =
Uint8Array&object
Defined in: packages/core/src/agent/certificate.ts:56
Type Declaration
Section titled “Type Declaration”__nodeLabel__
Section titled “__nodeLabel__”__nodeLabel__:
void
NodePath
Section titled “NodePath”NodePath = (
Uint8Array|string)[]
Defined in: packages/core/src/agent/certificate.ts:55
NodeValue
Section titled “NodeValue”NodeValue =
Uint8Array&object
Defined in: packages/core/src/agent/certificate.ts:57
Type Declaration
Section titled “Type Declaration”__nodeValue__
Section titled “__nodeValue__”__nodeValue__:
void
Nonce =
Uint8Array&object
Defined in: packages/core/src/agent/agent/http/types.ts:125
Type Declaration
Section titled “Type Declaration”__nonce__
Section titled “__nonce__”__nonce__:
void
ObserveFunction
Section titled “ObserveFunction”ObserveFunction<
T> = (data, …rest) =>void
Defined in: packages/core/src/agent/observable.ts:3
Type Parameters
Section titled “Type Parameters”T
Parameters
Section titled “Parameters”T
…unknown[]
Returns
Section titled “Returns”void
PollStrategy
Section titled “PollStrategy”PollStrategy = (
canisterId,requestId,status) =>Promise<void>
Defined in: packages/core/src/agent/polling/types.ts:6
Parameters
Section titled “Parameters”canisterId
Section titled “canisterId”requestId
Section titled “requestId”status
Section titled “status”Returns
Section titled “Returns”Promise<void>
PrunedHashTree
Section titled “PrunedHashTree”Defined in: packages/core/src/agent/certificate.ts:64
QueryResponse
Section titled “QueryResponse”QueryResponse =
QueryResponseReplied|QueryResponseRejected
Defined in: packages/core/src/agent/agent/api.ts:33
QueryStrategy
Section titled “QueryStrategy”QueryStrategy =
"query"|"update"
Defined in: packages/core/src/agent/actor.ts:25
Controls how query and composite_query methods are executed.
'query'— standard non-replicated query call (default).'update'— send query methods as update calls that go through consensus.
ReadRequest
Section titled “ReadRequest”ReadRequest =
QueryRequest|ReadStateRequest
Defined in: packages/core/src/agent/agent/http/types.ts:103
RequestId
Section titled “RequestId”RequestId =
Uint8Array&object
Defined in: packages/core/src/agent/request_id.ts:8
Type Declaration
Section titled “Type Declaration”__requestId__
Section titled “__requestId__”__requestId__:
void
Signature
Section titled “Signature”Signature =
Uint8Array&object
Defined in: packages/core/src/agent/auth.ts:22
A signature array buffer.
Type Declaration
Section titled “Type Declaration”__signature__
Section titled “__signature__”__signature__:
void
SubtreeLookupResult
Section titled “SubtreeLookupResult”SubtreeLookupResult =
LookupSubtreeResultAbsent|LookupSubtreeResultUnknown|LookupSubtreeResultFound
Defined in: packages/core/src/agent/certificate.ts:566
Variables
Section titled “Variables”ACTOR_METHOD_WITH_CERTIFICATE
Section titled “ACTOR_METHOD_WITH_CERTIFICATE”
constACTOR_METHOD_WITH_CERTIFICATE:"certificate"='certificate'
Defined in: packages/core/src/agent/actor.ts:378
ACTOR_METHOD_WITH_HTTP_DETAILS
Section titled “ACTOR_METHOD_WITH_HTTP_DETAILS”
constACTOR_METHOD_WITH_HTTP_DETAILS:"http-details"='http-details'
Defined in: packages/core/src/agent/actor.ts:377
BLS12_381_G2_OID
Section titled “BLS12_381_G2_OID”
constBLS12_381_G2_OID:Uint8Array<ArrayBuffer>
Defined in: packages/core/src/agent/der.ts:116
constCbor:object
Defined in: packages/core/src/agent/cbor.ts:60
Type Declaration
Section titled “Type Declaration”decode
Section titled “decode”decode: <
T>(input) =>T
Decode a CBOR encoded value into a JavaScript value.
Type Parameters
Section titled “Type Parameters”T
Parameters
Section titled “Parameters”Uint8Array
The CBOR encoded value
Returns
Section titled “Returns”T
encode
Section titled “encode”encode: (
value) =>Uint8Array
Encode a JavaScript value into CBOR. If the value is an instance of ToCborValue, the ToCborValue.toCborValue method will be called to get the value to encode.
Parameters
Section titled “Parameters”unknown
The value to encode
Returns
Section titled “Returns”Uint8Array
DEFAULT_POLLING_OPTIONS
Section titled “DEFAULT_POLLING_OPTIONS”
constDEFAULT_POLLING_OPTIONS:PollingOptions
Defined in: packages/core/src/agent/polling/index.ts:65
DER_COSE_OID
Section titled “DER_COSE_OID”
constDER_COSE_OID:Uint8Array<ArrayBuffer>
Defined in: packages/core/src/agent/der.ts:90
A DER encoded SEQUENCE(OID) for DER-encoded-COSE
ED25519_OID
Section titled “ED25519_OID”
constED25519_OID:Uint8Array<ArrayBuffer>
Defined in: packages/core/src/agent/der.ts:99
A DER encoded SEQUENCE(OID) for the Ed25519 algorithm
IC_REQUEST_AUTH_DELEGATION_DOMAIN_SEPARATOR
Section titled “IC_REQUEST_AUTH_DELEGATION_DOMAIN_SEPARATOR”
constIC_REQUEST_AUTH_DELEGATION_DOMAIN_SEPARATOR:Uint8Array<ArrayBuffer>
Defined in: packages/core/src/agent/constants.ts:22
The \x1Aic-request-auth-delegation domain separator used in the signature of delegations.
IC_REQUEST_DOMAIN_SEPARATOR
Section titled “IC_REQUEST_DOMAIN_SEPARATOR”
constIC_REQUEST_DOMAIN_SEPARATOR:Uint8Array<ArrayBuffer>
Defined in: packages/core/src/agent/constants.ts:12
The \x0Aic-request domain separator used in the signature of IC requests.
IC_RESPONSE_DOMAIN_SEPARATOR
Section titled “IC_RESPONSE_DOMAIN_SEPARATOR”
constIC_RESPONSE_DOMAIN_SEPARATOR:Uint8Array<ArrayBuffer>
Defined in: packages/core/src/agent/constants.ts:17
The \x0Bic-response domain separator used in the signature of IC responses.
IC_ROOT_KEY
Section titled “IC_ROOT_KEY”
constIC_ROOT_KEY:string
Defined in: packages/core/src/agent/agent/http/index.ts:109
IC_STATE_ROOT_DOMAIN_SEPARATOR
Section titled “IC_STATE_ROOT_DOMAIN_SEPARATOR”
constIC_STATE_ROOT_DOMAIN_SEPARATOR:Uint8Array<ArrayBuffer>
Defined in: packages/core/src/agent/constants.ts:7
The \x0Dic-state-root domain separator used in the root hash of IC certificates.
JSON_KEY_EXPIRY
Section titled “JSON_KEY_EXPIRY”
constJSON_KEY_EXPIRY:"__expiry__"='__expiry__'
Defined in: packages/core/src/agent/agent/http/expiry.ts:4
MANAGEMENT_CANISTER_ID
Section titled “MANAGEMENT_CANISTER_ID”
constMANAGEMENT_CANISTER_ID:"aaaaa-aa"='aaaaa-aa'
Defined in: packages/core/src/agent/agent/http/index.ts:115
SECP256K1_OID
Section titled “SECP256K1_OID”
constSECP256K1_OID:Uint8Array<ArrayBuffer>
Defined in: packages/core/src/agent/der.ts:108
A DER encoded SEQUENCE(OID) for secp256k1 with the ECDSA algorithm
UNREACHABLE_ERROR
Section titled “UNREACHABLE_ERROR”
constUNREACHABLE_ERROR:Error
Defined in: packages/core/src/agent/errors.ts:962
Special error used to indicate that a code path is unreachable.
For internal use only.
verify
Section titled “verify”verify: (
pk,sig,msg) =>boolean
Defined in: packages/core/src/agent/utils/bls.ts:4
Parameters
Section titled “Parameters”Uint8Array
Uint8Array
Uint8Array
Returns
Section titled “Returns”boolean
Functions
Section titled “Functions”blsVerify()
Section titled “blsVerify()”blsVerify(
pk,sig,msg):boolean
Defined in: packages/core/src/agent/utils/bls.ts:13
Parameters
Section titled “Parameters”Uint8Array
primary key: Uint8Array
Uint8Array
signature: Uint8Array
Uint8Array
message: Uint8Array
Returns
Section titled “Returns”boolean
boolean
calculateIngressExpiry()
Section titled “calculateIngressExpiry()”calculateIngressExpiry(
maxIngressExpiryInMinutes,timeDiffMsecs):Expiry
Defined in: packages/core/src/agent/agent/http/index.ts:1708
Calculates the ingress expiry time based on the maximum allowed expiry in minutes and the time difference in milliseconds. The expiry is rounded down according to the Expiry.fromDeltaInMilliseconds method.
Parameters
Section titled “Parameters”maxIngressExpiryInMinutes
Section titled “maxIngressExpiryInMinutes”number
The maximum ingress expiry time in minutes.
timeDiffMsecs
Section titled “timeDiffMsecs”number
The time difference in milliseconds to adjust the expiry.
Returns
Section titled “Returns”The calculated ingress expiry as an Expiry object.
check_canister_ranges()
Section titled “check_canister_ranges()”check_canister_ranges(
params):boolean
Defined in: packages/core/src/agent/certificate.ts:896
Check if a canister ID falls within the canister ranges of a given subnet
Parameters
Section titled “Parameters”params
Section titled “params”the parameters with which to check the canister ranges
Returns
Section titled “Returns”boolean
true if the canister is in the range, false otherwise
constructRequest()
Section titled “constructRequest()”constructRequest(
options):Promise<ReadStateRequest>
Defined in: packages/core/src/agent/polling/index.ts:219
Constructs a read state request for the given paths. If the request is already signed and has an expiry, it will be returned as is. Otherwise, a new request will be created.
Parameters
Section titled “Parameters”options
Section titled “options”The options to use for creating the request.
The agent to use to create the request.
Uint8Array<ArrayBufferLike>[][]
The paths to read from.
pollingOptions
Section titled “pollingOptions”The options to use for creating the request.
Returns
Section titled “Returns”Promise<ReadStateRequest>
The read state request.
createIdentityDescriptor()
Section titled “createIdentityDescriptor()”createIdentityDescriptor(
identity):IdentityDescriptor
Defined in: packages/core/src/agent/auth.ts:139
Create an IdentityDescriptor from an Identity
Parameters
Section titled “Parameters”identity
Section titled “identity”SignIdentity | AnonymousIdentity
identity describe in returned descriptor
Returns
Section titled “Returns”decodeCanisterRanges()
Section titled “decodeCanisterRanges()”decodeCanisterRanges(
lookupValue):CanisterRanges
Defined in: packages/core/src/agent/certificate.ts:973
Decode canister ranges from CBOR-encoded buffer
Parameters
Section titled “Parameters”lookupValue
Section titled “lookupValue”Uint8Array
the CBOR-encoded value read from the certificate
Returns
Section titled “Returns”an array of canister range tuples [start, end]
decodeLen()
Section titled “decodeLen()”decodeLen(
buf,offset):number
Defined in: packages/core/src/agent/der.ts:70
Parameters
Section titled “Parameters”Uint8Array
offset
Section titled “offset”number
Returns
Section titled “Returns”number
decodeLenBytes()
Section titled “decodeLenBytes()”decodeLenBytes(
buf,offset):number
Defined in: packages/core/src/agent/der.ts:51
Parameters
Section titled “Parameters”Uint8Array
offset
Section titled “offset”number
Returns
Section titled “Returns”number
domain_sep()
Section titled “domain_sep()”domain_sep(
s):Uint8Array
Defined in: packages/core/src/agent/certificate.ts:507
Creates a domain separator for hashing by encoding the input string with its length as a prefix.
Parameters
Section titled “Parameters”string
The input string to encode.
Returns
Section titled “Returns”Uint8Array
A Uint8Array containing the encoded domain separator.
encodeLen()
Section titled “encodeLen()”encodeLen(
buf,offset,len):number
Defined in: packages/core/src/agent/der.ts:25
Parameters
Section titled “Parameters”Uint8Array
offset
Section titled “offset”number
number
Returns
Section titled “Returns”number
encodeLenBytes()
Section titled “encodeLenBytes()”encodeLenBytes(
len):number
Defined in: packages/core/src/agent/der.ts:9
Parameters
Section titled “Parameters”number
Returns
Section titled “Returns”number
fetchCandid()
Section titled “fetchCandid()”fetchCandid(
canisterId,agent?):Promise<string>
Defined in: packages/core/src/agent/fetch_candid.ts:13
Retrieves the Candid interface for the specified canister.
Parameters
Section titled “Parameters”canisterId
Section titled “canisterId”string
A string corresponding to the canister ID
agent?
Section titled “agent?”The agent to use for the request (usually an HttpAgent)
Returns
Section titled “Returns”Promise<string>
Candid source code
find_label()
Section titled “find_label()”find_label(
label,tree):LabelLookupResult
Defined in: packages/core/src/agent/certificate.ts:750
Find a label in a tree
Parameters
Section titled “Parameters”the label to find
the tree to search
Returns
Section titled “Returns”the result of the label lookup
flatten_forks()
Section titled “flatten_forks()”flatten_forks(
t): (LabeledHashTree|LeafHashTree|PrunedHashTree)[]
Defined in: packages/core/src/agent/certificate.ts:733
If the tree is a fork, flatten it into an array of trees
Parameters
Section titled “Parameters”the tree to flatten
Returns
Section titled “Returns”(LabeledHashTree | LeafHashTree | PrunedHashTree)[]
the flattened tree
getSubnetIdFromCertificate()
Section titled “getSubnetIdFromCertificate()”getSubnetIdFromCertificate(
certificate,rootKey):Principal
Defined in: packages/core/src/agent/certificate.ts:1052
Get the subnet ID from a certificate If the certificate has a delegation, it returns the subnet ID from the delegation. If the certificate has no delegation, it returns the root subnet ID.
Parameters
Section titled “Parameters”certificate
Section titled “certificate”the certificate to get the subnet ID from
rootKey
Section titled “rootKey”Uint8Array
the root key to use to get the subnet ID
Returns
Section titled “Returns”the subnet ID
hashOfMap()
Section titled “hashOfMap()”hashOfMap(
map):Uint8Array
Defined in: packages/core/src/agent/request_id.ts:80
Hash a map into a Uint8Array using the representation-independent-hash function. https://sdk.dfinity.org/docs/interface-spec/index.html#hash-of-map
Parameters
Section titled “Parameters”Record<string, unknown>
Any non-nested object
Returns
Section titled “Returns”Uint8Array
Uint8Array
hashTreeToString()
Section titled “hashTreeToString()”hashTreeToString(
tree):string
Defined in: packages/core/src/agent/certificate.ts:77
Make a human readable string out of a hash tree.
Parameters
Section titled “Parameters”The hash tree to convert to a string
Returns
Section titled “Returns”string
hashValue()
Section titled “hashValue()”hashValue(
value):Uint8Array
Defined in: packages/core/src/agent/request_id.ts:19
Parameters
Section titled “Parameters”unknown
unknown value
Returns
Section titled “Returns”Uint8Array
Uint8Array
httpHeadersTransform()
Section titled “httpHeadersTransform()”httpHeadersTransform(
headers):HttpHeaderField[]
Defined in: packages/core/src/agent/agent/http/transforms.ts:48
Maps the default fetch headers field to the serializable HttpHeaderField.
Parameters
Section titled “Parameters”headers
Section titled “headers”Headers
Fetch definition of the headers type
Returns
Section titled “Returns”array of header fields
isV2ResponseBody()
Section titled “isV2ResponseBody()”isV2ResponseBody(
body):body is v2ResponseBody
Defined in: packages/core/src/agent/agent/api.ts:159
Utility function to check if a body is a v2ResponseBody for type safety.
Parameters
Section titled “Parameters”v2ResponseBody | v4ResponseBody | null
The body to check
Returns
Section titled “Returns”body is v2ResponseBody
boolean indicating if the body is a v2ResponseBody
isV4ResponseBody()
Section titled “isV4ResponseBody()”isV4ResponseBody(
body):body is v4ResponseBody
Defined in: packages/core/src/agent/agent/api.ts:174
Utility function to check if a body is a v4ResponseBody for type safety.
Parameters
Section titled “Parameters”v2ResponseBody | v4ResponseBody | null
The body to check
Returns
Section titled “Returns”body is v4ResponseBody
boolean indicating if the body is a v4ResponseBody
lookup_path()
Section titled “lookup_path()”lookup_path(
path,tree):LookupResult
Defined in: packages/core/src/agent/certificate.ts:613
Lookup a path in a tree. If the path is a subtree, use lookup_subtree instead.
Parameters
Section titled “Parameters”the path to look up
the tree to search
Returns
Section titled “Returns”the result of the lookup
lookup_subtree()
Section titled “lookup_subtree()”lookup_subtree(
path,tree):SubtreeLookupResult
Defined in: packages/core/src/agent/certificate.ts:692
Lookup a subtree in a tree.
Parameters
Section titled “Parameters”the path to look up
the tree to search
Returns
Section titled “Returns”the result of the lookup
lookupCanisterRanges()
Section titled “lookupCanisterRanges()”lookupCanisterRanges(
params):Uint8Array
Defined in: packages/core/src/agent/certificate.ts:919
Lookup the canister ranges using the /canister_ranges/<subnet_id>/<ranges> path.
Certificates returned by /api/v4/canister/<effective_canister_id>/call
and /api/v3/canister/<effective_canister_id>/read_state use this path.
If the new lookup is not found, it tries the fallback lookup with lookupCanisterRangesFallback.
Parameters
Section titled “Parameters”params
Section titled “params”the parameters with which to lookup the canister ranges
Returns
Section titled “Returns”Uint8Array
the encoded canister ranges. Use decodeCanisterRanges to decode them.
- https://internetcomputer.org/docs/references/ic-interface-spec#http-read-state
- https://internetcomputer.org/docs/references/ic-interface-spec#state-tree-canister-ranges
lookupCanisterRangesFallback()
Section titled “lookupCanisterRangesFallback()”lookupCanisterRangesFallback(
subnetId,tree):Uint8Array
Defined in: packages/core/src/agent/certificate.ts:955
Lookup the canister ranges using the /subnet/<subnet_id>/canister_ranges path.
Certificates returned by /api/v3/canister/<effective_canister_id>/call
and /api/v2/canister/<effective_canister_id>/read_state use this path.
Parameters
Section titled “Parameters”subnetId
Section titled “subnetId”the subnet ID to lookup the canister ranges for
the tree to search
Returns
Section titled “Returns”Uint8Array
the encoded canister ranges. Use decodeCanisterRanges to decode them.
https://internetcomputer.org/docs/references/ic-interface-spec#http-read-state
lookupResultToBuffer()
Section titled “lookupResultToBuffer()”lookupResultToBuffer(
result):Uint8Array<ArrayBufferLike> |undefined
Defined in: packages/core/src/agent/certificate.ts:463
Utility function to constrain the type of a lookup result
Parameters
Section titled “Parameters”result
Section titled “result”the result of a lookup
Returns
Section titled “Returns”Uint8Array<ArrayBufferLike> | undefined
the value if the lookup was found, undefined otherwise
makeExpiryTransform()
Section titled “makeExpiryTransform()”makeExpiryTransform(
delayInMilliseconds):HttpAgentRequestTransformFn
Defined in: packages/core/src/agent/agent/http/transforms.ts:37
Create a transform that adds a delay (by default 5 minutes) to the expiry.
Parameters
Section titled “Parameters”delayInMilliseconds
Section titled “delayInMilliseconds”number
The delay to add to the call time, in milliseconds.
Returns
Section titled “Returns”makeNonce()
Section titled “makeNonce()”makeNonce():
Nonce
Defined in: packages/core/src/agent/agent/http/types.ts:130
Create a random Nonce, based on random values
Returns
Section titled “Returns”makeNonceTransform()
Section titled “makeNonceTransform()”makeNonceTransform(
nonceFn?):HttpAgentRequestTransformFn
Defined in: packages/core/src/agent/agent/http/transforms.ts:18
Create a Nonce transform, which takes a function that returns a Buffer, and adds it as the nonce to every call requests.
Parameters
Section titled “Parameters”nonceFn?
Section titled “nonceFn?”() => Nonce
A function that returns a buffer. By default uses a semi-random method.
Returns
Section titled “Returns”pollForResponse()
Section titled “pollForResponse()”pollForResponse(
agent,canisterId,requestId,options?):Promise<PollForResponseResult>
Defined in: packages/core/src/agent/polling/index.ts:126
Polls the IC to check the status of the given request then returns the response bytes once the request has been processed.
Parameters
Section titled “Parameters”The agent to use to poll read_state.
canisterId
Section titled “canisterId”The effective canister ID.
requestId
Section titled “requestId”The Request ID to poll status for.
options?
Section titled “options?”PollingOptions = {}
polling options to control behavior
Returns
Section titled “Returns”Promise<PollForResponseResult>
The certificate, reply bytes, and raw certificate bytes for the request.
Throws
Section titled “Throws”If the agent’s root key is not available.
Throws
Section titled “Throws”If the request was rejected by the canister.
Throws
Section titled “Throws”If the request reached done status without a reply.
randomNumber()
Section titled “randomNumber()”randomNumber():
number
Defined in: packages/core/src/agent/utils/random.ts:5
Generates a random unsigned 32-bit integer between 0 and 0xffffffff
Returns
Section titled “Returns”number
a random number
reconstruct()
Section titled “reconstruct()”reconstruct(
t):Promise<Uint8Array<ArrayBufferLike>>
Defined in: packages/core/src/agent/certificate.ts:478
Parameters
Section titled “Parameters”The hash tree to reconstruct
Returns
Section titled “Returns”Promise<Uint8Array<ArrayBufferLike>>
requestIdOf()
Section titled “requestIdOf()”requestIdOf(
request):RequestId
Defined in: packages/core/src/agent/request_id.ts:70
Get the RequestId of the provided ic-ref request. RequestId is the result of the representation-independent-hash function. https://sdk.dfinity.org/docs/interface-spec/index.html#hash-of-map
Parameters
Section titled “Parameters”request
Section titled “request”Record<string, unknown>
ic-ref request to hash into RequestId
Returns
Section titled “Returns”uint8Equals()
Section titled “uint8Equals()”uint8Equals(
a,b):boolean
Defined in: packages/core/src/agent/utils/buffer.ts:54
Compares two Uint8Arrays for equality.
Parameters
Section titled “Parameters”Uint8Array
The first Uint8Array.
Uint8Array
The second Uint8Array.
Returns
Section titled “Returns”boolean
True if the Uint8Arrays are equal, false otherwise.
uint8FromBufLike()
Section titled “uint8FromBufLike()”uint8FromBufLike(
bufLike):Uint8Array
Defined in: packages/core/src/agent/utils/buffer.ts:6
Returns a true Uint8Array from an ArrayBufferLike object.
Parameters
Section titled “Parameters”bufLike
Section titled “bufLike”ArrayBufferLike | Uint8Array<ArrayBufferLike> | number[] | DataView<ArrayBufferLike> | ArrayBufferView<ArrayBufferLike> | [number] | { buffer: ArrayBuffer; }
a buffer-like object
Returns
Section titled “Returns”Uint8Array
Uint8Array
uint8ToBuf()
Section titled “uint8ToBuf()”uint8ToBuf(
arr):ArrayBuffer
Defined in: packages/core/src/agent/utils/buffer.ts:41
Returns a true ArrayBuffer from a Uint8Array, as Uint8Array.buffer is unsafe.
Parameters
Section titled “Parameters”Uint8Array
Uint8Array to convert
Returns
Section titled “Returns”ArrayBuffer
ArrayBuffer
unwrapDER()
Section titled “unwrapDER()”unwrapDER(
derEncoded,oid):Uint8Array
Defined in: packages/core/src/agent/der.ts:165
Extracts a payload from the given derEncoded data, and checks that it was tagged with the given oid.
derEncoded = SEQUENCE(oid, BITSTRING(payload))
Parameters
Section titled “Parameters”derEncoded
Section titled “derEncoded”Uint8Array
The DER encoded and tagged data
Uint8Array
The DER encoded (and SEQUENCE wrapped!) expected OID
Returns
Section titled “Returns”Uint8Array
The unwrapped payload
wrapDER()
Section titled “wrapDER()”wrapDER(
payload,oid):Uint8Array
Defined in: packages/core/src/agent/der.ts:132
Wraps the given payload in a DER encoding tagged with the given encoded oid like so:
SEQUENCE(oid, BITSTRING(payload))
Parameters
Section titled “Parameters”payload
Section titled “payload”Uint8Array
The payload to encode as the bit string
Uint8Array
The DER encoded (and SEQUENCE wrapped!) OID to tag the payload with
Returns
Section titled “Returns”Uint8Array
References
Section titled “References”defaultStrategy
Section titled “defaultStrategy”Re-exports defaultStrategy