Skip to content

API ReferenceLOC lifecycleFunction

getLetterOfCredits()

function getLetterOfCredits(ctx, params?, options?): Promise<LetterOfCreditPage>;

Reads canonical LOCs in ascending numeric id order, with an exact continuation cursor. Continuations preserve the initial deployment and block and must reuse the same filters and profile.

Parameters

ParameterTypeDescription
ctxSDKContextThe configured SDK context.
paramsGetLetterOfCreditsParamsCollection filters and a page size from 1 to 1000.
optionsReadExecutionOptionsCancellation controls for the complete page.

Returns

Promise<LetterOfCreditPage>

An all-or-nothing page at one indexed boundary.

Throws

SubgraphCompatibilityError If the endpoint or any returned entity cannot support the canonical model.

Throws

InvalidArgumentError If the filters, limit, or cursor are invalid or mismatched.

Throws

ConfigError If no subgraph endpoint is configured.

Example

const page = await getLetterOfCredits(sdk, { creators: [creator], limit: 50 });
const next = page.nextCursor && await getLetterOfCredits(sdk, {
creators: [creator], cursor: page.nextCursor, limit: 50,
});