@catena/sdk 0.0.0-bootstrap.0 → 0.4.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/LICENSE +191 -0
- package/README.md +910 -2
- package/dist/client-BSYVYJGm.mjs +1032 -0
- package/dist/client-B_Gi0aqH.d.mts +1353 -0
- package/dist/client.d.mts +3 -0
- package/dist/client.mjs +3 -0
- package/dist/keypair-BjMJtI3-.d.mts +35 -0
- package/dist/keypair.d.mts +2 -0
- package/dist/keypair.mjs +50 -0
- package/dist/movements.d.mts +139 -0
- package/dist/movements.mjs +334 -0
- package/dist/mpp.d.mts +327 -0
- package/dist/mpp.mjs +563 -0
- package/dist/settlement-report-DTxaAxE3.mjs +57 -0
- package/dist/viem.d.mts +135 -0
- package/dist/viem.mjs +296 -0
- package/dist/x402.d.mts +212 -0
- package/dist/x402.mjs +215 -0
- package/package.json +64 -5
|
@@ -0,0 +1,1353 @@
|
|
|
1
|
+
import * as v from "valibot";
|
|
2
|
+
//#region src/offer-receipt.d.ts
|
|
3
|
+
/**
|
|
4
|
+
* `acceptIndex` exists only on offers (it points at an `accepts[]` entry);
|
|
5
|
+
* receipts get their own schema without it so the public receipt type does
|
|
6
|
+
* not advertise a field receipts never carry.
|
|
7
|
+
*/
|
|
8
|
+
declare const x402SignedArtifactSchema: v.VariantSchema<"format", [v.LooseObjectSchema<{
|
|
9
|
+
readonly format: v.LiteralSchema<"eip712", undefined>;
|
|
10
|
+
readonly acceptIndex: v.OptionalSchema<v.SchemaWithPipe<readonly [v.NumberSchema<undefined>, v.IntegerAction<number, undefined>, v.MinValueAction<number, 0, undefined>]>, undefined>;
|
|
11
|
+
readonly payload: v.RecordSchema<v.StringSchema<undefined>, v.UnknownSchema, undefined>;
|
|
12
|
+
readonly signature: v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.RegexAction<string, "Expected a 65-byte hex signature">]>;
|
|
13
|
+
}, undefined>, v.LooseObjectSchema<{
|
|
14
|
+
readonly format: v.LiteralSchema<"jws", undefined>;
|
|
15
|
+
readonly acceptIndex: v.OptionalSchema<v.SchemaWithPipe<readonly [v.NumberSchema<undefined>, v.IntegerAction<number, undefined>, v.MinValueAction<number, 0, undefined>]>, undefined>;
|
|
16
|
+
readonly signature: v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.MaxLengthAction<string, number, undefined>, v.RegexAction<string, "Expected a JWS compact serialization">]>;
|
|
17
|
+
}, undefined>], undefined>;
|
|
18
|
+
declare const x402SignedReceiptSchema: v.VariantSchema<"format", [v.LooseObjectSchema<{
|
|
19
|
+
readonly format: v.LiteralSchema<"eip712", undefined>;
|
|
20
|
+
readonly payload: v.RecordSchema<v.StringSchema<undefined>, v.UnknownSchema, undefined>;
|
|
21
|
+
readonly signature: v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.RegexAction<string, "Expected a 65-byte hex signature">]>;
|
|
22
|
+
}, undefined>, v.LooseObjectSchema<{
|
|
23
|
+
readonly format: v.LiteralSchema<"jws", undefined>;
|
|
24
|
+
readonly signature: v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.MaxLengthAction<string, number, undefined>, v.RegexAction<string, "Expected a JWS compact serialization">]>;
|
|
25
|
+
}, undefined>], undefined>;
|
|
26
|
+
/**
|
|
27
|
+
* A seller-signed offer from a 402 challenge's `extensions["offer-receipt"]`
|
|
28
|
+
* (x402 Offer & Receipt extension), relayed to Catena verbatim for
|
|
29
|
+
* verification and storage as payment evidence. `eip712` artifacts carry the
|
|
30
|
+
* signed payload alongside the signature; `jws` artifacts carry it inside the
|
|
31
|
+
* compact serialization.
|
|
32
|
+
*/
|
|
33
|
+
type X402SignedOffer = v.InferOutput<typeof x402SignedArtifactSchema>;
|
|
34
|
+
/**
|
|
35
|
+
* A seller-signed receipt from the paid retry's `PAYMENT-RESPONSE`
|
|
36
|
+
* `extensions["offer-receipt"]`, relayed to Catena verbatim for verification
|
|
37
|
+
* and storage as payment evidence — the seller's attestation that it was paid
|
|
38
|
+
* and delivered.
|
|
39
|
+
*/
|
|
40
|
+
type X402SignedReceipt = v.InferOutput<typeof x402SignedReceiptSchema>;
|
|
41
|
+
//#endregion
|
|
42
|
+
//#region src/user-agent.d.ts
|
|
43
|
+
/**
|
|
44
|
+
* Optional caller identification prepended to the User-Agent, Stripe-style
|
|
45
|
+
* (`name/version (url)`). Telemetry only: the value is self-reported and
|
|
46
|
+
* spoofable, so it must never carry authority — client kind and privilege
|
|
47
|
+
* are derived server-side from the OAuth client_id.
|
|
48
|
+
*/
|
|
49
|
+
interface AppInfo {
|
|
50
|
+
name: string;
|
|
51
|
+
version?: string;
|
|
52
|
+
url?: string;
|
|
53
|
+
}
|
|
54
|
+
//#endregion
|
|
55
|
+
//#region src/schemas.d.ts
|
|
56
|
+
/**
|
|
57
|
+
* A response value known to this SDK release, or an opaque string added by a
|
|
58
|
+
* newer server. The known half preserves editor autocomplete without making an
|
|
59
|
+
* additive server change fail validation in an installed client. Blank and
|
|
60
|
+
* whitespace-only values still fail validation.
|
|
61
|
+
*/
|
|
62
|
+
type ExtensibleString<TKnown extends readonly string[]> = TKnown[number] | (string & {});
|
|
63
|
+
declare const agentSchema: v.ObjectSchema<{
|
|
64
|
+
readonly id: v.StringSchema<undefined>;
|
|
65
|
+
readonly name: v.StringSchema<undefined>;
|
|
66
|
+
readonly status: v.StringSchema<undefined>;
|
|
67
|
+
readonly organizationId: v.StringSchema<undefined>;
|
|
68
|
+
}, undefined>;
|
|
69
|
+
type Agent = v.InferOutput<typeof agentSchema>;
|
|
70
|
+
declare const POLICY_RULE_TYPES: readonly ["per_transaction_amount", "daily_amount", "weekly_amount", "monthly_amount", "hourly_count", "daily_count"];
|
|
71
|
+
declare const POLICY_RULE_ACTIONS: readonly ["block", "require_approval"];
|
|
72
|
+
declare const ACCOUNT_AGGREGATION_SCOPES: readonly ["per_account", "across_accounts"];
|
|
73
|
+
declare const ACTOR_AGGREGATION_SCOPES: readonly ["per_agent", "per_policy"];
|
|
74
|
+
declare const POLICY_CAPABILITIES: readonly ["query_balance", "read", "send", "transfer"];
|
|
75
|
+
declare const COUNTERPARTY_ACTIONS: readonly ["allow", "block", "require_approval"];
|
|
76
|
+
declare const COUNTERPARTY_RULE_MODES: readonly ["open", "restricted"];
|
|
77
|
+
declare const policySchema: v.ObjectSchema<{
|
|
78
|
+
readonly id: v.OptionalSchema<v.StringSchema<undefined>, undefined>;
|
|
79
|
+
readonly description: v.OptionalSchema<v.StringSchema<undefined>, undefined>;
|
|
80
|
+
readonly version: v.OptionalSchema<v.NumberSchema<undefined>, undefined>;
|
|
81
|
+
readonly name: v.StringSchema<undefined>;
|
|
82
|
+
readonly capabilities: v.ArraySchema<v.StringSchema<undefined>, undefined>;
|
|
83
|
+
readonly counterpartyRules: v.OptionalSchema<v.ObjectSchema<{
|
|
84
|
+
readonly mode: v.GenericSchema<string, ExtensibleString<readonly ["open", "restricted"]>>;
|
|
85
|
+
readonly allowedCounterparties: v.OptionalSchema<v.ArraySchema<v.StringSchema<undefined>, undefined>, undefined>;
|
|
86
|
+
readonly createAction: v.OptionalSchema<v.GenericSchema<string, ExtensibleString<readonly ["allow", "block", "require_approval"]>>, undefined>;
|
|
87
|
+
readonly requestPaymentDetailsAction: v.OptionalSchema<v.GenericSchema<string, ExtensibleString<readonly ["allow", "block", "require_approval"]>>, undefined>;
|
|
88
|
+
readonly allowCreate: v.OptionalSchema<v.BooleanSchema<undefined>, undefined>;
|
|
89
|
+
}, undefined>, undefined>;
|
|
90
|
+
readonly policyCapabilities: v.ArraySchema<v.ObjectSchema<{
|
|
91
|
+
readonly id: v.StringSchema<undefined>;
|
|
92
|
+
readonly organizationId: v.StringSchema<undefined>;
|
|
93
|
+
readonly policyId: v.StringSchema<undefined>;
|
|
94
|
+
readonly capability: v.GenericSchema<string, ExtensibleString<readonly ["query_balance", "read", "send", "transfer"]>>;
|
|
95
|
+
readonly accountId: v.StringSchema<undefined>;
|
|
96
|
+
readonly rules: v.ArraySchema<v.ObjectSchema<{
|
|
97
|
+
readonly id: v.StringSchema<undefined>;
|
|
98
|
+
readonly ruleType: v.GenericSchema<string, ExtensibleString<readonly ["per_transaction_amount", "daily_amount", "weekly_amount", "monthly_amount", "hourly_count", "daily_count"]>>;
|
|
99
|
+
readonly thresholdAmount: v.OptionalSchema<v.ObjectSchema<{
|
|
100
|
+
/**
|
|
101
|
+
* Decimal string in the asset's major unit: "12.50" is $12.50. Never cents or
|
|
102
|
+
* atomic units.
|
|
103
|
+
*/
|
|
104
|
+
readonly amount: v.StringSchema<undefined>;
|
|
105
|
+
/**
|
|
106
|
+
* Asset identifier, e.g. "USD".
|
|
107
|
+
*/
|
|
108
|
+
readonly asset_id: v.StringSchema<undefined>;
|
|
109
|
+
}, undefined>, undefined>;
|
|
110
|
+
readonly thresholdCount: v.OptionalSchema<v.NumberSchema<undefined>, undefined>;
|
|
111
|
+
readonly action: v.GenericSchema<string, ExtensibleString<readonly ["block", "require_approval"]>>;
|
|
112
|
+
readonly requiredApprovals: v.NumberSchema<undefined>;
|
|
113
|
+
readonly accountAggregationScope: v.GenericSchema<string, ExtensibleString<readonly ["per_account", "across_accounts"]>>;
|
|
114
|
+
readonly actorAggregationScope: v.GenericSchema<string, ExtensibleString<readonly ["per_agent", "per_policy"]>>;
|
|
115
|
+
readonly displayOrder: v.NumberSchema<undefined>;
|
|
116
|
+
}, undefined>, undefined>;
|
|
117
|
+
readonly createdAt: v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.IsoTimestampAction<string, undefined>]>;
|
|
118
|
+
readonly updatedAt: v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.IsoTimestampAction<string, undefined>]>;
|
|
119
|
+
}, undefined>, undefined>;
|
|
120
|
+
/**
|
|
121
|
+
* "override" means a temporary policy override is active; `expiresAt` is
|
|
122
|
+
* when it lapses and the base policy applies again. Absent on servers
|
|
123
|
+
* that predate overrides and under the base policy respectively.
|
|
124
|
+
*/
|
|
125
|
+
readonly kind: v.OptionalSchema<v.PicklistSchema<["base", "override"], undefined>, undefined>;
|
|
126
|
+
readonly expiresAt: v.OptionalSchema<v.StringSchema<undefined>, undefined>;
|
|
127
|
+
}, undefined>;
|
|
128
|
+
type Policy = v.InferOutput<typeof policySchema>;
|
|
129
|
+
declare const accountsResponseSchema: v.ObjectSchema<{
|
|
130
|
+
readonly accounts: v.ArraySchema<v.ObjectSchema<{
|
|
131
|
+
readonly id: v.StringSchema<undefined>;
|
|
132
|
+
readonly name: v.StringSchema<undefined>;
|
|
133
|
+
readonly type: v.StringSchema<undefined>;
|
|
134
|
+
readonly currency: v.StringSchema<undefined>;
|
|
135
|
+
}, undefined>, undefined>;
|
|
136
|
+
}, undefined>;
|
|
137
|
+
type AccountsResponse = v.InferOutput<typeof accountsResponseSchema>;
|
|
138
|
+
declare const accountBalanceResponseSchema: v.ObjectSchema<{
|
|
139
|
+
readonly accountId: v.StringSchema<undefined>;
|
|
140
|
+
/**
|
|
141
|
+
* @deprecated Flat alias of `balances.total`; use `balances` instead.
|
|
142
|
+
*/
|
|
143
|
+
readonly balance: v.ObjectSchema<{
|
|
144
|
+
/**
|
|
145
|
+
* Decimal string in the asset's major unit: "12.50" is $12.50. Never cents or
|
|
146
|
+
* atomic units.
|
|
147
|
+
*/
|
|
148
|
+
readonly amount: v.StringSchema<undefined>;
|
|
149
|
+
/**
|
|
150
|
+
* Asset identifier, e.g. "USD".
|
|
151
|
+
*/
|
|
152
|
+
readonly asset_id: v.StringSchema<undefined>;
|
|
153
|
+
}, undefined>;
|
|
154
|
+
/**
|
|
155
|
+
* `available` is the most one payment from this account can move: every
|
|
156
|
+
* network it may use together where a plan carries the payment across
|
|
157
|
+
* them, otherwise the balance on the one network that payment binds, or
|
|
158
|
+
* the largest of them while that network holds nothing yet. It is zero
|
|
159
|
+
* while the account is not active, and zero when the only network the
|
|
160
|
+
* account holds is one agents may not use. A transfer to a Catena
|
|
161
|
+
* account still binds one network, so a plan's figure can be more than
|
|
162
|
+
* such a transfer accepts. Absent only from API deployments that predate
|
|
163
|
+
* these fields.
|
|
164
|
+
*/
|
|
165
|
+
readonly balances: v.OptionalSchema<v.ObjectSchema<{
|
|
166
|
+
readonly total: v.ObjectSchema<{
|
|
167
|
+
/**
|
|
168
|
+
* Decimal string in the asset's major unit: "12.50" is $12.50. Never cents or
|
|
169
|
+
* atomic units.
|
|
170
|
+
*/
|
|
171
|
+
readonly amount: v.StringSchema<undefined>;
|
|
172
|
+
/**
|
|
173
|
+
* Asset identifier, e.g. "USD".
|
|
174
|
+
*/
|
|
175
|
+
readonly asset_id: v.StringSchema<undefined>;
|
|
176
|
+
}, undefined>;
|
|
177
|
+
readonly available: v.ObjectSchema<{
|
|
178
|
+
/**
|
|
179
|
+
* Decimal string in the asset's major unit: "12.50" is $12.50. Never cents or
|
|
180
|
+
* atomic units.
|
|
181
|
+
*/
|
|
182
|
+
readonly amount: v.StringSchema<undefined>;
|
|
183
|
+
/**
|
|
184
|
+
* Asset identifier, e.g. "USD".
|
|
185
|
+
*/
|
|
186
|
+
readonly asset_id: v.StringSchema<undefined>;
|
|
187
|
+
}, undefined>;
|
|
188
|
+
/**
|
|
189
|
+
* `total` and `available` for each network that the account holds and
|
|
190
|
+
* agents may use. The entries can add up to less than `balances.total`,
|
|
191
|
+
* which also counts a network agents may not use, and their `available`
|
|
192
|
+
* can add up to more than `balances.available`, which one payment binds
|
|
193
|
+
* to one network. Every `available` is zero while the account is not
|
|
194
|
+
* active. An empty array means no network the account holds is open to
|
|
195
|
+
* agents. Absent until the account's money is split by network,
|
|
196
|
+
* and from API deployments that predate the field.
|
|
197
|
+
*/
|
|
198
|
+
readonly byNetwork: v.OptionalSchema<v.ArraySchema<v.ObjectSchema<{
|
|
199
|
+
readonly network: v.StringSchema<undefined>;
|
|
200
|
+
readonly total: v.ObjectSchema<{
|
|
201
|
+
/**
|
|
202
|
+
* Decimal string in the asset's major unit: "12.50" is $12.50. Never cents or
|
|
203
|
+
* atomic units.
|
|
204
|
+
*/
|
|
205
|
+
readonly amount: v.StringSchema<undefined>;
|
|
206
|
+
/**
|
|
207
|
+
* Asset identifier, e.g. "USD".
|
|
208
|
+
*/
|
|
209
|
+
readonly asset_id: v.StringSchema<undefined>;
|
|
210
|
+
}, undefined>;
|
|
211
|
+
readonly available: v.ObjectSchema<{
|
|
212
|
+
/**
|
|
213
|
+
* Decimal string in the asset's major unit: "12.50" is $12.50. Never cents or
|
|
214
|
+
* atomic units.
|
|
215
|
+
*/
|
|
216
|
+
readonly amount: v.StringSchema<undefined>;
|
|
217
|
+
/**
|
|
218
|
+
* Asset identifier, e.g. "USD".
|
|
219
|
+
*/
|
|
220
|
+
readonly asset_id: v.StringSchema<undefined>;
|
|
221
|
+
}, undefined>;
|
|
222
|
+
}, undefined>, undefined>, undefined>;
|
|
223
|
+
}, undefined>, undefined>;
|
|
224
|
+
}, undefined>;
|
|
225
|
+
type AccountBalanceResponse = v.InferOutput<typeof accountBalanceResponseSchema>;
|
|
226
|
+
declare const ACCOUNT_TRANSACTION_TYPES: readonly ["operator-send", "operator-transfer", "operator-deposit", "operator-refund", "microdeposit"];
|
|
227
|
+
declare const ACCOUNT_TRANSACTION_STATUSES: readonly ["pending", "processing", "completed", "failed", "reversed"];
|
|
228
|
+
declare const ACCOUNT_TRANSACTION_MOVEMENT_STATUSES: readonly ["initiated", "provider_pending", "processing", "completed", "failed", "reversed", "manual_review"];
|
|
229
|
+
declare const SEND_METHODS: readonly ["ach", "wire", "on-chain"];
|
|
230
|
+
declare const ACCOUNT_TRANSACTION_METHODS: readonly ["ach", "wire", "on-chain"];
|
|
231
|
+
declare const accountTransactionsResponseSchema: v.ObjectSchema<{
|
|
232
|
+
readonly accountId: v.StringSchema<undefined>;
|
|
233
|
+
readonly transactions: v.ArraySchema<v.ObjectSchema<{
|
|
234
|
+
readonly id: v.StringSchema<undefined>;
|
|
235
|
+
readonly type: v.GenericSchema<string, ExtensibleString<readonly ["operator-send", "operator-transfer", "operator-deposit", "operator-refund", "microdeposit"]>>;
|
|
236
|
+
/**
|
|
237
|
+
* Display action — `receive` for on-chain receives, distinct from the raw
|
|
238
|
+
* `type`. Optional to tolerate an API deployed before this field existed.
|
|
239
|
+
*/
|
|
240
|
+
readonly action: v.OptionalSchema<v.StringSchema<undefined>, undefined>;
|
|
241
|
+
readonly status: v.GenericSchema<string, ExtensibleString<readonly ["pending", "processing", "completed", "failed", "reversed"]>>;
|
|
242
|
+
readonly movementStatus: v.GenericSchema<string, ExtensibleString<readonly ["initiated", "provider_pending", "processing", "completed", "failed", "reversed", "manual_review"]>>;
|
|
243
|
+
readonly direction: v.PicklistSchema<["incoming", "outgoing"], undefined>;
|
|
244
|
+
readonly amount: v.ObjectSchema<{
|
|
245
|
+
/**
|
|
246
|
+
* Decimal string in the asset's major unit: "12.50" is $12.50. Never cents or
|
|
247
|
+
* atomic units.
|
|
248
|
+
*/
|
|
249
|
+
readonly amount: v.StringSchema<undefined>;
|
|
250
|
+
/**
|
|
251
|
+
* Asset identifier, e.g. "USD".
|
|
252
|
+
*/
|
|
253
|
+
readonly asset_id: v.StringSchema<undefined>;
|
|
254
|
+
}, undefined>;
|
|
255
|
+
readonly fee: v.ObjectSchema<{
|
|
256
|
+
/**
|
|
257
|
+
* Decimal string in the asset's major unit: "12.50" is $12.50. Never cents or
|
|
258
|
+
* atomic units.
|
|
259
|
+
*/
|
|
260
|
+
readonly amount: v.StringSchema<undefined>;
|
|
261
|
+
/**
|
|
262
|
+
* Asset identifier, e.g. "USD".
|
|
263
|
+
*/
|
|
264
|
+
readonly asset_id: v.StringSchema<undefined>;
|
|
265
|
+
}, undefined>;
|
|
266
|
+
readonly currency: v.StringSchema<undefined>;
|
|
267
|
+
/**
|
|
268
|
+
* On-chain network, absent for fiat and older transactions.
|
|
269
|
+
*/
|
|
270
|
+
readonly network: v.OptionalSchema<v.StringSchema<undefined>, undefined>;
|
|
271
|
+
readonly counterpartyName: v.OptionalSchema<v.StringSchema<undefined>, undefined>;
|
|
272
|
+
readonly method: v.OptionalSchema<v.GenericSchema<string, ExtensibleString<readonly ["ach", "wire", "on-chain"]>>, undefined>;
|
|
273
|
+
readonly memo: v.OptionalSchema<v.StringSchema<undefined>, undefined>;
|
|
274
|
+
readonly description: v.OptionalSchema<v.StringSchema<undefined>, undefined>;
|
|
275
|
+
readonly txHash: v.OptionalSchema<v.StringSchema<undefined>, undefined>;
|
|
276
|
+
readonly createdAt: v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.IsoTimestampAction<string, undefined>]>;
|
|
277
|
+
readonly completedAt: v.OptionalSchema<v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.IsoTimestampAction<string, undefined>]>, undefined>;
|
|
278
|
+
}, undefined>, undefined>;
|
|
279
|
+
readonly total: v.NumberSchema<undefined>;
|
|
280
|
+
}, undefined>;
|
|
281
|
+
type AccountTransactionsResponse = v.InferOutput<typeof accountTransactionsResponseSchema>;
|
|
282
|
+
type AccountTransactionsParams = {
|
|
283
|
+
/**
|
|
284
|
+
* Inclusive lower bound on `createdAt`, as an ISO 8601 timestamp.
|
|
285
|
+
*/
|
|
286
|
+
start?: string;
|
|
287
|
+
/**
|
|
288
|
+
* Inclusive upper bound on `createdAt`, as an ISO 8601 timestamp.
|
|
289
|
+
*/
|
|
290
|
+
end?: string;
|
|
291
|
+
/**
|
|
292
|
+
* Page size; positive integer, defaults to 50, values above 200 are
|
|
293
|
+
* clamped to 200. Non-integer or non-positive values are rejected (400).
|
|
294
|
+
*/
|
|
295
|
+
limit?: number;
|
|
296
|
+
/**
|
|
297
|
+
* Rows to skip; nonnegative integer, defaults to 0. Non-integer or
|
|
298
|
+
* negative values are rejected (400).
|
|
299
|
+
*/
|
|
300
|
+
offset?: number;
|
|
301
|
+
};
|
|
302
|
+
declare const ACCOUNT_DEPOSIT_ADDRESS_SOURCES: readonly ["wallet", "liquidation"];
|
|
303
|
+
declare const accountDepositAddressResponseSchema: v.ObjectSchema<{
|
|
304
|
+
readonly accountId: v.StringSchema<undefined>;
|
|
305
|
+
readonly address: v.StringSchema<undefined>;
|
|
306
|
+
readonly liquidationAddressId: v.OptionalSchema<v.StringSchema<undefined>, undefined>;
|
|
307
|
+
readonly source: v.GenericSchema<string, ExtensibleString<readonly ["wallet", "liquidation"]>>;
|
|
308
|
+
}, undefined>;
|
|
309
|
+
type AccountDepositAddressResponse = v.InferOutput<typeof accountDepositAddressResponseSchema>;
|
|
310
|
+
/**
|
|
311
|
+
* Widened network/asset inputs: autocomplete from the literal half, but any
|
|
312
|
+
* string is accepted — the server is the enforcement boundary, so a network
|
|
313
|
+
* or asset added server-side never becomes a compile-time wall for an older
|
|
314
|
+
* SDK. Response schemas parse plain strings for the same reason.
|
|
315
|
+
*/
|
|
316
|
+
type OnchainNetworkInput = "base" | "base-sepolia" | "arc" | (string & {});
|
|
317
|
+
type OnchainAssetInput = "usdc" | (string & {});
|
|
318
|
+
declare const walletCounterpartyRailSchema: v.ObjectSchema<{
|
|
319
|
+
readonly type: v.LiteralSchema<"wallet", undefined>;
|
|
320
|
+
readonly walletAddress: v.CustomSchema<`0x${string}`, undefined>;
|
|
321
|
+
readonly network: v.CustomSchema<OnchainNetworkInput, undefined>;
|
|
322
|
+
}, undefined>;
|
|
323
|
+
/**
|
|
324
|
+
* Catena wallet rail returned for deliberate counterparty recovery. It can be
|
|
325
|
+
* passed directly as `create_counterparty`'s `rail` after the caller chooses a
|
|
326
|
+
* name and confirms the recipient.
|
|
327
|
+
*/
|
|
328
|
+
type WalletCounterpartyRail = v.InferOutput<typeof walletCounterpartyRailSchema>;
|
|
329
|
+
type AccountDepositAddressParams = {
|
|
330
|
+
network: OnchainNetworkInput;
|
|
331
|
+
asset: OnchainAssetInput;
|
|
332
|
+
};
|
|
333
|
+
/**
|
|
334
|
+
* Rails are modeled tolerantly rather than as a variant on `type`: each
|
|
335
|
+
* field is present only on the rail types it applies to (wallet rails carry
|
|
336
|
+
* `walletAddress` and may carry `network`; bank rails carry
|
|
337
|
+
* `bankName`/`accountNumber`), and a server that later adds a new rail type
|
|
338
|
+
* must not break older clients. A wallet rail omits `network` when its
|
|
339
|
+
* configured destination is unavailable to the agent; it cannot receive an
|
|
340
|
+
* agent send until that configuration or the organization's capability changes.
|
|
341
|
+
*/
|
|
342
|
+
declare const counterpartySchema: v.ObjectSchema<{
|
|
343
|
+
readonly id: v.StringSchema<undefined>;
|
|
344
|
+
readonly name: v.StringSchema<undefined>;
|
|
345
|
+
/**
|
|
346
|
+
* Server-derived payment-detail readiness. Current values are "ready" and
|
|
347
|
+
* "awaiting_details"; treat other strings as future lifecycle states.
|
|
348
|
+
* Optional so this SDK can still read responses from older servers.
|
|
349
|
+
*/
|
|
350
|
+
readonly status: v.OptionalSchema<v.StringSchema<undefined>, undefined>;
|
|
351
|
+
readonly rails: v.ArraySchema<v.ObjectSchema<{
|
|
352
|
+
readonly id: v.StringSchema<undefined>;
|
|
353
|
+
/**
|
|
354
|
+
* Rail kind — currently "wallet" or "bank"; treat other values as
|
|
355
|
+
* future rail types. Sends must match method to rail: "ach" and
|
|
356
|
+
* "wire" need a bank rail, "on-chain" needs a wallet rail.
|
|
357
|
+
*/
|
|
358
|
+
readonly type: v.StringSchema<undefined>;
|
|
359
|
+
readonly walletAddress: v.OptionalSchema<v.StringSchema<undefined>, undefined>;
|
|
360
|
+
readonly network: v.OptionalSchema<v.StringSchema<undefined>, undefined>;
|
|
361
|
+
readonly bankName: v.OptionalSchema<v.StringSchema<undefined>, undefined>;
|
|
362
|
+
readonly accountNumber: v.OptionalSchema<v.StringSchema<undefined>, undefined>;
|
|
363
|
+
}, undefined>, undefined>;
|
|
364
|
+
}, undefined>;
|
|
365
|
+
type Counterparty = v.InferOutput<typeof counterpartySchema>;
|
|
366
|
+
declare const counterpartiesResponseSchema: v.ObjectSchema<{
|
|
367
|
+
readonly counterparties: v.ArraySchema<v.ObjectSchema<{
|
|
368
|
+
readonly id: v.StringSchema<undefined>;
|
|
369
|
+
readonly name: v.StringSchema<undefined>;
|
|
370
|
+
/**
|
|
371
|
+
* Server-derived payment-detail readiness. Current values are "ready" and
|
|
372
|
+
* "awaiting_details"; treat other strings as future lifecycle states.
|
|
373
|
+
* Optional so this SDK can still read responses from older servers.
|
|
374
|
+
*/
|
|
375
|
+
readonly status: v.OptionalSchema<v.StringSchema<undefined>, undefined>;
|
|
376
|
+
readonly rails: v.ArraySchema<v.ObjectSchema<{
|
|
377
|
+
readonly id: v.StringSchema<undefined>;
|
|
378
|
+
/**
|
|
379
|
+
* Rail kind — currently "wallet" or "bank"; treat other values as
|
|
380
|
+
* future rail types. Sends must match method to rail: "ach" and
|
|
381
|
+
* "wire" need a bank rail, "on-chain" needs a wallet rail.
|
|
382
|
+
*/
|
|
383
|
+
readonly type: v.StringSchema<undefined>;
|
|
384
|
+
readonly walletAddress: v.OptionalSchema<v.StringSchema<undefined>, undefined>;
|
|
385
|
+
readonly network: v.OptionalSchema<v.StringSchema<undefined>, undefined>;
|
|
386
|
+
readonly bankName: v.OptionalSchema<v.StringSchema<undefined>, undefined>;
|
|
387
|
+
readonly accountNumber: v.OptionalSchema<v.StringSchema<undefined>, undefined>;
|
|
388
|
+
}, undefined>, undefined>;
|
|
389
|
+
}, undefined>, undefined>;
|
|
390
|
+
}, undefined>;
|
|
391
|
+
type CounterpartiesResponse = v.InferOutput<typeof counterpartiesResponseSchema>;
|
|
392
|
+
type CounterpartiesParams = {
|
|
393
|
+
/**
|
|
394
|
+
* Only counterparties that own this wallet address.
|
|
395
|
+
*/
|
|
396
|
+
address?: `0x${string}` | undefined;
|
|
397
|
+
/**
|
|
398
|
+
* Only counterparties that own a wallet address in this network class.
|
|
399
|
+
* This does not promise that a payment can settle on the queried network.
|
|
400
|
+
*/
|
|
401
|
+
network?: OnchainNetworkInput | undefined;
|
|
402
|
+
};
|
|
403
|
+
declare const INTENT_ACTION_TYPES: readonly ["send", "transfer", "create_counterparty", "request_counterparty_details", "x402", "mpp", "policy_override"];
|
|
404
|
+
/**
|
|
405
|
+
* Present on a send that crosses chains: the counterparty wallet sits on the
|
|
406
|
+
* other side of the Base and Arc lane and the account had no balance to pay
|
|
407
|
+
* it there, so the first signature burned the amount toward the account's own
|
|
408
|
+
* address on the destination. `nextStep` is the whole contract: `wait` and
|
|
409
|
+
* poll while the crossing runs, `continue` when `continueIntent` is due,
|
|
410
|
+
* `done` once the counterparty was paid, `blocked` when an operator must
|
|
411
|
+
* step in. `state` walks `burning`, `attesting`, `minting`, `ready`,
|
|
412
|
+
* `delivering`, `delivered`; `failed` and `manual_review` are terminal.
|
|
413
|
+
*/
|
|
414
|
+
declare const CROSS_CHAIN_STATES: readonly ["burning", "attesting", "minting", "ready", "delivering", "delivered", "failed", "manual_review"];
|
|
415
|
+
declare const CROSS_CHAIN_NEXT_STEPS: readonly ["wait", "continue", "done", "blocked"];
|
|
416
|
+
declare const crossChainSendSchema: v.ObjectSchema<{
|
|
417
|
+
readonly id: v.StringSchema<undefined>;
|
|
418
|
+
readonly sourceNetwork: v.StringSchema<undefined>;
|
|
419
|
+
readonly destinationNetwork: v.StringSchema<undefined>;
|
|
420
|
+
readonly state: v.GenericSchema<string, ExtensibleString<readonly ["burning", "attesting", "minting", "ready", "delivering", "delivered", "failed", "manual_review"]>>;
|
|
421
|
+
readonly nextStep: v.GenericSchema<string, ExtensibleString<readonly ["wait", "continue", "done", "blocked"]>>;
|
|
422
|
+
readonly readyAt: v.NullableSchema<v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.IsoTimestampAction<string, undefined>]>, undefined>;
|
|
423
|
+
readonly deliveredAt: v.NullableSchema<v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.IsoTimestampAction<string, undefined>]>, undefined>;
|
|
424
|
+
readonly failureReason: v.NullableSchema<v.StringSchema<undefined>, undefined>;
|
|
425
|
+
}, undefined>;
|
|
426
|
+
type CrossChainSend = v.InferOutput<typeof crossChainSendSchema>;
|
|
427
|
+
declare const MOVEMENT_NEXT_STEPS: readonly ["wait", "continue", "done", "blocked"];
|
|
428
|
+
/**
|
|
429
|
+
* Present on a payment carried by a movement plan.
|
|
430
|
+
*
|
|
431
|
+
* `nextStep` is what the payment is waiting for, which `status` cannot say on
|
|
432
|
+
* its own: a payment an admin is signing and one whose signature is already in
|
|
433
|
+
* flight are both "processing".
|
|
434
|
+
*
|
|
435
|
+
* - "wait" — nothing to do here. A person is deciding the payment, or has
|
|
436
|
+
* approved it and an admin is finishing it. Read it again with
|
|
437
|
+
* getIntent(...). If you restarted before signing a payment nobody had to
|
|
438
|
+
* approve, send the original request again on the same idempotency key.
|
|
439
|
+
* Within about five minutes of the first send it answers
|
|
440
|
+
* `movement_authorization_in_progress`; after that it hands the payment back
|
|
441
|
+
* for you to sign.
|
|
442
|
+
* - "done" — the payment completed.
|
|
443
|
+
* - "blocked" — it ended without paying. Read `reasons` for why; it is empty when
|
|
444
|
+
* an approval lapsed.
|
|
445
|
+
*
|
|
446
|
+
* A payment a person has to approve is never handed back to you to finish:
|
|
447
|
+
* "continue" belongs to a send that crossed chains and is not an answer this
|
|
448
|
+
* field gives. It stays in the list because both fields are parsed against one
|
|
449
|
+
* vocabulary.
|
|
450
|
+
*/
|
|
451
|
+
declare const movementSchema: v.ObjectSchema<{
|
|
452
|
+
readonly planId: v.StringSchema<undefined>;
|
|
453
|
+
readonly nextStep: v.GenericSchema<string, ExtensibleString<readonly ["wait", "continue", "done", "blocked"]>>;
|
|
454
|
+
}, undefined>;
|
|
455
|
+
type Movement = v.InferOutput<typeof movementSchema>;
|
|
456
|
+
declare const wireIntentResultSchema: v.ObjectSchema<{
|
|
457
|
+
readonly id: v.StringSchema<undefined>;
|
|
458
|
+
/**
|
|
459
|
+
* Resolved source account, pinned at creation even if policy later changes.
|
|
460
|
+
* Omitted for actions without an account and by older servers.
|
|
461
|
+
*/
|
|
462
|
+
readonly accountId: v.OptionalSchema<v.StringSchema<undefined>, undefined>;
|
|
463
|
+
readonly type: v.GenericSchema<string, ExtensibleString<readonly ["send", "transfer", "create_counterparty", "request_counterparty_details", "x402", "mpp", "policy_override"]>>;
|
|
464
|
+
/**
|
|
465
|
+
* Disposition of the intent:
|
|
466
|
+
*
|
|
467
|
+
* - "pending" — accepted but not yet executing, typically parked for a human
|
|
468
|
+
* approval; `reasons` says why and `expiresAt` when it lapses. A client
|
|
469
|
+
* with no registered signing key has every wallet payment parked, whatever
|
|
470
|
+
* the amount, and `reasons` carries `agent_signer_not_registered` (or
|
|
471
|
+
* `operator_signature_required` for a payment with no `movement`).
|
|
472
|
+
* - "processing" — accepted and in progress. Executing intents advance on their
|
|
473
|
+
* own; poll `getIntent`. An approved MPP or x402 payment instead rests here
|
|
474
|
+
* until the paid request is re-run — polling never advances it — and
|
|
475
|
+
* `expiresAt` is when that grant lapses. A payment a person approved also
|
|
476
|
+
* rests here while an admin signs it, and `movement.nextStep` reads "wait"
|
|
477
|
+
* until it is done or blocked.
|
|
478
|
+
* - "completed" — the action succeeded: money moved for send and transfer; for
|
|
479
|
+
* MPP and x402 the payment authorization was delivered
|
|
480
|
+
* (`data.paymentCredential.value`), with on-chain settlement verified
|
|
481
|
+
* separately; for create_counterparty the counterparty exists.
|
|
482
|
+
* - "blocked" — declined by policy or denied by an operator; `reasons` explains
|
|
483
|
+
* why approval was required, not necessarily why it was denied. Terminal.
|
|
484
|
+
* - "failed" — failed, expired, or reversed. Terminal.
|
|
485
|
+
*/
|
|
486
|
+
readonly status: v.PicklistSchema<["pending", "processing", "completed", "blocked", "failed"], undefined>;
|
|
487
|
+
/**
|
|
488
|
+
* Human-readable explanations for a pending, blocked, or failed status.
|
|
489
|
+
*/
|
|
490
|
+
readonly reasons: v.ArraySchema<v.StringSchema<undefined>, undefined>;
|
|
491
|
+
/**
|
|
492
|
+
* Deadline for an awaiting state: while parked for approval, when the
|
|
493
|
+
* request self-expires; while an approved payment grant rests, when the
|
|
494
|
+
* grant lapses. Optional to tolerate an API deployed before this field
|
|
495
|
+
* existed.
|
|
496
|
+
*/
|
|
497
|
+
readonly expiresAt: v.OptionalSchema<v.NullableSchema<v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.IsoTimestampAction<string, undefined>]>, undefined>, null>;
|
|
498
|
+
/**
|
|
499
|
+
* True when `submitIntent` matched an earlier request and the server handed
|
|
500
|
+
* that intent back rather than accepting a new action — so a `completed`
|
|
501
|
+
* status describes the earlier movement, not one this call made. Check
|
|
502
|
+
* `data.transaction` to see which movement it is. Always false on a read, and
|
|
503
|
+
* on an API deployed before this field existed.
|
|
504
|
+
*/
|
|
505
|
+
readonly replayed: v.OptionalSchema<v.BooleanSchema<undefined>, false>;
|
|
506
|
+
/**
|
|
507
|
+
* Intent-type-specific payload. A completed payment intent carries the
|
|
508
|
+
* credential to present to the seller at `data.paymentCredential`
|
|
509
|
+
* (`{ protocol, value }`, where `value` is the serialized retry credential)
|
|
510
|
+
* and its transaction at `data.transaction`; `data.x402` is a deprecated
|
|
511
|
+
* x402-specific copy of both.
|
|
512
|
+
*/
|
|
513
|
+
readonly data: v.OptionalSchema<v.NullableSchema<v.RecordSchema<v.StringSchema<undefined>, v.UnknownSchema, undefined>, undefined>, null>;
|
|
514
|
+
readonly metadata: v.OptionalSchema<v.ObjectSchema<{
|
|
515
|
+
readonly dataUrl: v.NullableSchema<v.StringSchema<undefined>, undefined>;
|
|
516
|
+
}, undefined>, undefined>;
|
|
517
|
+
/**
|
|
518
|
+
* Present on a send that crosses chains. See `CrossChainSend`.
|
|
519
|
+
*/
|
|
520
|
+
readonly crossChain: v.OptionalSchema<v.ObjectSchema<{
|
|
521
|
+
readonly id: v.StringSchema<undefined>;
|
|
522
|
+
readonly sourceNetwork: v.StringSchema<undefined>;
|
|
523
|
+
readonly destinationNetwork: v.StringSchema<undefined>;
|
|
524
|
+
readonly state: v.GenericSchema<string, ExtensibleString<readonly ["burning", "attesting", "minting", "ready", "delivering", "delivered", "failed", "manual_review"]>>;
|
|
525
|
+
readonly nextStep: v.GenericSchema<string, ExtensibleString<readonly ["wait", "continue", "done", "blocked"]>>;
|
|
526
|
+
readonly readyAt: v.NullableSchema<v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.IsoTimestampAction<string, undefined>]>, undefined>;
|
|
527
|
+
readonly deliveredAt: v.NullableSchema<v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.IsoTimestampAction<string, undefined>]>, undefined>;
|
|
528
|
+
readonly failureReason: v.NullableSchema<v.StringSchema<undefined>, undefined>;
|
|
529
|
+
}, undefined>, undefined>;
|
|
530
|
+
/**
|
|
531
|
+
* Present on a payment carried by a movement plan, and absent from a server
|
|
532
|
+
* that has not deployed them. See `Movement`.
|
|
533
|
+
*/
|
|
534
|
+
readonly movement: v.OptionalSchema<v.ObjectSchema<{
|
|
535
|
+
readonly planId: v.StringSchema<undefined>;
|
|
536
|
+
readonly nextStep: v.GenericSchema<string, ExtensibleString<readonly ["wait", "continue", "done", "blocked"]>>;
|
|
537
|
+
}, undefined>, undefined>;
|
|
538
|
+
readonly nextAction: v.OptionalSchema<v.ObjectSchema<{
|
|
539
|
+
readonly type: v.LiteralSchema<"submit_stamp", undefined>;
|
|
540
|
+
readonly signingRequestId: v.StringSchema<undefined>;
|
|
541
|
+
readonly signer: v.ObjectSchema<{
|
|
542
|
+
readonly algorithm: v.LiteralSchema<"p256", undefined>;
|
|
543
|
+
readonly publicKeyHex: v.StringSchema<undefined>;
|
|
544
|
+
}, undefined>;
|
|
545
|
+
readonly preparedBody: v.ObjectSchema<{
|
|
546
|
+
readonly body: v.StringSchema<undefined>;
|
|
547
|
+
readonly bodyHash: v.StringSchema<undefined>;
|
|
548
|
+
readonly expiresAt: v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.IsoTimestampAction<string, undefined>]>;
|
|
549
|
+
readonly prepareToken: v.StringSchema<undefined>;
|
|
550
|
+
}, undefined>;
|
|
551
|
+
/**
|
|
552
|
+
* Present when the approval covers a movement plan, whose one signature
|
|
553
|
+
* authorizes several digests at once. It carries what each of those digests
|
|
554
|
+
* commits to, so the signer can rebuild them rather than stamp bytes it has
|
|
555
|
+
* not read.
|
|
556
|
+
*/
|
|
557
|
+
readonly movement: v.OptionalSchema<v.ObjectSchema<{
|
|
558
|
+
readonly planId: v.StringSchema<undefined>;
|
|
559
|
+
readonly signerAddress: v.StringSchema<undefined>;
|
|
560
|
+
readonly digests: v.ArraySchema<v.StringSchema<undefined>, undefined>;
|
|
561
|
+
readonly instructions: v.ArraySchema<v.LooseObjectSchema<{
|
|
562
|
+
readonly kind: v.StringSchema<undefined>;
|
|
563
|
+
readonly network: v.StringSchema<undefined>;
|
|
564
|
+
readonly signerAddress: v.StringSchema<undefined>;
|
|
565
|
+
readonly digest: v.StringSchema<undefined>;
|
|
566
|
+
readonly payload: v.RecordSchema<v.StringSchema<undefined>, v.UnknownSchema, undefined>;
|
|
567
|
+
}, undefined>, undefined>;
|
|
568
|
+
}, undefined>, undefined>;
|
|
569
|
+
}, undefined>, undefined>;
|
|
570
|
+
}, undefined>;
|
|
571
|
+
type WireIntentResult = v.InferOutput<typeof wireIntentResultSchema>;
|
|
572
|
+
/**
|
|
573
|
+
* Public view of an intent, as returned by `submitIntent` and `getIntent`.
|
|
574
|
+
* Branch on `status`; `reasons` explains non-completed outcomes.
|
|
575
|
+
*
|
|
576
|
+
* The co-signing step inside `submitIntent` is not resumable from a re-read
|
|
577
|
+
* intent: one awaiting its co-signature reads as plain "processing" here.
|
|
578
|
+
* Recovery from a failed submit follows `IntentSubmitError`'s outcome
|
|
579
|
+
* contract: a new `submitIntent` only when the outcome was "not-submitted";
|
|
580
|
+
* when it was "unknown", poll `getIntent` to a terminal status and submit
|
|
581
|
+
* again only if it ended blocked or failed.
|
|
582
|
+
*/
|
|
583
|
+
type IntentResult = Omit<WireIntentResult, "nextAction">;
|
|
584
|
+
declare const sendMethodSchema: v.PicklistSchema<readonly ["ach", "wire", "on-chain"], undefined>;
|
|
585
|
+
type SendMethod = v.InferOutput<typeof sendMethodSchema>;
|
|
586
|
+
/**
|
|
587
|
+
* The `PaymentRequirements` a 402 challenge names, relayed to the API
|
|
588
|
+
* verbatim. Loose on purpose: the API is the enforcement boundary (shape,
|
|
589
|
+
* guardrails, policy); the client only needs the discriminating fields to
|
|
590
|
+
* pick a candidate from `accepts`.
|
|
591
|
+
*/
|
|
592
|
+
declare const x402PaymentRequirementsSchema: v.LooseObjectSchema<{
|
|
593
|
+
readonly scheme: v.StringSchema<undefined>;
|
|
594
|
+
readonly network: v.StringSchema<undefined>;
|
|
595
|
+
readonly asset: v.StringSchema<undefined>;
|
|
596
|
+
readonly amount: v.StringSchema<undefined>;
|
|
597
|
+
readonly payTo: v.StringSchema<undefined>;
|
|
598
|
+
readonly maxTimeoutSeconds: v.NumberSchema<undefined>;
|
|
599
|
+
}, undefined>;
|
|
600
|
+
type X402PaymentRequirements = v.InferOutput<typeof x402PaymentRequirementsSchema>;
|
|
601
|
+
declare const x402ResourceSchema: v.LooseObjectSchema<{
|
|
602
|
+
readonly url: v.StringSchema<undefined>;
|
|
603
|
+
/**
|
|
604
|
+
* Human-readable name of the paid service, when the challenge advertises
|
|
605
|
+
* one — a suggested name when creating the counterparty. Parsed leniently:
|
|
606
|
+
* a malformed value (non-string, or over-long) drops to undefined rather
|
|
607
|
+
* than failing the whole challenge parse, which would silently downgrade
|
|
608
|
+
* an otherwise-payable 402 to an unpaid passthrough.
|
|
609
|
+
*/
|
|
610
|
+
readonly serviceName: v.SchemaWithFallback<v.OptionalSchema<v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.MaxLengthAction<string, 255, undefined>]>, undefined>, undefined>;
|
|
611
|
+
}, undefined>;
|
|
612
|
+
type X402Resource = v.InferOutput<typeof x402ResourceSchema>;
|
|
613
|
+
declare const x402AuthorizationSchema: v.ObjectSchema<{
|
|
614
|
+
/**
|
|
615
|
+
* Wallet address the transfer draws from. Must be the paying account's
|
|
616
|
+
* wallet address; the server rejects any other value. A mixed-case
|
|
617
|
+
* spelling must carry a valid EIP-55 checksum; all-lowercase is accepted.
|
|
618
|
+
*/
|
|
619
|
+
readonly from: v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.RegexAction<string, "Expected a 20-byte hex address">]>;
|
|
620
|
+
/**
|
|
621
|
+
* Recipient address. Must equal the requirement's `payTo` (case may
|
|
622
|
+
* differ) and resolve to a saved counterparty wallet rail. A mixed-case
|
|
623
|
+
* spelling must carry a valid EIP-55 checksum; all-lowercase is accepted.
|
|
624
|
+
*/
|
|
625
|
+
readonly to: v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.RegexAction<string, "Expected a 20-byte hex address">]>;
|
|
626
|
+
/**
|
|
627
|
+
* Amount in atomic token units as a canonical decimal string (no leading
|
|
628
|
+
* zeros). Must equal the requirement's `amount`.
|
|
629
|
+
*/
|
|
630
|
+
readonly value: v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.MaxLengthAction<string, 78, undefined>, v.RegexAction<string, "Expected a canonical decimal integer string">]>;
|
|
631
|
+
/**
|
|
632
|
+
* Unix seconds the authorization becomes valid, as a canonical decimal
|
|
633
|
+
* string. Must not be in the future.
|
|
634
|
+
*/
|
|
635
|
+
readonly validAfter: v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.MaxLengthAction<string, 78, undefined>, v.RegexAction<string, "Expected a canonical decimal integer string">]>;
|
|
636
|
+
/**
|
|
637
|
+
* Unix seconds the authorization expires, as a canonical decimal string.
|
|
638
|
+
* Bounded by the requirement's `maxTimeoutSeconds` and must leave time to
|
|
639
|
+
* settle.
|
|
640
|
+
*/
|
|
641
|
+
readonly validBefore: v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.MaxLengthAction<string, 78, undefined>, v.RegexAction<string, "Expected a canonical decimal integer string">]>;
|
|
642
|
+
/**
|
|
643
|
+
* 32-byte hex nonce (`0x` + 64 hex characters), unique per payment for
|
|
644
|
+
* the wallet. A nonce ever used by an earlier payment is refused; retry
|
|
645
|
+
* with a fresh one.
|
|
646
|
+
*/
|
|
647
|
+
readonly nonce: v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.RegexAction<string, "Expected a 32-byte hex nonce">]>;
|
|
648
|
+
}, undefined>;
|
|
649
|
+
/**
|
|
650
|
+
* Caller-supplied EIP-3009 `TransferWithAuthorization` message. When present
|
|
651
|
+
* on an x402 action, the server validates and signs these exact values
|
|
652
|
+
* instead of minting its own authorization, so the returned payment
|
|
653
|
+
* signature verifies against typed data the caller constructed.
|
|
654
|
+
*/
|
|
655
|
+
type X402Authorization = v.InferOutput<typeof x402AuthorizationSchema>;
|
|
656
|
+
declare const mppChallengeSchema: v.ObjectSchema<{
|
|
657
|
+
/**
|
|
658
|
+
* Seller-issued challenge identifier.
|
|
659
|
+
*/
|
|
660
|
+
readonly id: v.StringSchema<undefined>;
|
|
661
|
+
/**
|
|
662
|
+
* Seller protection space that issued the challenge.
|
|
663
|
+
*/
|
|
664
|
+
readonly realm: v.StringSchema<undefined>;
|
|
665
|
+
/**
|
|
666
|
+
* Supported MPP payment method.
|
|
667
|
+
*/
|
|
668
|
+
readonly method: v.PicklistSchema<["evm", "usdc"], undefined>;
|
|
669
|
+
/**
|
|
670
|
+
* Catena supports MPP charge intents only.
|
|
671
|
+
*/
|
|
672
|
+
readonly intent: v.LiteralSchema<"charge", undefined>;
|
|
673
|
+
/**
|
|
674
|
+
* Base64url-encoded, canonical MPP payment request.
|
|
675
|
+
*/
|
|
676
|
+
readonly request: v.StringSchema<undefined>;
|
|
677
|
+
/**
|
|
678
|
+
* Optional seller description of the charge.
|
|
679
|
+
*/
|
|
680
|
+
readonly description: v.OptionalSchema<v.StringSchema<undefined>, undefined>;
|
|
681
|
+
/**
|
|
682
|
+
* Optional seller-declared request-body digest, relayed unchanged.
|
|
683
|
+
*/
|
|
684
|
+
readonly digest: v.OptionalSchema<v.StringSchema<undefined>, undefined>;
|
|
685
|
+
/**
|
|
686
|
+
* UTC challenge expiry timestamp.
|
|
687
|
+
*/
|
|
688
|
+
readonly expires: v.StringSchema<undefined>;
|
|
689
|
+
/**
|
|
690
|
+
* Alternate field for the credential when HTTP Authorization is occupied.
|
|
691
|
+
*/
|
|
692
|
+
readonly header: v.OptionalSchema<v.LiteralSchema<"Payment-Authorization", undefined>, undefined>;
|
|
693
|
+
/**
|
|
694
|
+
* Opaque base64url seller state, relayed unchanged.
|
|
695
|
+
*/
|
|
696
|
+
readonly opaque: v.OptionalSchema<v.StringSchema<undefined>, undefined>;
|
|
697
|
+
}, undefined>;
|
|
698
|
+
/**
|
|
699
|
+
* Serialized MPP challenge accepted by the Catena intent API. `request` is
|
|
700
|
+
* the challenge's base64url-encoded payment request; `digest`, when present,
|
|
701
|
+
* is relayed unchanged for the seller to verify.
|
|
702
|
+
*/
|
|
703
|
+
type MppChallenge = v.InferOutput<typeof mppChallengeSchema>;
|
|
704
|
+
declare const mppResourceSchema: v.ObjectSchema<{
|
|
705
|
+
/**
|
|
706
|
+
* Absolute URL of the paid resource.
|
|
707
|
+
*/
|
|
708
|
+
readonly url: v.StringSchema<undefined>;
|
|
709
|
+
/**
|
|
710
|
+
* Optional human-readable seller or service name.
|
|
711
|
+
*/
|
|
712
|
+
readonly serviceName: v.OptionalSchema<v.StringSchema<undefined>, undefined>;
|
|
713
|
+
}, undefined>;
|
|
714
|
+
/**
|
|
715
|
+
* Optional seller resource metadata attached by low-level callers.
|
|
716
|
+
*/
|
|
717
|
+
type MppResource = v.InferOutput<typeof mppResourceSchema>;
|
|
718
|
+
declare const mppActionSchema: v.ObjectSchema<{
|
|
719
|
+
/**
|
|
720
|
+
* MPP payment action discriminator.
|
|
721
|
+
*/
|
|
722
|
+
readonly type: v.LiteralSchema<"mpp", undefined>;
|
|
723
|
+
/**
|
|
724
|
+
* Catena account whose wallet authorizes the charge.
|
|
725
|
+
*/
|
|
726
|
+
readonly accountId: v.StringSchema<undefined>;
|
|
727
|
+
/**
|
|
728
|
+
* Serialized seller challenge to authorize.
|
|
729
|
+
*/
|
|
730
|
+
readonly challenge: v.ObjectSchema<{
|
|
731
|
+
/**
|
|
732
|
+
* Seller-issued challenge identifier.
|
|
733
|
+
*/
|
|
734
|
+
readonly id: v.StringSchema<undefined>;
|
|
735
|
+
/**
|
|
736
|
+
* Seller protection space that issued the challenge.
|
|
737
|
+
*/
|
|
738
|
+
readonly realm: v.StringSchema<undefined>;
|
|
739
|
+
/**
|
|
740
|
+
* Supported MPP payment method.
|
|
741
|
+
*/
|
|
742
|
+
readonly method: v.PicklistSchema<["evm", "usdc"], undefined>;
|
|
743
|
+
/**
|
|
744
|
+
* Catena supports MPP charge intents only.
|
|
745
|
+
*/
|
|
746
|
+
readonly intent: v.LiteralSchema<"charge", undefined>;
|
|
747
|
+
/**
|
|
748
|
+
* Base64url-encoded, canonical MPP payment request.
|
|
749
|
+
*/
|
|
750
|
+
readonly request: v.StringSchema<undefined>;
|
|
751
|
+
/**
|
|
752
|
+
* Optional seller description of the charge.
|
|
753
|
+
*/
|
|
754
|
+
readonly description: v.OptionalSchema<v.StringSchema<undefined>, undefined>;
|
|
755
|
+
/**
|
|
756
|
+
* Optional seller-declared request-body digest, relayed unchanged.
|
|
757
|
+
*/
|
|
758
|
+
readonly digest: v.OptionalSchema<v.StringSchema<undefined>, undefined>;
|
|
759
|
+
/**
|
|
760
|
+
* UTC challenge expiry timestamp.
|
|
761
|
+
*/
|
|
762
|
+
readonly expires: v.StringSchema<undefined>;
|
|
763
|
+
/**
|
|
764
|
+
* Alternate field for the credential when HTTP Authorization is occupied.
|
|
765
|
+
*/
|
|
766
|
+
readonly header: v.OptionalSchema<v.LiteralSchema<"Payment-Authorization", undefined>, undefined>;
|
|
767
|
+
/**
|
|
768
|
+
* Opaque base64url seller state, relayed unchanged.
|
|
769
|
+
*/
|
|
770
|
+
readonly opaque: v.OptionalSchema<v.StringSchema<undefined>, undefined>;
|
|
771
|
+
}, undefined>;
|
|
772
|
+
/**
|
|
773
|
+
* Optional resource binding for low-level callers.
|
|
774
|
+
*/
|
|
775
|
+
readonly resource: v.OptionalSchema<v.ObjectSchema<{
|
|
776
|
+
/**
|
|
777
|
+
* Absolute URL of the paid resource.
|
|
778
|
+
*/
|
|
779
|
+
readonly url: v.StringSchema<undefined>;
|
|
780
|
+
/**
|
|
781
|
+
* Optional human-readable seller or service name.
|
|
782
|
+
*/
|
|
783
|
+
readonly serviceName: v.OptionalSchema<v.StringSchema<undefined>, undefined>;
|
|
784
|
+
}, undefined>, undefined>;
|
|
785
|
+
}, undefined>;
|
|
786
|
+
/**
|
|
787
|
+
* Low-level Catena intent action for an MPP charge.
|
|
788
|
+
*/
|
|
789
|
+
type MppAction = v.InferOutput<typeof mppActionSchema>;
|
|
790
|
+
declare const POLICY_OVERRIDE_CAPABILITIES: readonly ["send", "transfer"];
|
|
791
|
+
declare const intentActionSchema: v.UnionSchema<[v.VariantSchema<"method", [v.ObjectSchema<{
|
|
792
|
+
readonly type: v.LiteralSchema<"send", undefined>;
|
|
793
|
+
/**
|
|
794
|
+
* Omit when the current policy allows sends from exactly one account.
|
|
795
|
+
* Zero or multiple send accounts require a policy change or an explicit id.
|
|
796
|
+
*/
|
|
797
|
+
readonly accountId: v.OptionalSchema<v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.MinLengthAction<string, 1, undefined>]>, undefined>;
|
|
798
|
+
/**
|
|
799
|
+
* Id of one entry in a counterparty's `rails` array (from
|
|
800
|
+
* `listCounterparties`) — not the counterparty id itself.
|
|
801
|
+
*/
|
|
802
|
+
readonly counterpartyRailId: v.StringSchema<undefined>;
|
|
803
|
+
/**
|
|
804
|
+
* Decimal USD string: "12.50" is $12.50. Never cents or atomic units.
|
|
805
|
+
*/
|
|
806
|
+
readonly amount: v.StringSchema<undefined>;
|
|
807
|
+
/**
|
|
808
|
+
* Internal note stored in Catena.
|
|
809
|
+
*/
|
|
810
|
+
readonly description: v.OptionalSchema<v.StringSchema<undefined>, undefined>;
|
|
811
|
+
readonly method: v.LiteralSchema<"ach", undefined>;
|
|
812
|
+
/**
|
|
813
|
+
* Reference sent with the ACH payment.
|
|
814
|
+
*/
|
|
815
|
+
readonly memo: v.OptionalSchema<v.StringSchema<undefined>, undefined>;
|
|
816
|
+
}, undefined>, v.ObjectSchema<{
|
|
817
|
+
readonly type: v.LiteralSchema<"send", undefined>;
|
|
818
|
+
/**
|
|
819
|
+
* Omit when the current policy allows sends from exactly one account.
|
|
820
|
+
* Zero or multiple send accounts require a policy change or an explicit id.
|
|
821
|
+
*/
|
|
822
|
+
readonly accountId: v.OptionalSchema<v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.MinLengthAction<string, 1, undefined>]>, undefined>;
|
|
823
|
+
/**
|
|
824
|
+
* Id of one entry in a counterparty's `rails` array (from
|
|
825
|
+
* `listCounterparties`) — not the counterparty id itself.
|
|
826
|
+
*/
|
|
827
|
+
readonly counterpartyRailId: v.StringSchema<undefined>;
|
|
828
|
+
/**
|
|
829
|
+
* Decimal USD string: "12.50" is $12.50. Never cents or atomic units.
|
|
830
|
+
*/
|
|
831
|
+
readonly amount: v.StringSchema<undefined>;
|
|
832
|
+
/**
|
|
833
|
+
* Internal note stored in Catena.
|
|
834
|
+
*/
|
|
835
|
+
readonly description: v.OptionalSchema<v.StringSchema<undefined>, undefined>;
|
|
836
|
+
readonly method: v.LiteralSchema<"wire", undefined>;
|
|
837
|
+
/**
|
|
838
|
+
* Reference sent with the wire payment.
|
|
839
|
+
*/
|
|
840
|
+
readonly memo: v.OptionalSchema<v.StringSchema<undefined>, undefined>;
|
|
841
|
+
}, undefined>, v.ObjectSchema<{
|
|
842
|
+
readonly type: v.LiteralSchema<"send", undefined>;
|
|
843
|
+
/**
|
|
844
|
+
* Omit when the current policy allows sends from exactly one account.
|
|
845
|
+
* Zero or multiple send accounts require a policy change or an explicit id.
|
|
846
|
+
*/
|
|
847
|
+
readonly accountId: v.OptionalSchema<v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.MinLengthAction<string, 1, undefined>]>, undefined>;
|
|
848
|
+
/**
|
|
849
|
+
* Id of one entry in a counterparty's `rails` array (from
|
|
850
|
+
* `listCounterparties`) — not the counterparty id itself.
|
|
851
|
+
*/
|
|
852
|
+
readonly counterpartyRailId: v.StringSchema<undefined>;
|
|
853
|
+
/**
|
|
854
|
+
* Decimal USD string: "12.50" is $12.50. Never cents or atomic units.
|
|
855
|
+
*/
|
|
856
|
+
readonly amount: v.StringSchema<undefined>;
|
|
857
|
+
/**
|
|
858
|
+
* Internal note stored in Catena.
|
|
859
|
+
*/
|
|
860
|
+
readonly description: v.OptionalSchema<v.StringSchema<undefined>, undefined>;
|
|
861
|
+
readonly method: v.LiteralSchema<"on-chain", undefined>;
|
|
862
|
+
/**
|
|
863
|
+
* @deprecated Not sent to the blockchain. Use `description` for an internal
|
|
864
|
+
* note.
|
|
865
|
+
*/
|
|
866
|
+
readonly memo: v.OptionalSchema<v.StringSchema<undefined>, undefined>;
|
|
867
|
+
}, undefined>], undefined>, v.ObjectSchema<{
|
|
868
|
+
readonly type: v.LiteralSchema<"transfer", undefined>;
|
|
869
|
+
readonly accountId: v.StringSchema<undefined>;
|
|
870
|
+
readonly toAccountId: v.StringSchema<undefined>;
|
|
871
|
+
/**
|
|
872
|
+
* Decimal USD string: "12.50" is $12.50. Never cents or atomic units.
|
|
873
|
+
*/
|
|
874
|
+
readonly amount: v.StringSchema<undefined>;
|
|
875
|
+
readonly memo: v.OptionalSchema<v.StringSchema<undefined>, undefined>;
|
|
876
|
+
readonly description: v.OptionalSchema<v.StringSchema<undefined>, undefined>;
|
|
877
|
+
}, undefined>, v.UnionSchema<[v.ObjectSchema<{
|
|
878
|
+
readonly type: v.LiteralSchema<"create_counterparty", undefined>;
|
|
879
|
+
readonly name: v.StringSchema<undefined>;
|
|
880
|
+
readonly email: v.OptionalSchema<v.StringSchema<undefined>, undefined>;
|
|
881
|
+
readonly rail: v.NonOptionalSchema<v.UnknownSchema, undefined>;
|
|
882
|
+
}, undefined>, v.ObjectSchema<{
|
|
883
|
+
readonly type: v.LiteralSchema<"create_counterparty", undefined>;
|
|
884
|
+
readonly name: v.StringSchema<undefined>;
|
|
885
|
+
/**
|
|
886
|
+
* Required when no rail is supplied. This records contact information only;
|
|
887
|
+
* creating the counterparty does not send an email.
|
|
888
|
+
*/
|
|
889
|
+
readonly email: v.StringSchema<undefined>;
|
|
890
|
+
}, undefined>], undefined>, v.ObjectSchema<{
|
|
891
|
+
readonly type: v.LiteralSchema<"request_counterparty_details", undefined>;
|
|
892
|
+
readonly counterpartyId: v.StringSchema<undefined>;
|
|
893
|
+
readonly methods: v.SchemaWithPipe<readonly [v.ObjectSchema<{
|
|
894
|
+
readonly bank: v.BooleanSchema<undefined>;
|
|
895
|
+
readonly wallet: v.BooleanSchema<undefined>;
|
|
896
|
+
}, undefined>, v.CheckAction<{
|
|
897
|
+
bank: boolean;
|
|
898
|
+
wallet: boolean;
|
|
899
|
+
}, "Select at least one payment method to request">]>;
|
|
900
|
+
}, undefined>, v.ObjectSchema<{
|
|
901
|
+
readonly type: v.LiteralSchema<"x402", undefined>;
|
|
902
|
+
readonly accountId: v.StringSchema<undefined>;
|
|
903
|
+
readonly paymentRequirements: v.LooseObjectSchema<{
|
|
904
|
+
readonly scheme: v.StringSchema<undefined>;
|
|
905
|
+
readonly network: v.StringSchema<undefined>;
|
|
906
|
+
readonly asset: v.StringSchema<undefined>;
|
|
907
|
+
readonly amount: v.StringSchema<undefined>;
|
|
908
|
+
readonly payTo: v.StringSchema<undefined>;
|
|
909
|
+
readonly maxTimeoutSeconds: v.NumberSchema<undefined>;
|
|
910
|
+
}, undefined>;
|
|
911
|
+
readonly resource: v.OptionalSchema<v.LooseObjectSchema<{
|
|
912
|
+
readonly url: v.StringSchema<undefined>;
|
|
913
|
+
/**
|
|
914
|
+
* Human-readable name of the paid service, when the challenge advertises
|
|
915
|
+
* one — a suggested name when creating the counterparty. Parsed leniently:
|
|
916
|
+
* a malformed value (non-string, or over-long) drops to undefined rather
|
|
917
|
+
* than failing the whole challenge parse, which would silently downgrade
|
|
918
|
+
* an otherwise-payable 402 to an unpaid passthrough.
|
|
919
|
+
*/
|
|
920
|
+
readonly serviceName: v.SchemaWithFallback<v.OptionalSchema<v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.MaxLengthAction<string, 255, undefined>]>, undefined>, undefined>;
|
|
921
|
+
}, undefined>, undefined>;
|
|
922
|
+
/**
|
|
923
|
+
* Optional caller-supplied authorization; the server mints its own when
|
|
924
|
+
* absent.
|
|
925
|
+
*/
|
|
926
|
+
readonly authorization: v.OptionalSchema<v.ObjectSchema<{
|
|
927
|
+
/**
|
|
928
|
+
* Wallet address the transfer draws from. Must be the paying account's
|
|
929
|
+
* wallet address; the server rejects any other value. A mixed-case
|
|
930
|
+
* spelling must carry a valid EIP-55 checksum; all-lowercase is accepted.
|
|
931
|
+
*/
|
|
932
|
+
readonly from: v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.RegexAction<string, "Expected a 20-byte hex address">]>;
|
|
933
|
+
/**
|
|
934
|
+
* Recipient address. Must equal the requirement's `payTo` (case may
|
|
935
|
+
* differ) and resolve to a saved counterparty wallet rail. A mixed-case
|
|
936
|
+
* spelling must carry a valid EIP-55 checksum; all-lowercase is accepted.
|
|
937
|
+
*/
|
|
938
|
+
readonly to: v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.RegexAction<string, "Expected a 20-byte hex address">]>;
|
|
939
|
+
/**
|
|
940
|
+
* Amount in atomic token units as a canonical decimal string (no leading
|
|
941
|
+
* zeros). Must equal the requirement's `amount`.
|
|
942
|
+
*/
|
|
943
|
+
readonly value: v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.MaxLengthAction<string, 78, undefined>, v.RegexAction<string, "Expected a canonical decimal integer string">]>;
|
|
944
|
+
/**
|
|
945
|
+
* Unix seconds the authorization becomes valid, as a canonical decimal
|
|
946
|
+
* string. Must not be in the future.
|
|
947
|
+
*/
|
|
948
|
+
readonly validAfter: v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.MaxLengthAction<string, 78, undefined>, v.RegexAction<string, "Expected a canonical decimal integer string">]>;
|
|
949
|
+
/**
|
|
950
|
+
* Unix seconds the authorization expires, as a canonical decimal string.
|
|
951
|
+
* Bounded by the requirement's `maxTimeoutSeconds` and must leave time to
|
|
952
|
+
* settle.
|
|
953
|
+
*/
|
|
954
|
+
readonly validBefore: v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.MaxLengthAction<string, 78, undefined>, v.RegexAction<string, "Expected a canonical decimal integer string">]>;
|
|
955
|
+
/**
|
|
956
|
+
* 32-byte hex nonce (`0x` + 64 hex characters), unique per payment for
|
|
957
|
+
* the wallet. A nonce ever used by an earlier payment is refused; retry
|
|
958
|
+
* with a fresh one.
|
|
959
|
+
*/
|
|
960
|
+
readonly nonce: v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.RegexAction<string, "Expected a 32-byte hex nonce">]>;
|
|
961
|
+
}, undefined>, undefined>;
|
|
962
|
+
/**
|
|
963
|
+
* The seller's signed offer for this requirement (x402 Offer & Receipt
|
|
964
|
+
* extension), relayed verbatim; the server verifies it and stores it as
|
|
965
|
+
* payment evidence. The x402 fetch wrapper attaches it automatically when
|
|
966
|
+
* the 402 challenge carries one.
|
|
967
|
+
*/
|
|
968
|
+
readonly signedOffer: v.OptionalSchema<v.VariantSchema<"format", [v.LooseObjectSchema<{
|
|
969
|
+
readonly format: v.LiteralSchema<"eip712", undefined>;
|
|
970
|
+
readonly acceptIndex: v.OptionalSchema<v.SchemaWithPipe<readonly [v.NumberSchema<undefined>, v.IntegerAction<number, undefined>, v.MinValueAction<number, 0, undefined>]>, undefined>;
|
|
971
|
+
readonly payload: v.RecordSchema<v.StringSchema<undefined>, v.UnknownSchema, undefined>;
|
|
972
|
+
readonly signature: v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.RegexAction<string, "Expected a 65-byte hex signature">]>;
|
|
973
|
+
}, undefined>, v.LooseObjectSchema<{
|
|
974
|
+
readonly format: v.LiteralSchema<"jws", undefined>;
|
|
975
|
+
readonly acceptIndex: v.OptionalSchema<v.SchemaWithPipe<readonly [v.NumberSchema<undefined>, v.IntegerAction<number, undefined>, v.MinValueAction<number, 0, undefined>]>, undefined>;
|
|
976
|
+
readonly signature: v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.MaxLengthAction<string, number, undefined>, v.RegexAction<string, "Expected a JWS compact serialization">]>;
|
|
977
|
+
}, undefined>], undefined>, undefined>;
|
|
978
|
+
}, undefined>, v.ObjectSchema<{
|
|
979
|
+
/**
|
|
980
|
+
* MPP payment action discriminator.
|
|
981
|
+
*/
|
|
982
|
+
readonly type: v.LiteralSchema<"mpp", undefined>;
|
|
983
|
+
/**
|
|
984
|
+
* Catena account whose wallet authorizes the charge.
|
|
985
|
+
*/
|
|
986
|
+
readonly accountId: v.StringSchema<undefined>;
|
|
987
|
+
/**
|
|
988
|
+
* Serialized seller challenge to authorize.
|
|
989
|
+
*/
|
|
990
|
+
readonly challenge: v.ObjectSchema<{
|
|
991
|
+
/**
|
|
992
|
+
* Seller-issued challenge identifier.
|
|
993
|
+
*/
|
|
994
|
+
readonly id: v.StringSchema<undefined>;
|
|
995
|
+
/**
|
|
996
|
+
* Seller protection space that issued the challenge.
|
|
997
|
+
*/
|
|
998
|
+
readonly realm: v.StringSchema<undefined>;
|
|
999
|
+
/**
|
|
1000
|
+
* Supported MPP payment method.
|
|
1001
|
+
*/
|
|
1002
|
+
readonly method: v.PicklistSchema<["evm", "usdc"], undefined>;
|
|
1003
|
+
/**
|
|
1004
|
+
* Catena supports MPP charge intents only.
|
|
1005
|
+
*/
|
|
1006
|
+
readonly intent: v.LiteralSchema<"charge", undefined>;
|
|
1007
|
+
/**
|
|
1008
|
+
* Base64url-encoded, canonical MPP payment request.
|
|
1009
|
+
*/
|
|
1010
|
+
readonly request: v.StringSchema<undefined>;
|
|
1011
|
+
/**
|
|
1012
|
+
* Optional seller description of the charge.
|
|
1013
|
+
*/
|
|
1014
|
+
readonly description: v.OptionalSchema<v.StringSchema<undefined>, undefined>;
|
|
1015
|
+
/**
|
|
1016
|
+
* Optional seller-declared request-body digest, relayed unchanged.
|
|
1017
|
+
*/
|
|
1018
|
+
readonly digest: v.OptionalSchema<v.StringSchema<undefined>, undefined>;
|
|
1019
|
+
/**
|
|
1020
|
+
* UTC challenge expiry timestamp.
|
|
1021
|
+
*/
|
|
1022
|
+
readonly expires: v.StringSchema<undefined>;
|
|
1023
|
+
/**
|
|
1024
|
+
* Alternate field for the credential when HTTP Authorization is occupied.
|
|
1025
|
+
*/
|
|
1026
|
+
readonly header: v.OptionalSchema<v.LiteralSchema<"Payment-Authorization", undefined>, undefined>;
|
|
1027
|
+
/**
|
|
1028
|
+
* Opaque base64url seller state, relayed unchanged.
|
|
1029
|
+
*/
|
|
1030
|
+
readonly opaque: v.OptionalSchema<v.StringSchema<undefined>, undefined>;
|
|
1031
|
+
}, undefined>;
|
|
1032
|
+
/**
|
|
1033
|
+
* Optional resource binding for low-level callers.
|
|
1034
|
+
*/
|
|
1035
|
+
readonly resource: v.OptionalSchema<v.ObjectSchema<{
|
|
1036
|
+
/**
|
|
1037
|
+
* Absolute URL of the paid resource.
|
|
1038
|
+
*/
|
|
1039
|
+
readonly url: v.StringSchema<undefined>;
|
|
1040
|
+
/**
|
|
1041
|
+
* Optional human-readable seller or service name.
|
|
1042
|
+
*/
|
|
1043
|
+
readonly serviceName: v.OptionalSchema<v.StringSchema<undefined>, undefined>;
|
|
1044
|
+
}, undefined>, undefined>;
|
|
1045
|
+
}, undefined>, v.ObjectSchema<{
|
|
1046
|
+
readonly type: v.LiteralSchema<"policy_override", undefined>;
|
|
1047
|
+
readonly operations: v.SchemaWithPipe<readonly [v.ArraySchema<v.UnionSchema<[v.StrictObjectSchema<{
|
|
1048
|
+
readonly type: v.LiteralSchema<"increase_limit", undefined>;
|
|
1049
|
+
readonly accountId: v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.MinLengthAction<string, 1, undefined>]>;
|
|
1050
|
+
readonly capability: v.PicklistSchema<readonly ["send", "transfer"], undefined>;
|
|
1051
|
+
readonly limitType: v.PicklistSchema<["per_transaction_amount", "daily_amount", "weekly_amount", "monthly_amount"], undefined>;
|
|
1052
|
+
readonly newLimit: v.StrictObjectSchema<{
|
|
1053
|
+
readonly amount: v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.RegexAction<string, undefined>, v.CheckAction<string, "The amount must be greater than zero">]>;
|
|
1054
|
+
readonly assetId: v.LiteralSchema<"USD", undefined>;
|
|
1055
|
+
}, undefined>;
|
|
1056
|
+
}, undefined>, v.StrictObjectSchema<{
|
|
1057
|
+
readonly type: v.LiteralSchema<"increase_limit", undefined>;
|
|
1058
|
+
readonly accountId: v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.MinLengthAction<string, 1, undefined>]>;
|
|
1059
|
+
readonly capability: v.PicklistSchema<readonly ["send", "transfer"], undefined>;
|
|
1060
|
+
readonly limitType: v.PicklistSchema<["hourly_count", "daily_count"], undefined>;
|
|
1061
|
+
readonly newLimit: v.StrictObjectSchema<{
|
|
1062
|
+
readonly count: v.SchemaWithPipe<readonly [v.NumberSchema<undefined>, v.IntegerAction<number, undefined>, v.MinValueAction<number, 1, undefined>]>;
|
|
1063
|
+
}, undefined>;
|
|
1064
|
+
}, undefined>], undefined>, undefined>, v.MinLengthAction<({
|
|
1065
|
+
type: "increase_limit";
|
|
1066
|
+
accountId: string;
|
|
1067
|
+
capability: "send" | "transfer";
|
|
1068
|
+
limitType: "daily_amount" | "monthly_amount" | "per_transaction_amount" | "weekly_amount";
|
|
1069
|
+
newLimit: {
|
|
1070
|
+
amount: string;
|
|
1071
|
+
assetId: "USD";
|
|
1072
|
+
};
|
|
1073
|
+
} | {
|
|
1074
|
+
type: "increase_limit";
|
|
1075
|
+
accountId: string;
|
|
1076
|
+
capability: "send" | "transfer";
|
|
1077
|
+
limitType: "daily_count" | "hourly_count";
|
|
1078
|
+
newLimit: {
|
|
1079
|
+
count: number;
|
|
1080
|
+
};
|
|
1081
|
+
})[], 1, undefined>, v.MaxLengthAction<({
|
|
1082
|
+
type: "increase_limit";
|
|
1083
|
+
accountId: string;
|
|
1084
|
+
capability: "send" | "transfer";
|
|
1085
|
+
limitType: "daily_amount" | "monthly_amount" | "per_transaction_amount" | "weekly_amount";
|
|
1086
|
+
newLimit: {
|
|
1087
|
+
amount: string;
|
|
1088
|
+
assetId: "USD";
|
|
1089
|
+
};
|
|
1090
|
+
} | {
|
|
1091
|
+
type: "increase_limit";
|
|
1092
|
+
accountId: string;
|
|
1093
|
+
capability: "send" | "transfer";
|
|
1094
|
+
limitType: "daily_count" | "hourly_count";
|
|
1095
|
+
newLimit: {
|
|
1096
|
+
count: number;
|
|
1097
|
+
};
|
|
1098
|
+
})[], 10, undefined>, v.CheckAction<({
|
|
1099
|
+
type: "increase_limit";
|
|
1100
|
+
accountId: string;
|
|
1101
|
+
capability: "send" | "transfer";
|
|
1102
|
+
limitType: "daily_amount" | "monthly_amount" | "per_transaction_amount" | "weekly_amount";
|
|
1103
|
+
newLimit: {
|
|
1104
|
+
amount: string;
|
|
1105
|
+
assetId: "USD";
|
|
1106
|
+
};
|
|
1107
|
+
} | {
|
|
1108
|
+
type: "increase_limit";
|
|
1109
|
+
accountId: string;
|
|
1110
|
+
capability: "send" | "transfer";
|
|
1111
|
+
limitType: "daily_count" | "hourly_count";
|
|
1112
|
+
newLimit: {
|
|
1113
|
+
count: number;
|
|
1114
|
+
};
|
|
1115
|
+
})[], "Each account, capability, and limit type may appear only once">]>;
|
|
1116
|
+
/**
|
|
1117
|
+
* One minute to seven days; the clock starts at approval.
|
|
1118
|
+
*/
|
|
1119
|
+
readonly durationSeconds: v.SchemaWithPipe<readonly [v.NumberSchema<undefined>, v.IntegerAction<number, undefined>, v.MinValueAction<number, 60, undefined>, v.MaxValueAction<number, number, undefined>]>;
|
|
1120
|
+
readonly reason: v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.TrimAction, v.MinLengthAction<string, 1, undefined>, v.MaxLengthAction<string, 280, undefined>]>;
|
|
1121
|
+
}, undefined>], undefined>;
|
|
1122
|
+
type IntentAction = v.InferOutput<typeof intentActionSchema>;
|
|
1123
|
+
//#endregion
|
|
1124
|
+
//#region src/client.d.ts
|
|
1125
|
+
/**
|
|
1126
|
+
* Non-OK API response. `code` is the API's stable error code — branch on it,
|
|
1127
|
+
* not on message prose. The code is also embedded in the message so hosts
|
|
1128
|
+
* that only print `error.message` still surface it.
|
|
1129
|
+
* Field explanations are included in the message and preserved on `fields`.
|
|
1130
|
+
*/
|
|
1131
|
+
declare class ApiError extends Error {
|
|
1132
|
+
readonly status: number;
|
|
1133
|
+
readonly code: string | undefined;
|
|
1134
|
+
readonly details: Record<string, unknown> | undefined;
|
|
1135
|
+
/**
|
|
1136
|
+
* Validation explanations keyed by request field path, when present.
|
|
1137
|
+
* The `request` key represents a request-wide issue rather than a field;
|
|
1138
|
+
* its explanation appears in `message` without a field-path prefix.
|
|
1139
|
+
*/
|
|
1140
|
+
readonly fields: Record<string, string> | undefined;
|
|
1141
|
+
constructor(status: number, message: string, code?: string, details?: Record<string, unknown>, fields?: Record<string, string>);
|
|
1142
|
+
}
|
|
1143
|
+
/**
|
|
1144
|
+
* An HTTP exchange exceeded the client's configured deadline. The deadline
|
|
1145
|
+
* starts when the signed request is dispatched and remains active until the
|
|
1146
|
+
* response body has been fully consumed and validated. This means the SDK
|
|
1147
|
+
* stopped waiting, not that the server did no work.
|
|
1148
|
+
*/
|
|
1149
|
+
declare class TimeoutError extends Error {
|
|
1150
|
+
readonly timeoutMs: number;
|
|
1151
|
+
constructor(timeoutMs: number);
|
|
1152
|
+
}
|
|
1153
|
+
/**
|
|
1154
|
+
* A `submitIntent` failure after the intent was created. `outcome` is the
|
|
1155
|
+
* contract — callers branch on effect, never on which internal phase failed:
|
|
1156
|
+
*
|
|
1157
|
+
* - `"not-submitted"`: nothing happened server-side after create; no money moved.
|
|
1158
|
+
* Recovery is a new `submitIntent` invocation with a new idempotency key,
|
|
1159
|
+
* typically after fixing the signing credential. Omit `idempotencyKey` to
|
|
1160
|
+
* generate one, or supply a different value; do not reuse the original key.
|
|
1161
|
+
* Reusing it finds the stranded intent and can return a 409 rather than
|
|
1162
|
+
* restart signing. The stranded intent settles or expires server-side.
|
|
1163
|
+
* - `"unknown"`: the failure landed where the server may have already acted. Poll
|
|
1164
|
+
* `getIntent(intentId)` to a terminal status — completed means it succeeded;
|
|
1165
|
+
* submit again only after blocked or failed. A blind re-submit risks a double
|
|
1166
|
+
* effect.
|
|
1167
|
+
*
|
|
1168
|
+
* `cause` carries the raw underlying error for diagnostics, not contract.
|
|
1169
|
+
* Its summary is embedded in the message so hosts that print only
|
|
1170
|
+
* `error.message` keep the actionable detail — e.g. which key a signer
|
|
1171
|
+
* mismatch names.
|
|
1172
|
+
*/
|
|
1173
|
+
declare class IntentSubmitError extends Error {
|
|
1174
|
+
readonly intentId: string;
|
|
1175
|
+
readonly outcome: "not-submitted" | "unknown";
|
|
1176
|
+
constructor(params: {
|
|
1177
|
+
intentId: string;
|
|
1178
|
+
outcome: "not-submitted" | "unknown";
|
|
1179
|
+
cause: unknown;
|
|
1180
|
+
});
|
|
1181
|
+
}
|
|
1182
|
+
/**
|
|
1183
|
+
* Transport signature: the callable subset of the global `fetch`. Deliberately
|
|
1184
|
+
* structural rather than `typeof globalThis.fetch` — that alias resolves
|
|
1185
|
+
* against the consumer's platform types, where fetch may carry extra statics
|
|
1186
|
+
* (e.g. Bun's `fetch.preconnect`) that custom transports and the x402 wrapper
|
|
1187
|
+
* do not have. Exported so hosts can type a custom implementation and name
|
|
1188
|
+
* what `wrapFetchWithX402Payment` returns.
|
|
1189
|
+
*/
|
|
1190
|
+
type FetchLike = (input: string | URL | Request, init?: RequestInit) => Promise<Response>;
|
|
1191
|
+
interface CatenaClientOptions {
|
|
1192
|
+
/**
|
|
1193
|
+
* API origin, defaulting to the hosted Catena API. Override for local
|
|
1194
|
+
* development or a self-hosted deployment.
|
|
1195
|
+
*/
|
|
1196
|
+
baseUrl?: string;
|
|
1197
|
+
/**
|
|
1198
|
+
* P-256 private key of a linked agent credential, 64 hex characters (see
|
|
1199
|
+
* `@catena/sdk/keypair` to generate one). The public half is derived, so a
|
|
1200
|
+
* corrupt value throws here instead of failing with 401s at the bank. The
|
|
1201
|
+
* key signs every request (RFC 9421) and co-signs wallet sends during
|
|
1202
|
+
* `submitIntent`. When this option is `undefined`, the client reads
|
|
1203
|
+
* `CATENA_SECRET_KEY` from the process environment. An explicit value always
|
|
1204
|
+
* wins and is validated even when it is empty.
|
|
1205
|
+
*/
|
|
1206
|
+
privateKeyHex?: string;
|
|
1207
|
+
/**
|
|
1208
|
+
* Signature-Agent identity URL, defaulting to a URL derived from the
|
|
1209
|
+
* key's thumbprint. The default changes on key rotation; pass a stable
|
|
1210
|
+
* URL (an agent page, a self-hosted JWKS) when the identity must survive it.
|
|
1211
|
+
*/
|
|
1212
|
+
identityUrl?: string;
|
|
1213
|
+
/**
|
|
1214
|
+
* Caller identification prepended to the User-Agent. Telemetry only —
|
|
1215
|
+
* never carries authority.
|
|
1216
|
+
*/
|
|
1217
|
+
appInfo?: AppInfo;
|
|
1218
|
+
/**
|
|
1219
|
+
* Merged into every request; per-request headers win.
|
|
1220
|
+
*/
|
|
1221
|
+
defaultHeaders?: Record<string, string>;
|
|
1222
|
+
/**
|
|
1223
|
+
* Transport override, defaulting to the global `fetch`. Injected so hosts can
|
|
1224
|
+
* route requests through a proxy or instrumentation layer, and so tests can
|
|
1225
|
+
* pass a stub instead of patching `globalThis.fetch`.
|
|
1226
|
+
*/
|
|
1227
|
+
fetch?: FetchLike;
|
|
1228
|
+
/**
|
|
1229
|
+
* Deadline in milliseconds for each HTTP exchange, from dispatch through
|
|
1230
|
+
* complete response-body parsing. Defaults to 80,000ms. Multi-exchange
|
|
1231
|
+
* operations such as `submitIntent` receive a fresh deadline per exchange.
|
|
1232
|
+
* Must be a positive integer no greater than 2,147,483,647.
|
|
1233
|
+
*/
|
|
1234
|
+
timeout?: number;
|
|
1235
|
+
}
|
|
1236
|
+
declare class CatenaClient {
|
|
1237
|
+
#private;
|
|
1238
|
+
constructor(opts: CatenaClientOptions & {
|
|
1239
|
+
privateKeyHex: string;
|
|
1240
|
+
});
|
|
1241
|
+
whoami(): Promise<Agent>;
|
|
1242
|
+
/**
|
|
1243
|
+
* Send free-form feedback about this integration to the bank's operators —
|
|
1244
|
+
* an in-band channel for agents to report friction, confusing errors, or
|
|
1245
|
+
* missing capabilities. Stored for humans to read; never a protocol or
|
|
1246
|
+
* money effect.
|
|
1247
|
+
*/
|
|
1248
|
+
submitFeedback(body: string): Promise<void>;
|
|
1249
|
+
getPolicy(): Promise<Policy>;
|
|
1250
|
+
listAccounts(): Promise<AccountsResponse>;
|
|
1251
|
+
getAccountBalance(accountId: string): Promise<AccountBalanceResponse>;
|
|
1252
|
+
listAccountTransactions(accountId: string, params?: AccountTransactionsParams): Promise<AccountTransactionsResponse>;
|
|
1253
|
+
getAccountDepositAddress(accountId: string, params: AccountDepositAddressParams): Promise<AccountDepositAddressResponse>;
|
|
1254
|
+
listCounterparties(params?: CounterpartiesParams): Promise<CounterpartiesResponse>;
|
|
1255
|
+
/**
|
|
1256
|
+
* Submit an intent and run its full lifecycle: create, and when the server
|
|
1257
|
+
* requires a co-signature, stamp and submit it. Returns the final intent
|
|
1258
|
+
* view from the submit response itself — no follow-up `getIntent` needed.
|
|
1259
|
+
* The result is a disposition, not a guarantee of execution — the intent
|
|
1260
|
+
* may be completed, blocked, or parked pending approval; branch on `status`
|
|
1261
|
+
* and read `reasons`.
|
|
1262
|
+
*
|
|
1263
|
+
* Generates a fresh idempotency key for this invocation when none is
|
|
1264
|
+
* supplied. Pass an explicit `idempotencyKey` when separate invocations or
|
|
1265
|
+
* processes must identify the same logical operation. The server does not
|
|
1266
|
+
* infer operation identity from matching request payloads.
|
|
1267
|
+
*
|
|
1268
|
+
* Errors: create-phase failures propagate unwrapped — `ApiError` for
|
|
1269
|
+
* non-OK responses (callers depend on its `code`), `TimeoutError` when the
|
|
1270
|
+
* exchange deadline expires, and raw transport/signing errors otherwise.
|
|
1271
|
+
* Once the intent exists, failures surface as `IntentSubmitError` — see its
|
|
1272
|
+
* outcome contract.
|
|
1273
|
+
*/
|
|
1274
|
+
submitIntent(params: {
|
|
1275
|
+
action: IntentAction;
|
|
1276
|
+
idempotencyKey?: string;
|
|
1277
|
+
}): Promise<IntentResult>;
|
|
1278
|
+
getIntent(id: string): Promise<IntentResult>;
|
|
1279
|
+
/**
|
|
1280
|
+
* Finish a send that crossed chains, once `crossChain.nextStep` reads
|
|
1281
|
+
* "continue": prepares and signs the send to the counterparty on the
|
|
1282
|
+
* destination network. Gas is paid by Catena. A destination the provider does
|
|
1283
|
+
* not sponsor yet is refused with `wallet_send_action_not_yet_enabled`; the
|
|
1284
|
+
* intent stays at "continue" and the call can be made again later.
|
|
1285
|
+
*
|
|
1286
|
+
* A payment a person had to approve is NOT continued here. Once it is
|
|
1287
|
+
* approved an admin finishes it, and this call refuses it with
|
|
1288
|
+
* `movement_admin_completes_payment`; `movement.nextStep` stays "wait" and
|
|
1289
|
+
* resolves to "done" or "blocked" on its own. Resending the original request
|
|
1290
|
+
* does not finish it either — that hands back the payment's intent, or tells
|
|
1291
|
+
* you to read it, never a new signature.
|
|
1292
|
+
*
|
|
1293
|
+
* It continues the same intent, so no second intent, spend or approval is
|
|
1294
|
+
* involved, and the result is the intent view after the signature, the same
|
|
1295
|
+
* shape `getIntent(...)` serves.
|
|
1296
|
+
*
|
|
1297
|
+
* `action` is the one you originally submitted. It is compared only against
|
|
1298
|
+
* a movement stamp, and a continuation now only finishes a send that crossed
|
|
1299
|
+
* chains, which carries none, so today it is accepted and not checked.
|
|
1300
|
+
*
|
|
1301
|
+
* Errors: failures in the continue exchange propagate unwrapped — `ApiError`
|
|
1302
|
+
* for non-OK responses (the refusals above among them), `TimeoutError` when
|
|
1303
|
+
* the exchange deadline expires, and raw transport, signing and
|
|
1304
|
+
* response-parsing errors otherwise. Once the continuation is prepared,
|
|
1305
|
+
* failures while stamping or signing it surface as `IntentSubmitError` with
|
|
1306
|
+
* outcome `"not-submitted"`; from the first dispatched byte they surface
|
|
1307
|
+
* with outcome `"unknown"`, and `getIntent(...)` is the reconciliation
|
|
1308
|
+
* handle.
|
|
1309
|
+
*/
|
|
1310
|
+
continueIntent(params: {
|
|
1311
|
+
intentId: string;
|
|
1312
|
+
idempotencyKey?: string;
|
|
1313
|
+
action?: IntentAction;
|
|
1314
|
+
}): Promise<IntentResult>;
|
|
1315
|
+
/**
|
|
1316
|
+
* Permanently sever this agent link: the server revokes the link's active
|
|
1317
|
+
* auth keys, so every request signed with this credential fails from then
|
|
1318
|
+
* on. Irreversible — recovery is a new linking ceremony in the host app.
|
|
1319
|
+
*/
|
|
1320
|
+
unlinkAgent(): Promise<void>;
|
|
1321
|
+
/**
|
|
1322
|
+
* Report an on-chain settlement transaction for a completed protocol
|
|
1323
|
+
* payment. This is an untrusted hint the server stores for ops/debugging and
|
|
1324
|
+
* to narrow the chain verifier's log range; it is never a money effect. The
|
|
1325
|
+
* managed x402 and MPP fetch wrappers call this automatically when their
|
|
1326
|
+
* paid response carries a valid EVM transaction reference.
|
|
1327
|
+
*/
|
|
1328
|
+
reportSettlement(params: {
|
|
1329
|
+
intentId: string;
|
|
1330
|
+
txHash: string;
|
|
1331
|
+
/**
|
|
1332
|
+
* The seller's signed receipt from the paid retry's `PAYMENT-RESPONSE`
|
|
1333
|
+
* extensions (x402 Offer & Receipt extension), relayed verbatim; the
|
|
1334
|
+
* server verifies it and stores it as payment evidence. The x402 fetch
|
|
1335
|
+
* wrapper attaches it automatically when the seller sends one.
|
|
1336
|
+
*/
|
|
1337
|
+
receipt?: X402SignedReceipt;
|
|
1338
|
+
}): Promise<void>;
|
|
1339
|
+
}
|
|
1340
|
+
/**
|
|
1341
|
+
* Create a client for the Catena agent API from a linked agent's P-256 private
|
|
1342
|
+
* key (see `@catena/sdk/keypair` to generate one). Pass `privateKeyHex`
|
|
1343
|
+
* explicitly or omit it to read `CATENA_SECRET_KEY` from the process
|
|
1344
|
+
* environment; an explicit value always wins. This factory is the only way to
|
|
1345
|
+
* construct a client; `CatenaClient` is exported as a type only. Throws
|
|
1346
|
+
* {@link InvalidKeyError} immediately when neither credential source is
|
|
1347
|
+
* configured or the resolved key is malformed; throws `TypeError` when
|
|
1348
|
+
* `timeout` is not an integer between 1 and 2,147,483,647 milliseconds. Network
|
|
1349
|
+
* traffic starts with the first method call.
|
|
1350
|
+
*/
|
|
1351
|
+
declare function createCatenaClient(options?: CatenaClientOptions): CatenaClient;
|
|
1352
|
+
//#endregion
|
|
1353
|
+
export { X402SignedOffer as $, ExtensibleString as A, OnchainNetworkInput as B, COUNTERPARTY_RULE_MODES as C, CounterpartiesResponse as D, CounterpartiesParams as E, Movement as F, Policy as G, POLICY_OVERRIDE_CAPABILITIES as H, MppAction as I, WalletCounterpartyRail as J, SEND_METHODS as K, MppChallenge as L, IntentAction as M, IntentResult as N, Counterparty as O, MOVEMENT_NEXT_STEPS as P, AppInfo as Q, MppResource as R, COUNTERPARTY_ACTIONS as S, CROSS_CHAIN_STATES as T, POLICY_RULE_ACTIONS as U, POLICY_CAPABILITIES as V, POLICY_RULE_TYPES as W, X402PaymentRequirements as X, X402Authorization as Y, X402Resource as Z, AccountDepositAddressResponse as _, IntentSubmitError as a, AccountsResponse as b, ACCOUNT_AGGREGATION_SCOPES as c, ACCOUNT_TRANSACTION_MOVEMENT_STATUSES as d, X402SignedReceipt as et, ACCOUNT_TRANSACTION_STATUSES as f, AccountDepositAddressParams as g, AccountBalanceResponse as h, FetchLike as i, INTENT_ACTION_TYPES as j, CrossChainSend as k, ACCOUNT_DEPOSIT_ADDRESS_SOURCES as l, ACTOR_AGGREGATION_SCOPES as m, CatenaClient as n, TimeoutError as o, ACCOUNT_TRANSACTION_TYPES as p, SendMethod as q, CatenaClientOptions as r, createCatenaClient as s, ApiError as t, ACCOUNT_TRANSACTION_METHODS as u, AccountTransactionsParams as v, CROSS_CHAIN_NEXT_STEPS as w, Agent as x, AccountTransactionsResponse as y, OnchainAssetInput as z };
|