dpp-wallet-sdk
v0.1.0-alpha.0
Published
Wallet issuer SDK for Delegated Payments Protocol — capability issuance, OAuth linking, intent FSM, and JWKS discovery.
Maintainers
Readme
dpp-wallet-sdk (v0.1 alpha scaffold)
Wallet issuer SDK for the Delegated Payments Protocol. Mirrors dpp-merchant-sdk ergonomics: TypeScript, ESM, DPPError codes, and normative JSON schemas from specs/schemas/.
Status: Package scaffold + API RFC. Method bodies throw not_implemented until AGE-36–AGE-38 land.
Install (future)
npm install dpp-wallet-sdk@alphaNot yet published. Use monorepo
file:../../wallet-sdkduring development.
Quick start (sketch)
import { createWalletIssuer } from 'dpp-wallet-sdk';
const wallet = createWalletIssuer({
issuer: 'https://wallet.example/issuer',
signingKey: {
type: 'kms',
keyId: 'alias/dpp-signing',
kid: '2026-05',
publicJwk: { kty: 'EC', crv: 'P-256', x: '...', y: '...', alg: 'ES256', use: 'sig' },
},
defaultCapabilityTtlSeconds: 600,
// Production: inject kmsSigner for your KMS/HSM (AWS helper is optional — see docs/operations/wallet-kms-signing.md)
});
// Alpha scaffold — implementations in AGE-36–AGE-38:
const { compactJws } = await wallet.issueCapability({
sub: 'did:key:z6Mk…',
scopes: ['pay:initiate'],
constraints: {
maxAmount: { value: '500.00', currency: 'INR' },
merchantAllowlist: ['merchant:demo'],
},
});API surface (RFC)
| Module | Export | Purpose |
|--------|--------|---------|
| Issuer | createWalletIssuer, DPPWalletIssuer | Root client |
| Capabilities | issueCapability | Sign capability JWS |
| Intents | createIntent, submitIntent, getIntentStatus, resumeAfterUserAction | Intent FSM |
| Binding | computeIntentDigest | Canonical digest for intentBind |
| Agents | registerAgent, revokeAgent | Agent registry |
| OAuth | createAuthorizationUrl, exchangeCode, revokeDelegation | Agent linking (PKCE) |
| Crypto | exportJwks, rotateKeys | Merchant discovery |
Full contract: docs/rfc/dpp-wallet-sdk-api.md.
Integration guide
See docs/integration-guides/wallet-sdk.md for end-to-end wiring, KMS signing, security checklist, and API reference. Run the wallet-issuer example or express-wallet-issuer locally.
Develop
cd sdk/wallet-sdk
npm install
npm testRelated specifications
- wallet-oauth-linking.md
- wallet-oauth.yaml
- verification-flows.md
- dpp-merchant-sdk — symmetric verifier SDK
