@twin.org/nft-models 0.0.3-next.3 → 0.0.3-next.5
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 +1 -1
- package/dist/es/models/INftComponent.js.map +1 -1
- package/dist/es/models/INftConnector.js.map +1 -1
- package/dist/es/models/api/INftResolveResponse.js.map +1 -1
- package/dist/es/models/api/INftTransferRequest.js.map +1 -1
- package/dist/types/models/INftComponent.d.ts +2 -3
- package/dist/types/models/INftConnector.d.ts +2 -3
- package/dist/types/models/api/INftResolveResponse.d.ts +3 -2
- package/dist/types/models/api/INftTransferRequest.d.ts +0 -4
- package/docs/changelog.md +50 -36
- package/docs/examples.md +90 -1
- package/docs/reference/interfaces/IIrc27Metadata.md +15 -15
- package/docs/reference/interfaces/INftBurnRequest.md +1 -1
- package/docs/reference/interfaces/INftComponent.md +8 -14
- package/docs/reference/interfaces/INftConnector.md +8 -14
- package/docs/reference/interfaces/INftMintRequest.md +4 -4
- package/docs/reference/interfaces/INftResolveRequest.md +1 -1
- package/docs/reference/interfaces/INftResolveResponse.md +7 -6
- package/docs/reference/interfaces/INftTransferRequest.md +3 -9
- package/docs/reference/interfaces/INftUpdateRequest.md +3 -3
- package/package.json +4 -4
package/README.md
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
# TWIN NFT Models
|
|
2
2
|
|
|
3
|
-
|
|
3
|
+
This package defines the shared interfaces, factories, and API models used by NFT connectors, services, and clients in this repository. It provides a stable contract layer that keeps implementations interoperable across different runtime environments.
|
|
4
4
|
|
|
5
5
|
## Installation
|
|
6
6
|
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"INftComponent.js","sourceRoot":"","sources":["../../../src/models/INftComponent.ts"],"names":[],"mappings":"","sourcesContent":["// Copyright 2024 IOTA Stiftung.\n// SPDX-License-Identifier: Apache-2.0.\nimport type { IComponent } from \"@twin.org/core\";\n\n/**\n * Interface describing an NFT component.\n */\nexport interface INftComponent extends IComponent {\n\t/**\n\t * Mint an NFT.\n\t * @param tag The tag for the NFT.\n\t * @param immutableMetadata The immutable metadata for the NFT.\n\t * @param metadata The metadata for the NFT.\n\t * @param namespace The namespace of the connector to use for the NFT, defaults to component configured namespace.\n\t * @param identity The identity to perform the nft operation with.\n\t * @returns The id of the created NFT in urn format.\n\t */\n\tmint<T = unknown, U = unknown>(\n\t\ttag: string,\n\t\timmutableMetadata?: T,\n\t\tmetadata?: U,\n\t\tnamespace?: string,\n\t\tidentity?: string\n\t): Promise<string>;\n\n\t/**\n\t * Resolve an NFT.\n\t * @param id The id of the NFT to resolve.\n\t * @param controllerIdentity The identity to perform the nft operation with.\n\t * @returns The data for the NFT.\n\t */\n\tresolve<T = unknown, U = unknown>(\n\t\tid: string,\n\t\tcontrollerIdentity?: string\n\t): Promise<{\n\t\tissuer: string;\n\t\
|
|
1
|
+
{"version":3,"file":"INftComponent.js","sourceRoot":"","sources":["../../../src/models/INftComponent.ts"],"names":[],"mappings":"","sourcesContent":["// Copyright 2024 IOTA Stiftung.\n// SPDX-License-Identifier: Apache-2.0.\nimport type { IComponent } from \"@twin.org/core\";\n\n/**\n * Interface describing an NFT component.\n */\nexport interface INftComponent extends IComponent {\n\t/**\n\t * Mint an NFT.\n\t * @param tag The tag for the NFT.\n\t * @param immutableMetadata The immutable metadata for the NFT.\n\t * @param metadata The metadata for the NFT.\n\t * @param namespace The namespace of the connector to use for the NFT, defaults to component configured namespace.\n\t * @param identity The identity to perform the nft operation with.\n\t * @returns The id of the created NFT in urn format.\n\t */\n\tmint<T = unknown, U = unknown>(\n\t\ttag: string,\n\t\timmutableMetadata?: T,\n\t\tmetadata?: U,\n\t\tnamespace?: string,\n\t\tidentity?: string\n\t): Promise<string>;\n\n\t/**\n\t * Resolve an NFT.\n\t * @param id The id of the NFT to resolve.\n\t * @param controllerIdentity The identity to perform the nft operation with.\n\t * @returns The data for the NFT.\n\t */\n\tresolve<T = unknown, U = unknown>(\n\t\tid: string,\n\t\tcontrollerIdentity?: string\n\t): Promise<{\n\t\tissuer: string;\n\t\tissuerIdentityId: string;\n\t\ttag: string;\n\t\timmutableMetadata?: T;\n\t\tmetadata?: U;\n\t}>;\n\n\t/**\n\t * Burn an NFT.\n\t * @param id The id of the NFT to burn in urn format.\n\t * @param controllerIdentity The identity to perform the nft operation with.\n\t * @returns Nothing.\n\t */\n\tburn(id: string, controllerIdentity?: string): Promise<void>;\n\n\t/**\n\t * Transfer an NFT.\n\t * @param id The id of the NFT to transfer in urn format.\n\t * @param recipientAddress The recipient address for the NFT.\n\t * @param metadata Optional mutable data to include during the transfer.\n\t * @param controllerIdentity The identity to perform the nft operation with.\n\t * @returns Nothing.\n\t */\n\ttransfer<U = unknown>(\n\t\tid: string,\n\t\trecipientAddress: string,\n\t\tmetadata?: U,\n\t\tcontrollerIdentity?: string\n\t): Promise<void>;\n\n\t/**\n\t * Update the mutable data of the NFT.\n\t * @param id The id of the NFT to update in urn format.\n\t * @param metadata The mutable data to update.\n\t * @param controllerIdentity The identity to perform the nft operation with.\n\t * @returns Nothing.\n\t */\n\tupdate<U = unknown>(id: string, metadata: U, controllerIdentity?: string): Promise<void>;\n}\n"]}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"INftConnector.js","sourceRoot":"","sources":["../../../src/models/INftConnector.ts"],"names":[],"mappings":"","sourcesContent":["// Copyright 2024 IOTA Stiftung.\n// SPDX-License-Identifier: Apache-2.0.\nimport type { IComponent } from \"@twin.org/core\";\n\n/**\n * Interface describing an NFT connector.\n */\nexport interface INftConnector extends IComponent {\n\t/**\n\t * Mint an NFT.\n\t * @param controllerIdentity The identity of the user to access the vault keys.\n\t * @param tag The tag for the NFT.\n\t * @param immutableMetadata The immutable metadata for the NFT.\n\t * @param metadata The metadata for the NFT.\n\t * @returns The id of the created NFT in urn format.\n\t */\n\tmint<T = unknown, U = unknown>(\n\t\tcontrollerIdentity: string,\n\t\ttag: string,\n\t\timmutableMetadata?: T,\n\t\tmetadata?: U\n\t): Promise<string>;\n\n\t/**\n\t * Resolve an NFT.\n\t * @param id The id of the NFT to resolve.\n\t * @returns The data for the NFT.\n\t */\n\tresolve<T = unknown, U = unknown>(\n\t\tid: string\n\t): Promise<{\n\t\tissuer: string;\n\t\
|
|
1
|
+
{"version":3,"file":"INftConnector.js","sourceRoot":"","sources":["../../../src/models/INftConnector.ts"],"names":[],"mappings":"","sourcesContent":["// Copyright 2024 IOTA Stiftung.\n// SPDX-License-Identifier: Apache-2.0.\nimport type { IComponent } from \"@twin.org/core\";\n\n/**\n * Interface describing an NFT connector.\n */\nexport interface INftConnector extends IComponent {\n\t/**\n\t * Mint an NFT.\n\t * @param controllerIdentity The identity of the user to access the vault keys.\n\t * @param tag The tag for the NFT.\n\t * @param immutableMetadata The immutable metadata for the NFT.\n\t * @param metadata The metadata for the NFT.\n\t * @returns The id of the created NFT in urn format.\n\t */\n\tmint<T = unknown, U = unknown>(\n\t\tcontrollerIdentity: string,\n\t\ttag: string,\n\t\timmutableMetadata?: T,\n\t\tmetadata?: U\n\t): Promise<string>;\n\n\t/**\n\t * Resolve an NFT.\n\t * @param id The id of the NFT to resolve.\n\t * @returns The data for the NFT.\n\t */\n\tresolve<T = unknown, U = unknown>(\n\t\tid: string\n\t): Promise<{\n\t\tissuer: string;\n\t\tissuerIdentityId: string;\n\t\ttag: string;\n\t\timmutableMetadata?: T;\n\t\tmetadata?: U;\n\t}>;\n\n\t/**\n\t * Burn an NFT.\n\t * @param controller The controller of the NFT who can make changes.\n\t * @param id The id of the NFT to burn in urn format.\n\t * @returns Nothing.\n\t */\n\tburn(controller: string, id: string): Promise<void>;\n\n\t/**\n\t * Transfer an NFT.\n\t * @param controllerIdentity The controller of the NFT who can make changes.\n\t * @param id The id of the NFT to transfer in urn format.\n\t * @param recipientAddress The recipient address for the NFT.\n\t * @param metadata Optional mutable data to include during the transfer.\n\t * @returns Nothing.\n\t */\n\ttransfer<U = unknown>(\n\t\tcontrollerIdentity: string,\n\t\tid: string,\n\t\trecipientAddress: string,\n\t\tmetadata?: U\n\t): Promise<void>;\n\n\t/**\n\t * Update the mutable data of the NFT.\n\t * @param controllerIdentity The controller of the NFT who can make changes.\n\t * @param id The id of the NFT to update in urn format.\n\t * @param metadata The mutable data to update.\n\t * @returns Nothing.\n\t */\n\tupdate<U = unknown>(controllerIdentity: string, id: string, metadata: U): Promise<void>;\n}\n"]}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"INftResolveResponse.js","sourceRoot":"","sources":["../../../../src/models/api/INftResolveResponse.ts"],"names":[],"mappings":"AAAA,gCAAgC;AAChC,uCAAuC","sourcesContent":["// Copyright 2024 IOTA Stiftung.\n// SPDX-License-Identifier: Apache-2.0.\n\n/**\n * Response to resolving the NFT.\n */\nexport interface INftResolveResponse {\n\t/**\n\t * The data that was resolved.\n\t */\n\tbody: {\n\t\t/**\n\t\t * The issuer of the NFT.\n\t\t */\n\t\tissuer: string;\n\n\t\t/**\n\t\t * The
|
|
1
|
+
{"version":3,"file":"INftResolveResponse.js","sourceRoot":"","sources":["../../../../src/models/api/INftResolveResponse.ts"],"names":[],"mappings":"AAAA,gCAAgC;AAChC,uCAAuC","sourcesContent":["// Copyright 2024 IOTA Stiftung.\n// SPDX-License-Identifier: Apache-2.0.\n\n/**\n * Response to resolving the NFT.\n */\nexport interface INftResolveResponse {\n\t/**\n\t * The data that was resolved.\n\t */\n\tbody: {\n\t\t/**\n\t\t * The issuer of the NFT.\n\t\t */\n\t\tissuer: string;\n\n\t\t/**\n\t\t * The on-chain Object ID of the verified IOTA Identity that minted this NFT.\n\t\t * Empty string when not minted with identity verification.\n\t\t */\n\t\tissuerIdentityId: string;\n\n\t\t/**\n\t\t * The tag data for the NFT.\n\t\t */\n\t\ttag: string;\n\n\t\t/**\n\t\t * The immutable data for the NFT.\n\t\t */\n\t\timmutableMetadata?: unknown;\n\n\t\t/**\n\t\t * The metadata for the NFT.\n\t\t */\n\t\tmetadata?: unknown;\n\t};\n}\n"]}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"INftTransferRequest.js","sourceRoot":"","sources":["../../../../src/models/api/INftTransferRequest.ts"],"names":[],"mappings":"AAAA,gCAAgC;AAChC,uCAAuC","sourcesContent":["// Copyright 2024 IOTA Stiftung.\n// SPDX-License-Identifier: Apache-2.0.\n\n/**\n * Transfer the NFT and update the metadata.\n */\nexport interface INftTransferRequest {\n\t/**\n\t * The data to be used in the transfer.\n\t */\n\tpathParams: {\n\t\t/**\n\t\t * The id of the NFT to transfer in urn format.\n\t\t */\n\t\tid: string;\n\t};\n\n\t/**\n\t * The data to be used in the transfer.\n\t */\n\tbody: {\n\t\t/**\n\t\t * The recipient
|
|
1
|
+
{"version":3,"file":"INftTransferRequest.js","sourceRoot":"","sources":["../../../../src/models/api/INftTransferRequest.ts"],"names":[],"mappings":"AAAA,gCAAgC;AAChC,uCAAuC","sourcesContent":["// Copyright 2024 IOTA Stiftung.\n// SPDX-License-Identifier: Apache-2.0.\n\n/**\n * Transfer the NFT and update the metadata.\n */\nexport interface INftTransferRequest {\n\t/**\n\t * The data to be used in the transfer.\n\t */\n\tpathParams: {\n\t\t/**\n\t\t * The id of the NFT to transfer in urn format.\n\t\t */\n\t\tid: string;\n\t};\n\n\t/**\n\t * The data to be used in the transfer.\n\t */\n\tbody: {\n\t\t/**\n\t\t * The recipient address for the NFT.\n\t\t */\n\t\trecipientAddress: string;\n\n\t\t/**\n\t\t * The metadata for the NFT.\n\t\t */\n\t\tmetadata?: unknown;\n\t};\n}\n"]}
|
|
@@ -21,7 +21,7 @@ export interface INftComponent extends IComponent {
|
|
|
21
21
|
*/
|
|
22
22
|
resolve<T = unknown, U = unknown>(id: string, controllerIdentity?: string): Promise<{
|
|
23
23
|
issuer: string;
|
|
24
|
-
|
|
24
|
+
issuerIdentityId: string;
|
|
25
25
|
tag: string;
|
|
26
26
|
immutableMetadata?: T;
|
|
27
27
|
metadata?: U;
|
|
@@ -36,13 +36,12 @@ export interface INftComponent extends IComponent {
|
|
|
36
36
|
/**
|
|
37
37
|
* Transfer an NFT.
|
|
38
38
|
* @param id The id of the NFT to transfer in urn format.
|
|
39
|
-
* @param recipientIdentity The recipient identity for the NFT.
|
|
40
39
|
* @param recipientAddress The recipient address for the NFT.
|
|
41
40
|
* @param metadata Optional mutable data to include during the transfer.
|
|
42
41
|
* @param controllerIdentity The identity to perform the nft operation with.
|
|
43
42
|
* @returns Nothing.
|
|
44
43
|
*/
|
|
45
|
-
transfer<U = unknown>(id: string,
|
|
44
|
+
transfer<U = unknown>(id: string, recipientAddress: string, metadata?: U, controllerIdentity?: string): Promise<void>;
|
|
46
45
|
/**
|
|
47
46
|
* Update the mutable data of the NFT.
|
|
48
47
|
* @param id The id of the NFT to update in urn format.
|
|
@@ -19,7 +19,7 @@ export interface INftConnector extends IComponent {
|
|
|
19
19
|
*/
|
|
20
20
|
resolve<T = unknown, U = unknown>(id: string): Promise<{
|
|
21
21
|
issuer: string;
|
|
22
|
-
|
|
22
|
+
issuerIdentityId: string;
|
|
23
23
|
tag: string;
|
|
24
24
|
immutableMetadata?: T;
|
|
25
25
|
metadata?: U;
|
|
@@ -35,12 +35,11 @@ export interface INftConnector extends IComponent {
|
|
|
35
35
|
* Transfer an NFT.
|
|
36
36
|
* @param controllerIdentity The controller of the NFT who can make changes.
|
|
37
37
|
* @param id The id of the NFT to transfer in urn format.
|
|
38
|
-
* @param recipientIdentity The recipient identity for the NFT.
|
|
39
38
|
* @param recipientAddress The recipient address for the NFT.
|
|
40
39
|
* @param metadata Optional mutable data to include during the transfer.
|
|
41
40
|
* @returns Nothing.
|
|
42
41
|
*/
|
|
43
|
-
transfer<U = unknown>(controllerIdentity: string, id: string,
|
|
42
|
+
transfer<U = unknown>(controllerIdentity: string, id: string, recipientAddress: string, metadata?: U): Promise<void>;
|
|
44
43
|
/**
|
|
45
44
|
* Update the mutable data of the NFT.
|
|
46
45
|
* @param controllerIdentity The controller of the NFT who can make changes.
|
|
@@ -11,9 +11,10 @@ export interface INftResolveResponse {
|
|
|
11
11
|
*/
|
|
12
12
|
issuer: string;
|
|
13
13
|
/**
|
|
14
|
-
* The
|
|
14
|
+
* The on-chain Object ID of the verified IOTA Identity that minted this NFT.
|
|
15
|
+
* Empty string when not minted with identity verification.
|
|
15
16
|
*/
|
|
16
|
-
|
|
17
|
+
issuerIdentityId: string;
|
|
17
18
|
/**
|
|
18
19
|
* The tag data for the NFT.
|
|
19
20
|
*/
|
package/docs/changelog.md
CHANGED
|
@@ -1,152 +1,166 @@
|
|
|
1
|
-
#
|
|
1
|
+
# Changelog
|
|
2
2
|
|
|
3
|
-
## [0.0.3-next.
|
|
3
|
+
## [0.0.3-next.5](https://github.com/iotaledger/twin-nft/compare/nft-models-v0.0.3-next.4...nft-models-v0.0.3-next.5) (2026-05-12)
|
|
4
4
|
|
|
5
5
|
|
|
6
6
|
### Features
|
|
7
7
|
|
|
8
|
-
* update
|
|
8
|
+
* typescript 6 update ([91b94b8](https://github.com/iotaledger/twin-nft/commit/91b94b846ea081b09b2228681776ce30f104a36e))
|
|
9
9
|
|
|
10
|
-
## [0.0.3-next.
|
|
10
|
+
## [0.0.3-next.4](https://github.com/iotaledger/twin-nft/compare/nft-models-v0.0.3-next.3...nft-models-v0.0.3-next.4) (2026-04-20)
|
|
11
|
+
|
|
12
|
+
|
|
13
|
+
### Features
|
|
14
|
+
|
|
15
|
+
* add on-chain identity binding to NFT minting ([#58](https://github.com/iotaledger/twin-nft/issues/58)) ([730a16d](https://github.com/iotaledger/twin-nft/commit/730a16d70fc026c920dbede0e4dafc96f37b729a))
|
|
16
|
+
|
|
17
|
+
## [0.0.3-next.3](https://github.com/iotaledger/twin-nft/compare/nft-models-v0.0.3-next.2...nft-models-v0.0.3-next.3) (2026-03-03)
|
|
18
|
+
|
|
19
|
+
|
|
20
|
+
### Features
|
|
21
|
+
|
|
22
|
+
* update docs ([75dc85e](https://github.com/iotaledger/twin-nft/commit/75dc85ed0476666d0a1cc5d83ca0a5db29b69992))
|
|
23
|
+
|
|
24
|
+
## [0.0.3-next.2](https://github.com/iotaledger/twin-nft/compare/nft-models-v0.0.3-next.1...nft-models-v0.0.3-next.2) (2026-02-25)
|
|
11
25
|
|
|
12
26
|
|
|
13
27
|
### Miscellaneous Chores
|
|
14
28
|
|
|
15
29
|
* **nft-models:** Synchronize repo versions
|
|
16
30
|
|
|
17
|
-
## [0.0.3-next.1](https://github.com/
|
|
31
|
+
## [0.0.3-next.1](https://github.com/iotaledger/twin-nft/compare/nft-models-v0.0.3-next.0...nft-models-v0.0.3-next.1) (2025-11-12)
|
|
18
32
|
|
|
19
33
|
|
|
20
34
|
### Features
|
|
21
35
|
|
|
22
|
-
* add context id features ([#50](https://github.com/
|
|
23
|
-
* add validate-locales ([0055a56](https://github.com/
|
|
24
|
-
* eslint migration to flat config ([0e6fc12](https://github.com/
|
|
25
|
-
* update dependencies ([8660f76](https://github.com/
|
|
26
|
-
* update framework core ([f3496b6](https://github.com/
|
|
27
|
-
* use shared store mechanism ([#16](https://github.com/
|
|
36
|
+
* add context id features ([#50](https://github.com/iotaledger/twin-nft/issues/50)) ([56c31c7](https://github.com/iotaledger/twin-nft/commit/56c31c7ba10e3ef8ad44f6463153f90888e64711))
|
|
37
|
+
* add validate-locales ([0055a56](https://github.com/iotaledger/twin-nft/commit/0055a56ed166946f1db860aa0725ad53248b3427))
|
|
38
|
+
* eslint migration to flat config ([0e6fc12](https://github.com/iotaledger/twin-nft/commit/0e6fc128c3c8f6cd34db793787437dd4af2c9994))
|
|
39
|
+
* update dependencies ([8660f76](https://github.com/iotaledger/twin-nft/commit/8660f76ca324b0f476e45544cac6bee4b3146c3b))
|
|
40
|
+
* update framework core ([f3496b6](https://github.com/iotaledger/twin-nft/commit/f3496b61bfebbb3479bb92df39ecfa9ac8d90b9b))
|
|
41
|
+
* use shared store mechanism ([#16](https://github.com/iotaledger/twin-nft/issues/16)) ([897bc78](https://github.com/iotaledger/twin-nft/commit/897bc7805248ba1388b2dd03df24c33f1633f344))
|
|
28
42
|
|
|
29
|
-
## [0.0.2-next.8](https://github.com/
|
|
43
|
+
## [0.0.2-next.8](https://github.com/iotaledger/twin-nft/compare/nft-models-v0.0.2-next.7...nft-models-v0.0.2-next.8) (2025-10-09)
|
|
30
44
|
|
|
31
45
|
|
|
32
46
|
### Features
|
|
33
47
|
|
|
34
|
-
* add validate-locales ([0055a56](https://github.com/
|
|
48
|
+
* add validate-locales ([0055a56](https://github.com/iotaledger/twin-nft/commit/0055a56ed166946f1db860aa0725ad53248b3427))
|
|
35
49
|
|
|
36
|
-
## [0.0.2-next.7](https://github.com/
|
|
50
|
+
## [0.0.2-next.7](https://github.com/iotaledger/twin-nft/compare/nft-models-v0.0.2-next.6...nft-models-v0.0.2-next.7) (2025-09-26)
|
|
37
51
|
|
|
38
52
|
|
|
39
53
|
### Miscellaneous Chores
|
|
40
54
|
|
|
41
55
|
* **nft-models:** Synchronize repo versions
|
|
42
56
|
|
|
43
|
-
## [0.0.2-next.6](https://github.com/
|
|
57
|
+
## [0.0.2-next.6](https://github.com/iotaledger/twin-nft/compare/nft-models-v0.0.2-next.5...nft-models-v0.0.2-next.6) (2025-09-25)
|
|
44
58
|
|
|
45
59
|
|
|
46
60
|
### Miscellaneous Chores
|
|
47
61
|
|
|
48
62
|
* **nft-models:** Synchronize repo versions
|
|
49
63
|
|
|
50
|
-
## [0.0.2-next.5](https://github.com/
|
|
64
|
+
## [0.0.2-next.5](https://github.com/iotaledger/twin-nft/compare/nft-models-v0.0.2-next.4...nft-models-v0.0.2-next.5) (2025-09-22)
|
|
51
65
|
|
|
52
66
|
|
|
53
67
|
### Miscellaneous Chores
|
|
54
68
|
|
|
55
69
|
* **nft-models:** Synchronize repo versions
|
|
56
70
|
|
|
57
|
-
## [0.0.2-next.4](https://github.com/
|
|
71
|
+
## [0.0.2-next.4](https://github.com/iotaledger/twin-nft/compare/nft-models-v0.0.2-next.3...nft-models-v0.0.2-next.4) (2025-09-10)
|
|
58
72
|
|
|
59
73
|
|
|
60
74
|
### Features
|
|
61
75
|
|
|
62
|
-
* eslint migration to flat config ([0e6fc12](https://github.com/
|
|
76
|
+
* eslint migration to flat config ([0e6fc12](https://github.com/iotaledger/twin-nft/commit/0e6fc128c3c8f6cd34db793787437dd4af2c9994))
|
|
63
77
|
|
|
64
|
-
## [0.0.2-next.3](https://github.com/
|
|
78
|
+
## [0.0.2-next.3](https://github.com/iotaledger/twin-nft/compare/nft-models-v0.0.2-next.2...nft-models-v0.0.2-next.3) (2025-08-20)
|
|
65
79
|
|
|
66
80
|
|
|
67
81
|
### Features
|
|
68
82
|
|
|
69
|
-
* update framework core ([f3496b6](https://github.com/
|
|
83
|
+
* update framework core ([f3496b6](https://github.com/iotaledger/twin-nft/commit/f3496b61bfebbb3479bb92df39ecfa9ac8d90b9b))
|
|
70
84
|
|
|
71
|
-
## [0.0.2-next.2](https://github.com/
|
|
85
|
+
## [0.0.2-next.2](https://github.com/iotaledger/twin-nft/compare/nft-models-v0.0.2-next.1...nft-models-v0.0.2-next.2) (2025-07-25)
|
|
72
86
|
|
|
73
87
|
|
|
74
88
|
### Miscellaneous Chores
|
|
75
89
|
|
|
76
90
|
* **nft-models:** Synchronize repo versions
|
|
77
91
|
|
|
78
|
-
## [0.0.2-next.1](https://github.com/
|
|
92
|
+
## [0.0.2-next.1](https://github.com/iotaledger/twin-nft/compare/nft-models-v0.0.2-next.0...nft-models-v0.0.2-next.1) (2025-07-16)
|
|
79
93
|
|
|
80
94
|
|
|
81
95
|
### Features
|
|
82
96
|
|
|
83
|
-
* update dependencies ([8660f76](https://github.com/
|
|
84
|
-
* use shared store mechanism ([#16](https://github.com/
|
|
97
|
+
* update dependencies ([8660f76](https://github.com/iotaledger/twin-nft/commit/8660f76ca324b0f476e45544cac6bee4b3146c3b))
|
|
98
|
+
* use shared store mechanism ([#16](https://github.com/iotaledger/twin-nft/issues/16)) ([897bc78](https://github.com/iotaledger/twin-nft/commit/897bc7805248ba1388b2dd03df24c33f1633f344))
|
|
85
99
|
|
|
86
100
|
## 0.0.1 (2025-07-09)
|
|
87
101
|
|
|
88
102
|
|
|
89
103
|
### Features
|
|
90
104
|
|
|
91
|
-
* release to production ([4d338b3](https://github.com/
|
|
105
|
+
* release to production ([4d338b3](https://github.com/iotaledger/twin-nft/commit/4d338b3e8a4dbccc61a1d1da3c470ba86cefe535))
|
|
92
106
|
|
|
93
|
-
## [0.0.1-next.32](https://github.com/
|
|
107
|
+
## [0.0.1-next.32](https://github.com/iotaledger/twin-nft/compare/nft-models-v0.0.1-next.31...nft-models-v0.0.1-next.32) (2025-06-24)
|
|
94
108
|
|
|
95
109
|
|
|
96
110
|
### Miscellaneous Chores
|
|
97
111
|
|
|
98
112
|
* **nft-models:** Synchronize repo versions
|
|
99
113
|
|
|
100
|
-
## [0.0.1-next.31](https://github.com/
|
|
114
|
+
## [0.0.1-next.31](https://github.com/iotaledger/twin-nft/compare/nft-models-v0.0.1-next.30...nft-models-v0.0.1-next.31) (2025-06-12)
|
|
101
115
|
|
|
102
116
|
|
|
103
117
|
### Features
|
|
104
118
|
|
|
105
|
-
* update dependencies ([8660f76](https://github.com/
|
|
119
|
+
* update dependencies ([8660f76](https://github.com/iotaledger/twin-nft/commit/8660f76ca324b0f476e45544cac6bee4b3146c3b))
|
|
106
120
|
|
|
107
|
-
## [0.0.1-next.30](https://github.com/
|
|
121
|
+
## [0.0.1-next.30](https://github.com/iotaledger/twin-nft/compare/nft-models-v0.0.1-next.29...nft-models-v0.0.1-next.30) (2025-05-22)
|
|
108
122
|
|
|
109
123
|
|
|
110
124
|
### Miscellaneous Chores
|
|
111
125
|
|
|
112
126
|
* **nft-models:** Synchronize repo versions
|
|
113
127
|
|
|
114
|
-
## [0.0.1-next.29](https://github.com/
|
|
128
|
+
## [0.0.1-next.29](https://github.com/iotaledger/twin-nft/compare/nft-models-v0.0.1-next.28...nft-models-v0.0.1-next.29) (2025-05-21)
|
|
115
129
|
|
|
116
130
|
|
|
117
131
|
### Miscellaneous Chores
|
|
118
132
|
|
|
119
133
|
* **nft-models:** Synchronize repo versions
|
|
120
134
|
|
|
121
|
-
## [0.0.1-next.28](https://github.com/
|
|
135
|
+
## [0.0.1-next.28](https://github.com/iotaledger/twin-nft/compare/nft-models-v0.0.1-next.27...nft-models-v0.0.1-next.28) (2025-05-06)
|
|
122
136
|
|
|
123
137
|
|
|
124
138
|
### Miscellaneous Chores
|
|
125
139
|
|
|
126
140
|
* **nft-models:** Synchronize repo versions
|
|
127
141
|
|
|
128
|
-
## [0.0.1-next.27](https://github.com/
|
|
142
|
+
## [0.0.1-next.27](https://github.com/iotaledger/twin-nft/compare/nft-models-v0.0.1-next.26...nft-models-v0.0.1-next.27) (2025-04-24)
|
|
129
143
|
|
|
130
144
|
|
|
131
145
|
### Miscellaneous Chores
|
|
132
146
|
|
|
133
147
|
* **nft-models:** Synchronize repo versions
|
|
134
148
|
|
|
135
|
-
## [0.0.1-next.26](https://github.com/
|
|
149
|
+
## [0.0.1-next.26](https://github.com/iotaledger/twin-nft/compare/nft-models-v0.0.1-next.25...nft-models-v0.0.1-next.26) (2025-04-17)
|
|
136
150
|
|
|
137
151
|
|
|
138
152
|
### Features
|
|
139
153
|
|
|
140
|
-
* use shared store mechanism ([#16](https://github.com/
|
|
154
|
+
* use shared store mechanism ([#16](https://github.com/iotaledger/twin-nft/issues/16)) ([897bc78](https://github.com/iotaledger/twin-nft/commit/897bc7805248ba1388b2dd03df24c33f1633f344))
|
|
141
155
|
|
|
142
|
-
## [0.0.1-next.25](https://github.com/
|
|
156
|
+
## [0.0.1-next.25](https://github.com/iotaledger/twin-nft/compare/nft-models-v0.0.1-next.24...nft-models-v0.0.1-next.25) (2025-04-17)
|
|
143
157
|
|
|
144
158
|
|
|
145
159
|
### Miscellaneous Chores
|
|
146
160
|
|
|
147
161
|
* **nft-models:** Synchronize repo versions
|
|
148
162
|
|
|
149
|
-
## [0.0.1-next.24](https://github.com/
|
|
163
|
+
## [0.0.1-next.24](https://github.com/iotaledger/twin-nft/compare/nft-models-v0.0.1-next.23...nft-models-v0.0.1-next.24) (2025-03-28)
|
|
150
164
|
|
|
151
165
|
|
|
152
166
|
### Miscellaneous Chores
|
package/docs/examples.md
CHANGED
|
@@ -1 +1,90 @@
|
|
|
1
|
-
#
|
|
1
|
+
# NFT Models Examples
|
|
2
|
+
|
|
3
|
+
These examples focus on connector contracts and shared request models so multiple implementations can follow the same API surface.
|
|
4
|
+
|
|
5
|
+
## NftConnectorFactory
|
|
6
|
+
|
|
7
|
+
```typescript
|
|
8
|
+
import { NftConnectorFactory, type INftConnector } from '@twin.org/nft-models';
|
|
9
|
+
|
|
10
|
+
class MockNftConnector implements INftConnector {
|
|
11
|
+
public className(): string {
|
|
12
|
+
return 'MockNftConnector';
|
|
13
|
+
}
|
|
14
|
+
|
|
15
|
+
public async mint(controllerIdentity: string, tag: string): Promise<string> {
|
|
16
|
+
return `nft:entity-storage:${controllerIdentity}:${tag}`;
|
|
17
|
+
}
|
|
18
|
+
|
|
19
|
+
public async resolve(id: string): Promise<{ issuer: string; owner: string; tag: string }> {
|
|
20
|
+
return {
|
|
21
|
+
issuer: 'did:example:issuer-1',
|
|
22
|
+
owner: 'did:example:owner-1',
|
|
23
|
+
tag: id
|
|
24
|
+
};
|
|
25
|
+
}
|
|
26
|
+
|
|
27
|
+
public async burn(): Promise<void> {}
|
|
28
|
+
|
|
29
|
+
public async transfer(): Promise<void> {}
|
|
30
|
+
|
|
31
|
+
public async update(): Promise<void> {}
|
|
32
|
+
}
|
|
33
|
+
|
|
34
|
+
NftConnectorFactory.register('mock-nft', () => new MockNftConnector());
|
|
35
|
+
|
|
36
|
+
const connectorNames = NftConnectorFactory.names();
|
|
37
|
+
const connector = NftConnectorFactory.get<INftConnector>('mock-nft');
|
|
38
|
+
|
|
39
|
+
console.log(connectorNames.includes('mock-nft')); // true
|
|
40
|
+
console.log(connector.className()); // MockNftConnector
|
|
41
|
+
```
|
|
42
|
+
|
|
43
|
+
## INftComponent Request Shapes
|
|
44
|
+
|
|
45
|
+
```typescript
|
|
46
|
+
import type {
|
|
47
|
+
IIrc27Metadata,
|
|
48
|
+
INftMintRequest,
|
|
49
|
+
INftTransferRequest,
|
|
50
|
+
INftUpdateRequest
|
|
51
|
+
} from '@twin.org/nft-models';
|
|
52
|
+
|
|
53
|
+
const immutableMetadata: IIrc27Metadata = {
|
|
54
|
+
standard: 'IRC27',
|
|
55
|
+
version: 'v1.0',
|
|
56
|
+
type: 'image/png',
|
|
57
|
+
uri: 'ipfs://bafybeigdyr...',
|
|
58
|
+
name: 'Genesis Badge',
|
|
59
|
+
description: 'A launch collectible'
|
|
60
|
+
};
|
|
61
|
+
|
|
62
|
+
const mintRequest: INftMintRequest = {
|
|
63
|
+
tag: 'genesis-badge',
|
|
64
|
+
immutableMetadata,
|
|
65
|
+
metadata: {
|
|
66
|
+
season: 1,
|
|
67
|
+
rarity: 'legendary'
|
|
68
|
+
},
|
|
69
|
+
namespace: 'iota'
|
|
70
|
+
};
|
|
71
|
+
|
|
72
|
+
const transferRequest: INftTransferRequest = {
|
|
73
|
+
recipientIdentity: 'did:example:collector-8',
|
|
74
|
+
recipientAddress: '0x5df99c44d4f6f66d5a7f7298f46a0fdb6a4ac23a',
|
|
75
|
+
metadata: {
|
|
76
|
+
transferredAt: '2026-03-10T10:00:00.000Z'
|
|
77
|
+
}
|
|
78
|
+
};
|
|
79
|
+
|
|
80
|
+
const updateRequest: INftUpdateRequest = {
|
|
81
|
+
metadata: {
|
|
82
|
+
rarity: 'mythic',
|
|
83
|
+
season: 2
|
|
84
|
+
}
|
|
85
|
+
};
|
|
86
|
+
|
|
87
|
+
console.log(mintRequest.namespace); // iota
|
|
88
|
+
console.log(transferRequest.recipientIdentity); // did:example:collector-8
|
|
89
|
+
console.log(updateRequest.metadata.season); // 2
|
|
90
|
+
```
|
|
@@ -5,7 +5,7 @@ https://docs.iota.org/developer/references/framework/stardust/irc27
|
|
|
5
5
|
|
|
6
6
|
## Properties
|
|
7
7
|
|
|
8
|
-
### standard
|
|
8
|
+
### standard {#standard}
|
|
9
9
|
|
|
10
10
|
> **standard**: `"IRC27"`
|
|
11
11
|
|
|
@@ -13,7 +13,7 @@ The standard marker.
|
|
|
13
13
|
|
|
14
14
|
***
|
|
15
15
|
|
|
16
|
-
### version
|
|
16
|
+
### version {#version}
|
|
17
17
|
|
|
18
18
|
> **version**: `"v1.0"`
|
|
19
19
|
|
|
@@ -21,7 +21,7 @@ The version
|
|
|
21
21
|
|
|
22
22
|
***
|
|
23
23
|
|
|
24
|
-
### type
|
|
24
|
+
### type {#type}
|
|
25
25
|
|
|
26
26
|
> **type**: `string`
|
|
27
27
|
|
|
@@ -29,7 +29,7 @@ A mime type for the content of the NFT.
|
|
|
29
29
|
|
|
30
30
|
***
|
|
31
31
|
|
|
32
|
-
### uri
|
|
32
|
+
### uri {#uri}
|
|
33
33
|
|
|
34
34
|
> **uri**: `string`
|
|
35
35
|
|
|
@@ -37,7 +37,7 @@ Url pointing to the NFT file location with MIME type defined in type.
|
|
|
37
37
|
|
|
38
38
|
***
|
|
39
39
|
|
|
40
|
-
### name
|
|
40
|
+
### name {#name}
|
|
41
41
|
|
|
42
42
|
> **name**: `string`
|
|
43
43
|
|
|
@@ -45,17 +45,17 @@ Alphanumeric text string defining the human identifiable name for the NFT
|
|
|
45
45
|
|
|
46
46
|
***
|
|
47
47
|
|
|
48
|
-
### collectionName?
|
|
48
|
+
### collectionName? {#collectionname}
|
|
49
49
|
|
|
50
|
-
> `optional` **collectionName
|
|
50
|
+
> `optional` **collectionName?**: `string`
|
|
51
51
|
|
|
52
52
|
Alphanumeric text string defining the human identifiable collection name.
|
|
53
53
|
|
|
54
54
|
***
|
|
55
55
|
|
|
56
|
-
### royalties?
|
|
56
|
+
### royalties? {#royalties}
|
|
57
57
|
|
|
58
|
-
> `optional` **royalties
|
|
58
|
+
> `optional` **royalties?**: `object`
|
|
59
59
|
|
|
60
60
|
Object containing key value pair where payment address mapped to the payout percentage.
|
|
61
61
|
|
|
@@ -65,25 +65,25 @@ Object containing key value pair where payment address mapped to the payout perc
|
|
|
65
65
|
|
|
66
66
|
***
|
|
67
67
|
|
|
68
|
-
### issuerName?
|
|
68
|
+
### issuerName? {#issuername}
|
|
69
69
|
|
|
70
|
-
> `optional` **issuerName
|
|
70
|
+
> `optional` **issuerName?**: `string`
|
|
71
71
|
|
|
72
72
|
Alphanumeric text string to define the human identifiable name of the creator.
|
|
73
73
|
|
|
74
74
|
***
|
|
75
75
|
|
|
76
|
-
### description?
|
|
76
|
+
### description? {#description}
|
|
77
77
|
|
|
78
|
-
> `optional` **description
|
|
78
|
+
> `optional` **description?**: `string`
|
|
79
79
|
|
|
80
80
|
Alphanumeric text string to define a basic description of the NFT.
|
|
81
81
|
|
|
82
82
|
***
|
|
83
83
|
|
|
84
|
-
### attributes?
|
|
84
|
+
### attributes? {#attributes}
|
|
85
85
|
|
|
86
|
-
> `optional` **attributes
|
|
86
|
+
> `optional` **attributes?**: `object`[]
|
|
87
87
|
|
|
88
88
|
Array objects defining additional attributes of the NFT
|
|
89
89
|
|
|
@@ -8,7 +8,7 @@ Interface describing an NFT component.
|
|
|
8
8
|
|
|
9
9
|
## Methods
|
|
10
10
|
|
|
11
|
-
### mint()
|
|
11
|
+
### mint() {#mint}
|
|
12
12
|
|
|
13
13
|
> **mint**\<`T`, `U`\>(`tag`, `immutableMetadata?`, `metadata?`, `namespace?`, `identity?`): `Promise`\<`string`\>
|
|
14
14
|
|
|
@@ -64,9 +64,9 @@ The id of the created NFT in urn format.
|
|
|
64
64
|
|
|
65
65
|
***
|
|
66
66
|
|
|
67
|
-
### resolve()
|
|
67
|
+
### resolve() {#resolve}
|
|
68
68
|
|
|
69
|
-
> **resolve**\<`T`, `U`\>(`id`, `controllerIdentity?`): `Promise`\<\{ `issuer`: `string`; `
|
|
69
|
+
> **resolve**\<`T`, `U`\>(`id`, `controllerIdentity?`): `Promise`\<\{ `issuer`: `string`; `issuerIdentityId`: `string`; `tag`: `string`; `immutableMetadata?`: `T`; `metadata?`: `U`; \}\>
|
|
70
70
|
|
|
71
71
|
Resolve an NFT.
|
|
72
72
|
|
|
@@ -96,13 +96,13 @@ The identity to perform the nft operation with.
|
|
|
96
96
|
|
|
97
97
|
#### Returns
|
|
98
98
|
|
|
99
|
-
`Promise`\<\{ `issuer`: `string`; `
|
|
99
|
+
`Promise`\<\{ `issuer`: `string`; `issuerIdentityId`: `string`; `tag`: `string`; `immutableMetadata?`: `T`; `metadata?`: `U`; \}\>
|
|
100
100
|
|
|
101
101
|
The data for the NFT.
|
|
102
102
|
|
|
103
103
|
***
|
|
104
104
|
|
|
105
|
-
### burn()
|
|
105
|
+
### burn() {#burn}
|
|
106
106
|
|
|
107
107
|
> **burn**(`id`, `controllerIdentity?`): `Promise`\<`void`\>
|
|
108
108
|
|
|
@@ -130,9 +130,9 @@ Nothing.
|
|
|
130
130
|
|
|
131
131
|
***
|
|
132
132
|
|
|
133
|
-
### transfer()
|
|
133
|
+
### transfer() {#transfer}
|
|
134
134
|
|
|
135
|
-
> **transfer**\<`U`\>(`id`, `
|
|
135
|
+
> **transfer**\<`U`\>(`id`, `recipientAddress`, `metadata?`, `controllerIdentity?`): `Promise`\<`void`\>
|
|
136
136
|
|
|
137
137
|
Transfer an NFT.
|
|
138
138
|
|
|
@@ -150,12 +150,6 @@ Transfer an NFT.
|
|
|
150
150
|
|
|
151
151
|
The id of the NFT to transfer in urn format.
|
|
152
152
|
|
|
153
|
-
##### recipientIdentity
|
|
154
|
-
|
|
155
|
-
`string`
|
|
156
|
-
|
|
157
|
-
The recipient identity for the NFT.
|
|
158
|
-
|
|
159
153
|
##### recipientAddress
|
|
160
154
|
|
|
161
155
|
`string`
|
|
@@ -182,7 +176,7 @@ Nothing.
|
|
|
182
176
|
|
|
183
177
|
***
|
|
184
178
|
|
|
185
|
-
### update()
|
|
179
|
+
### update() {#update}
|
|
186
180
|
|
|
187
181
|
> **update**\<`U`\>(`id`, `metadata`, `controllerIdentity?`): `Promise`\<`void`\>
|
|
188
182
|
|
|
@@ -8,7 +8,7 @@ Interface describing an NFT connector.
|
|
|
8
8
|
|
|
9
9
|
## Methods
|
|
10
10
|
|
|
11
|
-
### mint()
|
|
11
|
+
### mint() {#mint}
|
|
12
12
|
|
|
13
13
|
> **mint**\<`T`, `U`\>(`controllerIdentity`, `tag`, `immutableMetadata?`, `metadata?`): `Promise`\<`string`\>
|
|
14
14
|
|
|
@@ -58,9 +58,9 @@ The id of the created NFT in urn format.
|
|
|
58
58
|
|
|
59
59
|
***
|
|
60
60
|
|
|
61
|
-
### resolve()
|
|
61
|
+
### resolve() {#resolve}
|
|
62
62
|
|
|
63
|
-
> **resolve**\<`T`, `U`\>(`id`): `Promise`\<\{ `issuer`: `string`; `
|
|
63
|
+
> **resolve**\<`T`, `U`\>(`id`): `Promise`\<\{ `issuer`: `string`; `issuerIdentityId`: `string`; `tag`: `string`; `immutableMetadata?`: `T`; `metadata?`: `U`; \}\>
|
|
64
64
|
|
|
65
65
|
Resolve an NFT.
|
|
66
66
|
|
|
@@ -84,13 +84,13 @@ The id of the NFT to resolve.
|
|
|
84
84
|
|
|
85
85
|
#### Returns
|
|
86
86
|
|
|
87
|
-
`Promise`\<\{ `issuer`: `string`; `
|
|
87
|
+
`Promise`\<\{ `issuer`: `string`; `issuerIdentityId`: `string`; `tag`: `string`; `immutableMetadata?`: `T`; `metadata?`: `U`; \}\>
|
|
88
88
|
|
|
89
89
|
The data for the NFT.
|
|
90
90
|
|
|
91
91
|
***
|
|
92
92
|
|
|
93
|
-
### burn()
|
|
93
|
+
### burn() {#burn}
|
|
94
94
|
|
|
95
95
|
> **burn**(`controller`, `id`): `Promise`\<`void`\>
|
|
96
96
|
|
|
@@ -118,9 +118,9 @@ Nothing.
|
|
|
118
118
|
|
|
119
119
|
***
|
|
120
120
|
|
|
121
|
-
### transfer()
|
|
121
|
+
### transfer() {#transfer}
|
|
122
122
|
|
|
123
|
-
> **transfer**\<`U`\>(`controllerIdentity`, `id`, `
|
|
123
|
+
> **transfer**\<`U`\>(`controllerIdentity`, `id`, `recipientAddress`, `metadata?`): `Promise`\<`void`\>
|
|
124
124
|
|
|
125
125
|
Transfer an NFT.
|
|
126
126
|
|
|
@@ -144,12 +144,6 @@ The controller of the NFT who can make changes.
|
|
|
144
144
|
|
|
145
145
|
The id of the NFT to transfer in urn format.
|
|
146
146
|
|
|
147
|
-
##### recipientIdentity
|
|
148
|
-
|
|
149
|
-
`string`
|
|
150
|
-
|
|
151
|
-
The recipient identity for the NFT.
|
|
152
|
-
|
|
153
147
|
##### recipientAddress
|
|
154
148
|
|
|
155
149
|
`string`
|
|
@@ -170,7 +164,7 @@ Nothing.
|
|
|
170
164
|
|
|
171
165
|
***
|
|
172
166
|
|
|
173
|
-
### update()
|
|
167
|
+
### update() {#update}
|
|
174
168
|
|
|
175
169
|
> **update**\<`U`\>(`controllerIdentity`, `id`, `metadata`): `Promise`\<`void`\>
|
|
176
170
|
|
|
@@ -4,7 +4,7 @@ Mint the data and return the NFT id.
|
|
|
4
4
|
|
|
5
5
|
## Properties
|
|
6
6
|
|
|
7
|
-
### body
|
|
7
|
+
### body {#body}
|
|
8
8
|
|
|
9
9
|
> **body**: `object`
|
|
10
10
|
|
|
@@ -18,18 +18,18 @@ The tag for the NFT.
|
|
|
18
18
|
|
|
19
19
|
#### immutableMetadata?
|
|
20
20
|
|
|
21
|
-
> `optional` **immutableMetadata
|
|
21
|
+
> `optional` **immutableMetadata?**: `unknown`
|
|
22
22
|
|
|
23
23
|
The immutable metadata for the NFT.
|
|
24
24
|
|
|
25
25
|
#### metadata?
|
|
26
26
|
|
|
27
|
-
> `optional` **metadata
|
|
27
|
+
> `optional` **metadata?**: `unknown`
|
|
28
28
|
|
|
29
29
|
The metadata for the NFT.
|
|
30
30
|
|
|
31
31
|
#### namespace?
|
|
32
32
|
|
|
33
|
-
> `optional` **namespace
|
|
33
|
+
> `optional` **namespace?**: `string`
|
|
34
34
|
|
|
35
35
|
The namespace of the connector to use for the NFT, defaults to component configured namespace.
|
|
@@ -4,7 +4,7 @@ Response to resolving the NFT.
|
|
|
4
4
|
|
|
5
5
|
## Properties
|
|
6
6
|
|
|
7
|
-
### body
|
|
7
|
+
### body {#body}
|
|
8
8
|
|
|
9
9
|
> **body**: `object`
|
|
10
10
|
|
|
@@ -16,11 +16,12 @@ The data that was resolved.
|
|
|
16
16
|
|
|
17
17
|
The issuer of the NFT.
|
|
18
18
|
|
|
19
|
-
####
|
|
19
|
+
#### issuerIdentityId
|
|
20
20
|
|
|
21
|
-
> **
|
|
21
|
+
> **issuerIdentityId**: `string`
|
|
22
22
|
|
|
23
|
-
The
|
|
23
|
+
The on-chain Object ID of the verified IOTA Identity that minted this NFT.
|
|
24
|
+
Empty string when not minted with identity verification.
|
|
24
25
|
|
|
25
26
|
#### tag
|
|
26
27
|
|
|
@@ -30,12 +31,12 @@ The tag data for the NFT.
|
|
|
30
31
|
|
|
31
32
|
#### immutableMetadata?
|
|
32
33
|
|
|
33
|
-
> `optional` **immutableMetadata
|
|
34
|
+
> `optional` **immutableMetadata?**: `unknown`
|
|
34
35
|
|
|
35
36
|
The immutable data for the NFT.
|
|
36
37
|
|
|
37
38
|
#### metadata?
|
|
38
39
|
|
|
39
|
-
> `optional` **metadata
|
|
40
|
+
> `optional` **metadata?**: `unknown`
|
|
40
41
|
|
|
41
42
|
The metadata for the NFT.
|
|
@@ -4,7 +4,7 @@ Transfer the NFT and update the metadata.
|
|
|
4
4
|
|
|
5
5
|
## Properties
|
|
6
6
|
|
|
7
|
-
### pathParams
|
|
7
|
+
### pathParams {#pathparams}
|
|
8
8
|
|
|
9
9
|
> **pathParams**: `object`
|
|
10
10
|
|
|
@@ -18,18 +18,12 @@ The id of the NFT to transfer in urn format.
|
|
|
18
18
|
|
|
19
19
|
***
|
|
20
20
|
|
|
21
|
-
### body
|
|
21
|
+
### body {#body}
|
|
22
22
|
|
|
23
23
|
> **body**: `object`
|
|
24
24
|
|
|
25
25
|
The data to be used in the transfer.
|
|
26
26
|
|
|
27
|
-
#### recipientIdentity
|
|
28
|
-
|
|
29
|
-
> **recipientIdentity**: `string`
|
|
30
|
-
|
|
31
|
-
The recipient identity for the NFT.
|
|
32
|
-
|
|
33
27
|
#### recipientAddress
|
|
34
28
|
|
|
35
29
|
> **recipientAddress**: `string`
|
|
@@ -38,6 +32,6 @@ The recipient address for the NFT.
|
|
|
38
32
|
|
|
39
33
|
#### metadata?
|
|
40
34
|
|
|
41
|
-
> `optional` **metadata
|
|
35
|
+
> `optional` **metadata?**: `unknown`
|
|
42
36
|
|
|
43
37
|
The metadata for the NFT.
|
|
@@ -4,7 +4,7 @@ Update the mutable data for the NFT.
|
|
|
4
4
|
|
|
5
5
|
## Properties
|
|
6
6
|
|
|
7
|
-
### pathParams
|
|
7
|
+
### pathParams {#pathparams}
|
|
8
8
|
|
|
9
9
|
> **pathParams**: `object`
|
|
10
10
|
|
|
@@ -18,7 +18,7 @@ The id of the NFT to transfer in urn format.
|
|
|
18
18
|
|
|
19
19
|
***
|
|
20
20
|
|
|
21
|
-
### body
|
|
21
|
+
### body {#body}
|
|
22
22
|
|
|
23
23
|
> **body**: `object`
|
|
24
24
|
|
|
@@ -26,6 +26,6 @@ The data to be used in the update.
|
|
|
26
26
|
|
|
27
27
|
#### metadata?
|
|
28
28
|
|
|
29
|
-
> `optional` **metadata
|
|
29
|
+
> `optional` **metadata?**: `unknown`
|
|
30
30
|
|
|
31
31
|
The metadata for the NFT.
|
package/package.json
CHANGED
|
@@ -1,10 +1,10 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@twin.org/nft-models",
|
|
3
|
-
"version": "0.0.3-next.
|
|
4
|
-
"description": "
|
|
3
|
+
"version": "0.0.3-next.5",
|
|
4
|
+
"description": "Shared NFT interfaces, request and response models, and connector contracts.",
|
|
5
5
|
"repository": {
|
|
6
6
|
"type": "git",
|
|
7
|
-
"url": "git+https://github.com/
|
|
7
|
+
"url": "git+https://github.com/iotaledger/nft.git",
|
|
8
8
|
"directory": "packages/nft-models"
|
|
9
9
|
},
|
|
10
10
|
"author": "martyn.janes@iota.org",
|
|
@@ -48,7 +48,7 @@
|
|
|
48
48
|
"schemas"
|
|
49
49
|
],
|
|
50
50
|
"bugs": {
|
|
51
|
-
"url": "git+https://github.com/
|
|
51
|
+
"url": "git+https://github.com/iotaledger/nft/issues"
|
|
52
52
|
},
|
|
53
53
|
"homepage": "https://twindev.org"
|
|
54
54
|
}
|