@typemove/aptos 1.10.0 → 1.11.0-rc.1

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.
Files changed (69) hide show
  1. package/dist/cjs/account-resource-client.js +2 -2
  2. package/dist/cjs/account-resource-client.js.map +1 -1
  3. package/dist/cjs/aptos-chain-adapter.d.ts +2 -1
  4. package/dist/cjs/aptos-chain-adapter.d.ts.map +1 -1
  5. package/dist/cjs/aptos-chain-adapter.js +16 -15
  6. package/dist/cjs/aptos-chain-adapter.js.map +1 -1
  7. package/dist/cjs/builtin/0x1.d.ts +80 -0
  8. package/dist/cjs/builtin/0x1.d.ts.map +1 -1
  9. package/dist/cjs/builtin/0x1.js +340 -340
  10. package/dist/cjs/builtin/0x1.js.map +1 -1
  11. package/dist/cjs/builtin/0x3.d.ts +8 -0
  12. package/dist/cjs/builtin/0x3.d.ts.map +1 -1
  13. package/dist/cjs/builtin/0x3.js +15 -15
  14. package/dist/cjs/builtin/0x3.js.map +1 -1
  15. package/dist/cjs/builtin/0x4.d.ts +24 -0
  16. package/dist/cjs/builtin/0x4.d.ts.map +1 -1
  17. package/dist/cjs/builtin/0x4.js +37 -37
  18. package/dist/cjs/builtin/0x4.js.map +1 -1
  19. package/dist/cjs/codegen/codegen.d.ts +3 -3
  20. package/dist/cjs/codegen/codegen.d.ts.map +1 -1
  21. package/dist/cjs/codegen/codegen.js +5 -5
  22. package/dist/cjs/codegen/codegen.js.map +1 -1
  23. package/dist/cjs/move-coder.d.ts +2 -2
  24. package/dist/cjs/move-coder.d.ts.map +1 -1
  25. package/dist/cjs/move-coder.js +5 -14
  26. package/dist/cjs/move-coder.js.map +1 -1
  27. package/dist/esm/account-resource-client.js +2 -2
  28. package/dist/esm/account-resource-client.js.map +1 -1
  29. package/dist/esm/aptos-chain-adapter.d.ts +2 -1
  30. package/dist/esm/aptos-chain-adapter.d.ts.map +1 -1
  31. package/dist/esm/aptos-chain-adapter.js +16 -15
  32. package/dist/esm/aptos-chain-adapter.js.map +1 -1
  33. package/dist/esm/builtin/0x1.d.ts +80 -0
  34. package/dist/esm/builtin/0x1.d.ts.map +1 -1
  35. package/dist/esm/builtin/0x1.js +340 -340
  36. package/dist/esm/builtin/0x1.js.map +1 -1
  37. package/dist/esm/builtin/0x3.d.ts +8 -0
  38. package/dist/esm/builtin/0x3.d.ts.map +1 -1
  39. package/dist/esm/builtin/0x3.js +15 -15
  40. package/dist/esm/builtin/0x3.js.map +1 -1
  41. package/dist/esm/builtin/0x4.d.ts +24 -0
  42. package/dist/esm/builtin/0x4.d.ts.map +1 -1
  43. package/dist/esm/builtin/0x4.js +37 -37
  44. package/dist/esm/builtin/0x4.js.map +1 -1
  45. package/dist/esm/codegen/codegen.d.ts +3 -3
  46. package/dist/esm/codegen/codegen.d.ts.map +1 -1
  47. package/dist/esm/codegen/codegen.js +6 -6
  48. package/dist/esm/codegen/codegen.js.map +1 -1
  49. package/dist/esm/codegen/run.js +17 -6
  50. package/dist/esm/codegen/run.js.map +1 -1
  51. package/dist/esm/move-coder.d.ts +2 -2
  52. package/dist/esm/move-coder.d.ts.map +1 -1
  53. package/dist/esm/move-coder.js +6 -15
  54. package/dist/esm/move-coder.js.map +1 -1
  55. package/package.json +3 -3
  56. package/src/abis/0x1.json +47 -3
  57. package/src/account-resource-client.ts +2 -2
  58. package/src/aptos-chain-adapter.ts +20 -17
  59. package/src/builtin/0x1.ts +448 -340
  60. package/src/builtin/0x3.ts +26 -15
  61. package/src/builtin/0x4.ts +67 -37
  62. package/src/codegen/codegen.ts +5 -5
  63. package/src/codegen/run.ts +16 -7
  64. package/src/move-coder.ts +8 -15
  65. package/src/tests/types/0x48271d39d0b05bd6efca2278f22277d6fcc375504f9839fd73f74ace240861af.ts +44 -44
  66. package/src/tests/types/0x6b3720cd988adeaf721ed9d4730da4324d52364871a68eac62b46d21e4d2fa99.ts +45 -45
  67. package/src/tests/types/0x7fd500c11216f0fe3095d0c4b8aa4d64a4e2e04f83758462f2b127255643615.ts +26 -26
  68. package/src/tests/types/0x87978b35bf1eb73ae6cf04cfedcaa1f48254a683ebd00a21e7516a991edae3ac.ts +1 -1
  69. package/src/tests/types/0xbd35135844473187163ca197ca93b2ab014370587bb0ed3befff9e902d6bb541.ts +60 -39
@@ -88,6 +88,11 @@ export namespace amm {
88
88
  }
89
89
  }
90
90
 
91
+ export type LPInstance = TypedEventInstance<LP<any, any>> & {
92
+ data_decoded: LP<any, any>;
93
+ type_arguments: [string, string];
94
+ };
95
+
91
96
  export interface Pool<T0, T1> {
92
97
  frozen: boolean;
93
98
  timestamp: bigint;
@@ -181,7 +186,7 @@ export namespace amm {
181
186
  },
182
187
  options?: InputGenerateTransactionOptions,
183
188
  ): Promise<PendingTransactionResponse> {
184
- const coder = defaultMoveCoder(client.config.fullnode);
189
+ const coder = defaultMoveCoder(client.config);
185
190
  const transaction = await client.transaction.build.simple({
186
191
  sender: account.accountAddress,
187
192
  data: {
@@ -206,7 +211,7 @@ export namespace amm {
206
211
  },
207
212
  options?: InputGenerateTransactionOptions,
208
213
  ): Promise<PendingTransactionResponse> {
209
- const coder = defaultMoveCoder(client.config.fullnode);
214
+ const coder = defaultMoveCoder(client.config);
210
215
  const transaction = await client.transaction.build.simple({
211
216
  sender: account.accountAddress,
212
217
  data: {
@@ -231,7 +236,7 @@ export namespace amm {
231
236
  },
232
237
  options?: InputGenerateTransactionOptions,
233
238
  ): Promise<PendingTransactionResponse> {
234
- const coder = defaultMoveCoder(client.config.fullnode);
239
+ const coder = defaultMoveCoder(client.config);
235
240
  const transaction = await client.transaction.build.simple({
236
241
  sender: account.accountAddress,
237
242
  data: {
@@ -256,7 +261,7 @@ export namespace amm {
256
261
  },
257
262
  options?: InputGenerateTransactionOptions,
258
263
  ): Promise<PendingTransactionResponse> {
259
- const coder = defaultMoveCoder(client.config.fullnode);
264
+ const coder = defaultMoveCoder(client.config);
260
265
  const transaction = await client.transaction.build.simple({
261
266
  sender: account.accountAddress,
262
267
  data: {
@@ -282,7 +287,7 @@ export namespace amm {
282
287
  },
283
288
  options?: InputGenerateTransactionOptions,
284
289
  ): Promise<PendingTransactionResponse> {
285
- const coder = defaultMoveCoder(client.config.fullnode);
290
+ const coder = defaultMoveCoder(client.config);
286
291
  const transaction = await client.transaction.build.simple({
287
292
  sender: account.accountAddress,
288
293
  data: {
@@ -308,7 +313,7 @@ export namespace amm {
308
313
  },
309
314
  options?: InputGenerateTransactionOptions,
310
315
  ): Promise<PendingTransactionResponse> {
311
- const coder = defaultMoveCoder(client.config.fullnode);
316
+ const coder = defaultMoveCoder(client.config);
312
317
  const transaction = await client.transaction.build.simple({
313
318
  sender: account.accountAddress,
314
319
  data: {
@@ -333,7 +338,7 @@ export namespace amm {
333
338
  },
334
339
  options?: InputGenerateTransactionOptions,
335
340
  ): Promise<PendingTransactionResponse> {
336
- const coder = defaultMoveCoder(client.config.fullnode);
341
+ const coder = defaultMoveCoder(client.config);
337
342
  const transaction = await client.transaction.build.simple({
338
343
  sender: account.accountAddress,
339
344
  data: {
@@ -359,7 +364,7 @@ export namespace amm {
359
364
  },
360
365
  options?: InputGenerateTransactionOptions,
361
366
  ): Promise<PendingTransactionResponse> {
362
- const coder = defaultMoveCoder(client.config.fullnode);
367
+ const coder = defaultMoveCoder(client.config);
363
368
  const transaction = await client.transaction.build.simple({
364
369
  sender: account.accountAddress,
365
370
  data: {
@@ -385,7 +390,7 @@ export namespace amm {
385
390
  },
386
391
  options?: InputGenerateTransactionOptions,
387
392
  ): Promise<PendingTransactionResponse> {
388
- const coder = defaultMoveCoder(client.config.fullnode);
393
+ const coder = defaultMoveCoder(client.config);
389
394
  const transaction = await client.transaction.build.simple({
390
395
  sender: account.accountAddress,
391
396
  data: {
@@ -411,7 +416,7 @@ export namespace amm {
411
416
  },
412
417
  options?: InputGenerateTransactionOptions,
413
418
  ): Promise<PendingTransactionResponse> {
414
- const coder = defaultMoveCoder(client.config.fullnode);
419
+ const coder = defaultMoveCoder(client.config);
415
420
  const transaction = await client.transaction.build.simple({
416
421
  sender: account.accountAddress,
417
422
  data: {
@@ -437,7 +442,7 @@ export namespace amm {
437
442
  },
438
443
  options?: InputGenerateTransactionOptions,
439
444
  ): Promise<PendingTransactionResponse> {
440
- const coder = defaultMoveCoder(client.config.fullnode);
445
+ const coder = defaultMoveCoder(client.config);
441
446
  const transaction = await client.transaction.build.simple({
442
447
  sender: account.accountAddress,
443
448
  data: {
@@ -463,7 +468,7 @@ export namespace amm {
463
468
  },
464
469
  options?: InputGenerateTransactionOptions,
465
470
  ): Promise<PendingTransactionResponse> {
466
- const coder = defaultMoveCoder(client.config.fullnode);
471
+ const coder = defaultMoveCoder(client.config);
467
472
  const transaction = await client.transaction.build.simple({
468
473
  sender: account.accountAddress,
469
474
  data: {
@@ -488,7 +493,7 @@ export namespace amm {
488
493
  },
489
494
  options?: InputGenerateTransactionOptions,
490
495
  ): Promise<PendingTransactionResponse> {
491
- const coder = defaultMoveCoder(client.config.fullnode);
496
+ const coder = defaultMoveCoder(client.config);
492
497
  const transaction = await client.transaction.build.simple({
493
498
  sender: account.accountAddress,
494
499
  data: {
@@ -710,7 +715,7 @@ export namespace vault {
710
715
  },
711
716
  options?: InputGenerateTransactionOptions,
712
717
  ): Promise<PendingTransactionResponse> {
713
- const coder = defaultMoveCoder(client.config.fullnode);
718
+ const coder = defaultMoveCoder(client.config);
714
719
  const transaction = await client.transaction.build.simple({
715
720
  sender: account.accountAddress,
716
721
  data: {
@@ -736,7 +741,7 @@ export namespace vault {
736
741
  },
737
742
  options?: InputGenerateTransactionOptions,
738
743
  ): Promise<PendingTransactionResponse> {
739
- const coder = defaultMoveCoder(client.config.fullnode);
744
+ const coder = defaultMoveCoder(client.config);
740
745
  const transaction = await client.transaction.build.simple({
741
746
  sender: account.accountAddress,
742
747
  data: {
@@ -761,7 +766,7 @@ export namespace vault {
761
766
  },
762
767
  options?: InputGenerateTransactionOptions,
763
768
  ): Promise<PendingTransactionResponse> {
764
- const coder = defaultMoveCoder(client.config.fullnode);
769
+ const coder = defaultMoveCoder(client.config);
765
770
  const transaction = await client.transaction.build.simple({
766
771
  sender: account.accountAddress,
767
772
  data: {
@@ -787,7 +792,7 @@ export namespace vault {
787
792
  },
788
793
  options?: InputGenerateTransactionOptions,
789
794
  ): Promise<PendingTransactionResponse> {
790
- const coder = defaultMoveCoder(client.config.fullnode);
795
+ const coder = defaultMoveCoder(client.config);
791
796
  const transaction = await client.transaction.build.simple({
792
797
  sender: account.accountAddress,
793
798
  data: {
@@ -813,7 +818,7 @@ export namespace vault {
813
818
  },
814
819
  options?: InputGenerateTransactionOptions,
815
820
  ): Promise<PendingTransactionResponse> {
816
- const coder = defaultMoveCoder(client.config.fullnode);
821
+ const coder = defaultMoveCoder(client.config);
817
822
  const transaction = await client.transaction.build.simple({
818
823
  sender: account.accountAddress,
819
824
  data: {
@@ -838,7 +843,7 @@ export namespace vault {
838
843
  },
839
844
  options?: InputGenerateTransactionOptions,
840
845
  ): Promise<PendingTransactionResponse> {
841
- const coder = defaultMoveCoder(client.config.fullnode);
846
+ const coder = defaultMoveCoder(client.config);
842
847
  const transaction = await client.transaction.build.simple({
843
848
  sender: account.accountAddress,
844
849
  data: {
@@ -863,7 +868,7 @@ export namespace vault {
863
868
  },
864
869
  options?: InputGenerateTransactionOptions,
865
870
  ): Promise<PendingTransactionResponse> {
866
- const coder = defaultMoveCoder(client.config.fullnode);
871
+ const coder = defaultMoveCoder(client.config);
867
872
  const transaction = await client.transaction.build.simple({
868
873
  sender: account.accountAddress,
869
874
  data: {
@@ -894,7 +899,7 @@ export namespace router {
894
899
  },
895
900
  options?: InputGenerateTransactionOptions,
896
901
  ): Promise<PendingTransactionResponse> {
897
- const coder = defaultMoveCoder(client.config.fullnode);
902
+ const coder = defaultMoveCoder(client.config);
898
903
  const transaction = await client.transaction.build.simple({
899
904
  sender: account.accountAddress,
900
905
  data: {
@@ -920,7 +925,7 @@ export namespace router {
920
925
  },
921
926
  options?: InputGenerateTransactionOptions,
922
927
  ): Promise<PendingTransactionResponse> {
923
- const coder = defaultMoveCoder(client.config.fullnode);
928
+ const coder = defaultMoveCoder(client.config);
924
929
  const transaction = await client.transaction.build.simple({
925
930
  sender: account.accountAddress,
926
931
  data: {
@@ -1053,7 +1058,7 @@ export namespace aux_coin {
1053
1058
  },
1054
1059
  options?: InputGenerateTransactionOptions,
1055
1060
  ): Promise<PendingTransactionResponse> {
1056
- const coder = defaultMoveCoder(client.config.fullnode);
1061
+ const coder = defaultMoveCoder(client.config);
1057
1062
  const transaction = await client.transaction.build.simple({
1058
1063
  sender: account.accountAddress,
1059
1064
  data: {
@@ -1078,7 +1083,7 @@ export namespace aux_coin {
1078
1083
  },
1079
1084
  options?: InputGenerateTransactionOptions,
1080
1085
  ): Promise<PendingTransactionResponse> {
1081
- const coder = defaultMoveCoder(client.config.fullnode);
1086
+ const coder = defaultMoveCoder(client.config);
1082
1087
  const transaction = await client.transaction.build.simple({
1083
1088
  sender: account.accountAddress,
1084
1089
  data: {
@@ -1103,7 +1108,7 @@ export namespace aux_coin {
1103
1108
  },
1104
1109
  options?: InputGenerateTransactionOptions,
1105
1110
  ): Promise<PendingTransactionResponse> {
1106
- const coder = defaultMoveCoder(client.config.fullnode);
1111
+ const coder = defaultMoveCoder(client.config);
1107
1112
  const transaction = await client.transaction.build.simple({
1108
1113
  sender: account.accountAddress,
1109
1114
  data: {
@@ -1325,7 +1330,7 @@ export namespace fake_coin {
1325
1330
  },
1326
1331
  options?: InputGenerateTransactionOptions,
1327
1332
  ): Promise<PendingTransactionResponse> {
1328
- const coder = defaultMoveCoder(client.config.fullnode);
1333
+ const coder = defaultMoveCoder(client.config);
1329
1334
  const transaction = await client.transaction.build.simple({
1330
1335
  sender: account.accountAddress,
1331
1336
  data: {
@@ -1350,7 +1355,7 @@ export namespace fake_coin {
1350
1355
  },
1351
1356
  options?: InputGenerateTransactionOptions,
1352
1357
  ): Promise<PendingTransactionResponse> {
1353
- const coder = defaultMoveCoder(client.config.fullnode);
1358
+ const coder = defaultMoveCoder(client.config);
1354
1359
  const transaction = await client.transaction.build.simple({
1355
1360
  sender: account.accountAddress,
1356
1361
  data: {
@@ -1375,7 +1380,7 @@ export namespace fake_coin {
1375
1380
  },
1376
1381
  options?: InputGenerateTransactionOptions,
1377
1382
  ): Promise<PendingTransactionResponse> {
1378
- const coder = defaultMoveCoder(client.config.fullnode);
1383
+ const coder = defaultMoveCoder(client.config);
1379
1384
  const transaction = await client.transaction.build.simple({
1380
1385
  sender: account.accountAddress,
1381
1386
  data: {
@@ -1400,7 +1405,7 @@ export namespace fake_coin {
1400
1405
  },
1401
1406
  options?: InputGenerateTransactionOptions,
1402
1407
  ): Promise<PendingTransactionResponse> {
1403
- const coder = defaultMoveCoder(client.config.fullnode);
1408
+ const coder = defaultMoveCoder(client.config);
1404
1409
  const transaction = await client.transaction.build.simple({
1405
1410
  sender: account.accountAddress,
1406
1411
  data: {
@@ -1499,6 +1504,11 @@ export namespace clob_market {
1499
1504
  }
1500
1505
  }
1501
1506
 
1507
+ export type L2QuoteInstance = TypedEventInstance<L2Quote> & {
1508
+ data_decoded: L2Quote;
1509
+ type_arguments: [];
1510
+ };
1511
+
1502
1512
  export interface Level {
1503
1513
  price: bigint;
1504
1514
  total_quantity: bigint;
@@ -1610,6 +1620,12 @@ export namespace clob_market {
1610
1620
  }
1611
1621
  }
1612
1622
 
1623
+ export type OpenOrderEventInfoInstance =
1624
+ TypedEventInstance<OpenOrderEventInfo> & {
1625
+ data_decoded: OpenOrderEventInfo;
1626
+ type_arguments: [];
1627
+ };
1628
+
1613
1629
  export interface OpenOrderInfo {
1614
1630
  price: bigint;
1615
1631
  is_bid: boolean;
@@ -1626,6 +1642,11 @@ export namespace clob_market {
1626
1642
  }
1627
1643
  }
1628
1644
 
1645
+ export type OpenOrderInfoInstance = TypedEventInstance<OpenOrderInfo> & {
1646
+ data_decoded: OpenOrderInfo;
1647
+ type_arguments: [];
1648
+ };
1649
+
1629
1650
  export interface OpenOrdersEvent {
1630
1651
  open_orders: clob_market.OpenOrderEventInfo[];
1631
1652
  }
@@ -1768,7 +1789,7 @@ export namespace clob_market {
1768
1789
  },
1769
1790
  options?: InputGenerateTransactionOptions,
1770
1791
  ): Promise<PendingTransactionResponse> {
1771
- const coder = defaultMoveCoder(client.config.fullnode);
1792
+ const coder = defaultMoveCoder(client.config);
1772
1793
  const transaction = await client.transaction.build.simple({
1773
1794
  sender: account.accountAddress,
1774
1795
  data: {
@@ -1793,7 +1814,7 @@ export namespace clob_market {
1793
1814
  },
1794
1815
  options?: InputGenerateTransactionOptions,
1795
1816
  ): Promise<PendingTransactionResponse> {
1796
- const coder = defaultMoveCoder(client.config.fullnode);
1817
+ const coder = defaultMoveCoder(client.config);
1797
1818
  const transaction = await client.transaction.build.simple({
1798
1819
  sender: account.accountAddress,
1799
1820
  data: {
@@ -1818,7 +1839,7 @@ export namespace clob_market {
1818
1839
  },
1819
1840
  options?: InputGenerateTransactionOptions,
1820
1841
  ): Promise<PendingTransactionResponse> {
1821
- const coder = defaultMoveCoder(client.config.fullnode);
1842
+ const coder = defaultMoveCoder(client.config);
1822
1843
  const transaction = await client.transaction.build.simple({
1823
1844
  sender: account.accountAddress,
1824
1845
  data: {
@@ -1843,7 +1864,7 @@ export namespace clob_market {
1843
1864
  },
1844
1865
  options?: InputGenerateTransactionOptions,
1845
1866
  ): Promise<PendingTransactionResponse> {
1846
- const coder = defaultMoveCoder(client.config.fullnode);
1867
+ const coder = defaultMoveCoder(client.config);
1847
1868
  const transaction = await client.transaction.build.simple({
1848
1869
  sender: account.accountAddress,
1849
1870
  data: {
@@ -1868,7 +1889,7 @@ export namespace clob_market {
1868
1889
  },
1869
1890
  options?: InputGenerateTransactionOptions,
1870
1891
  ): Promise<PendingTransactionResponse> {
1871
- const coder = defaultMoveCoder(client.config.fullnode);
1892
+ const coder = defaultMoveCoder(client.config);
1872
1893
  const transaction = await client.transaction.build.simple({
1873
1894
  sender: account.accountAddress,
1874
1895
  data: {
@@ -1893,7 +1914,7 @@ export namespace clob_market {
1893
1914
  },
1894
1915
  options?: InputGenerateTransactionOptions,
1895
1916
  ): Promise<PendingTransactionResponse> {
1896
- const coder = defaultMoveCoder(client.config.fullnode);
1917
+ const coder = defaultMoveCoder(client.config);
1897
1918
  const transaction = await client.transaction.build.simple({
1898
1919
  sender: account.accountAddress,
1899
1920
  data: {
@@ -1918,7 +1939,7 @@ export namespace clob_market {
1918
1939
  },
1919
1940
  options?: InputGenerateTransactionOptions,
1920
1941
  ): Promise<PendingTransactionResponse> {
1921
- const coder = defaultMoveCoder(client.config.fullnode);
1942
+ const coder = defaultMoveCoder(client.config);
1922
1943
  const transaction = await client.transaction.build.simple({
1923
1944
  sender: account.accountAddress,
1924
1945
  data: {
@@ -1943,7 +1964,7 @@ export namespace clob_market {
1943
1964
  },
1944
1965
  options?: InputGenerateTransactionOptions,
1945
1966
  ): Promise<PendingTransactionResponse> {
1946
- const coder = defaultMoveCoder(client.config.fullnode);
1967
+ const coder = defaultMoveCoder(client.config);
1947
1968
  const transaction = await client.transaction.build.simple({
1948
1969
  sender: account.accountAddress,
1949
1970
  data: {
@@ -1981,7 +2002,7 @@ export namespace clob_market {
1981
2002
  },
1982
2003
  options?: InputGenerateTransactionOptions,
1983
2004
  ): Promise<PendingTransactionResponse> {
1984
- const coder = defaultMoveCoder(client.config.fullnode);
2005
+ const coder = defaultMoveCoder(client.config);
1985
2006
  const transaction = await client.transaction.build.simple({
1986
2007
  sender: account.accountAddress,
1987
2008
  data: {
@@ -2007,7 +2028,7 @@ export namespace clob_market {
2007
2028
  },
2008
2029
  options?: InputGenerateTransactionOptions,
2009
2030
  ): Promise<PendingTransactionResponse> {
2010
- const coder = defaultMoveCoder(client.config.fullnode);
2031
+ const coder = defaultMoveCoder(client.config);
2011
2032
  const transaction = await client.transaction.build.simple({
2012
2033
  sender: account.accountAddress,
2013
2034
  data: {