@twin.org/nft-models 0.0.2-next.8 → 0.0.3-next.2
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/{esm/index.mjs → es/factories/nftConnectorFactory.js} +3 -5
- package/dist/es/factories/nftConnectorFactory.js.map +1 -0
- package/dist/es/index.js +13 -0
- package/dist/es/index.js.map +1 -0
- package/dist/es/models/IIrc27Metadata.js +4 -0
- package/dist/es/models/IIrc27Metadata.js.map +1 -0
- package/dist/es/models/INftComponent.js +2 -0
- package/dist/es/models/INftComponent.js.map +1 -0
- package/dist/es/models/INftConnector.js +2 -0
- package/dist/es/models/INftConnector.js.map +1 -0
- package/dist/es/models/api/INftBurnRequest.js +4 -0
- package/dist/es/models/api/INftBurnRequest.js.map +1 -0
- package/dist/es/models/api/INftMintRequest.js +4 -0
- package/dist/es/models/api/INftMintRequest.js.map +1 -0
- package/dist/es/models/api/INftResolveRequest.js +4 -0
- package/dist/es/models/api/INftResolveRequest.js.map +1 -0
- package/dist/es/models/api/INftResolveResponse.js +4 -0
- package/dist/es/models/api/INftResolveResponse.js.map +1 -0
- package/dist/es/models/api/INftTransferRequest.js +4 -0
- package/dist/es/models/api/INftTransferRequest.js.map +1 -0
- package/dist/es/models/api/INftUpdateRequest.js +4 -0
- package/dist/es/models/api/INftUpdateRequest.js.map +1 -0
- package/dist/types/factories/nftConnectorFactory.d.ts +1 -1
- package/dist/types/index.d.ts +10 -10
- package/dist/types/models/INftComponent.d.ts +5 -5
- package/docs/changelog.md +19 -0
- package/docs/reference/interfaces/INftComponent.md +5 -13
- package/docs/reference/interfaces/INftConnector.md +0 -8
- package/package.json +5 -7
- package/dist/cjs/index.cjs +0 -13
|
@@ -1,11 +1,9 @@
|
|
|
1
|
-
import { Factory } from '@twin.org/core';
|
|
2
|
-
|
|
3
1
|
// Copyright 2024 IOTA Stiftung.
|
|
4
2
|
// SPDX-License-Identifier: Apache-2.0.
|
|
3
|
+
import { Factory } from "@twin.org/core";
|
|
5
4
|
/**
|
|
6
5
|
* Factory for creating NFT connectors.
|
|
7
6
|
*/
|
|
8
7
|
// eslint-disable-next-line @typescript-eslint/naming-convention
|
|
9
|
-
const NftConnectorFactory = Factory.createFactory("nft-connector");
|
|
10
|
-
|
|
11
|
-
export { NftConnectorFactory };
|
|
8
|
+
export const NftConnectorFactory = Factory.createFactory("nft-connector");
|
|
9
|
+
//# sourceMappingURL=nftConnectorFactory.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"nftConnectorFactory.js","sourceRoot":"","sources":["../../../src/factories/nftConnectorFactory.ts"],"names":[],"mappings":"AAAA,gCAAgC;AAChC,uCAAuC;AACvC,OAAO,EAAE,OAAO,EAAE,MAAM,gBAAgB,CAAC;AAGzC;;GAEG;AACH,gEAAgE;AAChE,MAAM,CAAC,MAAM,mBAAmB,GAAG,OAAO,CAAC,aAAa,CAAgB,eAAe,CAAC,CAAC","sourcesContent":["// Copyright 2024 IOTA Stiftung.\n// SPDX-License-Identifier: Apache-2.0.\nimport { Factory } from \"@twin.org/core\";\nimport type { INftConnector } from \"../models/INftConnector.js\";\n\n/**\n * Factory for creating NFT connectors.\n */\n// eslint-disable-next-line @typescript-eslint/naming-convention\nexport const NftConnectorFactory = Factory.createFactory<INftConnector>(\"nft-connector\");\n"]}
|
package/dist/es/index.js
ADDED
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
// Copyright 2024 IOTA Stiftung.
|
|
2
|
+
// SPDX-License-Identifier: Apache-2.0.
|
|
3
|
+
export * from "./factories/nftConnectorFactory.js";
|
|
4
|
+
export * from "./models/IIrc27Metadata.js";
|
|
5
|
+
export * from "./models/INftComponent.js";
|
|
6
|
+
export * from "./models/INftConnector.js";
|
|
7
|
+
export * from "./models/api/INftBurnRequest.js";
|
|
8
|
+
export * from "./models/api/INftMintRequest.js";
|
|
9
|
+
export * from "./models/api/INftResolveRequest.js";
|
|
10
|
+
export * from "./models/api/INftResolveResponse.js";
|
|
11
|
+
export * from "./models/api/INftTransferRequest.js";
|
|
12
|
+
export * from "./models/api/INftUpdateRequest.js";
|
|
13
|
+
//# sourceMappingURL=index.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/index.ts"],"names":[],"mappings":"AAAA,gCAAgC;AAChC,uCAAuC;AACvC,cAAc,oCAAoC,CAAC;AACnD,cAAc,4BAA4B,CAAC;AAC3C,cAAc,2BAA2B,CAAC;AAC1C,cAAc,2BAA2B,CAAC;AAC1C,cAAc,iCAAiC,CAAC;AAChD,cAAc,iCAAiC,CAAC;AAChD,cAAc,oCAAoC,CAAC;AACnD,cAAc,qCAAqC,CAAC;AACpD,cAAc,qCAAqC,CAAC;AACpD,cAAc,mCAAmC,CAAC","sourcesContent":["// Copyright 2024 IOTA Stiftung.\n// SPDX-License-Identifier: Apache-2.0.\nexport * from \"./factories/nftConnectorFactory.js\";\nexport * from \"./models/IIrc27Metadata.js\";\nexport * from \"./models/INftComponent.js\";\nexport * from \"./models/INftConnector.js\";\nexport * from \"./models/api/INftBurnRequest.js\";\nexport * from \"./models/api/INftMintRequest.js\";\nexport * from \"./models/api/INftResolveRequest.js\";\nexport * from \"./models/api/INftResolveResponse.js\";\nexport * from \"./models/api/INftTransferRequest.js\";\nexport * from \"./models/api/INftUpdateRequest.js\";\n"]}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"IIrc27Metadata.js","sourceRoot":"","sources":["../../../src/models/IIrc27Metadata.ts"],"names":[],"mappings":"AAAA,gCAAgC;AAChC,uCAAuC","sourcesContent":["// Copyright 2024 IOTA Stiftung.\n// SPDX-License-Identifier: Apache-2.0.\n\n/**\n * Model defining the IRC27 NFT Standards.\n * https://github.com/iotaledger/tips/blob/main/tips/TIP-0027/tip-0027.md\n */\nexport interface IIrc27Metadata {\n\t/**\n\t * The standard marker.\n\t */\n\tstandard: \"IRC27\";\n\n\t/**\n\t * The version\n\t */\n\tversion: \"v1.0\";\n\n\t/**\n\t * A mime type for the content of the NFT.\n\t */\n\ttype: string;\n\n\t/**\n\t * Url pointing to the NFT file location with MIME type defined in type.\n\t */\n\turi: string;\n\n\t/**\n\t * Alphanumeric text string defining the human identifiable name for the NFT\n\t */\n\tname: string;\n\n\t/**\n\t * Alphanumeric text string defining the human identifiable collection name.\n\t */\n\tcollectionName?: string;\n\n\t/**\n\t * Object containing key value pair where payment address mapped to the payout percentage.\n\t */\n\troyalties?: {\n\t\t[id: string]: number;\n\t};\n\n\t/**\n\t * Alphanumeric text string to define the human identifiable name of the creator.\n\t */\n\tissuerName?: string;\n\n\t/**\n\t * Alphanumeric text string to define a basic description of the NFT.\n\t */\n\tdescription?: string;\n\n\t/**\n\t * Array objects defining additional attributes of the NFT\n\t */\n\tattributes?: {\n\t\ttrait_type: string;\n\t\tvalue: unknown;\n\t}[];\n}\n"]}
|
|
@@ -0,0 +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\towner: 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 recipientIdentity The recipient identity for the NFT.\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\trecipientIdentity: 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"]}
|
|
@@ -0,0 +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\towner: 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 recipientIdentity The recipient identity for the NFT.\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\trecipientIdentity: 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"]}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"INftBurnRequest.js","sourceRoot":"","sources":["../../../../src/models/api/INftBurnRequest.ts"],"names":[],"mappings":"AAAA,gCAAgC;AAChC,uCAAuC","sourcesContent":["// Copyright 2024 IOTA Stiftung.\n// SPDX-License-Identifier: Apache-2.0.\n\n/**\n * Burn the NFT.\n */\nexport interface INftBurnRequest {\n\t/**\n\t * The data to be used for resolving.\n\t */\n\tpathParams: {\n\t\t/**\n\t\t * The id of the NFT to burn.\n\t\t */\n\t\tid: string;\n\t};\n}\n"]}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"INftMintRequest.js","sourceRoot":"","sources":["../../../../src/models/api/INftMintRequest.ts"],"names":[],"mappings":"AAAA,gCAAgC;AAChC,uCAAuC","sourcesContent":["// Copyright 2024 IOTA Stiftung.\n// SPDX-License-Identifier: Apache-2.0.\n\n/**\n * Mint the data and return the NFT id.\n */\nexport interface INftMintRequest {\n\t/**\n\t * The data to be used in the minting.\n\t */\n\tbody: {\n\t\t/**\n\t\t * The tag for the NFT.\n\t\t */\n\t\ttag: string;\n\n\t\t/**\n\t\t * The immutable metadata 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\n\t\t/**\n\t\t * The namespace of the connector to use for the NFT, defaults to component configured namespace.\n\t\t */\n\t\tnamespace?: string;\n\t};\n}\n"]}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"INftResolveRequest.js","sourceRoot":"","sources":["../../../../src/models/api/INftResolveRequest.ts"],"names":[],"mappings":"AAAA,gCAAgC;AAChC,uCAAuC","sourcesContent":["// Copyright 2024 IOTA Stiftung.\n// SPDX-License-Identifier: Apache-2.0.\n\n/**\n * Resolve the NFT.\n */\nexport interface INftResolveRequest {\n\t/**\n\t * The data to be used for resolving.\n\t */\n\tpathParams: {\n\t\t/**\n\t\t * The id of the NFT to resolve.\n\t\t */\n\t\tid: string;\n\t};\n}\n"]}
|
|
@@ -0,0 +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 owner of the NFT.\n\t\t */\n\t\towner: 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"]}
|
|
@@ -0,0 +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 identity for the NFT.\n\t\t */\n\t\trecipientIdentity: string;\n\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"]}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"INftUpdateRequest.js","sourceRoot":"","sources":["../../../../src/models/api/INftUpdateRequest.ts"],"names":[],"mappings":"AAAA,gCAAgC;AAChC,uCAAuC","sourcesContent":["// Copyright 2024 IOTA Stiftung.\n// SPDX-License-Identifier: Apache-2.0.\n\n/**\n * Update the mutable data for the NFT.\n */\nexport interface INftUpdateRequest {\n\t/**\n\t * The data to be used in the update.\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 update.\n\t */\n\tbody: {\n\t\t/**\n\t\t * The metadata for the NFT.\n\t\t */\n\t\tmetadata?: unknown;\n\t};\n}\n"]}
|
package/dist/types/index.d.ts
CHANGED
|
@@ -1,10 +1,10 @@
|
|
|
1
|
-
export * from "./factories/nftConnectorFactory";
|
|
2
|
-
export * from "./models/IIrc27Metadata";
|
|
3
|
-
export * from "./models/INftComponent";
|
|
4
|
-
export * from "./models/INftConnector";
|
|
5
|
-
export * from "./models/api/INftBurnRequest";
|
|
6
|
-
export * from "./models/api/INftMintRequest";
|
|
7
|
-
export * from "./models/api/INftResolveRequest";
|
|
8
|
-
export * from "./models/api/INftResolveResponse";
|
|
9
|
-
export * from "./models/api/INftTransferRequest";
|
|
10
|
-
export * from "./models/api/INftUpdateRequest";
|
|
1
|
+
export * from "./factories/nftConnectorFactory.js";
|
|
2
|
+
export * from "./models/IIrc27Metadata.js";
|
|
3
|
+
export * from "./models/INftComponent.js";
|
|
4
|
+
export * from "./models/INftConnector.js";
|
|
5
|
+
export * from "./models/api/INftBurnRequest.js";
|
|
6
|
+
export * from "./models/api/INftMintRequest.js";
|
|
7
|
+
export * from "./models/api/INftResolveRequest.js";
|
|
8
|
+
export * from "./models/api/INftResolveResponse.js";
|
|
9
|
+
export * from "./models/api/INftTransferRequest.js";
|
|
10
|
+
export * from "./models/api/INftUpdateRequest.js";
|
|
@@ -9,14 +9,14 @@ export interface INftComponent extends IComponent {
|
|
|
9
9
|
* @param immutableMetadata The immutable metadata for the NFT.
|
|
10
10
|
* @param metadata The metadata for the NFT.
|
|
11
11
|
* @param namespace The namespace of the connector to use for the NFT, defaults to component configured namespace.
|
|
12
|
-
* @param identity The identity to perform the nft operation
|
|
12
|
+
* @param identity The identity to perform the nft operation with.
|
|
13
13
|
* @returns The id of the created NFT in urn format.
|
|
14
14
|
*/
|
|
15
15
|
mint<T = unknown, U = unknown>(tag: string, immutableMetadata?: T, metadata?: U, namespace?: string, identity?: string): Promise<string>;
|
|
16
16
|
/**
|
|
17
17
|
* Resolve an NFT.
|
|
18
18
|
* @param id The id of the NFT to resolve.
|
|
19
|
-
* @param controllerIdentity The identity to perform the nft operation
|
|
19
|
+
* @param controllerIdentity The identity to perform the nft operation with.
|
|
20
20
|
* @returns The data for the NFT.
|
|
21
21
|
*/
|
|
22
22
|
resolve<T = unknown, U = unknown>(id: string, controllerIdentity?: string): Promise<{
|
|
@@ -29,7 +29,7 @@ export interface INftComponent extends IComponent {
|
|
|
29
29
|
/**
|
|
30
30
|
* Burn an NFT.
|
|
31
31
|
* @param id The id of the NFT to burn in urn format.
|
|
32
|
-
* @param controllerIdentity The identity to perform the nft operation
|
|
32
|
+
* @param controllerIdentity The identity to perform the nft operation with.
|
|
33
33
|
* @returns Nothing.
|
|
34
34
|
*/
|
|
35
35
|
burn(id: string, controllerIdentity?: string): Promise<void>;
|
|
@@ -39,7 +39,7 @@ export interface INftComponent extends IComponent {
|
|
|
39
39
|
* @param recipientIdentity The recipient identity for the NFT.
|
|
40
40
|
* @param recipientAddress The recipient address for the NFT.
|
|
41
41
|
* @param metadata Optional mutable data to include during the transfer.
|
|
42
|
-
* @param controllerIdentity The identity to perform the nft operation
|
|
42
|
+
* @param controllerIdentity The identity to perform the nft operation with.
|
|
43
43
|
* @returns Nothing.
|
|
44
44
|
*/
|
|
45
45
|
transfer<U = unknown>(id: string, recipientIdentity: string, recipientAddress: string, metadata?: U, controllerIdentity?: string): Promise<void>;
|
|
@@ -47,7 +47,7 @@ export interface INftComponent extends IComponent {
|
|
|
47
47
|
* Update the mutable data of the NFT.
|
|
48
48
|
* @param id The id of the NFT to update in urn format.
|
|
49
49
|
* @param metadata The mutable data to update.
|
|
50
|
-
* @param controllerIdentity The identity to perform the nft operation
|
|
50
|
+
* @param controllerIdentity The identity to perform the nft operation with.
|
|
51
51
|
* @returns Nothing.
|
|
52
52
|
*/
|
|
53
53
|
update<U = unknown>(id: string, metadata: U, controllerIdentity?: string): Promise<void>;
|
package/docs/changelog.md
CHANGED
|
@@ -1,5 +1,24 @@
|
|
|
1
1
|
# @twin.org/nft-models - Changelog
|
|
2
2
|
|
|
3
|
+
## [0.0.3-next.2](https://github.com/twinfoundation/nft/compare/nft-models-v0.0.3-next.1...nft-models-v0.0.3-next.2) (2026-02-25)
|
|
4
|
+
|
|
5
|
+
|
|
6
|
+
### Miscellaneous Chores
|
|
7
|
+
|
|
8
|
+
* **nft-models:** Synchronize repo versions
|
|
9
|
+
|
|
10
|
+
## [0.0.3-next.1](https://github.com/twinfoundation/nft/compare/nft-models-v0.0.3-next.0...nft-models-v0.0.3-next.1) (2025-11-12)
|
|
11
|
+
|
|
12
|
+
|
|
13
|
+
### Features
|
|
14
|
+
|
|
15
|
+
* add context id features ([#50](https://github.com/twinfoundation/nft/issues/50)) ([56c31c7](https://github.com/twinfoundation/nft/commit/56c31c7ba10e3ef8ad44f6463153f90888e64711))
|
|
16
|
+
* add validate-locales ([0055a56](https://github.com/twinfoundation/nft/commit/0055a56ed166946f1db860aa0725ad53248b3427))
|
|
17
|
+
* eslint migration to flat config ([0e6fc12](https://github.com/twinfoundation/nft/commit/0e6fc128c3c8f6cd34db793787437dd4af2c9994))
|
|
18
|
+
* update dependencies ([8660f76](https://github.com/twinfoundation/nft/commit/8660f76ca324b0f476e45544cac6bee4b3146c3b))
|
|
19
|
+
* update framework core ([f3496b6](https://github.com/twinfoundation/nft/commit/f3496b61bfebbb3479bb92df39ecfa9ac8d90b9b))
|
|
20
|
+
* use shared store mechanism ([#16](https://github.com/twinfoundation/nft/issues/16)) ([897bc78](https://github.com/twinfoundation/nft/commit/897bc7805248ba1388b2dd03df24c33f1633f344))
|
|
21
|
+
|
|
3
22
|
## [0.0.2-next.8](https://github.com/twinfoundation/nft/compare/nft-models-v0.0.2-next.7...nft-models-v0.0.2-next.8) (2025-10-09)
|
|
4
23
|
|
|
5
24
|
|
|
@@ -6,14 +6,6 @@ Interface describing an NFT component.
|
|
|
6
6
|
|
|
7
7
|
- `IComponent`
|
|
8
8
|
|
|
9
|
-
## Indexable
|
|
10
|
-
|
|
11
|
-
\[`key`: `string`\]: `any`
|
|
12
|
-
|
|
13
|
-
All methods are optional, so we introduce an index signature to allow
|
|
14
|
-
any additional properties or methods, which removes the TypeScript error where
|
|
15
|
-
the class has no properties in common with the type.
|
|
16
|
-
|
|
17
9
|
## Methods
|
|
18
10
|
|
|
19
11
|
### mint()
|
|
@@ -62,7 +54,7 @@ The namespace of the connector to use for the NFT, defaults to component configu
|
|
|
62
54
|
|
|
63
55
|
`string`
|
|
64
56
|
|
|
65
|
-
The identity to perform the nft operation
|
|
57
|
+
The identity to perform the nft operation with.
|
|
66
58
|
|
|
67
59
|
#### Returns
|
|
68
60
|
|
|
@@ -100,7 +92,7 @@ The id of the NFT to resolve.
|
|
|
100
92
|
|
|
101
93
|
`string`
|
|
102
94
|
|
|
103
|
-
The identity to perform the nft operation
|
|
95
|
+
The identity to perform the nft operation with.
|
|
104
96
|
|
|
105
97
|
#### Returns
|
|
106
98
|
|
|
@@ -128,7 +120,7 @@ The id of the NFT to burn in urn format.
|
|
|
128
120
|
|
|
129
121
|
`string`
|
|
130
122
|
|
|
131
|
-
The identity to perform the nft operation
|
|
123
|
+
The identity to perform the nft operation with.
|
|
132
124
|
|
|
133
125
|
#### Returns
|
|
134
126
|
|
|
@@ -180,7 +172,7 @@ Optional mutable data to include during the transfer.
|
|
|
180
172
|
|
|
181
173
|
`string`
|
|
182
174
|
|
|
183
|
-
The identity to perform the nft operation
|
|
175
|
+
The identity to perform the nft operation with.
|
|
184
176
|
|
|
185
177
|
#### Returns
|
|
186
178
|
|
|
@@ -220,7 +212,7 @@ The mutable data to update.
|
|
|
220
212
|
|
|
221
213
|
`string`
|
|
222
214
|
|
|
223
|
-
The identity to perform the nft operation
|
|
215
|
+
The identity to perform the nft operation with.
|
|
224
216
|
|
|
225
217
|
#### Returns
|
|
226
218
|
|
|
@@ -6,14 +6,6 @@ Interface describing an NFT connector.
|
|
|
6
6
|
|
|
7
7
|
- `IComponent`
|
|
8
8
|
|
|
9
|
-
## Indexable
|
|
10
|
-
|
|
11
|
-
\[`key`: `string`\]: `any`
|
|
12
|
-
|
|
13
|
-
All methods are optional, so we introduce an index signature to allow
|
|
14
|
-
any additional properties or methods, which removes the TypeScript error where
|
|
15
|
-
the class has no properties in common with the type.
|
|
16
|
-
|
|
17
9
|
## Methods
|
|
18
10
|
|
|
19
11
|
### mint()
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@twin.org/nft-models",
|
|
3
|
-
"version": "0.0.
|
|
3
|
+
"version": "0.0.3-next.2",
|
|
4
4
|
"description": "Contains models and classes for use with NFTs",
|
|
5
5
|
"repository": {
|
|
6
6
|
"type": "git",
|
|
@@ -18,19 +18,17 @@
|
|
|
18
18
|
"@twin.org/nameof": "next",
|
|
19
19
|
"@twin.org/web": "next"
|
|
20
20
|
},
|
|
21
|
-
"main": "./dist/
|
|
22
|
-
"module": "./dist/esm/index.mjs",
|
|
21
|
+
"main": "./dist/es/index.js",
|
|
23
22
|
"types": "./dist/types/index.d.ts",
|
|
24
23
|
"exports": {
|
|
25
24
|
".": {
|
|
26
25
|
"types": "./dist/types/index.d.ts",
|
|
27
|
-
"
|
|
28
|
-
"
|
|
26
|
+
"import": "./dist/es/index.js",
|
|
27
|
+
"default": "./dist/es/index.js"
|
|
29
28
|
}
|
|
30
29
|
},
|
|
31
30
|
"files": [
|
|
32
|
-
"dist/
|
|
33
|
-
"dist/esm",
|
|
31
|
+
"dist/es",
|
|
34
32
|
"dist/types",
|
|
35
33
|
"locales",
|
|
36
34
|
"docs"
|
package/dist/cjs/index.cjs
DELETED
|
@@ -1,13 +0,0 @@
|
|
|
1
|
-
'use strict';
|
|
2
|
-
|
|
3
|
-
var core = require('@twin.org/core');
|
|
4
|
-
|
|
5
|
-
// Copyright 2024 IOTA Stiftung.
|
|
6
|
-
// SPDX-License-Identifier: Apache-2.0.
|
|
7
|
-
/**
|
|
8
|
-
* Factory for creating NFT connectors.
|
|
9
|
-
*/
|
|
10
|
-
// eslint-disable-next-line @typescript-eslint/naming-convention
|
|
11
|
-
const NftConnectorFactory = core.Factory.createFactory("nft-connector");
|
|
12
|
-
|
|
13
|
-
exports.NftConnectorFactory = NftConnectorFactory;
|