@4mica/sdk 1.2.16 → 1.3.1
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 +59 -25
- package/dist/index.cjs +5513 -0
- package/dist/index.cjs.map +1 -0
- package/dist/index.d.cts +2730 -0
- package/dist/{src/abi/core4mica.d.ts → index.d.ts} +1032 -1
- package/dist/index.js +5439 -0
- package/dist/index.js.map +1 -0
- package/dist/models-B15ouNYG.d.cts +386 -0
- package/dist/models-B15ouNYG.d.ts +386 -0
- package/dist/server.cjs +172 -0
- package/dist/server.cjs.map +1 -0
- package/dist/server.d.cts +119 -0
- package/dist/server.d.ts +119 -0
- package/dist/server.js +165 -0
- package/dist/server.js.map +1 -0
- package/package.json +52 -43
- package/dist/package.json +0 -80
- package/dist/src/abi/core4mica.js +0 -2200
- package/dist/src/abi/erc20.d.ts +0 -151
- package/dist/src/abi/erc20.js +0 -201
- package/dist/src/auth.d.ts +0 -62
- package/dist/src/auth.js +0 -218
- package/dist/src/bls.d.ts +0 -6
- package/dist/src/bls.js +0 -247
- package/dist/src/chain.d.ts +0 -2
- package/dist/src/chain.js +0 -26
- package/dist/src/client/index.d.ts +0 -71
- package/dist/src/client/index.js +0 -120
- package/dist/src/client/recipient.d.ts +0 -129
- package/dist/src/client/recipient.js +0 -257
- package/dist/src/client/shared.d.ts +0 -11
- package/dist/src/client/shared.js +0 -17
- package/dist/src/client/user.d.ts +0 -109
- package/dist/src/client/user.js +0 -147
- package/dist/src/config.d.ts +0 -103
- package/dist/src/config.js +0 -197
- package/dist/src/constants.d.ts +0 -4
- package/dist/src/constants.js +0 -7
- package/dist/src/contract.d.ts +0 -55
- package/dist/src/contract.js +0 -312
- package/dist/src/debug.d.ts +0 -2
- package/dist/src/debug.js +0 -5
- package/dist/src/errors.d.ts +0 -58
- package/dist/src/errors.js +0 -81
- package/dist/src/guarantee.d.ts +0 -25
- package/dist/src/guarantee.js +0 -272
- package/dist/src/http.d.ts +0 -11
- package/dist/src/http.js +0 -57
- package/dist/src/index.d.ts +0 -17
- package/dist/src/index.js +0 -33
- package/dist/src/models.d.ts +0 -259
- package/dist/src/models.js +0 -356
- package/dist/src/networks.d.ts +0 -40
- package/dist/src/networks.js +0 -57
- package/dist/src/payment.d.ts +0 -82
- package/dist/src/payment.js +0 -67
- package/dist/src/rpc.d.ts +0 -38
- package/dist/src/rpc.js +0 -161
- package/dist/src/serde.d.ts +0 -5
- package/dist/src/serde.js +0 -33
- package/dist/src/signing.d.ts +0 -170
- package/dist/src/signing.js +0 -311
- package/dist/src/utils.d.ts +0 -11
- package/dist/src/utils.js +0 -90
- package/dist/src/validation.d.ts +0 -32
- package/dist/src/validation.js +0 -84
- package/dist/src/wallet/cdp.d.ts +0 -13
- package/dist/src/wallet/cdp.js +0 -78
- package/dist/src/wallet/index.d.ts +0 -2
- package/dist/src/wallet/index.js +0 -5
- package/dist/src/x402/index.d.ts +0 -90
- package/dist/src/x402/index.js +0 -243
- package/dist/src/x402/models.d.ts +0 -75
- package/dist/src/x402/models.js +0 -2
|
@@ -0,0 +1,386 @@
|
|
|
1
|
+
/** Signing scheme used when producing a payment guarantee signature. */
|
|
2
|
+
declare enum SigningScheme {
|
|
3
|
+
/** EIP-712 typed-data signing (default, preferred). */
|
|
4
|
+
EIP712 = "eip712",
|
|
5
|
+
/** EIP-191 personal_sign (for wallets that do not support typed data). */
|
|
6
|
+
EIP191 = "eip191"
|
|
7
|
+
}
|
|
8
|
+
/** ECDSA signature and the scheme used to produce it. */
|
|
9
|
+
interface PaymentSignature {
|
|
10
|
+
/** 65-byte ECDSA signature as a `0x`-prefixed hex string. */
|
|
11
|
+
signature: string;
|
|
12
|
+
scheme: SigningScheme;
|
|
13
|
+
}
|
|
14
|
+
/**
|
|
15
|
+
* V1 payment guarantee request claims. Signed by the payer and submitted to the
|
|
16
|
+
* core RPC to obtain a BLS guarantee certificate.
|
|
17
|
+
*
|
|
18
|
+
* Build with the static {@link PaymentGuaranteeRequestClaims.new} factory which
|
|
19
|
+
* normalises addresses and parses `uint256` values.
|
|
20
|
+
*/
|
|
21
|
+
declare class PaymentGuaranteeRequestClaims {
|
|
22
|
+
userAddress: string;
|
|
23
|
+
recipientAddress: string;
|
|
24
|
+
reqId: bigint;
|
|
25
|
+
amount: bigint;
|
|
26
|
+
timestamp: number;
|
|
27
|
+
assetAddress: string;
|
|
28
|
+
constructor(init: {
|
|
29
|
+
userAddress: string;
|
|
30
|
+
recipientAddress: string;
|
|
31
|
+
reqId?: bigint;
|
|
32
|
+
amount: bigint;
|
|
33
|
+
timestamp: number;
|
|
34
|
+
assetAddress: string;
|
|
35
|
+
});
|
|
36
|
+
static new(userAddress: string, recipientAddress: string, amount: number | bigint | string, timestamp: number, erc20Token?: string | null, reqId?: number | bigint | string): PaymentGuaranteeRequestClaims;
|
|
37
|
+
}
|
|
38
|
+
/** On-chain validation policy fields carried in a V2 payment guarantee certificate. */
|
|
39
|
+
interface PaymentGuaranteeValidationPolicyV2 {
|
|
40
|
+
validationRegistryAddress: string;
|
|
41
|
+
validationRequestHash: string;
|
|
42
|
+
validationChainId: number;
|
|
43
|
+
validatorAddress: string;
|
|
44
|
+
validatorAgentId: bigint;
|
|
45
|
+
minValidationScore: number;
|
|
46
|
+
validationSubjectHash: string;
|
|
47
|
+
jobHash: string;
|
|
48
|
+
requiredValidationTag: string;
|
|
49
|
+
}
|
|
50
|
+
/**
|
|
51
|
+
* V2 payment guarantee request claims — extends V1 with a full on-chain validation policy.
|
|
52
|
+
*
|
|
53
|
+
* Compute `validationSubjectHash` via `computeValidationSubjectHash(baseClaims)` and
|
|
54
|
+
* `validationRequestHash` via `computeValidationRequestHash(partialV2)` before constructing.
|
|
55
|
+
* The `jobHash` must be provided and included in the validation request hash.
|
|
56
|
+
*
|
|
57
|
+
* @throws {@link ValidationError} if `minValidationScore` is outside [1, 100].
|
|
58
|
+
*/
|
|
59
|
+
declare class PaymentGuaranteeRequestClaimsV2 extends PaymentGuaranteeRequestClaims {
|
|
60
|
+
validationRegistryAddress: string;
|
|
61
|
+
validationRequestHash: string;
|
|
62
|
+
validationChainId: number;
|
|
63
|
+
validatorAddress: string;
|
|
64
|
+
validatorAgentId: bigint;
|
|
65
|
+
minValidationScore: number;
|
|
66
|
+
validationSubjectHash: string;
|
|
67
|
+
jobHash: string;
|
|
68
|
+
requiredValidationTag: string;
|
|
69
|
+
constructor(init: {
|
|
70
|
+
userAddress: string;
|
|
71
|
+
recipientAddress: string;
|
|
72
|
+
reqId?: bigint;
|
|
73
|
+
amount: bigint;
|
|
74
|
+
timestamp: number;
|
|
75
|
+
assetAddress: string;
|
|
76
|
+
validationRegistryAddress: string;
|
|
77
|
+
validationRequestHash: string;
|
|
78
|
+
validationChainId: number;
|
|
79
|
+
validatorAddress: string;
|
|
80
|
+
validatorAgentId: bigint;
|
|
81
|
+
minValidationScore: number;
|
|
82
|
+
validationSubjectHash: string;
|
|
83
|
+
jobHash: string;
|
|
84
|
+
requiredValidationTag: string;
|
|
85
|
+
});
|
|
86
|
+
}
|
|
87
|
+
/**
|
|
88
|
+
* Decoded payment guarantee claims, as returned by `decodeGuaranteeClaims`.
|
|
89
|
+
* `version` is `1` for V1 certificates and `2` for V2 certificates.
|
|
90
|
+
* V2 certificates additionally carry a `validationPolicy`.
|
|
91
|
+
*/
|
|
92
|
+
interface PaymentGuaranteeClaims {
|
|
93
|
+
domain: Uint8Array;
|
|
94
|
+
userAddress: string;
|
|
95
|
+
recipientAddress: string;
|
|
96
|
+
cycleId: bigint;
|
|
97
|
+
reqId: bigint;
|
|
98
|
+
amount: bigint;
|
|
99
|
+
assetAddress: string;
|
|
100
|
+
timestamp: number;
|
|
101
|
+
version: number;
|
|
102
|
+
validationPolicy?: PaymentGuaranteeValidationPolicyV2;
|
|
103
|
+
}
|
|
104
|
+
/**
|
|
105
|
+
* BLS guarantee certificate returned by `issuePaymentGuarantee`.
|
|
106
|
+
* Both fields are `0x`-prefixed hex strings.
|
|
107
|
+
*/
|
|
108
|
+
interface BLSCert {
|
|
109
|
+
/** ABI-encoded `(uint64 version, bytes innerClaims)` envelope as a hex string. */
|
|
110
|
+
claims: string;
|
|
111
|
+
/** BLS12-381 G2 signature as a hex string. */
|
|
112
|
+
signature: string;
|
|
113
|
+
}
|
|
114
|
+
/** On-chain collateral position for a single asset, returned by `getUser`. */
|
|
115
|
+
interface UserInfo {
|
|
116
|
+
/** Asset address (`0x000...` for ETH). */
|
|
117
|
+
asset: string;
|
|
118
|
+
/** Total deposited collateral available for payments (in token base units). */
|
|
119
|
+
collateral: bigint;
|
|
120
|
+
/** Amount of a pending withdrawal request (0 if none). */
|
|
121
|
+
withdrawalRequestAmount: bigint;
|
|
122
|
+
/** Unix timestamp when the withdrawal request was made (0 if none). */
|
|
123
|
+
withdrawalRequestTimestamp: number;
|
|
124
|
+
}
|
|
125
|
+
declare class UserSuspensionStatus {
|
|
126
|
+
userAddress: string;
|
|
127
|
+
suspended: boolean;
|
|
128
|
+
updatedAt: number;
|
|
129
|
+
constructor(userAddress: string, suspended: boolean, updatedAt: number);
|
|
130
|
+
static fromRpc(raw: Record<string, unknown>): UserSuspensionStatus;
|
|
131
|
+
}
|
|
132
|
+
declare class AdminApiKeyInfo {
|
|
133
|
+
id: string;
|
|
134
|
+
name: string;
|
|
135
|
+
scopes: string[];
|
|
136
|
+
createdAt: number;
|
|
137
|
+
revokedAt?: number | null | undefined;
|
|
138
|
+
constructor(id: string, name: string, scopes: string[], createdAt: number, revokedAt?: number | null | undefined);
|
|
139
|
+
static fromRpc(raw: Record<string, unknown>): AdminApiKeyInfo;
|
|
140
|
+
}
|
|
141
|
+
declare class AdminApiKeySecret {
|
|
142
|
+
id: string;
|
|
143
|
+
name: string;
|
|
144
|
+
scopes: string[];
|
|
145
|
+
createdAt: number;
|
|
146
|
+
apiKey: string;
|
|
147
|
+
constructor(id: string, name: string, scopes: string[], createdAt: number, apiKey: string);
|
|
148
|
+
static fromRpc(raw: Record<string, unknown>): AdminApiKeySecret;
|
|
149
|
+
}
|
|
150
|
+
/**
|
|
151
|
+
* Off-chain clearing settlement action a participant performs against the
|
|
152
|
+
* ClearingHouse contract for a given cycle.
|
|
153
|
+
*/
|
|
154
|
+
type ClearingSettlementActionKind = "pay_net_debit" | "claim_net_credit" | "mark_defaulted";
|
|
155
|
+
/** Role a participant holds in a settlement cycle. */
|
|
156
|
+
type ClearingParticipantRole = "NET_CREDITOR" | "NET_DEBTOR" | "BALANCED" | string;
|
|
157
|
+
/**
|
|
158
|
+
* A participant's committed position in a settlement cycle, with the Merkle
|
|
159
|
+
* proof needed to settle on-chain. Returned by `getClearingParticipantProof`.
|
|
160
|
+
*/
|
|
161
|
+
declare class ClearingParticipantProof {
|
|
162
|
+
/** On-chain `bytes32` cycle identifier. */
|
|
163
|
+
cycleId: string;
|
|
164
|
+
/** Core database cycle identifier. */
|
|
165
|
+
cycleIdText: string;
|
|
166
|
+
assetAddress: string;
|
|
167
|
+
participant: string;
|
|
168
|
+
role: ClearingParticipantRole;
|
|
169
|
+
/** Amount used with the participant's role-specific ClearingHouse call. */
|
|
170
|
+
amount: bigint;
|
|
171
|
+
netDebit: bigint;
|
|
172
|
+
netCredit: bigint;
|
|
173
|
+
leaf: string;
|
|
174
|
+
merkleRoot: string;
|
|
175
|
+
proof: string[];
|
|
176
|
+
constructor(
|
|
177
|
+
/** On-chain `bytes32` cycle identifier. */
|
|
178
|
+
cycleId: string,
|
|
179
|
+
/** Core database cycle identifier. */
|
|
180
|
+
cycleIdText: string, assetAddress: string, participant: string, role: ClearingParticipantRole,
|
|
181
|
+
/** Amount used with the participant's role-specific ClearingHouse call. */
|
|
182
|
+
amount: bigint, netDebit: bigint, netCredit: bigint, leaf: string, merkleRoot: string, proof: string[]);
|
|
183
|
+
static fromRpc(raw: Record<string, unknown>): ClearingParticipantProof;
|
|
184
|
+
}
|
|
185
|
+
/**
|
|
186
|
+
* A prepared ClearingHouse contract call for a participant, including the amount
|
|
187
|
+
* and Merkle proof. Returned by `getClearingSettlementAction` and its helpers.
|
|
188
|
+
*/
|
|
189
|
+
declare class ClearingSettlementActionResponse {
|
|
190
|
+
/** ClearingHouse contract address. */
|
|
191
|
+
contractAddress: string;
|
|
192
|
+
/** Contract function to call (`payNetDebit`, `claimNetCredit`, `markDefaulted`). */
|
|
193
|
+
functionName: string;
|
|
194
|
+
action: ClearingSettlementActionKind;
|
|
195
|
+
/** On-chain `bytes32` cycle identifier. */
|
|
196
|
+
cycleId: string;
|
|
197
|
+
/** Core database cycle identifier. */
|
|
198
|
+
cycleIdText: string;
|
|
199
|
+
assetAddress: string;
|
|
200
|
+
/** Participant whose committed Merkle leaf is proven. */
|
|
201
|
+
participant: string;
|
|
202
|
+
/** Alias for `participant` when `action = mark_defaulted`. */
|
|
203
|
+
debtor: string | null;
|
|
204
|
+
/** Amount argument for the selected ClearingHouse function. */
|
|
205
|
+
amount: bigint;
|
|
206
|
+
/** Native value to attach — non-zero only for native-asset debtor payments. */
|
|
207
|
+
payableValue: bigint;
|
|
208
|
+
proof: string[];
|
|
209
|
+
constructor(
|
|
210
|
+
/** ClearingHouse contract address. */
|
|
211
|
+
contractAddress: string,
|
|
212
|
+
/** Contract function to call (`payNetDebit`, `claimNetCredit`, `markDefaulted`). */
|
|
213
|
+
functionName: string, action: ClearingSettlementActionKind,
|
|
214
|
+
/** On-chain `bytes32` cycle identifier. */
|
|
215
|
+
cycleId: string,
|
|
216
|
+
/** Core database cycle identifier. */
|
|
217
|
+
cycleIdText: string, assetAddress: string,
|
|
218
|
+
/** Participant whose committed Merkle leaf is proven. */
|
|
219
|
+
participant: string,
|
|
220
|
+
/** Alias for `participant` when `action = mark_defaulted`. */
|
|
221
|
+
debtor: string | null,
|
|
222
|
+
/** Amount argument for the selected ClearingHouse function. */
|
|
223
|
+
amount: bigint,
|
|
224
|
+
/** Native value to attach — non-zero only for native-asset debtor payments. */
|
|
225
|
+
payableValue: bigint, proof: string[]);
|
|
226
|
+
static fromRpc(raw: Record<string, unknown>): ClearingSettlementActionResponse;
|
|
227
|
+
}
|
|
228
|
+
declare class AssetBalanceInfo {
|
|
229
|
+
userAddress: string;
|
|
230
|
+
assetAddress: string;
|
|
231
|
+
total: bigint;
|
|
232
|
+
locked: bigint;
|
|
233
|
+
version: number;
|
|
234
|
+
updatedAt: number;
|
|
235
|
+
constructor(userAddress: string, assetAddress: string, total: bigint, locked: bigint, version: number, updatedAt: number);
|
|
236
|
+
static fromRpc(raw: Record<string, unknown>): AssetBalanceInfo;
|
|
237
|
+
}
|
|
238
|
+
declare class RecipientPaymentInfo {
|
|
239
|
+
userAddress: string;
|
|
240
|
+
recipientAddress: string;
|
|
241
|
+
txHash: string;
|
|
242
|
+
amount: bigint;
|
|
243
|
+
verified: boolean;
|
|
244
|
+
finalized: boolean;
|
|
245
|
+
failed: boolean;
|
|
246
|
+
createdAt: number;
|
|
247
|
+
constructor(userAddress: string, recipientAddress: string, txHash: string, amount: bigint, verified: boolean, finalized: boolean, failed: boolean, createdAt: number);
|
|
248
|
+
static fromRpc(raw: Record<string, unknown>): RecipientPaymentInfo;
|
|
249
|
+
}
|
|
250
|
+
interface SupportedTokenInfo {
|
|
251
|
+
symbol: string;
|
|
252
|
+
address: string;
|
|
253
|
+
decimals?: number;
|
|
254
|
+
}
|
|
255
|
+
declare class SupportedTokensResponse {
|
|
256
|
+
chainId: number;
|
|
257
|
+
tokens: SupportedTokenInfo[];
|
|
258
|
+
constructor(chainId: number, tokens: SupportedTokenInfo[]);
|
|
259
|
+
static fromRpc(raw: Record<string, unknown>): SupportedTokensResponse;
|
|
260
|
+
}
|
|
261
|
+
declare class CorePublicParameters {
|
|
262
|
+
publicKey: Uint8Array;
|
|
263
|
+
contractAddress: string;
|
|
264
|
+
ethereumHttpRpcUrl: string;
|
|
265
|
+
eip712Name: string;
|
|
266
|
+
eip712Version: string;
|
|
267
|
+
chainId: number;
|
|
268
|
+
maxAcceptedGuaranteeVersion: number;
|
|
269
|
+
acceptedGuaranteeVersions: number[];
|
|
270
|
+
activeGuaranteeDomainSeparator: string;
|
|
271
|
+
/** Allowlist of trusted validation registry addresses configured in core (may be empty). */
|
|
272
|
+
trustedValidationRegistries: string[];
|
|
273
|
+
validationHashCanonicalizationVersion: string;
|
|
274
|
+
constructor(publicKey: Uint8Array, contractAddress: string, ethereumHttpRpcUrl: string, eip712Name: string, eip712Version: string, chainId: number, maxAcceptedGuaranteeVersion?: number, acceptedGuaranteeVersions?: number[], activeGuaranteeDomainSeparator?: string,
|
|
275
|
+
/** Allowlist of trusted validation registry addresses configured in core (may be empty). */
|
|
276
|
+
trustedValidationRegistries?: string[], validationHashCanonicalizationVersion?: string);
|
|
277
|
+
static fromRpc(payload: Record<string, unknown>): CorePublicParameters;
|
|
278
|
+
}
|
|
279
|
+
|
|
280
|
+
interface PaymentPayloadClaimsBase {
|
|
281
|
+
user_address: string;
|
|
282
|
+
recipient_address: string;
|
|
283
|
+
req_id: string;
|
|
284
|
+
amount: string;
|
|
285
|
+
timestamp: number;
|
|
286
|
+
asset_address: string;
|
|
287
|
+
}
|
|
288
|
+
/** Wire-format representation of V1 payment guarantee claims sent to the core RPC. */
|
|
289
|
+
interface PaymentPayloadClaims extends PaymentPayloadClaimsBase {
|
|
290
|
+
version: "v1";
|
|
291
|
+
}
|
|
292
|
+
/** Wire-format representation of V2 payment guarantee claims sent to the core RPC. */
|
|
293
|
+
interface PaymentPayloadClaimsV2 extends PaymentPayloadClaimsBase {
|
|
294
|
+
version: "v2";
|
|
295
|
+
validation_registry_address: string;
|
|
296
|
+
validation_request_hash: string;
|
|
297
|
+
validation_chain_id: number;
|
|
298
|
+
validator_address: string;
|
|
299
|
+
validator_agent_id: string;
|
|
300
|
+
min_validation_score: number;
|
|
301
|
+
validation_subject_hash: string;
|
|
302
|
+
job_hash: string;
|
|
303
|
+
required_validation_tag: string;
|
|
304
|
+
}
|
|
305
|
+
/** Assembled payment payload ready to be submitted to the core RPC `issueGuarantee` endpoint. */
|
|
306
|
+
interface PaymentPayload {
|
|
307
|
+
claims: PaymentPayloadClaims | PaymentPayloadClaimsV2;
|
|
308
|
+
/** 65-byte ECDSA signature as a `0x`-prefixed hex string. */
|
|
309
|
+
signature: string;
|
|
310
|
+
scheme: SigningScheme;
|
|
311
|
+
}
|
|
312
|
+
|
|
313
|
+
interface PaymentRequirementsV1 {
|
|
314
|
+
scheme: string;
|
|
315
|
+
network: string;
|
|
316
|
+
maxAmountRequired: string;
|
|
317
|
+
payTo: string;
|
|
318
|
+
asset: string;
|
|
319
|
+
resource?: string;
|
|
320
|
+
description?: string;
|
|
321
|
+
mimeType?: string;
|
|
322
|
+
outputSchema?: unknown;
|
|
323
|
+
maxTimeoutSeconds?: number;
|
|
324
|
+
extra?: PaymentRequirementsExtra;
|
|
325
|
+
}
|
|
326
|
+
interface PaymentRequirementsV2 {
|
|
327
|
+
scheme: string;
|
|
328
|
+
network: string;
|
|
329
|
+
asset: string;
|
|
330
|
+
amount: string;
|
|
331
|
+
payTo: string;
|
|
332
|
+
maxTimeoutSeconds?: number;
|
|
333
|
+
extra?: PaymentRequirementsExtra;
|
|
334
|
+
}
|
|
335
|
+
type PaymentRequirements = PaymentRequirementsV2;
|
|
336
|
+
interface PaymentRequirementsExtra {
|
|
337
|
+
tabEndpoint?: string;
|
|
338
|
+
validationRegistryAddress?: string;
|
|
339
|
+
validationChainId?: number;
|
|
340
|
+
validatorAddress?: string;
|
|
341
|
+
validatorAgentId?: string;
|
|
342
|
+
minValidationScore?: number;
|
|
343
|
+
jobHash?: string;
|
|
344
|
+
requiredValidationTag?: string;
|
|
345
|
+
}
|
|
346
|
+
interface TabResponse {
|
|
347
|
+
userAddress: string;
|
|
348
|
+
nextReqId?: string;
|
|
349
|
+
}
|
|
350
|
+
type X402PaymentPayloadClaims = PaymentPayload["claims"];
|
|
351
|
+
type X402PaymentPayload = PaymentPayload;
|
|
352
|
+
interface X402PaymentEnvelopeV1 {
|
|
353
|
+
x402Version: number;
|
|
354
|
+
scheme: string;
|
|
355
|
+
network: string;
|
|
356
|
+
payload: X402PaymentPayload;
|
|
357
|
+
}
|
|
358
|
+
interface X402ResourceInfo {
|
|
359
|
+
url: string;
|
|
360
|
+
description: string;
|
|
361
|
+
mimeType: string;
|
|
362
|
+
}
|
|
363
|
+
interface X402PaymentEnvelopeV2 {
|
|
364
|
+
x402Version: number;
|
|
365
|
+
accepted: PaymentRequirementsV2;
|
|
366
|
+
payload: X402PaymentPayload;
|
|
367
|
+
resource: X402ResourceInfo;
|
|
368
|
+
}
|
|
369
|
+
interface X402SignedPayment {
|
|
370
|
+
header: string;
|
|
371
|
+
payload: X402PaymentPayload;
|
|
372
|
+
signature: PaymentSignature;
|
|
373
|
+
}
|
|
374
|
+
interface X402SettledPayment {
|
|
375
|
+
payment: X402SignedPayment;
|
|
376
|
+
settlement: unknown;
|
|
377
|
+
}
|
|
378
|
+
interface X402PaymentRequired {
|
|
379
|
+
x402Version: number;
|
|
380
|
+
error?: string;
|
|
381
|
+
resource: X402ResourceInfo;
|
|
382
|
+
accepts: PaymentRequirementsV2[];
|
|
383
|
+
extensions?: Record<string, unknown>;
|
|
384
|
+
}
|
|
385
|
+
|
|
386
|
+
export { AdminApiKeySecret as A, type BLSCert as B, CorePublicParameters as C, type X402PaymentPayloadClaims as D, PaymentGuaranteeRequestClaims as P, RecipientPaymentInfo as R, SupportedTokensResponse as S, type TabResponse as T, UserSuspensionStatus as U, type X402SignedPayment as X, type ClearingSettlementActionKind as a, AdminApiKeyInfo as b, PaymentGuaranteeRequestClaimsV2 as c, SigningScheme as d, type PaymentGuaranteeClaims as e, ClearingParticipantProof as f, ClearingSettlementActionResponse as g, AssetBalanceInfo as h, type UserInfo as i, type PaymentSignature as j, type PaymentPayload as k, type PaymentPayloadClaims as l, type PaymentPayloadClaimsV2 as m, type PaymentRequirementsV1 as n, type X402PaymentRequired as o, type PaymentRequirementsV2 as p, type X402SettledPayment as q, type X402ResourceInfo as r, type ClearingParticipantRole as s, type PaymentGuaranteeValidationPolicyV2 as t, type PaymentRequirements as u, type PaymentRequirementsExtra as v, type SupportedTokenInfo as w, type X402PaymentEnvelopeV1 as x, type X402PaymentEnvelopeV2 as y, type X402PaymentPayload as z };
|