amogus-sdk-contract-types 0.6.4

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,1584 @@
1
+ //#region src/index.d.ts
2
+ /**
3
+ * This file was automatically generated by gen-defuse-types.ts.
4
+ * DO NOT MODIFY IT BY HAND.
5
+ */
6
+ /**
7
+ * This interface was referenced by `NEARIntentsSchema`'s JSON-Schema
8
+ * via the `definition` "StateInit".
9
+ */
10
+ type StateInit = StateInitV1;
11
+ /**
12
+ * This interface was referenced by `NEARIntentsSchema`'s JSON-Schema
13
+ * via the `definition` "GlobalContractId".
14
+ */
15
+ type GlobalContractId = {
16
+ hash: string;
17
+ } | {
18
+ /**
19
+ * NEAR Account Identifier.
20
+ *
21
+ * This is a unique, syntactically valid, human-readable account identifier on the NEAR network.
22
+ *
23
+ * [See the crate-level docs for information about validation.](index.html#account-id-rules)
24
+ *
25
+ * Also see [Error kind precedence](AccountId#error-kind-precedence).
26
+ *
27
+ * ## Examples
28
+ *
29
+ * ``` use near_account_id::AccountId;
30
+ *
31
+ * let alice: AccountId = "alice.near".parse().unwrap();
32
+ *
33
+ * assert!("ƒelicia.near".parse::<AccountId>().is_err()); // (ƒ is not f) ```
34
+ */
35
+ account_id: string;
36
+ };
37
+ /**
38
+ * This interface was referenced by `NEARIntentsSchema`'s JSON-Schema
39
+ * via the `definition` "Deadline".
40
+ */
41
+ type Deadline = string;
42
+ /**
43
+ * 1 pip == 1/100th of bip == 0.0001%
44
+ *
45
+ * This interface was referenced by `NEARIntentsSchema`'s JSON-Schema
46
+ * via the `definition` "Pips".
47
+ */
48
+ type Pips = number;
49
+ /**
50
+ * This interface was referenced by `NEARIntentsSchema`'s JSON-Schema
51
+ * via the `definition` "Intent".
52
+ */
53
+ type Intent = IntentAddPublicKey | IntentRemovePublicKey | IntentTransfer | IntentFtWithdraw | IntentNftWithdraw | IntentMtWithdraw | IntentNativeWithdraw | IntentStorageDeposit | IntentTokenDiff | IntentSetAuthByPredecessorId | IntentAuthCall | IntentImtMint | IntentImtBurn;
54
+ /**
55
+ * See [ERC-191](https://github.com/ethereum/ercs/blob/master/ERCS/erc-191.md)
56
+ *
57
+ * This interface was referenced by `NEARIntentsSchema`'s JSON-Schema
58
+ * via the `definition` "Erc191Payload".
59
+ */
60
+ type Erc191Payload = string;
61
+ /**
62
+ * This interface was referenced by `NEARIntentsSchema`'s JSON-Schema
63
+ * via the `definition` "InvariantViolated".
64
+ */
65
+ type InvariantViolated = InvariantViolatedUnmatchedDeltas | InvariantViolatedOverflow;
66
+ /**
67
+ * Assuming wallets want to interact with Intents protocol, besides preparing the data in a certain form, they have to have the capability to sign raw messages (off-chain signatures) using an algorithm we understand. This enum solves that problem.
68
+ *
69
+ * For example, because we support ERC-191 and know how to verify messages with that standard, we can allow wallets, like Metamask, sign messages to perform intents without having to support new cryptographic primitives and signing standards.
70
+ *
71
+ * This interface was referenced by `NEARIntentsSchema`'s JSON-Schema
72
+ * via the `definition` "MultiPayload".
73
+ */
74
+ type MultiPayload = MultiPayloadNep413 | MultiPayloadErc191 | MultiPayloadTip191 | MultiPayloadRawEd25519 | MultiPayloadWebauthnEd25519 | MultiPayloadWebauthnP256 | MultiPayloadTonConnect | MultiPayloadSep53;
75
+ /**
76
+ * See [TIP-191](https://github.com/tronprotocol/tips/blob/master/tip-191.md)
77
+ *
78
+ * This interface was referenced by `NEARIntentsSchema`'s JSON-Schema
79
+ * via the `definition` "Tip191Payload".
80
+ */
81
+ type Tip191Payload = string;
82
+ /**
83
+ * This interface was referenced by `NEARIntentsSchema`'s JSON-Schema
84
+ * via the `definition` "String".
85
+ */
86
+ type String = string;
87
+ /**
88
+ * See <https://docs.tonconsole.com/academy/sign-data#choosing-the-right-format>
89
+ *
90
+ * This interface was referenced by `NEARIntentsSchema`'s JSON-Schema
91
+ * via the `definition` "TonConnectPayloadSchema".
92
+ */
93
+ type TonConnectPayloadSchema = TonConnectPayloadSchemaText;
94
+ /**
95
+ * This interface was referenced by `NEARIntentsSchema`'s JSON-Schema
96
+ * via the `definition` "PickFirst(DateTimeint64)".
97
+ */
98
+ type PickFirstDateTimeint64 = string | number;
99
+ /**
100
+ * This interface was referenced by `NEARIntentsSchema`'s JSON-Schema
101
+ * via the `definition` "TonConnectPayloadSchema__Parsed".
102
+ */
103
+ type TonConnectPayloadSchema__Parsed = {
104
+ text: {
105
+ original: string;
106
+ parsed: DefusePayloadFor_DefuseIntents;
107
+ };
108
+ type: "text";
109
+ };
110
+ /**
111
+ * This interface was referenced by `NEARIntentsSchema`'s JSON-Schema
112
+ * via the `definition` "MultiPayloadNarrowed".
113
+ */
114
+ type MultiPayloadNarrowed = {
115
+ standard: "nep413";
116
+ payload: Nep413Payload;
117
+ } | {
118
+ standard: "erc191";
119
+ payload: Erc191Payload;
120
+ } | {
121
+ standard: "tip191";
122
+ payload: Tip191Payload;
123
+ } | {
124
+ standard: "raw_ed25519";
125
+ payload: string;
126
+ } | {
127
+ standard: "webauthn";
128
+ payload: string;
129
+ } | {
130
+ standard: "ton_connect";
131
+ payload: TonConnectPayloadSchema;
132
+ } | {
133
+ standard: "sep53";
134
+ payload: string;
135
+ };
136
+ /**
137
+ * This interface was referenced by `NEARIntentsSchema`'s JSON-Schema
138
+ * via the `definition` "MultiPayload__Parsed".
139
+ */
140
+ type MultiPayload__Parsed = MultiPayloadNep413__Parsed | MultiPayloadErc191__Parsed | MultiPayloadTip191__Parsed | MultiPayloadRawEd25519__Parsed | MultiPayloadWebauthnEd25519__Parsed | MultiPayloadWebauthnP256__Parsed | MultiPayloadTonConnect__Parsed | MultiPayloadSep53__Parsed;
141
+ /**
142
+ * This interface was referenced by `NEARIntentsSchema`'s JSON-Schema
143
+ * via the `definition` "MultiPayloadNarrowed__Parsed".
144
+ */
145
+ type MultiPayloadNarrowed__Parsed = {
146
+ standard: "nep413";
147
+ payload: Nep413Payload__Parsed;
148
+ } | {
149
+ standard: "erc191";
150
+ payload: {
151
+ original: string;
152
+ parsed: DefusePayloadFor_DefuseIntents;
153
+ };
154
+ } | {
155
+ standard: "tip191";
156
+ payload: {
157
+ original: string;
158
+ parsed: DefusePayloadFor_DefuseIntents;
159
+ };
160
+ } | {
161
+ standard: "raw_ed25519";
162
+ payload: {
163
+ original: string;
164
+ parsed: DefusePayloadFor_DefuseIntents;
165
+ };
166
+ } | {
167
+ standard: "webauthn";
168
+ payload: {
169
+ original: string;
170
+ parsed: DefusePayloadFor_DefuseIntents;
171
+ };
172
+ } | {
173
+ standard: "ton_connect";
174
+ payload: TonConnectPayloadSchema__Parsed;
175
+ } | {
176
+ standard: "sep53";
177
+ payload: {
178
+ original: string;
179
+ parsed: DefusePayloadFor_DefuseIntents;
180
+ };
181
+ };
182
+ interface NEARIntentsSchema {
183
+ [k: string]: unknown;
184
+ }
185
+ /**
186
+ * Call [`.on_auth`](::defuse_auth_call::AuthCallee::on_auth) with `signer_id` of intent.
187
+ *
188
+ * This interface was referenced by `NEARIntentsSchema`'s JSON-Schema
189
+ * via the `definition` "AuthCall".
190
+ */
191
+ interface AuthCall {
192
+ /**
193
+ * Optionally, attach deposit to [`.on_auth`](::defuse_auth_call::AuthCallee::on_auth) call. The amount will be subtracted from user's NEP-141 `wNEAR` balance.
194
+ *
195
+ * NOTE: the `wNEAR` will not be refunded in case of fail.
196
+ */
197
+ attached_deposit?: string;
198
+ /**
199
+ * Callee for [`.on_auth`](::defuse_auth_call::AuthCallee::on_auth)
200
+ */
201
+ contract_id: string;
202
+ /**
203
+ * Optional minimum gas required for created promise to succeed. By default, only [`MIN_GAS_DEFAULT`](AuthCall::MIN_GAS_DEFAULT) is required.
204
+ *
205
+ * Remaining gas will be distributed evenly across all Function Call Promises created during execution of current receipt.
206
+ */
207
+ min_gas?: string | null;
208
+ /**
209
+ * `msg` to pass in [`.on_auth`](::defuse_auth_call::AuthCallee::on_auth)
210
+ */
211
+ msg: string;
212
+ /**
213
+ * Optionally initialize the receiver's contract (Deterministic AccountId) via [`state_init`](https://github.com/near/NEPs/blob/master/neps/nep-0616.md#stateinit-action) right before calling [`.on_auth()`](::defuse_auth_call::AuthCallee::on_auth) (in the same receipt).
214
+ */
215
+ state_init?: StateInit | null;
216
+ }
217
+ /**
218
+ * This interface was referenced by `NEARIntentsSchema`'s JSON-Schema
219
+ * via the `definition` "StateInitV1".
220
+ */
221
+ interface StateInitV1 {
222
+ code: GlobalContractId;
223
+ data: {
224
+ [k: string]: string;
225
+ };
226
+ version: "v1";
227
+ }
228
+ /**
229
+ * This interface was referenced by `NEARIntentsSchema`'s JSON-Schema
230
+ * via the `definition` "DefuseConfig".
231
+ */
232
+ interface DefuseConfig {
233
+ fees: FeesConfig;
234
+ roles?: RolesConfig;
235
+ /**
236
+ * NEAR Account Identifier.
237
+ *
238
+ * This is a unique, syntactically valid, human-readable account identifier on the NEAR network.
239
+ *
240
+ * [See the crate-level docs for information about validation.](index.html#account-id-rules)
241
+ *
242
+ * Also see [Error kind precedence](AccountId#error-kind-precedence).
243
+ *
244
+ * ## Examples
245
+ *
246
+ * ``` use near_account_id::AccountId;
247
+ *
248
+ * let alice: AccountId = "alice.near".parse().unwrap();
249
+ *
250
+ * assert!("ƒelicia.near".parse::<AccountId>().is_err()); // (ƒ is not f) ```
251
+ */
252
+ wnear_id: string;
253
+ }
254
+ /**
255
+ * This interface was referenced by `NEARIntentsSchema`'s JSON-Schema
256
+ * via the `definition` "FeesConfig".
257
+ */
258
+ interface FeesConfig {
259
+ fee: Pips;
260
+ /**
261
+ * NEAR Account Identifier.
262
+ *
263
+ * This is a unique, syntactically valid, human-readable account identifier on the NEAR network.
264
+ *
265
+ * [See the crate-level docs for information about validation.](index.html#account-id-rules)
266
+ *
267
+ * Also see [Error kind precedence](AccountId#error-kind-precedence).
268
+ *
269
+ * ## Examples
270
+ *
271
+ * ``` use near_account_id::AccountId;
272
+ *
273
+ * let alice: AccountId = "alice.near".parse().unwrap();
274
+ *
275
+ * assert!("ƒelicia.near".parse::<AccountId>().is_err()); // (ƒ is not f) ```
276
+ */
277
+ fee_collector: string;
278
+ }
279
+ /**
280
+ * This interface was referenced by `NEARIntentsSchema`'s JSON-Schema
281
+ * via the `definition` "RolesConfig".
282
+ */
283
+ interface RolesConfig {
284
+ admins?: {
285
+ [k: string]: string[];
286
+ };
287
+ grantees?: {
288
+ [k: string]: string[];
289
+ };
290
+ super_admins?: string[];
291
+ }
292
+ /**
293
+ * This interface was referenced by `NEARIntentsSchema`'s JSON-Schema
294
+ * via the `definition` "DefusePayload_for_DefuseIntents".
295
+ */
296
+ interface DefusePayloadFor_DefuseIntents {
297
+ deadline: Deadline;
298
+ /**
299
+ * Sequence of intents to execute in given order. Empty list is also a valid sequence, i.e. it doesn't do anything, but still invalidates the `nonce` for the signer WARNING: Promises created by different intents are executed concurrently and does not rely on the order of the intents in this structure
300
+ */
301
+ intents?: Intent[];
302
+ nonce: string;
303
+ /**
304
+ * NEAR Account Identifier.
305
+ *
306
+ * This is a unique, syntactically valid, human-readable account identifier on the NEAR network.
307
+ *
308
+ * [See the crate-level docs for information about validation.](index.html#account-id-rules)
309
+ *
310
+ * Also see [Error kind precedence](AccountId#error-kind-precedence).
311
+ *
312
+ * ## Examples
313
+ *
314
+ * ``` use near_account_id::AccountId;
315
+ *
316
+ * let alice: AccountId = "alice.near".parse().unwrap();
317
+ *
318
+ * assert!("ƒelicia.near".parse::<AccountId>().is_err()); // (ƒ is not f) ```
319
+ */
320
+ signer_id: string;
321
+ /**
322
+ * NEAR Account Identifier.
323
+ *
324
+ * This is a unique, syntactically valid, human-readable account identifier on the NEAR network.
325
+ *
326
+ * [See the crate-level docs for information about validation.](index.html#account-id-rules)
327
+ *
328
+ * Also see [Error kind precedence](AccountId#error-kind-precedence).
329
+ *
330
+ * ## Examples
331
+ *
332
+ * ``` use near_account_id::AccountId;
333
+ *
334
+ * let alice: AccountId = "alice.near".parse().unwrap();
335
+ *
336
+ * assert!("ƒelicia.near".parse::<AccountId>().is_err()); // (ƒ is not f) ```
337
+ */
338
+ verifying_contract: string;
339
+ }
340
+ /**
341
+ * See [`AddPublicKey`]
342
+ *
343
+ * This interface was referenced by `NEARIntentsSchema`'s JSON-Schema
344
+ * via the `definition` "IntentAddPublicKey".
345
+ */
346
+ interface IntentAddPublicKey {
347
+ intent: "add_public_key";
348
+ public_key: string;
349
+ }
350
+ /**
351
+ * See [`RemovePublicKey`]
352
+ *
353
+ * This interface was referenced by `NEARIntentsSchema`'s JSON-Schema
354
+ * via the `definition` "IntentRemovePublicKey".
355
+ */
356
+ interface IntentRemovePublicKey {
357
+ intent: "remove_public_key";
358
+ public_key: string;
359
+ }
360
+ /**
361
+ * See [`Transfer`]
362
+ *
363
+ * This interface was referenced by `NEARIntentsSchema`'s JSON-Schema
364
+ * via the `definition` "IntentTransfer".
365
+ */
366
+ interface IntentTransfer {
367
+ intent: "transfer";
368
+ memo?: string | null;
369
+ /**
370
+ * Minimum gas for `mt_on_transfer()`
371
+ *
372
+ * Remaining gas will be distributed evenly across all Function Call Promises created during execution of current receipt.
373
+ */
374
+ min_gas?: string | null;
375
+ /**
376
+ * Message to pass to `mt_on_transfer`
377
+ */
378
+ msg?: string;
379
+ /**
380
+ * NEAR Account Identifier.
381
+ *
382
+ * This is a unique, syntactically valid, human-readable account identifier on the NEAR network.
383
+ *
384
+ * [See the crate-level docs for information about validation.](index.html#account-id-rules)
385
+ *
386
+ * Also see [Error kind precedence](AccountId#error-kind-precedence).
387
+ *
388
+ * ## Examples
389
+ *
390
+ * ``` use near_account_id::AccountId;
391
+ *
392
+ * let alice: AccountId = "alice.near".parse().unwrap();
393
+ *
394
+ * assert!("ƒelicia.near".parse::<AccountId>().is_err()); // (ƒ is not f) ```
395
+ */
396
+ receiver_id: string;
397
+ /**
398
+ * Optionally initialize the receiver's contract (Deterministic AccountId) via [`state_init`](https://github.com/near/NEPs/blob/master/neps/nep-0616.md#stateinit-action) right before calling `mt_on_transfer()` (in the same receipt).
399
+ */
400
+ state_init?: StateInit | null;
401
+ tokens: {
402
+ [k: string]: string;
403
+ };
404
+ }
405
+ /**
406
+ * See [`FtWithdraw`]
407
+ *
408
+ * This interface was referenced by `NEARIntentsSchema`'s JSON-Schema
409
+ * via the `definition` "IntentFtWithdraw".
410
+ */
411
+ interface IntentFtWithdraw {
412
+ amount: string;
413
+ intent: "ft_withdraw";
414
+ memo?: string | null;
415
+ /**
416
+ * Optional minimum required Near gas for created Promise to succeed: * `ft_transfer`: minimum: 15TGas, default: 15TGas * `ft_transfer_call`: minimum: 30TGas, default: 50TGas
417
+ *
418
+ * Remaining gas will be distributed evenly across all Function Call Promises created during execution of current receipt.
419
+ */
420
+ min_gas?: string | null;
421
+ /**
422
+ * Message to pass to `ft_transfer_call`. Otherwise, `ft_transfer` will be used. NOTE: No refund will be made in case of insufficient `storage_deposit` on `token` for `receiver_id`
423
+ */
424
+ msg?: string | null;
425
+ /**
426
+ * NEAR Account Identifier.
427
+ *
428
+ * This is a unique, syntactically valid, human-readable account identifier on the NEAR network.
429
+ *
430
+ * [See the crate-level docs for information about validation.](index.html#account-id-rules)
431
+ *
432
+ * Also see [Error kind precedence](AccountId#error-kind-precedence).
433
+ *
434
+ * ## Examples
435
+ *
436
+ * ``` use near_account_id::AccountId;
437
+ *
438
+ * let alice: AccountId = "alice.near".parse().unwrap();
439
+ *
440
+ * assert!("ƒelicia.near".parse::<AccountId>().is_err()); // (ƒ is not f) ```
441
+ */
442
+ receiver_id: string;
443
+ /**
444
+ * Optionally make `storage_deposit` for `receiver_id` on `token`. The amount will be subtracted from user's NEP-141 `wNEAR` balance. NOTE: the `wNEAR` will not be refunded in case of fail
445
+ */
446
+ storage_deposit?: string | null;
447
+ /**
448
+ * NEAR Account Identifier.
449
+ *
450
+ * This is a unique, syntactically valid, human-readable account identifier on the NEAR network.
451
+ *
452
+ * [See the crate-level docs for information about validation.](index.html#account-id-rules)
453
+ *
454
+ * Also see [Error kind precedence](AccountId#error-kind-precedence).
455
+ *
456
+ * ## Examples
457
+ *
458
+ * ``` use near_account_id::AccountId;
459
+ *
460
+ * let alice: AccountId = "alice.near".parse().unwrap();
461
+ *
462
+ * assert!("ƒelicia.near".parse::<AccountId>().is_err()); // (ƒ is not f) ```
463
+ */
464
+ token: string;
465
+ }
466
+ /**
467
+ * See [`NftWithdraw`]
468
+ *
469
+ * This interface was referenced by `NEARIntentsSchema`'s JSON-Schema
470
+ * via the `definition` "IntentNftWithdraw".
471
+ */
472
+ interface IntentNftWithdraw {
473
+ intent: "nft_withdraw";
474
+ memo?: string | null;
475
+ /**
476
+ * Optional minimum required Near gas for created Promise to succeed: * `nft_transfer`: minimum: 15TGas, default: 15TGas * `nft_transfer_call`: minimum: 30TGas, default: 50TGas
477
+ *
478
+ * Remaining gas will be distributed evenly across all Function Call Promises created during execution of current receipt.
479
+ */
480
+ min_gas?: string | null;
481
+ /**
482
+ * Message to pass to `nft_transfer_call`. Otherwise, `nft_transfer` will be used. NOTE: No refund will be made in case of insufficient `storage_deposit` on `token` for `receiver_id`
483
+ */
484
+ msg?: string | null;
485
+ /**
486
+ * NEAR Account Identifier.
487
+ *
488
+ * This is a unique, syntactically valid, human-readable account identifier on the NEAR network.
489
+ *
490
+ * [See the crate-level docs for information about validation.](index.html#account-id-rules)
491
+ *
492
+ * Also see [Error kind precedence](AccountId#error-kind-precedence).
493
+ *
494
+ * ## Examples
495
+ *
496
+ * ``` use near_account_id::AccountId;
497
+ *
498
+ * let alice: AccountId = "alice.near".parse().unwrap();
499
+ *
500
+ * assert!("ƒelicia.near".parse::<AccountId>().is_err()); // (ƒ is not f) ```
501
+ */
502
+ receiver_id: string;
503
+ /**
504
+ * Optionally make `storage_deposit` for `receiver_id` on `token`. The amount will be subtracted from user's NEP-141 `wNEAR` balance. NOTE: the `wNEAR` will not be refunded in case of fail
505
+ */
506
+ storage_deposit?: string | null;
507
+ /**
508
+ * NEAR Account Identifier.
509
+ *
510
+ * This is a unique, syntactically valid, human-readable account identifier on the NEAR network.
511
+ *
512
+ * [See the crate-level docs for information about validation.](index.html#account-id-rules)
513
+ *
514
+ * Also see [Error kind precedence](AccountId#error-kind-precedence).
515
+ *
516
+ * ## Examples
517
+ *
518
+ * ``` use near_account_id::AccountId;
519
+ *
520
+ * let alice: AccountId = "alice.near".parse().unwrap();
521
+ *
522
+ * assert!("ƒelicia.near".parse::<AccountId>().is_err()); // (ƒ is not f) ```
523
+ */
524
+ token: string;
525
+ token_id: string;
526
+ }
527
+ /**
528
+ * See [`MtWithdraw`]
529
+ *
530
+ * This interface was referenced by `NEARIntentsSchema`'s JSON-Schema
531
+ * via the `definition` "IntentMtWithdraw".
532
+ */
533
+ interface IntentMtWithdraw {
534
+ amounts: string[];
535
+ intent: "mt_withdraw";
536
+ memo?: string | null;
537
+ /**
538
+ * Optional minimum required Near gas for created Promise to succeed per token: * `mt_batch_transfer`: minimum: 20TGas, default: 20TGas * `mt_batch_transfer_call`: minimum: 35TGas, default: 50TGas
539
+ *
540
+ * Remaining gas will be distributed evenly across all Function Call Promises created during execution of current receipt.
541
+ */
542
+ min_gas?: string | null;
543
+ /**
544
+ * Message to pass to `mt_batch_transfer_call`. Otherwise, `mt_batch_transfer` will be used. NOTE: No refund will be made in case of insufficient `storage_deposit` on `token` for `receiver_id`
545
+ */
546
+ msg?: string | null;
547
+ /**
548
+ * NEAR Account Identifier.
549
+ *
550
+ * This is a unique, syntactically valid, human-readable account identifier on the NEAR network.
551
+ *
552
+ * [See the crate-level docs for information about validation.](index.html#account-id-rules)
553
+ *
554
+ * Also see [Error kind precedence](AccountId#error-kind-precedence).
555
+ *
556
+ * ## Examples
557
+ *
558
+ * ``` use near_account_id::AccountId;
559
+ *
560
+ * let alice: AccountId = "alice.near".parse().unwrap();
561
+ *
562
+ * assert!("ƒelicia.near".parse::<AccountId>().is_err()); // (ƒ is not f) ```
563
+ */
564
+ receiver_id: string;
565
+ /**
566
+ * Optionally make `storage_deposit` for `receiver_id` on `token`. The amount will be subtracted from user's NEP-141 `wNEAR` balance. NOTE: the `wNEAR` will not be refunded in case of fail
567
+ */
568
+ storage_deposit?: string | null;
569
+ /**
570
+ * NEAR Account Identifier.
571
+ *
572
+ * This is a unique, syntactically valid, human-readable account identifier on the NEAR network.
573
+ *
574
+ * [See the crate-level docs for information about validation.](index.html#account-id-rules)
575
+ *
576
+ * Also see [Error kind precedence](AccountId#error-kind-precedence).
577
+ *
578
+ * ## Examples
579
+ *
580
+ * ``` use near_account_id::AccountId;
581
+ *
582
+ * let alice: AccountId = "alice.near".parse().unwrap();
583
+ *
584
+ * assert!("ƒelicia.near".parse::<AccountId>().is_err()); // (ƒ is not f) ```
585
+ */
586
+ token: string;
587
+ token_ids: string[];
588
+ }
589
+ /**
590
+ * See [`NativeWithdraw`]
591
+ *
592
+ * This interface was referenced by `NEARIntentsSchema`'s JSON-Schema
593
+ * via the `definition` "IntentNativeWithdraw".
594
+ */
595
+ interface IntentNativeWithdraw {
596
+ amount: string;
597
+ intent: "native_withdraw";
598
+ /**
599
+ * NEAR Account Identifier.
600
+ *
601
+ * This is a unique, syntactically valid, human-readable account identifier on the NEAR network.
602
+ *
603
+ * [See the crate-level docs for information about validation.](index.html#account-id-rules)
604
+ *
605
+ * Also see [Error kind precedence](AccountId#error-kind-precedence).
606
+ *
607
+ * ## Examples
608
+ *
609
+ * ``` use near_account_id::AccountId;
610
+ *
611
+ * let alice: AccountId = "alice.near".parse().unwrap();
612
+ *
613
+ * assert!("ƒelicia.near".parse::<AccountId>().is_err()); // (ƒ is not f) ```
614
+ */
615
+ receiver_id: string;
616
+ }
617
+ /**
618
+ * See [`StorageDeposit`]
619
+ *
620
+ * This interface was referenced by `NEARIntentsSchema`'s JSON-Schema
621
+ * via the `definition` "IntentStorageDeposit".
622
+ */
623
+ interface IntentStorageDeposit {
624
+ amount: string;
625
+ /**
626
+ * NEAR Account Identifier.
627
+ *
628
+ * This is a unique, syntactically valid, human-readable account identifier on the NEAR network.
629
+ *
630
+ * [See the crate-level docs for information about validation.](index.html#account-id-rules)
631
+ *
632
+ * Also see [Error kind precedence](AccountId#error-kind-precedence).
633
+ *
634
+ * ## Examples
635
+ *
636
+ * ``` use near_account_id::AccountId;
637
+ *
638
+ * let alice: AccountId = "alice.near".parse().unwrap();
639
+ *
640
+ * assert!("ƒelicia.near".parse::<AccountId>().is_err()); // (ƒ is not f) ```
641
+ */
642
+ contract_id: string;
643
+ /**
644
+ * NEAR Account Identifier.
645
+ *
646
+ * This is a unique, syntactically valid, human-readable account identifier on the NEAR network.
647
+ *
648
+ * [See the crate-level docs for information about validation.](index.html#account-id-rules)
649
+ *
650
+ * Also see [Error kind precedence](AccountId#error-kind-precedence).
651
+ *
652
+ * ## Examples
653
+ *
654
+ * ``` use near_account_id::AccountId;
655
+ *
656
+ * let alice: AccountId = "alice.near".parse().unwrap();
657
+ *
658
+ * assert!("ƒelicia.near".parse::<AccountId>().is_err()); // (ƒ is not f) ```
659
+ */
660
+ deposit_for_account_id: string;
661
+ intent: "storage_deposit";
662
+ }
663
+ /**
664
+ * See [`TokenDiff`]
665
+ *
666
+ * This interface was referenced by `NEARIntentsSchema`'s JSON-Schema
667
+ * via the `definition` "IntentTokenDiff".
668
+ */
669
+ interface IntentTokenDiff {
670
+ diff: {
671
+ [k: string]: string;
672
+ };
673
+ intent: "token_diff";
674
+ memo?: string | null;
675
+ /**
676
+ * NEAR Account Identifier.
677
+ *
678
+ * This is a unique, syntactically valid, human-readable account identifier on the NEAR network.
679
+ *
680
+ * [See the crate-level docs for information about validation.](index.html#account-id-rules)
681
+ *
682
+ * Also see [Error kind precedence](AccountId#error-kind-precedence).
683
+ *
684
+ * ## Examples
685
+ *
686
+ * ``` use near_account_id::AccountId;
687
+ *
688
+ * let alice: AccountId = "alice.near".parse().unwrap();
689
+ *
690
+ * assert!("ƒelicia.near".parse::<AccountId>().is_err()); // (ƒ is not f) ```
691
+ */
692
+ referral?: string | null;
693
+ }
694
+ /**
695
+ * See [`SetAuthByPredecessorId`]
696
+ *
697
+ * This interface was referenced by `NEARIntentsSchema`'s JSON-Schema
698
+ * via the `definition` "IntentSetAuthByPredecessorId".
699
+ */
700
+ interface IntentSetAuthByPredecessorId {
701
+ enabled: boolean;
702
+ intent: "set_auth_by_predecessor_id";
703
+ }
704
+ /**
705
+ * See [`AuthCall`]
706
+ *
707
+ * This interface was referenced by `NEARIntentsSchema`'s JSON-Schema
708
+ * via the `definition` "IntentAuthCall".
709
+ */
710
+ interface IntentAuthCall {
711
+ /**
712
+ * Optionally, attach deposit to [`.on_auth`](::defuse_auth_call::AuthCallee::on_auth) call. The amount will be subtracted from user's NEP-141 `wNEAR` balance.
713
+ *
714
+ * NOTE: the `wNEAR` will not be refunded in case of fail.
715
+ */
716
+ attached_deposit?: string;
717
+ /**
718
+ * Callee for [`.on_auth`](::defuse_auth_call::AuthCallee::on_auth)
719
+ */
720
+ contract_id: string;
721
+ intent: "auth_call";
722
+ /**
723
+ * Optional minimum gas required for created promise to succeed. By default, only [`MIN_GAS_DEFAULT`](AuthCall::MIN_GAS_DEFAULT) is required.
724
+ *
725
+ * Remaining gas will be distributed evenly across all Function Call Promises created during execution of current receipt.
726
+ */
727
+ min_gas?: string | null;
728
+ /**
729
+ * `msg` to pass in [`.on_auth`](::defuse_auth_call::AuthCallee::on_auth)
730
+ */
731
+ msg: string;
732
+ /**
733
+ * Optionally initialize the receiver's contract (Deterministic AccountId) via [`state_init`](https://github.com/near/NEPs/blob/master/neps/nep-0616.md#stateinit-action) right before calling [`.on_auth()`](::defuse_auth_call::AuthCallee::on_auth) (in the same receipt).
734
+ */
735
+ state_init?: StateInit | null;
736
+ }
737
+ /**
738
+ * Mint a set of tokens from the signer to a specified account id, within the intents contract.
739
+ *
740
+ * This interface was referenced by `NEARIntentsSchema`'s JSON-Schema
741
+ * via the `definition` "IntentImtMint".
742
+ */
743
+ interface IntentImtMint {
744
+ intent: "imt_mint";
745
+ memo?: string | null;
746
+ /**
747
+ * Minimum gas for `mt_on_transfer()`
748
+ *
749
+ * Remaining gas will be distributed evenly across all Function Call Promises created during execution of current receipt.
750
+ */
751
+ min_gas?: string | null;
752
+ /**
753
+ * Message to pass to `mt_on_transfer`
754
+ */
755
+ msg?: string;
756
+ /**
757
+ * Receiver of the minted tokens
758
+ */
759
+ receiver_id: string;
760
+ /**
761
+ * Optionally initialize the receiver's contract (Deterministic AccountId) via [`state_init`](https://github.com/near/NEPs/blob/master/neps/nep-0616.md#stateinit-action) right before calling `mt_on_transfer()` (in the same receipt).
762
+ */
763
+ state_init?: StateInit | null;
764
+ /**
765
+ * The token_ids will be wrapped to bind the token ID to the minter authority (i.e. signer of this intent). The final string representation of the token will be as follows: `imt:<minter_id>:<token_id>`
766
+ */
767
+ tokens: {
768
+ [k: string]: string;
769
+ };
770
+ }
771
+ /**
772
+ * Burn a set of imt tokens, within the intents contract.
773
+ *
774
+ * This interface was referenced by `NEARIntentsSchema`'s JSON-Schema
775
+ * via the `definition` "IntentImtBurn".
776
+ */
777
+ interface IntentImtBurn {
778
+ intent: "imt_burn";
779
+ memo?: string | null;
780
+ /**
781
+ * NEAR Account Identifier.
782
+ *
783
+ * This is a unique, syntactically valid, human-readable account identifier on the NEAR network.
784
+ *
785
+ * [See the crate-level docs for information about validation.](index.html#account-id-rules)
786
+ *
787
+ * Also see [Error kind precedence](AccountId#error-kind-precedence).
788
+ *
789
+ * ## Examples
790
+ *
791
+ * ``` use near_account_id::AccountId;
792
+ *
793
+ * let alice: AccountId = "alice.near".parse().unwrap();
794
+ *
795
+ * assert!("ƒelicia.near".parse::<AccountId>().is_err()); // (ƒ is not f) ```
796
+ */
797
+ minter_id: string;
798
+ /**
799
+ * The token_ids will be wrapped to bind the token ID to the minter authority. The final string representation of the token will be as follows: `imt:<minter_id>:<token_id>`
800
+ */
801
+ tokens: {
802
+ [k: string]: string;
803
+ };
804
+ }
805
+ /**
806
+ * Withdraw given FT tokens from the intents contract to a given external account id (external being outside of intents).
807
+ *
808
+ * This interface was referenced by `NEARIntentsSchema`'s JSON-Schema
809
+ * via the `definition` "FtWithdraw".
810
+ */
811
+ interface FtWithdraw {
812
+ amount: string;
813
+ memo?: string | null;
814
+ /**
815
+ * Optional minimum required Near gas for created Promise to succeed: * `ft_transfer`: minimum: 15TGas, default: 15TGas * `ft_transfer_call`: minimum: 30TGas, default: 50TGas
816
+ *
817
+ * Remaining gas will be distributed evenly across all Function Call Promises created during execution of current receipt.
818
+ */
819
+ min_gas?: string | null;
820
+ /**
821
+ * Message to pass to `ft_transfer_call`. Otherwise, `ft_transfer` will be used. NOTE: No refund will be made in case of insufficient `storage_deposit` on `token` for `receiver_id`
822
+ */
823
+ msg?: string | null;
824
+ /**
825
+ * NEAR Account Identifier.
826
+ *
827
+ * This is a unique, syntactically valid, human-readable account identifier on the NEAR network.
828
+ *
829
+ * [See the crate-level docs for information about validation.](index.html#account-id-rules)
830
+ *
831
+ * Also see [Error kind precedence](AccountId#error-kind-precedence).
832
+ *
833
+ * ## Examples
834
+ *
835
+ * ``` use near_account_id::AccountId;
836
+ *
837
+ * let alice: AccountId = "alice.near".parse().unwrap();
838
+ *
839
+ * assert!("ƒelicia.near".parse::<AccountId>().is_err()); // (ƒ is not f) ```
840
+ */
841
+ receiver_id: string;
842
+ /**
843
+ * Optionally make `storage_deposit` for `receiver_id` on `token`. The amount will be subtracted from user's NEP-141 `wNEAR` balance. NOTE: the `wNEAR` will not be refunded in case of fail
844
+ */
845
+ storage_deposit?: string | null;
846
+ /**
847
+ * NEAR Account Identifier.
848
+ *
849
+ * This is a unique, syntactically valid, human-readable account identifier on the NEAR network.
850
+ *
851
+ * [See the crate-level docs for information about validation.](index.html#account-id-rules)
852
+ *
853
+ * Also see [Error kind precedence](AccountId#error-kind-precedence).
854
+ *
855
+ * ## Examples
856
+ *
857
+ * ``` use near_account_id::AccountId;
858
+ *
859
+ * let alice: AccountId = "alice.near".parse().unwrap();
860
+ *
861
+ * assert!("ƒelicia.near".parse::<AccountId>().is_err()); // (ƒ is not f) ```
862
+ */
863
+ token: string;
864
+ }
865
+ /**
866
+ * This interface was referenced by `NEARIntentsSchema`'s JSON-Schema
867
+ * via the `definition` "IntentEvent_for_AccountEvent_for_NonceEvent".
868
+ */
869
+ interface IntentEventFor_AccountEventFor_NonceEvent {
870
+ /**
871
+ * Account identifier. This is the human readable UTF-8 string which is used internally to index accounts on the network and their respective state.
872
+ *
873
+ * This is the "referenced" version of the account ID. It is to [`AccountId`] what [`str`] is to [`String`], and works quite similarly to [`Path`]. Like with [`str`] and [`Path`], you can't have a value of type `AccountIdRef`, but you can have a reference like `&AccountIdRef` or `&mut AccountIdRef`.
874
+ *
875
+ * This type supports zero-copy deserialization offered by [`serde`](https://docs.rs/serde/), but cannot do the same for [`borsh`](https://docs.rs/borsh/) since the latter does not support zero-copy.
876
+ *
877
+ * # Examples ``` use near_account_id::{AccountId, AccountIdRef}; use std::convert::{TryFrom, TryInto};
878
+ *
879
+ * // Construction let alice = AccountIdRef::new("alice.near").unwrap(); assert!(AccountIdRef::new("invalid.").is_err()); ```
880
+ *
881
+ * [`FromStr`]: std::str::FromStr [`Path`]: std::path::Path
882
+ */
883
+ account_id: string;
884
+ intent_hash: string;
885
+ nonce: string;
886
+ }
887
+ /**
888
+ * This interface was referenced by `NEARIntentsSchema`'s JSON-Schema
889
+ * via the `definition` "InvariantViolatedUnmatchedDeltas".
890
+ */
891
+ interface InvariantViolatedUnmatchedDeltas {
892
+ error: "unmatched_deltas";
893
+ unmatched_deltas: {
894
+ [k: string]: string;
895
+ };
896
+ }
897
+ /**
898
+ * This interface was referenced by `NEARIntentsSchema`'s JSON-Schema
899
+ * via the `definition` "InvariantViolatedOverflow".
900
+ */
901
+ interface InvariantViolatedOverflow {
902
+ error: "overflow";
903
+ }
904
+ /**
905
+ * Withdraw given MT tokens (i.e. [NEP-245](https://github.com/near/NEPs/blob/master/neps/nep-0245.md)) from the intents contract to a given to an external account id (external being outside of intents).
906
+ *
907
+ * If `msg` is given, `mt_batch_transfer_call()` will be used to transfer to the `receiver_id`. Otherwise, `mt_batch_transfer()` will be used.
908
+ *
909
+ * This interface was referenced by `NEARIntentsSchema`'s JSON-Schema
910
+ * via the `definition` "MtWithdraw".
911
+ */
912
+ interface MtWithdraw {
913
+ amounts: string[];
914
+ memo?: string | null;
915
+ /**
916
+ * Optional minimum required Near gas for created Promise to succeed per token: * `mt_batch_transfer`: minimum: 20TGas, default: 20TGas * `mt_batch_transfer_call`: minimum: 35TGas, default: 50TGas
917
+ *
918
+ * Remaining gas will be distributed evenly across all Function Call Promises created during execution of current receipt.
919
+ */
920
+ min_gas?: string | null;
921
+ /**
922
+ * Message to pass to `mt_batch_transfer_call`. Otherwise, `mt_batch_transfer` will be used. NOTE: No refund will be made in case of insufficient `storage_deposit` on `token` for `receiver_id`
923
+ */
924
+ msg?: string | null;
925
+ /**
926
+ * NEAR Account Identifier.
927
+ *
928
+ * This is a unique, syntactically valid, human-readable account identifier on the NEAR network.
929
+ *
930
+ * [See the crate-level docs for information about validation.](index.html#account-id-rules)
931
+ *
932
+ * Also see [Error kind precedence](AccountId#error-kind-precedence).
933
+ *
934
+ * ## Examples
935
+ *
936
+ * ``` use near_account_id::AccountId;
937
+ *
938
+ * let alice: AccountId = "alice.near".parse().unwrap();
939
+ *
940
+ * assert!("ƒelicia.near".parse::<AccountId>().is_err()); // (ƒ is not f) ```
941
+ */
942
+ receiver_id: string;
943
+ /**
944
+ * Optionally make `storage_deposit` for `receiver_id` on `token`. The amount will be subtracted from user's NEP-141 `wNEAR` balance. NOTE: the `wNEAR` will not be refunded in case of fail
945
+ */
946
+ storage_deposit?: string | null;
947
+ /**
948
+ * NEAR Account Identifier.
949
+ *
950
+ * This is a unique, syntactically valid, human-readable account identifier on the NEAR network.
951
+ *
952
+ * [See the crate-level docs for information about validation.](index.html#account-id-rules)
953
+ *
954
+ * Also see [Error kind precedence](AccountId#error-kind-precedence).
955
+ *
956
+ * ## Examples
957
+ *
958
+ * ``` use near_account_id::AccountId;
959
+ *
960
+ * let alice: AccountId = "alice.near".parse().unwrap();
961
+ *
962
+ * assert!("ƒelicia.near".parse::<AccountId>().is_err()); // (ƒ is not f) ```
963
+ */
964
+ token: string;
965
+ token_ids: string[];
966
+ }
967
+ /**
968
+ * NEP-413: The standard for message signing in Near Protocol. For more details, refer to [NEP-413](https://github.com/near/NEPs/blob/master/neps/nep-0413.md).
969
+ *
970
+ * This interface was referenced by `NEARIntentsSchema`'s JSON-Schema
971
+ * via the `definition` "MultiPayloadNep413".
972
+ */
973
+ interface MultiPayloadNep413 {
974
+ payload: Nep413Payload;
975
+ public_key: string;
976
+ signature: string;
977
+ standard: "nep413";
978
+ }
979
+ /**
980
+ * See [NEP-413](https://github.com/near/NEPs/blob/master/neps/nep-0413.md)
981
+ *
982
+ * This interface was referenced by `NEARIntentsSchema`'s JSON-Schema
983
+ * via the `definition` "Nep413Payload".
984
+ */
985
+ interface Nep413Payload {
986
+ callbackUrl?: string | null;
987
+ message: string;
988
+ nonce: string;
989
+ recipient: string;
990
+ }
991
+ /**
992
+ * ERC-191: The standard for message signing in Ethereum, commonly used with `personal_sign()`. For more details, refer to [EIP-191](https://eips.ethereum.org/EIPS/eip-191).
993
+ *
994
+ * This interface was referenced by `NEARIntentsSchema`'s JSON-Schema
995
+ * via the `definition` "MultiPayloadErc191".
996
+ */
997
+ interface MultiPayloadErc191 {
998
+ payload: Erc191Payload;
999
+ /**
1000
+ * There is no public key member because the public key can be recovered via `ecrecover()` knowing the data and the signature
1001
+ */
1002
+ signature: string;
1003
+ standard: "erc191";
1004
+ }
1005
+ /**
1006
+ * TIP-191: The standard for message signing in Tron. For more details, refer to [TIP-191](https://github.com/tronprotocol/tips/blob/master/tip-191.md).
1007
+ *
1008
+ * This interface was referenced by `NEARIntentsSchema`'s JSON-Schema
1009
+ * via the `definition` "MultiPayloadTip191".
1010
+ */
1011
+ interface MultiPayloadTip191 {
1012
+ payload: Tip191Payload;
1013
+ /**
1014
+ * There is no public key member because the public key can be recovered via `ecrecover()` knowing the data and the signature
1015
+ */
1016
+ signature: string;
1017
+ standard: "tip191";
1018
+ }
1019
+ /**
1020
+ * Raw Ed25519: The standard used by Solana Phantom wallets for message signing. For more details, refer to [Phantom Wallet's documentation](https://docs.phantom.com/solana/signing-a-message).
1021
+ *
1022
+ * This interface was referenced by `NEARIntentsSchema`'s JSON-Schema
1023
+ * via the `definition` "MultiPayloadRawEd25519".
1024
+ */
1025
+ interface MultiPayloadRawEd25519 {
1026
+ payload: string;
1027
+ public_key: string;
1028
+ signature: string;
1029
+ standard: "raw_ed25519";
1030
+ }
1031
+ /**
1032
+ * [COSE EdDSA (-8) algorithm](https://www.iana.org/assignments/cose/cose.xhtml#algorithms): ed25519 curve
1033
+ *
1034
+ * This interface was referenced by `NEARIntentsSchema`'s JSON-Schema
1035
+ * via the `definition` "MultiPayloadWebauthnEd25519".
1036
+ */
1037
+ interface MultiPayloadWebauthnEd25519 {
1038
+ /**
1039
+ * Base64Url-encoded [authenticatorData](https://w3c.github.io/webauthn/#authenticator-data)
1040
+ */
1041
+ authenticator_data: string;
1042
+ /**
1043
+ * Serialized [clientDataJSON](https://w3c.github.io/webauthn/#dom-authenticatorresponse-clientdatajson)
1044
+ */
1045
+ client_data_json: string;
1046
+ payload: string;
1047
+ standard: "webauthn";
1048
+ public_key: string;
1049
+ signature: string;
1050
+ }
1051
+ /**
1052
+ * [COSE ES256 (-7) algorithm](https://www.iana.org/assignments/cose/cose.xhtml#algorithms): NIST P-256 curve (a.k.a secp256r1) over SHA-256
1053
+ *
1054
+ * This interface was referenced by `NEARIntentsSchema`'s JSON-Schema
1055
+ * via the `definition` "MultiPayloadWebauthnP256".
1056
+ */
1057
+ interface MultiPayloadWebauthnP256 {
1058
+ /**
1059
+ * Base64Url-encoded [authenticatorData](https://w3c.github.io/webauthn/#authenticator-data)
1060
+ */
1061
+ authenticator_data: string;
1062
+ /**
1063
+ * Serialized [clientDataJSON](https://w3c.github.io/webauthn/#dom-authenticatorresponse-clientdatajson)
1064
+ */
1065
+ client_data_json: string;
1066
+ payload: string;
1067
+ standard: "webauthn";
1068
+ public_key: string;
1069
+ signature: string;
1070
+ }
1071
+ /**
1072
+ * TonConnect: The standard for data signing in TON blockchain platform. For more details, refer to [TonConnect documentation](https://docs.tonconsole.com/academy/sign-data).
1073
+ *
1074
+ * This interface was referenced by `NEARIntentsSchema`'s JSON-Schema
1075
+ * via the `definition` "MultiPayloadTonConnect".
1076
+ */
1077
+ interface MultiPayloadTonConnect {
1078
+ /**
1079
+ * Wallet address in either [Raw](https://docs.ton.org/v3/documentation/smart-contracts/addresses/address-formats#raw-address) representation or [user-friendly](https://docs.ton.org/v3/documentation/smart-contracts/addresses/address-formats#user-friendly-address) format
1080
+ */
1081
+ address: String;
1082
+ /**
1083
+ * dApp domain
1084
+ */
1085
+ domain: string;
1086
+ payload: TonConnectPayloadSchema;
1087
+ public_key: string;
1088
+ signature: string;
1089
+ standard: "ton_connect";
1090
+ /**
1091
+ * UNIX timestamp (in seconds or RFC3339) at the time of singing
1092
+ */
1093
+ timestamp: PickFirstDateTimeint64;
1094
+ }
1095
+ /**
1096
+ * This interface was referenced by `NEARIntentsSchema`'s JSON-Schema
1097
+ * via the `definition` "TonConnectPayloadSchemaText".
1098
+ */
1099
+ interface TonConnectPayloadSchemaText {
1100
+ text: string;
1101
+ type: "text";
1102
+ }
1103
+ /**
1104
+ * SEP-53: The standard for signing data off-chain for Stellar accounts. See [SEP-53](https://github.com/stellar/stellar-protocol/blob/master/ecosystem/sep-0053.md)
1105
+ *
1106
+ * This interface was referenced by `NEARIntentsSchema`'s JSON-Schema
1107
+ * via the `definition` "MultiPayloadSep53".
1108
+ */
1109
+ interface MultiPayloadSep53 {
1110
+ payload: string;
1111
+ public_key: string;
1112
+ signature: string;
1113
+ standard: "sep53";
1114
+ }
1115
+ /**
1116
+ * Withdraw native tokens (NEAR) from the intents contract to a given external account id (external being outside of intents). This will subtract from the account's wNEAR balance, and will be sent to the account specified as native NEAR. NOTE: the `wNEAR` will not be refunded in case of fail (e.g. `receiver_id` account does not exist).
1117
+ *
1118
+ * This interface was referenced by `NEARIntentsSchema`'s JSON-Schema
1119
+ * via the `definition` "NativeWithdraw".
1120
+ */
1121
+ interface NativeWithdraw {
1122
+ amount: string;
1123
+ /**
1124
+ * NEAR Account Identifier.
1125
+ *
1126
+ * This is a unique, syntactically valid, human-readable account identifier on the NEAR network.
1127
+ *
1128
+ * [See the crate-level docs for information about validation.](index.html#account-id-rules)
1129
+ *
1130
+ * Also see [Error kind precedence](AccountId#error-kind-precedence).
1131
+ *
1132
+ * ## Examples
1133
+ *
1134
+ * ``` use near_account_id::AccountId;
1135
+ *
1136
+ * let alice: AccountId = "alice.near".parse().unwrap();
1137
+ *
1138
+ * assert!("ƒelicia.near".parse::<AccountId>().is_err()); // (ƒ is not f) ```
1139
+ */
1140
+ receiver_id: string;
1141
+ }
1142
+ /**
1143
+ * This interface was referenced by `NEARIntentsSchema`'s JSON-Schema
1144
+ * via the `definition` "Nep413DefuseMessage_for_DefuseIntents".
1145
+ */
1146
+ interface Nep413DefuseMessageFor_DefuseIntents {
1147
+ deadline: Deadline;
1148
+ /**
1149
+ * Sequence of intents to execute in given order. Empty list is also a valid sequence, i.e. it doesn't do anything, but still invalidates the `nonce` for the signer WARNING: Promises created by different intents are executed concurrently and does not rely on the order of the intents in this structure
1150
+ */
1151
+ intents?: Intent[];
1152
+ /**
1153
+ * NEAR Account Identifier.
1154
+ *
1155
+ * This is a unique, syntactically valid, human-readable account identifier on the NEAR network.
1156
+ *
1157
+ * [See the crate-level docs for information about validation.](index.html#account-id-rules)
1158
+ *
1159
+ * Also see [Error kind precedence](AccountId#error-kind-precedence).
1160
+ *
1161
+ * ## Examples
1162
+ *
1163
+ * ``` use near_account_id::AccountId;
1164
+ *
1165
+ * let alice: AccountId = "alice.near".parse().unwrap();
1166
+ *
1167
+ * assert!("ƒelicia.near".parse::<AccountId>().is_err()); // (ƒ is not f) ```
1168
+ */
1169
+ signer_id: string;
1170
+ }
1171
+ /**
1172
+ * Withdraw given NFT tokens from the intents contract to a given external account id (external being outside of intents).
1173
+ *
1174
+ * This interface was referenced by `NEARIntentsSchema`'s JSON-Schema
1175
+ * via the `definition` "NftWithdraw".
1176
+ */
1177
+ interface NftWithdraw {
1178
+ memo?: string | null;
1179
+ /**
1180
+ * Optional minimum required Near gas for created Promise to succeed: * `nft_transfer`: minimum: 15TGas, default: 15TGas * `nft_transfer_call`: minimum: 30TGas, default: 50TGas
1181
+ *
1182
+ * Remaining gas will be distributed evenly across all Function Call Promises created during execution of current receipt.
1183
+ */
1184
+ min_gas?: string | null;
1185
+ /**
1186
+ * Message to pass to `nft_transfer_call`. Otherwise, `nft_transfer` will be used. NOTE: No refund will be made in case of insufficient `storage_deposit` on `token` for `receiver_id`
1187
+ */
1188
+ msg?: string | null;
1189
+ /**
1190
+ * NEAR Account Identifier.
1191
+ *
1192
+ * This is a unique, syntactically valid, human-readable account identifier on the NEAR network.
1193
+ *
1194
+ * [See the crate-level docs for information about validation.](index.html#account-id-rules)
1195
+ *
1196
+ * Also see [Error kind precedence](AccountId#error-kind-precedence).
1197
+ *
1198
+ * ## Examples
1199
+ *
1200
+ * ``` use near_account_id::AccountId;
1201
+ *
1202
+ * let alice: AccountId = "alice.near".parse().unwrap();
1203
+ *
1204
+ * assert!("ƒelicia.near".parse::<AccountId>().is_err()); // (ƒ is not f) ```
1205
+ */
1206
+ receiver_id: string;
1207
+ /**
1208
+ * Optionally make `storage_deposit` for `receiver_id` on `token`. The amount will be subtracted from user's NEP-141 `wNEAR` balance. NOTE: the `wNEAR` will not be refunded in case of fail
1209
+ */
1210
+ storage_deposit?: string | null;
1211
+ /**
1212
+ * NEAR Account Identifier.
1213
+ *
1214
+ * This is a unique, syntactically valid, human-readable account identifier on the NEAR network.
1215
+ *
1216
+ * [See the crate-level docs for information about validation.](index.html#account-id-rules)
1217
+ *
1218
+ * Also see [Error kind precedence](AccountId#error-kind-precedence).
1219
+ *
1220
+ * ## Examples
1221
+ *
1222
+ * ``` use near_account_id::AccountId;
1223
+ *
1224
+ * let alice: AccountId = "alice.near".parse().unwrap();
1225
+ *
1226
+ * assert!("ƒelicia.near".parse::<AccountId>().is_err()); // (ƒ is not f) ```
1227
+ */
1228
+ token: string;
1229
+ token_id: string;
1230
+ }
1231
+ /**
1232
+ * Collects super admin accounts and accounts that have been granted permissions defined by `AccessControlRole`.
1233
+ *
1234
+ * # Data structure
1235
+ *
1236
+ * Assume `AccessControlRole` is derived for the following enum, which is then passed as `role` attribute to `AccessControllable`.
1237
+ *
1238
+ * ```rust pub enum Role { PauseManager, UnpauseManager, } ```
1239
+ *
1240
+ * Then the returned data has the following structure:
1241
+ *
1242
+ * ```ignore PermissionedAccounts { super_admins: vec!["acc1.near", "acc2.near"], roles: HashMap::from([ ("PauseManager", PermissionedAccountsPerRole { admins: vec!["acc3.near", "acc4.near"], grantees: vec!["acc5.near", "acc6.near"], }), ("UnpauseManager", PermissionedAccountsPerRole { admins: vec!["acc7.near", "acc8.near"], grantees: vec!["acc9.near", "acc10.near"], }), ]) } ```
1243
+ *
1244
+ * # Uniqueness and ordering
1245
+ *
1246
+ * Account ids returned in vectors are unique but not ordered.
1247
+ *
1248
+ * This interface was referenced by `NEARIntentsSchema`'s JSON-Schema
1249
+ * via the `definition` "PermissionedAccounts".
1250
+ */
1251
+ interface PermissionedAccounts {
1252
+ /**
1253
+ * The admins and grantees of all roles.
1254
+ */
1255
+ roles: {
1256
+ [k: string]: PermissionedAccountsPerRole;
1257
+ };
1258
+ /**
1259
+ * The accounts that have super admin permissions.
1260
+ */
1261
+ super_admins: string[];
1262
+ }
1263
+ /**
1264
+ * Collects all admins and grantees of a role.
1265
+ *
1266
+ * # Uniqueness and ordering
1267
+ *
1268
+ * Account ids returned in vectors are unique but not ordered.
1269
+ *
1270
+ * This interface was referenced by `NEARIntentsSchema`'s JSON-Schema
1271
+ * via the `definition` "PermissionedAccountsPerRole".
1272
+ */
1273
+ interface PermissionedAccountsPerRole {
1274
+ /**
1275
+ * The accounts that have admin permissions for the role.
1276
+ */
1277
+ admins: string[];
1278
+ /**
1279
+ * The accounts that have been granted the role.
1280
+ */
1281
+ grantees: string[];
1282
+ }
1283
+ /**
1284
+ * This interface was referenced by `NEARIntentsSchema`'s JSON-Schema
1285
+ * via the `definition` "SimulationOutput".
1286
+ */
1287
+ interface SimulationOutput {
1288
+ intents_executed: IntentEventFor_AccountEventFor_NonceEvent[];
1289
+ /**
1290
+ * Unmatched token deltas needed to keep the invariant. If not empty, can be used along with fee to calculate `token_diff` closure.
1291
+ */
1292
+ invariant_violated?: InvariantViolated | null;
1293
+ logs: string[];
1294
+ min_deadline: Deadline;
1295
+ /**
1296
+ * Additional info about current state
1297
+ */
1298
+ state: StateOutput;
1299
+ }
1300
+ /**
1301
+ * This interface was referenced by `NEARIntentsSchema`'s JSON-Schema
1302
+ * via the `definition` "StateOutput".
1303
+ */
1304
+ interface StateOutput {
1305
+ current_salt: string;
1306
+ fee: Pips;
1307
+ }
1308
+ /**
1309
+ * Make [NEP-145](https://nomicon.io/Standards/StorageManagement#nep-145) `storage_deposit` for an `account_id` on `contract_id`. The `amount` will be subtracted from user's NEP-141 `wNEAR` balance. NOTE: the `wNEAR` will not be refunded in any case.
1310
+ *
1311
+ * WARNING: use this intent only if paying storage_deposit is not a prerequisite for other intents to succeed. If some intent (e.g. ft_withdraw) requires storage_deposit, then use storage_deposit field of corresponding intent instead of adding a separate `StorageDeposit` intent. This is due to the fact that intents that fire `Promise`s are not guaranteed to be executed sequentially, in the order of the provided intents in `DefuseIntents`.
1312
+ *
1313
+ * This interface was referenced by `NEARIntentsSchema`'s JSON-Schema
1314
+ * via the `definition` "StorageDeposit".
1315
+ */
1316
+ interface StorageDeposit {
1317
+ amount: string;
1318
+ /**
1319
+ * NEAR Account Identifier.
1320
+ *
1321
+ * This is a unique, syntactically valid, human-readable account identifier on the NEAR network.
1322
+ *
1323
+ * [See the crate-level docs for information about validation.](index.html#account-id-rules)
1324
+ *
1325
+ * Also see [Error kind precedence](AccountId#error-kind-precedence).
1326
+ *
1327
+ * ## Examples
1328
+ *
1329
+ * ``` use near_account_id::AccountId;
1330
+ *
1331
+ * let alice: AccountId = "alice.near".parse().unwrap();
1332
+ *
1333
+ * assert!("ƒelicia.near".parse::<AccountId>().is_err()); // (ƒ is not f) ```
1334
+ */
1335
+ contract_id: string;
1336
+ /**
1337
+ * NEAR Account Identifier.
1338
+ *
1339
+ * This is a unique, syntactically valid, human-readable account identifier on the NEAR network.
1340
+ *
1341
+ * [See the crate-level docs for information about validation.](index.html#account-id-rules)
1342
+ *
1343
+ * Also see [Error kind precedence](AccountId#error-kind-precedence).
1344
+ *
1345
+ * ## Examples
1346
+ *
1347
+ * ``` use near_account_id::AccountId;
1348
+ *
1349
+ * let alice: AccountId = "alice.near".parse().unwrap();
1350
+ *
1351
+ * assert!("ƒelicia.near".parse::<AccountId>().is_err()); // (ƒ is not f) ```
1352
+ */
1353
+ deposit_for_account_id: string;
1354
+ }
1355
+ /**
1356
+ * This interface was referenced by `NEARIntentsSchema`'s JSON-Schema
1357
+ * via the `definition` "Token".
1358
+ */
1359
+ interface Token {
1360
+ /**
1361
+ * NEAR Account Identifier.
1362
+ *
1363
+ * This is a unique, syntactically valid, human-readable account identifier on the NEAR network.
1364
+ *
1365
+ * [See the crate-level docs for information about validation.](index.html#account-id-rules)
1366
+ *
1367
+ * Also see [Error kind precedence](AccountId#error-kind-precedence).
1368
+ *
1369
+ * ## Examples
1370
+ *
1371
+ * ``` use near_account_id::AccountId;
1372
+ *
1373
+ * let alice: AccountId = "alice.near".parse().unwrap();
1374
+ *
1375
+ * assert!("ƒelicia.near".parse::<AccountId>().is_err()); // (ƒ is not f) ```
1376
+ */
1377
+ owner_id?: string | null;
1378
+ token_id: string;
1379
+ }
1380
+ /**
1381
+ * This interface was referenced by `NEARIntentsSchema`'s JSON-Schema
1382
+ * via the `definition` "Nep413DefusePayload".
1383
+ */
1384
+ interface Nep413DefusePayload {
1385
+ deadline: Deadline;
1386
+ /**
1387
+ * NEAR Account Identifier.
1388
+ *
1389
+ * This is a unique, syntactically valid, human-readable account identifier on the NEAR network.
1390
+ *
1391
+ * [See the crate-level docs for information about validation.](index.html#account-id-rules)
1392
+ *
1393
+ * Also see [Error kind precedence](AccountId#error-kind-precedence).
1394
+ *
1395
+ * ## Examples
1396
+ *
1397
+ * ``` use near_account_id::AccountId;
1398
+ *
1399
+ * let alice: AccountId = "alice.near".parse().unwrap();
1400
+ *
1401
+ * assert!("ƒelicia.near".parse::<AccountId>().is_err()); // (ƒ is not f) ```
1402
+ */
1403
+ signer_id: string;
1404
+ /**
1405
+ * Sequence of intents to execute in given order. Empty list is also a valid sequence, i.e. it doesn't do anything, but still invalidates the `nonce` for the signer WARNING: Promises created by different intents are executed concurrently and does not rely on the order of the intents in this structure
1406
+ */
1407
+ intents?: Intent[];
1408
+ }
1409
+ /**
1410
+ * See [NEP-413](https://github.com/near/NEPs/blob/master/neps/nep-0413.md)
1411
+ *
1412
+ * This interface was referenced by `NEARIntentsSchema`'s JSON-Schema
1413
+ * via the `definition` "Nep413Payload__Parsed".
1414
+ */
1415
+ interface Nep413Payload__Parsed {
1416
+ callbackUrl?: string | null;
1417
+ message: {
1418
+ original: string;
1419
+ parsed: Nep413DefusePayload;
1420
+ };
1421
+ nonce: string;
1422
+ recipient: string;
1423
+ }
1424
+ /**
1425
+ * NEP-413: The standard for message signing in Near Protocol. For more details, refer to [NEP-413](https://github.com/near/NEPs/blob/master/neps/nep-0413.md).
1426
+ *
1427
+ * This interface was referenced by `NEARIntentsSchema`'s JSON-Schema
1428
+ * via the `definition` "MultiPayloadNep413__Parsed".
1429
+ */
1430
+ interface MultiPayloadNep413__Parsed {
1431
+ payload: Nep413Payload__Parsed;
1432
+ public_key: string;
1433
+ signature: string;
1434
+ standard: "nep413";
1435
+ }
1436
+ /**
1437
+ * ERC-191: The standard for message signing in Ethereum, commonly used with `personal_sign()`. For more details, refer to [EIP-191](https://eips.ethereum.org/EIPS/eip-191).
1438
+ *
1439
+ * This interface was referenced by `NEARIntentsSchema`'s JSON-Schema
1440
+ * via the `definition` "MultiPayloadErc191__Parsed".
1441
+ */
1442
+ interface MultiPayloadErc191__Parsed {
1443
+ payload: {
1444
+ original: string;
1445
+ parsed: DefusePayloadFor_DefuseIntents;
1446
+ };
1447
+ /**
1448
+ * There is no public key member because the public key can be recovered via `ecrecover()` knowing the data and the signature
1449
+ */
1450
+ signature: string;
1451
+ standard: "erc191";
1452
+ }
1453
+ /**
1454
+ * TIP-191: The standard for message signing in Tron. For more details, refer to [TIP-191](https://github.com/tronprotocol/tips/blob/master/tip-191.md).
1455
+ *
1456
+ * This interface was referenced by `NEARIntentsSchema`'s JSON-Schema
1457
+ * via the `definition` "MultiPayloadTip191__Parsed".
1458
+ */
1459
+ interface MultiPayloadTip191__Parsed {
1460
+ payload: {
1461
+ original: string;
1462
+ parsed: DefusePayloadFor_DefuseIntents;
1463
+ };
1464
+ /**
1465
+ * There is no public key member because the public key can be recovered via `ecrecover()` knowing the data and the signature
1466
+ */
1467
+ signature: string;
1468
+ standard: "tip191";
1469
+ }
1470
+ /**
1471
+ * Raw Ed25519: The standard used by Solana Phantom wallets for message signing. For more details, refer to [Phantom Wallet's documentation](https://docs.phantom.com/solana/signing-a-message).
1472
+ *
1473
+ * This interface was referenced by `NEARIntentsSchema`'s JSON-Schema
1474
+ * via the `definition` "MultiPayloadRawEd25519__Parsed".
1475
+ */
1476
+ interface MultiPayloadRawEd25519__Parsed {
1477
+ payload: {
1478
+ original: string;
1479
+ parsed: DefusePayloadFor_DefuseIntents;
1480
+ };
1481
+ public_key: string;
1482
+ signature: string;
1483
+ standard: "raw_ed25519";
1484
+ }
1485
+ /**
1486
+ * [COSE EdDSA (-8) algorithm](https://www.iana.org/assignments/cose/cose.xhtml#algorithms): ed25519 curve
1487
+ *
1488
+ * This interface was referenced by `NEARIntentsSchema`'s JSON-Schema
1489
+ * via the `definition` "MultiPayloadWebauthnEd25519__Parsed".
1490
+ */
1491
+ interface MultiPayloadWebauthnEd25519__Parsed {
1492
+ /**
1493
+ * Base64Url-encoded [authenticatorData](https://w3c.github.io/webauthn/#authenticator-data)
1494
+ */
1495
+ authenticator_data: string;
1496
+ /**
1497
+ * Serialized [clientDataJSON](https://w3c.github.io/webauthn/#dom-authenticatorresponse-clientdatajson)
1498
+ */
1499
+ client_data_json: string;
1500
+ payload: {
1501
+ original: string;
1502
+ parsed: DefusePayloadFor_DefuseIntents;
1503
+ };
1504
+ standard: "webauthn";
1505
+ public_key: string;
1506
+ signature: string;
1507
+ }
1508
+ /**
1509
+ * [COSE ES256 (-7) algorithm](https://www.iana.org/assignments/cose/cose.xhtml#algorithms): NIST P-256 curve (a.k.a secp256r1) over SHA-256
1510
+ *
1511
+ * This interface was referenced by `NEARIntentsSchema`'s JSON-Schema
1512
+ * via the `definition` "MultiPayloadWebauthnP256__Parsed".
1513
+ */
1514
+ interface MultiPayloadWebauthnP256__Parsed {
1515
+ /**
1516
+ * Base64Url-encoded [authenticatorData](https://w3c.github.io/webauthn/#authenticator-data)
1517
+ */
1518
+ authenticator_data: string;
1519
+ /**
1520
+ * Serialized [clientDataJSON](https://w3c.github.io/webauthn/#dom-authenticatorresponse-clientdatajson)
1521
+ */
1522
+ client_data_json: string;
1523
+ payload: {
1524
+ original: string;
1525
+ parsed: DefusePayloadFor_DefuseIntents;
1526
+ };
1527
+ standard: "webauthn";
1528
+ public_key: string;
1529
+ signature: string;
1530
+ }
1531
+ /**
1532
+ * TonConnect: The standard for data signing in TON blockchain platform. For more details, refer to [TonConnect documentation](https://docs.tonconsole.com/academy/sign-data).
1533
+ *
1534
+ * This interface was referenced by `NEARIntentsSchema`'s JSON-Schema
1535
+ * via the `definition` "MultiPayloadTonConnect__Parsed".
1536
+ */
1537
+ interface MultiPayloadTonConnect__Parsed {
1538
+ /**
1539
+ * Wallet address in either [Raw](https://docs.ton.org/v3/documentation/smart-contracts/addresses/address-formats#raw-address) representation or [user-friendly](https://docs.ton.org/v3/documentation/smart-contracts/addresses/address-formats#user-friendly-address) format
1540
+ */
1541
+ address: String;
1542
+ /**
1543
+ * dApp domain
1544
+ */
1545
+ domain: string;
1546
+ payload: TonConnectPayloadSchema__Parsed;
1547
+ public_key: string;
1548
+ signature: string;
1549
+ standard: "ton_connect";
1550
+ /**
1551
+ * UNIX timestamp (in seconds or RFC3339) at the time of singing
1552
+ */
1553
+ timestamp: PickFirstDateTimeint64;
1554
+ }
1555
+ /**
1556
+ * SEP-53: The standard for signing data off-chain for Stellar accounts. See [SEP-53](https://github.com/stellar/stellar-protocol/blob/master/ecosystem/sep-0053.md)
1557
+ *
1558
+ * This interface was referenced by `NEARIntentsSchema`'s JSON-Schema
1559
+ * via the `definition` "MultiPayloadSep53__Parsed".
1560
+ */
1561
+ interface MultiPayloadSep53__Parsed {
1562
+ payload: {
1563
+ original: string;
1564
+ parsed: DefusePayloadFor_DefuseIntents;
1565
+ };
1566
+ public_key: string;
1567
+ signature: string;
1568
+ standard: "sep53";
1569
+ }
1570
+ /**
1571
+ * Enum of supported intent standards.
1572
+ * Generated from the MultiPayload schema variants.
1573
+ */
1574
+ declare enum IntentStandardEnum {
1575
+ NEP413 = "nep413",
1576
+ ERC191 = "erc191",
1577
+ TIP191 = "tip191",
1578
+ RAW_ED25519 = "raw_ed25519",
1579
+ WEBAUTHN = "webauthn",
1580
+ TON_CONNECT = "ton_connect",
1581
+ SEP53 = "sep53",
1582
+ }
1583
+ //#endregion
1584
+ export { AuthCall, Deadline, DefuseConfig, DefusePayloadFor_DefuseIntents, Erc191Payload, FeesConfig, FtWithdraw, GlobalContractId, Intent, IntentAddPublicKey, IntentAuthCall, IntentEventFor_AccountEventFor_NonceEvent, IntentFtWithdraw, IntentImtBurn, IntentImtMint, IntentMtWithdraw, IntentNativeWithdraw, IntentNftWithdraw, IntentRemovePublicKey, IntentSetAuthByPredecessorId, IntentStandardEnum, IntentStorageDeposit, IntentTokenDiff, IntentTransfer, InvariantViolated, InvariantViolatedOverflow, InvariantViolatedUnmatchedDeltas, MtWithdraw, MultiPayload, MultiPayloadErc191, MultiPayloadErc191__Parsed, MultiPayloadNarrowed, MultiPayloadNarrowed__Parsed, MultiPayloadNep413, MultiPayloadNep413__Parsed, MultiPayloadRawEd25519, MultiPayloadRawEd25519__Parsed, MultiPayloadSep53, MultiPayloadSep53__Parsed, MultiPayloadTip191, MultiPayloadTip191__Parsed, MultiPayloadTonConnect, MultiPayloadTonConnect__Parsed, MultiPayloadWebauthnEd25519, MultiPayloadWebauthnEd25519__Parsed, MultiPayloadWebauthnP256, MultiPayloadWebauthnP256__Parsed, MultiPayload__Parsed, NEARIntentsSchema, NativeWithdraw, Nep413DefuseMessageFor_DefuseIntents, Nep413DefusePayload, Nep413Payload, Nep413Payload__Parsed, NftWithdraw, PermissionedAccounts, PermissionedAccountsPerRole, PickFirstDateTimeint64, Pips, RolesConfig, SimulationOutput, StateInit, StateInitV1, StateOutput, StorageDeposit, String, Tip191Payload, Token, TonConnectPayloadSchema, TonConnectPayloadSchemaText, TonConnectPayloadSchema__Parsed };