Skip to content

TypeScript: @dnsid-ai/log-c2sp-tlog — classes

Part of Transparency log (@dnsid-ai/log-c2sp-tlog).

Defined in: packages/log-c2sp-tlog/src/reader.ts:497

Read/write binding for a c2sp-tlog stream: extends C2spTlogReader with the prepared-event workflow (prepare, sign per role, finalize, append). The generic writeEvent is intentionally unimplemented; appends go through C2spTlogBinding.writePreparedEvent with a deployment-specific submitter.

new C2spTlogBinding(lr, options): C2spTlogBinding;

Defined in: packages/log-c2sp-tlog/src/reader.ts:109

string

C2spTlogReaderOptions

C2spTlogBinding

C2spTlogReader.constructor

readonly lr: string;

Defined in: packages/log-c2sp-tlog/src/reader.ts:109

C2spTlogReader.lr

readonly parsed: ParsedC2spTlogLr;

Defined in: packages/log-c2sp-tlog/src/reader.ts:101

C2spTlogReader.parsed

additionalSignerRoles(event): LogSignerRole[];

Defined in: packages/log-c2sp-tlog/src/reader.ts:134

LogEvent

LogSignerRole[]

C2spTlogReader.additionalSignerRoles

canonical(event): Promise<Uint8Array<ArrayBufferLike>>;

Defined in: packages/log-c2sp-tlog/src/reader.ts:129

Returns the canonical byte representation of the event for this log method. Used to verify the signatures required by the log method on events read from the log. MUST produce identical output to Log.canonical for the same supported event.

LogEvent

Promise<Uint8Array<ArrayBufferLike>>

Log.canonical

C2spTlogReader.canonical

entryBytes(prepared, context?): Promise<Uint8Array<ArrayBufferLike>>;

Defined in: packages/log-c2sp-tlog/src/reader.ts:510

PreparedC2spTlogEvent

PreparedC2spVerificationContext

Promise<Uint8Array<ArrayBufferLike>>

keyTimestamp(domain, keyThumbprint): Promise<Date>;

Defined in: packages/log-c2sp-tlog/src/reader.ts:138

Returns the timestamp at which the given key thumbprint was bound to the domain (ISSUANCE or KEY_ROTATION event). Used for ka validation.

string

string

Promise<Date>

C2spTlogReader.keyTimestamp

parsePreparedEvent(bytes, context?): Promise<PreparedC2spTlogEvent>;

Defined in: packages/log-c2sp-tlog/src/reader.ts:502

Uint8Array

PreparedC2spVerificationContext

Promise<PreparedC2spTlogEvent>

prepareEvent(event, chain?): PreparedC2spTlogEvent;

Defined in: packages/log-c2sp-tlog/src/reader.ts:498

LogEvent

C2spChain

PreparedC2spTlogEvent

readEvent(ref): Promise<LogEvent>;

Defined in: packages/log-c2sp-tlog/src/reader.ts:209

Reads a single event by its log reference. MUST verify inclusion proof and timestamp proof before returning.

string

Promise<LogEvent>

C2spTlogReader.readEvent

rebuildHistory(domain): Promise<LogEvent[]>;

Defined in: packages/log-c2sp-tlog/src/reader.ts:263

Rebuilds the full event history for the domain in authoritative log order. MUST verify inclusion proofs, timestamp proofs, append-only consistency, and required lifecycle signatures on every returned event. Event signature verification MUST use the public keys valid for that event in the reconstructed lifecycle history. Events with invalid signatures MUST NOT be returned.

string

Promise<LogEvent[]>

C2spTlogReader.rebuildHistory

signPreparedEvent(
prepared,
role,
keyProvider,
options?
): Promise<PreparedC2spTlogEvent>;

Defined in: packages/log-c2sp-tlog/src/reader.ts:506

PreparedC2spTlogEvent

C2spSignerRole

KeyProvider

SignPreparedC2spOptions

Promise<PreparedC2spTlogEvent>

verifyBilateralBinding(
record,
entityKey,
operationalKey
): Promise<{
initialEntityThumbprint: string;
initialOperationalThumbprint: string;
timestamp: Date;
}>;

Defined in: packages/log-c2sp-tlog/src/reader.ts:146

Verifies draft-01 bilateral ISSUANCE binding for the current TXT record.

unknown

unknown

unknown

Promise<{ initialEntityThumbprint: string; initialOperationalThumbprint: string; timestamp: Date; }>

C2spTlogReader.verifyBilateralBinding

verifyNonRevocation(domain, at): Promise<LoggedStateEvidence>;

Defined in: packages/log-c2sp-tlog/src/reader.ts:183

Verifies that the domain is neither REVOKED nor RETIRED at the given timestamp. Raises on a terminal state or if complete, fresh evidence cannot be established. Returns the accepted proof boundary.

string

Date

Promise<LoggedStateEvidence>

C2spTlogReader.verifyNonRevocation

verifyOperationalContinuity(
domain,
initialOperationalThumbprint,
currentOperationalThumbprint
): Promise<void>;

Defined in: packages/log-c2sp-tlog/src/reader.ts:172

Verifies KEY_ROTATION continuity from ISSUANCE to the current operational key.

string

string

string

Promise<void>

C2spTlogReader.verifyOperationalContinuity

writeEvent(_event): Promise<string>;

Defined in: packages/log-c2sp-tlog/src/reader.ts:518

Appends a signed event to the log. The event MUST already carry the signatures required by its log method before writeEvent is called. Returns a LogRef identifying the recorded entry.

LogEvent

Promise<string>

Log.writeEvent

writePreparedEvent(prepared, options): Promise<string>;

Defined in: packages/log-c2sp-tlog/src/reader.ts:514

PreparedC2spTlogEvent

C2spTlogAppendOptions

Promise<string>


Defined in: packages/log-c2sp-tlog/src/reader.ts:524

Use C2spTlogBinding.

new C2spTlogClient(lr, options): C2spTlogClient;

Defined in: packages/log-c2sp-tlog/src/reader.ts:109

string

C2spTlogReaderOptions

C2spTlogClient

C2spTlogBinding.constructor

readonly lr: string;

Defined in: packages/log-c2sp-tlog/src/reader.ts:109

C2spTlogBinding.lr

readonly parsed: ParsedC2spTlogLr;

Defined in: packages/log-c2sp-tlog/src/reader.ts:101

C2spTlogBinding.parsed

additionalSignerRoles(event): LogSignerRole[];

Defined in: packages/log-c2sp-tlog/src/reader.ts:134

LogEvent

LogSignerRole[]

C2spTlogBinding.additionalSignerRoles

canonical(event): Promise<Uint8Array<ArrayBufferLike>>;

Defined in: packages/log-c2sp-tlog/src/reader.ts:129

Returns the canonical byte representation of the event for this log method. Used to verify the signatures required by the log method on events read from the log. MUST produce identical output to Log.canonical for the same supported event.

LogEvent

Promise<Uint8Array<ArrayBufferLike>>

C2spTlogBinding.canonical

entryBytes(prepared, context?): Promise<Uint8Array<ArrayBufferLike>>;

Defined in: packages/log-c2sp-tlog/src/reader.ts:510

PreparedC2spTlogEvent

PreparedC2spVerificationContext

Promise<Uint8Array<ArrayBufferLike>>

C2spTlogBinding.entryBytes

keyTimestamp(domain, keyThumbprint): Promise<Date>;

Defined in: packages/log-c2sp-tlog/src/reader.ts:138

Returns the timestamp at which the given key thumbprint was bound to the domain (ISSUANCE or KEY_ROTATION event). Used for ka validation.

string

string

Promise<Date>

C2spTlogBinding.keyTimestamp

parsePreparedEvent(bytes, context?): Promise<PreparedC2spTlogEvent>;

Defined in: packages/log-c2sp-tlog/src/reader.ts:502

Uint8Array

PreparedC2spVerificationContext

Promise<PreparedC2spTlogEvent>

C2spTlogBinding.parsePreparedEvent

prepareEvent(event, chain?): PreparedC2spTlogEvent;

Defined in: packages/log-c2sp-tlog/src/reader.ts:498

LogEvent

C2spChain

PreparedC2spTlogEvent

C2spTlogBinding.prepareEvent

readEvent(ref): Promise<LogEvent>;

Defined in: packages/log-c2sp-tlog/src/reader.ts:209

Reads a single event by its log reference. MUST verify inclusion proof and timestamp proof before returning.

string

Promise<LogEvent>

C2spTlogBinding.readEvent

rebuildHistory(domain): Promise<LogEvent[]>;

Defined in: packages/log-c2sp-tlog/src/reader.ts:263

Rebuilds the full event history for the domain in authoritative log order. MUST verify inclusion proofs, timestamp proofs, append-only consistency, and required lifecycle signatures on every returned event. Event signature verification MUST use the public keys valid for that event in the reconstructed lifecycle history. Events with invalid signatures MUST NOT be returned.

string

Promise<LogEvent[]>

C2spTlogBinding.rebuildHistory

signPreparedEvent(
prepared,
role,
keyProvider,
options?
): Promise<PreparedC2spTlogEvent>;

Defined in: packages/log-c2sp-tlog/src/reader.ts:506

PreparedC2spTlogEvent

C2spSignerRole

KeyProvider

SignPreparedC2spOptions

Promise<PreparedC2spTlogEvent>

C2spTlogBinding.signPreparedEvent

verifyBilateralBinding(
record,
entityKey,
operationalKey
): Promise<{
initialEntityThumbprint: string;
initialOperationalThumbprint: string;
timestamp: Date;
}>;

Defined in: packages/log-c2sp-tlog/src/reader.ts:146

Verifies draft-01 bilateral ISSUANCE binding for the current TXT record.

unknown

unknown

unknown

Promise<{ initialEntityThumbprint: string; initialOperationalThumbprint: string; timestamp: Date; }>

C2spTlogBinding.verifyBilateralBinding

verifyNonRevocation(domain, at): Promise<LoggedStateEvidence>;

Defined in: packages/log-c2sp-tlog/src/reader.ts:183

Verifies that the domain is neither REVOKED nor RETIRED at the given timestamp. Raises on a terminal state or if complete, fresh evidence cannot be established. Returns the accepted proof boundary.

string

Date

Promise<LoggedStateEvidence>

C2spTlogBinding.verifyNonRevocation

verifyOperationalContinuity(
domain,
initialOperationalThumbprint,
currentOperationalThumbprint
): Promise<void>;

Defined in: packages/log-c2sp-tlog/src/reader.ts:172

Verifies KEY_ROTATION continuity from ISSUANCE to the current operational key.

string

string

string

Promise<void>

C2spTlogBinding.verifyOperationalContinuity

writeEvent(_event): Promise<string>;

Defined in: packages/log-c2sp-tlog/src/reader.ts:518

Appends a signed event to the log. The event MUST already carry the signatures required by its log method before writeEvent is called. Returns a LogRef identifying the recorded entry.

LogEvent

Promise<string>

C2spTlogBinding.writeEvent

writePreparedEvent(prepared, options): Promise<string>;

Defined in: packages/log-c2sp-tlog/src/reader.ts:514

PreparedC2spTlogEvent

C2spTlogAppendOptions

Promise<string>

C2spTlogBinding.writePreparedEvent


Defined in: packages/log-c2sp-tlog/src/errors.ts:8

Base error for all c2sp-tlog failures.

new C2spTlogError(message, options?): C2spTlogError;

Defined in: packages/log-c2sp-tlog/src/errors.ts:11

string

unknown

LifecycleErrorCategory

number

boolean

C2spTlogError

VerificationError.constructor

readonly optional agentState?: string;

Defined in: packages/protocol/src/errors.ts:88

Agent state reported by the status document, when the failure is state-related.

VerificationError.agentState

optional cause?: unknown;

Defined in: node_modules/typescript/lib/lib.es2022.error.d.ts:24

VerificationError.cause

readonly code: VerificationCode;

Defined in: packages/protocol/src/errors.ts:84

Classification of the failure.

VerificationError.code

readonly optional errorCategory?: LifecycleErrorCategory;

Defined in: packages/protocol/src/errors.ts:90

Lifecycle conformance category, when the failure maps to a lifecycle state-machine rule.

VerificationError.errorCategory

message: string;

Defined in: node_modules/typescript/lib/lib.es5.d.ts:1075

VerificationError.message

name: string;

Defined in: node_modules/typescript/lib/lib.es5.d.ts:1074

VerificationError.name

optional stack?: string;

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

VerificationError.stack

readonly optional status?: number;

Defined in: packages/log-c2sp-tlog/src/errors.ts:9

readonly transient: boolean;

Defined in: packages/protocol/src/errors.ts:86

True when retrying the verification may succeed.

VerificationError.transient

readonly optional verifiedEntityKeyThumbprint?: string;

Defined in: packages/protocol/src/errors.ts:94

Observed verified record-signing key thumbprint (CounterpartyNotAccepted only). Never echoes configured pins.

VerificationError.verifiedEntityKeyThumbprint

readonly optional verifiedGovernanceId?: string;

Defined in: packages/protocol/src/errors.ts:92

Observed verified governance ID (CounterpartyNotAccepted only). Never echoes configured policy.

VerificationError.verifiedGovernanceId

static stackTraceLimit: number;

Defined in: 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.

VerificationError.stackTraceLimit

static captureStackTrace(targetObject, constructorOpt?): void;

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

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

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

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

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

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

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

object

Function

void

VerificationError.captureStackTrace

static prepareStackTrace(err, stackTraces): any;

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

Error

CallSite[]

any

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

VerificationError.prepareStackTrace


Defined in: packages/log-c2sp-tlog/src/errors.ts:29

Thrown when c2sp-tlog input (checkpoint, entry, reference, bundle, …) is malformed or non-canonical.

new C2spTlogParseError(message, cause?): C2spTlogParseError;

Defined in: packages/log-c2sp-tlog/src/errors.ts:30

string

unknown

C2spTlogParseError

C2spTlogError.constructor

readonly optional agentState?: string;

Defined in: packages/protocol/src/errors.ts:88

Agent state reported by the status document, when the failure is state-related.

C2spTlogError.agentState

optional cause?: unknown;

Defined in: node_modules/typescript/lib/lib.es2022.error.d.ts:24

C2spTlogError.cause

readonly code: VerificationCode;

Defined in: packages/protocol/src/errors.ts:84

Classification of the failure.

C2spTlogError.code

readonly optional errorCategory?: LifecycleErrorCategory;

Defined in: packages/protocol/src/errors.ts:90

Lifecycle conformance category, when the failure maps to a lifecycle state-machine rule.

C2spTlogError.errorCategory

message: string;

Defined in: node_modules/typescript/lib/lib.es5.d.ts:1075

C2spTlogError.message

name: string;

Defined in: node_modules/typescript/lib/lib.es5.d.ts:1074

C2spTlogError.name

optional stack?: string;

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

C2spTlogError.stack

readonly optional status?: number;

Defined in: packages/log-c2sp-tlog/src/errors.ts:9

C2spTlogError.status

readonly transient: boolean;

Defined in: packages/protocol/src/errors.ts:86

True when retrying the verification may succeed.

C2spTlogError.transient

readonly optional verifiedEntityKeyThumbprint?: string;

Defined in: packages/protocol/src/errors.ts:94

Observed verified record-signing key thumbprint (CounterpartyNotAccepted only). Never echoes configured pins.

C2spTlogError.verifiedEntityKeyThumbprint

readonly optional verifiedGovernanceId?: string;

Defined in: packages/protocol/src/errors.ts:92

Observed verified governance ID (CounterpartyNotAccepted only). Never echoes configured policy.

C2spTlogError.verifiedGovernanceId

static stackTraceLimit: number;

Defined in: 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.

C2spTlogError.stackTraceLimit

static captureStackTrace(targetObject, constructorOpt?): void;

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

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

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

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

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

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

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

object

Function

void

C2spTlogError.captureStackTrace

static prepareStackTrace(err, stackTraces): any;

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

Error

CallSite[]

any

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

C2spTlogError.prepareStackTrace


Defined in: packages/log-c2sp-tlog/src/reader.ts:100

LogReader for the c2sp-tlog method: verifies an agent’s identity-record lifecycle against a C2SP tlog-tiles log. Evidence is loaded from a verified stream bundle when configured, otherwise through the stream source; checkpoints are policy-enforced and advanced in a trusted checkpoint store. One verified lifecycle snapshot is shared by the binding, continuity, and key-age checks performed by one reader.

VerificationError (LogError) from every LogReader boundary.

new C2spTlogReader(lr, options): C2spTlogReader;

Defined in: packages/log-c2sp-tlog/src/reader.ts:109

string

C2spTlogReaderOptions

C2spTlogReader

readonly lr: string;

Defined in: packages/log-c2sp-tlog/src/reader.ts:109

readonly parsed: ParsedC2spTlogLr;

Defined in: packages/log-c2sp-tlog/src/reader.ts:101

additionalSignerRoles(event): LogSignerRole[];

Defined in: packages/log-c2sp-tlog/src/reader.ts:134

LogEvent

LogSignerRole[]

canonical(event): Promise<Uint8Array<ArrayBufferLike>>;

Defined in: packages/log-c2sp-tlog/src/reader.ts:129

Returns the canonical byte representation of the event for this log method. Used to verify the signatures required by the log method on events read from the log. MUST produce identical output to Log.canonical for the same supported event.

LogEvent

Promise<Uint8Array<ArrayBufferLike>>

LogReader.canonical

keyTimestamp(domain, keyThumbprint): Promise<Date>;

Defined in: packages/log-c2sp-tlog/src/reader.ts:138

Returns the timestamp at which the given key thumbprint was bound to the domain (ISSUANCE or KEY_ROTATION event). Used for ka validation.

string

string

Promise<Date>

LogReader.keyTimestamp

readEvent(ref): Promise<LogEvent>;

Defined in: packages/log-c2sp-tlog/src/reader.ts:209

Reads a single event by its log reference. MUST verify inclusion proof and timestamp proof before returning.

string

Promise<LogEvent>

LogReader.readEvent

rebuildHistory(domain): Promise<LogEvent[]>;

Defined in: packages/log-c2sp-tlog/src/reader.ts:263

Rebuilds the full event history for the domain in authoritative log order. MUST verify inclusion proofs, timestamp proofs, append-only consistency, and required lifecycle signatures on every returned event. Event signature verification MUST use the public keys valid for that event in the reconstructed lifecycle history. Events with invalid signatures MUST NOT be returned.

string

Promise<LogEvent[]>

LogReader.rebuildHistory

verifyBilateralBinding(
record,
entityKey,
operationalKey
): Promise<{
initialEntityThumbprint: string;
initialOperationalThumbprint: string;
timestamp: Date;
}>;

Defined in: packages/log-c2sp-tlog/src/reader.ts:146

Verifies draft-01 bilateral ISSUANCE binding for the current TXT record.

unknown

unknown

unknown

Promise<{ initialEntityThumbprint: string; initialOperationalThumbprint: string; timestamp: Date; }>

LogReader.verifyBilateralBinding

verifyNonRevocation(domain, at): Promise<LoggedStateEvidence>;

Defined in: packages/log-c2sp-tlog/src/reader.ts:183

Verifies that the domain is neither REVOKED nor RETIRED at the given timestamp. Raises on a terminal state or if complete, fresh evidence cannot be established. Returns the accepted proof boundary.

string

Date

Promise<LoggedStateEvidence>

LogReader.verifyNonRevocation

verifyOperationalContinuity(
domain,
initialOperationalThumbprint,
currentOperationalThumbprint
): Promise<void>;

Defined in: packages/log-c2sp-tlog/src/reader.ts:172

Verifies KEY_ROTATION continuity from ISSUANCE to the current operational key.

string

string

string

Promise<void>

LogReader.verifyOperationalContinuity


Defined in: packages/log-c2sp-tlog/src/errors.ts:37

Thrown when well-formed c2sp-tlog evidence fails cryptographic or policy verification.

new C2spTlogVerificationError(message, errorCategory?): C2spTlogVerificationError;

Defined in: packages/log-c2sp-tlog/src/errors.ts:41

string

LifecycleErrorCategory = 'INVALID_EVIDENCE'

C2spTlogVerificationError

C2spTlogError.constructor

readonly optional agentState?: string;

Defined in: packages/protocol/src/errors.ts:88

Agent state reported by the status document, when the failure is state-related.

C2spTlogError.agentState

optional cause?: unknown;

Defined in: node_modules/typescript/lib/lib.es2022.error.d.ts:24

C2spTlogError.cause

readonly code: VerificationCode;

Defined in: packages/protocol/src/errors.ts:84

Classification of the failure.

C2spTlogError.code

readonly errorCategory: LifecycleErrorCategory;

Defined in: packages/log-c2sp-tlog/src/errors.ts:39

Lifecycle conformance category for this failure; defaults to INVALID_EVIDENCE.

C2spTlogError.errorCategory

message: string;

Defined in: node_modules/typescript/lib/lib.es5.d.ts:1075

C2spTlogError.message

name: string;

Defined in: node_modules/typescript/lib/lib.es5.d.ts:1074

C2spTlogError.name

optional stack?: string;

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

C2spTlogError.stack

readonly optional status?: number;

Defined in: packages/log-c2sp-tlog/src/errors.ts:9

C2spTlogError.status

readonly transient: boolean;

Defined in: packages/protocol/src/errors.ts:86

True when retrying the verification may succeed.

C2spTlogError.transient

readonly optional verifiedEntityKeyThumbprint?: string;

Defined in: packages/protocol/src/errors.ts:94

Observed verified record-signing key thumbprint (CounterpartyNotAccepted only). Never echoes configured pins.

C2spTlogError.verifiedEntityKeyThumbprint

readonly optional verifiedGovernanceId?: string;

Defined in: packages/protocol/src/errors.ts:92

Observed verified governance ID (CounterpartyNotAccepted only). Never echoes configured policy.

C2spTlogError.verifiedGovernanceId

static stackTraceLimit: number;

Defined in: 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.

C2spTlogError.stackTraceLimit

static captureStackTrace(targetObject, constructorOpt?): void;

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

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

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

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

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

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

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

object

Function

void

C2spTlogError.captureStackTrace

static prepareStackTrace(err, stackTraces): any;

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

Error

CallSite[]

any

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

C2spTlogError.prepareStackTrace


Defined in: packages/log-c2sp-tlog/src/checkpoint-trust.ts:42

Non-persistent, per-process trusted checkpoint store.

new InMemoryTrustedC2spCheckpointStore(): InMemoryTrustedC2spCheckpointStore;

InMemoryTrustedC2spCheckpointStore

compareAndSwap(
origin,
expected,
candidate,
signal?
): Promise<boolean>;

Defined in: packages/log-c2sp-tlog/src/checkpoint-trust.ts:50

Atomically replaces expected with candidate; returns false on a lost race. Implementations must honor cancellation at the commit boundary: an aborted signal must prevent a pending write, not merely reject its returned promise.

string

TrustedC2spCheckpoint | undefined

TrustedC2spCheckpoint

AbortSignal

Promise<boolean>

TrustedC2spCheckpointStore.compareAndSwap

load(origin, signal?): Promise<TrustedC2spCheckpoint | undefined>;

Defined in: packages/log-c2sp-tlog/src/checkpoint-trust.ts:45

Returns the currently trusted checkpoint for origin, if any.

string

AbortSignal

Promise<TrustedC2spCheckpoint | undefined>

TrustedC2spCheckpointStore.load


Defined in: packages/log-c2sp-tlog/src/stream-source.ts:130

StreamSource that performs a complete scan of a C2SP tlog-tiles log: it fetches the checkpoint, authenticates it via the configured callback, then downloads every fixed-geometry entry bundle up to the checkpoint tree size.

new ScanStreamSource(options, resourceFetcher?): ScanStreamSource;

Defined in: packages/log-c2sp-tlog/src/stream-source.ts:137

ScanStreamSourceOptions

C2spBoundedResourceFetcher = ...

ScanStreamSource

load(prefix, options?): Promise<StreamEvidence>;

Defined in: packages/log-c2sp-tlog/src/stream-source.ts:150

Loads and authenticates the checkpoint, then every entry of the log at prefix (complete is always true).

string

AbortSignal

Promise<StreamEvidence>

StreamSource.load