Move and verify

SDK reference

Connect, ramp, Crossway and tools

pg.connect, pg.ramp, pg.crossway and pg.tools — linked accounts and their connections, on and off ramp sessions, Crossway lookups, and the PATH protocol through Path Tools.

pg.connect

Scope connect. Path Connect links accounts to a client and grants their use through connections. A linked account is an Instrument: its identifier is not kept in clear; a token and a mask are. A PathConnection is type: 'pathglobal.connection' and a Delegation type: 'pathglobal.delegation': objects of Path Global, not the path.connection or path.mandate of PATH CONNECT.

CallReturns
providers()DelegatedProvider[]The platforms and exchanges that can be linked by delegated access
startSession(input, opts?)LinkSessionStarts a link the person approves elsewhere: { method: 'oauth', provider, … } at a platform or an exchange, { method: 'walletconnect', chains } in a wallet
session(id)LinkSessionOne session: pending, completed, declined or expired
completeSession(id, input){ session; instrument? }Completes it: { code, state } from the provider, or { topic, accounts } from the wallet
link(input, opts?)InstrumentLinks an account (LinkRequest): on a network, at another member ({ path }), or a holding at Path Global ({ holding })
instruments(subject?)Instrument[]The caller's instruments
instrument(id)InstrumentOne instrument
unlink(id)InstrumentUnlinks it; every connection on it is revoked
allow(instrument, { network?, amount, expires_at, signature })InstrumentThe allowance a wallet signed (Permit2 on an EVM chain, a token delegate on Solana)

Connections and delegations

CallReturns
grant(input, opts?)PathConnectionGrants a grantee the use of an instrument, for named capabilities, within a policy, with the consent recorded (ConnectionRequest)
connections(instrument?)PathConnection[]The caller's connections
connection(reference)PathConnectionOne connection, for its grantor or its grantee
consume(reference, { capability, amount?, reference? }, opts?){ connection; usage }Uses a connection once. A capability that is absent is denied; every limit is enforced
usage(reference)ConnectionUsage[]Every use of a connection
revoke(reference)PathConnectionEnds a connection
charge(reference){ connection; route? }A scheduled connection: draws the charge that is due and pays it to its destination
delegate(reference, input)DelegationOne operation of a connection, for a third party, bound to the capability, the amount and the destination
delegations(reference)Delegation[]The delegations of a connection
delegation(reference)DelegationOne delegation
consumeDelegation(reference, { amount, destination, reference? }){ delegation; connection; usage }The delegate performs the bound operation: the exact amount, to the committed destination
revokeDelegation(reference)DelegationEnds a delegation

Capabilities: payout_to, collect_from, view_balance, view_transactions, payment_request. A schedule makes a connection a recurring mandate, with counters per period and, with charge, a charge drawn at each due date.

CodeStatusWhen
pathglobal.connect.capability_denied403The connection does not grant the capability
pathglobal.connect.limit_exceeded422The amount passes a limit of the connection or the delegation
pathglobal.connect.inactive409The connection or the delegation is revoked or expired
pathglobal.connect.not_due409charge: no charge is due, or one is under way
pathglobal.connect.account_not_found422The account to link could not be verified
pathglobal.connect.holder_mismatch422The holder does not match the account
pathglobal.networks.identifier_invalid422The identifier is not one of the network

pg.ramp

Scope ramp. A session is read by the client that opened it.

CallReturns
providers()RampProvider[]Every provider, its kind, categories and methods, and whether the caller offers it
settings()RampSettingsThe caller's settings: processing (connect-pay or path-pay-wl), pay_with_connect, proximity, disabled
updateSettings(input)RampSettingsChanges them; a field left out keeps its value
createSession(input, opts?)RampSessionOpens a session: { direction: 'on' | 'off', amount, category, provider?, method?, deliver, destination, country? }. category is a RampCategory
session(id)RampSessionOne session, its steps and its next action
advance(id)RampSessionAdvances the session by its current step

A session is open, completed, failed or expired. pathglobal.ramp.provider_unavailable (422) and pathglobal.ramp.step_invalid (409) are its codes.

pg.crossway

Scope crossway. The Crossway API resolves destinations on other networks. The protocol page is Crossway.

CallReturns
registries(){ registries; grants }The registries, and for each grant its operations, budget and used
discovery(key)signed crossway.discoveryRegistries that can hold a key of this form. Queries no registry and spends no lookup
sonar(registry, key)signed crossway.sonarWhether the registry holds the key, and its participant
resolver(registry, key)ResolutionThe participant and the account, shown masked
payeeCheck(registry, key, name)signed crossway.payee_checkmatch, close_match, no_match or unavailable

key is a CrosswayKey: { type: 'phone' | 'email' | 'tax' | 'random' | 'alias' | 'iban' | 'vpa', value }. Each sonar, resolver and payeeCheck spends one lookup of the grant's budget. A registry not granted for the operation is 403 pathglobal.crossway.registry_not_granted, a spent budget 429 with the same code. resolver answers a key it does not resolve with 404 pathglobal.crossway.key_unresolvable; a negative answer cannot be told apart from another.

pg.tools

Scope tools. Path Tools are the public operations of the PATH protocol, called with a Path Global key. Answers are PATH objects, as signed.

CallReturns
list()Tool[]Every tool: id, group, title, method, whether it is signed, writes, and is available
run<R>(tool, input?, opts?)RRuns a tool by its id
finder<R>({ identifier_type, identifier, nonce? })R{ step1, step2 }: the SONAR answer, then where to resolve it
sonar<R>({ identifier_type, identifier, nonce })RA sonar_answer
resolver<R>(key)RA resolver_answer: what a PATH address accepts
payeeCheck<R>({ key, mode: 'verify' | 'display', name?, nonce })RA payee_check: match, close_match, no_match, unavailable or shown
createRequest<R>(input, opts?)RIssues a PATH payment request
readObject<R>(reference)RReads a PATH object by reference
issueReceipt<R>(input, opts?)RIssues a PATH settlement receipt
verifyReceipt<R>(receipt)RVerifies a receipt

R defaults to unknown; type it with the PATH object you expect. A test key is answered by the sandbox in the same shapes, signed by the test key of /.well-known/path-keys (Path Tools in test mode). A tool that is not available is 503 pathglobal.tools.unavailable; a refusal of the protocol is pathglobal.tools.refused, with the PATH code in details.path_code. The objects are described in the protocol SDK.

The routes are on Connect, Ramp and Path Tools.

On this page