@solana/mpp 0.1.0 → 0.2.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (92) hide show
  1. package/README.md +212 -0
  2. package/dist/Methods.d.ts +1 -213
  3. package/dist/Methods.d.ts.map +1 -1
  4. package/dist/Methods.js +1 -158
  5. package/dist/Methods.js.map +1 -1
  6. package/dist/client/Methods.d.ts +0 -2
  7. package/dist/client/Methods.d.ts.map +1 -1
  8. package/dist/client/Methods.js +0 -2
  9. package/dist/client/Methods.js.map +1 -1
  10. package/dist/client/index.d.ts +0 -1
  11. package/dist/client/index.d.ts.map +1 -1
  12. package/dist/client/index.js +0 -1
  13. package/dist/client/index.js.map +1 -1
  14. package/dist/index.d.ts +0 -3
  15. package/dist/index.d.ts.map +1 -1
  16. package/dist/index.js +0 -2
  17. package/dist/index.js.map +1 -1
  18. package/dist/server/Charge.d.ts +2 -2
  19. package/dist/server/Charge.d.ts.map +1 -1
  20. package/dist/server/Charge.js +4 -0
  21. package/dist/server/Charge.js.map +1 -1
  22. package/dist/server/Methods.d.ts +0 -2
  23. package/dist/server/Methods.d.ts.map +1 -1
  24. package/dist/server/Methods.js +0 -2
  25. package/dist/server/Methods.js.map +1 -1
  26. package/dist/server/index.d.ts +0 -1
  27. package/dist/server/index.d.ts.map +1 -1
  28. package/dist/server/index.js +0 -1
  29. package/dist/server/index.js.map +1 -1
  30. package/package.json +1 -9
  31. package/src/Methods.ts +1 -171
  32. package/src/client/Methods.ts +0 -3
  33. package/src/client/index.ts +0 -1
  34. package/src/index.ts +0 -29
  35. package/src/server/Charge.ts +7 -2
  36. package/src/server/Methods.ts +0 -3
  37. package/src/server/index.ts +0 -1
  38. package/dist/client/Session.d.ts +0 -195
  39. package/dist/client/Session.d.ts.map +0 -1
  40. package/dist/client/Session.js +0 -411
  41. package/dist/client/Session.js.map +0 -1
  42. package/dist/server/Session.d.ts +0 -171
  43. package/dist/server/Session.d.ts.map +0 -1
  44. package/dist/server/Session.js +0 -430
  45. package/dist/server/Session.js.map +0 -1
  46. package/dist/session/ChannelStore.d.ts +0 -12
  47. package/dist/session/ChannelStore.d.ts.map +0 -1
  48. package/dist/session/ChannelStore.js +0 -88
  49. package/dist/session/ChannelStore.js.map +0 -1
  50. package/dist/session/Types.d.ts +0 -179
  51. package/dist/session/Types.d.ts.map +0 -1
  52. package/dist/session/Types.js +0 -2
  53. package/dist/session/Types.js.map +0 -1
  54. package/dist/session/Voucher.d.ts +0 -7
  55. package/dist/session/Voucher.d.ts.map +0 -1
  56. package/dist/session/Voucher.js +0 -118
  57. package/dist/session/Voucher.js.map +0 -1
  58. package/dist/session/authorizers/BudgetAuthorizer.d.ts +0 -90
  59. package/dist/session/authorizers/BudgetAuthorizer.d.ts.map +0 -1
  60. package/dist/session/authorizers/BudgetAuthorizer.js +0 -398
  61. package/dist/session/authorizers/BudgetAuthorizer.js.map +0 -1
  62. package/dist/session/authorizers/SwigSessionAuthorizer.d.ts +0 -104
  63. package/dist/session/authorizers/SwigSessionAuthorizer.d.ts.map +0 -1
  64. package/dist/session/authorizers/SwigSessionAuthorizer.js +0 -522
  65. package/dist/session/authorizers/SwigSessionAuthorizer.js.map +0 -1
  66. package/dist/session/authorizers/UnboundedAuthorizer.d.ts +0 -36
  67. package/dist/session/authorizers/UnboundedAuthorizer.d.ts.map +0 -1
  68. package/dist/session/authorizers/UnboundedAuthorizer.js +0 -204
  69. package/dist/session/authorizers/UnboundedAuthorizer.js.map +0 -1
  70. package/dist/session/authorizers/index.d.ts +0 -5
  71. package/dist/session/authorizers/index.d.ts.map +0 -1
  72. package/dist/session/authorizers/index.js +0 -5
  73. package/dist/session/authorizers/index.js.map +0 -1
  74. package/dist/session/authorizers/makeSessionAuthorizer.d.ts +0 -19
  75. package/dist/session/authorizers/makeSessionAuthorizer.d.ts.map +0 -1
  76. package/dist/session/authorizers/makeSessionAuthorizer.js +0 -72
  77. package/dist/session/authorizers/makeSessionAuthorizer.js.map +0 -1
  78. package/dist/session/index.d.ts +0 -5
  79. package/dist/session/index.d.ts.map +0 -1
  80. package/dist/session/index.js +0 -5
  81. package/dist/session/index.js.map +0 -1
  82. package/src/client/Session.ts +0 -630
  83. package/src/server/Session.ts +0 -687
  84. package/src/session/ChannelStore.ts +0 -128
  85. package/src/session/Types.ts +0 -189
  86. package/src/session/Voucher.ts +0 -158
  87. package/src/session/authorizers/BudgetAuthorizer.ts +0 -574
  88. package/src/session/authorizers/SwigSessionAuthorizer.ts +0 -767
  89. package/src/session/authorizers/UnboundedAuthorizer.ts +0 -284
  90. package/src/session/authorizers/index.ts +0 -4
  91. package/src/session/authorizers/makeSessionAuthorizer.ts +0 -104
  92. package/src/session/index.ts +0 -4
package/README.md ADDED
@@ -0,0 +1,212 @@
1
+ <p align="center">
2
+ <img src="https://github.com/solana-foundation/mpp-sdk/raw/main/assets/banner.png" alt="MPP" width="100%" />
3
+ </p>
4
+
5
+ # @solana/mpp
6
+
7
+ Solana payment method for the [Machine Payments Protocol](https://mpp.dev).
8
+
9
+ **MPP** is [an open protocol proposal](https://paymentauth.org) that lets any HTTP API accept payments using the `402 Payment Required` flow.
10
+
11
+ > [!IMPORTANT]
12
+ > This repository is under active development. The [Solana MPP spec](https://github.com/tempoxyz/mpp-specs/pull/188) is not yet finalized — APIs and wire formats are subject to change.
13
+
14
+ ## Install
15
+
16
+ ```bash
17
+ pnpm add @solana/mpp
18
+ ```
19
+
20
+ ## Features
21
+
22
+ **Charge** (one-time payments)
23
+ - Native SOL and SPL token transfers (USDC, PYUSD, Token-2022, etc.)
24
+ - Two settlement modes: pull (`type="transaction"`, default) and push (`type="signature"`)
25
+ - Fee sponsorship: server pays transaction fees on behalf of clients
26
+ - Split payments: send one charge to multiple recipients in a single transaction
27
+ - Replay protection via consumed transaction signatures
28
+
29
+ **General**
30
+ - Works with [ConnectorKit](https://www.connectorkit.dev), `@solana/kit` keypair signers, and [Solana Keychain](https://github.com/solana-foundation/solana-keychain) remote signers
31
+ - Server pre-fetches `recentBlockhash` to save client an RPC round-trip
32
+ - Transaction simulation before broadcast to prevent wasted fees
33
+ - Optional `tokenProgram` hint; clients resolve the mint owner and fail closed if discovery fails
34
+
35
+ ## Architecture
36
+
37
+ ```
38
+ mpp-sdk/
39
+ ├── typescript/ # TypeScript SDK
40
+ │ └── packages/mpp/src/
41
+ │ ├── Methods.ts # Shared charge + session schemas
42
+ │ ├── constants.ts # Token programs, USDC mints, RPC URLs
43
+ │ ├── server/
44
+ │ │ ├── Charge.ts # Server: challenge, verify, broadcast
45
+ │ │ └── Session.ts # Server: session channel management
46
+ │ ├── client/
47
+ │ │ ├── Charge.ts # Client: build tx, sign, send
48
+ │ │ └── Session.ts # Client: session lifecycle
49
+ │ └── session/
50
+ │ ├── Types.ts # Session types and interfaces
51
+ │ ├── Voucher.ts # Voucher signing and verification
52
+ │ ├── ChannelStore.ts # Persistent channel state
53
+ │ └── authorizers/ # Pluggable authorization strategies
54
+ ├── rust/ # Rust SDK (coming soon)
55
+ │ └── src/lib.rs
56
+ └── demo/ # Interactive playground
57
+ ```
58
+
59
+ **Exports:**
60
+ - `@solana/mpp` — shared schemas, session types, and authorizers only
61
+ - `@solana/mpp/server` — server-side charge + session, `Mppx`, `Store`
62
+ - `@solana/mpp/client` — client-side charge + session, `Mppx`
63
+
64
+ ## Quick Start
65
+
66
+ ### Charge (one-time payment)
67
+
68
+ **Server:**
69
+
70
+ ```ts
71
+ import { Mppx, solana } from '@solana/mpp/server'
72
+
73
+ const mppx = Mppx.create({
74
+ secretKey: process.env.MPP_SECRET_KEY,
75
+ methods: [
76
+ solana.charge({
77
+ recipient: 'RecipientPubkey...',
78
+ currency: 'EPjFWdd5AufqSSqeM2qN1xzybapC8G4wEGGkZwyTDt1v',
79
+ decimals: 6,
80
+ }),
81
+ ],
82
+ })
83
+
84
+ const result = await mppx.charge({
85
+ amount: '1000000', // 1 USDC
86
+ currency: 'USDC',
87
+ })(request)
88
+
89
+ if (result.status === 402) return result.challenge
90
+ return result.withReceipt(Response.json({ data: '...' }))
91
+ ```
92
+
93
+ **Client:**
94
+
95
+ ```ts
96
+ import { Mppx, solana } from '@solana/mpp/client'
97
+
98
+ const mppx = Mppx.create({
99
+ methods: [solana.charge({ signer })], // any TransactionSigner
100
+ })
101
+
102
+ const response = await mppx.fetch('https://api.example.com/paid-endpoint')
103
+ ```
104
+
105
+ ### Fee Sponsorship (charge)
106
+
107
+ The server can pay transaction fees on behalf of clients:
108
+
109
+ ```ts
110
+ // Server — pass a TransactionPartialSigner to cover fees
111
+ solana.charge({
112
+ recipient: '...',
113
+ signer: feePayerSigner, // KeyPairSigner, Keychain SolanaSigner, etc.
114
+ })
115
+
116
+ // Client — no changes needed, fee payer is handled automatically
117
+ ```
118
+
119
+ ## How It Works
120
+
121
+ ### Charge Flow
122
+
123
+ 1. Client requests a resource
124
+ 2. Server returns **402 Payment Required** with a challenge (`recipient`, `amount`, `currency`, optional `tokenProgram`, optional `recentBlockhash`)
125
+ 3. Client builds and signs a Solana transfer transaction
126
+ 4. Server simulates, broadcasts, confirms on-chain, and verifies the transfer
127
+ 5. Server returns the resource with a `Payment-Receipt` header
128
+
129
+ With fee sponsorship, the client partially signs (transfer authority only) and the server co-signs as fee payer before broadcasting.
130
+
131
+ ### Splits (charge)
132
+
133
+ Use `splits` when one charge should pay multiple recipients in the same asset.
134
+ The top-level `amount` is the total paid. The primary `recipient` receives
135
+ `amount - sum(splits)`, and each split recipient receives its own `amount`.
136
+
137
+ ```ts
138
+ import { Mppx, solana } from '@solana/mpp/server'
139
+
140
+ const mppx = Mppx.create({
141
+ secretKey: process.env.MPP_SECRET_KEY,
142
+ methods: [
143
+ solana.charge({
144
+ recipient: 'SellerPubkey...',
145
+ currency: 'EPjFWdd5AufqSSqeM2qN1xzybapC8G4wEGGkZwyTDt1v',
146
+ decimals: 6,
147
+ splits: [
148
+ { recipient: 'PlatformPubkey...', amount: '50000', memo: 'platform fee' },
149
+ { recipient: 'ReferrerPubkey...', amount: '20000', memo: 'referral fee' },
150
+ ],
151
+ }),
152
+ ],
153
+ })
154
+
155
+ const result = await mppx.charge({
156
+ amount: '1000000', // total: 1.00 USDC
157
+ currency: 'EPjFWdd5AufqSSqeM2qN1xzybapC8G4wEGGkZwyTDt1v',
158
+ })(request)
159
+ ```
160
+
161
+ In this example:
162
+ - seller receives `930000`
163
+ - platform receives `50000`
164
+ - referrer receives `20000`
165
+
166
+ The same `splits` shape works for native SOL charges.
167
+
168
+ ## Demo
169
+
170
+ An interactive playground with a React frontend and Express backend, running against [Surfpool](https://surfpool.run).
171
+
172
+ - Charge flow demo: `http://localhost:5173/charges`
173
+ - Session flow demo: `http://localhost:5173/sessions`
174
+
175
+ ```bash
176
+ surfpool start
177
+ pnpm demo:install
178
+ pnpm demo:server
179
+ pnpm demo:app
180
+ ```
181
+
182
+ See [demo/README.md](demo/README.md) for full details.
183
+
184
+ ## Development
185
+
186
+ ```bash
187
+ # TypeScript
188
+ cd typescript && pnpm install
189
+
190
+ just ts-fmt # Format and lint
191
+ just ts-build # Build
192
+ just ts-test # Unit tests (charge + session, no network)
193
+ just ts-test-integration # Integration tests (requires Surfpool)
194
+ # Rust
195
+ cd rust && cargo build
196
+
197
+ # Everything
198
+ just build # Build both
199
+ just test # Test both
200
+ just pre-commit # Full pre-commit checks
201
+ ```
202
+
203
+ ## Spec
204
+
205
+ This SDK implements the [Solana Charge Intent](https://github.com/tempoxyz/mpp-specs/pull/188) for the [HTTP Payment Authentication Scheme](https://paymentauth.org).
206
+
207
+ Session method docs and implementation notes are intentionally kept out of this
208
+ README for now. See [docs/methods/sessions.md](docs/methods/sessions.md).
209
+
210
+ ## License
211
+
212
+ MIT
package/dist/Methods.d.ts CHANGED
@@ -28,7 +28,7 @@ export declare const charge: {
28
28
  readonly request: z.ZodMiniObject<{
29
29
  /** Amount in smallest unit (lamports for SOL, base units for SPL tokens). */
30
30
  amount: z.ZodMiniString<string>;
31
- /** Identifies the unit for amount. "SOL" for native, or token symbol/mint (e.g. "USDC"). */
31
+ /** Identifies the unit for amount. "sol" (lowercase) for native SOL, or the token mint address for SPL tokens. */
32
32
  currency: z.ZodMiniString<string>;
33
33
  /** Human-readable memo describing the resource or service being paid for. */
34
34
  description: z.ZodMiniOptional<z.ZodMiniString<string>>;
@@ -62,216 +62,4 @@ export declare const charge: {
62
62
  }, z.core.$strip>;
63
63
  };
64
64
  };
65
- /**
66
- * Solana session method shared schema used by both server and client.
67
- *
68
- * Supports four credential actions:
69
- *
70
- * - **open**: opens a payment channel, records deposit, and anchors setup tx.
71
- * - **update**: submits a new monotonic voucher for cumulative usage.
72
- * - **topup**: increases channel escrow using a separate topup transaction.
73
- * - **close**: final voucher update used to finalize channel settlement.
74
- */
75
- export declare const session: {
76
- readonly intent: "session";
77
- readonly name: "solana";
78
- readonly schema: {
79
- readonly credential: {
80
- readonly payload: z.ZodMiniDiscriminatedUnion<[z.ZodMiniObject<{
81
- /** Session lifecycle action. */
82
- action: z.ZodMiniLiteral<"open">;
83
- /** Authorization mode selected by the authorizer implementation. */
84
- authorizationMode: z.ZodMiniString<string>;
85
- /** Optional advertised authorizer capabilities for client hints. */
86
- capabilities: z.ZodMiniOptional<z.ZodMiniObject<{
87
- /** Allowed action subset advertised by the authorizer. */
88
- allowedActions: z.ZodMiniOptional<z.ZodMiniArray<z.ZodMiniString<string>>>;
89
- /** Maximum cumulative authorized amount for this channel. */
90
- maxCumulativeAmount: z.ZodMiniOptional<z.ZodMiniString<string>>;
91
- }, z.core.$strip>>;
92
- /** Unique channel identifier generated by the client authorizer. */
93
- channelId: z.ZodMiniString<string>;
94
- /** Initial escrow amount committed for this channel. */
95
- depositAmount: z.ZodMiniString<string>;
96
- /** Optional voucher expiration timestamp in ISO-8601 format. */
97
- expiresAt: z.ZodMiniOptional<z.ZodMiniString<string>>;
98
- /** On-chain transaction reference proving open/setup step. */
99
- openTx: z.ZodMiniString<string>;
100
- /** Wallet payer for this channel (base58 public key). */
101
- payer: z.ZodMiniString<string>;
102
- /** Signed session voucher payload for open action. */
103
- voucher: z.ZodMiniObject<{
104
- /** Base58/encoded signature over canonical voucher bytes. */
105
- signature: z.ZodMiniString<string>;
106
- /** Signature scheme discriminator (`ed25519` or `swig-session`). */
107
- signatureType: z.ZodMiniString<string>;
108
- /** Voucher signer public key. */
109
- signer: z.ZodMiniString<string>;
110
- voucher: z.ZodMiniObject<{
111
- /** Chain identifier, for example `solana:mainnet-beta`. */
112
- chainId: z.ZodMiniString<string>;
113
- /** Channel identifier bound to this voucher. */
114
- channelId: z.ZodMiniString<string>;
115
- /** Channel program address expected by server verifier. */
116
- channelProgram: z.ZodMiniString<string>;
117
- /** Monotonic cumulative authorized amount. */
118
- cumulativeAmount: z.ZodMiniString<string>;
119
- /** Optional voucher expiration timestamp in ISO-8601 format. */
120
- expiresAt: z.ZodMiniOptional<z.ZodMiniString<string>>;
121
- /** Meter name for priced usage tracking. */
122
- meter: z.ZodMiniString<string>;
123
- /** Wallet payer bound to this voucher. */
124
- payer: z.ZodMiniString<string>;
125
- /** Channel recipient service wallet. */
126
- recipient: z.ZodMiniString<string>;
127
- /** Monotonic sequence number for replay protection. */
128
- sequence: z.ZodMiniNumber<number>;
129
- /** Server-provided nonce for challenge binding. */
130
- serverNonce: z.ZodMiniString<string>;
131
- /** Meter units associated with this authorization update. */
132
- units: z.ZodMiniString<string>;
133
- }, z.core.$strip>;
134
- }, z.core.$strip>;
135
- }, z.core.$strip>, z.ZodMiniObject<{
136
- /** Session lifecycle action. */
137
- action: z.ZodMiniLiteral<"update">;
138
- /** Existing channel identifier targeted by this update. */
139
- channelId: z.ZodMiniString<string>;
140
- /** Signed session voucher payload for usage update. */
141
- voucher: z.ZodMiniObject<{
142
- /** Base58/encoded signature over canonical voucher bytes. */
143
- signature: z.ZodMiniString<string>;
144
- /** Signature scheme discriminator (`ed25519` or `swig-session`). */
145
- signatureType: z.ZodMiniString<string>;
146
- /** Voucher signer public key. */
147
- signer: z.ZodMiniString<string>;
148
- voucher: z.ZodMiniObject<{
149
- /** Chain identifier, for example `solana:mainnet-beta`. */
150
- chainId: z.ZodMiniString<string>;
151
- /** Channel identifier bound to this voucher. */
152
- channelId: z.ZodMiniString<string>;
153
- /** Channel program address expected by server verifier. */
154
- channelProgram: z.ZodMiniString<string>;
155
- /** Monotonic cumulative authorized amount. */
156
- cumulativeAmount: z.ZodMiniString<string>;
157
- /** Optional voucher expiration timestamp in ISO-8601 format. */
158
- expiresAt: z.ZodMiniOptional<z.ZodMiniString<string>>;
159
- /** Meter name for priced usage tracking. */
160
- meter: z.ZodMiniString<string>;
161
- /** Wallet payer bound to this voucher. */
162
- payer: z.ZodMiniString<string>;
163
- /** Channel recipient service wallet. */
164
- recipient: z.ZodMiniString<string>;
165
- /** Monotonic sequence number for replay protection. */
166
- sequence: z.ZodMiniNumber<number>;
167
- /** Server-provided nonce for challenge binding. */
168
- serverNonce: z.ZodMiniString<string>;
169
- /** Meter units associated with this authorization update. */
170
- units: z.ZodMiniString<string>;
171
- }, z.core.$strip>;
172
- }, z.core.$strip>;
173
- }, z.core.$strip>, z.ZodMiniObject<{
174
- /** Session lifecycle action. */
175
- action: z.ZodMiniLiteral<"topup">;
176
- /** Additional escrow amount to add to channel deposit. */
177
- additionalAmount: z.ZodMiniString<string>;
178
- /** Existing channel identifier targeted by this topup. */
179
- channelId: z.ZodMiniString<string>;
180
- /** On-chain transaction reference proving topup execution. */
181
- topupTx: z.ZodMiniString<string>;
182
- }, z.core.$strip>, z.ZodMiniObject<{
183
- /** Session lifecycle action. */
184
- action: z.ZodMiniLiteral<"close">;
185
- /** Existing channel identifier targeted by this close. */
186
- channelId: z.ZodMiniString<string>;
187
- /** Optional on-chain settlement transaction reference for this close. */
188
- closeTx: z.ZodMiniOptional<z.ZodMiniString<string>>;
189
- /** Signed final voucher payload for close action. */
190
- voucher: z.ZodMiniObject<{
191
- /** Base58/encoded signature over canonical voucher bytes. */
192
- signature: z.ZodMiniString<string>;
193
- /** Signature scheme discriminator (`ed25519` or `swig-session`). */
194
- signatureType: z.ZodMiniString<string>;
195
- /** Voucher signer public key. */
196
- signer: z.ZodMiniString<string>;
197
- voucher: z.ZodMiniObject<{
198
- /** Chain identifier, for example `solana:mainnet-beta`. */
199
- chainId: z.ZodMiniString<string>;
200
- /** Channel identifier bound to this voucher. */
201
- channelId: z.ZodMiniString<string>;
202
- /** Channel program address expected by server verifier. */
203
- channelProgram: z.ZodMiniString<string>;
204
- /** Monotonic cumulative authorized amount. */
205
- cumulativeAmount: z.ZodMiniString<string>;
206
- /** Optional voucher expiration timestamp in ISO-8601 format. */
207
- expiresAt: z.ZodMiniOptional<z.ZodMiniString<string>>;
208
- /** Meter name for priced usage tracking. */
209
- meter: z.ZodMiniString<string>;
210
- /** Wallet payer bound to this voucher. */
211
- payer: z.ZodMiniString<string>;
212
- /** Channel recipient service wallet. */
213
- recipient: z.ZodMiniString<string>;
214
- /** Monotonic sequence number for replay protection. */
215
- sequence: z.ZodMiniNumber<number>;
216
- /** Server-provided nonce for challenge binding. */
217
- serverNonce: z.ZodMiniString<string>;
218
- /** Meter units associated with this authorization update. */
219
- units: z.ZodMiniString<string>;
220
- }, z.core.$strip>;
221
- }, z.core.$strip>;
222
- }, z.core.$strip>], "action">;
223
- };
224
- readonly request: z.ZodMiniObject<{
225
- asset: z.ZodMiniObject<{
226
- /** Token decimals for amount normalization. */
227
- decimals: z.ZodMiniNumber<number>;
228
- /** Asset kind: native SOL or SPL token. */
229
- kind: z.ZodMiniString<string>;
230
- /** SPL mint address when kind is `spl`. */
231
- mint: z.ZodMiniOptional<z.ZodMiniString<string>>;
232
- /** Optional ticker/symbol used for display. */
233
- symbol: z.ZodMiniOptional<z.ZodMiniString<string>>;
234
- }, z.core.$strip>;
235
- /** Channel program address used to verify vouchers and actions. */
236
- channelProgram: z.ZodMiniString<string>;
237
- /** Solana network name, for example mainnet-beta, devnet, localnet. */
238
- network: z.ZodMiniOptional<z.ZodMiniString<string>>;
239
- /** Optional pricing contract used to derive debit increments. */
240
- pricing: z.ZodMiniOptional<z.ZodMiniObject<{
241
- /** Price per unit in asset base units. */
242
- amountPerUnit: z.ZodMiniString<string>;
243
- /** Meter identifier for usage accounting. */
244
- meter: z.ZodMiniString<string>;
245
- /** Optional minimum debit to apply per request. */
246
- minDebit: z.ZodMiniOptional<z.ZodMiniString<string>>;
247
- /** Logical unit name charged by the service. */
248
- unit: z.ZodMiniString<string>;
249
- }, z.core.$strip>>;
250
- /** Service recipient wallet that receives settlement funds. */
251
- recipient: z.ZodMiniString<string>;
252
- /** Optional server hints for default session behavior. */
253
- sessionDefaults: z.ZodMiniOptional<z.ZodMiniObject<{
254
- /** Optional close behavior hint for client UX. */
255
- closeBehavior: z.ZodMiniOptional<z.ZodMiniString<string>>;
256
- /** Optional settlement cadence policy hints. */
257
- settleInterval: z.ZodMiniOptional<z.ZodMiniObject<{
258
- kind: z.ZodMiniString<string>;
259
- minIncrement: z.ZodMiniOptional<z.ZodMiniString<string>>;
260
- seconds: z.ZodMiniOptional<z.ZodMiniNumber<number>>;
261
- }, z.core.$strip>>;
262
- /** Suggested channel deposit to use on auto-open. */
263
- suggestedDeposit: z.ZodMiniOptional<z.ZodMiniString<string>>;
264
- /** Suggested time-to-live for channel/session in seconds. */
265
- ttlSeconds: z.ZodMiniOptional<z.ZodMiniNumber<number>>;
266
- }, z.core.$strip>>;
267
- /** Optional server-side verifier policy hints. */
268
- verifier: z.ZodMiniOptional<z.ZodMiniObject<{
269
- /** Supported authorization modes for this endpoint. */
270
- acceptAuthorizationModes: z.ZodMiniOptional<z.ZodMiniArray<z.ZodMiniString<string>>>;
271
- /** Maximum allowable client/server clock skew in seconds. */
272
- maxClockSkewSeconds: z.ZodMiniOptional<z.ZodMiniNumber<number>>;
273
- }, z.core.$strip>>;
274
- }, z.core.$strip>;
275
- };
276
- };
277
65
  //# sourceMappingURL=Methods.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"Methods.d.ts","sourceRoot":"","sources":["../src/Methods.ts"],"names":[],"mappings":"AAAA,OAAO,EAAU,C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oDAAoD;;oBAEpD,8CAA8C;;;gBAK1D,8FAA8F;;;YAGlG,2CAA2C;;;;CAIrD,CAAC"}
package/dist/Methods.js CHANGED
@@ -28,7 +28,7 @@ export const charge = Method.from({
28
28
  request: z.object({
29
29
  /** Amount in smallest unit (lamports for SOL, base units for SPL tokens). */
30
30
  amount: z.string(),
31
- /** Identifies the unit for amount. "SOL" for native, or token symbol/mint (e.g. "USDC"). */
31
+ /** Identifies the unit for amount. "sol" (lowercase) for native SOL, or the token mint address for SPL tokens. */
32
32
  currency: z.string(),
33
33
  /** Human-readable memo describing the resource or service being paid for. */
34
34
  description: z.optional(z.string()),
@@ -62,161 +62,4 @@ export const charge = Method.from({
62
62
  }),
63
63
  },
64
64
  });
65
- const voucherSchema = z.object({
66
- /** Chain identifier, for example `solana:mainnet-beta`. */
67
- chainId: z.string(),
68
- /** Channel identifier bound to this voucher. */
69
- channelId: z.string(),
70
- /** Channel program address expected by server verifier. */
71
- channelProgram: z.string(),
72
- /** Monotonic cumulative authorized amount. */
73
- cumulativeAmount: z.string(),
74
- /** Optional voucher expiration timestamp in ISO-8601 format. */
75
- expiresAt: z.optional(z.string()),
76
- /** Meter name for priced usage tracking. */
77
- meter: z.string(),
78
- /** Wallet payer bound to this voucher. */
79
- payer: z.string(),
80
- /** Channel recipient service wallet. */
81
- recipient: z.string(),
82
- /** Monotonic sequence number for replay protection. */
83
- sequence: z.number(),
84
- /** Server-provided nonce for challenge binding. */
85
- serverNonce: z.string(),
86
- /** Meter units associated with this authorization update. */
87
- units: z.string(),
88
- });
89
- const signedVoucherSchema = z.object({
90
- /** Base58/encoded signature over canonical voucher bytes. */
91
- signature: z.string(),
92
- /** Signature scheme discriminator (`ed25519` or `swig-session`). */
93
- signatureType: z.string(),
94
- /** Voucher signer public key. */
95
- signer: z.string(),
96
- voucher: voucherSchema,
97
- });
98
- /**
99
- * Solana session method shared schema used by both server and client.
100
- *
101
- * Supports four credential actions:
102
- *
103
- * - **open**: opens a payment channel, records deposit, and anchors setup tx.
104
- * - **update**: submits a new monotonic voucher for cumulative usage.
105
- * - **topup**: increases channel escrow using a separate topup transaction.
106
- * - **close**: final voucher update used to finalize channel settlement.
107
- */
108
- export const session = Method.from({
109
- intent: 'session',
110
- name: 'solana',
111
- schema: {
112
- credential: {
113
- payload: z.discriminatedUnion('action', [
114
- z.object({
115
- /** Session lifecycle action. */
116
- action: z.literal('open'),
117
- /** Authorization mode selected by the authorizer implementation. */
118
- authorizationMode: z.string(),
119
- /** Optional advertised authorizer capabilities for client hints. */
120
- capabilities: z.optional(z.object({
121
- /** Allowed action subset advertised by the authorizer. */
122
- allowedActions: z.optional(z.array(z.string())),
123
- /** Maximum cumulative authorized amount for this channel. */
124
- maxCumulativeAmount: z.optional(z.string()),
125
- })),
126
- /** Unique channel identifier generated by the client authorizer. */
127
- channelId: z.string(),
128
- /** Initial escrow amount committed for this channel. */
129
- depositAmount: z.string(),
130
- /** Optional voucher expiration timestamp in ISO-8601 format. */
131
- expiresAt: z.optional(z.string()),
132
- /** On-chain transaction reference proving open/setup step. */
133
- openTx: z.string(),
134
- /** Wallet payer for this channel (base58 public key). */
135
- payer: z.string(),
136
- /** Signed session voucher payload for open action. */
137
- voucher: signedVoucherSchema,
138
- }),
139
- z.object({
140
- /** Session lifecycle action. */
141
- action: z.literal('update'),
142
- /** Existing channel identifier targeted by this update. */
143
- channelId: z.string(),
144
- /** Signed session voucher payload for usage update. */
145
- voucher: signedVoucherSchema,
146
- }),
147
- z.object({
148
- /** Session lifecycle action. */
149
- action: z.literal('topup'),
150
- /** Additional escrow amount to add to channel deposit. */
151
- additionalAmount: z.string(),
152
- /** Existing channel identifier targeted by this topup. */
153
- channelId: z.string(),
154
- /** On-chain transaction reference proving topup execution. */
155
- topupTx: z.string(),
156
- }),
157
- z.object({
158
- /** Session lifecycle action. */
159
- action: z.literal('close'),
160
- /** Existing channel identifier targeted by this close. */
161
- channelId: z.string(),
162
- /** Optional on-chain settlement transaction reference for this close. */
163
- closeTx: z.optional(z.string()),
164
- /** Signed final voucher payload for close action. */
165
- voucher: signedVoucherSchema,
166
- }),
167
- ]),
168
- },
169
- request: z.object({
170
- asset: z.object({
171
- /** Token decimals for amount normalization. */
172
- decimals: z.number(),
173
- /** Asset kind: native SOL or SPL token. */
174
- kind: z.string(),
175
- /** SPL mint address when kind is `spl`. */
176
- mint: z.optional(z.string()),
177
- /** Optional ticker/symbol used for display. */
178
- symbol: z.optional(z.string()),
179
- }),
180
- /** Channel program address used to verify vouchers and actions. */
181
- channelProgram: z.string(),
182
- /** Solana network name, for example mainnet-beta, devnet, localnet. */
183
- network: z.optional(z.string()),
184
- /** Optional pricing contract used to derive debit increments. */
185
- pricing: z.optional(z.object({
186
- /** Price per unit in asset base units. */
187
- amountPerUnit: z.string(),
188
- /** Meter identifier for usage accounting. */
189
- meter: z.string(),
190
- /** Optional minimum debit to apply per request. */
191
- minDebit: z.optional(z.string()),
192
- /** Logical unit name charged by the service. */
193
- unit: z.string(),
194
- })),
195
- /** Service recipient wallet that receives settlement funds. */
196
- recipient: z.string(),
197
- /** Optional server hints for default session behavior. */
198
- sessionDefaults: z.optional(z.object({
199
- /** Optional close behavior hint for client UX. */
200
- closeBehavior: z.optional(z.string()),
201
- /** Optional settlement cadence policy hints. */
202
- settleInterval: z.optional(z.object({
203
- kind: z.string(),
204
- minIncrement: z.optional(z.string()),
205
- seconds: z.optional(z.number()),
206
- })),
207
- /** Suggested channel deposit to use on auto-open. */
208
- suggestedDeposit: z.optional(z.string()),
209
- /** Suggested time-to-live for channel/session in seconds. */
210
- ttlSeconds: z.optional(z.number()),
211
- })),
212
- /** Optional server-side verifier policy hints. */
213
- verifier: z.optional(z.object({
214
- /** Supported authorization modes for this endpoint. */
215
- acceptAuthorizationModes: z.optional(z.array(z.string())),
216
- /** Maximum allowable client/server clock skew in seconds. */
217
- maxClockSkewSeconds: z.optional(z.number()),
218
- })),
219
- }),
220
- },
221
- });
222
65
  //# sourceMappingURL=Methods.js.map
@@ -1 +1 @@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AC,CACL,CACJ;gBACD,8FAA8F;gBAC9F,YAAY,EAAE,CAAC,CAAC,QAAQ,CAAC,CAAC,CAAC,MAAM,EAAE,CAAC;aACvC,CAAC;YACF,2CAA2C;YAC3C,SAAS,EAAE,CAAC,CAAC,MAAM,EAAE;SACxB,CAAC;KACL;CACJ,CAAC,CAAC"}
@@ -1,5 +1,4 @@
1
1
  import { charge as charge_ } from './Charge.js';
2
- import { session as session_ } from './Session.js';
3
2
  /**
4
3
  * Creates a Solana `charge` method for usage on the client.
5
4
  *
@@ -19,7 +18,6 @@ import { session as session_ } from './Session.js';
19
18
  export declare const solana: {
20
19
  (parameters: solana.Parameters): ReturnType<typeof charge_>;
21
20
  charge: typeof charge_;
22
- session: typeof session_;
23
21
  };
24
22
  export declare namespace solana {
25
23
  type Parameters = charge_.Parameters;
@@ -1 +1 @@
1
- {"version":3,"file":"Methods.d.ts","sourceRoot":"","sources":["../../src/client/Methods.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,MAAM,IAAI,OAAO,EAAE,MAAM,aAAa,CAAC;AAChD,OAAO,EAAE,OAAO,IAAI,QAAQ,EAAE,MAAM,cAAc,CAAC;AAEnD;;;;;;;;;;;;;;;GAeG;AACH,eAAO,MAAM,MAAM,EAAE;IACjB,CAAC,UAAU,EAAE,MAAM,CAAC,UAAU,GAAG,UAAU,CAAC,OAAO,OAAO,CAAC,CAAC;IAC5D,MAAM,EAAE,OAAO,OAAO,CAAC;IACvB,OAAO,EAAE,OAAO,QAAQ,CAAC;CAI3B,CAAC;AAEH,MAAM,CAAC,OAAO,WAAW,MAAM,CAAC;IAC5B,KAAK,UAAU,GAAG,OAAO,CAAC,UAAU,CAAC;CACxC"}
1
+ {"version":3,"file":"Methods.d.ts","sourceRoot":"","sources":["../../src/client/Methods.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,MAAM,IAAI,OAAO,EAAE,MAAM,aAAa,CAAC;AAEhD;;;;;;;;;;;;;;;GAeG;AACH,eAAO,MAAM,MAAM,EAAE;IACjB,CAAC,UAAU,EAAE,MAAM,CAAC,UAAU,GAAG,UAAU,CAAC,OAAO,OAAO,CAAC,CAAC;IAC5D,MAAM,EAAE,OAAO,OAAO,CAAC;CAGzB,CAAC;AAEH,MAAM,CAAC,OAAO,WAAW,MAAM,CAAC;IAC5B,KAAK,UAAU,GAAG,OAAO,CAAC,UAAU,CAAC;CACxC"}