SDK reference
SDK reference
@pathprotocol/sdk — one typed client for the whole surface, with signature verification and URI handling included.
npm install @pathprotocol/sdkTypeScript, ESM, Node 20+. Works in any runtime with fetch and Web Crypto.
The shape of it
import { PathClient } from '@pathprotocol/sdk';
const path = new PathClient({
baseUrl: 'https://api.example.com',
apiVersion: '2026-10-04.genesis',
});That client can already do everything public: read a payment request, read a receipt, resolve an address you know, read discovery. Add a credential and it can also search a directory and issue objects in your name.
Client
Construction, options, transport.
Open →Subjects
Attestations and ownership bindings.
Open →Addresses
Standing intent and receive targets.
Open →Instructions
Where to send one payment.
Open →Requests
Issuing and reading payment requests.
Open →Checkout
The request plus the hand-back.
Open →Connections
Grants and delegations.
Open →Receipts
Issuing and verifying settlement.
Open →Discovery
An operator's published document.
Open →Reachability
finder, sonar, resolver.
Open →Verification
Canonical JSON and signatures.
Open →Links
buildLink, parseLink, pillarFor.
Open →Errors
PathApiError and retrying.
Open →Two things worth knowing up front
Pin your version. apiVersion defaults to the version the SDK was built against, which is
almost always what you want — but state it explicitly so that upgrading the package and adopting a
new API version stay separate decisions.
Credentials are server-side. A credential inside a browser or a mobile app is public the moment someone opens the sources. The SDK will happily sign requests anywhere; where you run it is your decision and only one answer is safe.
Everything exported
import {
PathClient,
PathApiError,
PROTOCOL_VERSION,
DEFAULT_API_VERSION,
canonicalise,
verifyEnvelope,
verifyAgainstIssuer,
buildLink,
parseLink,
discoveryUrl,
pillarFor,
isPathObjectType,
InteropParseError,
PATH_LINK_MARKER,
PATH_OBJECT_TYPES,
REFERENCE_PATTERN,
} from '@pathprotocol/sdk';
import type {
Capability,
CheckoutSession,
DiscoveryDocument,
Discoverability,
AddressProfile,
IdentifierType,
PathAddressObject,
PathLink,
PathObject,
PathObjectType,
PaymentRequest,
Reachability,
ReceiptRoute,
ReceiptRouteLeg,
ResolverAnswer,
SettlementReceipt,
SignedEnvelope,
SonarAnswer,
Attestation,
OwnershipBinding,
} from '@pathprotocol/sdk';