SDK reference

Path Global operator calls

pg.connectivity and pg.operations — network calendars, capabilities and compatibility, sandbox scripts, closing a netting set and settling a period.

pg.connectivity and pg.operations need the operations scope; the clearing calls need risk as well. They are operator calls: in test mode they take no signature; in live mode they are available to a key whose agreement includes operator access, and every request carries the signature of a registered operator (operator).

pg.connectivity

CallReturns
calendar(network)CalendarAnswerThe calendar of a network, whether it is open for a pay-out now, opens_at, next_cutoff, and the value date of a pay-out sent now
capabilities({ network?, router? })NetworkCapability[]What each network and router can do now: per operation, supported, open_now, healthy, opens_at, limits
compatibility({ from?, to? })Edge[]The edges between two nodes, ASSET@network: kind, cost, seconds, whether open and lockable
script(match, outcome){ scripted: { match, outcome } }Test mode only. Orders whose reference contains match get outcome at the sandbox bank

A NetworkCalendar gives the timezone, the opening windows (24x7 or days with open and close times), the cutoffs per operation, the holidays, value_date (same or next), and the recall and dispute windows in seconds. Calendars has the contract.

const now = await pg.connectivity.calendar('sepa-inst');
if (!now.open) console.log('opens at', now.opens_at);

Sandbox scripts

outcome is a SandboxOutcome: fail, timeout, unknown, slow, return, short, over, charge or outage. The same word in a payment reference gives the same outcome without a script. A new script with the same match replaces the one before.

await pg.connectivity.script('late', 'slow'); // test mode
await pg.router.route({ ...intent, reference: 'invoice late 42' }, { idempotencyKey: 'inv-42' });

Sandbox lists what each outcome does.

pg.operations

These need risk as well.

CallReturns
closeSet(id)ClearingPeriodCloses the open period of a netting set now, <ASSET>@<network>
settlePeriod(id)ClearingPeriodSettles a closed period, <set>#<seq>, as far as it can be now
// A test key that carries `operations` and `risk`.
const ops = new PathGlobal({ apiKey: process.env.PATHGLOBAL_API_KEY! });

const closed = await ops.operations.closeSet('USD@book');
const settled = await ops.operations.settlePeriod(closed.id);
settled.state; // 'settling', 'settled' or 'partially_settled'

Without these calls, a period closes at a cut-off of its set. See Clearing.

Reserved to Path Global

The routes that run the platform itself are reserved to Path Global. These methods ship in the package and call them.

Method
operations.partnersReserved to Path Global
operations.disablePartnerReserved to Path Global
operations.enablePartnerReserved to Path Global
operations.runReserved to Path Global
operations.participantsReserved to Path Global
operations.onboardParticipantReserved to Path Global
operations.setParticipantCapReserved to Path Global
operations.suspendParticipantReserved to Path Global
operations.withdrawCollateralReserved to Path Global
operations.clearingPositionsReserved to Path Global
operations.putSetReserved to Path Global
operations.resolveInstructionReserved to Path Global
operations.openReturnReserved to Path Global
connectivity.healthReserved to Path Global
connectivity.accountsReserved to Path Global
connectivity.registerAccountReserved to Path Global
connectivity.openCircuitReserved to Path Global
connectivity.closeCircuitReserved to Path Global
risk.halt, risk.stop, risk.resume, risk.switchLogReserved to Path Global

The routes are on Operations.

On this page