@layerzerolabs/lz-v2-stellar-sdk 0.2.8 → 0.2.9
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/generated/bml.d.ts +88 -17
- package/dist/generated/bml.js +62 -16
- package/dist/generated/counter.d.ts +281 -102
- package/dist/generated/counter.js +93 -41
- package/dist/generated/endpoint.d.ts +128 -105
- package/dist/generated/endpoint.js +47 -45
- package/dist/generated/sml.d.ts +212 -69
- package/dist/generated/sml.js +103 -53
- package/dist/generated/uln302.d.ts +270 -173
- package/dist/generated/uln302.js +112 -64
- package/package.json +15 -15
- package/src/generated/bml.ts +87 -21
- package/src/generated/counter.ts +268 -91
- package/src/generated/endpoint.ts +133 -105
- package/src/generated/executor.ts +1816 -0
- package/src/generated/executor_helper.ts +843 -0
- package/src/generated/sml.ts +241 -85
- package/src/generated/uln302.ts +285 -191
- package/test/index.test.ts +147 -42
- package/test/suites/constants.ts +7 -3
- package/test/suites/deploy.ts +65 -42
- package/test/suites/localnet.ts +2 -2
- package/test/suites/scan.ts +28 -25
- package/test/utils.ts +199 -0
- package/tsconfig.json +93 -95
|
@@ -40,6 +40,80 @@ export type CounterStorage = {
|
|
|
40
40
|
tag: "OutboundCount";
|
|
41
41
|
values: readonly [u32];
|
|
42
42
|
};
|
|
43
|
+
export declare const EndpointError: {
|
|
44
|
+
1: {
|
|
45
|
+
message: string;
|
|
46
|
+
};
|
|
47
|
+
2: {
|
|
48
|
+
message: string;
|
|
49
|
+
};
|
|
50
|
+
3: {
|
|
51
|
+
message: string;
|
|
52
|
+
};
|
|
53
|
+
4: {
|
|
54
|
+
message: string;
|
|
55
|
+
};
|
|
56
|
+
5: {
|
|
57
|
+
message: string;
|
|
58
|
+
};
|
|
59
|
+
6: {
|
|
60
|
+
message: string;
|
|
61
|
+
};
|
|
62
|
+
7: {
|
|
63
|
+
message: string;
|
|
64
|
+
};
|
|
65
|
+
8: {
|
|
66
|
+
message: string;
|
|
67
|
+
};
|
|
68
|
+
9: {
|
|
69
|
+
message: string;
|
|
70
|
+
};
|
|
71
|
+
10: {
|
|
72
|
+
message: string;
|
|
73
|
+
};
|
|
74
|
+
11: {
|
|
75
|
+
message: string;
|
|
76
|
+
};
|
|
77
|
+
12: {
|
|
78
|
+
message: string;
|
|
79
|
+
};
|
|
80
|
+
13: {
|
|
81
|
+
message: string;
|
|
82
|
+
};
|
|
83
|
+
14: {
|
|
84
|
+
message: string;
|
|
85
|
+
};
|
|
86
|
+
15: {
|
|
87
|
+
message: string;
|
|
88
|
+
};
|
|
89
|
+
16: {
|
|
90
|
+
message: string;
|
|
91
|
+
};
|
|
92
|
+
17: {
|
|
93
|
+
message: string;
|
|
94
|
+
};
|
|
95
|
+
18: {
|
|
96
|
+
message: string;
|
|
97
|
+
};
|
|
98
|
+
19: {
|
|
99
|
+
message: string;
|
|
100
|
+
};
|
|
101
|
+
20: {
|
|
102
|
+
message: string;
|
|
103
|
+
};
|
|
104
|
+
21: {
|
|
105
|
+
message: string;
|
|
106
|
+
};
|
|
107
|
+
22: {
|
|
108
|
+
message: string;
|
|
109
|
+
};
|
|
110
|
+
23: {
|
|
111
|
+
message: string;
|
|
112
|
+
};
|
|
113
|
+
24: {
|
|
114
|
+
message: string;
|
|
115
|
+
};
|
|
116
|
+
};
|
|
43
117
|
/**
|
|
44
118
|
* Parameters for sending a cross-chain message.
|
|
45
119
|
*/
|
|
@@ -226,13 +300,13 @@ export interface OutboundPacket {
|
|
|
226
300
|
*/
|
|
227
301
|
export interface FeeRecipient {
|
|
228
302
|
/**
|
|
229
|
-
* Address to receive the fee.
|
|
230
|
-
*/
|
|
231
|
-
address: string;
|
|
232
|
-
/**
|
|
233
303
|
* Amount of fee to pay.
|
|
234
304
|
*/
|
|
235
305
|
amount: i128;
|
|
306
|
+
/**
|
|
307
|
+
* The address to send the fee to.
|
|
308
|
+
*/
|
|
309
|
+
to: string;
|
|
236
310
|
}
|
|
237
311
|
/**
|
|
238
312
|
* Result of send operation containing fees and encoded packet.
|
|
@@ -252,16 +326,16 @@ export interface FeesAndPacket {
|
|
|
252
326
|
zro_fee_recipients: Array<FeeRecipient>;
|
|
253
327
|
}
|
|
254
328
|
export declare const OAppError: {
|
|
255
|
-
|
|
329
|
+
2000: {
|
|
256
330
|
message: string;
|
|
257
331
|
};
|
|
258
|
-
|
|
332
|
+
2001: {
|
|
259
333
|
message: string;
|
|
260
334
|
};
|
|
261
|
-
|
|
335
|
+
2002: {
|
|
262
336
|
message: string;
|
|
263
337
|
};
|
|
264
|
-
|
|
338
|
+
2003: {
|
|
265
339
|
message: string;
|
|
266
340
|
};
|
|
267
341
|
};
|
|
@@ -282,39 +356,39 @@ export type OAppOptionsType3Storage = {
|
|
|
282
356
|
values: readonly [u32, u32];
|
|
283
357
|
};
|
|
284
358
|
export declare const BufferReaderError: {
|
|
285
|
-
|
|
359
|
+
1000: {
|
|
286
360
|
message: string;
|
|
287
361
|
};
|
|
288
|
-
|
|
362
|
+
1001: {
|
|
289
363
|
message: string;
|
|
290
364
|
};
|
|
291
365
|
};
|
|
292
366
|
export declare const BufferWriterError: {
|
|
293
|
-
|
|
367
|
+
1100: {
|
|
294
368
|
message: string;
|
|
295
369
|
};
|
|
296
370
|
};
|
|
297
371
|
export declare const TtlError: {
|
|
298
|
-
|
|
372
|
+
1200: {
|
|
299
373
|
message: string;
|
|
300
374
|
};
|
|
301
|
-
|
|
375
|
+
1201: {
|
|
302
376
|
message: string;
|
|
303
377
|
};
|
|
304
|
-
|
|
378
|
+
1202: {
|
|
305
379
|
message: string;
|
|
306
380
|
};
|
|
307
381
|
};
|
|
308
382
|
export declare const OwnableError: {
|
|
309
|
-
|
|
383
|
+
1300: {
|
|
310
384
|
message: string;
|
|
311
385
|
};
|
|
312
|
-
|
|
386
|
+
1301: {
|
|
313
387
|
message: string;
|
|
314
388
|
};
|
|
315
389
|
};
|
|
316
390
|
export declare const BytesExtError: {
|
|
317
|
-
|
|
391
|
+
1400: {
|
|
318
392
|
message: string;
|
|
319
393
|
};
|
|
320
394
|
};
|
|
@@ -335,7 +409,7 @@ export interface TtlConfig {
|
|
|
335
409
|
*/
|
|
336
410
|
threshold: u32;
|
|
337
411
|
}
|
|
338
|
-
export type
|
|
412
|
+
export type TtlConfigStorage = {
|
|
339
413
|
tag: "Frozen";
|
|
340
414
|
values: void;
|
|
341
415
|
} | {
|
|
@@ -344,9 +418,6 @@ export type TtlConfigData = {
|
|
|
344
418
|
} | {
|
|
345
419
|
tag: "Persistent";
|
|
346
420
|
values: void;
|
|
347
|
-
} | {
|
|
348
|
-
tag: "Temporary";
|
|
349
|
-
values: void;
|
|
350
421
|
};
|
|
351
422
|
export interface Client {
|
|
352
423
|
/**
|
|
@@ -403,11 +474,36 @@ export interface Client {
|
|
|
403
474
|
simulate?: boolean;
|
|
404
475
|
}) => Promise<AssembledTransaction<null>>;
|
|
405
476
|
/**
|
|
406
|
-
* Construct and simulate a
|
|
477
|
+
* Construct and simulate a quote transaction. Returns an `AssembledTransaction` object which will have a `result` field containing the result of the simulation. If this transaction changes contract state, you will need to call `signAndSend()` on the returned object.
|
|
407
478
|
*/
|
|
408
|
-
|
|
409
|
-
|
|
410
|
-
|
|
479
|
+
quote: ({ dst_eid, msg_type, options, pay_in_zro }: {
|
|
480
|
+
dst_eid: u32;
|
|
481
|
+
msg_type: u32;
|
|
482
|
+
options: Buffer;
|
|
483
|
+
pay_in_zro: boolean;
|
|
484
|
+
}, txnOptions?: {
|
|
485
|
+
/**
|
|
486
|
+
* The fee to pay for the transaction. Default: BASE_FEE
|
|
487
|
+
*/
|
|
488
|
+
fee?: number;
|
|
489
|
+
/**
|
|
490
|
+
* The maximum amount of time to wait for the transaction to complete. Default: DEFAULT_TIMEOUT
|
|
491
|
+
*/
|
|
492
|
+
timeoutInSeconds?: number;
|
|
493
|
+
/**
|
|
494
|
+
* Whether to automatically simulate the transaction when constructing the AssembledTransaction. Default: true
|
|
495
|
+
*/
|
|
496
|
+
simulate?: boolean;
|
|
497
|
+
}) => Promise<AssembledTransaction<MessagingFee>>;
|
|
498
|
+
/**
|
|
499
|
+
* Construct and simulate a increment transaction. Returns an `AssembledTransaction` object which will have a `result` field containing the result of the simulation. If this transaction changes contract state, you will need to call `signAndSend()` on the returned object.
|
|
500
|
+
*/
|
|
501
|
+
increment: ({ caller, dst_eid, msg_type, options, fee }: {
|
|
502
|
+
caller: string;
|
|
503
|
+
dst_eid: u32;
|
|
504
|
+
msg_type: u32;
|
|
505
|
+
options: Buffer;
|
|
506
|
+
fee: MessagingFee;
|
|
411
507
|
}, txnOptions?: {
|
|
412
508
|
/**
|
|
413
509
|
* The fee to pay for the transaction. Default: BASE_FEE
|
|
@@ -423,10 +519,10 @@ export interface Client {
|
|
|
423
519
|
simulate?: boolean;
|
|
424
520
|
}) => Promise<AssembledTransaction<null>>;
|
|
425
521
|
/**
|
|
426
|
-
* Construct and simulate a
|
|
522
|
+
* Construct and simulate a set_ordered_nonce transaction. Returns an `AssembledTransaction` object which will have a `result` field containing the result of the simulation. If this transaction changes contract state, you will need to call `signAndSend()` on the returned object.
|
|
427
523
|
*/
|
|
428
|
-
|
|
429
|
-
|
|
524
|
+
set_ordered_nonce: ({ ordered_nonce }: {
|
|
525
|
+
ordered_nonce: boolean;
|
|
430
526
|
}, txnOptions?: {
|
|
431
527
|
/**
|
|
432
528
|
* The fee to pay for the transaction. Default: BASE_FEE
|
|
@@ -442,10 +538,12 @@ export interface Client {
|
|
|
442
538
|
simulate?: boolean;
|
|
443
539
|
}) => Promise<AssembledTransaction<null>>;
|
|
444
540
|
/**
|
|
445
|
-
* Construct and simulate a
|
|
541
|
+
* Construct and simulate a skip_inbound_nonce transaction. Returns an `AssembledTransaction` object which will have a `result` field containing the result of the simulation. If this transaction changes contract state, you will need to call `signAndSend()` on the returned object.
|
|
446
542
|
*/
|
|
447
|
-
|
|
448
|
-
|
|
543
|
+
skip_inbound_nonce: ({ src_eid, sender, nonce }: {
|
|
544
|
+
src_eid: u32;
|
|
545
|
+
sender: Buffer;
|
|
546
|
+
nonce: u64;
|
|
449
547
|
}, txnOptions?: {
|
|
450
548
|
/**
|
|
451
549
|
* The fee to pay for the transaction. Default: BASE_FEE
|
|
@@ -459,11 +557,11 @@ export interface Client {
|
|
|
459
557
|
* Whether to automatically simulate the transaction when constructing the AssembledTransaction. Default: true
|
|
460
558
|
*/
|
|
461
559
|
simulate?: boolean;
|
|
462
|
-
}) => Promise<AssembledTransaction<
|
|
560
|
+
}) => Promise<AssembledTransaction<null>>;
|
|
463
561
|
/**
|
|
464
|
-
* Construct and simulate a
|
|
562
|
+
* Construct and simulate a eid transaction. Returns an `AssembledTransaction` object which will have a `result` field containing the result of the simulation. If this transaction changes contract state, you will need to call `signAndSend()` on the returned object.
|
|
465
563
|
*/
|
|
466
|
-
|
|
564
|
+
eid: (txnOptions?: {
|
|
467
565
|
/**
|
|
468
566
|
* The fee to pay for the transaction. Default: BASE_FEE
|
|
469
567
|
*/
|
|
@@ -476,11 +574,11 @@ export interface Client {
|
|
|
476
574
|
* Whether to automatically simulate the transaction when constructing the AssembledTransaction. Default: true
|
|
477
575
|
*/
|
|
478
576
|
simulate?: boolean;
|
|
479
|
-
}) => Promise<AssembledTransaction<
|
|
577
|
+
}) => Promise<AssembledTransaction<u32>>;
|
|
480
578
|
/**
|
|
481
|
-
* Construct and simulate a
|
|
579
|
+
* Construct and simulate a count transaction. Returns an `AssembledTransaction` object which will have a `result` field containing the result of the simulation. If this transaction changes contract state, you will need to call `signAndSend()` on the returned object.
|
|
482
580
|
*/
|
|
483
|
-
|
|
581
|
+
count: (txnOptions?: {
|
|
484
582
|
/**
|
|
485
583
|
* The fee to pay for the transaction. Default: BASE_FEE
|
|
486
584
|
*/
|
|
@@ -493,12 +591,29 @@ export interface Client {
|
|
|
493
591
|
* Whether to automatically simulate the transaction when constructing the AssembledTransaction. Default: true
|
|
494
592
|
*/
|
|
495
593
|
simulate?: boolean;
|
|
496
|
-
}) => Promise<AssembledTransaction<
|
|
594
|
+
}) => Promise<AssembledTransaction<u64>>;
|
|
497
595
|
/**
|
|
498
|
-
* Construct and simulate a
|
|
596
|
+
* Construct and simulate a composed_count transaction. Returns an `AssembledTransaction` object which will have a `result` field containing the result of the simulation. If this transaction changes contract state, you will need to call `signAndSend()` on the returned object.
|
|
499
597
|
*/
|
|
500
|
-
|
|
501
|
-
|
|
598
|
+
composed_count: (txnOptions?: {
|
|
599
|
+
/**
|
|
600
|
+
* The fee to pay for the transaction. Default: BASE_FEE
|
|
601
|
+
*/
|
|
602
|
+
fee?: number;
|
|
603
|
+
/**
|
|
604
|
+
* The maximum amount of time to wait for the transaction to complete. Default: DEFAULT_TIMEOUT
|
|
605
|
+
*/
|
|
606
|
+
timeoutInSeconds?: number;
|
|
607
|
+
/**
|
|
608
|
+
* Whether to automatically simulate the transaction when constructing the AssembledTransaction. Default: true
|
|
609
|
+
*/
|
|
610
|
+
simulate?: boolean;
|
|
611
|
+
}) => Promise<AssembledTransaction<u64>>;
|
|
612
|
+
/**
|
|
613
|
+
* Construct and simulate a inbound_count transaction. Returns an `AssembledTransaction` object which will have a `result` field containing the result of the simulation. If this transaction changes contract state, you will need to call `signAndSend()` on the returned object.
|
|
614
|
+
*/
|
|
615
|
+
inbound_count: ({ eid }: {
|
|
616
|
+
eid: u32;
|
|
502
617
|
}, txnOptions?: {
|
|
503
618
|
/**
|
|
504
619
|
* The fee to pay for the transaction. Default: BASE_FEE
|
|
@@ -512,7 +627,26 @@ export interface Client {
|
|
|
512
627
|
* Whether to automatically simulate the transaction when constructing the AssembledTransaction. Default: true
|
|
513
628
|
*/
|
|
514
629
|
simulate?: boolean;
|
|
515
|
-
}) => Promise<AssembledTransaction<
|
|
630
|
+
}) => Promise<AssembledTransaction<u64>>;
|
|
631
|
+
/**
|
|
632
|
+
* Construct and simulate a outbound_count transaction. Returns an `AssembledTransaction` object which will have a `result` field containing the result of the simulation. If this transaction changes contract state, you will need to call `signAndSend()` on the returned object.
|
|
633
|
+
*/
|
|
634
|
+
outbound_count: ({ eid }: {
|
|
635
|
+
eid: u32;
|
|
636
|
+
}, txnOptions?: {
|
|
637
|
+
/**
|
|
638
|
+
* The fee to pay for the transaction. Default: BASE_FEE
|
|
639
|
+
*/
|
|
640
|
+
fee?: number;
|
|
641
|
+
/**
|
|
642
|
+
* The maximum amount of time to wait for the transaction to complete. Default: DEFAULT_TIMEOUT
|
|
643
|
+
*/
|
|
644
|
+
timeoutInSeconds?: number;
|
|
645
|
+
/**
|
|
646
|
+
* Whether to automatically simulate the transaction when constructing the AssembledTransaction. Default: true
|
|
647
|
+
*/
|
|
648
|
+
simulate?: boolean;
|
|
649
|
+
}) => Promise<AssembledTransaction<u64>>;
|
|
516
650
|
/**
|
|
517
651
|
* Construct and simulate a next_nonce transaction. Returns an `AssembledTransaction` object which will have a `result` field containing the result of the simulation. If this transaction changes contract state, you will need to call `signAndSend()` on the returned object.
|
|
518
652
|
*/
|
|
@@ -558,12 +692,17 @@ export interface Client {
|
|
|
558
692
|
simulate?: boolean;
|
|
559
693
|
}) => Promise<AssembledTransaction<null>>;
|
|
560
694
|
/**
|
|
561
|
-
* Construct and simulate a
|
|
695
|
+
* Construct and simulate a allow_initialize_path transaction. Returns an `AssembledTransaction` object which will have a `result` field containing the result of the simulation. If this transaction changes contract state, you will need to call `signAndSend()` on the returned object.
|
|
696
|
+
* Checks if a messaging path can be initialized for the given origin.
|
|
697
|
+
*
|
|
698
|
+
* # Arguments
|
|
699
|
+
* * `origin` - The origin of the message
|
|
700
|
+
*
|
|
701
|
+
* # Returns
|
|
702
|
+
* True if the path can be initialized, false otherwise
|
|
562
703
|
*/
|
|
563
|
-
|
|
704
|
+
allow_initialize_path: ({ origin }: {
|
|
564
705
|
origin: Origin;
|
|
565
|
-
message: Buffer;
|
|
566
|
-
sender: string;
|
|
567
706
|
}, txnOptions?: {
|
|
568
707
|
/**
|
|
569
708
|
* The fee to pay for the transaction. Default: BASE_FEE
|
|
@@ -579,13 +718,24 @@ export interface Client {
|
|
|
579
718
|
simulate?: boolean;
|
|
580
719
|
}) => Promise<AssembledTransaction<boolean>>;
|
|
581
720
|
/**
|
|
582
|
-
* Construct and simulate a
|
|
721
|
+
* Construct and simulate a is_compose_msg_sender transaction. Returns an `AssembledTransaction` object which will have a `result` field containing the result of the simulation. If this transaction changes contract state, you will need to call `signAndSend()` on the returned object.
|
|
722
|
+
* Indicates whether an address is an approved composeMsg sender to the Endpoint.
|
|
723
|
+
*
|
|
724
|
+
* Applications can optionally choose to implement separate composeMsg senders that are NOT the bridging layer.
|
|
725
|
+
* The default sender IS the OAppReceiver implementer.
|
|
726
|
+
*
|
|
727
|
+
* # Arguments
|
|
728
|
+
* * `origin` - The origin information containing the source endpoint and sender address
|
|
729
|
+
* * `message` - The lzReceive payload
|
|
730
|
+
* * `sender` - The sender address to check
|
|
731
|
+
*
|
|
732
|
+
* # Returns
|
|
733
|
+
* True if the sender is a valid composeMsg sender, false otherwise
|
|
583
734
|
*/
|
|
584
|
-
|
|
585
|
-
|
|
586
|
-
|
|
587
|
-
|
|
588
|
-
pay_in_zro: boolean;
|
|
735
|
+
is_compose_msg_sender: ({ origin, message, sender }: {
|
|
736
|
+
origin: Origin;
|
|
737
|
+
message: Buffer;
|
|
738
|
+
sender: string;
|
|
589
739
|
}, txnOptions?: {
|
|
590
740
|
/**
|
|
591
741
|
* The fee to pay for the transaction. Default: BASE_FEE
|
|
@@ -599,16 +749,18 @@ export interface Client {
|
|
|
599
749
|
* Whether to automatically simulate the transaction when constructing the AssembledTransaction. Default: true
|
|
600
750
|
*/
|
|
601
751
|
simulate?: boolean;
|
|
602
|
-
}) => Promise<AssembledTransaction<
|
|
752
|
+
}) => Promise<AssembledTransaction<boolean>>;
|
|
603
753
|
/**
|
|
604
|
-
* Construct and simulate a
|
|
754
|
+
* Construct and simulate a lz_compose transaction. Returns an `AssembledTransaction` object which will have a `result` field containing the result of the simulation. If this transaction changes contract state, you will need to call `signAndSend()` on the returned object.
|
|
605
755
|
*/
|
|
606
|
-
|
|
607
|
-
|
|
608
|
-
|
|
609
|
-
|
|
610
|
-
|
|
611
|
-
|
|
756
|
+
lz_compose: ({ executor, from, guid, index, message, extra_data, value }: {
|
|
757
|
+
executor: string;
|
|
758
|
+
from: string;
|
|
759
|
+
guid: Buffer;
|
|
760
|
+
index: u32;
|
|
761
|
+
message: Buffer;
|
|
762
|
+
extra_data: Buffer;
|
|
763
|
+
value: i128;
|
|
612
764
|
}, txnOptions?: {
|
|
613
765
|
/**
|
|
614
766
|
* The fee to pay for the transaction. Default: BASE_FEE
|
|
@@ -624,10 +776,11 @@ export interface Client {
|
|
|
624
776
|
simulate?: boolean;
|
|
625
777
|
}) => Promise<AssembledTransaction<null>>;
|
|
626
778
|
/**
|
|
627
|
-
* Construct and simulate a
|
|
779
|
+
* Construct and simulate a enforced_options transaction. Returns an `AssembledTransaction` object which will have a `result` field containing the result of the simulation. If this transaction changes contract state, you will need to call `signAndSend()` on the returned object.
|
|
628
780
|
*/
|
|
629
|
-
|
|
630
|
-
|
|
781
|
+
enforced_options: ({ eid, msg_type }: {
|
|
782
|
+
eid: u32;
|
|
783
|
+
msg_type: u32;
|
|
631
784
|
}, txnOptions?: {
|
|
632
785
|
/**
|
|
633
786
|
* The fee to pay for the transaction. Default: BASE_FEE
|
|
@@ -641,14 +794,12 @@ export interface Client {
|
|
|
641
794
|
* Whether to automatically simulate the transaction when constructing the AssembledTransaction. Default: true
|
|
642
795
|
*/
|
|
643
796
|
simulate?: boolean;
|
|
644
|
-
}) => Promise<AssembledTransaction<
|
|
797
|
+
}) => Promise<AssembledTransaction<Buffer>>;
|
|
645
798
|
/**
|
|
646
|
-
* Construct and simulate a
|
|
799
|
+
* Construct and simulate a set_enforced_options transaction. Returns an `AssembledTransaction` object which will have a `result` field containing the result of the simulation. If this transaction changes contract state, you will need to call `signAndSend()` on the returned object.
|
|
647
800
|
*/
|
|
648
|
-
|
|
649
|
-
|
|
650
|
-
sender: Buffer;
|
|
651
|
-
nonce: u64;
|
|
801
|
+
set_enforced_options: ({ options }: {
|
|
802
|
+
options: Array<EnforcedOptionParam>;
|
|
652
803
|
}, txnOptions?: {
|
|
653
804
|
/**
|
|
654
805
|
* The fee to pay for the transaction. Default: BASE_FEE
|
|
@@ -664,9 +815,13 @@ export interface Client {
|
|
|
664
815
|
simulate?: boolean;
|
|
665
816
|
}) => Promise<AssembledTransaction<null>>;
|
|
666
817
|
/**
|
|
667
|
-
* Construct and simulate a
|
|
818
|
+
* Construct and simulate a combine_options transaction. Returns an `AssembledTransaction` object which will have a `result` field containing the result of the simulation. If this transaction changes contract state, you will need to call `signAndSend()` on the returned object.
|
|
668
819
|
*/
|
|
669
|
-
|
|
820
|
+
combine_options: ({ eid, msg_type, extra_options }: {
|
|
821
|
+
eid: u32;
|
|
822
|
+
msg_type: u32;
|
|
823
|
+
extra_options: Buffer;
|
|
824
|
+
}, txnOptions?: {
|
|
670
825
|
/**
|
|
671
826
|
* The fee to pay for the transaction. Default: BASE_FEE
|
|
672
827
|
*/
|
|
@@ -679,11 +834,17 @@ export interface Client {
|
|
|
679
834
|
* Whether to automatically simulate the transaction when constructing the AssembledTransaction. Default: true
|
|
680
835
|
*/
|
|
681
836
|
simulate?: boolean;
|
|
682
|
-
}) => Promise<AssembledTransaction<
|
|
837
|
+
}) => Promise<AssembledTransaction<Buffer>>;
|
|
683
838
|
/**
|
|
684
|
-
* Construct and simulate a
|
|
839
|
+
* Construct and simulate a oapp_version transaction. Returns an `AssembledTransaction` object which will have a `result` field containing the result of the simulation. If this transaction changes contract state, you will need to call `signAndSend()` on the returned object.
|
|
840
|
+
* Retrieves the OApp version information.
|
|
841
|
+
*
|
|
842
|
+
* # Returns
|
|
843
|
+
* A tuple containing:
|
|
844
|
+
* - `sender_version`: The version of the OAppSender implementation
|
|
845
|
+
* - `receiver_version`: The version of the OAppReceiver implementation
|
|
685
846
|
*/
|
|
686
|
-
|
|
847
|
+
oapp_version: (txnOptions?: {
|
|
687
848
|
/**
|
|
688
849
|
* The fee to pay for the transaction. Default: BASE_FEE
|
|
689
850
|
*/
|
|
@@ -696,11 +857,15 @@ export interface Client {
|
|
|
696
857
|
* Whether to automatically simulate the transaction when constructing the AssembledTransaction. Default: true
|
|
697
858
|
*/
|
|
698
859
|
simulate?: boolean;
|
|
699
|
-
}) => Promise<AssembledTransaction<u64>>;
|
|
860
|
+
}) => Promise<AssembledTransaction<readonly [u64, u64]>>;
|
|
700
861
|
/**
|
|
701
|
-
* Construct and simulate a
|
|
862
|
+
* Construct and simulate a endpoint transaction. Returns an `AssembledTransaction` object which will have a `result` field containing the result of the simulation. If this transaction changes contract state, you will need to call `signAndSend()` on the returned object.
|
|
863
|
+
* Retrieves the LayerZero endpoint associated with the OApp.
|
|
864
|
+
*
|
|
865
|
+
* # Returns
|
|
866
|
+
* The LayerZero endpoint client
|
|
702
867
|
*/
|
|
703
|
-
|
|
868
|
+
endpoint: (txnOptions?: {
|
|
704
869
|
/**
|
|
705
870
|
* The fee to pay for the transaction. Default: BASE_FEE
|
|
706
871
|
*/
|
|
@@ -713,11 +878,18 @@ export interface Client {
|
|
|
713
878
|
* Whether to automatically simulate the transaction when constructing the AssembledTransaction. Default: true
|
|
714
879
|
*/
|
|
715
880
|
simulate?: boolean;
|
|
716
|
-
}) => Promise<AssembledTransaction<
|
|
881
|
+
}) => Promise<AssembledTransaction<string>>;
|
|
717
882
|
/**
|
|
718
|
-
* Construct and simulate a
|
|
883
|
+
* Construct and simulate a peer transaction. Returns an `AssembledTransaction` object which will have a `result` field containing the result of the simulation. If this transaction changes contract state, you will need to call `signAndSend()` on the returned object.
|
|
884
|
+
* Retrieves the peer (OApp) associated with a corresponding endpoint.
|
|
885
|
+
*
|
|
886
|
+
* # Arguments
|
|
887
|
+
* * `eid` - The endpoint ID
|
|
888
|
+
*
|
|
889
|
+
* # Returns
|
|
890
|
+
* The peer address (OApp instance) associated with the corresponding endpoint
|
|
719
891
|
*/
|
|
720
|
-
|
|
892
|
+
peer: ({ eid }: {
|
|
721
893
|
eid: u32;
|
|
722
894
|
}, txnOptions?: {
|
|
723
895
|
/**
|
|
@@ -732,12 +904,18 @@ export interface Client {
|
|
|
732
904
|
* Whether to automatically simulate the transaction when constructing the AssembledTransaction. Default: true
|
|
733
905
|
*/
|
|
734
906
|
simulate?: boolean;
|
|
735
|
-
}) => Promise<AssembledTransaction<
|
|
907
|
+
}) => Promise<AssembledTransaction<Option<Buffer>>>;
|
|
736
908
|
/**
|
|
737
|
-
* Construct and simulate a
|
|
909
|
+
* Construct and simulate a set_peer transaction. Returns an `AssembledTransaction` object which will have a `result` field containing the result of the simulation. If this transaction changes contract state, you will need to call `signAndSend()` on the returned object.
|
|
910
|
+
* Sets or removes the peer address (OApp instance) for a corresponding endpoint.
|
|
911
|
+
*
|
|
912
|
+
* # Arguments
|
|
913
|
+
* * `eid` - The endpoint ID
|
|
914
|
+
* * `peer` - The address of the peer to be associated with the corresponding endpoint, or None to remove the peer
|
|
738
915
|
*/
|
|
739
|
-
|
|
916
|
+
set_peer: ({ eid, peer }: {
|
|
740
917
|
eid: u32;
|
|
918
|
+
peer: Option<Buffer>;
|
|
741
919
|
}, txnOptions?: {
|
|
742
920
|
/**
|
|
743
921
|
* The fee to pay for the transaction. Default: BASE_FEE
|
|
@@ -751,18 +929,16 @@ export interface Client {
|
|
|
751
929
|
* Whether to automatically simulate the transaction when constructing the AssembledTransaction. Default: true
|
|
752
930
|
*/
|
|
753
931
|
simulate?: boolean;
|
|
754
|
-
}) => Promise<AssembledTransaction<
|
|
932
|
+
}) => Promise<AssembledTransaction<null>>;
|
|
755
933
|
/**
|
|
756
|
-
* Construct and simulate a
|
|
934
|
+
* Construct and simulate a set_delegate transaction. Returns an `AssembledTransaction` object which will have a `result` field containing the result of the simulation. If this transaction changes contract state, you will need to call `signAndSend()` on the returned object.
|
|
935
|
+
* Sets the delegate address for the OApp Core.
|
|
936
|
+
*
|
|
937
|
+
* # Arguments
|
|
938
|
+
* * `delegate` - The address of the delegate to be set, or None to remove the delegate
|
|
757
939
|
*/
|
|
758
|
-
|
|
759
|
-
|
|
760
|
-
from: string;
|
|
761
|
-
guid: Buffer;
|
|
762
|
-
index: u32;
|
|
763
|
-
message: Buffer;
|
|
764
|
-
extra_data: Buffer;
|
|
765
|
-
value: i128;
|
|
940
|
+
set_delegate: ({ delegate }: {
|
|
941
|
+
delegate: Option<string>;
|
|
766
942
|
}, txnOptions?: {
|
|
767
943
|
/**
|
|
768
944
|
* The fee to pay for the transaction. Default: BASE_FEE
|
|
@@ -801,15 +977,6 @@ export declare class Client extends ContractClient {
|
|
|
801
977
|
owner: (json: string) => AssembledTransaction<Option<string>>;
|
|
802
978
|
transfer_ownership: (json: string) => AssembledTransaction<null>;
|
|
803
979
|
renounce_ownership: (json: string) => AssembledTransaction<null>;
|
|
804
|
-
set_peer: (json: string) => AssembledTransaction<null>;
|
|
805
|
-
set_delegate: (json: string) => AssembledTransaction<null>;
|
|
806
|
-
peer: (json: string) => AssembledTransaction<Option<Buffer<ArrayBufferLike>>>;
|
|
807
|
-
oapp_version: (json: string) => AssembledTransaction<readonly [bigint, bigint]>;
|
|
808
|
-
endpoint: (json: string) => AssembledTransaction<string>;
|
|
809
|
-
allow_initialize_path: (json: string) => AssembledTransaction<boolean>;
|
|
810
|
-
next_nonce: (json: string) => AssembledTransaction<bigint>;
|
|
811
|
-
lz_receive: (json: string) => AssembledTransaction<null>;
|
|
812
|
-
is_compose_msg_sender: (json: string) => AssembledTransaction<boolean>;
|
|
813
980
|
quote: (json: string) => AssembledTransaction<MessagingFee>;
|
|
814
981
|
increment: (json: string) => AssembledTransaction<null>;
|
|
815
982
|
set_ordered_nonce: (json: string) => AssembledTransaction<null>;
|
|
@@ -819,6 +986,18 @@ export declare class Client extends ContractClient {
|
|
|
819
986
|
composed_count: (json: string) => AssembledTransaction<bigint>;
|
|
820
987
|
inbound_count: (json: string) => AssembledTransaction<bigint>;
|
|
821
988
|
outbound_count: (json: string) => AssembledTransaction<bigint>;
|
|
989
|
+
next_nonce: (json: string) => AssembledTransaction<bigint>;
|
|
990
|
+
lz_receive: (json: string) => AssembledTransaction<null>;
|
|
991
|
+
allow_initialize_path: (json: string) => AssembledTransaction<boolean>;
|
|
992
|
+
is_compose_msg_sender: (json: string) => AssembledTransaction<boolean>;
|
|
822
993
|
lz_compose: (json: string) => AssembledTransaction<null>;
|
|
994
|
+
enforced_options: (json: string) => AssembledTransaction<Buffer<ArrayBufferLike>>;
|
|
995
|
+
set_enforced_options: (json: string) => AssembledTransaction<null>;
|
|
996
|
+
combine_options: (json: string) => AssembledTransaction<Buffer<ArrayBufferLike>>;
|
|
997
|
+
oapp_version: (json: string) => AssembledTransaction<readonly [bigint, bigint]>;
|
|
998
|
+
endpoint: (json: string) => AssembledTransaction<string>;
|
|
999
|
+
peer: (json: string) => AssembledTransaction<Option<Buffer<ArrayBufferLike>>>;
|
|
1000
|
+
set_peer: (json: string) => AssembledTransaction<null>;
|
|
1001
|
+
set_delegate: (json: string) => AssembledTransaction<null>;
|
|
823
1002
|
};
|
|
824
1003
|
}
|