@twin.org/nft-service 0.0.1-next.3 → 0.0.1-next.30

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.
@@ -1,685 +1,685 @@
1
1
  {
2
- "openapi": "3.1.0",
3
- "info": {
4
- "title": "TWIN - Test Endpoints",
5
- "description": "REST API for TWIN - Test Endpoints.",
6
- "version": "1.0.0",
7
- "license": {
8
- "name": "Apache 2.0 License",
9
- "url": "https://opensource.org/licenses/Apache-2.0"
10
- }
11
- },
12
- "servers": [
13
- {
14
- "url": "https://localhost"
15
- }
16
- ],
17
- "tags": [
18
- {
19
- "name": "NFT",
20
- "description": "Endpoints which are modelled to access an NFT contract."
21
- }
22
- ],
23
- "paths": {
24
- "/nft": {
25
- "post": {
26
- "operationId": "nftMint",
27
- "summary": "Mint an NFT",
28
- "tags": [
29
- "NFT"
30
- ],
31
- "security": [
32
- {
33
- "jwtBearerAuthScheme": []
34
- }
35
- ],
36
- "requestBody": {
37
- "description": "Mint the data and return the NFT id.",
38
- "required": true,
39
- "content": {
40
- "application/json": {
41
- "schema": {
42
- "$ref": "#/components/schemas/NftMintRequest"
43
- },
44
- "examples": {
45
- "nftMintExample": {
46
- "value": {
47
- "issuer": "tst1prctjk5ck0dutnsunnje6u90jk5htx03qznjjmkd6843pzltlgz87srjzzv",
48
- "tag": "MY-NFT",
49
- "immutableMetadata": {
50
- "docName": "bill-of-lading",
51
- "mimeType": "application/pdf",
52
- "fingerprint": "0xf0b95a98b3dbc5ce1c9ce59d70af95a97599f100a7296ecdd1eb108bebfa047f"
53
- },
54
- "metadata": {
55
- "data": "tst1prctjk5ck0dutnsunnje6u90jk5htx03qznjjmkd6843pzltlgz87srjzzv"
56
- }
57
- }
58
- }
59
- }
60
- }
61
- }
62
- },
63
- "responses": {
64
- "201": {
65
- "description": "The rest request ended in created response.",
66
- "headers": {
67
- "Location": {
68
- "schema": {
69
- "type": "string"
70
- },
71
- "description": "e.g. nft:iota:aW90YS1uZnQ6dHN0OjB4NzYyYjljNDllYTg2OWUwZWJkYTliYmZhNzY5Mzk0NDdhNDI4ZGNmMTc4YzVkMTVhYjQ0N2UyZDRmYmJiNGViMg=="
72
- }
73
- }
74
- },
75
- "400": {
76
- "description": "The server cannot process the request, see the content for more details.",
77
- "content": {
78
- "application/json": {
79
- "schema": {
80
- "$ref": "#/components/schemas/Error"
81
- },
82
- "examples": {
83
- "exampleResponse": {
84
- "value": {
85
- "name": "GeneralError",
86
- "message": "component.error",
87
- "properties": {
88
- "foo": "bar"
89
- }
90
- }
91
- }
92
- }
93
- }
94
- }
95
- },
96
- "401": {
97
- "description": "You are not authorized to use the API or no credentials were supplied, see the content for more details.",
98
- "content": {
99
- "application/json": {
100
- "schema": {
101
- "$ref": "#/components/schemas/Error"
102
- },
103
- "examples": {
104
- "exampleResponse": {
105
- "value": {
106
- "name": "UnauthorizedError",
107
- "message": "component.error"
108
- }
109
- }
110
- }
111
- }
112
- }
113
- },
114
- "500": {
115
- "description": "The server has encountered a situation it does not know how to handle, see the content for more details.",
116
- "content": {
117
- "application/json": {
118
- "schema": {
119
- "$ref": "#/components/schemas/Error"
120
- },
121
- "examples": {
122
- "exampleResponse": {
123
- "value": {
124
- "name": "InternalServerError",
125
- "message": "component.error"
126
- }
127
- }
128
- }
129
- }
130
- }
131
- }
132
- }
133
- }
134
- },
135
- "/nft/{id}": {
136
- "get": {
137
- "operationId": "nftResolve",
138
- "summary": "Resolve an NFT",
139
- "tags": [
140
- "NFT"
141
- ],
142
- "parameters": [
143
- {
144
- "name": "id",
145
- "description": "The id of the NFT to resolve.",
146
- "in": "path",
147
- "required": true,
148
- "schema": {
149
- "type": "string"
150
- },
151
- "style": "simple",
152
- "example": "nft:iota:aW90YS1uZnQ6dHN0OjB4NzYyYjljNDllYTg2OWUwZWJkYTliYmZhNzY5Mzk0NDdhNDI4ZGNmMTc4YzVkMTVhYjQ0N2UyZDRmYmJiNGViMg=="
153
- }
154
- ],
155
- "security": [
156
- {
157
- "jwtBearerAuthScheme": []
158
- }
159
- ],
160
- "responses": {
161
- "200": {
162
- "description": "Response to resolving the NFT.",
163
- "content": {
164
- "application/json": {
165
- "schema": {
166
- "$ref": "#/components/schemas/NftResolveResponse"
167
- },
168
- "examples": {
169
- "nftResolveResponseExample": {
170
- "value": {
171
- "issuer": "tst1prctjk5ck0dutnsunnje6u90jk5htx03qznjjmkd6843pzltlgz87srjzzv",
172
- "owner": "tst1prctjk5ck0dutnsunnje6u90jk5htx03qznjjmkd6843pzltlgz87srjzzv",
173
- "tag": "MY-NFT",
174
- "immutableMetadata": {
175
- "docName": "bill-of-lading",
176
- "mimeType": "application/pdf",
177
- "fingerprint": "0xf0b95a98b3dbc5ce1c9ce59d70af95a97599f100a7296ecdd1eb108bebfa047f"
178
- },
179
- "metadata": {
180
- "data": "AAAAA"
181
- }
182
- }
183
- }
184
- }
185
- }
186
- }
187
- },
188
- "400": {
189
- "description": "The server cannot process the request, see the content for more details.",
190
- "content": {
191
- "application/json": {
192
- "schema": {
193
- "$ref": "#/components/schemas/Error"
194
- },
195
- "examples": {
196
- "exampleResponse": {
197
- "value": {
198
- "name": "GeneralError",
199
- "message": "component.error",
200
- "properties": {
201
- "foo": "bar"
202
- }
203
- }
204
- }
205
- }
206
- }
207
- }
208
- },
209
- "401": {
210
- "description": "You are not authorized to use the API or no credentials were supplied, see the content for more details.",
211
- "content": {
212
- "application/json": {
213
- "schema": {
214
- "$ref": "#/components/schemas/Error"
215
- },
216
- "examples": {
217
- "exampleResponse": {
218
- "value": {
219
- "name": "UnauthorizedError",
220
- "message": "component.error"
221
- }
222
- }
223
- }
224
- }
225
- }
226
- },
227
- "500": {
228
- "description": "The server has encountered a situation it does not know how to handle, see the content for more details.",
229
- "content": {
230
- "application/json": {
231
- "schema": {
232
- "$ref": "#/components/schemas/Error"
233
- },
234
- "examples": {
235
- "exampleResponse": {
236
- "value": {
237
- "name": "InternalServerError",
238
- "message": "component.error"
239
- }
240
- }
241
- }
242
- }
243
- }
244
- }
245
- }
246
- },
247
- "delete": {
248
- "operationId": "nftBurn",
249
- "summary": "Burn an NFT",
250
- "tags": [
251
- "NFT"
252
- ],
253
- "parameters": [
254
- {
255
- "name": "id",
256
- "description": "The id of the NFT to burn.",
257
- "in": "path",
258
- "required": true,
259
- "schema": {
260
- "type": "string"
261
- },
262
- "style": "simple",
263
- "example": "nft:iota:aW90YS1uZnQ6dHN0OjB4NzYyYjljNDllYTg2OWUwZWJkYTliYmZhNzY5Mzk0NDdhNDI4ZGNmMTc4YzVkMTVhYjQ0N2UyZDRmYmJiNGViMg=="
264
- }
265
- ],
266
- "security": [
267
- {
268
- "jwtBearerAuthScheme": []
269
- }
270
- ],
271
- "responses": {
272
- "204": {
273
- "description": "The rest request ended in success with no data."
274
- },
275
- "400": {
276
- "description": "The server cannot process the request, see the content for more details.",
277
- "content": {
278
- "application/json": {
279
- "schema": {
280
- "$ref": "#/components/schemas/Error"
281
- },
282
- "examples": {
283
- "exampleResponse": {
284
- "value": {
285
- "name": "GeneralError",
286
- "message": "component.error",
287
- "properties": {
288
- "foo": "bar"
289
- }
290
- }
291
- }
292
- }
293
- }
294
- }
295
- },
296
- "401": {
297
- "description": "You are not authorized to use the API or no credentials were supplied, see the content for more details.",
298
- "content": {
299
- "application/json": {
300
- "schema": {
301
- "$ref": "#/components/schemas/Error"
302
- },
303
- "examples": {
304
- "exampleResponse": {
305
- "value": {
306
- "name": "UnauthorizedError",
307
- "message": "component.error"
308
- }
309
- }
310
- }
311
- }
312
- }
313
- },
314
- "500": {
315
- "description": "The server has encountered a situation it does not know how to handle, see the content for more details.",
316
- "content": {
317
- "application/json": {
318
- "schema": {
319
- "$ref": "#/components/schemas/Error"
320
- },
321
- "examples": {
322
- "exampleResponse": {
323
- "value": {
324
- "name": "InternalServerError",
325
- "message": "component.error"
326
- }
327
- }
328
- }
329
- }
330
- }
331
- }
332
- }
333
- },
334
- "put": {
335
- "operationId": "nftUpdate",
336
- "summary": "Update an NFT",
337
- "tags": [
338
- "NFT"
339
- ],
340
- "parameters": [
341
- {
342
- "name": "id",
343
- "description": "The id of the NFT to transfer in urn format.",
344
- "in": "path",
345
- "required": true,
346
- "schema": {
347
- "type": "string"
348
- },
349
- "style": "simple",
350
- "example": "nft:iota:aW90YS1uZnQ6dHN0OjB4NzYyYjljNDllYTg2OWUwZWJkYTliYmZhNzY5Mzk0NDdhNDI4ZGNmMTc4YzVkMTVhYjQ0N2UyZDRmYmJiNGViMg=="
351
- }
352
- ],
353
- "security": [
354
- {
355
- "jwtBearerAuthScheme": []
356
- }
357
- ],
358
- "requestBody": {
359
- "description": "Update the mutable data for the NFT.",
360
- "required": true,
361
- "content": {
362
- "application/json": {
363
- "schema": {
364
- "$ref": "#/components/schemas/NftUpdateRequest"
365
- },
366
- "examples": {
367
- "nftUpdateExample": {
368
- "value": {
369
- "metadata": {
370
- "data": "AAAAA"
371
- }
372
- }
373
- }
374
- }
375
- }
376
- }
377
- },
378
- "responses": {
379
- "204": {
380
- "description": "The rest request ended in success with no data."
381
- },
382
- "400": {
383
- "description": "The server cannot process the request, see the content for more details.",
384
- "content": {
385
- "application/json": {
386
- "schema": {
387
- "$ref": "#/components/schemas/Error"
388
- },
389
- "examples": {
390
- "exampleResponse": {
391
- "value": {
392
- "name": "GeneralError",
393
- "message": "component.error",
394
- "properties": {
395
- "foo": "bar"
396
- }
397
- }
398
- }
399
- }
400
- }
401
- }
402
- },
403
- "401": {
404
- "description": "You are not authorized to use the API or no credentials were supplied, see the content for more details.",
405
- "content": {
406
- "application/json": {
407
- "schema": {
408
- "$ref": "#/components/schemas/Error"
409
- },
410
- "examples": {
411
- "exampleResponse": {
412
- "value": {
413
- "name": "UnauthorizedError",
414
- "message": "component.error"
415
- }
416
- }
417
- }
418
- }
419
- }
420
- },
421
- "500": {
422
- "description": "The server has encountered a situation it does not know how to handle, see the content for more details.",
423
- "content": {
424
- "application/json": {
425
- "schema": {
426
- "$ref": "#/components/schemas/Error"
427
- },
428
- "examples": {
429
- "exampleResponse": {
430
- "value": {
431
- "name": "InternalServerError",
432
- "message": "component.error"
433
- }
434
- }
435
- }
436
- }
437
- }
438
- }
439
- }
440
- }
441
- },
442
- "/nft/{id}/transfer": {
443
- "post": {
444
- "operationId": "nftTransfer",
445
- "summary": "Transfer an NFT",
446
- "tags": [
447
- "NFT"
448
- ],
449
- "parameters": [
450
- {
451
- "name": "id",
452
- "description": "The id of the NFT to transfer in urn format.",
453
- "in": "path",
454
- "required": true,
455
- "schema": {
456
- "type": "string"
457
- },
458
- "style": "simple",
459
- "example": "nft:iota:aW90YS1uZnQ6dHN0OjB4NzYyYjljNDllYTg2OWUwZWJkYTliYmZhNzY5Mzk0NDdhNDI4ZGNmMTc4YzVkMTVhYjQ0N2UyZDRmYmJiNGViMg=="
460
- }
461
- ],
462
- "security": [
463
- {
464
- "jwtBearerAuthScheme": []
465
- }
466
- ],
467
- "requestBody": {
468
- "description": "Transfer the NFT and update the metadata.",
469
- "required": true,
470
- "content": {
471
- "application/json": {
472
- "schema": {
473
- "$ref": "#/components/schemas/NftTransferRequest"
474
- },
475
- "examples": {
476
- "nftTransferExample": {
477
- "value": {
478
- "recipient": "tst1prctjk5ck0dutnsunnje6u90jk5htx03qznjjmkd6843pzltlgz87srjzzv",
479
- "metadata": {
480
- "data": "AAAAA"
481
- }
482
- }
483
- }
484
- }
485
- }
486
- }
487
- },
488
- "responses": {
489
- "204": {
490
- "description": "The rest request ended in success with no data."
491
- },
492
- "400": {
493
- "description": "The server cannot process the request, see the content for more details.",
494
- "content": {
495
- "application/json": {
496
- "schema": {
497
- "$ref": "#/components/schemas/Error"
498
- },
499
- "examples": {
500
- "exampleResponse": {
501
- "value": {
502
- "name": "GeneralError",
503
- "message": "component.error",
504
- "properties": {
505
- "foo": "bar"
506
- }
507
- }
508
- }
509
- }
510
- }
511
- }
512
- },
513
- "401": {
514
- "description": "You are not authorized to use the API or no credentials were supplied, see the content for more details.",
515
- "content": {
516
- "application/json": {
517
- "schema": {
518
- "$ref": "#/components/schemas/Error"
519
- },
520
- "examples": {
521
- "exampleResponse": {
522
- "value": {
523
- "name": "UnauthorizedError",
524
- "message": "component.error"
525
- }
526
- }
527
- }
528
- }
529
- }
530
- },
531
- "500": {
532
- "description": "The server has encountered a situation it does not know how to handle, see the content for more details.",
533
- "content": {
534
- "application/json": {
535
- "schema": {
536
- "$ref": "#/components/schemas/Error"
537
- },
538
- "examples": {
539
- "exampleResponse": {
540
- "value": {
541
- "name": "InternalServerError",
542
- "message": "component.error"
543
- }
544
- }
545
- }
546
- }
547
- }
548
- }
549
- }
550
- }
551
- }
552
- },
553
- "components": {
554
- "schemas": {
555
- "Error": {
556
- "type": "object",
557
- "properties": {
558
- "name": {
559
- "type": "string",
560
- "description": "The name for the error."
561
- },
562
- "message": {
563
- "type": "string",
564
- "description": "The message for the error."
565
- },
566
- "source": {
567
- "type": "string",
568
- "description": "The source of the error."
569
- },
570
- "properties": {
571
- "type": "object",
572
- "additionalProperties": {},
573
- "description": "Any additional information for the error."
574
- },
575
- "stack": {
576
- "type": "string",
577
- "description": "The stack trace for the error."
578
- },
579
- "inner": {
580
- "$ref": "#/components/schemas/Error"
581
- }
582
- },
583
- "required": [
584
- "name",
585
- "message"
586
- ],
587
- "additionalProperties": false,
588
- "description": "Model to describe serialized error."
589
- },
590
- "NftMintRequest": {
591
- "type": "object",
592
- "properties": {
593
- "issuer": {
594
- "type": "string",
595
- "description": "The issuer for the NFT, will also be the initial owner."
596
- },
597
- "tag": {
598
- "type": "string",
599
- "description": "The tag for the NFT."
600
- },
601
- "immutableMetadata": {
602
- "description": "The immutable metadata for the NFT."
603
- },
604
- "metadata": {
605
- "description": "The metadata for the NFT."
606
- },
607
- "namespace": {
608
- "type": "string",
609
- "description": "The namespace of the connector to use for the NFT, defaults to component configured namespace."
610
- }
611
- },
612
- "required": [
613
- "issuer",
614
- "tag"
615
- ],
616
- "additionalProperties": false,
617
- "description": "The data to be used in the minting."
618
- },
619
- "NftResolveResponse": {
620
- "type": "object",
621
- "properties": {
622
- "issuer": {
623
- "type": "string",
624
- "description": "The issuer of the NFT."
625
- },
626
- "owner": {
627
- "type": "string",
628
- "description": "The owner of the NFT."
629
- },
630
- "tag": {
631
- "type": "string",
632
- "description": "The tag data for the NFT."
633
- },
634
- "immutableMetadata": {
635
- "description": "The immutable data for the NFT."
636
- },
637
- "metadata": {
638
- "description": "The metadata for the NFT."
639
- }
640
- },
641
- "required": [
642
- "issuer",
643
- "owner",
644
- "tag"
645
- ],
646
- "additionalProperties": false,
647
- "description": "The data that was resolved."
648
- },
649
- "NftTransferRequest": {
650
- "type": "object",
651
- "properties": {
652
- "recipient": {
653
- "type": "string",
654
- "description": "The recipient for the NFT."
655
- },
656
- "metadata": {
657
- "description": "The metadata for the NFT."
658
- }
659
- },
660
- "required": [
661
- "recipient"
662
- ],
663
- "additionalProperties": false,
664
- "description": "The data to be used in the transfer."
665
- },
666
- "NftUpdateRequest": {
667
- "type": "object",
668
- "properties": {
669
- "metadata": {
670
- "description": "The metadata for the NFT."
671
- }
672
- },
673
- "additionalProperties": false,
674
- "description": "The data to be used in the update."
675
- }
676
- },
677
- "securitySchemes": {
678
- "jwtBearerAuthScheme": {
679
- "type": "http",
680
- "scheme": "bearer",
681
- "bearerFormat": "JWT"
682
- }
683
- }
684
- }
685
- }
2
+ "openapi": "3.1.0",
3
+ "info": {
4
+ "title": "TWIN - Test Endpoints",
5
+ "description": "REST API for TWIN - Test Endpoints.",
6
+ "version": "1.0.0",
7
+ "license": {
8
+ "name": "Apache 2.0 License",
9
+ "url": "https://opensource.org/licenses/Apache-2.0"
10
+ }
11
+ },
12
+ "servers": [
13
+ {
14
+ "url": "https://localhost"
15
+ }
16
+ ],
17
+ "tags": [
18
+ {
19
+ "name": "NFT",
20
+ "description": "Endpoints which are modelled to access an NFT contract."
21
+ }
22
+ ],
23
+ "paths": {
24
+ "/nft": {
25
+ "post": {
26
+ "operationId": "nftMint",
27
+ "summary": "Mint an NFT",
28
+ "tags": [
29
+ "NFT"
30
+ ],
31
+ "security": [
32
+ {
33
+ "jwtBearerAuthScheme": []
34
+ }
35
+ ],
36
+ "requestBody": {
37
+ "description": "Mint the data and return the NFT id.",
38
+ "required": true,
39
+ "content": {
40
+ "application/json": {
41
+ "schema": {
42
+ "$ref": "#/components/schemas/NftMintRequest"
43
+ },
44
+ "examples": {
45
+ "nftMintExample": {
46
+ "value": {
47
+ "tag": "MY-NFT",
48
+ "immutableMetadata": {
49
+ "docName": "bill-of-lading",
50
+ "mimeType": "application/pdf",
51
+ "fingerprint": "0xf0b95a98b3dbc5ce1c9ce59d70af95a97599f100a7296ecdd1eb108bebfa047f"
52
+ },
53
+ "metadata": {
54
+ "data": "tst1prctjk5ck0dutnsunnje6u90jk5htx03qznjjmkd6843pzltlgz87srjzzv"
55
+ }
56
+ }
57
+ }
58
+ }
59
+ }
60
+ }
61
+ },
62
+ "responses": {
63
+ "201": {
64
+ "description": "The rest request ended in created response.",
65
+ "headers": {
66
+ "location": {
67
+ "schema": {
68
+ "type": "string"
69
+ },
70
+ "description": "e.g. nft:iota:aW90YS1uZnQ6dHN0OjB4NzYyYjljNDllYTg2OWUwZWJkYTliYmZhNzY5Mzk0NDdhNDI4ZGNmMTc4YzVkMTVhYjQ0N2UyZDRmYmJiNGViMg=="
71
+ }
72
+ }
73
+ },
74
+ "400": {
75
+ "description": "The server cannot process the request, see the content for more details.",
76
+ "content": {
77
+ "application/json": {
78
+ "schema": {
79
+ "$ref": "#/components/schemas/Error"
80
+ },
81
+ "examples": {
82
+ "exampleResponse": {
83
+ "value": {
84
+ "name": "GeneralError",
85
+ "message": "component.error",
86
+ "properties": {
87
+ "foo": "bar"
88
+ }
89
+ }
90
+ }
91
+ }
92
+ }
93
+ }
94
+ },
95
+ "401": {
96
+ "description": "You are not authorized to use the API or no credentials were supplied, see the content for more details.",
97
+ "content": {
98
+ "application/json": {
99
+ "schema": {
100
+ "$ref": "#/components/schemas/Error"
101
+ },
102
+ "examples": {
103
+ "exampleResponse": {
104
+ "value": {
105
+ "name": "UnauthorizedError",
106
+ "message": "component.error"
107
+ }
108
+ }
109
+ }
110
+ }
111
+ }
112
+ },
113
+ "500": {
114
+ "description": "The server has encountered a situation it does not know how to handle, see the content for more details.",
115
+ "content": {
116
+ "application/json": {
117
+ "schema": {
118
+ "$ref": "#/components/schemas/Error"
119
+ },
120
+ "examples": {
121
+ "exampleResponse": {
122
+ "value": {
123
+ "name": "InternalServerError",
124
+ "message": "component.error"
125
+ }
126
+ }
127
+ }
128
+ }
129
+ }
130
+ }
131
+ }
132
+ }
133
+ },
134
+ "/nft/{id}": {
135
+ "get": {
136
+ "operationId": "nftResolve",
137
+ "summary": "Resolve an NFT",
138
+ "tags": [
139
+ "NFT"
140
+ ],
141
+ "parameters": [
142
+ {
143
+ "name": "id",
144
+ "description": "The id of the NFT to resolve.",
145
+ "in": "path",
146
+ "required": true,
147
+ "schema": {
148
+ "type": "string"
149
+ },
150
+ "style": "simple",
151
+ "example": "nft:iota:aW90YS1uZnQ6dHN0OjB4NzYyYjljNDllYTg2OWUwZWJkYTliYmZhNzY5Mzk0NDdhNDI4ZGNmMTc4YzVkMTVhYjQ0N2UyZDRmYmJiNGViMg=="
152
+ }
153
+ ],
154
+ "security": [
155
+ {
156
+ "jwtBearerAuthScheme": []
157
+ }
158
+ ],
159
+ "responses": {
160
+ "200": {
161
+ "description": "Response to resolving the NFT.",
162
+ "content": {
163
+ "application/json": {
164
+ "schema": {
165
+ "$ref": "#/components/schemas/NftResolveResponse"
166
+ },
167
+ "examples": {
168
+ "nftResolveResponseExample": {
169
+ "value": {
170
+ "issuer": "did:iota:tst:0x85ef62ea94fc4eeeeeddf6acc3b566e988e613081d0b93cc54ed831ed4c18d44",
171
+ "owner": "did:iota:tst:0x85ef62ea94fc4eeeeeddf6acc3b566e988e613081d0b93cc54ed831ed4c18d44",
172
+ "tag": "MY-NFT",
173
+ "immutableMetadata": {
174
+ "docName": "bill-of-lading",
175
+ "mimeType": "application/pdf",
176
+ "fingerprint": "0xf0b95a98b3dbc5ce1c9ce59d70af95a97599f100a7296ecdd1eb108bebfa047f"
177
+ },
178
+ "metadata": {
179
+ "data": "AAAAA"
180
+ }
181
+ }
182
+ }
183
+ }
184
+ }
185
+ }
186
+ },
187
+ "400": {
188
+ "description": "The server cannot process the request, see the content for more details.",
189
+ "content": {
190
+ "application/json": {
191
+ "schema": {
192
+ "$ref": "#/components/schemas/Error"
193
+ },
194
+ "examples": {
195
+ "exampleResponse": {
196
+ "value": {
197
+ "name": "GeneralError",
198
+ "message": "component.error",
199
+ "properties": {
200
+ "foo": "bar"
201
+ }
202
+ }
203
+ }
204
+ }
205
+ }
206
+ }
207
+ },
208
+ "401": {
209
+ "description": "You are not authorized to use the API or no credentials were supplied, see the content for more details.",
210
+ "content": {
211
+ "application/json": {
212
+ "schema": {
213
+ "$ref": "#/components/schemas/Error"
214
+ },
215
+ "examples": {
216
+ "exampleResponse": {
217
+ "value": {
218
+ "name": "UnauthorizedError",
219
+ "message": "component.error"
220
+ }
221
+ }
222
+ }
223
+ }
224
+ }
225
+ },
226
+ "500": {
227
+ "description": "The server has encountered a situation it does not know how to handle, see the content for more details.",
228
+ "content": {
229
+ "application/json": {
230
+ "schema": {
231
+ "$ref": "#/components/schemas/Error"
232
+ },
233
+ "examples": {
234
+ "exampleResponse": {
235
+ "value": {
236
+ "name": "InternalServerError",
237
+ "message": "component.error"
238
+ }
239
+ }
240
+ }
241
+ }
242
+ }
243
+ }
244
+ }
245
+ },
246
+ "delete": {
247
+ "operationId": "nftBurn",
248
+ "summary": "Burn an NFT",
249
+ "tags": [
250
+ "NFT"
251
+ ],
252
+ "parameters": [
253
+ {
254
+ "name": "id",
255
+ "description": "The id of the NFT to burn.",
256
+ "in": "path",
257
+ "required": true,
258
+ "schema": {
259
+ "type": "string"
260
+ },
261
+ "style": "simple",
262
+ "example": "nft:iota:aW90YS1uZnQ6dHN0OjB4NzYyYjljNDllYTg2OWUwZWJkYTliYmZhNzY5Mzk0NDdhNDI4ZGNmMTc4YzVkMTVhYjQ0N2UyZDRmYmJiNGViMg=="
263
+ }
264
+ ],
265
+ "security": [
266
+ {
267
+ "jwtBearerAuthScheme": []
268
+ }
269
+ ],
270
+ "responses": {
271
+ "204": {
272
+ "description": "The rest request ended in success with no data."
273
+ },
274
+ "400": {
275
+ "description": "The server cannot process the request, see the content for more details.",
276
+ "content": {
277
+ "application/json": {
278
+ "schema": {
279
+ "$ref": "#/components/schemas/Error"
280
+ },
281
+ "examples": {
282
+ "exampleResponse": {
283
+ "value": {
284
+ "name": "GeneralError",
285
+ "message": "component.error",
286
+ "properties": {
287
+ "foo": "bar"
288
+ }
289
+ }
290
+ }
291
+ }
292
+ }
293
+ }
294
+ },
295
+ "401": {
296
+ "description": "You are not authorized to use the API or no credentials were supplied, see the content for more details.",
297
+ "content": {
298
+ "application/json": {
299
+ "schema": {
300
+ "$ref": "#/components/schemas/Error"
301
+ },
302
+ "examples": {
303
+ "exampleResponse": {
304
+ "value": {
305
+ "name": "UnauthorizedError",
306
+ "message": "component.error"
307
+ }
308
+ }
309
+ }
310
+ }
311
+ }
312
+ },
313
+ "500": {
314
+ "description": "The server has encountered a situation it does not know how to handle, see the content for more details.",
315
+ "content": {
316
+ "application/json": {
317
+ "schema": {
318
+ "$ref": "#/components/schemas/Error"
319
+ },
320
+ "examples": {
321
+ "exampleResponse": {
322
+ "value": {
323
+ "name": "InternalServerError",
324
+ "message": "component.error"
325
+ }
326
+ }
327
+ }
328
+ }
329
+ }
330
+ }
331
+ }
332
+ },
333
+ "put": {
334
+ "operationId": "nftUpdate",
335
+ "summary": "Update an NFT",
336
+ "tags": [
337
+ "NFT"
338
+ ],
339
+ "parameters": [
340
+ {
341
+ "name": "id",
342
+ "description": "The id of the NFT to transfer in urn format.",
343
+ "in": "path",
344
+ "required": true,
345
+ "schema": {
346
+ "type": "string"
347
+ },
348
+ "style": "simple",
349
+ "example": "nft:iota:aW90YS1uZnQ6dHN0OjB4NzYyYjljNDllYTg2OWUwZWJkYTliYmZhNzY5Mzk0NDdhNDI4ZGNmMTc4YzVkMTVhYjQ0N2UyZDRmYmJiNGViMg=="
350
+ }
351
+ ],
352
+ "security": [
353
+ {
354
+ "jwtBearerAuthScheme": []
355
+ }
356
+ ],
357
+ "requestBody": {
358
+ "description": "Update the mutable data for the NFT.",
359
+ "required": true,
360
+ "content": {
361
+ "application/json": {
362
+ "schema": {
363
+ "$ref": "#/components/schemas/NftUpdateRequest"
364
+ },
365
+ "examples": {
366
+ "nftUpdateExample": {
367
+ "value": {
368
+ "metadata": {
369
+ "data": "AAAAA"
370
+ }
371
+ }
372
+ }
373
+ }
374
+ }
375
+ }
376
+ },
377
+ "responses": {
378
+ "204": {
379
+ "description": "The rest request ended in success with no data."
380
+ },
381
+ "400": {
382
+ "description": "The server cannot process the request, see the content for more details.",
383
+ "content": {
384
+ "application/json": {
385
+ "schema": {
386
+ "$ref": "#/components/schemas/Error"
387
+ },
388
+ "examples": {
389
+ "exampleResponse": {
390
+ "value": {
391
+ "name": "GeneralError",
392
+ "message": "component.error",
393
+ "properties": {
394
+ "foo": "bar"
395
+ }
396
+ }
397
+ }
398
+ }
399
+ }
400
+ }
401
+ },
402
+ "401": {
403
+ "description": "You are not authorized to use the API or no credentials were supplied, see the content for more details.",
404
+ "content": {
405
+ "application/json": {
406
+ "schema": {
407
+ "$ref": "#/components/schemas/Error"
408
+ },
409
+ "examples": {
410
+ "exampleResponse": {
411
+ "value": {
412
+ "name": "UnauthorizedError",
413
+ "message": "component.error"
414
+ }
415
+ }
416
+ }
417
+ }
418
+ }
419
+ },
420
+ "500": {
421
+ "description": "The server has encountered a situation it does not know how to handle, see the content for more details.",
422
+ "content": {
423
+ "application/json": {
424
+ "schema": {
425
+ "$ref": "#/components/schemas/Error"
426
+ },
427
+ "examples": {
428
+ "exampleResponse": {
429
+ "value": {
430
+ "name": "InternalServerError",
431
+ "message": "component.error"
432
+ }
433
+ }
434
+ }
435
+ }
436
+ }
437
+ }
438
+ }
439
+ }
440
+ },
441
+ "/nft/{id}/transfer": {
442
+ "post": {
443
+ "operationId": "nftTransfer",
444
+ "summary": "Transfer an NFT",
445
+ "tags": [
446
+ "NFT"
447
+ ],
448
+ "parameters": [
449
+ {
450
+ "name": "id",
451
+ "description": "The id of the NFT to transfer in urn format.",
452
+ "in": "path",
453
+ "required": true,
454
+ "schema": {
455
+ "type": "string"
456
+ },
457
+ "style": "simple",
458
+ "example": "nft:iota:aW90YS1uZnQ6dHN0OjB4NzYyYjljNDllYTg2OWUwZWJkYTliYmZhNzY5Mzk0NDdhNDI4ZGNmMTc4YzVkMTVhYjQ0N2UyZDRmYmJiNGViMg=="
459
+ }
460
+ ],
461
+ "security": [
462
+ {
463
+ "jwtBearerAuthScheme": []
464
+ }
465
+ ],
466
+ "requestBody": {
467
+ "description": "Transfer the NFT and update the metadata.",
468
+ "required": true,
469
+ "content": {
470
+ "application/json": {
471
+ "schema": {
472
+ "$ref": "#/components/schemas/NftTransferRequest"
473
+ },
474
+ "examples": {
475
+ "nftTransferExample": {
476
+ "value": {
477
+ "recipientIdentity": "did:iota:tst:0x85ef62ea94fc4eeeeeddf6acc3b566e988e613081d0b93cc54ed831ed4c18d44",
478
+ "recipientAddress": "tst1prctjk5ck0dutnsunnje6u90jk5htx03qznjjmkd6843pzltlgz87srjzzv",
479
+ "metadata": {
480
+ "data": "AAAAA"
481
+ }
482
+ }
483
+ }
484
+ }
485
+ }
486
+ }
487
+ },
488
+ "responses": {
489
+ "204": {
490
+ "description": "The rest request ended in success with no data."
491
+ },
492
+ "400": {
493
+ "description": "The server cannot process the request, see the content for more details.",
494
+ "content": {
495
+ "application/json": {
496
+ "schema": {
497
+ "$ref": "#/components/schemas/Error"
498
+ },
499
+ "examples": {
500
+ "exampleResponse": {
501
+ "value": {
502
+ "name": "GeneralError",
503
+ "message": "component.error",
504
+ "properties": {
505
+ "foo": "bar"
506
+ }
507
+ }
508
+ }
509
+ }
510
+ }
511
+ }
512
+ },
513
+ "401": {
514
+ "description": "You are not authorized to use the API or no credentials were supplied, see the content for more details.",
515
+ "content": {
516
+ "application/json": {
517
+ "schema": {
518
+ "$ref": "#/components/schemas/Error"
519
+ },
520
+ "examples": {
521
+ "exampleResponse": {
522
+ "value": {
523
+ "name": "UnauthorizedError",
524
+ "message": "component.error"
525
+ }
526
+ }
527
+ }
528
+ }
529
+ }
530
+ },
531
+ "500": {
532
+ "description": "The server has encountered a situation it does not know how to handle, see the content for more details.",
533
+ "content": {
534
+ "application/json": {
535
+ "schema": {
536
+ "$ref": "#/components/schemas/Error"
537
+ },
538
+ "examples": {
539
+ "exampleResponse": {
540
+ "value": {
541
+ "name": "InternalServerError",
542
+ "message": "component.error"
543
+ }
544
+ }
545
+ }
546
+ }
547
+ }
548
+ }
549
+ }
550
+ }
551
+ }
552
+ },
553
+ "components": {
554
+ "schemas": {
555
+ "Error": {
556
+ "type": "object",
557
+ "properties": {
558
+ "name": {
559
+ "type": "string",
560
+ "description": "The name for the error."
561
+ },
562
+ "message": {
563
+ "type": "string",
564
+ "description": "The message for the error."
565
+ },
566
+ "source": {
567
+ "type": "string",
568
+ "description": "The source of the error."
569
+ },
570
+ "properties": {
571
+ "type": "object",
572
+ "additionalProperties": {},
573
+ "description": "Any additional information for the error."
574
+ },
575
+ "stack": {
576
+ "type": "string",
577
+ "description": "The stack trace for the error."
578
+ },
579
+ "inner": {
580
+ "$ref": "#/components/schemas/Error"
581
+ }
582
+ },
583
+ "required": [
584
+ "name",
585
+ "message"
586
+ ],
587
+ "additionalProperties": false,
588
+ "description": "Model to describe serialized error."
589
+ },
590
+ "NftMintRequest": {
591
+ "type": "object",
592
+ "properties": {
593
+ "tag": {
594
+ "type": "string",
595
+ "description": "The tag for the NFT."
596
+ },
597
+ "immutableMetadata": {
598
+ "description": "The immutable metadata for the NFT."
599
+ },
600
+ "metadata": {
601
+ "description": "The metadata for the NFT."
602
+ },
603
+ "namespace": {
604
+ "type": "string",
605
+ "description": "The namespace of the connector to use for the NFT, defaults to component configured namespace."
606
+ }
607
+ },
608
+ "required": [
609
+ "tag"
610
+ ],
611
+ "additionalProperties": false,
612
+ "description": "The data to be used in the minting."
613
+ },
614
+ "NftResolveResponse": {
615
+ "type": "object",
616
+ "properties": {
617
+ "issuer": {
618
+ "type": "string",
619
+ "description": "The issuer of the NFT."
620
+ },
621
+ "owner": {
622
+ "type": "string",
623
+ "description": "The owner of the NFT."
624
+ },
625
+ "tag": {
626
+ "type": "string",
627
+ "description": "The tag data for the NFT."
628
+ },
629
+ "immutableMetadata": {
630
+ "description": "The immutable data for the NFT."
631
+ },
632
+ "metadata": {
633
+ "description": "The metadata for the NFT."
634
+ }
635
+ },
636
+ "required": [
637
+ "issuer",
638
+ "owner",
639
+ "tag"
640
+ ],
641
+ "additionalProperties": false,
642
+ "description": "The data that was resolved."
643
+ },
644
+ "NftTransferRequest": {
645
+ "type": "object",
646
+ "properties": {
647
+ "recipientIdentity": {
648
+ "type": "string",
649
+ "description": "The recipient identity for the NFT."
650
+ },
651
+ "recipientAddress": {
652
+ "type": "string",
653
+ "description": "The recipient address for the NFT."
654
+ },
655
+ "metadata": {
656
+ "description": "The metadata for the NFT."
657
+ }
658
+ },
659
+ "required": [
660
+ "recipientIdentity",
661
+ "recipientAddress"
662
+ ],
663
+ "additionalProperties": false,
664
+ "description": "The data to be used in the transfer."
665
+ },
666
+ "NftUpdateRequest": {
667
+ "type": "object",
668
+ "properties": {
669
+ "metadata": {
670
+ "description": "The metadata for the NFT."
671
+ }
672
+ },
673
+ "additionalProperties": false,
674
+ "description": "The data to be used in the update."
675
+ }
676
+ },
677
+ "securitySchemes": {
678
+ "jwtBearerAuthScheme": {
679
+ "type": "http",
680
+ "scheme": "bearer",
681
+ "bearerFormat": "JWT"
682
+ }
683
+ }
684
+ }
685
+ }