@aptos-labs/ts-sdk 1.36.0-zeta.0 → 1.37.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (249) hide show
  1. package/dist/common/{accountAddress-C685VEzA.d.ts → accountAddress-DZH9Wn5l.d.ts} +28 -1
  2. package/dist/common/chunk-MVCKMP5U.js +4 -0
  3. package/dist/common/{chunk-5GUWOXQG.js.map → chunk-MVCKMP5U.js.map} +1 -1
  4. package/dist/common/cli/index.d.ts +1 -1
  5. package/dist/common/cli/index.js +1 -1
  6. package/dist/common/cli/index.js.map +1 -1
  7. package/dist/common/index.d.ts +221 -31
  8. package/dist/common/index.js +9 -9
  9. package/dist/common/index.js.map +1 -1
  10. package/dist/esm/{Ed25519Account-6KGApCPu.d.mts → Ed25519Account-CDURCT1q.d.mts} +56 -0
  11. package/dist/esm/account/AbstractKeylessAccount.d.mts +2 -2
  12. package/dist/esm/account/AbstractKeylessAccount.mjs +1 -1
  13. package/dist/esm/account/AbstractedAccount.d.mts +1 -1
  14. package/dist/esm/account/AbstractedAccount.mjs +1 -1
  15. package/dist/esm/account/Account.d.mts +3 -3
  16. package/dist/esm/account/Account.mjs +1 -1
  17. package/dist/esm/account/AccountUtils.d.mts +2 -2
  18. package/dist/esm/account/AccountUtils.mjs +1 -1
  19. package/dist/esm/account/Ed25519Account.d.mts +4 -4
  20. package/dist/esm/account/Ed25519Account.mjs +1 -1
  21. package/dist/esm/account/EphemeralKeyPair.mjs +1 -1
  22. package/dist/esm/account/FederatedKeylessAccount.d.mts +2 -2
  23. package/dist/esm/account/FederatedKeylessAccount.mjs +1 -1
  24. package/dist/esm/account/KeylessAccount.d.mts +2 -2
  25. package/dist/esm/account/KeylessAccount.mjs +1 -1
  26. package/dist/esm/account/MultiEd25519Account.d.mts +35 -13
  27. package/dist/esm/account/MultiEd25519Account.mjs +1 -1
  28. package/dist/esm/account/MultiKeyAccount.d.mts +6 -2
  29. package/dist/esm/account/MultiKeyAccount.mjs +1 -1
  30. package/dist/esm/account/SingleKeyAccount.d.mts +4 -4
  31. package/dist/esm/account/SingleKeyAccount.mjs +1 -1
  32. package/dist/esm/account/index.d.mts +2 -2
  33. package/dist/esm/account/index.mjs +1 -1
  34. package/dist/esm/account/utils.mjs +1 -1
  35. package/dist/esm/api/account/abstraction.mjs +1 -1
  36. package/dist/esm/api/account.d.mts +85 -6
  37. package/dist/esm/api/account.mjs +1 -1
  38. package/dist/esm/api/ans.d.mts +1 -1
  39. package/dist/esm/api/ans.mjs +1 -1
  40. package/dist/esm/api/aptos.d.mts +2 -2
  41. package/dist/esm/api/aptos.mjs +1 -1
  42. package/dist/esm/api/coin.mjs +1 -1
  43. package/dist/esm/api/digitalAsset.d.mts +1 -1
  44. package/dist/esm/api/digitalAsset.mjs +1 -1
  45. package/dist/esm/api/event.mjs +1 -1
  46. package/dist/esm/api/experimental.mjs +1 -1
  47. package/dist/esm/api/faucet.mjs +1 -1
  48. package/dist/esm/api/fungibleAsset.d.mts +1 -1
  49. package/dist/esm/api/fungibleAsset.mjs +1 -1
  50. package/dist/esm/api/general.mjs +1 -1
  51. package/dist/esm/api/index.d.mts +2 -2
  52. package/dist/esm/api/index.mjs +1 -1
  53. package/dist/esm/api/keyless.d.mts +2 -2
  54. package/dist/esm/api/keyless.mjs +1 -1
  55. package/dist/esm/api/object.mjs +1 -1
  56. package/dist/esm/api/staking.mjs +1 -1
  57. package/dist/esm/api/table.mjs +1 -1
  58. package/dist/esm/api/transaction.d.mts +1 -1
  59. package/dist/esm/api/transaction.mjs +1 -1
  60. package/dist/esm/api/transactionSubmission/build.mjs +1 -1
  61. package/dist/esm/api/transactionSubmission/management.d.mts +1 -1
  62. package/dist/esm/api/transactionSubmission/management.mjs +1 -1
  63. package/dist/esm/api/transactionSubmission/sign.d.mts +1 -1
  64. package/dist/esm/api/transactionSubmission/sign.mjs +1 -1
  65. package/dist/esm/api/transactionSubmission/simulate.mjs +1 -1
  66. package/dist/esm/api/transactionSubmission/submit.mjs +1 -1
  67. package/dist/esm/api/utils.mjs +1 -1
  68. package/dist/esm/bcs/index.mjs +1 -1
  69. package/dist/esm/bcs/serializable/movePrimitives.mjs +1 -1
  70. package/dist/esm/bcs/serializable/moveStructs.mjs +1 -1
  71. package/dist/esm/{chunk-AIPHJFJL.mjs → chunk-3IGJ2IMB.mjs} +2 -2
  72. package/dist/esm/{chunk-CWL7ZA3P.mjs → chunk-5MMTP427.mjs} +2 -2
  73. package/dist/esm/chunk-6374Q7AG.mjs +2 -0
  74. package/dist/esm/{chunk-3RVAGHAA.mjs.map → chunk-6374Q7AG.mjs.map} +1 -1
  75. package/dist/esm/{chunk-AEGA5N2W.mjs → chunk-6J64BOS7.mjs} +2 -2
  76. package/dist/esm/chunk-7H44HTYE.mjs +4 -0
  77. package/dist/esm/chunk-7H44HTYE.mjs.map +1 -0
  78. package/dist/esm/{chunk-6KE4JZD6.mjs → chunk-7VEWPUCH.mjs} +2 -2
  79. package/dist/esm/chunk-ANTUWHYB.mjs +2 -0
  80. package/dist/esm/chunk-ANTUWHYB.mjs.map +1 -0
  81. package/dist/esm/{chunk-R6QCPXQG.mjs → chunk-B373VRCY.mjs} +2 -2
  82. package/dist/esm/chunk-B373VRCY.mjs.map +1 -0
  83. package/dist/esm/{chunk-TTY5GFMN.mjs → chunk-BSH7B2QT.mjs} +2 -2
  84. package/dist/esm/chunk-EYLZD4JU.mjs +4 -0
  85. package/dist/esm/chunk-EYLZD4JU.mjs.map +1 -0
  86. package/dist/esm/chunk-GPG64UZT.mjs +2 -0
  87. package/dist/esm/{chunk-X5YB74NB.mjs.map → chunk-GPG64UZT.mjs.map} +1 -1
  88. package/dist/esm/{chunk-PSZYS4RG.mjs → chunk-HRHICHDX.mjs} +2 -2
  89. package/dist/esm/{chunk-XLDMPCLF.mjs → chunk-JG4T5BDZ.mjs} +2 -2
  90. package/dist/esm/{chunk-35CO4BP4.mjs → chunk-LBA4CTUV.mjs} +2 -2
  91. package/dist/esm/{chunk-RXMLONF7.mjs → chunk-NZXPT44W.mjs} +2 -2
  92. package/dist/esm/{chunk-KXVD52Y6.mjs → chunk-POELQOLD.mjs} +2 -2
  93. package/dist/esm/chunk-PR72YXRK.mjs +2 -0
  94. package/dist/esm/chunk-PR72YXRK.mjs.map +1 -0
  95. package/dist/esm/{chunk-3EUHEZND.mjs → chunk-PXG3WJIU.mjs} +2 -2
  96. package/dist/esm/{chunk-TBY3VMMV.mjs → chunk-TTFYJM6A.mjs} +2 -2
  97. package/dist/esm/{chunk-EODSU3YN.mjs → chunk-VNUNIQAY.mjs} +2 -2
  98. package/dist/esm/{chunk-WB26DWOY.mjs → chunk-YHJHXLYS.mjs} +2 -2
  99. package/dist/esm/{chunk-7YTGBTWH.mjs → chunk-YHKWV7NV.mjs} +2 -2
  100. package/dist/esm/cli/index.mjs +1 -1
  101. package/dist/esm/cli/localNode.mjs +1 -1
  102. package/dist/esm/client/core.mjs +1 -1
  103. package/dist/esm/client/get.d.mts +5 -1
  104. package/dist/esm/client/get.mjs +1 -1
  105. package/dist/esm/client/index.d.mts +1 -1
  106. package/dist/esm/client/index.mjs +1 -1
  107. package/dist/esm/client/post.mjs +1 -1
  108. package/dist/esm/core/account/index.mjs +1 -1
  109. package/dist/esm/core/account/utils/address.mjs +1 -1
  110. package/dist/esm/core/account/utils/index.mjs +1 -1
  111. package/dist/esm/core/accountAddress.d.mts +18 -0
  112. package/dist/esm/core/accountAddress.mjs +1 -1
  113. package/dist/esm/core/authenticationKey.mjs +1 -1
  114. package/dist/esm/core/crypto/abstraction.mjs +1 -1
  115. package/dist/esm/core/crypto/ed25519.mjs +1 -1
  116. package/dist/esm/core/crypto/ephemeral.mjs +1 -1
  117. package/dist/esm/core/crypto/federatedKeyless.d.mts +2 -2
  118. package/dist/esm/core/crypto/federatedKeyless.mjs +1 -1
  119. package/dist/esm/core/crypto/index.d.mts +1 -1
  120. package/dist/esm/core/crypto/index.mjs +1 -1
  121. package/dist/esm/core/crypto/keyless.d.mts +1 -1
  122. package/dist/esm/core/crypto/keyless.mjs +1 -1
  123. package/dist/esm/core/crypto/multiEd25519.d.mts +2 -2
  124. package/dist/esm/core/crypto/multiEd25519.mjs +1 -1
  125. package/dist/esm/core/crypto/multiKey.d.mts +4 -1
  126. package/dist/esm/core/crypto/multiKey.mjs +1 -1
  127. package/dist/esm/core/crypto/privateKey.mjs +1 -1
  128. package/dist/esm/core/crypto/proof.mjs +1 -1
  129. package/dist/esm/core/crypto/publicKey.mjs +1 -1
  130. package/dist/esm/core/crypto/secp256k1.mjs +1 -1
  131. package/dist/esm/core/crypto/signature.mjs +1 -1
  132. package/dist/esm/core/crypto/singleKey.d.mts +4 -1
  133. package/dist/esm/core/crypto/singleKey.mjs +1 -1
  134. package/dist/esm/core/index.d.mts +1 -1
  135. package/dist/esm/core/index.mjs +1 -1
  136. package/dist/esm/errors/index.mjs +1 -1
  137. package/dist/esm/{federatedKeyless-Qe_j8OqV.d.mts → federatedKeyless-J5bdbbLQ.d.mts} +20 -20
  138. package/dist/esm/index.d.mts +5 -5
  139. package/dist/esm/index.mjs +1 -1
  140. package/dist/esm/internal/abstraction.mjs +1 -1
  141. package/dist/esm/internal/account.d.mts +49 -6
  142. package/dist/esm/internal/account.mjs +1 -1
  143. package/dist/esm/internal/ans.d.mts +1 -1
  144. package/dist/esm/internal/ans.mjs +1 -1
  145. package/dist/esm/internal/coin.mjs +1 -1
  146. package/dist/esm/internal/digitalAsset.d.mts +1 -1
  147. package/dist/esm/internal/digitalAsset.mjs +1 -1
  148. package/dist/esm/internal/event.mjs +1 -1
  149. package/dist/esm/internal/experimental.mjs +1 -1
  150. package/dist/esm/internal/faucet.mjs +1 -1
  151. package/dist/esm/internal/fungibleAsset.d.mts +1 -1
  152. package/dist/esm/internal/fungibleAsset.mjs +1 -1
  153. package/dist/esm/internal/general.mjs +1 -1
  154. package/dist/esm/internal/keyless.d.mts +2 -2
  155. package/dist/esm/internal/keyless.mjs +1 -1
  156. package/dist/esm/internal/object.mjs +1 -1
  157. package/dist/esm/internal/staking.mjs +1 -1
  158. package/dist/esm/internal/table.mjs +1 -1
  159. package/dist/esm/internal/transaction.mjs +1 -1
  160. package/dist/esm/internal/transactionSubmission.d.mts +1 -1
  161. package/dist/esm/internal/transactionSubmission.mjs +1 -1
  162. package/dist/esm/internal/utils/index.d.mts +1 -1
  163. package/dist/esm/internal/utils/index.mjs +1 -1
  164. package/dist/esm/internal/utils/utils.d.mts +2 -19
  165. package/dist/esm/internal/utils/utils.mjs +1 -1
  166. package/dist/esm/internal/view.mjs +1 -1
  167. package/dist/esm/transactions/authenticator/account.mjs +1 -1
  168. package/dist/esm/transactions/authenticator/index.mjs +1 -1
  169. package/dist/esm/transactions/authenticator/transaction.mjs +1 -1
  170. package/dist/esm/transactions/index.mjs +1 -1
  171. package/dist/esm/transactions/instances/index.mjs +1 -1
  172. package/dist/esm/transactions/instances/moduleId.mjs +1 -1
  173. package/dist/esm/transactions/instances/multiAgentTransaction.mjs +1 -1
  174. package/dist/esm/transactions/instances/rawTransaction.mjs +1 -1
  175. package/dist/esm/transactions/instances/rotationProofChallenge.mjs +1 -1
  176. package/dist/esm/transactions/instances/signedTransaction.mjs +1 -1
  177. package/dist/esm/transactions/instances/simpleTransaction.mjs +1 -1
  178. package/dist/esm/transactions/instances/transactionPayload.mjs +1 -1
  179. package/dist/esm/transactions/management/accountSequenceNumber.d.mts +1 -1
  180. package/dist/esm/transactions/management/accountSequenceNumber.mjs +1 -1
  181. package/dist/esm/transactions/management/index.d.mts +1 -1
  182. package/dist/esm/transactions/management/index.mjs +1 -1
  183. package/dist/esm/transactions/management/transactionWorker.d.mts +1 -1
  184. package/dist/esm/transactions/management/transactionWorker.mjs +1 -1
  185. package/dist/esm/transactions/scriptComposer/index.mjs +1 -1
  186. package/dist/esm/transactions/transactionBuilder/helpers.mjs +1 -1
  187. package/dist/esm/transactions/transactionBuilder/index.mjs +1 -1
  188. package/dist/esm/transactions/transactionBuilder/remoteAbi.mjs +1 -1
  189. package/dist/esm/transactions/transactionBuilder/signingMessage.mjs +1 -1
  190. package/dist/esm/transactions/transactionBuilder/transactionBuilder.mjs +1 -1
  191. package/dist/esm/transactions/typeTag/index.mjs +1 -1
  192. package/dist/esm/transactions/typeTag/parser.mjs +1 -1
  193. package/dist/esm/types/index.d.mts +1 -1
  194. package/dist/esm/types/index.mjs +1 -1
  195. package/dist/esm/types/types.d.mts +10 -1
  196. package/dist/esm/types/types.mjs +1 -1
  197. package/dist/esm/utils/helpers.d.mts +27 -1
  198. package/dist/esm/utils/helpers.mjs +1 -1
  199. package/dist/esm/utils/index.d.mts +3 -1
  200. package/dist/esm/utils/index.mjs +1 -1
  201. package/dist/esm/utils/normalizeBundle.mjs +1 -1
  202. package/dist/esm/version.d.mts +1 -1
  203. package/dist/esm/version.mjs +1 -1
  204. package/package.json +7 -1
  205. package/src/account/Account.ts +20 -0
  206. package/src/account/Ed25519Account.ts +26 -1
  207. package/src/account/MultiEd25519Account.ts +28 -1
  208. package/src/account/MultiKeyAccount.ts +2 -0
  209. package/src/account/SingleKeyAccount.ts +35 -1
  210. package/src/api/account.ts +84 -4
  211. package/src/client/get.ts +45 -18
  212. package/src/core/accountAddress.ts +25 -0
  213. package/src/core/crypto/federatedKeyless.ts +8 -2
  214. package/src/core/crypto/keyless.ts +93 -60
  215. package/src/core/crypto/multiEd25519.ts +2 -2
  216. package/src/core/crypto/multiKey.ts +24 -13
  217. package/src/core/crypto/singleKey.ts +12 -2
  218. package/src/internal/account.ts +84 -7
  219. package/src/internal/utils/utils.ts +2 -32
  220. package/src/types/types.ts +10 -0
  221. package/src/utils/helpers.ts +50 -0
  222. package/src/version.ts +1 -1
  223. package/dist/common/chunk-5GUWOXQG.js +0 -4
  224. package/dist/esm/chunk-3RVAGHAA.mjs +0 -2
  225. package/dist/esm/chunk-LQOSHBB7.mjs +0 -4
  226. package/dist/esm/chunk-LQOSHBB7.mjs.map +0 -1
  227. package/dist/esm/chunk-NFPNWY6Z.mjs +0 -4
  228. package/dist/esm/chunk-NFPNWY6Z.mjs.map +0 -1
  229. package/dist/esm/chunk-R6QCPXQG.mjs.map +0 -1
  230. package/dist/esm/chunk-TNWABITK.mjs +0 -2
  231. package/dist/esm/chunk-TNWABITK.mjs.map +0 -1
  232. package/dist/esm/chunk-X5YB74NB.mjs +0 -2
  233. package/dist/esm/chunk-ZELTLAUN.mjs +0 -2
  234. package/dist/esm/chunk-ZELTLAUN.mjs.map +0 -1
  235. /package/dist/esm/{chunk-AIPHJFJL.mjs.map → chunk-3IGJ2IMB.mjs.map} +0 -0
  236. /package/dist/esm/{chunk-CWL7ZA3P.mjs.map → chunk-5MMTP427.mjs.map} +0 -0
  237. /package/dist/esm/{chunk-AEGA5N2W.mjs.map → chunk-6J64BOS7.mjs.map} +0 -0
  238. /package/dist/esm/{chunk-6KE4JZD6.mjs.map → chunk-7VEWPUCH.mjs.map} +0 -0
  239. /package/dist/esm/{chunk-TTY5GFMN.mjs.map → chunk-BSH7B2QT.mjs.map} +0 -0
  240. /package/dist/esm/{chunk-PSZYS4RG.mjs.map → chunk-HRHICHDX.mjs.map} +0 -0
  241. /package/dist/esm/{chunk-XLDMPCLF.mjs.map → chunk-JG4T5BDZ.mjs.map} +0 -0
  242. /package/dist/esm/{chunk-35CO4BP4.mjs.map → chunk-LBA4CTUV.mjs.map} +0 -0
  243. /package/dist/esm/{chunk-RXMLONF7.mjs.map → chunk-NZXPT44W.mjs.map} +0 -0
  244. /package/dist/esm/{chunk-KXVD52Y6.mjs.map → chunk-POELQOLD.mjs.map} +0 -0
  245. /package/dist/esm/{chunk-3EUHEZND.mjs.map → chunk-PXG3WJIU.mjs.map} +0 -0
  246. /package/dist/esm/{chunk-TBY3VMMV.mjs.map → chunk-TTFYJM6A.mjs.map} +0 -0
  247. /package/dist/esm/{chunk-EODSU3YN.mjs.map → chunk-VNUNIQAY.mjs.map} +0 -0
  248. /package/dist/esm/{chunk-WB26DWOY.mjs.map → chunk-YHJHXLYS.mjs.map} +0 -0
  249. /package/dist/esm/{chunk-7YTGBTWH.mjs.map → chunk-YHKWV7NV.mjs.map} +0 -0
@@ -1,2 +1,2 @@
1
- import{a as H}from"../chunk-3OLFJ65O.mjs";import"../chunk-4WPQQPUF.mjs";import{A,B,C,D,E,F,G,a,b,c,d,e,f,g,h,i,j,k,l,m,n,o,p,q,r,s,t,u,v,w,x,y,z}from"../chunk-R6QCPXQG.mjs";import"../chunk-KDMSOCZY.mjs";export{g as AccountAuthenticatorVariant,i as AnyPublicKeyVariant,j as AnySignatureVariant,H as CallArgument,G as DeriveScheme,m as EphemeralCertificateVariant,k as EphemeralPublicKeyVariant,l as EphemeralSignatureVariant,a as MimeType,C as MoveAbility,B as MoveFunctionVisibility,h as PrivateKeyVariants,D as RoleType,c as ScriptTransactionArgumentVariants,E as SigningScheme,F as SigningSchemeInput,f as TransactionAuthenticatorVariant,d as TransactionPayloadVariants,o as TransactionResponseType,e as TransactionVariants,b as TypeTagVariants,n as ZkpVariant,v as isBlockEpilogueTransactionResponse,s as isBlockMetadataTransactionResponse,w as isEd25519Signature,z as isFeePayerSignature,r as isGenesisTransactionResponse,y as isMultiAgentSignature,A as isMultiEd25519Signature,p as isPendingTransactionResponse,x as isSecp256k1Signature,t as isStateCheckpointTransactionResponse,q as isUserTransactionResponse,u as isValidatorTransactionResponse};
1
+ import{a as H}from"../chunk-3OLFJ65O.mjs";import{A,B,C,D,E,F,G,a,b,c,d,e,f,g,h,i,j,k,l,m,n,o,p,q,r,s,t,u,v,w,x,y,z}from"../chunk-B373VRCY.mjs";import"../chunk-4WPQQPUF.mjs";import"../chunk-KDMSOCZY.mjs";export{g as AccountAuthenticatorVariant,i as AnyPublicKeyVariant,j as AnySignatureVariant,H as CallArgument,G as DeriveScheme,m as EphemeralCertificateVariant,k as EphemeralPublicKeyVariant,l as EphemeralSignatureVariant,a as MimeType,C as MoveAbility,B as MoveFunctionVisibility,h as PrivateKeyVariants,D as RoleType,c as ScriptTransactionArgumentVariants,E as SigningScheme,F as SigningSchemeInput,f as TransactionAuthenticatorVariant,d as TransactionPayloadVariants,o as TransactionResponseType,e as TransactionVariants,b as TypeTagVariants,n as ZkpVariant,v as isBlockEpilogueTransactionResponse,s as isBlockMetadataTransactionResponse,w as isEd25519Signature,z as isFeePayerSignature,r as isGenesisTransactionResponse,y as isMultiAgentSignature,A as isMultiEd25519Signature,p as isPendingTransactionResponse,x as isSecp256k1Signature,t as isStateCheckpointTransactionResponse,q as isUserTransactionResponse,u as isValidatorTransactionResponse};
2
2
  //# sourceMappingURL=index.mjs.map
@@ -203,6 +203,15 @@ interface PaginationArgs {
203
203
  offset?: AnyNumber;
204
204
  limit?: number;
205
205
  }
206
+ /**
207
+ * Defines the parameters for paginating query results, including the starting position and maximum number of items to return.
208
+ * @param cursor Specifies the starting position of the query result. Default is at the beginning if undefined. This is not a number and must come from the API.
209
+ * @param limit Specifies the maximum number of items to return. Default is 25.
210
+ */
211
+ interface CursorPaginationArgs {
212
+ cursor?: string;
213
+ limit?: number;
214
+ }
206
215
  /**
207
216
  * Represents the arguments for specifying a token standard.
208
217
  *
@@ -1308,4 +1317,4 @@ type GenerateAccountWithSingleSignerSecp256k1Key = {
1308
1317
  };
1309
1318
  type GenerateAccount = GenerateAccountWithEd25519 | GenerateAccountWithSingleSignerSecp256k1Key;
1310
1319
 
1311
- export { AccountAuthenticatorVariant, type AccountData, type AccountSignature, type AnyNumber, AnyPublicKeyVariant, AnySignatureVariant, type AptosRequest, type AptosResponse, type AptosSettings, type AuthenticationKeyScheme, type Block, type BlockEndInfo, type BlockEpilogueTransactionResponse, type BlockMetadataTransactionResponse, type Client, type ClientConfig, type ClientHeadersType, type ClientRequest, type ClientResponse, type CommittedTransactionResponse, type DecodedTableData, type DeletedTableData, DeriveScheme, type DirectWriteSet, type EntryFunctionPayloadResponse, EphemeralCertificateVariant, EphemeralPublicKeyVariant, EphemeralSignatureVariant, type Event, type EventGuid, type FaucetConfig, type FullNodeConfig, type GasEstimation, type GenerateAccount, type GenerateAccountWithEd25519, type GenerateAccountWithSingleSignerSecp256k1Key, type GenesisPayload, type GenesisTransactionResponse, type HexInput, type IndexerConfig, type LedgerInfo, type LedgerVersionArg, MimeType, MoveAbility, type MoveAddressType, type MoveFunction, type MoveFunctionGenericTypeParam, type MoveFunctionId, MoveFunctionVisibility, type MoveModule, type MoveModuleBytecode, type MoveModuleId, type MoveObjectType, type MoveOptionType, type MoveResource, type MoveScriptBytecode, type MoveStruct, type MoveStructField, type MoveStructId, type MoveStructType, type MoveType, type MoveUint128Type, type MoveUint16Type, type MoveUint256Type, type MoveUint32Type, type MoveUint64Type, type MoveUint8Type, type MoveValue, type MultisigPayloadResponse, type OrderByArg, type PaginationArgs, type PendingTransactionResponse, PrivateKeyVariants, RoleType, type ScriptPayloadResponse, ScriptTransactionArgumentVariants, type ScriptWriteSet, SigningScheme, SigningSchemeInput, type StateCheckpointTransactionResponse, type TableItemRequest, type TokenStandardArg, TransactionAuthenticatorVariant, type TransactionEd25519Signature, type TransactionFeePayerSignature, type TransactionMultiAgentSignature, type TransactionMultiEd25519Signature, type TransactionPayloadResponse, TransactionPayloadVariants, type TransactionResponse, TransactionResponseType, type TransactionSecp256k1Signature, type TransactionSignature, TransactionVariants, TypeTagVariants, type Uint128, type Uint16, type Uint256, type Uint32, type Uint64, type Uint8, type UserTransactionResponse, type ValidatorTransactionResponse, type WaitForTransactionOptions, type WhereArg, type WriteSet, type WriteSetChange, type WriteSetChangeDeleteModule, type WriteSetChangeDeleteResource, type WriteSetChangeDeleteTableItem, type WriteSetChangeWriteModule, type WriteSetChangeWriteResource, type WriteSetChangeWriteTableItem, ZkpVariant, isBlockEpilogueTransactionResponse, isBlockMetadataTransactionResponse, isEd25519Signature, isFeePayerSignature, isGenesisTransactionResponse, isMultiAgentSignature, isMultiEd25519Signature, isPendingTransactionResponse, isSecp256k1Signature, isStateCheckpointTransactionResponse, isUserTransactionResponse, isValidatorTransactionResponse };
1320
+ export { AccountAuthenticatorVariant, type AccountData, type AccountSignature, type AnyNumber, AnyPublicKeyVariant, AnySignatureVariant, type AptosRequest, type AptosResponse, type AptosSettings, type AuthenticationKeyScheme, type Block, type BlockEndInfo, type BlockEpilogueTransactionResponse, type BlockMetadataTransactionResponse, type Client, type ClientConfig, type ClientHeadersType, type ClientRequest, type ClientResponse, type CommittedTransactionResponse, type CursorPaginationArgs, type DecodedTableData, type DeletedTableData, DeriveScheme, type DirectWriteSet, type EntryFunctionPayloadResponse, EphemeralCertificateVariant, EphemeralPublicKeyVariant, EphemeralSignatureVariant, type Event, type EventGuid, type FaucetConfig, type FullNodeConfig, type GasEstimation, type GenerateAccount, type GenerateAccountWithEd25519, type GenerateAccountWithSingleSignerSecp256k1Key, type GenesisPayload, type GenesisTransactionResponse, type HexInput, type IndexerConfig, type LedgerInfo, type LedgerVersionArg, MimeType, MoveAbility, type MoveAddressType, type MoveFunction, type MoveFunctionGenericTypeParam, type MoveFunctionId, MoveFunctionVisibility, type MoveModule, type MoveModuleBytecode, type MoveModuleId, type MoveObjectType, type MoveOptionType, type MoveResource, type MoveScriptBytecode, type MoveStruct, type MoveStructField, type MoveStructId, type MoveStructType, type MoveType, type MoveUint128Type, type MoveUint16Type, type MoveUint256Type, type MoveUint32Type, type MoveUint64Type, type MoveUint8Type, type MoveValue, type MultisigPayloadResponse, type OrderByArg, type PaginationArgs, type PendingTransactionResponse, PrivateKeyVariants, RoleType, type ScriptPayloadResponse, ScriptTransactionArgumentVariants, type ScriptWriteSet, SigningScheme, SigningSchemeInput, type StateCheckpointTransactionResponse, type TableItemRequest, type TokenStandardArg, TransactionAuthenticatorVariant, type TransactionEd25519Signature, type TransactionFeePayerSignature, type TransactionMultiAgentSignature, type TransactionMultiEd25519Signature, type TransactionPayloadResponse, TransactionPayloadVariants, type TransactionResponse, TransactionResponseType, type TransactionSecp256k1Signature, type TransactionSignature, TransactionVariants, TypeTagVariants, type Uint128, type Uint16, type Uint256, type Uint32, type Uint64, type Uint8, type UserTransactionResponse, type ValidatorTransactionResponse, type WaitForTransactionOptions, type WhereArg, type WriteSet, type WriteSetChange, type WriteSetChangeDeleteModule, type WriteSetChangeDeleteResource, type WriteSetChangeDeleteTableItem, type WriteSetChangeWriteModule, type WriteSetChangeWriteResource, type WriteSetChangeWriteTableItem, ZkpVariant, isBlockEpilogueTransactionResponse, isBlockMetadataTransactionResponse, isEd25519Signature, isFeePayerSignature, isGenesisTransactionResponse, isMultiAgentSignature, isMultiEd25519Signature, isPendingTransactionResponse, isSecp256k1Signature, isStateCheckpointTransactionResponse, isUserTransactionResponse, isValidatorTransactionResponse };
@@ -1,2 +1,2 @@
1
- import{A,B,C,D,E,F,G,a,b,c,d,e,f,g,h,i,j,k,l,m,n,o,p,q,r,s,t,u,v,w,x,y,z}from"../chunk-R6QCPXQG.mjs";import"../chunk-KDMSOCZY.mjs";export{g as AccountAuthenticatorVariant,i as AnyPublicKeyVariant,j as AnySignatureVariant,G as DeriveScheme,m as EphemeralCertificateVariant,k as EphemeralPublicKeyVariant,l as EphemeralSignatureVariant,a as MimeType,C as MoveAbility,B as MoveFunctionVisibility,h as PrivateKeyVariants,D as RoleType,c as ScriptTransactionArgumentVariants,E as SigningScheme,F as SigningSchemeInput,f as TransactionAuthenticatorVariant,d as TransactionPayloadVariants,o as TransactionResponseType,e as TransactionVariants,b as TypeTagVariants,n as ZkpVariant,v as isBlockEpilogueTransactionResponse,s as isBlockMetadataTransactionResponse,w as isEd25519Signature,z as isFeePayerSignature,r as isGenesisTransactionResponse,y as isMultiAgentSignature,A as isMultiEd25519Signature,p as isPendingTransactionResponse,x as isSecp256k1Signature,t as isStateCheckpointTransactionResponse,q as isUserTransactionResponse,u as isValidatorTransactionResponse};
1
+ import{A,B,C,D,E,F,G,a,b,c,d,e,f,g,h,i,j,k,l,m,n,o,p,q,r,s,t,u,v,w,x,y,z}from"../chunk-B373VRCY.mjs";import"../chunk-KDMSOCZY.mjs";export{g as AccountAuthenticatorVariant,i as AnyPublicKeyVariant,j as AnySignatureVariant,G as DeriveScheme,m as EphemeralCertificateVariant,k as EphemeralPublicKeyVariant,l as EphemeralSignatureVariant,a as MimeType,C as MoveAbility,B as MoveFunctionVisibility,h as PrivateKeyVariants,D as RoleType,c as ScriptTransactionArgumentVariants,E as SigningScheme,F as SigningSchemeInput,f as TransactionAuthenticatorVariant,d as TransactionPayloadVariants,o as TransactionResponseType,e as TransactionVariants,b as TypeTagVariants,n as ZkpVariant,v as isBlockEpilogueTransactionResponse,s as isBlockMetadataTransactionResponse,w as isEd25519Signature,z as isFeePayerSignature,r as isGenesisTransactionResponse,y as isMultiAgentSignature,A as isMultiEd25519Signature,p as isPendingTransactionResponse,x as isSecp256k1Signature,t as isStateCheckpointTransactionResponse,q as isUserTransactionResponse,u as isValidatorTransactionResponse};
2
2
  //# sourceMappingURL=types.mjs.map
@@ -1,9 +1,15 @@
1
1
  import { MoveStructId, MoveFunctionId } from '../types/types.mjs';
2
+ import { AccountAddress } from '../core/accountAddress.mjs';
2
3
  import '../types/indexer.mjs';
3
4
  import '../types/generated/operations.mjs';
4
5
  import '../types/generated/types.mjs';
5
6
  import './apiEndpoints.mjs';
6
7
  import '@aptos-labs/script-composer-pack';
8
+ import '../bcs/serializer.mjs';
9
+ import '../core/hex.mjs';
10
+ import '../core/common.mjs';
11
+ import '../bcs/deserializer.mjs';
12
+ import '../transactions/instances/transactionArgument.mjs';
7
13
 
8
14
  /**
9
15
  * Sleep for the specified amount of time in milliseconds.
@@ -149,5 +155,25 @@ declare function isValidFunctionInfo(functionInfo: string): boolean;
149
155
  * @category Utils
150
156
  */
151
157
  declare function truncateAddress(address: string, start?: number, end?: number): string;
158
+ /**
159
+ * Calculates the paired FA metadata address for a given coin type.
160
+ * This function is tolerant of various address formats in the coin type string,
161
+ * including complex nested types.
162
+ *
163
+ * @example
164
+ * // All these formats are valid and will produce the same result:
165
+ * pairedFaMetadataAddress("0x1::aptos_coin::AptosCoin") // simple form
166
+ * pairedFaMetadataAddress("0x0000000000000000000000000000000000000000000000000000000000000001::aptos_coin::AptosCoin") // long form
167
+ * pairedFaMetadataAddress("0x00001::aptos_coin::AptosCoin") // with leading zeros
168
+ * pairedFaMetadataAddress("0x1::coin::Coin<0x1412::a::struct<0x0001::aptos_coin::AptosCoin>>") // nested type parameters
169
+ *
170
+ * @param coinType - The coin type string in any of these formats:
171
+ * - Short form address: "0x1::aptos_coin::AptosCoin"
172
+ * - Long form address: "0x0000000000000000000000000000000000000000000000000000000000000001::aptos_coin::AptosCoin"
173
+ * - With leading zeros: "0x00001::aptos_coin::AptosCoin"
174
+ * - With nested types: "0x1::coin::Coin<0x1412::a::struct<0x0001::aptos_coin::AptosCoin>>"
175
+ * @returns The calculated metadata address as an AccountAddress instance
176
+ */
177
+ declare function pairedFaMetadataAddress(coinType: `0x${string}::${string}::${string}`): AccountAddress;
152
178
 
153
- export { base64UrlDecode, base64UrlToBytes, convertAmountFromHumanReadableToOnChain, convertAmountFromOnChainToHumanReadable, floorToWholeHour, getErrorMessage, getFunctionParts, isEncodedStruct, isValidFunctionInfo, nowInSeconds, parseEncodedStruct, sleep, truncateAddress };
179
+ export { base64UrlDecode, base64UrlToBytes, convertAmountFromHumanReadableToOnChain, convertAmountFromOnChainToHumanReadable, floorToWholeHour, getErrorMessage, getFunctionParts, isEncodedStruct, isValidFunctionInfo, nowInSeconds, pairedFaMetadataAddress, parseEncodedStruct, sleep, truncateAddress };
@@ -1,2 +1,2 @@
1
- import{a,b,c,d,e,f,g,h,i,j,k,l,m}from"../chunk-ZELTLAUN.mjs";import"../chunk-LQOSHBB7.mjs";import"../chunk-3OLFJ65O.mjs";import"../chunk-4WPQQPUF.mjs";import"../chunk-R6QCPXQG.mjs";import"../chunk-RXHER6EA.mjs";import"../chunk-VHY6ZATX.mjs";import"../chunk-IF4UU2MT.mjs";import"../chunk-56CNRT2K.mjs";import"../chunk-KDMSOCZY.mjs";export{e as base64UrlDecode,f as base64UrlToBytes,g as convertAmountFromHumanReadableToOnChain,h as convertAmountFromOnChainToHumanReadable,d as floorToWholeHour,b as getErrorMessage,k as getFunctionParts,j as isEncodedStruct,l as isValidFunctionInfo,c as nowInSeconds,i as parseEncodedStruct,a as sleep,m as truncateAddress};
1
+ import{a,b,c,d,e,f,g,h,i,j,k,l,m,n}from"../chunk-PR72YXRK.mjs";import"../chunk-3IGJ2IMB.mjs";import"../chunk-EYLZD4JU.mjs";import"../chunk-3OLFJ65O.mjs";import"../chunk-B373VRCY.mjs";import"../chunk-4WPQQPUF.mjs";import"../chunk-RXHER6EA.mjs";import"../chunk-VHY6ZATX.mjs";import"../chunk-IF4UU2MT.mjs";import"../chunk-56CNRT2K.mjs";import"../chunk-KDMSOCZY.mjs";export{e as base64UrlDecode,f as base64UrlToBytes,g as convertAmountFromHumanReadableToOnChain,h as convertAmountFromOnChainToHumanReadable,d as floorToWholeHour,b as getErrorMessage,k as getFunctionParts,j as isEncodedStruct,l as isValidFunctionInfo,c as nowInSeconds,n as pairedFaMetadataAddress,i as parseEncodedStruct,a as sleep,m as truncateAddress};
2
2
  //# sourceMappingURL=helpers.mjs.map
@@ -1,7 +1,7 @@
1
1
  export { Network, NetworkToChainId, NetworkToFaucetAPI, NetworkToIndexerAPI, NetworkToNetworkName, NetworkToNodeAPI, NetworkToPepperAPI, NetworkToProverAPI } from './apiEndpoints.mjs';
2
2
  export { APTOS_COIN, APTOS_FA, AptosApiType, DEFAULT_MAX_GAS_AMOUNT, DEFAULT_TXN_EXP_SEC_FROM_NOW, DEFAULT_TXN_TIMEOUT_SEC, FIREBASE_AUTH_ISS_PATTERN, ProcessorType, RAW_TRANSACTION_SALT, RAW_TRANSACTION_WITH_DATA_SALT } from './const.mjs';
3
3
  export { DeserializableClass, normalizeBundle } from './normalizeBundle.mjs';
4
- export { base64UrlDecode, base64UrlToBytes, convertAmountFromHumanReadableToOnChain, convertAmountFromOnChainToHumanReadable, floorToWholeHour, getErrorMessage, getFunctionParts, isEncodedStruct, isValidFunctionInfo, nowInSeconds, parseEncodedStruct, sleep, truncateAddress } from './helpers.mjs';
4
+ export { base64UrlDecode, base64UrlToBytes, convertAmountFromHumanReadableToOnChain, convertAmountFromOnChainToHumanReadable, floorToWholeHour, getErrorMessage, getFunctionParts, isEncodedStruct, isValidFunctionInfo, nowInSeconds, pairedFaMetadataAddress, parseEncodedStruct, sleep, truncateAddress } from './helpers.mjs';
5
5
  import '../bcs/deserializer.mjs';
6
6
  import '../types/types.mjs';
7
7
  import '../types/indexer.mjs';
@@ -11,3 +11,5 @@ import '@aptos-labs/script-composer-pack';
11
11
  import '../bcs/serializer.mjs';
12
12
  import '../core/hex.mjs';
13
13
  import '../core/common.mjs';
14
+ import '../core/accountAddress.mjs';
15
+ import '../transactions/instances/transactionArgument.mjs';
@@ -1,2 +1,2 @@
1
- import"../chunk-HGLO5LDS.mjs";import{a as s}from"../chunk-BMPHQ3E7.mjs";import"../chunk-FZY4PMEE.mjs";import"../chunk-HHWJHOFZ.mjs";import"../chunk-TKXEVD7A.mjs";import"../chunk-ERLDXTIY.mjs";import"../chunk-RIINVEZA.mjs";import"../chunk-ZD2TY5N3.mjs";import{a as t,b as u,c as v,d as w,e as x,f as y,g as z,h as A,i as B,j as C,k as D,l as E,m as F}from"../chunk-ZELTLAUN.mjs";import"../chunk-LQOSHBB7.mjs";import"../chunk-3OLFJ65O.mjs";import"../chunk-4WPQQPUF.mjs";import"../chunk-R6QCPXQG.mjs";import"../chunk-RXHER6EA.mjs";import"../chunk-VHY6ZATX.mjs";import"../chunk-IF4UU2MT.mjs";import"../chunk-56CNRT2K.mjs";import{a,b,c,d,e,f,g,h}from"../chunk-4RXKALLC.mjs";import{a as i,b as j,c as k,d as l,e as m,f as n,g as o,h as p,i as q,j as r}from"../chunk-RJ7F4JDV.mjs";import"../chunk-KDMSOCZY.mjs";export{m as APTOS_COIN,n as APTOS_FA,i as AptosApiType,j as DEFAULT_MAX_GAS_AMOUNT,k as DEFAULT_TXN_EXP_SEC_FROM_NOW,l as DEFAULT_TXN_TIMEOUT_SEC,r as FIREBASE_AUTH_ISS_PATTERN,f as Network,g as NetworkToChainId,c as NetworkToFaucetAPI,a as NetworkToIndexerAPI,h as NetworkToNetworkName,b as NetworkToNodeAPI,d as NetworkToPepperAPI,e as NetworkToProverAPI,q as ProcessorType,o as RAW_TRANSACTION_SALT,p as RAW_TRANSACTION_WITH_DATA_SALT,x as base64UrlDecode,y as base64UrlToBytes,z as convertAmountFromHumanReadableToOnChain,A as convertAmountFromOnChainToHumanReadable,w as floorToWholeHour,u as getErrorMessage,D as getFunctionParts,C as isEncodedStruct,E as isValidFunctionInfo,s as normalizeBundle,v as nowInSeconds,B as parseEncodedStruct,t as sleep,F as truncateAddress};
1
+ import"../chunk-HGLO5LDS.mjs";import{a as s}from"../chunk-BMPHQ3E7.mjs";import{a as t,b as u,c as v,d as w,e as x,f as y,g as z,h as A,i as B,j as C,k as D,l as E,m as F,n as G}from"../chunk-PR72YXRK.mjs";import"../chunk-3IGJ2IMB.mjs";import"../chunk-EYLZD4JU.mjs";import"../chunk-FZY4PMEE.mjs";import"../chunk-HHWJHOFZ.mjs";import"../chunk-TKXEVD7A.mjs";import"../chunk-ERLDXTIY.mjs";import"../chunk-RIINVEZA.mjs";import"../chunk-3OLFJ65O.mjs";import"../chunk-B373VRCY.mjs";import"../chunk-4WPQQPUF.mjs";import"../chunk-ZD2TY5N3.mjs";import"../chunk-RXHER6EA.mjs";import"../chunk-VHY6ZATX.mjs";import"../chunk-IF4UU2MT.mjs";import"../chunk-56CNRT2K.mjs";import{a,b,c,d,e,f,g,h}from"../chunk-4RXKALLC.mjs";import{a as i,b as j,c as k,d as l,e as m,f as n,g as o,h as p,i as q,j as r}from"../chunk-RJ7F4JDV.mjs";import"../chunk-KDMSOCZY.mjs";export{m as APTOS_COIN,n as APTOS_FA,i as AptosApiType,j as DEFAULT_MAX_GAS_AMOUNT,k as DEFAULT_TXN_EXP_SEC_FROM_NOW,l as DEFAULT_TXN_TIMEOUT_SEC,r as FIREBASE_AUTH_ISS_PATTERN,f as Network,g as NetworkToChainId,c as NetworkToFaucetAPI,a as NetworkToIndexerAPI,h as NetworkToNetworkName,b as NetworkToNodeAPI,d as NetworkToPepperAPI,e as NetworkToProverAPI,q as ProcessorType,o as RAW_TRANSACTION_SALT,p as RAW_TRANSACTION_WITH_DATA_SALT,x as base64UrlDecode,y as base64UrlToBytes,z as convertAmountFromHumanReadableToOnChain,A as convertAmountFromOnChainToHumanReadable,w as floorToWholeHour,u as getErrorMessage,D as getFunctionParts,C as isEncodedStruct,E as isValidFunctionInfo,s as normalizeBundle,v as nowInSeconds,G as pairedFaMetadataAddress,B as parseEncodedStruct,t as sleep,F as truncateAddress};
2
2
  //# sourceMappingURL=index.mjs.map
@@ -1,2 +1,2 @@
1
- import{a}from"../chunk-BMPHQ3E7.mjs";import"../chunk-FZY4PMEE.mjs";import"../chunk-HHWJHOFZ.mjs";import"../chunk-TKXEVD7A.mjs";import"../chunk-ERLDXTIY.mjs";import"../chunk-RIINVEZA.mjs";import"../chunk-ZD2TY5N3.mjs";import"../chunk-3OLFJ65O.mjs";import"../chunk-4WPQQPUF.mjs";import"../chunk-R6QCPXQG.mjs";import"../chunk-RXHER6EA.mjs";import"../chunk-VHY6ZATX.mjs";import"../chunk-IF4UU2MT.mjs";import"../chunk-56CNRT2K.mjs";import"../chunk-KDMSOCZY.mjs";export{a as normalizeBundle};
1
+ import{a}from"../chunk-BMPHQ3E7.mjs";import"../chunk-FZY4PMEE.mjs";import"../chunk-HHWJHOFZ.mjs";import"../chunk-TKXEVD7A.mjs";import"../chunk-ERLDXTIY.mjs";import"../chunk-RIINVEZA.mjs";import"../chunk-3OLFJ65O.mjs";import"../chunk-B373VRCY.mjs";import"../chunk-4WPQQPUF.mjs";import"../chunk-ZD2TY5N3.mjs";import"../chunk-RXHER6EA.mjs";import"../chunk-VHY6ZATX.mjs";import"../chunk-IF4UU2MT.mjs";import"../chunk-56CNRT2K.mjs";import"../chunk-KDMSOCZY.mjs";export{a as normalizeBundle};
2
2
  //# sourceMappingURL=normalizeBundle.mjs.map
@@ -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.36.0";
6
+ declare const VERSION = "1.37.0";
7
7
 
8
8
  export { VERSION };
@@ -1,2 +1,2 @@
1
- import{a}from"./chunk-X5YB74NB.mjs";import"./chunk-KDMSOCZY.mjs";export{a as VERSION};
1
+ import{a}from"./chunk-GPG64UZT.mjs";import"./chunk-KDMSOCZY.mjs";export{a as VERSION};
2
2
  //# sourceMappingURL=version.mjs.map
package/package.json CHANGED
@@ -98,5 +98,11 @@
98
98
  "typedoc-plugin-missing-exports": "^3.1.0",
99
99
  "typescript": "^5.7.3"
100
100
  },
101
- "version": "1.36.0-zeta.0"
101
+ "pnpm": {
102
+ "overrides": {
103
+ "@babel/runtime": ">=7.26.10",
104
+ "@babel/helpers": ">=7.26.10"
105
+ }
106
+ },
107
+ "version": "1.37.0"
102
108
  }
@@ -6,6 +6,7 @@ import { AccountPublicKey, Ed25519PrivateKey, PrivateKeyInput, Signature, Verify
6
6
  import { Ed25519Account } from "./Ed25519Account";
7
7
  import { SingleKeyAccount } from "./SingleKeyAccount";
8
8
  import { AnyRawTransaction } from "../transactions/types";
9
+ import { AptosConfig } from "../api";
9
10
 
10
11
  /**
11
12
  * Arguments for creating an `Ed25519Account` from an `Ed25519PrivateKey`.
@@ -331,4 +332,23 @@ export abstract class Account {
331
332
  verifySignature(args: VerifySignatureArgs): boolean {
332
333
  return this.publicKey.verifySignature(args);
333
334
  }
335
+
336
+ /**
337
+ * Verify the given message and signature with the public key. It fetches any on chain state if needed for verification.
338
+ *
339
+ * @param args - The arguments for verifying the signature.
340
+ * @param args.aptosConfig - The configuration object for connecting to the Aptos network
341
+ * @param args.message - Raw message data in HexInput format.
342
+ * @param args.signature - Signed message signature.
343
+ * @returns A boolean indicating whether the signature is valid.
344
+ * @group Implementation
345
+ * @category Account (On-Chain Model)
346
+ */
347
+ async verifySignatureAsync(args: {
348
+ aptosConfig: AptosConfig;
349
+ message: HexInput;
350
+ signature: Signature;
351
+ }): Promise<boolean> {
352
+ return this.publicKey.verifySignatureAsync(args);
353
+ }
334
354
  }
@@ -1,10 +1,11 @@
1
1
  import { AccountAuthenticatorEd25519 } from "../transactions/authenticator/account";
2
2
  import { HexInput, SigningScheme } from "../types";
3
3
  import { AccountAddress, AccountAddressInput } from "../core/accountAddress";
4
- import { Ed25519PrivateKey, Ed25519PublicKey, Ed25519Signature } from "../core/crypto";
4
+ import { Ed25519PrivateKey, Ed25519PublicKey, Ed25519Signature, Signature } from "../core/crypto";
5
5
  import type { Account } from "./Account";
6
6
  import { AnyRawTransaction } from "../transactions/types";
7
7
  import { generateSigningMessageForTransaction } from "../transactions/transactionBuilder/signingMessage";
8
+ import { AptosConfig } from "../api";
8
9
 
9
10
  /**
10
11
  * Arguments required to create an instance of an Ed25519 signer.
@@ -131,6 +132,30 @@ export class Ed25519Account implements Account {
131
132
  return this.publicKey.verifySignature(args);
132
133
  }
133
134
 
135
+ /**
136
+ * Verify the given message and signature with the public key.
137
+ *
138
+ * Ed25519 signatures do not depend on chain state, so this function is equivalent to the synchronous verifySignature method.
139
+ *
140
+ * @param args - The arguments for verifying the signature.
141
+ * @param args.aptosConfig - The configuration object for connecting to the Aptos network
142
+ * @param args.message - Raw message data in HexInput format.
143
+ * @param args.signature - Signed message signature.
144
+ * @returns A boolean indicating whether the signature is valid.
145
+ * @group Implementation
146
+ * @category Account (On-Chain Model)
147
+ */
148
+ async verifySignatureAsync(args: {
149
+ aptosConfig: AptosConfig;
150
+ message: HexInput;
151
+ signature: Signature;
152
+ }): Promise<boolean> {
153
+ return this.publicKey.verifySignatureAsync({
154
+ ...args,
155
+ signature: args.signature,
156
+ });
157
+ }
158
+
134
159
  /**
135
160
  * Sign a message using the account's Ed25519 private key.
136
161
  * This function returns an AccountAuthenticator containing the signature along with the account's public key.
@@ -1,5 +1,6 @@
1
+ import { AptosConfig } from "../api";
1
2
  import { AccountAddress, AccountAddressInput } from "../core/accountAddress";
2
- import { Ed25519PrivateKey } from "../core/crypto";
3
+ import { Ed25519PrivateKey, Signature } from "../core/crypto";
3
4
  import { MultiEd25519PublicKey, MultiEd25519Signature } from "../core/crypto/multiEd25519";
4
5
  import { AccountAuthenticatorMultiEd25519 } from "../transactions/authenticator/account";
5
6
  import { generateSigningMessageForTransaction } from "../transactions/transactionBuilder/signingMessage";
@@ -110,6 +111,32 @@ export class MultiEd25519Account implements Account {
110
111
  return this.publicKey.verifySignature(args);
111
112
  }
112
113
 
114
+ /**
115
+ * Verify the given message and signature with the public key.
116
+ *
117
+ * MultiEd25519 signatures do not depend on chain state, so this function is
118
+ * equivalent to the synchronous verifySignature method.
119
+ *
120
+ * @param args - The arguments for verifying the signature.
121
+ * @param args.aptosConfig - The configuration object for connecting to the Aptos network
122
+ * @param args.message - Raw message data in HexInput format.
123
+ * @param args.signature - Signed message signature.
124
+ * @returns A boolean indicating whether the signature is valid.
125
+ * @group Implementation
126
+ * @category Account (On-Chain Model)
127
+ */
128
+ async verifySignatureAsync(args: {
129
+ aptosConfig: AptosConfig;
130
+ message: HexInput;
131
+ signature: Signature;
132
+ options?: { throwErrorWithReason?: boolean };
133
+ }): Promise<boolean> {
134
+ return this.publicKey.verifySignatureAsync({
135
+ ...args,
136
+ signature: args.signature,
137
+ });
138
+ }
139
+
113
140
  /**
114
141
  * Sign a message using the account's Ed25519 private key.
115
142
  * @param message the signing message, as binary input
@@ -280,6 +280,7 @@ export class MultiKeyAccount implements Account, KeylessSigner {
280
280
  * @param args - The arguments for verifying the signature.
281
281
  * @param args.message - The raw message data in HexInput format.
282
282
  * @param args.signature - The signed message MultiKeySignature containing multiple signatures.
283
+ * @param args.options.throwErrorWithReason - Whether to throw an error with the reason for the verification failure.
283
284
  * @returns A boolean indicating whether the signatures are valid for the message.
284
285
  * @group Implementation
285
286
  * @category Account (On-Chain Model)
@@ -288,6 +289,7 @@ export class MultiKeyAccount implements Account, KeylessSigner {
288
289
  aptosConfig: AptosConfig;
289
290
  message: HexInput;
290
291
  signature: MultiKeySignature;
292
+ options?: { throwErrorWithReason?: boolean };
291
293
  }): Promise<boolean> {
292
294
  return await this.publicKey.verifySignatureAsync(args);
293
295
  }
@@ -1,11 +1,20 @@
1
1
  import { AccountAuthenticatorSingleKey } from "../transactions/authenticator/account";
2
2
  import { type HexInput, SigningScheme, SigningSchemeInput } from "../types";
3
3
  import { AccountAddress, AccountAddressInput } from "../core/accountAddress";
4
- import { AnyPublicKey, AnySignature, Ed25519PrivateKey, PrivateKeyInput, Secp256k1PrivateKey } from "../core/crypto";
4
+ import {
5
+ AnyPublicKey,
6
+ AnySignature,
7
+ Ed25519PrivateKey,
8
+ KeylessSignature,
9
+ PrivateKeyInput,
10
+ Secp256k1PrivateKey,
11
+ Signature,
12
+ } from "../core/crypto";
5
13
  import type { Account } from "./Account";
6
14
  import { generateSigningMessageForTransaction } from "../transactions/transactionBuilder/signingMessage";
7
15
  import { AnyRawTransaction } from "../transactions/types";
8
16
  import { Ed25519Account } from "./Ed25519Account";
17
+ import { AptosConfig } from "../api";
9
18
 
10
19
  /**
11
20
  * An interface which defines if an Account utilizes SingleKey signing.
@@ -188,6 +197,31 @@ export class SingleKeyAccount implements Account, SingleKeySigner {
188
197
  return this.publicKey.verifySignature(args);
189
198
  }
190
199
 
200
+ /**
201
+ * Verify the given message and signature with the account's public key.
202
+ *
203
+ * This function checks if the provided signature is valid for the given message using the account's public key.
204
+ *
205
+ * @param args - The arguments for verifying the signature.
206
+ * @param args.message - The raw message data in HexInput format.
207
+ * @param args.signature - The signed message signature.
208
+ * @param args.options.throwErrorWithReason - Whether to throw an error with the reason for the verification failure.
209
+ * @returns A boolean indicating whether the signature is valid for the message.
210
+ * @group Implementation
211
+ * @category Account (On-Chain Model)
212
+ */
213
+ async verifySignatureAsync(args: {
214
+ aptosConfig: AptosConfig;
215
+ message: HexInput;
216
+ signature: Signature;
217
+ options?: { throwErrorWithReason?: boolean };
218
+ }): Promise<boolean> {
219
+ return this.publicKey.verifySignatureAsync({
220
+ ...args,
221
+ signature: args.signature,
222
+ });
223
+ }
224
+
191
225
  /**
192
226
  * Sign a message using the account's private key and return an AccountAuthenticator containing the signature along with the
193
227
  * account's public key.
@@ -6,6 +6,7 @@ import { AccountAddress, PrivateKey, AccountAddressInput, createObjectAddress }
6
6
  import {
7
7
  AccountData,
8
8
  AnyNumber,
9
+ CursorPaginationArgs,
9
10
  GetAccountCoinsDataResponse,
10
11
  GetAccountCollectionsWithOwnedTokenResponse,
11
12
  GetAccountOwnedTokensFromCollectionResponse,
@@ -35,8 +36,10 @@ import {
35
36
  getInfo,
36
37
  getModule,
37
38
  getModules,
39
+ getModulesPage,
38
40
  getResource,
39
41
  getResources,
42
+ getResourcesPage,
40
43
  getTransactions,
41
44
  lookupOriginalAccountAddress,
42
45
  } from "../internal/account";
@@ -112,7 +115,6 @@ export class Account {
112
115
  * This function may call the API multiple times to auto paginate through results.
113
116
  *
114
117
  * @param args.accountAddress - The Aptos account address to query modules for.
115
- * @param args.options.offset - The cursor to start returning results from. Note, this is obfuscated and is not an index.
116
118
  * @param args.options.limit - The maximum number of results to return.
117
119
  * @param args.options.ledgerVersion - The ledger version to query; if not provided, it retrieves the latest version.
118
120
  *
@@ -130,7 +132,6 @@ export class Account {
130
132
  * const accountModules = await aptos.getAccountModules({
131
133
  * accountAddress: "0x1", // replace with a real account address
132
134
  * options: {
133
- * offset: 0, // starting from the first module
134
135
  * limit: 10, // limiting to 10 modules
135
136
  * },
136
137
  * });
@@ -143,11 +144,52 @@ export class Account {
143
144
  */
144
145
  async getAccountModules(args: {
145
146
  accountAddress: AccountAddressInput;
146
- options?: PaginationArgs & LedgerVersionArg;
147
+ options?: { limit?: number } & LedgerVersionArg;
147
148
  }): Promise<MoveModuleBytecode[]> {
148
149
  return getModules({ aptosConfig: this.config, ...args });
149
150
  }
150
151
 
152
+ /**
153
+ * Queries for a page of modules in an account given an account address.
154
+ *
155
+ * @param args.accountAddress - The Aptos account address to query modules for.
156
+ * @param args.options.cursor - The cursor to start returning results from. Note, this is obfuscated and is not an index.
157
+ * @param args.options.limit - The maximum number of results to return.
158
+ * @param args.options.ledgerVersion - The ledger version to query; if not provided, it retrieves the latest version.
159
+ *
160
+ * @returns - The account modules associated with the specified address. Along with a cursor for future pagination. If the cursor is undefined, it means there are no more modules to fetch.
161
+ *
162
+ * @example
163
+ * ```typescript
164
+ * import { Aptos, AptosConfig, Network } from "@aptos-labs/ts-sdk";
165
+ *
166
+ * const config = new AptosConfig({ network: Network.TESTNET });
167
+ * const aptos = new Aptos(config);
168
+ *
169
+ * async function runExample() {
170
+ * // Fetching account modules for a specific account
171
+ * const {modules, cursor} = await aptos.getAccountModulesPage({
172
+ * accountAddress: "0x1", // replace with a real account address
173
+ * options: {
174
+ * cursor: undefined, // starting from the first module
175
+ * limit: 10, // limiting to 10 modules
176
+ * },
177
+ * });
178
+ *
179
+ * console.log(modules);
180
+ * console.log(`More to fetch: ${cursor !== undefined}`);
181
+ * }
182
+ * runExample().catch(console.error);
183
+ * ```
184
+ * @group Account
185
+ */
186
+ async getAccountModulesPage(args: {
187
+ accountAddress: AccountAddressInput;
188
+ options?: CursorPaginationArgs & LedgerVersionArg;
189
+ }): Promise<{ modules: MoveModuleBytecode[]; cursor: string | undefined }> {
190
+ return getModulesPage({ aptosConfig: this.config, ...args });
191
+ }
192
+
151
193
  /**
152
194
  * Queries for a specific account module given an account address and module name.
153
195
  *
@@ -234,7 +276,6 @@ export class Account {
234
276
  * This function may call the API multiple times to auto paginate through results.
235
277
  *
236
278
  * @param args.accountAddress - The Aptos account address to query resources for.
237
- * @param args.options.offset - The cursor to start returning results from. Note, this is obfuscated and is not an index.
238
279
  * @param args.options.limit - The maximum number of results to return.
239
280
  * @param args.options.ledgerVersion - The ledger version to query; if not provided, it will get the latest version.
240
281
  * @returns Account resources.
@@ -262,6 +303,45 @@ export class Account {
262
303
  return getResources({ aptosConfig: this.config, ...args });
263
304
  }
264
305
 
306
+ /**
307
+ * Queries a page of account resources given an account address.
308
+ *
309
+ * @param args.accountAddress - The Aptos account address to query resources for.
310
+ * @param args.options.cursor - The cursor to start returning results from. Note, this is obfuscated and is not an index.
311
+ * @param args.options.limit - The maximum number of results to return.
312
+ * @param args.options.ledgerVersion - The ledger version to query; if not provided, it will get the latest version.
313
+ * @returns Account resources.
314
+ *
315
+ * @example
316
+ * ```typescript
317
+ * import { Aptos, AptosConfig, Network } from "@aptos-labs/ts-sdk";
318
+ *
319
+ * const config = new AptosConfig({ network: Network.TESTNET });
320
+ * const aptos = new Aptos(config);
321
+ *
322
+ * async function runExample() {
323
+ * // Fetching account resources for a specific account address
324
+ * const resources = await aptos.getAccountResourcesPage({
325
+ * accountAddress: "0x1", // replace with a real account address
326
+ * options: {
327
+ * cursor: undefined, // starting from the first resource
328
+ * limit: 10, // limiting to 10 resources
329
+ * },
330
+ * });
331
+ * console.log(resources);
332
+ * console.log(`More to fetch: ${resources.cursor !== undefined}`);
333
+ * }
334
+ * runExample().catch(console.error);
335
+ * ```
336
+ * @group Account
337
+ */
338
+ async getAccountResourcesPage(args: {
339
+ accountAddress: AccountAddressInput;
340
+ options?: CursorPaginationArgs & LedgerVersionArg;
341
+ }): Promise<{ resources: MoveResource[]; cursor: string | undefined }> {
342
+ return getResourcesPage({ aptosConfig: this.config, ...args });
343
+ }
344
+
265
345
  /**
266
346
  * Queries a specific account resource given an account address and resource type.
267
347
  *
package/src/client/get.ts CHANGED
@@ -234,7 +234,7 @@ export async function getAptosPepperService<Req extends {}, Res extends {}>(
234
234
  export async function paginateWithCursor<Req extends Record<string, any>, Res extends Array<{}>>(
235
235
  options: GetAptosRequestOptions,
236
236
  ): Promise<Res> {
237
- const out: any[] = [];
237
+ const out: Res = new Array(0) as Res;
238
238
  let cursor: string | undefined;
239
239
  const requestParams = options.params as { start?: string; limit?: number };
240
240
  do {
@@ -261,38 +261,31 @@ export async function paginateWithCursor<Req extends Record<string, any>, Res ex
261
261
  out.push(...response.data);
262
262
  requestParams.start = cursor;
263
263
  } while (cursor !== null && cursor !== undefined);
264
- return out as Res;
264
+ return out;
265
265
  }
266
266
 
267
267
  /// This function is a helper for paginating using a function wrapping an API using offset instead of start
268
268
  export async function paginateWithObfuscatedCursor<Req extends Record<string, any>, Res extends Array<{}>>(
269
269
  options: GetAptosRequestOptions,
270
270
  ): Promise<Res> {
271
- const out: any[] = [];
271
+ const out: Res = new Array(0) as Res;
272
272
  let cursor: string | undefined;
273
- const requestParams = options.params as { offset?: string; limit?: number };
273
+ const requestParams = options.params as { start?: string; limit?: number };
274
274
  const totalLimit = requestParams.limit;
275
275
  do {
276
276
  // eslint-disable-next-line no-await-in-loop
277
- const response = await get<Req, Res>({
278
- type: AptosApiType.FULLNODE,
279
- aptosConfig: options.aptosConfig,
280
- originMethod: options.originMethod,
281
- path: options.path,
282
- params: requestParams,
283
- overrides: options.overrides,
284
- });
277
+ const { response, cursor: newCursor } = await getPageWithObfuscatedCursor<Req, Res>({ ...options });
278
+
285
279
  /**
286
280
  * the cursor is a "state key" from the API perspective. Client
287
281
  * should not need to "care" what it represents but just use it
288
282
  * to query the next chunk of data.
289
283
  */
290
- cursor = response.headers["x-aptos-cursor"];
291
- // Now that we have the cursor (if any), we remove the headers before
292
- // adding these to the output of this function.
293
- delete response.headers;
284
+ cursor = newCursor;
294
285
  out.push(...response.data);
295
- requestParams.offset = cursor;
286
+ if (options?.params) {
287
+ options.params.start = cursor;
288
+ }
296
289
 
297
290
  // Re-evaluate length
298
291
  if (totalLimit !== undefined) {
@@ -303,5 +296,39 @@ export async function paginateWithObfuscatedCursor<Req extends Record<string, an
303
296
  requestParams.limit = newLimit;
304
297
  }
305
298
  } while (cursor !== null && cursor !== undefined);
306
- return out as Res;
299
+ return out;
300
+ }
301
+
302
+ export async function getPageWithObfuscatedCursor<Req extends Record<string, any>, Res extends Array<{}>>(
303
+ options: GetAptosRequestOptions,
304
+ ): Promise<{ response: AptosResponse<Req, Res>; cursor: string | undefined }> {
305
+ let cursor: string | undefined;
306
+ let requestParams: { start?: string; limit?: number } = {};
307
+
308
+ // Drop any other values
309
+ // TODO: Throw error if cursor is not a string
310
+ if (typeof options.params?.cursor === "string") {
311
+ requestParams.start = options.params.cursor;
312
+ }
313
+ if (typeof options.params?.limit === "number") {
314
+ requestParams.limit = options.params.limit;
315
+ }
316
+
317
+ // eslint-disable-next-line no-await-in-loop
318
+ const response = await get<Req, Res>({
319
+ type: AptosApiType.FULLNODE,
320
+ aptosConfig: options.aptosConfig,
321
+ originMethod: options.originMethod,
322
+ path: options.path,
323
+ params: requestParams,
324
+ overrides: options.overrides,
325
+ });
326
+
327
+ /**
328
+ * the cursor is a "state key" from the API perspective. Client
329
+ * should not need to "care" what it represents but just use it
330
+ * to query the next chunk of data.
331
+ */
332
+ cursor = response.headers["x-aptos-cursor"];
333
+ return { response, cursor };
307
334
  }
@@ -183,6 +183,31 @@ export class AccountAddress extends Serializable implements TransactionArgument
183
183
  return bytesToHex(this.data);
184
184
  }
185
185
 
186
+ /**
187
+ * Convert the account address to a string in SHORT format, which is 0x followed by the shortest
188
+ * possible representation (no leading zeros).
189
+ *
190
+ * @returns AccountAddress as a string in SHORT form.
191
+ * @group Implementation
192
+ * @category Serialization
193
+ */
194
+ toStringShort(): `0x${string}` {
195
+ return `0x${this.toStringShortWithoutPrefix()}`;
196
+ }
197
+
198
+ /**
199
+ * Returns a lossless short string representation of the address by trimming leading zeros.
200
+ * If the address consists of all zeros, returns "0".
201
+ *
202
+ * @returns A string representation of the address without leading zeros
203
+ * @group Implementation
204
+ * @category Serialization
205
+ */
206
+ toStringShortWithoutPrefix(): string {
207
+ const hex = bytesToHex(this.data).replace(/^0+/, "");
208
+ return hex === "" ? "0" : hex;
209
+ }
210
+
186
211
  /**
187
212
  * Get the inner data as a Uint8Array.
188
213
  * The inner data is already a Uint8Array, so no conversion takes place.