@ampersend_ai/ampersend-sdk 0.0.25 → 0.0.27
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/dist/ampersend/agent.d.ts +65 -66
- package/dist/ampersend/agent.d.ts.map +1 -1
- package/dist/ampersend/agent.js +32 -22
- package/dist/ampersend/agent.js.map +1 -1
- package/dist/ampersend/approval.js.map +1 -1
- package/dist/ampersend/client.d.ts +2 -2
- package/dist/ampersend/client.d.ts.map +1 -1
- package/dist/ampersend/client.js.map +1 -1
- package/dist/ampersend/curated-agent.d.ts +94 -94
- package/dist/ampersend/curated-agent.d.ts.map +1 -1
- package/dist/ampersend/curated-agent.js +41 -41
- package/dist/ampersend/curated-agent.js.map +1 -1
- package/dist/ampersend/management.d.ts +23 -59
- package/dist/ampersend/management.d.ts.map +1 -1
- package/dist/ampersend/management.js +6 -8
- package/dist/ampersend/management.js.map +1 -1
- package/dist/ampersend/types.d.ts +194 -318
- package/dist/ampersend/types.d.ts.map +1 -1
- package/dist/ampersend/types.js +134 -123
- package/dist/ampersend/types.js.map +1 -1
- package/dist/ampersend/zod-bridge.d.ts +4 -5
- package/dist/ampersend/zod-bridge.d.ts.map +1 -1
- package/dist/ampersend/zod-bridge.js +35 -19
- package/dist/ampersend/zod-bridge.js.map +1 -1
- package/dist/cli/commands/agent.d.ts +3 -1
- package/dist/cli/commands/agent.d.ts.map +1 -1
- package/dist/cli/commands/agent.js +44 -22
- package/dist/cli/commands/agent.js.map +1 -1
- package/dist/cli/commands/card.d.ts +19 -16
- package/dist/cli/commands/card.d.ts.map +1 -1
- package/dist/cli/commands/card.js +21 -16
- package/dist/cli/commands/card.js.map +1 -1
- package/dist/cli/commands/config.d.ts +1 -1
- package/dist/cli/commands/config.d.ts.map +1 -1
- package/dist/cli/commands/config.js +31 -42
- package/dist/cli/commands/config.js.map +1 -1
- package/dist/cli/commands/fetch.d.ts +1 -0
- package/dist/cli/commands/fetch.d.ts.map +1 -1
- package/dist/cli/commands/fetch.js +3 -2
- package/dist/cli/commands/fetch.js.map +1 -1
- package/dist/cli/commands/marketplace.d.ts +5 -2
- package/dist/cli/commands/marketplace.d.ts.map +1 -1
- package/dist/cli/commands/marketplace.js +12 -12
- package/dist/cli/commands/marketplace.js.map +1 -1
- package/dist/cli/commands/setup.d.ts +4 -1
- package/dist/cli/commands/setup.d.ts.map +1 -1
- package/dist/cli/commands/setup.js +66 -41
- package/dist/cli/commands/setup.js.map +1 -1
- package/dist/cli/config.d.ts +190 -68
- package/dist/cli/config.d.ts.map +1 -1
- package/dist/cli/config.js +357 -150
- package/dist/cli/config.js.map +1 -1
- package/dist/version.d.ts +1 -1
- package/dist/version.js +1 -1
- package/package.json +2 -2
|
@@ -1,145 +1,76 @@
|
|
|
1
1
|
import { Schema } from "effect";
|
|
2
|
-
export declare const
|
|
2
|
+
export declare const NonEmptyTrimmedString: Schema.NonEmptyString;
|
|
3
|
+
export type NonEmptyTrimmedString = typeof NonEmptyTrimmedString.Type;
|
|
4
|
+
export declare const NonNegativeInt: Schema.Int;
|
|
5
|
+
export type NonNegativeInt = typeof NonNegativeInt.Type;
|
|
6
|
+
export declare const Scheme: Schema.Literals<readonly ["exact", "deferred"]>;
|
|
3
7
|
export type Scheme = typeof Scheme.Type;
|
|
4
|
-
export declare const Address: Schema.
|
|
8
|
+
export declare const Address: Schema.NonEmptyString;
|
|
5
9
|
export type Address = typeof Address.Type;
|
|
6
|
-
export declare const TxHash: Schema.
|
|
10
|
+
export declare const TxHash: Schema.NonEmptyString;
|
|
7
11
|
export type TxHash = typeof TxHash.Type;
|
|
8
|
-
export declare const Caip2ID: Schema.
|
|
12
|
+
export declare const Caip2ID: Schema.NonEmptyString;
|
|
9
13
|
export type Caip2ID = typeof Caip2ID.Type;
|
|
10
|
-
export declare const Hex32Bytes: Schema.
|
|
14
|
+
export declare const Hex32Bytes: Schema.NonEmptyString;
|
|
11
15
|
export type Hex32Bytes = typeof Hex32Bytes.Type;
|
|
12
|
-
export declare const Hex65Bytes: Schema.
|
|
16
|
+
export declare const Hex65Bytes: Schema.NonEmptyString;
|
|
13
17
|
export type Hex65Bytes = typeof Hex65Bytes.Type;
|
|
14
|
-
export declare const NonNegativeIntegerString: Schema.
|
|
18
|
+
export declare const NonNegativeIntegerString: Schema.NonEmptyString;
|
|
15
19
|
export type NonNegativeIntegerString = typeof NonNegativeIntegerString.Type;
|
|
16
|
-
export declare const ID: Schema.brand<
|
|
20
|
+
export declare const ID: Schema.brand<Schema.String, "ID">;
|
|
17
21
|
export type ID = typeof ID.Type;
|
|
18
|
-
export declare const ConvertedTimestamp: Schema.Union<[Schema.
|
|
22
|
+
export declare const ConvertedTimestamp: Schema.Union<readonly [Schema.Int, Schema.compose<Schema.Int, Schema.NumberFromString>]>;
|
|
19
23
|
export type ConvertedTimestamp = typeof ConvertedTimestamp.Type;
|
|
20
|
-
declare const
|
|
21
|
-
nonce: Schema.
|
|
22
|
-
sessionId: Schema.
|
|
23
|
-
}
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
readonly
|
|
28
|
-
|
|
29
|
-
readonly
|
|
30
|
-
}
|
|
31
|
-
export
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
readonly
|
|
45
|
-
|
|
46
|
-
readonly
|
|
47
|
-
|
|
48
|
-
readonly
|
|
49
|
-
}
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
readonly agentAddress: string;
|
|
64
|
-
} & {
|
|
65
|
-
readonly token: string;
|
|
66
|
-
} & {
|
|
67
|
-
readonly expiresAt: import("effect/DateTime").Utc;
|
|
68
|
-
}, {}, {}>;
|
|
69
|
-
export declare class SIWELoginResponse extends SIWELoginResponse_base {
|
|
70
|
-
}
|
|
71
|
-
declare const SignSiwxResponse_base: Schema.Class<SignSiwxResponse, {
|
|
72
|
-
serverSignature: Schema.refine<string, typeof Schema.NonEmptyTrimmedString>;
|
|
73
|
-
}, Schema.Struct.Encoded<{
|
|
74
|
-
serverSignature: Schema.refine<string, typeof Schema.NonEmptyTrimmedString>;
|
|
75
|
-
}>, never, {
|
|
76
|
-
readonly serverSignature: string;
|
|
77
|
-
}, {}, {}>;
|
|
78
|
-
export declare class SignSiwxResponse extends SignSiwxResponse_base {
|
|
79
|
-
}
|
|
80
|
-
declare const ERC3009AuthorizationData_base: Schema.Class<ERC3009AuthorizationData, {
|
|
81
|
-
from: Schema.refine<string, typeof Schema.NonEmptyTrimmedString>;
|
|
82
|
-
to: Schema.refine<string, typeof Schema.NonEmptyTrimmedString>;
|
|
83
|
-
value: Schema.refine<string, typeof Schema.NonEmptyTrimmedString>;
|
|
84
|
-
validAfter: Schema.refine<string, typeof Schema.NonEmptyTrimmedString>;
|
|
85
|
-
validBefore: Schema.refine<string, typeof Schema.NonEmptyTrimmedString>;
|
|
86
|
-
nonce: Schema.refine<string, typeof Schema.NonEmptyTrimmedString>;
|
|
87
|
-
}, Schema.Struct.Encoded<{
|
|
88
|
-
from: Schema.refine<string, typeof Schema.NonEmptyTrimmedString>;
|
|
89
|
-
to: Schema.refine<string, typeof Schema.NonEmptyTrimmedString>;
|
|
90
|
-
value: Schema.refine<string, typeof Schema.NonEmptyTrimmedString>;
|
|
91
|
-
validAfter: Schema.refine<string, typeof Schema.NonEmptyTrimmedString>;
|
|
92
|
-
validBefore: Schema.refine<string, typeof Schema.NonEmptyTrimmedString>;
|
|
93
|
-
nonce: Schema.refine<string, typeof Schema.NonEmptyTrimmedString>;
|
|
94
|
-
}>, never, {
|
|
95
|
-
readonly nonce: string;
|
|
96
|
-
} & {
|
|
97
|
-
readonly from: string;
|
|
98
|
-
} & {
|
|
99
|
-
readonly to: string;
|
|
100
|
-
} & {
|
|
101
|
-
readonly value: string;
|
|
102
|
-
} & {
|
|
103
|
-
readonly validAfter: string;
|
|
104
|
-
} & {
|
|
105
|
-
readonly validBefore: string;
|
|
106
|
-
}, {}, {}>;
|
|
107
|
-
export declare class ERC3009AuthorizationData extends ERC3009AuthorizationData_base {
|
|
108
|
-
}
|
|
109
|
-
declare const ServerAuthorizationData_base: Schema.Class<ServerAuthorizationData, {
|
|
110
|
-
authorizationData: Schema.SchemaClass<ERC3009AuthorizationData, {
|
|
111
|
-
readonly nonce: string;
|
|
112
|
-
readonly from: string;
|
|
113
|
-
readonly to: string;
|
|
114
|
-
readonly value: string;
|
|
115
|
-
readonly validAfter: string;
|
|
116
|
-
readonly validBefore: string;
|
|
117
|
-
}, never>;
|
|
118
|
-
serverSignature: Schema.refine<string, typeof Schema.NonEmptyTrimmedString>;
|
|
119
|
-
}, Schema.Struct.Encoded<{
|
|
120
|
-
authorizationData: Schema.SchemaClass<ERC3009AuthorizationData, {
|
|
121
|
-
readonly nonce: string;
|
|
122
|
-
readonly from: string;
|
|
123
|
-
readonly to: string;
|
|
124
|
-
readonly value: string;
|
|
125
|
-
readonly validAfter: string;
|
|
126
|
-
readonly validBefore: string;
|
|
127
|
-
}, never>;
|
|
128
|
-
serverSignature: Schema.refine<string, typeof Schema.NonEmptyTrimmedString>;
|
|
129
|
-
}>, never, {
|
|
130
|
-
readonly serverSignature: string;
|
|
131
|
-
} & {
|
|
132
|
-
readonly authorizationData: ERC3009AuthorizationData;
|
|
133
|
-
}, {}, {}>;
|
|
134
|
-
export declare class ServerAuthorizationData extends ServerAuthorizationData_base {
|
|
135
|
-
}
|
|
24
|
+
export declare const SIWENonceResponse: Schema.Struct<{
|
|
25
|
+
readonly nonce: Schema.NonEmptyString;
|
|
26
|
+
readonly sessionId: Schema.NonEmptyString;
|
|
27
|
+
}>;
|
|
28
|
+
export type SIWENonceResponse = typeof SIWENonceResponse.Type;
|
|
29
|
+
export declare const SIWELoginRequest: Schema.Struct<{
|
|
30
|
+
readonly signature: Schema.NonEmptyString;
|
|
31
|
+
readonly message: Schema.NonEmptyString;
|
|
32
|
+
readonly sessionId: Schema.NonEmptyString;
|
|
33
|
+
readonly agentAddress: Schema.NonEmptyString;
|
|
34
|
+
}>;
|
|
35
|
+
export type SIWELoginRequest = typeof SIWELoginRequest.Type;
|
|
36
|
+
export declare const SIWELoginResponse: Schema.Struct<{
|
|
37
|
+
readonly token: Schema.NonEmptyString;
|
|
38
|
+
readonly agentAddress: Schema.NonEmptyString;
|
|
39
|
+
readonly expiresAt: Schema.DateTimeUtcFromString;
|
|
40
|
+
}>;
|
|
41
|
+
export type SIWELoginResponse = typeof SIWELoginResponse.Type;
|
|
42
|
+
export declare const SignSiwxResponse: Schema.Struct<{
|
|
43
|
+
readonly serverSignature: Schema.NonEmptyString;
|
|
44
|
+
}>;
|
|
45
|
+
export type SignSiwxResponse = typeof SignSiwxResponse.Type;
|
|
46
|
+
export declare const ERC3009AuthorizationData: Schema.Struct<{
|
|
47
|
+
readonly from: Schema.NonEmptyString;
|
|
48
|
+
readonly to: Schema.NonEmptyString;
|
|
49
|
+
readonly value: Schema.NonEmptyString;
|
|
50
|
+
readonly validAfter: Schema.NonEmptyString;
|
|
51
|
+
readonly validBefore: Schema.NonEmptyString;
|
|
52
|
+
readonly nonce: Schema.NonEmptyString;
|
|
53
|
+
}>;
|
|
54
|
+
export type ERC3009AuthorizationData = typeof ERC3009AuthorizationData.Type;
|
|
55
|
+
export declare const ServerAuthorizationData: Schema.Struct<{
|
|
56
|
+
readonly authorizationData: Schema.Struct<{
|
|
57
|
+
readonly from: Schema.NonEmptyString;
|
|
58
|
+
readonly to: Schema.NonEmptyString;
|
|
59
|
+
readonly value: Schema.NonEmptyString;
|
|
60
|
+
readonly validAfter: Schema.NonEmptyString;
|
|
61
|
+
readonly validBefore: Schema.NonEmptyString;
|
|
62
|
+
readonly nonce: Schema.NonEmptyString;
|
|
63
|
+
}>;
|
|
64
|
+
readonly serverSignature: Schema.NonEmptyString;
|
|
65
|
+
}>;
|
|
66
|
+
export type ServerAuthorizationData = typeof ServerAuthorizationData.Type;
|
|
136
67
|
/** Dispatch tag on wire envelopes. Distinct from any individual protocol's internal version. */
|
|
137
|
-
export declare const Protocol: Schema.
|
|
68
|
+
export declare const Protocol: Schema.Literals<readonly ["x402-v1", "x402-v2"]>;
|
|
138
69
|
export type Protocol = typeof Protocol.Type;
|
|
139
70
|
/** Wire envelope for a {@link PaymentRequest}; `data` validated via `@x402/core/schemas` on decode. */
|
|
140
|
-
export declare const PaymentRequestEnvelope: Schema.Union<[Schema.Struct<{
|
|
141
|
-
protocol: Schema.Literal<
|
|
142
|
-
data: Schema.
|
|
71
|
+
export declare const PaymentRequestEnvelope: Schema.Union<readonly [Schema.Struct<{
|
|
72
|
+
readonly protocol: Schema.Literal<"x402-v1">;
|
|
73
|
+
readonly data: Schema.Codec<{
|
|
143
74
|
x402Version: 1;
|
|
144
75
|
accepts: {
|
|
145
76
|
description: string;
|
|
@@ -171,10 +102,10 @@ export declare const PaymentRequestEnvelope: Schema.Union<[Schema.Struct<{
|
|
|
171
102
|
extra?: Record<string, unknown> | null | undefined;
|
|
172
103
|
}[];
|
|
173
104
|
error?: string | undefined;
|
|
174
|
-
}, never>;
|
|
105
|
+
}, never, never>;
|
|
175
106
|
}>, Schema.Struct<{
|
|
176
|
-
protocol: Schema.Literal<
|
|
177
|
-
data: Schema.
|
|
107
|
+
readonly protocol: Schema.Literal<"x402-v2">;
|
|
108
|
+
readonly data: Schema.Codec<{
|
|
178
109
|
resource: {
|
|
179
110
|
url: string;
|
|
180
111
|
description?: string | undefined;
|
|
@@ -210,13 +141,13 @@ export declare const PaymentRequestEnvelope: Schema.Union<[Schema.Struct<{
|
|
|
210
141
|
}[];
|
|
211
142
|
error?: string | undefined;
|
|
212
143
|
extensions?: Record<string, unknown> | null | undefined;
|
|
213
|
-
}, never>;
|
|
144
|
+
}, never, never>;
|
|
214
145
|
}>]>;
|
|
215
146
|
export type PaymentRequestEnvelope = typeof PaymentRequestEnvelope.Type;
|
|
216
147
|
/** Wire envelope for a signed {@link PaymentAuthorization}. */
|
|
217
|
-
export declare const PaymentAuthorizationEnvelope: Schema.Union<[Schema.Struct<{
|
|
218
|
-
protocol: Schema.Literal<
|
|
219
|
-
data: Schema.
|
|
148
|
+
export declare const PaymentAuthorizationEnvelope: Schema.Union<readonly [Schema.Struct<{
|
|
149
|
+
readonly protocol: Schema.Literal<"x402-v1">;
|
|
150
|
+
readonly data: Schema.Codec<{
|
|
220
151
|
scheme: string;
|
|
221
152
|
network: string;
|
|
222
153
|
x402Version: 1;
|
|
@@ -226,10 +157,10 @@ export declare const PaymentAuthorizationEnvelope: Schema.Union<[Schema.Struct<{
|
|
|
226
157
|
network: string;
|
|
227
158
|
x402Version: 1;
|
|
228
159
|
payload: Record<string, unknown>;
|
|
229
|
-
}, never>;
|
|
160
|
+
}, never, never>;
|
|
230
161
|
}>, Schema.Struct<{
|
|
231
|
-
protocol: Schema.Literal<
|
|
232
|
-
data: Schema.
|
|
162
|
+
readonly protocol: Schema.Literal<"x402-v2">;
|
|
163
|
+
readonly data: Schema.Codec<{
|
|
233
164
|
x402Version: 2;
|
|
234
165
|
payload: Record<string, unknown>;
|
|
235
166
|
accepted: {
|
|
@@ -265,14 +196,14 @@ export declare const PaymentAuthorizationEnvelope: Schema.Union<[Schema.Struct<{
|
|
|
265
196
|
mimeType?: string | undefined;
|
|
266
197
|
} | undefined;
|
|
267
198
|
extensions?: Record<string, unknown> | null | undefined;
|
|
268
|
-
}, never>;
|
|
199
|
+
}, never, never>;
|
|
269
200
|
}>]>;
|
|
270
201
|
export type PaymentAuthorizationEnvelope = typeof PaymentAuthorizationEnvelope.Type;
|
|
271
202
|
/** Request body for `POST /api/v1/agents/:agent/payment/authorize`. */
|
|
272
203
|
export declare const AgentAuthorizeRequest: Schema.Struct<{
|
|
273
|
-
paymentRequest: Schema.Union<[Schema.Struct<{
|
|
274
|
-
protocol: Schema.Literal<
|
|
275
|
-
data: Schema.
|
|
204
|
+
readonly paymentRequest: Schema.Union<readonly [Schema.Struct<{
|
|
205
|
+
readonly protocol: Schema.Literal<"x402-v1">;
|
|
206
|
+
readonly data: Schema.Codec<{
|
|
276
207
|
x402Version: 1;
|
|
277
208
|
accepts: {
|
|
278
209
|
description: string;
|
|
@@ -304,10 +235,10 @@ export declare const AgentAuthorizeRequest: Schema.Struct<{
|
|
|
304
235
|
extra?: Record<string, unknown> | null | undefined;
|
|
305
236
|
}[];
|
|
306
237
|
error?: string | undefined;
|
|
307
|
-
}, never>;
|
|
238
|
+
}, never, never>;
|
|
308
239
|
}>, Schema.Struct<{
|
|
309
|
-
protocol: Schema.Literal<
|
|
310
|
-
data: Schema.
|
|
240
|
+
readonly protocol: Schema.Literal<"x402-v2">;
|
|
241
|
+
readonly data: Schema.Codec<{
|
|
311
242
|
resource: {
|
|
312
243
|
url: string;
|
|
313
244
|
description?: string | undefined;
|
|
@@ -343,46 +274,31 @@ export declare const AgentAuthorizeRequest: Schema.Struct<{
|
|
|
343
274
|
}[];
|
|
344
275
|
error?: string | undefined;
|
|
345
276
|
extensions?: Record<string, unknown> | null | undefined;
|
|
346
|
-
}, never>;
|
|
277
|
+
}, never, never>;
|
|
347
278
|
}>]>;
|
|
348
|
-
context: Schema.optional<Schema.Struct<{
|
|
349
|
-
method: Schema.optional<
|
|
350
|
-
serverUrl: Schema.optional<
|
|
351
|
-
params: Schema.optional<
|
|
279
|
+
readonly context: Schema.optional<Schema.Struct<{
|
|
280
|
+
readonly method: Schema.optional<Schema.NonEmptyString>;
|
|
281
|
+
readonly serverUrl: Schema.optional<Schema.NonEmptyString>;
|
|
282
|
+
readonly params: Schema.optional<Schema.Unknown>;
|
|
352
283
|
}>>;
|
|
353
284
|
}>;
|
|
354
285
|
export type AgentAuthorizeRequest = typeof AgentAuthorizeRequest.Type;
|
|
355
|
-
declare const CoSignature_base: Schema.Class<CoSignature, {
|
|
356
|
-
authorizationData: Schema.SchemaClass<ERC3009AuthorizationData, {
|
|
357
|
-
readonly nonce: string;
|
|
358
|
-
readonly from: string;
|
|
359
|
-
readonly to: string;
|
|
360
|
-
readonly value: string;
|
|
361
|
-
readonly validAfter: string;
|
|
362
|
-
readonly validBefore: string;
|
|
363
|
-
}, never>;
|
|
364
|
-
serverSignature: Schema.refine<string, typeof Schema.NonEmptyTrimmedString>;
|
|
365
|
-
}, Schema.Struct.Encoded<{
|
|
366
|
-
authorizationData: Schema.SchemaClass<ERC3009AuthorizationData, {
|
|
367
|
-
readonly nonce: string;
|
|
368
|
-
readonly from: string;
|
|
369
|
-
readonly to: string;
|
|
370
|
-
readonly value: string;
|
|
371
|
-
readonly validAfter: string;
|
|
372
|
-
readonly validBefore: string;
|
|
373
|
-
}, never>;
|
|
374
|
-
serverSignature: Schema.refine<string, typeof Schema.NonEmptyTrimmedString>;
|
|
375
|
-
}>, never, {
|
|
376
|
-
readonly serverSignature: string;
|
|
377
|
-
} & {
|
|
378
|
-
readonly authorizationData: ERC3009AuthorizationData;
|
|
379
|
-
}, {}, {}>;
|
|
380
286
|
/**
|
|
381
287
|
* ERC-3009 authorization data + server signature for co-signed agent keys;
|
|
382
288
|
* the agent signs alongside. Scheme-specific today (exact EVM).
|
|
383
289
|
*/
|
|
384
|
-
export declare
|
|
385
|
-
|
|
290
|
+
export declare const CoSignature: Schema.Struct<{
|
|
291
|
+
readonly authorizationData: Schema.Struct<{
|
|
292
|
+
readonly from: Schema.NonEmptyString;
|
|
293
|
+
readonly to: Schema.NonEmptyString;
|
|
294
|
+
readonly value: Schema.NonEmptyString;
|
|
295
|
+
readonly validAfter: Schema.NonEmptyString;
|
|
296
|
+
readonly validBefore: Schema.NonEmptyString;
|
|
297
|
+
readonly nonce: Schema.NonEmptyString;
|
|
298
|
+
}>;
|
|
299
|
+
readonly serverSignature: Schema.NonEmptyString;
|
|
300
|
+
}>;
|
|
301
|
+
export type CoSignature = typeof CoSignature.Type;
|
|
386
302
|
/**
|
|
387
303
|
* Response body for `POST /api/v1/agents/:agent/payment/authorize`. Returns
|
|
388
304
|
* *indices* into the request's `accepts[]` — the client has the original
|
|
@@ -406,53 +322,63 @@ export declare class CoSignature extends CoSignature_base {
|
|
|
406
322
|
* back to a default branch when an unknown code arrives.
|
|
407
323
|
*/
|
|
408
324
|
export declare const AgentAuthorizeResponse: Schema.Struct<{
|
|
409
|
-
authorized: Schema.Struct<{
|
|
410
|
-
selected: Schema.NullOr<Schema.Struct<{
|
|
411
|
-
acceptsIndex: Schema.
|
|
412
|
-
limits: Schema.Struct<{
|
|
413
|
-
dailyRemaining: Schema.
|
|
414
|
-
monthlyRemaining: Schema.
|
|
325
|
+
readonly authorized: Schema.Struct<{
|
|
326
|
+
readonly selected: Schema.NullOr<Schema.Struct<{
|
|
327
|
+
readonly acceptsIndex: Schema.Int;
|
|
328
|
+
readonly limits: Schema.Struct<{
|
|
329
|
+
readonly dailyRemaining: Schema.NonEmptyString;
|
|
330
|
+
readonly monthlyRemaining: Schema.NonEmptyString;
|
|
415
331
|
}>;
|
|
416
|
-
coSignature: Schema.optional<
|
|
332
|
+
readonly coSignature: Schema.optional<Schema.Struct<{
|
|
333
|
+
readonly authorizationData: Schema.Struct<{
|
|
334
|
+
readonly from: Schema.NonEmptyString;
|
|
335
|
+
readonly to: Schema.NonEmptyString;
|
|
336
|
+
readonly value: Schema.NonEmptyString;
|
|
337
|
+
readonly validAfter: Schema.NonEmptyString;
|
|
338
|
+
readonly validBefore: Schema.NonEmptyString;
|
|
339
|
+
readonly nonce: Schema.NonEmptyString;
|
|
340
|
+
}>;
|
|
341
|
+
readonly serverSignature: Schema.NonEmptyString;
|
|
342
|
+
}>>;
|
|
417
343
|
}>>;
|
|
418
|
-
alternatives: Schema
|
|
419
|
-
acceptsIndex: Schema.
|
|
420
|
-
limits: Schema.Struct<{
|
|
421
|
-
dailyRemaining: Schema.
|
|
422
|
-
monthlyRemaining: Schema.
|
|
344
|
+
readonly alternatives: Schema.$Array<Schema.Struct<{
|
|
345
|
+
readonly acceptsIndex: Schema.Int;
|
|
346
|
+
readonly limits: Schema.Struct<{
|
|
347
|
+
readonly dailyRemaining: Schema.NonEmptyString;
|
|
348
|
+
readonly monthlyRemaining: Schema.NonEmptyString;
|
|
423
349
|
}>;
|
|
424
350
|
}>>;
|
|
425
351
|
}>;
|
|
426
|
-
rejected: Schema
|
|
427
|
-
acceptsIndex: Schema.
|
|
428
|
-
reason:
|
|
429
|
-
reasonCode: Schema.optional<
|
|
352
|
+
readonly rejected: Schema.$Array<Schema.Struct<{
|
|
353
|
+
readonly acceptsIndex: Schema.Int;
|
|
354
|
+
readonly reason: Schema.NonEmptyString;
|
|
355
|
+
readonly reasonCode: Schema.optional<Schema.NonEmptyString>;
|
|
430
356
|
}>>;
|
|
431
|
-
suggested: Schema.optional<Schema.Struct<{
|
|
432
|
-
nonce: Schema.
|
|
433
|
-
validBefore: Schema.
|
|
357
|
+
readonly suggested: Schema.optional<Schema.Struct<{
|
|
358
|
+
readonly nonce: Schema.NonEmptyString;
|
|
359
|
+
readonly validBefore: Schema.NonEmptyString;
|
|
434
360
|
}>>;
|
|
435
361
|
}>;
|
|
436
362
|
export type AgentAuthorizeResponse = typeof AgentAuthorizeResponse.Type;
|
|
437
|
-
export declare const PaymentEventType: Schema.Union<[Schema.Struct<{
|
|
438
|
-
type: Schema.Literal<
|
|
363
|
+
export declare const PaymentEventType: Schema.Union<readonly [Schema.Struct<{
|
|
364
|
+
readonly type: Schema.Literal<"sending">;
|
|
439
365
|
}>, Schema.Struct<{
|
|
440
|
-
type: Schema.Literal<
|
|
366
|
+
readonly type: Schema.Literal<"accepted">;
|
|
441
367
|
}>, Schema.Struct<{
|
|
442
|
-
type: Schema.Literal<
|
|
443
|
-
reason: Schema.
|
|
368
|
+
readonly type: Schema.Literal<"rejected">;
|
|
369
|
+
readonly reason: Schema.NonEmptyString;
|
|
444
370
|
}>, Schema.Struct<{
|
|
445
|
-
type: Schema.Literal<
|
|
446
|
-
reason: Schema.
|
|
371
|
+
readonly type: Schema.Literal<"error">;
|
|
372
|
+
readonly reason: Schema.NonEmptyString;
|
|
447
373
|
}>]>;
|
|
448
374
|
export type PaymentEventType = typeof PaymentEventType.Type;
|
|
449
375
|
export type PaymentEvent = PaymentEventType;
|
|
450
376
|
/** Request body for `POST /api/v1/agents/:agent/payment/events`. */
|
|
451
377
|
export declare const AgentPaymentEventReport: Schema.Struct<{
|
|
452
|
-
id: Schema.
|
|
453
|
-
payment: Schema.Union<[Schema.Struct<{
|
|
454
|
-
protocol: Schema.Literal<
|
|
455
|
-
data: Schema.
|
|
378
|
+
readonly id: Schema.NonEmptyString;
|
|
379
|
+
readonly payment: Schema.Union<readonly [Schema.Struct<{
|
|
380
|
+
readonly protocol: Schema.Literal<"x402-v1">;
|
|
381
|
+
readonly data: Schema.Codec<{
|
|
456
382
|
scheme: string;
|
|
457
383
|
network: string;
|
|
458
384
|
x402Version: 1;
|
|
@@ -462,10 +388,10 @@ export declare const AgentPaymentEventReport: Schema.Struct<{
|
|
|
462
388
|
network: string;
|
|
463
389
|
x402Version: 1;
|
|
464
390
|
payload: Record<string, unknown>;
|
|
465
|
-
}, never>;
|
|
391
|
+
}, never, never>;
|
|
466
392
|
}>, Schema.Struct<{
|
|
467
|
-
protocol: Schema.Literal<
|
|
468
|
-
data: Schema.
|
|
393
|
+
readonly protocol: Schema.Literal<"x402-v2">;
|
|
394
|
+
readonly data: Schema.Codec<{
|
|
469
395
|
x402Version: 2;
|
|
470
396
|
payload: Record<string, unknown>;
|
|
471
397
|
accepted: {
|
|
@@ -501,34 +427,26 @@ export declare const AgentPaymentEventReport: Schema.Struct<{
|
|
|
501
427
|
mimeType?: string | undefined;
|
|
502
428
|
} | undefined;
|
|
503
429
|
extensions?: Record<string, unknown> | null | undefined;
|
|
504
|
-
}, never>;
|
|
430
|
+
}, never, never>;
|
|
505
431
|
}>]>;
|
|
506
|
-
event: Schema.Union<[Schema.Struct<{
|
|
507
|
-
type: Schema.Literal<
|
|
432
|
+
readonly event: Schema.Union<readonly [Schema.Struct<{
|
|
433
|
+
readonly type: Schema.Literal<"sending">;
|
|
508
434
|
}>, Schema.Struct<{
|
|
509
|
-
type: Schema.Literal<
|
|
435
|
+
readonly type: Schema.Literal<"accepted">;
|
|
510
436
|
}>, Schema.Struct<{
|
|
511
|
-
type: Schema.Literal<
|
|
512
|
-
reason: Schema.
|
|
437
|
+
readonly type: Schema.Literal<"rejected">;
|
|
438
|
+
readonly reason: Schema.NonEmptyString;
|
|
513
439
|
}>, Schema.Struct<{
|
|
514
|
-
type: Schema.Literal<
|
|
515
|
-
reason: Schema.
|
|
440
|
+
readonly type: Schema.Literal<"error">;
|
|
441
|
+
readonly reason: Schema.NonEmptyString;
|
|
516
442
|
}>]>;
|
|
517
443
|
}>;
|
|
518
444
|
export type AgentPaymentEventReport = typeof AgentPaymentEventReport.Type;
|
|
519
|
-
declare const
|
|
520
|
-
received: Schema.
|
|
521
|
-
paymentId: Schema.optional<
|
|
522
|
-
}
|
|
523
|
-
|
|
524
|
-
paymentId: Schema.optional<typeof Schema.UUID>;
|
|
525
|
-
}>, never, {
|
|
526
|
-
readonly received: boolean;
|
|
527
|
-
} & {
|
|
528
|
-
readonly paymentId?: string | undefined;
|
|
529
|
-
}, {}, {}>;
|
|
530
|
-
export declare class AgentPaymentEventResponse extends AgentPaymentEventResponse_base {
|
|
531
|
-
}
|
|
445
|
+
export declare const AgentPaymentEventResponse: Schema.Struct<{
|
|
446
|
+
readonly received: Schema.Boolean;
|
|
447
|
+
readonly paymentId: Schema.optional<Schema.String>;
|
|
448
|
+
}>;
|
|
449
|
+
export type AgentPaymentEventResponse = typeof AgentPaymentEventResponse.Type;
|
|
532
450
|
export interface ApiClientOptions {
|
|
533
451
|
baseUrl: string;
|
|
534
452
|
sessionKeyPrivateKey?: `0x${string}`;
|
|
@@ -558,107 +476,65 @@ export declare class ApiError extends Error {
|
|
|
558
476
|
constructor(message: string, status?: number | undefined, response?: Response | undefined);
|
|
559
477
|
}
|
|
560
478
|
export declare const SpendConfigInput: Schema.Struct<{
|
|
561
|
-
auto_topup_allowed: Schema.
|
|
562
|
-
daily_limit: Schema.NullOr<
|
|
563
|
-
monthly_limit: Schema.NullOr<
|
|
564
|
-
per_transaction_limit: Schema.NullOr<
|
|
479
|
+
readonly auto_topup_allowed: Schema.Boolean;
|
|
480
|
+
readonly daily_limit: Schema.NullOr<Schema.String>;
|
|
481
|
+
readonly monthly_limit: Schema.NullOr<Schema.String>;
|
|
482
|
+
readonly per_transaction_limit: Schema.NullOr<Schema.String>;
|
|
565
483
|
}>;
|
|
566
|
-
declare const
|
|
567
|
-
name: Schema.NullOr<
|
|
568
|
-
agent_key_address: Schema.
|
|
569
|
-
key_name: Schema.optional<Schema.
|
|
570
|
-
spend_config: Schema.optional<Schema.NullOr<Schema.Struct<{
|
|
571
|
-
auto_topup_allowed: Schema.
|
|
572
|
-
daily_limit: Schema.NullOr<
|
|
573
|
-
monthly_limit: Schema.NullOr<
|
|
574
|
-
per_transaction_limit: Schema.NullOr<
|
|
484
|
+
export declare const AgentApprovalRequest: Schema.Struct<{
|
|
485
|
+
readonly name: Schema.NullOr<Schema.String>;
|
|
486
|
+
readonly agent_key_address: Schema.NonEmptyString;
|
|
487
|
+
readonly key_name: Schema.optional<Schema.String>;
|
|
488
|
+
readonly spend_config: Schema.optional<Schema.NullOr<Schema.Struct<{
|
|
489
|
+
readonly auto_topup_allowed: Schema.Boolean;
|
|
490
|
+
readonly daily_limit: Schema.NullOr<Schema.String>;
|
|
491
|
+
readonly monthly_limit: Schema.NullOr<Schema.String>;
|
|
492
|
+
readonly per_transaction_limit: Schema.NullOr<Schema.String>;
|
|
575
493
|
}>>>;
|
|
576
|
-
mode: Schema.optional<Schema.
|
|
577
|
-
agent_address: Schema.optional<Schema.
|
|
578
|
-
}
|
|
579
|
-
|
|
580
|
-
|
|
581
|
-
|
|
582
|
-
|
|
583
|
-
|
|
584
|
-
|
|
585
|
-
|
|
586
|
-
per_transaction_limit: Schema.NullOr<typeof Schema.String>;
|
|
587
|
-
}>>>;
|
|
588
|
-
mode: Schema.optional<Schema.Literal<["create", "connect", "connect_choose"]>>;
|
|
589
|
-
agent_address: Schema.optional<Schema.refine<string, typeof Schema.NonEmptyTrimmedString>>;
|
|
590
|
-
}>, never, {
|
|
591
|
-
readonly name: string | null;
|
|
592
|
-
} & {
|
|
593
|
-
readonly agent_key_address: string;
|
|
594
|
-
} & {
|
|
595
|
-
readonly key_name?: string | undefined;
|
|
596
|
-
} & {
|
|
597
|
-
readonly spend_config?: {
|
|
598
|
-
readonly auto_topup_allowed: boolean;
|
|
599
|
-
readonly daily_limit: string | null;
|
|
600
|
-
readonly monthly_limit: string | null;
|
|
601
|
-
readonly per_transaction_limit: string | null;
|
|
602
|
-
} | null | undefined;
|
|
603
|
-
} & {
|
|
604
|
-
readonly mode?: "create" | "connect" | "connect_choose" | undefined;
|
|
605
|
-
} & {
|
|
606
|
-
readonly agent_address?: string | undefined;
|
|
607
|
-
}, {}, {}>;
|
|
608
|
-
export declare class AgentApprovalRequest extends AgentApprovalRequest_base {
|
|
609
|
-
}
|
|
610
|
-
declare const ApprovalResponse_base: Schema.Class<ApprovalResponse, {
|
|
611
|
-
token: Schema.refine<string, typeof Schema.Trimmed>;
|
|
612
|
-
status_url: Schema.refine<string, typeof Schema.Trimmed>;
|
|
613
|
-
user_approve_url: Schema.refine<string, typeof Schema.Trimmed>;
|
|
614
|
-
}, Schema.Struct.Encoded<{
|
|
615
|
-
token: Schema.refine<string, typeof Schema.Trimmed>;
|
|
616
|
-
status_url: Schema.refine<string, typeof Schema.Trimmed>;
|
|
617
|
-
user_approve_url: Schema.refine<string, typeof Schema.Trimmed>;
|
|
618
|
-
}>, never, {
|
|
619
|
-
readonly token: string;
|
|
620
|
-
} & {
|
|
621
|
-
readonly status_url: string;
|
|
622
|
-
} & {
|
|
623
|
-
readonly user_approve_url: string;
|
|
624
|
-
}, {}, {}>;
|
|
625
|
-
export declare class ApprovalResponse extends ApprovalResponse_base {
|
|
626
|
-
}
|
|
494
|
+
readonly mode: Schema.optional<Schema.Literals<readonly ["create", "connect", "connect_choose"]>>;
|
|
495
|
+
readonly agent_address: Schema.optional<Schema.NonEmptyString>;
|
|
496
|
+
}>;
|
|
497
|
+
export type AgentApprovalRequest = typeof AgentApprovalRequest.Type;
|
|
498
|
+
export declare const ApprovalResponse: Schema.Struct<{
|
|
499
|
+
readonly token: Schema.NonEmptyString;
|
|
500
|
+
readonly status_url: Schema.NonEmptyString;
|
|
501
|
+
readonly user_approve_url: Schema.NonEmptyString;
|
|
502
|
+
}>;
|
|
503
|
+
export type ApprovalResponse = typeof ApprovalResponse.Type;
|
|
627
504
|
export declare const ApprovalStatusPending: Schema.Struct<{
|
|
628
|
-
status: Schema.Literal<
|
|
505
|
+
readonly status: Schema.Literal<"pending">;
|
|
629
506
|
}>;
|
|
630
507
|
export declare const ApprovalStatusResolved: Schema.Struct<{
|
|
631
|
-
status: Schema.Literal<
|
|
632
|
-
agent: Schema.optional<Schema.Struct<{
|
|
633
|
-
address: Schema.
|
|
634
|
-
agent_key_address: Schema.optional<Schema.
|
|
508
|
+
readonly status: Schema.Literal<"resolved">;
|
|
509
|
+
readonly agent: Schema.optional<Schema.Struct<{
|
|
510
|
+
readonly address: Schema.NonEmptyString;
|
|
511
|
+
readonly agent_key_address: Schema.optional<Schema.NonEmptyString>;
|
|
635
512
|
}>>;
|
|
636
|
-
resolved_at: Schema.
|
|
513
|
+
readonly resolved_at: Schema.String;
|
|
637
514
|
}>;
|
|
638
515
|
export declare const ApprovalStatusRejected: Schema.Struct<{
|
|
639
|
-
status: Schema.Literal<
|
|
640
|
-
resolved_at: Schema.
|
|
516
|
+
readonly status: Schema.Literal<"rejected">;
|
|
517
|
+
readonly resolved_at: Schema.String;
|
|
641
518
|
}>;
|
|
642
519
|
export declare const ApprovalStatusBlocked: Schema.Struct<{
|
|
643
|
-
status: Schema.Literal<
|
|
644
|
-
resolved_at: Schema.
|
|
520
|
+
readonly status: Schema.Literal<"blocked">;
|
|
521
|
+
readonly resolved_at: Schema.String;
|
|
645
522
|
}>;
|
|
646
|
-
export declare const ApprovalStatus: Schema.Union<[Schema.Struct<{
|
|
647
|
-
status: Schema.Literal<
|
|
523
|
+
export declare const ApprovalStatus: Schema.Union<readonly [Schema.Struct<{
|
|
524
|
+
readonly status: Schema.Literal<"pending">;
|
|
648
525
|
}>, Schema.Struct<{
|
|
649
|
-
status: Schema.Literal<
|
|
650
|
-
agent: Schema.optional<Schema.Struct<{
|
|
651
|
-
address: Schema.
|
|
652
|
-
agent_key_address: Schema.optional<Schema.
|
|
526
|
+
readonly status: Schema.Literal<"resolved">;
|
|
527
|
+
readonly agent: Schema.optional<Schema.Struct<{
|
|
528
|
+
readonly address: Schema.NonEmptyString;
|
|
529
|
+
readonly agent_key_address: Schema.optional<Schema.NonEmptyString>;
|
|
653
530
|
}>>;
|
|
654
|
-
resolved_at: Schema.
|
|
531
|
+
readonly resolved_at: Schema.String;
|
|
655
532
|
}>, Schema.Struct<{
|
|
656
|
-
status: Schema.Literal<
|
|
657
|
-
resolved_at: Schema.
|
|
533
|
+
readonly status: Schema.Literal<"rejected">;
|
|
534
|
+
readonly resolved_at: Schema.String;
|
|
658
535
|
}>, Schema.Struct<{
|
|
659
|
-
status: Schema.Literal<
|
|
660
|
-
resolved_at: Schema.
|
|
536
|
+
readonly status: Schema.Literal<"blocked">;
|
|
537
|
+
readonly resolved_at: Schema.String;
|
|
661
538
|
}>]>;
|
|
662
539
|
export type ApprovalStatus = typeof ApprovalStatus.Type;
|
|
663
|
-
export {};
|
|
664
540
|
//# sourceMappingURL=types.d.ts.map
|