@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.
- package/README.md +241 -43
- package/dist/common/{accountAddress-DoqkxUqw.d.ts → accountAddress-CQEq9RVR.d.ts} +6 -2
- package/dist/common/chunk-56DGDNEY.js.map +1 -1
- package/dist/common/cli/index.d.ts +1 -1
- package/dist/common/cli/index.js +1 -1
- package/dist/common/cli/index.js.map +1 -1
- package/dist/common/index.d.ts +393 -55
- package/dist/common/index.js +32 -32
- package/dist/common/index.js.map +1 -1
- package/dist/esm/account/AbstractKeylessAccount.mjs +1 -1
- package/dist/esm/account/AbstractedAccount.mjs +1 -1
- package/dist/esm/account/Account.mjs +1 -1
- package/dist/esm/account/AccountUtils.mjs +1 -1
- package/dist/esm/account/DerivableAbstractedAccount.mjs +1 -1
- package/dist/esm/account/Ed25519Account.mjs +1 -1
- package/dist/esm/account/EphemeralKeyPair.mjs +1 -1
- package/dist/esm/account/FederatedKeylessAccount.mjs +1 -1
- package/dist/esm/account/KeylessAccount.mjs +1 -1
- package/dist/esm/account/MultiEd25519Account.mjs +1 -1
- package/dist/esm/account/MultiKeyAccount.mjs +1 -1
- package/dist/esm/account/SingleKeyAccount.mjs +1 -1
- package/dist/esm/account/index.mjs +1 -1
- package/dist/esm/account/utils.mjs +1 -1
- package/dist/esm/api/account/abstraction.mjs +1 -1
- package/dist/esm/api/account.mjs +1 -1
- package/dist/esm/api/coin.mjs +1 -1
- package/dist/esm/api/digitalAsset.mjs +1 -1
- package/dist/esm/api/faucet.mjs +1 -1
- package/dist/esm/api/fungibleAsset.mjs +1 -1
- package/dist/esm/api/general.mjs +1 -1
- package/dist/esm/api/index.d.mts +2 -2
- package/dist/esm/api/index.mjs +1 -1
- package/dist/esm/api/keyless.mjs +1 -1
- package/dist/esm/api/{ans.d.mts → mns.d.mts} +390 -52
- package/dist/esm/api/mns.mjs +2 -0
- package/dist/esm/api/movement.d.mts +4 -4
- package/dist/esm/api/movement.mjs +1 -1
- package/dist/esm/api/movementConfig.mjs +1 -1
- package/dist/esm/api/object.mjs +1 -1
- package/dist/esm/api/staking.mjs +1 -1
- package/dist/esm/api/table.mjs +1 -1
- package/dist/esm/api/transaction.mjs +1 -1
- package/dist/esm/api/transactionSubmission/build.mjs +1 -1
- package/dist/esm/api/transactionSubmission/management.mjs +1 -1
- package/dist/esm/api/transactionSubmission/sign.mjs +1 -1
- package/dist/esm/api/transactionSubmission/simulate.mjs +1 -1
- package/dist/esm/api/transactionSubmission/submit.mjs +1 -1
- package/dist/esm/api/utils.mjs +1 -1
- package/dist/esm/bcs/index.mjs +1 -1
- package/dist/esm/bcs/serializable/moveStructs.mjs +1 -1
- package/dist/esm/{chunk-KPJGWDSQ.mjs → chunk-74X3LBZR.mjs} +1 -1
- package/dist/esm/{chunk-KPJGWDSQ.mjs.map → chunk-74X3LBZR.mjs.map} +1 -1
- package/dist/esm/{chunk-YFFYA5U3.mjs → chunk-7AJK3QMK.mjs} +2 -2
- package/dist/esm/{chunk-WVF47V5E.mjs → chunk-E3O3YOFD.mjs} +2 -2
- package/dist/esm/chunk-FPHA2UD2.mjs +2 -0
- package/dist/esm/chunk-FPHA2UD2.mjs.map +1 -0
- package/dist/esm/{chunk-O7XWQTYM.mjs → chunk-GTWNSTVB.mjs} +2 -2
- package/dist/esm/{chunk-ZGBIH6MJ.mjs → chunk-HX7XBUOY.mjs} +2 -2
- package/dist/esm/chunk-LVNME34X.mjs +4 -0
- package/dist/esm/chunk-LVNME34X.mjs.map +1 -0
- package/dist/esm/chunk-LZ24RPY3.mjs +2 -0
- package/dist/esm/{chunk-P6MFR7W6.mjs.map → chunk-LZ24RPY3.mjs.map} +1 -1
- package/dist/esm/{chunk-5KMDJLYM.mjs → chunk-POOO2OP5.mjs} +2 -2
- package/dist/esm/{chunk-SZG3ZZGN.mjs → chunk-Q2IJWWWU.mjs} +2 -2
- package/dist/esm/{chunk-3KNJ4VWA.mjs → chunk-Q55N5DU3.mjs} +2 -2
- package/dist/esm/{chunk-P7DJNENM.mjs → chunk-QMRVGJFC.mjs} +2 -2
- package/dist/esm/chunk-QMRVGJFC.mjs.map +1 -0
- package/dist/esm/{chunk-UVP74ONT.mjs → chunk-SLXLZU5N.mjs} +1 -1
- package/dist/esm/chunk-SLXLZU5N.mjs.map +1 -0
- package/dist/esm/{chunk-I6YGBK5S.mjs → chunk-SSTVXHYQ.mjs} +1 -1
- package/dist/esm/chunk-SSTVXHYQ.mjs.map +1 -0
- package/dist/esm/{chunk-46MDTYYN.mjs → chunk-YXS3R2MX.mjs} +2 -2
- package/dist/esm/{chunk-7KIJGBLL.mjs → chunk-ZUWARBWT.mjs} +2 -2
- package/dist/esm/{chunk-7KIJGBLL.mjs.map → chunk-ZUWARBWT.mjs.map} +1 -1
- package/dist/esm/cli/index.mjs +1 -1
- package/dist/esm/cli/localNode.mjs +1 -1
- package/dist/esm/client/core.mjs +1 -1
- package/dist/esm/client/get.mjs +1 -1
- package/dist/esm/client/index.mjs +1 -1
- package/dist/esm/client/post.mjs +1 -1
- package/dist/esm/core/crypto/abstraction.mjs +1 -1
- package/dist/esm/core/crypto/deserializationUtils.mjs +1 -1
- package/dist/esm/core/crypto/ed25519.mjs +1 -1
- package/dist/esm/core/crypto/ephemeral.mjs +1 -1
- package/dist/esm/core/crypto/federatedKeyless.mjs +1 -1
- package/dist/esm/core/crypto/index.mjs +1 -1
- package/dist/esm/core/crypto/keyless.mjs +1 -1
- package/dist/esm/core/crypto/multiEd25519.mjs +1 -1
- package/dist/esm/core/crypto/multiKey.mjs +1 -1
- package/dist/esm/core/crypto/proof.mjs +1 -1
- package/dist/esm/core/crypto/publicKey.mjs +1 -1
- package/dist/esm/core/crypto/secp256k1.mjs +1 -1
- package/dist/esm/core/crypto/secp256r1.mjs +1 -1
- package/dist/esm/core/crypto/signature.mjs +1 -1
- package/dist/esm/core/crypto/singleKey.mjs +1 -1
- package/dist/esm/core/crypto/utils.mjs +1 -1
- package/dist/esm/core/index.mjs +1 -1
- package/dist/esm/errors/index.mjs +1 -1
- package/dist/esm/index.d.mts +3 -3
- package/dist/esm/index.mjs +1 -1
- package/dist/esm/internal/abstraction.mjs +1 -1
- package/dist/esm/internal/account.mjs +1 -1
- package/dist/esm/internal/coin.mjs +1 -1
- package/dist/esm/internal/digitalAsset.mjs +1 -1
- package/dist/esm/internal/faucet.mjs +1 -1
- package/dist/esm/internal/fungibleAsset.mjs +1 -1
- package/dist/esm/internal/general.mjs +1 -1
- package/dist/esm/internal/keyless.mjs +1 -1
- package/dist/esm/internal/{ans.d.mts → mns.d.mts} +237 -19
- package/dist/esm/internal/mns.mjs +2 -0
- package/dist/esm/internal/object.mjs +1 -1
- package/dist/esm/internal/staking.mjs +1 -1
- package/dist/esm/internal/table.mjs +1 -1
- package/dist/esm/internal/transaction.mjs +1 -1
- package/dist/esm/internal/transactionSubmission.mjs +1 -1
- package/dist/esm/internal/utils/index.mjs +1 -1
- package/dist/esm/internal/utils/utils.mjs +1 -1
- package/dist/esm/internal/view.mjs +1 -1
- package/dist/esm/transactions/authenticator/account.mjs +1 -1
- package/dist/esm/transactions/authenticator/index.mjs +1 -1
- package/dist/esm/transactions/authenticator/transaction.mjs +1 -1
- package/dist/esm/transactions/index.mjs +1 -1
- package/dist/esm/transactions/instances/index.mjs +1 -1
- package/dist/esm/transactions/instances/moduleId.mjs +1 -1
- package/dist/esm/transactions/instances/multiAgentTransaction.mjs +1 -1
- package/dist/esm/transactions/instances/rawTransaction.mjs +1 -1
- package/dist/esm/transactions/instances/rotationProofChallenge.mjs +1 -1
- package/dist/esm/transactions/instances/signedTransaction.mjs +1 -1
- package/dist/esm/transactions/instances/simpleTransaction.mjs +1 -1
- package/dist/esm/transactions/instances/transactionPayload.mjs +1 -1
- package/dist/esm/transactions/management/accountSequenceNumber.mjs +1 -1
- package/dist/esm/transactions/management/index.mjs +1 -1
- package/dist/esm/transactions/management/transactionWorker.mjs +1 -1
- package/dist/esm/transactions/transactionBuilder/helpers.mjs +1 -1
- package/dist/esm/transactions/transactionBuilder/index.mjs +1 -1
- package/dist/esm/transactions/transactionBuilder/remoteAbi.mjs +1 -1
- package/dist/esm/transactions/transactionBuilder/signingMessage.mjs +1 -1
- package/dist/esm/transactions/transactionBuilder/transactionBuilder.mjs +1 -1
- package/dist/esm/transactions/typeTag/index.mjs +1 -1
- package/dist/esm/transactions/typeTag/parser.mjs +1 -1
- package/dist/esm/types/index.d.mts +1 -1
- package/dist/esm/types/indexer.d.mts +6 -2
- package/dist/esm/utils/index.mjs +1 -1
- package/dist/esm/utils/normalizeBundle.mjs +1 -1
- package/dist/esm/version.d.mts +1 -1
- package/dist/esm/version.mjs +1 -1
- package/package.json +1 -1
- package/src/account/SingleKeyAccount.ts +1 -1
- package/src/api/account/abstraction.ts +1 -1
- package/src/api/account.ts +3 -3
- package/src/api/coin.ts +1 -1
- package/src/api/digitalAsset.ts +1 -1
- package/src/api/faucet.ts +1 -1
- package/src/api/fungibleAsset.ts +1 -1
- package/src/api/index.ts +0 -1
- package/src/api/keyless.ts +1 -1
- package/src/api/{ans.ts → mns.ts} +438 -52
- package/src/api/movement.ts +18 -17
- package/src/api/movementConfig.ts +3 -3
- package/src/api/object.ts +1 -1
- package/src/api/staking.ts +1 -1
- package/src/api/transactionSubmission/build.ts +1 -4
- package/src/bcs/index.ts +0 -1
- package/src/bcs/serializable/moveStructs.ts +4 -2
- package/src/cli/localNode.ts +21 -3
- package/src/client/core.ts +9 -1
- package/src/client/index.ts +0 -1
- package/src/core/crypto/index.ts +0 -1
- package/src/core/crypto/multiEd25519.ts +2 -2
- package/src/core/crypto/multiKey.ts +2 -2
- package/src/core/crypto/singleKey.ts +1 -1
- package/src/core/index.ts +0 -1
- package/src/errors/index.ts +6 -4
- package/src/index.ts +0 -1
- package/src/internal/account.ts +9 -6
- package/src/internal/general.ts +3 -1
- package/src/internal/{ans.ts → mns.ts} +644 -86
- package/src/transactions/authenticator/index.ts +0 -1
- package/src/transactions/index.ts +0 -1
- package/src/transactions/instances/index.ts +0 -1
- package/src/transactions/instances/transactionArgument.ts +1 -1
- package/src/transactions/management/transactionWorker.ts +3 -1
- package/src/transactions/transactionBuilder/index.ts +0 -1
- package/src/transactions/transactionBuilder/transactionBuilder.ts +11 -3
- package/src/transactions/typeTag/index.ts +3 -2
- package/src/types/indexer.ts +6 -1
- package/src/version.ts +1 -1
- package/dist/esm/api/ans.mjs +0 -2
- package/dist/esm/chunk-C5TXUD5K.mjs +0 -4
- package/dist/esm/chunk-C5TXUD5K.mjs.map +0 -1
- package/dist/esm/chunk-HL2JMZ7N.mjs +0 -2
- package/dist/esm/chunk-HL2JMZ7N.mjs.map +0 -1
- package/dist/esm/chunk-I6YGBK5S.mjs.map +0 -1
- package/dist/esm/chunk-P6MFR7W6.mjs +0 -2
- package/dist/esm/chunk-P7DJNENM.mjs.map +0 -1
- package/dist/esm/chunk-UVP74ONT.mjs.map +0 -1
- package/dist/esm/internal/ans.mjs +0 -2
- /package/dist/esm/api/{ans.mjs.map → mns.mjs.map} +0 -0
- /package/dist/esm/{chunk-YFFYA5U3.mjs.map → chunk-7AJK3QMK.mjs.map} +0 -0
- /package/dist/esm/{chunk-WVF47V5E.mjs.map → chunk-E3O3YOFD.mjs.map} +0 -0
- /package/dist/esm/{chunk-O7XWQTYM.mjs.map → chunk-GTWNSTVB.mjs.map} +0 -0
- /package/dist/esm/{chunk-ZGBIH6MJ.mjs.map → chunk-HX7XBUOY.mjs.map} +0 -0
- /package/dist/esm/{chunk-5KMDJLYM.mjs.map → chunk-POOO2OP5.mjs.map} +0 -0
- /package/dist/esm/{chunk-SZG3ZZGN.mjs.map → chunk-Q2IJWWWU.mjs.map} +0 -0
- /package/dist/esm/{chunk-3KNJ4VWA.mjs.map → chunk-Q55N5DU3.mjs.map} +0 -0
- /package/dist/esm/{chunk-46MDTYYN.mjs.map → chunk-YXS3R2MX.mjs.map} +0 -0
- /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 {
|
|
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/
|
|
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 `
|
|
13
|
-
* @group
|
|
12
|
+
* A class to handle all `MNS` (Movement Name Service) operations.
|
|
13
|
+
* @group MNS
|
|
14
14
|
*/
|
|
15
|
-
declare class
|
|
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:",
|
|
37
|
+
* console.log("Movement client initialized:", movement);
|
|
38
38
|
* }
|
|
39
39
|
* runExample().catch(console.error);
|
|
40
40
|
* ```
|
|
41
|
-
* @group
|
|
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.
|
|
61
|
-
* const owner = await movement.getOwnerAddress({ name: "test.
|
|
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
|
|
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.
|
|
88
|
-
* const exp = await movement.getExpiration({ name: "test.
|
|
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
|
|
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.
|
|
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.
|
|
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
|
|
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.
|
|
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.
|
|
156
|
+
* name: "test.move",
|
|
157
157
|
* address: address,
|
|
158
158
|
* });
|
|
159
159
|
*
|
|
160
|
-
* const targetAddress = await movement.getTargetAddress({ name: "test.
|
|
161
|
-
* console.log(targetAddress); // Should log the address set for "test.
|
|
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
|
|
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
|
|
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.
|
|
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.
|
|
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.
|
|
224
|
+
* console.log("Primary Name:", primaryName); // Should log: "Primary Name: test.move"
|
|
225
225
|
* }
|
|
226
226
|
* runExample().catch(console.error);
|
|
227
227
|
* ```
|
|
228
|
-
* @group
|
|
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 .
|
|
242
|
-
* "test", "test.
|
|
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.
|
|
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.
|
|
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
|
|
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
|
|
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.
|
|
326
|
-
* Can be inclusive or exclusive of the .
|
|
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
|
|
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.
|
|
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
|
|
344
|
+
* @group MNS
|
|
345
345
|
*/
|
|
346
346
|
getName(args: {
|
|
347
347
|
name: string;
|
|
348
|
-
}): Promise<
|
|
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
|
|
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
|
|
383
|
+
* @group MNS
|
|
384
384
|
*/
|
|
385
|
-
getAccountNames(args: GetAccountNamesArgs): Promise<
|
|
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
|
|
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
|
|
423
|
+
* @group MNS
|
|
424
424
|
*/
|
|
425
|
-
getAccountDomains(args: GetAccountDomainsArgs): Promise<
|
|
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
|
|
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
|
|
461
|
+
* @group MNS
|
|
462
462
|
*/
|
|
463
|
-
getAccountSubdomains(args: GetAccountSubdomainsArgs): Promise<
|
|
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.
|
|
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
|
|
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
|
|
499
|
+
* @group MNS
|
|
500
500
|
*/
|
|
501
|
-
getDomainSubdomains(args: GetDomainSubdomainsArgs): Promise<
|
|
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 {
|
|
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
|