Working with it

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

  • Holding is a holding of an Omni Account. SettlementHolding is where the value of an execution sits, one ledger account per asset.
  • Execution is how Path Global carries out a SETTL, a period, a transfer or an exchange. Route.path_instruction is a payment instruction of the PATH protocol, issued by a payee's member.
  • A Settlement in refund_required is not terminal: it moves to refunding, closed or manual_review. The terminal states of SettlementState are closed and expired.
  • Receipt is the settlement receipt of a route, a record of Path Global. PayerReceipt is the reference and the status of the payer path.receipt of a route to a PATH destination, and DepositReceipt those of the payee path.receipt of 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
Guaranteeatomic, conditional, receipt_first, value_dated, bounded_exposure, strongest first
CommitModecapture_on_final or commit_first
NetworkKindbook, blockchain, irrevocable_instant, revocable, deferred
Purposesafeguarding, liquidity, settlement, collateral, gas
Tierhot, 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
IntentEntryA 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
Discoverabilityprivate, network, federated, public

Accounts, addresses and endpoints

Type
Account, AccountViewAn 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, HoldingRequestA wallet, a virtual account (fiat or stablecoin backed) or an external wallet; freeze while frozen
LedgerEntryOne line of a holding's statement
Membership{ mode: 'hosted' } or { mode: 'own', member, network }
Subject, SubjectRequestA client, individual or legal_entity, with its identity status, identifiers, aliases, attestation, path_subject and withdrawn_at
SubjectIdentifier, IdentifierType, VerificationMethod, IdentifierRequestAn 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, AliasReleaseAn alias in one network, with its ref and discoverability; a claim; a subject after a release, with released: { alias, quarantine_days }
PathAddress, AddressRequestA PATH address (pathglobal.address) with terms (derived or pledged), sync (done, owed or refused, with sync_error) and discoverability
AddressViewThe address with its endpoints and rails, accepts (IntentEntry[]) and commitment (null on derived terms)
AddressRailA rail of an address: capability (PathCapability or null), published, publish_error?, pledged (null on derived terms) and accepted
PledgeRequest, PledgeEntryWhat addresses.pledge takes: rails of the address in order of preference, with limits in Money and reference_required
StandingIntentOne 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, EndpointRequestWhat 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
EndpointTypewallet_address, wallet_address_memo, virtual_address, viban, account_number, alias, card_pan, card_token
EndpointDetailsThe 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
DepositA 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
NetworkA network of the catalogue: slug, rails, assets, speed, routers, availability, endpoint_formats
NetworkDetails, CatalogueRail, CatalogueAssetA network in full, with its rails, typed assets and endpoint formats
EndpointFormat, NetworkEndpointFormat, FormatField, AliasDirectoryAn 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, CatalogueNetworkEndpointFormatA 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, FieldNameThe vocabularies of the register
NetworkEngine, PartnerHow a network is reached, and who gives access; sandbox: true marks a simulated partner
Endpoint, SourceWhere 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, ConstraintsWhat a quote is asked for; router is 'path-flash-1.0' (the default) or a router of the catalogue
QuoteSigned: the chosen Candidate, the alternatives, the decision, the Proof outcome, guarantee, expires_at
Candidate, CandidateSummary, LegA route and its legs: collect, swap, convert, bridge, payout
CandidateDestinationWhere 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
DecisionHow the route was chosen among the candidates; model is path-flash-1.0 unless another was asked for
Routereview, executing, settled, failed, refund_required; for a PATH destination path_instruction and payer_receipt
PayerReceipt, PayerReasonThe 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, ProofRequestWhat Proof checks
VerdictSigned: pass, review or fail, with one result per check

Liquidity

Type
Corridor, Funding, LiquidityQuoteA provider's pair, its funding terms, and a firm quote
Pool, PoolTrade, PoolMovementA pool, its trades and its movements
PoolQuoterate, reference_rate, fee_bps, fee, sell, buy
PoolPosition, PoolWithdrawalWhat a credential supplied, and a withdrawal that waits for a person
DiscoveryQuery, DiscoveryAnswer, OfferWhere an amount can be delivered on a node now (liquidity.offers)
Edge, EdgeKind, LiquidityPath, DepthHow value moves between two nodes, and what a node can deliver

Clearing

Type
Participant, ParticipantCapA participant of clearing (provider, partner or client), its settlement accounts, caps and collateral
Obligation, ClearingObligationproposed, pending, accepted, queued, rejected, settled
ClearingNetPosition{ participant, asset, net }
NettingSet<ASSET>@<network>: settles_on_network, the network it settles on, cut-offs, status
ClearingPeriodopen, closed, settling, settled, partially_settled
ClearingReportSigned: the net positions, transfers, netting_efficiency, the executions that settle it (instructions) and carried positions of a period
CycleA clearing cycle: open, closed, settled

Settlement

Type
Settlement, SettlementState, SettlFunding, LegResultA 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
RailReasonThe reason a rail gives for a failed order: Path Global's diagnosis on a SETTL
ReceiptSigned: what was sent and received, the legs, the destination, the guarantee, final_at
DeliveryDestinationWhere a SETTL and its receipt deliver: { network, identifier }, or { network, path_address } for a PATH address
Execution, ExecutionKind, ExecutionStateHow 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, LegStateA leg: pay_in, exchange, pay_out, move, pay_provider, and its state
SettlementHoldingWhere the value of an execution sits
RailEvidenceWhat a network answered for an order
GuaranteeQuery, GuaranteeAnswerThe level of an exchange between two network kinds
ExchangeRequest, ExchangeSideA pvp or a dvp

Treasury and the ledger

Type
TreasuryPosition, TreasuryView, OpenPosition, BandPositions, the treasury by asset, network and partner, and the band of a position
NetworkAccountA physical account, shown by its mask
TreasuryPolicy, TreasuryPolicyRequestThe policy of a physical account
SafeguardPolicy, SafeguardingStateThe safeguard policy of an asset, and its gap
TreasuryTransfer, TransferRequest, TransferKind, TransferResolutionA transfer, as proposed, and how a blocked one ends
ExpectedFunding, FundingRequestA funding that will arrive from outside
AllowlistEntry, AllowlistRequestA destination value may leave to
Reconciliationmatched, break, resolved
InboundItemAn inbound item that waits for a decision
RefuelCycle, RefuelReportA refuel cycle and its signed report
LedgerAccount, AccountClass, AccountStatus, AccountLimitsAn account of the ledger: balance, reserved, pending_in, pending_out, status, limits
JournalEntry, LedgerEntryKindOne entry of the journal: lines that sum to zero per asset
LedgerHoldheld, committed, captured, released, expired
LedgerResultWhat one batch of the ledger did

Risk

Type
RiskCorridor, RiskCorridorRequest, ThrottleA corridor of risk, open, throttled or closed, and its bounds
ExposureLimit, LimitScope, ExposureA limit and its utilisation
Breaker, BreakerScopeclosed, half_open, open
Approval, ApprovalActionSigned: requested, approved, rejected, consumed, expired; one action, one subject, one target version
ApprovalRuleAn approval rule
OperatorA registered operator: id, public key, scopes, status
Identitypending, verified, restricted, blocked
RiskCaseopen, assigned, decided
RiskDecisionOne decision of the audit log

Intelligence

Type
Forecast, ForecastBucketHourly net outflow, p50, p90, p99
CorridorHealthA score and its factors
StateReadingThe state reading
Advice, AdviceTopicA choice among bounded options, against its baseline
EvaluationAdvice and forecasts against what was realised
IntelligenceBounds, BoundsRequestThe bounds of automatic application

Connectivity

Type
NetworkCalendar, CalendarAnswer, CalendarOperationThe calendar of a network and its answer now
NetworkCapability, RailOperationNameWhat a network and router can do now
SandboxOutcomefail, 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, LinkRequestA linked account, shown by its mask
LinkSession, LinkSessionRequest, DelegatedProviderA link approved at a provider or in a wallet
ConnectCapability, ConnectionPolicy, Schedule, ConnectionRequestWhat a connection grants, within which limits, on which schedule
PathConnection, ConnectionUsageA connection of Path Global (pathglobal.connection), signed again at every change, and its uses
DelegationOne operation of a connection, for a third party (pathglobal.delegation)
RampProvider, RampSessionRequest, RampSessionOn and off ramp
CrosswayKey, Registry, ResolutionCrossway keys, registries and resolutions
ToolOne operation of the PATH protocol through Path Tools; own_member for a tool that runs for a PATH member of its own
ResolverAnswer, ResolverLookupInputThe signed resolver_answer of a holding member; the input of resolver_lookup, an alias and a nonce

On this page