@aptos-labs/ts-sdk 7.3.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 (144) hide show
  1. package/LICENSE +43 -43
  2. package/README.md +19 -20
  3. package/dist/api/account/abstraction.d.ts +10 -0
  4. package/dist/api/account/abstraction.d.ts.map +1 -1
  5. package/dist/api/account/abstraction.js +19 -6
  6. package/dist/api/account/abstraction.js.map +1 -1
  7. package/dist/api/ans.d.ts +9 -0
  8. package/dist/api/ans.d.ts.map +1 -1
  9. package/dist/api/ans.js +5 -0
  10. package/dist/api/ans.js.map +1 -1
  11. package/dist/api/coin.d.ts +2 -0
  12. package/dist/api/coin.d.ts.map +1 -1
  13. package/dist/api/coin.js +1 -0
  14. package/dist/api/coin.js.map +1 -1
  15. package/dist/api/digitalAsset.d.ts +30 -0
  16. package/dist/api/digitalAsset.d.ts.map +1 -1
  17. package/dist/api/digitalAsset.js +15 -0
  18. package/dist/api/digitalAsset.js.map +1 -1
  19. package/dist/api/fungibleAsset.d.ts +4 -0
  20. package/dist/api/fungibleAsset.d.ts.map +1 -1
  21. package/dist/api/fungibleAsset.js +2 -0
  22. package/dist/api/fungibleAsset.js.map +1 -1
  23. package/dist/api/keyless.d.ts +38 -1
  24. package/dist/api/keyless.d.ts.map +1 -1
  25. package/dist/api/keyless.js +29 -1
  26. package/dist/api/keyless.js.map +1 -1
  27. package/dist/api/transaction.d.ts +41 -1
  28. package/dist/api/transaction.d.ts.map +1 -1
  29. package/dist/api/transaction.js +42 -2
  30. package/dist/api/transaction.js.map +1 -1
  31. package/dist/api/transactionSubmission/build.d.ts +7 -5
  32. package/dist/api/transactionSubmission/build.d.ts.map +1 -1
  33. package/dist/api/transactionSubmission/build.js +13 -5
  34. package/dist/api/transactionSubmission/build.js.map +1 -1
  35. package/dist/api/transactionSubmission/simulate.d.ts +7 -3
  36. package/dist/api/transactionSubmission/simulate.d.ts.map +1 -1
  37. package/dist/api/transactionSubmission/simulate.js +7 -3
  38. package/dist/api/transactionSubmission/simulate.js.map +1 -1
  39. package/dist/bcs/serializable/moveStructs.d.ts +72 -28
  40. package/dist/bcs/serializable/moveStructs.d.ts.map +1 -1
  41. package/dist/bcs/serializable/moveStructs.js +76 -28
  42. package/dist/bcs/serializable/moveStructs.js.map +1 -1
  43. package/dist/functions/keyless.d.ts +1 -1
  44. package/dist/functions/keyless.d.ts.map +1 -1
  45. package/dist/functions/keyless.js +1 -1
  46. package/dist/functions/keyless.js.map +1 -1
  47. package/dist/functions/transaction.d.ts +1 -1
  48. package/dist/functions/transaction.d.ts.map +1 -1
  49. package/dist/functions/transaction.js +1 -1
  50. package/dist/functions/transaction.js.map +1 -1
  51. package/dist/internal/abstraction.d.ts +35 -0
  52. package/dist/internal/abstraction.d.ts.map +1 -1
  53. package/dist/internal/abstraction.js +38 -3
  54. package/dist/internal/abstraction.js.map +1 -1
  55. package/dist/internal/account.d.ts +6 -0
  56. package/dist/internal/account.d.ts.map +1 -1
  57. package/dist/internal/account.js +55 -37
  58. package/dist/internal/account.js.map +1 -1
  59. package/dist/internal/ans.d.ts +11 -0
  60. package/dist/internal/ans.d.ts.map +1 -1
  61. package/dist/internal/ans.js +18 -6
  62. package/dist/internal/ans.js.map +1 -1
  63. package/dist/internal/coin.d.ts +2 -0
  64. package/dist/internal/coin.d.ts.map +1 -1
  65. package/dist/internal/coin.js +3 -1
  66. package/dist/internal/coin.js.map +1 -1
  67. package/dist/internal/digitalAsset.d.ts +30 -0
  68. package/dist/internal/digitalAsset.d.ts.map +1 -1
  69. package/dist/internal/digitalAsset.js +45 -15
  70. package/dist/internal/digitalAsset.js.map +1 -1
  71. package/dist/internal/fungibleAsset.d.ts +4 -0
  72. package/dist/internal/fungibleAsset.d.ts.map +1 -1
  73. package/dist/internal/fungibleAsset.js +6 -2
  74. package/dist/internal/fungibleAsset.js.map +1 -1
  75. package/dist/internal/keyless.d.ts +39 -1
  76. package/dist/internal/keyless.d.ts.map +1 -1
  77. package/dist/internal/keyless.js +71 -13
  78. package/dist/internal/keyless.js.map +1 -1
  79. package/dist/internal/transaction.d.ts +24 -1
  80. package/dist/internal/transaction.d.ts.map +1 -1
  81. package/dist/internal/transaction.js +125 -4
  82. package/dist/internal/transaction.js.map +1 -1
  83. package/dist/internal/transactionSubmission.d.ts +2 -0
  84. package/dist/internal/transactionSubmission.d.ts.map +1 -1
  85. package/dist/internal/transactionSubmission.js +3 -1
  86. package/dist/internal/transactionSubmission.js.map +1 -1
  87. package/dist/transactions/management/transactionWorker.d.ts +10 -6
  88. package/dist/transactions/management/transactionWorker.d.ts.map +1 -1
  89. package/dist/transactions/management/transactionWorker.js +28 -24
  90. package/dist/transactions/management/transactionWorker.js.map +1 -1
  91. package/dist/transactions/transactionBuilder/index.d.ts +1 -0
  92. package/dist/transactions/transactionBuilder/index.d.ts.map +1 -1
  93. package/dist/transactions/transactionBuilder/index.js +1 -0
  94. package/dist/transactions/transactionBuilder/index.js.map +1 -1
  95. package/dist/transactions/transactionBuilder/scriptAbi.d.ts +10 -0
  96. package/dist/transactions/transactionBuilder/scriptAbi.d.ts.map +1 -0
  97. package/dist/transactions/transactionBuilder/scriptAbi.js +863 -0
  98. package/dist/transactions/transactionBuilder/scriptAbi.js.map +1 -0
  99. package/dist/transactions/transactionBuilder/transactionBuilder.d.ts.map +1 -1
  100. package/dist/transactions/transactionBuilder/transactionBuilder.js +65 -1
  101. package/dist/transactions/transactionBuilder/transactionBuilder.js.map +1 -1
  102. package/dist/transactions/types.d.ts +9 -4
  103. package/dist/transactions/types.d.ts.map +1 -1
  104. package/dist/types/keyless.d.ts +2 -2
  105. package/dist/types/keyless.d.ts.map +1 -1
  106. package/dist/types/types.d.ts +2 -2
  107. package/dist/types/types.d.ts.map +1 -1
  108. package/dist/utils/const.d.ts +11 -0
  109. package/dist/utils/const.d.ts.map +1 -1
  110. package/dist/utils/const.js +11 -0
  111. package/dist/utils/const.js.map +1 -1
  112. package/dist/version.d.ts +1 -1
  113. package/dist/version.js +1 -1
  114. package/package.json +26 -25
  115. package/src/api/account/abstraction.ts +23 -6
  116. package/src/api/ans.ts +9 -0
  117. package/src/api/coin.ts +2 -0
  118. package/src/api/digitalAsset.ts +30 -0
  119. package/src/api/fungibleAsset.ts +4 -0
  120. package/src/api/keyless.ts +39 -1
  121. package/src/api/transaction.ts +48 -1
  122. package/src/api/transactionSubmission/build.ts +16 -6
  123. package/src/api/transactionSubmission/simulate.ts +7 -3
  124. package/src/bcs/serializable/moveStructs.ts +80 -28
  125. package/src/functions/keyless.ts +1 -0
  126. package/src/functions/transaction.ts +1 -0
  127. package/src/internal/abstraction.ts +41 -3
  128. package/src/internal/account.ts +60 -38
  129. package/src/internal/ans.ts +24 -6
  130. package/src/internal/coin.ts +4 -1
  131. package/src/internal/digitalAsset.ts +60 -9
  132. package/src/internal/fungibleAsset.ts +8 -2
  133. package/src/internal/keyless.ts +91 -14
  134. package/src/internal/transaction.ts +154 -4
  135. package/src/internal/transactionSubmission.ts +4 -1
  136. package/src/transactions/management/transactionWorker.ts +35 -23
  137. package/src/transactions/transactionBuilder/index.ts +1 -0
  138. package/src/transactions/transactionBuilder/scriptAbi.ts +1145 -0
  139. package/src/transactions/transactionBuilder/transactionBuilder.ts +91 -6
  140. package/src/transactions/types.ts +10 -4
  141. package/src/types/keyless.ts +2 -2
  142. package/src/types/types.ts +2 -2
  143. package/src/utils/const.ts +12 -0
  144. package/src/version.ts +1 -1
package/package.json CHANGED
@@ -4,7 +4,8 @@
4
4
  "license": "SEE LICENSE IN LICENSE",
5
5
  "repository": {
6
6
  "type": "git",
7
- "url": "git+https://github.com/aptos-labs/aptos-ts-sdk.git"
7
+ "url": "git+https://github.com/aptos-labs/aptos-ts-sdk.git",
8
+ "directory": "packages/ts-sdk"
8
9
  },
9
10
  "engines": {
10
11
  "node": ">=22.0.0"
@@ -100,37 +101,37 @@
100
101
  "dependencies": {
101
102
  "@aptos-labs/aptos-cli": "^3.0.0",
102
103
  "@aptos-labs/aptos-client": "^4.1.0",
103
- "@noble/ciphers": "2.2.0",
104
- "@noble/curves": "2.2.0",
105
- "@noble/hashes": "2.2.0",
106
- "@scure/bip32": "^2.0.1",
107
- "@scure/bip39": "^2.0.1",
104
+ "@noble/ciphers": "2.4.0",
105
+ "@noble/curves": "2.4.0",
106
+ "@noble/hashes": "2.4.0",
107
+ "@scure/bip32": "^2.4.0",
108
+ "@scure/bip39": "^2.4.0",
108
109
  "eventemitter3": "^5.0.4",
109
110
  "jwt-decode": "^4.0.0",
110
111
  "poseidon-lite": "^0.3.0"
111
112
  },
112
113
  "devDependencies": {
113
- "@babel/traverse": "^7.29.0",
114
- "@biomejs/biome": "2.4.6",
115
- "@cucumber/cucumber": "^12.8.1",
116
- "@graphql-codegen/cli": "^6.3.0",
117
- "@graphql-codegen/import-types-preset": "^4.0.0",
114
+ "@babel/traverse": "^7.29.8",
115
+ "@biomejs/biome": "2.5.12",
116
+ "@cucumber/cucumber": "^12.9.0",
117
+ "@graphql-codegen/cli": "^6.3.1",
118
+ "@graphql-codegen/import-types-preset": "^4.0.1",
118
119
  "@graphql-codegen/typescript": "^5.0.10",
119
- "@graphql-codegen/typescript-graphql-request": "^7.0.0",
120
+ "@graphql-codegen/typescript-graphql-request": "^7.1.0",
120
121
  "@graphql-codegen/typescript-operations": "^5.1.0",
121
- "@types/node": "^22.19.17",
122
- "@vitest/coverage-v8": "^4.1.4",
123
- "graphql": "^16.13.2",
122
+ "@types/node": "^22.20.1",
123
+ "@typescript/native": "npm:typescript@^7.0.2",
124
+ "@vitest/coverage-v8": "^4.1.11",
125
+ "graphql": "^16.14.2",
124
126
  "graphql-request": "^7.4.0",
125
127
  "tree-kill": "^1.2.2",
126
- "typedoc": "^0.28.19",
127
- "typedoc-plugin-missing-exports": "^4.1.3",
128
- "@typescript/native": "npm:typescript@^7.0.2",
128
+ "typedoc": "^0.28.20",
129
+ "typedoc-plugin-missing-exports": "^4.1.4",
129
130
  "typescript": "npm:@typescript/typescript6@^6.0.2",
130
- "vite": "^7.3.5",
131
- "vitest": "^4.1.4"
131
+ "vite": "^7.3.6",
132
+ "vitest": "^4.1.11"
132
133
  },
133
- "version": "7.3.0",
134
+ "version": "7.4.0",
134
135
  "scripts": {
135
136
  "build:clean": "rm -rf dist",
136
137
  "build": "pnpm build:clean && tsc -p tsconfig.build.json",
@@ -147,10 +148,10 @@
147
148
  "e2e-test": "vitest run tests/e2e",
148
149
  "e2e-encrypted": "vitest run tests/e2e/transaction/encryptedTransaction.test.ts --config vitest.config.e2e-devnet.ts",
149
150
  "indexer-codegen": "graphql-codegen --config ./src/types/codegen.yaml && pnpm fmt",
150
- "doc": "scripts/generateDocs.sh",
151
- "check-version": "scripts/checkVersion.sh",
152
- "check-license": "sh scripts/checkLicense.sh . && sh scripts/checkLicense.sh confidential-asset",
153
- "update-version": "scripts/updateVersion.sh && pnpm doc",
151
+ "doc": "../../scripts/generateDocs.sh",
152
+ "check-version": "../../scripts/checkVersion.sh",
153
+ "check-license": "sh ../../scripts/checkLicense.sh .",
154
+ "update-version": "../../scripts/updateVersion.sh && pnpm doc",
154
155
  "spec": "pnpm build && pnpm _spec",
155
156
  "_spec": "cucumber-js -p default"
156
157
  }
@@ -29,19 +29,22 @@ export class AccountAbstraction {
29
29
  *
30
30
  * @param args.accountAddress - The account to add the authentication function to.
31
31
  * @param args.authenticationFunction - The authentication function info to add.
32
+ * @param args.withFeePayer - Whether the transaction should use a fee payer.
32
33
  * @param args.options - The options for the transaction.
33
34
  * @returns A transaction to add the authentication function to the account.
34
35
  */
35
36
  public async addAuthenticationFunctionTransaction(args: {
36
37
  accountAddress: AccountAddressInput;
37
38
  authenticationFunction: MoveFunctionId;
39
+ withFeePayer?: boolean;
38
40
  options?: InputGenerateTransactionOptions;
39
41
  }) {
40
- const { accountAddress, authenticationFunction, options } = args;
42
+ const { accountAddress, authenticationFunction, withFeePayer, options } = args;
41
43
  return addAuthenticationFunctionTransaction({
42
44
  aptosConfig: this.config,
43
45
  authenticationFunction,
44
46
  sender: accountAddress,
47
+ withFeePayer,
45
48
  options,
46
49
  });
47
50
  }
@@ -62,19 +65,22 @@ export class AccountAbstraction {
62
65
  *
63
66
  * @param args.accountAddress - The account to remove the authentication function from.
64
67
  * @param args.authenticationFunction - The authentication function info to remove.
68
+ * @param args.withFeePayer - Whether the transaction should use a fee payer.
65
69
  * @param args.options - The options for the transaction.
66
70
  * @returns A transaction to remove the authentication function from the account.
67
71
  */
68
72
  public async removeAuthenticationFunctionTransaction(args: {
69
73
  accountAddress: AccountAddressInput;
70
74
  authenticationFunction: MoveFunctionId;
75
+ withFeePayer?: boolean;
71
76
  options?: InputGenerateTransactionOptions;
72
77
  }) {
73
- const { accountAddress, authenticationFunction, options } = args;
78
+ const { accountAddress, authenticationFunction, withFeePayer, options } = args;
74
79
  return removeAuthenticationFunctionTransaction({
75
80
  aptosConfig: this.config,
76
81
  sender: accountAddress,
77
82
  authenticationFunction,
83
+ withFeePayer,
78
84
  options,
79
85
  });
80
86
  }
@@ -93,15 +99,22 @@ export class AccountAbstraction {
93
99
  * ```
94
100
  *
95
101
  * @param args.accountAddress - The account to remove the authenticator from.
102
+ * @param args.withFeePayer - Whether the transaction should use a fee payer.
96
103
  * @param args.options - The options for the transaction.
97
104
  * @returns A transaction to remove the authenticator from the account.
98
105
  */
99
106
  public async removeDispatchableAuthenticatorTransaction(args: {
100
107
  accountAddress: AccountAddressInput;
108
+ withFeePayer?: boolean;
101
109
  options?: InputGenerateTransactionOptions;
102
110
  }) {
103
- const { accountAddress, options } = args;
104
- return removeDispatchableAuthenticatorTransaction({ aptosConfig: this.config, sender: accountAddress, options });
111
+ const { accountAddress, withFeePayer, options } = args;
112
+ return removeDispatchableAuthenticatorTransaction({
113
+ aptosConfig: this.config,
114
+ sender: accountAddress,
115
+ withFeePayer,
116
+ options,
117
+ });
105
118
  }
106
119
 
107
120
  /**
@@ -196,6 +209,7 @@ export class AccountAbstraction {
196
209
  *
197
210
  * @param args.accountAddress - The account to enable account abstraction for.
198
211
  * @param args.authenticationFunction - The authentication function info to use.
212
+ * @param args.withFeePayer - Whether the transaction should use a fee payer.
199
213
  * @param args.options - The options for the transaction.
200
214
  * @returns A transaction to enable account abstraction for the account.
201
215
  */
@@ -218,22 +232,25 @@ export class AccountAbstraction {
218
232
  *
219
233
  * @param args.accountAddress - The account to disable account abstraction for.
220
234
  * @param args.authenticationFunction - The authentication function info to remove.
235
+ * @param args.withFeePayer - Whether the transaction should use a fee payer.
221
236
  * @param args.options - The options for the transaction.
222
237
  * @returns A transaction to disable account abstraction for the account.
223
238
  */
224
239
  public disableAccountAbstractionTransaction = async (args: {
225
240
  accountAddress: AccountAddressInput;
226
241
  authenticationFunction?: MoveFunctionId;
242
+ withFeePayer?: boolean;
227
243
  options?: InputGenerateTransactionOptions;
228
244
  }) => {
229
- const { accountAddress, authenticationFunction, options } = args;
245
+ const { accountAddress, authenticationFunction, withFeePayer, options } = args;
230
246
  if (authenticationFunction) {
231
247
  return this.removeAuthenticationFunctionTransaction({
232
248
  accountAddress,
233
249
  authenticationFunction,
250
+ withFeePayer,
234
251
  options,
235
252
  });
236
253
  }
237
- return this.removeDispatchableAuthenticatorTransaction({ accountAddress, options });
254
+ return this.removeDispatchableAuthenticatorTransaction({ accountAddress, withFeePayer, options });
238
255
  };
239
256
  }
package/src/api/ans.ts CHANGED
@@ -158,6 +158,7 @@ export class ANS {
158
158
  * @param args.sender - The account initiating the transaction.
159
159
  * @param args.name - A string representing the domain or subdomain name (e.g., "test.aptos").
160
160
  * @param args.address - The AccountAddressInput of the address to set the domain or subdomain to.
161
+ * @param args.withFeePayer - Whether to build a fee-payer transaction.
161
162
  * @param args.options - Optional settings for generating the transaction.
162
163
  *
163
164
  * @returns An object containing the transaction and the InputEntryFunctionData
@@ -191,6 +192,7 @@ export class ANS {
191
192
  sender: AccountAddressInput;
192
193
  name: string;
193
194
  address: AccountAddressInput;
195
+ withFeePayer?: boolean;
194
196
  options?: InputGenerateTransactionOptions;
195
197
  }): Promise<{ transaction: SimpleTransaction; data: InputEntryFunctionData }> {
196
198
  return setTargetAddress({ aptosConfig: this.config, ...args });
@@ -203,6 +205,7 @@ export class ANS {
203
205
  * @param args - The arguments for clearing the target address.
204
206
  * @param args.sender - The account initiating the transaction.
205
207
  * @param args.name - A string representing the domain or subdomain name (e.g., "test.aptos").
208
+ * @param args.withFeePayer - Whether to build a fee-payer transaction.
206
209
  * @param args.options - Optional settings for generating the transaction.
207
210
  *
208
211
  * @returns An object containing the transaction and the InputEntryFunctionData
@@ -233,6 +236,7 @@ export class ANS {
233
236
  async clearTargetAddress(args: {
234
237
  sender: AccountAddressInput;
235
238
  name: string;
239
+ withFeePayer?: boolean;
236
240
  options?: InputGenerateTransactionOptions;
237
241
  }): Promise<{ transaction: SimpleTransaction; data: InputEntryFunctionData }> {
238
242
  return clearTargetAddress({ aptosConfig: this.config, ...args });
@@ -273,6 +277,7 @@ export class ANS {
273
277
  * @param args - The arguments for setting the primary name.
274
278
  * @param args.sender - The sender account.
275
279
  * @param args.name - A string representing the name to set as primary (e.g., "test.aptos").
280
+ * @param args.withFeePayer - Whether to build a fee-payer transaction.
276
281
  * @param args.options - Optional transaction options.
277
282
  *
278
283
  * @returns An object containing the transaction and the InputEntryFunctionData
@@ -299,6 +304,7 @@ export class ANS {
299
304
  async setPrimaryName(args: {
300
305
  sender: AccountAddressInput;
301
306
  name?: string;
307
+ withFeePayer?: boolean;
302
308
  options?: InputGenerateTransactionOptions;
303
309
  }): Promise<{ transaction: SimpleTransaction; data: InputEntryFunctionData }> {
304
310
  return setPrimaryName({ aptosConfig: this.config, ...args });
@@ -324,6 +330,7 @@ export class ANS {
324
330
  * be used.
325
331
  * @param args.toAddress optional - The address to send the domain name to. If not provided, the transaction will be sent to the
326
332
  * router.
333
+ * @param args.withFeePayer - Whether to build a fee-payer transaction.
327
334
  *
328
335
  * @returns An object containing the transaction and the InputEntryFunctionData
329
336
  *
@@ -365,6 +372,7 @@ export class ANS {
365
372
  * @param args.sender - The sender account, which must be the domain owner.
366
373
  * @param args.name - A string representing the domain to renew. Subdomains cannot be renewed.
367
374
  * @param args.years - The number of years to renew the name. Currently, only one year is permitted.
375
+ * @param args.withFeePayer - Whether to build a fee-payer transaction.
368
376
  * @param args.options - Optional transaction options.
369
377
  *
370
378
  * @returns An object containing the transaction and the InputEntryFunctionData
@@ -393,6 +401,7 @@ export class ANS {
393
401
  sender: AccountAddressInput;
394
402
  name: string;
395
403
  years?: 1;
404
+ withFeePayer?: boolean;
396
405
  options?: InputGenerateTransactionOptions;
397
406
  }): Promise<{ transaction: SimpleTransaction; data: InputEntryFunctionData }> {
398
407
  return renewDomain({ aptosConfig: this.config, ...args });
package/src/api/coin.ts CHANGED
@@ -46,6 +46,7 @@ export class Coin {
46
46
  * @param args.recipient The recipient account address.
47
47
  * @param args.amount The amount of coins to transfer.
48
48
  * @param args.coinType Optional. The coin struct type to transfer. Defaults to 0x1::aptos_coin::AptosCoin.
49
+ * @param args.withFeePayer Whether to build a fee-payer transaction.
49
50
  * @param args.options Optional. Additional options for generating the transaction.
50
51
  *
51
52
  * @returns SimpleTransaction
@@ -76,6 +77,7 @@ export class Coin {
76
77
  recipient: AccountAddressInput;
77
78
  amount: AnyNumber;
78
79
  coinType?: MoveStructId;
80
+ withFeePayer?: boolean;
79
81
  options?: InputGenerateTransactionOptions;
80
82
  }): Promise<SimpleTransaction> {
81
83
  return transferCoinTransaction({ aptosConfig: this.config, ...args });
@@ -490,6 +490,7 @@ export class DigitalAsset {
490
490
  * @param args.description - The description of the collection.
491
491
  * @param args.name - The name of the collection.
492
492
  * @param args.uri - The URI to additional info about the collection.
493
+ * @param args.withFeePayer - Whether to build a fee-payer transaction.
493
494
  * @param args.options - Optional parameters for generating the transaction.
494
495
  *
495
496
  * The parameters below are optional:
@@ -538,6 +539,7 @@ export class DigitalAsset {
538
539
  description: string;
539
540
  name: string;
540
541
  uri: string;
542
+ withFeePayer?: boolean;
541
543
  options?: InputGenerateTransactionOptions;
542
544
  } & CreateCollectionOptions,
543
545
  ): Promise<SimpleTransaction> {
@@ -556,6 +558,7 @@ export class DigitalAsset {
556
558
  * @param args.propertyKeys - Optional array of property keys for the digital asset.
557
559
  * @param args.propertyTypes - Optional array of property types for the digital asset.
558
560
  * @param args.propertyValues - Optional array of property values for the digital asset.
561
+ * @param args.withFeePayer - Whether to build a fee-payer transaction.
559
562
  * @param args.options - Optional transaction generation options.
560
563
  *
561
564
  * @returns A SimpleTransaction that can be simulated or submitted to the chain.
@@ -592,6 +595,7 @@ export class DigitalAsset {
592
595
  propertyKeys?: Array<string>;
593
596
  propertyTypes?: Array<PropertyType>;
594
597
  propertyValues?: Array<PropertyValue>;
598
+ withFeePayer?: boolean;
595
599
  options?: InputGenerateTransactionOptions;
596
600
  }): Promise<SimpleTransaction> {
597
601
  return mintDigitalAssetTransaction({ aptosConfig: this.config, ...args });
@@ -606,6 +610,7 @@ export class DigitalAsset {
606
610
  * @param args.digitalAssetAddress The address of the digital asset being transferred.
607
611
  * @param args.recipient The account address of the recipient.
608
612
  * @param args.digitalAssetType Optional. The type of the digital asset, defaults to "0x4::token::Token".
613
+ * @param args.withFeePayer - Whether to build a fee-payer transaction.
609
614
  * @param args.options Optional. Additional options for generating the transaction.
610
615
  *
611
616
  * @returns A SimpleTransaction that can be simulated or submitted to the chain.
@@ -636,6 +641,7 @@ export class DigitalAsset {
636
641
  digitalAssetAddress: AccountAddressInput;
637
642
  recipient: AccountAddress;
638
643
  digitalAssetType?: MoveStructId;
644
+ withFeePayer?: boolean;
639
645
  options?: InputGenerateTransactionOptions;
640
646
  }): Promise<SimpleTransaction> {
641
647
  return transferDigitalAssetTransaction({ aptosConfig: this.config, ...args });
@@ -655,6 +661,7 @@ export class DigitalAsset {
655
661
  * @param args.propertyKeys - The property keys for storing on-chain properties.
656
662
  * @param args.propertyTypes - The type of property values.
657
663
  * @param args.propertyValues - The property values to be stored on-chain.
664
+ * @param args.withFeePayer - Whether to build a fee-payer transaction.
658
665
  * @param args.options - Additional options for generating the transaction.
659
666
  *
660
667
  * @returns A SimpleTransaction that can be simulated or submitted to the chain.
@@ -693,6 +700,7 @@ export class DigitalAsset {
693
700
  propertyKeys?: Array<string>;
694
701
  propertyTypes?: Array<PropertyType>;
695
702
  propertyValues?: Array<PropertyValue>;
703
+ withFeePayer?: boolean;
696
704
  options?: InputGenerateTransactionOptions;
697
705
  }): Promise<SimpleTransaction> {
698
706
  return mintSoulBoundTransaction({ aptosConfig: this.config, ...args });
@@ -705,6 +713,7 @@ export class DigitalAsset {
705
713
  * @param args.creator The creator account that is burning the digital asset.
706
714
  * @param args.digitalAssetAddress The address of the digital asset to be burned.
707
715
  * @param args.digitalAssetType Optional. The type of the digital asset being burned.
716
+ * @param args.withFeePayer - Whether to build a fee-payer transaction.
708
717
  * @param args.options Optional. Additional options for generating the transaction.
709
718
  *
710
719
  * @returns A SimpleTransaction that can be simulated or submitted to the chain.
@@ -733,6 +742,7 @@ export class DigitalAsset {
733
742
  creator: Account;
734
743
  digitalAssetAddress: AccountAddressInput;
735
744
  digitalAssetType?: MoveStructId;
745
+ withFeePayer?: boolean;
736
746
  options?: InputGenerateTransactionOptions;
737
747
  }) {
738
748
  return burnDigitalAssetTransaction({ aptosConfig: this.config, ...args });
@@ -746,6 +756,7 @@ export class DigitalAsset {
746
756
  * @param args.creator The creator account initiating the freeze.
747
757
  * @param args.digitalAssetAddress The address of the digital asset to be frozen.
748
758
  * @param args.digitalAssetType Optional. The type of the digital asset being frozen.
759
+ * @param args.withFeePayer - Whether to build a fee-payer transaction.
749
760
  * @param args.options Optional. Additional options for generating the transaction.
750
761
  *
751
762
  * @returns A SimpleTransaction that can be simulated or submitted to the chain.
@@ -774,6 +785,7 @@ export class DigitalAsset {
774
785
  creator: Account;
775
786
  digitalAssetAddress: AccountAddressInput;
776
787
  digitalAssetType?: MoveStructId;
788
+ withFeePayer?: boolean;
777
789
  options?: InputGenerateTransactionOptions;
778
790
  }) {
779
791
  return freezeDigitalAssetTransferTransaction({ aptosConfig: this.config, ...args });
@@ -787,6 +799,7 @@ export class DigitalAsset {
787
799
  * @param args.creator The creator account that is unfreezing the digital asset transfer.
788
800
  * @param args.digitalAssetAddress The address of the digital asset to unfreeze.
789
801
  * @param args.digitalAssetType Optional. The type of the digital asset being unfrozen.
802
+ * @param args.withFeePayer - Whether to build a fee-payer transaction.
790
803
  * @param args.options Optional. Additional options for generating the transaction.
791
804
  *
792
805
  * @returns A SimpleTransaction that can be simulated or submitted to the chain.
@@ -816,6 +829,7 @@ export class DigitalAsset {
816
829
  creator: Account;
817
830
  digitalAssetAddress: AccountAddressInput;
818
831
  digitalAssetType?: MoveStructId;
832
+ withFeePayer?: boolean;
819
833
  options?: InputGenerateTransactionOptions;
820
834
  }) {
821
835
  return unfreezeDigitalAssetTransferTransaction({ aptosConfig: this.config, ...args });
@@ -829,6 +843,7 @@ export class DigitalAsset {
829
843
  * @param args.description The digital asset description to be set.
830
844
  * @param args.digitalAssetAddress The address of the digital asset.
831
845
  * @param args.digitalAssetType Optional. The type of the digital asset.
846
+ * @param args.withFeePayer - Whether to build a fee-payer transaction.
832
847
  * @param args.options Optional. Additional options for generating the transaction.
833
848
  *
834
849
  * @returns A SimpleTransaction that can be simulated or submitted to the chain.
@@ -859,6 +874,7 @@ export class DigitalAsset {
859
874
  description: string;
860
875
  digitalAssetAddress: AccountAddressInput;
861
876
  digitalAssetType?: MoveStructId;
877
+ withFeePayer?: boolean;
862
878
  options?: InputGenerateTransactionOptions;
863
879
  }) {
864
880
  return setDigitalAssetDescriptionTransaction({ aptosConfig: this.config, ...args });
@@ -872,6 +888,7 @@ export class DigitalAsset {
872
888
  * @param args.name The desired name for the digital asset.
873
889
  * @param args.digitalAssetAddress The address of the digital asset.
874
890
  * @param args.digitalAssetType Optional. The type of the digital asset, represented as a Move struct ID.
891
+ * @param args.withFeePayer - Whether to build a fee-payer transaction.
875
892
  * @param args.options Optional. Additional options for generating the transaction.
876
893
  *
877
894
  * @returns A SimpleTransaction that can be simulated or submitted to the blockchain.
@@ -905,6 +922,7 @@ export class DigitalAsset {
905
922
  name: string;
906
923
  digitalAssetAddress: AccountAddressInput;
907
924
  digitalAssetType?: MoveStructId;
925
+ withFeePayer?: boolean;
908
926
  options?: InputGenerateTransactionOptions;
909
927
  }) {
910
928
  return setDigitalAssetNameTransaction({ aptosConfig: this.config, ...args });
@@ -918,6 +936,7 @@ export class DigitalAsset {
918
936
  * @param args.uri The digital asset URI to be set.
919
937
  * @param args.digitalAssetAddress The address of the digital asset.
920
938
  * @param args.digitalAssetType Optional. The type of the digital asset.
939
+ * @param args.withFeePayer - Whether to build a fee-payer transaction.
921
940
  * @param args.options Optional. Additional options for generating the transaction.
922
941
  * @returns A SimpleTransaction that can be simulated or submitted to the chain.
923
942
  *
@@ -947,6 +966,7 @@ export class DigitalAsset {
947
966
  uri: string;
948
967
  digitalAssetAddress: AccountAddressInput;
949
968
  digitalAssetType?: MoveStructId;
969
+ withFeePayer?: boolean;
950
970
  options?: InputGenerateTransactionOptions;
951
971
  }) {
952
972
  return setDigitalAssetURITransaction({ aptosConfig: this.config, ...args });
@@ -963,6 +983,7 @@ export class DigitalAsset {
963
983
  * @param args.propertyValue - The property value to be stored on-chain.
964
984
  * @param args.digitalAssetAddress - The digital asset address.
965
985
  * @param args.digitalAssetType - (Optional) The type of the digital asset.
986
+ * @param args.withFeePayer - Whether to build a fee-payer transaction.
966
987
  * @param args.options - (Optional) Options for generating the transaction.
967
988
  * @returns A SimpleTransaction that can be simulated or submitted to the chain.
968
989
  *
@@ -996,6 +1017,7 @@ export class DigitalAsset {
996
1017
  propertyValue: PropertyValue;
997
1018
  digitalAssetAddress: AccountAddressInput;
998
1019
  digitalAssetType?: MoveStructId;
1020
+ withFeePayer?: boolean;
999
1021
  options?: InputGenerateTransactionOptions;
1000
1022
  }) {
1001
1023
  return addDigitalAssetPropertyTransaction({ aptosConfig: this.config, ...args });
@@ -1012,6 +1034,7 @@ export class DigitalAsset {
1012
1034
  * @param args.propertyValue The property value to be stored on-chain.
1013
1035
  * @param args.digitalAssetAddress The digital asset address.
1014
1036
  * @param args.digitalAssetType Optional. The type of the digital asset.
1037
+ * @param args.withFeePayer - Whether to build a fee-payer transaction.
1015
1038
  * @param args.options Optional. Additional options for generating the transaction.
1016
1039
  *
1017
1040
  * @returns A SimpleTransaction that can be simulated or submitted to the chain.
@@ -1046,6 +1069,7 @@ export class DigitalAsset {
1046
1069
  propertyValue: PropertyValue;
1047
1070
  digitalAssetAddress: AccountAddressInput;
1048
1071
  digitalAssetType?: MoveStructId;
1072
+ withFeePayer?: boolean;
1049
1073
  options?: InputGenerateTransactionOptions;
1050
1074
  }) {
1051
1075
  return removeDigitalAssetPropertyTransaction({ aptosConfig: this.config, ...args });
@@ -1061,6 +1085,7 @@ export class DigitalAsset {
1061
1085
  * @param args.propertyType The type of property value.
1062
1086
  * @param args.propertyValue The property value to be stored on-chain.
1063
1087
  * @param args.digitalAssetType Optional. The type of the digital asset.
1088
+ * @param args.withFeePayer - Whether to build a fee-payer transaction.
1064
1089
  * @param args.options Optional. Additional options for generating the transaction.
1065
1090
  *
1066
1091
  * @returns A SimpleTransaction that can be simulated or submitted to the chain.
@@ -1095,6 +1120,7 @@ export class DigitalAsset {
1095
1120
  propertyValue: PropertyValue;
1096
1121
  digitalAssetAddress: AccountAddressInput;
1097
1122
  digitalAssetType?: MoveStructId;
1123
+ withFeePayer?: boolean;
1098
1124
  options?: InputGenerateTransactionOptions;
1099
1125
  }) {
1100
1126
  return updateDigitalAssetPropertyTransaction({ aptosConfig: this.config, ...args });
@@ -1112,6 +1138,7 @@ export class DigitalAsset {
1112
1138
  * @param args.propertyValue - The property value to be stored on-chain.
1113
1139
  * @param args.digitalAssetAddress - The digital asset address.
1114
1140
  * @param args.digitalAssetType - The optional type of the digital asset.
1141
+ * @param args.withFeePayer - Whether to build a fee-payer transaction.
1115
1142
  * @param args.options - Optional transaction generation options.
1116
1143
  *
1117
1144
  * @returns A SimpleTransaction that can be simulated or submitted to the chain.
@@ -1146,6 +1173,7 @@ export class DigitalAsset {
1146
1173
  propertyValue: PropertyValue;
1147
1174
  digitalAssetAddress: AccountAddressInput;
1148
1175
  digitalAssetType?: MoveStructId;
1176
+ withFeePayer?: boolean;
1149
1177
  options?: InputGenerateTransactionOptions;
1150
1178
  }) {
1151
1179
  return addDigitalAssetTypedPropertyTransaction({ aptosConfig: this.config, ...args });
@@ -1162,6 +1190,7 @@ export class DigitalAsset {
1162
1190
  * @param args.propertyValue - The property value to be stored on-chain.
1163
1191
  * @param args.digitalAssetAddress - The digital asset address.
1164
1192
  * @param args.digitalAssetType - (Optional) The type of the digital asset.
1193
+ * @param args.withFeePayer - Whether to build a fee-payer transaction.
1165
1194
  * @param args.options - (Optional) Additional options for generating the transaction.
1166
1195
  *
1167
1196
  * @returns A SimpleTransaction that can be simulated or submitted to the chain.
@@ -1196,6 +1225,7 @@ export class DigitalAsset {
1196
1225
  propertyValue: PropertyValue;
1197
1226
  digitalAssetAddress: AccountAddressInput;
1198
1227
  digitalAssetType?: MoveStructId;
1228
+ withFeePayer?: boolean;
1199
1229
  options?: InputGenerateTransactionOptions;
1200
1230
  }) {
1201
1231
  return updateDigitalAssetTypedPropertyTransaction({ aptosConfig: this.config, ...args });
@@ -281,6 +281,7 @@ export class FungibleAsset {
281
281
  * this would be the USDT address.
282
282
  * @param args.recipient - The recipient account address.
283
283
  * @param args.amount - The number of assets to transfer.
284
+ * @param args.withFeePayer - Whether to build a fee-payer transaction.
284
285
  * @param args.options - Optional parameters for generating the transaction.
285
286
  *
286
287
  * @returns A SimpleTransaction that can be simulated or submitted to the chain.
@@ -312,6 +313,7 @@ export class FungibleAsset {
312
313
  fungibleAssetMetadataAddress: AccountAddressInput;
313
314
  recipient: AccountAddressInput;
314
315
  amount: AnyNumber;
316
+ withFeePayer?: boolean;
315
317
  options?: InputGenerateTransactionOptions;
316
318
  }): Promise<SimpleTransaction> {
317
319
  return transferFungibleAsset({ aptosConfig: this.config, ...args });
@@ -326,6 +328,7 @@ export class FungibleAsset {
326
328
  * @param args.fromStore - The fungible store address initiating the transfer.
327
329
  * @param args.toStore - The fungible store address receiving the asset.
328
330
  * @param args.amount - The number of assets to transfer. Must be a positive number.
331
+ * @param args.withFeePayer - Whether to build a fee-payer transaction.
329
332
  * @param args.options - Optional parameters for generating the transaction.
330
333
  *
331
334
  * @returns A SimpleTransaction that can be simulated or submitted to the chain.
@@ -364,6 +367,7 @@ export class FungibleAsset {
364
367
  fromStore: AccountAddressInput;
365
368
  toStore: AccountAddressInput;
366
369
  amount: AnyNumber;
370
+ withFeePayer?: boolean;
367
371
  options?: InputGenerateTransactionOptions;
368
372
  }): Promise<SimpleTransaction> {
369
373
  return transferFungibleAssetBetweenStores({ aptosConfig: this.config, ...args });
@@ -6,11 +6,12 @@ import { EphemeralKeyPair } from "../account/EphemeralKeyPair.js";
6
6
  import { KeylessAccount } from "../account/KeylessAccount.js";
7
7
  import { ProofFetchCallback } from "../account/AbstractKeylessAccount.js";
8
8
  import { FederatedKeylessAccount } from "../account/FederatedKeylessAccount.js";
9
- import { AccountAddressInput } from "../core/accountAddress.js";
9
+ import { AccountAddress, AccountAddressInput } from "../core/accountAddress.js";
10
10
  import { ZeroKnowledgeSig } from "../core/crypto/keyless.js";
11
11
  import {
12
12
  deriveKeylessAccount,
13
13
  getPepper,
14
+ getPepperAndAddress,
14
15
  getPepperBase,
15
16
  getProof,
16
17
  updateFederatedKeylessJwkSetTransaction,
@@ -94,6 +95,40 @@ export class Keyless {
94
95
  return getPepper({ aptosConfig: this.config, ...args });
95
96
  }
96
97
 
98
+ /**
99
+ * Fetches pepper bytes and the initial Keyless account address from public
100
+ * ephemeral key components.
101
+ *
102
+ * `ephemeralPublicKey` must contain the BCS-serialized ephemeral public key.
103
+ * The returned address is the initial address derived by the pepper service
104
+ * and does not reflect later authentication-key rotation.
105
+ *
106
+ * This lookup validates the JWT-to-EPK association but does not prove
107
+ * possession of the corresponding ephemeral private key. An off-chain
108
+ * authentication flow must additionally verify the client's signature over a
109
+ * fresh, replay-protected challenge.
110
+ *
111
+ * @param args - Public ephemeral key data committed into the JWT nonce.
112
+ * @param args.jwt - JWT issued for the Keyless session.
113
+ * @param args.ephemeralPublicKey - BCS-serialized ephemeral public key.
114
+ * @param args.expiryDateSecs - EPK expiration as a Unix timestamp in seconds.
115
+ * @param args.blinder - Blinder committed with the EPK and expiration.
116
+ * @param args.uidKey - JWT claim containing the user ID. Defaults to `"sub"`.
117
+ * @param args.derivationPath - Optional SLIP-0010 derivation path.
118
+ * @returns Pepper bytes and the initial Keyless account address.
119
+ * @group Keyless
120
+ */
121
+ async getPepperAndAddress(args: {
122
+ jwt: string;
123
+ ephemeralPublicKey: HexInput;
124
+ expiryDateSecs: number;
125
+ blinder: HexInput;
126
+ uidKey?: string;
127
+ derivationPath?: string;
128
+ }): Promise<{ pepper: Uint8Array; address: AccountAddress }> {
129
+ return getPepperAndAddress({ aptosConfig: this.config, ...args });
130
+ }
131
+
97
132
  /**
98
133
  * Fetches the `pepper_base` from the Aptos pepper service API.
99
134
  *
@@ -245,6 +280,8 @@ export class Keyless {
245
280
  * @param args.sender The account that will install the JWKs
246
281
  * @param args.iss the iss claim of the federated OIDC provider.
247
282
  * @param args.jwksUrl the URL to find the corresponding JWKs. For supported IDP providers this parameter in not necessary.
283
+ * @param args.withFeePayer Whether to build a sponsored transaction.
284
+ * @param args.options Optional settings for generating the transaction.
248
285
  *
249
286
  * @returns The pending transaction that results from submission.
250
287
  * @group Keyless
@@ -253,6 +290,7 @@ export class Keyless {
253
290
  sender: Account;
254
291
  iss: string;
255
292
  jwksUrl?: string;
293
+ withFeePayer?: boolean;
256
294
  options?: InputGenerateTransactionOptions;
257
295
  }): Promise<SimpleTransaction> {
258
296
  return updateFederatedKeylessJwkSetTransaction({ aptosConfig: this.config, ...args });