@twin.org/nft-cli 0.0.1-next.9 → 0.0.1
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/dist/cjs/index.cjs +140 -56
- package/dist/esm/index.mjs +141 -60
- package/dist/locales/en.json +610 -554
- 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 +141 -1
- package/docs/examples.md +10 -10
- package/docs/reference/classes/CLI.md +5 -5
- package/docs/reference/functions/actionCommandNftBurn.md +11 -5
- package/docs/reference/functions/actionCommandNftTransfer.md +19 -1
- 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 +16 -15
|
@@ -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,145 @@
|
|
|
1
1
|
# @twin.org/nft-cli - Changelog
|
|
2
2
|
|
|
3
|
-
##
|
|
3
|
+
## 0.0.1 (2025-07-09)
|
|
4
|
+
|
|
5
|
+
|
|
6
|
+
### Features
|
|
7
|
+
|
|
8
|
+
* release to production ([4d338b3](https://github.com/twinfoundation/nft/commit/4d338b3e8a4dbccc61a1d1da3c470ba86cefe535))
|
|
9
|
+
|
|
10
|
+
|
|
11
|
+
### Dependencies
|
|
12
|
+
|
|
13
|
+
* The following workspace dependencies were updated
|
|
14
|
+
* dependencies
|
|
15
|
+
* @twin.org/nft-connector-iota bumped from ^0.0.0 to ^0.0.1
|
|
16
|
+
|
|
17
|
+
## [0.0.1-next.32](https://github.com/twinfoundation/nft/compare/nft-cli-v0.0.1-next.31...nft-cli-v0.0.1-next.32) (2025-06-24)
|
|
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.31 to 0.0.1-next.32
|
|
30
|
+
|
|
31
|
+
## [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)
|
|
32
|
+
|
|
33
|
+
|
|
34
|
+
### Features
|
|
35
|
+
|
|
36
|
+
* update dependencies ([8660f76](https://github.com/twinfoundation/nft/commit/8660f76ca324b0f476e45544cac6bee4b3146c3b))
|
|
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.30 to 0.0.1-next.31
|
|
44
|
+
|
|
45
|
+
## [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)
|
|
46
|
+
|
|
47
|
+
|
|
48
|
+
### Miscellaneous Chores
|
|
49
|
+
|
|
50
|
+
* **nft-cli:** Synchronize repo versions
|
|
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.29 to 0.0.1-next.30
|
|
58
|
+
|
|
59
|
+
## [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)
|
|
60
|
+
|
|
61
|
+
|
|
62
|
+
### Features
|
|
63
|
+
|
|
64
|
+
* update dlt packages ([12c4966](https://github.com/twinfoundation/nft/commit/12c4966bceb926b7cdcf1449165bee09187a426c))
|
|
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.28 to 0.0.1-next.29
|
|
72
|
+
|
|
73
|
+
## [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)
|
|
74
|
+
|
|
75
|
+
|
|
76
|
+
### Features
|
|
77
|
+
|
|
78
|
+
* iota rebased release ([8d05d1f](https://github.com/twinfoundation/nft/commit/8d05d1f58c1aacac983c100697ab40a314ad34ea))
|
|
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.27 to 0.0.1-next.28
|
|
86
|
+
|
|
87
|
+
## [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)
|
|
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.26 to 0.0.1-next.27
|
|
100
|
+
|
|
101
|
+
## [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)
|
|
102
|
+
|
|
103
|
+
|
|
104
|
+
### Features
|
|
105
|
+
|
|
106
|
+
* use shared store mechanism ([#16](https://github.com/twinfoundation/nft/issues/16)) ([897bc78](https://github.com/twinfoundation/nft/commit/897bc7805248ba1388b2dd03df24c33f1633f344))
|
|
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.25 to 0.0.1-next.26
|
|
114
|
+
|
|
115
|
+
## [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)
|
|
116
|
+
|
|
117
|
+
|
|
118
|
+
### Miscellaneous Chores
|
|
119
|
+
|
|
120
|
+
* **nft-cli:** Synchronize repo versions
|
|
121
|
+
|
|
122
|
+
|
|
123
|
+
### Dependencies
|
|
124
|
+
|
|
125
|
+
* The following workspace dependencies were updated
|
|
126
|
+
* dependencies
|
|
127
|
+
* @twin.org/nft-connector-iota bumped from 0.0.1-next.24 to 0.0.1-next.25
|
|
128
|
+
|
|
129
|
+
## [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)
|
|
130
|
+
|
|
131
|
+
|
|
132
|
+
### Features
|
|
133
|
+
|
|
134
|
+
* add publish workflows ([3f2ae6b](https://github.com/twinfoundation/nft/commit/3f2ae6b5c29da8012e01ef719c2d91a6aa80c2ad))
|
|
135
|
+
|
|
136
|
+
|
|
137
|
+
### Dependencies
|
|
138
|
+
|
|
139
|
+
* The following workspace dependencies were updated
|
|
140
|
+
* dependencies
|
|
141
|
+
* @twin.org/nft-connector-iota bumped from 0.0.1-next.23 to 0.0.1-next.24
|
|
142
|
+
|
|
143
|
+
## v0.0.1-next.23
|
|
4
144
|
|
|
5
145
|
- Initial Release
|
package/docs/examples.md
CHANGED
|
@@ -30,7 +30,7 @@ Options:
|
|
|
30
30
|
|
|
31
31
|
Commands:
|
|
32
32
|
mnemonic [options] Create a mnemonic.
|
|
33
|
-
address [options] Create
|
|
33
|
+
address [options] Create addresses and keys from the seed.
|
|
34
34
|
faucet [options] Request funds from the faucet.
|
|
35
35
|
nft-mint [options] Mint an NFT.
|
|
36
36
|
nft-resolve [options] Resolve an NFT.
|
|
@@ -55,7 +55,7 @@ Mint an NFT.
|
|
|
55
55
|
|
|
56
56
|
Options:
|
|
57
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.
|
|
58
|
-
--issuer <issuer> The
|
|
58
|
+
--issuer <issuer> The address of the NFT issuer, or start with ! to read environment variable.
|
|
59
59
|
--tag <tag> The tag for the NFT.
|
|
60
60
|
--immutable-json <immutable-json> A JSON file to read which includes the immutable data for the NFT.
|
|
61
61
|
--mutable-json <mutable-json> A JSON file to read which includes the mutable data for the NFT.
|
|
@@ -84,12 +84,12 @@ twin-nft mnemonic --env wallet.env
|
|
|
84
84
|
twin-nft address --load-env wallet.env --hrp tst --seed !SEED --count 4 --env wallet.env --merge-env
|
|
85
85
|
```
|
|
86
86
|
|
|
87
|
-
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
|
|
88
88
|
|
|
89
89
|
```shell
|
|
90
|
-
NODE_URL="https://api.
|
|
91
|
-
FAUCET_URL="https://faucet.
|
|
92
|
-
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"
|
|
93
93
|
```
|
|
94
94
|
|
|
95
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.
|
|
@@ -111,10 +111,10 @@ To request some funds and mint the NFT you can issue the following commands:
|
|
|
111
111
|
|
|
112
112
|
```shell
|
|
113
113
|
# Fund the controller address from the faucet loading the config and wallet env files
|
|
114
|
-
twin-nft faucet --load-env config.env wallet.env --address !
|
|
114
|
+
twin-nft faucet --load-env config.env wallet.env --address !ADDRESS_0
|
|
115
115
|
|
|
116
116
|
# Mint the NFT and store the id in the nft.env file
|
|
117
|
-
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
|
|
118
118
|
```
|
|
119
119
|
|
|
120
120
|
### nft-resolve
|
|
@@ -130,7 +130,7 @@ twin-nft nft-resolve --load-env config.env nft.env --id !NFT_ID
|
|
|
130
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.
|
|
131
131
|
|
|
132
132
|
```shell
|
|
133
|
-
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
|
|
134
134
|
```
|
|
135
135
|
|
|
136
136
|
### nft-burn
|
|
@@ -138,5 +138,5 @@ twin-nft nft-transfer --load-env config.env wallet.env nft.env --seed !SEED --id
|
|
|
138
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.
|
|
139
139
|
|
|
140
140
|
```shell
|
|
141
|
-
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
|
|
142
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,7 +24,7 @@ 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
|
|
|
@@ -46,7 +46,7 @@ The directory for the locales, default to relative to the script.
|
|
|
46
46
|
|
|
47
47
|
Additional options for the CLI.
|
|
48
48
|
|
|
49
|
-
###### overrideOutputWidth
|
|
49
|
+
###### overrideOutputWidth?
|
|
50
50
|
|
|
51
51
|
`number`
|
|
52
52
|
|
|
@@ -16,17 +16,17 @@ The options for the command.
|
|
|
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
|
-
The
|
|
23
|
+
The id of the NFT to burn in urn format.
|
|
24
24
|
|
|
25
|
-
####
|
|
25
|
+
#### connector?
|
|
26
26
|
|
|
27
|
-
`
|
|
27
|
+
`"iota"`
|
|
28
28
|
|
|
29
|
-
The
|
|
29
|
+
The connector to perform the operations with.
|
|
30
30
|
|
|
31
31
|
#### node
|
|
32
32
|
|
|
@@ -34,6 +34,12 @@ The id of the NFT to burn in urn format.
|
|
|
34
34
|
|
|
35
35
|
The node URL.
|
|
36
36
|
|
|
37
|
+
#### network?
|
|
38
|
+
|
|
39
|
+
`string`
|
|
40
|
+
|
|
41
|
+
The network to use for connector.
|
|
42
|
+
|
|
37
43
|
#### explorer
|
|
38
44
|
|
|
39
45
|
`string`
|
|
@@ -22,18 +22,36 @@ The seed required for signing by the issuer.
|
|
|
22
22
|
|
|
23
23
|
The id of the NFT to transfer in urn format.
|
|
24
24
|
|
|
25
|
-
####
|
|
25
|
+
#### recipientIdentity
|
|
26
26
|
|
|
27
27
|
`string`
|
|
28
28
|
|
|
29
29
|
The recipient address of the NFT.
|
|
30
30
|
|
|
31
|
+
#### recipientAddress
|
|
32
|
+
|
|
33
|
+
`string`
|
|
34
|
+
|
|
35
|
+
The recipient address of the NFT.
|
|
36
|
+
|
|
37
|
+
#### connector?
|
|
38
|
+
|
|
39
|
+
`"iota"`
|
|
40
|
+
|
|
41
|
+
The connector to perform the operations with.
|
|
42
|
+
|
|
31
43
|
#### node
|
|
32
44
|
|
|
33
45
|
`string`
|
|
34
46
|
|
|
35
47
|
The node URL.
|
|
36
48
|
|
|
49
|
+
#### network?
|
|
50
|
+
|
|
51
|
+
`string`
|
|
52
|
+
|
|
53
|
+
The network to use for connector.
|
|
54
|
+
|
|
37
55
|
#### explorer
|
|
38
56
|
|
|
39
57
|
`string`
|
|
@@ -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)
|
package/locales/en.json
CHANGED
|
@@ -10,7 +10,11 @@
|
|
|
10
10
|
},
|
|
11
11
|
"issuer": {
|
|
12
12
|
"param": "--issuer '<'issuer'>'",
|
|
13
|
-
"description": "The
|
|
13
|
+
"description": "The identity of the NFT issuer, or start with ! to read environment variable."
|
|
14
|
+
},
|
|
15
|
+
"wallet-address-index": {
|
|
16
|
+
"param": "--wallet-address-index '<'wallet-address-index'>'",
|
|
17
|
+
"description": "The wallet address index to use for storing the NFT."
|
|
14
18
|
},
|
|
15
19
|
"tag": {
|
|
16
20
|
"param": "--tag '<'tag'>'",
|
|
@@ -31,6 +35,7 @@
|
|
|
31
35
|
"labels": {
|
|
32
36
|
"issuer": "Issuer",
|
|
33
37
|
"tag": "Tag",
|
|
38
|
+
"walletAddressIndex": "Wallet Address Index",
|
|
34
39
|
"immutableJsonFilename": "Immutable JSON Filename",
|
|
35
40
|
"mutableJsonFilename": "Mutable JSON Filename",
|
|
36
41
|
"immutableJson": "Immutable JSON",
|
|
@@ -63,10 +68,6 @@
|
|
|
63
68
|
"param": "--seed '<'seed'>'",
|
|
64
69
|
"description": "The seed for the issuer address in hex or base64 used to fund the burning, or start with ! to read environment variable."
|
|
65
70
|
},
|
|
66
|
-
"issuer": {
|
|
67
|
-
"param": "--issuer '<'issuer'>'",
|
|
68
|
-
"description": "The bech32 address of the NFT issuer, or start with ! to read environment variable."
|
|
69
|
-
},
|
|
70
71
|
"id": {
|
|
71
72
|
"param": "--id '<'id'>'",
|
|
72
73
|
"description": "The id for the NFT in urn format."
|
|
@@ -92,21 +93,34 @@
|
|
|
92
93
|
"param": "--id '<'id'>'",
|
|
93
94
|
"description": "The id for the NFT in urn format."
|
|
94
95
|
},
|
|
95
|
-
"recipient": {
|
|
96
|
-
"param": "--recipient '<'recipient'>'",
|
|
97
|
-
"description": "The
|
|
96
|
+
"recipient-identity": {
|
|
97
|
+
"param": "--recipient-identity '<'recipient-identity'>'",
|
|
98
|
+
"description": "The identity of the NFT issuer, or start with ! to read environment variable."
|
|
99
|
+
},
|
|
100
|
+
"recipient-address": {
|
|
101
|
+
"param": "--recipient-address '<'recipient-address'>'",
|
|
102
|
+
"description": "The address of the NFT recipient, or start with ! to read environment variable."
|
|
98
103
|
}
|
|
99
104
|
},
|
|
100
105
|
"progress": {
|
|
101
106
|
"transferringNft": "Transferring NFT"
|
|
102
107
|
},
|
|
103
108
|
"labels": {
|
|
104
|
-
"
|
|
109
|
+
"recipientAddress": "Recipient Address",
|
|
110
|
+
"recipientIdentity": "Recipient Identity",
|
|
105
111
|
"nftId": "NFT Id"
|
|
106
112
|
}
|
|
107
113
|
},
|
|
108
114
|
"common": {
|
|
109
115
|
"options": {
|
|
116
|
+
"connector": {
|
|
117
|
+
"param": "--connector '<'connector'>'",
|
|
118
|
+
"description": "The connector to use for the NFT operation."
|
|
119
|
+
},
|
|
120
|
+
"network": {
|
|
121
|
+
"param": "--network '<'network'>'",
|
|
122
|
+
"description": "The network to use for the NFT operation."
|
|
123
|
+
},
|
|
110
124
|
"node": {
|
|
111
125
|
"param": "--node '<'url'>'",
|
|
112
126
|
"description": "The url for the node endpoint, or an environment variable name containing the url."
|
|
@@ -116,7 +130,9 @@
|
|
|
116
130
|
"did": "DID",
|
|
117
131
|
"node": "Node",
|
|
118
132
|
"explorer": "Explorer",
|
|
119
|
-
"explore": "Explore"
|
|
133
|
+
"explore": "Explore",
|
|
134
|
+
"connector": "Connector",
|
|
135
|
+
"network": "Network"
|
|
120
136
|
}
|
|
121
137
|
}
|
|
122
138
|
}
|