@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.
- package/README.md +212 -0
- package/dist/Methods.d.ts +1 -213
- package/dist/Methods.d.ts.map +1 -1
- package/dist/Methods.js +1 -158
- package/dist/Methods.js.map +1 -1
- package/dist/client/Methods.d.ts +0 -2
- package/dist/client/Methods.d.ts.map +1 -1
- package/dist/client/Methods.js +0 -2
- package/dist/client/Methods.js.map +1 -1
- package/dist/client/index.d.ts +0 -1
- package/dist/client/index.d.ts.map +1 -1
- package/dist/client/index.js +0 -1
- package/dist/client/index.js.map +1 -1
- package/dist/index.d.ts +0 -3
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +0 -2
- package/dist/index.js.map +1 -1
- package/dist/server/Charge.d.ts +2 -2
- package/dist/server/Charge.d.ts.map +1 -1
- package/dist/server/Charge.js +4 -0
- package/dist/server/Charge.js.map +1 -1
- package/dist/server/Methods.d.ts +0 -2
- package/dist/server/Methods.d.ts.map +1 -1
- package/dist/server/Methods.js +0 -2
- package/dist/server/Methods.js.map +1 -1
- package/dist/server/index.d.ts +0 -1
- package/dist/server/index.d.ts.map +1 -1
- package/dist/server/index.js +0 -1
- package/dist/server/index.js.map +1 -1
- package/package.json +1 -9
- package/src/Methods.ts +1 -171
- package/src/client/Methods.ts +0 -3
- package/src/client/index.ts +0 -1
- package/src/index.ts +0 -29
- package/src/server/Charge.ts +7 -2
- package/src/server/Methods.ts +0 -3
- package/src/server/index.ts +0 -1
- package/dist/client/Session.d.ts +0 -195
- package/dist/client/Session.d.ts.map +0 -1
- package/dist/client/Session.js +0 -411
- package/dist/client/Session.js.map +0 -1
- package/dist/server/Session.d.ts +0 -171
- package/dist/server/Session.d.ts.map +0 -1
- package/dist/server/Session.js +0 -430
- package/dist/server/Session.js.map +0 -1
- package/dist/session/ChannelStore.d.ts +0 -12
- package/dist/session/ChannelStore.d.ts.map +0 -1
- package/dist/session/ChannelStore.js +0 -88
- package/dist/session/ChannelStore.js.map +0 -1
- package/dist/session/Types.d.ts +0 -179
- package/dist/session/Types.d.ts.map +0 -1
- package/dist/session/Types.js +0 -2
- package/dist/session/Types.js.map +0 -1
- package/dist/session/Voucher.d.ts +0 -7
- package/dist/session/Voucher.d.ts.map +0 -1
- package/dist/session/Voucher.js +0 -118
- package/dist/session/Voucher.js.map +0 -1
- package/dist/session/authorizers/BudgetAuthorizer.d.ts +0 -90
- package/dist/session/authorizers/BudgetAuthorizer.d.ts.map +0 -1
- package/dist/session/authorizers/BudgetAuthorizer.js +0 -398
- package/dist/session/authorizers/BudgetAuthorizer.js.map +0 -1
- package/dist/session/authorizers/SwigSessionAuthorizer.d.ts +0 -104
- package/dist/session/authorizers/SwigSessionAuthorizer.d.ts.map +0 -1
- package/dist/session/authorizers/SwigSessionAuthorizer.js +0 -522
- package/dist/session/authorizers/SwigSessionAuthorizer.js.map +0 -1
- package/dist/session/authorizers/UnboundedAuthorizer.d.ts +0 -36
- package/dist/session/authorizers/UnboundedAuthorizer.d.ts.map +0 -1
- package/dist/session/authorizers/UnboundedAuthorizer.js +0 -204
- package/dist/session/authorizers/UnboundedAuthorizer.js.map +0 -1
- package/dist/session/authorizers/index.d.ts +0 -5
- package/dist/session/authorizers/index.d.ts.map +0 -1
- package/dist/session/authorizers/index.js +0 -5
- package/dist/session/authorizers/index.js.map +0 -1
- package/dist/session/authorizers/makeSessionAuthorizer.d.ts +0 -19
- package/dist/session/authorizers/makeSessionAuthorizer.d.ts.map +0 -1
- package/dist/session/authorizers/makeSessionAuthorizer.js +0 -72
- package/dist/session/authorizers/makeSessionAuthorizer.js.map +0 -1
- package/dist/session/index.d.ts +0 -5
- package/dist/session/index.d.ts.map +0 -1
- package/dist/session/index.js +0 -5
- package/dist/session/index.js.map +0 -1
- package/src/client/Session.ts +0 -630
- package/src/server/Session.ts +0 -687
- package/src/session/ChannelStore.ts +0 -128
- package/src/session/Types.ts +0 -189
- package/src/session/Voucher.ts +0 -158
- package/src/session/authorizers/BudgetAuthorizer.ts +0 -574
- package/src/session/authorizers/SwigSessionAuthorizer.ts +0 -767
- package/src/session/authorizers/UnboundedAuthorizer.ts +0 -284
- package/src/session/authorizers/index.ts +0 -4
- package/src/session/authorizers/makeSessionAuthorizer.ts +0 -104
- 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. "
|
|
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
|
package/dist/Methods.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Methods.d.ts","sourceRoot":"","sources":["../src/Methods.ts"],"names":[],"mappings":"AAAA,OAAO,EAAU,CAAC,EAAE,MAAM,MAAM,CAAC;AAEjC;;;;;;;;;;;GAWG;AACH,eAAO,MAAM,MAAM;;;;;;gBAMH,oEAAoE;;gBAEpE,8EAA8E;;gBAE9E,iGAAiG;;;;;YAKrG,6EAA6E;;YAE7E,
|
|
1
|
+
{"version":3,"file":"Methods.d.ts","sourceRoot":"","sources":["../src/Methods.ts"],"names":[],"mappings":"AAAA,OAAO,EAAU,CAAC,EAAE,MAAM,MAAM,CAAC;AAEjC;;;;;;;;;;;GAWG;AACH,eAAO,MAAM,MAAM;;;;;;gBAMH,oEAAoE;;gBAEpE,8EAA8E;;gBAE9E,iGAAiG;;;;;YAKrG,6EAA6E;;YAE7E,kHAAkH;;YAElH,6EAA6E;;YAE7E,gFAAgF;;;gBAG5E,yDAAyD;;gBAEzD,uFAAuF;;gBAEvF,yFAAyF;;gBAEzF,yDAAyD;;gBAEzD,2FAA2F;;gBAE3F,yEAAyE;;oBAI7D,oDAAoD;;oBAEpD,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. "
|
|
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
|
package/dist/Methods.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Methods.js","sourceRoot":"","sources":["../src/Methods.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,MAAM,EAAE,CAAC,EAAE,MAAM,MAAM,CAAC;AAEjC;;;;;;;;;;;GAWG;AACH,MAAM,CAAC,MAAM,MAAM,GAAG,MAAM,CAAC,IAAI,CAAC;IAC9B,MAAM,EAAE,QAAQ;IAChB,IAAI,EAAE,QAAQ;IACd,MAAM,EAAE;QACJ,UAAU,EAAE;YACR,OAAO,EAAE,CAAC,CAAC,MAAM,CAAC;gBACd,oEAAoE;gBACpE,SAAS,EAAE,CAAC,CAAC,QAAQ,CAAC,CAAC,CAAC,MAAM,EAAE,CAAC;gBACjC,8EAA8E;gBAC9E,WAAW,EAAE,CAAC,CAAC,QAAQ,CAAC,CAAC,CAAC,MAAM,EAAE,CAAC;gBACnC,iGAAiG;gBACjG,IAAI,EAAE,CAAC,CAAC,MAAM,EAAE;aACnB,CAAC;SACL;QACD,OAAO,EAAE,CAAC,CAAC,MAAM,CAAC;YACd,6EAA6E;YAC7E,MAAM,EAAE,CAAC,CAAC,MAAM,EAAE;YAClB,
|
|
1
|
+
{"version":3,"file":"Methods.js","sourceRoot":"","sources":["../src/Methods.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,MAAM,EAAE,CAAC,EAAE,MAAM,MAAM,CAAC;AAEjC;;;;;;;;;;;GAWG;AACH,MAAM,CAAC,MAAM,MAAM,GAAG,MAAM,CAAC,IAAI,CAAC;IAC9B,MAAM,EAAE,QAAQ;IAChB,IAAI,EAAE,QAAQ;IACd,MAAM,EAAE;QACJ,UAAU,EAAE;YACR,OAAO,EAAE,CAAC,CAAC,MAAM,CAAC;gBACd,oEAAoE;gBACpE,SAAS,EAAE,CAAC,CAAC,QAAQ,CAAC,CAAC,CAAC,MAAM,EAAE,CAAC;gBACjC,8EAA8E;gBAC9E,WAAW,EAAE,CAAC,CAAC,QAAQ,CAAC,CAAC,CAAC,MAAM,EAAE,CAAC;gBACnC,iGAAiG;gBACjG,IAAI,EAAE,CAAC,CAAC,MAAM,EAAE;aACnB,CAAC;SACL;QACD,OAAO,EAAE,CAAC,CAAC,MAAM,CAAC;YACd,6EAA6E;YAC7E,MAAM,EAAE,CAAC,CAAC,MAAM,EAAE;YAClB,kHAAkH;YAClH,QAAQ,EAAE,CAAC,CAAC,MAAM,EAAE;YACpB,6EAA6E;YAC7E,WAAW,EAAE,CAAC,CAAC,QAAQ,CAAC,CAAC,CAAC,MAAM,EAAE,CAAC;YACnC,gFAAgF;YAChF,UAAU,EAAE,CAAC,CAAC,QAAQ,CAAC,CAAC,CAAC,MAAM,EAAE,CAAC;YAClC,aAAa,EAAE,CAAC,CAAC,MAAM,CAAC;gBACpB,yDAAyD;gBACzD,QAAQ,EAAE,CAAC,CAAC,QAAQ,CAAC,CAAC,CAAC,MAAM,EAAE,CAAC;gBAChC,uFAAuF;gBACvF,QAAQ,EAAE,CAAC,CAAC,QAAQ,CAAC,CAAC,CAAC,OAAO,EAAE,CAAC;gBACjC,yFAAyF;gBACzF,WAAW,EAAE,CAAC,CAAC,QAAQ,CAAC,CAAC,CAAC,MAAM,EAAE,CAAC;gBACnC,yDAAyD;gBACzD,OAAO,EAAE,CAAC,CAAC,QAAQ,CAAC,CAAC,CAAC,MAAM,EAAE,CAAC;gBAC/B,2FAA2F;gBAC3F,eAAe,EAAE,CAAC,CAAC,QAAQ,CAAC,CAAC,CAAC,MAAM,EAAE,CAAC;gBACvC,yEAAyE;gBACzE,MAAM,EAAE,CAAC,CAAC,QAAQ,CACd,CAAC,CAAC,KAAK,CACH,CAAC,CAAC,MAAM,CAAC;oBACL,oDAAoD;oBACpD,MAAM,EAAE,CAAC,CAAC,MAAM,EAAE;oBAClB,oDAAoD;oBACpD,IAAI,EAAE,CAAC,CAAC,QAAQ,CAAC,CAAC,CAAC,MAAM,EAAE,CAAC;oBAC5B,8CAA8C;oBAC9C,SAAS,EAAE,CAAC,CAAC,MAAM,EAAE;iBACxB,CAAC,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"}
|
package/dist/client/Methods.d.ts
CHANGED
|
@@ -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;
|
|
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"}
|