@near-intents-agent-api/sdk 0.1.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.
@@ -0,0 +1,3984 @@
1
+ //#region src/idempotency.d.ts
2
+ /** Creates a key for one logical request. Save it before sending when recovery must survive a restart. */
3
+ declare function createIdempotencyKey(): string;
4
+ /** The API response plus the SDK's effective request key. Reuse this key for retries. */
5
+ type IdempotentResult<T> = T & {
6
+ idempotencyKey: string;
7
+ };
8
+ //#endregion
9
+ //#region src/generated/api.d.ts
10
+ interface components {
11
+ schemas: {
12
+ ErrorDocument: {
13
+ errors: {
14
+ status: string;
15
+ code: string;
16
+ title: string;
17
+ detail?: string;
18
+ source?: {
19
+ pointer: string;
20
+ };
21
+ meta?: {
22
+ retryable: boolean; /** Format: date-time */
23
+ available_at?: string;
24
+ };
25
+ }[];
26
+ meta: {
27
+ request_id?: string;
28
+ };
29
+ };
30
+ OwnerWallet: {
31
+ /** @constant */type: "near";
32
+ account_id: string;
33
+ public_key: string;
34
+ } | {
35
+ /** @constant */type: "evm";
36
+ address: string;
37
+ chain_id: number;
38
+ public_key: string;
39
+ } | {
40
+ /** @constant */type: "passkey";
41
+ credential_id: string;
42
+ public_key: string;
43
+ rp_id: string; /** Format: uri */
44
+ origin: string;
45
+ };
46
+ Policy: {
47
+ frozen: boolean;
48
+ actions: ("swap" | "transfer" | "withdraw")[];
49
+ confidential: boolean;
50
+ owner_approval: boolean;
51
+ assets: "any" | string[];
52
+ limits: {
53
+ per_transaction?: {
54
+ [key: string]: string;
55
+ };
56
+ hourly?: {
57
+ [key: string]: string;
58
+ };
59
+ daily?: {
60
+ [key: string]: string;
61
+ };
62
+ monthly?: {
63
+ [key: string]: string;
64
+ };
65
+ };
66
+ max_actions_per_hour: number | null;
67
+ destinations: {
68
+ /** @enum {string} */mode: "any" | "only" | "except";
69
+ list: ({
70
+ /** @constant */action: "withdraw";
71
+ chain: string;
72
+ address: string;
73
+ memo: string | null;
74
+ } | {
75
+ /** @constant */action: "transfer";
76
+ address: string;
77
+ confidential: boolean;
78
+ })[];
79
+ };
80
+ budget: {
81
+ daily_usd: string | null;
82
+ weekly_usd: string | null;
83
+ monthly_usd: string | null;
84
+ };
85
+ timelock_ms: number;
86
+ sign_message?: {
87
+ recipients: string[];
88
+ };
89
+ };
90
+ GenerateIntentResponse: {
91
+ correlation_id: string; /** @enum {string} */
92
+ type: "agent_create" | "policy_update" | "agent_freeze" | "agent_unfreeze" | "grant_issue" | "grant_revoke" | "execution_cancel" | "agent_archive" | "agent_restore" | "agent_delete" | "approval_vote";
93
+ agent_id: string; /** @constant */
94
+ status: "PENDING_SIGNATURE"; /** Format: date-time */
95
+ expires_at: string;
96
+ signer: components["schemas"]["OwnerWallet"];
97
+ intent: components["schemas"]["Intent"];
98
+ preview: components["schemas"]["IntentPreview"];
99
+ };
100
+ Intent: {
101
+ /** @constant */standard: "nep413";
102
+ payload: {
103
+ message: string;
104
+ recipient: string;
105
+ nonce: string;
106
+ };
107
+ } | {
108
+ /** @constant */standard: "nep366";
109
+ payload: {
110
+ receiverId: string;
111
+ actions: {
112
+ /** @constant */type: "FunctionCall";
113
+ params: {
114
+ methodName: string;
115
+ args: {
116
+ [key: string]: unknown;
117
+ };
118
+ gas: string;
119
+ deposit: string;
120
+ };
121
+ }[];
122
+ };
123
+ } | {
124
+ /** @constant */standard: "eip712";
125
+ payload: {
126
+ domain: {
127
+ [key: string]: unknown;
128
+ };
129
+ types: {
130
+ [key: string]: {
131
+ name: string;
132
+ type: string;
133
+ }[];
134
+ };
135
+ primaryType: string;
136
+ message: {
137
+ [key: string]: unknown;
138
+ };
139
+ };
140
+ } | {
141
+ /** @constant */standard: "webauthn";
142
+ payload: {
143
+ challenge: string;
144
+ rpId: string;
145
+ allowCredentials: {
146
+ id: string; /** @constant */
147
+ type: "public-key";
148
+ }[]; /** @constant */
149
+ userVerification: "required";
150
+ timeout: number;
151
+ };
152
+ };
153
+ IntentPreview: {
154
+ summary: string;
155
+ revision?: number;
156
+ previous_revision?: number;
157
+ policy_hash?: string;
158
+ policy?: components["schemas"]["Policy"];
159
+ deletion?: components["schemas"]["DeletionPreview"];
160
+ approval?: {
161
+ /** Format: uuid */approval_id: string;
162
+ request_type: string;
163
+ request_hash: string; /** @enum {string} */
164
+ verdict: "approve" | "reject";
165
+ };
166
+ };
167
+ DeletionPreview: {
168
+ near_account_id: string;
169
+ beneficiary: string;
170
+ native_balance: string;
171
+ public: {
172
+ asset_id: string;
173
+ symbol: string | null;
174
+ decimals: number | null;
175
+ blockchain: string | null;
176
+ price: number | null;
177
+ price_updated_at: string | null;
178
+ price_expires_at: string | null;
179
+ balance_raw: string;
180
+ balance: string | null;
181
+ }[];
182
+ confidential: {
183
+ asset_id: string;
184
+ symbol: string | null;
185
+ decimals: number | null;
186
+ blockchain: string | null;
187
+ price: number | null;
188
+ price_updated_at: string | null;
189
+ price_expires_at: string | null;
190
+ balance_raw: string;
191
+ balance: string | null;
192
+ }[];
193
+ assets_lost: boolean; /** @enum {string} */
194
+ retirement: "provider_delete" | "credential_erase";
195
+ };
196
+ SignedData: {
197
+ /** @constant */standard: "nep413";
198
+ payload: {
199
+ message: string;
200
+ recipient: string;
201
+ nonce: string;
202
+ }; /** Format: starts_with */
203
+ public_key: string;
204
+ signature: string;
205
+ } | {
206
+ /** @constant */standard: "nep366";
207
+ payload: {
208
+ receiverId: string;
209
+ actions: {
210
+ /** @constant */type: "FunctionCall";
211
+ params: {
212
+ methodName: string;
213
+ args: {
214
+ [key: string]: unknown;
215
+ };
216
+ gas: string;
217
+ deposit: string;
218
+ };
219
+ }[];
220
+ };
221
+ signed_delegate: string;
222
+ } | {
223
+ /** @constant */standard: "eip712";
224
+ payload: {
225
+ domain: {
226
+ [key: string]: unknown;
227
+ };
228
+ types: {
229
+ [key: string]: {
230
+ name: string;
231
+ type: string;
232
+ }[];
233
+ };
234
+ primaryType: string;
235
+ message: {
236
+ [key: string]: unknown;
237
+ };
238
+ };
239
+ signature: string;
240
+ } | {
241
+ /** @constant */standard: "webauthn";
242
+ payload: {
243
+ challenge: string;
244
+ rpId: string;
245
+ allowCredentials: {
246
+ id: string; /** @constant */
247
+ type: "public-key";
248
+ }[]; /** @constant */
249
+ userVerification: "required";
250
+ timeout: number;
251
+ };
252
+ credential: {
253
+ id: string;
254
+ rawId: string; /** @constant */
255
+ type: "public-key";
256
+ response: {
257
+ clientDataJSON: string;
258
+ authenticatorData: string;
259
+ signature: string;
260
+ userHandle?: string;
261
+ };
262
+ clientExtensionResults: {
263
+ [key: string]: unknown;
264
+ }; /** @enum {string} */
265
+ authenticatorAttachment?: "platform" | "cross-platform";
266
+ };
267
+ };
268
+ StatusResponse: {
269
+ correlation_id: string;
270
+ agent_id: string | null; /** @enum {string} */
271
+ status: "PENDING_SIGNATURE" | "QUEUED" | "PENDING_APPROVAL" | "PENDING_DEPOSIT" | "PROCESSING" | "SUCCESS" | "REFUNDED" | "FAILED" | "UNCERTAIN" | "NEEDS_REVIEW";
272
+ failure_code: string | null;
273
+ created_at: string;
274
+ updated_at: string;
275
+ dispatch_committed_at: string | null;
276
+ grant: {
277
+ id: string;
278
+ label: string;
279
+ } | null; /** @constant */
280
+ type: "agent_create";
281
+ details: {
282
+ revision: number | null;
283
+ policy_hash: string | null;
284
+ transaction_hash: string | null;
285
+ agent_id: string;
286
+ };
287
+ } | {
288
+ correlation_id: string;
289
+ agent_id: string | null; /** @enum {string} */
290
+ status: "PENDING_SIGNATURE" | "QUEUED" | "PENDING_APPROVAL" | "PENDING_DEPOSIT" | "PROCESSING" | "SUCCESS" | "REFUNDED" | "FAILED" | "UNCERTAIN" | "NEEDS_REVIEW";
291
+ failure_code: string | null;
292
+ created_at: string;
293
+ updated_at: string;
294
+ dispatch_committed_at: string | null;
295
+ grant: {
296
+ id: string;
297
+ label: string;
298
+ } | null; /** @constant */
299
+ type: "policy_update";
300
+ details: {
301
+ revision: number | null;
302
+ policy_hash: string | null;
303
+ transaction_hash: string | null;
304
+ };
305
+ } | {
306
+ correlation_id: string;
307
+ agent_id: string | null; /** @enum {string} */
308
+ status: "PENDING_SIGNATURE" | "QUEUED" | "PENDING_APPROVAL" | "PENDING_DEPOSIT" | "PROCESSING" | "SUCCESS" | "REFUNDED" | "FAILED" | "UNCERTAIN" | "NEEDS_REVIEW";
309
+ failure_code: string | null;
310
+ created_at: string;
311
+ updated_at: string;
312
+ dispatch_committed_at: string | null;
313
+ grant: {
314
+ id: string;
315
+ label: string;
316
+ } | null; /** @constant */
317
+ type: "agent_freeze";
318
+ details: {
319
+ revision: number | null;
320
+ policy_hash: string | null;
321
+ transaction_hash: string | null;
322
+ };
323
+ } | {
324
+ correlation_id: string;
325
+ agent_id: string | null; /** @enum {string} */
326
+ status: "PENDING_SIGNATURE" | "QUEUED" | "PENDING_APPROVAL" | "PENDING_DEPOSIT" | "PROCESSING" | "SUCCESS" | "REFUNDED" | "FAILED" | "UNCERTAIN" | "NEEDS_REVIEW";
327
+ failure_code: string | null;
328
+ created_at: string;
329
+ updated_at: string;
330
+ dispatch_committed_at: string | null;
331
+ grant: {
332
+ id: string;
333
+ label: string;
334
+ } | null; /** @constant */
335
+ type: "agent_unfreeze";
336
+ details: {
337
+ revision: number | null;
338
+ policy_hash: string | null;
339
+ transaction_hash: string | null;
340
+ };
341
+ } | {
342
+ correlation_id: string;
343
+ agent_id: string | null; /** @enum {string} */
344
+ status: "PENDING_SIGNATURE" | "QUEUED" | "PENDING_APPROVAL" | "PENDING_DEPOSIT" | "PROCESSING" | "SUCCESS" | "REFUNDED" | "FAILED" | "UNCERTAIN" | "NEEDS_REVIEW";
345
+ failure_code: string | null;
346
+ created_at: string;
347
+ updated_at: string;
348
+ dispatch_committed_at: string | null;
349
+ grant: {
350
+ id: string;
351
+ label: string;
352
+ } | null; /** @constant */
353
+ type: "grant_issue";
354
+ details: {
355
+ grant: components["schemas"]["GrantView"] | null;
356
+ };
357
+ } | {
358
+ correlation_id: string;
359
+ agent_id: string | null; /** @enum {string} */
360
+ status: "PENDING_SIGNATURE" | "QUEUED" | "PENDING_APPROVAL" | "PENDING_DEPOSIT" | "PROCESSING" | "SUCCESS" | "REFUNDED" | "FAILED" | "UNCERTAIN" | "NEEDS_REVIEW";
361
+ failure_code: string | null;
362
+ created_at: string;
363
+ updated_at: string;
364
+ dispatch_committed_at: string | null;
365
+ grant: {
366
+ id: string;
367
+ label: string;
368
+ } | null; /** @constant */
369
+ type: "grant_revoke";
370
+ details: {
371
+ grant_id: string | null;
372
+ committed_correlation_ids: string[] | null;
373
+ committed_truncated: boolean | null;
374
+ };
375
+ } | {
376
+ correlation_id: string;
377
+ agent_id: string | null; /** @enum {string} */
378
+ status: "PENDING_SIGNATURE" | "QUEUED" | "PENDING_APPROVAL" | "PENDING_DEPOSIT" | "PROCESSING" | "SUCCESS" | "REFUNDED" | "FAILED" | "UNCERTAIN" | "NEEDS_REVIEW";
379
+ failure_code: string | null;
380
+ created_at: string;
381
+ updated_at: string;
382
+ dispatch_committed_at: string | null;
383
+ grant: {
384
+ id: string;
385
+ label: string;
386
+ } | null; /** @constant */
387
+ type: "execution_cancel";
388
+ details: {
389
+ cancelled_correlation_id: string | null;
390
+ };
391
+ } | {
392
+ correlation_id: string;
393
+ agent_id: string | null; /** @enum {string} */
394
+ status: "PENDING_SIGNATURE" | "QUEUED" | "PENDING_APPROVAL" | "PENDING_DEPOSIT" | "PROCESSING" | "SUCCESS" | "REFUNDED" | "FAILED" | "UNCERTAIN" | "NEEDS_REVIEW";
395
+ failure_code: string | null;
396
+ created_at: string;
397
+ updated_at: string;
398
+ dispatch_committed_at: string | null;
399
+ grant: {
400
+ id: string;
401
+ label: string;
402
+ } | null; /** @constant */
403
+ type: "agent_archive";
404
+ details: {
405
+ archived: boolean | null;
406
+ };
407
+ } | {
408
+ correlation_id: string;
409
+ agent_id: string | null; /** @enum {string} */
410
+ status: "PENDING_SIGNATURE" | "QUEUED" | "PENDING_APPROVAL" | "PENDING_DEPOSIT" | "PROCESSING" | "SUCCESS" | "REFUNDED" | "FAILED" | "UNCERTAIN" | "NEEDS_REVIEW";
411
+ failure_code: string | null;
412
+ created_at: string;
413
+ updated_at: string;
414
+ dispatch_committed_at: string | null;
415
+ grant: {
416
+ id: string;
417
+ label: string;
418
+ } | null; /** @constant */
419
+ type: "agent_restore";
420
+ details: {
421
+ archived: boolean | null;
422
+ };
423
+ } | {
424
+ correlation_id: string;
425
+ agent_id: string | null; /** @enum {string} */
426
+ status: "PENDING_SIGNATURE" | "QUEUED" | "PENDING_APPROVAL" | "PENDING_DEPOSIT" | "PROCESSING" | "SUCCESS" | "REFUNDED" | "FAILED" | "UNCERTAIN" | "NEEDS_REVIEW";
427
+ failure_code: string | null;
428
+ created_at: string;
429
+ updated_at: string;
430
+ dispatch_committed_at: string | null;
431
+ grant: {
432
+ id: string;
433
+ label: string;
434
+ } | null; /** @constant */
435
+ type: "agent_delete";
436
+ details: components["schemas"]["ExecutionDetails"];
437
+ } | {
438
+ correlation_id: string;
439
+ agent_id: string | null; /** @enum {string} */
440
+ status: "PENDING_SIGNATURE" | "QUEUED" | "PENDING_APPROVAL" | "PENDING_DEPOSIT" | "PROCESSING" | "SUCCESS" | "REFUNDED" | "FAILED" | "UNCERTAIN" | "NEEDS_REVIEW";
441
+ failure_code: string | null;
442
+ created_at: string;
443
+ updated_at: string;
444
+ dispatch_committed_at: string | null;
445
+ grant: {
446
+ id: string;
447
+ label: string;
448
+ } | null; /** @constant */
449
+ type: "approval_vote";
450
+ details: {
451
+ approval_id: string | null;
452
+ verdict: ("approve" | "reject") | null;
453
+ };
454
+ } | {
455
+ correlation_id: string;
456
+ agent_id: string | null; /** @enum {string} */
457
+ status: "PENDING_SIGNATURE" | "QUEUED" | "PENDING_APPROVAL" | "PENDING_DEPOSIT" | "PROCESSING" | "SUCCESS" | "REFUNDED" | "FAILED" | "UNCERTAIN" | "NEEDS_REVIEW";
458
+ failure_code: string | null;
459
+ created_at: string;
460
+ updated_at: string;
461
+ dispatch_committed_at: string | null;
462
+ grant: {
463
+ id: string;
464
+ label: string;
465
+ } | null; /** @constant */
466
+ type: "swap";
467
+ details: components["schemas"]["ExecutionDetails"];
468
+ } | {
469
+ correlation_id: string;
470
+ agent_id: string | null; /** @enum {string} */
471
+ status: "PENDING_SIGNATURE" | "QUEUED" | "PENDING_APPROVAL" | "PENDING_DEPOSIT" | "PROCESSING" | "SUCCESS" | "REFUNDED" | "FAILED" | "UNCERTAIN" | "NEEDS_REVIEW";
472
+ failure_code: string | null;
473
+ created_at: string;
474
+ updated_at: string;
475
+ dispatch_committed_at: string | null;
476
+ grant: {
477
+ id: string;
478
+ label: string;
479
+ } | null; /** @constant */
480
+ type: "withdraw";
481
+ details: components["schemas"]["ExecutionDetails"];
482
+ } | {
483
+ correlation_id: string;
484
+ agent_id: string | null; /** @enum {string} */
485
+ status: "PENDING_SIGNATURE" | "QUEUED" | "PENDING_APPROVAL" | "PENDING_DEPOSIT" | "PROCESSING" | "SUCCESS" | "REFUNDED" | "FAILED" | "UNCERTAIN" | "NEEDS_REVIEW";
486
+ failure_code: string | null;
487
+ created_at: string;
488
+ updated_at: string;
489
+ dispatch_committed_at: string | null;
490
+ grant: {
491
+ id: string;
492
+ label: string;
493
+ } | null; /** @constant */
494
+ type: "transfer";
495
+ details: components["schemas"]["ExecutionDetails"];
496
+ } | {
497
+ correlation_id: string;
498
+ agent_id: string | null; /** @enum {string} */
499
+ status: "PENDING_SIGNATURE" | "QUEUED" | "PENDING_APPROVAL" | "PENDING_DEPOSIT" | "PROCESSING" | "SUCCESS" | "REFUNDED" | "FAILED" | "UNCERTAIN" | "NEEDS_REVIEW";
500
+ failure_code: string | null;
501
+ created_at: string;
502
+ updated_at: string;
503
+ dispatch_committed_at: string | null;
504
+ grant: {
505
+ id: string;
506
+ label: string;
507
+ } | null; /** @constant */
508
+ type: "shield";
509
+ details: components["schemas"]["ExecutionDetails"];
510
+ } | {
511
+ correlation_id: string;
512
+ agent_id: string | null; /** @enum {string} */
513
+ status: "PENDING_SIGNATURE" | "QUEUED" | "PENDING_APPROVAL" | "PENDING_DEPOSIT" | "PROCESSING" | "SUCCESS" | "REFUNDED" | "FAILED" | "UNCERTAIN" | "NEEDS_REVIEW";
514
+ failure_code: string | null;
515
+ created_at: string;
516
+ updated_at: string;
517
+ dispatch_committed_at: string | null;
518
+ grant: {
519
+ id: string;
520
+ label: string;
521
+ } | null; /** @constant */
522
+ type: "unshield";
523
+ details: components["schemas"]["ExecutionDetails"];
524
+ } | {
525
+ correlation_id: string;
526
+ agent_id: string | null; /** @enum {string} */
527
+ status: "PENDING_SIGNATURE" | "QUEUED" | "PENDING_APPROVAL" | "PENDING_DEPOSIT" | "PROCESSING" | "SUCCESS" | "REFUNDED" | "FAILED" | "UNCERTAIN" | "NEEDS_REVIEW";
528
+ failure_code: string | null;
529
+ created_at: string;
530
+ updated_at: string;
531
+ dispatch_committed_at: string | null;
532
+ grant: {
533
+ id: string;
534
+ label: string;
535
+ } | null; /** @constant */
536
+ type: "deposit";
537
+ details: components["schemas"]["ExecutionDetails"];
538
+ };
539
+ GrantView: {
540
+ grant_id: string;
541
+ agent_id: string;
542
+ wallet_id: string;
543
+ label: string;
544
+ issued_at: string;
545
+ expires_at: string;
546
+ revoked_at: string | null;
547
+ revoked_reason: string | null;
548
+ owner_epoch: number;
549
+ owner_message: {
550
+ /** @constant */domain: "near-intents-agent-api.agent-grant.v6";
551
+ owner: components["schemas"]["OwnerWallet"];
552
+ tenant_id: string;
553
+ agent_id: string;
554
+ wallet_id: string;
555
+ label: string;
556
+ credential: string; /** @constant */
557
+ network: "mainnet";
558
+ issued_at_ms: number;
559
+ expires_at_ms: number;
560
+ owner_epoch: number;
561
+ nonce: string;
562
+ recipient: string;
563
+ };
564
+ };
565
+ ExecutionDetails: {
566
+ action: string;
567
+ near_account_id?: string;
568
+ provider_request_id?: string | null;
569
+ provider_status?: string;
570
+ confidential?: boolean;
571
+ chain?: string;
572
+ execute_after?: string;
573
+ delay_ms?: number;
574
+ approval_id?: string | null;
575
+ intent_hash?: string | null;
576
+ tx_hash?: string | null;
577
+ destination_tx_hash?: string | null;
578
+ amount_out?: string | null;
579
+ deposit_address?: string | null;
580
+ intent_id?: string | null;
581
+ refund_tx_hash?: string | null;
582
+ failure_reason?: string | null;
583
+ } & {
584
+ [key: string]: unknown;
585
+ };
586
+ AgentView: {
587
+ id: string;
588
+ name: string;
589
+ external_user_id: string | null; /** @enum {string} */
590
+ status: "PENDING" | "ACTIVE" | "ARCHIVED" | "DELETED" | "ABANDONED";
591
+ archived: boolean;
592
+ deleted: boolean;
593
+ owner: components["schemas"]["OwnerWallet"] | null;
594
+ owner_account: {
595
+ account_id: string;
596
+ public_key: string; /** @constant */
597
+ authority: "wallet";
598
+ } | null;
599
+ wallet: {
600
+ wallet_id: string;
601
+ near_account_id: string;
602
+ } | null;
603
+ created_at: string;
604
+ cooldowns: {
605
+ policy_change_available_at: string | null;
606
+ unfreeze_available_at: string | null;
607
+ };
608
+ };
609
+ PolicyView: {
610
+ wallet_id: string;
611
+ revision: number | null;
612
+ policy_hash: string | null; /** @enum {string} */
613
+ status: "NONE" | "SIGNED" | "APPLIED" | "FAILED";
614
+ applied_at: string | null;
615
+ transaction_hash: string | null;
616
+ provider_policy_synced: boolean;
617
+ cooldowns: {
618
+ policy_change_available_at: string | null;
619
+ unfreeze_available_at: string | null;
620
+ };
621
+ policy: components["schemas"]["Policy"] | null;
622
+ usage: {
623
+ budget: components["schemas"]["BudgetView"];
624
+ timelock: components["schemas"]["TimelockView"];
625
+ };
626
+ };
627
+ BudgetView: {
628
+ daily: {
629
+ limit_usd: string | null;
630
+ spent_usd: string;
631
+ remaining_usd: string | null;
632
+ resets_at: string | null;
633
+ };
634
+ weekly: {
635
+ limit_usd: string | null;
636
+ spent_usd: string;
637
+ remaining_usd: string | null;
638
+ resets_at: string | null;
639
+ };
640
+ monthly: {
641
+ limit_usd: string | null;
642
+ spent_usd: string;
643
+ remaining_usd: string | null;
644
+ resets_at: string | null;
645
+ };
646
+ };
647
+ TimelockView: {
648
+ delay_ms: number;
649
+ scheduled_count: number;
650
+ };
651
+ };
652
+ responses: never;
653
+ parameters: never;
654
+ requestBodies: never;
655
+ headers: never;
656
+ pathItems: never;
657
+ }
658
+ interface operations {
659
+ generateIntent: {
660
+ parameters: {
661
+ query?: never;
662
+ header?: {
663
+ /** @description Stable key for one logical request. Replays with the same key and body return the original result; a different body is refused with `idempotency_conflict`. */"Idempotency-Key"?: string;
664
+ };
665
+ path?: never;
666
+ cookie?: never;
667
+ };
668
+ requestBody: {
669
+ content: {
670
+ "application/json": {
671
+ /** @constant */type: "agent_create";
672
+ name: string;
673
+ external_user_id?: string;
674
+ owner: components["schemas"]["OwnerWallet"];
675
+ policy: components["schemas"]["Policy"];
676
+ } | {
677
+ /** @constant */type: "policy_update";
678
+ agent_id: string;
679
+ policy: components["schemas"]["Policy"];
680
+ expected_revision: number;
681
+ } | {
682
+ /** @constant */type: "agent_freeze";
683
+ agent_id: string;
684
+ } | {
685
+ /** @constant */type: "agent_unfreeze";
686
+ agent_id: string;
687
+ } | {
688
+ /** @constant */type: "grant_issue";
689
+ agent_id: string;
690
+ label: string;
691
+ credential: string; /** Format: date-time */
692
+ expires_at: string;
693
+ } | {
694
+ /** @constant */type: "grant_revoke";
695
+ agent_id: string;
696
+ grant_id: string;
697
+ } | {
698
+ /** @constant */type: "execution_cancel";
699
+ agent_id: string;
700
+ correlation_id: string;
701
+ } | {
702
+ /** @constant */type: "agent_archive";
703
+ agent_id: string;
704
+ } | {
705
+ /** @constant */type: "agent_restore";
706
+ agent_id: string;
707
+ } | {
708
+ /** @constant */type: "agent_delete";
709
+ agent_id: string;
710
+ } | {
711
+ /** @constant */type: "approval_vote";
712
+ agent_id: string; /** Format: uuid */
713
+ approval_id: string; /** @enum {string} */
714
+ verdict: "approve" | "reject";
715
+ };
716
+ };
717
+ };
718
+ responses: {
719
+ /** @description Success */201: {
720
+ headers: {
721
+ [name: string]: unknown;
722
+ };
723
+ content: {
724
+ "application/json": components["schemas"]["GenerateIntentResponse"];
725
+ };
726
+ };
727
+ 400: {
728
+ headers: {
729
+ [name: string]: unknown;
730
+ };
731
+ content: {
732
+ "application/json": components["schemas"]["ErrorDocument"];
733
+ };
734
+ };
735
+ 401: {
736
+ headers: {
737
+ [name: string]: unknown;
738
+ };
739
+ content: {
740
+ "application/json": components["schemas"]["ErrorDocument"];
741
+ };
742
+ };
743
+ 403: {
744
+ headers: {
745
+ [name: string]: unknown;
746
+ };
747
+ content: {
748
+ "application/json": components["schemas"]["ErrorDocument"];
749
+ };
750
+ };
751
+ 404: {
752
+ headers: {
753
+ [name: string]: unknown;
754
+ };
755
+ content: {
756
+ "application/json": components["schemas"]["ErrorDocument"];
757
+ };
758
+ };
759
+ 409: {
760
+ headers: {
761
+ [name: string]: unknown;
762
+ };
763
+ content: {
764
+ "application/json": components["schemas"]["ErrorDocument"];
765
+ };
766
+ };
767
+ 410: {
768
+ headers: {
769
+ [name: string]: unknown;
770
+ };
771
+ content: {
772
+ "application/json": components["schemas"]["ErrorDocument"];
773
+ };
774
+ };
775
+ 429: {
776
+ headers: {
777
+ [name: string]: unknown;
778
+ };
779
+ content: {
780
+ "application/json": components["schemas"]["ErrorDocument"];
781
+ };
782
+ };
783
+ 502: {
784
+ headers: {
785
+ [name: string]: unknown;
786
+ };
787
+ content: {
788
+ "application/json": components["schemas"]["ErrorDocument"];
789
+ };
790
+ };
791
+ 503: {
792
+ headers: {
793
+ [name: string]: unknown;
794
+ };
795
+ content: {
796
+ "application/json": components["schemas"]["ErrorDocument"];
797
+ };
798
+ };
799
+ };
800
+ };
801
+ submitIntent: {
802
+ parameters: {
803
+ query?: never;
804
+ header?: never;
805
+ path?: never;
806
+ cookie?: never;
807
+ };
808
+ requestBody: {
809
+ content: {
810
+ "application/json": {
811
+ /** @enum {string} */type: "agent_create" | "policy_update" | "agent_freeze" | "agent_unfreeze" | "grant_issue" | "grant_revoke" | "execution_cancel" | "agent_archive" | "agent_restore" | "agent_delete" | "approval_vote";
812
+ correlation_id: string;
813
+ signed_data: components["schemas"]["SignedData"];
814
+ };
815
+ };
816
+ };
817
+ responses: {
818
+ /** @description Success */202: {
819
+ headers: {
820
+ [name: string]: unknown;
821
+ };
822
+ content: {
823
+ "application/json": components["schemas"]["StatusResponse"];
824
+ };
825
+ };
826
+ 400: {
827
+ headers: {
828
+ [name: string]: unknown;
829
+ };
830
+ content: {
831
+ "application/json": components["schemas"]["ErrorDocument"];
832
+ };
833
+ };
834
+ 401: {
835
+ headers: {
836
+ [name: string]: unknown;
837
+ };
838
+ content: {
839
+ "application/json": components["schemas"]["ErrorDocument"];
840
+ };
841
+ };
842
+ 403: {
843
+ headers: {
844
+ [name: string]: unknown;
845
+ };
846
+ content: {
847
+ "application/json": components["schemas"]["ErrorDocument"];
848
+ };
849
+ };
850
+ 404: {
851
+ headers: {
852
+ [name: string]: unknown;
853
+ };
854
+ content: {
855
+ "application/json": components["schemas"]["ErrorDocument"];
856
+ };
857
+ };
858
+ 409: {
859
+ headers: {
860
+ [name: string]: unknown;
861
+ };
862
+ content: {
863
+ "application/json": components["schemas"]["ErrorDocument"];
864
+ };
865
+ };
866
+ 410: {
867
+ headers: {
868
+ [name: string]: unknown;
869
+ };
870
+ content: {
871
+ "application/json": components["schemas"]["ErrorDocument"];
872
+ };
873
+ };
874
+ 429: {
875
+ headers: {
876
+ [name: string]: unknown;
877
+ };
878
+ content: {
879
+ "application/json": components["schemas"]["ErrorDocument"];
880
+ };
881
+ };
882
+ 502: {
883
+ headers: {
884
+ [name: string]: unknown;
885
+ };
886
+ content: {
887
+ "application/json": components["schemas"]["ErrorDocument"];
888
+ };
889
+ };
890
+ 503: {
891
+ headers: {
892
+ [name: string]: unknown;
893
+ };
894
+ content: {
895
+ "application/json": components["schemas"]["ErrorDocument"];
896
+ };
897
+ };
898
+ };
899
+ };
900
+ getStatus: {
901
+ parameters: {
902
+ query: {
903
+ correlation_id: string;
904
+ wait_ms?: number;
905
+ refresh?: boolean;
906
+ };
907
+ header?: never;
908
+ path?: never;
909
+ cookie?: never;
910
+ };
911
+ requestBody?: never;
912
+ responses: {
913
+ /** @description Success */200: {
914
+ headers: {
915
+ [name: string]: unknown;
916
+ };
917
+ content: {
918
+ "application/json": components["schemas"]["StatusResponse"];
919
+ };
920
+ };
921
+ 400: {
922
+ headers: {
923
+ [name: string]: unknown;
924
+ };
925
+ content: {
926
+ "application/json": components["schemas"]["ErrorDocument"];
927
+ };
928
+ };
929
+ 401: {
930
+ headers: {
931
+ [name: string]: unknown;
932
+ };
933
+ content: {
934
+ "application/json": components["schemas"]["ErrorDocument"];
935
+ };
936
+ };
937
+ 403: {
938
+ headers: {
939
+ [name: string]: unknown;
940
+ };
941
+ content: {
942
+ "application/json": components["schemas"]["ErrorDocument"];
943
+ };
944
+ };
945
+ 404: {
946
+ headers: {
947
+ [name: string]: unknown;
948
+ };
949
+ content: {
950
+ "application/json": components["schemas"]["ErrorDocument"];
951
+ };
952
+ };
953
+ 409: {
954
+ headers: {
955
+ [name: string]: unknown;
956
+ };
957
+ content: {
958
+ "application/json": components["schemas"]["ErrorDocument"];
959
+ };
960
+ };
961
+ 410: {
962
+ headers: {
963
+ [name: string]: unknown;
964
+ };
965
+ content: {
966
+ "application/json": components["schemas"]["ErrorDocument"];
967
+ };
968
+ };
969
+ 429: {
970
+ headers: {
971
+ [name: string]: unknown;
972
+ };
973
+ content: {
974
+ "application/json": components["schemas"]["ErrorDocument"];
975
+ };
976
+ };
977
+ 502: {
978
+ headers: {
979
+ [name: string]: unknown;
980
+ };
981
+ content: {
982
+ "application/json": components["schemas"]["ErrorDocument"];
983
+ };
984
+ };
985
+ 503: {
986
+ headers: {
987
+ [name: string]: unknown;
988
+ };
989
+ content: {
990
+ "application/json": components["schemas"]["ErrorDocument"];
991
+ };
992
+ };
993
+ };
994
+ };
995
+ getHistory: {
996
+ parameters: {
997
+ query?: {
998
+ cursor?: string;
999
+ limit?: number;
1000
+ };
1001
+ header?: never;
1002
+ path: {
1003
+ agent_id: string;
1004
+ };
1005
+ cookie?: never;
1006
+ };
1007
+ requestBody?: never;
1008
+ responses: {
1009
+ /** @description Success */200: {
1010
+ headers: {
1011
+ [name: string]: unknown;
1012
+ };
1013
+ content: {
1014
+ "application/json": {
1015
+ data: components["schemas"]["StatusResponse"][];
1016
+ next_cursor: string | null;
1017
+ };
1018
+ };
1019
+ };
1020
+ 400: {
1021
+ headers: {
1022
+ [name: string]: unknown;
1023
+ };
1024
+ content: {
1025
+ "application/json": components["schemas"]["ErrorDocument"];
1026
+ };
1027
+ };
1028
+ 401: {
1029
+ headers: {
1030
+ [name: string]: unknown;
1031
+ };
1032
+ content: {
1033
+ "application/json": components["schemas"]["ErrorDocument"];
1034
+ };
1035
+ };
1036
+ 403: {
1037
+ headers: {
1038
+ [name: string]: unknown;
1039
+ };
1040
+ content: {
1041
+ "application/json": components["schemas"]["ErrorDocument"];
1042
+ };
1043
+ };
1044
+ 404: {
1045
+ headers: {
1046
+ [name: string]: unknown;
1047
+ };
1048
+ content: {
1049
+ "application/json": components["schemas"]["ErrorDocument"];
1050
+ };
1051
+ };
1052
+ 409: {
1053
+ headers: {
1054
+ [name: string]: unknown;
1055
+ };
1056
+ content: {
1057
+ "application/json": components["schemas"]["ErrorDocument"];
1058
+ };
1059
+ };
1060
+ 410: {
1061
+ headers: {
1062
+ [name: string]: unknown;
1063
+ };
1064
+ content: {
1065
+ "application/json": components["schemas"]["ErrorDocument"];
1066
+ };
1067
+ };
1068
+ 429: {
1069
+ headers: {
1070
+ [name: string]: unknown;
1071
+ };
1072
+ content: {
1073
+ "application/json": components["schemas"]["ErrorDocument"];
1074
+ };
1075
+ };
1076
+ 502: {
1077
+ headers: {
1078
+ [name: string]: unknown;
1079
+ };
1080
+ content: {
1081
+ "application/json": components["schemas"]["ErrorDocument"];
1082
+ };
1083
+ };
1084
+ 503: {
1085
+ headers: {
1086
+ [name: string]: unknown;
1087
+ };
1088
+ content: {
1089
+ "application/json": components["schemas"]["ErrorDocument"];
1090
+ };
1091
+ };
1092
+ };
1093
+ };
1094
+ listAgents: {
1095
+ parameters: {
1096
+ query?: {
1097
+ external_user_id?: string;
1098
+ cursor?: string;
1099
+ };
1100
+ header?: never;
1101
+ path?: never;
1102
+ cookie?: never;
1103
+ };
1104
+ requestBody?: never;
1105
+ responses: {
1106
+ /** @description Success */200: {
1107
+ headers: {
1108
+ [name: string]: unknown;
1109
+ };
1110
+ content: {
1111
+ "application/json": {
1112
+ data: components["schemas"]["AgentView"][];
1113
+ next_cursor: string | null;
1114
+ };
1115
+ };
1116
+ };
1117
+ 400: {
1118
+ headers: {
1119
+ [name: string]: unknown;
1120
+ };
1121
+ content: {
1122
+ "application/json": components["schemas"]["ErrorDocument"];
1123
+ };
1124
+ };
1125
+ 401: {
1126
+ headers: {
1127
+ [name: string]: unknown;
1128
+ };
1129
+ content: {
1130
+ "application/json": components["schemas"]["ErrorDocument"];
1131
+ };
1132
+ };
1133
+ 403: {
1134
+ headers: {
1135
+ [name: string]: unknown;
1136
+ };
1137
+ content: {
1138
+ "application/json": components["schemas"]["ErrorDocument"];
1139
+ };
1140
+ };
1141
+ 404: {
1142
+ headers: {
1143
+ [name: string]: unknown;
1144
+ };
1145
+ content: {
1146
+ "application/json": components["schemas"]["ErrorDocument"];
1147
+ };
1148
+ };
1149
+ 409: {
1150
+ headers: {
1151
+ [name: string]: unknown;
1152
+ };
1153
+ content: {
1154
+ "application/json": components["schemas"]["ErrorDocument"];
1155
+ };
1156
+ };
1157
+ 410: {
1158
+ headers: {
1159
+ [name: string]: unknown;
1160
+ };
1161
+ content: {
1162
+ "application/json": components["schemas"]["ErrorDocument"];
1163
+ };
1164
+ };
1165
+ 429: {
1166
+ headers: {
1167
+ [name: string]: unknown;
1168
+ };
1169
+ content: {
1170
+ "application/json": components["schemas"]["ErrorDocument"];
1171
+ };
1172
+ };
1173
+ 502: {
1174
+ headers: {
1175
+ [name: string]: unknown;
1176
+ };
1177
+ content: {
1178
+ "application/json": components["schemas"]["ErrorDocument"];
1179
+ };
1180
+ };
1181
+ 503: {
1182
+ headers: {
1183
+ [name: string]: unknown;
1184
+ };
1185
+ content: {
1186
+ "application/json": components["schemas"]["ErrorDocument"];
1187
+ };
1188
+ };
1189
+ };
1190
+ };
1191
+ getAgent: {
1192
+ parameters: {
1193
+ query?: never;
1194
+ header?: never;
1195
+ path: {
1196
+ agent_id: string;
1197
+ };
1198
+ cookie?: never;
1199
+ };
1200
+ requestBody?: never;
1201
+ responses: {
1202
+ /** @description Success */200: {
1203
+ headers: {
1204
+ [name: string]: unknown;
1205
+ };
1206
+ content: {
1207
+ "application/json": components["schemas"]["AgentView"];
1208
+ };
1209
+ };
1210
+ 400: {
1211
+ headers: {
1212
+ [name: string]: unknown;
1213
+ };
1214
+ content: {
1215
+ "application/json": components["schemas"]["ErrorDocument"];
1216
+ };
1217
+ };
1218
+ 401: {
1219
+ headers: {
1220
+ [name: string]: unknown;
1221
+ };
1222
+ content: {
1223
+ "application/json": components["schemas"]["ErrorDocument"];
1224
+ };
1225
+ };
1226
+ 403: {
1227
+ headers: {
1228
+ [name: string]: unknown;
1229
+ };
1230
+ content: {
1231
+ "application/json": components["schemas"]["ErrorDocument"];
1232
+ };
1233
+ };
1234
+ 404: {
1235
+ headers: {
1236
+ [name: string]: unknown;
1237
+ };
1238
+ content: {
1239
+ "application/json": components["schemas"]["ErrorDocument"];
1240
+ };
1241
+ };
1242
+ 409: {
1243
+ headers: {
1244
+ [name: string]: unknown;
1245
+ };
1246
+ content: {
1247
+ "application/json": components["schemas"]["ErrorDocument"];
1248
+ };
1249
+ };
1250
+ 410: {
1251
+ headers: {
1252
+ [name: string]: unknown;
1253
+ };
1254
+ content: {
1255
+ "application/json": components["schemas"]["ErrorDocument"];
1256
+ };
1257
+ };
1258
+ 429: {
1259
+ headers: {
1260
+ [name: string]: unknown;
1261
+ };
1262
+ content: {
1263
+ "application/json": components["schemas"]["ErrorDocument"];
1264
+ };
1265
+ };
1266
+ 502: {
1267
+ headers: {
1268
+ [name: string]: unknown;
1269
+ };
1270
+ content: {
1271
+ "application/json": components["schemas"]["ErrorDocument"];
1272
+ };
1273
+ };
1274
+ 503: {
1275
+ headers: {
1276
+ [name: string]: unknown;
1277
+ };
1278
+ content: {
1279
+ "application/json": components["schemas"]["ErrorDocument"];
1280
+ };
1281
+ };
1282
+ };
1283
+ };
1284
+ getWallet: {
1285
+ parameters: {
1286
+ query?: never;
1287
+ header?: never;
1288
+ path: {
1289
+ agent_id: string;
1290
+ };
1291
+ cookie?: never;
1292
+ };
1293
+ requestBody?: never;
1294
+ responses: {
1295
+ /** @description Success */200: {
1296
+ headers: {
1297
+ [name: string]: unknown;
1298
+ };
1299
+ content: {
1300
+ "application/json": {
1301
+ wallet_id: string;
1302
+ near_account_id: string;
1303
+ };
1304
+ };
1305
+ };
1306
+ 400: {
1307
+ headers: {
1308
+ [name: string]: unknown;
1309
+ };
1310
+ content: {
1311
+ "application/json": components["schemas"]["ErrorDocument"];
1312
+ };
1313
+ };
1314
+ 401: {
1315
+ headers: {
1316
+ [name: string]: unknown;
1317
+ };
1318
+ content: {
1319
+ "application/json": components["schemas"]["ErrorDocument"];
1320
+ };
1321
+ };
1322
+ 403: {
1323
+ headers: {
1324
+ [name: string]: unknown;
1325
+ };
1326
+ content: {
1327
+ "application/json": components["schemas"]["ErrorDocument"];
1328
+ };
1329
+ };
1330
+ 404: {
1331
+ headers: {
1332
+ [name: string]: unknown;
1333
+ };
1334
+ content: {
1335
+ "application/json": components["schemas"]["ErrorDocument"];
1336
+ };
1337
+ };
1338
+ 409: {
1339
+ headers: {
1340
+ [name: string]: unknown;
1341
+ };
1342
+ content: {
1343
+ "application/json": components["schemas"]["ErrorDocument"];
1344
+ };
1345
+ };
1346
+ 410: {
1347
+ headers: {
1348
+ [name: string]: unknown;
1349
+ };
1350
+ content: {
1351
+ "application/json": components["schemas"]["ErrorDocument"];
1352
+ };
1353
+ };
1354
+ 429: {
1355
+ headers: {
1356
+ [name: string]: unknown;
1357
+ };
1358
+ content: {
1359
+ "application/json": components["schemas"]["ErrorDocument"];
1360
+ };
1361
+ };
1362
+ 502: {
1363
+ headers: {
1364
+ [name: string]: unknown;
1365
+ };
1366
+ content: {
1367
+ "application/json": components["schemas"]["ErrorDocument"];
1368
+ };
1369
+ };
1370
+ 503: {
1371
+ headers: {
1372
+ [name: string]: unknown;
1373
+ };
1374
+ content: {
1375
+ "application/json": components["schemas"]["ErrorDocument"];
1376
+ };
1377
+ };
1378
+ };
1379
+ };
1380
+ getBalances: {
1381
+ parameters: {
1382
+ query?: {
1383
+ source?: "public" | "confidential";
1384
+ asset?: string;
1385
+ };
1386
+ header?: never;
1387
+ path: {
1388
+ agent_id: string;
1389
+ };
1390
+ cookie?: never;
1391
+ };
1392
+ requestBody?: never;
1393
+ responses: {
1394
+ /** @description Success */200: {
1395
+ headers: {
1396
+ [name: string]: unknown;
1397
+ };
1398
+ content: {
1399
+ "application/json": {
1400
+ near_account_id: string; /** @enum {string} */
1401
+ source: "public" | "confidential";
1402
+ balances: {
1403
+ asset_id: string;
1404
+ symbol: string | null;
1405
+ decimals: number | null;
1406
+ blockchain: string | null;
1407
+ price: number | null;
1408
+ price_updated_at: string | null;
1409
+ price_expires_at: string | null;
1410
+ balance_raw: string;
1411
+ balance: string | null;
1412
+ }[];
1413
+ };
1414
+ };
1415
+ };
1416
+ 400: {
1417
+ headers: {
1418
+ [name: string]: unknown;
1419
+ };
1420
+ content: {
1421
+ "application/json": components["schemas"]["ErrorDocument"];
1422
+ };
1423
+ };
1424
+ 401: {
1425
+ headers: {
1426
+ [name: string]: unknown;
1427
+ };
1428
+ content: {
1429
+ "application/json": components["schemas"]["ErrorDocument"];
1430
+ };
1431
+ };
1432
+ 403: {
1433
+ headers: {
1434
+ [name: string]: unknown;
1435
+ };
1436
+ content: {
1437
+ "application/json": components["schemas"]["ErrorDocument"];
1438
+ };
1439
+ };
1440
+ 404: {
1441
+ headers: {
1442
+ [name: string]: unknown;
1443
+ };
1444
+ content: {
1445
+ "application/json": components["schemas"]["ErrorDocument"];
1446
+ };
1447
+ };
1448
+ 409: {
1449
+ headers: {
1450
+ [name: string]: unknown;
1451
+ };
1452
+ content: {
1453
+ "application/json": components["schemas"]["ErrorDocument"];
1454
+ };
1455
+ };
1456
+ 410: {
1457
+ headers: {
1458
+ [name: string]: unknown;
1459
+ };
1460
+ content: {
1461
+ "application/json": components["schemas"]["ErrorDocument"];
1462
+ };
1463
+ };
1464
+ 429: {
1465
+ headers: {
1466
+ [name: string]: unknown;
1467
+ };
1468
+ content: {
1469
+ "application/json": components["schemas"]["ErrorDocument"];
1470
+ };
1471
+ };
1472
+ 502: {
1473
+ headers: {
1474
+ [name: string]: unknown;
1475
+ };
1476
+ content: {
1477
+ "application/json": components["schemas"]["ErrorDocument"];
1478
+ };
1479
+ };
1480
+ 503: {
1481
+ headers: {
1482
+ [name: string]: unknown;
1483
+ };
1484
+ content: {
1485
+ "application/json": components["schemas"]["ErrorDocument"];
1486
+ };
1487
+ };
1488
+ };
1489
+ };
1490
+ getPolicy: {
1491
+ parameters: {
1492
+ query?: never;
1493
+ header?: never;
1494
+ path: {
1495
+ agent_id: string;
1496
+ };
1497
+ cookie?: never;
1498
+ };
1499
+ requestBody?: never;
1500
+ responses: {
1501
+ /** @description Success */200: {
1502
+ headers: {
1503
+ [name: string]: unknown;
1504
+ };
1505
+ content: {
1506
+ "application/json": components["schemas"]["PolicyView"];
1507
+ };
1508
+ };
1509
+ 400: {
1510
+ headers: {
1511
+ [name: string]: unknown;
1512
+ };
1513
+ content: {
1514
+ "application/json": components["schemas"]["ErrorDocument"];
1515
+ };
1516
+ };
1517
+ 401: {
1518
+ headers: {
1519
+ [name: string]: unknown;
1520
+ };
1521
+ content: {
1522
+ "application/json": components["schemas"]["ErrorDocument"];
1523
+ };
1524
+ };
1525
+ 403: {
1526
+ headers: {
1527
+ [name: string]: unknown;
1528
+ };
1529
+ content: {
1530
+ "application/json": components["schemas"]["ErrorDocument"];
1531
+ };
1532
+ };
1533
+ 404: {
1534
+ headers: {
1535
+ [name: string]: unknown;
1536
+ };
1537
+ content: {
1538
+ "application/json": components["schemas"]["ErrorDocument"];
1539
+ };
1540
+ };
1541
+ 409: {
1542
+ headers: {
1543
+ [name: string]: unknown;
1544
+ };
1545
+ content: {
1546
+ "application/json": components["schemas"]["ErrorDocument"];
1547
+ };
1548
+ };
1549
+ 410: {
1550
+ headers: {
1551
+ [name: string]: unknown;
1552
+ };
1553
+ content: {
1554
+ "application/json": components["schemas"]["ErrorDocument"];
1555
+ };
1556
+ };
1557
+ 429: {
1558
+ headers: {
1559
+ [name: string]: unknown;
1560
+ };
1561
+ content: {
1562
+ "application/json": components["schemas"]["ErrorDocument"];
1563
+ };
1564
+ };
1565
+ 502: {
1566
+ headers: {
1567
+ [name: string]: unknown;
1568
+ };
1569
+ content: {
1570
+ "application/json": components["schemas"]["ErrorDocument"];
1571
+ };
1572
+ };
1573
+ 503: {
1574
+ headers: {
1575
+ [name: string]: unknown;
1576
+ };
1577
+ content: {
1578
+ "application/json": components["schemas"]["ErrorDocument"];
1579
+ };
1580
+ };
1581
+ };
1582
+ };
1583
+ getPolicyHistory: {
1584
+ parameters: {
1585
+ query?: {
1586
+ cursor?: number;
1587
+ limit?: number;
1588
+ };
1589
+ header?: never;
1590
+ path: {
1591
+ agent_id: string;
1592
+ };
1593
+ cookie?: never;
1594
+ };
1595
+ requestBody?: never;
1596
+ responses: {
1597
+ /** @description Success */200: {
1598
+ headers: {
1599
+ [name: string]: unknown;
1600
+ };
1601
+ content: {
1602
+ "application/json": {
1603
+ data: {
1604
+ wallet_id: string;
1605
+ revision: number | null;
1606
+ policy_hash: string | null; /** @enum {string} */
1607
+ status: "NONE" | "SIGNED" | "APPLIED" | "FAILED";
1608
+ applied_at: string | null;
1609
+ transaction_hash: string | null;
1610
+ policy: components["schemas"]["Policy"] | null;
1611
+ }[];
1612
+ next_cursor: number | null;
1613
+ };
1614
+ };
1615
+ };
1616
+ 400: {
1617
+ headers: {
1618
+ [name: string]: unknown;
1619
+ };
1620
+ content: {
1621
+ "application/json": components["schemas"]["ErrorDocument"];
1622
+ };
1623
+ };
1624
+ 401: {
1625
+ headers: {
1626
+ [name: string]: unknown;
1627
+ };
1628
+ content: {
1629
+ "application/json": components["schemas"]["ErrorDocument"];
1630
+ };
1631
+ };
1632
+ 403: {
1633
+ headers: {
1634
+ [name: string]: unknown;
1635
+ };
1636
+ content: {
1637
+ "application/json": components["schemas"]["ErrorDocument"];
1638
+ };
1639
+ };
1640
+ 404: {
1641
+ headers: {
1642
+ [name: string]: unknown;
1643
+ };
1644
+ content: {
1645
+ "application/json": components["schemas"]["ErrorDocument"];
1646
+ };
1647
+ };
1648
+ 409: {
1649
+ headers: {
1650
+ [name: string]: unknown;
1651
+ };
1652
+ content: {
1653
+ "application/json": components["schemas"]["ErrorDocument"];
1654
+ };
1655
+ };
1656
+ 410: {
1657
+ headers: {
1658
+ [name: string]: unknown;
1659
+ };
1660
+ content: {
1661
+ "application/json": components["schemas"]["ErrorDocument"];
1662
+ };
1663
+ };
1664
+ 429: {
1665
+ headers: {
1666
+ [name: string]: unknown;
1667
+ };
1668
+ content: {
1669
+ "application/json": components["schemas"]["ErrorDocument"];
1670
+ };
1671
+ };
1672
+ 502: {
1673
+ headers: {
1674
+ [name: string]: unknown;
1675
+ };
1676
+ content: {
1677
+ "application/json": components["schemas"]["ErrorDocument"];
1678
+ };
1679
+ };
1680
+ 503: {
1681
+ headers: {
1682
+ [name: string]: unknown;
1683
+ };
1684
+ content: {
1685
+ "application/json": components["schemas"]["ErrorDocument"];
1686
+ };
1687
+ };
1688
+ };
1689
+ };
1690
+ listGrants: {
1691
+ parameters: {
1692
+ query?: never;
1693
+ header?: never;
1694
+ path: {
1695
+ agent_id: string;
1696
+ };
1697
+ cookie?: never;
1698
+ };
1699
+ requestBody?: never;
1700
+ responses: {
1701
+ /** @description Success */200: {
1702
+ headers: {
1703
+ [name: string]: unknown;
1704
+ };
1705
+ content: {
1706
+ "application/json": {
1707
+ data: components["schemas"]["GrantView"][];
1708
+ };
1709
+ };
1710
+ };
1711
+ 400: {
1712
+ headers: {
1713
+ [name: string]: unknown;
1714
+ };
1715
+ content: {
1716
+ "application/json": components["schemas"]["ErrorDocument"];
1717
+ };
1718
+ };
1719
+ 401: {
1720
+ headers: {
1721
+ [name: string]: unknown;
1722
+ };
1723
+ content: {
1724
+ "application/json": components["schemas"]["ErrorDocument"];
1725
+ };
1726
+ };
1727
+ 403: {
1728
+ headers: {
1729
+ [name: string]: unknown;
1730
+ };
1731
+ content: {
1732
+ "application/json": components["schemas"]["ErrorDocument"];
1733
+ };
1734
+ };
1735
+ 404: {
1736
+ headers: {
1737
+ [name: string]: unknown;
1738
+ };
1739
+ content: {
1740
+ "application/json": components["schemas"]["ErrorDocument"];
1741
+ };
1742
+ };
1743
+ 409: {
1744
+ headers: {
1745
+ [name: string]: unknown;
1746
+ };
1747
+ content: {
1748
+ "application/json": components["schemas"]["ErrorDocument"];
1749
+ };
1750
+ };
1751
+ 410: {
1752
+ headers: {
1753
+ [name: string]: unknown;
1754
+ };
1755
+ content: {
1756
+ "application/json": components["schemas"]["ErrorDocument"];
1757
+ };
1758
+ };
1759
+ 429: {
1760
+ headers: {
1761
+ [name: string]: unknown;
1762
+ };
1763
+ content: {
1764
+ "application/json": components["schemas"]["ErrorDocument"];
1765
+ };
1766
+ };
1767
+ 502: {
1768
+ headers: {
1769
+ [name: string]: unknown;
1770
+ };
1771
+ content: {
1772
+ "application/json": components["schemas"]["ErrorDocument"];
1773
+ };
1774
+ };
1775
+ 503: {
1776
+ headers: {
1777
+ [name: string]: unknown;
1778
+ };
1779
+ content: {
1780
+ "application/json": components["schemas"]["ErrorDocument"];
1781
+ };
1782
+ };
1783
+ };
1784
+ };
1785
+ listScheduledExecutions: {
1786
+ parameters: {
1787
+ query?: {
1788
+ cursor?: string;
1789
+ limit?: number;
1790
+ };
1791
+ header?: never;
1792
+ path: {
1793
+ agent_id: string;
1794
+ };
1795
+ cookie?: never;
1796
+ };
1797
+ requestBody?: never;
1798
+ responses: {
1799
+ /** @description Success */200: {
1800
+ headers: {
1801
+ [name: string]: unknown;
1802
+ };
1803
+ content: {
1804
+ "application/json": {
1805
+ data: {
1806
+ correlation_id: string; /** Format: date-time */
1807
+ execute_after: string; /** @enum {string} */
1808
+ state: "waiting" | "dispatching";
1809
+ action: string | null;
1810
+ }[];
1811
+ next_cursor: string | null;
1812
+ };
1813
+ };
1814
+ };
1815
+ 400: {
1816
+ headers: {
1817
+ [name: string]: unknown;
1818
+ };
1819
+ content: {
1820
+ "application/json": components["schemas"]["ErrorDocument"];
1821
+ };
1822
+ };
1823
+ 401: {
1824
+ headers: {
1825
+ [name: string]: unknown;
1826
+ };
1827
+ content: {
1828
+ "application/json": components["schemas"]["ErrorDocument"];
1829
+ };
1830
+ };
1831
+ 403: {
1832
+ headers: {
1833
+ [name: string]: unknown;
1834
+ };
1835
+ content: {
1836
+ "application/json": components["schemas"]["ErrorDocument"];
1837
+ };
1838
+ };
1839
+ 404: {
1840
+ headers: {
1841
+ [name: string]: unknown;
1842
+ };
1843
+ content: {
1844
+ "application/json": components["schemas"]["ErrorDocument"];
1845
+ };
1846
+ };
1847
+ 409: {
1848
+ headers: {
1849
+ [name: string]: unknown;
1850
+ };
1851
+ content: {
1852
+ "application/json": components["schemas"]["ErrorDocument"];
1853
+ };
1854
+ };
1855
+ 410: {
1856
+ headers: {
1857
+ [name: string]: unknown;
1858
+ };
1859
+ content: {
1860
+ "application/json": components["schemas"]["ErrorDocument"];
1861
+ };
1862
+ };
1863
+ 429: {
1864
+ headers: {
1865
+ [name: string]: unknown;
1866
+ };
1867
+ content: {
1868
+ "application/json": components["schemas"]["ErrorDocument"];
1869
+ };
1870
+ };
1871
+ 502: {
1872
+ headers: {
1873
+ [name: string]: unknown;
1874
+ };
1875
+ content: {
1876
+ "application/json": components["schemas"]["ErrorDocument"];
1877
+ };
1878
+ };
1879
+ 503: {
1880
+ headers: {
1881
+ [name: string]: unknown;
1882
+ };
1883
+ content: {
1884
+ "application/json": components["schemas"]["ErrorDocument"];
1885
+ };
1886
+ };
1887
+ };
1888
+ };
1889
+ getContainment: {
1890
+ parameters: {
1891
+ query?: {
1892
+ grants_cursor?: string;
1893
+ operations_cursor?: string;
1894
+ };
1895
+ header?: never;
1896
+ path: {
1897
+ agent_id: string;
1898
+ };
1899
+ cookie?: never;
1900
+ };
1901
+ requestBody?: never;
1902
+ responses: {
1903
+ /** @description Success */200: {
1904
+ headers: {
1905
+ [name: string]: unknown;
1906
+ };
1907
+ content: {
1908
+ "application/json": {
1909
+ generated_at: string;
1910
+ wallet: {
1911
+ wallet_id: string | null;
1912
+ near_account_id: string | null;
1913
+ status: string;
1914
+ } | null;
1915
+ grants: {
1916
+ has_more: boolean;
1917
+ next_cursor: string | null;
1918
+ data: {
1919
+ [key: string]: unknown;
1920
+ }[];
1921
+ };
1922
+ pending_operations: {
1923
+ has_more: boolean;
1924
+ next_cursor: string | null;
1925
+ data: {
1926
+ [key: string]: unknown;
1927
+ }[];
1928
+ };
1929
+ provider_boundary: {
1930
+ /** @constant */enforcement: "unverified"; /** @constant */
1931
+ direct_provider_key_bypass: "unverified";
1932
+ };
1933
+ };
1934
+ };
1935
+ };
1936
+ 400: {
1937
+ headers: {
1938
+ [name: string]: unknown;
1939
+ };
1940
+ content: {
1941
+ "application/json": components["schemas"]["ErrorDocument"];
1942
+ };
1943
+ };
1944
+ 401: {
1945
+ headers: {
1946
+ [name: string]: unknown;
1947
+ };
1948
+ content: {
1949
+ "application/json": components["schemas"]["ErrorDocument"];
1950
+ };
1951
+ };
1952
+ 403: {
1953
+ headers: {
1954
+ [name: string]: unknown;
1955
+ };
1956
+ content: {
1957
+ "application/json": components["schemas"]["ErrorDocument"];
1958
+ };
1959
+ };
1960
+ 404: {
1961
+ headers: {
1962
+ [name: string]: unknown;
1963
+ };
1964
+ content: {
1965
+ "application/json": components["schemas"]["ErrorDocument"];
1966
+ };
1967
+ };
1968
+ 409: {
1969
+ headers: {
1970
+ [name: string]: unknown;
1971
+ };
1972
+ content: {
1973
+ "application/json": components["schemas"]["ErrorDocument"];
1974
+ };
1975
+ };
1976
+ 410: {
1977
+ headers: {
1978
+ [name: string]: unknown;
1979
+ };
1980
+ content: {
1981
+ "application/json": components["schemas"]["ErrorDocument"];
1982
+ };
1983
+ };
1984
+ 429: {
1985
+ headers: {
1986
+ [name: string]: unknown;
1987
+ };
1988
+ content: {
1989
+ "application/json": components["schemas"]["ErrorDocument"];
1990
+ };
1991
+ };
1992
+ 502: {
1993
+ headers: {
1994
+ [name: string]: unknown;
1995
+ };
1996
+ content: {
1997
+ "application/json": components["schemas"]["ErrorDocument"];
1998
+ };
1999
+ };
2000
+ 503: {
2001
+ headers: {
2002
+ [name: string]: unknown;
2003
+ };
2004
+ content: {
2005
+ "application/json": components["schemas"]["ErrorDocument"];
2006
+ };
2007
+ };
2008
+ };
2009
+ };
2010
+ listApprovals: {
2011
+ parameters: {
2012
+ query?: never;
2013
+ header?: never;
2014
+ path: {
2015
+ agent_id: string;
2016
+ };
2017
+ cookie?: never;
2018
+ };
2019
+ requestBody?: never;
2020
+ responses: {
2021
+ /** @description Success */200: {
2022
+ headers: {
2023
+ [name: string]: unknown;
2024
+ };
2025
+ content: {
2026
+ "application/json": {
2027
+ data: {
2028
+ /** Format: uuid */approval_id: string;
2029
+ wallet_id: string;
2030
+ wallet_pubkey: string;
2031
+ request_hash: string; /** @enum {string} */
2032
+ status: "PENDING" | "APPROVED" | "REJECTED" | "EXPIRED";
2033
+ request_type: string;
2034
+ request_data: {
2035
+ [key: string]: unknown;
2036
+ };
2037
+ required_approvals: number;
2038
+ expires_at: string;
2039
+ }[];
2040
+ };
2041
+ };
2042
+ };
2043
+ 400: {
2044
+ headers: {
2045
+ [name: string]: unknown;
2046
+ };
2047
+ content: {
2048
+ "application/json": components["schemas"]["ErrorDocument"];
2049
+ };
2050
+ };
2051
+ 401: {
2052
+ headers: {
2053
+ [name: string]: unknown;
2054
+ };
2055
+ content: {
2056
+ "application/json": components["schemas"]["ErrorDocument"];
2057
+ };
2058
+ };
2059
+ 403: {
2060
+ headers: {
2061
+ [name: string]: unknown;
2062
+ };
2063
+ content: {
2064
+ "application/json": components["schemas"]["ErrorDocument"];
2065
+ };
2066
+ };
2067
+ 404: {
2068
+ headers: {
2069
+ [name: string]: unknown;
2070
+ };
2071
+ content: {
2072
+ "application/json": components["schemas"]["ErrorDocument"];
2073
+ };
2074
+ };
2075
+ 409: {
2076
+ headers: {
2077
+ [name: string]: unknown;
2078
+ };
2079
+ content: {
2080
+ "application/json": components["schemas"]["ErrorDocument"];
2081
+ };
2082
+ };
2083
+ 410: {
2084
+ headers: {
2085
+ [name: string]: unknown;
2086
+ };
2087
+ content: {
2088
+ "application/json": components["schemas"]["ErrorDocument"];
2089
+ };
2090
+ };
2091
+ 429: {
2092
+ headers: {
2093
+ [name: string]: unknown;
2094
+ };
2095
+ content: {
2096
+ "application/json": components["schemas"]["ErrorDocument"];
2097
+ };
2098
+ };
2099
+ 502: {
2100
+ headers: {
2101
+ [name: string]: unknown;
2102
+ };
2103
+ content: {
2104
+ "application/json": components["schemas"]["ErrorDocument"];
2105
+ };
2106
+ };
2107
+ 503: {
2108
+ headers: {
2109
+ [name: string]: unknown;
2110
+ };
2111
+ content: {
2112
+ "application/json": components["schemas"]["ErrorDocument"];
2113
+ };
2114
+ };
2115
+ };
2116
+ };
2117
+ getApproval: {
2118
+ parameters: {
2119
+ query?: never;
2120
+ header?: never;
2121
+ path: {
2122
+ agent_id: string;
2123
+ approval_id: string;
2124
+ };
2125
+ cookie?: never;
2126
+ };
2127
+ requestBody?: never;
2128
+ responses: {
2129
+ /** @description Success */200: {
2130
+ headers: {
2131
+ [name: string]: unknown;
2132
+ };
2133
+ content: {
2134
+ "application/json": {
2135
+ /** Format: uuid */approval_id: string;
2136
+ wallet_id: string;
2137
+ wallet_pubkey: string;
2138
+ request_hash: string; /** @enum {string} */
2139
+ status: "PENDING" | "APPROVED" | "REJECTED" | "EXPIRED";
2140
+ request_type: string;
2141
+ request_data: {
2142
+ [key: string]: unknown;
2143
+ };
2144
+ required_approvals: number;
2145
+ expires_at: string;
2146
+ };
2147
+ };
2148
+ };
2149
+ 400: {
2150
+ headers: {
2151
+ [name: string]: unknown;
2152
+ };
2153
+ content: {
2154
+ "application/json": components["schemas"]["ErrorDocument"];
2155
+ };
2156
+ };
2157
+ 401: {
2158
+ headers: {
2159
+ [name: string]: unknown;
2160
+ };
2161
+ content: {
2162
+ "application/json": components["schemas"]["ErrorDocument"];
2163
+ };
2164
+ };
2165
+ 403: {
2166
+ headers: {
2167
+ [name: string]: unknown;
2168
+ };
2169
+ content: {
2170
+ "application/json": components["schemas"]["ErrorDocument"];
2171
+ };
2172
+ };
2173
+ 404: {
2174
+ headers: {
2175
+ [name: string]: unknown;
2176
+ };
2177
+ content: {
2178
+ "application/json": components["schemas"]["ErrorDocument"];
2179
+ };
2180
+ };
2181
+ 409: {
2182
+ headers: {
2183
+ [name: string]: unknown;
2184
+ };
2185
+ content: {
2186
+ "application/json": components["schemas"]["ErrorDocument"];
2187
+ };
2188
+ };
2189
+ 410: {
2190
+ headers: {
2191
+ [name: string]: unknown;
2192
+ };
2193
+ content: {
2194
+ "application/json": components["schemas"]["ErrorDocument"];
2195
+ };
2196
+ };
2197
+ 429: {
2198
+ headers: {
2199
+ [name: string]: unknown;
2200
+ };
2201
+ content: {
2202
+ "application/json": components["schemas"]["ErrorDocument"];
2203
+ };
2204
+ };
2205
+ 502: {
2206
+ headers: {
2207
+ [name: string]: unknown;
2208
+ };
2209
+ content: {
2210
+ "application/json": components["schemas"]["ErrorDocument"];
2211
+ };
2212
+ };
2213
+ 503: {
2214
+ headers: {
2215
+ [name: string]: unknown;
2216
+ };
2217
+ content: {
2218
+ "application/json": components["schemas"]["ErrorDocument"];
2219
+ };
2220
+ };
2221
+ };
2222
+ };
2223
+ getAddress: {
2224
+ parameters: {
2225
+ query?: never;
2226
+ header?: never;
2227
+ path: {
2228
+ agent_id: string;
2229
+ chain: "near";
2230
+ };
2231
+ cookie?: never;
2232
+ };
2233
+ requestBody?: never;
2234
+ responses: {
2235
+ /** @description Success */200: {
2236
+ headers: {
2237
+ [name: string]: unknown;
2238
+ };
2239
+ content: {
2240
+ "application/json": {
2241
+ /** @constant */chain: "near";
2242
+ address: string;
2243
+ } & {
2244
+ [key: string]: unknown;
2245
+ };
2246
+ };
2247
+ };
2248
+ 400: {
2249
+ headers: {
2250
+ [name: string]: unknown;
2251
+ };
2252
+ content: {
2253
+ "application/json": components["schemas"]["ErrorDocument"];
2254
+ };
2255
+ };
2256
+ 401: {
2257
+ headers: {
2258
+ [name: string]: unknown;
2259
+ };
2260
+ content: {
2261
+ "application/json": components["schemas"]["ErrorDocument"];
2262
+ };
2263
+ };
2264
+ 403: {
2265
+ headers: {
2266
+ [name: string]: unknown;
2267
+ };
2268
+ content: {
2269
+ "application/json": components["schemas"]["ErrorDocument"];
2270
+ };
2271
+ };
2272
+ 404: {
2273
+ headers: {
2274
+ [name: string]: unknown;
2275
+ };
2276
+ content: {
2277
+ "application/json": components["schemas"]["ErrorDocument"];
2278
+ };
2279
+ };
2280
+ 409: {
2281
+ headers: {
2282
+ [name: string]: unknown;
2283
+ };
2284
+ content: {
2285
+ "application/json": components["schemas"]["ErrorDocument"];
2286
+ };
2287
+ };
2288
+ 410: {
2289
+ headers: {
2290
+ [name: string]: unknown;
2291
+ };
2292
+ content: {
2293
+ "application/json": components["schemas"]["ErrorDocument"];
2294
+ };
2295
+ };
2296
+ 429: {
2297
+ headers: {
2298
+ [name: string]: unknown;
2299
+ };
2300
+ content: {
2301
+ "application/json": components["schemas"]["ErrorDocument"];
2302
+ };
2303
+ };
2304
+ 502: {
2305
+ headers: {
2306
+ [name: string]: unknown;
2307
+ };
2308
+ content: {
2309
+ "application/json": components["schemas"]["ErrorDocument"];
2310
+ };
2311
+ };
2312
+ 503: {
2313
+ headers: {
2314
+ [name: string]: unknown;
2315
+ };
2316
+ content: {
2317
+ "application/json": components["schemas"]["ErrorDocument"];
2318
+ };
2319
+ };
2320
+ };
2321
+ };
2322
+ listProviderRecords: {
2323
+ parameters: {
2324
+ query?: {
2325
+ limit?: number;
2326
+ offset?: number;
2327
+ type?: string;
2328
+ };
2329
+ header?: never;
2330
+ path: {
2331
+ agent_id: string;
2332
+ kind: "requests" | "audit" | "deposits" | "deposit_history";
2333
+ };
2334
+ cookie?: never;
2335
+ };
2336
+ requestBody?: never;
2337
+ responses: {
2338
+ /** @description Success */200: {
2339
+ headers: {
2340
+ [name: string]: unknown;
2341
+ };
2342
+ content: {
2343
+ "application/json": {
2344
+ data: unknown;
2345
+ };
2346
+ };
2347
+ };
2348
+ 400: {
2349
+ headers: {
2350
+ [name: string]: unknown;
2351
+ };
2352
+ content: {
2353
+ "application/json": components["schemas"]["ErrorDocument"];
2354
+ };
2355
+ };
2356
+ 401: {
2357
+ headers: {
2358
+ [name: string]: unknown;
2359
+ };
2360
+ content: {
2361
+ "application/json": components["schemas"]["ErrorDocument"];
2362
+ };
2363
+ };
2364
+ 403: {
2365
+ headers: {
2366
+ [name: string]: unknown;
2367
+ };
2368
+ content: {
2369
+ "application/json": components["schemas"]["ErrorDocument"];
2370
+ };
2371
+ };
2372
+ 404: {
2373
+ headers: {
2374
+ [name: string]: unknown;
2375
+ };
2376
+ content: {
2377
+ "application/json": components["schemas"]["ErrorDocument"];
2378
+ };
2379
+ };
2380
+ 409: {
2381
+ headers: {
2382
+ [name: string]: unknown;
2383
+ };
2384
+ content: {
2385
+ "application/json": components["schemas"]["ErrorDocument"];
2386
+ };
2387
+ };
2388
+ 410: {
2389
+ headers: {
2390
+ [name: string]: unknown;
2391
+ };
2392
+ content: {
2393
+ "application/json": components["schemas"]["ErrorDocument"];
2394
+ };
2395
+ };
2396
+ 429: {
2397
+ headers: {
2398
+ [name: string]: unknown;
2399
+ };
2400
+ content: {
2401
+ "application/json": components["schemas"]["ErrorDocument"];
2402
+ };
2403
+ };
2404
+ 502: {
2405
+ headers: {
2406
+ [name: string]: unknown;
2407
+ };
2408
+ content: {
2409
+ "application/json": components["schemas"]["ErrorDocument"];
2410
+ };
2411
+ };
2412
+ 503: {
2413
+ headers: {
2414
+ [name: string]: unknown;
2415
+ };
2416
+ content: {
2417
+ "application/json": components["schemas"]["ErrorDocument"];
2418
+ };
2419
+ };
2420
+ };
2421
+ };
2422
+ swap: {
2423
+ parameters: {
2424
+ query?: never;
2425
+ header: {
2426
+ /** @description Stable key for one logical request. Replays with the same key and body return the original result; a different body is refused with `idempotency_conflict`. */"Idempotency-Key": string;
2427
+ };
2428
+ path: {
2429
+ agent_id: string;
2430
+ };
2431
+ cookie?: never;
2432
+ };
2433
+ requestBody: {
2434
+ content: {
2435
+ "application/json": {
2436
+ origin_asset: string;
2437
+ destination_asset: string;
2438
+ amount: string;
2439
+ min_amount_out?: string; /** @default false */
2440
+ confidential?: boolean; /** @default false */
2441
+ dry?: boolean;
2442
+ };
2443
+ };
2444
+ };
2445
+ responses: {
2446
+ /** @description Success */202: {
2447
+ headers: {
2448
+ [name: string]: unknown;
2449
+ };
2450
+ content: {
2451
+ "application/json": components["schemas"]["StatusResponse"] | {
2452
+ /** @constant */dry: true; /** @enum {string} */
2453
+ type: "swap" | "withdraw";
2454
+ quote: {
2455
+ [key: string]: unknown;
2456
+ };
2457
+ };
2458
+ };
2459
+ };
2460
+ 400: {
2461
+ headers: {
2462
+ [name: string]: unknown;
2463
+ };
2464
+ content: {
2465
+ "application/json": components["schemas"]["ErrorDocument"];
2466
+ };
2467
+ };
2468
+ 401: {
2469
+ headers: {
2470
+ [name: string]: unknown;
2471
+ };
2472
+ content: {
2473
+ "application/json": components["schemas"]["ErrorDocument"];
2474
+ };
2475
+ };
2476
+ 403: {
2477
+ headers: {
2478
+ [name: string]: unknown;
2479
+ };
2480
+ content: {
2481
+ "application/json": components["schemas"]["ErrorDocument"];
2482
+ };
2483
+ };
2484
+ 404: {
2485
+ headers: {
2486
+ [name: string]: unknown;
2487
+ };
2488
+ content: {
2489
+ "application/json": components["schemas"]["ErrorDocument"];
2490
+ };
2491
+ };
2492
+ 409: {
2493
+ headers: {
2494
+ [name: string]: unknown;
2495
+ };
2496
+ content: {
2497
+ "application/json": components["schemas"]["ErrorDocument"];
2498
+ };
2499
+ };
2500
+ 410: {
2501
+ headers: {
2502
+ [name: string]: unknown;
2503
+ };
2504
+ content: {
2505
+ "application/json": components["schemas"]["ErrorDocument"];
2506
+ };
2507
+ };
2508
+ 429: {
2509
+ headers: {
2510
+ [name: string]: unknown;
2511
+ };
2512
+ content: {
2513
+ "application/json": components["schemas"]["ErrorDocument"];
2514
+ };
2515
+ };
2516
+ 502: {
2517
+ headers: {
2518
+ [name: string]: unknown;
2519
+ };
2520
+ content: {
2521
+ "application/json": components["schemas"]["ErrorDocument"];
2522
+ };
2523
+ };
2524
+ 503: {
2525
+ headers: {
2526
+ [name: string]: unknown;
2527
+ };
2528
+ content: {
2529
+ "application/json": components["schemas"]["ErrorDocument"];
2530
+ };
2531
+ };
2532
+ };
2533
+ };
2534
+ withdraw: {
2535
+ parameters: {
2536
+ query?: never;
2537
+ header: {
2538
+ /** @description Stable key for one logical request. Replays with the same key and body return the original result; a different body is refused with `idempotency_conflict`. */"Idempotency-Key": string;
2539
+ };
2540
+ path: {
2541
+ agent_id: string;
2542
+ };
2543
+ cookie?: never;
2544
+ };
2545
+ requestBody: {
2546
+ content: {
2547
+ "application/json": {
2548
+ asset: string;
2549
+ amount: string;
2550
+ chain: string;
2551
+ recipient: string;
2552
+ memo?: string; /** @default false */
2553
+ confidential?: boolean; /** @default false */
2554
+ async?: boolean; /** @default false */
2555
+ dry?: boolean;
2556
+ };
2557
+ };
2558
+ };
2559
+ responses: {
2560
+ /** @description Success */202: {
2561
+ headers: {
2562
+ [name: string]: unknown;
2563
+ };
2564
+ content: {
2565
+ "application/json": components["schemas"]["StatusResponse"] | {
2566
+ /** @constant */dry: true; /** @enum {string} */
2567
+ type: "swap" | "withdraw";
2568
+ quote: {
2569
+ [key: string]: unknown;
2570
+ };
2571
+ };
2572
+ };
2573
+ };
2574
+ 400: {
2575
+ headers: {
2576
+ [name: string]: unknown;
2577
+ };
2578
+ content: {
2579
+ "application/json": components["schemas"]["ErrorDocument"];
2580
+ };
2581
+ };
2582
+ 401: {
2583
+ headers: {
2584
+ [name: string]: unknown;
2585
+ };
2586
+ content: {
2587
+ "application/json": components["schemas"]["ErrorDocument"];
2588
+ };
2589
+ };
2590
+ 403: {
2591
+ headers: {
2592
+ [name: string]: unknown;
2593
+ };
2594
+ content: {
2595
+ "application/json": components["schemas"]["ErrorDocument"];
2596
+ };
2597
+ };
2598
+ 404: {
2599
+ headers: {
2600
+ [name: string]: unknown;
2601
+ };
2602
+ content: {
2603
+ "application/json": components["schemas"]["ErrorDocument"];
2604
+ };
2605
+ };
2606
+ 409: {
2607
+ headers: {
2608
+ [name: string]: unknown;
2609
+ };
2610
+ content: {
2611
+ "application/json": components["schemas"]["ErrorDocument"];
2612
+ };
2613
+ };
2614
+ 410: {
2615
+ headers: {
2616
+ [name: string]: unknown;
2617
+ };
2618
+ content: {
2619
+ "application/json": components["schemas"]["ErrorDocument"];
2620
+ };
2621
+ };
2622
+ 429: {
2623
+ headers: {
2624
+ [name: string]: unknown;
2625
+ };
2626
+ content: {
2627
+ "application/json": components["schemas"]["ErrorDocument"];
2628
+ };
2629
+ };
2630
+ 502: {
2631
+ headers: {
2632
+ [name: string]: unknown;
2633
+ };
2634
+ content: {
2635
+ "application/json": components["schemas"]["ErrorDocument"];
2636
+ };
2637
+ };
2638
+ 503: {
2639
+ headers: {
2640
+ [name: string]: unknown;
2641
+ };
2642
+ content: {
2643
+ "application/json": components["schemas"]["ErrorDocument"];
2644
+ };
2645
+ };
2646
+ };
2647
+ };
2648
+ transfer: {
2649
+ parameters: {
2650
+ query?: never;
2651
+ header: {
2652
+ /** @description Stable key for one logical request. Replays with the same key and body return the original result; a different body is refused with `idempotency_conflict`. */"Idempotency-Key": string;
2653
+ };
2654
+ path: {
2655
+ agent_id: string;
2656
+ };
2657
+ cookie?: never;
2658
+ };
2659
+ requestBody: {
2660
+ content: {
2661
+ "application/json": {
2662
+ asset: string;
2663
+ amount: string;
2664
+ recipient: string; /** @default false */
2665
+ confidential?: boolean;
2666
+ };
2667
+ };
2668
+ };
2669
+ responses: {
2670
+ /** @description Success */202: {
2671
+ headers: {
2672
+ [name: string]: unknown;
2673
+ };
2674
+ content: {
2675
+ "application/json": components["schemas"]["StatusResponse"];
2676
+ };
2677
+ };
2678
+ 400: {
2679
+ headers: {
2680
+ [name: string]: unknown;
2681
+ };
2682
+ content: {
2683
+ "application/json": components["schemas"]["ErrorDocument"];
2684
+ };
2685
+ };
2686
+ 401: {
2687
+ headers: {
2688
+ [name: string]: unknown;
2689
+ };
2690
+ content: {
2691
+ "application/json": components["schemas"]["ErrorDocument"];
2692
+ };
2693
+ };
2694
+ 403: {
2695
+ headers: {
2696
+ [name: string]: unknown;
2697
+ };
2698
+ content: {
2699
+ "application/json": components["schemas"]["ErrorDocument"];
2700
+ };
2701
+ };
2702
+ 404: {
2703
+ headers: {
2704
+ [name: string]: unknown;
2705
+ };
2706
+ content: {
2707
+ "application/json": components["schemas"]["ErrorDocument"];
2708
+ };
2709
+ };
2710
+ 409: {
2711
+ headers: {
2712
+ [name: string]: unknown;
2713
+ };
2714
+ content: {
2715
+ "application/json": components["schemas"]["ErrorDocument"];
2716
+ };
2717
+ };
2718
+ 410: {
2719
+ headers: {
2720
+ [name: string]: unknown;
2721
+ };
2722
+ content: {
2723
+ "application/json": components["schemas"]["ErrorDocument"];
2724
+ };
2725
+ };
2726
+ 429: {
2727
+ headers: {
2728
+ [name: string]: unknown;
2729
+ };
2730
+ content: {
2731
+ "application/json": components["schemas"]["ErrorDocument"];
2732
+ };
2733
+ };
2734
+ 502: {
2735
+ headers: {
2736
+ [name: string]: unknown;
2737
+ };
2738
+ content: {
2739
+ "application/json": components["schemas"]["ErrorDocument"];
2740
+ };
2741
+ };
2742
+ 503: {
2743
+ headers: {
2744
+ [name: string]: unknown;
2745
+ };
2746
+ content: {
2747
+ "application/json": components["schemas"]["ErrorDocument"];
2748
+ };
2749
+ };
2750
+ };
2751
+ };
2752
+ shield: {
2753
+ parameters: {
2754
+ query?: never;
2755
+ header: {
2756
+ /** @description Stable key for one logical request. Replays with the same key and body return the original result; a different body is refused with `idempotency_conflict`. */"Idempotency-Key": string;
2757
+ };
2758
+ path: {
2759
+ agent_id: string;
2760
+ };
2761
+ cookie?: never;
2762
+ };
2763
+ requestBody: {
2764
+ content: {
2765
+ "application/json": {
2766
+ asset: string;
2767
+ amount: string;
2768
+ };
2769
+ };
2770
+ };
2771
+ responses: {
2772
+ /** @description Success */202: {
2773
+ headers: {
2774
+ [name: string]: unknown;
2775
+ };
2776
+ content: {
2777
+ "application/json": components["schemas"]["StatusResponse"];
2778
+ };
2779
+ };
2780
+ 400: {
2781
+ headers: {
2782
+ [name: string]: unknown;
2783
+ };
2784
+ content: {
2785
+ "application/json": components["schemas"]["ErrorDocument"];
2786
+ };
2787
+ };
2788
+ 401: {
2789
+ headers: {
2790
+ [name: string]: unknown;
2791
+ };
2792
+ content: {
2793
+ "application/json": components["schemas"]["ErrorDocument"];
2794
+ };
2795
+ };
2796
+ 403: {
2797
+ headers: {
2798
+ [name: string]: unknown;
2799
+ };
2800
+ content: {
2801
+ "application/json": components["schemas"]["ErrorDocument"];
2802
+ };
2803
+ };
2804
+ 404: {
2805
+ headers: {
2806
+ [name: string]: unknown;
2807
+ };
2808
+ content: {
2809
+ "application/json": components["schemas"]["ErrorDocument"];
2810
+ };
2811
+ };
2812
+ 409: {
2813
+ headers: {
2814
+ [name: string]: unknown;
2815
+ };
2816
+ content: {
2817
+ "application/json": components["schemas"]["ErrorDocument"];
2818
+ };
2819
+ };
2820
+ 410: {
2821
+ headers: {
2822
+ [name: string]: unknown;
2823
+ };
2824
+ content: {
2825
+ "application/json": components["schemas"]["ErrorDocument"];
2826
+ };
2827
+ };
2828
+ 429: {
2829
+ headers: {
2830
+ [name: string]: unknown;
2831
+ };
2832
+ content: {
2833
+ "application/json": components["schemas"]["ErrorDocument"];
2834
+ };
2835
+ };
2836
+ 502: {
2837
+ headers: {
2838
+ [name: string]: unknown;
2839
+ };
2840
+ content: {
2841
+ "application/json": components["schemas"]["ErrorDocument"];
2842
+ };
2843
+ };
2844
+ 503: {
2845
+ headers: {
2846
+ [name: string]: unknown;
2847
+ };
2848
+ content: {
2849
+ "application/json": components["schemas"]["ErrorDocument"];
2850
+ };
2851
+ };
2852
+ };
2853
+ };
2854
+ unshield: {
2855
+ parameters: {
2856
+ query?: never;
2857
+ header: {
2858
+ /** @description Stable key for one logical request. Replays with the same key and body return the original result; a different body is refused with `idempotency_conflict`. */"Idempotency-Key": string;
2859
+ };
2860
+ path: {
2861
+ agent_id: string;
2862
+ };
2863
+ cookie?: never;
2864
+ };
2865
+ requestBody: {
2866
+ content: {
2867
+ "application/json": {
2868
+ asset: string;
2869
+ amount: string;
2870
+ };
2871
+ };
2872
+ };
2873
+ responses: {
2874
+ /** @description Success */202: {
2875
+ headers: {
2876
+ [name: string]: unknown;
2877
+ };
2878
+ content: {
2879
+ "application/json": components["schemas"]["StatusResponse"];
2880
+ };
2881
+ };
2882
+ 400: {
2883
+ headers: {
2884
+ [name: string]: unknown;
2885
+ };
2886
+ content: {
2887
+ "application/json": components["schemas"]["ErrorDocument"];
2888
+ };
2889
+ };
2890
+ 401: {
2891
+ headers: {
2892
+ [name: string]: unknown;
2893
+ };
2894
+ content: {
2895
+ "application/json": components["schemas"]["ErrorDocument"];
2896
+ };
2897
+ };
2898
+ 403: {
2899
+ headers: {
2900
+ [name: string]: unknown;
2901
+ };
2902
+ content: {
2903
+ "application/json": components["schemas"]["ErrorDocument"];
2904
+ };
2905
+ };
2906
+ 404: {
2907
+ headers: {
2908
+ [name: string]: unknown;
2909
+ };
2910
+ content: {
2911
+ "application/json": components["schemas"]["ErrorDocument"];
2912
+ };
2913
+ };
2914
+ 409: {
2915
+ headers: {
2916
+ [name: string]: unknown;
2917
+ };
2918
+ content: {
2919
+ "application/json": components["schemas"]["ErrorDocument"];
2920
+ };
2921
+ };
2922
+ 410: {
2923
+ headers: {
2924
+ [name: string]: unknown;
2925
+ };
2926
+ content: {
2927
+ "application/json": components["schemas"]["ErrorDocument"];
2928
+ };
2929
+ };
2930
+ 429: {
2931
+ headers: {
2932
+ [name: string]: unknown;
2933
+ };
2934
+ content: {
2935
+ "application/json": components["schemas"]["ErrorDocument"];
2936
+ };
2937
+ };
2938
+ 502: {
2939
+ headers: {
2940
+ [name: string]: unknown;
2941
+ };
2942
+ content: {
2943
+ "application/json": components["schemas"]["ErrorDocument"];
2944
+ };
2945
+ };
2946
+ 503: {
2947
+ headers: {
2948
+ [name: string]: unknown;
2949
+ };
2950
+ content: {
2951
+ "application/json": components["schemas"]["ErrorDocument"];
2952
+ };
2953
+ };
2954
+ };
2955
+ };
2956
+ deposit: {
2957
+ parameters: {
2958
+ query?: never;
2959
+ header: {
2960
+ /** @description Stable key for one logical request. Replays with the same key and body return the original result; a different body is refused with `idempotency_conflict`. */"Idempotency-Key": string;
2961
+ };
2962
+ path: {
2963
+ agent_id: string;
2964
+ };
2965
+ cookie?: never;
2966
+ };
2967
+ requestBody: {
2968
+ content: {
2969
+ "application/json": {
2970
+ origin_asset: string;
2971
+ destination_asset?: string;
2972
+ amount: string;
2973
+ refund_to?: string; /** @default false */
2974
+ confidential?: boolean;
2975
+ };
2976
+ };
2977
+ };
2978
+ responses: {
2979
+ /** @description Success */202: {
2980
+ headers: {
2981
+ [name: string]: unknown;
2982
+ };
2983
+ content: {
2984
+ "application/json": components["schemas"]["StatusResponse"];
2985
+ };
2986
+ };
2987
+ 400: {
2988
+ headers: {
2989
+ [name: string]: unknown;
2990
+ };
2991
+ content: {
2992
+ "application/json": components["schemas"]["ErrorDocument"];
2993
+ };
2994
+ };
2995
+ 401: {
2996
+ headers: {
2997
+ [name: string]: unknown;
2998
+ };
2999
+ content: {
3000
+ "application/json": components["schemas"]["ErrorDocument"];
3001
+ };
3002
+ };
3003
+ 403: {
3004
+ headers: {
3005
+ [name: string]: unknown;
3006
+ };
3007
+ content: {
3008
+ "application/json": components["schemas"]["ErrorDocument"];
3009
+ };
3010
+ };
3011
+ 404: {
3012
+ headers: {
3013
+ [name: string]: unknown;
3014
+ };
3015
+ content: {
3016
+ "application/json": components["schemas"]["ErrorDocument"];
3017
+ };
3018
+ };
3019
+ 409: {
3020
+ headers: {
3021
+ [name: string]: unknown;
3022
+ };
3023
+ content: {
3024
+ "application/json": components["schemas"]["ErrorDocument"];
3025
+ };
3026
+ };
3027
+ 410: {
3028
+ headers: {
3029
+ [name: string]: unknown;
3030
+ };
3031
+ content: {
3032
+ "application/json": components["schemas"]["ErrorDocument"];
3033
+ };
3034
+ };
3035
+ 429: {
3036
+ headers: {
3037
+ [name: string]: unknown;
3038
+ };
3039
+ content: {
3040
+ "application/json": components["schemas"]["ErrorDocument"];
3041
+ };
3042
+ };
3043
+ 502: {
3044
+ headers: {
3045
+ [name: string]: unknown;
3046
+ };
3047
+ content: {
3048
+ "application/json": components["schemas"]["ErrorDocument"];
3049
+ };
3050
+ };
3051
+ 503: {
3052
+ headers: {
3053
+ [name: string]: unknown;
3054
+ };
3055
+ content: {
3056
+ "application/json": components["schemas"]["ErrorDocument"];
3057
+ };
3058
+ };
3059
+ };
3060
+ };
3061
+ recover: {
3062
+ parameters: {
3063
+ query?: never;
3064
+ header: {
3065
+ /** @description Stable key for one logical request. Replays with the same key and body return the original result; a different body is refused with `idempotency_conflict`. */"Idempotency-Key": string;
3066
+ };
3067
+ path: {
3068
+ agent_id: string;
3069
+ };
3070
+ cookie?: never;
3071
+ };
3072
+ requestBody: {
3073
+ content: {
3074
+ "application/json": {
3075
+ correlation_id: string;
3076
+ request: {
3077
+ origin_asset: string;
3078
+ destination_asset: string;
3079
+ amount: string;
3080
+ min_amount_out?: string; /** @default false */
3081
+ confidential?: boolean; /** @default false */
3082
+ dry?: boolean; /** @constant */
3083
+ type: "swap";
3084
+ } | {
3085
+ asset: string;
3086
+ amount: string;
3087
+ chain: string;
3088
+ recipient: string;
3089
+ memo?: string; /** @default false */
3090
+ confidential?: boolean; /** @default false */
3091
+ async?: boolean; /** @default false */
3092
+ dry?: boolean; /** @constant */
3093
+ type: "withdraw";
3094
+ } | {
3095
+ asset: string;
3096
+ amount: string;
3097
+ recipient: string; /** @default false */
3098
+ confidential?: boolean; /** @constant */
3099
+ type: "transfer";
3100
+ } | {
3101
+ asset: string;
3102
+ amount: string; /** @constant */
3103
+ type: "shield";
3104
+ } | {
3105
+ asset: string;
3106
+ amount: string; /** @constant */
3107
+ type: "unshield";
3108
+ };
3109
+ };
3110
+ };
3111
+ };
3112
+ responses: {
3113
+ /** @description Success */202: {
3114
+ headers: {
3115
+ [name: string]: unknown;
3116
+ };
3117
+ content: {
3118
+ "application/json": components["schemas"]["StatusResponse"];
3119
+ };
3120
+ };
3121
+ 400: {
3122
+ headers: {
3123
+ [name: string]: unknown;
3124
+ };
3125
+ content: {
3126
+ "application/json": components["schemas"]["ErrorDocument"];
3127
+ };
3128
+ };
3129
+ 401: {
3130
+ headers: {
3131
+ [name: string]: unknown;
3132
+ };
3133
+ content: {
3134
+ "application/json": components["schemas"]["ErrorDocument"];
3135
+ };
3136
+ };
3137
+ 403: {
3138
+ headers: {
3139
+ [name: string]: unknown;
3140
+ };
3141
+ content: {
3142
+ "application/json": components["schemas"]["ErrorDocument"];
3143
+ };
3144
+ };
3145
+ 404: {
3146
+ headers: {
3147
+ [name: string]: unknown;
3148
+ };
3149
+ content: {
3150
+ "application/json": components["schemas"]["ErrorDocument"];
3151
+ };
3152
+ };
3153
+ 409: {
3154
+ headers: {
3155
+ [name: string]: unknown;
3156
+ };
3157
+ content: {
3158
+ "application/json": components["schemas"]["ErrorDocument"];
3159
+ };
3160
+ };
3161
+ 410: {
3162
+ headers: {
3163
+ [name: string]: unknown;
3164
+ };
3165
+ content: {
3166
+ "application/json": components["schemas"]["ErrorDocument"];
3167
+ };
3168
+ };
3169
+ 429: {
3170
+ headers: {
3171
+ [name: string]: unknown;
3172
+ };
3173
+ content: {
3174
+ "application/json": components["schemas"]["ErrorDocument"];
3175
+ };
3176
+ };
3177
+ 502: {
3178
+ headers: {
3179
+ [name: string]: unknown;
3180
+ };
3181
+ content: {
3182
+ "application/json": components["schemas"]["ErrorDocument"];
3183
+ };
3184
+ };
3185
+ 503: {
3186
+ headers: {
3187
+ [name: string]: unknown;
3188
+ };
3189
+ content: {
3190
+ "application/json": components["schemas"]["ErrorDocument"];
3191
+ };
3192
+ };
3193
+ };
3194
+ };
3195
+ signMessage: {
3196
+ parameters: {
3197
+ query?: never;
3198
+ header?: never;
3199
+ path: {
3200
+ agent_id: string;
3201
+ };
3202
+ cookie?: never;
3203
+ };
3204
+ requestBody: {
3205
+ content: {
3206
+ "application/json": {
3207
+ message: string;
3208
+ /**
3209
+ * @default utf8
3210
+ * @enum {string}
3211
+ */
3212
+ encoding?: "utf8" | "hex";
3213
+ recipient: string;
3214
+ };
3215
+ };
3216
+ };
3217
+ responses: {
3218
+ /** @description Success */200: {
3219
+ headers: {
3220
+ [name: string]: unknown;
3221
+ };
3222
+ content: {
3223
+ "application/json": {
3224
+ near_account_id: string; /** Format: starts_with */
3225
+ public_key: string;
3226
+ signature: string;
3227
+ nonce: string;
3228
+ recipient: string;
3229
+ };
3230
+ };
3231
+ };
3232
+ 400: {
3233
+ headers: {
3234
+ [name: string]: unknown;
3235
+ };
3236
+ content: {
3237
+ "application/json": components["schemas"]["ErrorDocument"];
3238
+ };
3239
+ };
3240
+ 401: {
3241
+ headers: {
3242
+ [name: string]: unknown;
3243
+ };
3244
+ content: {
3245
+ "application/json": components["schemas"]["ErrorDocument"];
3246
+ };
3247
+ };
3248
+ 403: {
3249
+ headers: {
3250
+ [name: string]: unknown;
3251
+ };
3252
+ content: {
3253
+ "application/json": components["schemas"]["ErrorDocument"];
3254
+ };
3255
+ };
3256
+ 404: {
3257
+ headers: {
3258
+ [name: string]: unknown;
3259
+ };
3260
+ content: {
3261
+ "application/json": components["schemas"]["ErrorDocument"];
3262
+ };
3263
+ };
3264
+ 409: {
3265
+ headers: {
3266
+ [name: string]: unknown;
3267
+ };
3268
+ content: {
3269
+ "application/json": components["schemas"]["ErrorDocument"];
3270
+ };
3271
+ };
3272
+ 410: {
3273
+ headers: {
3274
+ [name: string]: unknown;
3275
+ };
3276
+ content: {
3277
+ "application/json": components["schemas"]["ErrorDocument"];
3278
+ };
3279
+ };
3280
+ 429: {
3281
+ headers: {
3282
+ [name: string]: unknown;
3283
+ };
3284
+ content: {
3285
+ "application/json": components["schemas"]["ErrorDocument"];
3286
+ };
3287
+ };
3288
+ 502: {
3289
+ headers: {
3290
+ [name: string]: unknown;
3291
+ };
3292
+ content: {
3293
+ "application/json": components["schemas"]["ErrorDocument"];
3294
+ };
3295
+ };
3296
+ 503: {
3297
+ headers: {
3298
+ [name: string]: unknown;
3299
+ };
3300
+ content: {
3301
+ "application/json": components["schemas"]["ErrorDocument"];
3302
+ };
3303
+ };
3304
+ };
3305
+ };
3306
+ getTokens: {
3307
+ parameters: {
3308
+ query?: never;
3309
+ header?: never;
3310
+ path?: never;
3311
+ cookie?: never;
3312
+ };
3313
+ requestBody?: never;
3314
+ responses: {
3315
+ /** @description Success */200: {
3316
+ headers: {
3317
+ [name: string]: unknown;
3318
+ };
3319
+ content: {
3320
+ "application/json": {
3321
+ data: {
3322
+ asset_id: string;
3323
+ symbol: string;
3324
+ decimals: number;
3325
+ blockchain: string;
3326
+ price: number | null;
3327
+ price_updated_at: string | null;
3328
+ price_expires_at: string | null;
3329
+ }[];
3330
+ };
3331
+ };
3332
+ };
3333
+ 400: {
3334
+ headers: {
3335
+ [name: string]: unknown;
3336
+ };
3337
+ content: {
3338
+ "application/json": components["schemas"]["ErrorDocument"];
3339
+ };
3340
+ };
3341
+ 401: {
3342
+ headers: {
3343
+ [name: string]: unknown;
3344
+ };
3345
+ content: {
3346
+ "application/json": components["schemas"]["ErrorDocument"];
3347
+ };
3348
+ };
3349
+ 403: {
3350
+ headers: {
3351
+ [name: string]: unknown;
3352
+ };
3353
+ content: {
3354
+ "application/json": components["schemas"]["ErrorDocument"];
3355
+ };
3356
+ };
3357
+ 404: {
3358
+ headers: {
3359
+ [name: string]: unknown;
3360
+ };
3361
+ content: {
3362
+ "application/json": components["schemas"]["ErrorDocument"];
3363
+ };
3364
+ };
3365
+ 409: {
3366
+ headers: {
3367
+ [name: string]: unknown;
3368
+ };
3369
+ content: {
3370
+ "application/json": components["schemas"]["ErrorDocument"];
3371
+ };
3372
+ };
3373
+ 410: {
3374
+ headers: {
3375
+ [name: string]: unknown;
3376
+ };
3377
+ content: {
3378
+ "application/json": components["schemas"]["ErrorDocument"];
3379
+ };
3380
+ };
3381
+ 429: {
3382
+ headers: {
3383
+ [name: string]: unknown;
3384
+ };
3385
+ content: {
3386
+ "application/json": components["schemas"]["ErrorDocument"];
3387
+ };
3388
+ };
3389
+ 502: {
3390
+ headers: {
3391
+ [name: string]: unknown;
3392
+ };
3393
+ content: {
3394
+ "application/json": components["schemas"]["ErrorDocument"];
3395
+ };
3396
+ };
3397
+ 503: {
3398
+ headers: {
3399
+ [name: string]: unknown;
3400
+ };
3401
+ content: {
3402
+ "application/json": components["schemas"]["ErrorDocument"];
3403
+ };
3404
+ };
3405
+ };
3406
+ };
3407
+ getNetwork: {
3408
+ parameters: {
3409
+ query?: never;
3410
+ header?: never;
3411
+ path?: never;
3412
+ cookie?: never;
3413
+ };
3414
+ requestBody?: never;
3415
+ responses: {
3416
+ /** @description Success */200: {
3417
+ headers: {
3418
+ [name: string]: unknown;
3419
+ };
3420
+ content: {
3421
+ "application/json": {
3422
+ /** @constant */network: "mainnet";
3423
+ contract_id: string;
3424
+ supported_owner_types: ("near" | "evm" | "passkey")[];
3425
+ status: {
3426
+ /** @enum {string} */overall: "operational" | "degraded" | "down" | "unknown";
3427
+ checked_at: string | null;
3428
+ components: {
3429
+ /** @enum {string} */id: "one_click" | "custody" | "near"; /** @enum {string} */
3430
+ status: "operational" | "degraded" | "down" | "unknown";
3431
+ reason: string | null;
3432
+ affects: string[];
3433
+ since: string | null;
3434
+ checked_at: string | null;
3435
+ }[];
3436
+ };
3437
+ };
3438
+ };
3439
+ };
3440
+ 400: {
3441
+ headers: {
3442
+ [name: string]: unknown;
3443
+ };
3444
+ content: {
3445
+ "application/json": components["schemas"]["ErrorDocument"];
3446
+ };
3447
+ };
3448
+ 401: {
3449
+ headers: {
3450
+ [name: string]: unknown;
3451
+ };
3452
+ content: {
3453
+ "application/json": components["schemas"]["ErrorDocument"];
3454
+ };
3455
+ };
3456
+ 403: {
3457
+ headers: {
3458
+ [name: string]: unknown;
3459
+ };
3460
+ content: {
3461
+ "application/json": components["schemas"]["ErrorDocument"];
3462
+ };
3463
+ };
3464
+ 404: {
3465
+ headers: {
3466
+ [name: string]: unknown;
3467
+ };
3468
+ content: {
3469
+ "application/json": components["schemas"]["ErrorDocument"];
3470
+ };
3471
+ };
3472
+ 409: {
3473
+ headers: {
3474
+ [name: string]: unknown;
3475
+ };
3476
+ content: {
3477
+ "application/json": components["schemas"]["ErrorDocument"];
3478
+ };
3479
+ };
3480
+ 410: {
3481
+ headers: {
3482
+ [name: string]: unknown;
3483
+ };
3484
+ content: {
3485
+ "application/json": components["schemas"]["ErrorDocument"];
3486
+ };
3487
+ };
3488
+ 429: {
3489
+ headers: {
3490
+ [name: string]: unknown;
3491
+ };
3492
+ content: {
3493
+ "application/json": components["schemas"]["ErrorDocument"];
3494
+ };
3495
+ };
3496
+ 502: {
3497
+ headers: {
3498
+ [name: string]: unknown;
3499
+ };
3500
+ content: {
3501
+ "application/json": components["schemas"]["ErrorDocument"];
3502
+ };
3503
+ };
3504
+ 503: {
3505
+ headers: {
3506
+ [name: string]: unknown;
3507
+ };
3508
+ content: {
3509
+ "application/json": components["schemas"]["ErrorDocument"];
3510
+ };
3511
+ };
3512
+ };
3513
+ };
3514
+ whoami: {
3515
+ parameters: {
3516
+ query?: never;
3517
+ header?: never;
3518
+ path?: never;
3519
+ cookie?: never;
3520
+ };
3521
+ requestBody?: never;
3522
+ responses: {
3523
+ /** @description Success */200: {
3524
+ headers: {
3525
+ [name: string]: unknown;
3526
+ };
3527
+ content: {
3528
+ "application/json": {
3529
+ api_key_id: string;
3530
+ tenant_id: string;
3531
+ };
3532
+ };
3533
+ };
3534
+ 400: {
3535
+ headers: {
3536
+ [name: string]: unknown;
3537
+ };
3538
+ content: {
3539
+ "application/json": components["schemas"]["ErrorDocument"];
3540
+ };
3541
+ };
3542
+ 401: {
3543
+ headers: {
3544
+ [name: string]: unknown;
3545
+ };
3546
+ content: {
3547
+ "application/json": components["schemas"]["ErrorDocument"];
3548
+ };
3549
+ };
3550
+ 403: {
3551
+ headers: {
3552
+ [name: string]: unknown;
3553
+ };
3554
+ content: {
3555
+ "application/json": components["schemas"]["ErrorDocument"];
3556
+ };
3557
+ };
3558
+ 404: {
3559
+ headers: {
3560
+ [name: string]: unknown;
3561
+ };
3562
+ content: {
3563
+ "application/json": components["schemas"]["ErrorDocument"];
3564
+ };
3565
+ };
3566
+ 409: {
3567
+ headers: {
3568
+ [name: string]: unknown;
3569
+ };
3570
+ content: {
3571
+ "application/json": components["schemas"]["ErrorDocument"];
3572
+ };
3573
+ };
3574
+ 410: {
3575
+ headers: {
3576
+ [name: string]: unknown;
3577
+ };
3578
+ content: {
3579
+ "application/json": components["schemas"]["ErrorDocument"];
3580
+ };
3581
+ };
3582
+ 429: {
3583
+ headers: {
3584
+ [name: string]: unknown;
3585
+ };
3586
+ content: {
3587
+ "application/json": components["schemas"]["ErrorDocument"];
3588
+ };
3589
+ };
3590
+ 502: {
3591
+ headers: {
3592
+ [name: string]: unknown;
3593
+ };
3594
+ content: {
3595
+ "application/json": components["schemas"]["ErrorDocument"];
3596
+ };
3597
+ };
3598
+ 503: {
3599
+ headers: {
3600
+ [name: string]: unknown;
3601
+ };
3602
+ content: {
3603
+ "application/json": components["schemas"]["ErrorDocument"];
3604
+ };
3605
+ };
3606
+ };
3607
+ };
3608
+ getPartnerQuota: {
3609
+ parameters: {
3610
+ query?: never;
3611
+ header?: never;
3612
+ path?: never;
3613
+ cookie?: never;
3614
+ };
3615
+ requestBody?: never;
3616
+ responses: {
3617
+ /** @description Success */200: {
3618
+ headers: {
3619
+ [name: string]: unknown;
3620
+ };
3621
+ content: {
3622
+ "application/json": {
3623
+ revision: number;
3624
+ overrides: {
3625
+ requests_per_minute?: number;
3626
+ key_requests_per_minute?: number;
3627
+ };
3628
+ limits: {
3629
+ daily_agents: number;
3630
+ api_keys: number;
3631
+ requests_per_minute: number;
3632
+ key_requests_per_minute: number;
3633
+ };
3634
+ usage: {
3635
+ agents_last_24_hours: number;
3636
+ api_keys: number;
3637
+ requests_this_minute: number;
3638
+ }; /** Format: date-time */
3639
+ observed_at: string;
3640
+ };
3641
+ };
3642
+ };
3643
+ 400: {
3644
+ headers: {
3645
+ [name: string]: unknown;
3646
+ };
3647
+ content: {
3648
+ "application/json": components["schemas"]["ErrorDocument"];
3649
+ };
3650
+ };
3651
+ 401: {
3652
+ headers: {
3653
+ [name: string]: unknown;
3654
+ };
3655
+ content: {
3656
+ "application/json": components["schemas"]["ErrorDocument"];
3657
+ };
3658
+ };
3659
+ 403: {
3660
+ headers: {
3661
+ [name: string]: unknown;
3662
+ };
3663
+ content: {
3664
+ "application/json": components["schemas"]["ErrorDocument"];
3665
+ };
3666
+ };
3667
+ 404: {
3668
+ headers: {
3669
+ [name: string]: unknown;
3670
+ };
3671
+ content: {
3672
+ "application/json": components["schemas"]["ErrorDocument"];
3673
+ };
3674
+ };
3675
+ 409: {
3676
+ headers: {
3677
+ [name: string]: unknown;
3678
+ };
3679
+ content: {
3680
+ "application/json": components["schemas"]["ErrorDocument"];
3681
+ };
3682
+ };
3683
+ 410: {
3684
+ headers: {
3685
+ [name: string]: unknown;
3686
+ };
3687
+ content: {
3688
+ "application/json": components["schemas"]["ErrorDocument"];
3689
+ };
3690
+ };
3691
+ 429: {
3692
+ headers: {
3693
+ [name: string]: unknown;
3694
+ };
3695
+ content: {
3696
+ "application/json": components["schemas"]["ErrorDocument"];
3697
+ };
3698
+ };
3699
+ 502: {
3700
+ headers: {
3701
+ [name: string]: unknown;
3702
+ };
3703
+ content: {
3704
+ "application/json": components["schemas"]["ErrorDocument"];
3705
+ };
3706
+ };
3707
+ 503: {
3708
+ headers: {
3709
+ [name: string]: unknown;
3710
+ };
3711
+ content: {
3712
+ "application/json": components["schemas"]["ErrorDocument"];
3713
+ };
3714
+ };
3715
+ };
3716
+ };
3717
+ }
3718
+ //#endregion
3719
+ //#region src/types.d.ts
3720
+ type Json<T> = T extends {
3721
+ content: {
3722
+ "application/json": infer Body;
3723
+ };
3724
+ } ? Body : never;
3725
+ type RequestBody<K extends keyof operations> = operations[K] extends {
3726
+ requestBody: infer R;
3727
+ } ? Json<R> : never;
3728
+ type Success<K extends keyof operations> = Json<operations[K]["responses"][Extract<keyof operations[K]["responses"], 200 | 201 | 202>]>;
3729
+ type Query<K extends keyof operations> = NonNullable<operations[K]["parameters"]["query"]>;
3730
+ type Schemas = components["schemas"];
3731
+ type ErrorDocument = Schemas["ErrorDocument"];
3732
+ type ApiErrorObject = ErrorDocument["errors"][number];
3733
+ type OwnerWallet = Schemas["OwnerWallet"];
3734
+ type AgentView = Schemas["AgentView"];
3735
+ type AgentPage = Success<"listAgents">;
3736
+ type WalletView = Success<"getWallet">;
3737
+ type BalancesView = Success<"getBalances">;
3738
+ type BalanceEntry = BalancesView["balances"][number];
3739
+ type BalanceSource = NonNullable<Query<"getBalances">["source"]>;
3740
+ type TokenView = Success<"getTokens">["data"][number];
3741
+ type NetworkView = Success<"getNetwork">;
3742
+ type WhoamiView = Success<"whoami">;
3743
+ type PartnerQuotaView = Success<"getPartnerQuota">;
3744
+ type ContainmentView = Success<"getContainment">;
3745
+ type Policy = Schemas["Policy"];
3746
+ type PolicyAction = Policy["actions"][number];
3747
+ /** Where withdrawals and transfers may go: a mode plus the exact destinations it lists. */
3748
+ type DestinationRule = Policy["destinations"];
3749
+ type Destination = DestinationRule["list"][number];
3750
+ type PolicyView = Schemas["PolicyView"];
3751
+ type PolicyHistoryView = Success<"getPolicyHistory">;
3752
+ type GrantView = Schemas["GrantView"];
3753
+ type BudgetView = Schemas["BudgetView"];
3754
+ type TimelockView = Schemas["TimelockView"];
3755
+ type ApprovalView = Success<"getApproval">;
3756
+ type ScheduledPage = Success<"listScheduledExecutions">;
3757
+ type ScheduledExecutionView = ScheduledPage["data"][number];
3758
+ type Intent = Schemas["Intent"];
3759
+ type SignedData = Schemas["SignedData"];
3760
+ type IntentPreview = Schemas["IntentPreview"];
3761
+ type DeletionPreview = Schemas["DeletionPreview"];
3762
+ type GenerateIntentRequest = RequestBody<"generateIntent">;
3763
+ type GenerateIntentResponse = Schemas["GenerateIntentResponse"];
3764
+ type IntentType = GenerateIntentResponse["type"];
3765
+ type SubmitIntentRequest = RequestBody<"submitIntent">;
3766
+ /** Which signing standards a given owner action produces (the wallet must sign `intent.payload`). */
3767
+ type GenerateIntentResponseOf<T extends IntentType> = T extends IntentType ? Omit<GenerateIntentResponse, "type" | "intent"> & {
3768
+ type: T;
3769
+ intent: Extract<Intent, {
3770
+ standard: "eip712" | "webauthn" | (T extends "policy_update" ? "nep413" | "nep366" : T extends "agent_create" | "agent_freeze" | "agent_unfreeze" ? "nep366" : "nep413");
3771
+ }>;
3772
+ } : never;
3773
+ type StatusResponse = Schemas["StatusResponse"];
3774
+ type StatusType = StatusResponse["type"];
3775
+ /** The agent-run money moves; the other status types are owner intents. */
3776
+ type ExecutionType = Extract<StatusType, "swap" | "withdraw" | "transfer" | "shield" | "unshield" | "deposit">;
3777
+ type Status = StatusResponse["status"];
3778
+ type StatusResponseOf<T extends StatusType> = Extract<StatusResponse, {
3779
+ type: T;
3780
+ }>;
3781
+ type ExecutionDetails = Schemas["ExecutionDetails"];
3782
+ type HistoryPage = Success<"getHistory">;
3783
+ type QuoteResponse = Extract<Success<"swap">, {
3784
+ dry: true;
3785
+ }>;
3786
+ type SwapRequest = RequestBody<"swap">;
3787
+ type WithdrawRequest = RequestBody<"withdraw">;
3788
+ type TransferRequest = RequestBody<"transfer">;
3789
+ type BalanceMoveRequest = RequestBody<"shield">;
3790
+ type DepositRequest = RequestBody<"deposit">;
3791
+ type RecoverRequest = RequestBody<"recover">;
3792
+ type SignMessageRequest = RequestBody<"signMessage">;
3793
+ type Signature = Success<"signMessage">;
3794
+ //#endregion
3795
+ //#region src/client.d.ts
3796
+ /** The hosted API. Pass `baseUrl` only for a self-hosted or local deployment. */
3797
+ declare const DEFAULT_BASE_URL = "https://api.agentsonintents.com";
3798
+ type AgentApiOptions = {
3799
+ /** Partner API key (`naa_…`). Server-side only: never ship it to a browser. */apiKey: string; /** API origin. Defaults to {@link DEFAULT_BASE_URL}; HTTP is accepted for localhost only. */
3800
+ baseUrl?: string; /** Per-request timeout. Defaults to 150 s for settlement writes, 65 s otherwise. */
3801
+ timeoutMs?: number; /** Maximum response body bytes before parsing, including errors. Defaults to 8 MiB. */
3802
+ maxResponseBytes?: number; /** Custom fetch, e.g. for tests or instrumentation. */
3803
+ fetch?: typeof fetch;
3804
+ /**
3805
+ * Grant token (`ngt_…`) sent as `X-Grant-Token` on delegated calls (swap, withdraw, transfer,
3806
+ * shield, …). Prefer `api.forGrant(token)`, which returns a separate client per grant.
3807
+ */
3808
+ grantToken?: string;
3809
+ };
3810
+ type RequestOptions = {
3811
+ /** Cancels this request. */signal?: AbortSignal;
3812
+ };
3813
+ type IdempotentOptions = RequestOptions & {
3814
+ /** Stable key for one logical request. Omission generates a new key; retries must reuse it. */idempotencyKey?: string;
3815
+ };
3816
+ /**
3817
+ * Typed client for the NEAR Intents Agent API. One method per endpoint; paths and methods come
3818
+ * from the shared endpoint registry, so the client cannot drift from the server.
3819
+ *
3820
+ * Owner actions follow a generate/submit shape: `generateIntent` returns
3821
+ * `intent: { standard, payload }`, your frontend has the owner's wallet sign `payload`
3822
+ * unchanged, and `submitIntent` sends the wallet's output back. `getStatus` tracks the result.
3823
+ */
3824
+ declare class AgentApi {
3825
+ private readonly options;
3826
+ private readonly origin;
3827
+ private readonly fetcher;
3828
+ private readonly maxResponseBytes;
3829
+ constructor(options: AgentApiOptions);
3830
+ getPartnerQuota(options?: RequestOptions): Promise<PartnerQuotaView>;
3831
+ private headers;
3832
+ private call;
3833
+ /**
3834
+ * A client that runs delegated calls under one owner grant. Keep one per session, assistant or
3835
+ * bot: each carries its own token, so concurrent calls never borrow another grant.
3836
+ */
3837
+ forGrant(grantToken: string): AgentApi;
3838
+ /**
3839
+ * Builds the payload the owner's wallet must sign for one owner action. Omission generates
3840
+ * a new `idempotencyKey`; reuse the response/error key to retry the same intent.
3841
+ * Interrupted generation returns
3842
+ * `intent_generation_recovery_required` unless a saved payload or complete preparation can
3843
+ * recover the original request; the key never
3844
+ * starts another builder. Keep that key for recovery.
3845
+ */
3846
+ generateIntent<T extends IntentType>(request: Extract<GenerateIntentRequest, {
3847
+ type: T;
3848
+ }>, options?: IdempotentOptions): Promise<IdempotentResult<GenerateIntentResponseOf<T>>>;
3849
+ /** Sends the wallet's output for a generated intent. Resubmitting the same signature is safe. */
3850
+ submitIntent<T extends IntentType>(request: SubmitIntentRequest & {
3851
+ type: T;
3852
+ }, options?: RequestOptions): Promise<StatusResponseOf<T>>;
3853
+ /**
3854
+ * Status of an intent or execution. `waitMs` (≤ 30 000) long-polls until the status is
3855
+ * terminal, needs a signature, or the wait ends.
3856
+ */
3857
+ getStatus(correlationId: string, options?: RequestOptions & {
3858
+ waitMs?: number;
3859
+ refresh?: boolean;
3860
+ }): Promise<StatusResponse>;
3861
+ /** An agent's intents and executions, newest first. */
3862
+ getHistory(agentId: string, query?: {
3863
+ cursor?: string;
3864
+ limit?: number;
3865
+ }, options?: RequestOptions): Promise<HistoryPage>;
3866
+ listAgents(query?: {
3867
+ external_user_id?: string;
3868
+ cursor?: string;
3869
+ }, options?: RequestOptions): Promise<AgentPage>;
3870
+ getAgent(agentId: string, options?: RequestOptions): Promise<AgentView>;
3871
+ getWallet(agentId: string, options?: RequestOptions): Promise<WalletView>;
3872
+ getBalances(agentId: string, query?: {
3873
+ source?: BalanceSource;
3874
+ asset?: string;
3875
+ }, options?: RequestOptions): Promise<BalancesView>;
3876
+ /** Public: every asset agents can use, with chain and USD price. Needs no API key. */
3877
+ getTokens(options?: RequestOptions): Promise<TokenView[]>;
3878
+ getPolicy(agentId: string, options?: RequestOptions): Promise<PolicyView>;
3879
+ getPolicyHistory(agentId: string, query?: {
3880
+ cursor?: number;
3881
+ limit?: number;
3882
+ }, options?: RequestOptions): Promise<PolicyHistoryView>;
3883
+ listGrants(agentId: string, options?: RequestOptions): Promise<GrantView[]>;
3884
+ /** Executions the timelock holds, earliest release first; follow `next_cursor` for more. */
3885
+ listScheduledExecutions(agentId: string, query?: {
3886
+ cursor?: string;
3887
+ limit?: number;
3888
+ }, options?: RequestOptions): Promise<ScheduledPage>;
3889
+ getContainment(agentId: string, query?: {
3890
+ grants_cursor?: string;
3891
+ operations_cursor?: string;
3892
+ }, options?: RequestOptions): Promise<ContainmentView>;
3893
+ listApprovals(agentId: string, options?: RequestOptions): Promise<ApprovalView[]>;
3894
+ getApproval(agentId: string, approvalId: string, options?: RequestOptions): Promise<ApprovalView>;
3895
+ getAddress(agentId: string, chain: "near", options?: RequestOptions): Promise<{
3896
+ chain: "near";
3897
+ address: string;
3898
+ [key: string]: unknown;
3899
+ }>;
3900
+ listProviderRecords(agentId: string, kind: "requests" | "audit" | "deposits" | "deposit_history", query?: {
3901
+ limit?: number;
3902
+ offset?: number;
3903
+ type?: string;
3904
+ }, options?: RequestOptions): Promise<{
3905
+ data: unknown;
3906
+ }>;
3907
+ /** Swap assets. `dry: true` returns a quote and needs no idempotency key. */
3908
+ swap(agentId: string, request: SwapRequest & {
3909
+ dry: true;
3910
+ }, options?: RequestOptions): Promise<QuoteResponse>;
3911
+ swap(agentId: string, request: SwapRequest, options?: IdempotentOptions): Promise<IdempotentResult<StatusResponseOf<"swap">>>;
3912
+ /** Withdraw to any supported chain. `dry: true` previews and needs no idempotency key. */
3913
+ withdraw(agentId: string, request: WithdrawRequest & {
3914
+ dry: true;
3915
+ }, options?: RequestOptions): Promise<QuoteResponse>;
3916
+ withdraw(agentId: string, request: WithdrawRequest, options?: IdempotentOptions): Promise<IdempotentResult<StatusResponseOf<"withdraw">>>;
3917
+ transfer(agentId: string, request: TransferRequest, options?: IdempotentOptions): Promise<IdempotentResult<StatusResponseOf<"transfer">>>;
3918
+ shield(agentId: string, request: BalanceMoveRequest, options?: IdempotentOptions): Promise<IdempotentResult<StatusResponseOf<"shield">>>;
3919
+ unshield(agentId: string, request: BalanceMoveRequest, options?: IdempotentOptions): Promise<IdempotentResult<StatusResponseOf<"unshield">>>;
3920
+ /** Creates an inbound public or confidential deposit address; no grant token is needed. */
3921
+ deposit(agentId: string, request: DepositRequest, options?: IdempotentOptions): Promise<IdempotentResult<StatusResponseOf<"deposit">>>;
3922
+ /** First dispatch of an UNCERTAIN execution that provably never reached the provider. Requires its original key. */
3923
+ recover(agentId: string, request: RecoverRequest, options: IdempotentOptions & {
3924
+ idempotencyKey: string;
3925
+ }): Promise<IdempotentResult<StatusResponse>>;
3926
+ /**
3927
+ * Signs a canonical identity challenge with the agent's NEAR key (NEP-413). Needs a grant token,
3928
+ * a policy listing the recipient, and a server with NEAR message signing enabled.
3929
+ */
3930
+ signMessage(agentId: string, request: SignMessageRequest, options?: RequestOptions): Promise<Signature>;
3931
+ getNetwork(options?: RequestOptions): Promise<NetworkView>;
3932
+ whoami(options?: RequestOptions): Promise<WhoamiView>;
3933
+ }
3934
+ /** Creates a client. Keep the API key on your backend. */
3935
+ declare function createAgentApi(options: AgentApiOptions): AgentApi;
3936
+ //#endregion
3937
+ //#region src/errors.d.ts
3938
+ /** A transport, cancellation or parsing failure carrying the key of the original request. */
3939
+ declare class AgentApiRequestError extends Error {
3940
+ readonly idempotencyKey: string;
3941
+ constructor(cause: unknown, idempotencyKey: string);
3942
+ }
3943
+ /** A success or error body exceeded the client's byte budget before JSON parsing. */
3944
+ declare class AgentApiResponseTooLargeError extends Error {
3945
+ readonly code = "response_too_large";
3946
+ readonly status: number;
3947
+ readonly maxResponseBytes: number;
3948
+ readonly idempotencyKey: string | undefined;
3949
+ constructor(status: number, maxResponseBytes: number, idempotencyKey?: string);
3950
+ }
3951
+ /**
3952
+ * A non-2xx response. `code` is the first error's stable snake_case code; branch on it, never on
3953
+ * `title` or `detail`. `errors` holds every entry (validation failures return one per field).
3954
+ */
3955
+ declare class AgentApiError extends Error {
3956
+ readonly status: number;
3957
+ readonly code: string;
3958
+ readonly title: string;
3959
+ readonly detail: string | undefined;
3960
+ readonly retryable: boolean;
3961
+ readonly availableAt: string | undefined;
3962
+ readonly requestId: string | undefined;
3963
+ readonly errors: ApiErrorObject[];
3964
+ readonly idempotencyKey: string | undefined;
3965
+ constructor(status: number, document: ErrorDocument | undefined, idempotencyKey?: string);
3966
+ }
3967
+ //#endregion
3968
+ //#region src/grants.d.ts
3969
+ /** A new grant token and the commitment the owner signs for it. */
3970
+ type GrantCredential = {
3971
+ /** `ngt_…`. Store it on your backend (encrypted); it is shown nowhere else. */token: string; /** SHA-256 hex of the token: the `credential` of a `grant_issue` intent. */
3972
+ commitment: string;
3973
+ };
3974
+ /** The commitment of an existing grant token. */
3975
+ declare function grantCommitment(token: string): string;
3976
+ /**
3977
+ * Creates the token for one new grant. Send only `commitment` in `grant_issue`; the owner signs
3978
+ * it, and afterwards `api.forGrant(token)` runs calls under that grant. Use a new token for every
3979
+ * grant.
3980
+ */
3981
+ declare function createGrantCredential(): GrantCredential;
3982
+ //#endregion
3983
+ export { AgentApi, AgentApiError, type AgentApiOptions, AgentApiRequestError, AgentApiResponseTooLargeError, AgentPage, AgentView, ApiErrorObject, ApprovalView, BalanceEntry, BalanceMoveRequest, BalanceSource, BalancesView, BudgetView, ContainmentView, DEFAULT_BASE_URL, DeletionPreview, DepositRequest, Destination, DestinationRule, ErrorDocument, ExecutionDetails, ExecutionType, GenerateIntentRequest, GenerateIntentResponse, GenerateIntentResponseOf, type GrantCredential, GrantView, HistoryPage, type IdempotentOptions, type IdempotentResult, Intent, IntentPreview, IntentType, NetworkView, OwnerWallet, PartnerQuotaView, Policy, PolicyAction, PolicyHistoryView, PolicyView, QuoteResponse, RecoverRequest, type RequestOptions, ScheduledExecutionView, ScheduledPage, SignMessageRequest, Signature, SignedData, Status, StatusResponse, StatusResponseOf, StatusType, SubmitIntentRequest, SwapRequest, TimelockView, TokenView, TransferRequest, WalletView, WhoamiView, WithdrawRequest, createAgentApi, createGrantCredential, createIdempotencyKey, grantCommitment };
3984
+ //# sourceMappingURL=index.d.mts.map