Skip to content

API ReferenceLOC lifecycleFunction

getLetterOfCreditHistory()

function getLetterOfCreditHistory(ctx, params, options?): Promise<LetterOfCreditHistoryPage>;

Reads complete LOC transaction entries in ascending chain order. Each entry preserves immediate operation boundaries and its full, ordered Solidity event evidence.

Parameters

ParameterTypeDescription
ctxSDKContextThe configured SDK context.
paramsGetLetterOfCreditHistoryParamsLOC identity and page controls; limit counts transactions, not events.
optionsReadExecutionOptionsCancellation controls for roots and all nested history pages.

Returns

Promise<LetterOfCreditHistoryPage>

A page under history model version 1; an absent LOC has an empty page.

Throws

SubgraphCompatibilityError If any entry is incomplete, inconsistent, or unsupported.

Throws

InvalidArgumentError If the id, limit, or cursor is invalid or mismatched.

Throws

ConfigError If no subgraph endpoint is configured.

Example

const page = await getLetterOfCreditHistory(sdk, { id: 7n, limit: 25 });
for (const entry of page.items) console.log(entry.transaction.hash, entry.changes);