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-09-09.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 →Reachability
finder, sonar, resolver.
Open →Requests
Issuing and reading payment requests.
Open →Settlement
Receipts.
Open →Verification
Canonical JSON and signatures.
Open →URIs
buildUri, parseUri, 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,
buildUri,
parseUri,
pillarFor,
InteropParseError,
INTEROP_KINDS,
} from '@pathprotocol/sdk';
import type {
Capability,
DiscoveryDocument,
Discoverability,
AddressProfile,
IdentifierType,
InteropKind,
InteropUri,
PaymentRequest,
Reachability,
ResolverAnswer,
SettlementReceipt,
SignedEnvelope,
SonarAnswer,
} from '@pathprotocol/sdk';