SDK reference
Types
The wire types @pathglobal/sdk exports, grouped by product — the shapes the API sends and receives, with amounts as decimal strings.
import type { Money, Intent, Quote, Route, Instruction, Approval } from '@pathglobal/sdk';Every type is a wire type of the API: the client sends and returns the JSON as it is. Amounts are
Money, a decimal string in major units. Ids and references in a response are opaque strings,
except the account references a request carries.
Two names to keep apart
Holdingis a holding of an Omni Account.SettlementHoldingis where the value of an execution sits, one ledger account per asset.Executionis how Path Global carries out a SETTL, a period, a transfer or an exchange.Route.path_instructionis a payment instruction of the PATH protocol, issued by a payee's member.- A
Settlementinrefund_requiredis not terminal: it moves torefunding,closedormanual_review. The terminal states ofSettlementStateareclosedandexpired. Receiptis the settlement receipt of a route, a record of Path Global.PayerReceiptis the reference and the status of the payerpath.receiptof a route to a PATH destination, andDepositReceiptthose of the payeepath.receiptof a deposit: PATH objects read with Path Tools.
Shared
| Type | |
|---|---|
Money | { value: string; asset: string } |
Signed<T> | T with protocol_version, signed_at, kid and signature: a PATH envelope; the keys are at GET /.well-known/path-keys |
AssetNode | { asset, network }, written ASSET@network in a query or an id |
Guarantee | atomic, conditional, receipt_first, value_dated, bounded_exposure, strongest first |
CommitMode | capture_on_final or commit_first |
NetworkKind | book, blockchain, irrevocable_instant, revocable, deferred |
Purpose | safeguarding, liquidity, settlement, collateral, gas |
Tier | hot, warm, cold |
ApprovalWaiting | { approval: Approval }, the answer of a change that waits for a second person |
The PATH vocabulary
What an address accepts and receives, in the terms of the protocol.
| Type | |
|---|---|
PathCapability | { rail, chain?, asset_type, asset_code, standard?, contract?, decimals? }: a rail and an asset, and for a token its chain, standard and contract |
ChainRef | { slug, caip2?, evm?: { chain_id }, name? }: a chain of the register |
PathAmount | { value, asset_type, asset_code }: an amount of the protocol, value a canonical decimal string |
IntentEntry | A PathCapability with limits?: { min_single?, max_single? } in PathAmount, and reference_required?: true |
RailReference | { type, value, index? }: a reference of a rail, such as an end-to-end id or a transaction hash |
Discoverability | private, network, federated, public |
Accounts, addresses and endpoints
| Type | |
|---|---|
Account, AccountView | An Omni Account, its holder { path_id?, name? } (path_id a subject of the client); the view adds its holdings with their balances and endpoints |
Holding, HoldingView, HoldingRequest | A wallet, a virtual account (fiat or stablecoin backed) or an external wallet; freeze while frozen |
LedgerEntry | One line of a holding's statement |
Membership | { mode: 'hosted' } or { mode: 'own', member, network } |
Subject, SubjectRequest | A client, individual or legal_entity, with its identity status, identifiers, aliases, attestation, path_subject and withdrawn_at |
SubjectIdentifier, IdentifierType, VerificationMethod, IdentifierRequest | An identifier registered for a subject: its type, discoverability and whether it is verified, never its value; the request carries the value, passed to the PATH network |
SubjectAttestation | { reference, claim, value, expires_at }: kyc_level or kyb_level, basic |
SubjectAlias, AliasRequest, AliasRelease | An alias in one network, with its ref and discoverability; a claim; a subject after a release, with released: { alias, quarantine_days } |
PathAddress, AddressRequest | A PATH address (pathglobal.address) with terms (derived or pledged), sync (done, owed or refused, with sync_error) and discoverability |
AddressView | The address with its endpoints and rails, accepts (IntentEntry[]) and commitment (null on derived terms) |
AddressRail | A rail of an address: capability (PathCapability or null), published, publish_error?, pledged (null on derived terms) and accepted |
PledgeRequest, PledgeEntry | What addresses.pledge takes: rails of the address in order of preference, with limits in Money and reference_required |
StandingIntent | One pledged version of what an address accepts (pathglobal.standing_intent), signed. In grammar: 2, IntentEntry entries, limits and the PATH commitment of the address; a version without grammar is read as signed |
DepositEndpoint, EndpointRequest | What an address receives on, its format, pay_to, anchor and format_status; the request takes format |
FormatStatus | { status, status_date } of the link of an endpoint's format on its first network |
EndpointType | wallet_address, wallet_address_memo, virtual_address, viban, account_number, alias, card_pan, card_token |
EndpointDetails | The fields of each type: routing, BIC, country, rails enabled, alias kind, address format, memo, card fields |
Memo, BankRouting | { type, value } of a memo; { scheme, value } of a routing number |
AnchorTarget, Forward | { holding }, or { forward: { to, deliver? } } to a destination outside Path Global |
Deposit | A deposit on an endpoint and its status, with rail_reference_type and receipt when it has them |
DepositReceipt, PayeeReason | { reference?, status, reason_code?, sync_error? }: the payee receipt of a deposit, pending, settled or failed; destination_unknown, destination_closed, limit_exceeded, compliance_blocked |
Catalogue, router, decision and proof
| Type | |
|---|---|
Network | A network of the catalogue: slug, rails, assets, speed, routers, availability, endpoint_formats |
NetworkDetails, CatalogueRail, CatalogueAsset | A network in full, with its rails, typed assets and endpoint formats |
EndpointFormat, NetworkEndpointFormat, FormatField, AliasDirectory | An endpoint format, its link to a network, a field a payer sends, the directory of an alias. EndpointFormat is the format as the data set holds it, with directory as an id; NetworkEndpointFormat carries format. In @pathprotocol/sdk, the same shapes as the register answers them are EndpointFormatDefinition (with directory as an object) and EndpointFormatLink (without format) |
CatalogueEndpointFormat, CatalogueNetworkEndpointFormat | A format of the catalogue with its origin, and per network what Path Global issues in it |
RegisterOrigin | { register_version, register_source }: the version of the endpoint-format data set the formats of an answer come from, and register or built_in |
IssuableFormat | { type, issuer, format, assets, networks, receives } |
EndpointFormatKind, EndpointFormatStatus, FormatCheck, IssuerRole, AliasKind, Reach, RoutingScheme, MemoType, FieldName | The vocabularies of the register |
NetworkEngine, Partner | How a network is reached, and who gives access; sandbox: true marks a simulated partner |
Endpoint, Source | Where a route draws from and delivers to |
PathAddressEndpoint, AliasEndpoint | { path }, a PATH address (path: and 12 to 64 hexadecimal digits), and { alias }, an alias: a destination only |
Intent, Constraints | What a quote is asked for; router is 'path-flash-1.0' (the default) or a router of the catalogue |
Quote | Signed: the chosen Candidate, the alternatives, the decision, the Proof outcome, guarantee, expires_at |
Candidate, CandidateSummary, Leg | A route and its legs: collect, swap, convert, bridge, payout |
CandidateDestination | Where a route credits the beneficiary: { network, identifier }, or for a PATH address or an alias { network, path_address, alias?, capability, commitment, intent_version }, capability a PathCapability |
Decision | How the route was chosen among the candidates; model is path-flash-1.0 unless another was asked for |
Route | review, executing, settled, failed, refund_required; for a PATH destination path_instruction and payer_receipt |
PayerReceipt, PayerReason | The payer path.receipt of a route: pending, or failed with insufficient_funds, rail_unavailable, rail_rejected, limit_exceeded, compliance_blocked or expired; sync_error for a statement the PATH network refused |
CheckName, ProofParty, ProofRequest | What Proof checks |
Verdict | Signed: pass, review or fail, with one result per check |
Liquidity
| Type | |
|---|---|
Corridor, Funding, LiquidityQuote | A provider's pair, its funding terms, and a firm quote |
Pool, PoolTrade, PoolMovement | A pool, its trades and its movements |
PoolQuote | rate, reference_rate, fee_bps, fee, sell, buy |
PoolPosition, PoolWithdrawal | What a credential supplied, and a withdrawal that waits for a person |
DiscoveryQuery, DiscoveryAnswer, Offer | Where an amount can be delivered on a node now (liquidity.offers) |
Edge, EdgeKind, LiquidityPath, Depth | How value moves between two nodes, and what a node can deliver |
Clearing
| Type | |
|---|---|
Participant, ParticipantCap | A participant of clearing (provider, partner or client), its settlement accounts, caps and collateral |
Obligation, ClearingObligation | proposed, pending, accepted, queued, rejected, settled |
ClearingNetPosition | { participant, asset, net } |
NettingSet | <ASSET>@<network>: settles_on_network, the network it settles on, cut-offs, status |
ClearingPeriod | open, closed, settling, settled, partially_settled |
ClearingReport | Signed: the net positions, transfers, netting_efficiency, the executions that settle it (instructions) and carried positions of a period |
Cycle | A clearing cycle: open, closed, settled |
Settlement
| Type | |
|---|---|
Settlement, SettlementState, SettlFunding, LegResult | A SETTL, its states, how its value is secured, and the result of each leg; execution, and failure_reason once it leaves the path of a payment that settles |
RailReason | The reason a rail gives for a failed order: Path Global's diagnosis on a SETTL |
Receipt | Signed: what was sent and received, the legs, the destination, the guarantee, final_at |
DeliveryDestination | Where a SETTL and its receipt deliver: { network, identifier }, or { network, path_address } for a PATH address |
Execution, ExecutionKind, ExecutionState | How an obligation is carried out (kind: 'pathglobal.execution'): payment, pvp, dvp, transfer, net_settlement, return. Instruction, InstructionKind and InstructionState are their names in 0.3.0 |
SettlementLeg, LegState | A leg: pay_in, exchange, pay_out, move, pay_provider, and its state |
SettlementHolding | Where the value of an execution sits |
RailEvidence | What a network answered for an order |
GuaranteeQuery, GuaranteeAnswer | The level of an exchange between two network kinds |
ExchangeRequest, ExchangeSide | A pvp or a dvp |
Treasury and the ledger
| Type | |
|---|---|
TreasuryPosition, TreasuryView, OpenPosition, Band | Positions, the treasury by asset, network and partner, and the band of a position |
NetworkAccount | A physical account, shown by its mask |
TreasuryPolicy, TreasuryPolicyRequest | The policy of a physical account |
SafeguardPolicy, SafeguardingState | The safeguard policy of an asset, and its gap |
TreasuryTransfer, TransferRequest, TransferKind, TransferResolution | A transfer, as proposed, and how a blocked one ends |
ExpectedFunding, FundingRequest | A funding that will arrive from outside |
AllowlistEntry, AllowlistRequest | A destination value may leave to |
Reconciliation | matched, break, resolved |
InboundItem | An inbound item that waits for a decision |
RefuelCycle, RefuelReport | A refuel cycle and its signed report |
LedgerAccount, AccountClass, AccountStatus, AccountLimits | An account of the ledger: balance, reserved, pending_in, pending_out, status, limits |
JournalEntry, LedgerEntryKind | One entry of the journal: lines that sum to zero per asset |
LedgerHold | held, committed, captured, released, expired |
LedgerResult | What one batch of the ledger did |
Risk
| Type | |
|---|---|
RiskCorridor, RiskCorridorRequest, Throttle | A corridor of risk, open, throttled or closed, and its bounds |
ExposureLimit, LimitScope, Exposure | A limit and its utilisation |
Breaker, BreakerScope | closed, half_open, open |
Approval, ApprovalAction | Signed: requested, approved, rejected, consumed, expired; one action, one subject, one target version |
ApprovalRule | An approval rule |
Operator | A registered operator: id, public key, scopes, status |
Identity | pending, verified, restricted, blocked |
RiskCase | open, assigned, decided |
RiskDecision | One decision of the audit log |
Intelligence
| Type | |
|---|---|
Forecast, ForecastBucket | Hourly net outflow, p50, p90, p99 |
CorridorHealth | A score and its factors |
StateReading | The state reading |
Advice, AdviceTopic | A choice among bounded options, against its baseline |
Evaluation | Advice and forecasts against what was realised |
IntelligenceBounds, BoundsRequest | The bounds of automatic application |
Connectivity
| Type | |
|---|---|
NetworkCalendar, CalendarAnswer, CalendarOperation | The calendar of a network and its answer now |
NetworkCapability, RailOperationName | What a network and router can do now |
SandboxOutcome | fail, timeout, unknown, slow, return, short, over, charge, outage |
ConnectionHealth, NetworkAccountRequest, ParticipantRequest and Switch belong to the
calls reserved to Path Global.
Connect, ramp, Crossway and tools
| Type | |
|---|---|
Instrument, LinkRequest | A linked account, shown by its mask |
LinkSession, LinkSessionRequest, DelegatedProvider | A link approved at a provider or in a wallet |
ConnectCapability, ConnectionPolicy, Schedule, ConnectionRequest | What a connection grants, within which limits, on which schedule |
PathConnection, ConnectionUsage | A connection of Path Global (pathglobal.connection), signed again at every change, and its uses |
Delegation | One operation of a connection, for a third party (pathglobal.delegation) |
RampProvider, RampSessionRequest, RampSession | On and off ramp |
CrosswayKey, Registry, Resolution | Crossway keys, registries and resolutions |
Tool | One operation of the PATH protocol through Path Tools; own_member for a tool that runs for a PATH member of its own |
ResolverAnswer, ResolverLookupInput | The signed resolver_answer of a holding member; the input of resolver_lookup, an alias and a nonce |
Intelligence
pg.intelligence — net outflow forecasts, corridor health, the state reading, advice measured against its baseline, the evaluation, and the bounds of automatic application.
Errors
PathGlobalApiError — the status, the stable code, the request id and the details of an error the API answers, and the codes worth handling by name.