@bsv/sdk 1.2.10 → 1.2.12

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.
Files changed (59) hide show
  1. package/README.md +5 -2
  2. package/dist/cjs/package.json +1 -1
  3. package/dist/cjs/src/primitives/PrivateKey.js +40 -2
  4. package/dist/cjs/src/primitives/PrivateKey.js.map +1 -1
  5. package/dist/cjs/src/transaction/Broadcaster.js.map +1 -1
  6. package/dist/cjs/src/wallet/WalletClient.js +11 -1
  7. package/dist/cjs/src/wallet/WalletClient.js.map +1 -1
  8. package/dist/cjs/src/wallet/substrates/HTTPWalletJSON.js +113 -0
  9. package/dist/cjs/src/wallet/substrates/HTTPWalletJSON.js.map +1 -0
  10. package/dist/cjs/tsconfig.cjs.tsbuildinfo +1 -1
  11. package/dist/esm/src/primitives/PrivateKey.js +40 -2
  12. package/dist/esm/src/primitives/PrivateKey.js.map +1 -1
  13. package/dist/esm/src/transaction/Broadcaster.js.map +1 -1
  14. package/dist/esm/src/wallet/WalletClient.js +11 -1
  15. package/dist/esm/src/wallet/WalletClient.js.map +1 -1
  16. package/dist/esm/src/wallet/substrates/HTTPWalletJSON.js +114 -0
  17. package/dist/esm/src/wallet/substrates/HTTPWalletJSON.js.map +1 -0
  18. package/dist/esm/tsconfig.esm.tsbuildinfo +1 -1
  19. package/dist/types/src/primitives/PrivateKey.d.ts +33 -1
  20. package/dist/types/src/primitives/PrivateKey.d.ts.map +1 -1
  21. package/dist/types/src/transaction/Broadcaster.d.ts +3 -0
  22. package/dist/types/src/transaction/Broadcaster.d.ts.map +1 -1
  23. package/dist/types/src/wallet/WalletClient.d.ts +1 -1
  24. package/dist/types/src/wallet/WalletClient.d.ts.map +1 -1
  25. package/dist/types/src/wallet/substrates/HTTPWalletJSON.d.ts +189 -0
  26. package/dist/types/src/wallet/substrates/HTTPWalletJSON.d.ts.map +1 -0
  27. package/dist/types/tsconfig.types.tsbuildinfo +1 -1
  28. package/dist/umd/bundle.js +1 -1
  29. package/docs/README.md +9 -0
  30. package/docs/primitives.md +73 -3
  31. package/docs/swagger/dist/LICENSE +21 -0
  32. package/docs/swagger/dist/favicon-16x16.png +0 -0
  33. package/docs/swagger/dist/favicon-32x32.png +0 -0
  34. package/docs/swagger/dist/index.css +16 -0
  35. package/docs/swagger/dist/oauth2-redirect.html +79 -0
  36. package/docs/swagger/dist/swagger-initializer.js +20 -0
  37. package/docs/swagger/dist/swagger-ui-bundle.js +2 -0
  38. package/docs/swagger/dist/swagger-ui-bundle.js.map +1 -0
  39. package/docs/swagger/dist/swagger-ui-es-bundle-core.js +3 -0
  40. package/docs/swagger/dist/swagger-ui-es-bundle-core.js.map +1 -0
  41. package/docs/swagger/dist/swagger-ui-es-bundle.js +2 -0
  42. package/docs/swagger/dist/swagger-ui-es-bundle.js.map +1 -0
  43. package/docs/swagger/dist/swagger-ui-standalone-preset.js +2 -0
  44. package/docs/swagger/dist/swagger-ui-standalone-preset.js.map +1 -0
  45. package/docs/swagger/dist/swagger-ui.css +3 -0
  46. package/docs/swagger/dist/swagger-ui.css.map +1 -0
  47. package/docs/swagger/dist/swagger-ui.js +2 -0
  48. package/docs/swagger/dist/swagger-ui.js.map +1 -0
  49. package/docs/swagger/index.html +19 -0
  50. package/docs/swagger/swagger-ui.version +1 -0
  51. package/docs/swagger/swagger.yaml +1449 -0
  52. package/docs/transaction.md +1 -0
  53. package/docs/wallet.md +226 -1
  54. package/package.json +1 -1
  55. package/src/primitives/PrivateKey.ts +43 -2
  56. package/src/primitives/__tests/PrivateKey.test.ts +87 -7
  57. package/src/transaction/Broadcaster.ts +4 -0
  58. package/src/wallet/WalletClient.ts +10 -2
  59. package/src/wallet/substrates/HTTPWalletJSON.ts +143 -0
@@ -0,0 +1,1449 @@
1
+ openapi: 3.1.0
2
+ info:
3
+ title: Wallet JSON API
4
+ version: 1.0.0
5
+ servers:
6
+ - url: http://localhost:3321
7
+ tags:
8
+ - name: HTTPWalletJSON
9
+ description: HTTP Wallet JSON API
10
+ paths:
11
+ /createAction:
12
+ post:
13
+ tags:
14
+ - HTTPWalletJSON
15
+ summary: Creates a new Bitcoin transaction
16
+ requestBody:
17
+ required: true
18
+ content:
19
+ application/json:
20
+ schema:
21
+ $ref: '#/components/schemas/CreateActionArgs'
22
+ responses:
23
+ '200':
24
+ description: The created transaction result
25
+ content:
26
+ application/json:
27
+ schema:
28
+ $ref: '#/components/schemas/CreateActionResult'
29
+ '400':
30
+ description: Invalid input
31
+ '500':
32
+ description: Internal server error
33
+ /signAction:
34
+ post:
35
+ tags:
36
+ - HTTPWalletJSON
37
+ summary: Signs a transaction previously created using `createAction`
38
+ requestBody:
39
+ required: true
40
+ content:
41
+ application/json:
42
+ schema:
43
+ $ref: '#/components/schemas/SignActionArgs'
44
+ responses:
45
+ '200':
46
+ description: The signed transaction result
47
+ content:
48
+ application/json:
49
+ schema:
50
+ $ref: '#/components/schemas/SignActionResult'
51
+ '400':
52
+ description: Invalid input
53
+ '500':
54
+ description: Internal server error
55
+ /abortAction:
56
+ post:
57
+ tags:
58
+ - HTTPWalletJSON
59
+ summary: Aborts a transaction that is in progress
60
+ requestBody:
61
+ required: true
62
+ content:
63
+ application/json:
64
+ schema:
65
+ $ref: '#/components/schemas/AbortActionArgs'
66
+ responses:
67
+ '200':
68
+ description: The abortion result
69
+ content:
70
+ application/json:
71
+ schema:
72
+ $ref: '#/components/schemas/AbortActionResult'
73
+ '400':
74
+ description: Invalid input
75
+ '500':
76
+ description: Internal server error
77
+ /listActions:
78
+ post:
79
+ tags:
80
+ - HTTPWalletJSON
81
+ summary: Lists all transactions matching the specified labels
82
+ requestBody:
83
+ required: true
84
+ content:
85
+ application/json:
86
+ schema:
87
+ $ref: '#/components/schemas/ListActionsArgs'
88
+ responses:
89
+ '200':
90
+ description: The list of actions
91
+ content:
92
+ application/json:
93
+ schema:
94
+ $ref: '#/components/schemas/ListActionsResult'
95
+ '400':
96
+ description: Invalid input
97
+ '500':
98
+ description: Internal server error
99
+ /internalizeAction:
100
+ post:
101
+ tags:
102
+ - HTTPWalletJSON
103
+ summary: Submits a transaction to be internalized
104
+ requestBody:
105
+ required: true
106
+ content:
107
+ application/json:
108
+ schema:
109
+ $ref: '#/components/schemas/InternalizeActionArgs'
110
+ responses:
111
+ '200':
112
+ description: The internalization result
113
+ content:
114
+ application/json:
115
+ schema:
116
+ $ref: '#/components/schemas/InternalizeActionResult'
117
+ '400':
118
+ description: Invalid input
119
+ '500':
120
+ description: Internal server error
121
+ /listOutputs:
122
+ post:
123
+ tags:
124
+ - HTTPWalletJSON
125
+ summary: Lists the spendable outputs kept within a specific basket
126
+ requestBody:
127
+ required: true
128
+ content:
129
+ application/json:
130
+ schema:
131
+ $ref: '#/components/schemas/ListOutputsArgs'
132
+ responses:
133
+ '200':
134
+ description: The list of outputs
135
+ content:
136
+ application/json:
137
+ schema:
138
+ $ref: '#/components/schemas/ListOutputsResult'
139
+ '400':
140
+ description: Invalid input
141
+ '500':
142
+ description: Internal server error
143
+ /relinquishOutput:
144
+ post:
145
+ tags:
146
+ - HTTPWalletJSON
147
+ summary: Relinquish an output out of a basket
148
+ requestBody:
149
+ required: true
150
+ content:
151
+ application/json:
152
+ schema:
153
+ type: object
154
+ properties:
155
+ basket:
156
+ $ref: '#/components/schemas/BasketStringUnder300Bytes'
157
+ output:
158
+ $ref: '#/components/schemas/OutpointString'
159
+ responses:
160
+ '200':
161
+ description: The relinquishment result
162
+ content:
163
+ application/json:
164
+ schema:
165
+ type: object
166
+ properties:
167
+ relinquished:
168
+ type: boolean
169
+ examples:
170
+ - true
171
+ '400':
172
+ description: Invalid input
173
+ '500':
174
+ description: Internal server error
175
+ /getPublicKey:
176
+ post:
177
+ tags:
178
+ - HTTPWalletJSON
179
+ summary: Retrieves the public key
180
+ requestBody:
181
+ required: true
182
+ content:
183
+ application/json:
184
+ schema:
185
+ type: object
186
+ properties:
187
+ seekPermission:
188
+ type: boolean
189
+ default: true
190
+ identityKey:
191
+ type: boolean
192
+ protocolID:
193
+ type: array
194
+ prefixItems:
195
+ - type: integer
196
+ - type: string
197
+ minItems: 2
198
+ maxItems: 2
199
+ keyID:
200
+ type: string
201
+ privileged:
202
+ type: boolean
203
+ default: false
204
+ privilegedReason:
205
+ type: string
206
+ counterparty:
207
+ type: string
208
+ forSelf:
209
+ type: boolean
210
+ default: false
211
+ responses:
212
+ '200':
213
+ description: The public key
214
+ content:
215
+ application/json:
216
+ schema:
217
+ type: object
218
+ properties:
219
+ publicKey:
220
+ type: string
221
+ '400':
222
+ description: Invalid input
223
+ '500':
224
+ description: Internal server error
225
+
226
+ /revealCounterpartyKeyLinkage:
227
+ post:
228
+ tags:
229
+ - HTTPWalletJSON
230
+ summary: Reveals counterparty key linkage
231
+ requestBody:
232
+ required: true
233
+ content:
234
+ application/json:
235
+ schema:
236
+ type: object
237
+ properties:
238
+ counterparty:
239
+ type: string
240
+ verifier:
241
+ type: string
242
+ privilegedReason:
243
+ type: string
244
+ privileged:
245
+ type: boolean
246
+ default: false
247
+ responses:
248
+ '200':
249
+ description: The counterparty key linkage
250
+ content:
251
+ application/json:
252
+ schema:
253
+ type: object
254
+ properties:
255
+ prover:
256
+ type: string
257
+ verifier:
258
+ type: string
259
+ counterparty:
260
+ type: string
261
+ revelationTime:
262
+ type: string
263
+ encryptedLinkage:
264
+ type: array
265
+ items:
266
+ type: integer
267
+ encryptedLinkageProof:
268
+ type: array
269
+ items:
270
+ type: integer
271
+ '400':
272
+ description: Invalid input
273
+ '500':
274
+ description: Internal server error
275
+
276
+ /revealSpecificKeyLinkage:
277
+ post:
278
+ tags:
279
+ - HTTPWalletJSON
280
+ summary: Reveals specific key linkage
281
+ requestBody:
282
+ required: true
283
+ content:
284
+ application/json:
285
+ schema:
286
+ type: object
287
+ properties:
288
+ counterparty:
289
+ type: string
290
+ verifier:
291
+ type: string
292
+ protocolID:
293
+ type: array
294
+ items:
295
+ - type: integer
296
+ - type: string
297
+ keyID:
298
+ type: string
299
+ privilegedReason:
300
+ type: string
301
+ privileged:
302
+ type: boolean
303
+ default: false
304
+ responses:
305
+ '200':
306
+ description: The specific key linkage
307
+ content:
308
+ application/json:
309
+ schema:
310
+ type: object
311
+ properties:
312
+ prover:
313
+ type: string
314
+ verifier:
315
+ type: string
316
+ counterparty:
317
+ type: string
318
+ protocolID:
319
+ type: array
320
+ prefixItems:
321
+ - type: integer
322
+ - type: string
323
+ minItems: 2
324
+ maxItems: 2
325
+ keyID:
326
+ type: string
327
+ encryptedLinkage:
328
+ type: array
329
+ items:
330
+ type: integer
331
+ encryptedLinkageProof:
332
+ type: array
333
+ items:
334
+ type: integer
335
+ proofType:
336
+ type: integer
337
+ '400':
338
+ description: Invalid input
339
+ '500':
340
+ description: Internal server error
341
+
342
+ /encrypt:
343
+ post:
344
+ tags:
345
+ - HTTPWalletJSON
346
+ summary: Encrypts data
347
+ requestBody:
348
+ required: true
349
+ content:
350
+ application/json:
351
+ schema:
352
+ type: object
353
+ properties:
354
+ seekPermission:
355
+ type: boolean
356
+ default: true
357
+ plaintext:
358
+ type: array
359
+ items:
360
+ type: integer
361
+ protocolID:
362
+ type: array
363
+ items:
364
+ - type: integer
365
+ - type: string
366
+ keyID:
367
+ type: string
368
+ privilegedReason:
369
+ type: string
370
+ counterparty:
371
+ type: string
372
+ privileged:
373
+ type: boolean
374
+ default: false
375
+ responses:
376
+ '200':
377
+ description: The encrypted data
378
+ content:
379
+ application/json:
380
+ schema:
381
+ type: object
382
+ properties:
383
+ ciphertext:
384
+ type: array
385
+ items:
386
+ type: integer
387
+ '400':
388
+ description: Invalid input
389
+ '500':
390
+ description: Internal server error
391
+
392
+ /decrypt:
393
+ post:
394
+ tags:
395
+ - HTTPWalletJSON
396
+ summary: Decrypts data
397
+ requestBody:
398
+ required: true
399
+ content:
400
+ application/json:
401
+ schema:
402
+ type: object
403
+ properties:
404
+ seekPermission:
405
+ type: boolean
406
+ default: true
407
+ ciphertext:
408
+ type: array
409
+ items:
410
+ type: integer
411
+ protocolID:
412
+ type: array
413
+ items:
414
+ - type: integer
415
+ - type: string
416
+ keyID:
417
+ type: string
418
+ privilegedReason:
419
+ type: string
420
+ counterparty:
421
+ type: string
422
+ privileged:
423
+ type: boolean
424
+ default: false
425
+ responses:
426
+ '200':
427
+ description: The decrypted data
428
+ content:
429
+ application/json:
430
+ schema:
431
+ type: object
432
+ properties:
433
+ plaintext:
434
+ type: array
435
+ items:
436
+ type: integer
437
+ '400':
438
+ description: Invalid input
439
+ '500':
440
+ description: Internal server error
441
+
442
+ /createHmac:
443
+ post:
444
+ tags:
445
+ - HTTPWalletJSON
446
+ summary: Creates HMAC
447
+ requestBody:
448
+ required: true
449
+ content:
450
+ application/json:
451
+ schema:
452
+ type: object
453
+ properties:
454
+ seekPermission:
455
+ type: boolean
456
+ default: true
457
+ data:
458
+ type: array
459
+ items:
460
+ type: integer
461
+ protocolID:
462
+ type: array
463
+ items:
464
+ - type: integer
465
+ - type: string
466
+ keyID:
467
+ type: string
468
+ privilegedReason:
469
+ type: string
470
+ counterparty:
471
+ type: string
472
+ privileged:
473
+ type: boolean
474
+ default: false
475
+ responses:
476
+ '200':
477
+ description: The HMAC
478
+ content:
479
+ application/json:
480
+ schema:
481
+ type: object
482
+ properties:
483
+ hmac:
484
+ type: array
485
+ items:
486
+ type: integer
487
+ '400':
488
+ description: Invalid input
489
+ '500':
490
+ description: Internal server error
491
+
492
+ /verifyHmac:
493
+ post:
494
+ tags:
495
+ - HTTPWalletJSON
496
+ summary: Verifies HMAC
497
+ requestBody:
498
+ required: true
499
+ content:
500
+ application/json:
501
+ schema:
502
+ type: object
503
+ properties:
504
+ seekPermission:
505
+ type: boolean
506
+ default: true
507
+ data:
508
+ type: array
509
+ items:
510
+ type: integer
511
+ hmac:
512
+ type: array
513
+ items:
514
+ type: integer
515
+ protocolID:
516
+ type: array
517
+ items:
518
+ - type: integer
519
+ - type: string
520
+ keyID:
521
+ type: string
522
+ privilegedReason:
523
+ type: string
524
+ counterparty:
525
+ type: string
526
+ privileged:
527
+ type: boolean
528
+ default: false
529
+ responses:
530
+ '200':
531
+ description: The verification result
532
+ content:
533
+ application/json:
534
+ schema:
535
+ type: object
536
+ properties:
537
+ valid:
538
+ type: boolean
539
+ '400':
540
+ description: Invalid input
541
+ '500':
542
+ description: Internal server error
543
+
544
+ /createSignature:
545
+ post:
546
+ tags:
547
+ - HTTPWalletJSON
548
+ summary: Creates a signature
549
+ requestBody:
550
+ required: true
551
+ content:
552
+ application/json:
553
+ schema:
554
+ type: object
555
+ properties:
556
+ seekPermission:
557
+ type: boolean
558
+ default: true
559
+ data:
560
+ type: array
561
+ items:
562
+ type: integer
563
+ hashToDirectlySign:
564
+ type: array
565
+ items:
566
+ type: integer
567
+ protocolID:
568
+ type: array
569
+ items:
570
+ - type: integer
571
+ - type: string
572
+ keyID:
573
+ type: string
574
+ privilegedReason:
575
+ type: string
576
+ counterparty:
577
+ type: string
578
+ privileged:
579
+ type: boolean
580
+ default: false
581
+ responses:
582
+ '200':
583
+ description: The signature
584
+ content:
585
+ application/json:
586
+ schema:
587
+ type: object
588
+ properties:
589
+ signature:
590
+ type: array
591
+ items:
592
+ type: integer
593
+ '400':
594
+ description: Invalid input
595
+ '500':
596
+ description: Internal server error
597
+
598
+ /verifySignature:
599
+ post:
600
+ tags:
601
+ - HTTPWalletJSON
602
+ summary: Verifies a signature
603
+ requestBody:
604
+ required: true
605
+ content:
606
+ application/json:
607
+ schema:
608
+ type: object
609
+ properties:
610
+ seekPermission:
611
+ type: boolean
612
+ default: true
613
+ data:
614
+ type: array
615
+ items:
616
+ type: integer
617
+ hashToDirectlyVerify:
618
+ type: array
619
+ items:
620
+ type: integer
621
+ signature:
622
+ type: array
623
+ items:
624
+ type: integer
625
+ protocolID:
626
+ type: array
627
+ items:
628
+ - type: integer
629
+ - type: string
630
+ keyID:
631
+ type: string
632
+ privilegedReason:
633
+ type: string
634
+ counterparty:
635
+ type: string
636
+ forSelf:
637
+ type: boolean
638
+ default: false
639
+ privileged:
640
+ type: boolean
641
+ default: false
642
+ responses:
643
+ '200':
644
+ description: The verification result
645
+ content:
646
+ application/json:
647
+ schema:
648
+ type: object
649
+ properties:
650
+ valid:
651
+ type: boolean
652
+ '400':
653
+ description: Invalid input
654
+ '500':
655
+ description: Internal server error
656
+
657
+ /acquireCertificate:
658
+ post:
659
+ tags:
660
+ - HTTPWalletJSON
661
+ summary: Acquires a certificate
662
+ requestBody:
663
+ required: true
664
+ content:
665
+ application/json:
666
+ schema:
667
+ $ref: '#/components/schemas/AcquireCertificateArgs'
668
+ responses:
669
+ '200':
670
+ description: The acquired certificate
671
+ content:
672
+ application/json:
673
+ schema:
674
+ $ref: '#/components/schemas/AcquireCertificateResult'
675
+ '400':
676
+ description: Invalid input
677
+ '500':
678
+ description: Internal server error
679
+
680
+ /listCertificates:
681
+ post:
682
+ tags:
683
+ - HTTPWalletJSON
684
+ summary: Lists certificates
685
+ requestBody:
686
+ required: true
687
+ content:
688
+ application/json:
689
+ schema:
690
+ type: object
691
+ properties:
692
+ certifiers:
693
+ type: array
694
+ items:
695
+ type: string
696
+ types:
697
+ type: array
698
+ items:
699
+ type: string
700
+ limit:
701
+ type: integer
702
+ offset:
703
+ type: integer
704
+ privileged:
705
+ type: boolean
706
+ default: false
707
+ privilegedReason:
708
+ type: string
709
+ responses:
710
+ '200':
711
+ description: The list of certificates
712
+ content:
713
+ application/json:
714
+ schema:
715
+ $ref: '#/components/schemas/ListCertificatesResult'
716
+ '400':
717
+ description: Invalid input
718
+ '500':
719
+ description: Internal server error
720
+
721
+ /proveCertificate:
722
+ post:
723
+ tags:
724
+ - HTTPWalletJSON
725
+ summary: Proves a certificate
726
+ requestBody:
727
+ required: true
728
+ content:
729
+ application/json:
730
+ schema:
731
+ $ref: '#/components/schemas/ProveCertificateArgs'
732
+ responses:
733
+ '200':
734
+ description: The proof of the certificate
735
+ content:
736
+ application/json:
737
+ schema:
738
+ $ref: '#/components/schemas/ProveCertificateResult'
739
+ '400':
740
+ description: Invalid input
741
+ '500':
742
+ description: Internal server error
743
+
744
+ /relinquishCertificate:
745
+ post:
746
+ tags:
747
+ - HTTPWalletJSON
748
+ summary: Relinquishes a certificate
749
+ requestBody:
750
+ required: true
751
+ content:
752
+ application/json:
753
+ schema:
754
+ type: object
755
+ properties:
756
+ type:
757
+ type: string
758
+ serialNumber:
759
+ type: string
760
+ certifier:
761
+ type: string
762
+ responses:
763
+ '200':
764
+ description: The relinquishment result
765
+ content:
766
+ application/json:
767
+ schema:
768
+ type: object
769
+ properties:
770
+ relinquished:
771
+ type: boolean
772
+ examples:
773
+ - true
774
+ '400':
775
+ description: Invalid input
776
+ '500':
777
+ description: Internal server error
778
+
779
+ /discoverByIdentityKey:
780
+ post:
781
+ tags:
782
+ - HTTPWalletJSON
783
+ summary: Discovers certificates by identity key
784
+ requestBody:
785
+ required: true
786
+ content:
787
+ application/json:
788
+ schema:
789
+ type: object
790
+ properties:
791
+ seekPermission:
792
+ type: boolean
793
+ default: true
794
+ identityKey:
795
+ type: string
796
+ limit:
797
+ type: integer
798
+ offset:
799
+ type: integer
800
+ responses:
801
+ '200':
802
+ description: The discovered certificates
803
+ content:
804
+ application/json:
805
+ schema:
806
+ $ref: '#/components/schemas/DiscoverCertificatesResult'
807
+ '400':
808
+ description: Invalid input
809
+ '500':
810
+ description: Internal server error
811
+
812
+ /discoverByAttributes:
813
+ post:
814
+ tags:
815
+ - HTTPWalletJSON
816
+ summary: Discovers certificates by attributes
817
+ requestBody:
818
+ required: true
819
+ content:
820
+ application/json:
821
+ schema:
822
+ type: object
823
+ properties:
824
+ seekPermission:
825
+ type: boolean
826
+ default: true
827
+ attributes:
828
+ type: object
829
+ additionalProperties:
830
+ type: string
831
+ limit:
832
+ type: integer
833
+ offset:
834
+ type: integer
835
+ responses:
836
+ '200':
837
+ description: The discovered certificates
838
+ content:
839
+ application/json:
840
+ schema:
841
+ $ref: '#/components/schemas/DiscoverCertificatesResult'
842
+ '400':
843
+ description: Invalid input
844
+ '500':
845
+ description: Internal server error
846
+
847
+ /isAuthenticated:
848
+ post:
849
+ tags:
850
+ - HTTPWalletJSON
851
+ summary: Checks if the user is authenticated
852
+ responses:
853
+ '200':
854
+ description: The authentication status
855
+ content:
856
+ application/json:
857
+ schema:
858
+ type: object
859
+ properties:
860
+ authenticated:
861
+ type: boolean
862
+ '400':
863
+ description: Invalid input
864
+ '500':
865
+ description: Internal server error
866
+
867
+ /waitForAuthentication:
868
+ post:
869
+ tags:
870
+ - HTTPWalletJSON
871
+ summary: Waits for user authentication
872
+ responses:
873
+ '200':
874
+ description: The authentication result
875
+ content:
876
+ application/json:
877
+ schema:
878
+ type: object
879
+ properties:
880
+ authenticated:
881
+ type: boolean
882
+ examples:
883
+ - true
884
+ '400':
885
+ description: Invalid input
886
+ '500':
887
+ description: Internal server error
888
+
889
+ /getHeight:
890
+ post:
891
+ tags:
892
+ - HTTPWalletJSON
893
+ summary: Retrieves the current blockchain height
894
+ responses:
895
+ '200':
896
+ description: The current blockchain height
897
+ content:
898
+ application/json:
899
+ schema:
900
+ type: object
901
+ properties:
902
+ height:
903
+ type: integer
904
+ '400':
905
+ description: Invalid input
906
+ '500':
907
+ description: Internal server error
908
+
909
+ /getHeaderForHeight:
910
+ post:
911
+ tags:
912
+ - HTTPWalletJSON
913
+ summary: Retrieves the block header for a specific height
914
+ requestBody:
915
+ required: true
916
+ content:
917
+ application/json:
918
+ schema:
919
+ type: object
920
+ properties:
921
+ height:
922
+ type: integer
923
+ responses:
924
+ '200':
925
+ description: The block header
926
+ content:
927
+ application/json:
928
+ schema:
929
+ type: object
930
+ properties:
931
+ header:
932
+ type: string
933
+ '400':
934
+ description: Invalid input
935
+ '500':
936
+ description: Internal server error
937
+
938
+ /getNetwork:
939
+ post:
940
+ tags:
941
+ - HTTPWalletJSON
942
+ summary: Retrieves the current network
943
+ responses:
944
+ '200':
945
+ description: The current network
946
+ content:
947
+ application/json:
948
+ schema:
949
+ type: object
950
+ properties:
951
+ network:
952
+ type: string
953
+ enum:
954
+ - mainnet
955
+ - testnet
956
+ '400':
957
+ description: Invalid input
958
+ '500':
959
+ description: Internal server error
960
+
961
+ /getVersion:
962
+ post:
963
+ tags:
964
+ - HTTPWalletJSON
965
+ summary: Retrieves the current version
966
+ responses:
967
+ '200':
968
+ description: The current version
969
+ content:
970
+ application/json:
971
+ schema:
972
+ type: object
973
+ properties:
974
+ version:
975
+ type: string
976
+ '400':
977
+ description: Invalid input
978
+ '500':
979
+ description: Internal server error
980
+ components:
981
+ schemas:
982
+ CreateActionArgs:
983
+ type: object
984
+ properties:
985
+ description:
986
+ type: string
987
+ inputBEEF:
988
+ type: array
989
+ items:
990
+ type: number
991
+ inputs:
992
+ type: array
993
+ items:
994
+ $ref: '#/components/schemas/CreateActionInput'
995
+ outputs:
996
+ type: array
997
+ items:
998
+ $ref: '#/components/schemas/CreateActionOutput'
999
+ lockTime:
1000
+ type: number
1001
+ version:
1002
+ type: number
1003
+ labels:
1004
+ type: array
1005
+ items:
1006
+ type: string
1007
+ options:
1008
+ $ref: '#/components/schemas/CreateActionOptions'
1009
+ CreateActionResult:
1010
+ type: object
1011
+ properties:
1012
+ txid:
1013
+ type: string
1014
+ tx:
1015
+ type: array
1016
+ items:
1017
+ type: number
1018
+ noSendChange:
1019
+ type: array
1020
+ items:
1021
+ type: string
1022
+ sendWithResults:
1023
+ type: array
1024
+ items:
1025
+ $ref: '#/components/schemas/SendWithResult'
1026
+ signableTransaction:
1027
+ $ref: '#/components/schemas/SignableTransaction'
1028
+ SignActionArgs:
1029
+ type: object
1030
+ properties:
1031
+ spends:
1032
+ type: object
1033
+ additionalProperties:
1034
+ $ref: '#/components/schemas/SignActionSpend'
1035
+ reference:
1036
+ type: string
1037
+ options:
1038
+ $ref: '#/components/schemas/SignActionOptions'
1039
+ SignActionResult:
1040
+ type: object
1041
+ properties:
1042
+ txid:
1043
+ type: string
1044
+ tx:
1045
+ type: array
1046
+ items:
1047
+ type: number
1048
+ sendWithResults:
1049
+ type: array
1050
+ items:
1051
+ $ref: '#/components/schemas/SendWithResult'
1052
+ AbortActionArgs:
1053
+ type: object
1054
+ properties:
1055
+ reference:
1056
+ type: string
1057
+ AbortActionResult:
1058
+ type: object
1059
+ properties:
1060
+ aborted:
1061
+ type: boolean
1062
+ examples:
1063
+ - true
1064
+ ListActionsArgs:
1065
+ type: object
1066
+ properties:
1067
+ labels:
1068
+ type: array
1069
+ items:
1070
+ type: string
1071
+ labelQueryMode:
1072
+ type: string
1073
+ enum: [any, all]
1074
+ includeLabels:
1075
+ type: boolean
1076
+ includeInputs:
1077
+ type: boolean
1078
+ includeInputSourceLockingScripts:
1079
+ type: boolean
1080
+ includeInputUnlockingScripts:
1081
+ type: boolean
1082
+ includeOutputs:
1083
+ type: boolean
1084
+ includeOutputLockingScripts:
1085
+ type: boolean
1086
+ limit:
1087
+ type: number
1088
+ offset:
1089
+ type: number
1090
+ seekPermission:
1091
+ type: boolean
1092
+ ListActionsResult:
1093
+ type: object
1094
+ properties:
1095
+ totalActions:
1096
+ type: number
1097
+ actions:
1098
+ type: array
1099
+ items:
1100
+ $ref: '#/components/schemas/WalletAction'
1101
+ InternalizeActionArgs:
1102
+ type: object
1103
+ properties:
1104
+ tx:
1105
+ type: array
1106
+ items:
1107
+ type: number
1108
+ outputs:
1109
+ type: array
1110
+ items:
1111
+ $ref: '#/components/schemas/InternalizeOutput'
1112
+ description:
1113
+ type: string
1114
+ labels:
1115
+ type: array
1116
+ items:
1117
+ type: string
1118
+ seekPermission:
1119
+ type: boolean
1120
+ InternalizeActionResult:
1121
+ type: object
1122
+ properties:
1123
+ accepted:
1124
+ type: boolean
1125
+ examples:
1126
+ - true
1127
+ ListOutputsArgs:
1128
+ type: object
1129
+ properties:
1130
+ basket:
1131
+ type: string
1132
+ tags:
1133
+ type: array
1134
+ items:
1135
+ type: string
1136
+ tagQueryMode:
1137
+ type: string
1138
+ enum: [all, any]
1139
+ include:
1140
+ type: string
1141
+ enum: [locking scripts, entire transactions]
1142
+ includeCustomInstructions:
1143
+ type: boolean
1144
+ includeTags:
1145
+ type: boolean
1146
+ includeLabels:
1147
+ type: boolean
1148
+ limit:
1149
+ type: number
1150
+ offset:
1151
+ type: number
1152
+ seekPermission:
1153
+ type: boolean
1154
+ ListOutputsResult:
1155
+ type: object
1156
+ properties:
1157
+ totalOutputs:
1158
+ type: number
1159
+ BEEF:
1160
+ type: array
1161
+ items:
1162
+ type: number
1163
+ outputs:
1164
+ type: array
1165
+ items:
1166
+ $ref: '#/components/schemas/WalletOutput'
1167
+ CreateActionInput:
1168
+ type: object
1169
+ properties:
1170
+ outpoint:
1171
+ type: string
1172
+ inputDescription:
1173
+ type: string
1174
+ unlockingScript:
1175
+ type: string
1176
+ unlockingScriptLength:
1177
+ type: number
1178
+ sequenceNumber:
1179
+ type: number
1180
+ CreateActionOutput:
1181
+ type: object
1182
+ properties:
1183
+ lockingScript:
1184
+ type: string
1185
+ satoshis:
1186
+ type: number
1187
+ outputDescription:
1188
+ type: string
1189
+ basket:
1190
+ type: string
1191
+ customInstructions:
1192
+ type: string
1193
+ tags:
1194
+ type: array
1195
+ items:
1196
+ type: string
1197
+ CreateActionOptions:
1198
+ type: object
1199
+ properties:
1200
+ signAndProcess:
1201
+ type: boolean
1202
+ acceptDelayedBroadcast:
1203
+ type: boolean
1204
+ trustSelf:
1205
+ type: string
1206
+ enum: [known]
1207
+ knownTxids:
1208
+ type: array
1209
+ items:
1210
+ type: string
1211
+ returnTXIDOnly:
1212
+ type: boolean
1213
+ noSend:
1214
+ type: boolean
1215
+ noSendChange:
1216
+ type: array
1217
+ items:
1218
+ type: string
1219
+ sendWith:
1220
+ type: array
1221
+ items:
1222
+ type: string
1223
+ randomizeOutputs:
1224
+ type: boolean
1225
+ SendWithResult:
1226
+ type: object
1227
+ properties:
1228
+ txid:
1229
+ type: string
1230
+ status:
1231
+ type: string
1232
+ enum: [unproven, sending, failed]
1233
+ SignableTransaction:
1234
+ type: object
1235
+ properties:
1236
+ tx:
1237
+ type: array
1238
+ items:
1239
+ type: number
1240
+ reference:
1241
+ type: string
1242
+ SignActionSpend:
1243
+ type: object
1244
+ properties:
1245
+ unlockingScript:
1246
+ type: string
1247
+ sequenceNumber:
1248
+ type: number
1249
+ SignActionOptions:
1250
+ type: object
1251
+ properties:
1252
+ acceptDelayedBroadcast:
1253
+ type: boolean
1254
+ returnTXIDOnly:
1255
+ type: boolean
1256
+ noSend:
1257
+ type: boolean
1258
+ sendWith:
1259
+ type: array
1260
+ items:
1261
+ type: string
1262
+ InternalizeOutput:
1263
+ type: object
1264
+ properties:
1265
+ outputIndex:
1266
+ type: number
1267
+ protocol:
1268
+ type: string
1269
+ enum: [wallet payment, basket insertion]
1270
+ paymentRemittance:
1271
+ type: object
1272
+ properties:
1273
+ derivationPrefix:
1274
+ type: string
1275
+ derivationSuffix:
1276
+ type: string
1277
+ senderIdentityKey:
1278
+ type: string
1279
+ insertionRemittance:
1280
+ type: object
1281
+ properties:
1282
+ basket:
1283
+ type: string
1284
+ customInstructions:
1285
+ type: string
1286
+ tags:
1287
+ type: array
1288
+ items:
1289
+ type: string
1290
+ WalletAction:
1291
+ type: object
1292
+ properties:
1293
+ txid:
1294
+ type: string
1295
+ satoshis:
1296
+ type: number
1297
+ status:
1298
+ type: string
1299
+ enum: [completed, unprocessed, sending, unproven, unsigned, nosend, nonfinal]
1300
+ isOutgoing:
1301
+ type: boolean
1302
+ description:
1303
+ type: string
1304
+ labels:
1305
+ type: array
1306
+ items:
1307
+ type: string
1308
+ version:
1309
+ type: number
1310
+ lockTime:
1311
+ type: number
1312
+ inputs:
1313
+ type: array
1314
+ items:
1315
+ $ref: '#/components/schemas/WalletActionInput'
1316
+ outputs:
1317
+ type: array
1318
+ items:
1319
+ $ref: '#/components/schemas/WalletActionOutput'
1320
+ WalletActionInput:
1321
+ type: object
1322
+ properties:
1323
+ sourceOutpoint:
1324
+ type: string
1325
+ sourceSatoshis:
1326
+ type: number
1327
+ sourceLockingScript:
1328
+ type: string
1329
+ unlockingScript:
1330
+ type: string
1331
+ inputDescription:
1332
+ type: string
1333
+ sequenceNumber:
1334
+ type: number
1335
+ WalletActionOutput:
1336
+ type: object
1337
+ properties:
1338
+ satoshis:
1339
+ type: number
1340
+ lockingScript:
1341
+ type: string
1342
+ spendable:
1343
+ type: boolean
1344
+ customInstructions:
1345
+ type: string
1346
+ tags:
1347
+ type: array
1348
+ items:
1349
+ type: string
1350
+ outputIndex:
1351
+ type: number
1352
+ outputDescription:
1353
+ type: string
1354
+ basket:
1355
+ type: string
1356
+ WalletOutput:
1357
+ type: object
1358
+ properties:
1359
+ satoshis:
1360
+ type: number
1361
+ lockingScript:
1362
+ type: string
1363
+ spendable:
1364
+ type: boolean
1365
+ customInstructions:
1366
+ type: string
1367
+ tags:
1368
+ type: array
1369
+ items:
1370
+ type: string
1371
+ outpoint:
1372
+ type: string
1373
+ labels:
1374
+ type: array
1375
+ items:
1376
+ type: string
1377
+ BasketStringUnder300Bytes:
1378
+ type: string
1379
+ OutpointString:
1380
+ type: string
1381
+ AcquireCertificateArgs:
1382
+ type: object
1383
+ properties:
1384
+ certifier:
1385
+ type: string
1386
+ type:
1387
+ type: string
1388
+ attributes:
1389
+ type: object
1390
+ additionalProperties:
1391
+ type: string
1392
+ privilegedReason:
1393
+ type: string
1394
+ privileged:
1395
+ type: boolean
1396
+ default: false
1397
+ AcquireCertificateResult:
1398
+ type: object
1399
+ properties:
1400
+ certifier:
1401
+ type: string
1402
+ type:
1403
+ type: string
1404
+ serialNumber:
1405
+ type: string
1406
+ attributes:
1407
+ type: object
1408
+ additionalProperties:
1409
+ type: string
1410
+ issuanceTime:
1411
+ type: string
1412
+ expirationTime:
1413
+ type: string
1414
+ ListCertificatesResult:
1415
+ type: object
1416
+ properties:
1417
+ totalCertificates:
1418
+ type: number
1419
+ certificates:
1420
+ type: array
1421
+ items:
1422
+ $ref: '#/components/schemas/AcquireCertificateResult'
1423
+ ProveCertificateArgs:
1424
+ type: object
1425
+ properties:
1426
+ certifier:
1427
+ type: string
1428
+ type:
1429
+ type: string
1430
+ serialNumber:
1431
+ type: string
1432
+ proof:
1433
+ type: array
1434
+ items:
1435
+ type: integer
1436
+ ProveCertificateResult:
1437
+ type: object
1438
+ properties:
1439
+ valid:
1440
+ type: boolean
1441
+ DiscoverCertificatesResult:
1442
+ type: object
1443
+ properties:
1444
+ totalCertificates:
1445
+ type: number
1446
+ certificates:
1447
+ type: array
1448
+ items:
1449
+ $ref: '#/components/schemas/AcquireCertificateResult'