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
| Parameter | Type | Description |
|---|---|---|
ctx | SDKContext | The configured SDK context. |
params | GetLetterOfCreditHistoryParams | LOC identity and page controls; limit counts transactions, not events. |
options | ReadExecutionOptions | Cancellation 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);