@oasisomniverse/web5-api 1.0.0
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 +250 -0
- package/docs/README.md +44 -0
- package/docs/modules/Avatar.md +606 -0
- package/docs/modules/CelestialBodies.md +1051 -0
- package/docs/modules/CelestialBodiesMetaData.md +949 -0
- package/docs/modules/CelestialSpaces.md +1051 -0
- package/docs/modules/Chapters.md +955 -0
- package/docs/modules/Competition.md +594 -0
- package/docs/modules/Cosmic.md +3653 -0
- package/docs/modules/Games.md +2619 -0
- package/docs/modules/GeoHotSpots.md +1027 -0
- package/docs/modules/GeoNFTs.md +1049 -0
- package/docs/modules/Health.md +90 -0
- package/docs/modules/Holons.md +1139 -0
- package/docs/modules/HolonsMetaData.md +949 -0
- package/docs/modules/InventoryItems.md +1071 -0
- package/docs/modules/Libraries.md +1052 -0
- package/docs/modules/Missions.md +1286 -0
- package/docs/modules/NFTs.md +1008 -0
- package/docs/modules/OAPPs.md +1190 -0
- package/docs/modules/Parks.md +1079 -0
- package/docs/modules/Plugins.md +1138 -0
- package/docs/modules/Quests.md +1941 -0
- package/docs/modules/Runtimes.md +1112 -0
- package/docs/modules/STAR.md +178 -0
- package/docs/modules/Templates.md +990 -0
- package/docs/modules/Zomes.md +1049 -0
- package/docs/modules/ZomesMetaData.md +949 -0
- package/index.d.ts +97 -0
- package/index.js +3 -0
- package/index.mjs +4 -0
- package/package.json +117 -0
- package/src/core/httpClient.js +110 -0
- package/src/core/routeHelper.js +85 -0
- package/src/core/tokenStore.js +52 -0
- package/src/core/types.d.ts +18 -0
- package/src/index.js +60 -0
- package/src/modules/Auth.d.ts +15 -0
- package/src/modules/Auth.js +62 -0
- package/src/modules/Avatar.d.ts +45 -0
- package/src/modules/Avatar.js +47 -0
- package/src/modules/CelestialBodies.d.ts +72 -0
- package/src/modules/CelestialBodies.js +65 -0
- package/src/modules/CelestialBodiesMetaData.d.ts +69 -0
- package/src/modules/CelestialBodiesMetaData.js +61 -0
- package/src/modules/CelestialSpaces.d.ts +72 -0
- package/src/modules/CelestialSpaces.js +65 -0
- package/src/modules/Chapters.d.ts +66 -0
- package/src/modules/Chapters.js +61 -0
- package/src/modules/Competition.d.ts +33 -0
- package/src/modules/Competition.js +39 -0
- package/src/modules/Cosmic.d.ts +222 -0
- package/src/modules/Cosmic.js +165 -0
- package/src/modules/Games.d.ts +171 -0
- package/src/modules/Games.js +131 -0
- package/src/modules/GeoHotSpots.d.ts +66 -0
- package/src/modules/GeoHotSpots.js +61 -0
- package/src/modules/GeoNFTs.d.ts +72 -0
- package/src/modules/GeoNFTs.js +65 -0
- package/src/modules/Health.d.ts +12 -0
- package/src/modules/Health.js +25 -0
- package/src/modules/Holons.d.ts +78 -0
- package/src/modules/Holons.js +69 -0
- package/src/modules/HolonsMetaData.d.ts +69 -0
- package/src/modules/HolonsMetaData.js +61 -0
- package/src/modules/InventoryItems.d.ts +69 -0
- package/src/modules/InventoryItems.js +63 -0
- package/src/modules/Libraries.d.ts +72 -0
- package/src/modules/Libraries.js +65 -0
- package/src/modules/Missions.d.ts +87 -0
- package/src/modules/Missions.js +75 -0
- package/src/modules/NFTs.d.ts +69 -0
- package/src/modules/NFTs.js +63 -0
- package/src/modules/OAPPs.d.ts +69 -0
- package/src/modules/OAPPs.js +61 -0
- package/src/modules/Parks.d.ts +72 -0
- package/src/modules/Parks.js +65 -0
- package/src/modules/Plugins.d.ts +78 -0
- package/src/modules/Plugins.js +69 -0
- package/src/modules/Quests.d.ts +129 -0
- package/src/modules/Quests.js +101 -0
- package/src/modules/Runtimes.d.ts +81 -0
- package/src/modules/Runtimes.js +69 -0
- package/src/modules/STAR.d.ts +18 -0
- package/src/modules/STAR.js +29 -0
- package/src/modules/Templates.d.ts +72 -0
- package/src/modules/Templates.js +63 -0
- package/src/modules/Zomes.d.ts +72 -0
- package/src/modules/Zomes.js +65 -0
- package/src/modules/ZomesMetaData.d.ts +69 -0
- package/src/modules/ZomesMetaData.js +61 -0
- package/src/modules/index.js +67 -0
|
@@ -0,0 +1,1008 @@
|
|
|
1
|
+
# NFTs — `star.nFTs`
|
|
2
|
+
|
|
3
|
+
Source controller: [`NFTsController.cs`](https://github.com/NextGenSoftwareUK/OASIS2/blob/main/STAR%20ODK/NextGenSoftware.OASIS.STAR.WebAPI/Controllers/NFTsController.cs)
|
|
4
|
+
Route prefix: `api/nFTs`
|
|
5
|
+
21 operation(s).
|
|
6
|
+
|
|
7
|
+
Every method takes a single args object: any key matching a `{token}` in the route is substituted into the URL; everything else becomes the query string (GET/DELETE) or JSON body (POST/PUT). Every call resolves to the standard OASIS envelope:
|
|
8
|
+
|
|
9
|
+
```ts
|
|
10
|
+
{
|
|
11
|
+
isError: boolean;
|
|
12
|
+
isWarning: boolean;
|
|
13
|
+
message: string;
|
|
14
|
+
errorCode?: string;
|
|
15
|
+
result: T; // see each endpoint's Response section below
|
|
16
|
+
}
|
|
17
|
+
```
|
|
18
|
+
|
|
19
|
+
## Operations
|
|
20
|
+
|
|
21
|
+
### `activateNFT`
|
|
22
|
+
|
|
23
|
+
Activates an NFT.
|
|
24
|
+
|
|
25
|
+
**POST** `api/nFTs/{id}/activate`
|
|
26
|
+
|
|
27
|
+
Route parameters:
|
|
28
|
+
|
|
29
|
+
| Field | Type |
|
|
30
|
+
| --- | --- |
|
|
31
|
+
| `id` | `Guid` |
|
|
32
|
+
|
|
33
|
+
**Request**
|
|
34
|
+
|
|
35
|
+
Body fields:
|
|
36
|
+
|
|
37
|
+
| Field | Type |
|
|
38
|
+
| --- | --- |
|
|
39
|
+
| `version` | `int (optional)` |
|
|
40
|
+
|
|
41
|
+
**Response**
|
|
42
|
+
|
|
43
|
+
Standard `OASISResult` envelope (see top of this page) with:
|
|
44
|
+
|
|
45
|
+
`result` type: `IActionResult` (not part of the request/response payload).
|
|
46
|
+
|
|
47
|
+
**Example**
|
|
48
|
+
|
|
49
|
+
```js
|
|
50
|
+
const { isError, message, result } = await star.nFTs.activateNFT({
|
|
51
|
+
id: '<id>',
|
|
52
|
+
version: 1
|
|
53
|
+
});
|
|
54
|
+
if (isError) throw new Error(message);
|
|
55
|
+
console.log(result);
|
|
56
|
+
```
|
|
57
|
+
|
|
58
|
+
Example response:
|
|
59
|
+
|
|
60
|
+
```json
|
|
61
|
+
{
|
|
62
|
+
"isError": false,
|
|
63
|
+
"message": "",
|
|
64
|
+
"result": null
|
|
65
|
+
}
|
|
66
|
+
```
|
|
67
|
+
|
|
68
|
+
---
|
|
69
|
+
|
|
70
|
+
### `cloneNFT`
|
|
71
|
+
|
|
72
|
+
**POST** `api/nFTs/{id}/clone`
|
|
73
|
+
|
|
74
|
+
Route parameters:
|
|
75
|
+
|
|
76
|
+
| Field | Type |
|
|
77
|
+
| --- | --- |
|
|
78
|
+
| `id` | `Guid` |
|
|
79
|
+
|
|
80
|
+
**Request**
|
|
81
|
+
|
|
82
|
+
Body type: `CloneRequest`
|
|
83
|
+
|
|
84
|
+
| Field | Type |
|
|
85
|
+
| --- | --- |
|
|
86
|
+
| `NewName` | `string` |
|
|
87
|
+
|
|
88
|
+
**Response**
|
|
89
|
+
|
|
90
|
+
Standard `OASISResult` envelope (see top of this page) with:
|
|
91
|
+
|
|
92
|
+
`result` type: `IActionResult` (not part of the request/response payload).
|
|
93
|
+
|
|
94
|
+
**Example**
|
|
95
|
+
|
|
96
|
+
```js
|
|
97
|
+
const { isError, message, result } = await star.nFTs.cloneNFT({
|
|
98
|
+
id: '<id>',
|
|
99
|
+
newName: "example string"
|
|
100
|
+
});
|
|
101
|
+
if (isError) throw new Error(message);
|
|
102
|
+
console.log(result);
|
|
103
|
+
```
|
|
104
|
+
|
|
105
|
+
Example response:
|
|
106
|
+
|
|
107
|
+
```json
|
|
108
|
+
{
|
|
109
|
+
"isError": false,
|
|
110
|
+
"message": "",
|
|
111
|
+
"result": null
|
|
112
|
+
}
|
|
113
|
+
```
|
|
114
|
+
|
|
115
|
+
---
|
|
116
|
+
|
|
117
|
+
### `createNFT`
|
|
118
|
+
|
|
119
|
+
Creates a new NFT for the authenticated avatar.
|
|
120
|
+
|
|
121
|
+
**POST** `api/nFTs`
|
|
122
|
+
|
|
123
|
+
**Request**
|
|
124
|
+
|
|
125
|
+
Body type: `STARNFT`
|
|
126
|
+
|
|
127
|
+
| Field | Type |
|
|
128
|
+
| --- | --- |
|
|
129
|
+
| `NFTType` | `NFTType` |
|
|
130
|
+
| `OASISNFTId` | `Guid` |
|
|
131
|
+
|
|
132
|
+
**Response**
|
|
133
|
+
|
|
134
|
+
Standard `OASISResult` envelope (see top of this page) with:
|
|
135
|
+
|
|
136
|
+
`result` type: `IActionResult` (not part of the request/response payload).
|
|
137
|
+
|
|
138
|
+
**Example**
|
|
139
|
+
|
|
140
|
+
```js
|
|
141
|
+
const { isError, message, result } = await star.nFTs.createNFT({
|
|
142
|
+
nFTType: { },
|
|
143
|
+
oASISNFTId: "3fa85f64-5717-4562-b3fc-2c963f66afa6"
|
|
144
|
+
});
|
|
145
|
+
if (isError) throw new Error(message);
|
|
146
|
+
console.log(result);
|
|
147
|
+
```
|
|
148
|
+
|
|
149
|
+
Example response:
|
|
150
|
+
|
|
151
|
+
```json
|
|
152
|
+
{
|
|
153
|
+
"isError": false,
|
|
154
|
+
"message": "",
|
|
155
|
+
"result": null
|
|
156
|
+
}
|
|
157
|
+
```
|
|
158
|
+
|
|
159
|
+
---
|
|
160
|
+
|
|
161
|
+
### `createNFTWithOptions`
|
|
162
|
+
|
|
163
|
+
Creates a new NFT with specified parameters.
|
|
164
|
+
|
|
165
|
+
**POST** `api/nFTs/create`
|
|
166
|
+
|
|
167
|
+
**Request**
|
|
168
|
+
|
|
169
|
+
Body type: `CreateNFTRequest`
|
|
170
|
+
|
|
171
|
+
| Field | Type |
|
|
172
|
+
| --- | --- |
|
|
173
|
+
| `Name` | `string` |
|
|
174
|
+
| `Description` | `string` |
|
|
175
|
+
| `HolonSubType` | `HolonType` |
|
|
176
|
+
| `SourceFolderPath` | `string` |
|
|
177
|
+
| `CreateOptions` | `ISTARNETCreateOptions<STARNFT, STARNETDNA>` |
|
|
178
|
+
|
|
179
|
+
**Response**
|
|
180
|
+
|
|
181
|
+
Standard `OASISResult` envelope (see top of this page) with:
|
|
182
|
+
|
|
183
|
+
`result` type: `IActionResult` (not part of the request/response payload).
|
|
184
|
+
|
|
185
|
+
**Example**
|
|
186
|
+
|
|
187
|
+
```js
|
|
188
|
+
const { isError, message, result } = await star.nFTs.createNFTWithOptions({
|
|
189
|
+
name: "example string",
|
|
190
|
+
description: "example string",
|
|
191
|
+
holonSubType: { },
|
|
192
|
+
sourceFolderPath: "example string",
|
|
193
|
+
createOptions: { "STARNETHolon": /* <T1> */, "STARNETDNA": /* <T2> */, "MetaTagMappings": { "MetaHolonTags": [{ "HolonName": "example string", "HolonType": { }, "NodeName": "example string", "NodeType": { "Score": 1.0 }, "MetaTag": "example string" }], "MetaTags": { "<string>": "example string" } }, "CheckIfSourcePathExists": true, "CustomCreateParams": { "<string>": {} } }
|
|
194
|
+
});
|
|
195
|
+
if (isError) throw new Error(message);
|
|
196
|
+
console.log(result);
|
|
197
|
+
```
|
|
198
|
+
|
|
199
|
+
Example response:
|
|
200
|
+
|
|
201
|
+
```json
|
|
202
|
+
{
|
|
203
|
+
"isError": false,
|
|
204
|
+
"message": "",
|
|
205
|
+
"result": null
|
|
206
|
+
}
|
|
207
|
+
```
|
|
208
|
+
|
|
209
|
+
---
|
|
210
|
+
|
|
211
|
+
### `deactivateNFT`
|
|
212
|
+
|
|
213
|
+
Deactivates an NFT.
|
|
214
|
+
|
|
215
|
+
**POST** `api/nFTs/{id}/deactivate`
|
|
216
|
+
|
|
217
|
+
Route parameters:
|
|
218
|
+
|
|
219
|
+
| Field | Type |
|
|
220
|
+
| --- | --- |
|
|
221
|
+
| `id` | `Guid` |
|
|
222
|
+
|
|
223
|
+
**Request**
|
|
224
|
+
|
|
225
|
+
Body fields:
|
|
226
|
+
|
|
227
|
+
| Field | Type |
|
|
228
|
+
| --- | --- |
|
|
229
|
+
| `version` | `int (optional)` |
|
|
230
|
+
|
|
231
|
+
**Response**
|
|
232
|
+
|
|
233
|
+
Standard `OASISResult` envelope (see top of this page) with:
|
|
234
|
+
|
|
235
|
+
`result` type: `IActionResult` (not part of the request/response payload).
|
|
236
|
+
|
|
237
|
+
**Example**
|
|
238
|
+
|
|
239
|
+
```js
|
|
240
|
+
const { isError, message, result } = await star.nFTs.deactivateNFT({
|
|
241
|
+
id: '<id>',
|
|
242
|
+
version: 1
|
|
243
|
+
});
|
|
244
|
+
if (isError) throw new Error(message);
|
|
245
|
+
console.log(result);
|
|
246
|
+
```
|
|
247
|
+
|
|
248
|
+
Example response:
|
|
249
|
+
|
|
250
|
+
```json
|
|
251
|
+
{
|
|
252
|
+
"isError": false,
|
|
253
|
+
"message": "",
|
|
254
|
+
"result": null
|
|
255
|
+
}
|
|
256
|
+
```
|
|
257
|
+
|
|
258
|
+
---
|
|
259
|
+
|
|
260
|
+
### `deleteNFT`
|
|
261
|
+
|
|
262
|
+
**DELETE** `api/nFTs/{id}`
|
|
263
|
+
|
|
264
|
+
Route parameters:
|
|
265
|
+
|
|
266
|
+
| Field | Type |
|
|
267
|
+
| --- | --- |
|
|
268
|
+
| `id` | `Guid` |
|
|
269
|
+
|
|
270
|
+
**Request**
|
|
271
|
+
|
|
272
|
+
No request body.
|
|
273
|
+
|
|
274
|
+
**Response**
|
|
275
|
+
|
|
276
|
+
Standard `OASISResult` envelope (see top of this page) with:
|
|
277
|
+
|
|
278
|
+
`result` type: `IActionResult` (not part of the request/response payload).
|
|
279
|
+
|
|
280
|
+
**Example**
|
|
281
|
+
|
|
282
|
+
```js
|
|
283
|
+
const { isError, message, result } = await star.nFTs.deleteNFT({
|
|
284
|
+
id: '<id>'
|
|
285
|
+
});
|
|
286
|
+
if (isError) throw new Error(message);
|
|
287
|
+
console.log(result);
|
|
288
|
+
```
|
|
289
|
+
|
|
290
|
+
Example response:
|
|
291
|
+
|
|
292
|
+
```json
|
|
293
|
+
{
|
|
294
|
+
"isError": false,
|
|
295
|
+
"message": "",
|
|
296
|
+
"result": null
|
|
297
|
+
}
|
|
298
|
+
```
|
|
299
|
+
|
|
300
|
+
---
|
|
301
|
+
|
|
302
|
+
### `downloadNFT`
|
|
303
|
+
|
|
304
|
+
Downloads an NFT from the STARNET system.
|
|
305
|
+
|
|
306
|
+
**POST** `api/nFTs/{id}/download`
|
|
307
|
+
|
|
308
|
+
Route parameters:
|
|
309
|
+
|
|
310
|
+
| Field | Type |
|
|
311
|
+
| --- | --- |
|
|
312
|
+
| `id` | `Guid` |
|
|
313
|
+
|
|
314
|
+
**Request**
|
|
315
|
+
|
|
316
|
+
Body fields:
|
|
317
|
+
|
|
318
|
+
| Field | Type |
|
|
319
|
+
| --- | --- |
|
|
320
|
+
| `version` | `int (optional)` |
|
|
321
|
+
| `downloadPath` | `string (optional)` |
|
|
322
|
+
| `reInstall` | `bool (optional)` |
|
|
323
|
+
|
|
324
|
+
**Response**
|
|
325
|
+
|
|
326
|
+
Standard `OASISResult` envelope (see top of this page) with:
|
|
327
|
+
|
|
328
|
+
`result` type: `IActionResult` (not part of the request/response payload).
|
|
329
|
+
|
|
330
|
+
**Example**
|
|
331
|
+
|
|
332
|
+
```js
|
|
333
|
+
const { isError, message, result } = await star.nFTs.downloadNFT({
|
|
334
|
+
id: '<id>',
|
|
335
|
+
version: 1,
|
|
336
|
+
downloadPath: 'example string',
|
|
337
|
+
reInstall: true
|
|
338
|
+
});
|
|
339
|
+
if (isError) throw new Error(message);
|
|
340
|
+
console.log(result);
|
|
341
|
+
```
|
|
342
|
+
|
|
343
|
+
Example response:
|
|
344
|
+
|
|
345
|
+
```json
|
|
346
|
+
{
|
|
347
|
+
"isError": false,
|
|
348
|
+
"message": "",
|
|
349
|
+
"result": null
|
|
350
|
+
}
|
|
351
|
+
```
|
|
352
|
+
|
|
353
|
+
---
|
|
354
|
+
|
|
355
|
+
### `editNFT`
|
|
356
|
+
|
|
357
|
+
Edits an NFT with new DNA configuration.
|
|
358
|
+
|
|
359
|
+
**POST** `api/nFTs/{id}/edit`
|
|
360
|
+
|
|
361
|
+
Route parameters:
|
|
362
|
+
|
|
363
|
+
| Field | Type |
|
|
364
|
+
| --- | --- |
|
|
365
|
+
| `id` | `Guid` |
|
|
366
|
+
|
|
367
|
+
**Request**
|
|
368
|
+
|
|
369
|
+
Body type: `EditNFTRequest`
|
|
370
|
+
|
|
371
|
+
| Field | Type |
|
|
372
|
+
| --- | --- |
|
|
373
|
+
| `NewDNA` | `STARNETDNA` |
|
|
374
|
+
|
|
375
|
+
**Response**
|
|
376
|
+
|
|
377
|
+
Standard `OASISResult` envelope (see top of this page) with:
|
|
378
|
+
|
|
379
|
+
`result` type: `IActionResult` (not part of the request/response payload).
|
|
380
|
+
|
|
381
|
+
**Example**
|
|
382
|
+
|
|
383
|
+
```js
|
|
384
|
+
const { isError, message, result } = await star.nFTs.editNFT({
|
|
385
|
+
id: '<id>',
|
|
386
|
+
newDNA: { "Id": "3fa85f64-5717-4562-b3fc-2c963f66afa6", "Name": "example string", "Description": "example string", "STARNETHolonType": "example string", "STARNETCategory": {}, "STARNETSubCategory": {}, "Dependencies": { "OAPPs": [{ "Type": { }, "HolonId": "3fa85f64-5717-4562-b3fc-2c963f66afa6", "STARNETHolonId": "3fa85f64-5717-4562-b3fc-2c963f66afa6", "Name": "example string", "Description": "example string", "Version": "example string", "VersionSequence": 1, "Install": true, "InstallMode": { }, "InstalledFrom": "example string", "InstalledTo": "example string" }], "Runtimes": [], "Libraries": [], "Templates": [], "NFTs": [], "NFTCollections": [], "GeoNFTs": [], "GeoNFTCollections": [], "GeoHotSpots": [], "Quests": [], "Missions": [], "Chapters": [], "InventoryItems": [], "CelestialSpaces": [], "CelestialBodies": [], "Zomes": [], "Holons": [], "CelestialBodiesMetaDataDNA": [], "ZomesMetaDataDNA": [], "HolonsMetaDataDNA": [] }, "MetaData": { "<string>": {} }, "MetaHolonTagMappings": /* <>> */, "MetaTagMappings": { "<string>": "example string" }, "CreatedByAvatarId": "3fa85f64-5717-4562-b3fc-2c963f66afa6", "CreatedByAvatarUsername": "example string", "CreatedOn": "2026-01-01T00:00:00Z", "SourcePath": "example string", "PublishedPath": "example string", "PublishedByAvatarId": "3fa85f64-5717-4562-b3fc-2c963f66afa6", "PublishedByAvatarUsername": "example string", "PublishedOn": "2026-01-01T00:00:00Z", "LaunchTarget": "example string", "ModifiedByAvatarId": "3fa85f64-5717-4562-b3fc-2c963f66afa6", "ModifiedByAvatarUsername": "example string", "ModifiedOn": "2026-01-01T00:00:00Z", "PublishedOnSTARNET": true, "PublishedToCloud": true, "PublishedToPinata": true, "PinataIPFSHash": "example string", "PublishedProviderType": "example string", "FileSize": 1, "Version": "example string", "OASISRuntimeVersion": "example string", "OASISAPIVersion": "example string", "COSMICVersion": "example string", "STARRuntimeVersion": "example string", "STARODKVersion": "example string", "STARAPIVersion": "example string", "STARNETVersion": "example string", "DotNetVersion": "example string", "VersionSequence": 1, "Downloads": 1, "Installs": 1, "TotalDownloads": 1, "TotalInstalls": 1, "NumberOfVersions": 1 }
|
|
387
|
+
});
|
|
388
|
+
if (isError) throw new Error(message);
|
|
389
|
+
console.log(result);
|
|
390
|
+
```
|
|
391
|
+
|
|
392
|
+
Example response:
|
|
393
|
+
|
|
394
|
+
```json
|
|
395
|
+
{
|
|
396
|
+
"isError": false,
|
|
397
|
+
"message": "",
|
|
398
|
+
"result": null
|
|
399
|
+
}
|
|
400
|
+
```
|
|
401
|
+
|
|
402
|
+
---
|
|
403
|
+
|
|
404
|
+
### `getAllNFTs`
|
|
405
|
+
|
|
406
|
+
Retrieves all NFTs in the system.
|
|
407
|
+
|
|
408
|
+
**GET** `api/nFTs`
|
|
409
|
+
|
|
410
|
+
**Request**
|
|
411
|
+
|
|
412
|
+
No request body.
|
|
413
|
+
|
|
414
|
+
**Response**
|
|
415
|
+
|
|
416
|
+
Standard `OASISResult` envelope (see top of this page) with:
|
|
417
|
+
|
|
418
|
+
`result` type: `IActionResult` (not part of the request/response payload).
|
|
419
|
+
|
|
420
|
+
**Example**
|
|
421
|
+
|
|
422
|
+
```js
|
|
423
|
+
const { isError, message, result } = await star.nFTs.getAllNFTs({});
|
|
424
|
+
if (isError) throw new Error(message);
|
|
425
|
+
console.log(result);
|
|
426
|
+
```
|
|
427
|
+
|
|
428
|
+
Example response:
|
|
429
|
+
|
|
430
|
+
```json
|
|
431
|
+
{
|
|
432
|
+
"isError": false,
|
|
433
|
+
"message": "",
|
|
434
|
+
"result": null
|
|
435
|
+
}
|
|
436
|
+
```
|
|
437
|
+
|
|
438
|
+
---
|
|
439
|
+
|
|
440
|
+
### `getNFT`
|
|
441
|
+
|
|
442
|
+
Retrieves a specific NFT by its unique identifier.
|
|
443
|
+
|
|
444
|
+
**GET** `api/nFTs/{id}`
|
|
445
|
+
|
|
446
|
+
Route parameters:
|
|
447
|
+
|
|
448
|
+
| Field | Type |
|
|
449
|
+
| --- | --- |
|
|
450
|
+
| `id` | `Guid` |
|
|
451
|
+
|
|
452
|
+
**Request**
|
|
453
|
+
|
|
454
|
+
No request body.
|
|
455
|
+
|
|
456
|
+
**Response**
|
|
457
|
+
|
|
458
|
+
Standard `OASISResult` envelope (see top of this page) with:
|
|
459
|
+
|
|
460
|
+
`result` type: `IActionResult` (not part of the request/response payload).
|
|
461
|
+
|
|
462
|
+
**Example**
|
|
463
|
+
|
|
464
|
+
```js
|
|
465
|
+
const { isError, message, result } = await star.nFTs.getNFT({
|
|
466
|
+
id: '<id>'
|
|
467
|
+
});
|
|
468
|
+
if (isError) throw new Error(message);
|
|
469
|
+
console.log(result);
|
|
470
|
+
```
|
|
471
|
+
|
|
472
|
+
Example response:
|
|
473
|
+
|
|
474
|
+
```json
|
|
475
|
+
{
|
|
476
|
+
"isError": false,
|
|
477
|
+
"message": "",
|
|
478
|
+
"result": null
|
|
479
|
+
}
|
|
480
|
+
```
|
|
481
|
+
|
|
482
|
+
---
|
|
483
|
+
|
|
484
|
+
### `getNFTVersions`
|
|
485
|
+
|
|
486
|
+
Gets all versions of a specific NFT.
|
|
487
|
+
|
|
488
|
+
**GET** `api/nFTs/{id}/versions`
|
|
489
|
+
|
|
490
|
+
Route parameters:
|
|
491
|
+
|
|
492
|
+
| Field | Type |
|
|
493
|
+
| --- | --- |
|
|
494
|
+
| `id` | `Guid` |
|
|
495
|
+
|
|
496
|
+
**Request**
|
|
497
|
+
|
|
498
|
+
No request body.
|
|
499
|
+
|
|
500
|
+
**Response**
|
|
501
|
+
|
|
502
|
+
Standard `OASISResult` envelope (see top of this page) with:
|
|
503
|
+
|
|
504
|
+
`result` type: `IActionResult` (not part of the request/response payload).
|
|
505
|
+
|
|
506
|
+
**Example**
|
|
507
|
+
|
|
508
|
+
```js
|
|
509
|
+
const { isError, message, result } = await star.nFTs.getNFTVersions({
|
|
510
|
+
id: '<id>'
|
|
511
|
+
});
|
|
512
|
+
if (isError) throw new Error(message);
|
|
513
|
+
console.log(result);
|
|
514
|
+
```
|
|
515
|
+
|
|
516
|
+
Example response:
|
|
517
|
+
|
|
518
|
+
```json
|
|
519
|
+
{
|
|
520
|
+
"isError": false,
|
|
521
|
+
"message": "",
|
|
522
|
+
"result": null
|
|
523
|
+
}
|
|
524
|
+
```
|
|
525
|
+
|
|
526
|
+
---
|
|
527
|
+
|
|
528
|
+
### `loadAllNFTsForAvatar`
|
|
529
|
+
|
|
530
|
+
Loads all NFTs for the authenticated avatar.
|
|
531
|
+
|
|
532
|
+
**GET** `api/nFTs/load-all-for-avatar`
|
|
533
|
+
|
|
534
|
+
**Request**
|
|
535
|
+
|
|
536
|
+
Query parameters:
|
|
537
|
+
|
|
538
|
+
| Field | Type |
|
|
539
|
+
| --- | --- |
|
|
540
|
+
| `showAllVersions` | `bool (optional)` |
|
|
541
|
+
| `version` | `int (optional)` |
|
|
542
|
+
|
|
543
|
+
**Response**
|
|
544
|
+
|
|
545
|
+
Standard `OASISResult` envelope (see top of this page) with:
|
|
546
|
+
|
|
547
|
+
`result` type: `IActionResult` (not part of the request/response payload).
|
|
548
|
+
|
|
549
|
+
**Example**
|
|
550
|
+
|
|
551
|
+
```js
|
|
552
|
+
const { isError, message, result } = await star.nFTs.loadAllNFTsForAvatar({
|
|
553
|
+
showAllVersions: true,
|
|
554
|
+
version: 1
|
|
555
|
+
});
|
|
556
|
+
if (isError) throw new Error(message);
|
|
557
|
+
console.log(result);
|
|
558
|
+
```
|
|
559
|
+
|
|
560
|
+
Example response:
|
|
561
|
+
|
|
562
|
+
```json
|
|
563
|
+
{
|
|
564
|
+
"isError": false,
|
|
565
|
+
"message": "",
|
|
566
|
+
"result": null
|
|
567
|
+
}
|
|
568
|
+
```
|
|
569
|
+
|
|
570
|
+
---
|
|
571
|
+
|
|
572
|
+
### `loadNFT`
|
|
573
|
+
|
|
574
|
+
Loads an NFT by ID with optional version and holon type.
|
|
575
|
+
|
|
576
|
+
**GET** `api/nFTs/{id}/load`
|
|
577
|
+
|
|
578
|
+
Route parameters:
|
|
579
|
+
|
|
580
|
+
| Field | Type |
|
|
581
|
+
| --- | --- |
|
|
582
|
+
| `id` | `Guid` |
|
|
583
|
+
|
|
584
|
+
**Request**
|
|
585
|
+
|
|
586
|
+
Query parameters:
|
|
587
|
+
|
|
588
|
+
| Field | Type |
|
|
589
|
+
| --- | --- |
|
|
590
|
+
| `version` | `int (optional)` |
|
|
591
|
+
| `holonType` | `string (optional)` |
|
|
592
|
+
|
|
593
|
+
**Response**
|
|
594
|
+
|
|
595
|
+
Standard `OASISResult` envelope (see top of this page) with:
|
|
596
|
+
|
|
597
|
+
`result` type: `IActionResult` (not part of the request/response payload).
|
|
598
|
+
|
|
599
|
+
**Example**
|
|
600
|
+
|
|
601
|
+
```js
|
|
602
|
+
const { isError, message, result } = await star.nFTs.loadNFT({
|
|
603
|
+
id: '<id>',
|
|
604
|
+
version: 1,
|
|
605
|
+
holonType: 'example string'
|
|
606
|
+
});
|
|
607
|
+
if (isError) throw new Error(message);
|
|
608
|
+
console.log(result);
|
|
609
|
+
```
|
|
610
|
+
|
|
611
|
+
Example response:
|
|
612
|
+
|
|
613
|
+
```json
|
|
614
|
+
{
|
|
615
|
+
"isError": false,
|
|
616
|
+
"message": "",
|
|
617
|
+
"result": null
|
|
618
|
+
}
|
|
619
|
+
```
|
|
620
|
+
|
|
621
|
+
---
|
|
622
|
+
|
|
623
|
+
### `loadNFTFromPath`
|
|
624
|
+
|
|
625
|
+
Loads an NFT from source or installed folder path.
|
|
626
|
+
|
|
627
|
+
**GET** `api/nFTs/load-from-path`
|
|
628
|
+
|
|
629
|
+
**Request**
|
|
630
|
+
|
|
631
|
+
Query parameters:
|
|
632
|
+
|
|
633
|
+
| Field | Type |
|
|
634
|
+
| --- | --- |
|
|
635
|
+
| `path` | `string` |
|
|
636
|
+
| `holonType` | `string (optional)` |
|
|
637
|
+
|
|
638
|
+
**Response**
|
|
639
|
+
|
|
640
|
+
Standard `OASISResult` envelope (see top of this page) with:
|
|
641
|
+
|
|
642
|
+
`result` type: `IActionResult` (not part of the request/response payload).
|
|
643
|
+
|
|
644
|
+
**Example**
|
|
645
|
+
|
|
646
|
+
```js
|
|
647
|
+
const { isError, message, result } = await star.nFTs.loadNFTFromPath({
|
|
648
|
+
path: 'example string',
|
|
649
|
+
holonType: 'example string'
|
|
650
|
+
});
|
|
651
|
+
if (isError) throw new Error(message);
|
|
652
|
+
console.log(result);
|
|
653
|
+
```
|
|
654
|
+
|
|
655
|
+
Example response:
|
|
656
|
+
|
|
657
|
+
```json
|
|
658
|
+
{
|
|
659
|
+
"isError": false,
|
|
660
|
+
"message": "",
|
|
661
|
+
"result": null
|
|
662
|
+
}
|
|
663
|
+
```
|
|
664
|
+
|
|
665
|
+
---
|
|
666
|
+
|
|
667
|
+
### `loadNFTFromPublished`
|
|
668
|
+
|
|
669
|
+
Loads an NFT from a published file.
|
|
670
|
+
|
|
671
|
+
**GET** `api/nFTs/load-from-published`
|
|
672
|
+
|
|
673
|
+
**Request**
|
|
674
|
+
|
|
675
|
+
Query parameters:
|
|
676
|
+
|
|
677
|
+
| Field | Type |
|
|
678
|
+
| --- | --- |
|
|
679
|
+
| `publishedFilePath` | `string` |
|
|
680
|
+
|
|
681
|
+
**Response**
|
|
682
|
+
|
|
683
|
+
Standard `OASISResult` envelope (see top of this page) with:
|
|
684
|
+
|
|
685
|
+
`result` type: `IActionResult` (not part of the request/response payload).
|
|
686
|
+
|
|
687
|
+
**Example**
|
|
688
|
+
|
|
689
|
+
```js
|
|
690
|
+
const { isError, message, result } = await star.nFTs.loadNFTFromPublished({
|
|
691
|
+
publishedFilePath: 'example string'
|
|
692
|
+
});
|
|
693
|
+
if (isError) throw new Error(message);
|
|
694
|
+
console.log(result);
|
|
695
|
+
```
|
|
696
|
+
|
|
697
|
+
Example response:
|
|
698
|
+
|
|
699
|
+
```json
|
|
700
|
+
{
|
|
701
|
+
"isError": false,
|
|
702
|
+
"message": "",
|
|
703
|
+
"result": null
|
|
704
|
+
}
|
|
705
|
+
```
|
|
706
|
+
|
|
707
|
+
---
|
|
708
|
+
|
|
709
|
+
### `loadNFTVersion`
|
|
710
|
+
|
|
711
|
+
Loads a specific version of an NFT.
|
|
712
|
+
|
|
713
|
+
**GET** `api/nFTs/{id}/version/{version}`
|
|
714
|
+
|
|
715
|
+
Route parameters:
|
|
716
|
+
|
|
717
|
+
| Field | Type |
|
|
718
|
+
| --- | --- |
|
|
719
|
+
| `id` | `Guid` |
|
|
720
|
+
| `version` | `string` |
|
|
721
|
+
|
|
722
|
+
**Request**
|
|
723
|
+
|
|
724
|
+
No request body.
|
|
725
|
+
|
|
726
|
+
**Response**
|
|
727
|
+
|
|
728
|
+
Standard `OASISResult` envelope (see top of this page) with:
|
|
729
|
+
|
|
730
|
+
`result` type: `IActionResult` (not part of the request/response payload).
|
|
731
|
+
|
|
732
|
+
**Example**
|
|
733
|
+
|
|
734
|
+
```js
|
|
735
|
+
const { isError, message, result } = await star.nFTs.loadNFTVersion({
|
|
736
|
+
id: '<id>',
|
|
737
|
+
version: '<version>'
|
|
738
|
+
});
|
|
739
|
+
if (isError) throw new Error(message);
|
|
740
|
+
console.log(result);
|
|
741
|
+
```
|
|
742
|
+
|
|
743
|
+
Example response:
|
|
744
|
+
|
|
745
|
+
```json
|
|
746
|
+
{
|
|
747
|
+
"isError": false,
|
|
748
|
+
"message": "",
|
|
749
|
+
"result": null
|
|
750
|
+
}
|
|
751
|
+
```
|
|
752
|
+
|
|
753
|
+
---
|
|
754
|
+
|
|
755
|
+
### `publishNFT`
|
|
756
|
+
|
|
757
|
+
Publishes an NFT to the STARNET system.
|
|
758
|
+
|
|
759
|
+
**POST** `api/nFTs/{id}/publish`
|
|
760
|
+
|
|
761
|
+
Route parameters:
|
|
762
|
+
|
|
763
|
+
| Field | Type |
|
|
764
|
+
| --- | --- |
|
|
765
|
+
| `id` | `Guid` |
|
|
766
|
+
|
|
767
|
+
**Request**
|
|
768
|
+
|
|
769
|
+
Body type: `PublishRequest`
|
|
770
|
+
|
|
771
|
+
| Field | Type |
|
|
772
|
+
| --- | --- |
|
|
773
|
+
| `SourcePath` | `string` |
|
|
774
|
+
| `LaunchTarget` | `string` |
|
|
775
|
+
| `PublishPath` | `string` |
|
|
776
|
+
| `Edit` | `bool` |
|
|
777
|
+
| `RegisterOnSTARNET` | `bool` |
|
|
778
|
+
| `GenerateBinary` | `bool` |
|
|
779
|
+
| `UploadToCloud` | `bool` |
|
|
780
|
+
|
|
781
|
+
**Response**
|
|
782
|
+
|
|
783
|
+
Standard `OASISResult` envelope (see top of this page) with:
|
|
784
|
+
|
|
785
|
+
`result` type: `IActionResult` (not part of the request/response payload).
|
|
786
|
+
|
|
787
|
+
**Example**
|
|
788
|
+
|
|
789
|
+
```js
|
|
790
|
+
const { isError, message, result } = await star.nFTs.publishNFT({
|
|
791
|
+
id: '<id>',
|
|
792
|
+
sourcePath: "example string",
|
|
793
|
+
launchTarget: "example string",
|
|
794
|
+
publishPath: "example string",
|
|
795
|
+
edit: true,
|
|
796
|
+
registerOnSTARNET: true,
|
|
797
|
+
generateBinary: true,
|
|
798
|
+
uploadToCloud: true
|
|
799
|
+
});
|
|
800
|
+
if (isError) throw new Error(message);
|
|
801
|
+
console.log(result);
|
|
802
|
+
```
|
|
803
|
+
|
|
804
|
+
Example response:
|
|
805
|
+
|
|
806
|
+
```json
|
|
807
|
+
{
|
|
808
|
+
"isError": false,
|
|
809
|
+
"message": "",
|
|
810
|
+
"result": null
|
|
811
|
+
}
|
|
812
|
+
```
|
|
813
|
+
|
|
814
|
+
---
|
|
815
|
+
|
|
816
|
+
### `republishNFT`
|
|
817
|
+
|
|
818
|
+
Republishes an NFT to the STARNET system.
|
|
819
|
+
|
|
820
|
+
**POST** `api/nFTs/{id}/republish`
|
|
821
|
+
|
|
822
|
+
Route parameters:
|
|
823
|
+
|
|
824
|
+
| Field | Type |
|
|
825
|
+
| --- | --- |
|
|
826
|
+
| `id` | `Guid` |
|
|
827
|
+
|
|
828
|
+
**Request**
|
|
829
|
+
|
|
830
|
+
Body fields:
|
|
831
|
+
|
|
832
|
+
| Field | Type |
|
|
833
|
+
| --- | --- |
|
|
834
|
+
| `version` | `int (optional)` |
|
|
835
|
+
|
|
836
|
+
**Response**
|
|
837
|
+
|
|
838
|
+
Standard `OASISResult` envelope (see top of this page) with:
|
|
839
|
+
|
|
840
|
+
`result` type: `IActionResult` (not part of the request/response payload).
|
|
841
|
+
|
|
842
|
+
**Example**
|
|
843
|
+
|
|
844
|
+
```js
|
|
845
|
+
const { isError, message, result } = await star.nFTs.republishNFT({
|
|
846
|
+
id: '<id>',
|
|
847
|
+
version: 1
|
|
848
|
+
});
|
|
849
|
+
if (isError) throw new Error(message);
|
|
850
|
+
console.log(result);
|
|
851
|
+
```
|
|
852
|
+
|
|
853
|
+
Example response:
|
|
854
|
+
|
|
855
|
+
```json
|
|
856
|
+
{
|
|
857
|
+
"isError": false,
|
|
858
|
+
"message": "",
|
|
859
|
+
"result": null
|
|
860
|
+
}
|
|
861
|
+
```
|
|
862
|
+
|
|
863
|
+
---
|
|
864
|
+
|
|
865
|
+
### `searchNFTs`
|
|
866
|
+
|
|
867
|
+
Searches for NFTs by name or description.
|
|
868
|
+
|
|
869
|
+
**GET** `api/nFTs/search`
|
|
870
|
+
|
|
871
|
+
**Request**
|
|
872
|
+
|
|
873
|
+
Query parameters:
|
|
874
|
+
|
|
875
|
+
| Field | Type |
|
|
876
|
+
| --- | --- |
|
|
877
|
+
| `searchTerm` | `string` |
|
|
878
|
+
| `searchOnlyForCurrentAvatar` | `bool (optional)` |
|
|
879
|
+
| `showAllVersions` | `bool (optional)` |
|
|
880
|
+
| `version` | `int (optional)` |
|
|
881
|
+
|
|
882
|
+
**Response**
|
|
883
|
+
|
|
884
|
+
Standard `OASISResult` envelope (see top of this page) with:
|
|
885
|
+
|
|
886
|
+
`result` type: `IActionResult` (not part of the request/response payload).
|
|
887
|
+
|
|
888
|
+
**Example**
|
|
889
|
+
|
|
890
|
+
```js
|
|
891
|
+
const { isError, message, result } = await star.nFTs.searchNFTs({
|
|
892
|
+
searchTerm: 'example string',
|
|
893
|
+
searchOnlyForCurrentAvatar: true,
|
|
894
|
+
showAllVersions: true,
|
|
895
|
+
version: 1
|
|
896
|
+
});
|
|
897
|
+
if (isError) throw new Error(message);
|
|
898
|
+
console.log(result);
|
|
899
|
+
```
|
|
900
|
+
|
|
901
|
+
Example response:
|
|
902
|
+
|
|
903
|
+
```json
|
|
904
|
+
{
|
|
905
|
+
"isError": false,
|
|
906
|
+
"message": "",
|
|
907
|
+
"result": null
|
|
908
|
+
}
|
|
909
|
+
```
|
|
910
|
+
|
|
911
|
+
---
|
|
912
|
+
|
|
913
|
+
### `unpublishNFT`
|
|
914
|
+
|
|
915
|
+
Unpublishes an NFT from the STARNET system.
|
|
916
|
+
|
|
917
|
+
**POST** `api/nFTs/{id}/unpublish`
|
|
918
|
+
|
|
919
|
+
Route parameters:
|
|
920
|
+
|
|
921
|
+
| Field | Type |
|
|
922
|
+
| --- | --- |
|
|
923
|
+
| `id` | `Guid` |
|
|
924
|
+
|
|
925
|
+
**Request**
|
|
926
|
+
|
|
927
|
+
Body fields:
|
|
928
|
+
|
|
929
|
+
| Field | Type |
|
|
930
|
+
| --- | --- |
|
|
931
|
+
| `version` | `int (optional)` |
|
|
932
|
+
|
|
933
|
+
**Response**
|
|
934
|
+
|
|
935
|
+
Standard `OASISResult` envelope (see top of this page) with:
|
|
936
|
+
|
|
937
|
+
`result` type: `IActionResult` (not part of the request/response payload).
|
|
938
|
+
|
|
939
|
+
**Example**
|
|
940
|
+
|
|
941
|
+
```js
|
|
942
|
+
const { isError, message, result } = await star.nFTs.unpublishNFT({
|
|
943
|
+
id: '<id>',
|
|
944
|
+
version: 1
|
|
945
|
+
});
|
|
946
|
+
if (isError) throw new Error(message);
|
|
947
|
+
console.log(result);
|
|
948
|
+
```
|
|
949
|
+
|
|
950
|
+
Example response:
|
|
951
|
+
|
|
952
|
+
```json
|
|
953
|
+
{
|
|
954
|
+
"isError": false,
|
|
955
|
+
"message": "",
|
|
956
|
+
"result": null
|
|
957
|
+
}
|
|
958
|
+
```
|
|
959
|
+
|
|
960
|
+
---
|
|
961
|
+
|
|
962
|
+
### `updateNFT`
|
|
963
|
+
|
|
964
|
+
**PUT** `api/nFTs/{id}`
|
|
965
|
+
|
|
966
|
+
Route parameters:
|
|
967
|
+
|
|
968
|
+
| Field | Type |
|
|
969
|
+
| --- | --- |
|
|
970
|
+
| `id` | `Guid` |
|
|
971
|
+
|
|
972
|
+
**Request**
|
|
973
|
+
|
|
974
|
+
Body type: `STARNFT`
|
|
975
|
+
|
|
976
|
+
| Field | Type |
|
|
977
|
+
| --- | --- |
|
|
978
|
+
| `NFTType` | `NFTType` |
|
|
979
|
+
| `OASISNFTId` | `Guid` |
|
|
980
|
+
|
|
981
|
+
**Response**
|
|
982
|
+
|
|
983
|
+
Standard `OASISResult` envelope (see top of this page) with:
|
|
984
|
+
|
|
985
|
+
`result` type: `IActionResult` (not part of the request/response payload).
|
|
986
|
+
|
|
987
|
+
**Example**
|
|
988
|
+
|
|
989
|
+
```js
|
|
990
|
+
const { isError, message, result } = await star.nFTs.updateNFT({
|
|
991
|
+
id: '<id>',
|
|
992
|
+
nFTType: { },
|
|
993
|
+
oASISNFTId: "3fa85f64-5717-4562-b3fc-2c963f66afa6"
|
|
994
|
+
});
|
|
995
|
+
if (isError) throw new Error(message);
|
|
996
|
+
console.log(result);
|
|
997
|
+
```
|
|
998
|
+
|
|
999
|
+
Example response:
|
|
1000
|
+
|
|
1001
|
+
```json
|
|
1002
|
+
{
|
|
1003
|
+
"isError": false,
|
|
1004
|
+
"message": "",
|
|
1005
|
+
"result": null
|
|
1006
|
+
}
|
|
1007
|
+
```
|
|
1008
|
+
|