@twin.org/nft-models 0.0.1-next.8 → 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/types/models/INftComponent.d.ts +11 -11
- package/dist/types/models/INftConnector.d.ts +8 -8
- package/dist/types/models/api/INftMintRequest.d.ts +0 -4
- package/dist/types/models/api/INftTransferRequest.d.ts +6 -2
- package/docs/changelog.md +71 -1
- package/docs/reference/interfaces/INftComponent.md +37 -25
- package/docs/reference/interfaces/INftConnector.md +36 -24
- package/docs/reference/interfaces/INftMintRequest.md +0 -6
- package/docs/reference/interfaces/INftTransferRequest.md +9 -3
- package/package.json +6 -6
|
@@ -5,7 +5,6 @@ import type { IComponent } from "@twin.org/core";
|
|
|
5
5
|
export interface INftComponent extends IComponent {
|
|
6
6
|
/**
|
|
7
7
|
* Mint an NFT.
|
|
8
|
-
* @param issuer The issuer for the NFT, will also be the initial owner.
|
|
9
8
|
* @param tag The tag for the NFT.
|
|
10
9
|
* @param immutableMetadata The immutable metadata for the NFT.
|
|
11
10
|
* @param metadata The metadata for the NFT.
|
|
@@ -13,14 +12,14 @@ export interface INftComponent extends IComponent {
|
|
|
13
12
|
* @param identity The identity to perform the nft operation on.
|
|
14
13
|
* @returns The id of the created NFT in urn format.
|
|
15
14
|
*/
|
|
16
|
-
mint<T = unknown, U = unknown>(
|
|
15
|
+
mint<T = unknown, U = unknown>(tag: string, immutableMetadata?: T, metadata?: U, namespace?: string, identity?: string): Promise<string>;
|
|
17
16
|
/**
|
|
18
17
|
* Resolve an NFT.
|
|
19
18
|
* @param id The id of the NFT to resolve.
|
|
20
|
-
* @param
|
|
19
|
+
* @param controllerIdentity The identity to perform the nft operation on.
|
|
21
20
|
* @returns The data for the NFT.
|
|
22
21
|
*/
|
|
23
|
-
resolve<T = unknown, U = unknown>(id: string,
|
|
22
|
+
resolve<T = unknown, U = unknown>(id: string, controllerIdentity?: string): Promise<{
|
|
24
23
|
issuer: string;
|
|
25
24
|
owner: string;
|
|
26
25
|
tag: string;
|
|
@@ -30,25 +29,26 @@ export interface INftComponent extends IComponent {
|
|
|
30
29
|
/**
|
|
31
30
|
* Burn an NFT.
|
|
32
31
|
* @param id The id of the NFT to burn in urn format.
|
|
33
|
-
* @param
|
|
32
|
+
* @param controllerIdentity The identity to perform the nft operation on.
|
|
34
33
|
* @returns Nothing.
|
|
35
34
|
*/
|
|
36
|
-
burn(id: string,
|
|
35
|
+
burn(id: string, controllerIdentity?: string): Promise<void>;
|
|
37
36
|
/**
|
|
38
37
|
* Transfer an NFT.
|
|
39
38
|
* @param id The id of the NFT to transfer in urn format.
|
|
40
|
-
* @param
|
|
39
|
+
* @param recipientIdentity The recipient identity for the NFT.
|
|
40
|
+
* @param recipientAddress The recipient address for the NFT.
|
|
41
41
|
* @param metadata Optional mutable data to include during the transfer.
|
|
42
|
-
* @param
|
|
42
|
+
* @param controllerIdentity The identity to perform the nft operation on.
|
|
43
43
|
* @returns Nothing.
|
|
44
44
|
*/
|
|
45
|
-
transfer<
|
|
45
|
+
transfer<U = unknown>(id: string, recipientIdentity: string, recipientAddress: string, metadata?: U, controllerIdentity?: string): Promise<void>;
|
|
46
46
|
/**
|
|
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
|
|
50
|
+
* @param controllerIdentity The identity to perform the nft operation on.
|
|
51
51
|
* @returns Nothing.
|
|
52
52
|
*/
|
|
53
|
-
update<
|
|
53
|
+
update<U = unknown>(id: string, metadata: U, controllerIdentity?: string): Promise<void>;
|
|
54
54
|
}
|
|
@@ -5,14 +5,13 @@ import type { IComponent } from "@twin.org/core";
|
|
|
5
5
|
export interface INftConnector extends IComponent {
|
|
6
6
|
/**
|
|
7
7
|
* Mint an NFT.
|
|
8
|
-
* @param
|
|
9
|
-
* @param issuerAddress The issuer for the NFT, will also be the initial owner.
|
|
8
|
+
* @param controllerIdentity The identity of the user to access the vault keys.
|
|
10
9
|
* @param tag The tag for the NFT.
|
|
11
10
|
* @param immutableMetadata The immutable metadata for the NFT.
|
|
12
11
|
* @param metadata The metadata for the NFT.
|
|
13
12
|
* @returns The id of the created NFT in urn format.
|
|
14
13
|
*/
|
|
15
|
-
mint<T = unknown, U = unknown>(
|
|
14
|
+
mint<T = unknown, U = unknown>(controllerIdentity: string, tag: string, immutableMetadata?: T, metadata?: U): Promise<string>;
|
|
16
15
|
/**
|
|
17
16
|
* Resolve an NFT.
|
|
18
17
|
* @param id The id of the NFT to resolve.
|
|
@@ -34,19 +33,20 @@ export interface INftConnector extends IComponent {
|
|
|
34
33
|
burn(controller: string, id: string): Promise<void>;
|
|
35
34
|
/**
|
|
36
35
|
* Transfer an NFT.
|
|
37
|
-
* @param
|
|
36
|
+
* @param controllerIdentity The controller of the NFT who can make changes.
|
|
38
37
|
* @param id The id of the NFT to transfer in urn format.
|
|
39
|
-
* @param
|
|
38
|
+
* @param recipientIdentity The recipient identity for the NFT.
|
|
39
|
+
* @param recipientAddress The recipient address for the NFT.
|
|
40
40
|
* @param metadata Optional mutable data to include during the transfer.
|
|
41
41
|
* @returns Nothing.
|
|
42
42
|
*/
|
|
43
|
-
transfer<
|
|
43
|
+
transfer<U = unknown>(controllerIdentity: string, id: string, recipientIdentity: string, recipientAddress: string, metadata?: U): Promise<void>;
|
|
44
44
|
/**
|
|
45
45
|
* Update the mutable data of the NFT.
|
|
46
|
-
* @param
|
|
46
|
+
* @param controllerIdentity The controller of the NFT who can make changes.
|
|
47
47
|
* @param id The id of the NFT to update in urn format.
|
|
48
48
|
* @param metadata The mutable data to update.
|
|
49
49
|
* @returns Nothing.
|
|
50
50
|
*/
|
|
51
|
-
update<
|
|
51
|
+
update<U = unknown>(controllerIdentity: string, id: string, metadata: U): Promise<void>;
|
|
52
52
|
}
|
|
@@ -16,9 +16,13 @@ export interface INftTransferRequest {
|
|
|
16
16
|
*/
|
|
17
17
|
body: {
|
|
18
18
|
/**
|
|
19
|
-
* The recipient for the NFT.
|
|
19
|
+
* The recipient identity for the NFT.
|
|
20
20
|
*/
|
|
21
|
-
|
|
21
|
+
recipientIdentity: string;
|
|
22
|
+
/**
|
|
23
|
+
* The recipient address for the NFT.
|
|
24
|
+
*/
|
|
25
|
+
recipientAddress: string;
|
|
22
26
|
/**
|
|
23
27
|
* The metadata for the NFT.
|
|
24
28
|
*/
|
package/docs/changelog.md
CHANGED
|
@@ -1,5 +1,75 @@
|
|
|
1
1
|
# @twin.org/nft-models - 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
|
+
## [0.0.1-next.32](https://github.com/twinfoundation/nft/compare/nft-models-v0.0.1-next.31...nft-models-v0.0.1-next.32) (2025-06-24)
|
|
11
|
+
|
|
12
|
+
|
|
13
|
+
### Miscellaneous Chores
|
|
14
|
+
|
|
15
|
+
* **nft-models:** Synchronize repo versions
|
|
16
|
+
|
|
17
|
+
## [0.0.1-next.31](https://github.com/twinfoundation/nft/compare/nft-models-v0.0.1-next.30...nft-models-v0.0.1-next.31) (2025-06-12)
|
|
18
|
+
|
|
19
|
+
|
|
20
|
+
### Features
|
|
21
|
+
|
|
22
|
+
* update dependencies ([8660f76](https://github.com/twinfoundation/nft/commit/8660f76ca324b0f476e45544cac6bee4b3146c3b))
|
|
23
|
+
|
|
24
|
+
## [0.0.1-next.30](https://github.com/twinfoundation/nft/compare/nft-models-v0.0.1-next.29...nft-models-v0.0.1-next.30) (2025-05-22)
|
|
25
|
+
|
|
26
|
+
|
|
27
|
+
### Miscellaneous Chores
|
|
28
|
+
|
|
29
|
+
* **nft-models:** Synchronize repo versions
|
|
30
|
+
|
|
31
|
+
## [0.0.1-next.29](https://github.com/twinfoundation/nft/compare/nft-models-v0.0.1-next.28...nft-models-v0.0.1-next.29) (2025-05-21)
|
|
32
|
+
|
|
33
|
+
|
|
34
|
+
### Miscellaneous Chores
|
|
35
|
+
|
|
36
|
+
* **nft-models:** Synchronize repo versions
|
|
37
|
+
|
|
38
|
+
## [0.0.1-next.28](https://github.com/twinfoundation/nft/compare/nft-models-v0.0.1-next.27...nft-models-v0.0.1-next.28) (2025-05-06)
|
|
39
|
+
|
|
40
|
+
|
|
41
|
+
### Miscellaneous Chores
|
|
42
|
+
|
|
43
|
+
* **nft-models:** Synchronize repo versions
|
|
44
|
+
|
|
45
|
+
## [0.0.1-next.27](https://github.com/twinfoundation/nft/compare/nft-models-v0.0.1-next.26...nft-models-v0.0.1-next.27) (2025-04-24)
|
|
46
|
+
|
|
47
|
+
|
|
48
|
+
### Miscellaneous Chores
|
|
49
|
+
|
|
50
|
+
* **nft-models:** Synchronize repo versions
|
|
51
|
+
|
|
52
|
+
## [0.0.1-next.26](https://github.com/twinfoundation/nft/compare/nft-models-v0.0.1-next.25...nft-models-v0.0.1-next.26) (2025-04-17)
|
|
53
|
+
|
|
54
|
+
|
|
55
|
+
### Features
|
|
56
|
+
|
|
57
|
+
* use shared store mechanism ([#16](https://github.com/twinfoundation/nft/issues/16)) ([897bc78](https://github.com/twinfoundation/nft/commit/897bc7805248ba1388b2dd03df24c33f1633f344))
|
|
58
|
+
|
|
59
|
+
## [0.0.1-next.25](https://github.com/twinfoundation/nft/compare/nft-models-v0.0.1-next.24...nft-models-v0.0.1-next.25) (2025-04-17)
|
|
60
|
+
|
|
61
|
+
|
|
62
|
+
### Miscellaneous Chores
|
|
63
|
+
|
|
64
|
+
* **nft-models:** Synchronize repo versions
|
|
65
|
+
|
|
66
|
+
## [0.0.1-next.24](https://github.com/twinfoundation/nft/compare/nft-models-v0.0.1-next.23...nft-models-v0.0.1-next.24) (2025-03-28)
|
|
67
|
+
|
|
68
|
+
|
|
69
|
+
### Miscellaneous Chores
|
|
70
|
+
|
|
71
|
+
* **nft-models:** Synchronize repo versions
|
|
72
|
+
|
|
73
|
+
## v0.0.1-next.23
|
|
4
74
|
|
|
5
75
|
- Initial Release
|
|
@@ -10,23 +10,21 @@ Interface describing an NFT component.
|
|
|
10
10
|
|
|
11
11
|
### mint()
|
|
12
12
|
|
|
13
|
-
> **mint**\<`T`, `U`\>(`
|
|
13
|
+
> **mint**\<`T`, `U`\>(`tag`, `immutableMetadata?`, `metadata?`, `namespace?`, `identity?`): `Promise`\<`string`\>
|
|
14
14
|
|
|
15
15
|
Mint an NFT.
|
|
16
16
|
|
|
17
17
|
#### Type Parameters
|
|
18
18
|
|
|
19
|
-
|
|
19
|
+
##### T
|
|
20
20
|
|
|
21
|
-
|
|
21
|
+
`T` = `unknown`
|
|
22
22
|
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
##### issuer
|
|
23
|
+
##### U
|
|
26
24
|
|
|
27
|
-
`
|
|
25
|
+
`U` = `unknown`
|
|
28
26
|
|
|
29
|
-
|
|
27
|
+
#### Parameters
|
|
30
28
|
|
|
31
29
|
##### tag
|
|
32
30
|
|
|
@@ -68,15 +66,19 @@ The id of the created NFT in urn format.
|
|
|
68
66
|
|
|
69
67
|
### resolve()
|
|
70
68
|
|
|
71
|
-
> **resolve**\<`T`, `U`\>(`id`, `
|
|
69
|
+
> **resolve**\<`T`, `U`\>(`id`, `controllerIdentity?`): `Promise`\<\{ `issuer`: `string`; `owner`: `string`; `tag`: `string`; `immutableMetadata?`: `T`; `metadata?`: `U`; \}\>
|
|
72
70
|
|
|
73
71
|
Resolve an NFT.
|
|
74
72
|
|
|
75
73
|
#### Type Parameters
|
|
76
74
|
|
|
77
|
-
|
|
75
|
+
##### T
|
|
76
|
+
|
|
77
|
+
`T` = `unknown`
|
|
78
78
|
|
|
79
|
-
|
|
79
|
+
##### U
|
|
80
|
+
|
|
81
|
+
`U` = `unknown`
|
|
80
82
|
|
|
81
83
|
#### Parameters
|
|
82
84
|
|
|
@@ -86,7 +88,7 @@ Resolve an NFT.
|
|
|
86
88
|
|
|
87
89
|
The id of the NFT to resolve.
|
|
88
90
|
|
|
89
|
-
#####
|
|
91
|
+
##### controllerIdentity?
|
|
90
92
|
|
|
91
93
|
`string`
|
|
92
94
|
|
|
@@ -94,7 +96,7 @@ The identity to perform the nft operation on.
|
|
|
94
96
|
|
|
95
97
|
#### Returns
|
|
96
98
|
|
|
97
|
-
`Promise`\<\{ `issuer`: `string`; `owner`: `string`; `tag`: `string`; `immutableMetadata
|
|
99
|
+
`Promise`\<\{ `issuer`: `string`; `owner`: `string`; `tag`: `string`; `immutableMetadata?`: `T`; `metadata?`: `U`; \}\>
|
|
98
100
|
|
|
99
101
|
The data for the NFT.
|
|
100
102
|
|
|
@@ -102,7 +104,7 @@ The data for the NFT.
|
|
|
102
104
|
|
|
103
105
|
### burn()
|
|
104
106
|
|
|
105
|
-
> **burn**(`id`, `
|
|
107
|
+
> **burn**(`id`, `controllerIdentity?`): `Promise`\<`void`\>
|
|
106
108
|
|
|
107
109
|
Burn an NFT.
|
|
108
110
|
|
|
@@ -114,7 +116,7 @@ Burn an NFT.
|
|
|
114
116
|
|
|
115
117
|
The id of the NFT to burn in urn format.
|
|
116
118
|
|
|
117
|
-
#####
|
|
119
|
+
##### controllerIdentity?
|
|
118
120
|
|
|
119
121
|
`string`
|
|
120
122
|
|
|
@@ -130,13 +132,15 @@ Nothing.
|
|
|
130
132
|
|
|
131
133
|
### transfer()
|
|
132
134
|
|
|
133
|
-
> **transfer**\<`
|
|
135
|
+
> **transfer**\<`U`\>(`id`, `recipientIdentity`, `recipientAddress`, `metadata?`, `controllerIdentity?`): `Promise`\<`void`\>
|
|
134
136
|
|
|
135
137
|
Transfer an NFT.
|
|
136
138
|
|
|
137
139
|
#### Type Parameters
|
|
138
140
|
|
|
139
|
-
|
|
141
|
+
##### U
|
|
142
|
+
|
|
143
|
+
`U` = `unknown`
|
|
140
144
|
|
|
141
145
|
#### Parameters
|
|
142
146
|
|
|
@@ -146,19 +150,25 @@ Transfer an NFT.
|
|
|
146
150
|
|
|
147
151
|
The id of the NFT to transfer in urn format.
|
|
148
152
|
|
|
149
|
-
#####
|
|
153
|
+
##### recipientIdentity
|
|
154
|
+
|
|
155
|
+
`string`
|
|
156
|
+
|
|
157
|
+
The recipient identity for the NFT.
|
|
158
|
+
|
|
159
|
+
##### recipientAddress
|
|
150
160
|
|
|
151
161
|
`string`
|
|
152
162
|
|
|
153
|
-
The recipient
|
|
163
|
+
The recipient address for the NFT.
|
|
154
164
|
|
|
155
165
|
##### metadata?
|
|
156
166
|
|
|
157
|
-
`
|
|
167
|
+
`U`
|
|
158
168
|
|
|
159
169
|
Optional mutable data to include during the transfer.
|
|
160
170
|
|
|
161
|
-
#####
|
|
171
|
+
##### controllerIdentity?
|
|
162
172
|
|
|
163
173
|
`string`
|
|
164
174
|
|
|
@@ -174,13 +184,15 @@ Nothing.
|
|
|
174
184
|
|
|
175
185
|
### update()
|
|
176
186
|
|
|
177
|
-
> **update**\<`
|
|
187
|
+
> **update**\<`U`\>(`id`, `metadata`, `controllerIdentity?`): `Promise`\<`void`\>
|
|
178
188
|
|
|
179
189
|
Update the mutable data of the NFT.
|
|
180
190
|
|
|
181
191
|
#### Type Parameters
|
|
182
192
|
|
|
183
|
-
|
|
193
|
+
##### U
|
|
194
|
+
|
|
195
|
+
`U` = `unknown`
|
|
184
196
|
|
|
185
197
|
#### Parameters
|
|
186
198
|
|
|
@@ -192,11 +204,11 @@ The id of the NFT to update in urn format.
|
|
|
192
204
|
|
|
193
205
|
##### metadata
|
|
194
206
|
|
|
195
|
-
`
|
|
207
|
+
`U`
|
|
196
208
|
|
|
197
209
|
The mutable data to update.
|
|
198
210
|
|
|
199
|
-
#####
|
|
211
|
+
##### controllerIdentity?
|
|
200
212
|
|
|
201
213
|
`string`
|
|
202
214
|
|
|
@@ -10,29 +10,27 @@ Interface describing an NFT connector.
|
|
|
10
10
|
|
|
11
11
|
### mint()
|
|
12
12
|
|
|
13
|
-
> **mint**\<`T`, `U`\>(`
|
|
13
|
+
> **mint**\<`T`, `U`\>(`controllerIdentity`, `tag`, `immutableMetadata?`, `metadata?`): `Promise`\<`string`\>
|
|
14
14
|
|
|
15
15
|
Mint an NFT.
|
|
16
16
|
|
|
17
17
|
#### Type Parameters
|
|
18
18
|
|
|
19
|
-
|
|
19
|
+
##### T
|
|
20
20
|
|
|
21
|
-
|
|
21
|
+
`T` = `unknown`
|
|
22
22
|
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
##### controller
|
|
23
|
+
##### U
|
|
26
24
|
|
|
27
|
-
`
|
|
25
|
+
`U` = `unknown`
|
|
28
26
|
|
|
29
|
-
|
|
27
|
+
#### Parameters
|
|
30
28
|
|
|
31
|
-
#####
|
|
29
|
+
##### controllerIdentity
|
|
32
30
|
|
|
33
31
|
`string`
|
|
34
32
|
|
|
35
|
-
The
|
|
33
|
+
The identity of the user to access the vault keys.
|
|
36
34
|
|
|
37
35
|
##### tag
|
|
38
36
|
|
|
@@ -62,15 +60,19 @@ The id of the created NFT in urn format.
|
|
|
62
60
|
|
|
63
61
|
### resolve()
|
|
64
62
|
|
|
65
|
-
> **resolve**\<`T`, `U`\>(`id`): `Promise`\<\{ `issuer`: `string`; `owner`: `string`; `tag`: `string`; `immutableMetadata
|
|
63
|
+
> **resolve**\<`T`, `U`\>(`id`): `Promise`\<\{ `issuer`: `string`; `owner`: `string`; `tag`: `string`; `immutableMetadata?`: `T`; `metadata?`: `U`; \}\>
|
|
66
64
|
|
|
67
65
|
Resolve an NFT.
|
|
68
66
|
|
|
69
67
|
#### Type Parameters
|
|
70
68
|
|
|
71
|
-
|
|
69
|
+
##### T
|
|
70
|
+
|
|
71
|
+
`T` = `unknown`
|
|
72
|
+
|
|
73
|
+
##### U
|
|
72
74
|
|
|
73
|
-
|
|
75
|
+
`U` = `unknown`
|
|
74
76
|
|
|
75
77
|
#### Parameters
|
|
76
78
|
|
|
@@ -82,7 +84,7 @@ The id of the NFT to resolve.
|
|
|
82
84
|
|
|
83
85
|
#### Returns
|
|
84
86
|
|
|
85
|
-
`Promise`\<\{ `issuer`: `string`; `owner`: `string`; `tag`: `string`; `immutableMetadata
|
|
87
|
+
`Promise`\<\{ `issuer`: `string`; `owner`: `string`; `tag`: `string`; `immutableMetadata?`: `T`; `metadata?`: `U`; \}\>
|
|
86
88
|
|
|
87
89
|
The data for the NFT.
|
|
88
90
|
|
|
@@ -118,17 +120,19 @@ Nothing.
|
|
|
118
120
|
|
|
119
121
|
### transfer()
|
|
120
122
|
|
|
121
|
-
> **transfer**\<`
|
|
123
|
+
> **transfer**\<`U`\>(`controllerIdentity`, `id`, `recipientIdentity`, `recipientAddress`, `metadata?`): `Promise`\<`void`\>
|
|
122
124
|
|
|
123
125
|
Transfer an NFT.
|
|
124
126
|
|
|
125
127
|
#### Type Parameters
|
|
126
128
|
|
|
127
|
-
|
|
129
|
+
##### U
|
|
130
|
+
|
|
131
|
+
`U` = `unknown`
|
|
128
132
|
|
|
129
133
|
#### Parameters
|
|
130
134
|
|
|
131
|
-
#####
|
|
135
|
+
##### controllerIdentity
|
|
132
136
|
|
|
133
137
|
`string`
|
|
134
138
|
|
|
@@ -140,15 +144,21 @@ The controller of the NFT who can make changes.
|
|
|
140
144
|
|
|
141
145
|
The id of the NFT to transfer in urn format.
|
|
142
146
|
|
|
143
|
-
#####
|
|
147
|
+
##### recipientIdentity
|
|
144
148
|
|
|
145
149
|
`string`
|
|
146
150
|
|
|
147
|
-
The recipient
|
|
151
|
+
The recipient identity for the NFT.
|
|
152
|
+
|
|
153
|
+
##### recipientAddress
|
|
154
|
+
|
|
155
|
+
`string`
|
|
156
|
+
|
|
157
|
+
The recipient address for the NFT.
|
|
148
158
|
|
|
149
159
|
##### metadata?
|
|
150
160
|
|
|
151
|
-
`
|
|
161
|
+
`U`
|
|
152
162
|
|
|
153
163
|
Optional mutable data to include during the transfer.
|
|
154
164
|
|
|
@@ -162,17 +172,19 @@ Nothing.
|
|
|
162
172
|
|
|
163
173
|
### update()
|
|
164
174
|
|
|
165
|
-
> **update**\<`
|
|
175
|
+
> **update**\<`U`\>(`controllerIdentity`, `id`, `metadata`): `Promise`\<`void`\>
|
|
166
176
|
|
|
167
177
|
Update the mutable data of the NFT.
|
|
168
178
|
|
|
169
179
|
#### Type Parameters
|
|
170
180
|
|
|
171
|
-
|
|
181
|
+
##### U
|
|
182
|
+
|
|
183
|
+
`U` = `unknown`
|
|
172
184
|
|
|
173
185
|
#### Parameters
|
|
174
186
|
|
|
175
|
-
#####
|
|
187
|
+
##### controllerIdentity
|
|
176
188
|
|
|
177
189
|
`string`
|
|
178
190
|
|
|
@@ -186,7 +198,7 @@ The id of the NFT to update in urn format.
|
|
|
186
198
|
|
|
187
199
|
##### metadata
|
|
188
200
|
|
|
189
|
-
`
|
|
201
|
+
`U`
|
|
190
202
|
|
|
191
203
|
The mutable data to update.
|
|
192
204
|
|
|
@@ -24,11 +24,17 @@ The id of the NFT to transfer in urn format.
|
|
|
24
24
|
|
|
25
25
|
The data to be used in the transfer.
|
|
26
26
|
|
|
27
|
-
####
|
|
27
|
+
#### recipientIdentity
|
|
28
28
|
|
|
29
|
-
> **
|
|
29
|
+
> **recipientIdentity**: `string`
|
|
30
30
|
|
|
31
|
-
The recipient for the NFT.
|
|
31
|
+
The recipient identity for the NFT.
|
|
32
|
+
|
|
33
|
+
#### recipientAddress
|
|
34
|
+
|
|
35
|
+
> **recipientAddress**: `string`
|
|
36
|
+
|
|
37
|
+
The recipient address for the NFT.
|
|
32
38
|
|
|
33
39
|
#### metadata?
|
|
34
40
|
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@twin.org/nft-models",
|
|
3
|
-
"version": "0.0.1
|
|
3
|
+
"version": "0.0.1",
|
|
4
4
|
"description": "Contains models and classes for use with NFTs",
|
|
5
5
|
"repository": {
|
|
6
6
|
"type": "git",
|
|
@@ -14,18 +14,18 @@
|
|
|
14
14
|
"node": ">=20.0.0"
|
|
15
15
|
},
|
|
16
16
|
"dependencies": {
|
|
17
|
-
"@twin.org/core": "
|
|
18
|
-
"@twin.org/nameof": "
|
|
19
|
-
"@twin.org/web": "
|
|
17
|
+
"@twin.org/core": "^0.0.1",
|
|
18
|
+
"@twin.org/nameof": "^0.0.1",
|
|
19
|
+
"@twin.org/web": "^0.0.1"
|
|
20
20
|
},
|
|
21
21
|
"main": "./dist/cjs/index.cjs",
|
|
22
22
|
"module": "./dist/esm/index.mjs",
|
|
23
23
|
"types": "./dist/types/index.d.ts",
|
|
24
24
|
"exports": {
|
|
25
25
|
".": {
|
|
26
|
+
"types": "./dist/types/index.d.ts",
|
|
26
27
|
"require": "./dist/cjs/index.cjs",
|
|
27
|
-
"import": "./dist/esm/index.mjs"
|
|
28
|
-
"types": "./dist/types/index.d.ts"
|
|
28
|
+
"import": "./dist/esm/index.mjs"
|
|
29
29
|
}
|
|
30
30
|
},
|
|
31
31
|
"files": [
|