-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathswagger.json
More file actions
1901 lines (1901 loc) · 59 KB
/
swagger.json
File metadata and controls
1901 lines (1901 loc) · 59 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
654
655
656
657
658
659
660
661
662
663
664
665
666
667
668
669
670
671
672
673
674
675
676
677
678
679
680
681
682
683
684
685
686
687
688
689
690
691
692
693
694
695
696
697
698
699
700
701
702
703
704
705
706
707
708
709
710
711
712
713
714
715
716
717
718
719
720
721
722
723
724
725
726
727
728
729
730
731
732
733
734
735
736
737
738
739
740
741
742
743
744
745
746
747
748
749
750
751
752
753
754
755
756
757
758
759
760
761
762
763
764
765
766
767
768
769
770
771
772
773
774
775
776
777
778
779
780
781
782
783
784
785
786
787
788
789
790
791
792
793
794
795
796
797
798
799
800
801
802
803
804
805
806
807
808
809
810
811
812
813
814
815
816
817
818
819
820
821
822
823
824
825
826
827
828
829
830
831
832
833
834
835
836
837
838
839
840
841
842
843
844
845
846
847
848
849
850
851
852
853
854
855
856
857
858
859
860
861
862
863
864
865
866
867
868
869
870
871
872
873
874
875
876
877
878
879
880
881
882
883
884
885
886
887
888
889
890
891
892
893
894
895
896
897
898
899
900
901
902
903
904
905
906
907
908
909
910
911
912
913
914
915
916
917
918
919
920
921
922
923
924
925
926
927
928
929
930
931
932
933
934
935
936
937
938
939
940
941
942
943
944
945
946
947
948
949
950
951
952
953
954
955
956
957
958
959
960
961
962
963
964
965
966
967
968
969
970
971
972
973
974
975
976
977
978
979
980
981
982
983
984
985
986
987
988
989
990
991
992
993
994
995
996
997
998
999
1000
{
"swagger": "2.0",
"info": {
"description": "<img src=\"logo.png\" style=\"display: block; margin-left: auto; margin-right: auto; width: 70%;\">\n\n# Intro\n\nThis website documents the API methods available for the `wallet-api` program.\n\nThe default API url is [127.0.0.1:17280](http://127.0.0.1:17280).\n\nNote that this program is distinct from `turtle-service`, which uses a different API.\nThe api docs for `turtle-service` can be found [here](https://api-docs.turtlecoin.lol/).\n\n# Initialization\n\n* Start by launching the `wallet-api` program.\n* From a terminal (or via a programming language):\n\n```\n./wallet-api --rpc-password somepassword\n```\n\n* Or if you're on windows:\n\n```\nwallet-api.exe --rpc-password somepassword\n```\n\n* An RPC password is always required, and you should then provide this password with every request to the API, in the `X-API-KEY` header.\n\n* If you want to see the available configuration options for the `wallet-api`, launch the program with:\n```\n./wallet-api --help\n```\n\n* Note that you cannot generate/open a wallet via the command line, only via the API.\n This is by design to prevent application developers having to parse command line output.\n\n# Try it Out\n\nIf you want to test wallet-api out without doing any programming, you can use the 'Try it out' section in swagger.\n* Start by launching your wallet with CORS enabled:\n\n```\n./wallet-api --rpc-password \"mypassword\" --enable-cors \"*\"\n```\n\n* Click the 'Authorize' button in Swagger, and type in the RPC password you just chose - in this case, \"mypassword\", and click 'Authorize'.\n* Click a method to expand it, then click the 'Try it Out' button.\n* You can modify the parameters you want to send here, and then hit 'Execute' to send the request.\n* Note that this may not work in Firefox, I had to use Chrome to get it to work. F12 (developer console) may help diagnose CORS issues.\n\n# API Wrappers\n\nFinally, whilst you may send raw HTTP requests to the API url, you may be interested in an API/RPC wrapper.\n\nThese can be generated for many languages, by using the `Generate Client` option in the top menu.\nBe patient, this can take some time to complete.\n\n# Support\n\nIf you are having issues, please stop by our [discord](http://chat.turtlecoin.lol) and visit the `#dev_learning` channel for assistance.",
"version": "1.0.0",
"title": "wallet-api"
},
"tags": [
{
"name": "wallet",
"description": "Opening and creating wallets"
},
{
"name": "addresses",
"description": "Creating addresses, importing addresses"
},
{
"name": "node",
"description": "Get node details, swap node"
},
{
"name": "keys",
"description": "Get private keys or mnemonic seed"
},
{
"name": "transactions",
"description": "Get a list of transactions, send a transaction"
},
{
"name": "balance",
"description": "Get a wallets or an addresses balance"
},
{
"name": "misc",
"description": "Miscellaneous operations, such as saving, getting status, etc"
}
],
"paths": {
"/wallet/open": {
"post": {
"tags": [
"wallet"
],
"summary": "Opens an already existing wallet",
"responses": {
"200": {
"$ref": "#/responses/Success"
},
"400": {
"$ref": "#/responses/BadRequest"
},
"401": {
"$ref": "#/responses/UnauthorizedError"
},
"403": {
"$ref": "#/responses/AlreadyOpen"
},
"500": {
"$ref": "#/responses/InternalError"
}
},
"parameters": [
{
"in": "body",
"name": "body",
"required": true,
"schema": {
"$ref": "#/definitions/Wallet"
}
}
]
}
},
"/wallet/import/key": {
"post": {
"tags": [
"wallet"
],
"summary": "Imports a wallet with a private spend and view key",
"responses": {
"200": {
"$ref": "#/responses/Success"
},
"400": {
"$ref": "#/responses/BadRequest"
},
"401": {
"$ref": "#/responses/UnauthorizedError"
},
"403": {
"$ref": "#/responses/AlreadyOpen"
},
"500": {
"$ref": "#/responses/InternalError"
}
},
"parameters": [
{
"in": "body",
"name": "body",
"required": true,
"schema": {
"$ref": "#/definitions/WalletKeyImport"
}
}
]
}
},
"/wallet/import/seed": {
"post": {
"tags": [
"wallet"
],
"summary": "Imports a wallet using a mnemonic seed",
"responses": {
"200": {
"$ref": "#/responses/Success"
},
"400": {
"$ref": "#/responses/BadRequest"
},
"401": {
"$ref": "#/responses/UnauthorizedError"
},
"403": {
"$ref": "#/responses/AlreadyOpen"
},
"500": {
"$ref": "#/responses/InternalError"
}
},
"parameters": [
{
"in": "body",
"name": "body",
"required": true,
"schema": {
"$ref": "#/definitions/WalletSeedImport"
}
}
]
}
},
"/wallet/import/view": {
"post": {
"tags": [
"wallet"
],
"summary": "Imports a view only wallet with a private view key and public address",
"description": "Note that view only wallets can only see incoming transactions, so balance may be inflated, and they cannot send transactions.",
"parameters": [
{
"in": "body",
"name": "body",
"required": true,
"schema": {
"$ref": "#/definitions/WalletViewImport"
}
}
],
"responses": {
"200": {
"$ref": "#/responses/Success"
},
"400": {
"$ref": "#/responses/BadRequest"
},
"401": {
"$ref": "#/responses/UnauthorizedError"
},
"403": {
"$ref": "#/responses/AlreadyOpen"
},
"500": {
"$ref": "#/responses/InternalError"
}
}
}
},
"/wallet/create": {
"post": {
"tags": [
"wallet"
],
"summary": "Creates a new wallet",
"parameters": [
{
"in": "body",
"name": "body",
"required": true,
"schema": {
"$ref": "#/definitions/Wallet"
}
}
],
"responses": {
"200": {
"$ref": "#/responses/Success"
},
"400": {
"$ref": "#/responses/BadRequest"
},
"401": {
"$ref": "#/responses/UnauthorizedError"
},
"403": {
"$ref": "#/responses/AlreadyOpen"
},
"500": {
"$ref": "#/responses/InternalError"
}
}
}
},
"/save": {
"put": {
"tags": [
"misc"
],
"summary": "Saves the wallet state",
"responses": {
"200": {
"$ref": "#/responses/Success"
},
"401": {
"$ref": "#/responses/UnauthorizedError"
},
"403": {
"$ref": "#/responses/NotOpen"
},
"500": {
"$ref": "#/responses/InternalError"
}
}
}
},
"/reset": {
"put": {
"tags": [
"misc"
],
"summary": "Resets and saves the wallet, beginning scanning from height given, if any",
"parameters": [
{
"in": "body",
"name": "body",
"required": false,
"schema": {
"type": "object",
"properties": {
"scanHeight": {
"description": "The daemon port to sync the wallet with",
"type": "integer",
"example": 300000,
"default": 0,
"format": "int64"
}
}
}
}
],
"responses": {
"200": {
"$ref": "#/responses/Success"
},
"400": {
"$ref": "#/responses/BadRequest"
},
"401": {
"$ref": "#/responses/UnauthorizedError"
},
"403": {
"$ref": "#/responses/NotOpen"
},
"500": {
"$ref": "#/responses/InternalError"
}
}
}
},
"/node": {
"get": {
"tags": [
"node"
],
"summary": "Gets the node address, port, fee, and fee address",
"responses": {
"200": {
"description": "The operation completed successfully.",
"schema": {
"allOf": [
{
"$ref": "#/definitions/Node"
},
{
"properties": {
"nodeFee": {
"type": "integer",
"description": "The fee the node you are connected to on each transaction (in atomic units)",
"example": 1000
},
"nodeAddress": {
"type": "string",
"description": "The address the node fee gets sent to, if non zero",
"example": "TRTLv2Fyavy8CXG8BPEbNeCHFZ1fuDCYCZ3vW5H5LXN4K2M2MHUpTENip9bbavpHvvPwb4NDkBWrNgURAd5DB38FHXWZyoBh4wW"
}
}
}
]
}
},
"401": {
"$ref": "#/responses/UnauthorizedError"
},
"403": {
"$ref": "#/responses/NotOpen"
},
"500": {
"$ref": "#/responses/InternalError"
}
}
},
"put": {
"tags": [
"node"
],
"summary": "Sets the node address and port",
"parameters": [
{
"in": "body",
"name": "body",
"required": true,
"schema": {
"$ref": "#/definitions/Node"
}
}
],
"responses": {
"202": {
"$ref": "#/responses/Success"
},
"400": {
"$ref": "#/responses/BadRequest"
},
"401": {
"$ref": "#/responses/UnauthorizedError"
},
"403": {
"$ref": "#/responses/NotOpen"
},
"500": {
"$ref": "#/responses/InternalError"
}
}
}
},
"/keys": {
"get": {
"tags": [
"keys"
],
"summary": "Gets the wallet containers shared private view key",
"responses": {
"200": {
"description": "The operation completed successfully.",
"schema": {
"type": "object",
"properties": {
"privateViewKey": {
"type": "string",
"description": "The private view key",
"example": "85baeb8ae23bf266c68a5845f1ff13af7ff221f46e4dfc1293eec9a3e211a90a"
}
}
}
},
"401": {
"$ref": "#/responses/UnauthorizedError"
},
"403": {
"$ref": "#/responses/NotOpen"
},
"500": {
"$ref": "#/responses/InternalError"
}
}
}
},
"/keys/{address}": {
"parameters": [
{
"$ref": "#/parameters/address"
}
],
"get": {
"tags": [
"keys"
],
"summary": "Gets the public and private spend key for the given address",
"description": "Note that this method cannot be used with a view only wallet",
"responses": {
"200": {
"description": "The operation completed successfully.",
"schema": {
"type": "object",
"properties": {
"privateSpendKey": {
"type": "string",
"description": "The private spend key",
"example": "85baeb8ae23bf266c68a5845f1ff13af7ff221f46e4dfc1293eec9a3e211a90a"
},
"publicSpendKey": {
"type": "string",
"description": "The public spend key",
"example": "85baeb8ae23bf266c68a5845f1ff13af7ff221f46e4dfc1293eec9a3e211a90a"
}
}
}
},
"400": {
"$ref": "#/responses/BadRequest"
},
"401": {
"$ref": "#/responses/UnauthorizedError"
},
"403": {
"$ref": "#/responses/NotOpen"
},
"500": {
"$ref": "#/responses/InternalError"
}
}
}
},
"/keys/mnemonic/{address}": {
"parameters": [
{
"$ref": "#/parameters/address"
}
],
"get": {
"tags": [
"keys"
],
"summary": "Gets the mnemonic seed for the given address, if possible",
"description": "Note that this method cannot be used with a view only wallet",
"responses": {
"200": {
"description": "The operation completed successfully.",
"schema": {
"type": "object",
"properties": {
"mnemonicSeed": {
"type": "string",
"description": "The mnemonic seed",
"example": "leech lifestyle newt tarnished vials weavers decay nerves buying taken sample after jailed cupcake token pavements welders gifts ferry keep humid abbey emails entrance leech"
}
}
}
},
"400": {
"$ref": "#/responses/BadRequest"
},
"401": {
"$ref": "#/responses/UnauthorizedError"
},
"403": {
"$ref": "#/responses/NotOpen"
},
"500": {
"$ref": "#/responses/InternalError"
}
}
}
},
"/status": {
"get": {
"tags": [
"misc"
],
"summary": "Get the wallet sync status, peer count, and hashrate",
"responses": {
"200": {
"description": "The operation completed successfully.",
"schema": {
"type": "object",
"properties": {
"walletBlockCount": {
"type": "integer",
"format": "uint64",
"description": "The amount of blocks the wallet has scanned",
"example": 100000
},
"localDaemonBlockCount": {
"type": "integer",
"format": "uint64",
"description": "The amount of blocks the daemon the wallet is connected to has synced",
"example": 800000
},
"networkBlockCount": {
"type": "integer",
"format": "uint64",
"description": "The amount of blocks the network has",
"example": 900000
},
"peerCount": {
"type": "integer",
"format": "uint32",
"description": "The amount of peers (incoming + outgoing) peers the daemon has",
"example": 20
},
"hashrate": {
"type": "integer",
"format": "uint64",
"description": "The hashrate the last local block the daemon knows about has",
"example": 123456789
},
"isViewWallet": {
"type": "boolean",
"description": "Whether this wallet is a view only wallet. Certain operations are illegal on a view only wallet, such as transferring.",
"example": false
},
"subWalletCount": {
"type": "integer",
"description": "The amount of subwallets in the container",
"example": 1
}
}
}
},
"401": {
"$ref": "#/responses/UnauthorizedError"
},
"403": {
"$ref": "#/responses/NotOpen"
},
"500": {
"$ref": "#/responses/InternalError"
}
}
}
},
"/addresses": {
"get": {
"tags": [
"addresses"
],
"summary": "Gets a list of all addresses in the wallet container",
"responses": {
"200": {
"description": "The operation completed successfully.",
"schema": {
"type": "object",
"properties": {
"addresses": {
"type": "array",
"items": {
"type": "string"
},
"example": [
"TRTLv2cT32cZbF6KvnU69LNxptYFBMCKs3yqLmCAVjPW4rNTExpB7RpGKGJEkD1E9MVmM8SUUJfUh42Ajo1Hgz5wUN6budvzaq"
]
}
}
}
},
"401": {
"$ref": "#/responses/UnauthorizedError"
},
"403": {
"$ref": "#/responses/NotOpen"
},
"500": {
"$ref": "#/responses/InternalError"
}
}
}
},
"/addresses/{address}": {
"parameters": [
{
"$ref": "#/parameters/address"
}
],
"delete": {
"tags": [
"addresses"
],
"summary": "Deletes the given subwallet from the container",
"description": "Note that you cannot delete the 'primary' address, the first address created in the wallet.",
"responses": {
"200": {
"$ref": "#/responses/Success"
},
"400": {
"$ref": "#/responses/BadRequest"
},
"401": {
"$ref": "#/responses/UnauthorizedError"
},
"403": {
"$ref": "#/responses/NotOpen"
},
"500": {
"$ref": "#/responses/InternalError"
}
}
}
},
"/addresses/primary": {
"get": {
"tags": [
"addresses"
],
"summary": "Gets the 'primary' address",
"description": "The primary address is the first wallet created, and the one used as the change address if not specified.",
"responses": {
"200": {
"description": "The operation completed successfully.",
"schema": {
"type": "object",
"properties": {
"address": {
"type": "string",
"description": "The primary address",
"example": "TRTLv2cT32cZbF6KvnU69LNxptYFBMCKs3yqLmCAVjPW4rNTExpB7RpGKGJEkD1E9MVmM8SUUJfUh42Ajo1Hgz5wUN6budvzaq"
}
}
}
},
"401": {
"$ref": "#/responses/UnauthorizedError"
},
"403": {
"$ref": "#/responses/NotOpen"
},
"500": {
"$ref": "#/responses/InternalError"
}
}
}
},
"/addresses/create": {
"post": {
"tags": [
"addresses"
],
"summary": "Creates a new, random address in the wallet container",
"responses": {
"201": {
"description": "The operation completed successfully.",
"schema": {
"type": "object",
"properties": {
"address": {
"type": "string",
"description": "The created address",
"example": "TRTLv2cT32cZbF6KvnU69LNxptYFBMCKs3yqLmCAVjPW4rNTExpB7RpGKGJEkD1E9MVmM8SUUJfUh42Ajo1Hgz5wUN6budvzaq"
},
"privateSpendKey": {
"type": "string",
"description": "The corresponding private spend key for this address, can be used to restore along with the shared private view key",
"example": "6d4a7c160cbd4c9de33eeb161ff30539d2e28b447eb5af73523cc3379c591c83"
}
}
}
},
"400": {
"$ref": "#/responses/BadRequest"
},
"401": {
"$ref": "#/responses/UnauthorizedError"
},
"403": {
"$ref": "#/responses/NotOpen"
},
"500": {
"$ref": "#/responses/InternalError"
}
}
}
},
"/addresses/import": {
"post": {
"tags": [
"addresses"
],
"summary": "Imports a subwallet with the given private spend key",
"description": "It is HIGHLY recommended you provide a scan height with this operation - wallet syncing will have to begin again from the scan height given (defaults to zero) if the scan height is less than the height of the current wallet sync status.",
"parameters": [
{
"in": "body",
"name": "body",
"required": true,
"schema": {
"required": [
"privateSpendKey"
],
"properties": {
"scanHeight": {
"description": "The daemon port to sync the wallet with",
"type": "integer",
"example": 300000,
"default": 0,
"format": "uint64"
},
"privateSpendKey": {
"description": "64 char hex private spend key",
"type": "string",
"example": "5c703d9bde0b7cd5ff3e19ea826a44066534661a7322c85e854e73f06e49cd06"
}
}
}
}
],
"responses": {
"201": {
"description": "The operation completed successfully.",
"schema": {
"type": "object",
"properties": {
"address": {
"type": "string",
"description": "The created address",
"example": "TRTLv2cT32cZbF6KvnU69LNxptYFBMCKs3yqLmCAVjPW4rNTExpB7RpGKGJEkD1E9MVmM8SUUJfUh42Ajo1Hgz5wUN6budvzaq"
}
}
}
},
"400": {
"$ref": "#/responses/BadRequest"
},
"401": {
"$ref": "#/responses/UnauthorizedError"
},
"403": {
"$ref": "#/responses/NotOpen"
},
"500": {
"$ref": "#/responses/InternalError"
}
}
}
},
"/addresses/import/view": {
"post": {
"tags": [
"addresses"
],
"summary": "Imports a view only subwallet with the given publicSpendKey",
"description": "It is HIGHLY recommended you provide a scan height with this operation - wallet syncing will have to begin again from the scan height given (defaults to zero) if the scan height is less than the height of the current wallet sync status.",
"parameters": [
{
"in": "body",
"name": "body",
"required": true,
"schema": {
"required": [
"publicSpendKey"
],
"properties": {
"scanHeight": {
"description": "The daemon port to sync the wallet with",
"type": "integer",
"example": 300000,
"default": 0,
"format": "uint64"
},
"privateSpendKey": {
"description": "64 char hex public spend key",
"type": "string",
"example": "5c703d9bde0b7cd5ff3e19ea826a44066534661a7322c85e854e73f06e49cd06"
}
}
}
}
],
"responses": {
"201": {
"description": "The operation completed successfully.",
"schema": {
"type": "object",
"properties": {
"address": {
"type": "string",
"description": "The created address",
"example": "TRTLv2cT32cZbF6KvnU69LNxptYFBMCKs3yqLmCAVjPW4rNTExpB7RpGKGJEkD1E9MVmM8SUUJfUh42Ajo1Hgz5wUN6budvzaq"
}
}
}
},
"400": {
"$ref": "#/responses/BadRequest"
},
"401": {
"$ref": "#/responses/UnauthorizedError"
},
"403": {
"$ref": "#/responses/NotOpen"
},
"500": {
"$ref": "#/responses/InternalError"
}
}
}
},
"/addresses/{address}/{paymentID}": {
"parameters": [
{
"$ref": "#/parameters/address"
},
{
"$ref": "#/parameters/paymentID"
}
],
"get": {
"tags": [
"addresses"
],
"summary": "Creates an integrated address from an address and payment ID",
"responses": {
"200": {
"description": "The operation completed successfully.",
"schema": {
"type": "object",
"properties": {
"integratedAddress": {
"type": "string",
"description": "The integrated address",
"example": "TRTLuxiNXhy96RNDkv2jx29jL7GdTWYBmA4r7K8KRpDWA4hJJnTZEgFHFzxqvmBLtz94oF4uPokQdHbV9j2g7S6LA4hKPvjZEFS2CiAj6DL8isYELmTec8Z9BK56oL1KMhjMRSMyfwYaogKg17hQKC23CHPBcHqrHHGzdRYUk3HGqkMwXbHg3BoCpXD"
}
}
}
},
"400": {
"$ref": "#/responses/BadRequest"
},
"401": {
"$ref": "#/responses/UnauthorizedError"
},
"403": {
"$ref": "#/responses/NotOpen"
},
"500": {
"$ref": "#/responses/InternalError"
}
}
}
},
"/transactions": {
"get": {
"tags": [
"transactions"
],
"summary": "Gets a list of all transactions in the wallet container",
"responses": {
"200": {
"description": "The operation completed successfully.",
"schema": {
"type": "object",
"properties": {
"transactions": {
"type": "array",
"items": {
"$ref": "#/definitions/Transaction"
}
}
}
}
},
"401": {
"$ref": "#/responses/UnauthorizedError"
},
"403": {
"$ref": "#/responses/NotOpen"
},
"500": {
"$ref": "#/responses/InternalError"
}
}
}
},
"/transactions/hash/{hash}": {
"parameters": [
{
"$ref": "#/parameters/hash"
}
],
"get": {
"tags": [
"transactions"
],
"summary": "Gets details on the given transaction, if found",
"description": "Note that the transaction must be contained in this wallet, and must not be unconfirmed. E.g, you must get this hash back when calling /transactions",
"responses": {
"200": {
"description": "The operation completed successfully.",
"schema": {
"type": "object",
"properties": {
"transactions": {
"$ref": "#/definitions/Transaction"
}
}
}
},
"401": {
"$ref": "#/responses/UnauthorizedError"
},
"403": {
"$ref": "#/responses/NotOpen"
},
"404": {
"description": "The transaction hash was not found."
},
"500": {
"$ref": "#/responses/InternalError"
}
}
}
},
"/transactions/unconfirmed": {
"get": {
"tags": [
"transactions"
],
"summary": "Gets a list of all unconfirmed, outgoing transactions in the wallet container",
"description": "Note that this DOES NOT include incoming transactions in the pool. This only applies to transactions that have been sent by this wallet file, and have not been added to a block yet.",
"responses": {
"200": {
"description": "The operation completed successfully.",
"schema": {
"type": "object",
"properties": {
"transactions": {
"type": "array",
"items": {
"$ref": "#/definitions/Transaction"
}
}
}
}
},
"401": {
"$ref": "#/responses/UnauthorizedError"
},
"403": {
"$ref": "#/responses/NotOpen"
},
"500": {
"$ref": "#/responses/InternalError"
}
}
}
},
"/transactions/unconfirmed/{address}": {
"parameters": [
{
"$ref": "#/parameters/address"
}
],
"get": {
"tags": [
"transactions"
],
"summary": "Gets a list of unconfirmed, outgoing transactions, for the given address",
"description": "Note that this DOES NOT include incoming transactions in the pool. This only applies to transactions that have been sent by this wallet file, and have not been added to a block yet.",
"responses": {
"200": {
"description": "The operation completed successfully.",
"schema": {
"type": "object",
"properties": {
"transactions": {
"type": "array",
"items": {
"$ref": "#/definitions/Transaction"
}
}
}
}
},
"400": {
"$ref": "#/responses/BadRequest"
},
"401": {
"$ref": "#/responses/UnauthorizedError"
},
"403": {
"$ref": "#/responses/NotOpen"
},
"500": {
"$ref": "#/responses/InternalError"
}
}
}
},
"/transactions/{startHeight}": {
"parameters": [
{