@twin.org/nft-models 0.0.1-next.5 → 0.0.1-next.7
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/docs/changelog.md
CHANGED
|
@@ -61,7 +61,7 @@ Object containing key value pair where payment address mapped to the payout perc
|
|
|
61
61
|
|
|
62
62
|
#### Index Signature
|
|
63
63
|
|
|
64
|
-
|
|
64
|
+
\[`id`: `string`\]: `number`
|
|
65
65
|
|
|
66
66
|
***
|
|
67
67
|
|
|
@@ -86,3 +86,11 @@ Alphanumeric text string to define a basic description of the NFT.
|
|
|
86
86
|
> `optional` **attributes**: `object`[]
|
|
87
87
|
|
|
88
88
|
Array objects defining additional attributes of the NFT
|
|
89
|
+
|
|
90
|
+
#### trait\_type
|
|
91
|
+
|
|
92
|
+
> **trait\_type**: `string`
|
|
93
|
+
|
|
94
|
+
#### value
|
|
95
|
+
|
|
96
|
+
> **value**: `unknown`
|
|
@@ -22,27 +22,39 @@ Mint an NFT.
|
|
|
22
22
|
|
|
23
23
|
#### Parameters
|
|
24
24
|
|
|
25
|
-
|
|
25
|
+
##### issuer
|
|
26
|
+
|
|
27
|
+
`string`
|
|
26
28
|
|
|
27
29
|
The issuer for the NFT, will also be the initial owner.
|
|
28
30
|
|
|
29
|
-
|
|
31
|
+
##### tag
|
|
32
|
+
|
|
33
|
+
`string`
|
|
30
34
|
|
|
31
35
|
The tag for the NFT.
|
|
32
36
|
|
|
33
|
-
|
|
37
|
+
##### immutableMetadata?
|
|
38
|
+
|
|
39
|
+
`T`
|
|
34
40
|
|
|
35
41
|
The immutable metadata for the NFT.
|
|
36
42
|
|
|
37
|
-
|
|
43
|
+
##### metadata?
|
|
44
|
+
|
|
45
|
+
`U`
|
|
38
46
|
|
|
39
47
|
The metadata for the NFT.
|
|
40
48
|
|
|
41
|
-
|
|
49
|
+
##### namespace?
|
|
50
|
+
|
|
51
|
+
`string`
|
|
42
52
|
|
|
43
53
|
The namespace of the connector to use for the NFT, defaults to component configured namespace.
|
|
44
54
|
|
|
45
|
-
|
|
55
|
+
##### identity?
|
|
56
|
+
|
|
57
|
+
`string`
|
|
46
58
|
|
|
47
59
|
The identity to perform the nft operation on.
|
|
48
60
|
|
|
@@ -56,7 +68,7 @@ The id of the created NFT in urn format.
|
|
|
56
68
|
|
|
57
69
|
### resolve()
|
|
58
70
|
|
|
59
|
-
> **resolve**\<`T`, `U`\>(`id`, `identity`?): `Promise
|
|
71
|
+
> **resolve**\<`T`, `U`\>(`id`, `identity`?): `Promise`\<\{ `issuer`: `string`; `owner`: `string`; `tag`: `string`; `immutableMetadata`: `T`; `metadata`: `U`; \}\>
|
|
60
72
|
|
|
61
73
|
Resolve an NFT.
|
|
62
74
|
|
|
@@ -68,40 +80,24 @@ Resolve an NFT.
|
|
|
68
80
|
|
|
69
81
|
#### Parameters
|
|
70
82
|
|
|
71
|
-
|
|
83
|
+
##### id
|
|
84
|
+
|
|
85
|
+
`string`
|
|
72
86
|
|
|
73
87
|
The id of the NFT to resolve.
|
|
74
88
|
|
|
75
|
-
|
|
89
|
+
##### identity?
|
|
90
|
+
|
|
91
|
+
`string`
|
|
76
92
|
|
|
77
93
|
The identity to perform the nft operation on.
|
|
78
94
|
|
|
79
95
|
#### Returns
|
|
80
96
|
|
|
81
|
-
`Promise
|
|
97
|
+
`Promise`\<\{ `issuer`: `string`; `owner`: `string`; `tag`: `string`; `immutableMetadata`: `T`; `metadata`: `U`; \}\>
|
|
82
98
|
|
|
83
99
|
The data for the NFT.
|
|
84
100
|
|
|
85
|
-
##### issuer
|
|
86
|
-
|
|
87
|
-
> **issuer**: `string`
|
|
88
|
-
|
|
89
|
-
##### owner
|
|
90
|
-
|
|
91
|
-
> **owner**: `string`
|
|
92
|
-
|
|
93
|
-
##### tag
|
|
94
|
-
|
|
95
|
-
> **tag**: `string`
|
|
96
|
-
|
|
97
|
-
##### immutableMetadata?
|
|
98
|
-
|
|
99
|
-
> `optional` **immutableMetadata**: `T`
|
|
100
|
-
|
|
101
|
-
##### metadata?
|
|
102
|
-
|
|
103
|
-
> `optional` **metadata**: `U`
|
|
104
|
-
|
|
105
101
|
***
|
|
106
102
|
|
|
107
103
|
### burn()
|
|
@@ -112,11 +108,15 @@ Burn an NFT.
|
|
|
112
108
|
|
|
113
109
|
#### Parameters
|
|
114
110
|
|
|
115
|
-
|
|
111
|
+
##### id
|
|
112
|
+
|
|
113
|
+
`string`
|
|
116
114
|
|
|
117
115
|
The id of the NFT to burn in urn format.
|
|
118
116
|
|
|
119
|
-
|
|
117
|
+
##### identity?
|
|
118
|
+
|
|
119
|
+
`string`
|
|
120
120
|
|
|
121
121
|
The identity to perform the nft operation on.
|
|
122
122
|
|
|
@@ -140,19 +140,27 @@ Transfer an NFT.
|
|
|
140
140
|
|
|
141
141
|
#### Parameters
|
|
142
142
|
|
|
143
|
-
|
|
143
|
+
##### id
|
|
144
|
+
|
|
145
|
+
`string`
|
|
144
146
|
|
|
145
147
|
The id of the NFT to transfer in urn format.
|
|
146
148
|
|
|
147
|
-
|
|
149
|
+
##### recipient
|
|
150
|
+
|
|
151
|
+
`string`
|
|
148
152
|
|
|
149
153
|
The recipient of the NFT.
|
|
150
154
|
|
|
151
|
-
|
|
155
|
+
##### metadata?
|
|
156
|
+
|
|
157
|
+
`T`
|
|
152
158
|
|
|
153
159
|
Optional mutable data to include during the transfer.
|
|
154
160
|
|
|
155
|
-
|
|
161
|
+
##### identity?
|
|
162
|
+
|
|
163
|
+
`string`
|
|
156
164
|
|
|
157
165
|
The identity to perform the nft operation on.
|
|
158
166
|
|
|
@@ -176,15 +184,21 @@ Update the mutable data of the NFT.
|
|
|
176
184
|
|
|
177
185
|
#### Parameters
|
|
178
186
|
|
|
179
|
-
|
|
187
|
+
##### id
|
|
188
|
+
|
|
189
|
+
`string`
|
|
180
190
|
|
|
181
191
|
The id of the NFT to update in urn format.
|
|
182
192
|
|
|
183
|
-
|
|
193
|
+
##### metadata
|
|
194
|
+
|
|
195
|
+
`T`
|
|
184
196
|
|
|
185
197
|
The mutable data to update.
|
|
186
198
|
|
|
187
|
-
|
|
199
|
+
##### identity?
|
|
200
|
+
|
|
201
|
+
`string`
|
|
188
202
|
|
|
189
203
|
The identity to perform the nft operation on.
|
|
190
204
|
|
|
@@ -22,23 +22,33 @@ Mint an NFT.
|
|
|
22
22
|
|
|
23
23
|
#### Parameters
|
|
24
24
|
|
|
25
|
-
|
|
25
|
+
##### controller
|
|
26
|
+
|
|
27
|
+
`string`
|
|
26
28
|
|
|
27
29
|
The identity of the user to access the vault keys.
|
|
28
30
|
|
|
29
|
-
|
|
31
|
+
##### issuerAddress
|
|
32
|
+
|
|
33
|
+
`string`
|
|
30
34
|
|
|
31
35
|
The issuer for the NFT, will also be the initial owner.
|
|
32
36
|
|
|
33
|
-
|
|
37
|
+
##### tag
|
|
38
|
+
|
|
39
|
+
`string`
|
|
34
40
|
|
|
35
41
|
The tag for the NFT.
|
|
36
42
|
|
|
37
|
-
|
|
43
|
+
##### immutableMetadata?
|
|
44
|
+
|
|
45
|
+
`T`
|
|
38
46
|
|
|
39
47
|
The immutable metadata for the NFT.
|
|
40
48
|
|
|
41
|
-
|
|
49
|
+
##### metadata?
|
|
50
|
+
|
|
51
|
+
`U`
|
|
42
52
|
|
|
43
53
|
The metadata for the NFT.
|
|
44
54
|
|
|
@@ -52,7 +62,7 @@ The id of the created NFT in urn format.
|
|
|
52
62
|
|
|
53
63
|
### resolve()
|
|
54
64
|
|
|
55
|
-
> **resolve**\<`T`, `U`\>(`id`): `Promise
|
|
65
|
+
> **resolve**\<`T`, `U`\>(`id`): `Promise`\<\{ `issuer`: `string`; `owner`: `string`; `tag`: `string`; `immutableMetadata`: `T`; `metadata`: `U`; \}\>
|
|
56
66
|
|
|
57
67
|
Resolve an NFT.
|
|
58
68
|
|
|
@@ -64,36 +74,18 @@ Resolve an NFT.
|
|
|
64
74
|
|
|
65
75
|
#### Parameters
|
|
66
76
|
|
|
67
|
-
|
|
77
|
+
##### id
|
|
78
|
+
|
|
79
|
+
`string`
|
|
68
80
|
|
|
69
81
|
The id of the NFT to resolve.
|
|
70
82
|
|
|
71
83
|
#### Returns
|
|
72
84
|
|
|
73
|
-
`Promise
|
|
85
|
+
`Promise`\<\{ `issuer`: `string`; `owner`: `string`; `tag`: `string`; `immutableMetadata`: `T`; `metadata`: `U`; \}\>
|
|
74
86
|
|
|
75
87
|
The data for the NFT.
|
|
76
88
|
|
|
77
|
-
##### issuer
|
|
78
|
-
|
|
79
|
-
> **issuer**: `string`
|
|
80
|
-
|
|
81
|
-
##### owner
|
|
82
|
-
|
|
83
|
-
> **owner**: `string`
|
|
84
|
-
|
|
85
|
-
##### tag
|
|
86
|
-
|
|
87
|
-
> **tag**: `string`
|
|
88
|
-
|
|
89
|
-
##### immutableMetadata?
|
|
90
|
-
|
|
91
|
-
> `optional` **immutableMetadata**: `T`
|
|
92
|
-
|
|
93
|
-
##### metadata?
|
|
94
|
-
|
|
95
|
-
> `optional` **metadata**: `U`
|
|
96
|
-
|
|
97
89
|
***
|
|
98
90
|
|
|
99
91
|
### burn()
|
|
@@ -104,11 +96,15 @@ Burn an NFT.
|
|
|
104
96
|
|
|
105
97
|
#### Parameters
|
|
106
98
|
|
|
107
|
-
|
|
99
|
+
##### controller
|
|
100
|
+
|
|
101
|
+
`string`
|
|
108
102
|
|
|
109
103
|
The controller of the NFT who can make changes.
|
|
110
104
|
|
|
111
|
-
|
|
105
|
+
##### id
|
|
106
|
+
|
|
107
|
+
`string`
|
|
112
108
|
|
|
113
109
|
The id of the NFT to burn in urn format.
|
|
114
110
|
|
|
@@ -132,19 +128,27 @@ Transfer an NFT.
|
|
|
132
128
|
|
|
133
129
|
#### Parameters
|
|
134
130
|
|
|
135
|
-
|
|
131
|
+
##### controller
|
|
132
|
+
|
|
133
|
+
`string`
|
|
136
134
|
|
|
137
135
|
The controller of the NFT who can make changes.
|
|
138
136
|
|
|
139
|
-
|
|
137
|
+
##### id
|
|
138
|
+
|
|
139
|
+
`string`
|
|
140
140
|
|
|
141
141
|
The id of the NFT to transfer in urn format.
|
|
142
142
|
|
|
143
|
-
|
|
143
|
+
##### recipient
|
|
144
|
+
|
|
145
|
+
`string`
|
|
144
146
|
|
|
145
147
|
The recipient of the NFT.
|
|
146
148
|
|
|
147
|
-
|
|
149
|
+
##### metadata?
|
|
150
|
+
|
|
151
|
+
`T`
|
|
148
152
|
|
|
149
153
|
Optional mutable data to include during the transfer.
|
|
150
154
|
|
|
@@ -168,15 +172,21 @@ Update the mutable data of the NFT.
|
|
|
168
172
|
|
|
169
173
|
#### Parameters
|
|
170
174
|
|
|
171
|
-
|
|
175
|
+
##### controller
|
|
176
|
+
|
|
177
|
+
`string`
|
|
172
178
|
|
|
173
179
|
The controller of the NFT who can make changes.
|
|
174
180
|
|
|
175
|
-
|
|
181
|
+
##### id
|
|
182
|
+
|
|
183
|
+
`string`
|
|
176
184
|
|
|
177
185
|
The id of the NFT to update in urn format.
|
|
178
186
|
|
|
179
|
-
|
|
187
|
+
##### metadata
|
|
188
|
+
|
|
189
|
+
`T`
|
|
180
190
|
|
|
181
191
|
The mutable data to update.
|
|
182
192
|
|