@twin.org/nft-cli 0.0.1-next.3 → 0.0.1-next.31
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/bin/index.js +0 -0
- package/dist/cjs/index.cjs +146 -59
- package/dist/esm/index.mjs +146 -62
- package/dist/locales/en.json +612 -536
- package/dist/types/cli.d.ts +5 -1
- package/dist/types/commands/nftBurn.d.ts +5 -2
- package/dist/types/commands/nftMint.d.ts +8 -1
- package/dist/types/commands/nftResolve.d.ts +5 -0
- package/dist/types/commands/nftTransfer.d.ts +9 -2
- package/dist/types/commands/setupCommands.d.ts +18 -0
- package/dist/types/index.d.ts +2 -0
- package/dist/types/models/nftConnectorTypes.d.ts +13 -0
- package/docs/changelog.md +113 -1
- package/docs/examples.md +17 -16
- package/docs/reference/classes/CLI.md +20 -6
- package/docs/reference/functions/actionCommandNftBurn.md +24 -8
- package/docs/reference/functions/actionCommandNftMint.md +3 -1
- package/docs/reference/functions/actionCommandNftResolve.md +3 -1
- package/docs/reference/functions/actionCommandNftTransfer.md +34 -6
- package/docs/reference/functions/setupNftConnector.md +47 -0
- package/docs/reference/functions/setupVault.md +9 -0
- package/docs/reference/index.md +10 -0
- package/docs/reference/type-aliases/NftConnectorTypes.md +5 -0
- package/docs/reference/variables/NftConnectorTypes.md +13 -0
- package/locales/en.json +26 -10
- package/package.json +8 -36
package/dist/types/cli.d.ts
CHANGED
|
@@ -7,7 +7,11 @@ export declare class CLI extends CLIBase {
|
|
|
7
7
|
* Run the app.
|
|
8
8
|
* @param argv The process arguments.
|
|
9
9
|
* @param localesDirectory The directory for the locales, default to relative to the script.
|
|
10
|
+
* @param options Additional options for the CLI.
|
|
11
|
+
* @param options.overrideOutputWidth Override the output width.
|
|
10
12
|
* @returns The exit code.
|
|
11
13
|
*/
|
|
12
|
-
run(argv: string[], localesDirectory?: string
|
|
14
|
+
run(argv: string[], localesDirectory?: string, options?: {
|
|
15
|
+
overrideOutputWidth?: number;
|
|
16
|
+
}): Promise<number>;
|
|
13
17
|
}
|
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
import { Command } from "commander";
|
|
2
|
+
import { NftConnectorTypes } from "../models/nftConnectorTypes";
|
|
2
3
|
/**
|
|
3
4
|
* Build the nft burn command for the CLI.
|
|
4
5
|
* @returns The command.
|
|
@@ -8,15 +9,17 @@ export declare function buildCommandNftBurn(): Command;
|
|
|
8
9
|
* Action the nft burn command.
|
|
9
10
|
* @param opts The options for the command.
|
|
10
11
|
* @param opts.seed The seed required for signing by the issuer.
|
|
11
|
-
* @param opts.issuer The issuer address of the NFT.
|
|
12
12
|
* @param opts.id The id of the NFT to burn in urn format.
|
|
13
|
+
* @param opts.connector The connector to perform the operations with.
|
|
13
14
|
* @param opts.node The node URL.
|
|
15
|
+
* @param opts.network The network to use for connector.
|
|
14
16
|
* @param opts.explorer The explorer URL.
|
|
15
17
|
*/
|
|
16
18
|
export declare function actionCommandNftBurn(opts: {
|
|
17
19
|
seed: string;
|
|
18
|
-
issuer: string;
|
|
19
20
|
id: string;
|
|
21
|
+
connector?: NftConnectorTypes;
|
|
20
22
|
node: string;
|
|
23
|
+
network?: string;
|
|
21
24
|
explorer: string;
|
|
22
25
|
}): Promise<void>;
|
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
import { type CliOutputOptions } from "@twin.org/cli-core";
|
|
2
2
|
import { Command } from "commander";
|
|
3
|
+
import { NftConnectorTypes } from "../models/nftConnectorTypes";
|
|
3
4
|
/**
|
|
4
5
|
* Build the nft mint command for the CLI.
|
|
5
6
|
* @returns The command.
|
|
@@ -9,19 +10,25 @@ export declare function buildCommandNftMint(): Command;
|
|
|
9
10
|
* Action the nft mint command.
|
|
10
11
|
* @param opts The options for the command.
|
|
11
12
|
* @param opts.seed The seed required for signing by the issuer.
|
|
12
|
-
* @param opts.issuer The
|
|
13
|
+
* @param opts.issuer The identity of the issuer.
|
|
14
|
+
* @param opts.walletAddressIndex The wallet address index.
|
|
13
15
|
* @param opts.tag The tag for the NFT.
|
|
14
16
|
* @param opts.immutableJson Filename of the immutable JSON data.
|
|
15
17
|
* @param opts.mutableJson Filename of the mutable JSON data.
|
|
18
|
+
* @param opts.connector The connector to perform the operations with.
|
|
16
19
|
* @param opts.node The node URL.
|
|
20
|
+
* @param opts.network The network to use for connector.
|
|
17
21
|
* @param opts.explorer The explorer URL.
|
|
18
22
|
*/
|
|
19
23
|
export declare function actionCommandNftMint(opts: {
|
|
20
24
|
seed: string;
|
|
21
25
|
issuer: string;
|
|
26
|
+
walletAddressIndex?: string;
|
|
22
27
|
tag: string;
|
|
23
28
|
immutableJson?: string;
|
|
24
29
|
mutableJson?: string;
|
|
30
|
+
connector?: NftConnectorTypes;
|
|
25
31
|
node: string;
|
|
32
|
+
network?: string;
|
|
26
33
|
explorer: string;
|
|
27
34
|
} & CliOutputOptions): Promise<void>;
|
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
import { type CliOutputOptions } from "@twin.org/cli-core";
|
|
2
2
|
import { Command } from "commander";
|
|
3
|
+
import { NftConnectorTypes } from "../models/nftConnectorTypes";
|
|
3
4
|
/**
|
|
4
5
|
* Build the nft resolve command for the CLI.
|
|
5
6
|
* @returns The command.
|
|
@@ -9,11 +10,15 @@ export declare function buildCommandNftResolve(): Command;
|
|
|
9
10
|
* Action the nft resolve command.
|
|
10
11
|
* @param opts The options for the command.
|
|
11
12
|
* @param opts.id The id of the NFT to resolve in urn format.
|
|
13
|
+
* @param opts.connector The connector to perform the operations with.
|
|
12
14
|
* @param opts.node The node URL.
|
|
15
|
+
* @param opts.network The network to use for connector.
|
|
13
16
|
* @param opts.explorer The explorer URL.
|
|
14
17
|
*/
|
|
15
18
|
export declare function actionCommandNftResolve(opts: {
|
|
16
19
|
id: string;
|
|
20
|
+
connector?: NftConnectorTypes;
|
|
17
21
|
node: string;
|
|
22
|
+
network?: string;
|
|
18
23
|
explorer: string;
|
|
19
24
|
} & CliOutputOptions): Promise<void>;
|
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
import { Command } from "commander";
|
|
2
|
+
import { NftConnectorTypes } from "../models/nftConnectorTypes";
|
|
2
3
|
/**
|
|
3
4
|
* Build the nft transfer command for the CLI.
|
|
4
5
|
* @returns The command.
|
|
@@ -9,14 +10,20 @@ export declare function buildCommandNftTransfer(): Command;
|
|
|
9
10
|
* @param opts The options for the command.
|
|
10
11
|
* @param opts.seed The seed required for signing by the issuer.
|
|
11
12
|
* @param opts.id The id of the NFT to transfer in urn format.
|
|
12
|
-
* @param opts.
|
|
13
|
+
* @param opts.recipientIdentity The recipient address of the NFT.
|
|
14
|
+
* @param opts.recipientAddress The recipient address of the NFT.
|
|
15
|
+
* @param opts.connector The connector to perform the operations with.
|
|
13
16
|
* @param opts.node The node URL.
|
|
17
|
+
* @param opts.network The network to use for connector.
|
|
14
18
|
* @param opts.explorer The explorer URL.
|
|
15
19
|
*/
|
|
16
20
|
export declare function actionCommandNftTransfer(opts: {
|
|
17
21
|
seed: string;
|
|
18
22
|
id: string;
|
|
19
|
-
|
|
23
|
+
recipientIdentity: string;
|
|
24
|
+
recipientAddress: string;
|
|
25
|
+
connector?: NftConnectorTypes;
|
|
20
26
|
node: string;
|
|
27
|
+
network?: string;
|
|
21
28
|
explorer: string;
|
|
22
29
|
}): Promise<void>;
|
|
@@ -1,4 +1,22 @@
|
|
|
1
|
+
import type { INftConnector } from "@twin.org/nft-models";
|
|
2
|
+
import { NftConnectorTypes } from "../models/nftConnectorTypes";
|
|
1
3
|
/**
|
|
2
4
|
* Setup the vault for use in the CLI commands.
|
|
3
5
|
*/
|
|
4
6
|
export declare function setupVault(): void;
|
|
7
|
+
/**
|
|
8
|
+
* Setup the NFT connector for use in the CLI commands.
|
|
9
|
+
* @param options The options for the NFT connector.
|
|
10
|
+
* @param options.nodeEndpoint The node endpoint.
|
|
11
|
+
* @param options.network The network.
|
|
12
|
+
* @param options.vaultSeedId The vault seed ID.
|
|
13
|
+
* @param options.walletAddressIndex The wallet address index.
|
|
14
|
+
* @param connector The connector to use.
|
|
15
|
+
* @returns The NFT connector.
|
|
16
|
+
*/
|
|
17
|
+
export declare function setupNftConnector(options: {
|
|
18
|
+
nodeEndpoint: string;
|
|
19
|
+
network?: string;
|
|
20
|
+
vaultSeedId?: string;
|
|
21
|
+
walletAddressIndex?: number;
|
|
22
|
+
}, connector?: NftConnectorTypes): INftConnector;
|
package/dist/types/index.d.ts
CHANGED
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* The NFT connector types.
|
|
3
|
+
*/
|
|
4
|
+
export declare const NftConnectorTypes: {
|
|
5
|
+
/**
|
|
6
|
+
* IOTA.
|
|
7
|
+
*/
|
|
8
|
+
readonly Iota: "iota";
|
|
9
|
+
};
|
|
10
|
+
/**
|
|
11
|
+
* The NFT connector types.
|
|
12
|
+
*/
|
|
13
|
+
export type NftConnectorTypes = (typeof NftConnectorTypes)[keyof typeof NftConnectorTypes];
|
package/docs/changelog.md
CHANGED
|
@@ -1,5 +1,117 @@
|
|
|
1
1
|
# @twin.org/nft-cli - Changelog
|
|
2
2
|
|
|
3
|
-
## v0.0.1-next.
|
|
3
|
+
## [0.0.1-next.31](https://github.com/twinfoundation/nft/compare/nft-cli-v0.0.1-next.30...nft-cli-v0.0.1-next.31) (2025-06-12)
|
|
4
|
+
|
|
5
|
+
|
|
6
|
+
### Features
|
|
7
|
+
|
|
8
|
+
* update dependencies ([8660f76](https://github.com/twinfoundation/nft/commit/8660f76ca324b0f476e45544cac6bee4b3146c3b))
|
|
9
|
+
|
|
10
|
+
|
|
11
|
+
### Dependencies
|
|
12
|
+
|
|
13
|
+
* The following workspace dependencies were updated
|
|
14
|
+
* dependencies
|
|
15
|
+
* @twin.org/nft-connector-iota bumped from 0.0.1-next.30 to 0.0.1-next.31
|
|
16
|
+
|
|
17
|
+
## [0.0.1-next.30](https://github.com/twinfoundation/nft/compare/nft-cli-v0.0.1-next.29...nft-cli-v0.0.1-next.30) (2025-05-22)
|
|
18
|
+
|
|
19
|
+
|
|
20
|
+
### Miscellaneous Chores
|
|
21
|
+
|
|
22
|
+
* **nft-cli:** Synchronize repo versions
|
|
23
|
+
|
|
24
|
+
|
|
25
|
+
### Dependencies
|
|
26
|
+
|
|
27
|
+
* The following workspace dependencies were updated
|
|
28
|
+
* dependencies
|
|
29
|
+
* @twin.org/nft-connector-iota bumped from 0.0.1-next.29 to 0.0.1-next.30
|
|
30
|
+
|
|
31
|
+
## [0.0.1-next.29](https://github.com/twinfoundation/nft/compare/nft-cli-v0.0.1-next.28...nft-cli-v0.0.1-next.29) (2025-05-21)
|
|
32
|
+
|
|
33
|
+
|
|
34
|
+
### Features
|
|
35
|
+
|
|
36
|
+
* update dlt packages ([12c4966](https://github.com/twinfoundation/nft/commit/12c4966bceb926b7cdcf1449165bee09187a426c))
|
|
37
|
+
|
|
38
|
+
|
|
39
|
+
### Dependencies
|
|
40
|
+
|
|
41
|
+
* The following workspace dependencies were updated
|
|
42
|
+
* dependencies
|
|
43
|
+
* @twin.org/nft-connector-iota bumped from 0.0.1-next.28 to 0.0.1-next.29
|
|
44
|
+
|
|
45
|
+
## [0.0.1-next.28](https://github.com/twinfoundation/nft/compare/nft-cli-v0.0.1-next.27...nft-cli-v0.0.1-next.28) (2025-05-06)
|
|
46
|
+
|
|
47
|
+
|
|
48
|
+
### Features
|
|
49
|
+
|
|
50
|
+
* iota rebased release ([8d05d1f](https://github.com/twinfoundation/nft/commit/8d05d1f58c1aacac983c100697ab40a314ad34ea))
|
|
51
|
+
|
|
52
|
+
|
|
53
|
+
### Dependencies
|
|
54
|
+
|
|
55
|
+
* The following workspace dependencies were updated
|
|
56
|
+
* dependencies
|
|
57
|
+
* @twin.org/nft-connector-iota bumped from 0.0.1-next.27 to 0.0.1-next.28
|
|
58
|
+
|
|
59
|
+
## [0.0.1-next.27](https://github.com/twinfoundation/nft/compare/nft-cli-v0.0.1-next.26...nft-cli-v0.0.1-next.27) (2025-04-24)
|
|
60
|
+
|
|
61
|
+
|
|
62
|
+
### Miscellaneous Chores
|
|
63
|
+
|
|
64
|
+
* **nft-cli:** Synchronize repo versions
|
|
65
|
+
|
|
66
|
+
|
|
67
|
+
### Dependencies
|
|
68
|
+
|
|
69
|
+
* The following workspace dependencies were updated
|
|
70
|
+
* dependencies
|
|
71
|
+
* @twin.org/nft-connector-iota bumped from 0.0.1-next.26 to 0.0.1-next.27
|
|
72
|
+
|
|
73
|
+
## [0.0.1-next.26](https://github.com/twinfoundation/nft/compare/nft-cli-v0.0.1-next.25...nft-cli-v0.0.1-next.26) (2025-04-17)
|
|
74
|
+
|
|
75
|
+
|
|
76
|
+
### Features
|
|
77
|
+
|
|
78
|
+
* use shared store mechanism ([#16](https://github.com/twinfoundation/nft/issues/16)) ([897bc78](https://github.com/twinfoundation/nft/commit/897bc7805248ba1388b2dd03df24c33f1633f344))
|
|
79
|
+
|
|
80
|
+
|
|
81
|
+
### Dependencies
|
|
82
|
+
|
|
83
|
+
* The following workspace dependencies were updated
|
|
84
|
+
* dependencies
|
|
85
|
+
* @twin.org/nft-connector-iota bumped from 0.0.1-next.25 to 0.0.1-next.26
|
|
86
|
+
|
|
87
|
+
## [0.0.1-next.25](https://github.com/twinfoundation/nft/compare/nft-cli-v0.0.1-next.24...nft-cli-v0.0.1-next.25) (2025-04-17)
|
|
88
|
+
|
|
89
|
+
|
|
90
|
+
### Miscellaneous Chores
|
|
91
|
+
|
|
92
|
+
* **nft-cli:** Synchronize repo versions
|
|
93
|
+
|
|
94
|
+
|
|
95
|
+
### Dependencies
|
|
96
|
+
|
|
97
|
+
* The following workspace dependencies were updated
|
|
98
|
+
* dependencies
|
|
99
|
+
* @twin.org/nft-connector-iota bumped from 0.0.1-next.24 to 0.0.1-next.25
|
|
100
|
+
|
|
101
|
+
## [0.0.1-next.24](https://github.com/twinfoundation/nft/compare/nft-cli-v0.0.1-next.23...nft-cli-v0.0.1-next.24) (2025-03-28)
|
|
102
|
+
|
|
103
|
+
|
|
104
|
+
### Features
|
|
105
|
+
|
|
106
|
+
* add publish workflows ([3f2ae6b](https://github.com/twinfoundation/nft/commit/3f2ae6b5c29da8012e01ef719c2d91a6aa80c2ad))
|
|
107
|
+
|
|
108
|
+
|
|
109
|
+
### Dependencies
|
|
110
|
+
|
|
111
|
+
* The following workspace dependencies were updated
|
|
112
|
+
* dependencies
|
|
113
|
+
* @twin.org/nft-connector-iota bumped from 0.0.1-next.23 to 0.0.1-next.24
|
|
114
|
+
|
|
115
|
+
## v0.0.1-next.23
|
|
4
116
|
|
|
5
117
|
- Initial Release
|
package/docs/examples.md
CHANGED
|
@@ -1,20 +1,21 @@
|
|
|
1
1
|
# @twin.org/nft-cli - Examples
|
|
2
2
|
|
|
3
|
-
##
|
|
3
|
+
## Running
|
|
4
4
|
|
|
5
|
-
|
|
5
|
+
To install and run the CLI locally use the following commands:
|
|
6
6
|
|
|
7
7
|
```shell
|
|
8
|
-
npm install @twin.org/nft-cli
|
|
8
|
+
npm install @twin.org/nft-cli -g
|
|
9
|
+
twin-nft
|
|
9
10
|
```
|
|
10
11
|
|
|
11
|
-
|
|
12
|
+
or run directly using NPX:
|
|
12
13
|
|
|
13
14
|
```shell
|
|
14
|
-
twin-
|
|
15
|
+
npx "@twin.org/nft-cli"
|
|
15
16
|
```
|
|
16
17
|
|
|
17
|
-
|
|
18
|
+
You should see output similar to the following:
|
|
18
19
|
|
|
19
20
|
```shell
|
|
20
21
|
🌍 TWIN NFT v1.0.0
|
|
@@ -29,7 +30,7 @@ Options:
|
|
|
29
30
|
|
|
30
31
|
Commands:
|
|
31
32
|
mnemonic [options] Create a mnemonic.
|
|
32
|
-
address [options] Create
|
|
33
|
+
address [options] Create addresses and keys from the seed.
|
|
33
34
|
faucet [options] Request funds from the faucet.
|
|
34
35
|
nft-mint [options] Mint an NFT.
|
|
35
36
|
nft-resolve [options] Resolve an NFT.
|
|
@@ -54,7 +55,7 @@ Mint an NFT.
|
|
|
54
55
|
|
|
55
56
|
Options:
|
|
56
57
|
--seed <seed> The seed for the issuer address in hex or base64 used to fund the minting, or start with ! to read environment variable.
|
|
57
|
-
--issuer <issuer> The
|
|
58
|
+
--issuer <issuer> The address of the NFT issuer, or start with ! to read environment variable.
|
|
58
59
|
--tag <tag> The tag for the NFT.
|
|
59
60
|
--immutable-json <immutable-json> A JSON file to read which includes the immutable data for the NFT.
|
|
60
61
|
--mutable-json <mutable-json> A JSON file to read which includes the mutable data for the NFT.
|
|
@@ -83,12 +84,12 @@ twin-nft mnemonic --env wallet.env
|
|
|
83
84
|
twin-nft address --load-env wallet.env --hrp tst --seed !SEED --count 4 --env wallet.env --merge-env
|
|
84
85
|
```
|
|
85
86
|
|
|
86
|
-
To run this on the IOTA
|
|
87
|
+
To run this on the IOTA devnet you will need an env file with the following settings. Store the following config as config.env
|
|
87
88
|
|
|
88
89
|
```shell
|
|
89
|
-
NODE_URL="https://api.
|
|
90
|
-
FAUCET_URL="https://faucet.
|
|
91
|
-
EXPLORER_URL="https://explorer.iota.org
|
|
90
|
+
NODE_URL="https://api.devnet.iota.cafe"
|
|
91
|
+
FAUCET_URL="https://faucet.devnet.iota.cafe"
|
|
92
|
+
EXPLORER_URL="https://explorer.iota.org/?network=devnet"
|
|
92
93
|
```
|
|
93
94
|
|
|
94
95
|
We also need to create a JSON file containing the immutable metadata for the NFT. The following JSON file follows the IRC27 standard for NFT data. Save this file as `immutable.json` to use in the following scripts.
|
|
@@ -110,10 +111,10 @@ To request some funds and mint the NFT you can issue the following commands:
|
|
|
110
111
|
|
|
111
112
|
```shell
|
|
112
113
|
# Fund the controller address from the faucet loading the config and wallet env files
|
|
113
|
-
twin-nft faucet --load-env config.env wallet.env --address !
|
|
114
|
+
twin-nft faucet --load-env config.env wallet.env --address !ADDRESS_0
|
|
114
115
|
|
|
115
116
|
# Mint the NFT and store the id in the nft.env file
|
|
116
|
-
twin-nft nft-mint --load-env config.env wallet.env --seed !SEED --issuer !
|
|
117
|
+
twin-nft nft-mint --load-env config.env wallet.env --seed !SEED --issuer !ADDRESS_0 --tag MY-NFT --immutable-json immutable.json --env nft.env
|
|
117
118
|
```
|
|
118
119
|
|
|
119
120
|
### nft-resolve
|
|
@@ -129,7 +130,7 @@ twin-nft nft-resolve --load-env config.env nft.env --id !NFT_ID
|
|
|
129
130
|
You can transfer the NFT to another address using the following command. You must provide the seed from the current issuer/owner so that it can be unlocked and transferred. In this example we read the nft id from the env file and transfer to the second address we created earlier.
|
|
130
131
|
|
|
131
132
|
```shell
|
|
132
|
-
twin-nft nft-transfer --load-env config.env wallet.env nft.env --seed !SEED --id !NFT_ID --recipient !
|
|
133
|
+
twin-nft nft-transfer --load-env config.env wallet.env nft.env --seed !SEED --id !NFT_ID --recipient !ADDRESS_1
|
|
133
134
|
```
|
|
134
135
|
|
|
135
136
|
### nft-burn
|
|
@@ -137,5 +138,5 @@ twin-nft nft-transfer --load-env config.env wallet.env nft.env --seed !SEED --id
|
|
|
137
138
|
To burn the NFT and reclaim the funds we issue the following command. We still require the seed as we need to transfer the deposit funds back to the issuer/owner.
|
|
138
139
|
|
|
139
140
|
```shell
|
|
140
|
-
twin-nft nft-burn --load-env config.env wallet.env nft.env --seed !SEED --issuer !
|
|
141
|
+
twin-nft nft-burn --load-env config.env wallet.env nft.env --seed !SEED --issuer !ADDRESS_1 --id !NFT_ID
|
|
141
142
|
```
|
|
@@ -8,13 +8,13 @@ The main entry point for the CLI.
|
|
|
8
8
|
|
|
9
9
|
## Constructors
|
|
10
10
|
|
|
11
|
-
###
|
|
11
|
+
### Constructor
|
|
12
12
|
|
|
13
|
-
> **new CLI**():
|
|
13
|
+
> **new CLI**(): `CLI`
|
|
14
14
|
|
|
15
15
|
#### Returns
|
|
16
16
|
|
|
17
|
-
|
|
17
|
+
`CLI`
|
|
18
18
|
|
|
19
19
|
#### Inherited from
|
|
20
20
|
|
|
@@ -24,20 +24,34 @@ The main entry point for the CLI.
|
|
|
24
24
|
|
|
25
25
|
### run()
|
|
26
26
|
|
|
27
|
-
> **run**(`argv`, `localesDirectory
|
|
27
|
+
> **run**(`argv`, `localesDirectory?`, `options?`): `Promise`\<`number`\>
|
|
28
28
|
|
|
29
29
|
Run the app.
|
|
30
30
|
|
|
31
31
|
#### Parameters
|
|
32
32
|
|
|
33
|
-
|
|
33
|
+
##### argv
|
|
34
|
+
|
|
35
|
+
`string`[]
|
|
34
36
|
|
|
35
37
|
The process arguments.
|
|
36
38
|
|
|
37
|
-
|
|
39
|
+
##### localesDirectory?
|
|
40
|
+
|
|
41
|
+
`string`
|
|
38
42
|
|
|
39
43
|
The directory for the locales, default to relative to the script.
|
|
40
44
|
|
|
45
|
+
##### options?
|
|
46
|
+
|
|
47
|
+
Additional options for the CLI.
|
|
48
|
+
|
|
49
|
+
###### overrideOutputWidth?
|
|
50
|
+
|
|
51
|
+
`number`
|
|
52
|
+
|
|
53
|
+
Override the output width.
|
|
54
|
+
|
|
41
55
|
#### Returns
|
|
42
56
|
|
|
43
57
|
`Promise`\<`number`\>
|
|
@@ -6,27 +6,43 @@ Action the nft burn command.
|
|
|
6
6
|
|
|
7
7
|
## Parameters
|
|
8
8
|
|
|
9
|
-
|
|
9
|
+
### opts
|
|
10
10
|
|
|
11
11
|
The options for the command.
|
|
12
12
|
|
|
13
|
-
|
|
13
|
+
#### seed
|
|
14
14
|
|
|
15
|
-
|
|
15
|
+
`string`
|
|
16
16
|
|
|
17
|
-
|
|
17
|
+
The seed required for signing by the issuer.
|
|
18
18
|
|
|
19
|
-
|
|
19
|
+
#### id
|
|
20
20
|
|
|
21
|
-
|
|
21
|
+
`string`
|
|
22
22
|
|
|
23
23
|
The id of the NFT to burn in urn format.
|
|
24
24
|
|
|
25
|
-
|
|
25
|
+
#### connector?
|
|
26
|
+
|
|
27
|
+
`"iota"`
|
|
28
|
+
|
|
29
|
+
The connector to perform the operations with.
|
|
30
|
+
|
|
31
|
+
#### node
|
|
32
|
+
|
|
33
|
+
`string`
|
|
26
34
|
|
|
27
35
|
The node URL.
|
|
28
36
|
|
|
29
|
-
|
|
37
|
+
#### network?
|
|
38
|
+
|
|
39
|
+
`string`
|
|
40
|
+
|
|
41
|
+
The network to use for connector.
|
|
42
|
+
|
|
43
|
+
#### explorer
|
|
44
|
+
|
|
45
|
+
`string`
|
|
30
46
|
|
|
31
47
|
The explorer URL.
|
|
32
48
|
|
|
@@ -6,7 +6,9 @@ Action the nft mint command.
|
|
|
6
6
|
|
|
7
7
|
## Parameters
|
|
8
8
|
|
|
9
|
-
|
|
9
|
+
### opts
|
|
10
|
+
|
|
11
|
+
`object` & `ICliOutputOptionsConsole` & `ICliOutputOptionsEnv` & `ICliOutputOptionsJson`
|
|
10
12
|
|
|
11
13
|
The options for the command.
|
|
12
14
|
|
|
@@ -6,7 +6,9 @@ Action the nft resolve command.
|
|
|
6
6
|
|
|
7
7
|
## Parameters
|
|
8
8
|
|
|
9
|
-
|
|
9
|
+
### opts
|
|
10
|
+
|
|
11
|
+
`object` & `ICliOutputOptionsConsole` & `ICliOutputOptionsEnv` & `ICliOutputOptionsJson`
|
|
10
12
|
|
|
11
13
|
The options for the command.
|
|
12
14
|
|
|
@@ -6,27 +6,55 @@ Action the nft transfer command.
|
|
|
6
6
|
|
|
7
7
|
## Parameters
|
|
8
8
|
|
|
9
|
-
|
|
9
|
+
### opts
|
|
10
10
|
|
|
11
11
|
The options for the command.
|
|
12
12
|
|
|
13
|
-
|
|
13
|
+
#### seed
|
|
14
|
+
|
|
15
|
+
`string`
|
|
14
16
|
|
|
15
17
|
The seed required for signing by the issuer.
|
|
16
18
|
|
|
17
|
-
|
|
19
|
+
#### id
|
|
20
|
+
|
|
21
|
+
`string`
|
|
18
22
|
|
|
19
23
|
The id of the NFT to transfer in urn format.
|
|
20
24
|
|
|
21
|
-
|
|
25
|
+
#### recipientIdentity
|
|
26
|
+
|
|
27
|
+
`string`
|
|
28
|
+
|
|
29
|
+
The recipient address of the NFT.
|
|
30
|
+
|
|
31
|
+
#### recipientAddress
|
|
32
|
+
|
|
33
|
+
`string`
|
|
22
34
|
|
|
23
35
|
The recipient address of the NFT.
|
|
24
36
|
|
|
25
|
-
|
|
37
|
+
#### connector?
|
|
38
|
+
|
|
39
|
+
`"iota"`
|
|
40
|
+
|
|
41
|
+
The connector to perform the operations with.
|
|
42
|
+
|
|
43
|
+
#### node
|
|
44
|
+
|
|
45
|
+
`string`
|
|
26
46
|
|
|
27
47
|
The node URL.
|
|
28
48
|
|
|
29
|
-
|
|
49
|
+
#### network?
|
|
50
|
+
|
|
51
|
+
`string`
|
|
52
|
+
|
|
53
|
+
The network to use for connector.
|
|
54
|
+
|
|
55
|
+
#### explorer
|
|
56
|
+
|
|
57
|
+
`string`
|
|
30
58
|
|
|
31
59
|
The explorer URL.
|
|
32
60
|
|
|
@@ -0,0 +1,47 @@
|
|
|
1
|
+
# Function: setupNftConnector()
|
|
2
|
+
|
|
3
|
+
> **setupNftConnector**(`options`, `connector?`): `INftConnector`
|
|
4
|
+
|
|
5
|
+
Setup the NFT connector for use in the CLI commands.
|
|
6
|
+
|
|
7
|
+
## Parameters
|
|
8
|
+
|
|
9
|
+
### options
|
|
10
|
+
|
|
11
|
+
The options for the NFT connector.
|
|
12
|
+
|
|
13
|
+
#### nodeEndpoint
|
|
14
|
+
|
|
15
|
+
`string`
|
|
16
|
+
|
|
17
|
+
The node endpoint.
|
|
18
|
+
|
|
19
|
+
#### network?
|
|
20
|
+
|
|
21
|
+
`string`
|
|
22
|
+
|
|
23
|
+
The network.
|
|
24
|
+
|
|
25
|
+
#### vaultSeedId?
|
|
26
|
+
|
|
27
|
+
`string`
|
|
28
|
+
|
|
29
|
+
The vault seed ID.
|
|
30
|
+
|
|
31
|
+
#### walletAddressIndex?
|
|
32
|
+
|
|
33
|
+
`number`
|
|
34
|
+
|
|
35
|
+
The wallet address index.
|
|
36
|
+
|
|
37
|
+
### connector?
|
|
38
|
+
|
|
39
|
+
`"iota"`
|
|
40
|
+
|
|
41
|
+
The connector to use.
|
|
42
|
+
|
|
43
|
+
## Returns
|
|
44
|
+
|
|
45
|
+
`INftConnector`
|
|
46
|
+
|
|
47
|
+
The NFT connector.
|
package/docs/reference/index.md
CHANGED
|
@@ -4,6 +4,14 @@
|
|
|
4
4
|
|
|
5
5
|
- [CLI](classes/CLI.md)
|
|
6
6
|
|
|
7
|
+
## Type Aliases
|
|
8
|
+
|
|
9
|
+
- [NftConnectorTypes](type-aliases/NftConnectorTypes.md)
|
|
10
|
+
|
|
11
|
+
## Variables
|
|
12
|
+
|
|
13
|
+
- [NftConnectorTypes](variables/NftConnectorTypes.md)
|
|
14
|
+
|
|
7
15
|
## Functions
|
|
8
16
|
|
|
9
17
|
- [buildCommandNftBurn](functions/buildCommandNftBurn.md)
|
|
@@ -14,3 +22,5 @@
|
|
|
14
22
|
- [actionCommandNftResolve](functions/actionCommandNftResolve.md)
|
|
15
23
|
- [buildCommandNftTransfer](functions/buildCommandNftTransfer.md)
|
|
16
24
|
- [actionCommandNftTransfer](functions/actionCommandNftTransfer.md)
|
|
25
|
+
- [setupVault](functions/setupVault.md)
|
|
26
|
+
- [setupNftConnector](functions/setupNftConnector.md)
|