@aptos-labs/ts-sdk 1.13.1 → 1.13.2

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 (219) hide show
  1. package/dist/common/index.d.ts +13 -11
  2. package/dist/common/index.js +25 -25
  3. package/dist/common/index.js.map +1 -1
  4. package/dist/esm/api/account.mjs +1 -1
  5. package/dist/esm/api/ans.mjs +1 -1
  6. package/dist/esm/api/aptos.mjs +1 -1
  7. package/dist/esm/api/coin.mjs +1 -1
  8. package/dist/esm/api/digitalAsset.mjs +1 -1
  9. package/dist/esm/api/event.mjs +1 -1
  10. package/dist/esm/api/faucet.mjs +1 -1
  11. package/dist/esm/api/fungibleAsset.mjs +1 -1
  12. package/dist/esm/api/general.mjs +1 -1
  13. package/dist/esm/api/index.mjs +1 -1
  14. package/dist/esm/api/staking.mjs +1 -1
  15. package/dist/esm/api/transaction.mjs +1 -1
  16. package/dist/esm/api/transactionSubmission/build.mjs +1 -1
  17. package/dist/esm/api/transactionSubmission/management.mjs +1 -1
  18. package/dist/esm/api/transactionSubmission/sign.mjs +1 -1
  19. package/dist/esm/api/transactionSubmission/sign.mjs.map +1 -1
  20. package/dist/esm/api/transactionSubmission/simulate.mjs +1 -1
  21. package/dist/esm/api/transactionSubmission/submit.mjs +1 -1
  22. package/dist/esm/api/utils.d.mts +1 -1
  23. package/dist/esm/api/utils.mjs +1 -1
  24. package/dist/esm/bcs/index.mjs +1 -1
  25. package/dist/esm/bcs/serializable/entryFunctionBytes.mjs +1 -1
  26. package/dist/esm/bcs/serializable/fixedBytes.mjs +1 -1
  27. package/dist/esm/bcs/serializable/movePrimitives.mjs +1 -1
  28. package/dist/esm/bcs/serializable/moveStructs.mjs +1 -1
  29. package/dist/esm/bcs/serializer.mjs +1 -1
  30. package/dist/esm/{chunk-ILTVKYMT.mjs → chunk-2PFN7LYP.mjs} +2 -2
  31. package/dist/esm/{chunk-32PB5F74.mjs → chunk-3426VLAZ.mjs} +2 -2
  32. package/dist/esm/{chunk-MFFSJJSY.mjs → chunk-3HV2C4SS.mjs} +2 -2
  33. package/dist/esm/{chunk-LYCGUGYR.mjs → chunk-3OCTOB2E.mjs} +2 -2
  34. package/dist/esm/{chunk-LGVHYLN2.mjs → chunk-3QBZU5ZD.mjs} +2 -2
  35. package/dist/esm/{chunk-HLBUOMKA.mjs → chunk-3RUY5FQK.mjs} +2 -2
  36. package/dist/esm/{chunk-JK23P2GY.mjs → chunk-4DNVCOW7.mjs} +2 -2
  37. package/dist/esm/{chunk-DW5XFUDM.mjs → chunk-4LMAVPA4.mjs} +2 -2
  38. package/dist/esm/{chunk-HDDI532F.mjs → chunk-5HALZ6JC.mjs} +2 -2
  39. package/dist/esm/{chunk-WZNX3RBA.mjs → chunk-5OM4V4DR.mjs} +2 -2
  40. package/dist/esm/{chunk-VVMR7UKB.mjs → chunk-5TMLAKSH.mjs} +2 -2
  41. package/dist/esm/{chunk-4UJ5Y6QQ.mjs → chunk-6IGEUEER.mjs} +2 -2
  42. package/dist/esm/{chunk-O7P52OOA.mjs → chunk-6MG4JAYB.mjs} +2 -2
  43. package/dist/esm/{chunk-JAIQBRLH.mjs → chunk-A556OVZY.mjs} +2 -2
  44. package/dist/esm/{chunk-HHETZQ6D.mjs → chunk-B252RJCU.mjs} +2 -2
  45. package/dist/esm/{chunk-BGW77OLE.mjs → chunk-BAV4XY7C.mjs} +2 -2
  46. package/dist/esm/chunk-BBU2EE6D.mjs +2 -0
  47. package/dist/esm/{chunk-YWN2T4IU.mjs → chunk-BRQYARQ3.mjs} +2 -2
  48. package/dist/esm/{chunk-YUN2JVAN.mjs → chunk-EJCKCYYI.mjs} +2 -2
  49. package/dist/esm/{chunk-5M7D6SXS.mjs → chunk-FO6ZKE7A.mjs} +2 -2
  50. package/dist/esm/chunk-FXNFWLQC.mjs +2 -0
  51. package/dist/esm/{chunk-KBRRTSF6.mjs.map → chunk-FXNFWLQC.mjs.map} +1 -1
  52. package/dist/esm/chunk-GED6IT3S.mjs +1 -0
  53. package/dist/esm/{chunk-OATDMLDK.mjs → chunk-GMQQSSEO.mjs} +2 -2
  54. package/dist/esm/{chunk-H3NRKYG4.mjs → chunk-GNQXMS53.mjs} +2 -2
  55. package/dist/esm/{chunk-CZF6JTC2.mjs → chunk-GRT5PHL6.mjs} +2 -2
  56. package/dist/esm/{chunk-6T4IFH73.mjs → chunk-GS5J57UA.mjs} +2 -2
  57. package/dist/esm/{chunk-YVIP7DMT.mjs → chunk-GXYS45Y5.mjs} +2 -2
  58. package/dist/esm/{chunk-OMC3ZGKN.mjs → chunk-HLVMEUWD.mjs} +2 -2
  59. package/dist/esm/{chunk-XRAL7KVT.mjs → chunk-HQSLBTW5.mjs} +2 -2
  60. package/dist/esm/chunk-IZT6OX3R.mjs +2 -0
  61. package/dist/esm/{chunk-MQXSU6GN.mjs.map → chunk-IZT6OX3R.mjs.map} +1 -1
  62. package/dist/esm/{chunk-OZNBOCEF.mjs → chunk-KDCHX7BI.mjs} +2 -2
  63. package/dist/esm/{chunk-3YCG7Y63.mjs → chunk-KHOHRD2B.mjs} +2 -2
  64. package/dist/esm/{chunk-LJ6MB5U7.mjs → chunk-L6PGWGFF.mjs} +2 -2
  65. package/dist/esm/{chunk-O7PPRJJC.mjs → chunk-LV2V23Z6.mjs} +2 -2
  66. package/dist/esm/{chunk-5RE43AX2.mjs → chunk-MNBYKY5P.mjs} +2 -2
  67. package/dist/esm/{chunk-QM4UQVGB.mjs → chunk-OGHE4AQA.mjs} +2 -2
  68. package/dist/esm/{chunk-Y5GRH4YJ.mjs → chunk-PIOHC246.mjs} +2 -2
  69. package/dist/esm/{chunk-WFL6YWJS.mjs → chunk-PJLCPRYJ.mjs} +2 -2
  70. package/dist/esm/{chunk-V6SPPOWX.mjs → chunk-QTRYMRYK.mjs} +2 -2
  71. package/dist/esm/{chunk-E7OPTWPP.mjs → chunk-QWRH22H4.mjs} +2 -2
  72. package/dist/esm/chunk-ROXFCLDT.mjs +2 -0
  73. package/dist/esm/chunk-ROXFCLDT.mjs.map +1 -0
  74. package/dist/esm/{chunk-DW4FAHFT.mjs → chunk-RQEWIZ67.mjs} +2 -2
  75. package/dist/esm/{chunk-6GZ5SUUK.mjs → chunk-TC3VVMPY.mjs} +2 -2
  76. package/dist/esm/{chunk-J5WUVXKC.mjs → chunk-TGG7SWBO.mjs} +2 -2
  77. package/dist/esm/{chunk-2SPJ7XZB.mjs → chunk-TGXZVNR5.mjs} +2 -2
  78. package/dist/esm/{chunk-O5ZLNJ6Z.mjs → chunk-TORRTLWV.mjs} +2 -2
  79. package/dist/esm/{chunk-YZKDNVA5.mjs → chunk-TQR7M73S.mjs} +2 -2
  80. package/dist/esm/{chunk-F2LL2BWZ.mjs → chunk-UMFJDDYI.mjs} +2 -2
  81. package/dist/esm/{chunk-F5O5BBEK.mjs → chunk-UPIN5AIO.mjs} +2 -2
  82. package/dist/esm/{chunk-M3NK6GOI.mjs → chunk-VNO4VHJN.mjs} +2 -2
  83. package/dist/esm/chunk-WBOLHLPX.mjs +2 -0
  84. package/dist/esm/chunk-WBOLHLPX.mjs.map +1 -0
  85. package/dist/esm/{chunk-I2RHCBHM.mjs → chunk-XLPVG4XR.mjs} +2 -2
  86. package/dist/esm/{chunk-I24X55BI.mjs → chunk-YBEF3UR3.mjs} +2 -2
  87. package/dist/esm/{chunk-KECXKWWV.mjs → chunk-YKVKSNH4.mjs} +2 -2
  88. package/dist/esm/{chunk-CYTNMIOT.mjs → chunk-YVSU6GOA.mjs} +2 -2
  89. package/dist/esm/client/core.mjs +1 -1
  90. package/dist/esm/client/get.mjs +1 -1
  91. package/dist/esm/client/index.mjs +1 -1
  92. package/dist/esm/client/post.mjs +1 -1
  93. package/dist/esm/core/account/Account.mjs +1 -1
  94. package/dist/esm/core/account/Ed25519Account.mjs +1 -1
  95. package/dist/esm/core/account/SingleKeyAccount.mjs +1 -1
  96. package/dist/esm/core/account/index.mjs +1 -1
  97. package/dist/esm/core/account/utils/address.mjs +1 -1
  98. package/dist/esm/core/account/utils/index.mjs +1 -1
  99. package/dist/esm/core/accountAddress.mjs +1 -1
  100. package/dist/esm/core/authenticationKey.mjs +1 -1
  101. package/dist/esm/core/crypto/ed25519.mjs +1 -1
  102. package/dist/esm/core/crypto/index.mjs +1 -1
  103. package/dist/esm/core/crypto/multiEd25519.mjs +1 -1
  104. package/dist/esm/core/crypto/multiKey.mjs +1 -1
  105. package/dist/esm/core/crypto/publicKey.mjs +1 -1
  106. package/dist/esm/core/crypto/secp256k1.mjs +1 -1
  107. package/dist/esm/core/crypto/signature.mjs +1 -1
  108. package/dist/esm/core/crypto/singleKey.mjs +1 -1
  109. package/dist/esm/core/index.mjs +1 -1
  110. package/dist/esm/index.d.mts +2 -1
  111. package/dist/esm/index.mjs +1 -1
  112. package/dist/esm/internal/account.d.mts +1 -1
  113. package/dist/esm/internal/account.mjs +1 -1
  114. package/dist/esm/internal/ans.mjs +1 -1
  115. package/dist/esm/internal/coin.mjs +1 -1
  116. package/dist/esm/internal/digitalAsset.mjs +1 -1
  117. package/dist/esm/internal/event.mjs +1 -1
  118. package/dist/esm/internal/faucet.mjs +1 -1
  119. package/dist/esm/internal/fungibleAsset.mjs +1 -1
  120. package/dist/esm/internal/general.mjs +1 -1
  121. package/dist/esm/internal/staking.mjs +1 -1
  122. package/dist/esm/internal/transaction.mjs +1 -1
  123. package/dist/esm/internal/transactionSubmission.mjs +1 -1
  124. package/dist/esm/internal/view.mjs +1 -1
  125. package/dist/esm/transactions/authenticator/account.mjs +1 -1
  126. package/dist/esm/transactions/authenticator/index.mjs +1 -1
  127. package/dist/esm/transactions/authenticator/transaction.mjs +1 -1
  128. package/dist/esm/transactions/index.d.mts +1 -1
  129. package/dist/esm/transactions/index.mjs +1 -1
  130. package/dist/esm/transactions/instances/chainId.mjs +1 -1
  131. package/dist/esm/transactions/instances/identifier.mjs +1 -1
  132. package/dist/esm/transactions/instances/index.mjs +1 -1
  133. package/dist/esm/transactions/instances/moduleId.mjs +1 -1
  134. package/dist/esm/transactions/instances/multiAgentTransaction.mjs +1 -1
  135. package/dist/esm/transactions/instances/rawTransaction.mjs +1 -1
  136. package/dist/esm/transactions/instances/rotationProofChallenge.mjs +1 -1
  137. package/dist/esm/transactions/instances/signedTransaction.mjs +1 -1
  138. package/dist/esm/transactions/instances/simpleTransaction.mjs +1 -1
  139. package/dist/esm/transactions/instances/transactionPayload.mjs +1 -1
  140. package/dist/esm/transactions/management/accountSequenceNumber.mjs +1 -1
  141. package/dist/esm/transactions/management/index.mjs +1 -1
  142. package/dist/esm/transactions/management/transactionWorker.mjs +1 -1
  143. package/dist/esm/transactions/transactionBuilder/helpers.mjs +1 -1
  144. package/dist/esm/transactions/transactionBuilder/index.d.mts +1 -1
  145. package/dist/esm/transactions/transactionBuilder/index.mjs +1 -1
  146. package/dist/esm/transactions/transactionBuilder/remoteAbi.mjs +1 -1
  147. package/dist/esm/transactions/transactionBuilder/transactionBuilder.d.mts +2 -12
  148. package/dist/esm/transactions/transactionBuilder/transactionBuilder.mjs +1 -1
  149. package/dist/esm/transactions/typeTag/index.mjs +1 -1
  150. package/dist/esm/transactions/typeTag/parser.mjs +1 -1
  151. package/dist/esm/utils/index.d.mts +9 -0
  152. package/dist/esm/utils/index.mjs +1 -1
  153. package/dist/esm/utils/normalizeBundle.d.mts +23 -0
  154. package/dist/esm/utils/normalizeBundle.mjs +2 -0
  155. package/dist/esm/utils/normalizeBundle.mjs.map +1 -0
  156. package/dist/esm/version.d.mts +1 -1
  157. package/dist/esm/version.mjs +1 -1
  158. package/package.json +2 -2
  159. package/src/transactions/transactionBuilder/transactionBuilder.ts +33 -83
  160. package/src/utils/index.ts +1 -0
  161. package/src/utils/normalizeBundle.ts +21 -0
  162. package/src/version.ts +1 -1
  163. package/dist/esm/chunk-CYDWEPFL.mjs +0 -1
  164. package/dist/esm/chunk-DJ5TUMIY.mjs +0 -2
  165. package/dist/esm/chunk-DJ5TUMIY.mjs.map +0 -1
  166. package/dist/esm/chunk-KBRRTSF6.mjs +0 -2
  167. package/dist/esm/chunk-MQXSU6GN.mjs +0 -2
  168. package/dist/esm/chunk-PNGS6IWC.mjs +0 -2
  169. /package/dist/esm/{chunk-ILTVKYMT.mjs.map → chunk-2PFN7LYP.mjs.map} +0 -0
  170. /package/dist/esm/{chunk-32PB5F74.mjs.map → chunk-3426VLAZ.mjs.map} +0 -0
  171. /package/dist/esm/{chunk-MFFSJJSY.mjs.map → chunk-3HV2C4SS.mjs.map} +0 -0
  172. /package/dist/esm/{chunk-LYCGUGYR.mjs.map → chunk-3OCTOB2E.mjs.map} +0 -0
  173. /package/dist/esm/{chunk-LGVHYLN2.mjs.map → chunk-3QBZU5ZD.mjs.map} +0 -0
  174. /package/dist/esm/{chunk-HLBUOMKA.mjs.map → chunk-3RUY5FQK.mjs.map} +0 -0
  175. /package/dist/esm/{chunk-JK23P2GY.mjs.map → chunk-4DNVCOW7.mjs.map} +0 -0
  176. /package/dist/esm/{chunk-DW5XFUDM.mjs.map → chunk-4LMAVPA4.mjs.map} +0 -0
  177. /package/dist/esm/{chunk-HDDI532F.mjs.map → chunk-5HALZ6JC.mjs.map} +0 -0
  178. /package/dist/esm/{chunk-WZNX3RBA.mjs.map → chunk-5OM4V4DR.mjs.map} +0 -0
  179. /package/dist/esm/{chunk-VVMR7UKB.mjs.map → chunk-5TMLAKSH.mjs.map} +0 -0
  180. /package/dist/esm/{chunk-4UJ5Y6QQ.mjs.map → chunk-6IGEUEER.mjs.map} +0 -0
  181. /package/dist/esm/{chunk-O7P52OOA.mjs.map → chunk-6MG4JAYB.mjs.map} +0 -0
  182. /package/dist/esm/{chunk-JAIQBRLH.mjs.map → chunk-A556OVZY.mjs.map} +0 -0
  183. /package/dist/esm/{chunk-HHETZQ6D.mjs.map → chunk-B252RJCU.mjs.map} +0 -0
  184. /package/dist/esm/{chunk-BGW77OLE.mjs.map → chunk-BAV4XY7C.mjs.map} +0 -0
  185. /package/dist/esm/{chunk-PNGS6IWC.mjs.map → chunk-BBU2EE6D.mjs.map} +0 -0
  186. /package/dist/esm/{chunk-YWN2T4IU.mjs.map → chunk-BRQYARQ3.mjs.map} +0 -0
  187. /package/dist/esm/{chunk-YUN2JVAN.mjs.map → chunk-EJCKCYYI.mjs.map} +0 -0
  188. /package/dist/esm/{chunk-5M7D6SXS.mjs.map → chunk-FO6ZKE7A.mjs.map} +0 -0
  189. /package/dist/esm/{chunk-CYDWEPFL.mjs.map → chunk-GED6IT3S.mjs.map} +0 -0
  190. /package/dist/esm/{chunk-OATDMLDK.mjs.map → chunk-GMQQSSEO.mjs.map} +0 -0
  191. /package/dist/esm/{chunk-H3NRKYG4.mjs.map → chunk-GNQXMS53.mjs.map} +0 -0
  192. /package/dist/esm/{chunk-CZF6JTC2.mjs.map → chunk-GRT5PHL6.mjs.map} +0 -0
  193. /package/dist/esm/{chunk-6T4IFH73.mjs.map → chunk-GS5J57UA.mjs.map} +0 -0
  194. /package/dist/esm/{chunk-YVIP7DMT.mjs.map → chunk-GXYS45Y5.mjs.map} +0 -0
  195. /package/dist/esm/{chunk-OMC3ZGKN.mjs.map → chunk-HLVMEUWD.mjs.map} +0 -0
  196. /package/dist/esm/{chunk-XRAL7KVT.mjs.map → chunk-HQSLBTW5.mjs.map} +0 -0
  197. /package/dist/esm/{chunk-OZNBOCEF.mjs.map → chunk-KDCHX7BI.mjs.map} +0 -0
  198. /package/dist/esm/{chunk-3YCG7Y63.mjs.map → chunk-KHOHRD2B.mjs.map} +0 -0
  199. /package/dist/esm/{chunk-LJ6MB5U7.mjs.map → chunk-L6PGWGFF.mjs.map} +0 -0
  200. /package/dist/esm/{chunk-O7PPRJJC.mjs.map → chunk-LV2V23Z6.mjs.map} +0 -0
  201. /package/dist/esm/{chunk-5RE43AX2.mjs.map → chunk-MNBYKY5P.mjs.map} +0 -0
  202. /package/dist/esm/{chunk-QM4UQVGB.mjs.map → chunk-OGHE4AQA.mjs.map} +0 -0
  203. /package/dist/esm/{chunk-Y5GRH4YJ.mjs.map → chunk-PIOHC246.mjs.map} +0 -0
  204. /package/dist/esm/{chunk-WFL6YWJS.mjs.map → chunk-PJLCPRYJ.mjs.map} +0 -0
  205. /package/dist/esm/{chunk-V6SPPOWX.mjs.map → chunk-QTRYMRYK.mjs.map} +0 -0
  206. /package/dist/esm/{chunk-E7OPTWPP.mjs.map → chunk-QWRH22H4.mjs.map} +0 -0
  207. /package/dist/esm/{chunk-DW4FAHFT.mjs.map → chunk-RQEWIZ67.mjs.map} +0 -0
  208. /package/dist/esm/{chunk-6GZ5SUUK.mjs.map → chunk-TC3VVMPY.mjs.map} +0 -0
  209. /package/dist/esm/{chunk-J5WUVXKC.mjs.map → chunk-TGG7SWBO.mjs.map} +0 -0
  210. /package/dist/esm/{chunk-2SPJ7XZB.mjs.map → chunk-TGXZVNR5.mjs.map} +0 -0
  211. /package/dist/esm/{chunk-O5ZLNJ6Z.mjs.map → chunk-TORRTLWV.mjs.map} +0 -0
  212. /package/dist/esm/{chunk-YZKDNVA5.mjs.map → chunk-TQR7M73S.mjs.map} +0 -0
  213. /package/dist/esm/{chunk-F2LL2BWZ.mjs.map → chunk-UMFJDDYI.mjs.map} +0 -0
  214. /package/dist/esm/{chunk-F5O5BBEK.mjs.map → chunk-UPIN5AIO.mjs.map} +0 -0
  215. /package/dist/esm/{chunk-M3NK6GOI.mjs.map → chunk-VNO4VHJN.mjs.map} +0 -0
  216. /package/dist/esm/{chunk-I2RHCBHM.mjs.map → chunk-XLPVG4XR.mjs.map} +0 -0
  217. /package/dist/esm/{chunk-I24X55BI.mjs.map → chunk-YBEF3UR3.mjs.map} +0 -0
  218. /package/dist/esm/{chunk-KECXKWWV.mjs.map → chunk-YKVKSNH4.mjs.map} +0 -0
  219. /package/dist/esm/{chunk-CYTNMIOT.mjs.map → chunk-YVSU6GOA.mjs.map} +0 -0
@@ -1,5 +1,5 @@
1
1
  export { findFirstNonSignerArg, getFunctionParts, isBcsAddress, isBcsBool, isBcsFixedBytes, isBcsString, isBcsU128, isBcsU16, isBcsU256, isBcsU32, isBcsU64, isBcsU8, isBool, isEncodedEntryFunctionArgument, isLargeNumber, isNull, isNumber, isScriptDataInput, isString, throwTypeMismatch } from './helpers.mjs';
2
- export { buildTransaction, deriveTransactionType, generateMultiSignersSignedTransaction, generateRawTransaction, generateSignedTransaction, generateSignedTransactionForSimulation, generateSigningMessage, generateTransactionPayload, generateTransactionPayloadWithABI, generateUserTransactionHash, generateViewFunctionPayload, generateViewFunctionPayloadWithABI, getAuthenticatorForSimulation, hashValues, sign } from './transactionBuilder.mjs';
2
+ export { buildTransaction, deriveTransactionType, generateRawTransaction, generateSignedTransaction, generateSignedTransactionForSimulation, generateSigningMessage, generateTransactionPayload, generateTransactionPayloadWithABI, generateUserTransactionHash, generateViewFunctionPayload, generateViewFunctionPayloadWithABI, getAuthenticatorForSimulation, hashValues, sign } from './transactionBuilder.mjs';
3
3
  export { checkOrConvertArgument, convertArgument, fetchEntryFunctionAbi, fetchFunctionAbi, fetchViewFunctionAbi, standardizeTypeTags } from './remoteAbi.mjs';
4
4
  import '../types.mjs';
5
5
  import '../../api/aptosConfig.mjs';
@@ -1,2 +1,2 @@
1
- import"../../chunk-R7G3CLRI.mjs";import{a as A,b as B,c as C,d as D,e as E,f as F,g as G,h as H,i as I,j as J,k as K,l as L,m as M,n as N,o as O}from"../../chunk-DJ5TUMIY.mjs";import{a as u,b as v,c as w,d as x,e as y,f as z}from"../../chunk-WFL6YWJS.mjs";import{a,b,c,d,e,f,g,h,i,j,k,l,m,n,o,p,q,r,s,t}from"../../chunk-KBRRTSF6.mjs";import"../../chunk-U43IJHQN.mjs";import"../../chunk-ICXA3DZH.mjs";import"../../chunk-WZNX3RBA.mjs";import"../../chunk-F5O5BBEK.mjs";import"../../chunk-UYVPNUH3.mjs";import"../../chunk-BGW77OLE.mjs";import"../../chunk-QM4UQVGB.mjs";import"../../chunk-2SPJ7XZB.mjs";import"../../chunk-DMKUAQB7.mjs";import"../../chunk-BWFJHFBQ.mjs";import"../../chunk-RHBCVCOS.mjs";import"../../chunk-DSTKXJMA.mjs";import"../../chunk-V6SPPOWX.mjs";import"../../chunk-6GZ5SUUK.mjs";import"../../chunk-LGVHYLN2.mjs";import"../../chunk-E7FWVXGX.mjs";import"../../chunk-MLWIHWNH.mjs";import"../../chunk-4QMXOWHP.mjs";import"../../chunk-UML2VQZT.mjs";import"../../chunk-Y5GRH4YJ.mjs";import"../../chunk-YZKDNVA5.mjs";import"../../chunk-H3NRKYG4.mjs";import"../../chunk-M3NK6GOI.mjs";import"../../chunk-UVSRX4SV.mjs";import"../../chunk-I2RHCBHM.mjs";import"../../chunk-5M7D6SXS.mjs";import"../../chunk-XRAL7KVT.mjs";import"../../chunk-KUX6GQ2E.mjs";import"../../chunk-MFFSJJSY.mjs";import"../../chunk-OATDMLDK.mjs";import"../../chunk-TJDC5PWD.mjs";import"../../chunk-LR65XHSF.mjs";import"../../chunk-WFZDFFBM.mjs";import"../../chunk-R5QUBEH6.mjs";import"../../chunk-FZY4PMEE.mjs";import"../../chunk-ZYYK3UXP.mjs";import"../../chunk-TBMAJ6AW.mjs";import"../../chunk-FS3NSGBF.mjs";import"../../chunk-QIAHBEEW.mjs";import"../../chunk-6IFMQ5AS.mjs";import"../../chunk-NPFNYP75.mjs";import"../../chunk-IOSQVDZI.mjs";import"../../chunk-52C73T26.mjs";import"../../chunk-AOCNYMMX.mjs";import"../../chunk-56CNRT2K.mjs";import"../../chunk-FBPNHF54.mjs";import"../../chunk-KECXKWWV.mjs";import"../../chunk-AH44UPM4.mjs";import"../../chunk-E7OPTWPP.mjs";import"../../chunk-S4SEFF4K.mjs";import"../../chunk-3JPVQHOR.mjs";import"../../chunk-N2FKVZ4D.mjs";import"../../chunk-3YCG7Y63.mjs";import"../../chunk-5RE43AX2.mjs";import"../../chunk-HHETZQ6D.mjs";import"../../chunk-CYDWEPFL.mjs";import"../../chunk-6FBKUTGF.mjs";import"../../chunk-OWW6SIDP.mjs";import"../../chunk-4WPQQPUF.mjs";import"../../chunk-MQXSU6GN.mjs";import"../../chunk-XDGQTMDV.mjs";import"../../chunk-CYNQRMO5.mjs";import"../../chunk-FVA2OPG4.mjs";export{F as buildTransaction,z as checkOrConvertArgument,y as convertArgument,M as deriveTransactionType,w as fetchEntryFunctionAbi,v as fetchFunctionAbi,x as fetchViewFunctionAbi,s as findFirstNonSignerArg,N as generateMultiSignersSignedTransaction,E as generateRawTransaction,J as generateSignedTransaction,G as generateSignedTransactionForSimulation,O as generateSigningMessage,A as generateTransactionPayload,B as generateTransactionPayloadWithABI,L as generateUserTransactionHash,C as generateViewFunctionPayload,D as generateViewFunctionPayloadWithABI,H as getAuthenticatorForSimulation,t as getFunctionParts,K as hashValues,h as isBcsAddress,g as isBcsBool,j as isBcsFixedBytes,i as isBcsString,o as isBcsU128,l as isBcsU16,p as isBcsU256,m as isBcsU32,n as isBcsU64,k as isBcsU8,a as isBool,f as isEncodedEntryFunctionArgument,d as isLargeNumber,e as isNull,c as isNumber,q as isScriptDataInput,b as isString,I as sign,u as standardizeTypeTags,r as throwTypeMismatch};
1
+ import"../../chunk-R7G3CLRI.mjs";import{a as A,b as B,c as C,d as D,e as E,f as F,g as G,h as H,i as I,j as J,k as K,l as L,m as M,n as N}from"../../chunk-WBOLHLPX.mjs";import{a as u,b as v,c as w,d as x,e as y,f as z}from"../../chunk-PJLCPRYJ.mjs";import"../../chunk-U43IJHQN.mjs";import{a,b,c,d,e,f,g,h,i,j,k,l,m,n,o,p,q,r,s,t}from"../../chunk-FXNFWLQC.mjs";import"../../chunk-ICXA3DZH.mjs";import"../../chunk-UYVPNUH3.mjs";import"../../chunk-BAV4XY7C.mjs";import"../../chunk-QTRYMRYK.mjs";import"../../chunk-5OM4V4DR.mjs";import"../../chunk-TC3VVMPY.mjs";import"../../chunk-UPIN5AIO.mjs";import"../../chunk-OGHE4AQA.mjs";import"../../chunk-TGXZVNR5.mjs";import"../../chunk-DMKUAQB7.mjs";import"../../chunk-RHBCVCOS.mjs";import"../../chunk-DSTKXJMA.mjs";import"../../chunk-BWFJHFBQ.mjs";import"../../chunk-3QBZU5ZD.mjs";import"../../chunk-E7FWVXGX.mjs";import"../../chunk-MLWIHWNH.mjs";import"../../chunk-4QMXOWHP.mjs";import"../../chunk-UML2VQZT.mjs";import"../../chunk-PIOHC246.mjs";import"../../chunk-TQR7M73S.mjs";import"../../chunk-GNQXMS53.mjs";import"../../chunk-VNO4VHJN.mjs";import"../../chunk-UVSRX4SV.mjs";import"../../chunk-FO6ZKE7A.mjs";import"../../chunk-KUX6GQ2E.mjs";import"../../chunk-HQSLBTW5.mjs";import"../../chunk-3HV2C4SS.mjs";import"../../chunk-XLPVG4XR.mjs";import"../../chunk-GMQQSSEO.mjs";import"../../chunk-WFZDFFBM.mjs";import"../../chunk-R5QUBEH6.mjs";import"../../chunk-TJDC5PWD.mjs";import"../../chunk-LR65XHSF.mjs";import"../../chunk-YKVKSNH4.mjs";import"../../chunk-AH44UPM4.mjs";import"../../chunk-QWRH22H4.mjs";import"../../chunk-S4SEFF4K.mjs";import"../../chunk-N2FKVZ4D.mjs";import"../../chunk-KHOHRD2B.mjs";import"../../chunk-MNBYKY5P.mjs";import"../../chunk-B252RJCU.mjs";import"../../chunk-GED6IT3S.mjs";import"../../chunk-ROXFCLDT.mjs";import"../../chunk-6FBKUTGF.mjs";import"../../chunk-NPFNYP75.mjs";import"../../chunk-IOSQVDZI.mjs";import"../../chunk-XDGQTMDV.mjs";import"../../chunk-CYNQRMO5.mjs";import"../../chunk-IZT6OX3R.mjs";import"../../chunk-3JPVQHOR.mjs";import"../../chunk-FZY4PMEE.mjs";import"../../chunk-FS3NSGBF.mjs";import"../../chunk-QIAHBEEW.mjs";import"../../chunk-ZYYK3UXP.mjs";import"../../chunk-TBMAJ6AW.mjs";import"../../chunk-OWW6SIDP.mjs";import"../../chunk-4WPQQPUF.mjs";import"../../chunk-6IFMQ5AS.mjs";import"../../chunk-52C73T26.mjs";import"../../chunk-AOCNYMMX.mjs";import"../../chunk-FBPNHF54.mjs";import"../../chunk-56CNRT2K.mjs";import"../../chunk-FVA2OPG4.mjs";export{F as buildTransaction,z as checkOrConvertArgument,y as convertArgument,M as deriveTransactionType,w as fetchEntryFunctionAbi,v as fetchFunctionAbi,x as fetchViewFunctionAbi,s as findFirstNonSignerArg,E as generateRawTransaction,J as generateSignedTransaction,G as generateSignedTransactionForSimulation,N as generateSigningMessage,A as generateTransactionPayload,B as generateTransactionPayloadWithABI,L as generateUserTransactionHash,C as generateViewFunctionPayload,D as generateViewFunctionPayloadWithABI,H as getAuthenticatorForSimulation,t as getFunctionParts,K as hashValues,h as isBcsAddress,g as isBcsBool,j as isBcsFixedBytes,i as isBcsString,o as isBcsU128,l as isBcsU16,p as isBcsU256,m as isBcsU32,n as isBcsU64,k as isBcsU8,a as isBool,f as isEncodedEntryFunctionArgument,d as isLargeNumber,e as isNull,c as isNumber,q as isScriptDataInput,b as isString,I as sign,u as standardizeTypeTags,r as throwTypeMismatch};
2
2
  //# sourceMappingURL=index.mjs.map
@@ -1,2 +1,2 @@
1
- import{a,b,c,d,e,f}from"../../chunk-WFL6YWJS.mjs";import"../../chunk-KBRRTSF6.mjs";import"../../chunk-U43IJHQN.mjs";import"../../chunk-DMKUAQB7.mjs";import"../../chunk-DSTKXJMA.mjs";import"../../chunk-LGVHYLN2.mjs";import"../../chunk-E7FWVXGX.mjs";import"../../chunk-MLWIHWNH.mjs";import"../../chunk-4QMXOWHP.mjs";import"../../chunk-UML2VQZT.mjs";import"../../chunk-Y5GRH4YJ.mjs";import"../../chunk-YZKDNVA5.mjs";import"../../chunk-H3NRKYG4.mjs";import"../../chunk-M3NK6GOI.mjs";import"../../chunk-UVSRX4SV.mjs";import"../../chunk-I2RHCBHM.mjs";import"../../chunk-5M7D6SXS.mjs";import"../../chunk-XRAL7KVT.mjs";import"../../chunk-KUX6GQ2E.mjs";import"../../chunk-MFFSJJSY.mjs";import"../../chunk-OATDMLDK.mjs";import"../../chunk-TJDC5PWD.mjs";import"../../chunk-LR65XHSF.mjs";import"../../chunk-WFZDFFBM.mjs";import"../../chunk-R5QUBEH6.mjs";import"../../chunk-FZY4PMEE.mjs";import"../../chunk-ZYYK3UXP.mjs";import"../../chunk-TBMAJ6AW.mjs";import"../../chunk-FS3NSGBF.mjs";import"../../chunk-QIAHBEEW.mjs";import"../../chunk-6IFMQ5AS.mjs";import"../../chunk-NPFNYP75.mjs";import"../../chunk-IOSQVDZI.mjs";import"../../chunk-52C73T26.mjs";import"../../chunk-AOCNYMMX.mjs";import"../../chunk-56CNRT2K.mjs";import"../../chunk-FBPNHF54.mjs";import"../../chunk-AH44UPM4.mjs";import"../../chunk-E7OPTWPP.mjs";import"../../chunk-S4SEFF4K.mjs";import"../../chunk-N2FKVZ4D.mjs";import"../../chunk-3YCG7Y63.mjs";import"../../chunk-5RE43AX2.mjs";import"../../chunk-HHETZQ6D.mjs";import"../../chunk-CYDWEPFL.mjs";import"../../chunk-6FBKUTGF.mjs";import"../../chunk-OWW6SIDP.mjs";import"../../chunk-4WPQQPUF.mjs";import"../../chunk-MQXSU6GN.mjs";import"../../chunk-XDGQTMDV.mjs";import"../../chunk-CYNQRMO5.mjs";import"../../chunk-FVA2OPG4.mjs";export{f as checkOrConvertArgument,e as convertArgument,c as fetchEntryFunctionAbi,b as fetchFunctionAbi,d as fetchViewFunctionAbi,a as standardizeTypeTags};
1
+ import{a,b,c,d,e,f}from"../../chunk-PJLCPRYJ.mjs";import"../../chunk-U43IJHQN.mjs";import"../../chunk-FXNFWLQC.mjs";import"../../chunk-DMKUAQB7.mjs";import"../../chunk-DSTKXJMA.mjs";import"../../chunk-3QBZU5ZD.mjs";import"../../chunk-E7FWVXGX.mjs";import"../../chunk-MLWIHWNH.mjs";import"../../chunk-4QMXOWHP.mjs";import"../../chunk-UML2VQZT.mjs";import"../../chunk-PIOHC246.mjs";import"../../chunk-TQR7M73S.mjs";import"../../chunk-GNQXMS53.mjs";import"../../chunk-VNO4VHJN.mjs";import"../../chunk-UVSRX4SV.mjs";import"../../chunk-FO6ZKE7A.mjs";import"../../chunk-KUX6GQ2E.mjs";import"../../chunk-HQSLBTW5.mjs";import"../../chunk-3HV2C4SS.mjs";import"../../chunk-XLPVG4XR.mjs";import"../../chunk-GMQQSSEO.mjs";import"../../chunk-WFZDFFBM.mjs";import"../../chunk-R5QUBEH6.mjs";import"../../chunk-TJDC5PWD.mjs";import"../../chunk-LR65XHSF.mjs";import"../../chunk-AH44UPM4.mjs";import"../../chunk-QWRH22H4.mjs";import"../../chunk-S4SEFF4K.mjs";import"../../chunk-N2FKVZ4D.mjs";import"../../chunk-KHOHRD2B.mjs";import"../../chunk-MNBYKY5P.mjs";import"../../chunk-B252RJCU.mjs";import"../../chunk-GED6IT3S.mjs";import"../../chunk-ROXFCLDT.mjs";import"../../chunk-6FBKUTGF.mjs";import"../../chunk-NPFNYP75.mjs";import"../../chunk-IOSQVDZI.mjs";import"../../chunk-XDGQTMDV.mjs";import"../../chunk-CYNQRMO5.mjs";import"../../chunk-IZT6OX3R.mjs";import"../../chunk-FZY4PMEE.mjs";import"../../chunk-FS3NSGBF.mjs";import"../../chunk-QIAHBEEW.mjs";import"../../chunk-ZYYK3UXP.mjs";import"../../chunk-TBMAJ6AW.mjs";import"../../chunk-OWW6SIDP.mjs";import"../../chunk-4WPQQPUF.mjs";import"../../chunk-6IFMQ5AS.mjs";import"../../chunk-52C73T26.mjs";import"../../chunk-AOCNYMMX.mjs";import"../../chunk-FBPNHF54.mjs";import"../../chunk-56CNRT2K.mjs";import"../../chunk-FVA2OPG4.mjs";export{f as checkOrConvertArgument,e as convertArgument,c as fetchEntryFunctionAbi,b as fetchFunctionAbi,d as fetchViewFunctionAbi,a as standardizeTypeTags};
2
2
  //# sourceMappingURL=remoteAbi.mjs.map
@@ -3,7 +3,7 @@ import { AccountAuthenticatorEd25519, AccountAuthenticatorSingleKey, AccountAuth
3
3
  import { AccountAddressInput } from '../../core/accountAddress.mjs';
4
4
  import { P as PublicKey } from '../../publicKey-lq5djCIY.mjs';
5
5
  import { A as Account } from '../../Ed25519Account--qjfup2u.mjs';
6
- import { RawTransaction, MultiAgentRawTransaction, FeePayerRawTransaction } from '../instances/rawTransaction.mjs';
6
+ import { RawTransaction } from '../instances/rawTransaction.mjs';
7
7
  import { TransactionPayloadScript, TransactionPayloadEntryFunction, TransactionPayloadMultiSig, EntryFunction } from '../instances/transactionPayload.mjs';
8
8
  import { SimpleTransaction } from '../instances/simpleTransaction.mjs';
9
9
  import { InputScriptData, InputEntryFunctionDataWithRemoteABI, InputMultiSigDataWithRemoteABI, InputEntryFunctionDataWithABI, InputMultiSigDataWithABI, InputViewFunctionDataWithRemoteABI, InputViewFunctionDataWithABI, AnyTransactionPayloadInstance, InputGenerateTransactionOptions, InputGenerateSingleSignerRawTransactionArgs, InputGenerateMultiAgentRawTransactionArgs, InputSimulateTransactionData, AnyRawTransaction, InputSubmitTransactionData, AnyRawTransactionInstance } from '../types.mjs';
@@ -123,16 +123,6 @@ declare function generateUserTransactionHash(args: InputSubmitTransactionData):
123
123
  * @returns FeePayerRawTransaction | MultiAgentRawTransaction | RawTransaction
124
124
  */
125
125
  declare function deriveTransactionType(transaction: AnyRawTransaction): AnyRawTransactionInstance;
126
- /**
127
- * Generate a multi signers signed transaction that can be submitted to chain
128
- *
129
- * @param transaction MultiAgentRawTransaction | FeePayerRawTransaction
130
- * @param senderAuthenticator The account authenticator of the transaction sender
131
- * @param secondarySignerAuthenticators The extra signers account Authenticators
132
- *
133
- * @returns A SignedTransaction
134
- */
135
- declare function generateMultiSignersSignedTransaction(transaction: MultiAgentRawTransaction | FeePayerRawTransaction, senderAuthenticator: AccountAuthenticator, feePayerAuthenticator?: AccountAuthenticator, additionalSignersAuthenticators?: Array<AccountAuthenticator>): Uint8Array;
136
126
  declare function generateSigningMessage(transaction: AnyRawTransaction): Uint8Array;
137
127
 
138
- export { buildTransaction, deriveTransactionType, generateMultiSignersSignedTransaction, generateRawTransaction, generateSignedTransaction, generateSignedTransactionForSimulation, generateSigningMessage, generateTransactionPayload, generateTransactionPayloadWithABI, generateUserTransactionHash, generateViewFunctionPayload, generateViewFunctionPayloadWithABI, getAuthenticatorForSimulation, hashValues, sign };
128
+ export { buildTransaction, deriveTransactionType, generateRawTransaction, generateSignedTransaction, generateSignedTransactionForSimulation, generateSigningMessage, generateTransactionPayload, generateTransactionPayloadWithABI, generateUserTransactionHash, generateViewFunctionPayload, generateViewFunctionPayloadWithABI, getAuthenticatorForSimulation, hashValues, sign };
@@ -1,2 +1,2 @@
1
- import{a,b,c,d,e,f,g,h,i,j,k,l,m,n,o}from"../../chunk-DJ5TUMIY.mjs";import"../../chunk-WFL6YWJS.mjs";import"../../chunk-KBRRTSF6.mjs";import"../../chunk-U43IJHQN.mjs";import"../../chunk-ICXA3DZH.mjs";import"../../chunk-WZNX3RBA.mjs";import"../../chunk-F5O5BBEK.mjs";import"../../chunk-UYVPNUH3.mjs";import"../../chunk-BGW77OLE.mjs";import"../../chunk-QM4UQVGB.mjs";import"../../chunk-2SPJ7XZB.mjs";import"../../chunk-DMKUAQB7.mjs";import"../../chunk-BWFJHFBQ.mjs";import"../../chunk-RHBCVCOS.mjs";import"../../chunk-DSTKXJMA.mjs";import"../../chunk-V6SPPOWX.mjs";import"../../chunk-6GZ5SUUK.mjs";import"../../chunk-LGVHYLN2.mjs";import"../../chunk-E7FWVXGX.mjs";import"../../chunk-MLWIHWNH.mjs";import"../../chunk-4QMXOWHP.mjs";import"../../chunk-UML2VQZT.mjs";import"../../chunk-Y5GRH4YJ.mjs";import"../../chunk-YZKDNVA5.mjs";import"../../chunk-H3NRKYG4.mjs";import"../../chunk-M3NK6GOI.mjs";import"../../chunk-UVSRX4SV.mjs";import"../../chunk-I2RHCBHM.mjs";import"../../chunk-5M7D6SXS.mjs";import"../../chunk-XRAL7KVT.mjs";import"../../chunk-KUX6GQ2E.mjs";import"../../chunk-MFFSJJSY.mjs";import"../../chunk-OATDMLDK.mjs";import"../../chunk-TJDC5PWD.mjs";import"../../chunk-LR65XHSF.mjs";import"../../chunk-WFZDFFBM.mjs";import"../../chunk-R5QUBEH6.mjs";import"../../chunk-FZY4PMEE.mjs";import"../../chunk-ZYYK3UXP.mjs";import"../../chunk-TBMAJ6AW.mjs";import"../../chunk-FS3NSGBF.mjs";import"../../chunk-QIAHBEEW.mjs";import"../../chunk-6IFMQ5AS.mjs";import"../../chunk-NPFNYP75.mjs";import"../../chunk-IOSQVDZI.mjs";import"../../chunk-52C73T26.mjs";import"../../chunk-AOCNYMMX.mjs";import"../../chunk-56CNRT2K.mjs";import"../../chunk-FBPNHF54.mjs";import"../../chunk-KECXKWWV.mjs";import"../../chunk-AH44UPM4.mjs";import"../../chunk-E7OPTWPP.mjs";import"../../chunk-S4SEFF4K.mjs";import"../../chunk-3JPVQHOR.mjs";import"../../chunk-N2FKVZ4D.mjs";import"../../chunk-3YCG7Y63.mjs";import"../../chunk-5RE43AX2.mjs";import"../../chunk-HHETZQ6D.mjs";import"../../chunk-CYDWEPFL.mjs";import"../../chunk-6FBKUTGF.mjs";import"../../chunk-OWW6SIDP.mjs";import"../../chunk-4WPQQPUF.mjs";import"../../chunk-MQXSU6GN.mjs";import"../../chunk-XDGQTMDV.mjs";import"../../chunk-CYNQRMO5.mjs";import"../../chunk-FVA2OPG4.mjs";export{f as buildTransaction,m as deriveTransactionType,n as generateMultiSignersSignedTransaction,e as generateRawTransaction,j as generateSignedTransaction,g as generateSignedTransactionForSimulation,o as generateSigningMessage,a as generateTransactionPayload,b as generateTransactionPayloadWithABI,l as generateUserTransactionHash,c as generateViewFunctionPayload,d as generateViewFunctionPayloadWithABI,h as getAuthenticatorForSimulation,k as hashValues,i as sign};
1
+ import{a,b,c,d,e,f,g,h,i,j,k,l,m,n}from"../../chunk-WBOLHLPX.mjs";import"../../chunk-PJLCPRYJ.mjs";import"../../chunk-U43IJHQN.mjs";import"../../chunk-FXNFWLQC.mjs";import"../../chunk-ICXA3DZH.mjs";import"../../chunk-UYVPNUH3.mjs";import"../../chunk-BAV4XY7C.mjs";import"../../chunk-QTRYMRYK.mjs";import"../../chunk-5OM4V4DR.mjs";import"../../chunk-TC3VVMPY.mjs";import"../../chunk-UPIN5AIO.mjs";import"../../chunk-OGHE4AQA.mjs";import"../../chunk-TGXZVNR5.mjs";import"../../chunk-DMKUAQB7.mjs";import"../../chunk-RHBCVCOS.mjs";import"../../chunk-DSTKXJMA.mjs";import"../../chunk-BWFJHFBQ.mjs";import"../../chunk-3QBZU5ZD.mjs";import"../../chunk-E7FWVXGX.mjs";import"../../chunk-MLWIHWNH.mjs";import"../../chunk-4QMXOWHP.mjs";import"../../chunk-UML2VQZT.mjs";import"../../chunk-PIOHC246.mjs";import"../../chunk-TQR7M73S.mjs";import"../../chunk-GNQXMS53.mjs";import"../../chunk-VNO4VHJN.mjs";import"../../chunk-UVSRX4SV.mjs";import"../../chunk-FO6ZKE7A.mjs";import"../../chunk-KUX6GQ2E.mjs";import"../../chunk-HQSLBTW5.mjs";import"../../chunk-3HV2C4SS.mjs";import"../../chunk-XLPVG4XR.mjs";import"../../chunk-GMQQSSEO.mjs";import"../../chunk-WFZDFFBM.mjs";import"../../chunk-R5QUBEH6.mjs";import"../../chunk-TJDC5PWD.mjs";import"../../chunk-LR65XHSF.mjs";import"../../chunk-YKVKSNH4.mjs";import"../../chunk-AH44UPM4.mjs";import"../../chunk-QWRH22H4.mjs";import"../../chunk-S4SEFF4K.mjs";import"../../chunk-N2FKVZ4D.mjs";import"../../chunk-KHOHRD2B.mjs";import"../../chunk-MNBYKY5P.mjs";import"../../chunk-B252RJCU.mjs";import"../../chunk-GED6IT3S.mjs";import"../../chunk-ROXFCLDT.mjs";import"../../chunk-6FBKUTGF.mjs";import"../../chunk-NPFNYP75.mjs";import"../../chunk-IOSQVDZI.mjs";import"../../chunk-XDGQTMDV.mjs";import"../../chunk-CYNQRMO5.mjs";import"../../chunk-IZT6OX3R.mjs";import"../../chunk-3JPVQHOR.mjs";import"../../chunk-FZY4PMEE.mjs";import"../../chunk-FS3NSGBF.mjs";import"../../chunk-QIAHBEEW.mjs";import"../../chunk-ZYYK3UXP.mjs";import"../../chunk-TBMAJ6AW.mjs";import"../../chunk-OWW6SIDP.mjs";import"../../chunk-4WPQQPUF.mjs";import"../../chunk-6IFMQ5AS.mjs";import"../../chunk-52C73T26.mjs";import"../../chunk-AOCNYMMX.mjs";import"../../chunk-FBPNHF54.mjs";import"../../chunk-56CNRT2K.mjs";import"../../chunk-FVA2OPG4.mjs";export{f as buildTransaction,m as deriveTransactionType,e as generateRawTransaction,j as generateSignedTransaction,g as generateSignedTransactionForSimulation,n as generateSigningMessage,a as generateTransactionPayload,b as generateTransactionPayloadWithABI,l as generateUserTransactionHash,c as generateViewFunctionPayload,d as generateViewFunctionPayloadWithABI,h as getAuthenticatorForSimulation,k as hashValues,i as sign};
2
2
  //# sourceMappingURL=transactionBuilder.mjs.map
@@ -1,2 +1,2 @@
1
- import{a,b,c,d,e,f,g,h,i,j,k,l,m,n,o,p,q,r,s}from"../../chunk-DMKUAQB7.mjs";import"../../chunk-DSTKXJMA.mjs";import"../../chunk-E7FWVXGX.mjs";import"../../chunk-MLWIHWNH.mjs";import"../../chunk-4QMXOWHP.mjs";import"../../chunk-UML2VQZT.mjs";import"../../chunk-Y5GRH4YJ.mjs";import"../../chunk-YZKDNVA5.mjs";import"../../chunk-H3NRKYG4.mjs";import"../../chunk-M3NK6GOI.mjs";import"../../chunk-UVSRX4SV.mjs";import"../../chunk-I2RHCBHM.mjs";import"../../chunk-5M7D6SXS.mjs";import"../../chunk-XRAL7KVT.mjs";import"../../chunk-KUX6GQ2E.mjs";import"../../chunk-MFFSJJSY.mjs";import"../../chunk-OATDMLDK.mjs";import"../../chunk-TJDC5PWD.mjs";import"../../chunk-LR65XHSF.mjs";import"../../chunk-WFZDFFBM.mjs";import"../../chunk-R5QUBEH6.mjs";import"../../chunk-FZY4PMEE.mjs";import"../../chunk-ZYYK3UXP.mjs";import"../../chunk-TBMAJ6AW.mjs";import"../../chunk-FS3NSGBF.mjs";import"../../chunk-QIAHBEEW.mjs";import"../../chunk-6IFMQ5AS.mjs";import"../../chunk-NPFNYP75.mjs";import"../../chunk-IOSQVDZI.mjs";import"../../chunk-52C73T26.mjs";import"../../chunk-AOCNYMMX.mjs";import"../../chunk-56CNRT2K.mjs";import"../../chunk-FBPNHF54.mjs";import"../../chunk-OWW6SIDP.mjs";import"../../chunk-4WPQQPUF.mjs";import"../../chunk-FVA2OPG4.mjs";export{o as StructTag,a as TypeTag,i as TypeTagAddress,b as TypeTagBool,l as TypeTagGeneric,k as TypeTagReference,j as TypeTagSigner,n as TypeTagStruct,g as TypeTagU128,d as TypeTagU16,h as TypeTagU256,e as TypeTagU32,f as TypeTagU64,c as TypeTagU8,m as TypeTagVector,p as aptosCoinStructTag,s as objectStructTag,r as optionStructTag,q as stringStructTag};
1
+ import{a,b,c,d,e,f,g,h,i,j,k,l,m,n,o,p,q,r,s}from"../../chunk-DMKUAQB7.mjs";import"../../chunk-DSTKXJMA.mjs";import"../../chunk-E7FWVXGX.mjs";import"../../chunk-MLWIHWNH.mjs";import"../../chunk-4QMXOWHP.mjs";import"../../chunk-UML2VQZT.mjs";import"../../chunk-PIOHC246.mjs";import"../../chunk-TQR7M73S.mjs";import"../../chunk-GNQXMS53.mjs";import"../../chunk-VNO4VHJN.mjs";import"../../chunk-UVSRX4SV.mjs";import"../../chunk-FO6ZKE7A.mjs";import"../../chunk-KUX6GQ2E.mjs";import"../../chunk-HQSLBTW5.mjs";import"../../chunk-3HV2C4SS.mjs";import"../../chunk-XLPVG4XR.mjs";import"../../chunk-GMQQSSEO.mjs";import"../../chunk-WFZDFFBM.mjs";import"../../chunk-R5QUBEH6.mjs";import"../../chunk-TJDC5PWD.mjs";import"../../chunk-LR65XHSF.mjs";import"../../chunk-NPFNYP75.mjs";import"../../chunk-IOSQVDZI.mjs";import"../../chunk-FZY4PMEE.mjs";import"../../chunk-FS3NSGBF.mjs";import"../../chunk-QIAHBEEW.mjs";import"../../chunk-ZYYK3UXP.mjs";import"../../chunk-TBMAJ6AW.mjs";import"../../chunk-OWW6SIDP.mjs";import"../../chunk-4WPQQPUF.mjs";import"../../chunk-6IFMQ5AS.mjs";import"../../chunk-52C73T26.mjs";import"../../chunk-AOCNYMMX.mjs";import"../../chunk-FBPNHF54.mjs";import"../../chunk-56CNRT2K.mjs";import"../../chunk-FVA2OPG4.mjs";export{o as StructTag,a as TypeTag,i as TypeTagAddress,b as TypeTagBool,l as TypeTagGeneric,k as TypeTagReference,j as TypeTagSigner,n as TypeTagStruct,g as TypeTagU128,d as TypeTagU16,h as TypeTagU256,e as TypeTagU32,f as TypeTagU64,c as TypeTagU8,m as TypeTagVector,p as aptosCoinStructTag,s as objectStructTag,r as optionStructTag,q as stringStructTag};
2
2
  //# sourceMappingURL=index.mjs.map
@@ -1,2 +1,2 @@
1
- import{a,b,c}from"../../chunk-U43IJHQN.mjs";import"../../chunk-DMKUAQB7.mjs";import"../../chunk-DSTKXJMA.mjs";import"../../chunk-E7FWVXGX.mjs";import"../../chunk-MLWIHWNH.mjs";import"../../chunk-4QMXOWHP.mjs";import"../../chunk-UML2VQZT.mjs";import"../../chunk-Y5GRH4YJ.mjs";import"../../chunk-YZKDNVA5.mjs";import"../../chunk-H3NRKYG4.mjs";import"../../chunk-M3NK6GOI.mjs";import"../../chunk-UVSRX4SV.mjs";import"../../chunk-I2RHCBHM.mjs";import"../../chunk-5M7D6SXS.mjs";import"../../chunk-XRAL7KVT.mjs";import"../../chunk-KUX6GQ2E.mjs";import"../../chunk-MFFSJJSY.mjs";import"../../chunk-OATDMLDK.mjs";import"../../chunk-TJDC5PWD.mjs";import"../../chunk-LR65XHSF.mjs";import"../../chunk-WFZDFFBM.mjs";import"../../chunk-R5QUBEH6.mjs";import"../../chunk-FZY4PMEE.mjs";import"../../chunk-ZYYK3UXP.mjs";import"../../chunk-TBMAJ6AW.mjs";import"../../chunk-FS3NSGBF.mjs";import"../../chunk-QIAHBEEW.mjs";import"../../chunk-6IFMQ5AS.mjs";import"../../chunk-NPFNYP75.mjs";import"../../chunk-IOSQVDZI.mjs";import"../../chunk-52C73T26.mjs";import"../../chunk-AOCNYMMX.mjs";import"../../chunk-56CNRT2K.mjs";import"../../chunk-FBPNHF54.mjs";import"../../chunk-OWW6SIDP.mjs";import"../../chunk-4WPQQPUF.mjs";import"../../chunk-FVA2OPG4.mjs";export{b as TypeTagParserError,a as TypeTagParserErrorType,c as parseTypeTag};
1
+ import{a,b,c}from"../../chunk-U43IJHQN.mjs";import"../../chunk-DMKUAQB7.mjs";import"../../chunk-DSTKXJMA.mjs";import"../../chunk-E7FWVXGX.mjs";import"../../chunk-MLWIHWNH.mjs";import"../../chunk-4QMXOWHP.mjs";import"../../chunk-UML2VQZT.mjs";import"../../chunk-PIOHC246.mjs";import"../../chunk-TQR7M73S.mjs";import"../../chunk-GNQXMS53.mjs";import"../../chunk-VNO4VHJN.mjs";import"../../chunk-UVSRX4SV.mjs";import"../../chunk-FO6ZKE7A.mjs";import"../../chunk-KUX6GQ2E.mjs";import"../../chunk-HQSLBTW5.mjs";import"../../chunk-3HV2C4SS.mjs";import"../../chunk-XLPVG4XR.mjs";import"../../chunk-GMQQSSEO.mjs";import"../../chunk-WFZDFFBM.mjs";import"../../chunk-R5QUBEH6.mjs";import"../../chunk-TJDC5PWD.mjs";import"../../chunk-LR65XHSF.mjs";import"../../chunk-NPFNYP75.mjs";import"../../chunk-IOSQVDZI.mjs";import"../../chunk-FZY4PMEE.mjs";import"../../chunk-FS3NSGBF.mjs";import"../../chunk-QIAHBEEW.mjs";import"../../chunk-ZYYK3UXP.mjs";import"../../chunk-TBMAJ6AW.mjs";import"../../chunk-OWW6SIDP.mjs";import"../../chunk-4WPQQPUF.mjs";import"../../chunk-6IFMQ5AS.mjs";import"../../chunk-52C73T26.mjs";import"../../chunk-AOCNYMMX.mjs";import"../../chunk-FBPNHF54.mjs";import"../../chunk-56CNRT2K.mjs";import"../../chunk-FVA2OPG4.mjs";export{b as TypeTagParserError,a as TypeTagParserErrorType,c as parseTypeTag};
2
2
  //# sourceMappingURL=parser.mjs.map
@@ -1,2 +1,11 @@
1
1
  export { Network, NetworkToChainId, NetworkToFaucetAPI, NetworkToIndexerAPI, NetworkToNetworkName, NetworkToNodeAPI } from './apiEndpoints.mjs';
2
2
  export { APTOS_COIN, AptosApiType, DEFAULT_MAX_GAS_AMOUNT, DEFAULT_TXN_EXP_SEC_FROM_NOW, DEFAULT_TXN_TIMEOUT_SEC, ProcessorType, RAW_TRANSACTION_SALT, RAW_TRANSACTION_WITH_DATA_SALT } from './const.mjs';
3
+ export { DeserializableClass, normalizeBundle } from './normalizeBundle.mjs';
4
+ import '../bcs/deserializer.mjs';
5
+ import '../types/index.mjs';
6
+ import '../types/indexer.mjs';
7
+ import '../types/generated/operations.mjs';
8
+ import '../types/generated/types.mjs';
9
+ import '../bcs/serializer.mjs';
10
+ import '../core/hex.mjs';
11
+ import '../core/common.mjs';
@@ -1,2 +1,2 @@
1
- import"../chunk-CYDWEPFL.mjs";import{a,b,c,d,e,f}from"../chunk-XDGQTMDV.mjs";import{a as g,b as h,c as i,d as j,e as k,f as l,g as m,h as n}from"../chunk-CYNQRMO5.mjs";import"../chunk-FVA2OPG4.mjs";export{k as APTOS_COIN,g as AptosApiType,h as DEFAULT_MAX_GAS_AMOUNT,i as DEFAULT_TXN_EXP_SEC_FROM_NOW,j as DEFAULT_TXN_TIMEOUT_SEC,d as Network,e as NetworkToChainId,c as NetworkToFaucetAPI,a as NetworkToIndexerAPI,f as NetworkToNetworkName,b as NetworkToNodeAPI,n as ProcessorType,l as RAW_TRANSACTION_SALT,m as RAW_TRANSACTION_WITH_DATA_SALT};
1
+ import"../chunk-GED6IT3S.mjs";import{a as o}from"../chunk-ROXFCLDT.mjs";import{a,b,c,d,e,f}from"../chunk-XDGQTMDV.mjs";import{a as g,b as h,c as i,d as j,e as k,f as l,g as m,h as n}from"../chunk-CYNQRMO5.mjs";import"../chunk-FZY4PMEE.mjs";import"../chunk-FS3NSGBF.mjs";import"../chunk-QIAHBEEW.mjs";import"../chunk-ZYYK3UXP.mjs";import"../chunk-TBMAJ6AW.mjs";import"../chunk-OWW6SIDP.mjs";import"../chunk-4WPQQPUF.mjs";import"../chunk-6IFMQ5AS.mjs";import"../chunk-52C73T26.mjs";import"../chunk-AOCNYMMX.mjs";import"../chunk-FBPNHF54.mjs";import"../chunk-56CNRT2K.mjs";import"../chunk-FVA2OPG4.mjs";export{k as APTOS_COIN,g as AptosApiType,h as DEFAULT_MAX_GAS_AMOUNT,i as DEFAULT_TXN_EXP_SEC_FROM_NOW,j as DEFAULT_TXN_TIMEOUT_SEC,d as Network,e as NetworkToChainId,c as NetworkToFaucetAPI,a as NetworkToIndexerAPI,f as NetworkToNetworkName,b as NetworkToNodeAPI,n as ProcessorType,l as RAW_TRANSACTION_SALT,m as RAW_TRANSACTION_WITH_DATA_SALT,o as normalizeBundle};
2
2
  //# sourceMappingURL=index.mjs.map
@@ -0,0 +1,23 @@
1
+ import { Deserializer } from '../bcs/deserializer.mjs';
2
+ import { Serializable } from '../bcs/serializer.mjs';
3
+ import '../types/index.mjs';
4
+ import './apiEndpoints.mjs';
5
+ import '../types/indexer.mjs';
6
+ import '../types/generated/operations.mjs';
7
+ import '../types/generated/types.mjs';
8
+ import '../core/hex.mjs';
9
+ import '../core/common.mjs';
10
+
11
+ type DeserializableClass<T extends Serializable> = {
12
+ deserialize(deserializer: Deserializer): T;
13
+ };
14
+ /**
15
+ * Utility function that serializes and deserialize an object back into the same bundle as the sdk.
16
+ * This is a workaround to have the `instanceof` operator work when input objects come from a different
17
+ * bundle.
18
+ * @param cls The class of the object to normalize
19
+ * @param value the instance to normalize
20
+ */
21
+ declare function normalizeBundle<T extends Serializable>(cls: DeserializableClass<T>, value: T): T;
22
+
23
+ export { type DeserializableClass, normalizeBundle };
@@ -0,0 +1,2 @@
1
+ import{a}from"../chunk-ROXFCLDT.mjs";import"../chunk-FZY4PMEE.mjs";import"../chunk-FS3NSGBF.mjs";import"../chunk-QIAHBEEW.mjs";import"../chunk-ZYYK3UXP.mjs";import"../chunk-TBMAJ6AW.mjs";import"../chunk-OWW6SIDP.mjs";import"../chunk-4WPQQPUF.mjs";import"../chunk-6IFMQ5AS.mjs";import"../chunk-52C73T26.mjs";import"../chunk-AOCNYMMX.mjs";import"../chunk-FBPNHF54.mjs";import"../chunk-56CNRT2K.mjs";import"../chunk-FVA2OPG4.mjs";export{a as normalizeBundle};
2
+ //# sourceMappingURL=normalizeBundle.mjs.map
@@ -0,0 +1 @@
1
+ {"version":3,"sources":[],"sourcesContent":[],"mappings":"","names":[]}
@@ -3,6 +3,6 @@
3
3
  *
4
4
  * hardcoded for now, we would want to have it injected dynamically
5
5
  */
6
- declare const VERSION = "1.13.1";
6
+ declare const VERSION = "1.13.2";
7
7
 
8
8
  export { VERSION };
@@ -1,2 +1,2 @@
1
- import{a}from"./chunk-MQXSU6GN.mjs";import"./chunk-FVA2OPG4.mjs";export{a as VERSION};
1
+ import{a}from"./chunk-IZT6OX3R.mjs";import"./chunk-FVA2OPG4.mjs";export{a as VERSION};
2
2
  //# sourceMappingURL=version.mjs.map
package/package.json CHANGED
@@ -48,6 +48,7 @@
48
48
  },
49
49
  "dependencies": {
50
50
  "@aptos-labs/aptos-client": "^0.1.0",
51
+ "@aptos-labs/aptos-cli": "^0.1.2",
51
52
  "@noble/curves": "^1.4.0",
52
53
  "@noble/hashes": "^1.4.0",
53
54
  "@scure/bip32": "^1.4.0",
@@ -56,7 +57,6 @@
56
57
  "eventemitter3": "^5.0.1"
57
58
  },
58
59
  "devDependencies": {
59
- "@aptos-labs/aptos-cli": "^0.1.2",
60
60
  "@babel/traverse": "^7.23.6",
61
61
  "@graphql-codegen/cli": "^5.0.0",
62
62
  "@graphql-codegen/import-types-preset": "^3.0.0",
@@ -85,5 +85,5 @@
85
85
  "typedoc": "^0.25.4",
86
86
  "typescript": "^5.3.3"
87
87
  },
88
- "version": "1.13.1"
88
+ "version": "1.13.2"
89
89
  }
@@ -23,13 +23,14 @@ import {
23
23
  RAW_TRANSACTION_SALT,
24
24
  RAW_TRANSACTION_WITH_DATA_SALT,
25
25
  } from "../../utils/const";
26
+ import { normalizeBundle } from "../../utils/normalizeBundle";
26
27
  import {
27
28
  AccountAuthenticator,
28
29
  AccountAuthenticatorEd25519,
29
- AccountAuthenticatorMultiKey,
30
30
  AccountAuthenticatorSingleKey,
31
31
  } from "../authenticator/account";
32
32
  import {
33
+ TransactionAuthenticator,
33
34
  TransactionAuthenticatorEd25519,
34
35
  TransactionAuthenticatorFeePayer,
35
36
  TransactionAuthenticatorMultiAgent,
@@ -295,9 +296,8 @@ export async function generateRawTransaction(args: {
295
296
 
296
297
  const { maxGasAmount, gasUnitPrice, expireTimestamp } = {
297
298
  maxGasAmount: options?.maxGasAmount ? BigInt(options.maxGasAmount) : BigInt(DEFAULT_MAX_GAS_AMOUNT),
298
- gasUnitPrice: BigInt(gasEstimate),
299
- expireTimestamp: BigInt(Math.floor(Date.now() / 1000) + DEFAULT_TXN_EXP_SEC_FROM_NOW),
300
- ...options,
299
+ gasUnitPrice: options?.gasUnitPrice ?? BigInt(gasEstimate),
300
+ expireTimestamp: options?.expireTimestamp ?? BigInt(Math.floor(Date.now() / 1000) + DEFAULT_TXN_EXP_SEC_FROM_NOW),
301
301
  };
302
302
 
303
303
  return new RawTransaction(
@@ -494,45 +494,44 @@ export function sign(args: { signer: Account; transaction: AnyRawTransaction }):
494
494
  * @returns A SignedTransaction
495
495
  */
496
496
  export function generateSignedTransaction(args: InputSubmitTransactionData): Uint8Array {
497
- const { transaction, senderAuthenticator, feePayerAuthenticator, additionalSignersAuthenticators } = args;
497
+ const { transaction, feePayerAuthenticator, additionalSignersAuthenticators } = args;
498
+ const senderAuthenticator = normalizeBundle(AccountAuthenticator, args.senderAuthenticator);
498
499
 
499
- const transactionToSubmit = deriveTransactionType(transaction);
500
-
501
- if (
502
- (feePayerAuthenticator || additionalSignersAuthenticators) &&
503
- (transactionToSubmit instanceof MultiAgentRawTransaction || transactionToSubmit instanceof FeePayerRawTransaction)
504
- ) {
505
- return generateMultiSignersSignedTransaction(
506
- transactionToSubmit,
500
+ let txnAuthenticator: TransactionAuthenticator;
501
+ if (transaction.feePayerAddress) {
502
+ if (!feePayerAuthenticator) {
503
+ throw new Error("Must provide a feePayerAuthenticator argument to generate a signed fee payer transaction");
504
+ }
505
+ txnAuthenticator = new TransactionAuthenticatorFeePayer(
507
506
  senderAuthenticator,
508
- feePayerAuthenticator,
507
+ transaction.secondarySignerAddresses ?? [],
508
+ additionalSignersAuthenticators ?? [],
509
+ {
510
+ address: transaction.feePayerAddress,
511
+ authenticator: feePayerAuthenticator,
512
+ },
513
+ );
514
+ } else if (transaction.secondarySignerAddresses) {
515
+ if (!additionalSignersAuthenticators) {
516
+ throw new Error(
517
+ "Must provide a additionalSignersAuthenticators argument to generate a signed multi agent transaction",
518
+ );
519
+ }
520
+ txnAuthenticator = new TransactionAuthenticatorMultiAgent(
521
+ senderAuthenticator,
522
+ transaction.secondarySignerAddresses,
509
523
  additionalSignersAuthenticators,
510
524
  );
511
- }
512
-
513
- // submit single signer transaction
514
-
515
- // check what instance is accountAuthenticator
516
- if (senderAuthenticator instanceof AccountAuthenticatorEd25519 && transactionToSubmit instanceof RawTransaction) {
517
- const transactionAuthenticator = new TransactionAuthenticatorEd25519(
525
+ } else if (senderAuthenticator instanceof AccountAuthenticatorEd25519) {
526
+ txnAuthenticator = new TransactionAuthenticatorEd25519(
518
527
  senderAuthenticator.public_key,
519
528
  senderAuthenticator.signature,
520
529
  );
521
- return new SignedTransaction(transactionToSubmit, transactionAuthenticator).bcsToBytes();
522
- }
523
-
524
- if (
525
- (senderAuthenticator instanceof AccountAuthenticatorSingleKey ||
526
- senderAuthenticator instanceof AccountAuthenticatorMultiKey) &&
527
- transactionToSubmit instanceof RawTransaction
528
- ) {
529
- const transactionAuthenticator = new TransactionAuthenticatorSingleSender(senderAuthenticator);
530
- return new SignedTransaction(transactionToSubmit, transactionAuthenticator).bcsToBytes();
530
+ } else {
531
+ txnAuthenticator = new TransactionAuthenticatorSingleSender(senderAuthenticator);
531
532
  }
532
533
 
533
- throw new Error(
534
- `Cannot generate a signed transaction, ${senderAuthenticator} is not a supported account authentication scheme`,
535
- );
534
+ return new SignedTransaction(transaction.rawTransaction, txnAuthenticator).bcsToBytes();
536
535
  }
537
536
 
538
537
  /**
@@ -587,55 +586,6 @@ export function deriveTransactionType(transaction: AnyRawTransaction): AnyRawTra
587
586
  return transaction.rawTransaction;
588
587
  }
589
588
 
590
- /**
591
- * Generate a multi signers signed transaction that can be submitted to chain
592
- *
593
- * @param transaction MultiAgentRawTransaction | FeePayerRawTransaction
594
- * @param senderAuthenticator The account authenticator of the transaction sender
595
- * @param secondarySignerAuthenticators The extra signers account Authenticators
596
- *
597
- * @returns A SignedTransaction
598
- */
599
- export function generateMultiSignersSignedTransaction(
600
- transaction: MultiAgentRawTransaction | FeePayerRawTransaction,
601
- senderAuthenticator: AccountAuthenticator,
602
- feePayerAuthenticator?: AccountAuthenticator,
603
- additionalSignersAuthenticators?: Array<AccountAuthenticator>,
604
- ) {
605
- if (transaction instanceof FeePayerRawTransaction) {
606
- if (!feePayerAuthenticator) {
607
- throw new Error("Must provide a feePayerAuthenticator argument to generate a signed fee payer transaction");
608
- }
609
- const txAuthenticatorFeePayer = new TransactionAuthenticatorFeePayer(
610
- senderAuthenticator,
611
- transaction.secondary_signer_addresses,
612
- additionalSignersAuthenticators ?? [],
613
- {
614
- address: transaction.fee_payer_address,
615
- authenticator: feePayerAuthenticator,
616
- },
617
- );
618
- return new SignedTransaction(transaction.raw_txn, txAuthenticatorFeePayer).bcsToBytes();
619
- }
620
- if (transaction instanceof MultiAgentRawTransaction) {
621
- if (!additionalSignersAuthenticators) {
622
- throw new Error(
623
- "Must provide a additionalSignersAuthenticators argument to generate a signed multi agent transaction",
624
- );
625
- }
626
- const multiAgentAuthenticator = new TransactionAuthenticatorMultiAgent(
627
- senderAuthenticator,
628
- transaction.secondary_signer_addresses,
629
- additionalSignersAuthenticators ?? [],
630
- );
631
- return new SignedTransaction(transaction.raw_txn, multiAgentAuthenticator).bcsToBytes();
632
- }
633
-
634
- throw new Error(
635
- `Cannot prepare multi signers transaction to submission, ${typeof transaction} transaction is not supported`,
636
- );
637
- }
638
-
639
589
  export function generateSigningMessage(transaction: AnyRawTransaction): Uint8Array {
640
590
  const rawTxn = deriveTransactionType(transaction);
641
591
  const hash = sha3Hash.create();
@@ -1,2 +1,3 @@
1
1
  export * from "./apiEndpoints";
2
2
  export * from "./const";
3
+ export * from "./normalizeBundle";
@@ -0,0 +1,21 @@
1
+ // Copyright © Aptos Foundation
2
+ // SPDX-License-Identifier: Apache-2.0
3
+
4
+ import { Deserializer, Serializable } from "../bcs";
5
+
6
+ export type DeserializableClass<T extends Serializable> = {
7
+ deserialize(deserializer: Deserializer): T;
8
+ };
9
+
10
+ /**
11
+ * Utility function that serializes and deserialize an object back into the same bundle as the sdk.
12
+ * This is a workaround to have the `instanceof` operator work when input objects come from a different
13
+ * bundle.
14
+ * @param cls The class of the object to normalize
15
+ * @param value the instance to normalize
16
+ */
17
+ export function normalizeBundle<T extends Serializable>(cls: DeserializableClass<T>, value: T) {
18
+ const serializedBytes = value.bcsToBytes();
19
+ const deserializer = new Deserializer(serializedBytes);
20
+ return cls.deserialize(deserializer);
21
+ }
package/src/version.ts CHANGED
@@ -6,4 +6,4 @@
6
6
  *
7
7
  * hardcoded for now, we would want to have it injected dynamically
8
8
  */
9
- export const VERSION = "1.13.1";
9
+ export const VERSION = "1.13.2";
@@ -1 +0,0 @@
1
- //# sourceMappingURL=chunk-CYDWEPFL.mjs.map
@@ -1,2 +0,0 @@
1
- import{a as M,c as tn,d as en,e as N}from"./chunk-WFL6YWJS.mjs";import{q as nn,t as l}from"./chunk-KBRRTSF6.mjs";import{a as A}from"./chunk-WZNX3RBA.mjs";import{a as Y}from"./chunk-F5O5BBEK.mjs";import{a as an}from"./chunk-BGW77OLE.mjs";import{a as p,c as f,d as m}from"./chunk-QM4UQVGB.mjs";import{c as X,d as z,e as Z,f as $,g as j,h as J,i as Q}from"./chunk-2SPJ7XZB.mjs";import{a as L}from"./chunk-BWFJHFBQ.mjs";import{b as F,d as R,e as _,f as D}from"./chunk-6GZ5SUUK.mjs";import{a as K}from"./chunk-LGVHYLN2.mjs";import{b as w,d as g,e as v}from"./chunk-M3NK6GOI.mjs";import{a as O,b as E}from"./chunk-XRAL7KVT.mjs";import{a as G,c as k}from"./chunk-MFFSJJSY.mjs";import{a as x,c as B}from"./chunk-OATDMLDK.mjs";import{b as u}from"./chunk-IOSQVDZI.mjs";import{b}from"./chunk-AOCNYMMX.mjs";import{b as H}from"./chunk-KECXKWWV.mjs";import{a as q}from"./chunk-AH44UPM4.mjs";import{a as V}from"./chunk-E7OPTWPP.mjs";import{e as P}from"./chunk-XDGQTMDV.mjs";import{b as W,c as U,f as C,g as S}from"./chunk-CYNQRMO5.mjs";import{sha3_256 as rn}from"@noble/hashes/sha3";async function qn(n){if(nn(n))return yn(n);let{moduleAddress:e,moduleName:t,functionName:o}=l(n.function),r=await cn({key:"entry-function",moduleAddress:e,moduleName:t,functionName:o,aptosConfig:n.aptosConfig,abi:n.abi,fetch:tn});return fn({...n,abi:r})}function fn(n){let e=n.abi,{moduleAddress:t,moduleName:o,functionName:r}=l(n.function),a=M(n.typeArguments);if(a.length!==e.typeParameters.length)throw new Error(`Type argument count mismatch, expected ${e.typeParameters.length}, received ${a.length}`);let i=n.functionArguments.map((s,d)=>N(n.function,e,s,d,a));if(i.length!==e.parameters.length)throw new Error(`Too few arguments for '${t}::${o}::${r}', expected ${e.parameters.length} but got ${i.length}`);let c=$.build(`${t}::${o}`,r,a,i);if("multisigAddress"in n){let s=u.from(n.multisigAddress);return new Z(new J(s,new Q(c)))}return new z(c)}async function Kn(n){let{moduleAddress:e,moduleName:t,functionName:o}=l(n.function),r=await cn({key:"view-function",moduleAddress:e,moduleName:t,functionName:o,aptosConfig:n.aptosConfig,abi:n.abi,fetch:en});return mn({abi:r,...n})}function mn(n){let e=n.abi,{moduleAddress:t,moduleName:o,functionName:r}=l(n.function),a=M(n.typeArguments);if(a.length!==e.typeParameters.length)throw new Error(`Type argument count mismatch, expected ${e.typeParameters.length}, received ${a.length}`);let i=n?.functionArguments?.map((c,s)=>N(n.function,e,c,s,a))??[];if(i.length!==e.parameters.length)throw new Error(`Too few arguments for '${t}::${o}::${r}', expected ${e.parameters.length} but got ${i.length}`);return $.build(`${t}::${o}`,r,a,i)}function yn(n){return new X(new j(b.fromHexInput(n.bytecode).toUint8Array(),n.typeArguments??[],n.functionArguments))}async function gn(n){let{aptosConfig:e,sender:t,payload:o,options:r,feePayerAddress:a}=n,i=async()=>P[e.network]?{chainId:P[e.network]}:{chainId:(await V({aptosConfig:e})).chain_id},c=async()=>r?.gasUnitPrice?{gasEstimate:r.gasUnitPrice}:{gasEstimate:(await H({aptosConfig:e})).gas_estimate},s=async()=>{let T=async()=>r?.accountSequenceNumber!==void 0?r.accountSequenceNumber:(await K({aptosConfig:e,accountAddress:t})).sequence_number;if(a&&u.from(a).equals(u.ZERO))try{return await T()}catch{return 0}else return T()},[{chainId:d},{gasEstimate:y},I]=await Promise.all([i(),c(),s()]),{maxGasAmount:un,gasUnitPrice:An,expireTimestamp:dn}={maxGasAmount:r?.maxGasAmount?BigInt(r.maxGasAmount):BigInt(2e5),gasUnitPrice:BigInt(y),expireTimestamp:BigInt(Math.floor(Date.now()/1e3)+20),...r};return new p(u.from(t),BigInt(I),o,BigInt(un),BigInt(An),BigInt(dn),new L(d))}async function Hn(n){let{aptosConfig:e,sender:t,payload:o,options:r,feePayerAddress:a}=n,i=await gn({aptosConfig:e,sender:t,payload:o,options:r,feePayerAddress:a});if("secondarySignerAddresses"in n){let c=n.secondarySignerAddresses?.map(s=>u.from(s))??[];return new an(i,c,n.feePayerAddress?u.from(n.feePayerAddress):void 0)}return new Y(i,n.feePayerAddress?u.from(n.feePayerAddress):void 0)}function Ln(n){let{signerPublicKey:e,transaction:t,secondarySignersPublicKeys:o,feePayerPublicKey:r}=n,a=h(e);if(t.feePayerAddress){let c=new m(t.rawTransaction,t.secondarySignerAddresses??[],t.feePayerAddress),s=[];o&&(s=o.map(I=>h(I)));let d=h(r),y=new _(a,t.secondarySignerAddresses??[],s,{address:t.feePayerAddress,authenticator:d});return new A(c.raw_txn,y).bcsToBytes()}if(t.secondarySignerAddresses){let c=new f(t.rawTransaction,t.secondarySignerAddresses),s=[];s=o.map(y=>h(y));let d=new R(a,t.secondarySignerAddresses,s);return new A(c.raw_txn,d).bcsToBytes()}let i;if(a instanceof w)i=new F(a.public_key,a.signature);else if(a instanceof g)i=new D(a);else throw new Error("Invalid public key");return new A(t.rawTransaction,i).bcsToBytes()}function h(n){if(n instanceof O){if(n.publicKey instanceof x)return new g(n,new E(new B(new Uint8Array(64))));if(n.publicKey instanceof G)return new g(n,new E(new k(new Uint8Array(64))))}return new w(new x(n.toUint8Array()),new B(new Uint8Array(64)))}function Xn(n){let{signer:e,transaction:t}=n,o=wn(t);return e.signWithAuthenticator(o)}function pn(n){let{transaction:e,senderAuthenticator:t,feePayerAuthenticator:o,additionalSignersAuthenticators:r}=n,a=sn(e);if((o||r)&&(a instanceof f||a instanceof m))return Tn(a,t,o,r);if(t instanceof w&&a instanceof p){let i=new F(t.public_key,t.signature);return new A(a,i).bcsToBytes()}if((t instanceof g||t instanceof v)&&a instanceof p){let i=new D(t);return new A(a,i).bcsToBytes()}throw new Error(`Cannot generate a signed transaction, ${t} is not a supported account authentication scheme`)}function on(n){let e=rn.create();for(let t of n)e.update(t);return e.digest()}var ln=on(["APTOS::Transaction"]);function zn(n){let e=pn(n);return new b(on([ln,new Uint8Array([0]),e])).toString()}function sn(n){return n.feePayerAddress?new m(n.rawTransaction,n.secondarySignerAddresses??[],n.feePayerAddress):n.secondarySignerAddresses?new f(n.rawTransaction,n.secondarySignerAddresses):n.rawTransaction}function Tn(n,e,t,o){if(n instanceof m){if(!t)throw new Error("Must provide a feePayerAuthenticator argument to generate a signed fee payer transaction");let r=new _(e,n.secondary_signer_addresses,o??[],{address:n.fee_payer_address,authenticator:t});return new A(n.raw_txn,r).bcsToBytes()}if(n instanceof f){if(!o)throw new Error("Must provide a additionalSignersAuthenticators argument to generate a signed multi agent transaction");let r=new R(e,n.secondary_signer_addresses,o??[]);return new A(n.raw_txn,r).bcsToBytes()}throw new Error(`Cannot prepare multi signers transaction to submission, ${typeof n} transaction is not supported`)}function wn(n){let e=sn(n),t=rn.create();if(e instanceof p)t.update(C);else if(e instanceof f)t.update(S);else if(e instanceof m)t.update(S);else throw new Error(`Unknown transaction type to sign on: ${e}`);let o=t.digest(),r=e.bcsToBytes(),a=new Uint8Array(o.length+r.length);return a.set(o),a.set(r,o.length),a}async function cn({key:n,moduleAddress:e,moduleName:t,functionName:o,aptosConfig:r,abi:a,fetch:i}){return a!==void 0?a:q(async()=>i(e,t,o,r),`${n}-${r.network}-${e}-${t}-${o}`,1e3*60*5)()}export{qn as a,fn as b,Kn as c,mn as d,gn as e,Hn as f,Ln as g,h,Xn as i,pn as j,on as k,zn as l,sn as m,Tn as n,wn as o};
2
- //# sourceMappingURL=chunk-DJ5TUMIY.mjs.map
@@ -1 +0,0 @@
1
- {"version":3,"sources":["../../src/transactions/transactionBuilder/transactionBuilder.ts"],"sourcesContent":["// Copyright © Aptos Foundation\n// SPDX-License-Identifier: Apache-2.0\n\n/**\n * This file handles the transaction creation lifecycle.\n * It holds different operations to generate a transaction payload, a raw transaction,\n * and a signed transaction that can be simulated, signed and submitted to chain.\n */\nimport { sha3_256 as sha3Hash } from \"@noble/hashes/sha3\";\nimport { AptosConfig } from \"../../api/aptosConfig\";\nimport { AccountAddress, AccountAddressInput, Hex, PublicKey } from \"../../core\";\nimport { Account } from \"../../core/account\";\nimport { AnyPublicKey, AnySignature } from \"../../core/crypto\";\nimport { Ed25519PublicKey, Ed25519Signature } from \"../../core/crypto/ed25519\";\nimport { Secp256k1PublicKey, Secp256k1Signature } from \"../../core/crypto/secp256k1\";\nimport { getInfo } from \"../../internal/account\";\nimport { getLedgerInfo } from \"../../internal/general\";\nimport { getGasPriceEstimation } from \"../../internal/transaction\";\nimport { NetworkToChainId } from \"../../utils/apiEndpoints\";\nimport {\n DEFAULT_MAX_GAS_AMOUNT,\n DEFAULT_TXN_EXP_SEC_FROM_NOW,\n RAW_TRANSACTION_SALT,\n RAW_TRANSACTION_WITH_DATA_SALT,\n} from \"../../utils/const\";\nimport {\n AccountAuthenticator,\n AccountAuthenticatorEd25519,\n AccountAuthenticatorMultiKey,\n AccountAuthenticatorSingleKey,\n} from \"../authenticator/account\";\nimport {\n TransactionAuthenticatorEd25519,\n TransactionAuthenticatorFeePayer,\n TransactionAuthenticatorMultiAgent,\n TransactionAuthenticatorSingleSender,\n} from \"../authenticator/transaction\";\nimport {\n ChainId,\n EntryFunction,\n FeePayerRawTransaction,\n MultiAgentRawTransaction,\n MultiSig,\n MultiSigTransactionPayload,\n RawTransaction,\n Script,\n TransactionPayloadEntryFunction,\n TransactionPayloadMultiSig,\n TransactionPayloadScript,\n} from \"../instances\";\nimport { SignedTransaction } from \"../instances/signedTransaction\";\nimport {\n AnyRawTransaction,\n AnyTransactionPayloadInstance,\n AnyRawTransactionInstance,\n EntryFunctionArgumentTypes,\n InputGenerateMultiAgentRawTransactionArgs,\n InputGenerateRawTransactionArgs,\n InputGenerateSingleSignerRawTransactionArgs,\n InputGenerateTransactionOptions,\n InputScriptData,\n InputSimulateTransactionData,\n InputMultiSigDataWithRemoteABI,\n InputEntryFunctionDataWithRemoteABI,\n InputGenerateTransactionPayloadDataWithRemoteABI,\n InputSubmitTransactionData,\n InputGenerateTransactionPayloadDataWithABI,\n InputEntryFunctionDataWithABI,\n InputMultiSigDataWithABI,\n InputViewFunctionDataWithRemoteABI,\n InputViewFunctionDataWithABI,\n FunctionABI,\n} from \"../types\";\nimport { convertArgument, fetchEntryFunctionAbi, fetchViewFunctionAbi, standardizeTypeTags } from \"./remoteAbi\";\nimport { memoizeAsync } from \"../../utils/memoize\";\nimport { getFunctionParts, isScriptDataInput } from \"./helpers\";\nimport { SimpleTransaction } from \"../instances/simpleTransaction\";\nimport { MultiAgentTransaction } from \"../instances/multiAgentTransaction\";\n\n/**\n * We are defining function signatures, each with its specific input and output.\n * These are the possible function signature for our `generateTransactionPayload` function.\n * When we call our `generateTransactionPayload` function with the relevant type properties,\n * Typescript can infer the return type based on the appropriate function overload.\n */\nexport async function generateTransactionPayload(args: InputScriptData): Promise<TransactionPayloadScript>;\nexport async function generateTransactionPayload(\n args: InputEntryFunctionDataWithRemoteABI,\n): Promise<TransactionPayloadEntryFunction>;\nexport async function generateTransactionPayload(\n args: InputMultiSigDataWithRemoteABI,\n): Promise<TransactionPayloadMultiSig>;\n\n/**\n * Builds a transaction payload based on the data argument and returns\n * a transaction payload - TransactionPayloadScript | TransactionPayloadMultiSig | TransactionPayloadEntryFunction\n *\n * This uses the RemoteABI by default, and the remote ABI can be skipped by using generateTransactionPayloadWithABI\n *\n * @param args.data GenerateTransactionPayloadData\n *\n * @return TransactionPayload\n */\nexport async function generateTransactionPayload(\n args: InputGenerateTransactionPayloadDataWithRemoteABI,\n): Promise<AnyTransactionPayloadInstance> {\n if (isScriptDataInput(args)) {\n return generateTransactionPayloadScript(args);\n }\n const { moduleAddress, moduleName, functionName } = getFunctionParts(args.function);\n\n const functionAbi = await fetchAbi({\n key: \"entry-function\",\n moduleAddress,\n moduleName,\n functionName,\n aptosConfig: args.aptosConfig,\n abi: args.abi,\n fetch: fetchEntryFunctionAbi,\n });\n\n // Fill in the ABI\n return generateTransactionPayloadWithABI({ ...args, abi: functionAbi });\n}\n\nexport function generateTransactionPayloadWithABI(args: InputEntryFunctionDataWithABI): TransactionPayloadEntryFunction;\nexport function generateTransactionPayloadWithABI(args: InputMultiSigDataWithABI): TransactionPayloadMultiSig;\nexport function generateTransactionPayloadWithABI(\n args: InputGenerateTransactionPayloadDataWithABI,\n): AnyTransactionPayloadInstance {\n const functionAbi = args.abi;\n const { moduleAddress, moduleName, functionName } = getFunctionParts(args.function);\n\n // Ensure that all type arguments are typed properly\n const typeArguments = standardizeTypeTags(args.typeArguments);\n\n // Check the type argument count against the ABI\n if (typeArguments.length !== functionAbi.typeParameters.length) {\n throw new Error(\n `Type argument count mismatch, expected ${functionAbi.typeParameters.length}, received ${typeArguments.length}`,\n );\n }\n\n // Check all BCS types, and convert any non-BCS types\n const functionArguments: Array<EntryFunctionArgumentTypes> = args.functionArguments.map((arg, i) =>\n convertArgument(args.function, functionAbi, arg, i, typeArguments),\n );\n\n // Check that all arguments are accounted for\n if (functionArguments.length !== functionAbi.parameters.length) {\n throw new Error(\n // eslint-disable-next-line max-len\n `Too few arguments for '${moduleAddress}::${moduleName}::${functionName}', expected ${functionAbi.parameters.length} but got ${functionArguments.length}`,\n );\n }\n\n // Generate entry function payload\n const entryFunctionPayload = EntryFunction.build(\n `${moduleAddress}::${moduleName}`,\n functionName,\n typeArguments,\n functionArguments,\n );\n\n // Send it as multi sig if it's a multisig payload\n if (\"multisigAddress\" in args) {\n const multisigAddress = AccountAddress.from(args.multisigAddress);\n return new TransactionPayloadMultiSig(\n new MultiSig(multisigAddress, new MultiSigTransactionPayload(entryFunctionPayload)),\n );\n }\n\n // Otherwise send as an entry function\n return new TransactionPayloadEntryFunction(entryFunctionPayload);\n}\n\nexport async function generateViewFunctionPayload(args: InputViewFunctionDataWithRemoteABI): Promise<EntryFunction> {\n const { moduleAddress, moduleName, functionName } = getFunctionParts(args.function);\n\n const functionAbi = await fetchAbi({\n key: \"view-function\",\n moduleAddress,\n moduleName,\n functionName,\n aptosConfig: args.aptosConfig,\n abi: args.abi,\n fetch: fetchViewFunctionAbi,\n });\n\n // Fill in the ABI\n return generateViewFunctionPayloadWithABI({ abi: functionAbi, ...args });\n}\n\nexport function generateViewFunctionPayloadWithABI(args: InputViewFunctionDataWithABI): EntryFunction {\n const functionAbi = args.abi;\n const { moduleAddress, moduleName, functionName } = getFunctionParts(args.function);\n\n // Ensure that all type arguments are typed properly\n const typeArguments = standardizeTypeTags(args.typeArguments);\n\n // Check the type argument count against the ABI\n if (typeArguments.length !== functionAbi.typeParameters.length) {\n throw new Error(\n `Type argument count mismatch, expected ${functionAbi.typeParameters.length}, received ${typeArguments.length}`,\n );\n }\n\n // Check all BCS types, and convert any non-BCS types\n const functionArguments: Array<EntryFunctionArgumentTypes> =\n args?.functionArguments?.map((arg, i) => convertArgument(args.function, functionAbi, arg, i, typeArguments)) ?? [];\n\n // Check that all arguments are accounted for\n if (functionArguments.length !== functionAbi.parameters.length) {\n throw new Error(\n // eslint-disable-next-line max-len\n `Too few arguments for '${moduleAddress}::${moduleName}::${functionName}', expected ${functionAbi.parameters.length} but got ${functionArguments.length}`,\n );\n }\n\n // Generate entry function payload\n return EntryFunction.build(`${moduleAddress}::${moduleName}`, functionName, typeArguments, functionArguments);\n}\n\nfunction generateTransactionPayloadScript(args: InputScriptData) {\n return new TransactionPayloadScript(\n new Script(Hex.fromHexInput(args.bytecode).toUint8Array(), args.typeArguments ?? [], args.functionArguments),\n );\n}\n\n/**\n * Generates a raw transaction\n *\n * @param args.aptosConfig AptosConfig\n * @param args.sender The transaction's sender account address as a hex input\n * @param args.payload The transaction payload - can create by using generateTransactionPayload()\n *\n * @returns RawTransaction\n */\nexport async function generateRawTransaction(args: {\n aptosConfig: AptosConfig;\n sender: AccountAddressInput;\n payload: AnyTransactionPayloadInstance;\n options?: InputGenerateTransactionOptions;\n feePayerAddress?: AccountAddressInput;\n}): Promise<RawTransaction> {\n const { aptosConfig, sender, payload, options, feePayerAddress } = args;\n\n const getChainId = async () => {\n if (NetworkToChainId[aptosConfig.network]) {\n return { chainId: NetworkToChainId[aptosConfig.network] };\n }\n const info = await getLedgerInfo({ aptosConfig });\n return { chainId: info.chain_id };\n };\n\n const getGasUnitPrice = async () => {\n if (options?.gasUnitPrice) {\n return { gasEstimate: options.gasUnitPrice };\n }\n const estimation = await getGasPriceEstimation({ aptosConfig });\n return { gasEstimate: estimation.gas_estimate };\n };\n\n const getSequenceNumberForAny = async () => {\n const getSequenceNumber = async () => {\n if (options?.accountSequenceNumber !== undefined) {\n return options.accountSequenceNumber;\n }\n\n return (await getInfo({ aptosConfig, accountAddress: sender })).sequence_number;\n };\n\n /**\n * Check if is sponsored transaction to honor AIP-52\n * {@link https://github.com/aptos-foundation/AIPs/blob/main/aips/aip-52.md}\n */\n if (feePayerAddress && AccountAddress.from(feePayerAddress).equals(AccountAddress.ZERO)) {\n // Handle sponsored transaction generation with the option that\n // the main signer has not been created on chain\n try {\n // Check if main signer has been created on chain, if not assign sequence number 0\n return await getSequenceNumber();\n } catch (e: any) {\n return 0;\n }\n } else {\n return getSequenceNumber();\n }\n };\n const [{ chainId }, { gasEstimate }, sequenceNumber] = await Promise.all([\n getChainId(),\n getGasUnitPrice(),\n getSequenceNumberForAny(),\n ]);\n\n const { maxGasAmount, gasUnitPrice, expireTimestamp } = {\n maxGasAmount: options?.maxGasAmount ? BigInt(options.maxGasAmount) : BigInt(DEFAULT_MAX_GAS_AMOUNT),\n gasUnitPrice: BigInt(gasEstimate),\n expireTimestamp: BigInt(Math.floor(Date.now() / 1000) + DEFAULT_TXN_EXP_SEC_FROM_NOW),\n ...options,\n };\n\n return new RawTransaction(\n AccountAddress.from(sender),\n BigInt(sequenceNumber),\n payload,\n BigInt(maxGasAmount),\n BigInt(gasUnitPrice),\n BigInt(expireTimestamp),\n new ChainId(chainId),\n );\n}\n\n/**\n * We are defining function signatures, each with its specific input and output.\n * These are the possible function signature for our `generateTransaction` function.\n * When we call our `generateTransaction` function with the relevant type properties,\n * Typescript can infer the return type based on the appropriate function overload.\n */\nexport async function buildTransaction(args: InputGenerateSingleSignerRawTransactionArgs): Promise<SimpleTransaction>;\nexport async function buildTransaction(args: InputGenerateMultiAgentRawTransactionArgs): Promise<MultiAgentTransaction>;\n\n/**\n * Generates a transaction based on the provided arguments\n *\n * Note: we can start with one function to support all different payload/transaction types,\n * and if to complex to use, we could have function for each type\n *\n * @param args.aptosConfig AptosConfig\n * @param args.sender The transaction's sender account address as a hex input\n * @param args.payload The transaction payload - can create by using generateTransactionPayload()\n * @param args.options optional. Transaction options object\n * @param args.secondarySignerAddresses optional. For when want to create a multi signers transaction\n * @param args.feePayerAddress optional. For when want to create a fee payer (aka sponsored) transaction\n *\n * @return An instance of a RawTransaction, plus optional secondary/fee payer addresses\n * ```\n * {\n * rawTransaction: RawTransaction,\n * secondarySignerAddresses? : Array<AccountAddress>,\n * feePayerAddress?: AccountAddress\n * }\n * ```\n */\nexport async function buildTransaction(args: InputGenerateRawTransactionArgs): Promise<AnyRawTransaction> {\n const { aptosConfig, sender, payload, options, feePayerAddress } = args;\n // generate raw transaction\n const rawTxn = await generateRawTransaction({\n aptosConfig,\n sender,\n payload,\n options,\n feePayerAddress,\n });\n\n // if multi agent transaction\n if (\"secondarySignerAddresses\" in args) {\n const signers: Array<AccountAddress> =\n args.secondarySignerAddresses?.map((signer) => AccountAddress.from(signer)) ?? [];\n\n return new MultiAgentTransaction(\n rawTxn,\n signers,\n args.feePayerAddress ? AccountAddress.from(args.feePayerAddress) : undefined,\n );\n }\n // return the raw transaction\n return new SimpleTransaction(rawTxn, args.feePayerAddress ? AccountAddress.from(args.feePayerAddress) : undefined);\n}\n\n/**\n * Simulate a transaction before signing and submit to chain\n *\n * @param args.transaction A aptos transaction type to sign\n * @param args.signerPublicKey The signer public key\n * @param args.secondarySignersPublicKeys optional. The secondary signers public keys if multi signers transaction\n * @param args.feePayerPublicKey optional. The fee payer public key is a fee payer (aka sponsored) transaction\n * @param args.options optional. SimulateTransactionOptions\n *\n * @returns A signed serialized transaction that can be simulated\n */\nexport function generateSignedTransactionForSimulation(args: InputSimulateTransactionData): Uint8Array {\n const { signerPublicKey, transaction, secondarySignersPublicKeys, feePayerPublicKey } = args;\n\n const accountAuthenticator = getAuthenticatorForSimulation(signerPublicKey);\n\n // fee payer transaction\n if (transaction.feePayerAddress) {\n const transactionToSign = new FeePayerRawTransaction(\n transaction.rawTransaction,\n transaction.secondarySignerAddresses ?? [],\n transaction.feePayerAddress,\n );\n let secondaryAccountAuthenticators: Array<AccountAuthenticator> = [];\n if (secondarySignersPublicKeys) {\n secondaryAccountAuthenticators = secondarySignersPublicKeys.map((publicKey) =>\n getAuthenticatorForSimulation(publicKey),\n );\n }\n const feePayerAuthenticator = getAuthenticatorForSimulation(feePayerPublicKey!);\n\n const transactionAuthenticator = new TransactionAuthenticatorFeePayer(\n accountAuthenticator,\n transaction.secondarySignerAddresses ?? [],\n secondaryAccountAuthenticators,\n {\n address: transaction.feePayerAddress,\n authenticator: feePayerAuthenticator,\n },\n );\n return new SignedTransaction(transactionToSign.raw_txn, transactionAuthenticator).bcsToBytes();\n }\n\n // multi agent transaction\n if (transaction.secondarySignerAddresses) {\n const transactionToSign = new MultiAgentRawTransaction(\n transaction.rawTransaction,\n transaction.secondarySignerAddresses,\n );\n\n let secondaryAccountAuthenticators: Array<AccountAuthenticator> = [];\n\n secondaryAccountAuthenticators = secondarySignersPublicKeys!.map((publicKey) =>\n getAuthenticatorForSimulation(publicKey),\n );\n\n const transactionAuthenticator = new TransactionAuthenticatorMultiAgent(\n accountAuthenticator,\n transaction.secondarySignerAddresses,\n secondaryAccountAuthenticators,\n );\n\n return new SignedTransaction(transactionToSign.raw_txn, transactionAuthenticator).bcsToBytes();\n }\n\n // single signer raw transaction\n let transactionAuthenticator;\n if (accountAuthenticator instanceof AccountAuthenticatorEd25519) {\n transactionAuthenticator = new TransactionAuthenticatorEd25519(\n accountAuthenticator.public_key,\n accountAuthenticator.signature,\n );\n } else if (accountAuthenticator instanceof AccountAuthenticatorSingleKey) {\n transactionAuthenticator = new TransactionAuthenticatorSingleSender(accountAuthenticator);\n } else {\n throw new Error(\"Invalid public key\");\n }\n return new SignedTransaction(transaction.rawTransaction, transactionAuthenticator).bcsToBytes();\n}\n\nexport function getAuthenticatorForSimulation(publicKey: PublicKey) {\n // TODO add support for AnyMultiKey\n if (publicKey instanceof AnyPublicKey) {\n if (publicKey.publicKey instanceof Ed25519PublicKey) {\n return new AccountAuthenticatorSingleKey(publicKey, new AnySignature(new Ed25519Signature(new Uint8Array(64))));\n }\n if (publicKey.publicKey instanceof Secp256k1PublicKey) {\n return new AccountAuthenticatorSingleKey(publicKey, new AnySignature(new Secp256k1Signature(new Uint8Array(64))));\n }\n }\n\n // legacy code\n return new AccountAuthenticatorEd25519(\n new Ed25519PublicKey(publicKey.toUint8Array()),\n new Ed25519Signature(new Uint8Array(64)),\n );\n}\n\n/**\n * Sign a transaction that can later be submitted to chain\n *\n * @param args.signer The signer account to sign the transaction\n * @param args.transaction A aptos transaction type to sign\n *\n * @return The signer AccountAuthenticator\n */\nexport function sign(args: { signer: Account; transaction: AnyRawTransaction }): AccountAuthenticator {\n const { signer, transaction } = args;\n\n // get the signing message\n const message = generateSigningMessage(transaction);\n\n // account.signMessage\n return signer.signWithAuthenticator(message);\n}\n\n/**\n * Prepare a transaction to be submitted to chain\n *\n * @param args.transaction A aptos transaction type\n * @param args.senderAuthenticator The account authenticator of the transaction sender\n * @param args.secondarySignerAuthenticators optional. For when the transaction is a multi signers transaction\n *\n * @returns A SignedTransaction\n */\nexport function generateSignedTransaction(args: InputSubmitTransactionData): Uint8Array {\n const { transaction, senderAuthenticator, feePayerAuthenticator, additionalSignersAuthenticators } = args;\n\n const transactionToSubmit = deriveTransactionType(transaction);\n\n if (\n (feePayerAuthenticator || additionalSignersAuthenticators) &&\n (transactionToSubmit instanceof MultiAgentRawTransaction || transactionToSubmit instanceof FeePayerRawTransaction)\n ) {\n return generateMultiSignersSignedTransaction(\n transactionToSubmit,\n senderAuthenticator,\n feePayerAuthenticator,\n additionalSignersAuthenticators,\n );\n }\n\n // submit single signer transaction\n\n // check what instance is accountAuthenticator\n if (senderAuthenticator instanceof AccountAuthenticatorEd25519 && transactionToSubmit instanceof RawTransaction) {\n const transactionAuthenticator = new TransactionAuthenticatorEd25519(\n senderAuthenticator.public_key,\n senderAuthenticator.signature,\n );\n return new SignedTransaction(transactionToSubmit, transactionAuthenticator).bcsToBytes();\n }\n\n if (\n (senderAuthenticator instanceof AccountAuthenticatorSingleKey ||\n senderAuthenticator instanceof AccountAuthenticatorMultiKey) &&\n transactionToSubmit instanceof RawTransaction\n ) {\n const transactionAuthenticator = new TransactionAuthenticatorSingleSender(senderAuthenticator);\n return new SignedTransaction(transactionToSubmit, transactionAuthenticator).bcsToBytes();\n }\n\n throw new Error(\n `Cannot generate a signed transaction, ${senderAuthenticator} is not a supported account authentication scheme`,\n );\n}\n\n/**\n * Hashes the set of values with a SHA-3 256 hash\n * @param input array of UTF-8 strings or Uint8array byte arrays\n */\nexport function hashValues(input: (Uint8Array | string)[]): Uint8Array {\n const hash = sha3Hash.create();\n for (const item of input) {\n hash.update(item);\n }\n return hash.digest();\n}\n\n/**\n * The domain separated prefix for hashing transacitons\n */\nconst TRANSACTION_PREFIX = hashValues([\"APTOS::Transaction\"]);\n\n/**\n * Generates a user transaction hash for the given transaction payload. It must already have an authenticator\n * @param args InputSubmitTransactionData\n */\nexport function generateUserTransactionHash(args: InputSubmitTransactionData): string {\n const signedTransaction = generateSignedTransaction(args);\n\n // Transaction signature is defined as, the domain separated prefix based on struct (Transaction)\n // Then followed by the type of the transaction for the enum, UserTransaction is 0\n // Then followed by BCS encoded bytes of the signed transaction\n return new Hex(hashValues([TRANSACTION_PREFIX, new Uint8Array([0]), signedTransaction])).toString();\n}\n\n/**\n * Derive the raw transaction type - FeePayerRawTransaction or MultiAgentRawTransaction or RawTransaction\n *\n * @param transaction A aptos transaction type\n *\n * @returns FeePayerRawTransaction | MultiAgentRawTransaction | RawTransaction\n */\nexport function deriveTransactionType(transaction: AnyRawTransaction): AnyRawTransactionInstance {\n if (transaction.feePayerAddress) {\n return new FeePayerRawTransaction(\n transaction.rawTransaction,\n transaction.secondarySignerAddresses ?? [],\n transaction.feePayerAddress,\n );\n }\n if (transaction.secondarySignerAddresses) {\n return new MultiAgentRawTransaction(transaction.rawTransaction, transaction.secondarySignerAddresses);\n }\n\n return transaction.rawTransaction;\n}\n\n/**\n * Generate a multi signers signed transaction that can be submitted to chain\n *\n * @param transaction MultiAgentRawTransaction | FeePayerRawTransaction\n * @param senderAuthenticator The account authenticator of the transaction sender\n * @param secondarySignerAuthenticators The extra signers account Authenticators\n *\n * @returns A SignedTransaction\n */\nexport function generateMultiSignersSignedTransaction(\n transaction: MultiAgentRawTransaction | FeePayerRawTransaction,\n senderAuthenticator: AccountAuthenticator,\n feePayerAuthenticator?: AccountAuthenticator,\n additionalSignersAuthenticators?: Array<AccountAuthenticator>,\n) {\n if (transaction instanceof FeePayerRawTransaction) {\n if (!feePayerAuthenticator) {\n throw new Error(\"Must provide a feePayerAuthenticator argument to generate a signed fee payer transaction\");\n }\n const txAuthenticatorFeePayer = new TransactionAuthenticatorFeePayer(\n senderAuthenticator,\n transaction.secondary_signer_addresses,\n additionalSignersAuthenticators ?? [],\n {\n address: transaction.fee_payer_address,\n authenticator: feePayerAuthenticator,\n },\n );\n return new SignedTransaction(transaction.raw_txn, txAuthenticatorFeePayer).bcsToBytes();\n }\n if (transaction instanceof MultiAgentRawTransaction) {\n if (!additionalSignersAuthenticators) {\n throw new Error(\n \"Must provide a additionalSignersAuthenticators argument to generate a signed multi agent transaction\",\n );\n }\n const multiAgentAuthenticator = new TransactionAuthenticatorMultiAgent(\n senderAuthenticator,\n transaction.secondary_signer_addresses,\n additionalSignersAuthenticators ?? [],\n );\n return new SignedTransaction(transaction.raw_txn, multiAgentAuthenticator).bcsToBytes();\n }\n\n throw new Error(\n `Cannot prepare multi signers transaction to submission, ${typeof transaction} transaction is not supported`,\n );\n}\n\nexport function generateSigningMessage(transaction: AnyRawTransaction): Uint8Array {\n const rawTxn = deriveTransactionType(transaction);\n const hash = sha3Hash.create();\n\n if (rawTxn instanceof RawTransaction) {\n hash.update(RAW_TRANSACTION_SALT);\n } else if (rawTxn instanceof MultiAgentRawTransaction) {\n hash.update(RAW_TRANSACTION_WITH_DATA_SALT);\n } else if (rawTxn instanceof FeePayerRawTransaction) {\n hash.update(RAW_TRANSACTION_WITH_DATA_SALT);\n } else {\n throw new Error(`Unknown transaction type to sign on: ${rawTxn}`);\n }\n\n const prefix = hash.digest();\n\n const body = rawTxn.bcsToBytes();\n\n const mergedArray = new Uint8Array(prefix.length + body.length);\n mergedArray.set(prefix);\n mergedArray.set(body, prefix.length);\n\n return mergedArray;\n}\n\n/**\n * Fetches and caches ABIs with allowing for pass-through on provided ABIs\n * @param key\n * @param moduleAddress\n * @param moduleName\n * @param functionName\n * @param aptosConfig\n * @param abi\n * @param fetch\n */\nasync function fetchAbi<T extends FunctionABI>({\n key,\n moduleAddress,\n moduleName,\n functionName,\n aptosConfig,\n abi,\n fetch,\n}: {\n key: string;\n moduleAddress: string;\n moduleName: string;\n functionName: string;\n aptosConfig: AptosConfig;\n abi?: T;\n fetch: (moduleAddress: string, moduleName: string, functionName: string, aptosConfig: AptosConfig) => Promise<T>;\n}): Promise<T> {\n if (abi !== undefined) {\n return abi;\n }\n\n // We fetch the entry function ABI, and then pretend that we already had the ABI\n return memoizeAsync(\n async () => fetch(moduleAddress, moduleName, functionName, aptosConfig),\n `${key}-${aptosConfig.network}-${moduleAddress}-${moduleName}-${functionName}`,\n 1000 * 60 * 5, // 5 minutes\n )();\n}\n"],"mappings":"6/BAQA,OAAS,YAAYA,OAAgB,qBA+FrC,eAAsBC,GACpBC,EACwC,CACxC,GAAIC,GAAkBD,CAAI,EACxB,OAAOE,GAAiCF,CAAI,EAE9C,GAAM,CAAE,cAAAG,EAAe,WAAAC,EAAY,aAAAC,CAAa,EAAIC,EAAiBN,EAAK,QAAQ,EAE5EO,EAAc,MAAMC,GAAS,CACjC,IAAK,iBACL,cAAAL,EACA,WAAAC,EACA,aAAAC,EACA,YAAaL,EAAK,YAClB,IAAKA,EAAK,IACV,MAAOS,EACT,CAAC,EAGD,OAAOC,GAAkC,CAAE,GAAGV,EAAM,IAAKO,CAAY,CAAC,CACxE,CAIO,SAASG,GACdV,EAC+B,CAC/B,IAAMO,EAAcP,EAAK,IACnB,CAAE,cAAAG,EAAe,W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AAsBhC,CAAW,EAC1CqC,EAAOC,GAAS,OAAO,EAE7B,GAAI7C,aAAkBH,EACpB+C,EAAK,OAAOQ,CAAoB,UACvBpD,aAAkBoB,EAC3BwB,EAAK,OAAOS,CAA8B,UACjCrD,aAAkBa,EAC3B+B,EAAK,OAAOS,CAA8B,MAE1C,OAAM,IAAI,MAAM,wCAAwCrD,CAAM,EAAE,EAGlE,IAAMsD,EAASV,EAAK,OAAO,EAErBW,EAAOvD,EAAO,WAAW,EAEzBwD,EAAc,IAAI,WAAWF,EAAO,OAASC,EAAK,MAAM,EAC9D,OAAAC,EAAY,IAAIF,CAAM,EACtBE,EAAY,IAAID,EAAMD,EAAO,MAAM,EAE5BE,CACT,CAYA,eAAetG,GAAgC,CAC7C,IAAAuG,EACA,cAAA5G,EACA,WAAAC,EACA,aAAAC,EACA,YAAA2B,EACA,IAAAgF,EACA,MAAAC,CACF,EAQe,CACb,OAAID,IAAQ,OACHA,EAIFE,EACL,SAAYD,EAAM9G,EAAeC,EAAYC,EAAc2B,CAAW,EACtE,GAAG+E,CAAG,IAAI/E,EAAY,OAAO,IAAI7B,CAAa,IAAIC,CAAU,IAAIC,CAAY,GAC5E,IAAO,GAAK,CACd,EAAE,CACJ","names":["sha3Hash","generateTransactionPayload","args","isScriptDataInput","generateTransactionPayloadScript","moduleAddress","moduleName","functionName","getFunctionParts","functionAbi","fetchAbi","fetchEntryFunctionAbi","generateTransactionPayloadWithABI","typeArguments","standardizeTypeTags","functionArguments","arg","i","convertArgument","entryFunctionPayload","EntryFunction","multisigAddress","AccountAddress","TransactionPayloadMultiSig","MultiSig","MultiSigTransactionPayload","TransactionPayloadEntryFunction","generateViewFunctionPayload","fetchViewFunctionAbi","generateViewFunctionPayloadWithABI","TransactionPayloadScript","Script","Hex","generateRawTransaction","aptosConfig","sender","payload","options","feePayerAddress","getChainId","NetworkToChainId","getLedgerInfo","getGasUnitPrice","getGasPriceEstimation","getSequenceNumberForAny","getSequenceNumber","getInfo","chainId","gasEstimate","sequenceNumber","maxGasAmount","gasUnitPrice","expireTimestamp","RawTransaction","ChainId","buildTransaction","rawTxn","signers","signer","MultiAgentTransaction","SimpleTransaction","generateSignedTransactionForSimulation","signerPublicKey","transaction","secondarySignersPublicKeys","feePayerPublicKey","accountAuthenticator","getAuthenticatorForSimulation","transactionToSign","FeePayerRawTransaction","secondaryAccountAuthenticators","publicKey","feePayerAuthenticator","transactionAuthenticator","TransactionAuthenticatorFeePayer","SignedTransaction","MultiAgentRawTransaction","TransactionAuthenticatorMultiAgent","AccountAuthenticatorEd25519","TransactionAuthenticatorEd25519","AccountAuthenticatorSingleKey","TransactionAuthenticatorSingleSender","AnyPublicKey","Ed25519PublicKey","AnySignature","Ed25519Signature","Secp256k1PublicKey","Secp256k1Signature","sign","message","generateSigningMessage","generateSignedTransaction","senderAuthenticator","additionalSignersAuthenticators","transactionToSubmit","deriveTransactionType","generateMultiSignersSignedTransaction","AccountAuthenticatorMultiKey","hashValues","input","hash","sha3Hash","item","TRANSACTION_PREFIX","generateUserTransactionHash","signedTransaction","txAuthenticatorFeePayer","multiAgentAuthenticator","RAW_TRANSACTION_SALT","RAW_TRANSACTION_WITH_DATA_SALT","prefix","body","mergedArray","key","abi","fetch","memoizeAsync"]}
@@ -1,2 +0,0 @@
1
- import{a as i}from"./chunk-TBMAJ6AW.mjs";import{a,b as g,c as f}from"./chunk-FS3NSGBF.mjs";import{a as o,b as u,c as s,d as c,e as p,f as y,g as m}from"./chunk-QIAHBEEW.mjs";import{b as r}from"./chunk-IOSQVDZI.mjs";function M(n){return typeof n=="boolean"}function D(n){return typeof n=="string"}function N(n){return typeof n=="number"}function P(n){return typeof n=="number"||typeof n=="bigint"||typeof n=="string"}function w(n){return n==null}function G(n){return A(n)||x(n)||S(n)||B(n)||U(n)||I(n)||b(n)||T(n)||E(n)||d(n)||n instanceof a||n instanceof f}function A(n){return n instanceof o}function T(n){return n instanceof r}function E(n){return n instanceof g}function d(n){return n instanceof i}function x(n){return n instanceof u}function S(n){return n instanceof s}function B(n){return n instanceof c}function U(n){return n instanceof p}function I(n){return n instanceof y}function b(n){return n instanceof m}function $(n){return"bytecode"in n}function R(n,t){throw new Error(`Type mismatch for argument ${t}, expected '${n}'`)}function W(n){let t=n.params.findIndex(e=>e!=="signer"&&e!=="&signer");return t<0?n.params.length:t}function L(n){let t=n.split("::");if(t.length!==3)throw new Error(`Invalid function ${n}`);let e=t[0],F=t[1],l=t[2];return{moduleAddress:e,moduleName:F,functionName:l}}export{M as a,D as b,N as c,P as d,w as e,G as f,A as g,T as h,E as i,d as j,x as k,S as l,B as m,U as n,I as o,b as p,$ as q,R as r,W as s,L as t};
2
- //# sourceMappingURL=chunk-KBRRTSF6.mjs.map
@@ -1,2 +0,0 @@
1
- var o="1.13.1";export{o as a};
2
- //# sourceMappingURL=chunk-MQXSU6GN.mjs.map
@@ -1,2 +0,0 @@
1
- import{c as r}from"./chunk-DJ5TUMIY.mjs";import{b as i}from"./chunk-52C73T26.mjs";import{b as t}from"./chunk-5RE43AX2.mjs";async function v(a){let{aptosConfig:o,payload:n,options:s}=a,p=await r({...n,aptosConfig:o}),e=new i;p.serialize(e);let l=e.toUint8Array(),{data:d}=await t({aptosConfig:o,path:"view",originMethod:"view",contentType:"application/x.aptos.view_function+bcs",params:{ledger_version:s?.ledgerVersion},body:l});return d}export{v as a};
2
- //# sourceMappingURL=chunk-PNGS6IWC.mjs.map