From 085bcb8234b840a59a1b7691ec24f40fd5f49908 Mon Sep 17 00:00:00 2001 From: Vlad Stan Date: Mon, 4 Jul 2022 17:36:41 +0300 Subject: [PATCH] doc: reference Swagger documentation for REST APIs --- .../templates/watchonly/_api_docs.html | 241 +----------------- 1 file changed, 7 insertions(+), 234 deletions(-) diff --git a/lnbits/extensions/watchonly/templates/watchonly/_api_docs.html b/lnbits/extensions/watchonly/templates/watchonly/_api_docs.html index 94b44a443..678e72386 100644 --- a/lnbits/extensions/watchonly/templates/watchonly/_api_docs.html +++ b/lnbits/extensions/watchonly/templates/watchonly/_api_docs.html @@ -1,248 +1,21 @@

- Watch Only extension uses mempool.space
+ Onchain Wallet (watch-only) extension uses mempool.space
For use with "account Extended Public Key" https://iancoleman.io/bip39/
Created by, - Ben Arc (using, - Ben Arc (using, + Embit
) +
+
+ Swagger REST API Documentation +

- - - - - - GET /watchonly/api/v1/wallet -
Headers
- {"X-Api-Key": <invoice_key>}
-
- Body (application/json) -
-
- Returns 200 OK (application/json) -
- [<wallets_object>, ...] -
Curl example
- curl -X GET {{ request.base_url }}watchonly/api/v1/wallet -H - "X-Api-Key: {{ user.wallets[0].inkey }}" - -
-
-
- - - - GET - /watchonly/api/v1/wallet/<wallet_id> -
Headers
- {"X-Api-Key": <invoice_key>}
-
- Body (application/json) -
-
- Returns 201 CREATED (application/json) -
- [<wallet_object>, ...] -
Curl example
- curl -X GET {{ request.base_url - }}watchonly/api/v1/wallet/<wallet_id> -H "X-Api-Key: {{ - user.wallets[0].inkey }}" - -
-
-
- - - - POST /watchonly/api/v1/wallet -
Headers
- {"X-Api-Key": <admin_key>}
-
- Body (application/json) -
-
- Returns 201 CREATED (application/json) -
- [<wallet_object>, ...] -
Curl example
- curl -X POST {{ request.base_url }}watchonly/api/v1/wallet -d - '{"title": <string>, "masterpub": <string>}' -H - "Content-type: application/json" -H "X-Api-Key: {{ - user.wallets[0].adminkey }}" - -
-
-
- - - - DELETE - /watchonly/api/v1/wallet/<wallet_id> -
Headers
- {"X-Api-Key": <admin_key>}
-
Returns 204 NO CONTENT
- -
Curl example
- curl -X DELETE {{ request.base_url - }}watchonly/api/v1/wallet/<wallet_id> -H "X-Api-Key: {{ - user.wallets[0].adminkey }}" - -
-
-
- - - - - GET - /watchonly/api/v1/addresses/<wallet_id> -
Headers
- {"X-Api-Key": <invoice_key>}
-
- Body (application/json) -
-
- Returns 200 OK (application/json) -
- [<address_object>, ...] -
Curl example
- curl -X GET {{ request.base_url - }}watchonly/api/v1/addresses/<wallet_id> -H "X-Api-Key: {{ - user.wallets[0].inkey }}" - -
-
-
- - - - - GET - /watchonly/api/v1/address/<wallet_id> -
Headers
- {"X-Api-Key": <invoice_key>}
-
- Body (application/json) -
-
- Returns 200 OK (application/json) -
- [<address_object>, ...] -
Curl example
- curl -X GET {{ request.base_url - }}watchonly/api/v1/address/<wallet_id> -H "X-Api-Key: {{ - user.wallets[0].inkey }}" - -
-
-
- - - - - GET /watchonly/api/v1/mempool -
Headers
- {"X-Api-Key": <admin_key>}
-
- Body (application/json) -
-
- Returns 200 OK (application/json) -
- [<mempool_object>, ...] -
Curl example
- curl -X GET {{ request.base_url }}watchonly/api/v1/mempool -H - "X-Api-Key: {{ user.wallets[0].adminkey }}" - -
-
-
- - - - - POST - /watchonly/api/v1/mempool -
Headers
- {"X-Api-Key": <admin_key>}
-
- Body (application/json) -
-
- Returns 201 CREATED (application/json) -
- [<mempool_object>, ...] -
Curl example
- curl -X PUT {{ request.base_url }}watchonly/api/v1/mempool -d - '{"endpoint": <string>}' -H "Content-type: application/json" - -H "X-Api-Key: {{ user.wallets[0].adminkey }}" - -
-
-
-