@aptos-labs/ts-sdk 7.2.0 → 7.4.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (259) hide show
  1. package/LICENSE +43 -43
  2. package/README.md +36 -20
  3. package/dist/account/AbstractKeylessAccount.d.ts.map +1 -1
  4. package/dist/account/AbstractKeylessAccount.js.map +1 -1
  5. package/dist/account/AbstractedAccount.d.ts.map +1 -1
  6. package/dist/account/Account.d.ts.map +1 -1
  7. package/dist/account/Account.js.map +1 -1
  8. package/dist/account/AccountUtils.js.map +1 -1
  9. package/dist/account/DerivableAbstractedAccount.d.ts.map +1 -1
  10. package/dist/account/DerivableAbstractedAccount.js.map +1 -1
  11. package/dist/account/Ed25519Account.d.ts.map +1 -1
  12. package/dist/account/EphemeralKeyPair.d.ts.map +1 -1
  13. package/dist/account/EphemeralKeyPair.js.map +1 -1
  14. package/dist/account/FederatedKeylessAccount.d.ts.map +1 -1
  15. package/dist/account/KeylessAccount.d.ts.map +1 -1
  16. package/dist/account/MultiEd25519Account.d.ts.map +1 -1
  17. package/dist/account/MultiKeyAccount.d.ts.map +1 -1
  18. package/dist/account/SingleKeyAccount.d.ts.map +1 -1
  19. package/dist/account/SingleKeyAccount.js.map +1 -1
  20. package/dist/api/account/abstraction.d.ts +10 -0
  21. package/dist/api/account/abstraction.d.ts.map +1 -1
  22. package/dist/api/account/abstraction.js +19 -6
  23. package/dist/api/account/abstraction.js.map +1 -1
  24. package/dist/api/account.d.ts.map +1 -1
  25. package/dist/api/account.js.map +1 -1
  26. package/dist/api/ans.d.ts +9 -0
  27. package/dist/api/ans.d.ts.map +1 -1
  28. package/dist/api/ans.js +5 -0
  29. package/dist/api/ans.js.map +1 -1
  30. package/dist/api/aptos.d.ts.map +1 -1
  31. package/dist/api/aptosConfig.d.ts +12 -0
  32. package/dist/api/aptosConfig.d.ts.map +1 -1
  33. package/dist/api/aptosConfig.js +13 -0
  34. package/dist/api/aptosConfig.js.map +1 -1
  35. package/dist/api/coin.d.ts +2 -0
  36. package/dist/api/coin.d.ts.map +1 -1
  37. package/dist/api/coin.js +1 -0
  38. package/dist/api/coin.js.map +1 -1
  39. package/dist/api/digitalAsset.d.ts +30 -0
  40. package/dist/api/digitalAsset.d.ts.map +1 -1
  41. package/dist/api/digitalAsset.js +15 -0
  42. package/dist/api/digitalAsset.js.map +1 -1
  43. package/dist/api/faucet.d.ts.map +1 -1
  44. package/dist/api/faucet.js.map +1 -1
  45. package/dist/api/fungibleAsset.d.ts +4 -0
  46. package/dist/api/fungibleAsset.d.ts.map +1 -1
  47. package/dist/api/fungibleAsset.js +2 -0
  48. package/dist/api/fungibleAsset.js.map +1 -1
  49. package/dist/api/general.d.ts.map +1 -1
  50. package/dist/api/keyless.d.ts +38 -1
  51. package/dist/api/keyless.d.ts.map +1 -1
  52. package/dist/api/keyless.js +29 -1
  53. package/dist/api/keyless.js.map +1 -1
  54. package/dist/api/object.d.ts.map +1 -1
  55. package/dist/api/object.js.map +1 -1
  56. package/dist/api/staking.d.ts.map +1 -1
  57. package/dist/api/staking.js.map +1 -1
  58. package/dist/api/table.d.ts.map +1 -1
  59. package/dist/api/transaction.d.ts +41 -1
  60. package/dist/api/transaction.d.ts.map +1 -1
  61. package/dist/api/transaction.js +42 -2
  62. package/dist/api/transaction.js.map +1 -1
  63. package/dist/api/transactionSubmission/build.d.ts +7 -5
  64. package/dist/api/transactionSubmission/build.d.ts.map +1 -1
  65. package/dist/api/transactionSubmission/build.js +13 -5
  66. package/dist/api/transactionSubmission/build.js.map +1 -1
  67. package/dist/api/transactionSubmission/management.d.ts.map +1 -1
  68. package/dist/api/transactionSubmission/sign.d.ts.map +1 -1
  69. package/dist/api/transactionSubmission/simulate.d.ts +7 -3
  70. package/dist/api/transactionSubmission/simulate.d.ts.map +1 -1
  71. package/dist/api/transactionSubmission/simulate.js +7 -3
  72. package/dist/api/transactionSubmission/simulate.js.map +1 -1
  73. package/dist/api/transactionSubmission/submit.d.ts.map +1 -1
  74. package/dist/bcs/deserializer.d.ts.map +1 -1
  75. package/dist/bcs/serializable/entryFunctionBytes.d.ts.map +1 -1
  76. package/dist/bcs/serializable/fixedBytes.d.ts.map +1 -1
  77. package/dist/bcs/serializable/movePrimitives.d.ts.map +1 -1
  78. package/dist/bcs/serializable/moveStructs.d.ts +72 -28
  79. package/dist/bcs/serializable/moveStructs.d.ts.map +1 -1
  80. package/dist/bcs/serializable/moveStructs.js +76 -28
  81. package/dist/bcs/serializable/moveStructs.js.map +1 -1
  82. package/dist/bcs/serializer.d.ts.map +1 -1
  83. package/dist/bcs/serializer.js.map +1 -1
  84. package/dist/cli/localNode.d.ts.map +1 -1
  85. package/dist/cli/localNode.js +16 -3
  86. package/dist/cli/localNode.js.map +1 -1
  87. package/dist/cli/move.d.ts.map +1 -1
  88. package/dist/cli/move.js.map +1 -1
  89. package/dist/client/core.d.ts +3 -0
  90. package/dist/client/core.d.ts.map +1 -1
  91. package/dist/client/core.js +116 -9
  92. package/dist/client/core.js.map +1 -1
  93. package/dist/core/account/utils/address.d.ts.map +1 -1
  94. package/dist/core/accountAddress.d.ts.map +1 -1
  95. package/dist/core/accountAddress.js.map +1 -1
  96. package/dist/core/authenticationKey.d.ts.map +1 -1
  97. package/dist/core/authenticationKey.js.map +1 -1
  98. package/dist/core/common.d.ts.map +1 -1
  99. package/dist/core/crypto/abstraction.d.ts.map +1 -1
  100. package/dist/core/crypto/ed25519.d.ts.map +1 -1
  101. package/dist/core/crypto/ed25519.js.map +1 -1
  102. package/dist/core/crypto/encryption/ciphertext.d.ts.map +1 -1
  103. package/dist/core/crypto/encryption/symmetric.d.ts.map +1 -1
  104. package/dist/core/crypto/encryption/symmetric.js.map +1 -1
  105. package/dist/core/crypto/ephemeral.d.ts.map +1 -1
  106. package/dist/core/crypto/federatedKeyless.d.ts.map +1 -1
  107. package/dist/core/crypto/hdKey.d.ts.map +1 -1
  108. package/dist/core/crypto/keyless.d.ts.map +1 -1
  109. package/dist/core/crypto/keyless.js.map +1 -1
  110. package/dist/core/crypto/multiEd25519.d.ts.map +1 -1
  111. package/dist/core/crypto/multiEd25519.js.map +1 -1
  112. package/dist/core/crypto/multiKey.d.ts.map +1 -1
  113. package/dist/core/crypto/multiKey.js.map +1 -1
  114. package/dist/core/crypto/privateKey.d.ts.map +1 -1
  115. package/dist/core/crypto/privateKey.js.map +1 -1
  116. package/dist/core/crypto/publicKey.d.ts.map +1 -1
  117. package/dist/core/crypto/secp256k1.d.ts.map +1 -1
  118. package/dist/core/crypto/secp256k1.js.map +1 -1
  119. package/dist/core/crypto/secp256r1.d.ts.map +1 -1
  120. package/dist/core/crypto/secp256r1.js.map +1 -1
  121. package/dist/core/crypto/signature.d.ts.map +1 -1
  122. package/dist/core/crypto/singleKey.d.ts.map +1 -1
  123. package/dist/core/crypto/singleKey.js.map +1 -1
  124. package/dist/core/crypto/utils.d.ts.map +1 -1
  125. package/dist/core/hex.d.ts.map +1 -1
  126. package/dist/errors/index.d.ts.map +1 -1
  127. package/dist/functions/keyless.d.ts +1 -1
  128. package/dist/functions/keyless.d.ts.map +1 -1
  129. package/dist/functions/keyless.js +1 -1
  130. package/dist/functions/keyless.js.map +1 -1
  131. package/dist/functions/transaction.d.ts +1 -1
  132. package/dist/functions/transaction.d.ts.map +1 -1
  133. package/dist/functions/transaction.js +1 -1
  134. package/dist/functions/transaction.js.map +1 -1
  135. package/dist/internal/abstraction.d.ts +35 -0
  136. package/dist/internal/abstraction.d.ts.map +1 -1
  137. package/dist/internal/abstraction.js +38 -3
  138. package/dist/internal/abstraction.js.map +1 -1
  139. package/dist/internal/account.d.ts +6 -0
  140. package/dist/internal/account.d.ts.map +1 -1
  141. package/dist/internal/account.js +55 -37
  142. package/dist/internal/account.js.map +1 -1
  143. package/dist/internal/ans.d.ts +11 -0
  144. package/dist/internal/ans.d.ts.map +1 -1
  145. package/dist/internal/ans.js +18 -6
  146. package/dist/internal/ans.js.map +1 -1
  147. package/dist/internal/coin.d.ts +2 -0
  148. package/dist/internal/coin.d.ts.map +1 -1
  149. package/dist/internal/coin.js +3 -1
  150. package/dist/internal/coin.js.map +1 -1
  151. package/dist/internal/digitalAsset.d.ts +30 -0
  152. package/dist/internal/digitalAsset.d.ts.map +1 -1
  153. package/dist/internal/digitalAsset.js +45 -15
  154. package/dist/internal/digitalAsset.js.map +1 -1
  155. package/dist/internal/fungibleAsset.d.ts +4 -0
  156. package/dist/internal/fungibleAsset.d.ts.map +1 -1
  157. package/dist/internal/fungibleAsset.js +6 -2
  158. package/dist/internal/fungibleAsset.js.map +1 -1
  159. package/dist/internal/keyless.d.ts +39 -1
  160. package/dist/internal/keyless.d.ts.map +1 -1
  161. package/dist/internal/keyless.js +71 -13
  162. package/dist/internal/keyless.js.map +1 -1
  163. package/dist/internal/transaction.d.ts +24 -1
  164. package/dist/internal/transaction.d.ts.map +1 -1
  165. package/dist/internal/transaction.js +125 -4
  166. package/dist/internal/transaction.js.map +1 -1
  167. package/dist/internal/transactionSubmission.d.ts +2 -0
  168. package/dist/internal/transactionSubmission.d.ts.map +1 -1
  169. package/dist/internal/transactionSubmission.js +3 -1
  170. package/dist/internal/transactionSubmission.js.map +1 -1
  171. package/dist/transactions/authenticator/account.d.ts.map +1 -1
  172. package/dist/transactions/authenticator/transaction.d.ts.map +1 -1
  173. package/dist/transactions/instances/chainId.d.ts.map +1 -1
  174. package/dist/transactions/instances/encryptedPayload.d.ts.map +1 -1
  175. package/dist/transactions/instances/encryptedPayload.js.map +1 -1
  176. package/dist/transactions/instances/identifier.d.ts.map +1 -1
  177. package/dist/transactions/instances/moduleId.d.ts.map +1 -1
  178. package/dist/transactions/instances/multiAgentTransaction.d.ts.map +1 -1
  179. package/dist/transactions/instances/rawTransaction.d.ts.map +1 -1
  180. package/dist/transactions/instances/rotationProofChallenge.d.ts.map +1 -1
  181. package/dist/transactions/instances/signedTransaction.d.ts.map +1 -1
  182. package/dist/transactions/instances/simpleTransaction.d.ts.map +1 -1
  183. package/dist/transactions/instances/transactionPayload.d.ts.map +1 -1
  184. package/dist/transactions/management/accountSequenceNumber.d.ts.map +1 -1
  185. package/dist/transactions/management/asyncQueue.d.ts.map +1 -1
  186. package/dist/transactions/management/transactionWorker.d.ts +10 -6
  187. package/dist/transactions/management/transactionWorker.d.ts.map +1 -1
  188. package/dist/transactions/management/transactionWorker.js +28 -24
  189. package/dist/transactions/management/transactionWorker.js.map +1 -1
  190. package/dist/transactions/transactionBuilder/index.d.ts +1 -0
  191. package/dist/transactions/transactionBuilder/index.d.ts.map +1 -1
  192. package/dist/transactions/transactionBuilder/index.js +1 -0
  193. package/dist/transactions/transactionBuilder/index.js.map +1 -1
  194. package/dist/transactions/transactionBuilder/scriptAbi.d.ts +10 -0
  195. package/dist/transactions/transactionBuilder/scriptAbi.d.ts.map +1 -0
  196. package/dist/transactions/transactionBuilder/scriptAbi.js +863 -0
  197. package/dist/transactions/transactionBuilder/scriptAbi.js.map +1 -0
  198. package/dist/transactions/transactionBuilder/structEnumParser.d.ts.map +1 -1
  199. package/dist/transactions/transactionBuilder/structEnumParser.js.map +1 -1
  200. package/dist/transactions/transactionBuilder/transactionBuilder.d.ts +7 -2
  201. package/dist/transactions/transactionBuilder/transactionBuilder.d.ts.map +1 -1
  202. package/dist/transactions/transactionBuilder/transactionBuilder.js +65 -1
  203. package/dist/transactions/transactionBuilder/transactionBuilder.js.map +1 -1
  204. package/dist/transactions/typeTag/index.d.ts.map +1 -1
  205. package/dist/transactions/typeTag/index.js.map +1 -1
  206. package/dist/transactions/typeTag/parser.d.ts.map +1 -1
  207. package/dist/transactions/typeTag/parser.js.map +1 -1
  208. package/dist/transactions/types.d.ts +9 -4
  209. package/dist/transactions/types.d.ts.map +1 -1
  210. package/dist/types/generated/queries.d.ts.map +1 -1
  211. package/dist/types/generated/queries.js.map +1 -1
  212. package/dist/types/keyless.d.ts +2 -2
  213. package/dist/types/keyless.d.ts.map +1 -1
  214. package/dist/types/types.d.ts +7 -2
  215. package/dist/types/types.d.ts.map +1 -1
  216. package/dist/types/types.js.map +1 -1
  217. package/dist/utils/const.d.ts +11 -0
  218. package/dist/utils/const.d.ts.map +1 -1
  219. package/dist/utils/const.js +11 -0
  220. package/dist/utils/const.js.map +1 -1
  221. package/dist/utils/helpers.d.ts.map +1 -1
  222. package/dist/utils/helpers.js.map +1 -1
  223. package/dist/utils/runtime.js.map +1 -1
  224. package/dist/version.d.ts +1 -1
  225. package/dist/version.js +1 -1
  226. package/package.json +27 -25
  227. package/src/api/account/abstraction.ts +23 -6
  228. package/src/api/ans.ts +9 -0
  229. package/src/api/aptosConfig.ts +14 -0
  230. package/src/api/coin.ts +2 -0
  231. package/src/api/digitalAsset.ts +30 -0
  232. package/src/api/fungibleAsset.ts +4 -0
  233. package/src/api/keyless.ts +39 -1
  234. package/src/api/transaction.ts +48 -1
  235. package/src/api/transactionSubmission/build.ts +16 -6
  236. package/src/api/transactionSubmission/simulate.ts +7 -3
  237. package/src/bcs/serializable/moveStructs.ts +80 -28
  238. package/src/cli/localNode.ts +17 -3
  239. package/src/client/core.ts +150 -10
  240. package/src/functions/keyless.ts +1 -0
  241. package/src/functions/transaction.ts +1 -0
  242. package/src/internal/abstraction.ts +41 -3
  243. package/src/internal/account.ts +60 -38
  244. package/src/internal/ans.ts +24 -6
  245. package/src/internal/coin.ts +4 -1
  246. package/src/internal/digitalAsset.ts +60 -9
  247. package/src/internal/fungibleAsset.ts +8 -2
  248. package/src/internal/keyless.ts +91 -14
  249. package/src/internal/transaction.ts +154 -4
  250. package/src/internal/transactionSubmission.ts +4 -1
  251. package/src/transactions/management/transactionWorker.ts +35 -23
  252. package/src/transactions/transactionBuilder/index.ts +1 -0
  253. package/src/transactions/transactionBuilder/scriptAbi.ts +1145 -0
  254. package/src/transactions/transactionBuilder/transactionBuilder.ts +97 -6
  255. package/src/transactions/types.ts +10 -4
  256. package/src/types/keyless.ts +2 -2
  257. package/src/types/types.ts +8 -2
  258. package/src/utils/const.ts +12 -0
  259. package/src/version.ts +1 -1
@@ -1,6 +1,7 @@
1
1
  // Copyright © Aptos Foundation
2
2
  // SPDX-License-Identifier: Apache-2.0
3
3
 
4
+ import type { Account } from "../../account/index.js";
4
5
  import { AccountAddressInput } from "../../core/index.js";
5
6
  import { generateTransaction } from "../../internal/transactionSubmission.js";
6
7
  import { InputGenerateTransactionPayloadData, InputGenerateTransactionOptions } from "../../transactions/index.js";
@@ -8,6 +9,10 @@ import { MultiAgentTransaction } from "../../transactions/instances/multiAgentTr
8
9
  import { SimpleTransaction } from "../../transactions/instances/simpleTransaction.js";
9
10
  import { AptosConfig } from "../aptosConfig.js";
10
11
 
12
+ function accountAddressInput(input: Account | AccountAddressInput): AccountAddressInput {
13
+ return typeof input === "object" && "accountAddress" in input ? input.accountAddress : input;
14
+ }
15
+
11
16
  /**
12
17
  * A class to handle all `Build` transaction operations.
13
18
  * @group Implementation
@@ -53,7 +58,7 @@ export class Build {
53
58
  *
54
59
  * This function allows you to create a transaction with specified sender and data.
55
60
  *
56
- * @param args.sender - The sender account address.
61
+ * @param args.sender - The sender account or account address.
57
62
  * @param args.data - The transaction data.
58
63
  * @param args.options - Optional transaction configurations.
59
64
  * @param args.withFeePayer - Whether there is a fee payer for the transaction.
@@ -62,15 +67,16 @@ export class Build {
62
67
  *
63
68
  * @example
64
69
  * ```typescript
65
- * import { Aptos, AptosConfig, Network } from "@aptos-labs/ts-sdk";
70
+ * import { Account, Aptos, AptosConfig, Network } from "@aptos-labs/ts-sdk";
66
71
  *
67
72
  * const config = new AptosConfig({ network: Network.TESTNET });
68
73
  * const aptos = new Aptos(config);
74
+ * const sender = Account.generate();
69
75
  *
70
76
  * async function runExample() {
71
77
  * // Build a simple transaction
72
- * const transaction = await aptos.transaction.simple({
73
- * sender: "0x1", // replace with a real sender account address
78
+ * const transaction = await aptos.transaction.build.simple({
79
+ * sender,
74
80
  * data: {
75
81
  * function: "0x1::aptos_account::transfer",
76
82
  * functionArguments: ["0x2", 100], // replace with a real destination account address
@@ -88,12 +94,16 @@ export class Build {
88
94
  * @group Implementation
89
95
  */
90
96
  async simple(args: {
91
- sender: AccountAddressInput;
97
+ sender: Account | AccountAddressInput;
92
98
  data: InputGenerateTransactionPayloadData;
93
99
  options?: InputGenerateTransactionOptions;
94
100
  withFeePayer?: boolean;
95
101
  }): Promise<SimpleTransaction> {
96
- return generateTransaction({ aptosConfig: this.config, ...args });
102
+ return generateTransaction({
103
+ aptosConfig: this.config,
104
+ ...args,
105
+ sender: accountAddressInput(args.sender),
106
+ });
97
107
  }
98
108
 
99
109
  /**
@@ -48,8 +48,13 @@ export class Simulate {
48
48
  * Simulates a transaction based on the provided parameters and returns the result.
49
49
  * This function helps you understand the outcome of a transaction before executing it on the blockchain.
50
50
  *
51
+ * To pre-check a multisig proposal, build its entry function directly with the multisig address as sender and
52
+ * `withFeePayer: true`, then omit `signerPublicKey` and `feePayerPublicKey`. The simulation uses no-account
53
+ * authenticators to skip authentication-key validation, so the proposal does not need to exist on-chain.
54
+ *
51
55
  * @param args - The parameters for simulating the transaction.
52
- * @param args.signerPublicKey - The public key of the signer for the transaction (optional).
56
+ * @param args.signerPublicKey - Optional public key used to validate the signer's authentication key.
57
+ * Omit it to simulate with the sender address already embedded in the transaction.
53
58
  * @param args.transaction - The raw transaction data to simulate.
54
59
  * @param args.feePayerPublicKey - The public key of the fee payer (optional).
55
60
  * @param args.options - Additional options for simulating the transaction (optional).
@@ -78,7 +83,7 @@ export class Simulate {
78
83
  *
79
84
  * // 1. Build the transaction to preview the impact of it
80
85
  * const transaction = await aptos.transaction.build.simple({
81
- * sender: sender.accountAddress,
86
+ * sender,
82
87
  * data: {
83
88
  * // All transactions on Aptos are implemented via smart contracts.
84
89
  * function: "0x1::aptos_account::transfer",
@@ -88,7 +93,6 @@ export class Simulate {
88
93
  *
89
94
  * // 2. Simulate to see what would happen if we execute this transaction
90
95
  * const [userTransactionResponse] = await aptos.transaction.simulate.simple({
91
- * signerPublicKey: sender.publicKey,
92
96
  * transaction,
93
97
  * });
94
98
  * console.log(userTransactionResponse);
@@ -6,6 +6,7 @@ import { Serializable, Serializer, serializeEntryFunctionBytesCompat } from "../
6
6
  import { Deserializable, Deserializer } from "../deserializer.js";
7
7
  import { AnyNumber, HexInput, ScriptTransactionArgumentVariants } from "../../types/index.js";
8
8
  import { Hex } from "../../core/hex.js";
9
+ import { AccountAddress, AccountAddressInput } from "../../core/accountAddress.js";
9
10
  import { EntryFunctionArgument, TransactionArgument } from "../../transactions/instances/transactionArgument.js";
10
11
  import { TEXT_ENCODER } from "../../utils/const.js";
11
12
 
@@ -376,6 +377,23 @@ export class MoveVector<T extends Serializable & EntryFunctionArgument>
376
377
  return new MoveVector<MoveString>(values.map((v) => new MoveString(v)));
377
378
  }
378
379
 
380
+ /**
381
+ * Factory method to generate a MoveVector<AccountAddress> from an array of `AccountAddressInput` values.
382
+ *
383
+ * @param values - The values used to fill the MoveVector.
384
+ * @returns A MoveVector<AccountAddress> with the inner values.
385
+ *
386
+ * @example
387
+ * ```typescript
388
+ * const v = MoveVector.Address(["0x1", "0x2"]);
389
+ * ```
390
+ * @group Implementation
391
+ * @category BCS
392
+ */
393
+ static Address(values: Array<AccountAddressInput>): MoveVector<AccountAddress> {
394
+ return new MoveVector<AccountAddress>(values.map((v) => AccountAddress.from(v)));
395
+ }
396
+
379
397
  /**
380
398
  * Serializes the current object using the provided serializer.
381
399
  * This function will serialize the value if it is present.
@@ -575,13 +593,14 @@ export class MoveOption<T extends Serializable & EntryFunctionArgument>
575
593
  }
576
594
 
577
595
  /**
578
- * Factory method to generate a MoveOption<U8> from a `number` or `undefined`.
596
+ * Factory method to generate a MoveOption<U8> from a `number`, `undefined`, or `null`.
579
597
  *
580
598
  * @example
581
599
  * MoveOption.U8(1).isSome() === true;
582
600
  * MoveOption.U8().isSome() === false;
583
601
  * MoveOption.U8(undefined).isSome() === false;
584
- * @param value the value used to fill the MoveOption. If `value` is undefined
602
+ * MoveOption.U8(null).isSome() === false;
603
+ * @param value the value used to fill the MoveOption. If `value` is undefined or null
585
604
  * the resulting MoveOption's .isSome() method will return false.
586
605
  * @returns a MoveOption<U8> with an inner value `value`
587
606
  * @group Implementation
@@ -592,13 +611,14 @@ export class MoveOption<T extends Serializable & EntryFunctionArgument>
592
611
  }
593
612
 
594
613
  /**
595
- * Factory method to generate a MoveOption<U16> from a `number` or `undefined`.
614
+ * Factory method to generate a MoveOption<U16> from a `number`, `undefined`, or `null`.
596
615
  *
597
616
  * @example
598
617
  * MoveOption.U16(1).isSome() === true;
599
618
  * MoveOption.U16().isSome() === false;
600
619
  * MoveOption.U16(undefined).isSome() === false;
601
- * @param value the value used to fill the MoveOption. If `value` is undefined
620
+ * MoveOption.U16(null).isSome() === false;
621
+ * @param value the value used to fill the MoveOption. If `value` is undefined or null
602
622
  * the resulting MoveOption's .isSome() method will return false.
603
623
  * @returns a MoveOption<U16> with an inner value `value`
604
624
  * @group Implementation
@@ -609,13 +629,14 @@ export class MoveOption<T extends Serializable & EntryFunctionArgument>
609
629
  }
610
630
 
611
631
  /**
612
- * Factory method to generate a MoveOption<U32> from a `number` or `undefined`.
632
+ * Factory method to generate a MoveOption<U32> from a `number`, `undefined`, or `null`.
613
633
  *
614
634
  * @example
615
635
  * MoveOption.U32(1).isSome() === true;
616
636
  * MoveOption.U32().isSome() === false;
617
637
  * MoveOption.U32(undefined).isSome() === false;
618
- * @param value the value used to fill the MoveOption. If `value` is undefined
638
+ * MoveOption.U32(null).isSome() === false;
639
+ * @param value the value used to fill the MoveOption. If `value` is undefined or null
619
640
  * the resulting MoveOption's .isSome() method will return false.
620
641
  * @returns a MoveOption<U32> with an inner value `value`
621
642
  * @group Implementation
@@ -626,13 +647,14 @@ export class MoveOption<T extends Serializable & EntryFunctionArgument>
626
647
  }
627
648
 
628
649
  /**
629
- * Factory method to generate a MoveOption<U64> from a `number` or a `bigint` or `undefined`.
650
+ * Factory method to generate a MoveOption<U64> from a `number`, `bigint`, `undefined`, or `null`.
630
651
  *
631
652
  * @example
632
653
  * MoveOption.U64(1).isSome() === true;
633
654
  * MoveOption.U64().isSome() === false;
634
655
  * MoveOption.U64(undefined).isSome() === false;
635
- * @param value the value used to fill the MoveOption. If `value` is undefined
656
+ * MoveOption.U64(null).isSome() === false;
657
+ * @param value the value used to fill the MoveOption. If `value` is undefined or null
636
658
  * the resulting MoveOption's .isSome() method will return false.
637
659
  * @returns a MoveOption<U64> with an inner value `value`
638
660
  * @group Implementation
@@ -643,13 +665,14 @@ export class MoveOption<T extends Serializable & EntryFunctionArgument>
643
665
  }
644
666
 
645
667
  /**
646
- * Factory method to generate a MoveOption<U128> from a `number` or a `bigint` or `undefined`.
668
+ * Factory method to generate a MoveOption<U128> from a `number`, `bigint`, `undefined`, or `null`.
647
669
  *
648
670
  * @example
649
671
  * MoveOption.U128(1).isSome() === true;
650
672
  * MoveOption.U128().isSome() === false;
651
673
  * MoveOption.U128(undefined).isSome() === false;
652
- * @param value the value used to fill the MoveOption. If `value` is undefined
674
+ * MoveOption.U128(null).isSome() === false;
675
+ * @param value the value used to fill the MoveOption. If `value` is undefined or null
653
676
  * the resulting MoveOption's .isSome() method will return false.
654
677
  * @returns a MoveOption<U128> with an inner value `value`
655
678
  * @group Implementation
@@ -660,13 +683,14 @@ export class MoveOption<T extends Serializable & EntryFunctionArgument>
660
683
  }
661
684
 
662
685
  /**
663
- * Factory method to generate a MoveOption<U256> from a `number` or a `bigint` or `undefined`.
686
+ * Factory method to generate a MoveOption<U256> from a `number`, `bigint`, `undefined`, or `null`.
664
687
  *
665
688
  * @example
666
689
  * MoveOption.U256(1).isSome() === true;
667
690
  * MoveOption.U256().isSome() === false;
668
691
  * MoveOption.U256(undefined).isSome() === false;
669
- * @param value the value used to fill the MoveOption. If `value` is undefined
692
+ * MoveOption.U256(null).isSome() === false;
693
+ * @param value the value used to fill the MoveOption. If `value` is undefined or null
670
694
  * the resulting MoveOption's .isSome() method will return false.
671
695
  * @returns a MoveOption<U256> with an inner value `value`
672
696
  * @group Implementation
@@ -677,13 +701,14 @@ export class MoveOption<T extends Serializable & EntryFunctionArgument>
677
701
  }
678
702
 
679
703
  /**
680
- * Factory method to generate a MoveOption<Bool> from a `boolean` or `undefined`.
704
+ * Factory method to generate a MoveOption<Bool> from a `boolean`, `undefined`, or `null`.
681
705
  *
682
706
  * @example
683
707
  * MoveOption.Bool(true).isSome() === true;
684
708
  * MoveOption.Bool().isSome() === false;
685
709
  * MoveOption.Bool(undefined).isSome() === false;
686
- * @param value the value used to fill the MoveOption. If `value` is undefined
710
+ * MoveOption.Bool(null).isSome() === false;
711
+ * @param value the value used to fill the MoveOption. If `value` is undefined or null
687
712
  * the resulting MoveOption's .isSome() method will return false.
688
713
  * @returns a MoveOption<Bool> with an inner value `value`
689
714
  * @group Implementation
@@ -694,13 +719,14 @@ export class MoveOption<T extends Serializable & EntryFunctionArgument>
694
719
  }
695
720
 
696
721
  /**
697
- * Factory method to generate a MoveOption<I8> from a `number` or `undefined`.
722
+ * Factory method to generate a MoveOption<I8> from a `number`, `undefined`, or `null`.
698
723
  *
699
724
  * @example
700
725
  * MoveOption.I8(1).isSome() === true;
701
726
  * MoveOption.I8().isSome() === false;
702
727
  * MoveOption.I8(undefined).isSome() === false;
703
- * @param value the value used to fill the MoveOption. If `value` is undefined
728
+ * MoveOption.I8(null).isSome() === false;
729
+ * @param value the value used to fill the MoveOption. If `value` is undefined or null
704
730
  * the resulting MoveOption's .isSome() method will return false.
705
731
  * @returns a MoveOption<I8> with an inner value `value`
706
732
  * @group Implementation
@@ -711,13 +737,14 @@ export class MoveOption<T extends Serializable & EntryFunctionArgument>
711
737
  }
712
738
 
713
739
  /**
714
- * Factory method to generate a MoveOption<I16> from a `number` or `undefined`.
740
+ * Factory method to generate a MoveOption<I16> from a `number`, `undefined`, or `null`.
715
741
  *
716
742
  * @example
717
743
  * MoveOption.I16(1).isSome() === true;
718
744
  * MoveOption.I16().isSome() === false;
719
745
  * MoveOption.I16(undefined).isSome() === false;
720
- * @param value the value used to fill the MoveOption. If `value` is undefined
746
+ * MoveOption.I16(null).isSome() === false;
747
+ * @param value the value used to fill the MoveOption. If `value` is undefined or null
721
748
  * the resulting MoveOption's .isSome() method will return false.
722
749
  * @returns a MoveOption<I16> with an inner value `value`
723
750
  * @group Implementation
@@ -728,13 +755,14 @@ export class MoveOption<T extends Serializable & EntryFunctionArgument>
728
755
  }
729
756
 
730
757
  /**
731
- * Factory method to generate a MoveOption<I32> from a `number` or `undefined`.
758
+ * Factory method to generate a MoveOption<I32> from a `number`, `undefined`, or `null`.
732
759
  *
733
760
  * @example
734
761
  * MoveOption.I32(1).isSome() === true;
735
762
  * MoveOption.I32().isSome() === false;
736
763
  * MoveOption.I32(undefined).isSome() === false;
737
- * @param value the value used to fill the MoveOption. If `value` is undefined
764
+ * MoveOption.I32(null).isSome() === false;
765
+ * @param value the value used to fill the MoveOption. If `value` is undefined or null
738
766
  * the resulting MoveOption's .isSome() method will return false.
739
767
  * @returns a MoveOption<I32> with an inner value `value`
740
768
  * @group Implementation
@@ -745,13 +773,14 @@ export class MoveOption<T extends Serializable & EntryFunctionArgument>
745
773
  }
746
774
 
747
775
  /**
748
- * Factory method to generate a MoveOption<I64> from a `number` or a `bigint` or `undefined`.
776
+ * Factory method to generate a MoveOption<I64> from a `number`, `bigint`, `undefined`, or `null`.
749
777
  *
750
778
  * @example
751
779
  * MoveOption.I64(1).isSome() === true;
752
780
  * MoveOption.I64().isSome() === false;
753
781
  * MoveOption.I64(undefined).isSome() === false;
754
- * @param value the value used to fill the MoveOption. If `value` is undefined
782
+ * MoveOption.I64(null).isSome() === false;
783
+ * @param value the value used to fill the MoveOption. If `value` is undefined or null
755
784
  * the resulting MoveOption's .isSome() method will return false.
756
785
  * @returns a MoveOption<I64> with an inner value `value`
757
786
  * @group Implementation
@@ -762,13 +791,14 @@ export class MoveOption<T extends Serializable & EntryFunctionArgument>
762
791
  }
763
792
 
764
793
  /**
765
- * Factory method to generate a MoveOption<I128> from a `number` or a `bigint` or `undefined`.
794
+ * Factory method to generate a MoveOption<I128> from a `number`, `bigint`, `undefined`, or `null`.
766
795
  *
767
796
  * @example
768
797
  * MoveOption.I128(1).isSome() === true;
769
798
  * MoveOption.I128().isSome() === false;
770
799
  * MoveOption.I128(undefined).isSome() === false;
771
- * @param value the value used to fill the MoveOption. If `value` is undefined
800
+ * MoveOption.I128(null).isSome() === false;
801
+ * @param value the value used to fill the MoveOption. If `value` is undefined or null
772
802
  * the resulting MoveOption's .isSome() method will return false.
773
803
  * @returns a MoveOption<I128> with an inner value `value`
774
804
  * @group Implementation
@@ -779,13 +809,14 @@ export class MoveOption<T extends Serializable & EntryFunctionArgument>
779
809
  }
780
810
 
781
811
  /**
782
- * Factory method to generate a MoveOption<I256> from a `number` or a `bigint` or `undefined`.
812
+ * Factory method to generate a MoveOption<I256> from a `number`, `bigint`, `undefined`, or `null`.
783
813
  *
784
814
  * @example
785
815
  * MoveOption.I256(1).isSome() === true;
786
816
  * MoveOption.I256().isSome() === false;
787
817
  * MoveOption.I256(undefined).isSome() === false;
788
- * @param value the value used to fill the MoveOption. If `value` is undefined
818
+ * MoveOption.I256(null).isSome() === false;
819
+ * @param value the value used to fill the MoveOption. If `value` is undefined or null
789
820
  * the resulting MoveOption's .isSome() method will return false.
790
821
  * @returns a MoveOption<I256> with an inner value `value`
791
822
  * @group Implementation
@@ -796,14 +827,15 @@ export class MoveOption<T extends Serializable & EntryFunctionArgument>
796
827
  }
797
828
 
798
829
  /**
799
- * Factory method to generate a MoveOption<MoveString> from a `string` or `undefined`.
830
+ * Factory method to generate a MoveOption<MoveString> from a `string`, `undefined`, or `null`.
800
831
  *
801
832
  * @example
802
833
  * MoveOption.MoveString("hello").isSome() === true;
803
834
  * MoveOption.MoveString("").isSome() === true;
804
835
  * MoveOption.MoveString().isSome() === false;
805
836
  * MoveOption.MoveString(undefined).isSome() === false;
806
- * @param value the value used to fill the MoveOption. If `value` is undefined
837
+ * MoveOption.MoveString(null).isSome() === false;
838
+ * @param value the value used to fill the MoveOption. If `value` is undefined or null
807
839
  * the resulting MoveOption's .isSome() method will return false.
808
840
  * @returns a MoveOption<MoveString> with an inner value `value`
809
841
  * @group Implementation
@@ -813,6 +845,26 @@ export class MoveOption<T extends Serializable & EntryFunctionArgument>
813
845
  return new MoveOption<MoveString>(value !== null && value !== undefined ? new MoveString(value) : undefined);
814
846
  }
815
847
 
848
+ /**
849
+ * Factory method to generate a MoveOption<AccountAddress> from an `AccountAddressInput`, `undefined`, or `null`.
850
+ *
851
+ * @example
852
+ * MoveOption.Address("0x1").isSome() === true;
853
+ * MoveOption.Address().isSome() === false;
854
+ * MoveOption.Address(undefined).isSome() === false;
855
+ * MoveOption.Address(null).isSome() === false;
856
+ * @param value the value used to fill the MoveOption. If `value` is undefined or null
857
+ * the resulting MoveOption's .isSome() method will return false.
858
+ * @returns a MoveOption<AccountAddress> with an inner value `value`
859
+ * @group Implementation
860
+ * @category BCS
861
+ */
862
+ static Address(value?: AccountAddressInput | null): MoveOption<AccountAddress> {
863
+ return new MoveOption<AccountAddress>(
864
+ value !== null && value !== undefined ? AccountAddress.from(value) : undefined,
865
+ );
866
+ }
867
+
816
868
  static deserialize<U extends Serializable & EntryFunctionArgument>(
817
869
  deserializer: Deserializer,
818
870
  cls: Deserializable<U>,
@@ -1,4 +1,6 @@
1
1
  import { ChildProcessWithoutNullStreams, spawn } from "node:child_process";
2
+ import { appendFileSync } from "node:fs";
3
+ import { join } from "node:path";
2
4
  import kill from "tree-kill";
3
5
  import { platform } from "node:os";
4
6
 
@@ -111,13 +113,25 @@ export class LocalNode {
111
113
 
112
114
  this.process = spawn(cliCommand, cliArgs, spawnConfig);
113
115
 
114
- this.process.stdout?.on("data", (data: any) => {
116
+ // CI prints `${{ runner.temp }}/local-testnet-logs.txt` on failure (TMPDIR).
117
+ const logPath = process.env.TMPDIR ? join(process.env.TMPDIR, "local-testnet-logs.txt") : undefined;
118
+
119
+ const handleOutput = (data: any) => {
115
120
  const str = data.toString();
116
- // Print local node output log
117
121
  if (this.showStdout) {
118
122
  console.log(str);
119
123
  }
120
- });
124
+ if (logPath) {
125
+ try {
126
+ appendFileSync(logPath, str);
127
+ } catch {
128
+ // Best-effort logging only — never fail the node start on log I/O.
129
+ }
130
+ }
131
+ };
132
+
133
+ this.process.stdout?.on("data", handleOutput);
134
+ this.process.stderr?.on("data", handleOutput);
121
135
  }
122
136
 
123
137
  /**
@@ -68,26 +68,107 @@ export async function request<Req, Res>(options: ClientRequest<Req>, client: Cli
68
68
  });
69
69
  }
70
70
 
71
+ const HTTP_STATUS_GONE = 410;
72
+
73
+ const CREDENTIAL_HEADERS = new Set(["authorization", "cookie", "x-api-key"]);
74
+
75
+ const warnedArchivalEndpoints = new Set<string>();
76
+
77
+ type ArchivalRetryTarget = {
78
+ url: string;
79
+ forwardCredentials: boolean;
80
+ };
81
+
71
82
  /**
72
- * The main function to use when making an API request, returning the response or throwing an AptosApiError on failure.
83
+ * Registrable domain, approximated as the last two labels.
84
+ * Hosts under a multi-part suffix like `co.uk` compare equal.
85
+ */
86
+ function siteOf(hostname: string): string {
87
+ return hostname.toLowerCase().split(".").slice(-2).join(".");
88
+ }
89
+
90
+ /**
91
+ * Validates the archival endpoint advertised in a pruning error, returning undefined if it is unusable.
73
92
  *
74
- * @param aptosRequestOpts - Options for the Aptos request, including the URL and path.
75
- * @param aptosConfig - The configuration information for the SDK client instance.
76
- * @param apiType - The type of API being accessed, which determines how the response is handled.
77
- * @returns The response from the API request or throws an AptosApiError if the request fails.
78
- * @group Implementation
79
- * @category Client
93
+ * The endpoint is chosen by the node rather than the caller, so it must be an absolute http(s) URL that does
94
+ * not downgrade an https request, and credentials are only forwarded to it when it is same-site.
80
95
  */
81
- export async function aptosRequest<Req extends {}, Res extends {}>(
96
+ function resolveArchivalRetryTarget(originalUrl: string, responseData: any): ArchivalRetryTarget | undefined {
97
+ const advertisedEndpoint = responseData?.archival_endpoint;
98
+ if (typeof advertisedEndpoint !== "string" || advertisedEndpoint.length === 0) {
99
+ return undefined;
100
+ }
101
+
102
+ let archivalUrl: URL;
103
+ let originUrl: URL;
104
+ try {
105
+ archivalUrl = new URL(advertisedEndpoint);
106
+ originUrl = new URL(originalUrl);
107
+ } catch {
108
+ return undefined;
109
+ }
110
+
111
+ if (archivalUrl.protocol !== "https:" && archivalUrl.protocol !== "http:") {
112
+ return undefined;
113
+ }
114
+ if (originUrl.protocol === "https:" && archivalUrl.protocol !== "https:") {
115
+ return undefined;
116
+ }
117
+
118
+ return {
119
+ url: advertisedEndpoint.replace(/\/+$/, ""),
120
+ forwardCredentials: siteOf(archivalUrl.hostname) === siteOf(originUrl.hostname),
121
+ };
122
+ }
123
+
124
+ function hasCredentials(overrides: AptosRequest["overrides"]): boolean {
125
+ if (!overrides) {
126
+ return false;
127
+ }
128
+ if (overrides.API_KEY || overrides.AUTH_TOKEN) {
129
+ return true;
130
+ }
131
+ return Object.keys(overrides.HEADERS ?? {}).some((name) => CREDENTIAL_HEADERS.has(name.toLowerCase()));
132
+ }
133
+
134
+ function withoutCredentials(overrides: AptosRequest["overrides"]): AptosRequest["overrides"] {
135
+ if (!overrides) {
136
+ return overrides;
137
+ }
138
+ const { API_KEY, AUTH_TOKEN, HEADERS, ...rest } = overrides;
139
+ if (!HEADERS) {
140
+ return rest;
141
+ }
142
+ return {
143
+ ...rest,
144
+ HEADERS: Object.fromEntries(
145
+ Object.entries(HEADERS).filter(([name]) => !CREDENTIAL_HEADERS.has(name.toLowerCase())),
146
+ ),
147
+ };
148
+ }
149
+
150
+ function warnOnceAboutDroppedCredentials(originalUrl: string, archivalUrl: string): void {
151
+ if (warnedArchivalEndpoints.has(archivalUrl)) {
152
+ return;
153
+ }
154
+ warnedArchivalEndpoints.add(archivalUrl);
155
+ console.warn(
156
+ `[Aptos SDK] ${originalUrl} reported pruned data and advertised the archival endpoint ${archivalUrl}. ` +
157
+ "Retrying there without credentials because it is not on the same site. If that endpoint requires " +
158
+ "authentication, set it as your `fullnode` URL, or disable this retry with `archivalFallback: false`.",
159
+ );
160
+ }
161
+
162
+ /** Sends a request and shapes the client response into an `AptosResponse`, without interpreting the status. */
163
+ async function sendAptosRequest<Req extends {}, Res extends {}>(
82
164
  aptosRequestOpts: AptosRequest,
83
165
  aptosConfig: AptosConfig,
84
- apiType: AptosApiType,
85
166
  ): Promise<AptosResponse<Req, Res>> {
86
167
  const { url, path } = aptosRequestOpts;
87
168
  const fullUrl = path ? `${url}/${path}` : url;
88
169
  const clientResponse = await request<Req, Res>({ ...aptosRequestOpts, url: fullUrl }, aptosConfig.client);
89
170
 
90
- const aptosResponse: AptosResponse<Req, Res> = {
171
+ return {
91
172
  status: clientResponse.status,
92
173
  statusText: clientResponse.statusText ?? "No status text provided",
93
174
  data: clientResponse.data,
@@ -96,7 +177,14 @@ export async function aptosRequest<Req extends {}, Res extends {}>(
96
177
  request: clientResponse.request,
97
178
  url: fullUrl,
98
179
  };
180
+ }
99
181
 
182
+ /** Returns the response on success, or throws an `AptosApiError` describing the failure. */
183
+ function handleAptosResponse<Req extends {}, Res extends {}>(
184
+ aptosResponse: AptosResponse<Req, Res>,
185
+ aptosRequestOpts: AptosRequest,
186
+ apiType: AptosApiType,
187
+ ): AptosResponse<Req, Res> {
100
188
  // Handle case for `Unauthorized` error (i.e. API_KEY error)
101
189
  if (aptosResponse.status === 401) {
102
190
  throw new AptosApiError({ apiType, aptosRequest: aptosRequestOpts, aptosResponse });
@@ -135,3 +223,55 @@ export async function aptosRequest<Req extends {}, Res extends {}>(
135
223
  // comes from an indexer request (e.g. 404), we'll need to mention it appropriately
136
224
  throw new AptosApiError({ apiType, aptosRequest: aptosRequestOpts, aptosResponse });
137
225
  }
226
+
227
+ /**
228
+ * The main function to use when making an API request, returning the response or throwing an AptosApiError on failure.
229
+ *
230
+ * A Node API read of pruned data answers `410 Gone` with an `archival_endpoint`. Such requests are replayed
231
+ * once against that endpoint and the result returned transparently. Opt out with `archivalFallback: false`.
232
+ *
233
+ * @param aptosRequestOpts - Options for the Aptos request, including the URL and path.
234
+ * @param aptosConfig - The configuration information for the SDK client instance.
235
+ * @param apiType - The type of API being accessed, which determines how the response is handled.
236
+ * @returns The response from the API request or throws an AptosApiError if the request fails.
237
+ * @group Implementation
238
+ * @category Client
239
+ */
240
+ export async function aptosRequest<Req extends {}, Res extends {}>(
241
+ aptosRequestOpts: AptosRequest,
242
+ aptosConfig: AptosConfig,
243
+ apiType: AptosApiType,
244
+ ): Promise<AptosResponse<Req, Res>> {
245
+ const aptosResponse = await sendAptosRequest<Req, Res>(aptosRequestOpts, aptosConfig);
246
+
247
+ const archivalTarget =
248
+ apiType === AptosApiType.FULLNODE && aptosResponse.status === HTTP_STATUS_GONE && aptosConfig.archivalFallback
249
+ ? resolveArchivalRetryTarget(aptosResponse.url, aptosResponse.data)
250
+ : undefined;
251
+
252
+ if (archivalTarget === undefined) {
253
+ return handleAptosResponse<Req, Res>(aptosResponse, aptosRequestOpts, apiType);
254
+ }
255
+
256
+ if (!archivalTarget.forwardCredentials && hasCredentials(aptosRequestOpts.overrides)) {
257
+ warnOnceAboutDroppedCredentials(aptosResponse.url, archivalTarget.url);
258
+ }
259
+
260
+ const archivalRequestOpts: AptosRequest = {
261
+ ...aptosRequestOpts,
262
+ url: archivalTarget.url,
263
+ overrides: archivalTarget.forwardCredentials
264
+ ? aptosRequestOpts.overrides
265
+ : withoutCredentials(aptosRequestOpts.overrides),
266
+ };
267
+
268
+ let archivalResponse: AptosResponse<Req, Res>;
269
+ try {
270
+ archivalResponse = await sendAptosRequest<Req, Res>(archivalRequestOpts, aptosConfig);
271
+ } catch {
272
+ // Archival was unreachable, so the pruning error remains the more useful one to surface.
273
+ throw new AptosApiError({ apiType, aptosRequest: aptosRequestOpts, aptosResponse });
274
+ }
275
+
276
+ return handleAptosResponse<Req, Res>(archivalResponse, archivalRequestOpts, apiType);
277
+ }
@@ -9,6 +9,7 @@
9
9
  // Standalone functions
10
10
  export {
11
11
  getPepper,
12
+ getPepperAndAddress,
12
13
  getProof,
13
14
  deriveKeylessAccount,
14
15
  updateFederatedKeylessJwkSetTransaction,
@@ -2,6 +2,7 @@
2
2
  // SPDX-License-Identifier: Apache-2.0
3
3
 
4
4
  export {
5
+ enrichTransactionWithTableItemData,
5
6
  getTransactions,
6
7
  getGasPriceEstimation,
7
8
  getTransactionByVersion,