@aptos-labs/ts-sdk 7.2.0 → 7.4.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (259) hide show
  1. package/LICENSE +43 -43
  2. package/README.md +36 -20
  3. package/dist/account/AbstractKeylessAccount.d.ts.map +1 -1
  4. package/dist/account/AbstractKeylessAccount.js.map +1 -1
  5. package/dist/account/AbstractedAccount.d.ts.map +1 -1
  6. package/dist/account/Account.d.ts.map +1 -1
  7. package/dist/account/Account.js.map +1 -1
  8. package/dist/account/AccountUtils.js.map +1 -1
  9. package/dist/account/DerivableAbstractedAccount.d.ts.map +1 -1
  10. package/dist/account/DerivableAbstractedAccount.js.map +1 -1
  11. package/dist/account/Ed25519Account.d.ts.map +1 -1
  12. package/dist/account/EphemeralKeyPair.d.ts.map +1 -1
  13. package/dist/account/EphemeralKeyPair.js.map +1 -1
  14. package/dist/account/FederatedKeylessAccount.d.ts.map +1 -1
  15. package/dist/account/KeylessAccount.d.ts.map +1 -1
  16. package/dist/account/MultiEd25519Account.d.ts.map +1 -1
  17. package/dist/account/MultiKeyAccount.d.ts.map +1 -1
  18. package/dist/account/SingleKeyAccount.d.ts.map +1 -1
  19. package/dist/account/SingleKeyAccount.js.map +1 -1
  20. package/dist/api/account/abstraction.d.ts +10 -0
  21. package/dist/api/account/abstraction.d.ts.map +1 -1
  22. package/dist/api/account/abstraction.js +19 -6
  23. package/dist/api/account/abstraction.js.map +1 -1
  24. package/dist/api/account.d.ts.map +1 -1
  25. package/dist/api/account.js.map +1 -1
  26. package/dist/api/ans.d.ts +9 -0
  27. package/dist/api/ans.d.ts.map +1 -1
  28. package/dist/api/ans.js +5 -0
  29. package/dist/api/ans.js.map +1 -1
  30. package/dist/api/aptos.d.ts.map +1 -1
  31. package/dist/api/aptosConfig.d.ts +12 -0
  32. package/dist/api/aptosConfig.d.ts.map +1 -1
  33. package/dist/api/aptosConfig.js +13 -0
  34. package/dist/api/aptosConfig.js.map +1 -1
  35. package/dist/api/coin.d.ts +2 -0
  36. package/dist/api/coin.d.ts.map +1 -1
  37. package/dist/api/coin.js +1 -0
  38. package/dist/api/coin.js.map +1 -1
  39. package/dist/api/digitalAsset.d.ts +30 -0
  40. package/dist/api/digitalAsset.d.ts.map +1 -1
  41. package/dist/api/digitalAsset.js +15 -0
  42. package/dist/api/digitalAsset.js.map +1 -1
  43. package/dist/api/faucet.d.ts.map +1 -1
  44. package/dist/api/faucet.js.map +1 -1
  45. package/dist/api/fungibleAsset.d.ts +4 -0
  46. package/dist/api/fungibleAsset.d.ts.map +1 -1
  47. package/dist/api/fungibleAsset.js +2 -0
  48. package/dist/api/fungibleAsset.js.map +1 -1
  49. package/dist/api/general.d.ts.map +1 -1
  50. package/dist/api/keyless.d.ts +38 -1
  51. package/dist/api/keyless.d.ts.map +1 -1
  52. package/dist/api/keyless.js +29 -1
  53. package/dist/api/keyless.js.map +1 -1
  54. package/dist/api/object.d.ts.map +1 -1
  55. package/dist/api/object.js.map +1 -1
  56. package/dist/api/staking.d.ts.map +1 -1
  57. package/dist/api/staking.js.map +1 -1
  58. package/dist/api/table.d.ts.map +1 -1
  59. package/dist/api/transaction.d.ts +41 -1
  60. package/dist/api/transaction.d.ts.map +1 -1
  61. package/dist/api/transaction.js +42 -2
  62. package/dist/api/transaction.js.map +1 -1
  63. package/dist/api/transactionSubmission/build.d.ts +7 -5
  64. package/dist/api/transactionSubmission/build.d.ts.map +1 -1
  65. package/dist/api/transactionSubmission/build.js +13 -5
  66. package/dist/api/transactionSubmission/build.js.map +1 -1
  67. package/dist/api/transactionSubmission/management.d.ts.map +1 -1
  68. package/dist/api/transactionSubmission/sign.d.ts.map +1 -1
  69. package/dist/api/transactionSubmission/simulate.d.ts +7 -3
  70. package/dist/api/transactionSubmission/simulate.d.ts.map +1 -1
  71. package/dist/api/transactionSubmission/simulate.js +7 -3
  72. package/dist/api/transactionSubmission/simulate.js.map +1 -1
  73. package/dist/api/transactionSubmission/submit.d.ts.map +1 -1
  74. package/dist/bcs/deserializer.d.ts.map +1 -1
  75. package/dist/bcs/serializable/entryFunctionBytes.d.ts.map +1 -1
  76. package/dist/bcs/serializable/fixedBytes.d.ts.map +1 -1
  77. package/dist/bcs/serializable/movePrimitives.d.ts.map +1 -1
  78. package/dist/bcs/serializable/moveStructs.d.ts +72 -28
  79. package/dist/bcs/serializable/moveStructs.d.ts.map +1 -1
  80. package/dist/bcs/serializable/moveStructs.js +76 -28
  81. package/dist/bcs/serializable/moveStructs.js.map +1 -1
  82. package/dist/bcs/serializer.d.ts.map +1 -1
  83. package/dist/bcs/serializer.js.map +1 -1
  84. package/dist/cli/localNode.d.ts.map +1 -1
  85. package/dist/cli/localNode.js +16 -3
  86. package/dist/cli/localNode.js.map +1 -1
  87. package/dist/cli/move.d.ts.map +1 -1
  88. package/dist/cli/move.js.map +1 -1
  89. package/dist/client/core.d.ts +3 -0
  90. package/dist/client/core.d.ts.map +1 -1
  91. package/dist/client/core.js +116 -9
  92. package/dist/client/core.js.map +1 -1
  93. package/dist/core/account/utils/address.d.ts.map +1 -1
  94. package/dist/core/accountAddress.d.ts.map +1 -1
  95. package/dist/core/accountAddress.js.map +1 -1
  96. package/dist/core/authenticationKey.d.ts.map +1 -1
  97. package/dist/core/authenticationKey.js.map +1 -1
  98. package/dist/core/common.d.ts.map +1 -1
  99. package/dist/core/crypto/abstraction.d.ts.map +1 -1
  100. package/dist/core/crypto/ed25519.d.ts.map +1 -1
  101. package/dist/core/crypto/ed25519.js.map +1 -1
  102. package/dist/core/crypto/encryption/ciphertext.d.ts.map +1 -1
  103. package/dist/core/crypto/encryption/symmetric.d.ts.map +1 -1
  104. package/dist/core/crypto/encryption/symmetric.js.map +1 -1
  105. package/dist/core/crypto/ephemeral.d.ts.map +1 -1
  106. package/dist/core/crypto/federatedKeyless.d.ts.map +1 -1
  107. package/dist/core/crypto/hdKey.d.ts.map +1 -1
  108. package/dist/core/crypto/keyless.d.ts.map +1 -1
  109. package/dist/core/crypto/keyless.js.map +1 -1
  110. package/dist/core/crypto/multiEd25519.d.ts.map +1 -1
  111. package/dist/core/crypto/multiEd25519.js.map +1 -1
  112. package/dist/core/crypto/multiKey.d.ts.map +1 -1
  113. package/dist/core/crypto/multiKey.js.map +1 -1
  114. package/dist/core/crypto/privateKey.d.ts.map +1 -1
  115. package/dist/core/crypto/privateKey.js.map +1 -1
  116. package/dist/core/crypto/publicKey.d.ts.map +1 -1
  117. package/dist/core/crypto/secp256k1.d.ts.map +1 -1
  118. package/dist/core/crypto/secp256k1.js.map +1 -1
  119. package/dist/core/crypto/secp256r1.d.ts.map +1 -1
  120. package/dist/core/crypto/secp256r1.js.map +1 -1
  121. package/dist/core/crypto/signature.d.ts.map +1 -1
  122. package/dist/core/crypto/singleKey.d.ts.map +1 -1
  123. package/dist/core/crypto/singleKey.js.map +1 -1
  124. package/dist/core/crypto/utils.d.ts.map +1 -1
  125. package/dist/core/hex.d.ts.map +1 -1
  126. package/dist/errors/index.d.ts.map +1 -1
  127. package/dist/functions/keyless.d.ts +1 -1
  128. package/dist/functions/keyless.d.ts.map +1 -1
  129. package/dist/functions/keyless.js +1 -1
  130. package/dist/functions/keyless.js.map +1 -1
  131. package/dist/functions/transaction.d.ts +1 -1
  132. package/dist/functions/transaction.d.ts.map +1 -1
  133. package/dist/functions/transaction.js +1 -1
  134. package/dist/functions/transaction.js.map +1 -1
  135. package/dist/internal/abstraction.d.ts +35 -0
  136. package/dist/internal/abstraction.d.ts.map +1 -1
  137. package/dist/internal/abstraction.js +38 -3
  138. package/dist/internal/abstraction.js.map +1 -1
  139. package/dist/internal/account.d.ts +6 -0
  140. package/dist/internal/account.d.ts.map +1 -1
  141. package/dist/internal/account.js +55 -37
  142. package/dist/internal/account.js.map +1 -1
  143. package/dist/internal/ans.d.ts +11 -0
  144. package/dist/internal/ans.d.ts.map +1 -1
  145. package/dist/internal/ans.js +18 -6
  146. package/dist/internal/ans.js.map +1 -1
  147. package/dist/internal/coin.d.ts +2 -0
  148. package/dist/internal/coin.d.ts.map +1 -1
  149. package/dist/internal/coin.js +3 -1
  150. package/dist/internal/coin.js.map +1 -1
  151. package/dist/internal/digitalAsset.d.ts +30 -0
  152. package/dist/internal/digitalAsset.d.ts.map +1 -1
  153. package/dist/internal/digitalAsset.js +45 -15
  154. package/dist/internal/digitalAsset.js.map +1 -1
  155. package/dist/internal/fungibleAsset.d.ts +4 -0
  156. package/dist/internal/fungibleAsset.d.ts.map +1 -1
  157. package/dist/internal/fungibleAsset.js +6 -2
  158. package/dist/internal/fungibleAsset.js.map +1 -1
  159. package/dist/internal/keyless.d.ts +39 -1
  160. package/dist/internal/keyless.d.ts.map +1 -1
  161. package/dist/internal/keyless.js +71 -13
  162. package/dist/internal/keyless.js.map +1 -1
  163. package/dist/internal/transaction.d.ts +24 -1
  164. package/dist/internal/transaction.d.ts.map +1 -1
  165. package/dist/internal/transaction.js +125 -4
  166. package/dist/internal/transaction.js.map +1 -1
  167. package/dist/internal/transactionSubmission.d.ts +2 -0
  168. package/dist/internal/transactionSubmission.d.ts.map +1 -1
  169. package/dist/internal/transactionSubmission.js +3 -1
  170. package/dist/internal/transactionSubmission.js.map +1 -1
  171. package/dist/transactions/authenticator/account.d.ts.map +1 -1
  172. package/dist/transactions/authenticator/transaction.d.ts.map +1 -1
  173. package/dist/transactions/instances/chainId.d.ts.map +1 -1
  174. package/dist/transactions/instances/encryptedPayload.d.ts.map +1 -1
  175. package/dist/transactions/instances/encryptedPayload.js.map +1 -1
  176. package/dist/transactions/instances/identifier.d.ts.map +1 -1
  177. package/dist/transactions/instances/moduleId.d.ts.map +1 -1
  178. package/dist/transactions/instances/multiAgentTransaction.d.ts.map +1 -1
  179. package/dist/transactions/instances/rawTransaction.d.ts.map +1 -1
  180. package/dist/transactions/instances/rotationProofChallenge.d.ts.map +1 -1
  181. package/dist/transactions/instances/signedTransaction.d.ts.map +1 -1
  182. package/dist/transactions/instances/simpleTransaction.d.ts.map +1 -1
  183. package/dist/transactions/instances/transactionPayload.d.ts.map +1 -1
  184. package/dist/transactions/management/accountSequenceNumber.d.ts.map +1 -1
  185. package/dist/transactions/management/asyncQueue.d.ts.map +1 -1
  186. package/dist/transactions/management/transactionWorker.d.ts +10 -6
  187. package/dist/transactions/management/transactionWorker.d.ts.map +1 -1
  188. package/dist/transactions/management/transactionWorker.js +28 -24
  189. package/dist/transactions/management/transactionWorker.js.map +1 -1
  190. package/dist/transactions/transactionBuilder/index.d.ts +1 -0
  191. package/dist/transactions/transactionBuilder/index.d.ts.map +1 -1
  192. package/dist/transactions/transactionBuilder/index.js +1 -0
  193. package/dist/transactions/transactionBuilder/index.js.map +1 -1
  194. package/dist/transactions/transactionBuilder/scriptAbi.d.ts +10 -0
  195. package/dist/transactions/transactionBuilder/scriptAbi.d.ts.map +1 -0
  196. package/dist/transactions/transactionBuilder/scriptAbi.js +863 -0
  197. package/dist/transactions/transactionBuilder/scriptAbi.js.map +1 -0
  198. package/dist/transactions/transactionBuilder/structEnumParser.d.ts.map +1 -1
  199. package/dist/transactions/transactionBuilder/structEnumParser.js.map +1 -1
  200. package/dist/transactions/transactionBuilder/transactionBuilder.d.ts +7 -2
  201. package/dist/transactions/transactionBuilder/transactionBuilder.d.ts.map +1 -1
  202. package/dist/transactions/transactionBuilder/transactionBuilder.js +65 -1
  203. package/dist/transactions/transactionBuilder/transactionBuilder.js.map +1 -1
  204. package/dist/transactions/typeTag/index.d.ts.map +1 -1
  205. package/dist/transactions/typeTag/index.js.map +1 -1
  206. package/dist/transactions/typeTag/parser.d.ts.map +1 -1
  207. package/dist/transactions/typeTag/parser.js.map +1 -1
  208. package/dist/transactions/types.d.ts +9 -4
  209. package/dist/transactions/types.d.ts.map +1 -1
  210. package/dist/types/generated/queries.d.ts.map +1 -1
  211. package/dist/types/generated/queries.js.map +1 -1
  212. package/dist/types/keyless.d.ts +2 -2
  213. package/dist/types/keyless.d.ts.map +1 -1
  214. package/dist/types/types.d.ts +7 -2
  215. package/dist/types/types.d.ts.map +1 -1
  216. package/dist/types/types.js.map +1 -1
  217. package/dist/utils/const.d.ts +11 -0
  218. package/dist/utils/const.d.ts.map +1 -1
  219. package/dist/utils/const.js +11 -0
  220. package/dist/utils/const.js.map +1 -1
  221. package/dist/utils/helpers.d.ts.map +1 -1
  222. package/dist/utils/helpers.js.map +1 -1
  223. package/dist/utils/runtime.js.map +1 -1
  224. package/dist/version.d.ts +1 -1
  225. package/dist/version.js +1 -1
  226. package/package.json +27 -25
  227. package/src/api/account/abstraction.ts +23 -6
  228. package/src/api/ans.ts +9 -0
  229. package/src/api/aptosConfig.ts +14 -0
  230. package/src/api/coin.ts +2 -0
  231. package/src/api/digitalAsset.ts +30 -0
  232. package/src/api/fungibleAsset.ts +4 -0
  233. package/src/api/keyless.ts +39 -1
  234. package/src/api/transaction.ts +48 -1
  235. package/src/api/transactionSubmission/build.ts +16 -6
  236. package/src/api/transactionSubmission/simulate.ts +7 -3
  237. package/src/bcs/serializable/moveStructs.ts +80 -28
  238. package/src/cli/localNode.ts +17 -3
  239. package/src/client/core.ts +150 -10
  240. package/src/functions/keyless.ts +1 -0
  241. package/src/functions/transaction.ts +1 -0
  242. package/src/internal/abstraction.ts +41 -3
  243. package/src/internal/account.ts +60 -38
  244. package/src/internal/ans.ts +24 -6
  245. package/src/internal/coin.ts +4 -1
  246. package/src/internal/digitalAsset.ts +60 -9
  247. package/src/internal/fungibleAsset.ts +8 -2
  248. package/src/internal/keyless.ts +91 -14
  249. package/src/internal/transaction.ts +154 -4
  250. package/src/internal/transactionSubmission.ts +4 -1
  251. package/src/transactions/management/transactionWorker.ts +35 -23
  252. package/src/transactions/transactionBuilder/index.ts +1 -0
  253. package/src/transactions/transactionBuilder/scriptAbi.ts +1145 -0
  254. package/src/transactions/transactionBuilder/transactionBuilder.ts +97 -6
  255. package/src/transactions/types.ts +10 -4
  256. package/src/types/keyless.ts +2 -2
  257. package/src/types/types.ts +8 -2
  258. package/src/utils/const.ts +12 -0
  259. package/src/version.ts +1 -1
@@ -319,6 +319,7 @@ const createCollectionAbi: EntryFunctionABI = {
319
319
  * @param args.description - A description of the collection.
320
320
  * @param args.name - The name of the collection.
321
321
  * @param args.uri - The URI associated with the collection.
322
+ * @param args.withFeePayer - Whether to build a fee-payer transaction.
322
323
  * @param args.options - Optional parameters for generating the transaction.
323
324
  * @param args.maxSupply - The maximum supply of tokens in the collection (optional).
324
325
  * @param args.mutableDescription - Indicates if the collection description can be changed (optional, defaults to true).
@@ -341,10 +342,11 @@ export async function createCollectionTransaction(
341
342
  description: string;
342
343
  name: string;
343
344
  uri: string;
345
+ withFeePayer?: boolean;
344
346
  options?: InputGenerateTransactionOptions;
345
347
  } & CreateCollectionOptions,
346
348
  ): Promise<SimpleTransaction> {
347
- const { aptosConfig, options, creator } = args;
349
+ const { aptosConfig, creator, withFeePayer, options } = args;
348
350
  return generateTransaction({
349
351
  aptosConfig,
350
352
  sender: creator.accountAddress,
@@ -370,6 +372,7 @@ export async function createCollectionTransaction(
370
372
  ],
371
373
  abi: createCollectionAbi,
372
374
  },
375
+ withFeePayer,
373
376
  options,
374
377
  });
375
378
  }
@@ -572,6 +575,7 @@ const mintDigitalAssetAbi: EntryFunctionABI = {
572
575
  * @param [args.propertyKeys] - Optional array of property keys associated with the asset.
573
576
  * @param [args.propertyTypes] - Optional array of property types corresponding to the asset's properties.
574
577
  * @param [args.propertyValues] - Optional array of property values for the asset's properties.
578
+ * @param args.withFeePayer - Whether to build a fee-payer transaction.
575
579
  * @param [args.options] - Optional transaction generation options.
576
580
  * @group Implementation
577
581
  */
@@ -585,6 +589,7 @@ export async function mintDigitalAssetTransaction(args: {
585
589
  propertyKeys?: Array<string>;
586
590
  propertyTypes?: Array<PropertyType>;
587
591
  propertyValues?: Array<PropertyValue>;
592
+ withFeePayer?: boolean;
588
593
  options?: InputGenerateTransactionOptions;
589
594
  }): Promise<SimpleTransaction> {
590
595
  const {
@@ -598,6 +603,7 @@ export async function mintDigitalAssetTransaction(args: {
598
603
  propertyKeys,
599
604
  propertyTypes,
600
605
  propertyValues,
606
+ withFeePayer,
601
607
  } = args;
602
608
  const convertedPropertyType = propertyTypes?.map((type) => PropertyTypeMap[type]);
603
609
  return generateTransaction({
@@ -625,6 +631,7 @@ export async function mintDigitalAssetTransaction(args: {
625
631
  ],
626
632
  abi: mintDigitalAssetAbi,
627
633
  },
634
+ withFeePayer,
628
635
  options,
629
636
  });
630
637
  }
@@ -644,6 +651,7 @@ const transferDigitalAssetAbi: EntryFunctionABI = {
644
651
  * @param args.digitalAssetAddress - The address of the digital asset being transferred.
645
652
  * @param args.recipient - The address of the account receiving the digital asset.
646
653
  * @param args.digitalAssetType - (Optional) The type of the digital asset being transferred.
654
+ * @param args.withFeePayer - Whether to build a fee-payer transaction.
647
655
  * @param args.options - (Optional) Additional options for generating the transaction.
648
656
  * @group Implementation
649
657
  */
@@ -653,9 +661,10 @@ export async function transferDigitalAssetTransaction(args: {
653
661
  digitalAssetAddress: AccountAddressInput;
654
662
  recipient: AccountAddressInput;
655
663
  digitalAssetType?: MoveStructId;
664
+ withFeePayer?: boolean;
656
665
  options?: InputGenerateTransactionOptions;
657
666
  }): Promise<SimpleTransaction> {
658
- const { aptosConfig, sender, digitalAssetAddress, recipient, digitalAssetType, options } = args;
667
+ const { aptosConfig, sender, digitalAssetAddress, recipient, digitalAssetType, withFeePayer, options } = args;
659
668
  return generateTransaction({
660
669
  aptosConfig,
661
670
  sender: sender.accountAddress,
@@ -665,6 +674,7 @@ export async function transferDigitalAssetTransaction(args: {
665
674
  functionArguments: [AccountAddress.from(digitalAssetAddress), AccountAddress.from(recipient)],
666
675
  abi: transferDigitalAssetAbi,
667
676
  },
677
+ withFeePayer,
668
678
  options,
669
679
  });
670
680
  }
@@ -698,6 +708,7 @@ const mintSoulBoundAbi: EntryFunctionABI = {
698
708
  * @param [args.propertyKeys] - Optional array of property keys associated with the token.
699
709
  * @param [args.propertyTypes] - Optional array of property types corresponding to the property keys.
700
710
  * @param [args.propertyValues] - Optional array of property values that match the property keys and types.
711
+ * @param args.withFeePayer - Whether to build a fee-payer transaction.
701
712
  * @param [args.options] - Optional transaction generation options.
702
713
  * @throws Error if the counts of property keys, property types, and property values do not match.
703
714
  * @group Implementation
@@ -713,6 +724,7 @@ export async function mintSoulBoundTransaction(args: {
713
724
  propertyKeys?: Array<string>;
714
725
  propertyTypes?: Array<PropertyType>;
715
726
  propertyValues?: Array<PropertyValue>;
727
+ withFeePayer?: boolean;
716
728
  options?: InputGenerateTransactionOptions;
717
729
  }): Promise<SimpleTransaction> {
718
730
  const {
@@ -726,6 +738,7 @@ export async function mintSoulBoundTransaction(args: {
726
738
  propertyKeys,
727
739
  propertyTypes,
728
740
  propertyValues,
741
+ withFeePayer,
729
742
  options,
730
743
  } = args;
731
744
  if (propertyKeys?.length !== propertyValues?.length) {
@@ -752,6 +765,7 @@ export async function mintSoulBoundTransaction(args: {
752
765
  ],
753
766
  abi: mintSoulBoundAbi,
754
767
  },
768
+ withFeePayer,
755
769
  options,
756
770
  });
757
771
  }
@@ -770,6 +784,7 @@ const burnDigitalAssetAbi: EntryFunctionABI = {
770
784
  * @param args.creator - The account that is initiating the burn transaction.
771
785
  * @param args.digitalAssetAddress - The address of the digital asset to be burned.
772
786
  * @param args.digitalAssetType - Optional; the type of the digital asset being burned.
787
+ * @param args.withFeePayer - Whether to build a fee-payer transaction.
773
788
  * @param args.options - Optional; additional options for generating the transaction.
774
789
  * @group Implementation
775
790
  */
@@ -778,9 +793,10 @@ export async function burnDigitalAssetTransaction(args: {
778
793
  creator: Account;
779
794
  digitalAssetAddress: AccountAddressInput;
780
795
  digitalAssetType?: MoveStructId;
796
+ withFeePayer?: boolean;
781
797
  options?: InputGenerateTransactionOptions;
782
798
  }): Promise<SimpleTransaction> {
783
- const { aptosConfig, creator, digitalAssetAddress, digitalAssetType, options } = args;
799
+ const { aptosConfig, creator, digitalAssetAddress, digitalAssetType, withFeePayer, options } = args;
784
800
  return generateTransaction({
785
801
  aptosConfig,
786
802
  sender: creator.accountAddress,
@@ -790,6 +806,7 @@ export async function burnDigitalAssetTransaction(args: {
790
806
  functionArguments: [AccountAddress.from(digitalAssetAddress)],
791
807
  abi: burnDigitalAssetAbi,
792
808
  },
809
+ withFeePayer,
793
810
  options,
794
811
  });
795
812
  }
@@ -808,6 +825,7 @@ const freezeDigitalAssetAbi: EntryFunctionABI = {
808
825
  * @param args.creator - The account that is creating the transaction.
809
826
  * @param args.digitalAssetAddress - The address of the digital asset to be frozen.
810
827
  * @param args.digitalAssetType - (Optional) The type of the digital asset as a Move struct ID.
828
+ * @param args.withFeePayer - Whether to build a fee-payer transaction.
811
829
  * @param args.options - (Optional) Additional options for generating the transaction.
812
830
  * @group Implementation
813
831
  */
@@ -816,9 +834,10 @@ export async function freezeDigitalAssetTransferTransaction(args: {
816
834
  creator: Account;
817
835
  digitalAssetAddress: AccountAddressInput;
818
836
  digitalAssetType?: MoveStructId;
837
+ withFeePayer?: boolean;
819
838
  options?: InputGenerateTransactionOptions;
820
839
  }): Promise<SimpleTransaction> {
821
- const { aptosConfig, creator, digitalAssetAddress, digitalAssetType, options } = args;
840
+ const { aptosConfig, creator, digitalAssetAddress, digitalAssetType, withFeePayer, options } = args;
822
841
  return generateTransaction({
823
842
  aptosConfig,
824
843
  sender: creator.accountAddress,
@@ -828,6 +847,7 @@ export async function freezeDigitalAssetTransferTransaction(args: {
828
847
  functionArguments: [digitalAssetAddress],
829
848
  abi: freezeDigitalAssetAbi,
830
849
  },
850
+ withFeePayer,
831
851
  options,
832
852
  });
833
853
  }
@@ -845,6 +865,7 @@ const unfreezeDigitalAssetAbi: EntryFunctionABI = {
845
865
  * @param args.creator - The account that is initiating the unfreeze transaction.
846
866
  * @param args.digitalAssetAddress - The address of the digital asset to be unfrozen.
847
867
  * @param args.digitalAssetType - (Optional) The type of the digital asset being unfrozen.
868
+ * @param args.withFeePayer - Whether to build a fee-payer transaction.
848
869
  * @param args.options - (Optional) Additional options for generating the transaction.
849
870
  * @group Implementation
850
871
  */
@@ -853,9 +874,10 @@ export async function unfreezeDigitalAssetTransferTransaction(args: {
853
874
  creator: Account;
854
875
  digitalAssetAddress: AccountAddressInput;
855
876
  digitalAssetType?: MoveStructId;
877
+ withFeePayer?: boolean;
856
878
  options?: InputGenerateTransactionOptions;
857
879
  }): Promise<SimpleTransaction> {
858
- const { aptosConfig, creator, digitalAssetAddress, digitalAssetType, options } = args;
880
+ const { aptosConfig, creator, digitalAssetAddress, digitalAssetType, withFeePayer, options } = args;
859
881
  return generateTransaction({
860
882
  aptosConfig,
861
883
  sender: creator.accountAddress,
@@ -865,6 +887,7 @@ export async function unfreezeDigitalAssetTransferTransaction(args: {
865
887
  functionArguments: [digitalAssetAddress],
866
888
  abi: unfreezeDigitalAssetAbi,
867
889
  },
890
+ withFeePayer,
868
891
  options,
869
892
  });
870
893
  }
@@ -883,6 +906,7 @@ const setDigitalAssetDescriptionAbi: EntryFunctionABI = {
883
906
  * @param args.description - The new description for the digital asset.
884
907
  * @param args.digitalAssetAddress - The address of the digital asset whose description is being set.
885
908
  * @param args.digitalAssetType - (Optional) The type of the digital asset.
909
+ * @param args.withFeePayer - Whether to build a fee-payer transaction.
886
910
  * @param args.options - (Optional) Additional options for generating the transaction.
887
911
  * @group Implementation
888
912
  */
@@ -892,9 +916,10 @@ export async function setDigitalAssetDescriptionTransaction(args: {
892
916
  description: string;
893
917
  digitalAssetAddress: AccountAddressInput;
894
918
  digitalAssetType?: MoveStructId;
919
+ withFeePayer?: boolean;
895
920
  options?: InputGenerateTransactionOptions;
896
921
  }): Promise<SimpleTransaction> {
897
- const { aptosConfig, creator, description, digitalAssetAddress, digitalAssetType, options } = args;
922
+ const { aptosConfig, creator, description, digitalAssetAddress, digitalAssetType, withFeePayer, options } = args;
898
923
  return generateTransaction({
899
924
  aptosConfig,
900
925
  sender: creator.accountAddress,
@@ -904,6 +929,7 @@ export async function setDigitalAssetDescriptionTransaction(args: {
904
929
  functionArguments: [AccountAddress.from(digitalAssetAddress), new MoveString(description)],
905
930
  abi: setDigitalAssetDescriptionAbi,
906
931
  },
932
+ withFeePayer,
907
933
  options,
908
934
  });
909
935
  }
@@ -923,6 +949,7 @@ const setDigitalAssetNameAbi: EntryFunctionABI = {
923
949
  * @param args.name - The new name to assign to the digital asset.
924
950
  * @param args.digitalAssetAddress - The address of the digital asset to update.
925
951
  * @param args.digitalAssetType - (Optional) The type of the digital asset, represented as a Move struct ID.
952
+ * @param args.withFeePayer - Whether to build a fee-payer transaction.
926
953
  * @param args.options - (Optional) Additional options for generating the transaction.
927
954
  * @group Implementation
928
955
  */
@@ -932,9 +959,10 @@ export async function setDigitalAssetNameTransaction(args: {
932
959
  name: string;
933
960
  digitalAssetAddress: AccountAddressInput;
934
961
  digitalAssetType?: MoveStructId;
962
+ withFeePayer?: boolean;
935
963
  options?: InputGenerateTransactionOptions;
936
964
  }): Promise<SimpleTransaction> {
937
- const { aptosConfig, creator, name, digitalAssetAddress, digitalAssetType, options } = args;
965
+ const { aptosConfig, creator, name, digitalAssetAddress, digitalAssetType, withFeePayer, options } = args;
938
966
  return generateTransaction({
939
967
  aptosConfig,
940
968
  sender: creator.accountAddress,
@@ -944,6 +972,7 @@ export async function setDigitalAssetNameTransaction(args: {
944
972
  functionArguments: [AccountAddress.from(digitalAssetAddress), new MoveString(name)],
945
973
  abi: setDigitalAssetNameAbi,
946
974
  },
975
+ withFeePayer,
947
976
  options,
948
977
  });
949
978
  }
@@ -962,6 +991,7 @@ const setDigitalAssetURIAbi: EntryFunctionABI = {
962
991
  * @param args.uri - The new URI to be set for the digital asset.
963
992
  * @param args.digitalAssetAddress - The address of the digital asset whose URI is being set.
964
993
  * @param args.digitalAssetType - The optional type of the digital asset; defaults to a predefined type if not provided.
994
+ * @param args.withFeePayer - Whether to build a fee-payer transaction.
965
995
  * @param args.options - Optional settings for generating the transaction.
966
996
  * @group Implementation
967
997
  */
@@ -971,9 +1001,10 @@ export async function setDigitalAssetURITransaction(args: {
971
1001
  uri: string;
972
1002
  digitalAssetAddress: AccountAddressInput;
973
1003
  digitalAssetType?: MoveStructId;
1004
+ withFeePayer?: boolean;
974
1005
  options?: InputGenerateTransactionOptions;
975
1006
  }): Promise<SimpleTransaction> {
976
- const { aptosConfig, creator, uri, digitalAssetAddress, digitalAssetType, options } = args;
1007
+ const { aptosConfig, creator, uri, digitalAssetAddress, digitalAssetType, withFeePayer, options } = args;
977
1008
  return generateTransaction({
978
1009
  aptosConfig,
979
1010
  sender: creator.accountAddress,
@@ -983,6 +1014,7 @@ export async function setDigitalAssetURITransaction(args: {
983
1014
  functionArguments: [AccountAddress.from(digitalAssetAddress), new MoveString(uri)],
984
1015
  abi: setDigitalAssetURIAbi,
985
1016
  },
1017
+ withFeePayer,
986
1018
  options,
987
1019
  });
988
1020
  }
@@ -1009,6 +1041,7 @@ const addDigitalAssetPropertyAbi: EntryFunctionABI = {
1009
1041
  * @param args.propertyValue - The value of the property being added.
1010
1042
  * @param args.digitalAssetAddress - The address of the digital asset to which the property is being added.
1011
1043
  * @param args.digitalAssetType - The optional type of the digital asset.
1044
+ * @param args.withFeePayer - Whether to build a fee-payer transaction.
1012
1045
  * @param args.options - Optional transaction generation options.
1013
1046
  * @group Implementation
1014
1047
  */
@@ -1020,6 +1053,7 @@ export async function addDigitalAssetPropertyTransaction(args: {
1020
1053
  propertyValue: PropertyValue;
1021
1054
  digitalAssetAddress: AccountAddressInput;
1022
1055
  digitalAssetType?: MoveStructId;
1056
+ withFeePayer?: boolean;
1023
1057
  options?: InputGenerateTransactionOptions;
1024
1058
  }): Promise<SimpleTransaction> {
1025
1059
  const {
@@ -1030,6 +1064,7 @@ export async function addDigitalAssetPropertyTransaction(args: {
1030
1064
  propertyValue,
1031
1065
  digitalAssetAddress,
1032
1066
  digitalAssetType,
1067
+ withFeePayer,
1033
1068
  options,
1034
1069
  } = args;
1035
1070
  return generateTransaction({
@@ -1046,6 +1081,7 @@ export async function addDigitalAssetPropertyTransaction(args: {
1046
1081
  ],
1047
1082
  abi: addDigitalAssetPropertyAbi,
1048
1083
  },
1084
+ withFeePayer,
1049
1085
  options,
1050
1086
  });
1051
1087
  }
@@ -1065,6 +1101,7 @@ const removeDigitalAssetPropertyAbi: EntryFunctionABI = {
1065
1101
  * @param args.propertyKey - The key of the property to be removed.
1066
1102
  * @param args.digitalAssetAddress - The address of the digital asset from which the property will be removed.
1067
1103
  * @param args.digitalAssetType - The type of the digital asset (optional).
1104
+ * @param args.withFeePayer - Whether to build a fee-payer transaction.
1068
1105
  * @param args.options - Additional options for generating the transaction (optional).
1069
1106
  * @group Implementation
1070
1107
  */
@@ -1074,9 +1111,10 @@ export async function removeDigitalAssetPropertyTransaction(args: {
1074
1111
  propertyKey: string;
1075
1112
  digitalAssetAddress: AccountAddressInput;
1076
1113
  digitalAssetType?: MoveStructId;
1114
+ withFeePayer?: boolean;
1077
1115
  options?: InputGenerateTransactionOptions;
1078
1116
  }): Promise<SimpleTransaction> {
1079
- const { aptosConfig, creator, propertyKey, digitalAssetAddress, digitalAssetType, options } = args;
1117
+ const { aptosConfig, creator, propertyKey, digitalAssetAddress, digitalAssetType, withFeePayer, options } = args;
1080
1118
  return generateTransaction({
1081
1119
  aptosConfig,
1082
1120
  sender: creator.accountAddress,
@@ -1086,6 +1124,7 @@ export async function removeDigitalAssetPropertyTransaction(args: {
1086
1124
  functionArguments: [AccountAddress.from(digitalAssetAddress), new MoveString(propertyKey)],
1087
1125
  abi: removeDigitalAssetPropertyAbi,
1088
1126
  },
1127
+ withFeePayer,
1089
1128
  options,
1090
1129
  });
1091
1130
  }
@@ -1112,6 +1151,7 @@ const updateDigitalAssetPropertyAbi: EntryFunctionABI = {
1112
1151
  * @param args.propertyValue - The new value for the property.
1113
1152
  * @param args.digitalAssetAddress - The address of the digital asset to update.
1114
1153
  * @param args.digitalAssetType - (Optional) The type of the digital asset.
1154
+ * @param args.withFeePayer - Whether to build a fee-payer transaction.
1115
1155
  * @param args.options - (Optional) Additional options for generating the transaction.
1116
1156
  * @group Implementation
1117
1157
  */
@@ -1123,6 +1163,7 @@ export async function updateDigitalAssetPropertyTransaction(args: {
1123
1163
  propertyValue: PropertyValue;
1124
1164
  digitalAssetAddress: AccountAddressInput;
1125
1165
  digitalAssetType?: MoveStructId;
1166
+ withFeePayer?: boolean;
1126
1167
  options?: InputGenerateTransactionOptions;
1127
1168
  }): Promise<SimpleTransaction> {
1128
1169
  const {
@@ -1133,6 +1174,7 @@ export async function updateDigitalAssetPropertyTransaction(args: {
1133
1174
  propertyValue,
1134
1175
  digitalAssetAddress,
1135
1176
  digitalAssetType,
1177
+ withFeePayer,
1136
1178
  options,
1137
1179
  } = args;
1138
1180
  return generateTransaction({
@@ -1158,6 +1200,7 @@ export async function updateDigitalAssetPropertyTransaction(args: {
1158
1200
  ],
1159
1201
  abi: updateDigitalAssetPropertyAbi,
1160
1202
  },
1203
+ withFeePayer,
1161
1204
  options,
1162
1205
  });
1163
1206
  }
@@ -1183,6 +1226,7 @@ const addDigitalAssetTypedPropertyAbi: EntryFunctionABI = {
1183
1226
  * @param args.propertyValue - The value of the property being added.
1184
1227
  * @param args.digitalAssetAddress - The address of the digital asset to which the property is being added.
1185
1228
  * @param args.digitalAssetType - (Optional) The type of the digital asset.
1229
+ * @param args.withFeePayer - Whether to build a fee-payer transaction.
1186
1230
  * @param args.options - (Optional) Additional options for generating the transaction.
1187
1231
  * @group Implementation
1188
1232
  */
@@ -1194,6 +1238,7 @@ export async function addDigitalAssetTypedPropertyTransaction(args: {
1194
1238
  propertyValue: PropertyValue;
1195
1239
  digitalAssetAddress: AccountAddressInput;
1196
1240
  digitalAssetType?: MoveStructId;
1241
+ withFeePayer?: boolean;
1197
1242
  options?: InputGenerateTransactionOptions;
1198
1243
  }): Promise<SimpleTransaction> {
1199
1244
  const {
@@ -1204,6 +1249,7 @@ export async function addDigitalAssetTypedPropertyTransaction(args: {
1204
1249
  propertyValue,
1205
1250
  digitalAssetAddress,
1206
1251
  digitalAssetType,
1252
+ withFeePayer,
1207
1253
  options,
1208
1254
  } = args;
1209
1255
  return generateTransaction({
@@ -1215,6 +1261,7 @@ export async function addDigitalAssetTypedPropertyTransaction(args: {
1215
1261
  functionArguments: [AccountAddress.from(digitalAssetAddress), new MoveString(propertyKey), propertyValue],
1216
1262
  abi: addDigitalAssetTypedPropertyAbi,
1217
1263
  },
1264
+ withFeePayer,
1218
1265
  options,
1219
1266
  });
1220
1267
  }
@@ -1239,6 +1286,7 @@ const updateDigitalAssetTypedPropertyAbi: EntryFunctionABI = {
1239
1286
  * @param args.propertyValue - The new value for the property.
1240
1287
  * @param args.digitalAssetAddress - The address of the digital asset to be updated.
1241
1288
  * @param args.digitalAssetType - Optional. The type of the digital asset, if not provided, defaults to the standard type.
1289
+ * @param args.withFeePayer - Whether to build a fee-payer transaction.
1242
1290
  * @param args.options - Optional. Additional options for generating the transaction.
1243
1291
  * @group Implementation
1244
1292
  */
@@ -1250,6 +1298,7 @@ export async function updateDigitalAssetTypedPropertyTransaction(args: {
1250
1298
  propertyValue: PropertyValue;
1251
1299
  digitalAssetAddress: AccountAddressInput;
1252
1300
  digitalAssetType?: MoveStructId;
1301
+ withFeePayer?: boolean;
1253
1302
  options?: InputGenerateTransactionOptions;
1254
1303
  }): Promise<SimpleTransaction> {
1255
1304
  const {
@@ -1260,6 +1309,7 @@ export async function updateDigitalAssetTypedPropertyTransaction(args: {
1260
1309
  propertyValue,
1261
1310
  digitalAssetAddress,
1262
1311
  digitalAssetType,
1312
+ withFeePayer,
1263
1313
  options,
1264
1314
  } = args;
1265
1315
  return generateTransaction({
@@ -1271,6 +1321,7 @@ export async function updateDigitalAssetTypedPropertyTransaction(args: {
1271
1321
  functionArguments: [AccountAddress.from(digitalAssetAddress), new MoveString(propertyKey), propertyValue],
1272
1322
  abi: updateDigitalAssetTypedPropertyAbi,
1273
1323
  },
1324
+ withFeePayer,
1274
1325
  options,
1275
1326
  });
1276
1327
  }
@@ -170,6 +170,7 @@ const faTransferAbi: EntryFunctionABI = {
170
170
  * @param args.fungibleAssetMetadataAddress - The address of the fungible asset's metadata.
171
171
  * @param args.recipient - The address of the account receiving the asset.
172
172
  * @param args.amount - The amount of the fungible asset to transfer.
173
+ * @param args.withFeePayer - Whether to build a fee-payer transaction.
173
174
  * @param args.options - Optional settings for generating the transaction.
174
175
  * @group Implementation
175
176
  */
@@ -179,9 +180,10 @@ export async function transferFungibleAsset(args: {
179
180
  fungibleAssetMetadataAddress: AccountAddressInput;
180
181
  recipient: AccountAddressInput;
181
182
  amount: AnyNumber;
183
+ withFeePayer?: boolean;
182
184
  options?: InputGenerateTransactionOptions;
183
185
  }): Promise<SimpleTransaction> {
184
- const { aptosConfig, sender, fungibleAssetMetadataAddress, recipient, amount, options } = args;
186
+ const { aptosConfig, sender, fungibleAssetMetadataAddress, recipient, amount, withFeePayer, options } = args;
185
187
  return generateTransaction({
186
188
  aptosConfig,
187
189
  sender: sender.accountAddress,
@@ -191,6 +193,7 @@ export async function transferFungibleAsset(args: {
191
193
  functionArguments: [fungibleAssetMetadataAddress, recipient, amount],
192
194
  abi: faTransferAbi,
193
195
  },
196
+ withFeePayer,
194
197
  options,
195
198
  });
196
199
  }
@@ -205,6 +208,7 @@ export async function transferFungibleAsset(args: {
205
208
  * @param args.fromStore - The address of the fungible store initiating the transfer.
206
209
  * @param args.toStore - The address of the fungible store receiving the asset.
207
210
  * @param args.amount - The amount of the fungible asset to transfer. Must be a positive number.
211
+ * @param args.withFeePayer - Whether to build a fee-payer transaction.
208
212
  * @param args.options - Optional settings for generating the transaction.
209
213
  * @returns A SimpleTransaction that can be submitted to the blockchain.
210
214
  * @throws Error if the transaction generation fails or if the input parameters are invalid.
@@ -216,9 +220,10 @@ export async function transferFungibleAssetBetweenStores(args: {
216
220
  fromStore: AccountAddressInput;
217
221
  toStore: AccountAddressInput;
218
222
  amount: AnyNumber;
223
+ withFeePayer?: boolean;
219
224
  options?: InputGenerateTransactionOptions;
220
225
  }): Promise<SimpleTransaction> {
221
- const { aptosConfig, sender, fromStore, toStore, amount, options } = args;
226
+ const { aptosConfig, sender, fromStore, toStore, amount, withFeePayer, options } = args;
222
227
  return generateTransaction({
223
228
  aptosConfig,
224
229
  sender: sender.accountAddress,
@@ -228,6 +233,7 @@ export async function transferFungibleAssetBetweenStores(args: {
228
233
  functionArguments: [fromStore, toStore, amount],
229
234
  abi: faTransferAbi,
230
235
  },
236
+ withFeePayer,
231
237
  options,
232
238
  });
233
239
  }
@@ -11,7 +11,7 @@
11
11
  import { jwtDecode, JwtPayload } from "jwt-decode";
12
12
  import { AptosConfig } from "../api/aptosConfig.js";
13
13
  import { postAptosPepperService, postAptosProvingService } from "../client/index.js";
14
- import { AccountAddressInput } from "../core/accountAddress.js";
14
+ import { AccountAddress, AccountAddressInput } from "../core/accountAddress.js";
15
15
  import { Hex } from "../core/hex.js";
16
16
  import { EphemeralSignature } from "../core/crypto/ephemeral.js";
17
17
  import {
@@ -43,6 +43,35 @@ import { InputGenerateTransactionOptions, SimpleTransaction } from "../transacti
43
43
  import { KeylessError, KeylessErrorType } from "../errors/index.js";
44
44
  import { FIREBASE_AUTH_ISS_PATTERN } from "../utils/const.js";
45
45
 
46
+ async function fetchPepper(args: {
47
+ aptosConfig: AptosConfig;
48
+ jwt: string;
49
+ ephemeralPublicKey: HexInput;
50
+ expiryDateSecs: number;
51
+ blinder: HexInput;
52
+ uidKey: string;
53
+ derivationPath?: string;
54
+ originMethod: string;
55
+ }): Promise<PepperFetchResponse> {
56
+ const { aptosConfig, jwt, ephemeralPublicKey, expiryDateSecs, blinder, uidKey, derivationPath, originMethod } = args;
57
+ const body: PepperFetchRequest = {
58
+ jwt_b64: jwt,
59
+ epk: Hex.fromHexInput(ephemeralPublicKey).toStringWithoutPrefix(),
60
+ exp_date_secs: expiryDateSecs,
61
+ epk_blinder: Hex.fromHexInput(blinder).toStringWithoutPrefix(),
62
+ uid_key: uidKey,
63
+ derivation_path: derivationPath,
64
+ };
65
+ const { data } = await postAptosPepperService<PepperFetchRequest, PepperFetchResponse>({
66
+ aptosConfig,
67
+ path: "fetch",
68
+ body,
69
+ originMethod,
70
+ overrides: { WITH_CREDENTIALS: false },
71
+ });
72
+ return data;
73
+ }
74
+
46
75
  /**
47
76
  * Retrieves a pepper value based on the provided configuration and authentication details.
48
77
  *
@@ -64,24 +93,57 @@ export async function getPepper(args: {
64
93
  }): Promise<Uint8Array> {
65
94
  const { aptosConfig, jwt, ephemeralKeyPair, uidKey = "sub", derivationPath } = args;
66
95
 
67
- const body = {
68
- jwt_b64: jwt,
69
- epk: ephemeralKeyPair.getPublicKey().bcsToHex().toStringWithoutPrefix(),
70
- exp_date_secs: ephemeralKeyPair.expiryDateSecs,
71
- epk_blinder: Hex.fromHexInput(ephemeralKeyPair.blinder).toStringWithoutPrefix(),
72
- uid_key: uidKey,
73
- derivation_path: derivationPath,
74
- };
75
- const { data } = await postAptosPepperService<PepperFetchRequest, PepperFetchResponse>({
96
+ const data = await fetchPepper({
76
97
  aptosConfig,
77
- path: "fetch",
78
- body,
98
+ jwt,
99
+ ephemeralPublicKey: ephemeralKeyPair.getPublicKey().bcsToBytes(),
100
+ expiryDateSecs: ephemeralKeyPair.expiryDateSecs,
101
+ blinder: ephemeralKeyPair.blinder,
102
+ uidKey,
103
+ derivationPath,
79
104
  originMethod: "getPepper",
80
- overrides: { WITH_CREDENTIALS: false },
81
105
  });
82
106
  return Hex.fromHexInput(data.pepper).toUint8Array();
83
107
  }
84
108
 
109
+ /**
110
+ * Retrieves pepper bytes and the initial Keyless account address from public
111
+ * ephemeral key components.
112
+ *
113
+ * The ephemeral public key must be BCS-serialized. The returned address is the
114
+ * initial address derived by the pepper service; it does not account for later
115
+ * authentication-key rotation. This lookup does not prove possession of the
116
+ * ephemeral private key. Off-chain authentication must additionally verify a
117
+ * signature over a fresh, replay-protected challenge.
118
+ *
119
+ * @group Implementation
120
+ */
121
+ export async function getPepperAndAddress(args: {
122
+ aptosConfig: AptosConfig;
123
+ jwt: string;
124
+ ephemeralPublicKey: HexInput;
125
+ expiryDateSecs: number;
126
+ blinder: HexInput;
127
+ uidKey?: string;
128
+ derivationPath?: string;
129
+ }): Promise<{ pepper: Uint8Array; address: AccountAddress }> {
130
+ const { aptosConfig, jwt, ephemeralPublicKey, expiryDateSecs, blinder, uidKey = "sub", derivationPath } = args;
131
+ const data = await fetchPepper({
132
+ aptosConfig,
133
+ jwt,
134
+ ephemeralPublicKey,
135
+ expiryDateSecs,
136
+ blinder,
137
+ uidKey,
138
+ derivationPath,
139
+ originMethod: "getPepperAndAddress",
140
+ });
141
+ return {
142
+ pepper: Hex.fromHexInput(data.pepper).toUint8Array(),
143
+ address: AccountAddress.from(data.address),
144
+ };
145
+ }
146
+
85
147
  /**
86
148
  * Retrieves the `pepper_base` for an account — the VUF signature from which the final pepper is derived.
87
149
  *
@@ -300,14 +362,28 @@ export interface JWKS {
300
362
  keys: MoveJWK[];
301
363
  }
302
364
 
365
+ /**
366
+ * Builds a transaction that updates the federated keyless JWK set for an issuer.
367
+ *
368
+ * @param args - The arguments for updating the JWK set.
369
+ * @param args.aptosConfig - The configuration settings for the Aptos client.
370
+ * @param args.sender - The account that will install the JWK set.
371
+ * @param args.iss - The issuer claim of the federated OIDC provider.
372
+ * @param args.jwksUrl - The optional URL from which to fetch the JWK set.
373
+ * @param args.withFeePayer - Whether to build a sponsored transaction.
374
+ * @param args.options - Optional settings for generating the transaction.
375
+ * @returns A transaction that updates the federated JWK set.
376
+ * @group Implementation
377
+ */
303
378
  export async function updateFederatedKeylessJwkSetTransaction(args: {
304
379
  aptosConfig: AptosConfig;
305
380
  sender: Account;
306
381
  iss: string;
307
382
  jwksUrl?: string;
383
+ withFeePayer?: boolean;
308
384
  options?: InputGenerateTransactionOptions;
309
385
  }): Promise<SimpleTransaction> {
310
- const { aptosConfig, sender, iss, options } = args;
386
+ const { aptosConfig, sender, iss, withFeePayer, options } = args;
311
387
 
312
388
  let { jwksUrl } = args;
313
389
 
@@ -371,6 +447,7 @@ export async function updateFederatedKeylessJwkSetTransaction(args: {
371
447
  return generateTransaction({
372
448
  aptosConfig,
373
449
  sender: sender.accountAddress,
450
+ withFeePayer,
374
451
  data: {
375
452
  function: "0x1::jwks::update_federated_jwk_set",
376
453
  functionArguments: [