@moveindustries/ts-sdk 5.1.5 → 5.1.7

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 (207) hide show
  1. package/README.md +241 -43
  2. package/dist/common/{accountAddress-DoqkxUqw.d.ts → accountAddress-CQEq9RVR.d.ts} +6 -2
  3. package/dist/common/chunk-56DGDNEY.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 +393 -55
  8. package/dist/common/index.js +32 -32
  9. package/dist/common/index.js.map +1 -1
  10. package/dist/esm/account/AbstractKeylessAccount.mjs +1 -1
  11. package/dist/esm/account/AbstractedAccount.mjs +1 -1
  12. package/dist/esm/account/Account.mjs +1 -1
  13. package/dist/esm/account/AccountUtils.mjs +1 -1
  14. package/dist/esm/account/DerivableAbstractedAccount.mjs +1 -1
  15. package/dist/esm/account/Ed25519Account.mjs +1 -1
  16. package/dist/esm/account/EphemeralKeyPair.mjs +1 -1
  17. package/dist/esm/account/FederatedKeylessAccount.mjs +1 -1
  18. package/dist/esm/account/KeylessAccount.mjs +1 -1
  19. package/dist/esm/account/MultiEd25519Account.mjs +1 -1
  20. package/dist/esm/account/MultiKeyAccount.mjs +1 -1
  21. package/dist/esm/account/SingleKeyAccount.mjs +1 -1
  22. package/dist/esm/account/index.mjs +1 -1
  23. package/dist/esm/account/utils.mjs +1 -1
  24. package/dist/esm/api/account/abstraction.mjs +1 -1
  25. package/dist/esm/api/account.mjs +1 -1
  26. package/dist/esm/api/coin.mjs +1 -1
  27. package/dist/esm/api/digitalAsset.mjs +1 -1
  28. package/dist/esm/api/faucet.mjs +1 -1
  29. package/dist/esm/api/fungibleAsset.mjs +1 -1
  30. package/dist/esm/api/general.mjs +1 -1
  31. package/dist/esm/api/index.d.mts +2 -2
  32. package/dist/esm/api/index.mjs +1 -1
  33. package/dist/esm/api/keyless.mjs +1 -1
  34. package/dist/esm/api/{ans.d.mts → mns.d.mts} +390 -52
  35. package/dist/esm/api/mns.mjs +2 -0
  36. package/dist/esm/api/movement.d.mts +4 -4
  37. package/dist/esm/api/movement.mjs +1 -1
  38. package/dist/esm/api/movementConfig.mjs +1 -1
  39. package/dist/esm/api/object.mjs +1 -1
  40. package/dist/esm/api/staking.mjs +1 -1
  41. package/dist/esm/api/table.mjs +1 -1
  42. package/dist/esm/api/transaction.mjs +1 -1
  43. package/dist/esm/api/transactionSubmission/build.mjs +1 -1
  44. package/dist/esm/api/transactionSubmission/management.mjs +1 -1
  45. package/dist/esm/api/transactionSubmission/sign.mjs +1 -1
  46. package/dist/esm/api/transactionSubmission/simulate.mjs +1 -1
  47. package/dist/esm/api/transactionSubmission/submit.mjs +1 -1
  48. package/dist/esm/api/utils.mjs +1 -1
  49. package/dist/esm/bcs/index.mjs +1 -1
  50. package/dist/esm/bcs/serializable/moveStructs.mjs +1 -1
  51. package/dist/esm/{chunk-KPJGWDSQ.mjs → chunk-74X3LBZR.mjs} +1 -1
  52. package/dist/esm/{chunk-KPJGWDSQ.mjs.map → chunk-74X3LBZR.mjs.map} +1 -1
  53. package/dist/esm/{chunk-YFFYA5U3.mjs → chunk-7AJK3QMK.mjs} +2 -2
  54. package/dist/esm/{chunk-WVF47V5E.mjs → chunk-E3O3YOFD.mjs} +2 -2
  55. package/dist/esm/chunk-FPHA2UD2.mjs +2 -0
  56. package/dist/esm/chunk-FPHA2UD2.mjs.map +1 -0
  57. package/dist/esm/{chunk-O7XWQTYM.mjs → chunk-GTWNSTVB.mjs} +2 -2
  58. package/dist/esm/{chunk-ZGBIH6MJ.mjs → chunk-HX7XBUOY.mjs} +2 -2
  59. package/dist/esm/chunk-LVNME34X.mjs +4 -0
  60. package/dist/esm/chunk-LVNME34X.mjs.map +1 -0
  61. package/dist/esm/chunk-LZ24RPY3.mjs +2 -0
  62. package/dist/esm/{chunk-P6MFR7W6.mjs.map → chunk-LZ24RPY3.mjs.map} +1 -1
  63. package/dist/esm/{chunk-5KMDJLYM.mjs → chunk-POOO2OP5.mjs} +2 -2
  64. package/dist/esm/{chunk-SZG3ZZGN.mjs → chunk-Q2IJWWWU.mjs} +2 -2
  65. package/dist/esm/{chunk-3KNJ4VWA.mjs → chunk-Q55N5DU3.mjs} +2 -2
  66. package/dist/esm/{chunk-P7DJNENM.mjs → chunk-QMRVGJFC.mjs} +2 -2
  67. package/dist/esm/chunk-QMRVGJFC.mjs.map +1 -0
  68. package/dist/esm/{chunk-UVP74ONT.mjs → chunk-SLXLZU5N.mjs} +1 -1
  69. package/dist/esm/chunk-SLXLZU5N.mjs.map +1 -0
  70. package/dist/esm/{chunk-I6YGBK5S.mjs → chunk-SSTVXHYQ.mjs} +1 -1
  71. package/dist/esm/chunk-SSTVXHYQ.mjs.map +1 -0
  72. package/dist/esm/{chunk-46MDTYYN.mjs → chunk-YXS3R2MX.mjs} +2 -2
  73. package/dist/esm/{chunk-7KIJGBLL.mjs → chunk-ZUWARBWT.mjs} +2 -2
  74. package/dist/esm/{chunk-7KIJGBLL.mjs.map → chunk-ZUWARBWT.mjs.map} +1 -1
  75. package/dist/esm/cli/index.mjs +1 -1
  76. package/dist/esm/cli/localNode.mjs +1 -1
  77. package/dist/esm/client/core.mjs +1 -1
  78. package/dist/esm/client/get.mjs +1 -1
  79. package/dist/esm/client/index.mjs +1 -1
  80. package/dist/esm/client/post.mjs +1 -1
  81. package/dist/esm/core/crypto/abstraction.mjs +1 -1
  82. package/dist/esm/core/crypto/deserializationUtils.mjs +1 -1
  83. package/dist/esm/core/crypto/ed25519.mjs +1 -1
  84. package/dist/esm/core/crypto/ephemeral.mjs +1 -1
  85. package/dist/esm/core/crypto/federatedKeyless.mjs +1 -1
  86. package/dist/esm/core/crypto/index.mjs +1 -1
  87. package/dist/esm/core/crypto/keyless.mjs +1 -1
  88. package/dist/esm/core/crypto/multiEd25519.mjs +1 -1
  89. package/dist/esm/core/crypto/multiKey.mjs +1 -1
  90. package/dist/esm/core/crypto/proof.mjs +1 -1
  91. package/dist/esm/core/crypto/publicKey.mjs +1 -1
  92. package/dist/esm/core/crypto/secp256k1.mjs +1 -1
  93. package/dist/esm/core/crypto/secp256r1.mjs +1 -1
  94. package/dist/esm/core/crypto/signature.mjs +1 -1
  95. package/dist/esm/core/crypto/singleKey.mjs +1 -1
  96. package/dist/esm/core/crypto/utils.mjs +1 -1
  97. package/dist/esm/core/index.mjs +1 -1
  98. package/dist/esm/errors/index.mjs +1 -1
  99. package/dist/esm/index.d.mts +3 -3
  100. package/dist/esm/index.mjs +1 -1
  101. package/dist/esm/internal/abstraction.mjs +1 -1
  102. package/dist/esm/internal/account.mjs +1 -1
  103. package/dist/esm/internal/coin.mjs +1 -1
  104. package/dist/esm/internal/digitalAsset.mjs +1 -1
  105. package/dist/esm/internal/faucet.mjs +1 -1
  106. package/dist/esm/internal/fungibleAsset.mjs +1 -1
  107. package/dist/esm/internal/general.mjs +1 -1
  108. package/dist/esm/internal/keyless.mjs +1 -1
  109. package/dist/esm/internal/{ans.d.mts → mns.d.mts} +237 -19
  110. package/dist/esm/internal/mns.mjs +2 -0
  111. package/dist/esm/internal/object.mjs +1 -1
  112. package/dist/esm/internal/staking.mjs +1 -1
  113. package/dist/esm/internal/table.mjs +1 -1
  114. package/dist/esm/internal/transaction.mjs +1 -1
  115. package/dist/esm/internal/transactionSubmission.mjs +1 -1
  116. package/dist/esm/internal/utils/index.mjs +1 -1
  117. package/dist/esm/internal/utils/utils.mjs +1 -1
  118. package/dist/esm/internal/view.mjs +1 -1
  119. package/dist/esm/transactions/authenticator/account.mjs +1 -1
  120. package/dist/esm/transactions/authenticator/index.mjs +1 -1
  121. package/dist/esm/transactions/authenticator/transaction.mjs +1 -1
  122. package/dist/esm/transactions/index.mjs +1 -1
  123. package/dist/esm/transactions/instances/index.mjs +1 -1
  124. package/dist/esm/transactions/instances/moduleId.mjs +1 -1
  125. package/dist/esm/transactions/instances/multiAgentTransaction.mjs +1 -1
  126. package/dist/esm/transactions/instances/rawTransaction.mjs +1 -1
  127. package/dist/esm/transactions/instances/rotationProofChallenge.mjs +1 -1
  128. package/dist/esm/transactions/instances/signedTransaction.mjs +1 -1
  129. package/dist/esm/transactions/instances/simpleTransaction.mjs +1 -1
  130. package/dist/esm/transactions/instances/transactionPayload.mjs +1 -1
  131. package/dist/esm/transactions/management/accountSequenceNumber.mjs +1 -1
  132. package/dist/esm/transactions/management/index.mjs +1 -1
  133. package/dist/esm/transactions/management/transactionWorker.mjs +1 -1
  134. package/dist/esm/transactions/transactionBuilder/helpers.mjs +1 -1
  135. package/dist/esm/transactions/transactionBuilder/index.mjs +1 -1
  136. package/dist/esm/transactions/transactionBuilder/remoteAbi.mjs +1 -1
  137. package/dist/esm/transactions/transactionBuilder/signingMessage.mjs +1 -1
  138. package/dist/esm/transactions/transactionBuilder/transactionBuilder.mjs +1 -1
  139. package/dist/esm/transactions/typeTag/index.mjs +1 -1
  140. package/dist/esm/transactions/typeTag/parser.mjs +1 -1
  141. package/dist/esm/types/index.d.mts +1 -1
  142. package/dist/esm/types/indexer.d.mts +6 -2
  143. package/dist/esm/utils/index.mjs +1 -1
  144. package/dist/esm/utils/normalizeBundle.mjs +1 -1
  145. package/dist/esm/version.d.mts +1 -1
  146. package/dist/esm/version.mjs +1 -1
  147. package/package.json +1 -1
  148. package/src/account/SingleKeyAccount.ts +1 -1
  149. package/src/api/account/abstraction.ts +1 -1
  150. package/src/api/account.ts +3 -3
  151. package/src/api/coin.ts +1 -1
  152. package/src/api/digitalAsset.ts +1 -1
  153. package/src/api/faucet.ts +1 -1
  154. package/src/api/fungibleAsset.ts +1 -1
  155. package/src/api/index.ts +0 -1
  156. package/src/api/keyless.ts +1 -1
  157. package/src/api/{ans.ts → mns.ts} +438 -52
  158. package/src/api/movement.ts +18 -17
  159. package/src/api/movementConfig.ts +3 -3
  160. package/src/api/object.ts +1 -1
  161. package/src/api/staking.ts +1 -1
  162. package/src/api/transactionSubmission/build.ts +1 -4
  163. package/src/bcs/index.ts +0 -1
  164. package/src/bcs/serializable/moveStructs.ts +4 -2
  165. package/src/cli/localNode.ts +21 -3
  166. package/src/client/core.ts +9 -1
  167. package/src/client/index.ts +0 -1
  168. package/src/core/crypto/index.ts +0 -1
  169. package/src/core/crypto/multiEd25519.ts +2 -2
  170. package/src/core/crypto/multiKey.ts +2 -2
  171. package/src/core/crypto/singleKey.ts +1 -1
  172. package/src/core/index.ts +0 -1
  173. package/src/errors/index.ts +6 -4
  174. package/src/index.ts +0 -1
  175. package/src/internal/account.ts +9 -6
  176. package/src/internal/general.ts +3 -1
  177. package/src/internal/{ans.ts → mns.ts} +644 -86
  178. package/src/transactions/authenticator/index.ts +0 -1
  179. package/src/transactions/index.ts +0 -1
  180. package/src/transactions/instances/index.ts +0 -1
  181. package/src/transactions/instances/transactionArgument.ts +1 -1
  182. package/src/transactions/management/transactionWorker.ts +3 -1
  183. package/src/transactions/transactionBuilder/index.ts +0 -1
  184. package/src/transactions/transactionBuilder/transactionBuilder.ts +11 -3
  185. package/src/transactions/typeTag/index.ts +3 -2
  186. package/src/types/indexer.ts +6 -1
  187. package/src/version.ts +1 -1
  188. package/dist/esm/api/ans.mjs +0 -2
  189. package/dist/esm/chunk-C5TXUD5K.mjs +0 -4
  190. package/dist/esm/chunk-C5TXUD5K.mjs.map +0 -1
  191. package/dist/esm/chunk-HL2JMZ7N.mjs +0 -2
  192. package/dist/esm/chunk-HL2JMZ7N.mjs.map +0 -1
  193. package/dist/esm/chunk-I6YGBK5S.mjs.map +0 -1
  194. package/dist/esm/chunk-P6MFR7W6.mjs +0 -2
  195. package/dist/esm/chunk-P7DJNENM.mjs.map +0 -1
  196. package/dist/esm/chunk-UVP74ONT.mjs.map +0 -1
  197. package/dist/esm/internal/ans.mjs +0 -2
  198. /package/dist/esm/api/{ans.mjs.map → mns.mjs.map} +0 -0
  199. /package/dist/esm/{chunk-YFFYA5U3.mjs.map → chunk-7AJK3QMK.mjs.map} +0 -0
  200. /package/dist/esm/{chunk-WVF47V5E.mjs.map → chunk-E3O3YOFD.mjs.map} +0 -0
  201. /package/dist/esm/{chunk-O7XWQTYM.mjs.map → chunk-GTWNSTVB.mjs.map} +0 -0
  202. /package/dist/esm/{chunk-ZGBIH6MJ.mjs.map → chunk-HX7XBUOY.mjs.map} +0 -0
  203. /package/dist/esm/{chunk-5KMDJLYM.mjs.map → chunk-POOO2OP5.mjs.map} +0 -0
  204. /package/dist/esm/{chunk-SZG3ZZGN.mjs.map → chunk-Q2IJWWWU.mjs.map} +0 -0
  205. /package/dist/esm/{chunk-3KNJ4VWA.mjs.map → chunk-Q55N5DU3.mjs.map} +0 -0
  206. /package/dist/esm/{chunk-46MDTYYN.mjs.map → chunk-YXS3R2MX.mjs.map} +0 -0
  207. /package/dist/esm/internal/{ans.mjs.map → mns.mjs.map} +0 -0
@@ -1,7 +1,7 @@
1
1
  import { M as MovementConfig, t as AccountAddress, s as AccountAddressInput, aG as InputGenerateTransactionOptions, ag as SimpleTransaction } from '../accountAddress-CNXtapt1.mjs';
2
- import { GetANSNameResponse } from '../types/indexer.mjs';
2
+ import { GetMNSNameResponse } from '../types/indexer.mjs';
3
3
  import { A as Account } from '../Ed25519Account-DsqenvLJ.mjs';
4
- import { RegisterNameParameters, GetAccountNamesArgs, GetAccountDomainsArgs, GetAccountSubdomainsArgs, GetDomainSubdomainsArgs } from '../internal/ans.mjs';
4
+ import { RegisterNameParameters, GetAccountNamesArgs, GetAccountDomainsArgs, GetAccountSubdomainsArgs, GetDomainSubdomainsArgs } from '../internal/mns.mjs';
5
5
  import '../utils/apiEndpoints.mjs';
6
6
  import '../utils/const.mjs';
7
7
  import '../core/common.mjs';
@@ -9,10 +9,10 @@ import '../types/generated/operations.mjs';
9
9
  import '../types/generated/types.mjs';
10
10
 
11
11
  /**
12
- * A class to handle all `ANS` operations.
13
- * @group ANS
12
+ * A class to handle all `MNS` (Movement Name Service) operations.
13
+ * @group MNS
14
14
  */
15
- declare class ANS {
15
+ declare class MNS {
16
16
  readonly config: MovementConfig;
17
17
  /**
18
18
  * Initializes a new instance of the Movement class with the provided configuration.
@@ -34,11 +34,11 @@ declare class ANS {
34
34
  * // Initialize the Movement client with the configuration
35
35
  * const movement = new Movement(config);
36
36
  *
37
- * console.log("Movement client initialized:", aptos);
37
+ * console.log("Movement client initialized:", movement);
38
38
  * }
39
39
  * runExample().catch(console.error);
40
40
  * ```
41
- * @group ANS
41
+ * @group MNS
42
42
  */
43
43
  constructor(config: MovementConfig);
44
44
  /**
@@ -57,13 +57,13 @@ declare class ANS {
57
57
  * const movement = new Movement(config);
58
58
  *
59
59
  * async function runExample() {
60
- * // Retrieve the owner address of "test.aptos"
61
- * const owner = await movement.getOwnerAddress({ name: "test.aptos" });
60
+ * // Retrieve the owner address of "test.move"
61
+ * const owner = await movement.getOwnerAddress({ name: "test.move" });
62
62
  * console.log(owner); // Logs the owner address or undefined if not owned
63
63
  * }
64
64
  * runExample().catch(console.error);
65
65
  * ```
66
- * @group ANS
66
+ * @group MNS
67
67
  */
68
68
  getOwnerAddress(args: {
69
69
  name: string;
@@ -84,15 +84,15 @@ declare class ANS {
84
84
  * const movement = new Movement(config);
85
85
  *
86
86
  * async function runExample() {
87
- * // Get the expiration time for the domain "test.aptos"
88
- * const exp = await movement.getExpiration({ name: "test.aptos" });
87
+ * // Get the expiration time for the domain "test.move"
88
+ * const exp = await movement.getExpiration({ name: "test.move" });
89
89
  *
90
90
  * // Log the expiration date
91
91
  * console.log(new Date(exp)); // Outputs the expiration date
92
92
  * }
93
93
  * runExample().catch(console.error);
94
94
  * ```
95
- * @group ANS
95
+ * @group MNS
96
96
  */
97
97
  getExpiration(args: {
98
98
  name: string;
@@ -103,7 +103,7 @@ declare class ANS {
103
103
  *
104
104
  * @param args - The arguments for retrieving the target address.
105
105
  * @param args.name - A string representing the name, which can be a primary name, a subdomain, or a combination (e.g.,
106
- * "primary", "primary.apt", "secondary.primary", "secondary.primary.apt").
106
+ * "primary", "primary.move", "secondary.primary", "secondary.primary.move").
107
107
  *
108
108
  * @returns AccountAddress if the name has a target, undefined otherwise.
109
109
  *
@@ -116,13 +116,13 @@ declare class ANS {
116
116
  *
117
117
  * async function runExample() {
118
118
  * // Retrieve the target address for the specified domain name
119
- * const targetAddr = await movement.getTargetAddress({ name: "test.aptos" });
119
+ * const targetAddr = await movement.getTargetAddress({ name: "test.move" });
120
120
  *
121
121
  * console.log(targetAddr); // Logs the target address, e.g., 0x123...
122
122
  * }
123
123
  * runExample().catch(console.error);
124
124
  * ```
125
- * @group ANS
125
+ * @group MNS
126
126
  */
127
127
  getTargetAddress(args: {
128
128
  name: string;
@@ -133,7 +133,7 @@ declare class ANS {
133
133
  *
134
134
  * @param args - The arguments for setting the target address.
135
135
  * @param args.sender - The account initiating the transaction.
136
- * @param args.name - A string representing the domain or subdomain name (e.g., "test.aptos").
136
+ * @param args.name - A string representing the domain or subdomain name (e.g., "test.move").
137
137
  * @param args.address - The AccountAddressInput of the address to set the domain or subdomain to.
138
138
  * @param args.options - Optional settings for generating the transaction.
139
139
  *
@@ -153,16 +153,16 @@ declare class ANS {
153
153
  *
154
154
  * await movement.setTargetAddress({
155
155
  * sender: sender,
156
- * name: "test.aptos",
156
+ * name: "test.move",
157
157
  * address: address,
158
158
  * });
159
159
  *
160
- * const targetAddress = await movement.getTargetAddress({ name: "test.aptos" });
161
- * console.log(targetAddress); // Should log the address set for "test.aptos"
160
+ * const targetAddress = await movement.getTargetAddress({ name: "test.move" });
161
+ * console.log(targetAddress); // Should log the address set for "test.move"
162
162
  * }
163
163
  * runExample().catch(console.error);
164
164
  * ```
165
- * @group ANS
165
+ * @group MNS
166
166
  */
167
167
  setTargetAddress(args: {
168
168
  sender: Account;
@@ -192,7 +192,7 @@ declare class ANS {
192
192
  * }
193
193
  * runExample().catch(console.error);
194
194
  * ```
195
- * @group ANS
195
+ * @group MNS
196
196
  */
197
197
  getPrimaryName(args: {
198
198
  address: AccountAddressInput;
@@ -203,7 +203,7 @@ declare class ANS {
203
203
  *
204
204
  * @param args - The arguments for setting the primary name.
205
205
  * @param args.sender - The sender account.
206
- * @param args.name - A string representing the name to set as primary (e.g., "test.aptos").
206
+ * @param args.name - A string representing the name to set as primary (e.g., "test.move").
207
207
  * @param args.options - Optional transaction options.
208
208
  *
209
209
  * @returns SimpleTransaction
@@ -218,14 +218,14 @@ declare class ANS {
218
218
  * async function runExample() {
219
219
  * // Set the primary name for the sender account
220
220
  * const sender = Account.generate(); // replace with a real account
221
- * await movement.setPrimaryName({ sender, name: "test.aptos" });
221
+ * await movement.setPrimaryName({ sender, name: "test.move" });
222
222
  *
223
223
  * const primaryName = await movement.getPrimaryName({ address: sender.accountAddress });
224
- * console.log("Primary Name:", primaryName); // Should log: "Primary Name: test.aptos"
224
+ * console.log("Primary Name:", primaryName); // Should log: "Primary Name: test.move"
225
225
  * }
226
226
  * runExample().catch(console.error);
227
227
  * ```
228
- * @group ANS
228
+ * @group MNS
229
229
  */
230
230
  setPrimaryName(args: {
231
231
  sender: Account;
@@ -238,8 +238,8 @@ declare class ANS {
238
238
  * This function allows you to register a domain or subdomain name with specific expiration policies and options.
239
239
  *
240
240
  * @param args.sender - The sender account.
241
- * @param args.name - A string of the name to register. This can be inclusive or exclusive of the .apt suffix. Examples include:
242
- * "test", "test.apt", "test.movement.apt", etc.
241
+ * @param args.name - A string of the name to register. This can be inclusive or exclusive of the .move suffix. Examples include:
242
+ * "test", "test.move", "test.movement.move", etc.
243
243
  * @param args.expiration - An object with the expiration policy of the name.
244
244
  * @param args.expiration.policy - 'domain' | 'subdomain:follow-domain' | 'subdomain:independent'.
245
245
  * - domain: Years is required and the name will expire after the given number of years.
@@ -263,10 +263,10 @@ declare class ANS {
263
263
  * const movement = new Movement(config);
264
264
  *
265
265
  * async function runExample() {
266
- * // Registering a subdomain name assuming def.apt is already registered and belongs to the sender alice.
266
+ * // Registering a subdomain name assuming def.move is already registered and belongs to the sender alice.
267
267
  * const txn = await movement.registerName({
268
268
  * sender: "0x1", // replace with a real sender account
269
- * name: "test.movement.apt",
269
+ * name: "test.movement.move",
270
270
  * expiration: {
271
271
  * policy: "subdomain:independent",
272
272
  * expirationDate: Date.now() + 30 * 24 * 60 * 60 * 1000, // expires in 30 days
@@ -277,7 +277,7 @@ declare class ANS {
277
277
  * }
278
278
  * runExample().catch(console.error);
279
279
  * ```
280
- * @group ANS
280
+ * @group MNS
281
281
  */
282
282
  registerName(args: Omit<RegisterNameParameters, "movementConfig">): Promise<SimpleTransaction>;
283
283
  /**
@@ -310,7 +310,7 @@ declare class ANS {
310
310
  * }
311
311
  * runExample().catch(console.error);
312
312
  * ```
313
- * @group ANS
313
+ * @group MNS
314
314
  */
315
315
  renewDomain(args: {
316
316
  sender: Account;
@@ -322,10 +322,10 @@ declare class ANS {
322
322
  * Fetches a single name from the indexer based on the provided name argument.
323
323
  *
324
324
  * @param args - The arguments for retrieving the name.
325
- * @param args.name - A string of the name to retrieve, e.g. "test.movement.apt" or "test.apt" or "test".
326
- * Can be inclusive or exclusive of the .apt suffix and can be a subdomain.
325
+ * @param args.name - A string of the name to retrieve, e.g. "test.movement.move" or "test.move" or "test".
326
+ * Can be inclusive or exclusive of the .move suffix and can be a subdomain.
327
327
  *
328
- * @returns A promise of an ANSName or undefined if the name is not active.
328
+ * @returns A promise of an MNSName or undefined if the name is not active.
329
329
  *
330
330
  * @example
331
331
  * ```typescript
@@ -336,16 +336,16 @@ declare class ANS {
336
336
  *
337
337
  * async function runExample() {
338
338
  * // Fetching a name from the indexer
339
- * const name = await movement.getName({ name: "test.aptos" }); // replace with a real name
339
+ * const name = await movement.getName({ name: "test.move" }); // replace with a real name
340
340
  * console.log(name);
341
341
  * }
342
342
  * runExample().catch(console.error);
343
343
  * ```
344
- * @group ANS
344
+ * @group MNS
345
345
  */
346
346
  getName(args: {
347
347
  name: string;
348
- }): Promise<GetANSNameResponse[0] | undefined>;
348
+ }): Promise<GetMNSNameResponse[0] | undefined>;
349
349
  /**
350
350
  * Fetches all names for an account, including both top-level domains and subdomains.
351
351
  *
@@ -357,7 +357,7 @@ declare class ANS {
357
357
  * @param args.options.orderBy - The order to sort the names by.
358
358
  * @param args.options.where - Additional filters to apply to the query.
359
359
  *
360
- * @returns A promise of an array of ANSName.
360
+ * @returns A promise of an array of MNSName.
361
361
  *
362
362
  * @example
363
363
  * ```typescript
@@ -380,9 +380,9 @@ declare class ANS {
380
380
  * }
381
381
  * runExample().catch(console.error);
382
382
  * ```
383
- * @group ANS
383
+ * @group MNS
384
384
  */
385
- getAccountNames(args: GetAccountNamesArgs): Promise<GetANSNameResponse>;
385
+ getAccountNames(args: GetAccountNamesArgs): Promise<GetMNSNameResponse>;
386
386
  /**
387
387
  * Fetches all top-level domain names for a specified account.
388
388
  *
@@ -393,7 +393,7 @@ declare class ANS {
393
393
  * @param args.options.orderBy - The order to sort the names by.
394
394
  * @param args.options.where - Additional filters to apply to the query.
395
395
  *
396
- * @returns A promise of an array of ANSName.
396
+ * @returns A promise of an array of MNSName.
397
397
  *
398
398
  * @example
399
399
  * ```typescript
@@ -420,9 +420,9 @@ declare class ANS {
420
420
  * }
421
421
  * runExample().catch(console.error);
422
422
  * ```
423
- * @group ANS
423
+ * @group MNS
424
424
  */
425
- getAccountDomains(args: GetAccountDomainsArgs): Promise<GetANSNameResponse>;
425
+ getAccountDomains(args: GetAccountDomainsArgs): Promise<GetMNSNameResponse>;
426
426
  /**
427
427
  * Fetches all subdomain names for a specified account.
428
428
  *
@@ -434,7 +434,7 @@ declare class ANS {
434
434
  * @param args.options.orderBy - The order to sort the names by.
435
435
  * @param args.options.where - Additional filters to apply to the query.
436
436
  *
437
- * @returns A promise of an array of ANSName.
437
+ * @returns A promise of an array of MNSName.
438
438
  *
439
439
  * @example
440
440
  * ```typescript
@@ -458,21 +458,21 @@ declare class ANS {
458
458
  * }
459
459
  * runExample().catch(console.error);
460
460
  * ```
461
- * @group ANS
461
+ * @group MNS
462
462
  */
463
- getAccountSubdomains(args: GetAccountSubdomainsArgs): Promise<GetANSNameResponse>;
463
+ getAccountSubdomains(args: GetAccountSubdomainsArgs): Promise<GetMNSNameResponse>;
464
464
  /**
465
465
  * Fetches all subdomain names for a given domain, excluding the domain itself.
466
466
  *
467
467
  * @param args - The arguments for fetching subdomains.
468
- * @param args.domain - A string of the domain name, e.g., "test.apt" or "test" (without the suffix of .apt).
468
+ * @param args.domain - A string of the domain name, e.g., "test.move" or "test" (without the suffix of .move).
469
469
  * @param args.options - Optional parameters for fetching subdomains.
470
470
  * @param args.options.offset - Optional, the offset to start from when fetching names.
471
471
  * @param args.options.limit - Optional, the number of names to fetch per request.
472
472
  * @param args.options.orderBy - The order to sort the names by.
473
473
  * @param args.options.where - Additional filters to apply to the query.
474
474
  *
475
- * @returns A promise that resolves to an array of ANSName.
475
+ * @returns A promise that resolves to an array of MNSName.
476
476
  *
477
477
  * @example
478
478
  * ```typescript
@@ -496,9 +496,347 @@ declare class ANS {
496
496
  * }
497
497
  * runExample().catch(console.error);
498
498
  * ```
499
- * @group ANS
499
+ * @group MNS
500
500
  */
501
- getDomainSubdomains(args: GetDomainSubdomainsArgs): Promise<GetANSNameResponse>;
501
+ getDomainSubdomains(args: GetDomainSubdomainsArgs): Promise<GetMNSNameResponse>;
502
+ /**
503
+ * Get the price to buy keys for a domain. Each domain has tradeable keys that
504
+ * follow a bonding curve - price increases as more keys are bought.
505
+ *
506
+ * @param args - The arguments for the function.
507
+ * @param args.domainName - The domain name to get the key price for.
508
+ * @param args.amount - The number of keys to get the price for (default: 1).
509
+ *
510
+ * @returns The price in octas to buy the specified number of keys.
511
+ *
512
+ * @example
513
+ * ```typescript
514
+ * import { Movement, MovementConfig, Network } from "@moveindustries/ts-sdk";
515
+ *
516
+ * const config = new MovementConfig({ network: Network.TESTNET });
517
+ * const movement = new Movement(config);
518
+ *
519
+ * async function runExample() {
520
+ * // Get the price to buy 1 key for the "test" domain
521
+ * const price = await movement.getKeyBuyPrice({ domainName: "test" });
522
+ * console.log(`Price to buy 1 key: ${price} octas`);
523
+ * }
524
+ * runExample().catch(console.error);
525
+ * ```
526
+ * @group MNS
527
+ */
528
+ getKeyBuyPrice(args: {
529
+ domainName: string;
530
+ amount?: number;
531
+ }): Promise<bigint>;
532
+ /**
533
+ * Get the price when selling keys for a domain.
534
+ *
535
+ * @param args - The arguments for the function.
536
+ * @param args.domainName - The domain name to get the sell price for.
537
+ * @param args.amount - The number of keys to get the price for (default: 1).
538
+ *
539
+ * @returns The price in octas received when selling the specified number of keys.
540
+ *
541
+ * @example
542
+ * ```typescript
543
+ * import { Movement, MovementConfig, Network } from "@moveindustries/ts-sdk";
544
+ *
545
+ * const config = new MovementConfig({ network: Network.TESTNET });
546
+ * const movement = new Movement(config);
547
+ *
548
+ * async function runExample() {
549
+ * // Get the price when selling 1 key for the "test" domain
550
+ * const price = await movement.getKeySellPrice({ domainName: "test" });
551
+ * console.log(`Price when selling 1 key: ${price} octas`);
552
+ * }
553
+ * runExample().catch(console.error);
554
+ * ```
555
+ * @group MNS
556
+ */
557
+ getKeySellPrice(args: {
558
+ domainName: string;
559
+ amount?: number;
560
+ }): Promise<bigint>;
561
+ /**
562
+ * Buy a key for a domain and stake it to claim a subdomain in one transaction.
563
+ * This is the primary way to register a subdomain on Movement.
564
+ *
565
+ * The price follows a bonding curve - use getKeyBuyPrice() to check the current price.
566
+ *
567
+ * @param args - The arguments for the function.
568
+ * @param args.sender - The account buying and staking the key.
569
+ * @param args.domainName - The parent domain name (e.g., "test" for "sub.test.move").
570
+ * @param args.subdomainName - The subdomain to claim (e.g., "sub" for "sub.test.move").
571
+ * @param args.targetAddress - Optional address this subdomain will resolve to (defaults to sender).
572
+ * @param args.toAddress - Optional address that will own this subdomain (defaults to sender).
573
+ * @param args.referrer - Optional referrer address for fee sharing.
574
+ * @param args.options - Optional transaction options.
575
+ *
576
+ * @returns A transaction object to be signed and submitted.
577
+ *
578
+ * @example
579
+ * ```typescript
580
+ * import { Movement, MovementConfig, Network, Account } from "@moveindustries/ts-sdk";
581
+ *
582
+ * const config = new MovementConfig({ network: Network.TESTNET });
583
+ * const movement = new Movement(config);
584
+ *
585
+ * async function runExample() {
586
+ * const alice = Account.generate();
587
+ * await movement.fundAccount({ accountAddress: alice.accountAddress, amount: 100_000_000 });
588
+ *
589
+ * // Buy a key and stake it to claim "mysubdomain.test.move"
590
+ * const txn = await movement.buyAndStakeKeyForSubdomain({
591
+ * sender: alice,
592
+ * domainName: "test",
593
+ * subdomainName: "mysubdomain",
594
+ * });
595
+ *
596
+ * const result = await movement.signAndSubmitTransaction({ signer: alice, transaction: txn });
597
+ * console.log("Subdomain claimed:", result.hash);
598
+ * }
599
+ * runExample().catch(console.error);
600
+ * ```
601
+ * @group MNS
602
+ */
603
+ buyAndStakeKeyForSubdomain(args: {
604
+ sender: Account;
605
+ domainName: string;
606
+ subdomainName: string;
607
+ targetAddress?: AccountAddressInput;
608
+ toAddress?: AccountAddressInput;
609
+ referrer?: AccountAddressInput;
610
+ options?: InputGenerateTransactionOptions;
611
+ }): Promise<SimpleTransaction>;
612
+ /**
613
+ * Stake an existing key to claim a subdomain. You must already own a key for
614
+ * the parent domain.
615
+ *
616
+ * @param args - The arguments for the function.
617
+ * @param args.sender - The account staking the key.
618
+ * @param args.domainName - The parent domain name.
619
+ * @param args.subdomainName - The subdomain to claim.
620
+ * @param args.targetAddress - Optional address this subdomain will resolve to.
621
+ * @param args.toAddress - Optional address that will own this subdomain.
622
+ * @param args.options - Optional transaction options.
623
+ *
624
+ * @returns A transaction object to be signed and submitted.
625
+ * @group MNS
626
+ */
627
+ stakeKeyForSubdomain(args: {
628
+ sender: Account;
629
+ domainName: string;
630
+ subdomainName: string;
631
+ targetAddress?: AccountAddressInput;
632
+ toAddress?: AccountAddressInput;
633
+ options?: InputGenerateTransactionOptions;
634
+ }): Promise<SimpleTransaction>;
635
+ /**
636
+ * Unstake a key from a subdomain, giving up ownership but keeping the key.
637
+ * You can sell the key later or stake it for a different subdomain.
638
+ *
639
+ * @param args - The arguments for the function.
640
+ * @param args.sender - The account unstaking the key.
641
+ * @param args.domainName - The parent domain name.
642
+ * @param args.subdomainName - The subdomain to release.
643
+ * @param args.options - Optional transaction options.
644
+ *
645
+ * @returns A transaction object to be signed and submitted.
646
+ * @group MNS
647
+ */
648
+ unstakeKeyForSubdomain(args: {
649
+ sender: Account;
650
+ domainName: string;
651
+ subdomainName: string;
652
+ options?: InputGenerateTransactionOptions;
653
+ }): Promise<SimpleTransaction>;
654
+ /**
655
+ * Unstake a key from a subdomain and sell it in one transaction.
656
+ * This gives up the subdomain and converts the key back to MOVE tokens.
657
+ *
658
+ * @param args - The arguments for the function.
659
+ * @param args.sender - The account unstaking and selling the key.
660
+ * @param args.domainName - The parent domain name.
661
+ * @param args.subdomainName - The subdomain to release.
662
+ * @param args.referrer - Optional referrer address for fee sharing.
663
+ * @param args.options - Optional transaction options.
664
+ *
665
+ * @returns A transaction object to be signed and submitted.
666
+ * @group MNS
667
+ */
668
+ unstakeAndSellKeyForSubdomain(args: {
669
+ sender: Account;
670
+ domainName: string;
671
+ subdomainName: string;
672
+ referrer?: AccountAddressInput;
673
+ options?: InputGenerateTransactionOptions;
674
+ }): Promise<SimpleTransaction>;
675
+ /**
676
+ * Check if a name (domain or subdomain) is available for registration.
677
+ *
678
+ * @param args - The arguments for the function.
679
+ * @param args.name - The name to check (e.g., "test" or "sub.test").
680
+ * @param args.account - The account address that would register the name.
681
+ *
682
+ * @returns True if the name can be registered by the account, false otherwise.
683
+ *
684
+ * @example
685
+ * ```typescript
686
+ * const canReg = await movement.canRegister({
687
+ * name: "mynewdomain",
688
+ * account: alice.accountAddress,
689
+ * });
690
+ * console.log(canReg ? "Available!" : "Already taken");
691
+ * ```
692
+ * @group MNS
693
+ */
694
+ canRegister(args: {
695
+ name: string;
696
+ account: AccountAddressInput;
697
+ }): Promise<boolean>;
698
+ /**
699
+ * Check if a specific address owns a name.
700
+ *
701
+ * @param args - The arguments for the function.
702
+ * @param args.name - The name to check ownership of.
703
+ * @param args.account - The account address to check.
704
+ *
705
+ * @returns True if the account owns the name, false otherwise.
706
+ *
707
+ * @example
708
+ * ```typescript
709
+ * const isOwner = await movement.isNameOwner({
710
+ * name: "test.move",
711
+ * account: alice.accountAddress,
712
+ * });
713
+ * ```
714
+ * @group MNS
715
+ */
716
+ isNameOwner(args: {
717
+ name: string;
718
+ account: AccountAddressInput;
719
+ }): Promise<boolean>;
720
+ /**
721
+ * Get the NFT token address for a domain or subdomain.
722
+ *
723
+ * @param args - The arguments for the function.
724
+ * @param args.name - The name to get the token address for.
725
+ *
726
+ * @returns The token address, or undefined if the name doesn't exist.
727
+ * @group MNS
728
+ */
729
+ getTokenAddress(args: {
730
+ name: string;
731
+ }): Promise<AccountAddress | undefined>;
732
+ /**
733
+ * Clear the target address for a domain or subdomain, stopping it from resolving.
734
+ *
735
+ * @param args - The arguments for the function.
736
+ * @param args.sender - The account that owns the name.
737
+ * @param args.name - The name to clear the target address for.
738
+ * @param args.options - Optional transaction options.
739
+ *
740
+ * @returns A transaction object to be signed and submitted.
741
+ *
742
+ * @example
743
+ * ```typescript
744
+ * // Stop "test.move" from resolving to any address
745
+ * const txn = await movement.clearTargetAddress({
746
+ * sender: alice,
747
+ * name: "test.move",
748
+ * });
749
+ * ```
750
+ * @group MNS
751
+ */
752
+ clearTargetAddress(args: {
753
+ sender: Account;
754
+ name: string;
755
+ options?: InputGenerateTransactionOptions;
756
+ }): Promise<SimpleTransaction>;
757
+ /**
758
+ * Buy keys for a domain without staking them for a subdomain.
759
+ * Keys can be held for speculation or staked later via stakeKeyForSubdomain.
760
+ *
761
+ * @param args - The arguments for the function.
762
+ * @param args.sender - The account buying the keys.
763
+ * @param args.domainName - The domain to buy keys for.
764
+ * @param args.amount - The number of keys to buy.
765
+ * @param args.referrer - Optional referrer address for fee sharing.
766
+ * @param args.options - Optional transaction options.
767
+ *
768
+ * @returns A transaction object to be signed and submitted.
769
+ *
770
+ * @example
771
+ * ```typescript
772
+ * // Buy 2 keys for speculation
773
+ * const txn = await movement.buyKeys({
774
+ * sender: alice,
775
+ * domainName: "popular-domain",
776
+ * amount: 2,
777
+ * });
778
+ * ```
779
+ * @group MNS
780
+ */
781
+ buyKeys(args: {
782
+ sender: Account;
783
+ domainName: string;
784
+ amount: number;
785
+ referrer?: AccountAddressInput;
786
+ options?: InputGenerateTransactionOptions;
787
+ }): Promise<SimpleTransaction>;
788
+ /**
789
+ * Sell keys for a domain back to the bonding curve.
790
+ *
791
+ * @param args - The arguments for the function.
792
+ * @param args.sender - The account selling the keys.
793
+ * @param args.domainName - The domain to sell keys for.
794
+ * @param args.amount - The number of keys to sell.
795
+ * @param args.referrer - Optional referrer address for fee sharing.
796
+ * @param args.options - Optional transaction options.
797
+ *
798
+ * @returns A transaction object to be signed and submitted.
799
+ *
800
+ * @example
801
+ * ```typescript
802
+ * // Sell 1 key back
803
+ * const txn = await movement.sellKeys({
804
+ * sender: alice,
805
+ * domainName: "popular-domain",
806
+ * amount: 1,
807
+ * });
808
+ * ```
809
+ * @group MNS
810
+ */
811
+ sellKeys(args: {
812
+ sender: Account;
813
+ domainName: string;
814
+ amount: number;
815
+ referrer?: AccountAddressInput;
816
+ options?: InputGenerateTransactionOptions;
817
+ }): Promise<SimpleTransaction>;
818
+ /**
819
+ * Get the registration price for a domain name.
820
+ * Price varies based on domain length and registration duration.
821
+ *
822
+ * @param args - The arguments for the function.
823
+ * @param args.name - The domain name to get the price for.
824
+ * @param args.years - Number of years to register (default: 1).
825
+ *
826
+ * @returns The price in octas to register the domain.
827
+ *
828
+ * @example
829
+ * ```typescript
830
+ * // Check price before registering
831
+ * const price = await movement.getDomainPrice({ name: "mynewdomain" });
832
+ * console.log(`Registration costs ${price} octas (${Number(price) / 1e8} MOVE)`);
833
+ * ```
834
+ * @group MNS
835
+ */
836
+ getDomainPrice(args: {
837
+ name: string;
838
+ years?: number;
839
+ }): Promise<bigint>;
502
840
  }
503
841
 
504
- export { ANS };
842
+ export { MNS };
@@ -0,0 +1,2 @@
1
+ import{Id as a}from"../chunk-LVNME34X.mjs";import"../chunk-7AJK3QMK.mjs";import"../chunk-UYVPNUH3.mjs";import"../chunk-A5L76YP7.mjs";import"../chunk-WVDICMU4.mjs";import"../chunk-2KDUIZKB.mjs";import"../chunk-ESZIZDLP.mjs";import"../chunk-5HXLZHDW.mjs";import"../chunk-G3MHXDYA.mjs";import"../chunk-POOO2OP5.mjs";import"../chunk-GOXRBEIJ.mjs";import"../chunk-D6HPXGEP.mjs";import"../chunk-OOOAVIMQ.mjs";import"../chunk-NECL5FCQ.mjs";import"../chunk-4QMXOWHP.mjs";import"../chunk-PG4MJ3CJ.mjs";import"../chunk-CHWDP6AR.mjs";import"../chunk-VEZCMPUG.mjs";import"../chunk-7TTTMBAK.mjs";import"../chunk-2QTV4AOE.mjs";import"../chunk-ZP4DWSQA.mjs";import"../chunk-V3MBJJTL.mjs";import"../chunk-NUB6KE73.mjs";import"../chunk-E3O3YOFD.mjs";import"../chunk-Q2IJWWWU.mjs";import"../chunk-GTWNSTVB.mjs";import"../chunk-Q55N5DU3.mjs";import"../chunk-5ZKA765G.mjs";import"../chunk-ZUWARBWT.mjs";import"../chunk-UL777LTI.mjs";import"../chunk-7ECCT6PK.mjs";import"../chunk-HX7XBUOY.mjs";import"../chunk-YXS3R2MX.mjs";import"../chunk-QMRVGJFC.mjs";import"../chunk-HGLO5LDS.mjs";import"../chunk-ANTEUWH6.mjs";import"../chunk-74X3LBZR.mjs";import"../chunk-WFAH73WN.mjs";import"../chunk-Y6YW4BAZ.mjs";import"../chunk-DS6QB6HG.mjs";import"../chunk-SSTVXHYQ.mjs";import"../chunk-PZ233FIY.mjs";import"../chunk-VW3WBAAD.mjs";import"../chunk-FZY4PMEE.mjs";import"../chunk-SLXLZU5N.mjs";import"../chunk-6NO4QKAO.mjs";import"../chunk-FS5ZJKO7.mjs";import"../chunk-XCURF77K.mjs";import"../chunk-FD6FGKYY.mjs";import"../chunk-4WPQQPUF.mjs";import"../chunk-YOHEYPDP.mjs";import"../chunk-RXHPS4IU.mjs";import"../chunk-SRXFRTHK.mjs";import"../chunk-5IMQPJ6J.mjs";import"../chunk-RL4YPMN4.mjs";import"../chunk-UI4OF6CP.mjs";import"../chunk-LZ24RPY3.mjs";import"../chunk-KDMSOCZY.mjs";export{a as MNS};
2
+ //# sourceMappingURL=mns.mjs.map