From 862fe1843cb9c2e0e5e31fcceeacd730db31e9c3 Mon Sep 17 00:00:00 2001 From: "github-actions[bot]" Date: Sun, 27 Oct 2024 12:53:22 +0000 Subject: [PATCH] deploy: 1984beb2c7a6b131a349e6c75f077dd28d776d5a --- 404.html | 6 +++--- AdvancedForms/index.html | 4 ++-- Apps/index.html | 4 ++-- BTCPayServer/LocalDevSetup/index.html | 4 ++-- BTCPayServer/Security/index.html | 4 ++-- BTCPayServer/db-migration/index.html | 4 ++-- BTCPayServer/greenfield-authorization/index.html | 4 ++-- BTCPayServer/greenfield-development/index.html | 4 ++-- BTCPayVsOthers/index.html | 4 ++-- BigCommerce/index.html | 4 ++-- Breez/index.html | 4 ++-- Bringin/index.html | 4 ++-- ColdCardWallet/index.html | 4 ++-- Community/index.html | 4 ++-- Conference-PoS-guide/index.html | 4 ++-- Configurator/index.html | 4 ++-- Contribute/Design/index.html | 4 ++-- Contribute/Dev/index.html | 4 ++-- Contribute/DevCode/index.html | 4 ++-- Contribute/DevTest/index.html | 4 ++-- Contribute/Misc/index.html | 4 ++-- Contribute/Translate/index.html | 4 ++-- Contribute/Write/index.html | 4 ++-- Contribute/WriteBlog/index.html | 4 ++-- Contribute/WriteDocs/index.html | 4 ++-- Contribute/WriteSoftware/index.html | 4 ++-- Contribute/index.html | 4 ++-- CreateStore/index.html | 4 ++-- CreateWallet/index.html | 4 ++-- CustomIntegration/index.html | 4 ++-- Dashboard/index.html | 4 ++-- Deployment/Azure/index.html | 4 ++-- Deployment/AzurePennyPinching/index.html | 4 ++-- Deployment/Clovyr/index.html | 4 ++-- Deployment/DynamicDNS/index.html | 4 ++-- Deployment/GoogleCloud/index.html | 4 ++-- Deployment/Hack0/index.html | 4 ++-- Deployment/Hardware/index.html | 4 ++-- Deployment/HardwareAsAService/index.html | 4 ++-- Deployment/LightningInABox/index.html | 4 ++-- Deployment/LunaNode/index.html | 4 ++-- Deployment/ManualDeployment/index.html | 4 ++-- Deployment/ManualDeploymentExtended/index.html | 4 ++-- Deployment/RaspberryPi4/index.html | 4 ++-- Deployment/ReverseProxyToTor/index.html | 4 ++-- Deployment/ReverseSSHtunnel/index.html | 4 ++-- Deployment/ThirdPartyHosting/index.html | 4 ++-- Deployment/index.html | 4 ++-- Deployment/voltagecloud/index.html | 4 ++-- Deployment/webdeployment/index.html | 4 ++-- Development/Altcoins/index.html | 4 ++-- Development/GreenFieldExample-NodeJS/index.html | 4 ++-- Development/GreenFieldExample/index.html | 4 ++-- Development/GreenfieldExample-PHP/index.html | 4 ++-- Development/InvoiceMetadata/index.html | 4 ++-- Development/LocalDev/index.html | 4 ++-- Development/LocalDevelopment/index.html | 4 ++-- Development/Plugins/index.html | 4 ++-- Development/TestnetDemo/index.html | 4 ++-- Development/Theme/index.html | 4 ++-- Development/ecommerce-integration-guide/index.html | 4 ++-- Development/index.html | 4 ++-- Docker/backup-restore/index.html | 4 ++-- Docker/chatwoot/index.html | 4 ++-- Docker/cloudflare-tunnel/index.html | 4 ++-- Docker/fastsync/index.html | 4 ++-- Docker/fireflyiii/index.html | 4 ++-- Docker/index.html | 6 +++--- Docker/joinmarket/index.html | 4 ++-- Docker/lightning-terminal/index.html | 4 ++-- Docker/ndlc/index.html | 4 ++-- Docker/pihole/index.html | 4 ++-- Docker/tallycoin-connect/index.html | 4 ++-- Drupal/index.html | 4 ++-- DynamicReports/index.html | 4 ++-- ElectrumPersonalServer/index.html | 4 ++-- ElectrumWallet/index.html | 4 ++-- ElectrumX/index.html | 4 ++-- FAQ/Altcoin/index.html | 4 ++-- FAQ/Apps/index.html | 4 ++-- FAQ/Deployment/index.html | 4 ++-- FAQ/General/index.html | 4 ++-- FAQ/Integrations/index.html | 4 ++-- FAQ/LightningNetwork/index.html | 4 ++-- FAQ/ServerSettings/index.html | 4 ++-- FAQ/Stores/index.html | 4 ++-- FAQ/Synchronization/index.html | 4 ++-- FAQ/Wallet/index.html | 4 ++-- FAQ/index.html | 4 ++-- Forms/index.html | 4 ++-- Grandnode/index.html | 4 ++-- Guide/index.html | 4 ++-- HardwareWalletIntegration/index.html | 4 ++-- InvoiceNinja/index.html | 4 ++-- Invoices/index.html | 4 ++-- LedgerWallet/index.html | 4 ++-- LightningNetwork/index.html | 4 ++-- LightningNetwork_PaymentChannels/index.html | 4 ++-- Magento/index.html | 4 ++-- NBXplorer/API/index.html | 4 ++-- NBXplorer/Postgres-Migration/index.html | 4 ++-- NBXplorer/Postgres-Schema/index.html | 4 ++-- NBXplorer/index.html | 4 ++-- Nopcommerce/index.html | 4 ++-- Nostr/index.html | 4 ++-- Notifications/index.html | 4 ++-- Odoo/index.html | 4 ++-- OpenCart/index.html | 4 ++-- Payjoin/index.html | 4 ++-- PaymentRequests/index.html | 4 ++-- Payouts/index.html | 4 ++-- Payroll/index.html | 4 ++-- PrestaShop/index.html | 4 ++-- PullPayments/index.html | 4 ++-- Refund/index.html | 4 ++-- RegisterAccount/index.html | 4 ++-- Reporting/index.html | 4 ++-- Shopify/index.html | 4 ++-- Shopware/index.html | 4 ++-- SideShift/index.html | 4 ++-- Sign-PSBT-with-sparrow-wallet/index.html | 4 ++-- Smartstore/index.html | 4 ++-- Support/index.html | 4 ++-- TicketTailor/index.html | 4 ++-- Translations/index.html | 4 ++-- Transmuter/DCA/index.html | 4 ++-- Transmuter/EmailReceiptsPreset/index.html | 4 ++-- Transmuter/index.html | 4 ++-- Trocador/index.html | 4 ++-- Troubleshooting/index.html | 4 ++-- TryItOut/index.html | 4 ++-- UseCase/index.html | 4 ++-- Vault/HowToVerify/index.html | 4 ++-- VirtueMart/index.html | 4 ++-- Wabisabi/index.html | 4 ++-- Walkthrough/index.html | 4 ++-- Wallet/index.html | 4 ++-- WalletSetup/index.html | 4 ++-- WasabiWallet/index.html | 4 ++-- WhatsNext/index.html | 4 ++-- Wix/index.html | 4 ++-- WooCommerce/index.html | 4 ++-- Xenforo/index.html | 4 ++-- Zapier/index.html | 4 ++-- assets/js/{101.63849674.js => 101.6168bb55.js} | 2 +- assets/js/{102.8df65484.js => 102.3fab4811.js} | 2 +- assets/js/{104.9375361c.js => 104.299429a1.js} | 2 +- assets/js/{106.c3942b03.js => 106.d48f7be8.js} | 2 +- assets/js/{108.6215d5b7.js => 108.fb6e9cf1.js} | 2 +- assets/js/{113.6360697b.js => 113.58e3d595.js} | 2 +- assets/js/{114.5d50763b.js => 114.12cbb563.js} | 2 +- assets/js/{118.648cded5.js => 118.f213ede1.js} | 2 +- assets/js/{12.fbd0a972.js => 12.491ce2be.js} | 2 +- assets/js/{122.5a2e613b.js => 122.1dffb2a4.js} | 2 +- assets/js/{123.dc1d6174.js => 123.a3c9d07e.js} | 2 +- assets/js/{124.eeed4716.js => 124.eff76455.js} | 2 +- assets/js/{125.591e35dc.js => 125.4ed69fbb.js} | 2 +- assets/js/{126.7e240c49.js => 126.699711a4.js} | 2 +- assets/js/{127.6fd8c7f3.js => 127.3402c98f.js} | 2 +- assets/js/{128.7b1b9f1c.js => 128.e4e2b2fa.js} | 2 +- assets/js/{129.6748d4ca.js => 129.939d6d01.js} | 2 +- assets/js/{130.12b296c8.js => 130.91803ee2.js} | 2 +- assets/js/{132.08af3bd5.js => 132.067cc005.js} | 2 +- assets/js/{134.ab5076a2.js => 134.9e55741b.js} | 2 +- assets/js/{135.f1adbc24.js => 135.45f98247.js} | 2 +- assets/js/{136.408150a6.js => 136.e0d1a8c9.js} | 2 +- assets/js/{137.035c7ebe.js => 137.b9a5e189.js} | 2 +- assets/js/{139.fa64e0db.js => 139.be751450.js} | 2 +- assets/js/{14.d5ad0da7.js => 14.86a0a34c.js} | 2 +- assets/js/{141.44364e5b.js => 141.5a80cca8.js} | 2 +- assets/js/{142.4b98bfcb.js => 142.b44d0731.js} | 2 +- assets/js/{143.bb365e29.js => 143.3eef0d65.js} | 2 +- assets/js/{146.85a59329.js => 146.132fed3f.js} | 2 +- assets/js/{147.9992b702.js => 147.db8217fe.js} | 2 +- assets/js/{148.f1aeeb8a.js => 148.6311d87b.js} | 2 +- assets/js/{149.d11440da.js => 149.cbc2b002.js} | 2 +- assets/js/{15.efe4767c.js => 15.92b4e302.js} | 2 +- assets/js/{150.85aed9af.js => 150.8b9f7360.js} | 2 +- assets/js/{151.b1dca33e.js => 151.8ce6399d.js} | 2 +- assets/js/{156.e489d94f.js => 156.456c6f83.js} | 2 +- assets/js/{158.1c4270fe.js => 158.e2acce8c.js} | 2 +- assets/js/{159.a0b924f4.js => 159.bc0853e0.js} | 2 +- assets/js/{16.46b3f2f0.js => 16.ab7bcde9.js} | 2 +- assets/js/{160.a5b63325.js => 160.cb891df2.js} | 2 +- assets/js/{161.cd7abb63.js => 161.31a81b47.js} | 2 +- assets/js/{162.f272300c.js => 162.5883dea7.js} | 2 +- assets/js/{164.3bde9f4a.js => 164.bccc6b8b.js} | 2 +- assets/js/{165.812e418e.js => 165.0cedcbd0.js} | 2 +- assets/js/{166.7862b995.js => 166.801295fc.js} | 2 +- assets/js/{167.6ccf4f42.js => 167.3b1ccd9a.js} | 2 +- assets/js/{169.57e10764.js => 169.d670bf35.js} | 2 +- assets/js/{17.b8a18426.js => 17.b719fd7c.js} | 2 +- assets/js/{18.aaa83177.js => 18.a4942480.js} | 2 +- assets/js/{19.5599e8c2.js => 19.005c0479.js} | 2 +- assets/js/{20.68d8b6fa.js => 20.876130f9.js} | 2 +- assets/js/{22.3b0afc81.js => 22.2ca1405a.js} | 2 +- assets/js/{23.56739d66.js => 23.5e32dfa0.js} | 2 +- assets/js/{24.4e1c219c.js => 24.a8de306b.js} | 2 +- assets/js/{27.6cbe6f5d.js => 27.ac351bfe.js} | 2 +- assets/js/{28.53719ced.js => 28.62717493.js} | 2 +- assets/js/{31.9bbc8789.js => 31.9f6acd09.js} | 2 +- assets/js/{32.a27b4c83.js => 32.64ef0ed7.js} | 2 +- assets/js/{33.d24d9848.js => 33.5d1a6c9c.js} | 2 +- assets/js/{34.06619843.js => 34.2ed1909e.js} | 2 +- assets/js/{35.94712e89.js => 35.190c5416.js} | 2 +- assets/js/{38.c3097998.js => 38.2bc1edc9.js} | 2 +- assets/js/{39.06d82b41.js => 39.b4d68ed1.js} | 2 +- assets/js/{41.4c83bc7d.js => 41.3f20f0b5.js} | 2 +- assets/js/{42.19cb2e9b.js => 42.6971d011.js} | 2 +- assets/js/{43.61b6af98.js => 43.21ca83f7.js} | 2 +- assets/js/{48.719aae46.js => 48.dfc45323.js} | 2 +- assets/js/{52.2db9e0db.js => 52.cba2d909.js} | 2 +- assets/js/{57.12f4215e.js => 57.39c6b996.js} | 2 +- assets/js/{58.ef03471f.js => 58.f9660288.js} | 2 +- assets/js/{60.cd16bba3.js => 60.ab2d1501.js} | 2 +- assets/js/{61.1aa4d419.js => 61.adf10dfb.js} | 2 +- assets/js/{63.740a65ac.js => 63.aaf01faa.js} | 2 +- assets/js/{66.406b32e8.js => 66.ee339c97.js} | 2 +- assets/js/{67.d9b26d3a.js => 67.edb751d4.js} | 2 +- assets/js/{68.3b79637a.js => 68.36c32429.js} | 2 +- assets/js/{69.7776b8b3.js => 69.e8b9418a.js} | 2 +- assets/js/{70.64c42745.js => 70.e6e25272.js} | 2 +- assets/js/{73.35a2c7b6.js => 73.e5e96ca6.js} | 2 +- assets/js/{77.65866ad2.js => 77.b03edfae.js} | 2 +- assets/js/{78.f580f064.js => 78.0a5cd876.js} | 2 +- assets/js/{79.3f097d3b.js => 79.b91a7e33.js} | 2 +- assets/js/{85.d8fa4282.js => 85.c1fdcbc4.js} | 2 +- assets/js/{87.bd1b4bfa.js => 87.57ca8270.js} | 2 +- assets/js/{88.beccbd8d.js => 88.bc9bafc5.js} | 2 +- assets/js/{89.a0a12ce9.js => 89.2a0fff28.js} | 2 +- assets/js/{90.90d0e707.js => 90.cce39b80.js} | 2 +- assets/js/{91.a3d74711.js => 91.75bf9e06.js} | 2 +- assets/js/{92.5ccf1adb.js => 92.4e42f70f.js} | 2 +- assets/js/{93.8085ed7c.js => 93.a736f276.js} | 2 +- assets/js/{94.d67da7d1.js => 94.7e19fc54.js} | 2 +- assets/js/{95.bfaed503.js => 95.a42680ed.js} | 2 +- assets/js/{98.ad27da7f.js => 98.a5ab3edb.js} | 2 +- assets/js/{app.7a7cea25.js => app.59c12ee0.js} | 4 ++-- index.html | 4 ++-- sitemap.xml | 2 +- 240 files changed, 388 insertions(+), 388 deletions(-) rename assets/js/{101.63849674.js => 101.6168bb55.js} (97%) rename assets/js/{102.8df65484.js => 102.3fab4811.js} (98%) rename assets/js/{104.9375361c.js => 104.299429a1.js} (96%) rename assets/js/{106.c3942b03.js => 106.d48f7be8.js} (98%) rename assets/js/{108.6215d5b7.js => 108.fb6e9cf1.js} (99%) rename assets/js/{113.6360697b.js => 113.58e3d595.js} (98%) rename assets/js/{114.5d50763b.js => 114.12cbb563.js} (99%) rename assets/js/{118.648cded5.js => 118.f213ede1.js} (99%) rename assets/js/{12.fbd0a972.js => 12.491ce2be.js} (82%) rename assets/js/{122.5a2e613b.js => 122.1dffb2a4.js} (98%) rename assets/js/{123.dc1d6174.js => 123.a3c9d07e.js} (99%) rename assets/js/{124.eeed4716.js => 124.eff76455.js} (99%) rename assets/js/{125.591e35dc.js => 125.4ed69fbb.js} (99%) rename assets/js/{126.7e240c49.js => 126.699711a4.js} (99%) rename assets/js/{127.6fd8c7f3.js => 127.3402c98f.js} (99%) rename assets/js/{128.7b1b9f1c.js => 128.e4e2b2fa.js} (99%) rename assets/js/{129.6748d4ca.js => 129.939d6d01.js} (98%) rename assets/js/{130.12b296c8.js => 130.91803ee2.js} (99%) rename assets/js/{132.08af3bd5.js => 132.067cc005.js} (98%) rename assets/js/{134.ab5076a2.js => 134.9e55741b.js} (99%) rename assets/js/{135.f1adbc24.js => 135.45f98247.js} (97%) rename assets/js/{136.408150a6.js => 136.e0d1a8c9.js} (98%) rename assets/js/{137.035c7ebe.js => 137.b9a5e189.js} (98%) rename assets/js/{139.fa64e0db.js => 139.be751450.js} (99%) rename assets/js/{14.d5ad0da7.js => 14.86a0a34c.js} (89%) rename assets/js/{141.44364e5b.js => 141.5a80cca8.js} (99%) rename assets/js/{142.4b98bfcb.js => 142.b44d0731.js} (99%) rename assets/js/{143.bb365e29.js => 143.3eef0d65.js} (99%) rename assets/js/{146.85a59329.js => 146.132fed3f.js} (99%) rename assets/js/{147.9992b702.js => 147.db8217fe.js} (98%) rename assets/js/{148.f1aeeb8a.js => 148.6311d87b.js} (96%) rename assets/js/{149.d11440da.js => 149.cbc2b002.js} (99%) rename assets/js/{15.efe4767c.js => 15.92b4e302.js} (80%) rename assets/js/{150.85aed9af.js => 150.8b9f7360.js} (98%) rename assets/js/{151.b1dca33e.js => 151.8ce6399d.js} (99%) rename assets/js/{156.e489d94f.js => 156.456c6f83.js} (99%) rename assets/js/{158.1c4270fe.js => 158.e2acce8c.js} (95%) rename assets/js/{159.a0b924f4.js => 159.bc0853e0.js} (98%) rename assets/js/{16.46b3f2f0.js => 16.ab7bcde9.js} (93%) rename assets/js/{160.a5b63325.js => 160.cb891df2.js} (98%) rename assets/js/{161.cd7abb63.js => 161.31a81b47.js} (97%) rename assets/js/{162.f272300c.js => 162.5883dea7.js} (98%) rename assets/js/{164.3bde9f4a.js => 164.bccc6b8b.js} (97%) rename assets/js/{165.812e418e.js => 165.0cedcbd0.js} (99%) rename assets/js/{166.7862b995.js => 166.801295fc.js} (98%) rename assets/js/{167.6ccf4f42.js => 167.3b1ccd9a.js} (99%) rename assets/js/{169.57e10764.js => 169.d670bf35.js} (99%) rename assets/js/{17.b8a18426.js => 17.b719fd7c.js} (82%) rename assets/js/{18.aaa83177.js => 18.a4942480.js} (89%) rename assets/js/{19.5599e8c2.js => 19.005c0479.js} (95%) rename assets/js/{20.68d8b6fa.js => 20.876130f9.js} (99%) rename assets/js/{22.3b0afc81.js => 22.2ca1405a.js} (83%) rename assets/js/{23.56739d66.js => 23.5e32dfa0.js} (86%) rename assets/js/{24.4e1c219c.js => 24.a8de306b.js} (89%) rename assets/js/{27.6cbe6f5d.js => 27.ac351bfe.js} (86%) rename assets/js/{28.53719ced.js => 28.62717493.js} (73%) rename assets/js/{31.9bbc8789.js => 31.9f6acd09.js} (93%) rename assets/js/{32.a27b4c83.js => 32.64ef0ed7.js} (82%) rename assets/js/{33.d24d9848.js => 33.5d1a6c9c.js} (96%) rename assets/js/{34.06619843.js => 34.2ed1909e.js} (90%) rename assets/js/{35.94712e89.js => 35.190c5416.js} (89%) rename assets/js/{38.c3097998.js => 38.2bc1edc9.js} (97%) rename assets/js/{39.06d82b41.js => 39.b4d68ed1.js} (97%) rename assets/js/{41.4c83bc7d.js => 41.3f20f0b5.js} (98%) rename assets/js/{42.19cb2e9b.js => 42.6971d011.js} (86%) rename assets/js/{43.61b6af98.js => 43.21ca83f7.js} (84%) rename assets/js/{48.719aae46.js => 48.dfc45323.js} (99%) rename assets/js/{52.2db9e0db.js => 52.cba2d909.js} (87%) rename assets/js/{57.12f4215e.js => 57.39c6b996.js} (94%) rename assets/js/{58.ef03471f.js => 58.f9660288.js} (96%) rename assets/js/{60.cd16bba3.js => 60.ab2d1501.js} (91%) rename assets/js/{61.1aa4d419.js => 61.adf10dfb.js} (99%) rename assets/js/{63.740a65ac.js => 63.aaf01faa.js} (94%) rename assets/js/{66.406b32e8.js => 66.ee339c97.js} (98%) rename assets/js/{67.d9b26d3a.js => 67.edb751d4.js} (99%) rename assets/js/{68.3b79637a.js => 68.36c32429.js} (99%) rename assets/js/{69.7776b8b3.js => 69.e8b9418a.js} (97%) rename assets/js/{70.64c42745.js => 70.e6e25272.js} (99%) rename assets/js/{73.35a2c7b6.js => 73.e5e96ca6.js} (97%) rename assets/js/{77.65866ad2.js => 77.b03edfae.js} (99%) rename assets/js/{78.f580f064.js => 78.0a5cd876.js} (99%) rename assets/js/{79.3f097d3b.js => 79.b91a7e33.js} (99%) rename assets/js/{85.d8fa4282.js => 85.c1fdcbc4.js} (98%) rename assets/js/{87.bd1b4bfa.js => 87.57ca8270.js} (99%) rename assets/js/{88.beccbd8d.js => 88.bc9bafc5.js} (97%) rename assets/js/{89.a0a12ce9.js => 89.2a0fff28.js} (99%) rename assets/js/{90.90d0e707.js => 90.cce39b80.js} (99%) rename assets/js/{91.a3d74711.js => 91.75bf9e06.js} (96%) rename assets/js/{92.5ccf1adb.js => 92.4e42f70f.js} (98%) rename assets/js/{93.8085ed7c.js => 93.a736f276.js} (98%) rename assets/js/{94.d67da7d1.js => 94.7e19fc54.js} (99%) rename assets/js/{95.bfaed503.js => 95.a42680ed.js} (98%) rename assets/js/{98.ad27da7f.js => 98.a5ab3edb.js} (99%) rename assets/js/{app.7a7cea25.js => app.59c12ee0.js} (70%) diff --git a/404.html b/404.html index 95c3686abd..ab25c01d51 100644 --- a/404.html +++ b/404.html @@ -9,13 +9,13 @@ - + -

404

Looks like we've got some broken links.
+ - + diff --git a/AdvancedForms/index.html b/AdvancedForms/index.html index 3ddea02228..dd08da0c8d 100644 --- a/AdvancedForms/index.html +++ b/AdvancedForms/index.html @@ -9,7 +9,7 @@ - + @@ -173,6 +173,6 @@ →

- + diff --git a/Apps/index.html b/Apps/index.html index 5747bf41a7..61d0ecae8e 100644 --- a/Apps/index.html +++ b/Apps/index.html @@ -9,7 +9,7 @@ - + @@ -58,6 +58,6 @@ GitHub (opens new window)

# BTCPay Server Apps

The primary purpose of BTCPay Server is to remove dependencies on trusted third-parties. The Apps are built in applications that obsolete central-authorities and allow users an easy way to extend the use case of the software. Users can self-host all sorts of customizable applications that work out of the box.

To create an app, go to Apps > Create a new app. Apps are store-dependent, which means that each app needs to be connected to a store.

# Point of Sale App

The web-based PoS app allows users with brick and mortar stores to readily accept cryptocurrencies without fees or a third-party, directly to their wallet. The PoS can be displayed easily on tablets or any other devices which support web browsing. Users can easily create a homescreen shortcut for a quick access to the web-app.

BTCPay Pos

Adding new products is easy. The app has a shopping cart feature, tips, product inventory, custom payment options and more.

The Point of sale app can also be used to receive donations, tips or even as a small e-commerce shop, depending on the options or customizations applied.

Curently, the Point of Sale app supports three different views:

  • A Static view representing only the items for sale.
  • A Cart view including items for sale and a cart for checkout.
  • A Light view consisting only of a keypad for easy and quick payments (Starting from v1.0.5.6 (opens new window)).

To get your first Point of Sale app running, follow theses few simple steps:

  1. Go to Apps and Create a new app
  2. Add a name for your app
  3. Choose app type > Point Of Sale
  4. Select the store to associate with the app.
  5. Customize your PoS by choosing a view (Static, Cart, Light), adding your own items with prices, photos, and a description.
  6. Click Save Settings.
  7. Click View App to view your PoS (Your customers can access the PoS through that link).

You can change the appearance of your Point of Sale app by following the theme customization guide.

# Crowdfunding App

Crowdfunding is an application which you can launch from BTCPay Server interface that allows you to create a self-hosted funding campaign, similar to Kickstarter or Indiegogo. Unlike traditional crowdfunding platforms, the creator of the campaign is the owner of the platform. Funds go directly to the creator’s wallet without any fees.

  1. Go to > Apps
  2. Add a name of your app
  3. Choose app type > Crowdfund
  4. Select the store to associate with the app.
  5. Customize your Crowdfund by adding your own perks with prices, photos, and description.
  6. Check the box > Allow crowdfund to be publicly visible
  7. Click "Save Settings".
  8. Click "View App" to view your Crowdfund (Contributors can access the crowdfund through that link).

If you would like to provide digital or physical products to the backers of your crowdfunding campaign, you can integrate WooCommerce store into it. You can also set limits on contribution perks using the inventory feature.

# Payment Button

Easily-embeddable HTML and highly-customizable payment buttons allow users to receive tips and donations. Online stores can also integrate payment buttons. When a site visitor clicks on the button, BTCPay displays the invoice.

  1. In your left menu bar, under the "PLUGINS" section, select "Pay Button".
  2. Allow anyone to create invoices.
  3. Customize your button.
  4. Copy the generated form and embed it on your website.
- + diff --git a/BTCPayServer/LocalDevSetup/index.html b/BTCPayServer/LocalDevSetup/index.html index c1421bdadb..8419ba65fa 100644 --- a/BTCPayServer/LocalDevSetup/index.html +++ b/BTCPayServer/LocalDevSetup/index.html @@ -9,7 +9,7 @@ - + @@ -72,6 +72,6 @@ type=lnd-rest;server=https://127.0.0.1:8084/;macaroonfilepath="local path to admin.macaroon on your computer, without these quotes";allowinsecure=true

Now you can create a lightning invoice on BTCPay Server regtest and make a payment through Polar.

PLEASE NOTE: You may get an exception break in Visual Studio. You must quickly click "Continue" in VS so the invoice is generated. Or, uncheck the box that says, "Break when this exception type is thrown".

# FAQ

# docker-compose up dev failed or tests are not passing, what should I do?

  1. Run docker-compose down --volumes (this will reset your test environment)
  2. Run docker-compose pull (this will ensure you have the latest images)
  3. Run again with docker-compose up dev

# How to run the Altcoin environment?

docker-compose -f docker-compose.altcoins.yml up dev

If you still have issues, try to restart docker.

# How to run the Selenium test with a browser?

Run dotnet user-secrets set RunSeleniumInBrowser true to run tests in browser.

To switch back to headless mode (recommended) you can run dotnet user-secrets remove RunSeleniumInBrowser.

# Session not created: This version of ChromeDriver only supports Chrome version 88

When you run tests for selenium, you may end up with this error. This happen when we update the selenium packages on BTCPay Server while you did not update your chrome version.

If you want to use a older chrome driver on this page (opens new window) then point to it with

dotnet user-secrets set ChromeDriverDirectory "path/to/the/driver/directory"

- + diff --git a/BTCPayServer/Security/index.html b/BTCPayServer/Security/index.html index 7aafe57d01..07cc279b1f 100644 --- a/BTCPayServer/Security/index.html +++ b/BTCPayServer/Security/index.html @@ -9,7 +9,7 @@ - + @@ -89,6 +89,6 @@ →

- + diff --git a/BTCPayServer/db-migration/index.html b/BTCPayServer/db-migration/index.html index 468da3b4d8..307e47973c 100644 --- a/BTCPayServer/db-migration/index.html +++ b/BTCPayServer/db-migration/index.html @@ -9,7 +9,7 @@ - + @@ -58,6 +58,6 @@ GitHub (opens new window)

# Migration from SQLite and MySQL to Postgres

# Introduction

This document is intended for BTCPay Server integrators such as Raspiblitz, Umbrel, Embassy OS or anybody running BTCPay Server on SQLite or MySql.

If you are a user of an integrated solution, please contact the integrator directly and provide them with the link to this document.

BTCPay Server has for long time supported three different backends:

  1. Postgres
  2. SQLite
  3. MySql

While most of our users are using the Postgres backend, maintaining supports for all those databases has been very challenging, and Postgres is the only one part of our test suite.

As a result, we regret to inform you that we decided to stop the support of MySql and SQLite.

We understand that dropping support might be painful for users and integrators of our product, and we will do our best to provide a migration path.

Please keep us informed if you experience any issues while migrating on our community chat (opens new window).

# Procedure

In order to successfully migrate, you will need to run BTCPay Server 1.7.8 or newer.

As a reminder there are three settings controlling the choice of backend of BTCPay Server which can be controller by command line, environment variable or configuration settings.

Command line argument Environment variable
--postgres BTCPAY_POSTGRES="..."
--mysql BTCPAY_MYSQL="..."
--sqlitefile BTCPAY_SQLITEFILE="blah.db"

If you are currently using mysql or sqlitefile, and you wish to migrate to postgres, you simply need to add the command line argument --postgres or the environment variable BTCPAY_POSTGRES pointing to a fresh postgres database.

It is strongly advised not to create a database in Postgres before performing the migration with BTCPay Server. This is because BTCPay Server will automatically create the necessary database for you. However, if you must create the database manually, please ensure that the C_TYPE and COLLATE settings are both set to C.

Careful: Do not remove the former mysql or sqlitefile setting, you should have both: the postgres setting and the former sqlite/mysql setting

From 1.7.8, BTCPay Server will interprete this and attempt to copy the data from mysql and sqlite into the new postgres database.

Note that once the migration is complete, the old mysql and sqlite settings will simply be ignored.

If the migration fails, you can revert the postgres setting you added, so the next restart will run on the old unsupported database. You can retry a migration by adding the postgres setting again.

# Known issues

  • The migration script isn't very optimized, and will attempt to load every table in memory. If your sqlite or mysql database is too big, you may experience an Out Of Memory issue. If that happen to you, please contact us.
  • There are no migration for plugin's data.
- + diff --git a/BTCPayServer/greenfield-authorization/index.html b/BTCPayServer/greenfield-authorization/index.html index b3b2a5593b..20ccb7fe25 100644 --- a/BTCPayServer/greenfield-authorization/index.html +++ b/BTCPayServer/greenfield-authorization/index.html @@ -9,7 +9,7 @@ - + @@ -67,6 +67,6 @@ →

- + diff --git a/BTCPayServer/greenfield-development/index.html b/BTCPayServer/greenfield-development/index.html index 0ca7859b18..031eebb8df 100644 --- a/BTCPayServer/greenfield-development/index.html +++ b/BTCPayServer/greenfield-development/index.html @@ -9,7 +9,7 @@ - + @@ -78,6 +78,6 @@ →

- + diff --git a/BTCPayVsOthers/index.html b/BTCPayVsOthers/index.html index 3fff141a46..8d18adf129 100644 --- a/BTCPayVsOthers/index.html +++ b/BTCPayVsOthers/index.html @@ -9,7 +9,7 @@ - + @@ -69,6 +69,6 @@ →

- + diff --git a/BigCommerce/index.html b/BigCommerce/index.html index 485c58665b..7d3011fe89 100644 --- a/BigCommerce/index.html +++ b/BigCommerce/index.html @@ -9,7 +9,7 @@ - + @@ -70,6 +70,6 @@ →

- + diff --git a/Breez/index.html b/Breez/index.html index 15ad21538c..7acafbd6a4 100644 --- a/Breez/index.html +++ b/Breez/index.html @@ -9,7 +9,7 @@ - + @@ -67,6 +67,6 @@ →

- + diff --git a/Bringin/index.html b/Bringin/index.html index 17e94cf46b..b09f117736 100644 --- a/Bringin/index.html +++ b/Bringin/index.html @@ -9,7 +9,7 @@ - + @@ -67,6 +67,6 @@ →

- + diff --git a/ColdCardWallet/index.html b/ColdCardWallet/index.html index e73bb06cd1..9c2c798c71 100644 --- a/ColdCardWallet/index.html +++ b/ColdCardWallet/index.html @@ -9,7 +9,7 @@ - + @@ -58,6 +58,6 @@ GitHub (opens new window)

# Connecting Coldcard Wallet to BTCPay Server

This document shows how to use a Coldcard Wallet with your BTCPay Server.

# Coldcard Wallet Setup

This guide assumes, you have a Coldcard wallet set up. To configure the Coldcard, please see the quick setup guide on manufacturer's website (opens new window).

# Quick Setup

  1. Insert the MicroSD card into the Coldcard wallet.
  2. Go to Advanced > MicroSD Card > Electrum Wallet > Native-Segwit
  3. Insert the MicroSD card back into your PC
  4. In BTCPay Server, Stores > Settings > Setup > Connect an existing wallet > Import wallet file
  5. Choose File > select the wallet file earlier exported from Coldcard.
  6. Click Continue
  7. Confirm the addresses match the ones shown in your BTCPay Server.

The Coldcard is now connected to your BTCPay Server. Payments go directly to Coldcard. The video below shows how to connect your BTCPay store to your Coldcard.

# Spending from BTCPay Server wallet with Coldcard (PSBT)

Once there are some funds in received to your BTCPay Wallet connected to Coldcard, you can spend them by using PSBT (opens new window) (Partially Signed Bitcoin Transactions). This allows completely offline signing of your transactions, without ever having to connect your hardware wallet to the internet.

  1. Wallets > Manage > Send
  2. Fill in destination address and the amount
  3. Click on the Sign with a wallet supporting PSBT button.
  4. You will be redirected to PSBT tab, with pre-filled information, click on the Sign with a wallet supporting PSBT (save as file)
  5. Save the file onto MicroSD card
  6. Insert MicroSD into your Coldcard.
  7. In Coldcard, click on the Ready To Sign
  8. Review the transaction information, and click OK button to sign it.
  9. Transaction will be saved onto MicroSD.
  10. In BTCPay, go to PSBT tab of the wallet and upload the signed PSBT file.
  11. Click Decode
  12. Click Other Actions and select Review
  13. Review your transactions and click Broadcast to broadcast it on the network.

The video below shows how to connect your BTCPay store to your Coldcard.

- + diff --git a/Community/index.html b/Community/index.html index 2859388dc8..644895b59d 100644 --- a/Community/index.html +++ b/Community/index.html @@ -9,7 +9,7 @@ - + @@ -62,6 +62,6 @@

- + diff --git a/Conference-PoS-guide/index.html b/Conference-PoS-guide/index.html index 3e0df02481..06016f5c6e 100644 --- a/Conference-PoS-guide/index.html +++ b/Conference-PoS-guide/index.html @@ -9,7 +9,7 @@ - + @@ -69,6 +69,6 @@ →

- + diff --git a/Configurator/index.html b/Configurator/index.html index 2fad7035e7..c467b895b8 100644 --- a/Configurator/index.html +++ b/Configurator/index.html @@ -9,7 +9,7 @@ - + @@ -66,6 +66,6 @@ →

- + diff --git a/Contribute/Design/index.html b/Contribute/Design/index.html index ba6d959e3a..7c748ad2fe 100644 --- a/Contribute/Design/index.html +++ b/Contribute/Design/index.html @@ -9,7 +9,7 @@ - + @@ -67,6 +67,6 @@ →

- + diff --git a/Contribute/Dev/index.html b/Contribute/Dev/index.html index 7d56f93dac..e0ce659e25 100644 --- a/Contribute/Dev/index.html +++ b/Contribute/Dev/index.html @@ -9,7 +9,7 @@ - + @@ -58,6 +58,6 @@ GitHub (opens new window)

# Coding BTCPay Server

# Why coding matters

By helping the project grow, become more mature, advanced and elaborate, coders working on BTCPay Server are a central component of the project.

If you have coding skills, be it writing or reviewing code, you can contribute to BTCPay Server.

# Where to start

If you're a developer looking to help, but you're not sure where to begin, check the good first issue label (opens new window), which contains small pieces of work that have been specifically flagged as being friendly to new contributors.

Contributors looking to do something a bit more challenging, before opening a pull request, please create an issue (opens new window) or join our community chat (opens new window) to get early feedback, discuss best ways to tackle the problem and to ensure there is no work duplication.

We are actively looking for developers who can take on and resolve GitHub issues and help with development. If you would like to help us, but need some guidance, the #dev channel on Mattermost (opens new window) is the place to ask questions.

# Setup Developer Environment

If you are interested in getting started as a developer or tester of the software behind BTCPay Server, check out the Setup Developer Environment guide that will walk you step by step through every software used in development with BTCPay such as Git, GitBash, Github, Docker, Visual Studio, Postgres, etc. If you have never coded before and you are looking to learn something new, start here.

# Local BTCPay Development

If you already have a developer environment setup you can start with the BTCPay specific Local Development documentation.

# Local BTCPay Testing

Once you have your development environment tools setup and your local BTCPay Server running, view the Local Testing guide. This shows you how to use BTCPay in regtest mode for use in development and for users who want to test new features before they are released.

# Requirements

Software requirements (ie. IDE) can also be found in local development.

# Videos

BTCPay Server development videos can be found here or on the BTCPayServer YouTube (opens new window) channel.

- + diff --git a/Contribute/DevCode/index.html b/Contribute/DevCode/index.html index 67a7d6eafe..25cc73885c 100644 --- a/Contribute/DevCode/index.html +++ b/Contribute/DevCode/index.html @@ -9,7 +9,7 @@ - + @@ -99,6 +99,6 @@ →

- + diff --git a/Contribute/DevTest/index.html b/Contribute/DevTest/index.html index 43879424c7..df9794659d 100644 --- a/Contribute/DevTest/index.html +++ b/Contribute/DevTest/index.html @@ -9,7 +9,7 @@ - + @@ -84,6 +84,6 @@ →

- + diff --git a/Contribute/Misc/index.html b/Contribute/Misc/index.html index 885df43ba9..aa4daca4af 100644 --- a/Contribute/Misc/index.html +++ b/Contribute/Misc/index.html @@ -9,7 +9,7 @@ - + @@ -64,6 +64,6 @@

- + diff --git a/Contribute/Translate/index.html b/Contribute/Translate/index.html index cbf8d7b8f0..7e74404635 100644 --- a/Contribute/Translate/index.html +++ b/Contribute/Translate/index.html @@ -9,7 +9,7 @@ - + @@ -77,6 +77,6 @@ →

- + diff --git a/Contribute/Write/index.html b/Contribute/Write/index.html index 76901c1459..9d790256a4 100644 --- a/Contribute/Write/index.html +++ b/Contribute/Write/index.html @@ -9,7 +9,7 @@ - + @@ -59,6 +59,6 @@ GitHub (opens new window)

# Documenting BTCPay Server

# Why documentation matters

Documentation is essential to give users of all skill levels concise and clear information about the software and how to use it. BTCPay server has many different use cases and as a result many different kinds of users seeking information from the documentation. Writers contributing to BTCPay Server are as important as any other contributor.

If you have technical knowledge in a certain area, want to help document new features or simply get involved in the BTCPay Server project, documentation is a great place to get started with contributing.

If you have writing skills or if you have a fair knowledge of the English language, then you can contribute to BTCPay Server or review the work of other contributors. Writing contributors can help in a number of places.

# BTCPay Documentation

Documentation work needing to be completed can be found in the open issues page (opens new window) on Github. For information on how to start a documentation task, see the documentation guide.

For documentation guidance or discussion of a new documentation idea, join the #documentation channel on Mattermost (opens new window).

# BTCPay Blog

Another great way to contribute is by writing content for the BTCPay blog. To get started on a blog topic, join the #content creation channel on Mattermost (opens new window).

# Requirements

In order to contribute to BTCPay Server as a writer there are some requirements.

Since most of the documentation done in BTCPay Server is submitted and reviewed through Github, you must have a Github account (opens new window). It's also on Github that you can contribute by reviewing the documentation work done by others (pull requests).

Important note: Contributions explained in this documentation are meant to be done in English only. If you wish to contribute in other languages, see Translations.

# Text Editor

It is recommended to have a Rich-Text editor.

Notepad++ (opens new window) is a decent software and easy to use for the newer contributors.

For more advanced users, Visual Studio Code (VS Code) (opens new window) is a good choice. The Markdown All In One extension in VS Code is also recommended, for visual comfort while editing and the ability to preview Markdown changes. This is helpful for the BTCPay documentation which is written primarily in Markdown.

These are only recommended: If you already use other similar software that you're accustomed to, you are free to continue using them.

# Version Control

To be able to manage your contributions (such as forking repositories, creating and working on branches, making pull requests and issues, etc.) it's recommended you have Github Desktop (opens new window). You can see the step by step guide to making a pull request using Github Desktop here.

- + diff --git a/Contribute/WriteBlog/index.html b/Contribute/WriteBlog/index.html index 40e0a004f4..13022d02a9 100644 --- a/Contribute/WriteBlog/index.html +++ b/Contribute/WriteBlog/index.html @@ -9,7 +9,7 @@ - + @@ -66,6 +66,6 @@ →

- + diff --git a/Contribute/WriteDocs/index.html b/Contribute/WriteDocs/index.html index 76daa20325..6ab315d7a8 100644 --- a/Contribute/WriteDocs/index.html +++ b/Contribute/WriteDocs/index.html @@ -9,7 +9,7 @@ - + @@ -68,6 +68,6 @@ →

- + diff --git a/Contribute/WriteSoftware/index.html b/Contribute/WriteSoftware/index.html index 91a7af070d..cfa1dce646 100644 --- a/Contribute/WriteSoftware/index.html +++ b/Contribute/WriteSoftware/index.html @@ -9,7 +9,7 @@ - + @@ -70,6 +70,6 @@ →

- + diff --git a/Contribute/index.html b/Contribute/index.html index f9d094f671..7d7b0b5624 100644 --- a/Contribute/index.html +++ b/Contribute/index.html @@ -9,7 +9,7 @@ - + @@ -58,6 +58,6 @@ GitHub (opens new window)

# How to contribute to BTCPay Server?

BTCPay Server is built and maintained entirely by volunteer contributors around the internet.

We welcome, appreciate and encourage new contributions.

Depending on your skills and interest, you can help in a number of ways:

Every contribution is important and if you have any questions, feel free to consult our growing community.

- + diff --git a/CreateStore/index.html b/CreateStore/index.html index 1ee498a926..d0a6651c48 100644 --- a/CreateStore/index.html +++ b/CreateStore/index.html @@ -9,7 +9,7 @@ - + @@ -66,6 +66,6 @@ →

- + diff --git a/CreateWallet/index.html b/CreateWallet/index.html index 5b20ecef28..1ee1f344d2 100644 --- a/CreateWallet/index.html +++ b/CreateWallet/index.html @@ -9,7 +9,7 @@ - + @@ -67,6 +67,6 @@ →

- + diff --git a/CustomIntegration/index.html b/CustomIntegration/index.html index 4e483f12ed..4b0db896a5 100644 --- a/CustomIntegration/index.html +++ b/CustomIntegration/index.html @@ -9,7 +9,7 @@ - + @@ -92,6 +92,6 @@ →

- + diff --git a/Dashboard/index.html b/Dashboard/index.html index 9faed45a33..16ffea77ea 100644 --- a/Dashboard/index.html +++ b/Dashboard/index.html @@ -9,7 +9,7 @@ - + @@ -69,6 +69,6 @@ →

- + diff --git a/Deployment/Azure/index.html b/Deployment/Azure/index.html index 1d84963f23..8723975a39 100644 --- a/Deployment/Azure/index.html +++ b/Deployment/Azure/index.html @@ -9,7 +9,7 @@ - + @@ -58,6 +58,6 @@ GitHub (opens new window)

# Azure Deployment

This setup is similar to the Docker Deployment, except that the docker-compose is hosted by Microsoft Azure.

# One-click setup

Start by clicking the following button:

Deploy to Azure (opens new window)

You can log into Azure (opens new window) with your Microsoft account.

Final installation steps:

Fill in the remaining options: Azure Resource Config

  • Click 'Purchase' to confirm
  • (Wait for Azure deployment)
  • Type ip into the search bar and select the first option, BTCPayServerPublicIP
  • Copy the hostname for your Azure deployment, under DNS name: Azure BTCPayServerPublicIP
  • Visit it (all major browsers supported)
  • Click 'Register' and create an account - This will be your admin account!
  • At your domain registrar, point your domain at this hostname (read more: How to change your BTCPay Server domain name)
  • Then, visit https://EXAMPLE.eastus.cloudapp.azure.com/server/maintenance
  • Enter your domain name and click 'Confirm'
  • (Wait 1-5 minutes)
  • Done! Visit https://EXAMPLE.MYSITE.com/stores to create your store and begin invoicing.

For advanced users, you can connect via SSH with the information on https://EXAMPLE.MYSITE.com/server/services/ssh, and:

  • Run docker ps and docker logs xxx to view running processes
  • Run btcpay-down.sh and btcpay-up.sh to stop and start the BTCPayServer

Approximate Cost (unpruned, Bitcoin-only, after Azure $200 free trial): 60 USD per month

After all your nodes have synced and you've confirmed everything works, follow this guide to fine-tune for savings; costs should drop to 30 or 40 USD per month.

Learn more: btcpayserver/btcpayserver-azure (opens new window)

- + diff --git a/Deployment/AzurePennyPinching/index.html b/Deployment/AzurePennyPinching/index.html index ab342eca6d..a396bc7379 100644 --- a/Deployment/AzurePennyPinching/index.html +++ b/Deployment/AzurePennyPinching/index.html @@ -9,7 +9,7 @@ - + @@ -92,6 +92,6 @@ →

- + diff --git a/Deployment/Clovyr/index.html b/Deployment/Clovyr/index.html index ad0cdd07f0..681549404c 100644 --- a/Deployment/Clovyr/index.html +++ b/Deployment/Clovyr/index.html @@ -9,7 +9,7 @@ - + @@ -71,6 +71,6 @@ →

- + diff --git a/Deployment/DynamicDNS/index.html b/Deployment/DynamicDNS/index.html index e8b740ed84..b47c7934da 100644 --- a/Deployment/DynamicDNS/index.html +++ b/Deployment/DynamicDNS/index.html @@ -9,7 +9,7 @@ - + @@ -71,6 +71,6 @@ →

- + diff --git a/Deployment/GoogleCloud/index.html b/Deployment/GoogleCloud/index.html index 0afceea8cb..94e0e9ae23 100644 --- a/Deployment/GoogleCloud/index.html +++ b/Deployment/GoogleCloud/index.html @@ -9,7 +9,7 @@ - + @@ -66,6 +66,6 @@ →

- + diff --git a/Deployment/Hack0/index.html b/Deployment/Hack0/index.html index 0dd8c3fd5e..86c057ca37 100644 --- a/Deployment/Hack0/index.html +++ b/Deployment/Hack0/index.html @@ -9,7 +9,7 @@ - + @@ -71,6 +71,6 @@ →

- + diff --git a/Deployment/Hardware/index.html b/Deployment/Hardware/index.html index 46e4516617..963682869d 100644 --- a/Deployment/Hardware/index.html +++ b/Deployment/Hardware/index.html @@ -9,7 +9,7 @@ - + @@ -58,6 +58,6 @@ GitHub (opens new window)

# Hardware Deployment

Hardware deployment is advised when you want to be in total control of your own infrastructure.

Those are very useful for personal use or for people who wants absolute control over their infrastructure.

The main downside of hardware deployment is that it requires some hardware investment, and higher learning curve. The availability of your server will also probably lower than using a VPS such as LunaNode, as you are more likely to suffer from internet down time or hardware failure.

If you are still not sure whether you need hardware deployment, please see our diagram.

While all hardware deployments are similar to one another, we document step by step the process on three different hardware settings.

You can easily adapt those documentation on the custom hardware you prefer, we support arm32, arm64 and amd64.

Note that those solutions are all based on our docker deployment system.

- + diff --git a/Deployment/HardwareAsAService/index.html b/Deployment/HardwareAsAService/index.html index e11298baf9..7c393d6a81 100644 --- a/Deployment/HardwareAsAService/index.html +++ b/Deployment/HardwareAsAService/index.html @@ -9,7 +9,7 @@ - + @@ -70,6 +70,6 @@ →

- + diff --git a/Deployment/LightningInABox/index.html b/Deployment/LightningInABox/index.html index d7181e97fc..b9e1fc73bd 100644 --- a/Deployment/LightningInABox/index.html +++ b/Deployment/LightningInABox/index.html @@ -9,7 +9,7 @@ - + @@ -144,6 +144,6 @@ →

- + diff --git a/Deployment/LunaNode/index.html b/Deployment/LunaNode/index.html index e4103e20be..82ea0c9e66 100644 --- a/Deployment/LunaNode/index.html +++ b/Deployment/LunaNode/index.html @@ -9,7 +9,7 @@ - + @@ -75,6 +75,6 @@ →

- + diff --git a/Deployment/ManualDeployment/index.html b/Deployment/ManualDeployment/index.html index bc8aaa0a40..a4dc3e3b2f 100644 --- a/Deployment/ManualDeployment/index.html +++ b/Deployment/ManualDeployment/index.html @@ -9,7 +9,7 @@ - + @@ -112,6 +112,6 @@ →

- + diff --git a/Deployment/ManualDeploymentExtended/index.html b/Deployment/ManualDeploymentExtended/index.html index a41efc167f..b382269d87 100644 --- a/Deployment/ManualDeploymentExtended/index.html +++ b/Deployment/ManualDeploymentExtended/index.html @@ -9,7 +9,7 @@ - + @@ -732,6 +732,6 @@

- + diff --git a/Deployment/RaspberryPi4/index.html b/Deployment/RaspberryPi4/index.html index 1b133e6932..4c0285e83c 100644 --- a/Deployment/RaspberryPi4/index.html +++ b/Deployment/RaspberryPi4/index.html @@ -9,7 +9,7 @@ - + @@ -166,6 +166,6 @@ →

- + diff --git a/Deployment/ReverseProxyToTor/index.html b/Deployment/ReverseProxyToTor/index.html index 0a313bddc3..8046a17e03 100644 --- a/Deployment/ReverseProxyToTor/index.html +++ b/Deployment/ReverseProxyToTor/index.html @@ -9,7 +9,7 @@ - + @@ -265,6 +265,6 @@ →

- + diff --git a/Deployment/ReverseSSHtunnel/index.html b/Deployment/ReverseSSHtunnel/index.html index b7ef8a9540..c98878e03f 100644 --- a/Deployment/ReverseSSHtunnel/index.html +++ b/Deployment/ReverseSSHtunnel/index.html @@ -9,7 +9,7 @@ - + @@ -109,6 +109,6 @@ →

- + diff --git a/Deployment/ThirdPartyHosting/index.html b/Deployment/ThirdPartyHosting/index.html index 6dd6b05bc9..0cd0850493 100644 --- a/Deployment/ThirdPartyHosting/index.html +++ b/Deployment/ThirdPartyHosting/index.html @@ -9,7 +9,7 @@ - + @@ -68,6 +68,6 @@ →

- + diff --git a/Deployment/index.html b/Deployment/index.html index b4a8fc18e7..27e1823c11 100644 --- a/Deployment/index.html +++ b/Deployment/index.html @@ -9,7 +9,7 @@ - + @@ -62,6 +62,6 @@ →

- + diff --git a/Deployment/voltagecloud/index.html b/Deployment/voltagecloud/index.html index 5d40e6f74f..c24d9f1fd9 100644 --- a/Deployment/voltagecloud/index.html +++ b/Deployment/voltagecloud/index.html @@ -9,7 +9,7 @@ - + @@ -90,6 +90,6 @@ →

- + diff --git a/Deployment/webdeployment/index.html b/Deployment/webdeployment/index.html index a652fe7835..7b300a80c3 100644 --- a/Deployment/webdeployment/index.html +++ b/Deployment/webdeployment/index.html @@ -9,7 +9,7 @@ - + @@ -73,6 +73,6 @@ Found a deployment that is missing, and do you want it added or notified us? Join the community chat (opens new window) on Mattermost by downloading Mattermost app (opens new window), or on Telegram (opens new window) and tell us about it. You can also create an issue in the BTCPay server Documents on Github (opens new window).

- + diff --git a/Development/Altcoins/index.html b/Development/Altcoins/index.html index 6497b4e12a..cc618075b9 100644 --- a/Development/Altcoins/index.html +++ b/Development/Altcoins/index.html @@ -9,7 +9,7 @@ - + @@ -70,6 +70,6 @@ →

- + diff --git a/Development/GreenFieldExample-NodeJS/index.html b/Development/GreenFieldExample-NodeJS/index.html index 6356bcb52c..e2bf0349ed 100644 --- a/Development/GreenFieldExample-NodeJS/index.html +++ b/Development/GreenFieldExample-NodeJS/index.html @@ -9,7 +9,7 @@ - + @@ -285,6 +285,6 @@ →

- + diff --git a/Development/GreenFieldExample/index.html b/Development/GreenFieldExample/index.html index 60b4eacbc2..0cc5c0b1ee 100644 --- a/Development/GreenFieldExample/index.html +++ b/Development/GreenFieldExample/index.html @@ -9,7 +9,7 @@ - + @@ -160,6 +160,6 @@ →

- + diff --git a/Development/GreenfieldExample-PHP/index.html b/Development/GreenfieldExample-PHP/index.html index d21884b156..3135580651 100644 --- a/Development/GreenfieldExample-PHP/index.html +++ b/Development/GreenfieldExample-PHP/index.html @@ -9,7 +9,7 @@ - + @@ -209,6 +209,6 @@ →

- + diff --git a/Development/InvoiceMetadata/index.html b/Development/InvoiceMetadata/index.html index c6eab41dd0..1bb9027530 100644 --- a/Development/InvoiceMetadata/index.html +++ b/Development/InvoiceMetadata/index.html @@ -9,7 +9,7 @@ - + @@ -132,6 +132,6 @@ →

- + diff --git a/Development/LocalDev/index.html b/Development/LocalDev/index.html index a4cfd98acf..4981ea6b4c 100644 --- a/Development/LocalDev/index.html +++ b/Development/LocalDev/index.html @@ -9,7 +9,7 @@ - + @@ -77,6 +77,6 @@ dotnet test -c Altcoins-Debug

# HTTPS support for local development

Some browser security features may require that you use HTTPS to be properly tested.

In this case, use Bitcoin-HTTPS (or Altcoin-HTTPS) launch profile. This will create a self signed certificate for your development purpose.

However, your browser will not trust it, making it difficult to debug.

You can instruct your OS to trust this development time certificate by running:

dotnet dev-certs https --trust
 

# Videos

For more information check out these videos:

and these notes:

- + diff --git a/Development/LocalDevelopment/index.html b/Development/LocalDevelopment/index.html index ca879e22eb..eb5644d84d 100644 --- a/Development/LocalDevelopment/index.html +++ b/Development/LocalDevelopment/index.html @@ -9,7 +9,7 @@ - + @@ -98,6 +98,6 @@ →

- + diff --git a/Development/Plugins/index.html b/Development/Plugins/index.html index 5ad7809980..e8a5220ad5 100644 --- a/Development/Plugins/index.html +++ b/Development/Plugins/index.html @@ -9,7 +9,7 @@ - + @@ -236,6 +236,6 @@ →

- + diff --git a/Development/TestnetDemo/index.html b/Development/TestnetDemo/index.html index 4240a5a45e..3a8f19f40f 100644 --- a/Development/TestnetDemo/index.html +++ b/Development/TestnetDemo/index.html @@ -9,7 +9,7 @@ - + @@ -63,6 +63,6 @@

- + diff --git a/Development/Theme/index.html b/Development/Theme/index.html index dff238f8e1..95ef03b097 100644 --- a/Development/Theme/index.html +++ b/Development/Theme/index.html @@ -9,7 +9,7 @@ - + @@ -94,6 +94,6 @@ →

- + diff --git a/Development/ecommerce-integration-guide/index.html b/Development/ecommerce-integration-guide/index.html index daee141ec9..97370227c3 100644 --- a/Development/ecommerce-integration-guide/index.html +++ b/Development/ecommerce-integration-guide/index.html @@ -9,7 +9,7 @@ - + @@ -107,6 +107,6 @@ →

- + diff --git a/Development/index.html b/Development/index.html index 00b55035f0..9af9d8eedd 100644 --- a/Development/index.html +++ b/Development/index.html @@ -9,7 +9,7 @@ - + @@ -66,6 +66,6 @@ →

- + diff --git a/Docker/backup-restore/index.html b/Docker/backup-restore/index.html index 0c814c9b51..eb83c178da 100644 --- a/Docker/backup-restore/index.html +++ b/Docker/backup-restore/index.html @@ -9,7 +9,7 @@ - + @@ -123,6 +123,6 @@ →

- + diff --git a/Docker/chatwoot/index.html b/Docker/chatwoot/index.html index 430f2fa1f3..306d6a28de 100644 --- a/Docker/chatwoot/index.html +++ b/Docker/chatwoot/index.html @@ -9,7 +9,7 @@ - + @@ -69,6 +69,6 @@
  1. Wait for BTPay to be online and then create the database for chatwoot
docker exec -ti chatwoot sh -c "export DISABLE_DATABASE_ENVIRONMENT_CHECK=1 && bundle exec rails db:reset"
 
  1. Go to chatwoot website at https://chatwoot.xpayserver.com and set up.
- + diff --git a/Docker/cloudflare-tunnel/index.html b/Docker/cloudflare-tunnel/index.html index 9b4a8ec19a..5358fe9efe 100644 --- a/Docker/cloudflare-tunnel/index.html +++ b/Docker/cloudflare-tunnel/index.html @@ -9,7 +9,7 @@ - + @@ -77,6 +77,6 @@ →

- + diff --git a/Docker/fastsync/index.html b/Docker/fastsync/index.html index 64c66e1508..b5a55badb2 100644 --- a/Docker/fastsync/index.html +++ b/Docker/fastsync/index.html @@ -9,7 +9,7 @@ - + @@ -86,6 +86,6 @@ →

- + diff --git a/Docker/fireflyiii/index.html b/Docker/fireflyiii/index.html index 32ad21a153..4fc4a99760 100644 --- a/Docker/fireflyiii/index.html +++ b/Docker/fireflyiii/index.html @@ -9,7 +9,7 @@ - + @@ -71,6 +71,6 @@ →

- + diff --git a/Docker/index.html b/Docker/index.html index 2e9d466c9b..0d6c7d5d54 100644 --- a/Docker/index.html +++ b/Docker/index.html @@ -9,7 +9,7 @@ - + @@ -142,7 +142,7 @@

Or on powershell:

cd docker-compose-generator
 $BTCPAYGEN_DOCKER_IMAGE="btcpayserver/docker-compose-generator:local"
 

Then run ./build.sh or . .\build.ps1. -This will generate your docker-compose in the Generated folder, which you can then run and test.

Note that BTCPayServer developers will not spend excessive time testing your image, so make sure it works.

# Support

Image Version x64 arm32v7 arm64v8 links
btcpayserver/docker-compose-generator latest ✔️ (opens new window) ✔️ (opens new window) ✔️ (opens new window) Github (opens new window) - DockerHub (opens new window)
btcpayserver/lightning v24.05 ✔️ (opens new window) ✔️ (opens new window) ✔️ (opens new window) Github (opens new window) - DockerHub (opens new window)
shahanafarooqui/rtl 0.15.0 ✔️ (opens new window) ✔️ (opens new window) ✔️ (opens new window) Github (opens new window) - DockerHub (opens new window)
btcpayserver/lnd v0.18.3-beta ✔️ (opens new window) ✔️ (opens new window) ✔️ (opens new window) Github (opens new window) - DockerHub (opens new window)
btcpayserver/bitcoin 26.0 ✔️ (opens new window) ✔️ (opens new window) ✔️ (opens new window) Github (opens new window) - DockerHub (opens new window)
btcpayserver/btcpayserver 1.13.5$<BTCPAY_BUILD_CONFIGURATION>? ✔️ (opens new window) ✔️ (opens new window) ✔️ (opens new window) Github (opens new window) - DockerHub (opens new window)
btcpayserver/monero 0.18.3.3 ✔️ (opens new window) ✔️ (opens new window) ✔️ (opens new window) Github (opens new window) - DockerHub (opens new window)
nicolasdorier/nbxplorer 2.5.7 ✔️ (opens new window) ✔️ (opens new window) ✔️ (opens new window) Github (opens new window) - DockerHub (opens new window)
btcpayserver/letsencrypt-nginx-proxy-companion 2.2.9-2 ✔️ (opens new window) ✔️ (opens new window) ✔️ (opens new window) Github (opens new window) - DockerHub (opens new window)
nginx 1.25.3-bookworm ✔️ (opens new window) ✔️ (opens new window) ✔️ (opens new window) Github (opens new window) - DockerHub (opens new window)
btcpayserver/docker-gen 0.10.7 ✔️ (opens new window) ✔️ (opens new window) ✔️ (opens new window) Github (opens new window) - DockerHub (opens new window)
btcpayserver/btctransmuter 0.0.59 ✔️ (opens new window) ✔️ (opens new window) ✔️ (opens new window) Github (opens new window) - DockerHub (opens new window)
btcpayserver/cloudflared 2023.10.0 ✔️ (opens new window) ✔️ (opens new window) ✔️ (opens new window) Github (opens new window) - DockerHub (opens new window)
btcpayserver/btcpayserver-configurator 0.0.21 ✔️ (opens new window) ✔️ (opens new window) ✔️ (opens new window) Github (opens new window) - DockerHub (opens new window)
btcpayserver/eps 0.2.2 ✔️ (opens new window) ✔️ (opens new window) ✔️ (opens new window) Github (opens new window) - DockerHub (opens new window)
btcpayserver/joinmarket 0.9.10 ✔️ (opens new window) ✔️ (opens new window) ✔️ (opens new window) Github (opens new window) - DockerHub (opens new window)
nicolasdorier/ndlc-cli 1.0.1 ✔️ (opens new window) ✔️ (opens new window) ✔️ (opens new window) Github (opens new window) - DockerHub (opens new window)
pihole/pihole 2023.05.2 ✔️ (opens new window) ✔️ (opens new window) ✔️ (opens new window) Github (opens new window) - DockerHub (opens new window)
btcpayserver/snapdrop 1.2 ✔️ (opens new window) ✔️ (opens new window) ✔️ (opens new window) Github (opens new window) - DockerHub (opens new window)
btcpayserver/tor 0.4.8.10 ✔️ (opens new window) ✔️ (opens new window) ✔️ (opens new window) Github (opens new window) - DockerHub (opens new window)
btcpayserver/woocommerce 3.1.0 ✔️ (opens new window) ️❌ ✔️ (opens new window) Github (opens new window) - DockerHub (opens new window)
btcpayserver/postgres 13.13 ✔️ (opens new window) ✔️ (opens new window) ✔️ (opens new window) Github (opens new window) - DockerHub (opens new window)
kamigawabul/btglnd latest ✔️ (opens new window) ️❌ ️❌ Github (opens new window) - DockerHub (opens new window)
kamigawabul/docker-bitcoingold 0.15.2 ✔️ (opens new window) ️❌ ️❌ Github (opens new window) - DockerHub (opens new window)
acinq/eclair release-0.7.0 ✔️ (opens new window) ️❌ ️❌ Github (opens new window) - DockerHub (opens new window)
chekaz/docker-bitcoinplus 2.7.0 ✔️ (opens new window) ️❌ ️❌ Github (opens new window) - DockerHub (opens new window)
dalijolijo/docker-bitcore 0.90.9.10 ✔️ (opens new window) ️❌ ️❌ Github (opens new window) - DockerHub (opens new window)
btcpayserver/dash 20.1.0 ✔️ (opens new window) ️❌ ✔️ (opens new window) Github (opens new window) - DockerHub (opens new window)
btcpayserver/dogecoin 1.14.7 ✔️ (opens new window) ️❌ ️❌ Github (opens new window) - DockerHub (opens new window)
chekaz/docker-feathercoin 0.16.3 ✔️ (opens new window) ️❌ ️❌ Github (opens new window) - DockerHub (opens new window)
groestlcoin/lightning v23.05 ✔️ (opens new window) ️❌ ️❌ Github (opens new window) - DockerHub (opens new window)
groestlcoin/groestlcoin-lightning-charge version-0.4.22 ✔️ (opens new window) ️❌ ️❌ Github (opens new window) - DockerHub (opens new window)
groestlcoin/groestlcoin-spark version-0.2.16 ✔️ (opens new window) ️❌ ️❌ Github (opens new window) - DockerHub (opens new window)
groestlcoin/eclair v0.6.0 ✔️ (opens new window) ️❌ ️❌ Github (opens new window) - DockerHub (opens new window)
groestlcoin/lnd v0.10.0-grs ✔️ (opens new window) ️❌ ️❌ Github (opens new window) - DockerHub (opens new window)
btcpayserver/groestlcoin 25.0 ✔️ (opens new window) ✔️ (opens new window) ✔️ (opens new window) Github (opens new window) - DockerHub (opens new window)
btcpayserver/elements 23.2.3 ✔️ (opens new window) ✔️ (opens new window) ✔️ (opens new window) Github (opens new window) - DockerHub (opens new window)
btcpayserver/litecoin 0.21.2.1-2 ✔️ (opens new window) ✔️ (opens new window) ✔️ (opens new window) Github (opens new window) - DockerHub (opens new window)
wakiyamap/docker-monacoin 0.20.2 ✔️ (opens new window) ️❌ ️❌ Github (opens new window) - DockerHub (opens new window)
redis 6.2.2-buster ✔️ (opens new window) ️❌ ️❌ Github (opens new window) - DockerHub (opens new window)
jvandrew/btcqbo 0.3.36 ✔️ (opens new window) ️❌ ️❌ Github (opens new window) - DockerHub (opens new window)
shesek/bwt 0.2.2-electrum ✔️ (opens new window) ✔️ (opens new window) ✔️ (opens new window) Github (opens new window) - DockerHub (opens new window)
chatwoot/chatwoot v1.7.0 ✔️ (opens new window) ✔️ (opens new window) ✔️ (opens new window) Github (opens new window) - DockerHub (opens new window)
lukechilds/electrumx latest ✔️ (opens new window) ️❌ ️❌ Github (opens new window) - DockerHub (opens new window)
fireflyiii/core latest ✔️ (opens new window) ✔️ (opens new window) ✔️ (opens new window) Github (opens new window) - DockerHub (opens new window)
podcastindexorg/podcasting20-helipad v0.1.10 ✔️ (opens new window) ✔️ (opens new window) ✔️ (opens new window) Github (opens new window) - DockerHub (opens new window)
jvandrew/librepatron 0.7.39 ✔️ (opens new window) ️❌ ️❌ Github (opens new window) - DockerHub (opens new window)
jvandrew/isso atron.22 ✔️ (opens new window) ️❌ ️❌ Github (opens new window) - DockerHub (opens new window)
lightninglabs/lightning-terminal v0.12.3-alpha-path-prefix ✔️ (opens new window) ️❌ ✔️ (opens new window) Github (opens new window) - DockerHub (opens new window)
mempool/frontend v2.5.0 ✔️ (opens new window) ✔️ (opens new window) ✔️ (opens new window) Github (opens new window) - DockerHub (opens new window)
mempool/backend v2.5.0 ✔️ (opens new window) ✔️ (opens new window) ✔️ (opens new window) Github (opens new window) - DockerHub (opens new window)
mariadb 10.11 ✔️ (opens new window) ️❌ ️❌ Github (opens new window) - DockerHub (opens new window)
kukks/nnostr-relay v0.0.23 ✔️ (opens new window) ✔️ (opens new window) ✔️ (opens new window) Github (opens new window) - DockerHub (opens new window)
sphinxlightning/sphinx-relay v2.2.9 ✔️ (opens new window) ✔️ (opens new window) ✔️ (opens new window) Github (opens new window) - DockerHub (opens new window)
djbooth007/tallycoin_connect v1.8.0 ✔️ (opens new window) ✔️ (opens new window) ✔️ (opens new window) Github (opens new window) - DockerHub (opens new window)
benjaminchodroff/rust-teos latest ✔️ (opens new window) ️❌ ️❌ Github (opens new window) - DockerHub (opens new window)
apotdevin/thunderhub base-v0.13.31 ✔️ (opens new window) ✔️ (opens new window) ✔️ (opens new window) Github (opens new window) - DockerHub (opens new window)
lncapital/torq 0.20.3 ✔️ (opens new window) ✔️ (opens new window) ✔️ (opens new window) Github (opens new window) - DockerHub (opens new window)
timescale/timescaledb latest-pg14 ✔️ (opens new window) ✔️ (opens new window) ✔️ (opens new window) Github (opens new window) - DockerHub (opens new window)
zammad/zammad-docker-compose zammad-postgresql-3.4.0-4 ✔️ (opens new window) ️❌ ️❌ Github (opens new window) - DockerHub (opens new window)
memcached 1.5.22-alpine ✔️ (opens new window) ️❌ ️❌ Github (opens new window) - DockerHub (opens new window)
traefik v2.6 ✔️ (opens new window) ️❌ ️❌ Github (opens new window) - DockerHub (opens new window)
chekaz/docker-trezarcoin 0.13.0 ✔️ (opens new window) ️❌ ️❌ Github (opens new window) - DockerHub (opens new window)
romanornr/docker-viacoin 0.15.2 ✔️ (opens new window) ️❌ ️❌ Github (opens new window) - DockerHub (opens new window)

# FAQ

# How can I modify my environment?

As root, run . btcpay-setup.sh; this will show you the environment variable it is expecting. +This will generate your docker-compose in the Generated folder, which you can then run and test.

Note that BTCPayServer developers will not spend excessive time testing your image, so make sure it works.

# Support

Image Version x64 arm32v7 arm64v8 links
btcpayserver/docker-compose-generator latest ✔️ (opens new window) ✔️ (opens new window) ✔️ (opens new window) Github (opens new window) - DockerHub (opens new window)
btcpayserver/lightning v24.05 ✔️ (opens new window) ✔️ (opens new window) ✔️ (opens new window) Github (opens new window) - DockerHub (opens new window)
shahanafarooqui/rtl 0.15.0 ✔️ (opens new window) ✔️ (opens new window) ✔️ (opens new window) Github (opens new window) - DockerHub (opens new window)
btcpayserver/lnd v0.18.3-beta ✔️ (opens new window) ✔️ (opens new window) ✔️ (opens new window) Github (opens new window) - DockerHub (opens new window)
btcpayserver/bitcoin 26.0 ✔️ (opens new window) ✔️ (opens new window) ✔️ (opens new window) Github (opens new window) - DockerHub (opens new window)
btcpayserver/btcpayserver 1.13.5$<BTCPAY_BUILD_CONFIGURATION>? ✔️ (opens new window) ✔️ (opens new window) ✔️ (opens new window) Github (opens new window) - DockerHub (opens new window)
btcpayserver/monero 0.18.3.3 ✔️ (opens new window) ✔️ (opens new window) ✔️ (opens new window) Github (opens new window) - DockerHub (opens new window)
nicolasdorier/nbxplorer 2.5.8 ✔️ (opens new window) ✔️ (opens new window) ✔️ (opens new window) Github (opens new window) - DockerHub (opens new window)
btcpayserver/letsencrypt-nginx-proxy-companion 2.2.9-2 ✔️ (opens new window) ✔️ (opens new window) ✔️ (opens new window) Github (opens new window) - DockerHub (opens new window)
nginx 1.25.3-bookworm ✔️ (opens new window) ✔️ (opens new window) ✔️ (opens new window) Github (opens new window) - DockerHub (opens new window)
btcpayserver/docker-gen 0.10.7 ✔️ (opens new window) ✔️ (opens new window) ✔️ (opens new window) Github (opens new window) - DockerHub (opens new window)
btcpayserver/btctransmuter 0.0.59 ✔️ (opens new window) ✔️ (opens new window) ✔️ (opens new window) Github (opens new window) - DockerHub (opens new window)
btcpayserver/cloudflared 2023.10.0 ✔️ (opens new window) ✔️ (opens new window) ✔️ (opens new window) Github (opens new window) - DockerHub (opens new window)
btcpayserver/btcpayserver-configurator 0.0.21 ✔️ (opens new window) ✔️ (opens new window) ✔️ (opens new window) Github (opens new window) - DockerHub (opens new window)
btcpayserver/eps 0.2.2 ✔️ (opens new window) ✔️ (opens new window) ✔️ (opens new window) Github (opens new window) - DockerHub (opens new window)
btcpayserver/joinmarket 0.9.10 ✔️ (opens new window) ✔️ (opens new window) ✔️ (opens new window) Github (opens new window) - DockerHub (opens new window)
nicolasdorier/ndlc-cli 1.0.1 ✔️ (opens new window) ✔️ (opens new window) ✔️ (opens new window) Github (opens new window) - DockerHub (opens new window)
pihole/pihole 2023.05.2 ✔️ (opens new window) ✔️ (opens new window) ✔️ (opens new window) Github (opens new window) - DockerHub (opens new window)
btcpayserver/snapdrop 1.2 ✔️ (opens new window) ✔️ (opens new window) ✔️ (opens new window) Github (opens new window) - DockerHub (opens new window)
btcpayserver/tor 0.4.8.10 ✔️ (opens new window) ✔️ (opens new window) ✔️ (opens new window) Github (opens new window) - DockerHub (opens new window)
btcpayserver/woocommerce 3.1.0 ✔️ (opens new window) ️❌ ✔️ (opens new window) Github (opens new window) - DockerHub (opens new window)
btcpayserver/postgres 13.13 ✔️ (opens new window) ✔️ (opens new window) ✔️ (opens new window) Github (opens new window) - DockerHub (opens new window)
kamigawabul/btglnd latest ✔️ (opens new window) ️❌ ️❌ Github (opens new window) - DockerHub (opens new window)
kamigawabul/docker-bitcoingold 0.15.2 ✔️ (opens new window) ️❌ ️❌ Github (opens new window) - DockerHub (opens new window)
acinq/eclair release-0.7.0 ✔️ (opens new window) ️❌ ️❌ Github (opens new window) - DockerHub (opens new window)
chekaz/docker-bitcoinplus 2.7.0 ✔️ (opens new window) ️❌ ️❌ Github (opens new window) - DockerHub (opens new window)
dalijolijo/docker-bitcore 0.90.9.10 ✔️ (opens new window) ️❌ ️❌ Github (opens new window) - DockerHub (opens new window)
btcpayserver/dash 20.1.0 ✔️ (opens new window) ️❌ ✔️ (opens new window) Github (opens new window) - DockerHub (opens new window)
btcpayserver/dogecoin 1.14.7 ✔️ (opens new window) ️❌ ️❌ Github (opens new window) - DockerHub (opens new window)
chekaz/docker-feathercoin 0.16.3 ✔️ (opens new window) ️❌ ️❌ Github (opens new window) - DockerHub (opens new window)
groestlcoin/lightning v23.05 ✔️ (opens new window) ️❌ ️❌ Github (opens new window) - DockerHub (opens new window)
groestlcoin/groestlcoin-lightning-charge version-0.4.22 ✔️ (opens new window) ️❌ ️❌ Github (opens new window) - DockerHub (opens new window)
groestlcoin/groestlcoin-spark version-0.2.16 ✔️ (opens new window) ️❌ ️❌ Github (opens new window) - DockerHub (opens new window)
groestlcoin/eclair v0.6.0 ✔️ (opens new window) ️❌ ️❌ Github (opens new window) - DockerHub (opens new window)
groestlcoin/lnd v0.10.0-grs ✔️ (opens new window) ️❌ ️❌ Github (opens new window) - DockerHub (opens new window)
btcpayserver/groestlcoin 25.0 ✔️ (opens new window) ✔️ (opens new window) ✔️ (opens new window) Github (opens new window) - DockerHub (opens new window)
btcpayserver/elements 23.2.3 ✔️ (opens new window) ✔️ (opens new window) ✔️ (opens new window) Github (opens new window) - DockerHub (opens new window)
btcpayserver/litecoin 0.21.2.1-2 ✔️ (opens new window) ✔️ (opens new window) ✔️ (opens new window) Github (opens new window) - DockerHub (opens new window)
wakiyamap/docker-monacoin 0.20.2 ✔️ (opens new window) ️❌ ️❌ Github (opens new window) - DockerHub (opens new window)
redis 6.2.2-buster ✔️ (opens new window) ️❌ ️❌ Github (opens new window) - DockerHub (opens new window)
jvandrew/btcqbo 0.3.36 ✔️ (opens new window) ️❌ ️❌ Github (opens new window) - DockerHub (opens new window)
shesek/bwt 0.2.2-electrum ✔️ (opens new window) ✔️ (opens new window) ✔️ (opens new window) Github (opens new window) - DockerHub (opens new window)
chatwoot/chatwoot v1.7.0 ✔️ (opens new window) ✔️ (opens new window) ✔️ (opens new window) Github (opens new window) - DockerHub (opens new window)
lukechilds/electrumx latest ✔️ (opens new window) ️❌ ️❌ Github (opens new window) - DockerHub (opens new window)
fireflyiii/core latest ✔️ (opens new window) ✔️ (opens new window) ✔️ (opens new window) Github (opens new window) - DockerHub (opens new window)
podcastindexorg/podcasting20-helipad v0.1.10 ✔️ (opens new window) ✔️ (opens new window) ✔️ (opens new window) Github (opens new window) - DockerHub (opens new window)
jvandrew/librepatron 0.7.39 ✔️ (opens new window) ️❌ ️❌ Github (opens new window) - DockerHub (opens new window)
jvandrew/isso atron.22 ✔️ (opens new window) ️❌ ️❌ Github (opens new window) - DockerHub (opens new window)
lightninglabs/lightning-terminal v0.12.3-alpha-path-prefix ✔️ (opens new window) ️❌ ✔️ (opens new window) Github (opens new window) - DockerHub (opens new window)
mempool/frontend v2.5.0 ✔️ (opens new window) ✔️ (opens new window) ✔️ (opens new window) Github (opens new window) - DockerHub (opens new window)
mempool/backend v2.5.0 ✔️ (opens new window) ✔️ (opens new window) ✔️ (opens new window) Github (opens new window) - DockerHub (opens new window)
mariadb 10.11 ✔️ (opens new window) ️❌ ️❌ Github (opens new window) - DockerHub (opens new window)
kukks/nnostr-relay v0.0.23 ✔️ (opens new window) ✔️ (opens new window) ✔️ (opens new window) Github (opens new window) - DockerHub (opens new window)
sphinxlightning/sphinx-relay v2.2.9 ✔️ (opens new window) ✔️ (opens new window) ✔️ (opens new window) Github (opens new window) - DockerHub (opens new window)
djbooth007/tallycoin_connect v1.8.0 ✔️ (opens new window) ✔️ (opens new window) ✔️ (opens new window) Github (opens new window) - DockerHub (opens new window)
benjaminchodroff/rust-teos latest ✔️ (opens new window) ️❌ ️❌ Github (opens new window) - DockerHub (opens new window)
apotdevin/thunderhub base-v0.13.31 ✔️ (opens new window) ✔️ (opens new window) ✔️ (opens new window) Github (opens new window) - DockerHub (opens new window)
lncapital/torq 0.20.3 ✔️ (opens new window) ✔️ (opens new window) ✔️ (opens new window) Github (opens new window) - DockerHub (opens new window)
timescale/timescaledb latest-pg14 ✔️ (opens new window) ✔️ (opens new window) ✔️ (opens new window) Github (opens new window) - DockerHub (opens new window)
zammad/zammad-docker-compose zammad-postgresql-3.4.0-4 ✔️ (opens new window) ️❌ ️❌ Github (opens new window) - DockerHub (opens new window)
memcached 1.5.22-alpine ✔️ (opens new window) ️❌ ️❌ Github (opens new window) - DockerHub (opens new window)
traefik v2.6 ✔️ (opens new window) ️❌ ️❌ Github (opens new window) - DockerHub (opens new window)
chekaz/docker-trezarcoin 0.13.0 ✔️ (opens new window) ️❌ ️❌ Github (opens new window) - DockerHub (opens new window)
romanornr/docker-viacoin 0.15.2 ✔️ (opens new window) ️❌ ️❌ Github (opens new window) - DockerHub (opens new window)

# FAQ

# How can I modify my environment?

As root, run . btcpay-setup.sh; this will show you the environment variable it is expecting. For example, if you support btc and ltc already, and want to add btg:

export BTCPAYGEN_CRYPTO3='btg'
 . btcpay-setup.sh -i
 

# I deployed before btcpay-setup.sh existed (before May 17, 2018), can I migrate to this new system?

Yes, run the following commands to update:

sudo su -
@@ -218,6 +218,6 @@
       
       →
     

- + diff --git a/Docker/joinmarket/index.html b/Docker/joinmarket/index.html index 5bf8257b2b..1574622354 100644 --- a/Docker/joinmarket/index.html +++ b/Docker/joinmarket/index.html @@ -9,7 +9,7 @@ - + @@ -108,6 +108,6 @@ →

- + diff --git a/Docker/lightning-terminal/index.html b/Docker/lightning-terminal/index.html index 73a3661285..85161dbbf5 100644 --- a/Docker/lightning-terminal/index.html +++ b/Docker/lightning-terminal/index.html @@ -9,7 +9,7 @@ - + @@ -75,6 +75,6 @@ →

- + diff --git a/Docker/ndlc/index.html b/Docker/ndlc/index.html index 677521cea0..936aacc323 100644 --- a/Docker/ndlc/index.html +++ b/Docker/ndlc/index.html @@ -9,7 +9,7 @@ - + @@ -71,6 +71,6 @@ →

- + diff --git a/Docker/pihole/index.html b/Docker/pihole/index.html index 36589d2ccc..11ff5d6698 100644 --- a/Docker/pihole/index.html +++ b/Docker/pihole/index.html @@ -9,7 +9,7 @@ - + @@ -76,6 +76,6 @@ →

- + diff --git a/Docker/tallycoin-connect/index.html b/Docker/tallycoin-connect/index.html index 0c6beb6b37..cc172ae30f 100644 --- a/Docker/tallycoin-connect/index.html +++ b/Docker/tallycoin-connect/index.html @@ -9,7 +9,7 @@ - + @@ -76,6 +76,6 @@ →

- + diff --git a/Drupal/index.html b/Drupal/index.html index e0e30f2b34..1688c30d3e 100644 --- a/Drupal/index.html +++ b/Drupal/index.html @@ -9,7 +9,7 @@ - + @@ -71,6 +71,6 @@ →

- + diff --git a/DynamicReports/index.html b/DynamicReports/index.html index 72bd3e982f..ce57c8772c 100644 --- a/DynamicReports/index.html +++ b/DynamicReports/index.html @@ -9,7 +9,7 @@ - + @@ -67,6 +67,6 @@ →

- + diff --git a/ElectrumPersonalServer/index.html b/ElectrumPersonalServer/index.html index f3ce45b8c4..aeb451cc18 100644 --- a/ElectrumPersonalServer/index.html +++ b/ElectrumPersonalServer/index.html @@ -9,7 +9,7 @@ - + @@ -73,6 +73,6 @@ →

- + diff --git a/ElectrumWallet/index.html b/ElectrumWallet/index.html index cb57812832..25a65e15a6 100644 --- a/ElectrumWallet/index.html +++ b/ElectrumWallet/index.html @@ -9,7 +9,7 @@ - + @@ -61,6 +61,6 @@

If you are running a version older than Electrum 4, also enter the following command and press 'enter'

wallet.storage.write()
 
ElectrumWallet

Restart your Electrum and verify that the newly set gap limit is correct by entering in the console:

wallet.gap_limit
 

There's no good answer to how much you should set the gap limit to. Most merchants set 100-200. If you're a big merchants with high transaction volume, you can try with even higher gap limit.

For more details about the Gap Limit, check the FAQ.

Electrum and BTCPay Server are now connected. Any payments received to your BTCPay will be visible in Electrum, where you can further spend them.

- + diff --git a/ElectrumX/index.html b/ElectrumX/index.html index 4b4092576d..e220e219bf 100644 --- a/ElectrumX/index.html +++ b/ElectrumX/index.html @@ -9,7 +9,7 @@ - + @@ -75,6 +75,6 @@ →

- + diff --git a/FAQ/Altcoin/index.html b/FAQ/Altcoin/index.html index debace34ef..03a9bc24eb 100644 --- a/FAQ/Altcoin/index.html +++ b/FAQ/Altcoin/index.html @@ -9,7 +9,7 @@ - + @@ -71,6 +71,6 @@

- + diff --git a/FAQ/Apps/index.html b/FAQ/Apps/index.html index fd7cf93e16..3b1517ee04 100644 --- a/FAQ/Apps/index.html +++ b/FAQ/Apps/index.html @@ -9,7 +9,7 @@ - + @@ -180,6 +180,6 @@ →

- + diff --git a/FAQ/Deployment/index.html b/FAQ/Deployment/index.html index 64fb0d5725..52ff1cec75 100644 --- a/FAQ/Deployment/index.html +++ b/FAQ/Deployment/index.html @@ -9,7 +9,7 @@ - + @@ -286,6 +286,6 @@ →

- + diff --git a/FAQ/General/index.html b/FAQ/General/index.html index 1f84f7b33d..b14ffd312f 100644 --- a/FAQ/General/index.html +++ b/FAQ/General/index.html @@ -9,7 +9,7 @@ - + @@ -80,6 +80,6 @@ →

- + diff --git a/FAQ/Integrations/index.html b/FAQ/Integrations/index.html index 82048edc7d..4c3e8d19cf 100644 --- a/FAQ/Integrations/index.html +++ b/FAQ/Integrations/index.html @@ -9,7 +9,7 @@ - + @@ -116,6 +116,6 @@ →

- + diff --git a/FAQ/LightningNetwork/index.html b/FAQ/LightningNetwork/index.html index fa6c3101a1..d8f421ee6a 100644 --- a/FAQ/LightningNetwork/index.html +++ b/FAQ/LightningNetwork/index.html @@ -9,7 +9,7 @@ - + @@ -198,6 +198,6 @@ →

- + diff --git a/FAQ/ServerSettings/index.html b/FAQ/ServerSettings/index.html index fb54289e0f..8d69802372 100644 --- a/FAQ/ServerSettings/index.html +++ b/FAQ/ServerSettings/index.html @@ -9,7 +9,7 @@ - + @@ -125,6 +125,6 @@ →

- + diff --git a/FAQ/Stores/index.html b/FAQ/Stores/index.html index c8f1a8c1d2..6fff2660a0 100644 --- a/FAQ/Stores/index.html +++ b/FAQ/Stores/index.html @@ -9,7 +9,7 @@ - + @@ -77,6 +77,6 @@ →

- + diff --git a/FAQ/Synchronization/index.html b/FAQ/Synchronization/index.html index 7d2d6f22b8..1abde1441c 100644 --- a/FAQ/Synchronization/index.html +++ b/FAQ/Synchronization/index.html @@ -9,7 +9,7 @@ - + @@ -132,6 +132,6 @@ →

- + diff --git a/FAQ/Wallet/index.html b/FAQ/Wallet/index.html index a58a5eb4e9..0afcff96fd 100644 --- a/FAQ/Wallet/index.html +++ b/FAQ/Wallet/index.html @@ -9,7 +9,7 @@ - + @@ -79,6 +79,6 @@ →

- + diff --git a/FAQ/index.html b/FAQ/index.html index 44b21a2337..4f3aff17bb 100644 --- a/FAQ/index.html +++ b/FAQ/index.html @@ -9,7 +9,7 @@ - + @@ -58,6 +58,6 @@ GitHub (opens new window)

# Frequently Asked Questions and Common Issues

This document contains a Table of contents to all FAQ and common issues.

# General FAQ

General, non-technical questions about BTCPay. What it is, how it works, what are its features, why is it different and who can use it.

# Deployment FAQ

Questions and solutions to BTCPay installation.

# General Deployment FAQ

# Web Deployment FAQ

# Luna Node Web Deployment FAQ

# Manual Deployment FAQ

# Synchronization FAQ

Common questions and issues that may occur during the initial sync of BTCPay.

# Integrations FAQ

Questions about e-commerce and other integrations.

# Integrations General

# WooCommerce FAQ

# Server Settings FAQ

Common problems and questions server admins have.

# Maintenance FAQ

# Theme / Customization FAQ

# Policies FAQ

# Services FAQ

# Files FAQ

# Stores FAQ

Store settings explained.

# Wallet FAQ

Here are some of the questions and problems about wallets in BTCPay.

# Apps FAQ

Frequent questions about the applications in BTCPay.

# Lightning Network FAQ

Lightning Network troubleshooting and common problems.

# Lightning Network General FAQ

# Lightning Network LND FAQ

# Lightning Network Core Lightning (CLN) FAQ

# Altcoins FAQ

- + diff --git a/Forms/index.html b/Forms/index.html index 417cd35789..012cf96563 100644 --- a/Forms/index.html +++ b/Forms/index.html @@ -9,7 +9,7 @@ - + @@ -90,6 +90,6 @@ Unbank

If you'd like to support the project, please visit the donation page.

- + diff --git a/Grandnode/index.html b/Grandnode/index.html index 9057986a35..d6aba373f7 100644 --- a/Grandnode/index.html +++ b/Grandnode/index.html @@ -9,7 +9,7 @@ - + @@ -66,6 +66,6 @@ →

- + diff --git a/Guide/index.html b/Guide/index.html index 98eeeea01d..41a71c5888 100644 --- a/Guide/index.html +++ b/Guide/index.html @@ -9,7 +9,7 @@ - + @@ -85,6 +85,6 @@ →

- + diff --git a/HardwareWalletIntegration/index.html b/HardwareWalletIntegration/index.html index f679f794d0..7b014207f3 100644 --- a/HardwareWalletIntegration/index.html +++ b/HardwareWalletIntegration/index.html @@ -9,7 +9,7 @@ - + @@ -66,6 +66,6 @@ →

- + diff --git a/InvoiceNinja/index.html b/InvoiceNinja/index.html index e8a365cb5d..ef8c15371f 100644 --- a/InvoiceNinja/index.html +++ b/InvoiceNinja/index.html @@ -9,7 +9,7 @@ - + @@ -68,6 +68,6 @@ →

- + diff --git a/Invoices/index.html b/Invoices/index.html index f122fb4a2c..d6294d839b 100644 --- a/Invoices/index.html +++ b/Invoices/index.html @@ -9,7 +9,7 @@ - + @@ -68,6 +68,6 @@ →

- + diff --git a/LedgerWallet/index.html b/LedgerWallet/index.html index 98e351f936..e9742d5184 100644 --- a/LedgerWallet/index.html +++ b/LedgerWallet/index.html @@ -9,7 +9,7 @@ - + @@ -59,6 +59,6 @@ GitHub (opens new window)

# Connecting Ledger Wallet to BTCPay Server

This document shows how to connect Ledger Nano S Wallet to BTCPay Server.

WARNING

Direct Ledger Nano S integration is no longer supported. For Bitcoin wallets, you can use your Ledger hardware wallet regularly via the new hardware wallet integration.

For altcoin wallets, you can spend funds from your external wallet, sign a transaction within the internal wallet with HD Private Key or mnemonic seed or a hot wallet.

To set up a new altcoin wallet, add the extended public key manually or create a new wallet.

# Ledger Nano S Wallet Setup

This guide assumes, you have a Nano S wallet set up. To configure the Nano S, please see the quick setup guide on manufacturer's website (opens new window).

# Requirements

  1. Bitcoin App installed on the Ledger
  2. Google Chrome or Firefox
  3. For Firefox, U2F needs to be enabled in about:config
  4. No other U2F devices plugged in into your PC (Yubikey, other wallets, etc)

# Quick Setup

  1. Plug in Ledger Nano S into your PC.
  2. Open the Bitcoin app on your Ledger.
  3. In BTCPay Server, Store > Settings > Wallet > Setup > Derivation Scheme > Import from Hardware Device > Ledger wallet
  4. Select the account which you want to use, in most cases it's the Account 0
  5. Confirm the Export public key on the wallet.
  6. The extended public key will now automatically be added from Ledger to your BTCPay Server Store.
  7. Make sure that the derivation scheme is Enabled
  8. Click Continue
  9. Confirm the address match in BTCPay.

Your Ledger wallet is now connected to your BTCPay. Payments go directly to Ledger.

# Manual Setup

If you have more than 20 accounts in your Ledger you might not be able to find the correct account because the select shows a maximum of 20 entries. In this case you can manually find the extended public key for your wanted account in these steps:

  1. Open the Ledger live app (opens new window)
  2. Accounts -> choose your account
  3. Edit Account on the top right via the tool-icon
  4. In Edit Account -> ADVANCED LOGS
  5. Copy the extended public key string
  6. Paste it manually into the "DerivationScheme" textfield
  7. Continue with Step 7 of the Quick Setup above
Ledger Account "Advanced Logs" info screenshot

# Spending from BTCPay Server wallet with Ledger

Once there are some funds in received to your BTCPay Wallet connected to Ledger, you can spend them by signing a transaction with your hardware wallet. This allows easy interaction of the Ledger wallet with your full node, without leaking information to third-party servers.

  1. Plug in Ledger Nano S into your PC.
  2. Open the Bitcoin app on your Ledger.
  3. In BTCPay, go to Wallets > Manage > Send
  4. Fill in destination address and the amount
  5. Click on the Sign with your Ledger Wallet device.
  6. BTCPay will establish a connection with the Ledger wallet and display transaction information on the wallet screen.
  7. Confirm the transaction on the Ledger.
  8. In Ledger, click on the Ready To Sign
  9. Review your transactions and click Broadcast to broadcast it on the network.

The video below shows how to connect your BTCPay store to your Ledger and how to use Ledger with the internal BTCPay wallet.

- + diff --git a/LightningNetwork/index.html b/LightningNetwork/index.html index 9aa1b9319d..c346f84ccb 100644 --- a/LightningNetwork/index.html +++ b/LightningNetwork/index.html @@ -9,7 +9,7 @@ - + @@ -109,6 +109,6 @@

- + diff --git a/LightningNetwork_PaymentChannels/index.html b/LightningNetwork_PaymentChannels/index.html index 5f75818a8c..cb41804b33 100644 --- a/LightningNetwork_PaymentChannels/index.html +++ b/LightningNetwork_PaymentChannels/index.html @@ -9,7 +9,7 @@ - + @@ -58,6 +58,6 @@ GitHub (opens new window)

# Opening and operating payment channels

Given that the Lightning Network is a relatively new technology under active development, getting your freshly deployed node ready to send and receive payments, still, requires a couple of steps.

Overview:

  1. The lightning node is deployed, enabled and its on-chain wallet is funded
  2. A peer is identified and the first payment channel is opened
  3. Inbound and outbound liquidity is acquired. The node is now able to send and receive
  4. Liquidity management, an ongoing process to maintain the capacity to send and receive

Key considerations:

  • Choosing the channel partner. Consider opening the first channel to a well connected peer with robust uptime. This will increase the chances for your payments to be routed and settled.
  • Inbound vs outbound capacity. Outbound capacity allows nodes to send payments whereas inbound capacity allows nodes to receive payments. As a merchant using lightning, having inbound capacity is essential for customers to be able to pay you.
  • Inbound capacity. A node adds inbound capacity by either spending sats from its local balance or having other nodes in the network open channels to it.
  • Liquidity management: maintaining the ability to send and receive is a continous process where a balance between inbound vs outbound capacity has to be maintained across payment channels. This capacity distribution must be adjusted depending upon the use case of the node operator.
  • Lightning Service Providers: LSPs offer paid third-party services that improve the ease of operating a lightning network node. Such services can be used to acquire inbound capacity or to automate the rebalancing process.

Below a set of good resources for a deeper dive into topics such as:

- + diff --git a/Magento/index.html b/Magento/index.html index 4f91b1dba4..ce62fceb1e 100644 --- a/Magento/index.html +++ b/Magento/index.html @@ -9,7 +9,7 @@ - + @@ -66,6 +66,6 @@ →

- + diff --git a/NBXplorer/API/index.html b/NBXplorer/API/index.html index 66cfff3b36..e384b39e77 100644 --- a/NBXplorer/API/index.html +++ b/NBXplorer/API/index.html @@ -9,7 +9,7 @@ - + @@ -696,6 +696,6 @@ →

- + diff --git a/NBXplorer/Postgres-Migration/index.html b/NBXplorer/Postgres-Migration/index.html index 7b8e2a3321..fff2988b6b 100644 --- a/NBXplorer/Postgres-Migration/index.html +++ b/NBXplorer/Postgres-Migration/index.html @@ -9,7 +9,7 @@ - + @@ -67,6 +67,6 @@ →

- + diff --git a/NBXplorer/Postgres-Schema/index.html b/NBXplorer/Postgres-Schema/index.html index 6988c0735c..0e084f1909 100644 --- a/NBXplorer/Postgres-Schema/index.html +++ b/NBXplorer/Postgres-Schema/index.html @@ -9,7 +9,7 @@ - + @@ -87,6 +87,6 @@ →

- + diff --git a/NBXplorer/index.html b/NBXplorer/index.html index 44fbf7026e..76138e543a 100644 --- a/NBXplorer/index.html +++ b/NBXplorer/index.html @@ -9,7 +9,7 @@ - + @@ -108,6 +108,6 @@ →

- + diff --git a/Nopcommerce/index.html b/Nopcommerce/index.html index 3139aee456..111e753822 100644 --- a/Nopcommerce/index.html +++ b/Nopcommerce/index.html @@ -9,7 +9,7 @@ - + @@ -66,6 +66,6 @@ →

- + diff --git a/Nostr/index.html b/Nostr/index.html index caa45f95d3..7d1ffb4a0c 100644 --- a/Nostr/index.html +++ b/Nostr/index.html @@ -9,7 +9,7 @@ - + @@ -67,6 +67,6 @@ →

- + diff --git a/Notifications/index.html b/Notifications/index.html index 13ab145142..47012808dc 100644 --- a/Notifications/index.html +++ b/Notifications/index.html @@ -9,7 +9,7 @@ - + @@ -66,6 +66,6 @@ {Invoice.Status} {Invoice.OrderId}

Find the source here for possible updates (opens new window)

Create new Email rule
- + diff --git a/Odoo/index.html b/Odoo/index.html index 54cf9e9112..de684efe6b 100644 --- a/Odoo/index.html +++ b/Odoo/index.html @@ -9,7 +9,7 @@ - + @@ -67,6 +67,6 @@ →

- + diff --git a/OpenCart/index.html b/OpenCart/index.html index d2af4aa4f9..f9afced9bf 100644 --- a/OpenCart/index.html +++ b/OpenCart/index.html @@ -9,7 +9,7 @@ - + @@ -88,6 +88,6 @@ →

- + diff --git a/Payjoin/index.html b/Payjoin/index.html index a39500023a..8692aede72 100644 --- a/Payjoin/index.html +++ b/Payjoin/index.html @@ -9,7 +9,7 @@ - + @@ -59,6 +59,6 @@ GitHub (opens new window)

# BTCPay Server Payjoin Guide

This document explains how to use BTCPay Server's Payjoin feature. For a detailed, technical explanation of how payjoin is implemented, check BIP78 (opens new window)

You can follow this video to better understand what payjoin is and how to use it.

# Enabling Payjoin as a merchant

  1. Create a store
  2. Configure a hot wallet for your derivation scheme. Be sure to use either segwit or segwit wrapped as the address type.
  3. Enable Payjoin/P2EP in the "General Settings" and click "Save"

It's important to note that you will need at least 1 UTXO for payjoin to work.

Receive PayJoin in BTCPay Server
Receive PayJoin in BTCPay Server
Receive PayJoin in BTCPay Server

# Paying to Payjoin as a user

The BTCPay Wallet supports Payjoin.

  1. Retrieve the BIP21 payment link from a BTCPay Server invoice which has payjoin enabled by either:
    • Scan the QR code with the camera scanning feature
    • Copy the link from the "Open in wallet" button and paste it in the "Parse BIP21" prompt
  2. The send form should be populated with the payment details. You can check if the invoice supports payjoin by expanding "advanced settings" to see if there is a "Payjoin endpoint" input with a url.
  3. Sign your transaction using either BTCPay Server's hardware wallet support via BTCPay Vault or the hot wallet feature.
  4. Once your original transaction is ready, you will be given the option to either Broadcast (Payjoin) or to Broadcast (Simple). Choose Broadcast (Payjoin).
  5. The payjoin server will propose a new special transaction, if possible. If the payjoin server is unable to do the payjoin, the original transaction is broadcast instead.
  6. If you are using a hardware wallet, you will be asked to sign the payjoin transaction again (the hot wallet feature signs the transaction for you automatically).
  7. Congratulations, you've just helped improve Bitcoin's fungibility and your financial sovereignty!
Receive PayJoin in BTCPay Server
Receive PayJoin in BTCPay Server
Receive PayJoin in BTCPay Server
Receive PayJoin in BTCPay Server

# Why did a payjoin not happen?

There's multiple reasons for this:

  • The store did not have any utxos to contribute towards a payjoin
  • Your wallet does not use the same format as the store's (essential to not raise suspicion to analysis companies)
  • You are not using segwit or p2sh wrapped segwit.
  • The payjoin server is not available

# Supported wallets

Please contact and encourage your wallet developers to add support. The more widespread the usage of payjoin, the more broken the heuristics used by blockchain analysis companies become and can effectively trace your financial history. If you are a wallet developer, please contact us if you need help or have feedback.

- + diff --git a/PaymentRequests/index.html b/PaymentRequests/index.html index 87626ce2e1..c49745bed1 100644 --- a/PaymentRequests/index.html +++ b/PaymentRequests/index.html @@ -9,7 +9,7 @@ - + @@ -75,6 +75,6 @@ →

- + diff --git a/Payouts/index.html b/Payouts/index.html index 3f23e8fd0e..4ea17d7f79 100644 --- a/Payouts/index.html +++ b/Payouts/index.html @@ -9,7 +9,7 @@ - + @@ -81,6 +81,6 @@ →

- + diff --git a/Payroll/index.html b/Payroll/index.html index dc3ec99703..68bfefa3be 100644 --- a/Payroll/index.html +++ b/Payroll/index.html @@ -9,7 +9,7 @@ - + @@ -70,6 +70,6 @@ →

- + diff --git a/PrestaShop/index.html b/PrestaShop/index.html index 3460b94574..e68876a79f 100644 --- a/PrestaShop/index.html +++ b/PrestaShop/index.html @@ -9,7 +9,7 @@ - + @@ -70,6 +70,6 @@ →

- + diff --git a/PullPayments/index.html b/PullPayments/index.html index 888d70e916..57023cf822 100644 --- a/PullPayments/index.html +++ b/PullPayments/index.html @@ -9,7 +9,7 @@ - + @@ -100,6 +100,6 @@ 6
  • Clicking on the notification brings the sender to a page listing all outstanding payouts 7
  • Check the payout to approve, pay and confirm 8
  • You are then brought to the normal wallet user interface of BTCPay Server
  • WARNING

    Clicking on Confirm selected payouts will use the current exchange rate of your wallet's store settings. The rate is then fixed, even if you don't complete the payment. Payments made at a later time will use this previously confirmed rate.

    # Additional use cases for the Pull Payments feature

    The Pull Payment feature can be used in multiple applications, the first one being Refunds.

    - + diff --git a/Refund/index.html b/Refund/index.html index a2d02c7c13..bf46d7d435 100644 --- a/Refund/index.html +++ b/Refund/index.html @@ -9,7 +9,7 @@ - + @@ -67,6 +67,6 @@ →

    - + diff --git a/RegisterAccount/index.html b/RegisterAccount/index.html index 62b37fa2bd..4ba592f117 100644 --- a/RegisterAccount/index.html +++ b/RegisterAccount/index.html @@ -9,7 +9,7 @@ - + @@ -66,6 +66,6 @@ →

    - + diff --git a/Reporting/index.html b/Reporting/index.html index 9ab545e73e..c698ad5f24 100644 --- a/Reporting/index.html +++ b/Reporting/index.html @@ -9,7 +9,7 @@ - + @@ -68,6 +68,6 @@ (opens new window)

    - + diff --git a/Shopify/index.html b/Shopify/index.html index 9c52117c67..5901c9ab95 100644 --- a/Shopify/index.html +++ b/Shopify/index.html @@ -9,7 +9,7 @@ - + @@ -66,6 +66,6 @@ →

    - + diff --git a/Shopware/index.html b/Shopware/index.html index 0bf38ea6b9..274b68448a 100644 --- a/Shopware/index.html +++ b/Shopware/index.html @@ -9,7 +9,7 @@ - + @@ -66,6 +66,6 @@ →

    - + diff --git a/SideShift/index.html b/SideShift/index.html index 39ffe7f699..e37b71829e 100644 --- a/SideShift/index.html +++ b/SideShift/index.html @@ -9,7 +9,7 @@ - + @@ -75,6 +75,6 @@ →

    - + diff --git a/Sign-PSBT-with-sparrow-wallet/index.html b/Sign-PSBT-with-sparrow-wallet/index.html index 523ac30a55..233e469b62 100644 --- a/Sign-PSBT-with-sparrow-wallet/index.html +++ b/Sign-PSBT-with-sparrow-wallet/index.html @@ -9,7 +9,7 @@ - + @@ -58,6 +58,6 @@ GitHub (opens new window)

    # Creating a PSBT with BTCPay Server and Sparrow wallet

    This guide explains how you can create a partially signed bitcoin transaction (PSBT) on BTCPay Server and sign and broadcast it with Sparrow wallet (opens new window). We use BitBox02 (opens new window) hardware wallet in this example, but it will work with any other supported hardware wallet. This can be useful if you have an airgapped setup or persons creating the transaction and signing it are different people.

    # 1. Creating a transaction (on BTCPay Server):

    • Log into your BTCPay Server and select the store you want to send from
    • Under "Wallets" select "Bitcoin"
    • Click on button [Send]

    # On send screen:

    BTCPay: Create transaction on BTCPay Server
    • Enter the destination bitcoin address
    • Enter the amount
    • Optional: Change fee rate (get the current fee rate on mempool.space (opens new window) depending on how fast you want the transaction to be confirmed)
    • Important: click on "Advanced Settings" so it expands and check "Always include non-witness UTXO if available" (this is needed so hardware wallets like BitBox02 can sign the transaction)
    • Optional: on "Allow fee increase (RBF)", set to "Yes" (this is useful if you select a too low fee you can bump the fee so your transaction is not stuck and get’s confirmed)
    • Click [Sign transaction] button

    # On choosing signing method screen:

    BTCPay: Choose signing method: Partially Signed Bitcoin Transaction
    • Select "Partially Signed Bitcoin Transaction"

    # On PSBT screen:

    BTCPay: Download the PSBT file
    • Open the accordion of "Export PSBT for signing" click on button [Download PSBT file]
    • Store the file on hard-drive (you can use it to sign the PSBT yourself, or you can send it to somebody doing the signing on Sparrow wallet, see below); e.g. psbt-export.psbt

    # 2. Signing and sending the PSBT (on Sparrow wallet)

    • Open your Sparrow wallet app and corresponding wallet holding the data for the xPub used in your store
    • Next, import the PSBT file you created on BTCPay Server
    • In menu: File -> Open Transaction -> File...
    • Select the file you stored (or got sent from accounting) e.g. psbt-export.psbt

    # On showing the imported PSBT transaction:

    Sparrow wallet: Load the PSBT file
    • Make sure under headline "Signatures:" the "signing wallet" matches the wallet you want to sent from
    • Click on [Finalize Transaction for Signing]

    # Signing the transaction:

    Sparrow wallet: PSBT loaded, ready for signing
    • Click on [Sign]

    # Connect Hardware wallet popup:

    Sparrow wallet: connect to hardware wallet (e.g. in our case BitBox02)
    • Plug-in your hardware wallet (BitBox02 in our case)
    • Enter your hardware wallet pin (for BitBox02 it shows on screen open BitBox app but you do not need to, wait until you can enter the pin)
    • After BitBox02 unlocked, click [Scan...], your hardware wallet will show up

    # Wallet connected successfully:

    Sparrow wallet: hardware wallet successfully connected
    • Click [Sign]
    • A summary of the transaction will be shown on the BitBox02 device, you need to confirm it there

    # Broadcasting the transaction:

    Sparrow wallet: broadcast the transaction
    • After signing was successful you need to broadcast the transaction to the Bitcoin network
    • Click [Broadcast Transaction]

    TIP

    Alternatively, instead of broadcasting the transaction from Sparrow wallet (e.g. if you have an airgapped setup) you could also copy and paste the signed transaction PSBT from the textbox and upload it to your BTCPay Server and let it broadcast the transaction to the network.

    Congrats, done!

    - + diff --git a/Smartstore/index.html b/Smartstore/index.html index 0c4e1b0923..2a438e0dae 100644 --- a/Smartstore/index.html +++ b/Smartstore/index.html @@ -9,7 +9,7 @@ - + @@ -66,6 +66,6 @@ →

    - + diff --git a/Support/index.html b/Support/index.html index ad5c3daf05..89bcab9469 100644 --- a/Support/index.html +++ b/Support/index.html @@ -9,7 +9,7 @@ - + @@ -68,6 +68,6 @@ →

    - + diff --git a/TicketTailor/index.html b/TicketTailor/index.html index dcb85226f1..cb48848870 100644 --- a/TicketTailor/index.html +++ b/TicketTailor/index.html @@ -9,7 +9,7 @@ - + @@ -69,6 +69,6 @@ →

    - + diff --git a/Translations/index.html b/Translations/index.html index 5054d8cc32..c1ac9ed56e 100644 --- a/Translations/index.html +++ b/Translations/index.html @@ -9,7 +9,7 @@ - + @@ -66,6 +66,6 @@ →

    - + diff --git a/Transmuter/DCA/index.html b/Transmuter/DCA/index.html index 3349f2732a..8f84860361 100644 --- a/Transmuter/DCA/index.html +++ b/Transmuter/DCA/index.html @@ -9,7 +9,7 @@ - + @@ -73,6 +73,6 @@ →

    - + diff --git a/Transmuter/EmailReceiptsPreset/index.html b/Transmuter/EmailReceiptsPreset/index.html index 610c3e2be1..9aed1deb76 100644 --- a/Transmuter/EmailReceiptsPreset/index.html +++ b/Transmuter/EmailReceiptsPreset/index.html @@ -9,7 +9,7 @@ - + @@ -67,6 +67,6 @@ →

    - + diff --git a/Transmuter/index.html b/Transmuter/index.html index 07d5b3f5de..94de8a7b1b 100644 --- a/Transmuter/index.html +++ b/Transmuter/index.html @@ -9,7 +9,7 @@ - + @@ -67,6 +67,6 @@ There must be a class implementing BtcTransmuterExtension in this library. This file bootstraps the plugin name and adds all the services to system on startup.

    # Adding a Trigger

    # Adding an Action

    # Adding an External Service

    - + diff --git a/Trocador/index.html b/Trocador/index.html index 6854fc590e..21ce3a2364 100644 --- a/Trocador/index.html +++ b/Trocador/index.html @@ -9,7 +9,7 @@ - + @@ -66,6 +66,6 @@ →

    - + diff --git a/Troubleshooting/index.html b/Troubleshooting/index.html index 256723940f..a3b405b431 100644 --- a/Troubleshooting/index.html +++ b/Troubleshooting/index.html @@ -9,7 +9,7 @@ - + @@ -99,6 +99,6 @@ →

    - + diff --git a/TryItOut/index.html b/TryItOut/index.html index b1c5de053f..568a0c5a20 100644 --- a/TryItOut/index.html +++ b/TryItOut/index.html @@ -9,7 +9,7 @@ - + @@ -66,6 +66,6 @@ →

    - + diff --git a/UseCase/index.html b/UseCase/index.html index 56bc1d7a2f..7b11f55a6f 100644 --- a/UseCase/index.html +++ b/UseCase/index.html @@ -9,7 +9,7 @@ - + @@ -66,6 +66,6 @@ →

    - + diff --git a/Vault/HowToVerify/index.html b/Vault/HowToVerify/index.html index cec6261475..8dbd419f5d 100644 --- a/Vault/HowToVerify/index.html +++ b/Vault/HowToVerify/index.html @@ -9,7 +9,7 @@ - + @@ -83,6 +83,6 @@ →

    - + diff --git a/VirtueMart/index.html b/VirtueMart/index.html index ea5c4887b4..63a9893d37 100644 --- a/VirtueMart/index.html +++ b/VirtueMart/index.html @@ -9,7 +9,7 @@ - + @@ -88,6 +88,6 @@ →

    - + diff --git a/Wabisabi/index.html b/Wabisabi/index.html index 83f6b5053d..20a46ec91c 100644 --- a/Wabisabi/index.html +++ b/Wabisabi/index.html @@ -9,7 +9,7 @@ - + @@ -89,6 +89,6 @@ (opens new window)

    - + diff --git a/Walkthrough/index.html b/Walkthrough/index.html index 7ee3bf22b7..12d3ad00d1 100644 --- a/Walkthrough/index.html +++ b/Walkthrough/index.html @@ -9,7 +9,7 @@ - + @@ -80,6 +80,6 @@ →

    - + diff --git a/Wallet/index.html b/Wallet/index.html index fe8bda6e09..37a30db32d 100644 --- a/Wallet/index.html +++ b/Wallet/index.html @@ -9,7 +9,7 @@ - + @@ -63,6 +63,6 @@ Here, you have the options to perform several actions on your wallet, such Rescanning wallet for missing transactions, prunning old transactions, view wallet phrase, remove wallet among features.

    Wallet Rescan

    If you manually added the extended public key from an external wallet, you'd need to adjust AccountKeyPath that you can find in your external wallet, for example m/84'/0'/0' to be able to spend from the BTCPay Wallet.

    In wallet settings you will also find the speed policy for the specific store. There are 2 main settings under Payment, Payment invalid if transaction fails to confirm in ... after invoice creation and Consider the invoice confirmed when the payment transaction.... The latter lets you set the number of confirmations required to be recognized as settled.

    Wallet settings

    # Re-scan

    The Rescan relies on Bitcoin Core 0.17.0's scantxoutset to scan the current state of the blockchain (called UTXO Set) for coins belonging to the configured derivation scheme.

    Wallet Rescan

    Wallet re-scan solves two critical problems for BTCPay users:

    1. Gap limit
    2. Importing a previously used wallet

    Gap limit: Most wallets typically have the address gap limit set to 20. This means that if a merchant receives 21 or more consecutive unpaid invoices, those wallets show the incorrect balance and some transactions may not be visible.

    Wallet import: When users add a derivation scheme of a wallet that had transactions in the past (previously used wallet), BTCPay won't be able to show the balance and transactions from the past.

    Wallet rescan progress

    Re-scan is a feature that solves both of these problems. Once the scan is complete, BTCPay Server will show the correct balance, along with the past transactions of the wallet.

    Wallet re-scan requires access to the full node which means that this function is only available for server owners.

    Users who use a third-party host should use a newly generated xpub key and also use an external wallet like Electrum which allows them to increase the gap limit.

    # Labels

    At the bottom of your wallet settings, you can manage your custom transaction label.

    Clicking on the link would take you to a page where you can view all custom labels associated to all transaction. You can remove any or all custom labels given the required permission.

    Wallet settings
    - + diff --git a/WalletSetup/index.html b/WalletSetup/index.html index 072c87d92f..fb7dca35f1 100644 --- a/WalletSetup/index.html +++ b/WalletSetup/index.html @@ -9,7 +9,7 @@ - + @@ -58,6 +58,6 @@ GitHub (opens new window)

    # (3) Wallet Setup

    After account registration and store creation, it's time to configure a wallet in your BTCPay Server, so that you can start receiving payments into it.

    There are two ways to set up a wallet in BTCPay Server:

    There are many options on how set up a wallet with your BTCPay Server. It's up to you to decide what works best for your use-case. Once you configure a wallet, you're all set. The next step, is to start exploring the features.

    Proceed to the next step - What's Next?.

    - + diff --git a/WasabiWallet/index.html b/WasabiWallet/index.html index 1d67ab119a..ada66ef8ae 100644 --- a/WasabiWallet/index.html +++ b/WasabiWallet/index.html @@ -9,7 +9,7 @@ - + @@ -67,6 +67,6 @@ After the loading is done and the wallet is opened, click on the 3 dots at the top right corner to go to Wallet Info .

    Wasabi Find Wallet Info

    Select and copy the Extended Account Public Key. This is the public key from which BTCPay will derive addresses. This cannot be used to derive private keys and spend the bitcoin.

    Wasabi Extended Account Public Key

    # Setup store wallet

    1. Assuming you created a store and are now in the Dashboard. Click on Set up a wallet
    Connect Wasabi Wallet to BTCPay Server
    1. As you did the above steps in wasabi, Click Connect an existing wallet
    Connect Wasabi Wallet to BTCPay Server
    1. Choose Enter extended public key
    Connect Wasabi Wallet to BTCPay Server
    1. Paste the Extended Account Public Key into derivation scheme field as it is, without adding anything else and click Continue
    Connect Wasabi Wallet to BTCPay Server
    1. Return to the Wasabi Wallet. Click the Receive button and generate a new address.
    Wasabi Receive
    1. Compare the address you see in Wasabi Wallet to addresses shown in BTCPay Server. Find a match, continue.
    Connect Wasabi Wallet to BTCPay Server
    1. When you found a match, your wallet is now connected to the store.
    Connect Wasabi Wallet to BTCPay Server

    # Connecting Wasabi to BTCPay Server Full Node (If you're self-hosting BTCPay)

    After the wallets are connected, it is highly recommended to connect Wasabi Wallet to your full node in BTCPay. The process is easy but can only be done if you self-host BTCPay and are logged in as Admin. Tor has to be enabled in BTCPay (it is enabled by default). This process enhances privacy even further.

    In BTCPay, go Server Settings > Services > Full node P2P > See Information. On the BTCP-P2P page, click on the Show Confidential QR Code. Bellow the QR Code, there's a link See QR Code information by clicking here, so click on the link to reveal your string. Copy the string but remove bitcoin-p2p:// part.

    In Wasabi, go to the Bitcoin tab at Settings and paste the endpoint in Bitcoin P2P Endpoint.

    Restart Wasabi to apply the changes.

    # Configuring the Gap Limit in Wasabi

    At the search bar on top, click on Wallet Folder. Shortly the json file will be shown in a sub-folder. Open that file with a text editor like notepad. Find the line "MinGapLimit": 21, and change it to "MinGapLimit": 100, and save the file.

    There's no good answer to how much you should set the gap limit to. Most merchants set 100-200. If you're a big merchant with high transaction volume, you can try with even a higher gap limit.

    For more details about the Gap Limit, check the FAQ.

    Wasabi Wallet and BTCPay Server are now connected. Any payments received to your BTCPay will be visible in Wasabi, where you can further spend or mix them.

    - + diff --git a/WhatsNext/index.html b/WhatsNext/index.html index 17ff2d9b14..c23a774b4d 100644 --- a/WhatsNext/index.html +++ b/WhatsNext/index.html @@ -9,7 +9,7 @@ - + @@ -66,6 +66,6 @@ →

    - + diff --git a/Wix/index.html b/Wix/index.html index 01b00ab553..c5eaddf1ea 100644 --- a/Wix/index.html +++ b/Wix/index.html @@ -9,7 +9,7 @@ - + @@ -93,6 +93,6 @@ →

    - + diff --git a/WooCommerce/index.html b/WooCommerce/index.html index b3c729ad78..c92d099be0 100644 --- a/WooCommerce/index.html +++ b/WooCommerce/index.html @@ -9,7 +9,7 @@ - + @@ -116,6 +116,6 @@ →

    - + diff --git a/Xenforo/index.html b/Xenforo/index.html index 493b64b36f..424421519d 100644 --- a/Xenforo/index.html +++ b/Xenforo/index.html @@ -9,7 +9,7 @@ - + @@ -68,6 +68,6 @@ →

    - + diff --git a/Zapier/index.html b/Zapier/index.html index 1cb4edacd8..b0245c2dba 100644 --- a/Zapier/index.html +++ b/Zapier/index.html @@ -9,7 +9,7 @@ - + @@ -77,6 +77,6 @@ →

    - + diff --git a/assets/js/101.63849674.js b/assets/js/101.6168bb55.js similarity index 97% rename from assets/js/101.63849674.js rename to assets/js/101.6168bb55.js index 81ae1f558f..87762f0d4d 100644 --- a/assets/js/101.63849674.js +++ b/assets/js/101.6168bb55.js @@ -1 +1 @@ -(window.webpackJsonp=window.webpackJsonp||[]).push([[101],{731:function(e,t,n){"use strict";n.r(t);var a=n(10),i=Object(a.a)({},(function(){var e=this,t=e._self._c;return t("ContentSlotsDistributor",{attrs:{"slot-key":e.$parent.slotKey}},[t("h1",{attrs:{id:"bringin-euro-offramp-plugin"}},[t("a",{staticClass:"header-anchor",attrs:{href:"#bringin-euro-offramp-plugin"}},[e._v("#")]),e._v(" Bringin Euro offramp plugin")]),e._v(" "),t("p",[e._v("Allows you to automatically forward received funds to Bringin, a Euro offramp provider.")]),e._v(" "),t("h2",{attrs:{id:"usage"}},[t("a",{staticClass:"header-anchor",attrs:{href:"#usage"}},[e._v("#")]),e._v(" Usage")]),e._v(" "),t("ol",[t("li",[e._v("Install the plugin from the BTCPay Server > Settings > Plugin > Available Plugins, and restart")]),e._v(" "),t("li",[e._v('In the dashboard, or the side navigation, click on "Bringin" tostart configuring the plugin')]),e._v(" "),t("li",[e._v("You will need an API key, click on the onboarding link to start getting your account set up.")]),e._v(" "),t("li",[e._v("Once your account is set up, click on Integrations on the Bringin dashboard and get the API Key under BTCPay Server")]),e._v(" "),t("li",[e._v("Paste the API Key in the BTCPay Server plugin configuration, and new options should appear to configure the plugin")]),e._v(" "),t("li",[e._v("You can configure the available payment method options supported by Bringin, such as Lightning and On-chain.")]),e._v(" "),t("li",[e._v("Click Save")]),e._v(" "),t("li",[e._v("Make sure to configure payout processors so that payments to Bringin are automatically created.")])]),e._v(" "),t("h2",{attrs:{id:"flow"}},[t("a",{staticClass:"header-anchor",attrs:{href:"#flow"}},[e._v("#")]),e._v(" Flow")]),e._v(" "),t("p",[e._v('When an invoice on your store is paid and settled, every payment is counted per payment type (lightning, on-chain coming soon), relative to the "percentage" configured (set to 0 to not enable this payment).\nOnce the threshold is reached, an order is created on Bringin, and a payout paying this order is created. A payout processor then picks this payout and sends it to Bringin. Once the payment settles, the funds are automatically converted to Euro and the balance is reflected in your Bringin account and the BTCPay Server Bringin widget.')])])}),[],!1,null,null,null);t.default=i.exports}}]); \ No newline at end of file +(window.webpackJsonp=window.webpackJsonp||[]).push([[101],{730:function(e,t,n){"use strict";n.r(t);var a=n(10),i=Object(a.a)({},(function(){var e=this,t=e._self._c;return t("ContentSlotsDistributor",{attrs:{"slot-key":e.$parent.slotKey}},[t("h1",{attrs:{id:"bringin-euro-offramp-plugin"}},[t("a",{staticClass:"header-anchor",attrs:{href:"#bringin-euro-offramp-plugin"}},[e._v("#")]),e._v(" Bringin Euro offramp plugin")]),e._v(" "),t("p",[e._v("Allows you to automatically forward received funds to Bringin, a Euro offramp provider.")]),e._v(" "),t("h2",{attrs:{id:"usage"}},[t("a",{staticClass:"header-anchor",attrs:{href:"#usage"}},[e._v("#")]),e._v(" Usage")]),e._v(" "),t("ol",[t("li",[e._v("Install the plugin from the BTCPay Server > Settings > Plugin > Available Plugins, and restart")]),e._v(" "),t("li",[e._v('In the dashboard, or the side navigation, click on "Bringin" tostart configuring the plugin')]),e._v(" "),t("li",[e._v("You will need an API key, click on the onboarding link to start getting your account set up.")]),e._v(" "),t("li",[e._v("Once your account is set up, click on Integrations on the Bringin dashboard and get the API Key under BTCPay Server")]),e._v(" "),t("li",[e._v("Paste the API Key in the BTCPay Server plugin configuration, and new options should appear to configure the plugin")]),e._v(" "),t("li",[e._v("You can configure the available payment method options supported by Bringin, such as Lightning and On-chain.")]),e._v(" "),t("li",[e._v("Click Save")]),e._v(" "),t("li",[e._v("Make sure to configure payout processors so that payments to Bringin are automatically created.")])]),e._v(" "),t("h2",{attrs:{id:"flow"}},[t("a",{staticClass:"header-anchor",attrs:{href:"#flow"}},[e._v("#")]),e._v(" Flow")]),e._v(" "),t("p",[e._v('When an invoice on your store is paid and settled, every payment is counted per payment type (lightning, on-chain coming soon), relative to the "percentage" configured (set to 0 to not enable this payment).\nOnce the threshold is reached, an order is created on Bringin, and a payout paying this order is created. A payout processor then picks this payout and sends it to Bringin. Once the payment settles, the funds are automatically converted to Euro and the balance is reflected in your Bringin account and the BTCPay Server Bringin widget.')])])}),[],!1,null,null,null);t.default=i.exports}}]); \ No newline at end of file diff --git a/assets/js/102.8df65484.js b/assets/js/102.3fab4811.js similarity index 98% rename from assets/js/102.8df65484.js rename to assets/js/102.3fab4811.js index 6b6254c9b5..7ccc5dc8e1 100644 --- a/assets/js/102.8df65484.js +++ b/assets/js/102.3fab4811.js @@ -1 +1 @@ -(window.webpackJsonp=window.webpackJsonp||[]).push([[102],{730:function(e,t,o){"use strict";o.r(t);var a=o(10),r=Object(a.a)({},(function(){var e=this,t=e._self._c;return t("ContentSlotsDistributor",{attrs:{"slot-key":e.$parent.slotKey}},[t("h1",{attrs:{id:"connecting-coldcard-wallet-to-btcpay-server"}},[t("a",{staticClass:"header-anchor",attrs:{href:"#connecting-coldcard-wallet-to-btcpay-server"}},[e._v("#")]),e._v(" Connecting Coldcard Wallet to BTCPay Server")]),e._v(" "),t("p",[e._v("This document shows how to use a "),t("strong",[e._v("Coldcard Wallet")]),e._v(" with your BTCPay Server.")]),e._v(" "),t("h2",{attrs:{id:"coldcard-wallet-setup"}},[t("a",{staticClass:"header-anchor",attrs:{href:"#coldcard-wallet-setup"}},[e._v("#")]),e._v(" Coldcard Wallet Setup")]),e._v(" "),t("p",[e._v("This guide assumes, you have a Coldcard wallet set up. To configure the "),t("strong",[e._v("Coldcard")]),e._v(", please see the "),t("a",{attrs:{href:"https://coldcardwallet.com/docs/quick",target:"_blank",rel:"noopener noreferrer"}},[e._v("quick setup guide on manufacturer's website"),t("OutboundLink")],1),e._v(".")]),e._v(" "),t("h3",{attrs:{id:"quick-setup"}},[t("a",{staticClass:"header-anchor",attrs:{href:"#quick-setup"}},[e._v("#")]),e._v(" Quick Setup")]),e._v(" "),t("ol",[t("li",[e._v("Insert the MicroSD card into the Coldcard wallet.")]),e._v(" "),t("li",[e._v("Go to Advanced > MicroSD Card > Electrum Wallet > Native-Segwit")]),e._v(" "),t("li",[e._v("Insert the MicroSD card back into your PC")]),e._v(" "),t("li",[e._v("In BTCPay Server, Stores > Settings > Setup > Connect an existing wallet > "),t("code",[e._v("Import wallet file")])]),e._v(" "),t("li",[e._v("Choose File > select the wallet file earlier exported from Coldcard.")]),e._v(" "),t("li",[e._v("Click "),t("code",[e._v("Continue")])]),e._v(" "),t("li",[e._v("Confirm the addresses match the ones shown in your BTCPay Server.")])]),e._v(" "),t("p",[e._v("The "),t("strong",[e._v("Coldcard is now connected to your BTCPay Server")]),e._v(". Payments go directly to Coldcard. The video below shows how to connect your BTCPay store to your Coldcard.")]),e._v(" "),t("a",{staticClass:"ytEmbed",staticStyle:{"background-image":"url(https://img.youtube.com/vi/N0eVwdP_7EQ/hqdefault.jpg)"},attrs:{href:"https://www.youtube.com/watch?v=N0eVwdP_7EQ",title:"BTCPay and Coldcard","data-id":"N0eVwdP_7EQ"}},[t("iframe",{attrs:{title:"BTCPay and Coldcard","data-src":"https://www.youtube-nocookie.com/embed/N0eVwdP_7EQ?&autoplay=1&autohide=1&modestbranding=1&color=white&rel=0",frameborder:"0",allow:"autoplay;encrypted-media;picture-in-picture",allowfullscreen:""}})]),e._v(" "),t("h3",{attrs:{id:"spending-from-btcpay-server-wallet-with-coldcard-psbt"}},[t("a",{staticClass:"header-anchor",attrs:{href:"#spending-from-btcpay-server-wallet-with-coldcard-psbt"}},[e._v("#")]),e._v(" Spending from BTCPay Server wallet with Coldcard (PSBT)")]),e._v(" "),t("p",[e._v("Once there are some funds in received to your "),t("strong",[e._v("BTCPay Wallet connected to Coldcard")]),e._v(", you can spend them by using "),t("a",{attrs:{href:"https://github.com/bitcoin/bitcoin/blob/master/doc/psbt.md#psbt-in-general",target:"_blank",rel:"noopener noreferrer"}},[e._v("PSBT"),t("OutboundLink")],1),e._v(" (Partially Signed Bitcoin Transactions). This allows completely offline signing of your transactions, without ever having to connect your hardware wallet to the internet.")]),e._v(" "),t("ol",[t("li",[e._v("Wallets > Manage > Send")]),e._v(" "),t("li",[e._v("Fill in destination address and the amount")]),e._v(" "),t("li",[e._v("Click on the Sign with "),t("code",[e._v("a wallet supporting PSBT")]),e._v(" button.")]),e._v(" "),t("li",[e._v("You will be redirected to PSBT tab, with pre-filled information, click on the "),t("code",[e._v("Sign with a wallet supporting PSBT (save as file)")])]),e._v(" "),t("li",[e._v("Save the file onto MicroSD card")]),e._v(" "),t("li",[e._v("Insert MicroSD into your Coldcard.")]),e._v(" "),t("li",[e._v("In Coldcard, click on the "),t("code",[e._v("Ready To Sign")])]),e._v(" "),t("li",[e._v("Review the transaction information, and click OK button to sign it.")]),e._v(" "),t("li",[e._v("Transaction will be saved onto MicroSD.")]),e._v(" "),t("li",[e._v("In BTCPay, go to PSBT tab of the wallet and upload the signed PSBT file.")]),e._v(" "),t("li",[e._v("Click "),t("code",[e._v("Decode")])]),e._v(" "),t("li",[e._v("Click "),t("code",[e._v("Other Actions")]),e._v(" and select "),t("code",[e._v("Review")])]),e._v(" "),t("li",[e._v("Review your transactions and click "),t("code",[e._v("Broadcast")]),e._v(" to broadcast it on the network.")])]),e._v(" "),t("p",[e._v("The video below shows "),t("strong",[e._v("how to connect your BTCPay store to your Coldcard")]),e._v(".")]),e._v(" "),t("a",{staticClass:"ytEmbed",staticStyle:{"background-image":"url(https://img.youtube.com/vi/XyqvYaXMfNU/hqdefault.jpg)"},attrs:{href:"https://youtu.be/XyqvYaXMfNU",title:"BTCPay Server and Coldcard","data-id":"XyqvYaXMfNU"}},[t("iframe",{attrs:{title:"BTCPay Server and Coldcard","data-src":"https://www.youtube-nocookie.com/embed/XyqvYaXMfNU?&autoplay=1&autohide=1&modestbranding=1&color=white&rel=0",frameborder:"0",allow:"autoplay;encrypted-media;picture-in-picture",allowfullscreen:""}})])])}),[],!1,null,null,null);t.default=r.exports}}]); \ No newline at end of file +(window.webpackJsonp=window.webpackJsonp||[]).push([[102],{731:function(e,t,o){"use strict";o.r(t);var a=o(10),r=Object(a.a)({},(function(){var e=this,t=e._self._c;return t("ContentSlotsDistributor",{attrs:{"slot-key":e.$parent.slotKey}},[t("h1",{attrs:{id:"connecting-coldcard-wallet-to-btcpay-server"}},[t("a",{staticClass:"header-anchor",attrs:{href:"#connecting-coldcard-wallet-to-btcpay-server"}},[e._v("#")]),e._v(" Connecting Coldcard Wallet to BTCPay Server")]),e._v(" "),t("p",[e._v("This document shows how to use a "),t("strong",[e._v("Coldcard Wallet")]),e._v(" with your BTCPay Server.")]),e._v(" "),t("h2",{attrs:{id:"coldcard-wallet-setup"}},[t("a",{staticClass:"header-anchor",attrs:{href:"#coldcard-wallet-setup"}},[e._v("#")]),e._v(" Coldcard Wallet Setup")]),e._v(" "),t("p",[e._v("This guide assumes, you have a Coldcard wallet set up. To configure the "),t("strong",[e._v("Coldcard")]),e._v(", please see the "),t("a",{attrs:{href:"https://coldcardwallet.com/docs/quick",target:"_blank",rel:"noopener noreferrer"}},[e._v("quick setup guide on manufacturer's website"),t("OutboundLink")],1),e._v(".")]),e._v(" "),t("h3",{attrs:{id:"quick-setup"}},[t("a",{staticClass:"header-anchor",attrs:{href:"#quick-setup"}},[e._v("#")]),e._v(" Quick Setup")]),e._v(" "),t("ol",[t("li",[e._v("Insert the MicroSD card into the Coldcard wallet.")]),e._v(" "),t("li",[e._v("Go to Advanced > MicroSD Card > Electrum Wallet > Native-Segwit")]),e._v(" "),t("li",[e._v("Insert the MicroSD card back into your PC")]),e._v(" "),t("li",[e._v("In BTCPay Server, Stores > Settings > Setup > Connect an existing wallet > "),t("code",[e._v("Import wallet file")])]),e._v(" "),t("li",[e._v("Choose File > select the wallet file earlier exported from Coldcard.")]),e._v(" "),t("li",[e._v("Click "),t("code",[e._v("Continue")])]),e._v(" "),t("li",[e._v("Confirm the addresses match the ones shown in your BTCPay Server.")])]),e._v(" "),t("p",[e._v("The "),t("strong",[e._v("Coldcard is now connected to your BTCPay Server")]),e._v(". Payments go directly to Coldcard. The video below shows how to connect your BTCPay store to your Coldcard.")]),e._v(" "),t("a",{staticClass:"ytEmbed",staticStyle:{"background-image":"url(https://img.youtube.com/vi/N0eVwdP_7EQ/hqdefault.jpg)"},attrs:{href:"https://www.youtube.com/watch?v=N0eVwdP_7EQ",title:"BTCPay and Coldcard","data-id":"N0eVwdP_7EQ"}},[t("iframe",{attrs:{title:"BTCPay and Coldcard","data-src":"https://www.youtube-nocookie.com/embed/N0eVwdP_7EQ?&autoplay=1&autohide=1&modestbranding=1&color=white&rel=0",frameborder:"0",allow:"autoplay;encrypted-media;picture-in-picture",allowfullscreen:""}})]),e._v(" "),t("h3",{attrs:{id:"spending-from-btcpay-server-wallet-with-coldcard-psbt"}},[t("a",{staticClass:"header-anchor",attrs:{href:"#spending-from-btcpay-server-wallet-with-coldcard-psbt"}},[e._v("#")]),e._v(" Spending from BTCPay Server wallet with Coldcard (PSBT)")]),e._v(" "),t("p",[e._v("Once there are some funds in received to your "),t("strong",[e._v("BTCPay Wallet connected to Coldcard")]),e._v(", you can spend them by using "),t("a",{attrs:{href:"https://github.com/bitcoin/bitcoin/blob/master/doc/psbt.md#psbt-in-general",target:"_blank",rel:"noopener noreferrer"}},[e._v("PSBT"),t("OutboundLink")],1),e._v(" (Partially Signed Bitcoin Transactions). This allows completely offline signing of your transactions, without ever having to connect your hardware wallet to the internet.")]),e._v(" "),t("ol",[t("li",[e._v("Wallets > Manage > Send")]),e._v(" "),t("li",[e._v("Fill in destination address and the amount")]),e._v(" "),t("li",[e._v("Click on the Sign with "),t("code",[e._v("a wallet supporting PSBT")]),e._v(" button.")]),e._v(" "),t("li",[e._v("You will be redirected to PSBT tab, with pre-filled information, click on the "),t("code",[e._v("Sign with a wallet supporting PSBT (save as file)")])]),e._v(" "),t("li",[e._v("Save the file onto MicroSD card")]),e._v(" "),t("li",[e._v("Insert MicroSD into your Coldcard.")]),e._v(" "),t("li",[e._v("In Coldcard, click on the "),t("code",[e._v("Ready To Sign")])]),e._v(" "),t("li",[e._v("Review the transaction information, and click OK button to sign it.")]),e._v(" "),t("li",[e._v("Transaction will be saved onto MicroSD.")]),e._v(" "),t("li",[e._v("In BTCPay, go to PSBT tab of the wallet and upload the signed PSBT file.")]),e._v(" "),t("li",[e._v("Click "),t("code",[e._v("Decode")])]),e._v(" "),t("li",[e._v("Click "),t("code",[e._v("Other Actions")]),e._v(" and select "),t("code",[e._v("Review")])]),e._v(" "),t("li",[e._v("Review your transactions and click "),t("code",[e._v("Broadcast")]),e._v(" to broadcast it on the network.")])]),e._v(" "),t("p",[e._v("The video below shows "),t("strong",[e._v("how to connect your BTCPay store to your Coldcard")]),e._v(".")]),e._v(" "),t("a",{staticClass:"ytEmbed",staticStyle:{"background-image":"url(https://img.youtube.com/vi/XyqvYaXMfNU/hqdefault.jpg)"},attrs:{href:"https://youtu.be/XyqvYaXMfNU",title:"BTCPay Server and Coldcard","data-id":"XyqvYaXMfNU"}},[t("iframe",{attrs:{title:"BTCPay Server and Coldcard","data-src":"https://www.youtube-nocookie.com/embed/XyqvYaXMfNU?&autoplay=1&autohide=1&modestbranding=1&color=white&rel=0",frameborder:"0",allow:"autoplay;encrypted-media;picture-in-picture",allowfullscreen:""}})])])}),[],!1,null,null,null);t.default=r.exports}}]); \ No newline at end of file diff --git a/assets/js/104.9375361c.js b/assets/js/104.299429a1.js similarity index 96% rename from assets/js/104.9375361c.js rename to assets/js/104.299429a1.js index 4edfb2ca07..d754e67c8a 100644 --- a/assets/js/104.9375361c.js +++ b/assets/js/104.299429a1.js @@ -1 +1 @@ -(window.webpackJsonp=window.webpackJsonp||[]).push([[104],{736:function(e,t,r){"use strict";r.r(t);var n=r(10),s=Object(n.a)({},(function(){var e=this,t=e._self._c;return t("ContentSlotsDistributor",{attrs:{"slot-key":e.$parent.slotKey}},[t("h1",{attrs:{id:"design-btcpay-server"}},[t("a",{staticClass:"header-anchor",attrs:{href:"#design-btcpay-server"}},[e._v("#")]),e._v(" Design BTCPay Server")]),e._v(" "),t("h2",{attrs:{id:"why-designing-matters"}},[t("a",{staticClass:"header-anchor",attrs:{href:"#why-designing-matters"}},[e._v("#")]),e._v(" Why designing matters")]),e._v(" "),t("p",[e._v("Designing for BTCPay Server consists of improving overall experience for the end-user, making it easier to navigate the menus, options, etc...")]),e._v(" "),t("p",[e._v("To contribute design to BTCPay Server, check out the "),t("a",{attrs:{href:"https://chat.btcpayserver.org/btcpayserver/channels/ux-ui",target:"_blank",rel:"noopener noreferrer"}},[e._v("UX/UI channel"),t("OutboundLink")],1),e._v(" for current discussions and the Figma "),t("a",{attrs:{href:"https://www.figma.com/file/C7Xyq0FlxgFW8vaBr8ht1z/BTCPAY?node-id=1766%3A1005",target:"_blank",rel:"noopener noreferrer"}},[e._v("getting started"),t("OutboundLink")],1),e._v(" section for the design projects that are currently being worked on.")]),e._v(" "),t("p",[e._v("Graphic content also helps promote BTCPay Server. Be it full scale logos, memes or other graphics, we're always enjoying seeing what contributors come up with.\nFollowing the "),t("a",{attrs:{href:"https://design.btcpayserver.org/",target:"_blank",rel:"noopener noreferrer"}},[e._v("Codified Design Guidelines"),t("OutboundLink")],1),e._v(" is "),t("strong",[e._v("required")]),e._v(" so that graphical content can be consistent between contributors.")])])}),[],!1,null,null,null);t.default=s.exports}}]); \ No newline at end of file +(window.webpackJsonp=window.webpackJsonp||[]).push([[104],{735:function(e,t,r){"use strict";r.r(t);var n=r(10),s=Object(n.a)({},(function(){var e=this,t=e._self._c;return t("ContentSlotsDistributor",{attrs:{"slot-key":e.$parent.slotKey}},[t("h1",{attrs:{id:"design-btcpay-server"}},[t("a",{staticClass:"header-anchor",attrs:{href:"#design-btcpay-server"}},[e._v("#")]),e._v(" Design BTCPay Server")]),e._v(" "),t("h2",{attrs:{id:"why-designing-matters"}},[t("a",{staticClass:"header-anchor",attrs:{href:"#why-designing-matters"}},[e._v("#")]),e._v(" Why designing matters")]),e._v(" "),t("p",[e._v("Designing for BTCPay Server consists of improving overall experience for the end-user, making it easier to navigate the menus, options, etc...")]),e._v(" "),t("p",[e._v("To contribute design to BTCPay Server, check out the "),t("a",{attrs:{href:"https://chat.btcpayserver.org/btcpayserver/channels/ux-ui",target:"_blank",rel:"noopener noreferrer"}},[e._v("UX/UI channel"),t("OutboundLink")],1),e._v(" for current discussions and the Figma "),t("a",{attrs:{href:"https://www.figma.com/file/C7Xyq0FlxgFW8vaBr8ht1z/BTCPAY?node-id=1766%3A1005",target:"_blank",rel:"noopener noreferrer"}},[e._v("getting started"),t("OutboundLink")],1),e._v(" section for the design projects that are currently being worked on.")]),e._v(" "),t("p",[e._v("Graphic content also helps promote BTCPay Server. Be it full scale logos, memes or other graphics, we're always enjoying seeing what contributors come up with.\nFollowing the "),t("a",{attrs:{href:"https://design.btcpayserver.org/",target:"_blank",rel:"noopener noreferrer"}},[e._v("Codified Design Guidelines"),t("OutboundLink")],1),e._v(" is "),t("strong",[e._v("required")]),e._v(" so that graphical content can be consistent between contributors.")])])}),[],!1,null,null,null);t.default=s.exports}}]); \ No newline at end of file diff --git a/assets/js/106.c3942b03.js b/assets/js/106.d48f7be8.js similarity index 98% rename from assets/js/106.c3942b03.js rename to assets/js/106.d48f7be8.js index 6bd1a38f61..54c5fbc8cc 100644 --- a/assets/js/106.c3942b03.js +++ b/assets/js/106.d48f7be8.js @@ -1 +1 @@ -(window.webpackJsonp=window.webpackJsonp||[]).push([[106],{739:function(e,t,r){"use strict";r.r(t);var a=r(10),o=Object(a.a)({},(function(){var e=this,t=e._self._c;return t("ContentSlotsDistributor",{attrs:{"slot-key":e.$parent.slotKey}},[t("h1",{attrs:{id:"contributing-to-btcpay-server-in-other-ways"}},[t("a",{staticClass:"header-anchor",attrs:{href:"#contributing-to-btcpay-server-in-other-ways"}},[e._v("#")]),e._v(" Contributing to BTCPay Server in other ways")]),e._v(" "),t("p"),t("div",{staticClass:"table-of-contents"},[t("ul",[t("li",[t("a",{attrs:{href:"#create-videos-graphics"}},[e._v("Create Videos & Graphics")])]),t("li",[t("a",{attrs:{href:"#hosting-providers"}},[e._v("Hosting Providers")])]),t("li",[t("a",{attrs:{href:"#contribute-to-the-directory"}},[e._v("Contribute to the Directory")])]),t("li",[t("a",{attrs:{href:"#project-discussions"}},[e._v("Project Discussions")])]),t("li",[t("a",{attrs:{href:"#community"}},[e._v("Community")])]),t("li",[t("a",{attrs:{href:"#spreading-the-word"}},[e._v("Spreading the word")])])])]),t("p"),e._v(" "),t("h2",{attrs:{id:"create-videos-graphics"}},[t("a",{staticClass:"header-anchor",attrs:{href:"#create-videos-graphics"}},[e._v("#")]),e._v(" Create Videos & Graphics")]),e._v(" "),t("p",[e._v("Making videos that promote some features or that show how BTCPay Server works is a great way to help.\nVideo tutorials also help new users navigate around what BTCPay Server can offer them.")]),e._v(" "),t("p",[e._v("You can see examples of videos that are already on the Official BTCPay Server "),t("a",{attrs:{href:"https://www.youtube.com/channel/UCpG9WL6TJuoNfFVkaDMp9ug/",target:"_blank",rel:"noopener noreferrer"}},[e._v("YouTube channel"),t("OutboundLink")],1),e._v(" for inspiration.")]),e._v(" "),t("h2",{attrs:{id:"hosting-providers"}},[t("a",{staticClass:"header-anchor",attrs:{href:"#hosting-providers"}},[e._v("#")]),e._v(" Hosting Providers")]),e._v(" "),t("p",[e._v("The BTCPay Server community is looking for more VPS hosting providers to implement "),t("RouterLink",{attrs:{to:"/Deployment/LunaNode/"}},[e._v("1-Click BTCPay Server deployment")]),e._v(" and make the deployment of software more accessible, decentralized and widely-available.")],1),e._v(" "),t("h2",{attrs:{id:"contribute-to-the-directory"}},[t("a",{staticClass:"header-anchor",attrs:{href:"#contribute-to-the-directory"}},[e._v("#")]),e._v(" Contribute to the Directory")]),e._v(" "),t("p",[e._v("The Directory has been created to showcase the possibilities of BTCPay Server for merchant checkouts, donations, fundraisers, or any other use-case users come up with.")]),e._v(" "),t("p",[e._v("It contains a non-exhaustive list of websites that use the software.")]),e._v(" "),t("p",[e._v("Anyone can "),t("a",{attrs:{href:"https://directory.btcpayserver.org/newentry",target:"_blank",rel:"noopener noreferrer"}},[e._v("add a person or an organisation"),t("OutboundLink")],1),e._v(" to the "),t("a",{attrs:{href:"https://directory.btcpayserver.org/",target:"_blank",rel:"noopener noreferrer"}},[e._v("Directory"),t("OutboundLink")],1),e._v(".\nIf you know how to use Github, you can directly create a Pull Request and add an entry by editing the "),t("code",[e._v(".vuepress/list.js")]),e._v(" file.")]),e._v(" "),t("p",[e._v("Please note that only websites that use BTCPay Server are accepted in the Directory and entries are expected to be in English language.")]),e._v(" "),t("h2",{attrs:{id:"project-discussions"}},[t("a",{staticClass:"header-anchor",attrs:{href:"#project-discussions"}},[e._v("#")]),e._v(" Project Discussions")]),e._v(" "),t("p",[e._v("Check out the "),t("a",{attrs:{href:"https://github.com/btcpayserver/btcpayserver/discussions",target:"_blank",rel:"noopener noreferrer"}},[e._v("BTCPay Discussions Page"),t("OutboundLink")],1),e._v(" and provide feedback on new feature ideas and other project topics. Features that may be good ideas for the project but aren't ready for development yet, can be found here.")]),e._v(" "),t("h2",{attrs:{id:"community"}},[t("a",{staticClass:"header-anchor",attrs:{href:"#community"}},[e._v("#")]),e._v(" Community")]),e._v(" "),t("p",[e._v("You can help BTCPay Server even if you're not a developer.")]),e._v(" "),t("p",[e._v("The easiest way is to use the software as a business or individual, provide feedback and "),t("a",{attrs:{href:"https://github.com/btcpayserver/btcpayserver/issues",target:"_blank",rel:"noopener noreferrer"}},[e._v("report any bugs or issues"),t("OutboundLink")],1),e._v(" you or your customers encounter. Another great way is to join the "),t("RouterLink",{attrs:{to:"/Community/"}},[e._v("community")]),e._v(" and help others troubleshoot by sharing information you may have from your experience using BTCPay Server.")],1),e._v(" "),t("p",[e._v("Consider helping newcomers like the community helped you.")]),e._v(" "),t("h2",{attrs:{id:"spreading-the-word"}},[t("a",{staticClass:"header-anchor",attrs:{href:"#spreading-the-word"}},[e._v("#")]),e._v(" Spreading the word")]),e._v(" "),t("p",[e._v("You like BTCPay Server, what it stands for and what it offers? Spread the word! It's the easiest way to contribute and help the community.")])])}),[],!1,null,null,null);t.default=o.exports}}]); \ No newline at end of file +(window.webpackJsonp=window.webpackJsonp||[]).push([[106],{740:function(e,t,r){"use strict";r.r(t);var a=r(10),o=Object(a.a)({},(function(){var e=this,t=e._self._c;return t("ContentSlotsDistributor",{attrs:{"slot-key":e.$parent.slotKey}},[t("h1",{attrs:{id:"contributing-to-btcpay-server-in-other-ways"}},[t("a",{staticClass:"header-anchor",attrs:{href:"#contributing-to-btcpay-server-in-other-ways"}},[e._v("#")]),e._v(" Contributing to BTCPay Server in other ways")]),e._v(" "),t("p"),t("div",{staticClass:"table-of-contents"},[t("ul",[t("li",[t("a",{attrs:{href:"#create-videos-graphics"}},[e._v("Create Videos & Graphics")])]),t("li",[t("a",{attrs:{href:"#hosting-providers"}},[e._v("Hosting Providers")])]),t("li",[t("a",{attrs:{href:"#contribute-to-the-directory"}},[e._v("Contribute to the Directory")])]),t("li",[t("a",{attrs:{href:"#project-discussions"}},[e._v("Project Discussions")])]),t("li",[t("a",{attrs:{href:"#community"}},[e._v("Community")])]),t("li",[t("a",{attrs:{href:"#spreading-the-word"}},[e._v("Spreading the word")])])])]),t("p"),e._v(" "),t("h2",{attrs:{id:"create-videos-graphics"}},[t("a",{staticClass:"header-anchor",attrs:{href:"#create-videos-graphics"}},[e._v("#")]),e._v(" Create Videos & Graphics")]),e._v(" "),t("p",[e._v("Making videos that promote some features or that show how BTCPay Server works is a great way to help.\nVideo tutorials also help new users navigate around what BTCPay Server can offer them.")]),e._v(" "),t("p",[e._v("You can see examples of videos that are already on the Official BTCPay Server "),t("a",{attrs:{href:"https://www.youtube.com/channel/UCpG9WL6TJuoNfFVkaDMp9ug/",target:"_blank",rel:"noopener noreferrer"}},[e._v("YouTube channel"),t("OutboundLink")],1),e._v(" for inspiration.")]),e._v(" "),t("h2",{attrs:{id:"hosting-providers"}},[t("a",{staticClass:"header-anchor",attrs:{href:"#hosting-providers"}},[e._v("#")]),e._v(" Hosting Providers")]),e._v(" "),t("p",[e._v("The BTCPay Server community is looking for more VPS hosting providers to implement "),t("RouterLink",{attrs:{to:"/Deployment/LunaNode/"}},[e._v("1-Click BTCPay Server deployment")]),e._v(" and make the deployment of software more accessible, decentralized and widely-available.")],1),e._v(" "),t("h2",{attrs:{id:"contribute-to-the-directory"}},[t("a",{staticClass:"header-anchor",attrs:{href:"#contribute-to-the-directory"}},[e._v("#")]),e._v(" Contribute to the Directory")]),e._v(" "),t("p",[e._v("The Directory has been created to showcase the possibilities of BTCPay Server for merchant checkouts, donations, fundraisers, or any other use-case users come up with.")]),e._v(" "),t("p",[e._v("It contains a non-exhaustive list of websites that use the software.")]),e._v(" "),t("p",[e._v("Anyone can "),t("a",{attrs:{href:"https://directory.btcpayserver.org/newentry",target:"_blank",rel:"noopener noreferrer"}},[e._v("add a person or an organisation"),t("OutboundLink")],1),e._v(" to the "),t("a",{attrs:{href:"https://directory.btcpayserver.org/",target:"_blank",rel:"noopener noreferrer"}},[e._v("Directory"),t("OutboundLink")],1),e._v(".\nIf you know how to use Github, you can directly create a Pull Request and add an entry by editing the "),t("code",[e._v(".vuepress/list.js")]),e._v(" file.")]),e._v(" "),t("p",[e._v("Please note that only websites that use BTCPay Server are accepted in the Directory and entries are expected to be in English language.")]),e._v(" "),t("h2",{attrs:{id:"project-discussions"}},[t("a",{staticClass:"header-anchor",attrs:{href:"#project-discussions"}},[e._v("#")]),e._v(" Project Discussions")]),e._v(" "),t("p",[e._v("Check out the "),t("a",{attrs:{href:"https://github.com/btcpayserver/btcpayserver/discussions",target:"_blank",rel:"noopener noreferrer"}},[e._v("BTCPay Discussions Page"),t("OutboundLink")],1),e._v(" and provide feedback on new feature ideas and other project topics. Features that may be good ideas for the project but aren't ready for development yet, can be found here.")]),e._v(" "),t("h2",{attrs:{id:"community"}},[t("a",{staticClass:"header-anchor",attrs:{href:"#community"}},[e._v("#")]),e._v(" Community")]),e._v(" "),t("p",[e._v("You can help BTCPay Server even if you're not a developer.")]),e._v(" "),t("p",[e._v("The easiest way is to use the software as a business or individual, provide feedback and "),t("a",{attrs:{href:"https://github.com/btcpayserver/btcpayserver/issues",target:"_blank",rel:"noopener noreferrer"}},[e._v("report any bugs or issues"),t("OutboundLink")],1),e._v(" you or your customers encounter. Another great way is to join the "),t("RouterLink",{attrs:{to:"/Community/"}},[e._v("community")]),e._v(" and help others troubleshoot by sharing information you may have from your experience using BTCPay Server.")],1),e._v(" "),t("p",[e._v("Consider helping newcomers like the community helped you.")]),e._v(" "),t("h2",{attrs:{id:"spreading-the-word"}},[t("a",{staticClass:"header-anchor",attrs:{href:"#spreading-the-word"}},[e._v("#")]),e._v(" Spreading the word")]),e._v(" "),t("p",[e._v("You like BTCPay Server, what it stands for and what it offers? Spread the word! It's the easiest way to contribute and help the community.")])])}),[],!1,null,null,null);t.default=o.exports}}]); \ No newline at end of file diff --git a/assets/js/108.6215d5b7.js b/assets/js/108.fb6e9cf1.js similarity index 99% rename from assets/js/108.6215d5b7.js rename to assets/js/108.fb6e9cf1.js index 6c5ac6343b..5a0c5ecba6 100644 --- a/assets/js/108.6215d5b7.js +++ b/assets/js/108.fb6e9cf1.js @@ -1 +1 @@ -(window.webpackJsonp=window.webpackJsonp||[]).push([[108],{742:function(t,e,r){"use strict";r.r(e);var o=r(10),a=Object(o.a)({},(function(){var t=this,e=t._self._c;return e("ContentSlotsDistributor",{attrs:{"slot-key":t.$parent.slotKey}},[e("h1",{attrs:{id:"documenting-btcpay-server"}},[e("a",{staticClass:"header-anchor",attrs:{href:"#documenting-btcpay-server"}},[t._v("#")]),t._v(" Documenting BTCPay Server")]),t._v(" "),e("p"),e("div",{staticClass:"table-of-contents"},[e("ul",[e("li",[e("a",{attrs:{href:"#why-documentation-matters"}},[t._v("Why documentation matters")])]),e("li",[e("a",{attrs:{href:"#btcpay-documentation"}},[t._v("BTCPay Documentation")])]),e("li",[e("a",{attrs:{href:"#btcpay-blog"}},[t._v("BTCPay Blog")])]),e("li",[e("a",{attrs:{href:"#requirements"}},[t._v("Requirements")])]),e("li",[e("a",{attrs:{href:"#recommended-software"}},[t._v("Recommended software")]),e("ul",[e("li",[e("a",{attrs:{href:"#text-editor"}},[t._v("Text Editor")])]),e("li",[e("a",{attrs:{href:"#version-control"}},[t._v("Version Control")])])])])])]),e("p"),t._v(" "),e("h2",{attrs:{id:"why-documentation-matters"}},[e("a",{staticClass:"header-anchor",attrs:{href:"#why-documentation-matters"}},[t._v("#")]),t._v(" Why documentation matters")]),t._v(" "),e("p",[t._v("Documentation is essential to give users of all skill levels concise and clear information about the software and how to use it. BTCPay server has many different use cases and as a result many different kinds of users seeking information from the documentation. Writers contributing to BTCPay Server are as important as any other contributor.")]),t._v(" "),e("p",[t._v("If you have technical knowledge in a certain area, want to help document new features or simply get involved in the BTCPay Server project, documentation is a great place to get started with contributing.")]),t._v(" "),e("p",[t._v("If you have writing skills or if you have a fair knowledge of the English language, then you can contribute to BTCPay Server or review the work of other contributors. Writing contributors can help in a number of places.")]),t._v(" "),e("h2",{attrs:{id:"btcpay-documentation"}},[e("a",{staticClass:"header-anchor",attrs:{href:"#btcpay-documentation"}},[t._v("#")]),t._v(" BTCPay Documentation")]),t._v(" "),e("p",[t._v("Documentation work needing to be completed can be found in the "),e("a",{attrs:{href:"https://github.com/btcpayserver/btcpayserver-doc/issues",target:"_blank",rel:"noopener noreferrer"}},[t._v("open issues page"),e("OutboundLink")],1),t._v(" on Github. For information on how to start a documentation task, see the "),e("RouterLink",{attrs:{to:"/Contribute/WriteDocs/"}},[t._v("documentation guide")]),t._v(".")],1),t._v(" "),e("p",[t._v("For documentation guidance or discussion of a new documentation idea, join the "),e("a",{attrs:{href:"https://chat.btcpayserver.org/btcpayserver/channels/documentation",target:"_blank",rel:"noopener noreferrer"}},[t._v("#documentation channel on Mattermost"),e("OutboundLink")],1),t._v(".")]),t._v(" "),e("h2",{attrs:{id:"btcpay-blog"}},[e("a",{staticClass:"header-anchor",attrs:{href:"#btcpay-blog"}},[t._v("#")]),t._v(" BTCPay Blog")]),t._v(" "),e("p",[t._v("Another great way to contribute is by writing content for the "),e("RouterLink",{attrs:{to:"/Contribute/WriteBlog/"}},[t._v("BTCPay blog")]),t._v(". To get started on a blog topic, join the "),e("a",{attrs:{href:"https://chat.btcpayserver.org/btcpayserver/channels/content-creation",target:"_blank",rel:"noopener noreferrer"}},[t._v("#content creation channel on Mattermost"),e("OutboundLink")],1),t._v(".")],1),t._v(" "),e("h2",{attrs:{id:"requirements"}},[e("a",{staticClass:"header-anchor",attrs:{href:"#requirements"}},[t._v("#")]),t._v(" Requirements")]),t._v(" "),e("p",[t._v("In order to contribute to BTCPay Server as a writer there are some requirements.")]),t._v(" "),e("p",[t._v("Since most of the documentation done in BTCPay Server is submitted and reviewed through Github, you must have a "),e("a",{attrs:{href:"https://github.com/",target:"_blank",rel:"noopener noreferrer"}},[t._v("Github account"),e("OutboundLink")],1),t._v(". It's also on Github that you can contribute by reviewing the documentation work done by others (pull requests).")]),t._v(" "),e("p",[e("strong",[t._v("Important note")]),t._v(": Contributions explained in this documentation are meant to be done in "),e("strong",[t._v("English")]),t._v(" only. If you wish to contribute in other languages, see "),e("RouterLink",{attrs:{to:"/Contribute/Translate/"}},[t._v("Translations")]),t._v(".")],1),t._v(" "),e("h2",{attrs:{id:"recommended-software"}},[e("a",{staticClass:"header-anchor",attrs:{href:"#recommended-software"}},[t._v("#")]),t._v(" Recommended software")]),t._v(" "),e("h3",{attrs:{id:"text-editor"}},[e("a",{staticClass:"header-anchor",attrs:{href:"#text-editor"}},[t._v("#")]),t._v(" Text Editor")]),t._v(" "),e("p",[t._v("It is recommended to have a Rich-Text editor.")]),t._v(" "),e("p",[e("a",{attrs:{href:"https://notepad-plus-plus.org/downloads/",target:"_blank",rel:"noopener noreferrer"}},[t._v("Notepad++"),e("OutboundLink")],1),t._v(" is a decent software and easy to use for the newer contributors.")]),t._v(" "),e("p",[t._v("For more advanced users, "),e("a",{attrs:{href:"https://visualstudio.microsoft.com/",target:"_blank",rel:"noopener noreferrer"}},[t._v("Visual Studio Code (VS Code)"),e("OutboundLink")],1),t._v(" is a good choice.\nThe "),e("code",[t._v("Markdown All In One")]),t._v(" extension in VS Code is also recommended, for visual comfort while editing and the ability to preview Markdown changes. This is helpful for the BTCPay documentation which is written primarily in Markdown.")]),t._v(" "),e("p",[t._v("These are only recommended: If you already use other similar software that you're accustomed to, you are free to continue using them.")]),t._v(" "),e("h3",{attrs:{id:"version-control"}},[e("a",{staticClass:"header-anchor",attrs:{href:"#version-control"}},[t._v("#")]),t._v(" Version Control")]),t._v(" "),e("p",[t._v("To be able to manage your contributions (such as forking repositories, creating and working on branches, making pull requests and issues, etc.) it's recommended you have "),e("a",{attrs:{href:"https://desktop.github.com/",target:"_blank",rel:"noopener noreferrer"}},[t._v("Github Desktop"),e("OutboundLink")],1),t._v(". You can see the step by step guide to making a pull request using Github Desktop "),e("RouterLink",{attrs:{to:"/Contribute/WriteSoftware/"}},[t._v("here")]),t._v(".")],1)])}),[],!1,null,null,null);e.default=a.exports}}]); \ No newline at end of file +(window.webpackJsonp=window.webpackJsonp||[]).push([[108],{743:function(t,e,r){"use strict";r.r(e);var o=r(10),a=Object(o.a)({},(function(){var t=this,e=t._self._c;return e("ContentSlotsDistributor",{attrs:{"slot-key":t.$parent.slotKey}},[e("h1",{attrs:{id:"documenting-btcpay-server"}},[e("a",{staticClass:"header-anchor",attrs:{href:"#documenting-btcpay-server"}},[t._v("#")]),t._v(" Documenting BTCPay Server")]),t._v(" "),e("p"),e("div",{staticClass:"table-of-contents"},[e("ul",[e("li",[e("a",{attrs:{href:"#why-documentation-matters"}},[t._v("Why documentation matters")])]),e("li",[e("a",{attrs:{href:"#btcpay-documentation"}},[t._v("BTCPay Documentation")])]),e("li",[e("a",{attrs:{href:"#btcpay-blog"}},[t._v("BTCPay Blog")])]),e("li",[e("a",{attrs:{href:"#requirements"}},[t._v("Requirements")])]),e("li",[e("a",{attrs:{href:"#recommended-software"}},[t._v("Recommended software")]),e("ul",[e("li",[e("a",{attrs:{href:"#text-editor"}},[t._v("Text Editor")])]),e("li",[e("a",{attrs:{href:"#version-control"}},[t._v("Version Control")])])])])])]),e("p"),t._v(" "),e("h2",{attrs:{id:"why-documentation-matters"}},[e("a",{staticClass:"header-anchor",attrs:{href:"#why-documentation-matters"}},[t._v("#")]),t._v(" Why documentation matters")]),t._v(" "),e("p",[t._v("Documentation is essential to give users of all skill levels concise and clear information about the software and how to use it. BTCPay server has many different use cases and as a result many different kinds of users seeking information from the documentation. Writers contributing to BTCPay Server are as important as any other contributor.")]),t._v(" "),e("p",[t._v("If you have technical knowledge in a certain area, want to help document new features or simply get involved in the BTCPay Server project, documentation is a great place to get started with contributing.")]),t._v(" "),e("p",[t._v("If you have writing skills or if you have a fair knowledge of the English language, then you can contribute to BTCPay Server or review the work of other contributors. Writing contributors can help in a number of places.")]),t._v(" "),e("h2",{attrs:{id:"btcpay-documentation"}},[e("a",{staticClass:"header-anchor",attrs:{href:"#btcpay-documentation"}},[t._v("#")]),t._v(" BTCPay Documentation")]),t._v(" "),e("p",[t._v("Documentation work needing to be completed can be found in the "),e("a",{attrs:{href:"https://github.com/btcpayserver/btcpayserver-doc/issues",target:"_blank",rel:"noopener noreferrer"}},[t._v("open issues page"),e("OutboundLink")],1),t._v(" on Github. For information on how to start a documentation task, see the "),e("RouterLink",{attrs:{to:"/Contribute/WriteDocs/"}},[t._v("documentation guide")]),t._v(".")],1),t._v(" "),e("p",[t._v("For documentation guidance or discussion of a new documentation idea, join the "),e("a",{attrs:{href:"https://chat.btcpayserver.org/btcpayserver/channels/documentation",target:"_blank",rel:"noopener noreferrer"}},[t._v("#documentation channel on Mattermost"),e("OutboundLink")],1),t._v(".")]),t._v(" "),e("h2",{attrs:{id:"btcpay-blog"}},[e("a",{staticClass:"header-anchor",attrs:{href:"#btcpay-blog"}},[t._v("#")]),t._v(" BTCPay Blog")]),t._v(" "),e("p",[t._v("Another great way to contribute is by writing content for the "),e("RouterLink",{attrs:{to:"/Contribute/WriteBlog/"}},[t._v("BTCPay blog")]),t._v(". To get started on a blog topic, join the "),e("a",{attrs:{href:"https://chat.btcpayserver.org/btcpayserver/channels/content-creation",target:"_blank",rel:"noopener noreferrer"}},[t._v("#content creation channel on Mattermost"),e("OutboundLink")],1),t._v(".")],1),t._v(" "),e("h2",{attrs:{id:"requirements"}},[e("a",{staticClass:"header-anchor",attrs:{href:"#requirements"}},[t._v("#")]),t._v(" Requirements")]),t._v(" "),e("p",[t._v("In order to contribute to BTCPay Server as a writer there are some requirements.")]),t._v(" "),e("p",[t._v("Since most of the documentation done in BTCPay Server is submitted and reviewed through Github, you must have a "),e("a",{attrs:{href:"https://github.com/",target:"_blank",rel:"noopener noreferrer"}},[t._v("Github account"),e("OutboundLink")],1),t._v(". It's also on Github that you can contribute by reviewing the documentation work done by others (pull requests).")]),t._v(" "),e("p",[e("strong",[t._v("Important note")]),t._v(": Contributions explained in this documentation are meant to be done in "),e("strong",[t._v("English")]),t._v(" only. If you wish to contribute in other languages, see "),e("RouterLink",{attrs:{to:"/Contribute/Translate/"}},[t._v("Translations")]),t._v(".")],1),t._v(" "),e("h2",{attrs:{id:"recommended-software"}},[e("a",{staticClass:"header-anchor",attrs:{href:"#recommended-software"}},[t._v("#")]),t._v(" Recommended software")]),t._v(" "),e("h3",{attrs:{id:"text-editor"}},[e("a",{staticClass:"header-anchor",attrs:{href:"#text-editor"}},[t._v("#")]),t._v(" Text Editor")]),t._v(" "),e("p",[t._v("It is recommended to have a Rich-Text editor.")]),t._v(" "),e("p",[e("a",{attrs:{href:"https://notepad-plus-plus.org/downloads/",target:"_blank",rel:"noopener noreferrer"}},[t._v("Notepad++"),e("OutboundLink")],1),t._v(" is a decent software and easy to use for the newer contributors.")]),t._v(" "),e("p",[t._v("For more advanced users, "),e("a",{attrs:{href:"https://visualstudio.microsoft.com/",target:"_blank",rel:"noopener noreferrer"}},[t._v("Visual Studio Code (VS Code)"),e("OutboundLink")],1),t._v(" is a good choice.\nThe "),e("code",[t._v("Markdown All In One")]),t._v(" extension in VS Code is also recommended, for visual comfort while editing and the ability to preview Markdown changes. This is helpful for the BTCPay documentation which is written primarily in Markdown.")]),t._v(" "),e("p",[t._v("These are only recommended: If you already use other similar software that you're accustomed to, you are free to continue using them.")]),t._v(" "),e("h3",{attrs:{id:"version-control"}},[e("a",{staticClass:"header-anchor",attrs:{href:"#version-control"}},[t._v("#")]),t._v(" Version Control")]),t._v(" "),e("p",[t._v("To be able to manage your contributions (such as forking repositories, creating and working on branches, making pull requests and issues, etc.) it's recommended you have "),e("a",{attrs:{href:"https://desktop.github.com/",target:"_blank",rel:"noopener noreferrer"}},[t._v("Github Desktop"),e("OutboundLink")],1),t._v(". You can see the step by step guide to making a pull request using Github Desktop "),e("RouterLink",{attrs:{to:"/Contribute/WriteSoftware/"}},[t._v("here")]),t._v(".")],1)])}),[],!1,null,null,null);e.default=a.exports}}]); \ No newline at end of file diff --git a/assets/js/113.6360697b.js b/assets/js/113.58e3d595.js similarity index 98% rename from assets/js/113.6360697b.js rename to assets/js/113.58e3d595.js index 6e19292aee..3876c97d00 100644 --- a/assets/js/113.6360697b.js +++ b/assets/js/113.58e3d595.js @@ -1 +1 @@ -(window.webpackJsonp=window.webpackJsonp||[]).push([[113],{758:function(e,r,t){"use strict";t.r(r);var a=t(10),n=Object(a.a)({},(function(){var e=this,r=e._self._c;return r("ContentSlotsDistributor",{attrs:{"slot-key":e.$parent.slotKey}},[r("h1",{attrs:{id:"hardware-as-a-service"}},[r("a",{staticClass:"header-anchor",attrs:{href:"#hardware-as-a-service"}},[e._v("#")]),e._v(" Hardware As A Service")]),e._v(" "),r("p",[e._v("Multiple entities or companies in the Bitcoin space provide "),r("strong",[e._v("preinstalled hardware that include BTCPay Server")]),e._v(".\nInstalled for example on Raspberry Pi or Rock64 devices, the BTCPay Server instance sits besides other software stacks.")]),e._v(" "),r("p",[e._v("This "),r("strong",[e._v("Hardware As A Service")]),e._v(" can be free or paid, and is mostly open-sourced for peer-review.")]),e._v(" "),r("p",[e._v("They are suitable for technical users to speed up the installation and initial syncing process.\nLess-technical users will find the 1-click or plug-and-play systems of these services incredibly practical.")]),e._v(" "),r("div",{staticClass:"custom-block warning"},[r("p",{staticClass:"custom-block-title"},[e._v("Please note:")]),e._v(" "),r("p",[e._v("Hardware-as-a-Service products consist of multiple softwares tied together.\nThe BTCPay Server community has no knowledge of how BTCPay Server integrates into these services, and cannot provide any support for these types of "),r("RouterLink",{attrs:{to:"/Deployment/ManualDeployment/"}},[e._v("Manual Deployments")]),e._v(". Please report bugs and issues directly to the entity that provided you with BTCPay Server inside their product.")],1)]),e._v(" "),r("p",[e._v("Here you can find a non-exhaustive list of companies that provide such a service:")]),e._v(" "),r("ul",[r("li",[r("a",{attrs:{href:"https://www.nodl.it/",target:"_blank",rel:"noopener noreferrer"}},[e._v("Nodl"),r("OutboundLink")],1)]),e._v(" "),r("li",[r("a",{attrs:{href:"https://www.dglab.com/en/works/hack0/",target:"_blank",rel:"noopener noreferrer"}},[e._v("Hack0"),r("OutboundLink")],1)]),e._v(" "),r("li",[r("a",{attrs:{href:"https://lightninginabox.co/",target:"_blank",rel:"noopener noreferrer"}},[e._v("LightningInABox"),r("OutboundLink")],1)]),e._v(" "),r("li",[r("a",{attrs:{href:"https://mynodebtc.com/",target:"_blank",rel:"noopener noreferrer"}},[e._v("MyNode"),r("OutboundLink")],1)]),e._v(" "),r("li",[r("a",{attrs:{href:"https://raspiblitz.org/",target:"_blank",rel:"noopener noreferrer"}},[e._v("RaspiBlitz"),r("OutboundLink")],1)]),e._v(" "),r("li",[r("a",{attrs:{href:"https://umbrel.com/",target:"_blank",rel:"noopener noreferrer"}},[e._v("Umbrel"),r("OutboundLink")],1)]),e._v(" "),r("li",[r("a",{attrs:{href:"https://start9.com/",target:"_blank",rel:"noopener noreferrer"}},[e._v("Embassy"),r("OutboundLink")],1)]),e._v(" "),r("li",[r("a",{attrs:{href:"https://runcitadel.space/",target:"_blank",rel:"noopener noreferrer"}},[e._v("Citadel"),r("OutboundLink")],1)])]),e._v(" "),r("p",[e._v("Do you provide Hardware As A Service and are not listed here?\nOpen an issue to "),r("a",{attrs:{href:"https://github.com/btcpayserver/btcpayserver-doc/issues",target:"_blank",rel:"noopener noreferrer"}},[e._v("get added to this list"),r("OutboundLink")],1)])])}),[],!1,null,null,null);r.default=n.exports}}]); \ No newline at end of file +(window.webpackJsonp=window.webpackJsonp||[]).push([[113],{759:function(e,r,t){"use strict";t.r(r);var a=t(10),n=Object(a.a)({},(function(){var e=this,r=e._self._c;return r("ContentSlotsDistributor",{attrs:{"slot-key":e.$parent.slotKey}},[r("h1",{attrs:{id:"hardware-as-a-service"}},[r("a",{staticClass:"header-anchor",attrs:{href:"#hardware-as-a-service"}},[e._v("#")]),e._v(" Hardware As A Service")]),e._v(" "),r("p",[e._v("Multiple entities or companies in the Bitcoin space provide "),r("strong",[e._v("preinstalled hardware that include BTCPay Server")]),e._v(".\nInstalled for example on Raspberry Pi or Rock64 devices, the BTCPay Server instance sits besides other software stacks.")]),e._v(" "),r("p",[e._v("This "),r("strong",[e._v("Hardware As A Service")]),e._v(" can be free or paid, and is mostly open-sourced for peer-review.")]),e._v(" "),r("p",[e._v("They are suitable for technical users to speed up the installation and initial syncing process.\nLess-technical users will find the 1-click or plug-and-play systems of these services incredibly practical.")]),e._v(" "),r("div",{staticClass:"custom-block warning"},[r("p",{staticClass:"custom-block-title"},[e._v("Please note:")]),e._v(" "),r("p",[e._v("Hardware-as-a-Service products consist of multiple softwares tied together.\nThe BTCPay Server community has no knowledge of how BTCPay Server integrates into these services, and cannot provide any support for these types of "),r("RouterLink",{attrs:{to:"/Deployment/ManualDeployment/"}},[e._v("Manual Deployments")]),e._v(". Please report bugs and issues directly to the entity that provided you with BTCPay Server inside their product.")],1)]),e._v(" "),r("p",[e._v("Here you can find a non-exhaustive list of companies that provide such a service:")]),e._v(" "),r("ul",[r("li",[r("a",{attrs:{href:"https://www.nodl.it/",target:"_blank",rel:"noopener noreferrer"}},[e._v("Nodl"),r("OutboundLink")],1)]),e._v(" "),r("li",[r("a",{attrs:{href:"https://www.dglab.com/en/works/hack0/",target:"_blank",rel:"noopener noreferrer"}},[e._v("Hack0"),r("OutboundLink")],1)]),e._v(" "),r("li",[r("a",{attrs:{href:"https://lightninginabox.co/",target:"_blank",rel:"noopener noreferrer"}},[e._v("LightningInABox"),r("OutboundLink")],1)]),e._v(" "),r("li",[r("a",{attrs:{href:"https://mynodebtc.com/",target:"_blank",rel:"noopener noreferrer"}},[e._v("MyNode"),r("OutboundLink")],1)]),e._v(" "),r("li",[r("a",{attrs:{href:"https://raspiblitz.org/",target:"_blank",rel:"noopener noreferrer"}},[e._v("RaspiBlitz"),r("OutboundLink")],1)]),e._v(" "),r("li",[r("a",{attrs:{href:"https://umbrel.com/",target:"_blank",rel:"noopener noreferrer"}},[e._v("Umbrel"),r("OutboundLink")],1)]),e._v(" "),r("li",[r("a",{attrs:{href:"https://start9.com/",target:"_blank",rel:"noopener noreferrer"}},[e._v("Embassy"),r("OutboundLink")],1)]),e._v(" "),r("li",[r("a",{attrs:{href:"https://runcitadel.space/",target:"_blank",rel:"noopener noreferrer"}},[e._v("Citadel"),r("OutboundLink")],1)])]),e._v(" "),r("p",[e._v("Do you provide Hardware As A Service and are not listed here?\nOpen an issue to "),r("a",{attrs:{href:"https://github.com/btcpayserver/btcpayserver-doc/issues",target:"_blank",rel:"noopener noreferrer"}},[e._v("get added to this list"),r("OutboundLink")],1)])])}),[],!1,null,null,null);r.default=n.exports}}]); \ No newline at end of file diff --git a/assets/js/114.5d50763b.js b/assets/js/114.12cbb563.js similarity index 99% rename from assets/js/114.5d50763b.js rename to assets/js/114.12cbb563.js index 4575438a31..6e1eed375e 100644 --- a/assets/js/114.5d50763b.js +++ b/assets/js/114.12cbb563.js @@ -1 +1 @@ -(window.webpackJsonp=window.webpackJsonp||[]).push([[114],{759:function(a,t,e){"use strict";e.r(t);var s=e(10),r=Object(s.a)({},(function(){var a=this,t=a._self._c;return t("ContentSlotsDistributor",{attrs:{"slot-key":a.$parent.slotKey}},[t("h1",{attrs:{id:"hardware-deployment"}},[t("a",{staticClass:"header-anchor",attrs:{href:"#hardware-deployment"}},[a._v("#")]),a._v(" Hardware Deployment")]),a._v(" "),t("p",[t("a",{attrs:{href:"https://lightninginabox.co",target:"_blank",rel:"noopener noreferrer"}},[a._v("Lightning in a Box"),t("OutboundLink")],1),a._v('\n"Your hardware. Your node. Your keys. Your Bitcoin".')]),a._v(" "),t("p",[a._v("In order for your Bitcoin experience to be truly self-sovereign and trustless you should consider "),t("strong",[a._v("running nodes on your own hardware")]),a._v(" and internet connection.\n"),t("strong",[a._v("BTCPay Server is an excellent way to run both Bitcoin & Lightning nodes")]),a._v(".\nNot only are you validating transactions you also get the ability to accept base layer Bitcoin and second layer Lightning payments.\nFollowing are instructions to install and host your very own BTCPay Server.")]),a._v(" "),t("p",[a._v("The process is basically the following:")]),a._v(" "),t("ol",[t("li",[a._v("Purchase and assemble hardware.")]),a._v(" "),t("li",[a._v("Install base Operating System and configure networking.")]),a._v(" "),t("li",[a._v("Install BTCPayServer-Docker.")])]),a._v(" "),t("p",[t("strong",[a._v("BTCPay Server can be installed on the following hardware")]),a._v(". The end result is a small, quiet node that is fast enough to sync from block zero. The total cost is approximately $300.")]),a._v(" "),t("ol",[t("li",[t("a",{attrs:{href:"https://www.amazon.com/dp/B0C89TQ1YF?ref=nb_sb_ss_w_as-reorder-t1_k0_1_4&=&crid=SHKYOXZIRAO0&=&sprefix=beel",target:"_blank",rel:"noopener noreferrer"}},[a._v("BeeLink S12 - Mini PC - $169.00"),t("OutboundLink")],1)]),a._v(" "),t("li",[t("a",{attrs:{href:"https://www.amazon.com/Western-Digital-SA510-Internal-Solid/dp/B0C14TF467/ref=sr_1_3?crid=2WDY52E7ESSEB&dib=eyJ2IjoiMSJ9.MBxkb5ZIvwjKXOzscB0GUvsbhX1rVhilXNFzID6n0xHORsDBPkIxQhIixVuiLY9I16rlFs5COExAAD8761Do-tzuAnZiutbqN-KM9rAL4zCw94kA_ArCJeR_RTDynZbiXf2Phnahw1Gw2dqXVek3p0dpe6_a_fbJrqx4BRaieoYo0zj1mX6YPGaYZAmF2Vf_Quk1TrkARk6s1_wZ0vFUw7EWdjKJ9hmNLxPWMfADML90A1rXk8gSCcRnwV2jdzN7jCfg2_urfJZ3IWOW5X3iwnP7s-vSec88PGmQ3RhS-Rc.sEURveFhiTAHYwZQdwyJX72hpWL5UgD_3tEPet747oE&dib_tag=se&keywords=2tb+ssd+wd+blue&qid=1710685725&s=electronics&sprefix=2tb+ssd+wd+blue%2Celectronics%2C90&sr=1-3",target:"_blank",rel:"noopener noreferrer"}},[a._v("WD Blue 2TB SSD - $129.00"),t("OutboundLink")],1)])]),a._v(" "),t("p",[a._v("Other requirements are as follows:")]),a._v(" "),t("ol",[t("li",[a._v("High speed internet connection.")]),a._v(" "),t("li",[a._v("Static IP")]),a._v(" "),t("li",[a._v("Domain Name")]),a._v(" "),t("li",[a._v("Ability to open ports on your router (optional, BTCPayServer can be accessed over TOR or by Dynamic DNS).")]),a._v(" "),t("li",[a._v("Tiny Screwdriver")]),a._v(" "),t("li",[a._v("USB Thumb Drive")]),a._v(" "),t("li",[a._v("USB Keyboard, Mouse and Monitor (for initial install only). Can be headless when completed.")])]),a._v(" "),t("p",[a._v("Assuming you purchased the hardware mentioned above, here are the build instructions.")]),a._v(" "),t("h3",{attrs:{id:"configure-your-domain-name"}},[t("a",{staticClass:"header-anchor",attrs:{href:"#configure-your-domain-name"}},[a._v("#")]),a._v(" Configure your domain name.")]),a._v(" "),t("p",[a._v('It can take several hours for DNS changes to propagate so you should do this step first.\nLogin to your domain registrar and point an A record from your domain to the external IP address of your internet connection.\nI suggest that you use a subdomain (ie. btcpay.yourdomain.com).\nTo find your external IP address Google "whats my ip".')]),a._v(" "),t("h3",{attrs:{id:"assemble-your-lightning-in-a-box-liab"}},[t("a",{staticClass:"header-anchor",attrs:{href:"#assemble-your-lightning-in-a-box-liab"}},[a._v("#")]),a._v(" Assemble your Lightning in a Box (LIAB).")]),a._v(" "),t("ul",[t("li",[a._v("Remove back cover with screwdriver.")]),a._v(" "),t("li",[a._v("Insert SSD")]),a._v(" "),t("li",[a._v("Install hard drive using included cage.")])]),a._v(" "),t("h3",{attrs:{id:"download-ubuntu-2204-lts-server"}},[t("a",{staticClass:"header-anchor",attrs:{href:"#download-ubuntu-2204-lts-server"}},[a._v("#")]),a._v(" Download "),t("a",{attrs:{href:"https://releases.ubuntu.com/jammy/ubuntu-22.04.4-live-server-amd64.iso",target:"_blank",rel:"noopener noreferrer"}},[a._v("Ubuntu 22.04 LTS Server"),t("OutboundLink")],1)]),a._v(" "),t("h3",{attrs:{id:"download-and-install-balena-etcher"}},[t("a",{staticClass:"header-anchor",attrs:{href:"#download-and-install-balena-etcher"}},[a._v("#")]),a._v(" Download and install "),t("a",{attrs:{href:"https://etcher.balena.io/",target:"_blank",rel:"noopener noreferrer"}},[a._v("Balena Etcher"),t("OutboundLink")],1),a._v(".")]),a._v(" "),t("p",[a._v("Etcher is software that is used to flash OS images to SD cards and USB Drives.\nIn this case we will be using Etcher to flash our USB Thumb Drive with the Ubuntu OS.")]),a._v(" "),t("h3",{attrs:{id:"connect-your-usb-keyboard-mouse-monitor-and-thumb-drive"}},[t("a",{staticClass:"header-anchor",attrs:{href:"#connect-your-usb-keyboard-mouse-monitor-and-thumb-drive"}},[a._v("#")]),a._v(" Connect your USB keyboard, mouse, monitor and thumb drive.")]),a._v(" "),t("p",[a._v('Press the power button to boot your LIAB. Press the "DEL" key to access the bios and change the boot order to use the thumb drive first.\nThe Ubuntu installation process is pretty simple and easy to follow. Here\'s a tutorial from the Ubuntu website. '),t("a",{attrs:{href:"https://ubuntu.com/tutorials/install-ubuntu-server#1-overview",target:"_blank",rel:"noopener noreferrer"}},[a._v("Install Ubuntu Server"),t("OutboundLink")],1),a._v(". The BeeLink S12 ships with Windows Pre-Installed so you will have to delete the NVME partitions and install Ubuntu on that drive.")]),a._v(" "),t("p",[a._v('*During the install process make sure you set the hostname to "btcpay" and enable SSH.')]),a._v(" "),t("h3",{attrs:{id:"give-your-liab-a-static-ip-address-on-your-local-network"}},[t("a",{staticClass:"header-anchor",attrs:{href:"#give-your-liab-a-static-ip-address-on-your-local-network"}},[a._v("#")]),a._v(" Give your LIAB a static IP address on your local network.")]),a._v(" "),t("p",[a._v("There are a few different ways to do this and you will find a ton of articles online. Here's a pretty simple one to follow "),t("a",{attrs:{href:"https://www.linuxtechi.com/static-ip-address-on-ubuntu-server/",target:"_blank",rel:"noopener noreferrer"}},[a._v("How to configure a static IP address on Ubuntu 22.04"),t("OutboundLink")],1),a._v('. To avoid conflicts with other devices on your network you should also set a "reservation" for your LIAB.')]),a._v(" "),t("h3",{attrs:{id:"log-into-your-router-and-forward-ports-80-443-and-9735-to-your-liabs-local-ip-address-optional-if-using-local-or-tor-only"}},[t("a",{staticClass:"header-anchor",attrs:{href:"#log-into-your-router-and-forward-ports-80-443-and-9735-to-your-liabs-local-ip-address-optional-if-using-local-or-tor-only"}},[a._v("#")]),a._v(" Log into your router and forward ports 80, 443 and 9735 to your LIAB's local IP address. (optional, if using .local, or Tor only)")]),a._v(" "),t("p",[a._v('Every router is different and you should be able to find instructions for your router by searching for "Port Forward + your router make and model".')]),a._v(" "),t("h3",{attrs:{id:"install-fail2ban-git-and-avahi-daemon"}},[t("a",{staticClass:"header-anchor",attrs:{href:"#install-fail2ban-git-and-avahi-daemon"}},[a._v("#")]),a._v(" Install Fail2ban, GIT and Avahi-Daemon.")]),a._v(" "),t("ul",[t("li",[t("a",{attrs:{href:"https://github.com/fail2ban/fail2ban/wiki/How-to-install-fail2ban-packages",target:"_blank",rel:"noopener noreferrer"}},[a._v("Fail2ban"),t("OutboundLink")],1),a._v(" bans IP's that attempt to connect to your server and show malicious signs. GIT allows you to clone and manage repositories on github.com.")]),a._v(" "),t("li",[t("a",{attrs:{href:"https://avahi.org/",target:"_blank",rel:"noopener noreferrer"}},[a._v("Avahi"),t("OutboundLink")],1),a._v(" is a system which facilitates service discovery on a local network via the mDNS/DNS-SD protocol suite.\nOpen a new terminal window and type the following commands:")])]),a._v(" "),t("div",{staticClass:"language-bash extra-class"},[t("pre",{pre:!0,attrs:{class:"language-bash"}},[t("code",[t("span",{pre:!0,attrs:{class:"token function"}},[a._v("sudo")]),a._v(" "),t("span",{pre:!0,attrs:{class:"token function"}},[a._v("apt")]),a._v(" update\n"),t("span",{pre:!0,attrs:{class:"token function"}},[a._v("sudo")]),a._v(" "),t("span",{pre:!0,attrs:{class:"token function"}},[a._v("apt")]),a._v(" "),t("span",{pre:!0,attrs:{class:"token function"}},[a._v("install")]),a._v(" "),t("span",{pre:!0,attrs:{class:"token parameter variable"}},[a._v("-y")]),a._v(" fail2ban "),t("span",{pre:!0,attrs:{class:"token function"}},[a._v("git")]),a._v(" avahi-daemon\n")])])]),t("h3",{attrs:{id:"configuring-the-firewall"}},[t("a",{staticClass:"header-anchor",attrs:{href:"#configuring-the-firewall"}},[a._v("#")]),a._v(" Configuring the firewall")]),a._v(" "),t("p",[a._v("Install a firewall and allow SSH, HTTP, HTTPS, Bitcoin, and Lightning:")]),a._v(" "),t("div",{staticClass:"language-bash extra-class"},[t("pre",{pre:!0,attrs:{class:"language-bash"}},[t("code",[t("span",{pre:!0,attrs:{class:"token function"}},[a._v("apt")]),a._v(" "),t("span",{pre:!0,attrs:{class:"token function"}},[a._v("install")]),a._v(" "),t("span",{pre:!0,attrs:{class:"token parameter variable"}},[a._v("-y")]),a._v(" ufw\nufw default deny incoming\nufw default allow outgoing\n")])])]),t("p",[a._v("This command allows SSH connections from internal networks only:")]),a._v(" "),t("div",{staticClass:"language-bash extra-class"},[t("pre",{pre:!0,attrs:{class:"language-bash"}},[t("code",[a._v("ufw allow from "),t("span",{pre:!0,attrs:{class:"token number"}},[a._v("10.0")]),a._v(".0.0/8 to any port "),t("span",{pre:!0,attrs:{class:"token number"}},[a._v("22")]),a._v(" proto tcp\nufw allow from "),t("span",{pre:!0,attrs:{class:"token number"}},[a._v("172.16")]),a._v(".0.0/12 to any port "),t("span",{pre:!0,attrs:{class:"token number"}},[a._v("22")]),a._v(" proto tcp\nufw allow from "),t("span",{pre:!0,attrs:{class:"token number"}},[a._v("192.168")]),a._v(".0.0/16 to any port "),t("span",{pre:!0,attrs:{class:"token number"}},[a._v("22")]),a._v(" proto tcp\nufw allow from "),t("span",{pre:!0,attrs:{class:"token number"}},[a._v("169.254")]),a._v(".0.0/16 to any port "),t("span",{pre:!0,attrs:{class:"token number"}},[a._v("22")]),a._v(" proto tcp\nufw allow from fc00::/7 to any port "),t("span",{pre:!0,attrs:{class:"token number"}},[a._v("22")]),a._v(" proto tcp\nufw allow from fe80::/10 to any port "),t("span",{pre:!0,attrs:{class:"token number"}},[a._v("22")]),a._v(" proto tcp\nufw allow from ff00::/8 to any port "),t("span",{pre:!0,attrs:{class:"token number"}},[a._v("22")]),a._v(" proto tcp\n")])])]),t("p",[a._v("These ports need to be accessible from anywhere (The default subnet is 'any' unless you specify one):")]),a._v(" "),t("div",{staticClass:"language-bash extra-class"},[t("pre",{pre:!0,attrs:{class:"language-bash"}},[t("code",[a._v("ufw allow "),t("span",{pre:!0,attrs:{class:"token number"}},[a._v("80")]),a._v("/tcp\nufw allow "),t("span",{pre:!0,attrs:{class:"token number"}},[a._v("443")]),a._v("/tcp\nufw allow "),t("span",{pre:!0,attrs:{class:"token number"}},[a._v("8333")]),a._v("/tcp\nufw allow "),t("span",{pre:!0,attrs:{class:"token number"}},[a._v("9735")]),a._v("/tcp\n\n"),t("span",{pre:!0,attrs:{class:"token comment"}},[a._v("# Enable the firewall")]),a._v("\nufw "),t("span",{pre:!0,attrs:{class:"token builtin class-name"}},[a._v("enable")]),a._v("\n\n"),t("span",{pre:!0,attrs:{class:"token comment"}},[a._v("# Verify the configuration")]),a._v("\nufw status\n")])])]),t("h3",{attrs:{id:"install-docker"}},[t("a",{staticClass:"header-anchor",attrs:{href:"#install-docker"}},[a._v("#")]),a._v(" Install Docker")]),a._v(" "),t("div",{staticClass:"language-Bash extra-class"},[t("pre",{pre:!0,attrs:{class:"language-bash"}},[t("code",[t("span",{pre:!0,attrs:{class:"token function"}},[a._v("sudo")]),a._v(" "),t("span",{pre:!0,attrs:{class:"token function"}},[a._v("apt")]),a._v(" "),t("span",{pre:!0,attrs:{class:"token function"}},[a._v("install")]),a._v(" apt-transport-https ca-certificates "),t("span",{pre:!0,attrs:{class:"token function"}},[a._v("curl")]),a._v(" software-properties-common\n"),t("span",{pre:!0,attrs:{class:"token function"}},[a._v("curl")]),a._v(" "),t("span",{pre:!0,attrs:{class:"token parameter variable"}},[a._v("-fsSL")]),a._v(" https://download.docker.com/linux/ubuntu/gpg "),t("span",{pre:!0,attrs:{class:"token operator"}},[a._v("|")]),a._v(" "),t("span",{pre:!0,attrs:{class:"token function"}},[a._v("sudo")]),a._v(" gpg "),t("span",{pre:!0,attrs:{class:"token parameter variable"}},[a._v("--dearmor")]),a._v(" "),t("span",{pre:!0,attrs:{class:"token parameter variable"}},[a._v("-o")]),a._v(" /usr/share/keyrings/docker-archive-keyring.gpg\n"),t("span",{pre:!0,attrs:{class:"token builtin class-name"}},[a._v("echo")]),a._v(" "),t("span",{pre:!0,attrs:{class:"token string"}},[a._v('"deb [arch='),t("span",{pre:!0,attrs:{class:"token variable"}},[t("span",{pre:!0,attrs:{class:"token variable"}},[a._v("$(")]),a._v("dpkg --print-architecture"),t("span",{pre:!0,attrs:{class:"token variable"}},[a._v(")")])]),a._v(" signed-by=/usr/share/keyrings/docker-archive-keyring.gpg] https://download.docker.com/linux/ubuntu "),t("span",{pre:!0,attrs:{class:"token variable"}},[t("span",{pre:!0,attrs:{class:"token variable"}},[a._v("$(")]),a._v("lsb_release "),t("span",{pre:!0,attrs:{class:"token parameter variable"}},[a._v("-cs")]),t("span",{pre:!0,attrs:{class:"token variable"}},[a._v(")")])]),a._v(' stable"')]),a._v(" "),t("span",{pre:!0,attrs:{class:"token operator"}},[a._v("|")]),a._v(" "),t("span",{pre:!0,attrs:{class:"token function"}},[a._v("sudo")]),a._v(" "),t("span",{pre:!0,attrs:{class:"token function"}},[a._v("tee")]),a._v(" /etc/apt/sources.list.d/docker.list "),t("span",{pre:!0,attrs:{class:"token operator"}},[a._v(">")]),a._v(" /dev/null\n"),t("span",{pre:!0,attrs:{class:"token function"}},[a._v("sudo")]),a._v(" "),t("span",{pre:!0,attrs:{class:"token function"}},[a._v("apt")]),a._v(" update\n"),t("span",{pre:!0,attrs:{class:"token function"}},[a._v("apt-cache")]),a._v(" policy docker-ce\n"),t("span",{pre:!0,attrs:{class:"token function"}},[a._v("sudo")]),a._v(" "),t("span",{pre:!0,attrs:{class:"token function"}},[a._v("apt")]),a._v(" "),t("span",{pre:!0,attrs:{class:"token function"}},[a._v("install")]),a._v(" docker-ce\n"),t("span",{pre:!0,attrs:{class:"token function"}},[a._v("sudo")]),a._v(" systemctl status "),t("span",{pre:!0,attrs:{class:"token function"}},[a._v("docker")]),a._v("\n")])])]),t("h3",{attrs:{id:"configuring-the-storage"}},[t("a",{staticClass:"header-anchor",attrs:{href:"#configuring-the-storage"}},[a._v("#")]),a._v(" Configuring the storage")]),a._v(" "),t("div",{staticClass:"language-bash extra-class"},[t("pre",{pre:!0,attrs:{class:"language-bash"}},[t("code",[t("span",{pre:!0,attrs:{class:"token function"}},[a._v("fdisk")]),a._v(" /dev/sda\n"),t("span",{pre:!0,attrs:{class:"token comment"}},[a._v("# type 'p' to list existing partitions")]),a._v("\n"),t("span",{pre:!0,attrs:{class:"token comment"}},[a._v("# type 'd' to delete currently selected partitions")]),a._v("\n"),t("span",{pre:!0,attrs:{class:"token comment"}},[a._v("# type 'n' to create a new partition")]),a._v("\n"),t("span",{pre:!0,attrs:{class:"token comment"}},[a._v("# type 'w' to write the new partition table and exit fdisk")]),a._v("\nmkfs.ext4 /dev/sda1\n"),t("span",{pre:!0,attrs:{class:"token function"}},[a._v("mkdir")]),a._v(" /mnt/usb\n"),t("span",{pre:!0,attrs:{class:"token assign-left variable"}},[a._v("UUID")]),t("span",{pre:!0,attrs:{class:"token operator"}},[a._v("=")]),t("span",{pre:!0,attrs:{class:"token string"}},[a._v('"'),t("span",{pre:!0,attrs:{class:"token variable"}},[t("span",{pre:!0,attrs:{class:"token variable"}},[a._v("$(")]),t("span",{pre:!0,attrs:{class:"token function"}},[a._v("sudo")]),a._v(" blkid "),t("span",{pre:!0,attrs:{class:"token parameter variable"}},[a._v("-s")]),a._v(" UUID "),t("span",{pre:!0,attrs:{class:"token parameter variable"}},[a._v("-o")]),a._v(" value /dev/sda1"),t("span",{pre:!0,attrs:{class:"token variable"}},[a._v(")")])]),a._v('"')]),a._v("\n"),t("span",{pre:!0,attrs:{class:"token builtin class-name"}},[a._v("echo")]),a._v(" "),t("span",{pre:!0,attrs:{class:"token string"}},[a._v('"UUID='),t("span",{pre:!0,attrs:{class:"token variable"}},[a._v("$UUID")]),a._v(' /mnt/usb ext4 defaults,noatime,nofail 0 0"')]),a._v(" "),t("span",{pre:!0,attrs:{class:"token operator"}},[a._v("|")]),a._v(" "),t("span",{pre:!0,attrs:{class:"token function"}},[a._v("sudo")]),a._v(" "),t("span",{pre:!0,attrs:{class:"token function"}},[a._v("tee")]),a._v(" "),t("span",{pre:!0,attrs:{class:"token parameter variable"}},[a._v("-a")]),a._v(" /etc/fstab\n"),t("span",{pre:!0,attrs:{class:"token function"}},[a._v("mount")]),a._v(" "),t("span",{pre:!0,attrs:{class:"token parameter variable"}},[a._v("-a")]),a._v("\n")])])]),t("h3",{attrs:{id:"create-mount-for-docker-volumes"}},[t("a",{staticClass:"header-anchor",attrs:{href:"#create-mount-for-docker-volumes"}},[a._v("#")]),a._v(" Create mount for Docker volumes")]),a._v(" "),t("div",{staticClass:"language-bash extra-class"},[t("pre",{pre:!0,attrs:{class:"language-bash"}},[t("code",[t("span",{pre:!0,attrs:{class:"token function"}},[a._v("rm")]),a._v(" "),t("span",{pre:!0,attrs:{class:"token parameter variable"}},[a._v("-rf")]),a._v(" /var/lib/docker\n"),t("span",{pre:!0,attrs:{class:"token function"}},[a._v("mkdir")]),a._v(" "),t("span",{pre:!0,attrs:{class:"token parameter variable"}},[a._v("-p")]),a._v(" /var/lib/docker\n"),t("span",{pre:!0,attrs:{class:"token function"}},[a._v("mount")]),a._v(" "),t("span",{pre:!0,attrs:{class:"token parameter variable"}},[a._v("--bind")]),a._v(" /mnt/usb /var/lib/docker\n"),t("span",{pre:!0,attrs:{class:"token builtin class-name"}},[a._v("echo")]),a._v(" "),t("span",{pre:!0,attrs:{class:"token string"}},[a._v('"/mnt/docker /var/lib/docker none bind,nobootwait 0 2"')]),a._v(" "),t("span",{pre:!0,attrs:{class:"token operator"}},[a._v(">>")]),a._v(" /etc/fstab\nsystemctl restart "),t("span",{pre:!0,attrs:{class:"token function"}},[a._v("docker")]),a._v("\n")])])]),t("h3",{attrs:{id:"setup-btcpay-server"}},[t("a",{staticClass:"header-anchor",attrs:{href:"#setup-btcpay-server"}},[a._v("#")]),a._v(" Setup BTCPay Server")]),a._v(" "),t("p",[a._v("Download BTCPay Server from GitHub:")]),a._v(" "),t("div",{staticClass:"language-bash extra-class"},[t("pre",{pre:!0,attrs:{class:"language-bash"}},[t("code",[t("span",{pre:!0,attrs:{class:"token builtin class-name"}},[a._v("cd")]),a._v(" "),t("span",{pre:!0,attrs:{class:"token comment"}},[a._v("# ensure we are in root home")]),a._v("\n"),t("span",{pre:!0,attrs:{class:"token function"}},[a._v("apt")]),a._v(" "),t("span",{pre:!0,attrs:{class:"token function"}},[a._v("install")]),a._v(" "),t("span",{pre:!0,attrs:{class:"token parameter variable"}},[a._v("-y")]),a._v(" fail2ban "),t("span",{pre:!0,attrs:{class:"token function"}},[a._v("git")]),a._v("\n"),t("span",{pre:!0,attrs:{class:"token function"}},[a._v("git")]),a._v(" clone https://github.com/btcpayserver/btcpayserver-docker\n"),t("span",{pre:!0,attrs:{class:"token builtin class-name"}},[a._v("cd")]),a._v(" btcpayserver-docker\n")])])]),t("p",[a._v("Configure BTCPay by setting some "),t("a",{attrs:{href:"https://github.com/btcpayserver/btcpayserver-docker#environment-variables",target:"_blank",rel:"noopener noreferrer"}},[a._v("environment variables"),t("OutboundLink")],1),a._v(":")]),a._v(" "),t("div",{staticClass:"language-bash extra-class"},[t("pre",{pre:!0,attrs:{class:"language-bash"}},[t("code",[t("span",{pre:!0,attrs:{class:"token builtin class-name"}},[a._v("export")]),a._v(" "),t("span",{pre:!0,attrs:{class:"token assign-left variable"}},[a._v("BTCPAY_HOST")]),t("span",{pre:!0,attrs:{class:"token operator"}},[a._v("=")]),t("span",{pre:!0,attrs:{class:"token string"}},[a._v('"btcpay.local"')]),a._v("\n"),t("span",{pre:!0,attrs:{class:"token builtin class-name"}},[a._v("export")]),a._v(" "),t("span",{pre:!0,attrs:{class:"token assign-left variable"}},[a._v("REVERSEPROXY_DEFAULT_HOST")]),t("span",{pre:!0,attrs:{class:"token operator"}},[a._v("=")]),t("span",{pre:!0,attrs:{class:"token string"}},[a._v('"'),t("span",{pre:!0,attrs:{class:"token variable"}},[a._v("$BTCPAY_HOST")]),a._v('"')]),a._v("\n"),t("span",{pre:!0,attrs:{class:"token builtin class-name"}},[a._v("export")]),a._v(" "),t("span",{pre:!0,attrs:{class:"token assign-left variable"}},[a._v("NBITCOIN_NETWORK")]),t("span",{pre:!0,attrs:{class:"token operator"}},[a._v("=")]),t("span",{pre:!0,attrs:{class:"token string"}},[a._v('"mainnet"')]),a._v("\n"),t("span",{pre:!0,attrs:{class:"token builtin class-name"}},[a._v("export")]),a._v(" "),t("span",{pre:!0,attrs:{class:"token assign-left variable"}},[a._v("BTCPAYGEN_CRYPTO1")]),t("span",{pre:!0,attrs:{class:"token operator"}},[a._v("=")]),t("span",{pre:!0,attrs:{class:"token string"}},[a._v('"btc"')]),a._v("\n"),t("span",{pre:!0,attrs:{class:"token builtin class-name"}},[a._v("export")]),a._v(" "),t("span",{pre:!0,attrs:{class:"token assign-left variable"}},[a._v("BTCPAYGEN_LIGHTNING")]),t("span",{pre:!0,attrs:{class:"token operator"}},[a._v("=")]),t("span",{pre:!0,attrs:{class:"token string"}},[a._v('"clightning"')]),a._v("\n"),t("span",{pre:!0,attrs:{class:"token builtin class-name"}},[a._v("export")]),a._v(" "),t("span",{pre:!0,attrs:{class:"token assign-left variable"}},[a._v("BTCPAYGEN_REVERSEPROXY")]),t("span",{pre:!0,attrs:{class:"token operator"}},[a._v("=")]),t("span",{pre:!0,attrs:{class:"token string"}},[a._v('"nginx"')]),a._v("\n"),t("span",{pre:!0,attrs:{class:"token builtin class-name"}},[a._v("export")]),a._v(" "),t("span",{pre:!0,attrs:{class:"token assign-left variable"}},[a._v("BTCPAY_ENABLE_SSH")]),t("span",{pre:!0,attrs:{class:"token operator"}},[a._v("=")]),a._v("true\n")])])]),t("p",[a._v("If you want to use multiple hostnames, add them via the optional "),t("code",[a._v("BTCPAY_ADDITIONAL_HOSTS")]),a._v(" variable:")]),a._v(" "),t("div",{staticClass:"language-bash extra-class"},[t("pre",{pre:!0,attrs:{class:"language-bash"}},[t("code",[t("span",{pre:!0,attrs:{class:"token builtin class-name"}},[a._v("export")]),a._v(" "),t("span",{pre:!0,attrs:{class:"token assign-left variable"}},[a._v("BTCPAY_ADDITIONAL_HOSTS")]),t("span",{pre:!0,attrs:{class:"token operator"}},[a._v("=")]),t("span",{pre:!0,attrs:{class:"token string"}},[a._v('"btcpay.YourDomain.com"')]),a._v("\n")])])]),t("p",[a._v("In case you want to restrict access to your local network only, please note that you need to use a "),t("code",[a._v(".local")]),a._v(" domain.")]),a._v(" "),t("p",[a._v("Run the BTCPay installation:")]),a._v(" "),t("div",{staticClass:"language-bash extra-class"},[t("pre",{pre:!0,attrs:{class:"language-bash"}},[t("code",[t("span",{pre:!0,attrs:{class:"token builtin class-name"}},[a._v(".")]),a._v(" ./btcpay-setup.sh "),t("span",{pre:!0,attrs:{class:"token parameter variable"}},[a._v("-i")]),a._v("\n")])])]),t("p",[a._v("It should be up and running within a few minutes. Try opening http://btcpay.local in your web browser. If everything is correct, you will see BTCPay Server front page.")]),a._v(" "),t("p",[a._v("Now, you just need to wait a day or so for the Bitcoin blockchain to "),t("RouterLink",{attrs:{to:"/FAQ/Synchronization/"}},[a._v("sync and full verify")]),a._v(". The bottom of the BTCPay Server web GUI will show a pop-up dialog box to monitor the progress.")],1),a._v(" "),t("h3",{attrs:{id:"fastsync-optional"}},[t("a",{staticClass:"header-anchor",attrs:{href:"#fastsync-optional"}},[a._v("#")]),a._v(" FastSync (optional)")]),a._v(" "),t("p",[a._v("Please read very carefully to understand what "),t("RouterLink",{attrs:{to:"/Docker/fastsync/"}},[a._v("FastSync")]),a._v(" is and why it is important to verify the UTXO set yourself.")],1),a._v(" "),t("p",[a._v("By using FastSync, you are exposing yourself to attacks if a "),t("a",{attrs:{href:"https://github.com/btcpayserver/btcpayserver-docker/blob/master/contrib/FastSync/README.md#what-are-the-downsides-of-fast-sync",target:"_blank",rel:"noopener noreferrer"}},[a._v("malicious UTXO set snapshot"),t("OutboundLink")],1),a._v(" is sent to you.\nIf you have another trusted node somewhere else, you can check the validity of the UTXO set gathered by FastSync by following "),t("a",{attrs:{href:"https://github.com/btcpayserver/btcpayserver-docker/blob/master/contrib/FastSync/README.md#dont-trust-verify",target:"_blank",rel:"noopener noreferrer"}},[a._v("these instructions"),t("OutboundLink")],1),a._v(".")]),a._v(" "),t("div",{staticClass:"language-bash extra-class"},[t("pre",{pre:!0,attrs:{class:"language-bash"}},[t("code",[t("span",{pre:!0,attrs:{class:"token comment"}},[a._v("# Stop BTCPay Server")]),a._v("\n"),t("span",{pre:!0,attrs:{class:"token builtin class-name"}},[a._v("cd")]),a._v(" /root/btcpayserver/btcpayserver-docker\n./btcpay-down.sh\n\n"),t("span",{pre:!0,attrs:{class:"token comment"}},[a._v("# Import FastSync UTXO set")]),a._v("\n"),t("span",{pre:!0,attrs:{class:"token builtin class-name"}},[a._v("cd")]),a._v(" contrib/FastSync\n./load-utxo-set.sh\n")])])]),t("p",[a._v("FastSync currently takes about 30 minutes on a high-speed internet connection.\nAfter FastSync finishes, run the following command to restart BTCPay Server:")]),a._v(" "),t("div",{staticClass:"language-bash extra-class"},[t("pre",{pre:!0,attrs:{class:"language-bash"}},[t("code",[t("span",{pre:!0,attrs:{class:"token builtin class-name"}},[a._v("cd")]),a._v(" "),t("span",{pre:!0,attrs:{class:"token punctuation"}},[a._v("..")]),a._v("/"),t("span",{pre:!0,attrs:{class:"token punctuation"}},[a._v("..")]),a._v("\n./btcpay-up.sh\n")])])])])}),[],!1,null,null,null);t.default=r.exports}}]); \ No newline at end of file +(window.webpackJsonp=window.webpackJsonp||[]).push([[114],{758:function(a,t,e){"use strict";e.r(t);var s=e(10),r=Object(s.a)({},(function(){var a=this,t=a._self._c;return t("ContentSlotsDistributor",{attrs:{"slot-key":a.$parent.slotKey}},[t("h1",{attrs:{id:"hardware-deployment"}},[t("a",{staticClass:"header-anchor",attrs:{href:"#hardware-deployment"}},[a._v("#")]),a._v(" Hardware Deployment")]),a._v(" "),t("p",[t("a",{attrs:{href:"https://lightninginabox.co",target:"_blank",rel:"noopener noreferrer"}},[a._v("Lightning in a Box"),t("OutboundLink")],1),a._v('\n"Your hardware. Your node. Your keys. Your Bitcoin".')]),a._v(" "),t("p",[a._v("In order for your Bitcoin experience to be truly self-sovereign and trustless you should consider "),t("strong",[a._v("running nodes on your own hardware")]),a._v(" and internet connection.\n"),t("strong",[a._v("BTCPay Server is an excellent way to run both Bitcoin & Lightning nodes")]),a._v(".\nNot only are you validating transactions you also get the ability to accept base layer Bitcoin and second layer Lightning payments.\nFollowing are instructions to install and host your very own BTCPay Server.")]),a._v(" "),t("p",[a._v("The process is basically the following:")]),a._v(" "),t("ol",[t("li",[a._v("Purchase and assemble hardware.")]),a._v(" "),t("li",[a._v("Install base Operating System and configure networking.")]),a._v(" "),t("li",[a._v("Install BTCPayServer-Docker.")])]),a._v(" "),t("p",[t("strong",[a._v("BTCPay Server can be installed on the following hardware")]),a._v(". The end result is a small, quiet node that is fast enough to sync from block zero. The total cost is approximately $300.")]),a._v(" "),t("ol",[t("li",[t("a",{attrs:{href:"https://www.amazon.com/dp/B0C89TQ1YF?ref=nb_sb_ss_w_as-reorder-t1_k0_1_4&=&crid=SHKYOXZIRAO0&=&sprefix=beel",target:"_blank",rel:"noopener noreferrer"}},[a._v("BeeLink S12 - Mini PC - $169.00"),t("OutboundLink")],1)]),a._v(" "),t("li",[t("a",{attrs:{href:"https://www.amazon.com/Western-Digital-SA510-Internal-Solid/dp/B0C14TF467/ref=sr_1_3?crid=2WDY52E7ESSEB&dib=eyJ2IjoiMSJ9.MBxkb5ZIvwjKXOzscB0GUvsbhX1rVhilXNFzID6n0xHORsDBPkIxQhIixVuiLY9I16rlFs5COExAAD8761Do-tzuAnZiutbqN-KM9rAL4zCw94kA_ArCJeR_RTDynZbiXf2Phnahw1Gw2dqXVek3p0dpe6_a_fbJrqx4BRaieoYo0zj1mX6YPGaYZAmF2Vf_Quk1TrkARk6s1_wZ0vFUw7EWdjKJ9hmNLxPWMfADML90A1rXk8gSCcRnwV2jdzN7jCfg2_urfJZ3IWOW5X3iwnP7s-vSec88PGmQ3RhS-Rc.sEURveFhiTAHYwZQdwyJX72hpWL5UgD_3tEPet747oE&dib_tag=se&keywords=2tb+ssd+wd+blue&qid=1710685725&s=electronics&sprefix=2tb+ssd+wd+blue%2Celectronics%2C90&sr=1-3",target:"_blank",rel:"noopener noreferrer"}},[a._v("WD Blue 2TB SSD - $129.00"),t("OutboundLink")],1)])]),a._v(" "),t("p",[a._v("Other requirements are as follows:")]),a._v(" "),t("ol",[t("li",[a._v("High speed internet connection.")]),a._v(" "),t("li",[a._v("Static IP")]),a._v(" "),t("li",[a._v("Domain Name")]),a._v(" "),t("li",[a._v("Ability to open ports on your router (optional, BTCPayServer can be accessed over TOR or by Dynamic DNS).")]),a._v(" "),t("li",[a._v("Tiny Screwdriver")]),a._v(" "),t("li",[a._v("USB Thumb Drive")]),a._v(" "),t("li",[a._v("USB Keyboard, Mouse and Monitor (for initial install only). Can be headless when completed.")])]),a._v(" "),t("p",[a._v("Assuming you purchased the hardware mentioned above, here are the build instructions.")]),a._v(" "),t("h3",{attrs:{id:"configure-your-domain-name"}},[t("a",{staticClass:"header-anchor",attrs:{href:"#configure-your-domain-name"}},[a._v("#")]),a._v(" Configure your domain name.")]),a._v(" "),t("p",[a._v('It can take several hours for DNS changes to propagate so you should do this step first.\nLogin to your domain registrar and point an A record from your domain to the external IP address of your internet connection.\nI suggest that you use a subdomain (ie. btcpay.yourdomain.com).\nTo find your external IP address Google "whats my ip".')]),a._v(" "),t("h3",{attrs:{id:"assemble-your-lightning-in-a-box-liab"}},[t("a",{staticClass:"header-anchor",attrs:{href:"#assemble-your-lightning-in-a-box-liab"}},[a._v("#")]),a._v(" Assemble your Lightning in a Box (LIAB).")]),a._v(" "),t("ul",[t("li",[a._v("Remove back cover with screwdriver.")]),a._v(" "),t("li",[a._v("Insert SSD")]),a._v(" "),t("li",[a._v("Install hard drive using included cage.")])]),a._v(" "),t("h3",{attrs:{id:"download-ubuntu-2204-lts-server"}},[t("a",{staticClass:"header-anchor",attrs:{href:"#download-ubuntu-2204-lts-server"}},[a._v("#")]),a._v(" Download "),t("a",{attrs:{href:"https://releases.ubuntu.com/jammy/ubuntu-22.04.4-live-server-amd64.iso",target:"_blank",rel:"noopener noreferrer"}},[a._v("Ubuntu 22.04 LTS Server"),t("OutboundLink")],1)]),a._v(" "),t("h3",{attrs:{id:"download-and-install-balena-etcher"}},[t("a",{staticClass:"header-anchor",attrs:{href:"#download-and-install-balena-etcher"}},[a._v("#")]),a._v(" Download and install "),t("a",{attrs:{href:"https://etcher.balena.io/",target:"_blank",rel:"noopener noreferrer"}},[a._v("Balena Etcher"),t("OutboundLink")],1),a._v(".")]),a._v(" "),t("p",[a._v("Etcher is software that is used to flash OS images to SD cards and USB Drives.\nIn this case we will be using Etcher to flash our USB Thumb Drive with the Ubuntu OS.")]),a._v(" "),t("h3",{attrs:{id:"connect-your-usb-keyboard-mouse-monitor-and-thumb-drive"}},[t("a",{staticClass:"header-anchor",attrs:{href:"#connect-your-usb-keyboard-mouse-monitor-and-thumb-drive"}},[a._v("#")]),a._v(" Connect your USB keyboard, mouse, monitor and thumb drive.")]),a._v(" "),t("p",[a._v('Press the power button to boot your LIAB. Press the "DEL" key to access the bios and change the boot order to use the thumb drive first.\nThe Ubuntu installation process is pretty simple and easy to follow. Here\'s a tutorial from the Ubuntu website. '),t("a",{attrs:{href:"https://ubuntu.com/tutorials/install-ubuntu-server#1-overview",target:"_blank",rel:"noopener noreferrer"}},[a._v("Install Ubuntu Server"),t("OutboundLink")],1),a._v(". The BeeLink S12 ships with Windows Pre-Installed so you will have to delete the NVME partitions and install Ubuntu on that drive.")]),a._v(" "),t("p",[a._v('*During the install process make sure you set the hostname to "btcpay" and enable SSH.')]),a._v(" "),t("h3",{attrs:{id:"give-your-liab-a-static-ip-address-on-your-local-network"}},[t("a",{staticClass:"header-anchor",attrs:{href:"#give-your-liab-a-static-ip-address-on-your-local-network"}},[a._v("#")]),a._v(" Give your LIAB a static IP address on your local network.")]),a._v(" "),t("p",[a._v("There are a few different ways to do this and you will find a ton of articles online. Here's a pretty simple one to follow "),t("a",{attrs:{href:"https://www.linuxtechi.com/static-ip-address-on-ubuntu-server/",target:"_blank",rel:"noopener noreferrer"}},[a._v("How to configure a static IP address on Ubuntu 22.04"),t("OutboundLink")],1),a._v('. To avoid conflicts with other devices on your network you should also set a "reservation" for your LIAB.')]),a._v(" "),t("h3",{attrs:{id:"log-into-your-router-and-forward-ports-80-443-and-9735-to-your-liabs-local-ip-address-optional-if-using-local-or-tor-only"}},[t("a",{staticClass:"header-anchor",attrs:{href:"#log-into-your-router-and-forward-ports-80-443-and-9735-to-your-liabs-local-ip-address-optional-if-using-local-or-tor-only"}},[a._v("#")]),a._v(" Log into your router and forward ports 80, 443 and 9735 to your LIAB's local IP address. (optional, if using .local, or Tor only)")]),a._v(" "),t("p",[a._v('Every router is different and you should be able to find instructions for your router by searching for "Port Forward + your router make and model".')]),a._v(" "),t("h3",{attrs:{id:"install-fail2ban-git-and-avahi-daemon"}},[t("a",{staticClass:"header-anchor",attrs:{href:"#install-fail2ban-git-and-avahi-daemon"}},[a._v("#")]),a._v(" Install Fail2ban, GIT and Avahi-Daemon.")]),a._v(" "),t("ul",[t("li",[t("a",{attrs:{href:"https://github.com/fail2ban/fail2ban/wiki/How-to-install-fail2ban-packages",target:"_blank",rel:"noopener noreferrer"}},[a._v("Fail2ban"),t("OutboundLink")],1),a._v(" bans IP's that attempt to connect to your server and show malicious signs. GIT allows you to clone and manage repositories on github.com.")]),a._v(" "),t("li",[t("a",{attrs:{href:"https://avahi.org/",target:"_blank",rel:"noopener noreferrer"}},[a._v("Avahi"),t("OutboundLink")],1),a._v(" is a system which facilitates service discovery on a local network via the mDNS/DNS-SD protocol suite.\nOpen a new terminal window and type the following commands:")])]),a._v(" "),t("div",{staticClass:"language-bash extra-class"},[t("pre",{pre:!0,attrs:{class:"language-bash"}},[t("code",[t("span",{pre:!0,attrs:{class:"token function"}},[a._v("sudo")]),a._v(" "),t("span",{pre:!0,attrs:{class:"token function"}},[a._v("apt")]),a._v(" update\n"),t("span",{pre:!0,attrs:{class:"token function"}},[a._v("sudo")]),a._v(" "),t("span",{pre:!0,attrs:{class:"token function"}},[a._v("apt")]),a._v(" "),t("span",{pre:!0,attrs:{class:"token function"}},[a._v("install")]),a._v(" "),t("span",{pre:!0,attrs:{class:"token parameter variable"}},[a._v("-y")]),a._v(" fail2ban "),t("span",{pre:!0,attrs:{class:"token function"}},[a._v("git")]),a._v(" avahi-daemon\n")])])]),t("h3",{attrs:{id:"configuring-the-firewall"}},[t("a",{staticClass:"header-anchor",attrs:{href:"#configuring-the-firewall"}},[a._v("#")]),a._v(" Configuring the firewall")]),a._v(" "),t("p",[a._v("Install a firewall and allow SSH, HTTP, HTTPS, Bitcoin, and Lightning:")]),a._v(" "),t("div",{staticClass:"language-bash extra-class"},[t("pre",{pre:!0,attrs:{class:"language-bash"}},[t("code",[t("span",{pre:!0,attrs:{class:"token function"}},[a._v("apt")]),a._v(" "),t("span",{pre:!0,attrs:{class:"token function"}},[a._v("install")]),a._v(" "),t("span",{pre:!0,attrs:{class:"token parameter variable"}},[a._v("-y")]),a._v(" ufw\nufw default deny incoming\nufw default allow outgoing\n")])])]),t("p",[a._v("This command allows SSH connections from internal networks only:")]),a._v(" "),t("div",{staticClass:"language-bash extra-class"},[t("pre",{pre:!0,attrs:{class:"language-bash"}},[t("code",[a._v("ufw allow from "),t("span",{pre:!0,attrs:{class:"token number"}},[a._v("10.0")]),a._v(".0.0/8 to any port "),t("span",{pre:!0,attrs:{class:"token number"}},[a._v("22")]),a._v(" proto tcp\nufw allow from "),t("span",{pre:!0,attrs:{class:"token number"}},[a._v("172.16")]),a._v(".0.0/12 to any port "),t("span",{pre:!0,attrs:{class:"token number"}},[a._v("22")]),a._v(" proto tcp\nufw allow from "),t("span",{pre:!0,attrs:{class:"token number"}},[a._v("192.168")]),a._v(".0.0/16 to any port "),t("span",{pre:!0,attrs:{class:"token number"}},[a._v("22")]),a._v(" proto tcp\nufw allow from "),t("span",{pre:!0,attrs:{class:"token number"}},[a._v("169.254")]),a._v(".0.0/16 to any port "),t("span",{pre:!0,attrs:{class:"token number"}},[a._v("22")]),a._v(" proto tcp\nufw allow from fc00::/7 to any port "),t("span",{pre:!0,attrs:{class:"token number"}},[a._v("22")]),a._v(" proto tcp\nufw allow from fe80::/10 to any port "),t("span",{pre:!0,attrs:{class:"token number"}},[a._v("22")]),a._v(" proto tcp\nufw allow from ff00::/8 to any port "),t("span",{pre:!0,attrs:{class:"token number"}},[a._v("22")]),a._v(" proto tcp\n")])])]),t("p",[a._v("These ports need to be accessible from anywhere (The default subnet is 'any' unless you specify one):")]),a._v(" "),t("div",{staticClass:"language-bash extra-class"},[t("pre",{pre:!0,attrs:{class:"language-bash"}},[t("code",[a._v("ufw allow "),t("span",{pre:!0,attrs:{class:"token number"}},[a._v("80")]),a._v("/tcp\nufw allow "),t("span",{pre:!0,attrs:{class:"token number"}},[a._v("443")]),a._v("/tcp\nufw allow "),t("span",{pre:!0,attrs:{class:"token number"}},[a._v("8333")]),a._v("/tcp\nufw allow "),t("span",{pre:!0,attrs:{class:"token number"}},[a._v("9735")]),a._v("/tcp\n\n"),t("span",{pre:!0,attrs:{class:"token comment"}},[a._v("# Enable the firewall")]),a._v("\nufw "),t("span",{pre:!0,attrs:{class:"token builtin class-name"}},[a._v("enable")]),a._v("\n\n"),t("span",{pre:!0,attrs:{class:"token comment"}},[a._v("# Verify the configuration")]),a._v("\nufw status\n")])])]),t("h3",{attrs:{id:"install-docker"}},[t("a",{staticClass:"header-anchor",attrs:{href:"#install-docker"}},[a._v("#")]),a._v(" Install Docker")]),a._v(" "),t("div",{staticClass:"language-Bash extra-class"},[t("pre",{pre:!0,attrs:{class:"language-bash"}},[t("code",[t("span",{pre:!0,attrs:{class:"token function"}},[a._v("sudo")]),a._v(" "),t("span",{pre:!0,attrs:{class:"token function"}},[a._v("apt")]),a._v(" "),t("span",{pre:!0,attrs:{class:"token function"}},[a._v("install")]),a._v(" apt-transport-https ca-certificates "),t("span",{pre:!0,attrs:{class:"token function"}},[a._v("curl")]),a._v(" software-properties-common\n"),t("span",{pre:!0,attrs:{class:"token function"}},[a._v("curl")]),a._v(" "),t("span",{pre:!0,attrs:{class:"token parameter variable"}},[a._v("-fsSL")]),a._v(" https://download.docker.com/linux/ubuntu/gpg "),t("span",{pre:!0,attrs:{class:"token operator"}},[a._v("|")]),a._v(" "),t("span",{pre:!0,attrs:{class:"token function"}},[a._v("sudo")]),a._v(" gpg "),t("span",{pre:!0,attrs:{class:"token parameter variable"}},[a._v("--dearmor")]),a._v(" "),t("span",{pre:!0,attrs:{class:"token parameter variable"}},[a._v("-o")]),a._v(" /usr/share/keyrings/docker-archive-keyring.gpg\n"),t("span",{pre:!0,attrs:{class:"token builtin class-name"}},[a._v("echo")]),a._v(" "),t("span",{pre:!0,attrs:{class:"token string"}},[a._v('"deb [arch='),t("span",{pre:!0,attrs:{class:"token variable"}},[t("span",{pre:!0,attrs:{class:"token variable"}},[a._v("$(")]),a._v("dpkg --print-architecture"),t("span",{pre:!0,attrs:{class:"token variable"}},[a._v(")")])]),a._v(" signed-by=/usr/share/keyrings/docker-archive-keyring.gpg] https://download.docker.com/linux/ubuntu "),t("span",{pre:!0,attrs:{class:"token variable"}},[t("span",{pre:!0,attrs:{class:"token variable"}},[a._v("$(")]),a._v("lsb_release "),t("span",{pre:!0,attrs:{class:"token parameter variable"}},[a._v("-cs")]),t("span",{pre:!0,attrs:{class:"token variable"}},[a._v(")")])]),a._v(' stable"')]),a._v(" "),t("span",{pre:!0,attrs:{class:"token operator"}},[a._v("|")]),a._v(" "),t("span",{pre:!0,attrs:{class:"token function"}},[a._v("sudo")]),a._v(" "),t("span",{pre:!0,attrs:{class:"token function"}},[a._v("tee")]),a._v(" /etc/apt/sources.list.d/docker.list "),t("span",{pre:!0,attrs:{class:"token operator"}},[a._v(">")]),a._v(" /dev/null\n"),t("span",{pre:!0,attrs:{class:"token function"}},[a._v("sudo")]),a._v(" "),t("span",{pre:!0,attrs:{class:"token function"}},[a._v("apt")]),a._v(" update\n"),t("span",{pre:!0,attrs:{class:"token function"}},[a._v("apt-cache")]),a._v(" policy docker-ce\n"),t("span",{pre:!0,attrs:{class:"token function"}},[a._v("sudo")]),a._v(" "),t("span",{pre:!0,attrs:{class:"token function"}},[a._v("apt")]),a._v(" "),t("span",{pre:!0,attrs:{class:"token function"}},[a._v("install")]),a._v(" docker-ce\n"),t("span",{pre:!0,attrs:{class:"token function"}},[a._v("sudo")]),a._v(" systemctl status "),t("span",{pre:!0,attrs:{class:"token function"}},[a._v("docker")]),a._v("\n")])])]),t("h3",{attrs:{id:"configuring-the-storage"}},[t("a",{staticClass:"header-anchor",attrs:{href:"#configuring-the-storage"}},[a._v("#")]),a._v(" Configuring the storage")]),a._v(" "),t("div",{staticClass:"language-bash extra-class"},[t("pre",{pre:!0,attrs:{class:"language-bash"}},[t("code",[t("span",{pre:!0,attrs:{class:"token function"}},[a._v("fdisk")]),a._v(" /dev/sda\n"),t("span",{pre:!0,attrs:{class:"token comment"}},[a._v("# type 'p' to list existing partitions")]),a._v("\n"),t("span",{pre:!0,attrs:{class:"token comment"}},[a._v("# type 'd' to delete currently selected partitions")]),a._v("\n"),t("span",{pre:!0,attrs:{class:"token comment"}},[a._v("# type 'n' to create a new partition")]),a._v("\n"),t("span",{pre:!0,attrs:{class:"token comment"}},[a._v("# type 'w' to write the new partition table and exit fdisk")]),a._v("\nmkfs.ext4 /dev/sda1\n"),t("span",{pre:!0,attrs:{class:"token function"}},[a._v("mkdir")]),a._v(" /mnt/usb\n"),t("span",{pre:!0,attrs:{class:"token assign-left variable"}},[a._v("UUID")]),t("span",{pre:!0,attrs:{class:"token operator"}},[a._v("=")]),t("span",{pre:!0,attrs:{class:"token string"}},[a._v('"'),t("span",{pre:!0,attrs:{class:"token variable"}},[t("span",{pre:!0,attrs:{class:"token variable"}},[a._v("$(")]),t("span",{pre:!0,attrs:{class:"token function"}},[a._v("sudo")]),a._v(" blkid "),t("span",{pre:!0,attrs:{class:"token parameter variable"}},[a._v("-s")]),a._v(" UUID "),t("span",{pre:!0,attrs:{class:"token parameter variable"}},[a._v("-o")]),a._v(" value /dev/sda1"),t("span",{pre:!0,attrs:{class:"token variable"}},[a._v(")")])]),a._v('"')]),a._v("\n"),t("span",{pre:!0,attrs:{class:"token builtin class-name"}},[a._v("echo")]),a._v(" "),t("span",{pre:!0,attrs:{class:"token string"}},[a._v('"UUID='),t("span",{pre:!0,attrs:{class:"token variable"}},[a._v("$UUID")]),a._v(' /mnt/usb ext4 defaults,noatime,nofail 0 0"')]),a._v(" "),t("span",{pre:!0,attrs:{class:"token operator"}},[a._v("|")]),a._v(" "),t("span",{pre:!0,attrs:{class:"token function"}},[a._v("sudo")]),a._v(" "),t("span",{pre:!0,attrs:{class:"token function"}},[a._v("tee")]),a._v(" "),t("span",{pre:!0,attrs:{class:"token parameter variable"}},[a._v("-a")]),a._v(" /etc/fstab\n"),t("span",{pre:!0,attrs:{class:"token function"}},[a._v("mount")]),a._v(" "),t("span",{pre:!0,attrs:{class:"token parameter variable"}},[a._v("-a")]),a._v("\n")])])]),t("h3",{attrs:{id:"create-mount-for-docker-volumes"}},[t("a",{staticClass:"header-anchor",attrs:{href:"#create-mount-for-docker-volumes"}},[a._v("#")]),a._v(" Create mount for Docker volumes")]),a._v(" "),t("div",{staticClass:"language-bash extra-class"},[t("pre",{pre:!0,attrs:{class:"language-bash"}},[t("code",[t("span",{pre:!0,attrs:{class:"token function"}},[a._v("rm")]),a._v(" "),t("span",{pre:!0,attrs:{class:"token parameter variable"}},[a._v("-rf")]),a._v(" /var/lib/docker\n"),t("span",{pre:!0,attrs:{class:"token function"}},[a._v("mkdir")]),a._v(" "),t("span",{pre:!0,attrs:{class:"token parameter variable"}},[a._v("-p")]),a._v(" /var/lib/docker\n"),t("span",{pre:!0,attrs:{class:"token function"}},[a._v("mount")]),a._v(" "),t("span",{pre:!0,attrs:{class:"token parameter variable"}},[a._v("--bind")]),a._v(" /mnt/usb /var/lib/docker\n"),t("span",{pre:!0,attrs:{class:"token builtin class-name"}},[a._v("echo")]),a._v(" "),t("span",{pre:!0,attrs:{class:"token string"}},[a._v('"/mnt/docker /var/lib/docker none bind,nobootwait 0 2"')]),a._v(" "),t("span",{pre:!0,attrs:{class:"token operator"}},[a._v(">>")]),a._v(" /etc/fstab\nsystemctl restart "),t("span",{pre:!0,attrs:{class:"token function"}},[a._v("docker")]),a._v("\n")])])]),t("h3",{attrs:{id:"setup-btcpay-server"}},[t("a",{staticClass:"header-anchor",attrs:{href:"#setup-btcpay-server"}},[a._v("#")]),a._v(" Setup BTCPay Server")]),a._v(" "),t("p",[a._v("Download BTCPay Server from GitHub:")]),a._v(" "),t("div",{staticClass:"language-bash extra-class"},[t("pre",{pre:!0,attrs:{class:"language-bash"}},[t("code",[t("span",{pre:!0,attrs:{class:"token builtin class-name"}},[a._v("cd")]),a._v(" "),t("span",{pre:!0,attrs:{class:"token comment"}},[a._v("# ensure we are in root home")]),a._v("\n"),t("span",{pre:!0,attrs:{class:"token function"}},[a._v("apt")]),a._v(" "),t("span",{pre:!0,attrs:{class:"token function"}},[a._v("install")]),a._v(" "),t("span",{pre:!0,attrs:{class:"token parameter variable"}},[a._v("-y")]),a._v(" fail2ban "),t("span",{pre:!0,attrs:{class:"token function"}},[a._v("git")]),a._v("\n"),t("span",{pre:!0,attrs:{class:"token function"}},[a._v("git")]),a._v(" clone https://github.com/btcpayserver/btcpayserver-docker\n"),t("span",{pre:!0,attrs:{class:"token builtin class-name"}},[a._v("cd")]),a._v(" btcpayserver-docker\n")])])]),t("p",[a._v("Configure BTCPay by setting some "),t("a",{attrs:{href:"https://github.com/btcpayserver/btcpayserver-docker#environment-variables",target:"_blank",rel:"noopener noreferrer"}},[a._v("environment variables"),t("OutboundLink")],1),a._v(":")]),a._v(" "),t("div",{staticClass:"language-bash extra-class"},[t("pre",{pre:!0,attrs:{class:"language-bash"}},[t("code",[t("span",{pre:!0,attrs:{class:"token builtin class-name"}},[a._v("export")]),a._v(" "),t("span",{pre:!0,attrs:{class:"token assign-left variable"}},[a._v("BTCPAY_HOST")]),t("span",{pre:!0,attrs:{class:"token operator"}},[a._v("=")]),t("span",{pre:!0,attrs:{class:"token string"}},[a._v('"btcpay.local"')]),a._v("\n"),t("span",{pre:!0,attrs:{class:"token builtin class-name"}},[a._v("export")]),a._v(" "),t("span",{pre:!0,attrs:{class:"token assign-left variable"}},[a._v("REVERSEPROXY_DEFAULT_HOST")]),t("span",{pre:!0,attrs:{class:"token operator"}},[a._v("=")]),t("span",{pre:!0,attrs:{class:"token string"}},[a._v('"'),t("span",{pre:!0,attrs:{class:"token variable"}},[a._v("$BTCPAY_HOST")]),a._v('"')]),a._v("\n"),t("span",{pre:!0,attrs:{class:"token builtin class-name"}},[a._v("export")]),a._v(" "),t("span",{pre:!0,attrs:{class:"token assign-left variable"}},[a._v("NBITCOIN_NETWORK")]),t("span",{pre:!0,attrs:{class:"token operator"}},[a._v("=")]),t("span",{pre:!0,attrs:{class:"token string"}},[a._v('"mainnet"')]),a._v("\n"),t("span",{pre:!0,attrs:{class:"token builtin class-name"}},[a._v("export")]),a._v(" "),t("span",{pre:!0,attrs:{class:"token assign-left variable"}},[a._v("BTCPAYGEN_CRYPTO1")]),t("span",{pre:!0,attrs:{class:"token operator"}},[a._v("=")]),t("span",{pre:!0,attrs:{class:"token string"}},[a._v('"btc"')]),a._v("\n"),t("span",{pre:!0,attrs:{class:"token builtin class-name"}},[a._v("export")]),a._v(" "),t("span",{pre:!0,attrs:{class:"token assign-left variable"}},[a._v("BTCPAYGEN_LIGHTNING")]),t("span",{pre:!0,attrs:{class:"token operator"}},[a._v("=")]),t("span",{pre:!0,attrs:{class:"token string"}},[a._v('"clightning"')]),a._v("\n"),t("span",{pre:!0,attrs:{class:"token builtin class-name"}},[a._v("export")]),a._v(" "),t("span",{pre:!0,attrs:{class:"token assign-left variable"}},[a._v("BTCPAYGEN_REVERSEPROXY")]),t("span",{pre:!0,attrs:{class:"token operator"}},[a._v("=")]),t("span",{pre:!0,attrs:{class:"token string"}},[a._v('"nginx"')]),a._v("\n"),t("span",{pre:!0,attrs:{class:"token builtin class-name"}},[a._v("export")]),a._v(" "),t("span",{pre:!0,attrs:{class:"token assign-left variable"}},[a._v("BTCPAY_ENABLE_SSH")]),t("span",{pre:!0,attrs:{class:"token operator"}},[a._v("=")]),a._v("true\n")])])]),t("p",[a._v("If you want to use multiple hostnames, add them via the optional "),t("code",[a._v("BTCPAY_ADDITIONAL_HOSTS")]),a._v(" variable:")]),a._v(" "),t("div",{staticClass:"language-bash extra-class"},[t("pre",{pre:!0,attrs:{class:"language-bash"}},[t("code",[t("span",{pre:!0,attrs:{class:"token builtin class-name"}},[a._v("export")]),a._v(" "),t("span",{pre:!0,attrs:{class:"token assign-left variable"}},[a._v("BTCPAY_ADDITIONAL_HOSTS")]),t("span",{pre:!0,attrs:{class:"token operator"}},[a._v("=")]),t("span",{pre:!0,attrs:{class:"token string"}},[a._v('"btcpay.YourDomain.com"')]),a._v("\n")])])]),t("p",[a._v("In case you want to restrict access to your local network only, please note that you need to use a "),t("code",[a._v(".local")]),a._v(" domain.")]),a._v(" "),t("p",[a._v("Run the BTCPay installation:")]),a._v(" "),t("div",{staticClass:"language-bash extra-class"},[t("pre",{pre:!0,attrs:{class:"language-bash"}},[t("code",[t("span",{pre:!0,attrs:{class:"token builtin class-name"}},[a._v(".")]),a._v(" ./btcpay-setup.sh "),t("span",{pre:!0,attrs:{class:"token parameter variable"}},[a._v("-i")]),a._v("\n")])])]),t("p",[a._v("It should be up and running within a few minutes. Try opening http://btcpay.local in your web browser. If everything is correct, you will see BTCPay Server front page.")]),a._v(" "),t("p",[a._v("Now, you just need to wait a day or so for the Bitcoin blockchain to "),t("RouterLink",{attrs:{to:"/FAQ/Synchronization/"}},[a._v("sync and full verify")]),a._v(". The bottom of the BTCPay Server web GUI will show a pop-up dialog box to monitor the progress.")],1),a._v(" "),t("h3",{attrs:{id:"fastsync-optional"}},[t("a",{staticClass:"header-anchor",attrs:{href:"#fastsync-optional"}},[a._v("#")]),a._v(" FastSync (optional)")]),a._v(" "),t("p",[a._v("Please read very carefully to understand what "),t("RouterLink",{attrs:{to:"/Docker/fastsync/"}},[a._v("FastSync")]),a._v(" is and why it is important to verify the UTXO set yourself.")],1),a._v(" "),t("p",[a._v("By using FastSync, you are exposing yourself to attacks if a "),t("a",{attrs:{href:"https://github.com/btcpayserver/btcpayserver-docker/blob/master/contrib/FastSync/README.md#what-are-the-downsides-of-fast-sync",target:"_blank",rel:"noopener noreferrer"}},[a._v("malicious UTXO set snapshot"),t("OutboundLink")],1),a._v(" is sent to you.\nIf you have another trusted node somewhere else, you can check the validity of the UTXO set gathered by FastSync by following "),t("a",{attrs:{href:"https://github.com/btcpayserver/btcpayserver-docker/blob/master/contrib/FastSync/README.md#dont-trust-verify",target:"_blank",rel:"noopener noreferrer"}},[a._v("these instructions"),t("OutboundLink")],1),a._v(".")]),a._v(" "),t("div",{staticClass:"language-bash extra-class"},[t("pre",{pre:!0,attrs:{class:"language-bash"}},[t("code",[t("span",{pre:!0,attrs:{class:"token comment"}},[a._v("# Stop BTCPay Server")]),a._v("\n"),t("span",{pre:!0,attrs:{class:"token builtin class-name"}},[a._v("cd")]),a._v(" /root/btcpayserver/btcpayserver-docker\n./btcpay-down.sh\n\n"),t("span",{pre:!0,attrs:{class:"token comment"}},[a._v("# Import FastSync UTXO set")]),a._v("\n"),t("span",{pre:!0,attrs:{class:"token builtin class-name"}},[a._v("cd")]),a._v(" contrib/FastSync\n./load-utxo-set.sh\n")])])]),t("p",[a._v("FastSync currently takes about 30 minutes on a high-speed internet connection.\nAfter FastSync finishes, run the following command to restart BTCPay Server:")]),a._v(" "),t("div",{staticClass:"language-bash extra-class"},[t("pre",{pre:!0,attrs:{class:"language-bash"}},[t("code",[t("span",{pre:!0,attrs:{class:"token builtin class-name"}},[a._v("cd")]),a._v(" "),t("span",{pre:!0,attrs:{class:"token punctuation"}},[a._v("..")]),a._v("/"),t("span",{pre:!0,attrs:{class:"token punctuation"}},[a._v("..")]),a._v("\n./btcpay-up.sh\n")])])])])}),[],!1,null,null,null);t.default=r.exports}}]); \ No newline at end of file diff --git a/assets/js/118.648cded5.js b/assets/js/118.f213ede1.js similarity index 99% rename from assets/js/118.648cded5.js rename to assets/js/118.f213ede1.js index 733d0c1a23..f8bbb5fd26 100644 --- a/assets/js/118.648cded5.js +++ b/assets/js/118.f213ede1.js @@ -1 +1 @@ -(window.webpackJsonp=window.webpackJsonp||[]).push([[118],{764:function(t,s,a){"use strict";a.r(s);var e=a(10),n=Object(e.a)({},(function(){var t=this,s=t._self._c;return s("ContentSlotsDistributor",{attrs:{"slot-key":t.$parent.slotKey}},[s("h1",{attrs:{id:"reverse-proxy-to-tor"}},[s("a",{staticClass:"header-anchor",attrs:{href:"#reverse-proxy-to-tor"}},[t._v("#")]),t._v(" Reverse proxy to Tor")]),t._v(" "),s("h2",{attrs:{id:"advantages"}},[s("a",{staticClass:"header-anchor",attrs:{href:"#advantages"}},[t._v("#")]),t._v(" Advantages")]),t._v(" "),s("ul",[s("li",[t._v("no port forwarding needed on the LAN of the host")]),t._v(" "),s("li",[t._v("encrypted connection")]),t._v(" "),s("li",[t._v("hides the IP of the host")])]),t._v(" "),s("h2",{attrs:{id:"requirements"}},[s("a",{staticClass:"header-anchor",attrs:{href:"#requirements"}},[t._v("#")]),t._v(" Requirements")]),t._v(" "),s("ul",[s("li",[t._v("a Virtual Private Server (VPS) - eg. a minimal package on Lunanode for ~3.5$/month")]),t._v(" "),s("li",[t._v("root access on the VPS - you need to set up webserver and install packages")]),t._v(" "),s("li",[t._v("a domain or subdomain - this will be setup on the proxy webserver")])]),t._v(" "),s("p",[t._v("Get the Tor "),s("code",[t._v(".onion")]),t._v(" address of your BTCPay Server via the "),s("code",[t._v("Server settings > Services")]),t._v(' page.\nSee information in the "HTTP-based TOR hidden services" section.')]),t._v(" "),s("p",[t._v("Note: There is also a "),s("a",{attrs:{href:"#do-all-this-in-a-docker-container"}},[t._v("Docker version")]),t._v(" of this setup.")]),t._v(" "),s("h2",{attrs:{id:"vps-setup"}},[s("a",{staticClass:"header-anchor",attrs:{href:"#vps-setup"}},[t._v("#")]),t._v(" VPS Setup")]),t._v(" "),s("p",[t._v("You will create a nginx reverse proxy and a "),s("code",[t._v("socat")]),t._v(" service, which forwards requests to your BTCPay Server.")]),t._v(" "),s("p",[t._v("Login as root and install the required dependencies: (example assumes a Debian based system)")]),t._v(" "),s("div",{staticClass:"language-bash extra-class"},[s("pre",{pre:!0,attrs:{class:"language-bash"}},[s("code",[s("span",{pre:!0,attrs:{class:"token comment"}},[t._v("# switch to root user (if not logged in as root)")]),t._v("\n"),s("span",{pre:!0,attrs:{class:"token function"}},[t._v("sudo")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token function"}},[t._v("su")]),t._v(" -\n\n"),s("span",{pre:!0,attrs:{class:"token comment"}},[t._v("# install dependencies")]),t._v("\n"),s("span",{pre:!0,attrs:{class:"token function"}},[t._v("apt")]),t._v(" update\n"),s("span",{pre:!0,attrs:{class:"token function"}},[t._v("apt")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token function"}},[t._v("install")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token parameter variable"}},[t._v("-y")]),t._v(" certbot nginx socat tor\n")])])]),s("h3",{attrs:{id:"socat-setup"}},[s("a",{staticClass:"header-anchor",attrs:{href:"#socat-setup"}},[t._v("#")]),t._v(" Socat setup")]),t._v(" "),s("p",[t._v("Create the service file "),s("code",[t._v("/etc/systemd/system/http-to-socks-proxy@.service")]),t._v(":")]),t._v(" "),s("div",{staticClass:"language-ini extra-class"},[s("pre",{pre:!0,attrs:{class:"language-ini"}},[s("code",[s("span",{pre:!0,attrs:{class:"token section"}},[s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("[")]),s("span",{pre:!0,attrs:{class:"token section-name selector"}},[t._v("Unit")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("]")])]),t._v("\n"),s("span",{pre:!0,attrs:{class:"token key attr-name"}},[t._v("Description")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("=")]),s("span",{pre:!0,attrs:{class:"token value attr-value"}},[t._v("HTTP-to-SOCKS proxy")]),t._v("\n"),s("span",{pre:!0,attrs:{class:"token key attr-name"}},[t._v("After")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("=")]),s("span",{pre:!0,attrs:{class:"token value attr-value"}},[t._v("network.target")]),t._v("\n\n"),s("span",{pre:!0,attrs:{class:"token section"}},[s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("[")]),s("span",{pre:!0,attrs:{class:"token section-name selector"}},[t._v("Service")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("]")])]),t._v("\n"),s("span",{pre:!0,attrs:{class:"token key attr-name"}},[t._v("EnvironmentFile")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("=")]),s("span",{pre:!0,attrs:{class:"token value attr-value"}},[t._v("/etc/http-to-socks-proxy/%i.conf")]),t._v("\n"),s("span",{pre:!0,attrs:{class:"token key attr-name"}},[t._v("ExecStart")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("=")]),s("span",{pre:!0,attrs:{class:"token value attr-value"}},[t._v("/usr/bin/socat tcp4-LISTEN:${LOCAL_PORT},reuseaddr,fork,keepalive,bind=127.0.0.1 SOCKS4A:${PROXY_HOST}:${REMOTE_HOST}:${REMOTE_PORT},socksport=${PROXY_PORT}")]),t._v("\n\n"),s("span",{pre:!0,attrs:{class:"token section"}},[s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("[")]),s("span",{pre:!0,attrs:{class:"token section-name selector"}},[t._v("Install")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("]")])]),t._v("\n"),s("span",{pre:!0,attrs:{class:"token key attr-name"}},[t._v("WantedBy")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("=")]),s("span",{pre:!0,attrs:{class:"token value attr-value"}},[t._v("multi-user.target")]),t._v("\n")])])]),s("p",[t._v("Create the configuration for the service in "),s("code",[t._v("/etc/http-to-socks-proxy/btcpayserver.conf")]),t._v(":")]),t._v(" "),s("div",{staticClass:"language-bash extra-class"},[s("pre",{pre:!0,attrs:{class:"language-bash"}},[s("code",[s("span",{pre:!0,attrs:{class:"token comment"}},[t._v("# create the directory")]),t._v("\n"),s("span",{pre:!0,attrs:{class:"token function"}},[t._v("mkdir")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token parameter variable"}},[t._v("-p")]),t._v(" /etc/http-to-socks-proxy/\n\n"),s("span",{pre:!0,attrs:{class:"token comment"}},[t._v("# create the file with the content below")]),t._v("\n"),s("span",{pre:!0,attrs:{class:"token function"}},[t._v("nano")]),t._v(" /etc/http-to-socks-proxy/btcpayserver.conf\n")])])]),s("p",[t._v("Replace the "),s("code",[t._v("REMOTE_HOST")]),t._v(" and adapt the ports if needed:")]),t._v(" "),s("div",{staticClass:"language-conf extra-class"},[s("pre",{pre:!0,attrs:{class:"language-text"}},[s("code",[t._v("PROXY_HOST=127.0.0.1\nPROXY_PORT=9050\nLOCAL_PORT=9081\nREMOTE_HOST=heregoesthebtcpayserverhiddenserviceaddress.onion\nREMOTE_PORT=80\n")])])]),s("p",[t._v("Create a symlink in "),s("code",[t._v("/etc/systemd/system/multi-user.target.wants")]),t._v(" to enable the service and start it:")]),t._v(" "),s("div",{staticClass:"language-bash extra-class"},[s("pre",{pre:!0,attrs:{class:"language-bash"}},[s("code",[s("span",{pre:!0,attrs:{class:"token comment"}},[t._v("# enable")]),t._v("\n"),s("span",{pre:!0,attrs:{class:"token function"}},[t._v("ln")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token parameter variable"}},[t._v("-s")]),t._v(" /etc/systemd/system/http-to-socks-proxy"),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("\\")]),t._v("@.service /etc/systemd/system/multi-user.target.wants/http-to-socks-proxy"),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("\\")]),t._v("@btcpayserver.service\n\n"),s("span",{pre:!0,attrs:{class:"token comment"}},[t._v("# start")]),t._v("\nsystemctl start http-to-socks-proxy@btcpayserver\n\n"),s("span",{pre:!0,attrs:{class:"token comment"}},[t._v("# check service status")]),t._v("\nsystemctl status http-to-socks-proxy@btcpayserver\n\n"),s("span",{pre:!0,attrs:{class:"token comment"}},[t._v("# check if tunnel is active")]),t._v("\n"),s("span",{pre:!0,attrs:{class:"token function"}},[t._v("netstat")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token parameter variable"}},[t._v("-tulpn")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token operator"}},[t._v("|")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token function"}},[t._v("grep")]),t._v(" socat\n"),s("span",{pre:!0,attrs:{class:"token comment"}},[t._v("# should give something like this:")]),t._v("\n"),s("span",{pre:!0,attrs:{class:"token comment"}},[t._v("# tcp 0 0 127.0.0.1:9081 0.0.0.0:* LISTEN 951/socat")]),t._v("\n")])])]),s("h3",{attrs:{id:"webserver-setup"}},[s("a",{staticClass:"header-anchor",attrs:{href:"#webserver-setup"}},[t._v("#")]),t._v(" Webserver setup")]),t._v(" "),s("h4",{attrs:{id:"point-domain-to-the-vps"}},[s("a",{staticClass:"header-anchor",attrs:{href:"#point-domain-to-the-vps"}},[t._v("#")]),t._v(" Point domain to the VPS")]),t._v(" "),s("p",[t._v("Create the A record on the DNS server of your domain/subdomain and point it to your VPS IP address.")]),t._v(" "),s("h4",{attrs:{id:"prepare-ssl-and-lets-encrypt"}},[s("a",{staticClass:"header-anchor",attrs:{href:"#prepare-ssl-and-lets-encrypt"}},[t._v("#")]),t._v(" Prepare SSL and Let's Encrypt")]),t._v(" "),s("div",{staticClass:"language-bash extra-class"},[s("pre",{pre:!0,attrs:{class:"language-bash"}},[s("code",[s("span",{pre:!0,attrs:{class:"token comment"}},[t._v("# generate 4096 bit DH params to strengthen the security, may take a while")]),t._v("\nopenssl dhparam "),s("span",{pre:!0,attrs:{class:"token parameter variable"}},[t._v("-out")]),t._v(" /etc/ssl/certs/dhparam.pem "),s("span",{pre:!0,attrs:{class:"token number"}},[t._v("4096")]),t._v("\n\n"),s("span",{pre:!0,attrs:{class:"token comment"}},[t._v("# create directory for Let's Encrypt files")]),t._v("\n"),s("span",{pre:!0,attrs:{class:"token function"}},[t._v("mkdir")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token parameter variable"}},[t._v("-p")]),t._v(" /var/lib/letsencrypt/.well-known\n"),s("span",{pre:!0,attrs:{class:"token function"}},[t._v("chgrp")]),t._v(" www-data /var/lib/letsencrypt\n"),s("span",{pre:!0,attrs:{class:"token function"}},[t._v("chmod")]),t._v(" g+s /var/lib/letsencrypt\n")])])]),s("h4",{attrs:{id:"nginx-configuration-http"}},[s("a",{staticClass:"header-anchor",attrs:{href:"#nginx-configuration-http"}},[t._v("#")]),t._v(" nginx configuration: http")]),t._v(" "),s("p",[t._v("Create a variable mapping to forward the correct protocol setting and check if the Upgrade header is sent by the client, e.g. "),s("code",[t._v("/etc/nginx/conf.d/map.conf")]),t._v(":")]),t._v(" "),s("div",{staticClass:"language-nginx extra-class"},[s("pre",{pre:!0,attrs:{class:"language-nginx"}},[s("code",[s("span",{pre:!0,attrs:{class:"token directive"}},[s("span",{pre:!0,attrs:{class:"token keyword"}},[t._v("map")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token variable"}},[t._v("$http_x_forwarded_proto")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token variable"}},[t._v("$proxy_x_forwarded_proto")])]),t._v(" "),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("{")]),t._v("\n "),s("span",{pre:!0,attrs:{class:"token directive"}},[s("span",{pre:!0,attrs:{class:"token keyword"}},[t._v("default")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token variable"}},[t._v("$http_x_forwarded_proto")])]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(";")]),t._v("\n '' $scheme"),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(";")]),t._v("\n"),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("}")]),t._v("\n\n"),s("span",{pre:!0,attrs:{class:"token directive"}},[s("span",{pre:!0,attrs:{class:"token keyword"}},[t._v("map")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token variable"}},[t._v("$http_upgrade")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token variable"}},[t._v("$connection_upgrade")])]),t._v(" "),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("{")]),t._v("\n "),s("span",{pre:!0,attrs:{class:"token directive"}},[s("span",{pre:!0,attrs:{class:"token keyword"}},[t._v("default")]),t._v(" upgrade")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(";")]),t._v("\n '' "),s("span",{pre:!0,attrs:{class:"token directive"}},[s("span",{pre:!0,attrs:{class:"token keyword"}},[t._v("close")])]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(";")]),t._v("\n"),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("}")]),t._v("\n")])])]),s("p",[t._v("Create a config file for the domain, e.g. "),s("code",[t._v("/etc/nginx/sites-available/btcpayserver.conf")]),t._v(":")]),t._v(" "),s("div",{staticClass:"language-nginx extra-class"},[s("pre",{pre:!0,attrs:{class:"language-nginx"}},[s("code",[s("span",{pre:!0,attrs:{class:"token directive"}},[s("span",{pre:!0,attrs:{class:"token keyword"}},[t._v("server")])]),t._v(" "),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("{")]),t._v("\n "),s("span",{pre:!0,attrs:{class:"token directive"}},[s("span",{pre:!0,attrs:{class:"token keyword"}},[t._v("listen")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token number"}},[t._v("80")])]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(";")]),t._v("\n "),s("span",{pre:!0,attrs:{class:"token directive"}},[s("span",{pre:!0,attrs:{class:"token keyword"}},[t._v("server_name")]),t._v(" btcpayserver.mydomain.com")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(";")]),t._v("\n\n "),s("span",{pre:!0,attrs:{class:"token comment"}},[t._v("# Let's Encrypt verification requests")]),t._v("\n "),s("span",{pre:!0,attrs:{class:"token directive"}},[s("span",{pre:!0,attrs:{class:"token keyword"}},[t._v("location")]),t._v(" ^~ /.well-known/acme-challenge/")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("{")]),t._v("\n "),s("span",{pre:!0,attrs:{class:"token directive"}},[s("span",{pre:!0,attrs:{class:"token keyword"}},[t._v("allow")]),t._v(" all")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(";")]),t._v("\n "),s("span",{pre:!0,attrs:{class:"token directive"}},[s("span",{pre:!0,attrs:{class:"token keyword"}},[t._v("root")]),t._v(" /var/lib/letsencrypt/")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(";")]),t._v("\n "),s("span",{pre:!0,attrs:{class:"token directive"}},[s("span",{pre:!0,attrs:{class:"token keyword"}},[t._v("default_type")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token string"}},[t._v('"text/plain"')])]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(";")]),t._v("\n "),s("span",{pre:!0,attrs:{class:"token directive"}},[s("span",{pre:!0,attrs:{class:"token keyword"}},[t._v("try_files")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token variable"}},[t._v("$uri")]),t._v(" =404")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(";")]),t._v("\n "),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("}")]),t._v("\n\n "),s("span",{pre:!0,attrs:{class:"token comment"}},[t._v("# Redirect everything else to https")]),t._v("\n "),s("span",{pre:!0,attrs:{class:"token directive"}},[s("span",{pre:!0,attrs:{class:"token keyword"}},[t._v("location")]),t._v(" /")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("{")]),t._v("\n "),s("span",{pre:!0,attrs:{class:"token directive"}},[s("span",{pre:!0,attrs:{class:"token keyword"}},[t._v("return")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token number"}},[t._v("301")]),t._v(" https://"),s("span",{pre:!0,attrs:{class:"token variable"}},[t._v("$server_name")]),s("span",{pre:!0,attrs:{class:"token variable"}},[t._v("$request_uri")])]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(";")]),t._v("\n "),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("}")]),t._v("\n"),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("}")]),t._v("\n")])])]),s("p",[t._v("We will configure the https server part in the same config file once we obtained the SSL certificate.")]),t._v(" "),s("p",[t._v("Enable the web server config by creating a symlink and restarting nginx:")]),t._v(" "),s("div",{staticClass:"language-bash extra-class"},[s("pre",{pre:!0,attrs:{class:"language-bash"}},[s("code",[s("span",{pre:!0,attrs:{class:"token function"}},[t._v("ln")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token parameter variable"}},[t._v("-s")]),t._v(" /etc/nginx/sites-available/btcpayserver.conf /etc/nginx/sites-enabled/btcpayserver.conf\n\nsystemctl restart nginx\n")])])]),s("h4",{attrs:{id:"obtain-ssl-certificate-via-lets-encrypt"}},[s("a",{staticClass:"header-anchor",attrs:{href:"#obtain-ssl-certificate-via-lets-encrypt"}},[t._v("#")]),t._v(" Obtain SSL certificate via Let's Encrypt")]),t._v(" "),s("p",[t._v("Run the following command with adapted email and domain parameters:")]),t._v(" "),s("div",{staticClass:"language-bash extra-class"},[s("pre",{pre:!0,attrs:{class:"language-bash"}},[s("code",[t._v("certbot certonly --agree-tos "),s("span",{pre:!0,attrs:{class:"token parameter variable"}},[t._v("--email")]),t._v(" admin@mydomain.com "),s("span",{pre:!0,attrs:{class:"token parameter variable"}},[t._v("--webroot")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token parameter variable"}},[t._v("-w")]),t._v(" /var/lib/letsencrypt/ "),s("span",{pre:!0,attrs:{class:"token parameter variable"}},[t._v("-d")]),t._v(" btcpayserver.mydomain.com\n")])])]),s("h4",{attrs:{id:"nginx-configuration-https"}},[s("a",{staticClass:"header-anchor",attrs:{href:"#nginx-configuration-https"}},[t._v("#")]),t._v(" nginx configuration: https")]),t._v(" "),s("p",[t._v("Now that we have a valid SSL certificate, add the https server part at the end of "),s("code",[t._v("/etc/nginx/sites-available/btcpayserver.conf")]),t._v(":")]),t._v(" "),s("div",{staticClass:"language-nginx extra-class"},[s("pre",{pre:!0,attrs:{class:"language-nginx"}},[s("code",[s("span",{pre:!0,attrs:{class:"token directive"}},[s("span",{pre:!0,attrs:{class:"token keyword"}},[t._v("server")])]),t._v(" "),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("{")]),t._v("\n "),s("span",{pre:!0,attrs:{class:"token directive"}},[s("span",{pre:!0,attrs:{class:"token keyword"}},[t._v("listen")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token number"}},[t._v("443")]),t._v(" ssl http2")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(";")]),t._v("\n "),s("span",{pre:!0,attrs:{class:"token directive"}},[s("span",{pre:!0,attrs:{class:"token keyword"}},[t._v("server_name")]),t._v(" btcpayserver.mydomain.com")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(";")]),t._v("\n\n "),s("span",{pre:!0,attrs:{class:"token comment"}},[t._v("# SSL settings")]),t._v("\n "),s("span",{pre:!0,attrs:{class:"token directive"}},[s("span",{pre:!0,attrs:{class:"token keyword"}},[t._v("ssl_stapling")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token boolean"}},[t._v("on")])]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(";")]),t._v("\n "),s("span",{pre:!0,attrs:{class:"token directive"}},[s("span",{pre:!0,attrs:{class:"token keyword"}},[t._v("ssl_stapling_verify")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token boolean"}},[t._v("on")])]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(";")]),t._v("\n\n "),s("span",{pre:!0,attrs:{class:"token directive"}},[s("span",{pre:!0,attrs:{class:"token keyword"}},[t._v("ssl_session_timeout")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token number"}},[t._v("1d")])]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(";")]),t._v("\n "),s("span",{pre:!0,attrs:{class:"token directive"}},[s("span",{pre:!0,attrs:{class:"token keyword"}},[t._v("ssl_session_cache")]),t._v(" shared:SSL:10m")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(";")]),t._v("\n "),s("span",{pre:!0,attrs:{class:"token directive"}},[s("span",{pre:!0,attrs:{class:"token keyword"}},[t._v("ssl_session_tickets")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token boolean"}},[t._v("off")])]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(";")]),t._v("\n\n "),s("span",{pre:!0,attrs:{class:"token comment"}},[t._v("# Update this with the path of your certificate files")]),t._v("\n "),s("span",{pre:!0,attrs:{class:"token directive"}},[s("span",{pre:!0,attrs:{class:"token keyword"}},[t._v("ssl_certificate")]),t._v(" /etc/letsencrypt/live/btcpayserver.mydomain.com/fullchain.pem")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(";")]),t._v("\n "),s("span",{pre:!0,attrs:{class:"token directive"}},[s("span",{pre:!0,attrs:{class:"token keyword"}},[t._v("ssl_certificate_key")]),t._v(" /etc/letsencrypt/live/btcpayserver.mydomain.com/privkey.pem")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(";")]),t._v("\n\n "),s("span",{pre:!0,attrs:{class:"token directive"}},[s("span",{pre:!0,attrs:{class:"token keyword"}},[t._v("ssl_dhparam")]),t._v(" /etc/ssl/certs/dhparam.pem")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(";")]),t._v("\n "),s("span",{pre:!0,attrs:{class:"token directive"}},[s("span",{pre:!0,attrs:{class:"token keyword"}},[t._v("ssl_protocols")]),t._v(" TLSv1.2 TLSv1.3")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(";")]),t._v("\n "),s("span",{pre:!0,attrs:{class:"token directive"}},[s("span",{pre:!0,attrs:{class:"token keyword"}},[t._v("ssl_ciphers")]),t._v(" ECDHE-ECDSA-AES128-GCM-SHA256:ECDHE-RSA-AES128-GCM-SHA256:ECDHE-ECDSA-AES256-GCM-SHA384:ECDHE-RSA-AES256-GCM-SHA384:ECDHE-ECDSA-CHACHA20-POLY1305:ECDHE-RSA-CHACHA20-POLY1305:DHE-RSA-AES128-GCM-SHA256:DHE-RSA-AES256-GCM-SHA384")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(";")]),t._v("\n "),s("span",{pre:!0,attrs:{class:"token directive"}},[s("span",{pre:!0,attrs:{class:"token keyword"}},[t._v("ssl_prefer_server_ciphers")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token boolean"}},[t._v("off")])]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(";")]),t._v("\n\n "),s("span",{pre:!0,attrs:{class:"token directive"}},[s("span",{pre:!0,attrs:{class:"token keyword"}},[t._v("resolver")]),t._v(" 8.8.8.8 8.8.4.4 valid=300s")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(";")]),t._v("\n "),s("span",{pre:!0,attrs:{class:"token directive"}},[s("span",{pre:!0,attrs:{class:"token keyword"}},[t._v("resolver_timeout")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token number"}},[t._v("30s")])]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(";")]),t._v("\n\n "),s("span",{pre:!0,attrs:{class:"token directive"}},[s("span",{pre:!0,attrs:{class:"token keyword"}},[t._v("add_header")]),t._v(" Strict-Transport-Security "),s("span",{pre:!0,attrs:{class:"token string"}},[t._v('"max-age=63072000"')]),t._v(" always")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(";")]),t._v("\n "),s("span",{pre:!0,attrs:{class:"token directive"}},[s("span",{pre:!0,attrs:{class:"token keyword"}},[t._v("add_header")]),t._v(" Content-Security-Policy "),s("span",{pre:!0,attrs:{class:"token string"}},[t._v("\"frame-ancestors 'self';\"")])]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(";")]),t._v("\n "),s("span",{pre:!0,attrs:{class:"token directive"}},[s("span",{pre:!0,attrs:{class:"token keyword"}},[t._v("add_header")]),t._v(" X-Content-Type-Options nosniff")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(";")]),t._v("\n\n "),s("span",{pre:!0,attrs:{class:"token comment"}},[t._v("# Proxy requests to the socat service")]),t._v("\n "),s("span",{pre:!0,attrs:{class:"token directive"}},[s("span",{pre:!0,attrs:{class:"token keyword"}},[t._v("location")]),t._v(" /")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("{")]),t._v("\n "),s("span",{pre:!0,attrs:{class:"token directive"}},[s("span",{pre:!0,attrs:{class:"token keyword"}},[t._v("proxy_pass")]),t._v(" http://127.0.0.1:9081/")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(";")]),t._v("\n "),s("span",{pre:!0,attrs:{class:"token directive"}},[s("span",{pre:!0,attrs:{class:"token keyword"}},[t._v("proxy_http_version")]),t._v(" 1.1")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(";")]),t._v("\n "),s("span",{pre:!0,attrs:{class:"token directive"}},[s("span",{pre:!0,attrs:{class:"token keyword"}},[t._v("proxy_set_header")]),t._v(" Host "),s("span",{pre:!0,attrs:{class:"token variable"}},[t._v("$host")])]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(";")]),t._v("\n "),s("span",{pre:!0,attrs:{class:"token directive"}},[s("span",{pre:!0,attrs:{class:"token keyword"}},[t._v("proxy_set_header")]),t._v(" X-Real-IP "),s("span",{pre:!0,attrs:{class:"token variable"}},[t._v("$remote_addr")])]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(";")]),t._v("\n "),s("span",{pre:!0,attrs:{class:"token directive"}},[s("span",{pre:!0,attrs:{class:"token keyword"}},[t._v("proxy_set_header")]),t._v(" X-Forwarded-For "),s("span",{pre:!0,attrs:{class:"token variable"}},[t._v("$remote_addr")])]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(";")]),t._v("\n "),s("span",{pre:!0,attrs:{class:"token directive"}},[s("span",{pre:!0,attrs:{class:"token keyword"}},[t._v("proxy_set_header")]),t._v(" X-Forwarded-Proto "),s("span",{pre:!0,attrs:{class:"token variable"}},[t._v("$proxy_x_forwarded_proto")])]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(";")]),t._v("\n "),s("span",{pre:!0,attrs:{class:"token directive"}},[s("span",{pre:!0,attrs:{class:"token keyword"}},[t._v("proxy_set_header")]),t._v(" Upgrade "),s("span",{pre:!0,attrs:{class:"token variable"}},[t._v("$http_upgrade")])]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(";")]),t._v("\n "),s("span",{pre:!0,attrs:{class:"token directive"}},[s("span",{pre:!0,attrs:{class:"token keyword"}},[t._v("proxy_set_header")]),t._v(" Connection "),s("span",{pre:!0,attrs:{class:"token variable"}},[t._v("$connection_upgrade")])]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(";")]),t._v("\n "),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("}")]),t._v("\n"),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("}")]),t._v("\n")])])]),s("p",[t._v("Restart nginx once more:")]),t._v(" "),s("div",{staticClass:"language-bash extra-class"},[s("pre",{pre:!0,attrs:{class:"language-bash"}},[s("code",[t._v("systemctl restart nginx\n")])])]),s("p",[t._v("Now, visiting "),s("code",[t._v("btcpayserver.mydomain.com")]),t._v(" should show your BTCPay Server instance.")]),t._v(" "),s("div",{staticClass:"custom-block tip"},[s("p",{staticClass:"custom-block-title"},[t._v("TIP")]),t._v(" "),s("p",[t._v('If you see an nginx error of "503 Service Temporarily Unavailable" or similar but your BTCPay Server is reachable otherwise, you need to make BTCPay Server aware of your new domain. You can do so by using environment variables (Docker based setup), log into your BTCPay Server via SSH:')]),t._v(" "),s("div",{staticClass:"language-bash extra-class"},[s("pre",{pre:!0,attrs:{class:"language-bash"}},[s("code",[s("span",{pre:!0,attrs:{class:"token function"}},[t._v("sudo")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token function"}},[t._v("su")]),t._v(" -\n"),s("span",{pre:!0,attrs:{class:"token builtin class-name"}},[t._v("cd")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token variable"}},[t._v("$BTCPAY_BASE_DIRECTORY")]),t._v("/btcpayserver-docker/\n"),s("span",{pre:!0,attrs:{class:"token builtin class-name"}},[t._v("export")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token assign-left variable"}},[t._v("BTCPAY_ADDITIONAL_HOSTS")]),s("span",{pre:!0,attrs:{class:"token operator"}},[t._v("=")]),s("span",{pre:!0,attrs:{class:"token string"}},[t._v('"btcpayserver.mydomain.com"')]),t._v("\n"),s("span",{pre:!0,attrs:{class:"token builtin class-name"}},[t._v(".")]),t._v(" ./btcpay-setup.sh "),s("span",{pre:!0,attrs:{class:"token parameter variable"}},[t._v("-i")]),t._v("\n")])])])]),t._v(" "),s("h2",{attrs:{id:"do-all-this-in-a-docker-container"}},[s("a",{staticClass:"header-anchor",attrs:{href:"#do-all-this-in-a-docker-container"}},[t._v("#")]),t._v(" Do all this in a Docker container")]),t._v(" "),s("p",[t._v("Ready made "),s("a",{attrs:{href:"https://hub.docker.com/r/cloudgenius/socator",target:"_blank",rel:"noopener noreferrer"}},[t._v("Docker image"),s("OutboundLink")],1),t._v(" ("),s("a",{attrs:{href:"https://github.com/beacloudgenius/socator",target:"_blank",rel:"noopener noreferrer"}},[t._v("Code"),s("OutboundLink")],1),t._v(")")]),t._v(" "),s("h3",{attrs:{id:"socator-socat-tor"}},[s("a",{staticClass:"header-anchor",attrs:{href:"#socator-socat-tor"}},[t._v("#")]),t._v(" SocaTor = SOCAT + TOR")]),t._v(" "),s("p",[t._v("Based on "),s("a",{attrs:{href:"https://github.com/Arno0x/Docker-Socator",target:"_blank",rel:"noopener noreferrer"}},[t._v("Docker-Socator"),s("OutboundLink")],1)]),t._v(" "),s("p",[t._v("It uses socat to listen on a given TCP port (5000 in this example) and to redirect incoming traffic to a Tor hidden service specified through environment variables.\nIt acts as a relay between the standard web and a hidden service on the Tor network.\nYou can optionally restrict the IP addresses that are allowed to connect to this service by specifying an "),s("code",[t._v("ALLOWED_RANGE")]),t._v(" environment variable and using CIDR notation.")]),t._v(" "),s("p",[t._v("Please note:")]),t._v(" "),s("p",[t._v("This container does not have any nginx component because Kubernetes provides for it.")]),t._v(" "),s("h3",{attrs:{id:"usage"}},[s("a",{staticClass:"header-anchor",attrs:{href:"#usage"}},[t._v("#")]),t._v(" Usage")]),t._v(" "),s("p",[t._v("Break free from cloud services providers limitations, secure and protect your bitcoin full node, connect that with a BTC Pay server, all behind TOR.\nSelectively expose the BTCPay Server payment gateway and API to clearnet using socat+tor running on the Internet.")]),t._v(" "),s("hr"),t._v(" "),s("h4",{attrs:{id:"build"}},[s("a",{staticClass:"header-anchor",attrs:{href:"#build"}},[t._v("#")]),t._v(" Build")]),t._v(" "),s("div",{staticClass:"language-sh extra-class"},[s("pre",{pre:!0,attrs:{class:"language-sh"}},[s("code",[s("span",{pre:!0,attrs:{class:"token function"}},[t._v("docker")]),t._v(" build "),s("span",{pre:!0,attrs:{class:"token parameter variable"}},[t._v("-t")]),t._v(" cloudgenius/socator "),s("span",{pre:!0,attrs:{class:"token builtin class-name"}},[t._v(".")]),t._v("\n")])])]),s("h4",{attrs:{id:"push"}},[s("a",{staticClass:"header-anchor",attrs:{href:"#push"}},[t._v("#")]),t._v(" Push")]),t._v(" "),s("div",{staticClass:"language-sh extra-class"},[s("pre",{pre:!0,attrs:{class:"language-sh"}},[s("code",[s("span",{pre:!0,attrs:{class:"token function"}},[t._v("docker")]),t._v(" push cloudgenius/socator\n")])])]),s("h4",{attrs:{id:"start-the-image-in-background-daemon-mode-with-ip-address-restriction"}},[s("a",{staticClass:"header-anchor",attrs:{href:"#start-the-image-in-background-daemon-mode-with-ip-address-restriction"}},[t._v("#")]),t._v(" Start the image in background ("),s("em",[t._v("daemon mode")]),t._v(") with IP address restriction")]),t._v(" "),s("div",{staticClass:"language-sh extra-class"},[s("pre",{pre:!0,attrs:{class:"language-sh"}},[s("code",[s("span",{pre:!0,attrs:{class:"token function"}},[t._v("docker")]),t._v(" run "),s("span",{pre:!0,attrs:{class:"token parameter variable"}},[t._v("-d")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("\\")]),t._v("\n "),s("span",{pre:!0,attrs:{class:"token parameter variable"}},[t._v("-p")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token number"}},[t._v("5000")]),t._v(":5000 "),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("\\")]),t._v("\n "),s("span",{pre:!0,attrs:{class:"token parameter variable"}},[t._v("-e")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token string"}},[t._v('"ALLOWED_RANGE=192.168.1.0/24"')]),t._v(" "),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("\\")]),t._v("\n "),s("span",{pre:!0,attrs:{class:"token parameter variable"}},[t._v("-e")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token string"}},[t._v('"TOR_SITE=zqktlwiuavvvqqt4ybvgvi7tyo4hjl5xgfuvpdf6otjiycgwqbym2qad.onion"')]),t._v(" "),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("\\")]),t._v("\n "),s("span",{pre:!0,attrs:{class:"token parameter variable"}},[t._v("-e")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token string"}},[t._v('"TOR_SITE_PORT=80"')]),t._v(" "),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("\\")]),t._v("\n "),s("span",{pre:!0,attrs:{class:"token parameter variable"}},[t._v("--name")]),t._v(" socator "),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("\\")]),t._v("\n cloudgenius/socator\n")])])]),s("h4",{attrs:{id:"start-the-image-in-foreground"}},[s("a",{staticClass:"header-anchor",attrs:{href:"#start-the-image-in-foreground"}},[t._v("#")]),t._v(" Start the image in foreground")]),t._v(" "),s("div",{staticClass:"language-sh extra-class"},[s("pre",{pre:!0,attrs:{class:"language-sh"}},[s("code",[s("span",{pre:!0,attrs:{class:"token function"}},[t._v("docker")]),t._v(" run "),s("span",{pre:!0,attrs:{class:"token parameter variable"}},[t._v("--rm")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token parameter variable"}},[t._v("-ti")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("\\")]),t._v("\n "),s("span",{pre:!0,attrs:{class:"token parameter variable"}},[t._v("-p")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token number"}},[t._v("5000")]),t._v(":5000 "),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("\\")]),t._v("\n "),s("span",{pre:!0,attrs:{class:"token parameter variable"}},[t._v("-e")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token string"}},[t._v('"TOR_SITE=zqktlwiuavvvqqt4ybvgvi7tyo4hjl5xgfuvpdf6otjiycgwqbym2qad.onion"')]),t._v(" "),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("\\")]),t._v("\n "),s("span",{pre:!0,attrs:{class:"token parameter variable"}},[t._v("-e")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token string"}},[t._v('"TOR_SITE_PORT=80"')]),t._v(" "),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("\\")]),t._v("\n "),s("span",{pre:!0,attrs:{class:"token parameter variable"}},[t._v("--name")]),t._v(" socator "),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("\\")]),t._v("\n cloudgenius/socator\n")])])]),s("p",[t._v("Now "),s("code",[t._v("http://localhost:5000")]),t._v(" should show you the tor hidden service you specified in the above command.")]),t._v(" "),s("h2",{attrs:{id:"use-that-docker-container-in-a-kubernetes-cluster-using-these-manifests"}},[s("a",{staticClass:"header-anchor",attrs:{href:"#use-that-docker-container-in-a-kubernetes-cluster-using-these-manifests"}},[t._v("#")]),t._v(" Use that Docker container in a Kubernetes Cluster using these manifests")]),t._v(" "),s("p",[t._v("These manifest assumes a typical Kubernetes cluster that exposes internal services (like socator running internallly at port 5000) to the clearnet/public internet via "),s("a",{attrs:{href:"https://github.com/kubernetes/ingress-nginx",target:"_blank",rel:"noopener noreferrer"}},[t._v("Nginx Ingress"),s("OutboundLink")],1),t._v(" and provide automated Let's Encrypt TLS/SSL certificates via "),s("a",{attrs:{href:"https://github.com/jetstack/cert-manager",target:"_blank",rel:"noopener noreferrer"}},[t._v("cert-manager"),s("OutboundLink")],1),t._v(".")]),t._v(" "),s("p",[t._v("Deployment manifest")]),t._v(" "),s("div",{staticClass:"language-yaml extra-class"},[s("pre",{pre:!0,attrs:{class:"language-yaml"}},[s("code",[s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("---")]),t._v("\n"),s("span",{pre:!0,attrs:{class:"token key atrule"}},[t._v("apiVersion")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(":")]),t._v(" apps/v1\n"),s("span",{pre:!0,attrs:{class:"token key atrule"}},[t._v("kind")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(":")]),t._v(" Deployment\n"),s("span",{pre:!0,attrs:{class:"token key atrule"}},[t._v("metadata")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(":")]),t._v("\n "),s("span",{pre:!0,attrs:{class:"token key atrule"}},[t._v("name")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(":")]),t._v(" socator\n"),s("span",{pre:!0,attrs:{class:"token key atrule"}},[t._v("spec")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(":")]),t._v("\n "),s("span",{pre:!0,attrs:{class:"token key atrule"}},[t._v("replicas")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(":")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token number"}},[t._v("1")]),t._v("\n "),s("span",{pre:!0,attrs:{class:"token key atrule"}},[t._v("selector")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(":")]),t._v("\n "),s("span",{pre:!0,attrs:{class:"token key atrule"}},[t._v("matchLabels")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(":")]),t._v("\n "),s("span",{pre:!0,attrs:{class:"token key atrule"}},[t._v("role")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(":")]),t._v(" socator\n "),s("span",{pre:!0,attrs:{class:"token key atrule"}},[t._v("template")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(":")]),t._v("\n "),s("span",{pre:!0,attrs:{class:"token key atrule"}},[t._v("metadata")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(":")]),t._v("\n "),s("span",{pre:!0,attrs:{class:"token key atrule"}},[t._v("labels")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(":")]),t._v("\n "),s("span",{pre:!0,attrs:{class:"token key atrule"}},[t._v("role")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(":")]),t._v(" socator\n "),s("span",{pre:!0,attrs:{class:"token key atrule"}},[t._v("spec")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(":")]),t._v("\n "),s("span",{pre:!0,attrs:{class:"token key atrule"}},[t._v("containers")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(":")]),t._v("\n "),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("-")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token key atrule"}},[t._v("image")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(":")]),t._v(" cloudgenius/socator "),s("span",{pre:!0,attrs:{class:"token comment"}},[t._v("# code https://github.com/beacloudgenius/socator")]),t._v("\n "),s("span",{pre:!0,attrs:{class:"token key atrule"}},[t._v("imagePullPolicy")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(":")]),t._v(" IfNotPresent\n "),s("span",{pre:!0,attrs:{class:"token key atrule"}},[t._v("name")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(":")]),t._v(" socator\n "),s("span",{pre:!0,attrs:{class:"token key atrule"}},[t._v("env")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(":")]),t._v("\n "),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("-")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token key atrule"}},[t._v("name")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(":")]),t._v(" TOR_SITE\n "),s("span",{pre:!0,attrs:{class:"token key atrule"}},[t._v("value")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(":")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token string"}},[t._v("'zqktlwiuavvvqqt4ybvgvi7tyo4hjl5xgfuvpdf6otjiycgwqbym2qad.onion'")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token comment"}},[t._v("# BTCPay Server Tor address => docker exec tor cat /var/lib/tor/app-btcpay-server/hostname")]),t._v("\n "),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("-")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token key atrule"}},[t._v("name")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(":")]),t._v(" TOR_SITE_PORT\n "),s("span",{pre:!0,attrs:{class:"token key atrule"}},[t._v("value")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(":")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token string"}},[t._v("'80'")]),t._v("\n")])])]),s("p",[t._v("Service manifest")]),t._v(" "),s("div",{staticClass:"language-yaml extra-class"},[s("pre",{pre:!0,attrs:{class:"language-yaml"}},[s("code",[s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("---")]),t._v("\n"),s("span",{pre:!0,attrs:{class:"token key atrule"}},[t._v("apiVersion")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(":")]),t._v(" v1\n"),s("span",{pre:!0,attrs:{class:"token key atrule"}},[t._v("kind")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(":")]),t._v(" Service\n"),s("span",{pre:!0,attrs:{class:"token key atrule"}},[t._v("metadata")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(":")]),t._v("\n "),s("span",{pre:!0,attrs:{class:"token key atrule"}},[t._v("name")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(":")]),t._v(" socator\n"),s("span",{pre:!0,attrs:{class:"token key atrule"}},[t._v("spec")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(":")]),t._v("\n "),s("span",{pre:!0,attrs:{class:"token key atrule"}},[t._v("ports")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(":")]),t._v("\n "),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("-")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token key atrule"}},[t._v("name")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(":")]),t._v(" http\n "),s("span",{pre:!0,attrs:{class:"token key atrule"}},[t._v("port")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(":")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token number"}},[t._v("5000")]),t._v("\n "),s("span",{pre:!0,attrs:{class:"token key atrule"}},[t._v("selector")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(":")]),t._v("\n "),s("span",{pre:!0,attrs:{class:"token key atrule"}},[t._v("role")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(":")]),t._v(" socator\n")])])]),s("p",[t._v("Ingress manifest")]),t._v(" "),s("div",{staticClass:"language-yaml extra-class"},[s("pre",{pre:!0,attrs:{class:"language-yaml"}},[s("code",[s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("---")]),t._v("\n"),s("span",{pre:!0,attrs:{class:"token key atrule"}},[t._v("apiVersion")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(":")]),t._v(" networking.k8s.io/v1\n"),s("span",{pre:!0,attrs:{class:"token key atrule"}},[t._v("kind")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(":")]),t._v(" Ingress\n"),s("span",{pre:!0,attrs:{class:"token key atrule"}},[t._v("metadata")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(":")]),t._v("\n "),s("span",{pre:!0,attrs:{class:"token key atrule"}},[t._v("name")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(":")]),t._v(" socator\n "),s("span",{pre:!0,attrs:{class:"token key atrule"}},[t._v("annotations")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(":")]),t._v("\n "),s("span",{pre:!0,attrs:{class:"token key atrule"}},[t._v("kubernetes.io/ingress.class")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(":")]),t._v(" nginx\n "),s("span",{pre:!0,attrs:{class:"token key atrule"}},[t._v("cert-manager.io/cluster-issuer")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(":")]),t._v(" letsencrypt"),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("-")]),t._v("prod\n"),s("span",{pre:!0,attrs:{class:"token key atrule"}},[t._v("spec")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(":")]),t._v("\n "),s("span",{pre:!0,attrs:{class:"token key atrule"}},[t._v("rules")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(":")]),t._v("\n "),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("-")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token key atrule"}},[t._v("host")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(":")]),t._v(" btcpayserver.mydomain.com\n "),s("span",{pre:!0,attrs:{class:"token key atrule"}},[t._v("http")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(":")]),t._v("\n "),s("span",{pre:!0,attrs:{class:"token key atrule"}},[t._v("paths")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(":")]),t._v("\n "),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("-")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token key atrule"}},[t._v("backend")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(":")]),t._v("\n "),s("span",{pre:!0,attrs:{class:"token key atrule"}},[t._v("service")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(":")]),t._v("\n "),s("span",{pre:!0,attrs:{class:"token key atrule"}},[t._v("name")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(":")]),t._v(" socator\n "),s("span",{pre:!0,attrs:{class:"token key atrule"}},[t._v("port")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(":")]),t._v("\n "),s("span",{pre:!0,attrs:{class:"token key atrule"}},[t._v("number")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(":")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token number"}},[t._v("5000")]),t._v("\n "),s("span",{pre:!0,attrs:{class:"token key atrule"}},[t._v("path")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(":")]),t._v(" /\n "),s("span",{pre:!0,attrs:{class:"token key atrule"}},[t._v("pathType")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(":")]),t._v(" Prefix\n "),s("span",{pre:!0,attrs:{class:"token key atrule"}},[t._v("tls")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(":")]),t._v("\n "),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("-")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token key atrule"}},[t._v("hosts")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(":")]),t._v("\n "),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("-")]),t._v(" btcpayserver.mydomain.com\n "),s("span",{pre:!0,attrs:{class:"token key atrule"}},[t._v("secretName")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(":")]),t._v(" socator"),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("-")]),t._v("tls\n")])])]),s("h2",{attrs:{id:"resources"}},[s("a",{staticClass:"header-anchor",attrs:{href:"#resources"}},[t._v("#")]),t._v(" Resources")]),t._v(" "),s("ul",[s("li",[s("a",{attrs:{href:"https://itgala.xyz/nginx-reverse-proxy-to-onion-site-in-tor-network/",target:"_blank",rel:"noopener noreferrer"}},[t._v("nginx reverse proxy to .onion site in Tor network"),s("OutboundLink")],1)]),t._v(" "),s("li",[s("a",{attrs:{href:"https://github.com/openoms/bitcoin-tutorials/blob/master/tor2ip_tunnel.md",target:"_blank",rel:"noopener noreferrer"}},[t._v("Tor-to-IP tunnel service"),s("OutboundLink")],1)]),t._v(" "),s("li",[s("a",{attrs:{href:"https://stackoverflow.com/questions/55487324/how-to-make-a-nginx-reverse-proxy-direct-to-tor-hidden-service",target:"_blank",rel:"noopener noreferrer"}},[t._v("How to make a nginx reverse proxy direct to tor hidden service"),s("OutboundLink")],1)]),t._v(" "),s("li",[s("a",{attrs:{href:"https://linuxize.com/post/secure-nginx-with-let-s-encrypt-on-debian-10/",target:"_blank",rel:"noopener noreferrer"}},[t._v("Secure Nginx with Let's Encrypt on Debian 10 Linux"),s("OutboundLink")],1)]),t._v(" "),s("li",[s("a",{attrs:{href:"http://nginx.org/en/docs/http/websocket.html",target:"_blank",rel:"noopener noreferrer"}},[t._v("Nginx WebSocket proxying"),s("OutboundLink")],1)])])])}),[],!1,null,null,null);s.default=n.exports}}]); \ No newline at end of file +(window.webpackJsonp=window.webpackJsonp||[]).push([[118],{765:function(t,s,a){"use strict";a.r(s);var e=a(10),n=Object(e.a)({},(function(){var t=this,s=t._self._c;return s("ContentSlotsDistributor",{attrs:{"slot-key":t.$parent.slotKey}},[s("h1",{attrs:{id:"reverse-proxy-to-tor"}},[s("a",{staticClass:"header-anchor",attrs:{href:"#reverse-proxy-to-tor"}},[t._v("#")]),t._v(" Reverse proxy to Tor")]),t._v(" "),s("h2",{attrs:{id:"advantages"}},[s("a",{staticClass:"header-anchor",attrs:{href:"#advantages"}},[t._v("#")]),t._v(" Advantages")]),t._v(" "),s("ul",[s("li",[t._v("no port forwarding needed on the LAN of the host")]),t._v(" "),s("li",[t._v("encrypted connection")]),t._v(" "),s("li",[t._v("hides the IP of the host")])]),t._v(" "),s("h2",{attrs:{id:"requirements"}},[s("a",{staticClass:"header-anchor",attrs:{href:"#requirements"}},[t._v("#")]),t._v(" Requirements")]),t._v(" "),s("ul",[s("li",[t._v("a Virtual Private Server (VPS) - eg. a minimal package on Lunanode for ~3.5$/month")]),t._v(" "),s("li",[t._v("root access on the VPS - you need to set up webserver and install packages")]),t._v(" "),s("li",[t._v("a domain or subdomain - this will be setup on the proxy webserver")])]),t._v(" "),s("p",[t._v("Get the Tor "),s("code",[t._v(".onion")]),t._v(" address of your BTCPay Server via the "),s("code",[t._v("Server settings > Services")]),t._v(' page.\nSee information in the "HTTP-based TOR hidden services" section.')]),t._v(" "),s("p",[t._v("Note: There is also a "),s("a",{attrs:{href:"#do-all-this-in-a-docker-container"}},[t._v("Docker version")]),t._v(" of this setup.")]),t._v(" "),s("h2",{attrs:{id:"vps-setup"}},[s("a",{staticClass:"header-anchor",attrs:{href:"#vps-setup"}},[t._v("#")]),t._v(" VPS Setup")]),t._v(" "),s("p",[t._v("You will create a nginx reverse proxy and a "),s("code",[t._v("socat")]),t._v(" service, which forwards requests to your BTCPay Server.")]),t._v(" "),s("p",[t._v("Login as root and install the required dependencies: (example assumes a Debian based system)")]),t._v(" "),s("div",{staticClass:"language-bash extra-class"},[s("pre",{pre:!0,attrs:{class:"language-bash"}},[s("code",[s("span",{pre:!0,attrs:{class:"token comment"}},[t._v("# switch to root user (if not logged in as root)")]),t._v("\n"),s("span",{pre:!0,attrs:{class:"token function"}},[t._v("sudo")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token function"}},[t._v("su")]),t._v(" -\n\n"),s("span",{pre:!0,attrs:{class:"token comment"}},[t._v("# install dependencies")]),t._v("\n"),s("span",{pre:!0,attrs:{class:"token function"}},[t._v("apt")]),t._v(" update\n"),s("span",{pre:!0,attrs:{class:"token function"}},[t._v("apt")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token function"}},[t._v("install")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token parameter variable"}},[t._v("-y")]),t._v(" certbot nginx socat tor\n")])])]),s("h3",{attrs:{id:"socat-setup"}},[s("a",{staticClass:"header-anchor",attrs:{href:"#socat-setup"}},[t._v("#")]),t._v(" Socat setup")]),t._v(" "),s("p",[t._v("Create the service file "),s("code",[t._v("/etc/systemd/system/http-to-socks-proxy@.service")]),t._v(":")]),t._v(" "),s("div",{staticClass:"language-ini extra-class"},[s("pre",{pre:!0,attrs:{class:"language-ini"}},[s("code",[s("span",{pre:!0,attrs:{class:"token section"}},[s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("[")]),s("span",{pre:!0,attrs:{class:"token section-name selector"}},[t._v("Unit")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("]")])]),t._v("\n"),s("span",{pre:!0,attrs:{class:"token key attr-name"}},[t._v("Description")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("=")]),s("span",{pre:!0,attrs:{class:"token value attr-value"}},[t._v("HTTP-to-SOCKS proxy")]),t._v("\n"),s("span",{pre:!0,attrs:{class:"token key attr-name"}},[t._v("After")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("=")]),s("span",{pre:!0,attrs:{class:"token value attr-value"}},[t._v("network.target")]),t._v("\n\n"),s("span",{pre:!0,attrs:{class:"token section"}},[s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("[")]),s("span",{pre:!0,attrs:{class:"token section-name selector"}},[t._v("Service")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("]")])]),t._v("\n"),s("span",{pre:!0,attrs:{class:"token key attr-name"}},[t._v("EnvironmentFile")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("=")]),s("span",{pre:!0,attrs:{class:"token value attr-value"}},[t._v("/etc/http-to-socks-proxy/%i.conf")]),t._v("\n"),s("span",{pre:!0,attrs:{class:"token key attr-name"}},[t._v("ExecStart")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("=")]),s("span",{pre:!0,attrs:{class:"token value attr-value"}},[t._v("/usr/bin/socat tcp4-LISTEN:${LOCAL_PORT},reuseaddr,fork,keepalive,bind=127.0.0.1 SOCKS4A:${PROXY_HOST}:${REMOTE_HOST}:${REMOTE_PORT},socksport=${PROXY_PORT}")]),t._v("\n\n"),s("span",{pre:!0,attrs:{class:"token section"}},[s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("[")]),s("span",{pre:!0,attrs:{class:"token section-name selector"}},[t._v("Install")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("]")])]),t._v("\n"),s("span",{pre:!0,attrs:{class:"token key attr-name"}},[t._v("WantedBy")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("=")]),s("span",{pre:!0,attrs:{class:"token value attr-value"}},[t._v("multi-user.target")]),t._v("\n")])])]),s("p",[t._v("Create the configuration for the service in "),s("code",[t._v("/etc/http-to-socks-proxy/btcpayserver.conf")]),t._v(":")]),t._v(" "),s("div",{staticClass:"language-bash extra-class"},[s("pre",{pre:!0,attrs:{class:"language-bash"}},[s("code",[s("span",{pre:!0,attrs:{class:"token comment"}},[t._v("# create the directory")]),t._v("\n"),s("span",{pre:!0,attrs:{class:"token function"}},[t._v("mkdir")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token parameter variable"}},[t._v("-p")]),t._v(" /etc/http-to-socks-proxy/\n\n"),s("span",{pre:!0,attrs:{class:"token comment"}},[t._v("# create the file with the content below")]),t._v("\n"),s("span",{pre:!0,attrs:{class:"token function"}},[t._v("nano")]),t._v(" /etc/http-to-socks-proxy/btcpayserver.conf\n")])])]),s("p",[t._v("Replace the "),s("code",[t._v("REMOTE_HOST")]),t._v(" and adapt the ports if needed:")]),t._v(" "),s("div",{staticClass:"language-conf extra-class"},[s("pre",{pre:!0,attrs:{class:"language-text"}},[s("code",[t._v("PROXY_HOST=127.0.0.1\nPROXY_PORT=9050\nLOCAL_PORT=9081\nREMOTE_HOST=heregoesthebtcpayserverhiddenserviceaddress.onion\nREMOTE_PORT=80\n")])])]),s("p",[t._v("Create a symlink in "),s("code",[t._v("/etc/systemd/system/multi-user.target.wants")]),t._v(" to enable the service and start it:")]),t._v(" "),s("div",{staticClass:"language-bash extra-class"},[s("pre",{pre:!0,attrs:{class:"language-bash"}},[s("code",[s("span",{pre:!0,attrs:{class:"token comment"}},[t._v("# enable")]),t._v("\n"),s("span",{pre:!0,attrs:{class:"token function"}},[t._v("ln")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token parameter variable"}},[t._v("-s")]),t._v(" /etc/systemd/system/http-to-socks-proxy"),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("\\")]),t._v("@.service /etc/systemd/system/multi-user.target.wants/http-to-socks-proxy"),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("\\")]),t._v("@btcpayserver.service\n\n"),s("span",{pre:!0,attrs:{class:"token comment"}},[t._v("# start")]),t._v("\nsystemctl start http-to-socks-proxy@btcpayserver\n\n"),s("span",{pre:!0,attrs:{class:"token comment"}},[t._v("# check service status")]),t._v("\nsystemctl status http-to-socks-proxy@btcpayserver\n\n"),s("span",{pre:!0,attrs:{class:"token comment"}},[t._v("# check if tunnel is active")]),t._v("\n"),s("span",{pre:!0,attrs:{class:"token function"}},[t._v("netstat")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token parameter variable"}},[t._v("-tulpn")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token operator"}},[t._v("|")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token function"}},[t._v("grep")]),t._v(" socat\n"),s("span",{pre:!0,attrs:{class:"token comment"}},[t._v("# should give something like this:")]),t._v("\n"),s("span",{pre:!0,attrs:{class:"token comment"}},[t._v("# tcp 0 0 127.0.0.1:9081 0.0.0.0:* LISTEN 951/socat")]),t._v("\n")])])]),s("h3",{attrs:{id:"webserver-setup"}},[s("a",{staticClass:"header-anchor",attrs:{href:"#webserver-setup"}},[t._v("#")]),t._v(" Webserver setup")]),t._v(" "),s("h4",{attrs:{id:"point-domain-to-the-vps"}},[s("a",{staticClass:"header-anchor",attrs:{href:"#point-domain-to-the-vps"}},[t._v("#")]),t._v(" Point domain to the VPS")]),t._v(" "),s("p",[t._v("Create the A record on the DNS server of your domain/subdomain and point it to your VPS IP address.")]),t._v(" "),s("h4",{attrs:{id:"prepare-ssl-and-lets-encrypt"}},[s("a",{staticClass:"header-anchor",attrs:{href:"#prepare-ssl-and-lets-encrypt"}},[t._v("#")]),t._v(" Prepare SSL and Let's Encrypt")]),t._v(" "),s("div",{staticClass:"language-bash extra-class"},[s("pre",{pre:!0,attrs:{class:"language-bash"}},[s("code",[s("span",{pre:!0,attrs:{class:"token comment"}},[t._v("# generate 4096 bit DH params to strengthen the security, may take a while")]),t._v("\nopenssl dhparam "),s("span",{pre:!0,attrs:{class:"token parameter variable"}},[t._v("-out")]),t._v(" /etc/ssl/certs/dhparam.pem "),s("span",{pre:!0,attrs:{class:"token number"}},[t._v("4096")]),t._v("\n\n"),s("span",{pre:!0,attrs:{class:"token comment"}},[t._v("# create directory for Let's Encrypt files")]),t._v("\n"),s("span",{pre:!0,attrs:{class:"token function"}},[t._v("mkdir")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token parameter variable"}},[t._v("-p")]),t._v(" /var/lib/letsencrypt/.well-known\n"),s("span",{pre:!0,attrs:{class:"token function"}},[t._v("chgrp")]),t._v(" www-data /var/lib/letsencrypt\n"),s("span",{pre:!0,attrs:{class:"token function"}},[t._v("chmod")]),t._v(" g+s /var/lib/letsencrypt\n")])])]),s("h4",{attrs:{id:"nginx-configuration-http"}},[s("a",{staticClass:"header-anchor",attrs:{href:"#nginx-configuration-http"}},[t._v("#")]),t._v(" nginx configuration: http")]),t._v(" "),s("p",[t._v("Create a variable mapping to forward the correct protocol setting and check if the Upgrade header is sent by the client, e.g. "),s("code",[t._v("/etc/nginx/conf.d/map.conf")]),t._v(":")]),t._v(" "),s("div",{staticClass:"language-nginx extra-class"},[s("pre",{pre:!0,attrs:{class:"language-nginx"}},[s("code",[s("span",{pre:!0,attrs:{class:"token directive"}},[s("span",{pre:!0,attrs:{class:"token keyword"}},[t._v("map")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token variable"}},[t._v("$http_x_forwarded_proto")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token variable"}},[t._v("$proxy_x_forwarded_proto")])]),t._v(" "),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("{")]),t._v("\n "),s("span",{pre:!0,attrs:{class:"token directive"}},[s("span",{pre:!0,attrs:{class:"token keyword"}},[t._v("default")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token variable"}},[t._v("$http_x_forwarded_proto")])]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(";")]),t._v("\n '' $scheme"),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(";")]),t._v("\n"),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("}")]),t._v("\n\n"),s("span",{pre:!0,attrs:{class:"token directive"}},[s("span",{pre:!0,attrs:{class:"token keyword"}},[t._v("map")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token variable"}},[t._v("$http_upgrade")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token variable"}},[t._v("$connection_upgrade")])]),t._v(" "),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("{")]),t._v("\n "),s("span",{pre:!0,attrs:{class:"token directive"}},[s("span",{pre:!0,attrs:{class:"token keyword"}},[t._v("default")]),t._v(" upgrade")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(";")]),t._v("\n '' "),s("span",{pre:!0,attrs:{class:"token directive"}},[s("span",{pre:!0,attrs:{class:"token keyword"}},[t._v("close")])]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(";")]),t._v("\n"),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("}")]),t._v("\n")])])]),s("p",[t._v("Create a config file for the domain, e.g. "),s("code",[t._v("/etc/nginx/sites-available/btcpayserver.conf")]),t._v(":")]),t._v(" "),s("div",{staticClass:"language-nginx extra-class"},[s("pre",{pre:!0,attrs:{class:"language-nginx"}},[s("code",[s("span",{pre:!0,attrs:{class:"token directive"}},[s("span",{pre:!0,attrs:{class:"token keyword"}},[t._v("server")])]),t._v(" "),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("{")]),t._v("\n "),s("span",{pre:!0,attrs:{class:"token directive"}},[s("span",{pre:!0,attrs:{class:"token keyword"}},[t._v("listen")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token number"}},[t._v("80")])]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(";")]),t._v("\n "),s("span",{pre:!0,attrs:{class:"token directive"}},[s("span",{pre:!0,attrs:{class:"token keyword"}},[t._v("server_name")]),t._v(" btcpayserver.mydomain.com")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(";")]),t._v("\n\n "),s("span",{pre:!0,attrs:{class:"token comment"}},[t._v("# Let's Encrypt verification requests")]),t._v("\n "),s("span",{pre:!0,attrs:{class:"token directive"}},[s("span",{pre:!0,attrs:{class:"token keyword"}},[t._v("location")]),t._v(" ^~ /.well-known/acme-challenge/")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("{")]),t._v("\n "),s("span",{pre:!0,attrs:{class:"token directive"}},[s("span",{pre:!0,attrs:{class:"token keyword"}},[t._v("allow")]),t._v(" all")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(";")]),t._v("\n "),s("span",{pre:!0,attrs:{class:"token directive"}},[s("span",{pre:!0,attrs:{class:"token keyword"}},[t._v("root")]),t._v(" /var/lib/letsencrypt/")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(";")]),t._v("\n "),s("span",{pre:!0,attrs:{class:"token directive"}},[s("span",{pre:!0,attrs:{class:"token keyword"}},[t._v("default_type")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token string"}},[t._v('"text/plain"')])]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(";")]),t._v("\n "),s("span",{pre:!0,attrs:{class:"token directive"}},[s("span",{pre:!0,attrs:{class:"token keyword"}},[t._v("try_files")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token variable"}},[t._v("$uri")]),t._v(" =404")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(";")]),t._v("\n "),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("}")]),t._v("\n\n "),s("span",{pre:!0,attrs:{class:"token comment"}},[t._v("# Redirect everything else to https")]),t._v("\n "),s("span",{pre:!0,attrs:{class:"token directive"}},[s("span",{pre:!0,attrs:{class:"token keyword"}},[t._v("location")]),t._v(" /")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("{")]),t._v("\n "),s("span",{pre:!0,attrs:{class:"token directive"}},[s("span",{pre:!0,attrs:{class:"token keyword"}},[t._v("return")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token number"}},[t._v("301")]),t._v(" https://"),s("span",{pre:!0,attrs:{class:"token variable"}},[t._v("$server_name")]),s("span",{pre:!0,attrs:{class:"token variable"}},[t._v("$request_uri")])]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(";")]),t._v("\n "),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("}")]),t._v("\n"),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("}")]),t._v("\n")])])]),s("p",[t._v("We will configure the https server part in the same config file once we obtained the SSL certificate.")]),t._v(" "),s("p",[t._v("Enable the web server config by creating a symlink and restarting nginx:")]),t._v(" "),s("div",{staticClass:"language-bash extra-class"},[s("pre",{pre:!0,attrs:{class:"language-bash"}},[s("code",[s("span",{pre:!0,attrs:{class:"token function"}},[t._v("ln")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token parameter variable"}},[t._v("-s")]),t._v(" /etc/nginx/sites-available/btcpayserver.conf /etc/nginx/sites-enabled/btcpayserver.conf\n\nsystemctl restart nginx\n")])])]),s("h4",{attrs:{id:"obtain-ssl-certificate-via-lets-encrypt"}},[s("a",{staticClass:"header-anchor",attrs:{href:"#obtain-ssl-certificate-via-lets-encrypt"}},[t._v("#")]),t._v(" Obtain SSL certificate via Let's Encrypt")]),t._v(" "),s("p",[t._v("Run the following command with adapted email and domain parameters:")]),t._v(" "),s("div",{staticClass:"language-bash extra-class"},[s("pre",{pre:!0,attrs:{class:"language-bash"}},[s("code",[t._v("certbot certonly --agree-tos "),s("span",{pre:!0,attrs:{class:"token parameter variable"}},[t._v("--email")]),t._v(" admin@mydomain.com "),s("span",{pre:!0,attrs:{class:"token parameter variable"}},[t._v("--webroot")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token parameter variable"}},[t._v("-w")]),t._v(" /var/lib/letsencrypt/ "),s("span",{pre:!0,attrs:{class:"token parameter variable"}},[t._v("-d")]),t._v(" btcpayserver.mydomain.com\n")])])]),s("h4",{attrs:{id:"nginx-configuration-https"}},[s("a",{staticClass:"header-anchor",attrs:{href:"#nginx-configuration-https"}},[t._v("#")]),t._v(" nginx configuration: https")]),t._v(" "),s("p",[t._v("Now that we have a valid SSL certificate, add the https server part at the end of "),s("code",[t._v("/etc/nginx/sites-available/btcpayserver.conf")]),t._v(":")]),t._v(" "),s("div",{staticClass:"language-nginx extra-class"},[s("pre",{pre:!0,attrs:{class:"language-nginx"}},[s("code",[s("span",{pre:!0,attrs:{class:"token directive"}},[s("span",{pre:!0,attrs:{class:"token keyword"}},[t._v("server")])]),t._v(" "),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("{")]),t._v("\n "),s("span",{pre:!0,attrs:{class:"token directive"}},[s("span",{pre:!0,attrs:{class:"token keyword"}},[t._v("listen")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token number"}},[t._v("443")]),t._v(" ssl http2")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(";")]),t._v("\n "),s("span",{pre:!0,attrs:{class:"token directive"}},[s("span",{pre:!0,attrs:{class:"token keyword"}},[t._v("server_name")]),t._v(" btcpayserver.mydomain.com")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(";")]),t._v("\n\n "),s("span",{pre:!0,attrs:{class:"token comment"}},[t._v("# SSL settings")]),t._v("\n "),s("span",{pre:!0,attrs:{class:"token directive"}},[s("span",{pre:!0,attrs:{class:"token keyword"}},[t._v("ssl_stapling")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token boolean"}},[t._v("on")])]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(";")]),t._v("\n "),s("span",{pre:!0,attrs:{class:"token directive"}},[s("span",{pre:!0,attrs:{class:"token keyword"}},[t._v("ssl_stapling_verify")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token boolean"}},[t._v("on")])]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(";")]),t._v("\n\n "),s("span",{pre:!0,attrs:{class:"token directive"}},[s("span",{pre:!0,attrs:{class:"token keyword"}},[t._v("ssl_session_timeout")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token number"}},[t._v("1d")])]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(";")]),t._v("\n "),s("span",{pre:!0,attrs:{class:"token directive"}},[s("span",{pre:!0,attrs:{class:"token keyword"}},[t._v("ssl_session_cache")]),t._v(" shared:SSL:10m")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(";")]),t._v("\n "),s("span",{pre:!0,attrs:{class:"token directive"}},[s("span",{pre:!0,attrs:{class:"token keyword"}},[t._v("ssl_session_tickets")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token boolean"}},[t._v("off")])]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(";")]),t._v("\n\n "),s("span",{pre:!0,attrs:{class:"token comment"}},[t._v("# Update this with the path of your certificate files")]),t._v("\n "),s("span",{pre:!0,attrs:{class:"token directive"}},[s("span",{pre:!0,attrs:{class:"token keyword"}},[t._v("ssl_certificate")]),t._v(" /etc/letsencrypt/live/btcpayserver.mydomain.com/fullchain.pem")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(";")]),t._v("\n "),s("span",{pre:!0,attrs:{class:"token directive"}},[s("span",{pre:!0,attrs:{class:"token keyword"}},[t._v("ssl_certificate_key")]),t._v(" /etc/letsencrypt/live/btcpayserver.mydomain.com/privkey.pem")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(";")]),t._v("\n\n "),s("span",{pre:!0,attrs:{class:"token directive"}},[s("span",{pre:!0,attrs:{class:"token keyword"}},[t._v("ssl_dhparam")]),t._v(" /etc/ssl/certs/dhparam.pem")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(";")]),t._v("\n "),s("span",{pre:!0,attrs:{class:"token directive"}},[s("span",{pre:!0,attrs:{class:"token keyword"}},[t._v("ssl_protocols")]),t._v(" TLSv1.2 TLSv1.3")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(";")]),t._v("\n "),s("span",{pre:!0,attrs:{class:"token directive"}},[s("span",{pre:!0,attrs:{class:"token keyword"}},[t._v("ssl_ciphers")]),t._v(" ECDHE-ECDSA-AES128-GCM-SHA256:ECDHE-RSA-AES128-GCM-SHA256:ECDHE-ECDSA-AES256-GCM-SHA384:ECDHE-RSA-AES256-GCM-SHA384:ECDHE-ECDSA-CHACHA20-POLY1305:ECDHE-RSA-CHACHA20-POLY1305:DHE-RSA-AES128-GCM-SHA256:DHE-RSA-AES256-GCM-SHA384")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(";")]),t._v("\n "),s("span",{pre:!0,attrs:{class:"token directive"}},[s("span",{pre:!0,attrs:{class:"token keyword"}},[t._v("ssl_prefer_server_ciphers")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token boolean"}},[t._v("off")])]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(";")]),t._v("\n\n "),s("span",{pre:!0,attrs:{class:"token directive"}},[s("span",{pre:!0,attrs:{class:"token keyword"}},[t._v("resolver")]),t._v(" 8.8.8.8 8.8.4.4 valid=300s")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(";")]),t._v("\n "),s("span",{pre:!0,attrs:{class:"token directive"}},[s("span",{pre:!0,attrs:{class:"token keyword"}},[t._v("resolver_timeout")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token number"}},[t._v("30s")])]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(";")]),t._v("\n\n "),s("span",{pre:!0,attrs:{class:"token directive"}},[s("span",{pre:!0,attrs:{class:"token keyword"}},[t._v("add_header")]),t._v(" Strict-Transport-Security "),s("span",{pre:!0,attrs:{class:"token string"}},[t._v('"max-age=63072000"')]),t._v(" always")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(";")]),t._v("\n "),s("span",{pre:!0,attrs:{class:"token directive"}},[s("span",{pre:!0,attrs:{class:"token keyword"}},[t._v("add_header")]),t._v(" Content-Security-Policy "),s("span",{pre:!0,attrs:{class:"token string"}},[t._v("\"frame-ancestors 'self';\"")])]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(";")]),t._v("\n "),s("span",{pre:!0,attrs:{class:"token directive"}},[s("span",{pre:!0,attrs:{class:"token keyword"}},[t._v("add_header")]),t._v(" X-Content-Type-Options nosniff")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(";")]),t._v("\n\n "),s("span",{pre:!0,attrs:{class:"token comment"}},[t._v("# Proxy requests to the socat service")]),t._v("\n "),s("span",{pre:!0,attrs:{class:"token directive"}},[s("span",{pre:!0,attrs:{class:"token keyword"}},[t._v("location")]),t._v(" /")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("{")]),t._v("\n "),s("span",{pre:!0,attrs:{class:"token directive"}},[s("span",{pre:!0,attrs:{class:"token keyword"}},[t._v("proxy_pass")]),t._v(" http://127.0.0.1:9081/")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(";")]),t._v("\n "),s("span",{pre:!0,attrs:{class:"token directive"}},[s("span",{pre:!0,attrs:{class:"token keyword"}},[t._v("proxy_http_version")]),t._v(" 1.1")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(";")]),t._v("\n "),s("span",{pre:!0,attrs:{class:"token directive"}},[s("span",{pre:!0,attrs:{class:"token keyword"}},[t._v("proxy_set_header")]),t._v(" Host "),s("span",{pre:!0,attrs:{class:"token variable"}},[t._v("$host")])]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(";")]),t._v("\n "),s("span",{pre:!0,attrs:{class:"token directive"}},[s("span",{pre:!0,attrs:{class:"token keyword"}},[t._v("proxy_set_header")]),t._v(" X-Real-IP "),s("span",{pre:!0,attrs:{class:"token variable"}},[t._v("$remote_addr")])]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(";")]),t._v("\n "),s("span",{pre:!0,attrs:{class:"token directive"}},[s("span",{pre:!0,attrs:{class:"token keyword"}},[t._v("proxy_set_header")]),t._v(" X-Forwarded-For "),s("span",{pre:!0,attrs:{class:"token variable"}},[t._v("$remote_addr")])]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(";")]),t._v("\n "),s("span",{pre:!0,attrs:{class:"token directive"}},[s("span",{pre:!0,attrs:{class:"token keyword"}},[t._v("proxy_set_header")]),t._v(" X-Forwarded-Proto "),s("span",{pre:!0,attrs:{class:"token variable"}},[t._v("$proxy_x_forwarded_proto")])]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(";")]),t._v("\n "),s("span",{pre:!0,attrs:{class:"token directive"}},[s("span",{pre:!0,attrs:{class:"token keyword"}},[t._v("proxy_set_header")]),t._v(" Upgrade "),s("span",{pre:!0,attrs:{class:"token variable"}},[t._v("$http_upgrade")])]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(";")]),t._v("\n "),s("span",{pre:!0,attrs:{class:"token directive"}},[s("span",{pre:!0,attrs:{class:"token keyword"}},[t._v("proxy_set_header")]),t._v(" Connection "),s("span",{pre:!0,attrs:{class:"token variable"}},[t._v("$connection_upgrade")])]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(";")]),t._v("\n "),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("}")]),t._v("\n"),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("}")]),t._v("\n")])])]),s("p",[t._v("Restart nginx once more:")]),t._v(" "),s("div",{staticClass:"language-bash extra-class"},[s("pre",{pre:!0,attrs:{class:"language-bash"}},[s("code",[t._v("systemctl restart nginx\n")])])]),s("p",[t._v("Now, visiting "),s("code",[t._v("btcpayserver.mydomain.com")]),t._v(" should show your BTCPay Server instance.")]),t._v(" "),s("div",{staticClass:"custom-block tip"},[s("p",{staticClass:"custom-block-title"},[t._v("TIP")]),t._v(" "),s("p",[t._v('If you see an nginx error of "503 Service Temporarily Unavailable" or similar but your BTCPay Server is reachable otherwise, you need to make BTCPay Server aware of your new domain. You can do so by using environment variables (Docker based setup), log into your BTCPay Server via SSH:')]),t._v(" "),s("div",{staticClass:"language-bash extra-class"},[s("pre",{pre:!0,attrs:{class:"language-bash"}},[s("code",[s("span",{pre:!0,attrs:{class:"token function"}},[t._v("sudo")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token function"}},[t._v("su")]),t._v(" -\n"),s("span",{pre:!0,attrs:{class:"token builtin class-name"}},[t._v("cd")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token variable"}},[t._v("$BTCPAY_BASE_DIRECTORY")]),t._v("/btcpayserver-docker/\n"),s("span",{pre:!0,attrs:{class:"token builtin class-name"}},[t._v("export")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token assign-left variable"}},[t._v("BTCPAY_ADDITIONAL_HOSTS")]),s("span",{pre:!0,attrs:{class:"token operator"}},[t._v("=")]),s("span",{pre:!0,attrs:{class:"token string"}},[t._v('"btcpayserver.mydomain.com"')]),t._v("\n"),s("span",{pre:!0,attrs:{class:"token builtin class-name"}},[t._v(".")]),t._v(" ./btcpay-setup.sh "),s("span",{pre:!0,attrs:{class:"token parameter variable"}},[t._v("-i")]),t._v("\n")])])])]),t._v(" "),s("h2",{attrs:{id:"do-all-this-in-a-docker-container"}},[s("a",{staticClass:"header-anchor",attrs:{href:"#do-all-this-in-a-docker-container"}},[t._v("#")]),t._v(" Do all this in a Docker container")]),t._v(" "),s("p",[t._v("Ready made "),s("a",{attrs:{href:"https://hub.docker.com/r/cloudgenius/socator",target:"_blank",rel:"noopener noreferrer"}},[t._v("Docker image"),s("OutboundLink")],1),t._v(" ("),s("a",{attrs:{href:"https://github.com/beacloudgenius/socator",target:"_blank",rel:"noopener noreferrer"}},[t._v("Code"),s("OutboundLink")],1),t._v(")")]),t._v(" "),s("h3",{attrs:{id:"socator-socat-tor"}},[s("a",{staticClass:"header-anchor",attrs:{href:"#socator-socat-tor"}},[t._v("#")]),t._v(" SocaTor = SOCAT + TOR")]),t._v(" "),s("p",[t._v("Based on "),s("a",{attrs:{href:"https://github.com/Arno0x/Docker-Socator",target:"_blank",rel:"noopener noreferrer"}},[t._v("Docker-Socator"),s("OutboundLink")],1)]),t._v(" "),s("p",[t._v("It uses socat to listen on a given TCP port (5000 in this example) and to redirect incoming traffic to a Tor hidden service specified through environment variables.\nIt acts as a relay between the standard web and a hidden service on the Tor network.\nYou can optionally restrict the IP addresses that are allowed to connect to this service by specifying an "),s("code",[t._v("ALLOWED_RANGE")]),t._v(" environment variable and using CIDR notation.")]),t._v(" "),s("p",[t._v("Please note:")]),t._v(" "),s("p",[t._v("This container does not have any nginx component because Kubernetes provides for it.")]),t._v(" "),s("h3",{attrs:{id:"usage"}},[s("a",{staticClass:"header-anchor",attrs:{href:"#usage"}},[t._v("#")]),t._v(" Usage")]),t._v(" "),s("p",[t._v("Break free from cloud services providers limitations, secure and protect your bitcoin full node, connect that with a BTC Pay server, all behind TOR.\nSelectively expose the BTCPay Server payment gateway and API to clearnet using socat+tor running on the Internet.")]),t._v(" "),s("hr"),t._v(" "),s("h4",{attrs:{id:"build"}},[s("a",{staticClass:"header-anchor",attrs:{href:"#build"}},[t._v("#")]),t._v(" Build")]),t._v(" "),s("div",{staticClass:"language-sh extra-class"},[s("pre",{pre:!0,attrs:{class:"language-sh"}},[s("code",[s("span",{pre:!0,attrs:{class:"token function"}},[t._v("docker")]),t._v(" build "),s("span",{pre:!0,attrs:{class:"token parameter variable"}},[t._v("-t")]),t._v(" cloudgenius/socator "),s("span",{pre:!0,attrs:{class:"token builtin class-name"}},[t._v(".")]),t._v("\n")])])]),s("h4",{attrs:{id:"push"}},[s("a",{staticClass:"header-anchor",attrs:{href:"#push"}},[t._v("#")]),t._v(" Push")]),t._v(" "),s("div",{staticClass:"language-sh extra-class"},[s("pre",{pre:!0,attrs:{class:"language-sh"}},[s("code",[s("span",{pre:!0,attrs:{class:"token function"}},[t._v("docker")]),t._v(" push cloudgenius/socator\n")])])]),s("h4",{attrs:{id:"start-the-image-in-background-daemon-mode-with-ip-address-restriction"}},[s("a",{staticClass:"header-anchor",attrs:{href:"#start-the-image-in-background-daemon-mode-with-ip-address-restriction"}},[t._v("#")]),t._v(" Start the image in background ("),s("em",[t._v("daemon mode")]),t._v(") with IP address restriction")]),t._v(" "),s("div",{staticClass:"language-sh extra-class"},[s("pre",{pre:!0,attrs:{class:"language-sh"}},[s("code",[s("span",{pre:!0,attrs:{class:"token function"}},[t._v("docker")]),t._v(" run "),s("span",{pre:!0,attrs:{class:"token parameter variable"}},[t._v("-d")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("\\")]),t._v("\n "),s("span",{pre:!0,attrs:{class:"token parameter variable"}},[t._v("-p")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token number"}},[t._v("5000")]),t._v(":5000 "),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("\\")]),t._v("\n "),s("span",{pre:!0,attrs:{class:"token parameter variable"}},[t._v("-e")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token string"}},[t._v('"ALLOWED_RANGE=192.168.1.0/24"')]),t._v(" "),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("\\")]),t._v("\n "),s("span",{pre:!0,attrs:{class:"token parameter variable"}},[t._v("-e")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token string"}},[t._v('"TOR_SITE=zqktlwiuavvvqqt4ybvgvi7tyo4hjl5xgfuvpdf6otjiycgwqbym2qad.onion"')]),t._v(" "),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("\\")]),t._v("\n "),s("span",{pre:!0,attrs:{class:"token parameter variable"}},[t._v("-e")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token string"}},[t._v('"TOR_SITE_PORT=80"')]),t._v(" "),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("\\")]),t._v("\n "),s("span",{pre:!0,attrs:{class:"token parameter variable"}},[t._v("--name")]),t._v(" socator "),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("\\")]),t._v("\n cloudgenius/socator\n")])])]),s("h4",{attrs:{id:"start-the-image-in-foreground"}},[s("a",{staticClass:"header-anchor",attrs:{href:"#start-the-image-in-foreground"}},[t._v("#")]),t._v(" Start the image in foreground")]),t._v(" "),s("div",{staticClass:"language-sh extra-class"},[s("pre",{pre:!0,attrs:{class:"language-sh"}},[s("code",[s("span",{pre:!0,attrs:{class:"token function"}},[t._v("docker")]),t._v(" run "),s("span",{pre:!0,attrs:{class:"token parameter variable"}},[t._v("--rm")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token parameter variable"}},[t._v("-ti")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("\\")]),t._v("\n "),s("span",{pre:!0,attrs:{class:"token parameter variable"}},[t._v("-p")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token number"}},[t._v("5000")]),t._v(":5000 "),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("\\")]),t._v("\n "),s("span",{pre:!0,attrs:{class:"token parameter variable"}},[t._v("-e")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token string"}},[t._v('"TOR_SITE=zqktlwiuavvvqqt4ybvgvi7tyo4hjl5xgfuvpdf6otjiycgwqbym2qad.onion"')]),t._v(" "),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("\\")]),t._v("\n "),s("span",{pre:!0,attrs:{class:"token parameter variable"}},[t._v("-e")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token string"}},[t._v('"TOR_SITE_PORT=80"')]),t._v(" "),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("\\")]),t._v("\n "),s("span",{pre:!0,attrs:{class:"token parameter variable"}},[t._v("--name")]),t._v(" socator "),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("\\")]),t._v("\n cloudgenius/socator\n")])])]),s("p",[t._v("Now "),s("code",[t._v("http://localhost:5000")]),t._v(" should show you the tor hidden service you specified in the above command.")]),t._v(" "),s("h2",{attrs:{id:"use-that-docker-container-in-a-kubernetes-cluster-using-these-manifests"}},[s("a",{staticClass:"header-anchor",attrs:{href:"#use-that-docker-container-in-a-kubernetes-cluster-using-these-manifests"}},[t._v("#")]),t._v(" Use that Docker container in a Kubernetes Cluster using these manifests")]),t._v(" "),s("p",[t._v("These manifest assumes a typical Kubernetes cluster that exposes internal services (like socator running internallly at port 5000) to the clearnet/public internet via "),s("a",{attrs:{href:"https://github.com/kubernetes/ingress-nginx",target:"_blank",rel:"noopener noreferrer"}},[t._v("Nginx Ingress"),s("OutboundLink")],1),t._v(" and provide automated Let's Encrypt TLS/SSL certificates via "),s("a",{attrs:{href:"https://github.com/jetstack/cert-manager",target:"_blank",rel:"noopener noreferrer"}},[t._v("cert-manager"),s("OutboundLink")],1),t._v(".")]),t._v(" "),s("p",[t._v("Deployment manifest")]),t._v(" "),s("div",{staticClass:"language-yaml extra-class"},[s("pre",{pre:!0,attrs:{class:"language-yaml"}},[s("code",[s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("---")]),t._v("\n"),s("span",{pre:!0,attrs:{class:"token key atrule"}},[t._v("apiVersion")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(":")]),t._v(" apps/v1\n"),s("span",{pre:!0,attrs:{class:"token key atrule"}},[t._v("kind")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(":")]),t._v(" Deployment\n"),s("span",{pre:!0,attrs:{class:"token key atrule"}},[t._v("metadata")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(":")]),t._v("\n "),s("span",{pre:!0,attrs:{class:"token key atrule"}},[t._v("name")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(":")]),t._v(" socator\n"),s("span",{pre:!0,attrs:{class:"token key atrule"}},[t._v("spec")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(":")]),t._v("\n "),s("span",{pre:!0,attrs:{class:"token key atrule"}},[t._v("replicas")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(":")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token number"}},[t._v("1")]),t._v("\n "),s("span",{pre:!0,attrs:{class:"token key atrule"}},[t._v("selector")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(":")]),t._v("\n "),s("span",{pre:!0,attrs:{class:"token key atrule"}},[t._v("matchLabels")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(":")]),t._v("\n "),s("span",{pre:!0,attrs:{class:"token key atrule"}},[t._v("role")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(":")]),t._v(" socator\n "),s("span",{pre:!0,attrs:{class:"token key atrule"}},[t._v("template")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(":")]),t._v("\n "),s("span",{pre:!0,attrs:{class:"token key atrule"}},[t._v("metadata")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(":")]),t._v("\n "),s("span",{pre:!0,attrs:{class:"token key atrule"}},[t._v("labels")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(":")]),t._v("\n "),s("span",{pre:!0,attrs:{class:"token key atrule"}},[t._v("role")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(":")]),t._v(" socator\n "),s("span",{pre:!0,attrs:{class:"token key atrule"}},[t._v("spec")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(":")]),t._v("\n "),s("span",{pre:!0,attrs:{class:"token key atrule"}},[t._v("containers")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(":")]),t._v("\n "),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("-")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token key atrule"}},[t._v("image")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(":")]),t._v(" cloudgenius/socator "),s("span",{pre:!0,attrs:{class:"token comment"}},[t._v("# code https://github.com/beacloudgenius/socator")]),t._v("\n "),s("span",{pre:!0,attrs:{class:"token key atrule"}},[t._v("imagePullPolicy")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(":")]),t._v(" IfNotPresent\n "),s("span",{pre:!0,attrs:{class:"token key atrule"}},[t._v("name")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(":")]),t._v(" socator\n "),s("span",{pre:!0,attrs:{class:"token key atrule"}},[t._v("env")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(":")]),t._v("\n "),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("-")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token key atrule"}},[t._v("name")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(":")]),t._v(" TOR_SITE\n "),s("span",{pre:!0,attrs:{class:"token key atrule"}},[t._v("value")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(":")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token string"}},[t._v("'zqktlwiuavvvqqt4ybvgvi7tyo4hjl5xgfuvpdf6otjiycgwqbym2qad.onion'")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token comment"}},[t._v("# BTCPay Server Tor address => docker exec tor cat /var/lib/tor/app-btcpay-server/hostname")]),t._v("\n "),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("-")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token key atrule"}},[t._v("name")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(":")]),t._v(" TOR_SITE_PORT\n "),s("span",{pre:!0,attrs:{class:"token key atrule"}},[t._v("value")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(":")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token string"}},[t._v("'80'")]),t._v("\n")])])]),s("p",[t._v("Service manifest")]),t._v(" "),s("div",{staticClass:"language-yaml extra-class"},[s("pre",{pre:!0,attrs:{class:"language-yaml"}},[s("code",[s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("---")]),t._v("\n"),s("span",{pre:!0,attrs:{class:"token key atrule"}},[t._v("apiVersion")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(":")]),t._v(" v1\n"),s("span",{pre:!0,attrs:{class:"token key atrule"}},[t._v("kind")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(":")]),t._v(" Service\n"),s("span",{pre:!0,attrs:{class:"token key atrule"}},[t._v("metadata")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(":")]),t._v("\n "),s("span",{pre:!0,attrs:{class:"token key atrule"}},[t._v("name")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(":")]),t._v(" socator\n"),s("span",{pre:!0,attrs:{class:"token key atrule"}},[t._v("spec")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(":")]),t._v("\n "),s("span",{pre:!0,attrs:{class:"token key atrule"}},[t._v("ports")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(":")]),t._v("\n "),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("-")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token key atrule"}},[t._v("name")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(":")]),t._v(" http\n "),s("span",{pre:!0,attrs:{class:"token key atrule"}},[t._v("port")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(":")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token number"}},[t._v("5000")]),t._v("\n "),s("span",{pre:!0,attrs:{class:"token key atrule"}},[t._v("selector")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(":")]),t._v("\n "),s("span",{pre:!0,attrs:{class:"token key atrule"}},[t._v("role")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(":")]),t._v(" socator\n")])])]),s("p",[t._v("Ingress manifest")]),t._v(" "),s("div",{staticClass:"language-yaml extra-class"},[s("pre",{pre:!0,attrs:{class:"language-yaml"}},[s("code",[s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("---")]),t._v("\n"),s("span",{pre:!0,attrs:{class:"token key atrule"}},[t._v("apiVersion")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(":")]),t._v(" networking.k8s.io/v1\n"),s("span",{pre:!0,attrs:{class:"token key atrule"}},[t._v("kind")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(":")]),t._v(" Ingress\n"),s("span",{pre:!0,attrs:{class:"token key atrule"}},[t._v("metadata")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(":")]),t._v("\n "),s("span",{pre:!0,attrs:{class:"token key atrule"}},[t._v("name")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(":")]),t._v(" socator\n "),s("span",{pre:!0,attrs:{class:"token key atrule"}},[t._v("annotations")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(":")]),t._v("\n "),s("span",{pre:!0,attrs:{class:"token key atrule"}},[t._v("kubernetes.io/ingress.class")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(":")]),t._v(" nginx\n "),s("span",{pre:!0,attrs:{class:"token key atrule"}},[t._v("cert-manager.io/cluster-issuer")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(":")]),t._v(" letsencrypt"),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("-")]),t._v("prod\n"),s("span",{pre:!0,attrs:{class:"token key atrule"}},[t._v("spec")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(":")]),t._v("\n "),s("span",{pre:!0,attrs:{class:"token key atrule"}},[t._v("rules")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(":")]),t._v("\n "),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("-")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token key atrule"}},[t._v("host")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(":")]),t._v(" btcpayserver.mydomain.com\n "),s("span",{pre:!0,attrs:{class:"token key atrule"}},[t._v("http")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(":")]),t._v("\n "),s("span",{pre:!0,attrs:{class:"token key atrule"}},[t._v("paths")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(":")]),t._v("\n "),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("-")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token key atrule"}},[t._v("backend")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(":")]),t._v("\n "),s("span",{pre:!0,attrs:{class:"token key atrule"}},[t._v("service")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(":")]),t._v("\n "),s("span",{pre:!0,attrs:{class:"token key atrule"}},[t._v("name")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(":")]),t._v(" socator\n "),s("span",{pre:!0,attrs:{class:"token key atrule"}},[t._v("port")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(":")]),t._v("\n "),s("span",{pre:!0,attrs:{class:"token key atrule"}},[t._v("number")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(":")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token number"}},[t._v("5000")]),t._v("\n "),s("span",{pre:!0,attrs:{class:"token key atrule"}},[t._v("path")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(":")]),t._v(" /\n "),s("span",{pre:!0,attrs:{class:"token key atrule"}},[t._v("pathType")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(":")]),t._v(" Prefix\n "),s("span",{pre:!0,attrs:{class:"token key atrule"}},[t._v("tls")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(":")]),t._v("\n "),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("-")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token key atrule"}},[t._v("hosts")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(":")]),t._v("\n "),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("-")]),t._v(" btcpayserver.mydomain.com\n "),s("span",{pre:!0,attrs:{class:"token key atrule"}},[t._v("secretName")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(":")]),t._v(" socator"),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("-")]),t._v("tls\n")])])]),s("h2",{attrs:{id:"resources"}},[s("a",{staticClass:"header-anchor",attrs:{href:"#resources"}},[t._v("#")]),t._v(" Resources")]),t._v(" "),s("ul",[s("li",[s("a",{attrs:{href:"https://itgala.xyz/nginx-reverse-proxy-to-onion-site-in-tor-network/",target:"_blank",rel:"noopener noreferrer"}},[t._v("nginx reverse proxy to .onion site in Tor network"),s("OutboundLink")],1)]),t._v(" "),s("li",[s("a",{attrs:{href:"https://github.com/openoms/bitcoin-tutorials/blob/master/tor2ip_tunnel.md",target:"_blank",rel:"noopener noreferrer"}},[t._v("Tor-to-IP tunnel service"),s("OutboundLink")],1)]),t._v(" "),s("li",[s("a",{attrs:{href:"https://stackoverflow.com/questions/55487324/how-to-make-a-nginx-reverse-proxy-direct-to-tor-hidden-service",target:"_blank",rel:"noopener noreferrer"}},[t._v("How to make a nginx reverse proxy direct to tor hidden service"),s("OutboundLink")],1)]),t._v(" "),s("li",[s("a",{attrs:{href:"https://linuxize.com/post/secure-nginx-with-let-s-encrypt-on-debian-10/",target:"_blank",rel:"noopener noreferrer"}},[t._v("Secure Nginx with Let's Encrypt on Debian 10 Linux"),s("OutboundLink")],1)]),t._v(" "),s("li",[s("a",{attrs:{href:"http://nginx.org/en/docs/http/websocket.html",target:"_blank",rel:"noopener noreferrer"}},[t._v("Nginx WebSocket proxying"),s("OutboundLink")],1)])])])}),[],!1,null,null,null);s.default=n.exports}}]); \ No newline at end of file diff --git a/assets/js/12.fbd0a972.js b/assets/js/12.491ce2be.js similarity index 82% rename from assets/js/12.fbd0a972.js rename to assets/js/12.491ce2be.js index 1ed8c8d22e..0904c4e2b4 100644 --- a/assets/js/12.fbd0a972.js +++ b/assets/js/12.491ce2be.js @@ -1 +1 @@ -(window.webpackJsonp=window.webpackJsonp||[]).push([[12],{301:function(e,t,o){e.exports=o.p+"assets/img/16_wix_btcpay-config.5f3fa8a9.png"},638:function(e,t,o){e.exports=o.p+"assets/img/01_wix_dev-mode.d3ebf3bb.png"},639:function(e,t,o){e.exports=o.p+"assets/img/02_wix_service-plugin-payment.99ffd208.png"},640:function(e,t,o){e.exports=o.p+"assets/img/03_wix_ppsp-start-now.044a2d88.png"},641:function(e,t,o){e.exports=o.p+"assets/img/04_wix_ppsp-legal-notice.658c1fe6.png"},642:function(e,t,o){e.exports=o.p+"assets/img/05_wix_ppsp-name.990dfe01.png"},643:function(e,t,o){e.exports=o.p+"assets/img/06_wix_ppsp-btcpay-config.5d4b9637.png"},644:function(e,t,o){e.exports=o.p+"assets/img/07_wix_gh-btcpay-config.a90cd4e2.png"},645:function(e,t,o){e.exports=o.p+"assets/img/08_wix_ppsp-btcpay-config-complete.06d14fc5.png"},646:function(e,t,o){e.exports=o.p+"assets/img/09_wix_gh-btcpay.f4ba84b1.png"},647:function(e,t,o){e.exports=o.p+"assets/img/10_wix_ppsp-btcpay.aa84c719.png"},648:function(e,t,o){e.exports=o.p+"assets/img/11_wix_backend-expose-site-api.a7733acf.png"},649:function(e,t,o){e.exports=o.p+"assets/img/12_wix_backend-http-functions.ba365413.png"},650:function(e,t,o){e.exports=o.p+"assets/img/13_wix_settings.9275944e.png"},651:function(e,t,o){e.exports=o.p+"assets/img/14_wix_accept-payments.984c3b09.png"},652:function(e,t,o){e.exports=o.p+"assets/img/15_wix_list-btcpay.aabe82d7.png"},653:function(e,t,o){e.exports=o.p+"assets/img/17_btcpay-api-key-page.a525c66b.png"},654:function(e,t,o){e.exports=o.p+"assets/img/18_btcpay-api-key-permissions-1.2a52f496.png"},655:function(e,t,o){e.exports=o.p+"assets/img/18_btcpay-api-key-permissions-2.4a634a53.png"},656:function(e,t,o){e.exports=o.p+"assets/img/19_btcpay-api-key-copy.4cb4fc6a.png"},657:function(e,t,o){e.exports=o.p+"assets/img/20_btcpay-store-id.62536621.png"},658:function(e,t,o){e.exports=o.p+"assets/img/21_btcpay-webhook-page.6ca3fd85.png"},659:function(e,t,o){e.exports=o.p+"assets/img/22_btcpay-webhook-saved.1e659e6d.png"},660:function(e,t,o){e.exports=o.p+"assets/img/23_wix_btcpay-config-saved.30337d07.png"},860:function(e,t,o){"use strict";o.r(t);var a=o(10),i=Object(a.a)({},(function(){var e=this,t=e._self._c;return t("ContentSlotsDistributor",{attrs:{"slot-key":e.$parent.slotKey}},[t("h1",{attrs:{id:"btcpay-server-integration-for-wix"}},[t("a",{staticClass:"header-anchor",attrs:{href:"#btcpay-server-integration-for-wix"}},[e._v("#")]),e._v(" BTCPay Server integration for Wix")]),e._v(" "),t("p",[e._v("This guide will show you how you can enable Bitcoin payments using BTCPay Server on your Wix store. At the time of writing it is not possible to package this into a Wix app, so you will need to follow the steps below and copy and paste the code into your Wix editor.")]),e._v(" "),t("h2",{attrs:{id:"requirements"}},[t("a",{staticClass:"header-anchor",attrs:{href:"#requirements"}},[e._v("#")]),e._v(" Requirements")]),e._v(" "),t("ul",[t("li",[e._v("You have a "),t("a",{attrs:{href:"https://wix.com",target:"_blank",rel:"noopener noreferrer"}},[e._v("Wix"),t("OutboundLink")],1),e._v(" account and online store up and running")]),e._v(" "),t("li",[e._v("You have a BTCPay Server version 1.10.0 or later, either "),t("RouterLink",{attrs:{to:"/Deployment/"}},[e._v("self-hosted")]),e._v(" or "),t("RouterLink",{attrs:{to:"/Deployment/ThirdPartyHosting/"}},[e._v("hosted by a third-party")]),e._v(".")],1),e._v(" "),t("li",[e._v("BTCPay needs to be reachable from the internet via a domain, e.g. https://mainnet.demo.btcpayserver.org")]),e._v(" "),t("li",[t("RouterLink",{attrs:{to:"/RegisterAccount/"}},[e._v("You've a registered account on the instance")])],1),e._v(" "),t("li",[t("RouterLink",{attrs:{to:"/CreateStore/"}},[e._v("You've a BTCPay store on the instance")])],1),e._v(" "),t("li",[t("RouterLink",{attrs:{to:"/WalletSetup/"}},[e._v("You've a wallet connected to your store")]),e._v(" and/or "),t("RouterLink",{attrs:{to:"/LightningNetwork/"}},[e._v("Lightning Network")]),e._v(" enabled or connected.")],1)]),e._v(" "),t("h2",{attrs:{id:"create-a-payment-provider-service-plugin-ppsp"}},[t("a",{staticClass:"header-anchor",attrs:{href:"#create-a-payment-provider-service-plugin-ppsp"}},[e._v("#")]),e._v(" Create a payment provider service plugin (PPSP)")]),e._v(" "),t("ol",[t("li",[e._v("In your Wix site, open your Wix Editor.")]),e._v(" "),t("li",[e._v('At the top click on "'),t("strong",[e._v("Dev Mode")]),e._v('" and the "'),t("strong",[e._v("Turn on Dev Mode")]),e._v('" button to enable the developer mode.\n'),t("img",{attrs:{src:o(638),alt:"Dev Mode",title:"Dev Mode"}})]),e._v(" "),t("li",[e._v("Now on the left side, click on the "),t("code",[e._v("{ }")]),e._v(" icon to open the code editor.")]),e._v(" "),t("li",[e._v('In the section "Service Plugins" click on the '),t("strong",[e._v("(+)")]),e._v(' sign and select "'),t("strong",[e._v("Payment")]),e._v('"\n'),t("img",{attrs:{src:o(639),alt:"Add payment provider service plugin",title:"Add payment provider service plugin"}})]),e._v(" "),t("li",[e._v('On the following screen, click "'),t("strong",[e._v("Start now")]),e._v('"\n'),t("img",{attrs:{src:o(640),alt:"Start now",title:"Start now"}})]),e._v(" "),t("li",[e._v('On the legal terms page, check the terms and click "'),t("strong",[e._v("Accept")]),e._v('"\n'),t("img",{attrs:{src:o(641),alt:"Accept terms",title:"Accept terms"}})]),e._v(" "),t("li",[e._v('Now enter the name of the plugin: "'),t("strong",[e._v("BTCPay")]),e._v('" (you can use any name but this will make it easier to follow the guide). Then, click "Add & Edit Code":\n'),t("img",{attrs:{src:o(642),alt:"Add & Edit Code",title:"Add & Edit Code"}})]),e._v(" "),t("li",[e._v('This created the directory "BTCPay" containing two files: '),t("code",[e._v("BTCPay.js")]),e._v(" and "),t("code",[e._v("BTCPay-config.js")]),e._v(" which is open in the editor.\n"),t("img",{attrs:{src:o(643),alt:"BTCPay-config.js",title:"BTCPay-config.js"}})]),e._v(" "),t("li",[e._v("Next steps are to copy the contents of those two files from our "),t("a",{attrs:{href:"https://github.com/btcpayserver/wix",target:"_blank",rel:"noopener noreferrer"}},[e._v("Git repository"),t("OutboundLink")],1),e._v(". You can see the same data structure as on your wix editor. In the "),t("code",[e._v("BTCPay-config.js")]),e._v(" file, paste the code from the same file on our Git repository: "),t("a",{attrs:{href:"https://github.com/btcpayserver/wix/blob/main/backend/service-plugins/payment-provider/BTCPay/BTCPay-config.js",target:"_blank",rel:"noopener noreferrer"}},[e._v("BTCPay-config.js"),t("OutboundLink")],1),e._v('. Easiest to click the "'),t("strong",[e._v("Copy raw file")]),e._v('" icon.\n'),t("img",{attrs:{src:o(644),alt:"BTCPay-config.js",title:"BTCPay-config.js"}})]),e._v(" "),t("li",[e._v("Make sure you delete example code on the "),t("code",[e._v("BTCPay-config.js")]),e._v(" file in the wix editor before pasting the new code.\n"),t("img",{attrs:{src:o(645),alt:"BTCPay-config.js completed",title:"BTCPay-config.js completed"}})]),e._v(" "),t("li",[e._v("Now, open the "),t("code",[e._v("BTCPay.js")]),e._v(" file in the wix editor and paste the code from our Git repository: "),t("a",{attrs:{href:"https://github.com/btcpayserver/wix/blob/main/backend/service-plugins/payment-provider/BTCPay/BTCPay.js",target:"_blank",rel:"noopener noreferrer"}},[e._v("BTCPay.js"),t("OutboundLink")],1),e._v(". Do not forget to remove all the example code from the file before pasting the copied code.\n"),t("img",{attrs:{src:o(646),alt:"BTCPay.js",title:"BTCPay.js"}}),e._v(" "),t("img",{attrs:{src:o(647),alt:"BTCPay.js",title:"BTCPay.js"}})]),e._v(" "),t("li",[e._v("Now we need to add the "),t("code",[e._v("http-functions.js")]),e._v(" file to the "),t("code",[e._v("backend")]),e._v(' directory. To do so, in the "backend" section of your editor click again on the '),t("strong",[e._v("(+)")]),e._v(' icon and select "'),t("strong",[e._v("Expose Site API")]),e._v('" which creates the mentioned '),t("code",[e._v("http-functions.js")]),e._v(" file. Note: If you already have that file present then you can skip this step.\n"),t("img",{attrs:{src:o(648),alt:"Create http-functions.js",title:"Create http-functions.js"}})]),e._v(" "),t("li",[e._v("Copy the code from our Git repository: "),t("a",{attrs:{href:"https://github.com/btcpayserver/wix/blob/main/backend/http-functions.js",target:"_blank",rel:"noopener noreferrer"}},[e._v("http-functions.js"),t("OutboundLink")],1),e._v(". If you already had a "),t("code",[e._v("http-functions.js")]),e._v(" file, make sure to add the code from the Git repository to the existing file add the copied code below the existing code. If not then make sure you delete all the example code before pasting the code from GitHub.\n"),t("img",{attrs:{src:o(649),alt:"http-functions.js",title:"http-functions.js"}})]),e._v(" "),t("li",[e._v("Now the code is done it is important to click on publish to save the changes and make the plugin available.")])]),e._v(" "),t("h2",{attrs:{id:"configure-the-payment-service-provider-plugin-pspp"}},[t("a",{staticClass:"header-anchor",attrs:{href:"#configure-the-payment-service-provider-plugin-pspp"}},[e._v("#")]),e._v(" Configure the payment service provider plugin (PSPP)")]),e._v(" "),t("ol",[t("li",[e._v("Go back to your site's dashboard. On the left menu click on \""),t("strong",[e._v("Settings")]),e._v('", on that page click "'),t("strong",[e._v("Accept Payments")]),e._v('"\n'),t("img",{attrs:{src:o(650),alt:"Settings",title:"Settings"}}),e._v(" "),t("img",{attrs:{src:o(651),alt:"Accept Payments",title:"Accept Payments"}})]),e._v(" "),t("li",[e._v('On the following page, you should see "Bitcoin Payments with BTCPay" as payment provider. If not, try to refresh the page to clear the Wix cache. Click on "Connect"\n'),t("img",{attrs:{src:o(652),alt:"BTCPay",title:"BTCPay"}})]),e._v(" "),t("li",[e._v("You are now on the configuration page. You need to enter the following fields:\n"),t("ul",[t("li",[t("strong",[e._v("BTCPay URL")]),e._v(": The URL of your BTCPay Server instance, e.g. "),t("code",[e._v("https://btcpay.example.com")])]),e._v(" "),t("li",[t("strong",[e._v("API Key")]),e._v(": The API key of your BTCPay store")]),e._v(" "),t("li",[t("strong",[e._v("Store ID")]),e._v(": The store ID of your BTCPay store")]),e._v(" "),t("li",[t("strong",[e._v("Webhook Secret")]),e._v(": The webhook secret of your BTCPay store\n"),t("img",{attrs:{src:o(301),alt:"Configuration",title:"Configuration"}})])])])]),e._v(" "),t("h3",{attrs:{id:"btcpay-server-url"}},[t("a",{staticClass:"header-anchor",attrs:{href:"#btcpay-server-url"}},[e._v("#")]),e._v(" BTCPay Server URL")]),e._v(" "),t("ol",[t("li",[e._v('First, enter the "'),t("strong",[e._v("BTCPay Server URL")]),e._v('", in our case '),t("code",[e._v("https://testing.btcpay.tech")])]),e._v(" "),t("li",[e._v('Next, you need to get the API Key, Store ID, and Webhook Secret from your BTCPay store. To do so, log in to your BTCPay store. We assume you already have a store setup, in our guide here it is called "Wix BTCPay Demo"')])]),e._v(" "),t("h3",{attrs:{id:"api-key"}},[t("a",{staticClass:"header-anchor",attrs:{href:"#api-key"}},[e._v("#")]),e._v(" API Key")]),e._v(" "),t("ol",[t("li",[e._v('Go to the API Keys page under "'),t("strong",[e._v("Account")]),e._v('" -> "'),t("strong",[e._v("API Keys")]),e._v('" (For BTCPay Server versions prior 2.0 it is under "Account" -> "Manage Account" -> "API Keys"). Click on "'),t("strong",[e._v("Generate Key")]),e._v('"\n'),t("img",{attrs:{src:o(653),alt:"API Keys",title:"API Keys"}})]),e._v(" "),t("li",[e._v('Enter a label such as "Wix API Key".')]),e._v(" "),t("li",[e._v('For the permissions, click on the "'),t("em",[t("strong",[e._v("Select specific stores")])]),e._v('" link and select the store you want to connect to Wix, in our example "Wix BTCPay Demo" - for the following permissions: '),t("code",[e._v("View invoices")]),e._v(", "),t("code",[e._v("Create invoice")]),e._v(", "),t("code",[e._v("Modify invoices")]),e._v(", "),t("code",[e._v("Modify stores webhooks")]),e._v(", "),t("code",[e._v("View your stores")]),e._v(", "),t("code",[e._v("Create non-approved pull payments")]),e._v(" (used for refunds in the future)\n"),t("img",{attrs:{src:o(654),alt:"API Key permissions 1",title:"API Key permissions 1"}}),e._v(" "),t("img",{attrs:{src:o(655),alt:"API Key permissions 2",title:"API Key permissions 2"}})]),e._v(" "),t("li",[e._v('Click on "'),t("strong",[e._v("Generate API Key")]),e._v('" button and on the following page copy the API Key shown at the top\n'),t("img",{attrs:{src:o(656),alt:"Copy generated API key",title:"Copy generated API key"}})]),e._v(" "),t("li",[e._v('In your Wix store: paste that copied API key into the "'),t("strong",[e._v("API Key")]),e._v('" field')])]),e._v(" "),t("h3",{attrs:{id:"store-id"}},[t("a",{staticClass:"header-anchor",attrs:{href:"#store-id"}},[e._v("#")]),e._v(" Store ID")]),e._v(" "),t("ol",[t("li",[e._v('Go back to your BTCPay store and copy the "'),t("strong",[e._v("Store ID")]),e._v('". Go to your store and click on "Settings" and copy the Store ID shown\n'),t("img",{attrs:{src:o(657),alt:"Copy Store ID",title:"Copy Store ID"}})]),e._v(" "),t("li",[e._v('In your Wix store: paste that copied Store ID into the "'),t("strong",[e._v("Store ID")]),e._v('" field')])]),e._v(" "),t("h3",{attrs:{id:"webhook-secret"}},[t("a",{staticClass:"header-anchor",attrs:{href:"#webhook-secret"}},[e._v("#")]),e._v(" Webhook Secret")]),e._v(" "),t("ol",[t("li",[e._v('Go back to your BTCPay store and click on "Settings" -> "Webhooks". Click on "Create Webhook"\n'),t("img",{attrs:{src:o(658),alt:"Create webhook page",title:"Create webhook page"}})]),e._v(" "),t("li",[t("strong",[e._v("Payload URL")]),e._v(": Your Wix store URL where it can be reached combined with a callback path. E.g. "),t("code",[e._v("https://example.com/_functions/btcpayTrxWebHook")]),e._v(" (replace example.com with your Wix store URL)")]),e._v(" "),t("li",[t("strong",[e._v("Secret")]),e._v(': This is auto-generated by BTCPay, you can show it by clicking on the "eye" icon')]),e._v(" "),t("li",[e._v('Copy the "'),t("strong",[e._v("Secret")]),e._v('" and paste it into the "'),t("strong",[e._v("Webhook Secret")]),e._v("\" field in your Wix store e.g. 'YOURWEBHOOKSECRET' as shown in our example")]),e._v(" "),t("li",[e._v("Back on BTCPay webhook page, you can leave the other settings as is")]),e._v(" "),t("li",[e._v('Click on "'),t("strong",[e._v("Add Webhook")]),e._v('" to create the webhook on BTCPay. You should see the "The webhook has been created." message\n'),t("img",{attrs:{src:o(659),alt:"Webhook created successfully",title:"Webhook created successfully"}})])]),e._v(" "),t("h3",{attrs:{id:"save-the-configuration"}},[t("a",{staticClass:"header-anchor",attrs:{href:"#save-the-configuration"}},[e._v("#")]),e._v(" Save the configuration")]),e._v(" "),t("ol",[t("li",[e._v('Back in your Wix store, click on "'),t("strong",[e._v("Connect")]),e._v('" to save the configuration\n'),t("img",{attrs:{src:o(301),alt:"Save configuration",title:"Save configuration"}}),e._v(" "),t("img",{attrs:{src:o(660),alt:"Configuration saved",title:"Configuration saved"}})])]),e._v(" "),t("h2",{attrs:{id:"testing"}},[t("a",{staticClass:"header-anchor",attrs:{href:"#testing"}},[e._v("#")]),e._v(" Testing")]),e._v(" "),t("p",[e._v('You are now ready to test your BTCPay integration on your Wix store. Add some products to the cart and go through the checkout process and select "'),t("strong",[e._v("Bitcoin payments with BTCPay")]),e._v('"')]),e._v(" "),t("h2",{attrs:{id:"troubleshooting-faq"}},[t("a",{staticClass:"header-anchor",attrs:{href:"#troubleshooting-faq"}},[e._v("#")]),e._v(" Troubleshooting / FAQ")]),e._v(" "),t("h3",{attrs:{id:"it-does-not-work-what-can-i-do"}},[t("a",{staticClass:"header-anchor",attrs:{href:"#it-does-not-work-what-can-i-do"}},[e._v("#")]),e._v(" It does not work, what can I do?")]),e._v(" "),t("ul",[t("li",[e._v("Make sure you followed the guide step by step and copied the right values into the right places")]),e._v(" "),t("li",[e._v('In Wix under "'),t("strong",[e._v("Developer tools")]),e._v('" select "'),t("strong",[e._v("Logging Tools")]),e._v('" and there open the "'),t("strong",[e._v("Wix Logs")]),e._v('", it will live log any errors. So try to do the checkout or save the configuration form to see if there is any error.')])]),e._v(" "),t("h3",{attrs:{id:"after-copying-the-code-from-the-git-repository-i-dont-see-the-payment-method-listed-in-accept-payments-"}},[t("a",{staticClass:"header-anchor",attrs:{href:"#after-copying-the-code-from-the-git-repository-i-dont-see-the-payment-method-listed-in-accept-payments-"}},[e._v("#")]),e._v(' After copying the code from the Git repository, I don\'t see the payment method listed in "Accept payments"')]),e._v(" "),t("p",[e._v('Try to delete the browser cache and reload the page. You can also try to go into editor and click on "Publish" to save the changes. Then reload the payment method list page again.')]),e._v(" "),t("h3",{attrs:{id:"how-can-i-change-the-text-of-the-payment-method-bitcoin-payments-with-btcpay-in-the-checkout"}},[t("a",{staticClass:"header-anchor",attrs:{href:"#how-can-i-change-the-text-of-the-payment-method-bitcoin-payments-with-btcpay-in-the-checkout"}},[e._v("#")]),e._v(' How can I change the text of the payment method, "Bitcoin Payments with BTCPay" in the checkout?')]),e._v(" "),t("p",[e._v("You need to go into your Wix Editor and edit the file "),t("code",[e._v("BTCPay-config.js")]),e._v(". You can change the text in the "),t("code",[e._v("title")]),e._v(" field")]),e._v(" "),t("div",{staticClass:"language- extra-class"},[t("pre",{pre:!0,attrs:{class:"language-text"}},[t("code",[e._v("...\nhostedPage: {\n title: 'Bitcoin Payments with BTCPay', // change this line\n billingAddressMandatoryFields: ['EMAIL'],\n...\n")])])]),t("h3",{attrs:{id:"i-still-have-a-problem-where-can-i-get-help"}},[t("a",{staticClass:"header-anchor",attrs:{href:"#i-still-have-a-problem-where-can-i-get-help"}},[e._v("#")]),e._v(" I still have a problem, where can I get help?")]),e._v(" "),t("p",[e._v("Feel free to join our support channel over at "),t("a",{attrs:{href:"https://chat.btcpayserver.org/",target:"_blank",rel:"noopener noreferrer"}},[e._v("https://chat.btcpayserver.org/"),t("OutboundLink")],1),e._v(" if you need help or have any further questions.")])])}),[],!1,null,null,null);t.default=i.exports}}]); \ No newline at end of file +(window.webpackJsonp=window.webpackJsonp||[]).push([[12],{302:function(e,t,o){e.exports=o.p+"assets/img/16_wix_btcpay-config.5f3fa8a9.png"},662:function(e,t,o){e.exports=o.p+"assets/img/01_wix_dev-mode.d3ebf3bb.png"},663:function(e,t,o){e.exports=o.p+"assets/img/02_wix_service-plugin-payment.99ffd208.png"},664:function(e,t,o){e.exports=o.p+"assets/img/03_wix_ppsp-start-now.044a2d88.png"},665:function(e,t,o){e.exports=o.p+"assets/img/04_wix_ppsp-legal-notice.658c1fe6.png"},666:function(e,t,o){e.exports=o.p+"assets/img/05_wix_ppsp-name.990dfe01.png"},667:function(e,t,o){e.exports=o.p+"assets/img/06_wix_ppsp-btcpay-config.5d4b9637.png"},668:function(e,t,o){e.exports=o.p+"assets/img/07_wix_gh-btcpay-config.a90cd4e2.png"},669:function(e,t,o){e.exports=o.p+"assets/img/08_wix_ppsp-btcpay-config-complete.06d14fc5.png"},670:function(e,t,o){e.exports=o.p+"assets/img/09_wix_gh-btcpay.f4ba84b1.png"},671:function(e,t,o){e.exports=o.p+"assets/img/10_wix_ppsp-btcpay.aa84c719.png"},672:function(e,t,o){e.exports=o.p+"assets/img/11_wix_backend-expose-site-api.a7733acf.png"},673:function(e,t,o){e.exports=o.p+"assets/img/12_wix_backend-http-functions.ba365413.png"},674:function(e,t,o){e.exports=o.p+"assets/img/13_wix_settings.9275944e.png"},675:function(e,t,o){e.exports=o.p+"assets/img/14_wix_accept-payments.984c3b09.png"},676:function(e,t,o){e.exports=o.p+"assets/img/15_wix_list-btcpay.aabe82d7.png"},677:function(e,t,o){e.exports=o.p+"assets/img/17_btcpay-api-key-page.a525c66b.png"},678:function(e,t,o){e.exports=o.p+"assets/img/18_btcpay-api-key-permissions-1.2a52f496.png"},679:function(e,t,o){e.exports=o.p+"assets/img/18_btcpay-api-key-permissions-2.4a634a53.png"},680:function(e,t,o){e.exports=o.p+"assets/img/19_btcpay-api-key-copy.4cb4fc6a.png"},681:function(e,t,o){e.exports=o.p+"assets/img/20_btcpay-store-id.62536621.png"},682:function(e,t,o){e.exports=o.p+"assets/img/21_btcpay-webhook-page.6ca3fd85.png"},683:function(e,t,o){e.exports=o.p+"assets/img/22_btcpay-webhook-saved.1e659e6d.png"},684:function(e,t,o){e.exports=o.p+"assets/img/23_wix_btcpay-config-saved.30337d07.png"},861:function(e,t,o){"use strict";o.r(t);var a=o(10),i=Object(a.a)({},(function(){var e=this,t=e._self._c;return t("ContentSlotsDistributor",{attrs:{"slot-key":e.$parent.slotKey}},[t("h1",{attrs:{id:"btcpay-server-integration-for-wix"}},[t("a",{staticClass:"header-anchor",attrs:{href:"#btcpay-server-integration-for-wix"}},[e._v("#")]),e._v(" BTCPay Server integration for Wix")]),e._v(" "),t("p",[e._v("This guide will show you how you can enable Bitcoin payments using BTCPay Server on your Wix store. At the time of writing it is not possible to package this into a Wix app, so you will need to follow the steps below and copy and paste the code into your Wix editor.")]),e._v(" "),t("h2",{attrs:{id:"requirements"}},[t("a",{staticClass:"header-anchor",attrs:{href:"#requirements"}},[e._v("#")]),e._v(" Requirements")]),e._v(" "),t("ul",[t("li",[e._v("You have a "),t("a",{attrs:{href:"https://wix.com",target:"_blank",rel:"noopener noreferrer"}},[e._v("Wix"),t("OutboundLink")],1),e._v(" account and online store up and running")]),e._v(" "),t("li",[e._v("You have a BTCPay Server version 1.10.0 or later, either "),t("RouterLink",{attrs:{to:"/Deployment/"}},[e._v("self-hosted")]),e._v(" or "),t("RouterLink",{attrs:{to:"/Deployment/ThirdPartyHosting/"}},[e._v("hosted by a third-party")]),e._v(".")],1),e._v(" "),t("li",[e._v("BTCPay needs to be reachable from the internet via a domain, e.g. https://mainnet.demo.btcpayserver.org")]),e._v(" "),t("li",[t("RouterLink",{attrs:{to:"/RegisterAccount/"}},[e._v("You've a registered account on the instance")])],1),e._v(" "),t("li",[t("RouterLink",{attrs:{to:"/CreateStore/"}},[e._v("You've a BTCPay store on the instance")])],1),e._v(" "),t("li",[t("RouterLink",{attrs:{to:"/WalletSetup/"}},[e._v("You've a wallet connected to your store")]),e._v(" and/or "),t("RouterLink",{attrs:{to:"/LightningNetwork/"}},[e._v("Lightning Network")]),e._v(" enabled or connected.")],1)]),e._v(" "),t("h2",{attrs:{id:"create-a-payment-provider-service-plugin-ppsp"}},[t("a",{staticClass:"header-anchor",attrs:{href:"#create-a-payment-provider-service-plugin-ppsp"}},[e._v("#")]),e._v(" Create a payment provider service plugin (PPSP)")]),e._v(" "),t("ol",[t("li",[e._v("In your Wix site, open your Wix Editor.")]),e._v(" "),t("li",[e._v('At the top click on "'),t("strong",[e._v("Dev Mode")]),e._v('" and the "'),t("strong",[e._v("Turn on Dev Mode")]),e._v('" button to enable the developer mode.\n'),t("img",{attrs:{src:o(662),alt:"Dev Mode",title:"Dev Mode"}})]),e._v(" "),t("li",[e._v("Now on the left side, click on the "),t("code",[e._v("{ }")]),e._v(" icon to open the code editor.")]),e._v(" "),t("li",[e._v('In the section "Service Plugins" click on the '),t("strong",[e._v("(+)")]),e._v(' sign and select "'),t("strong",[e._v("Payment")]),e._v('"\n'),t("img",{attrs:{src:o(663),alt:"Add payment provider service plugin",title:"Add payment provider service plugin"}})]),e._v(" "),t("li",[e._v('On the following screen, click "'),t("strong",[e._v("Start now")]),e._v('"\n'),t("img",{attrs:{src:o(664),alt:"Start now",title:"Start now"}})]),e._v(" "),t("li",[e._v('On the legal terms page, check the terms and click "'),t("strong",[e._v("Accept")]),e._v('"\n'),t("img",{attrs:{src:o(665),alt:"Accept terms",title:"Accept terms"}})]),e._v(" "),t("li",[e._v('Now enter the name of the plugin: "'),t("strong",[e._v("BTCPay")]),e._v('" (you can use any name but this will make it easier to follow the guide). Then, click "Add & Edit Code":\n'),t("img",{attrs:{src:o(666),alt:"Add & Edit Code",title:"Add & Edit Code"}})]),e._v(" "),t("li",[e._v('This created the directory "BTCPay" containing two files: '),t("code",[e._v("BTCPay.js")]),e._v(" and "),t("code",[e._v("BTCPay-config.js")]),e._v(" which is open in the editor.\n"),t("img",{attrs:{src:o(667),alt:"BTCPay-config.js",title:"BTCPay-config.js"}})]),e._v(" "),t("li",[e._v("Next steps are to copy the contents of those two files from our "),t("a",{attrs:{href:"https://github.com/btcpayserver/wix",target:"_blank",rel:"noopener noreferrer"}},[e._v("Git repository"),t("OutboundLink")],1),e._v(". You can see the same data structure as on your wix editor. In the "),t("code",[e._v("BTCPay-config.js")]),e._v(" file, paste the code from the same file on our Git repository: "),t("a",{attrs:{href:"https://github.com/btcpayserver/wix/blob/main/backend/service-plugins/payment-provider/BTCPay/BTCPay-config.js",target:"_blank",rel:"noopener noreferrer"}},[e._v("BTCPay-config.js"),t("OutboundLink")],1),e._v('. Easiest to click the "'),t("strong",[e._v("Copy raw file")]),e._v('" icon.\n'),t("img",{attrs:{src:o(668),alt:"BTCPay-config.js",title:"BTCPay-config.js"}})]),e._v(" "),t("li",[e._v("Make sure you delete example code on the "),t("code",[e._v("BTCPay-config.js")]),e._v(" file in the wix editor before pasting the new code.\n"),t("img",{attrs:{src:o(669),alt:"BTCPay-config.js completed",title:"BTCPay-config.js completed"}})]),e._v(" "),t("li",[e._v("Now, open the "),t("code",[e._v("BTCPay.js")]),e._v(" file in the wix editor and paste the code from our Git repository: "),t("a",{attrs:{href:"https://github.com/btcpayserver/wix/blob/main/backend/service-plugins/payment-provider/BTCPay/BTCPay.js",target:"_blank",rel:"noopener noreferrer"}},[e._v("BTCPay.js"),t("OutboundLink")],1),e._v(". Do not forget to remove all the example code from the file before pasting the copied code.\n"),t("img",{attrs:{src:o(670),alt:"BTCPay.js",title:"BTCPay.js"}}),e._v(" "),t("img",{attrs:{src:o(671),alt:"BTCPay.js",title:"BTCPay.js"}})]),e._v(" "),t("li",[e._v("Now we need to add the "),t("code",[e._v("http-functions.js")]),e._v(" file to the "),t("code",[e._v("backend")]),e._v(' directory. To do so, in the "backend" section of your editor click again on the '),t("strong",[e._v("(+)")]),e._v(' icon and select "'),t("strong",[e._v("Expose Site API")]),e._v('" which creates the mentioned '),t("code",[e._v("http-functions.js")]),e._v(" file. Note: If you already have that file present then you can skip this step.\n"),t("img",{attrs:{src:o(672),alt:"Create http-functions.js",title:"Create http-functions.js"}})]),e._v(" "),t("li",[e._v("Copy the code from our Git repository: "),t("a",{attrs:{href:"https://github.com/btcpayserver/wix/blob/main/backend/http-functions.js",target:"_blank",rel:"noopener noreferrer"}},[e._v("http-functions.js"),t("OutboundLink")],1),e._v(". If you already had a "),t("code",[e._v("http-functions.js")]),e._v(" file, make sure to add the code from the Git repository to the existing file add the copied code below the existing code. If not then make sure you delete all the example code before pasting the code from GitHub.\n"),t("img",{attrs:{src:o(673),alt:"http-functions.js",title:"http-functions.js"}})]),e._v(" "),t("li",[e._v("Now the code is done it is important to click on publish to save the changes and make the plugin available.")])]),e._v(" "),t("h2",{attrs:{id:"configure-the-payment-service-provider-plugin-pspp"}},[t("a",{staticClass:"header-anchor",attrs:{href:"#configure-the-payment-service-provider-plugin-pspp"}},[e._v("#")]),e._v(" Configure the payment service provider plugin (PSPP)")]),e._v(" "),t("ol",[t("li",[e._v("Go back to your site's dashboard. On the left menu click on \""),t("strong",[e._v("Settings")]),e._v('", on that page click "'),t("strong",[e._v("Accept Payments")]),e._v('"\n'),t("img",{attrs:{src:o(674),alt:"Settings",title:"Settings"}}),e._v(" "),t("img",{attrs:{src:o(675),alt:"Accept Payments",title:"Accept Payments"}})]),e._v(" "),t("li",[e._v('On the following page, you should see "Bitcoin Payments with BTCPay" as payment provider. If not, try to refresh the page to clear the Wix cache. Click on "Connect"\n'),t("img",{attrs:{src:o(676),alt:"BTCPay",title:"BTCPay"}})]),e._v(" "),t("li",[e._v("You are now on the configuration page. You need to enter the following fields:\n"),t("ul",[t("li",[t("strong",[e._v("BTCPay URL")]),e._v(": The URL of your BTCPay Server instance, e.g. "),t("code",[e._v("https://btcpay.example.com")])]),e._v(" "),t("li",[t("strong",[e._v("API Key")]),e._v(": The API key of your BTCPay store")]),e._v(" "),t("li",[t("strong",[e._v("Store ID")]),e._v(": The store ID of your BTCPay store")]),e._v(" "),t("li",[t("strong",[e._v("Webhook Secret")]),e._v(": The webhook secret of your BTCPay store\n"),t("img",{attrs:{src:o(302),alt:"Configuration",title:"Configuration"}})])])])]),e._v(" "),t("h3",{attrs:{id:"btcpay-server-url"}},[t("a",{staticClass:"header-anchor",attrs:{href:"#btcpay-server-url"}},[e._v("#")]),e._v(" BTCPay Server URL")]),e._v(" "),t("ol",[t("li",[e._v('First, enter the "'),t("strong",[e._v("BTCPay Server URL")]),e._v('", in our case '),t("code",[e._v("https://testing.btcpay.tech")])]),e._v(" "),t("li",[e._v('Next, you need to get the API Key, Store ID, and Webhook Secret from your BTCPay store. To do so, log in to your BTCPay store. We assume you already have a store setup, in our guide here it is called "Wix BTCPay Demo"')])]),e._v(" "),t("h3",{attrs:{id:"api-key"}},[t("a",{staticClass:"header-anchor",attrs:{href:"#api-key"}},[e._v("#")]),e._v(" API Key")]),e._v(" "),t("ol",[t("li",[e._v('Go to the API Keys page under "'),t("strong",[e._v("Account")]),e._v('" -> "'),t("strong",[e._v("API Keys")]),e._v('" (For BTCPay Server versions prior 2.0 it is under "Account" -> "Manage Account" -> "API Keys"). Click on "'),t("strong",[e._v("Generate Key")]),e._v('"\n'),t("img",{attrs:{src:o(677),alt:"API Keys",title:"API Keys"}})]),e._v(" "),t("li",[e._v('Enter a label such as "Wix API Key".')]),e._v(" "),t("li",[e._v('For the permissions, click on the "'),t("em",[t("strong",[e._v("Select specific stores")])]),e._v('" link and select the store you want to connect to Wix, in our example "Wix BTCPay Demo" - for the following permissions: '),t("code",[e._v("View invoices")]),e._v(", "),t("code",[e._v("Create invoice")]),e._v(", "),t("code",[e._v("Modify invoices")]),e._v(", "),t("code",[e._v("Modify stores webhooks")]),e._v(", "),t("code",[e._v("View your stores")]),e._v(", "),t("code",[e._v("Create non-approved pull payments")]),e._v(" (used for refunds in the future)\n"),t("img",{attrs:{src:o(678),alt:"API Key permissions 1",title:"API Key permissions 1"}}),e._v(" "),t("img",{attrs:{src:o(679),alt:"API Key permissions 2",title:"API Key permissions 2"}})]),e._v(" "),t("li",[e._v('Click on "'),t("strong",[e._v("Generate API Key")]),e._v('" button and on the following page copy the API Key shown at the top\n'),t("img",{attrs:{src:o(680),alt:"Copy generated API key",title:"Copy generated API key"}})]),e._v(" "),t("li",[e._v('In your Wix store: paste that copied API key into the "'),t("strong",[e._v("API Key")]),e._v('" field')])]),e._v(" "),t("h3",{attrs:{id:"store-id"}},[t("a",{staticClass:"header-anchor",attrs:{href:"#store-id"}},[e._v("#")]),e._v(" Store ID")]),e._v(" "),t("ol",[t("li",[e._v('Go back to your BTCPay store and copy the "'),t("strong",[e._v("Store ID")]),e._v('". Go to your store and click on "Settings" and copy the Store ID shown\n'),t("img",{attrs:{src:o(681),alt:"Copy Store ID",title:"Copy Store ID"}})]),e._v(" "),t("li",[e._v('In your Wix store: paste that copied Store ID into the "'),t("strong",[e._v("Store ID")]),e._v('" field')])]),e._v(" "),t("h3",{attrs:{id:"webhook-secret"}},[t("a",{staticClass:"header-anchor",attrs:{href:"#webhook-secret"}},[e._v("#")]),e._v(" Webhook Secret")]),e._v(" "),t("ol",[t("li",[e._v('Go back to your BTCPay store and click on "Settings" -> "Webhooks". Click on "Create Webhook"\n'),t("img",{attrs:{src:o(682),alt:"Create webhook page",title:"Create webhook page"}})]),e._v(" "),t("li",[t("strong",[e._v("Payload URL")]),e._v(": Your Wix store URL where it can be reached combined with a callback path. E.g. "),t("code",[e._v("https://example.com/_functions/btcpayTrxWebHook")]),e._v(" (replace example.com with your Wix store URL)")]),e._v(" "),t("li",[t("strong",[e._v("Secret")]),e._v(': This is auto-generated by BTCPay, you can show it by clicking on the "eye" icon')]),e._v(" "),t("li",[e._v('Copy the "'),t("strong",[e._v("Secret")]),e._v('" and paste it into the "'),t("strong",[e._v("Webhook Secret")]),e._v("\" field in your Wix store e.g. 'YOURWEBHOOKSECRET' as shown in our example")]),e._v(" "),t("li",[e._v("Back on BTCPay webhook page, you can leave the other settings as is")]),e._v(" "),t("li",[e._v('Click on "'),t("strong",[e._v("Add Webhook")]),e._v('" to create the webhook on BTCPay. You should see the "The webhook has been created." message\n'),t("img",{attrs:{src:o(683),alt:"Webhook created successfully",title:"Webhook created successfully"}})])]),e._v(" "),t("h3",{attrs:{id:"save-the-configuration"}},[t("a",{staticClass:"header-anchor",attrs:{href:"#save-the-configuration"}},[e._v("#")]),e._v(" Save the configuration")]),e._v(" "),t("ol",[t("li",[e._v('Back in your Wix store, click on "'),t("strong",[e._v("Connect")]),e._v('" to save the configuration\n'),t("img",{attrs:{src:o(302),alt:"Save configuration",title:"Save configuration"}}),e._v(" "),t("img",{attrs:{src:o(684),alt:"Configuration saved",title:"Configuration saved"}})])]),e._v(" "),t("h2",{attrs:{id:"testing"}},[t("a",{staticClass:"header-anchor",attrs:{href:"#testing"}},[e._v("#")]),e._v(" Testing")]),e._v(" "),t("p",[e._v('You are now ready to test your BTCPay integration on your Wix store. Add some products to the cart and go through the checkout process and select "'),t("strong",[e._v("Bitcoin payments with BTCPay")]),e._v('"')]),e._v(" "),t("h2",{attrs:{id:"troubleshooting-faq"}},[t("a",{staticClass:"header-anchor",attrs:{href:"#troubleshooting-faq"}},[e._v("#")]),e._v(" Troubleshooting / FAQ")]),e._v(" "),t("h3",{attrs:{id:"it-does-not-work-what-can-i-do"}},[t("a",{staticClass:"header-anchor",attrs:{href:"#it-does-not-work-what-can-i-do"}},[e._v("#")]),e._v(" It does not work, what can I do?")]),e._v(" "),t("ul",[t("li",[e._v("Make sure you followed the guide step by step and copied the right values into the right places")]),e._v(" "),t("li",[e._v('In Wix under "'),t("strong",[e._v("Developer tools")]),e._v('" select "'),t("strong",[e._v("Logging Tools")]),e._v('" and there open the "'),t("strong",[e._v("Wix Logs")]),e._v('", it will live log any errors. So try to do the checkout or save the configuration form to see if there is any error.')])]),e._v(" "),t("h3",{attrs:{id:"after-copying-the-code-from-the-git-repository-i-dont-see-the-payment-method-listed-in-accept-payments-"}},[t("a",{staticClass:"header-anchor",attrs:{href:"#after-copying-the-code-from-the-git-repository-i-dont-see-the-payment-method-listed-in-accept-payments-"}},[e._v("#")]),e._v(' After copying the code from the Git repository, I don\'t see the payment method listed in "Accept payments"')]),e._v(" "),t("p",[e._v('Try to delete the browser cache and reload the page. You can also try to go into editor and click on "Publish" to save the changes. Then reload the payment method list page again.')]),e._v(" "),t("h3",{attrs:{id:"how-can-i-change-the-text-of-the-payment-method-bitcoin-payments-with-btcpay-in-the-checkout"}},[t("a",{staticClass:"header-anchor",attrs:{href:"#how-can-i-change-the-text-of-the-payment-method-bitcoin-payments-with-btcpay-in-the-checkout"}},[e._v("#")]),e._v(' How can I change the text of the payment method, "Bitcoin Payments with BTCPay" in the checkout?')]),e._v(" "),t("p",[e._v("You need to go into your Wix Editor and edit the file "),t("code",[e._v("BTCPay-config.js")]),e._v(". You can change the text in the "),t("code",[e._v("title")]),e._v(" field")]),e._v(" "),t("div",{staticClass:"language- extra-class"},[t("pre",{pre:!0,attrs:{class:"language-text"}},[t("code",[e._v("...\nhostedPage: {\n title: 'Bitcoin Payments with BTCPay', // change this line\n billingAddressMandatoryFields: ['EMAIL'],\n...\n")])])]),t("h3",{attrs:{id:"i-still-have-a-problem-where-can-i-get-help"}},[t("a",{staticClass:"header-anchor",attrs:{href:"#i-still-have-a-problem-where-can-i-get-help"}},[e._v("#")]),e._v(" I still have a problem, where can I get help?")]),e._v(" "),t("p",[e._v("Feel free to join our support channel over at "),t("a",{attrs:{href:"https://chat.btcpayserver.org/",target:"_blank",rel:"noopener noreferrer"}},[e._v("https://chat.btcpayserver.org/"),t("OutboundLink")],1),e._v(" if you need help or have any further questions.")])])}),[],!1,null,null,null);t.default=i.exports}}]); \ No newline at end of file diff --git a/assets/js/122.5a2e613b.js b/assets/js/122.1dffb2a4.js similarity index 98% rename from assets/js/122.5a2e613b.js rename to assets/js/122.1dffb2a4.js index 3390697bf8..c9edd67588 100644 --- a/assets/js/122.5a2e613b.js +++ b/assets/js/122.1dffb2a4.js @@ -1 +1 @@ -(window.webpackJsonp=window.webpackJsonp||[]).push([[122],{770:function(e,t,r){"use strict";r.r(t);var o=r(10),a=Object(o.a)({},(function(){var e=this,t=e._self._c;return t("ContentSlotsDistributor",{attrs:{"slot-key":e.$parent.slotKey}},[t("h1",{attrs:{id:"how-to-add-an-altcoin"}},[t("a",{staticClass:"header-anchor",attrs:{href:"#how-to-add-an-altcoin"}},[e._v("#")]),e._v(" How to add an Altcoin")]),e._v(" "),t("p",[e._v("Bitcoin is the only focus of the project and its core developers. However, opt-in integrations are available for several altcoins.")]),e._v(" "),t("p",[e._v("For more information and the full list of integrated altcoins, check the "),t("RouterLink",{attrs:{to:"/FAQ/Altcoin/"}},[e._v("Altcoin FAQ page")]),e._v(".")],1),e._v(" "),t("h2",{attrs:{id:"how-can-i-add-an-altcoin-to-btcpayserver"}},[t("a",{staticClass:"header-anchor",attrs:{href:"#how-can-i-add-an-altcoin-to-btcpayserver"}},[e._v("#")]),e._v(" How can I add an altcoin to BTCPayServer?")]),e._v(" "),t("p",[e._v("The steps for having a coin added are:")]),e._v(" "),t("ol",[t("li",[e._v("Add support for your crypto to "),t("a",{attrs:{href:"https://github.com/MetacoSA/NBitcoin/tree/master/NBitcoin.Altcoins",target:"_blank",rel:"noopener noreferrer"}},[e._v("NBitcoin"),t("OutboundLink")],1),e._v(", "),t("a",{attrs:{href:"https://github.com/dgarage/NBXplorer",target:"_blank",rel:"noopener noreferrer"}},[e._v("NBxplorer"),t("OutboundLink")],1),e._v(", and "),t("a",{attrs:{href:"https://github.com/btcpayserver/btcpayserver",target:"_blank",rel:"noopener noreferrer"}},[e._v("BTCPayServer"),t("OutboundLink")],1),e._v(". (Use examples from other coins)")]),e._v(" "),t("li",[e._v("Create your own docker image ("),t("a",{attrs:{href:"https://hub.docker.com/r/btcpayserver/bitcoin",target:"_blank",rel:"noopener noreferrer"}},[e._v("Example for BTC"),t("OutboundLink")],1),e._v(")")]),e._v(" "),t("li",[e._v("Create a docker-compose fragment ("),t("a",{attrs:{href:"https://github.com/btcpayserver/btcpayserver-docker/blob/master/docker-compose-generator/docker-fragments/bitcoin.yml",target:"_blank",rel:"noopener noreferrer"}},[e._v("Example for BTC"),t("OutboundLink")],1),e._v(")")]),e._v(" "),t("li",[e._v("Add your CryptoDefinition ("),t("a",{attrs:{href:"https://github.com/btcpayserver/btcpayserver-docker/blob/master/docker-compose-generator/src/CryptoDefinition.cs",target:"_blank",rel:"noopener noreferrer"}},[e._v("Example for BTC"),t("OutboundLink")],1),e._v(")")])]),e._v(" "),t("p",[e._v("When testing your coin, "),t("strong",[e._v("DO NOT USE "),t("code",[e._v("build.sh")])]),e._v(", since it uses a pre-built docker image.")]),e._v(" "),t("p",[e._v("Instead, install "),t("a",{attrs:{href:"https://dotnet.microsoft.com/en-us/download/dotnet/8.0",target:"_blank",rel:"noopener noreferrer"}},[e._v(".NET 8.0 SDK"),t("OutboundLink")],1),e._v(" and run:")]),e._v(" "),t("div",{staticClass:"language-bash extra-class"},[t("pre",{pre:!0,attrs:{class:"language-bash"}},[t("code",[t("span",{pre:!0,attrs:{class:"token assign-left variable"}},[e._v("BTCPAYGEN_CRYPTO1")]),t("span",{pre:!0,attrs:{class:"token operator"}},[e._v("=")]),t("span",{pre:!0,attrs:{class:"token string"}},[e._v('"EXAMPLE-COIN"')]),e._v("\n"),t("span",{pre:!0,attrs:{class:"token assign-left variable"}},[e._v("BTCPAYGEN_SUBNAME")]),t("span",{pre:!0,attrs:{class:"token operator"}},[e._v("=")]),t("span",{pre:!0,attrs:{class:"token string"}},[e._v('"test"')]),e._v("\n"),t("span",{pre:!0,attrs:{class:"token builtin class-name"}},[e._v("cd")]),e._v(" docker-compose-generator/src\ndotnet run\n")])])]),t("p",[e._v("This will generate your docker-compose in the "),t("code",[e._v("Generated")]),e._v(" folder, which you can then run and test.")]),e._v(" "),t("p",[e._v("Note: BTCPay developers do not implement alternative coins on request. Adding a new coin explicitly depends on the community and developers of those coins. Furthermore, BTCPay developers do not spend excessive time testing nor maintaining the altcoins. If you're submitting a PR for a new coin, make sure that your image works. If the altcoin integration is not actively maintained it will be removed from BTCPay.")])])}),[],!1,null,null,null);t.default=a.exports}}]); \ No newline at end of file +(window.webpackJsonp=window.webpackJsonp||[]).push([[122],{771:function(e,t,r){"use strict";r.r(t);var o=r(10),a=Object(o.a)({},(function(){var e=this,t=e._self._c;return t("ContentSlotsDistributor",{attrs:{"slot-key":e.$parent.slotKey}},[t("h1",{attrs:{id:"how-to-add-an-altcoin"}},[t("a",{staticClass:"header-anchor",attrs:{href:"#how-to-add-an-altcoin"}},[e._v("#")]),e._v(" How to add an Altcoin")]),e._v(" "),t("p",[e._v("Bitcoin is the only focus of the project and its core developers. However, opt-in integrations are available for several altcoins.")]),e._v(" "),t("p",[e._v("For more information and the full list of integrated altcoins, check the "),t("RouterLink",{attrs:{to:"/FAQ/Altcoin/"}},[e._v("Altcoin FAQ page")]),e._v(".")],1),e._v(" "),t("h2",{attrs:{id:"how-can-i-add-an-altcoin-to-btcpayserver"}},[t("a",{staticClass:"header-anchor",attrs:{href:"#how-can-i-add-an-altcoin-to-btcpayserver"}},[e._v("#")]),e._v(" How can I add an altcoin to BTCPayServer?")]),e._v(" "),t("p",[e._v("The steps for having a coin added are:")]),e._v(" "),t("ol",[t("li",[e._v("Add support for your crypto to "),t("a",{attrs:{href:"https://github.com/MetacoSA/NBitcoin/tree/master/NBitcoin.Altcoins",target:"_blank",rel:"noopener noreferrer"}},[e._v("NBitcoin"),t("OutboundLink")],1),e._v(", "),t("a",{attrs:{href:"https://github.com/dgarage/NBXplorer",target:"_blank",rel:"noopener noreferrer"}},[e._v("NBxplorer"),t("OutboundLink")],1),e._v(", and "),t("a",{attrs:{href:"https://github.com/btcpayserver/btcpayserver",target:"_blank",rel:"noopener noreferrer"}},[e._v("BTCPayServer"),t("OutboundLink")],1),e._v(". (Use examples from other coins)")]),e._v(" "),t("li",[e._v("Create your own docker image ("),t("a",{attrs:{href:"https://hub.docker.com/r/btcpayserver/bitcoin",target:"_blank",rel:"noopener noreferrer"}},[e._v("Example for BTC"),t("OutboundLink")],1),e._v(")")]),e._v(" "),t("li",[e._v("Create a docker-compose fragment ("),t("a",{attrs:{href:"https://github.com/btcpayserver/btcpayserver-docker/blob/master/docker-compose-generator/docker-fragments/bitcoin.yml",target:"_blank",rel:"noopener noreferrer"}},[e._v("Example for BTC"),t("OutboundLink")],1),e._v(")")]),e._v(" "),t("li",[e._v("Add your CryptoDefinition ("),t("a",{attrs:{href:"https://github.com/btcpayserver/btcpayserver-docker/blob/master/docker-compose-generator/src/CryptoDefinition.cs",target:"_blank",rel:"noopener noreferrer"}},[e._v("Example for BTC"),t("OutboundLink")],1),e._v(")")])]),e._v(" "),t("p",[e._v("When testing your coin, "),t("strong",[e._v("DO NOT USE "),t("code",[e._v("build.sh")])]),e._v(", since it uses a pre-built docker image.")]),e._v(" "),t("p",[e._v("Instead, install "),t("a",{attrs:{href:"https://dotnet.microsoft.com/en-us/download/dotnet/8.0",target:"_blank",rel:"noopener noreferrer"}},[e._v(".NET 8.0 SDK"),t("OutboundLink")],1),e._v(" and run:")]),e._v(" "),t("div",{staticClass:"language-bash extra-class"},[t("pre",{pre:!0,attrs:{class:"language-bash"}},[t("code",[t("span",{pre:!0,attrs:{class:"token assign-left variable"}},[e._v("BTCPAYGEN_CRYPTO1")]),t("span",{pre:!0,attrs:{class:"token operator"}},[e._v("=")]),t("span",{pre:!0,attrs:{class:"token string"}},[e._v('"EXAMPLE-COIN"')]),e._v("\n"),t("span",{pre:!0,attrs:{class:"token assign-left variable"}},[e._v("BTCPAYGEN_SUBNAME")]),t("span",{pre:!0,attrs:{class:"token operator"}},[e._v("=")]),t("span",{pre:!0,attrs:{class:"token string"}},[e._v('"test"')]),e._v("\n"),t("span",{pre:!0,attrs:{class:"token builtin class-name"}},[e._v("cd")]),e._v(" docker-compose-generator/src\ndotnet run\n")])])]),t("p",[e._v("This will generate your docker-compose in the "),t("code",[e._v("Generated")]),e._v(" folder, which you can then run and test.")]),e._v(" "),t("p",[e._v("Note: BTCPay developers do not implement alternative coins on request. Adding a new coin explicitly depends on the community and developers of those coins. Furthermore, BTCPay developers do not spend excessive time testing nor maintaining the altcoins. If you're submitting a PR for a new coin, make sure that your image works. If the altcoin integration is not actively maintained it will be removed from BTCPay.")])])}),[],!1,null,null,null);t.default=a.exports}}]); \ No newline at end of file diff --git a/assets/js/123.dc1d6174.js b/assets/js/123.a3c9d07e.js similarity index 99% rename from assets/js/123.dc1d6174.js rename to assets/js/123.a3c9d07e.js index 6cbdddeed4..4e8653cda3 100644 --- a/assets/js/123.dc1d6174.js +++ b/assets/js/123.a3c9d07e.js @@ -1 +1 @@ -(window.webpackJsonp=window.webpackJsonp||[]).push([[123],{772:function(t,s,a){"use strict";a.r(s);var n=a(10),e=Object(n.a)({},(function(){var t=this,s=t._self._c;return s("ContentSlotsDistributor",{attrs:{"slot-key":t.$parent.slotKey}},[s("h1",{attrs:{id:"greenfield-api-example-with-nodejs-javascript"}},[s("a",{staticClass:"header-anchor",attrs:{href:"#greenfield-api-example-with-nodejs-javascript"}},[t._v("#")]),t._v(" Greenfield API example with Node.js (JavaScript)")]),t._v(" "),s("p",[t._v("The "),s("strong",[s("a",{attrs:{href:"https://docs.btcpayserver.org/API/Greenfield/v1/",target:"_blank",rel:"noopener noreferrer"}},[t._v("Greenfield API"),s("OutboundLink")],1)]),t._v(" (also available on your instance on "),s("code",[t._v("/docs")]),t._v(") allows you to operate BTCPay Server via an easy-to-use REST API.")]),t._v(" "),s("p",[t._v("Note that you can partially generate clients in the language of your choice by using the "),s("a",{attrs:{href:"https://docs.btcpayserver.org/API/Greenfield/v1/swagger.json",target:"_blank",rel:"noopener noreferrer"}},[t._v("Swagger file"),s("OutboundLink")],1),t._v(".")]),t._v(" "),s("p",[t._v("In this guide, we will show you how to use it using Node.js/JavaScript.")]),t._v(" "),s("h2",{attrs:{id:"prerequisites"}},[s("a",{staticClass:"header-anchor",attrs:{href:"#prerequisites"}},[t._v("#")]),t._v(" Prerequisites")]),t._v(" "),s("p",[t._v("Unless for a few endpoints like creating a store and API key on behalf of a specific user, Basic Auth should be avoided and an API key should be used instead. Make sure that API keys only have the needed permissions and not more. E.g. if you only create invoices you should not give the API key the permission to manage your stores.")]),t._v(" "),s("p",[t._v("You can create a new API key in the BTCPay Server UI under "),s("code",[t._v("Account")]),t._v(" -> "),s("code",[t._v("Manage account")]),t._v(" -> "),s("code",[t._v("API keys")])]),t._v(" "),s("p",[t._v("For the ecommerce examples below the API key needs the following permissions:")]),t._v(" "),s("ul",[s("li",[t._v("View invoices")]),t._v(" "),s("li",[t._v("Create invoice")]),t._v(" "),s("li",[t._v("Modify invoices")]),t._v(" "),s("li",[t._v("Modify stores webhooks")]),t._v(" "),s("li",[t._v("View your stores")]),t._v(" "),s("li",[t._v("Create non-approved pull payments")])]),t._v(" "),s("p",[t._v("For an overview of available permissions see the "),s("a",{attrs:{href:"https://docs.btcpayserver.org/API/Greenfield/v1/#section/Authentication/API_Key",target:"_blank",rel:"noopener noreferrer"}},[t._v("API documentation"),s("OutboundLink")],1),t._v(" or the permissions documented on each endpoint.")]),t._v(" "),s("h2",{attrs:{id:"ecommerce-examples"}},[s("a",{staticClass:"header-anchor",attrs:{href:"#ecommerce-examples"}},[t._v("#")]),t._v(" eCommerce examples")]),t._v(" "),s("p",[t._v("The following examples will show you how to create a basic eCommerce flow using the Greenfield API by creating an invoice, registering a webhook, processing webhooks, and issuing a full refund of an invoice.")]),t._v(" "),s("h3",{attrs:{id:"create-an-invoice"}},[s("a",{staticClass:"header-anchor",attrs:{href:"#create-an-invoice"}},[t._v("#")]),t._v(" Create an invoice")]),t._v(" "),s("p",[t._v("We create an invoice using the "),s("a",{attrs:{href:"https://docs.btcpayserver.org/API/Greenfield/v1/#operation/Invoices_CreateInvoice",target:"_blank",rel:"noopener noreferrer"}},[t._v("create invoice endpoint"),s("OutboundLink")],1),t._v(". This is a simple example but you can set a lot more data like order id, buyer email or custom metadata. That said, don't store redundant data on the invoice to prevent data leaks in case of a hack. E.g. in most cases it makes no sense to store the customer address on your eCommerce system and also on the BTCPay invoice.")]),t._v(" "),s("div",{staticClass:"language-JS extra-class"},[s("pre",{pre:!0,attrs:{class:"language-js"}},[s("code",[s("span",{pre:!0,attrs:{class:"token keyword"}},[t._v("const")]),t._v(" btcpayServerUrl "),s("span",{pre:!0,attrs:{class:"token operator"}},[t._v("=")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token string"}},[t._v("'https://mainnet.demo.btcpayserver.org'")]),t._v("\n"),s("span",{pre:!0,attrs:{class:"token keyword"}},[t._v("const")]),t._v(" storeId "),s("span",{pre:!0,attrs:{class:"token operator"}},[t._v("=")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token string"}},[t._v("'YOUR_STORE_ID'")]),t._v("\n"),s("span",{pre:!0,attrs:{class:"token keyword"}},[t._v("const")]),t._v(" apiKey "),s("span",{pre:!0,attrs:{class:"token operator"}},[t._v("=")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token string"}},[t._v("'YOUR_API_KEY'")]),t._v("\n"),s("span",{pre:!0,attrs:{class:"token keyword"}},[t._v("const")]),t._v(" amount "),s("span",{pre:!0,attrs:{class:"token operator"}},[t._v("=")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token number"}},[t._v("10")]),t._v("\n"),s("span",{pre:!0,attrs:{class:"token keyword"}},[t._v("const")]),t._v(" currency "),s("span",{pre:!0,attrs:{class:"token operator"}},[t._v("=")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token string"}},[t._v("'USD'")]),t._v("\n\n"),s("span",{pre:!0,attrs:{class:"token keyword"}},[t._v("const")]),t._v(" apiEndpoint "),s("span",{pre:!0,attrs:{class:"token operator"}},[t._v("=")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token template-string"}},[s("span",{pre:!0,attrs:{class:"token template-punctuation string"}},[t._v("`")]),s("span",{pre:!0,attrs:{class:"token string"}},[t._v("/api/v1/stores/")]),s("span",{pre:!0,attrs:{class:"token interpolation"}},[s("span",{pre:!0,attrs:{class:"token interpolation-punctuation punctuation"}},[t._v("${")]),t._v("storeId"),s("span",{pre:!0,attrs:{class:"token interpolation-punctuation punctuation"}},[t._v("}")])]),s("span",{pre:!0,attrs:{class:"token string"}},[t._v("/invoices")]),s("span",{pre:!0,attrs:{class:"token template-punctuation string"}},[t._v("`")])]),t._v("\n\n"),s("span",{pre:!0,attrs:{class:"token keyword"}},[t._v("const")]),t._v(" headers "),s("span",{pre:!0,attrs:{class:"token operator"}},[t._v("=")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("{")]),t._v("\n "),s("span",{pre:!0,attrs:{class:"token string-property property"}},[t._v("'Content-Type'")]),s("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token string"}},[t._v("'application/json'")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v("\n "),s("span",{pre:!0,attrs:{class:"token literal-property property"}},[t._v("Authorization")]),s("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token string"}},[t._v("'token '")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token operator"}},[t._v("+")]),t._v(" apiKey\n"),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("}")]),t._v("\n"),s("span",{pre:!0,attrs:{class:"token keyword"}},[t._v("const")]),t._v(" payload "),s("span",{pre:!0,attrs:{class:"token operator"}},[t._v("=")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("{")]),t._v("\n "),s("span",{pre:!0,attrs:{class:"token literal-property property"}},[t._v("amount")]),s("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" amount"),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v("\n "),s("span",{pre:!0,attrs:{class:"token literal-property property"}},[t._v("currency")]),s("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" currency\n"),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("}")]),t._v("\n"),s("span",{pre:!0,attrs:{class:"token function"}},[t._v("fetch")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("(")]),t._v("btcpayServerUrl "),s("span",{pre:!0,attrs:{class:"token operator"}},[t._v("+")]),t._v(" apiEndpoint"),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("{")]),t._v("\n "),s("span",{pre:!0,attrs:{class:"token literal-property property"}},[t._v("method")]),s("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token string"}},[t._v("'POST'")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v("\n "),s("span",{pre:!0,attrs:{class:"token literal-property property"}},[t._v("headers")]),s("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" headers"),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v("\n "),s("span",{pre:!0,attrs:{class:"token literal-property property"}},[t._v("body")]),s("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token constant"}},[t._v("JSON")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(".")]),s("span",{pre:!0,attrs:{class:"token function"}},[t._v("stringify")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("(")]),t._v("payload"),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(")")]),t._v("\n"),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("}")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(")")]),t._v("\n "),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(".")]),s("span",{pre:!0,attrs:{class:"token function"}},[t._v("then")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("(")]),s("span",{pre:!0,attrs:{class:"token parameter"}},[t._v("response")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token operator"}},[t._v("=>")]),t._v(" response"),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(".")]),s("span",{pre:!0,attrs:{class:"token function"}},[t._v("json")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("(")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(")")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(")")]),t._v("\n "),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(".")]),s("span",{pre:!0,attrs:{class:"token function"}},[t._v("then")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("(")]),s("span",{pre:!0,attrs:{class:"token parameter"}},[t._v("data")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token operator"}},[t._v("=>")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("{")]),t._v("\n console"),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(".")]),s("span",{pre:!0,attrs:{class:"token function"}},[t._v("log")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("(")]),t._v("data"),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(")")]),t._v("\n "),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("}")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(")")]),t._v("\n")])])]),s("h3",{attrs:{id:"register-a-webhook-optional"}},[s("a",{staticClass:"header-anchor",attrs:{href:"#register-a-webhook-optional"}},[t._v("#")]),t._v(" Register a webhook (optional)")]),t._v(" "),s("p",[t._v("Let's register a webhook to be notified when the invoice is paid. You can use the "),s("a",{attrs:{href:"https://docs.btcpayserver.org/API/Greenfield/v1/#operation/Webhooks_CreateWebhook",target:"_blank",rel:"noopener noreferrer"}},[t._v("create webhook endpoint"),s("OutboundLink")],1),t._v(" to register a webhook.")]),t._v(" "),s("div",{staticClass:"language-JS extra-class"},[s("pre",{pre:!0,attrs:{class:"language-js"}},[s("code",[s("span",{pre:!0,attrs:{class:"token keyword"}},[t._v("const")]),t._v(" btcpayServerUrl "),s("span",{pre:!0,attrs:{class:"token operator"}},[t._v("=")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token string"}},[t._v("'https://mainnet.demo.btcpayserver.org'")]),t._v("\n"),s("span",{pre:!0,attrs:{class:"token keyword"}},[t._v("const")]),t._v(" storeId "),s("span",{pre:!0,attrs:{class:"token operator"}},[t._v("=")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token string"}},[t._v("'YOUR_STORE_ID'")]),t._v("\n"),s("span",{pre:!0,attrs:{class:"token keyword"}},[t._v("const")]),t._v(" apiKey "),s("span",{pre:!0,attrs:{class:"token operator"}},[t._v("=")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token string"}},[t._v("'YOUR_API_KEY'")]),t._v("\n\n"),s("span",{pre:!0,attrs:{class:"token keyword"}},[t._v("const")]),t._v(" apiEndpoint "),s("span",{pre:!0,attrs:{class:"token operator"}},[t._v("=")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token template-string"}},[s("span",{pre:!0,attrs:{class:"token template-punctuation string"}},[t._v("`")]),s("span",{pre:!0,attrs:{class:"token string"}},[t._v("/api/v1/stores/")]),s("span",{pre:!0,attrs:{class:"token interpolation"}},[s("span",{pre:!0,attrs:{class:"token interpolation-punctuation punctuation"}},[t._v("${")]),t._v("storeId"),s("span",{pre:!0,attrs:{class:"token interpolation-punctuation punctuation"}},[t._v("}")])]),s("span",{pre:!0,attrs:{class:"token string"}},[t._v("/webhooks")]),s("span",{pre:!0,attrs:{class:"token template-punctuation string"}},[t._v("`")])]),t._v("\n\n"),s("span",{pre:!0,attrs:{class:"token keyword"}},[t._v("const")]),t._v(" headers "),s("span",{pre:!0,attrs:{class:"token operator"}},[t._v("=")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("{")]),t._v("\n "),s("span",{pre:!0,attrs:{class:"token string-property property"}},[t._v("'Content-Type'")]),s("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token string"}},[t._v("'application/json'")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v("\n "),s("span",{pre:!0,attrs:{class:"token literal-property property"}},[t._v("Authorization")]),s("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token string"}},[t._v("'token '")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token operator"}},[t._v("+")]),t._v(" apiKey\n"),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("}")]),t._v("\n\n"),s("span",{pre:!0,attrs:{class:"token keyword"}},[t._v("const")]),t._v(" payload "),s("span",{pre:!0,attrs:{class:"token operator"}},[t._v("=")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("{")]),t._v("\n "),s("span",{pre:!0,attrs:{class:"token literal-property property"}},[t._v("url")]),s("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token string"}},[t._v("'https://example.com/your-webhook-endpoint'")]),t._v("\n"),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("}")]),t._v("\n"),s("span",{pre:!0,attrs:{class:"token function"}},[t._v("fetch")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("(")]),t._v("btcpayServerUrl "),s("span",{pre:!0,attrs:{class:"token operator"}},[t._v("+")]),t._v(" apiEndpoint"),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("{")]),t._v("\n "),s("span",{pre:!0,attrs:{class:"token literal-property property"}},[t._v("method")]),s("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token string"}},[t._v("'POST'")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v("\n "),s("span",{pre:!0,attrs:{class:"token literal-property property"}},[t._v("headers")]),s("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" headers"),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v("\n "),s("span",{pre:!0,attrs:{class:"token literal-property property"}},[t._v("body")]),s("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token constant"}},[t._v("JSON")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(".")]),s("span",{pre:!0,attrs:{class:"token function"}},[t._v("stringify")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("(")]),t._v("payload"),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(")")]),t._v("\n"),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("}")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(")")]),t._v("\n "),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(".")]),s("span",{pre:!0,attrs:{class:"token function"}},[t._v("then")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("(")]),s("span",{pre:!0,attrs:{class:"token parameter"}},[t._v("response")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token operator"}},[t._v("=>")]),t._v(" response"),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(".")]),s("span",{pre:!0,attrs:{class:"token function"}},[t._v("json")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("(")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(")")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(")")]),t._v("\n "),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(".")]),s("span",{pre:!0,attrs:{class:"token function"}},[t._v("then")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("(")]),s("span",{pre:!0,attrs:{class:"token parameter"}},[t._v("data")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token operator"}},[t._v("=>")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("{")]),t._v("\n console"),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(".")]),s("span",{pre:!0,attrs:{class:"token function"}},[t._v("log")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("(")]),t._v("data"),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(")")]),t._v("\n "),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("}")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(")")]),t._v("\n")])])]),s("p",[t._v("This step is optional, you can also manually create a webhook in the BTCPay Server UI in your store "),s("code",[t._v("Settings")]),t._v(" -> "),s("code",[t._v("Webhooks")]),t._v(".")]),t._v(" "),s("h3",{attrs:{id:"validate-and-process-webhooks"}},[s("a",{staticClass:"header-anchor",attrs:{href:"#validate-and-process-webhooks"}},[t._v("#")]),t._v(" Validate and process webhooks")]),t._v(" "),s("p",[t._v("You can use your Node.js Express web application to receive webhook requests from your BTCPay Server.")]),t._v(" "),s("p",[t._v("First you need a route so that your Node.js application can receive POST requests.\nBased on how you set up the express server this should look something like this:")]),t._v(" "),s("div",{staticClass:"language-JS extra-class"},[s("pre",{pre:!0,attrs:{class:"language-js"}},[s("code",[t._v("app"),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(".")]),s("span",{pre:!0,attrs:{class:"token function"}},[t._v("post")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("(")]),s("span",{pre:!0,attrs:{class:"token string"}},[t._v("'/your-webhook-endpoint'")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("(")]),s("span",{pre:!0,attrs:{class:"token parameter"}},[t._v("req"),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v(" res")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(")")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token operator"}},[t._v("=>")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("{")]),t._v("\n "),s("span",{pre:!0,attrs:{class:"token comment"}},[t._v("// Do stuff here")]),t._v("\n"),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("}")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(")")]),t._v("\n")])])]),s("p",[t._v("What's important is that the webhook sends a HTTP-header "),s("code",[t._v("BTCPAY-SIG")]),t._v(" which is the signed request using the "),s("code",[t._v("secret")]),t._v(" you got back from the previous step when registering the webhook. You can use that "),s("code",[t._v("secret")]),t._v(" and the raw payload (as bytes) you get from the webhook, hash it and compare it to "),s("code",[t._v("BTCPAY-SIG")]),t._v(". Therefore, you need "),s("code",[t._v("body-parser")]),t._v(" which is a middleware to parse the raw body of the request. For comparing the hashes you also need "),s("code",[t._v("crypto")]),t._v(" which is a built-in Node.js module.")]),t._v(" "),s("div",{staticClass:"language-JS extra-class"},[s("pre",{pre:!0,attrs:{class:"language-js"}},[s("code",[s("span",{pre:!0,attrs:{class:"token keyword"}},[t._v("const")]),t._v(" bodyParser "),s("span",{pre:!0,attrs:{class:"token operator"}},[t._v("=")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token function"}},[t._v("require")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("(")]),s("span",{pre:!0,attrs:{class:"token string"}},[t._v("'body-parser'")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(")")]),t._v("\n"),s("span",{pre:!0,attrs:{class:"token keyword"}},[t._v("const")]),t._v(" crypto "),s("span",{pre:!0,attrs:{class:"token operator"}},[t._v("=")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token function"}},[t._v("require")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("(")]),s("span",{pre:!0,attrs:{class:"token string"}},[t._v("'crypto'")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(")")]),t._v("\n")])])]),s("p",[t._v("You can parse the raw body of the request like this:")]),t._v(" "),s("div",{staticClass:"language-JS extra-class"},[s("pre",{pre:!0,attrs:{class:"language-js"}},[s("code",[t._v("app"),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(".")]),s("span",{pre:!0,attrs:{class:"token function"}},[t._v("use")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("(")]),t._v("\n bodyParser"),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(".")]),s("span",{pre:!0,attrs:{class:"token function"}},[t._v("json")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("(")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("{")]),t._v("\n "),s("span",{pre:!0,attrs:{class:"token function-variable function"}},[t._v("verify")]),s("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("(")]),s("span",{pre:!0,attrs:{class:"token parameter"}},[t._v("req"),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v(" res"),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v(" buf")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(")")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token operator"}},[t._v("=>")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("{")]),t._v("\n req"),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(".")]),t._v("rawBody "),s("span",{pre:!0,attrs:{class:"token operator"}},[t._v("=")]),t._v(" buf\n "),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("}")]),t._v("\n "),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("}")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(")")]),t._v("\n"),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(")")]),t._v("\n")])])]),s("p",[t._v("This makes sure that in req.rawBody the correct content is parsed so that you can compare the hashed req.rawBody with the "),s("code",[t._v("BTCPAY-SIG")]),t._v(" header value.")]),t._v(" "),s("p",[t._v("However, if you are using TypeScript, you might run into this error:")]),t._v(" "),s("div",{staticClass:"language- extra-class"},[s("pre",{pre:!0,attrs:{class:"language-text"}},[s("code",[t._v("Property 'rawBody' does not exist on type 'Request'.\n")])])]),s("p",[t._v("The temporary fix is to use the "),s("code",[t._v("as")]),t._v(" keyword to tell the compiler to consider the "),s("code",[t._v("req")]),t._v(" object as another type when you accessing the "),s("code",[t._v("rawBody")]),t._v(". Here is an example of how to obtain "),s("code",[t._v("rawBody")]),t._v(" using this workaround, no need for the middleware code above:")]),t._v(" "),s("div",{staticClass:"language-JS extra-class"},[s("pre",{pre:!0,attrs:{class:"language-js"}},[s("code",[s("span",{pre:!0,attrs:{class:"token keyword"}},[t._v("import")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("{")]),t._v(" Request"),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v(" Response "),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("}")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token keyword"}},[t._v("from")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token string"}},[t._v('"express-serve-static-core"')]),t._v("\n"),s("span",{pre:!0,attrs:{class:"token keyword"}},[t._v("import")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("{")]),t._v(" https "),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("}")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token keyword"}},[t._v("from")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token string"}},[t._v('"firebase-functions"')]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(";")]),t._v("\n\ntype FirebaseRequest "),s("span",{pre:!0,attrs:{class:"token operator"}},[t._v("=")]),t._v(" https"),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(".")]),t._v("Request\n\n"),s("span",{pre:!0,attrs:{class:"token keyword"}},[t._v("const")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token function-variable function"}},[t._v("myFunc")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token operator"}},[t._v("=")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token keyword"}},[t._v("async")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("(")]),s("span",{pre:!0,attrs:{class:"token parameter"}},[s("span",{pre:!0,attrs:{class:"token literal-property property"}},[t._v("req")]),s("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" Request"),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token literal-property property"}},[t._v("res")]),s("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" Response")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(")")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token operator"}},[t._v("=>")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("{")]),t._v("\n "),s("span",{pre:!0,attrs:{class:"token keyword"}},[t._v("const")]),t._v(" rawBody "),s("span",{pre:!0,attrs:{class:"token operator"}},[t._v("=")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("(")]),t._v("req "),s("span",{pre:!0,attrs:{class:"token keyword"}},[t._v("as")]),t._v(" FirebaseRequest"),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(")")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(".")]),t._v("rawBody"),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(";")]),t._v("\n"),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("}")]),t._v("\n")])])]),s("p",[t._v("Replace "),s("code",[t._v("req.rawBody")]),t._v(" with "),s("code",[t._v("rawBody")]),t._v(" in the next sections if utilizing this method with TypeScript.")]),t._v(" "),s("p",[t._v("In your router it looks like this put all together: (Change "),s("code",[t._v("webhookSecret")]),t._v(" with the "),s("code",[t._v("secret")]),t._v(" you got back from the previous step when registering the webhook).")]),t._v(" "),s("div",{staticClass:"language-JS extra-class"},[s("pre",{pre:!0,attrs:{class:"language-js"}},[s("code",[t._v("app"),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(".")]),s("span",{pre:!0,attrs:{class:"token function"}},[t._v("post")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("(")]),s("span",{pre:!0,attrs:{class:"token string"}},[t._v("'/your-webhook-endpoint'")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("(")]),s("span",{pre:!0,attrs:{class:"token parameter"}},[t._v("req"),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v(" res")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(")")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token operator"}},[t._v("=>")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("{")]),t._v("\n "),s("span",{pre:!0,attrs:{class:"token keyword"}},[t._v("const")]),t._v(" sigHashAlg "),s("span",{pre:!0,attrs:{class:"token operator"}},[t._v("=")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token string"}},[t._v("'sha256'")]),t._v("\n "),s("span",{pre:!0,attrs:{class:"token keyword"}},[t._v("const")]),t._v(" sigHeaderName "),s("span",{pre:!0,attrs:{class:"token operator"}},[t._v("=")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token string"}},[t._v("'BTCPAY-SIG'")]),t._v("\n "),s("span",{pre:!0,attrs:{class:"token keyword"}},[t._v("const")]),t._v(" webhookSecret "),s("span",{pre:!0,attrs:{class:"token operator"}},[t._v("=")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token string"}},[t._v("'SECRET_FROM_REGISTERING_WEBHOOK'")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token comment"}},[t._v("// see previous step")]),t._v("\n "),s("span",{pre:!0,attrs:{class:"token keyword"}},[t._v("if")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("(")]),s("span",{pre:!0,attrs:{class:"token operator"}},[t._v("!")]),t._v("req"),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(".")]),t._v("rawBody"),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(")")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("{")]),t._v("\n res"),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(".")]),s("span",{pre:!0,attrs:{class:"token function"}},[t._v("status")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("(")]),s("span",{pre:!0,attrs:{class:"token number"}},[t._v("500")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(")")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(".")]),s("span",{pre:!0,attrs:{class:"token function"}},[t._v("send")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("(")]),s("span",{pre:!0,attrs:{class:"token string"}},[t._v("'Request body empty'")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(")")]),t._v("\n "),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("}")]),t._v("\n "),s("span",{pre:!0,attrs:{class:"token keyword"}},[t._v("const")]),t._v(" checksum "),s("span",{pre:!0,attrs:{class:"token operator"}},[t._v("=")]),t._v(" Buffer"),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(".")]),s("span",{pre:!0,attrs:{class:"token function"}},[t._v("from")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("(")]),t._v("req"),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(".")]),s("span",{pre:!0,attrs:{class:"token function"}},[t._v("get")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("(")]),t._v("sigHeaderName"),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(")")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token operator"}},[t._v("||")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token string"}},[t._v("''")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token string"}},[t._v("'utf8'")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(")")]),t._v("\n "),s("span",{pre:!0,attrs:{class:"token keyword"}},[t._v("const")]),t._v(" hmac "),s("span",{pre:!0,attrs:{class:"token operator"}},[t._v("=")]),t._v(" crypto"),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(".")]),s("span",{pre:!0,attrs:{class:"token function"}},[t._v("createHmac")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("(")]),t._v("sigHashAlg"),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v(" webhookSecret"),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(")")]),t._v("\n "),s("span",{pre:!0,attrs:{class:"token keyword"}},[t._v("const")]),t._v(" digest "),s("span",{pre:!0,attrs:{class:"token operator"}},[t._v("=")]),t._v(" Buffer"),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(".")]),s("span",{pre:!0,attrs:{class:"token function"}},[t._v("from")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("(")]),t._v("\n sigHashAlg "),s("span",{pre:!0,attrs:{class:"token operator"}},[t._v("+")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token string"}},[t._v("'='")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token operator"}},[t._v("+")]),t._v(" hmac"),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(".")]),s("span",{pre:!0,attrs:{class:"token function"}},[t._v("update")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("(")]),t._v("req"),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(".")]),t._v("rawBody"),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(")")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(".")]),s("span",{pre:!0,attrs:{class:"token function"}},[t._v("digest")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("(")]),s("span",{pre:!0,attrs:{class:"token string"}},[t._v("'hex'")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(")")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v("\n "),s("span",{pre:!0,attrs:{class:"token string"}},[t._v("'utf8'")]),t._v("\n "),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(")")]),t._v("\n\n "),s("span",{pre:!0,attrs:{class:"token keyword"}},[t._v("if")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("(")]),t._v("\n checksum"),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(".")]),t._v("length "),s("span",{pre:!0,attrs:{class:"token operator"}},[t._v("!==")]),t._v(" digest"),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(".")]),t._v("length "),s("span",{pre:!0,attrs:{class:"token operator"}},[t._v("||")]),t._v("\n "),s("span",{pre:!0,attrs:{class:"token operator"}},[t._v("!")]),t._v("crypto"),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(".")]),s("span",{pre:!0,attrs:{class:"token function"}},[t._v("timingSafeEqual")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("(")]),t._v("digest"),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v(" checksum"),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(")")]),t._v("\n "),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(")")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("{")]),t._v("\n console"),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(".")]),s("span",{pre:!0,attrs:{class:"token function"}},[t._v("log")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("(")]),s("span",{pre:!0,attrs:{class:"token template-string"}},[s("span",{pre:!0,attrs:{class:"token template-punctuation string"}},[t._v("`")]),s("span",{pre:!0,attrs:{class:"token string"}},[t._v("Request body digest (")]),s("span",{pre:!0,attrs:{class:"token interpolation"}},[s("span",{pre:!0,attrs:{class:"token interpolation-punctuation punctuation"}},[t._v("${")]),t._v("digest"),s("span",{pre:!0,attrs:{class:"token interpolation-punctuation punctuation"}},[t._v("}")])]),s("span",{pre:!0,attrs:{class:"token string"}},[t._v(") did not match ")]),s("span",{pre:!0,attrs:{class:"token interpolation"}},[s("span",{pre:!0,attrs:{class:"token interpolation-punctuation punctuation"}},[t._v("${")]),t._v("sigHeaderName"),s("span",{pre:!0,attrs:{class:"token interpolation-punctuation punctuation"}},[t._v("}")])]),s("span",{pre:!0,attrs:{class:"token string"}},[t._v(" (")]),s("span",{pre:!0,attrs:{class:"token interpolation"}},[s("span",{pre:!0,attrs:{class:"token interpolation-punctuation punctuation"}},[t._v("${")]),t._v("checksum"),s("span",{pre:!0,attrs:{class:"token interpolation-punctuation punctuation"}},[t._v("}")])]),s("span",{pre:!0,attrs:{class:"token string"}},[t._v(")")]),s("span",{pre:!0,attrs:{class:"token template-punctuation string"}},[t._v("`")])]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(")")]),t._v("\n res"),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(".")]),s("span",{pre:!0,attrs:{class:"token function"}},[t._v("status")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("(")]),s("span",{pre:!0,attrs:{class:"token number"}},[t._v("500")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(")")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(".")]),s("span",{pre:!0,attrs:{class:"token function"}},[t._v("send")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("(")]),s("span",{pre:!0,attrs:{class:"token template-string"}},[s("span",{pre:!0,attrs:{class:"token template-punctuation string"}},[t._v("`")]),s("span",{pre:!0,attrs:{class:"token string"}},[t._v("Request body digest (")]),s("span",{pre:!0,attrs:{class:"token interpolation"}},[s("span",{pre:!0,attrs:{class:"token interpolation-punctuation punctuation"}},[t._v("${")]),t._v("digest"),s("span",{pre:!0,attrs:{class:"token interpolation-punctuation punctuation"}},[t._v("}")])]),s("span",{pre:!0,attrs:{class:"token string"}},[t._v(") did not match ")]),s("span",{pre:!0,attrs:{class:"token interpolation"}},[s("span",{pre:!0,attrs:{class:"token interpolation-punctuation punctuation"}},[t._v("${")]),t._v("sigHeaderName"),s("span",{pre:!0,attrs:{class:"token interpolation-punctuation punctuation"}},[t._v("}")])]),s("span",{pre:!0,attrs:{class:"token string"}},[t._v(" (")]),s("span",{pre:!0,attrs:{class:"token interpolation"}},[s("span",{pre:!0,attrs:{class:"token interpolation-punctuation punctuation"}},[t._v("${")]),t._v("checksum"),s("span",{pre:!0,attrs:{class:"token interpolation-punctuation punctuation"}},[t._v("}")])]),s("span",{pre:!0,attrs:{class:"token string"}},[t._v(")")]),s("span",{pre:!0,attrs:{class:"token template-punctuation string"}},[t._v("`")])]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(")")]),t._v("\n "),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("}")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token keyword"}},[t._v("else")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("{")]),t._v("\n\n "),s("span",{pre:!0,attrs:{class:"token comment"}},[t._v("// Your own processing code goes here. E.g. update your internal order id depending on the invoice payment status.")]),t._v("\n\n res"),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(".")]),s("span",{pre:!0,attrs:{class:"token function"}},[t._v("status")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("(")]),s("span",{pre:!0,attrs:{class:"token number"}},[t._v("200")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(")")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(".")]),s("span",{pre:!0,attrs:{class:"token function"}},[t._v("send")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("(")]),s("span",{pre:!0,attrs:{class:"token string"}},[t._v("'Success: request body was signed'")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(")")]),t._v("\n "),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("}")]),t._v("\n"),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("}")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(")")]),t._v("\n")])])]),s("h3",{attrs:{id:"issue-a-full-refund-of-an-invoice"}},[s("a",{staticClass:"header-anchor",attrs:{href:"#issue-a-full-refund-of-an-invoice"}},[t._v("#")]),t._v(" Issue a full refund of an invoice")]),t._v(" "),s("p",[t._v("Using the "),s("a",{attrs:{href:"https://docs.btcpayserver.org/API/Greenfield/v1/#operation/Invoices_Refund",target:"_blank",rel:"noopener noreferrer"}},[t._v("invoice refund endpoint"),s("OutboundLink")],1),t._v(" you can issue a full (or even partial) refund of an invoice. This will return a link where the customer can claim the refund.")]),t._v(" "),s("div",{staticClass:"language-JS extra-class"},[s("pre",{pre:!0,attrs:{class:"language-js"}},[s("code",[s("span",{pre:!0,attrs:{class:"token keyword"}},[t._v("const")]),t._v(" btcpayServerUrl "),s("span",{pre:!0,attrs:{class:"token operator"}},[t._v("=")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token string"}},[t._v("'https://mainnet.demo.btcpayserver.org'")]),t._v("\n"),s("span",{pre:!0,attrs:{class:"token keyword"}},[t._v("const")]),t._v(" storeId "),s("span",{pre:!0,attrs:{class:"token operator"}},[t._v("=")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token string"}},[t._v("'YOUR_STORE_ID'")]),t._v("\n"),s("span",{pre:!0,attrs:{class:"token keyword"}},[t._v("const")]),t._v(" apiKey "),s("span",{pre:!0,attrs:{class:"token operator"}},[t._v("=")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token string"}},[t._v("'YOUR_API_KEY'")]),t._v("\n"),s("span",{pre:!0,attrs:{class:"token keyword"}},[t._v("const")]),t._v(" invoiceId "),s("span",{pre:!0,attrs:{class:"token operator"}},[t._v("=")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token string"}},[t._v("'EXISTING_INVOICE_ID'")]),t._v("\n\n"),s("span",{pre:!0,attrs:{class:"token keyword"}},[t._v("const")]),t._v(" apiEndpoint "),s("span",{pre:!0,attrs:{class:"token operator"}},[t._v("=")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token template-string"}},[s("span",{pre:!0,attrs:{class:"token template-punctuation string"}},[t._v("`")]),s("span",{pre:!0,attrs:{class:"token string"}},[t._v("/api/v1/stores/")]),s("span",{pre:!0,attrs:{class:"token interpolation"}},[s("span",{pre:!0,attrs:{class:"token interpolation-punctuation punctuation"}},[t._v("${")]),t._v("storeId"),s("span",{pre:!0,attrs:{class:"token interpolation-punctuation punctuation"}},[t._v("}")])]),s("span",{pre:!0,attrs:{class:"token string"}},[t._v("/invoices/")]),s("span",{pre:!0,attrs:{class:"token interpolation"}},[s("span",{pre:!0,attrs:{class:"token interpolation-punctuation punctuation"}},[t._v("${")]),t._v("invoiceId"),s("span",{pre:!0,attrs:{class:"token interpolation-punctuation punctuation"}},[t._v("}")])]),s("span",{pre:!0,attrs:{class:"token string"}},[t._v("/refund")]),s("span",{pre:!0,attrs:{class:"token template-punctuation string"}},[t._v("`")])]),t._v("\n\n"),s("span",{pre:!0,attrs:{class:"token keyword"}},[t._v("const")]),t._v(" headers "),s("span",{pre:!0,attrs:{class:"token operator"}},[t._v("=")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("{")]),t._v("\n "),s("span",{pre:!0,attrs:{class:"token string-property property"}},[t._v("'Content-Type'")]),s("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token string"}},[t._v("'application/json'")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v("\n "),s("span",{pre:!0,attrs:{class:"token literal-property property"}},[t._v("Authorization")]),s("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token string"}},[t._v("'token '")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token operator"}},[t._v("+")]),t._v(" apiKey\n"),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("}")]),t._v("\n\n"),s("span",{pre:!0,attrs:{class:"token keyword"}},[t._v("const")]),t._v(" payload "),s("span",{pre:!0,attrs:{class:"token operator"}},[t._v("=")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("{")]),t._v("\n "),s("span",{pre:!0,attrs:{class:"token literal-property property"}},[t._v("refundVariant")]),s("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token string"}},[t._v("'CurrentRate'")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v("\n "),s("span",{pre:!0,attrs:{class:"token literal-property property"}},[t._v("paymentMethod")]),s("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token string"}},[t._v("'BTC'")]),t._v("\n"),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("}")]),t._v("\n\n"),s("span",{pre:!0,attrs:{class:"token function"}},[t._v("fetch")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("(")]),t._v("btcpayServerUrl "),s("span",{pre:!0,attrs:{class:"token operator"}},[t._v("+")]),t._v(" apiEndpoint"),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("{")]),t._v("\n "),s("span",{pre:!0,attrs:{class:"token literal-property property"}},[t._v("method")]),s("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token string"}},[t._v("'POST'")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v("\n "),s("span",{pre:!0,attrs:{class:"token literal-property property"}},[t._v("headers")]),s("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" headers"),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v("\n "),s("span",{pre:!0,attrs:{class:"token literal-property property"}},[t._v("body")]),s("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token constant"}},[t._v("JSON")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(".")]),s("span",{pre:!0,attrs:{class:"token function"}},[t._v("stringify")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("(")]),t._v("payload"),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(")")]),t._v("\n"),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("}")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(")")]),t._v("\n "),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(".")]),s("span",{pre:!0,attrs:{class:"token function"}},[t._v("then")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("(")]),s("span",{pre:!0,attrs:{class:"token parameter"}},[t._v("response")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token operator"}},[t._v("=>")]),t._v(" response"),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(".")]),s("span",{pre:!0,attrs:{class:"token function"}},[t._v("json")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("(")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(")")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(")")]),t._v("\n "),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(".")]),s("span",{pre:!0,attrs:{class:"token function"}},[t._v("then")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("(")]),s("span",{pre:!0,attrs:{class:"token parameter"}},[t._v("data")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token operator"}},[t._v("=>")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("{")]),t._v("\n console"),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(".")]),s("span",{pre:!0,attrs:{class:"token function"}},[t._v("log")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("(")]),t._v("data"),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(")")]),t._v("\n res"),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(".")]),s("span",{pre:!0,attrs:{class:"token function"}},[t._v("send")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("(")]),t._v("data"),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(")")]),t._v("\n "),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("}")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(")")]),t._v("\n")])])]),s("h2",{attrs:{id:"btcpay-server-management-examples"}},[s("a",{staticClass:"header-anchor",attrs:{href:"#btcpay-server-management-examples"}},[t._v("#")]),t._v(" BTCPay Server management examples")]),t._v(" "),s("p",[t._v("Here we assume you are an ambassador and host BTCPay Server for your users. You manage your users on your own system and want to create a user and set email and password for their BTCPay Server login. Then using the same credentials to create a store and an API key on behalf of that user.")]),t._v(" "),s("h3",{attrs:{id:"create-a-new-user"}},[s("a",{staticClass:"header-anchor",attrs:{href:"#create-a-new-user"}},[t._v("#")]),t._v(" Create a new user")]),t._v(" "),s("p",[t._v("Creating a new user can be done by using "),s("a",{attrs:{href:"https://docs.btcpayserver.org/API/Greenfield/v1/#operation/Users_CreateUser",target:"_blank",rel:"noopener noreferrer"}},[t._v("this endpoint"),s("OutboundLink")],1),t._v(".")]),t._v(" "),s("div",{staticClass:"language-JS extra-class"},[s("pre",{pre:!0,attrs:{class:"language-js"}},[s("code",[s("span",{pre:!0,attrs:{class:"token keyword"}},[t._v("const")]),t._v(" btcpayServerUrl "),s("span",{pre:!0,attrs:{class:"token operator"}},[t._v("=")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token string"}},[t._v("'https://mainnet.demo.btcpayserver.org'")]),t._v("\n"),s("span",{pre:!0,attrs:{class:"token keyword"}},[t._v("const")]),t._v(" adminApiKey "),s("span",{pre:!0,attrs:{class:"token operator"}},[t._v("=")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token string"}},[t._v("'YOUR_ADMIN_API_KEY'")]),t._v("\n\n"),s("span",{pre:!0,attrs:{class:"token keyword"}},[t._v("const")]),t._v(" apiEndpoint "),s("span",{pre:!0,attrs:{class:"token operator"}},[t._v("=")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token string"}},[t._v("'/api/v1/users'")]),t._v("\n\n"),s("span",{pre:!0,attrs:{class:"token keyword"}},[t._v("const")]),t._v(" headers "),s("span",{pre:!0,attrs:{class:"token operator"}},[t._v("=")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("{")]),t._v("\n "),s("span",{pre:!0,attrs:{class:"token string-property property"}},[t._v("'Content-Type'")]),s("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token string"}},[t._v("'application/json'")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v("\n "),s("span",{pre:!0,attrs:{class:"token literal-property property"}},[t._v("Authorization")]),s("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token string"}},[t._v("'token '")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token operator"}},[t._v("+")]),t._v(" adminApiKey\n"),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("}")]),t._v("\n\n"),s("span",{pre:!0,attrs:{class:"token keyword"}},[t._v("const")]),t._v(" payload "),s("span",{pre:!0,attrs:{class:"token operator"}},[t._v("=")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("{")]),t._v("\n "),s("span",{pre:!0,attrs:{class:"token literal-property property"}},[t._v("email")]),s("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token string"}},[t._v("'satoshi.nakamoto@example.com'")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v("\n "),s("span",{pre:!0,attrs:{class:"token literal-property property"}},[t._v("password")]),s("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token string"}},[t._v("'SuperSecurePasswordsShouldBeQuiteLong123'")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v("\n "),s("span",{pre:!0,attrs:{class:"token literal-property property"}},[t._v("isAdministrator")]),s("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token boolean"}},[t._v("false")]),t._v("\n"),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("}")]),t._v("\n\n"),s("span",{pre:!0,attrs:{class:"token function"}},[t._v("fetch")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("(")]),t._v("btcpayServerUrl "),s("span",{pre:!0,attrs:{class:"token operator"}},[t._v("+")]),t._v(" apiEndpoint"),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("{")]),t._v("\n "),s("span",{pre:!0,attrs:{class:"token literal-property property"}},[t._v("method")]),s("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token string"}},[t._v("'POST'")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v("\n "),s("span",{pre:!0,attrs:{class:"token literal-property property"}},[t._v("headers")]),s("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" headers"),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v("\n "),s("span",{pre:!0,attrs:{class:"token literal-property property"}},[t._v("body")]),s("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token constant"}},[t._v("JSON")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(".")]),s("span",{pre:!0,attrs:{class:"token function"}},[t._v("stringify")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("(")]),t._v("payload"),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(")")]),t._v("\n"),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("}")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(")")]),t._v("\n "),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(".")]),s("span",{pre:!0,attrs:{class:"token function"}},[t._v("then")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("(")]),s("span",{pre:!0,attrs:{class:"token parameter"}},[t._v("response")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token operator"}},[t._v("=>")]),t._v(" response"),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(".")]),s("span",{pre:!0,attrs:{class:"token function"}},[t._v("json")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("(")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(")")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(")")]),t._v("\n "),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(".")]),s("span",{pre:!0,attrs:{class:"token function"}},[t._v("then")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("(")]),s("span",{pre:!0,attrs:{class:"token parameter"}},[t._v("data")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token operator"}},[t._v("=>")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("{")]),t._v("\n console"),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(".")]),s("span",{pre:!0,attrs:{class:"token function"}},[t._v("log")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("(")]),t._v("data"),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(")")]),t._v("\n res"),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(".")]),s("span",{pre:!0,attrs:{class:"token function"}},[t._v("send")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("(")]),t._v("data"),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(")")]),t._v("\n "),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("}")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(")")]),t._v("\n")])])]),s("h3",{attrs:{id:"create-a-new-api-key-for-the-user"}},[s("a",{staticClass:"header-anchor",attrs:{href:"#create-a-new-api-key-for-the-user"}},[t._v("#")]),t._v(" Create a new API key (for the user)")]),t._v(" "),s("p",[t._v("While we can use basic authentication to access the greenfield API, it is recommended to use API Keys to limit the scope of the credentials.")]),t._v(" "),s("p",[t._v("For example: If we want to "),s("a",{attrs:{href:"https://docs.btcpayserver.org/API/Greenfield/v1/#operation/Stores_CreateStore",target:"_blank",rel:"noopener noreferrer"}},[t._v("create a new store"),s("OutboundLink")],1),t._v(" we need the "),s("code",[t._v("btcpay.store.canmodifystoresettings")]),t._v(" permission for the API key. Warning: If you do not pass any permission then the API key will have unrestricted access.")]),t._v(" "),s("p",[t._v("As mentioned above, you can do this through the BTCPay Server UI of your instance, but let's do it through the API using "),s("a",{attrs:{href:"https://docs.btcpayserver.org/API/Greenfield/v1/#operation/ApiKeys_CreateUserApiKey",target:"_blank",rel:"noopener noreferrer"}},[t._v("this endpoint"),s("OutboundLink")],1),t._v(" where we with our admin API key create an API key for our new user.")]),t._v(" "),s("div",{staticClass:"language-js extra-class"},[s("pre",{pre:!0,attrs:{class:"language-js"}},[s("code",[s("span",{pre:!0,attrs:{class:"token keyword"}},[t._v("const")]),t._v(" btcpayServerUrl "),s("span",{pre:!0,attrs:{class:"token operator"}},[t._v("=")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token string"}},[t._v("'https://mainnet.demo.btcpayserver.org'")]),t._v("\n"),s("span",{pre:!0,attrs:{class:"token keyword"}},[t._v("const")]),t._v(" adminApiKey "),s("span",{pre:!0,attrs:{class:"token operator"}},[t._v("=")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token string"}},[t._v("'YOUR_ADMIN_API_KEY'")]),t._v("\n"),s("span",{pre:!0,attrs:{class:"token keyword"}},[t._v("const")]),t._v(" email "),s("span",{pre:!0,attrs:{class:"token operator"}},[t._v("=")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token string"}},[t._v("'satoshi.nakamoto@example.com'")]),t._v("\n\n"),s("span",{pre:!0,attrs:{class:"token keyword"}},[t._v("const")]),t._v(" apiEndpoint "),s("span",{pre:!0,attrs:{class:"token operator"}},[t._v("=")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token template-string"}},[s("span",{pre:!0,attrs:{class:"token template-punctuation string"}},[t._v("`")]),s("span",{pre:!0,attrs:{class:"token string"}},[t._v("/api/v1/users/")]),s("span",{pre:!0,attrs:{class:"token interpolation"}},[s("span",{pre:!0,attrs:{class:"token interpolation-punctuation punctuation"}},[t._v("${")]),t._v("email"),s("span",{pre:!0,attrs:{class:"token interpolation-punctuation punctuation"}},[t._v("}")])]),s("span",{pre:!0,attrs:{class:"token string"}},[t._v("/api-keys")]),s("span",{pre:!0,attrs:{class:"token template-punctuation string"}},[t._v("`")])]),t._v("\n\n"),s("span",{pre:!0,attrs:{class:"token keyword"}},[t._v("const")]),t._v(" headers "),s("span",{pre:!0,attrs:{class:"token operator"}},[t._v("=")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("{")]),t._v("\n "),s("span",{pre:!0,attrs:{class:"token string-property property"}},[t._v("'Content-Type'")]),s("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token string"}},[t._v("'application/json'")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v("\n "),s("span",{pre:!0,attrs:{class:"token literal-property property"}},[t._v("Authorization")]),s("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token string"}},[t._v("'token '")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token operator"}},[t._v("+")]),t._v(" adminApiKey\n"),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("}")]),t._v("\n\n"),s("span",{pre:!0,attrs:{class:"token keyword"}},[t._v("const")]),t._v(" payload "),s("span",{pre:!0,attrs:{class:"token operator"}},[t._v("=")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("{")]),t._v("\n "),s("span",{pre:!0,attrs:{class:"token literal-property property"}},[t._v("label")]),s("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token string"}},[t._v("'Satoshi Nakamoto API Key'")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v("\n "),s("span",{pre:!0,attrs:{class:"token literal-property property"}},[t._v("permissions")]),s("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("[")]),s("span",{pre:!0,attrs:{class:"token string"}},[t._v("'btcpay.store.canmodifystoresettings'")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("]")]),t._v("\n"),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("}")]),t._v("\n\n"),s("span",{pre:!0,attrs:{class:"token function"}},[t._v("fetch")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("(")]),t._v("btcpayServerUrl "),s("span",{pre:!0,attrs:{class:"token operator"}},[t._v("+")]),t._v(" apiEndpoint"),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("{")]),t._v("\n "),s("span",{pre:!0,attrs:{class:"token literal-property property"}},[t._v("method")]),s("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token string"}},[t._v("'POST'")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v("\n "),s("span",{pre:!0,attrs:{class:"token literal-property property"}},[t._v("headers")]),s("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" headers"),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v("\n "),s("span",{pre:!0,attrs:{class:"token literal-property property"}},[t._v("body")]),s("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token constant"}},[t._v("JSON")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(".")]),s("span",{pre:!0,attrs:{class:"token function"}},[t._v("stringify")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("(")]),t._v("payload"),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(")")]),t._v("\n"),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("}")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(")")]),t._v("\n "),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(".")]),s("span",{pre:!0,attrs:{class:"token function"}},[t._v("then")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("(")]),s("span",{pre:!0,attrs:{class:"token parameter"}},[t._v("response")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token operator"}},[t._v("=>")]),t._v(" response"),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(".")]),s("span",{pre:!0,attrs:{class:"token function"}},[t._v("json")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("(")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(")")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(")")]),t._v("\n "),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(".")]),s("span",{pre:!0,attrs:{class:"token function"}},[t._v("then")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("(")]),s("span",{pre:!0,attrs:{class:"token parameter"}},[t._v("data")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token operator"}},[t._v("=>")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("{")]),t._v("\n console"),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(".")]),s("span",{pre:!0,attrs:{class:"token function"}},[t._v("log")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("(")]),t._v("data"),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(")")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token comment"}},[t._v("// returns apiKey")]),t._v("\n res"),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(".")]),s("span",{pre:!0,attrs:{class:"token function"}},[t._v("send")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("(")]),t._v("data"),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(")")]),t._v("\n "),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("}")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(")")]),t._v("\n")])])]),s("h3",{attrs:{id:"create-a-new-store"}},[s("a",{staticClass:"header-anchor",attrs:{href:"#create-a-new-store"}},[t._v("#")]),t._v(" Create a new store")]),t._v(" "),s("p",[t._v("Now, we can use the api key to "),s("a",{attrs:{href:"https://docs.btcpayserver.org/API/Greenfield/v1/#operation/Stores_CreateStore",target:"_blank",rel:"noopener noreferrer"}},[t._v("create a new store"),s("OutboundLink")],1),t._v(".")]),t._v(" "),s("div",{staticClass:"language-JS extra-class"},[s("pre",{pre:!0,attrs:{class:"language-js"}},[s("code",[s("span",{pre:!0,attrs:{class:"token keyword"}},[t._v("const")]),t._v(" btcpayserverUrl "),s("span",{pre:!0,attrs:{class:"token operator"}},[t._v("=")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token string"}},[t._v("'https://mainnet.demo.btcpayserver.org'")]),t._v("\n"),s("span",{pre:!0,attrs:{class:"token keyword"}},[t._v("const")]),t._v(" userApiKey "),s("span",{pre:!0,attrs:{class:"token operator"}},[t._v("=")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token string"}},[t._v("'USER_API_KEY'")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token comment"}},[t._v("// From previous step")]),t._v("\n\n"),s("span",{pre:!0,attrs:{class:"token keyword"}},[t._v("const")]),t._v(" apiEndpoint "),s("span",{pre:!0,attrs:{class:"token operator"}},[t._v("=")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token string"}},[t._v("'/api/v1/stores'")]),t._v("\n\n"),s("span",{pre:!0,attrs:{class:"token keyword"}},[t._v("const")]),t._v(" headers "),s("span",{pre:!0,attrs:{class:"token operator"}},[t._v("=")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("{")]),t._v("\n "),s("span",{pre:!0,attrs:{class:"token string-property property"}},[t._v("'Content-Type'")]),s("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token string"}},[t._v("'application/json'")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v("\n "),s("span",{pre:!0,attrs:{class:"token literal-property property"}},[t._v("Authorization")]),s("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token string"}},[t._v("'token '")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token operator"}},[t._v("+")]),t._v(" userApiKey\n"),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("}")]),t._v("\n"),s("span",{pre:!0,attrs:{class:"token keyword"}},[t._v("const")]),t._v(" payload "),s("span",{pre:!0,attrs:{class:"token operator"}},[t._v("=")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("{")]),t._v("\n "),s("span",{pre:!0,attrs:{class:"token literal-property property"}},[t._v("name")]),s("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token string"}},[t._v("'Satoshi Store'")]),t._v("\n"),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("}")]),t._v("\n\n"),s("span",{pre:!0,attrs:{class:"token function"}},[t._v("fetch")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("(")]),t._v("btcpayServerUrl "),s("span",{pre:!0,attrs:{class:"token operator"}},[t._v("+")]),t._v(" apiEndpoint"),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("{")]),t._v("\n "),s("span",{pre:!0,attrs:{class:"token literal-property property"}},[t._v("method")]),s("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token string"}},[t._v("'POST'")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v("\n "),s("span",{pre:!0,attrs:{class:"token literal-property property"}},[t._v("headers")]),s("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" headers"),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v("\n "),s("span",{pre:!0,attrs:{class:"token literal-property property"}},[t._v("body")]),s("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token constant"}},[t._v("JSON")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(".")]),s("span",{pre:!0,attrs:{class:"token function"}},[t._v("stringify")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("(")]),t._v("payload"),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(")")]),t._v("\n"),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("}")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(")")]),t._v("\n "),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(".")]),s("span",{pre:!0,attrs:{class:"token function"}},[t._v("then")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("(")]),s("span",{pre:!0,attrs:{class:"token parameter"}},[t._v("response")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token operator"}},[t._v("=>")]),t._v(" response"),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(".")]),s("span",{pre:!0,attrs:{class:"token function"}},[t._v("json")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("(")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(")")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(")")]),t._v("\n "),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(".")]),s("span",{pre:!0,attrs:{class:"token function"}},[t._v("then")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("(")]),s("span",{pre:!0,attrs:{class:"token parameter"}},[t._v("data")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token operator"}},[t._v("=>")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("{")]),t._v("\n console"),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(".")]),s("span",{pre:!0,attrs:{class:"token function"}},[t._v("log")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("(")]),t._v("data"),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(")")]),t._v("\n res"),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(".")]),s("span",{pre:!0,attrs:{class:"token function"}},[t._v("send")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("(")]),t._v("data"),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(")")]),t._v("\n "),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("}")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(")")]),t._v("\n")])])]),s("h3",{attrs:{id:"read-store-information"}},[s("a",{staticClass:"header-anchor",attrs:{href:"#read-store-information"}},[t._v("#")]),t._v(" Read store information")]),t._v(" "),s("p",[t._v("We can use the new apikey to "),s("a",{attrs:{href:"https://docs.btcpayserver.org/API/Greenfield/v1/#operation/Stores_GetStore",target:"_blank",rel:"noopener noreferrer"}},[t._v("read store"),s("OutboundLink")],1),t._v(" information:")]),t._v(" "),s("div",{staticClass:"language-JS extra-class"},[s("pre",{pre:!0,attrs:{class:"language-js"}},[s("code",[s("span",{pre:!0,attrs:{class:"token keyword"}},[t._v("const")]),t._v(" btcpayServerUrl "),s("span",{pre:!0,attrs:{class:"token operator"}},[t._v("=")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token string"}},[t._v("'https://mainnet.demo.btcpayserver.org'")]),t._v("\n"),s("span",{pre:!0,attrs:{class:"token keyword"}},[t._v("const")]),t._v(" userApiKey "),s("span",{pre:!0,attrs:{class:"token operator"}},[t._v("=")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token string"}},[t._v("'USER_API_KEY'")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token comment"}},[t._v("// From previous step")]),t._v("\n"),s("span",{pre:!0,attrs:{class:"token keyword"}},[t._v("const")]),t._v(" storeId "),s("span",{pre:!0,attrs:{class:"token operator"}},[t._v("=")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token string"}},[t._v("'STORE_ID'")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token comment"}},[t._v("// From previous step")]),t._v("\n\n"),s("span",{pre:!0,attrs:{class:"token keyword"}},[t._v("const")]),t._v(" apiEndpoint "),s("span",{pre:!0,attrs:{class:"token operator"}},[t._v("=")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token template-string"}},[s("span",{pre:!0,attrs:{class:"token template-punctuation string"}},[t._v("`")]),s("span",{pre:!0,attrs:{class:"token string"}},[t._v("/api/v1/stores/")]),s("span",{pre:!0,attrs:{class:"token interpolation"}},[s("span",{pre:!0,attrs:{class:"token interpolation-punctuation punctuation"}},[t._v("${")]),t._v("storeId"),s("span",{pre:!0,attrs:{class:"token interpolation-punctuation punctuation"}},[t._v("}")])]),s("span",{pre:!0,attrs:{class:"token template-punctuation string"}},[t._v("`")])]),t._v("\n\n"),s("span",{pre:!0,attrs:{class:"token keyword"}},[t._v("const")]),t._v(" headers "),s("span",{pre:!0,attrs:{class:"token operator"}},[t._v("=")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("{")]),t._v("\n "),s("span",{pre:!0,attrs:{class:"token string-property property"}},[t._v("'Content-Type'")]),s("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token string"}},[t._v("'application/json'")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v("\n "),s("span",{pre:!0,attrs:{class:"token literal-property property"}},[t._v("Authorization")]),s("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token string"}},[t._v("'token '")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token operator"}},[t._v("+")]),t._v(" userApiKey\n"),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("}")]),t._v("\n\n"),s("span",{pre:!0,attrs:{class:"token function"}},[t._v("fetch")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("(")]),t._v("btcpayServerUrl "),s("span",{pre:!0,attrs:{class:"token operator"}},[t._v("+")]),t._v(" apiEndpoint"),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("{")]),t._v("\n "),s("span",{pre:!0,attrs:{class:"token literal-property property"}},[t._v("method")]),s("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token string"}},[t._v("'GET'")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v("\n "),s("span",{pre:!0,attrs:{class:"token literal-property property"}},[t._v("headers")]),s("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" headers\n"),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("}")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(")")]),t._v("\n "),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(".")]),s("span",{pre:!0,attrs:{class:"token function"}},[t._v("then")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("(")]),s("span",{pre:!0,attrs:{class:"token parameter"}},[t._v("response")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token operator"}},[t._v("=>")]),t._v(" response"),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(".")]),s("span",{pre:!0,attrs:{class:"token function"}},[t._v("json")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("(")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(")")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(")")]),t._v("\n "),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(".")]),s("span",{pre:!0,attrs:{class:"token function"}},[t._v("then")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("(")]),s("span",{pre:!0,attrs:{class:"token parameter"}},[t._v("data")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token operator"}},[t._v("=>")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("{")]),t._v("\n console"),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(".")]),s("span",{pre:!0,attrs:{class:"token function"}},[t._v("log")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("(")]),t._v("data"),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(")")]),t._v("\n res"),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(".")]),s("span",{pre:!0,attrs:{class:"token function"}},[t._v("send")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("(")]),t._v("data"),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(")")]),t._v("\n "),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("}")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(")")]),t._v("\n")])])])])}),[],!1,null,null,null);s.default=e.exports}}]); \ No newline at end of file +(window.webpackJsonp=window.webpackJsonp||[]).push([[123],{770:function(t,s,a){"use strict";a.r(s);var n=a(10),e=Object(n.a)({},(function(){var t=this,s=t._self._c;return s("ContentSlotsDistributor",{attrs:{"slot-key":t.$parent.slotKey}},[s("h1",{attrs:{id:"greenfield-api-example-with-nodejs-javascript"}},[s("a",{staticClass:"header-anchor",attrs:{href:"#greenfield-api-example-with-nodejs-javascript"}},[t._v("#")]),t._v(" Greenfield API example with Node.js (JavaScript)")]),t._v(" "),s("p",[t._v("The "),s("strong",[s("a",{attrs:{href:"https://docs.btcpayserver.org/API/Greenfield/v1/",target:"_blank",rel:"noopener noreferrer"}},[t._v("Greenfield API"),s("OutboundLink")],1)]),t._v(" (also available on your instance on "),s("code",[t._v("/docs")]),t._v(") allows you to operate BTCPay Server via an easy-to-use REST API.")]),t._v(" "),s("p",[t._v("Note that you can partially generate clients in the language of your choice by using the "),s("a",{attrs:{href:"https://docs.btcpayserver.org/API/Greenfield/v1/swagger.json",target:"_blank",rel:"noopener noreferrer"}},[t._v("Swagger file"),s("OutboundLink")],1),t._v(".")]),t._v(" "),s("p",[t._v("In this guide, we will show you how to use it using Node.js/JavaScript.")]),t._v(" "),s("h2",{attrs:{id:"prerequisites"}},[s("a",{staticClass:"header-anchor",attrs:{href:"#prerequisites"}},[t._v("#")]),t._v(" Prerequisites")]),t._v(" "),s("p",[t._v("Unless for a few endpoints like creating a store and API key on behalf of a specific user, Basic Auth should be avoided and an API key should be used instead. Make sure that API keys only have the needed permissions and not more. E.g. if you only create invoices you should not give the API key the permission to manage your stores.")]),t._v(" "),s("p",[t._v("You can create a new API key in the BTCPay Server UI under "),s("code",[t._v("Account")]),t._v(" -> "),s("code",[t._v("Manage account")]),t._v(" -> "),s("code",[t._v("API keys")])]),t._v(" "),s("p",[t._v("For the ecommerce examples below the API key needs the following permissions:")]),t._v(" "),s("ul",[s("li",[t._v("View invoices")]),t._v(" "),s("li",[t._v("Create invoice")]),t._v(" "),s("li",[t._v("Modify invoices")]),t._v(" "),s("li",[t._v("Modify stores webhooks")]),t._v(" "),s("li",[t._v("View your stores")]),t._v(" "),s("li",[t._v("Create non-approved pull payments")])]),t._v(" "),s("p",[t._v("For an overview of available permissions see the "),s("a",{attrs:{href:"https://docs.btcpayserver.org/API/Greenfield/v1/#section/Authentication/API_Key",target:"_blank",rel:"noopener noreferrer"}},[t._v("API documentation"),s("OutboundLink")],1),t._v(" or the permissions documented on each endpoint.")]),t._v(" "),s("h2",{attrs:{id:"ecommerce-examples"}},[s("a",{staticClass:"header-anchor",attrs:{href:"#ecommerce-examples"}},[t._v("#")]),t._v(" eCommerce examples")]),t._v(" "),s("p",[t._v("The following examples will show you how to create a basic eCommerce flow using the Greenfield API by creating an invoice, registering a webhook, processing webhooks, and issuing a full refund of an invoice.")]),t._v(" "),s("h3",{attrs:{id:"create-an-invoice"}},[s("a",{staticClass:"header-anchor",attrs:{href:"#create-an-invoice"}},[t._v("#")]),t._v(" Create an invoice")]),t._v(" "),s("p",[t._v("We create an invoice using the "),s("a",{attrs:{href:"https://docs.btcpayserver.org/API/Greenfield/v1/#operation/Invoices_CreateInvoice",target:"_blank",rel:"noopener noreferrer"}},[t._v("create invoice endpoint"),s("OutboundLink")],1),t._v(". This is a simple example but you can set a lot more data like order id, buyer email or custom metadata. That said, don't store redundant data on the invoice to prevent data leaks in case of a hack. E.g. in most cases it makes no sense to store the customer address on your eCommerce system and also on the BTCPay invoice.")]),t._v(" "),s("div",{staticClass:"language-JS extra-class"},[s("pre",{pre:!0,attrs:{class:"language-js"}},[s("code",[s("span",{pre:!0,attrs:{class:"token keyword"}},[t._v("const")]),t._v(" btcpayServerUrl "),s("span",{pre:!0,attrs:{class:"token operator"}},[t._v("=")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token string"}},[t._v("'https://mainnet.demo.btcpayserver.org'")]),t._v("\n"),s("span",{pre:!0,attrs:{class:"token keyword"}},[t._v("const")]),t._v(" storeId "),s("span",{pre:!0,attrs:{class:"token operator"}},[t._v("=")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token string"}},[t._v("'YOUR_STORE_ID'")]),t._v("\n"),s("span",{pre:!0,attrs:{class:"token keyword"}},[t._v("const")]),t._v(" apiKey "),s("span",{pre:!0,attrs:{class:"token operator"}},[t._v("=")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token string"}},[t._v("'YOUR_API_KEY'")]),t._v("\n"),s("span",{pre:!0,attrs:{class:"token keyword"}},[t._v("const")]),t._v(" amount "),s("span",{pre:!0,attrs:{class:"token operator"}},[t._v("=")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token number"}},[t._v("10")]),t._v("\n"),s("span",{pre:!0,attrs:{class:"token keyword"}},[t._v("const")]),t._v(" currency "),s("span",{pre:!0,attrs:{class:"token operator"}},[t._v("=")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token string"}},[t._v("'USD'")]),t._v("\n\n"),s("span",{pre:!0,attrs:{class:"token keyword"}},[t._v("const")]),t._v(" apiEndpoint "),s("span",{pre:!0,attrs:{class:"token operator"}},[t._v("=")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token template-string"}},[s("span",{pre:!0,attrs:{class:"token template-punctuation string"}},[t._v("`")]),s("span",{pre:!0,attrs:{class:"token string"}},[t._v("/api/v1/stores/")]),s("span",{pre:!0,attrs:{class:"token interpolation"}},[s("span",{pre:!0,attrs:{class:"token interpolation-punctuation punctuation"}},[t._v("${")]),t._v("storeId"),s("span",{pre:!0,attrs:{class:"token interpolation-punctuation punctuation"}},[t._v("}")])]),s("span",{pre:!0,attrs:{class:"token string"}},[t._v("/invoices")]),s("span",{pre:!0,attrs:{class:"token template-punctuation string"}},[t._v("`")])]),t._v("\n\n"),s("span",{pre:!0,attrs:{class:"token keyword"}},[t._v("const")]),t._v(" headers "),s("span",{pre:!0,attrs:{class:"token operator"}},[t._v("=")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("{")]),t._v("\n "),s("span",{pre:!0,attrs:{class:"token string-property property"}},[t._v("'Content-Type'")]),s("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token string"}},[t._v("'application/json'")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v("\n "),s("span",{pre:!0,attrs:{class:"token literal-property property"}},[t._v("Authorization")]),s("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token string"}},[t._v("'token '")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token operator"}},[t._v("+")]),t._v(" apiKey\n"),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("}")]),t._v("\n"),s("span",{pre:!0,attrs:{class:"token keyword"}},[t._v("const")]),t._v(" payload "),s("span",{pre:!0,attrs:{class:"token operator"}},[t._v("=")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("{")]),t._v("\n "),s("span",{pre:!0,attrs:{class:"token literal-property property"}},[t._v("amount")]),s("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" amount"),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v("\n "),s("span",{pre:!0,attrs:{class:"token literal-property property"}},[t._v("currency")]),s("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" currency\n"),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("}")]),t._v("\n"),s("span",{pre:!0,attrs:{class:"token function"}},[t._v("fetch")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("(")]),t._v("btcpayServerUrl "),s("span",{pre:!0,attrs:{class:"token operator"}},[t._v("+")]),t._v(" apiEndpoint"),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("{")]),t._v("\n "),s("span",{pre:!0,attrs:{class:"token literal-property property"}},[t._v("method")]),s("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token string"}},[t._v("'POST'")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v("\n "),s("span",{pre:!0,attrs:{class:"token literal-property property"}},[t._v("headers")]),s("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" headers"),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v("\n "),s("span",{pre:!0,attrs:{class:"token literal-property property"}},[t._v("body")]),s("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token constant"}},[t._v("JSON")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(".")]),s("span",{pre:!0,attrs:{class:"token function"}},[t._v("stringify")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("(")]),t._v("payload"),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(")")]),t._v("\n"),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("}")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(")")]),t._v("\n "),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(".")]),s("span",{pre:!0,attrs:{class:"token function"}},[t._v("then")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("(")]),s("span",{pre:!0,attrs:{class:"token parameter"}},[t._v("response")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token operator"}},[t._v("=>")]),t._v(" response"),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(".")]),s("span",{pre:!0,attrs:{class:"token function"}},[t._v("json")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("(")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(")")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(")")]),t._v("\n "),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(".")]),s("span",{pre:!0,attrs:{class:"token function"}},[t._v("then")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("(")]),s("span",{pre:!0,attrs:{class:"token parameter"}},[t._v("data")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token operator"}},[t._v("=>")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("{")]),t._v("\n console"),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(".")]),s("span",{pre:!0,attrs:{class:"token function"}},[t._v("log")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("(")]),t._v("data"),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(")")]),t._v("\n "),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("}")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(")")]),t._v("\n")])])]),s("h3",{attrs:{id:"register-a-webhook-optional"}},[s("a",{staticClass:"header-anchor",attrs:{href:"#register-a-webhook-optional"}},[t._v("#")]),t._v(" Register a webhook (optional)")]),t._v(" "),s("p",[t._v("Let's register a webhook to be notified when the invoice is paid. You can use the "),s("a",{attrs:{href:"https://docs.btcpayserver.org/API/Greenfield/v1/#operation/Webhooks_CreateWebhook",target:"_blank",rel:"noopener noreferrer"}},[t._v("create webhook endpoint"),s("OutboundLink")],1),t._v(" to register a webhook.")]),t._v(" "),s("div",{staticClass:"language-JS extra-class"},[s("pre",{pre:!0,attrs:{class:"language-js"}},[s("code",[s("span",{pre:!0,attrs:{class:"token keyword"}},[t._v("const")]),t._v(" btcpayServerUrl "),s("span",{pre:!0,attrs:{class:"token operator"}},[t._v("=")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token string"}},[t._v("'https://mainnet.demo.btcpayserver.org'")]),t._v("\n"),s("span",{pre:!0,attrs:{class:"token keyword"}},[t._v("const")]),t._v(" storeId "),s("span",{pre:!0,attrs:{class:"token operator"}},[t._v("=")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token string"}},[t._v("'YOUR_STORE_ID'")]),t._v("\n"),s("span",{pre:!0,attrs:{class:"token keyword"}},[t._v("const")]),t._v(" apiKey "),s("span",{pre:!0,attrs:{class:"token operator"}},[t._v("=")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token string"}},[t._v("'YOUR_API_KEY'")]),t._v("\n\n"),s("span",{pre:!0,attrs:{class:"token keyword"}},[t._v("const")]),t._v(" apiEndpoint "),s("span",{pre:!0,attrs:{class:"token operator"}},[t._v("=")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token template-string"}},[s("span",{pre:!0,attrs:{class:"token template-punctuation string"}},[t._v("`")]),s("span",{pre:!0,attrs:{class:"token string"}},[t._v("/api/v1/stores/")]),s("span",{pre:!0,attrs:{class:"token interpolation"}},[s("span",{pre:!0,attrs:{class:"token interpolation-punctuation punctuation"}},[t._v("${")]),t._v("storeId"),s("span",{pre:!0,attrs:{class:"token interpolation-punctuation punctuation"}},[t._v("}")])]),s("span",{pre:!0,attrs:{class:"token string"}},[t._v("/webhooks")]),s("span",{pre:!0,attrs:{class:"token template-punctuation string"}},[t._v("`")])]),t._v("\n\n"),s("span",{pre:!0,attrs:{class:"token keyword"}},[t._v("const")]),t._v(" headers "),s("span",{pre:!0,attrs:{class:"token operator"}},[t._v("=")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("{")]),t._v("\n "),s("span",{pre:!0,attrs:{class:"token string-property property"}},[t._v("'Content-Type'")]),s("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token string"}},[t._v("'application/json'")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v("\n "),s("span",{pre:!0,attrs:{class:"token literal-property property"}},[t._v("Authorization")]),s("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token string"}},[t._v("'token '")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token operator"}},[t._v("+")]),t._v(" apiKey\n"),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("}")]),t._v("\n\n"),s("span",{pre:!0,attrs:{class:"token keyword"}},[t._v("const")]),t._v(" payload "),s("span",{pre:!0,attrs:{class:"token operator"}},[t._v("=")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("{")]),t._v("\n "),s("span",{pre:!0,attrs:{class:"token literal-property property"}},[t._v("url")]),s("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token string"}},[t._v("'https://example.com/your-webhook-endpoint'")]),t._v("\n"),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("}")]),t._v("\n"),s("span",{pre:!0,attrs:{class:"token function"}},[t._v("fetch")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("(")]),t._v("btcpayServerUrl "),s("span",{pre:!0,attrs:{class:"token operator"}},[t._v("+")]),t._v(" apiEndpoint"),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("{")]),t._v("\n "),s("span",{pre:!0,attrs:{class:"token literal-property property"}},[t._v("method")]),s("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token string"}},[t._v("'POST'")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v("\n "),s("span",{pre:!0,attrs:{class:"token literal-property property"}},[t._v("headers")]),s("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" headers"),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v("\n "),s("span",{pre:!0,attrs:{class:"token literal-property property"}},[t._v("body")]),s("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token constant"}},[t._v("JSON")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(".")]),s("span",{pre:!0,attrs:{class:"token function"}},[t._v("stringify")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("(")]),t._v("payload"),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(")")]),t._v("\n"),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("}")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(")")]),t._v("\n "),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(".")]),s("span",{pre:!0,attrs:{class:"token function"}},[t._v("then")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("(")]),s("span",{pre:!0,attrs:{class:"token parameter"}},[t._v("response")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token operator"}},[t._v("=>")]),t._v(" response"),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(".")]),s("span",{pre:!0,attrs:{class:"token function"}},[t._v("json")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("(")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(")")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(")")]),t._v("\n "),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(".")]),s("span",{pre:!0,attrs:{class:"token function"}},[t._v("then")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("(")]),s("span",{pre:!0,attrs:{class:"token parameter"}},[t._v("data")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token operator"}},[t._v("=>")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("{")]),t._v("\n console"),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(".")]),s("span",{pre:!0,attrs:{class:"token function"}},[t._v("log")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("(")]),t._v("data"),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(")")]),t._v("\n "),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("}")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(")")]),t._v("\n")])])]),s("p",[t._v("This step is optional, you can also manually create a webhook in the BTCPay Server UI in your store "),s("code",[t._v("Settings")]),t._v(" -> "),s("code",[t._v("Webhooks")]),t._v(".")]),t._v(" "),s("h3",{attrs:{id:"validate-and-process-webhooks"}},[s("a",{staticClass:"header-anchor",attrs:{href:"#validate-and-process-webhooks"}},[t._v("#")]),t._v(" Validate and process webhooks")]),t._v(" "),s("p",[t._v("You can use your Node.js Express web application to receive webhook requests from your BTCPay Server.")]),t._v(" "),s("p",[t._v("First you need a route so that your Node.js application can receive POST requests.\nBased on how you set up the express server this should look something like this:")]),t._v(" "),s("div",{staticClass:"language-JS extra-class"},[s("pre",{pre:!0,attrs:{class:"language-js"}},[s("code",[t._v("app"),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(".")]),s("span",{pre:!0,attrs:{class:"token function"}},[t._v("post")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("(")]),s("span",{pre:!0,attrs:{class:"token string"}},[t._v("'/your-webhook-endpoint'")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("(")]),s("span",{pre:!0,attrs:{class:"token parameter"}},[t._v("req"),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v(" res")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(")")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token operator"}},[t._v("=>")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("{")]),t._v("\n "),s("span",{pre:!0,attrs:{class:"token comment"}},[t._v("// Do stuff here")]),t._v("\n"),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("}")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(")")]),t._v("\n")])])]),s("p",[t._v("What's important is that the webhook sends a HTTP-header "),s("code",[t._v("BTCPAY-SIG")]),t._v(" which is the signed request using the "),s("code",[t._v("secret")]),t._v(" you got back from the previous step when registering the webhook. You can use that "),s("code",[t._v("secret")]),t._v(" and the raw payload (as bytes) you get from the webhook, hash it and compare it to "),s("code",[t._v("BTCPAY-SIG")]),t._v(". Therefore, you need "),s("code",[t._v("body-parser")]),t._v(" which is a middleware to parse the raw body of the request. For comparing the hashes you also need "),s("code",[t._v("crypto")]),t._v(" which is a built-in Node.js module.")]),t._v(" "),s("div",{staticClass:"language-JS extra-class"},[s("pre",{pre:!0,attrs:{class:"language-js"}},[s("code",[s("span",{pre:!0,attrs:{class:"token keyword"}},[t._v("const")]),t._v(" bodyParser "),s("span",{pre:!0,attrs:{class:"token operator"}},[t._v("=")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token function"}},[t._v("require")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("(")]),s("span",{pre:!0,attrs:{class:"token string"}},[t._v("'body-parser'")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(")")]),t._v("\n"),s("span",{pre:!0,attrs:{class:"token keyword"}},[t._v("const")]),t._v(" crypto "),s("span",{pre:!0,attrs:{class:"token operator"}},[t._v("=")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token function"}},[t._v("require")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("(")]),s("span",{pre:!0,attrs:{class:"token string"}},[t._v("'crypto'")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(")")]),t._v("\n")])])]),s("p",[t._v("You can parse the raw body of the request like this:")]),t._v(" "),s("div",{staticClass:"language-JS extra-class"},[s("pre",{pre:!0,attrs:{class:"language-js"}},[s("code",[t._v("app"),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(".")]),s("span",{pre:!0,attrs:{class:"token function"}},[t._v("use")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("(")]),t._v("\n bodyParser"),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(".")]),s("span",{pre:!0,attrs:{class:"token function"}},[t._v("json")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("(")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("{")]),t._v("\n "),s("span",{pre:!0,attrs:{class:"token function-variable function"}},[t._v("verify")]),s("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("(")]),s("span",{pre:!0,attrs:{class:"token parameter"}},[t._v("req"),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v(" res"),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v(" buf")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(")")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token operator"}},[t._v("=>")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("{")]),t._v("\n req"),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(".")]),t._v("rawBody "),s("span",{pre:!0,attrs:{class:"token operator"}},[t._v("=")]),t._v(" buf\n "),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("}")]),t._v("\n "),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("}")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(")")]),t._v("\n"),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(")")]),t._v("\n")])])]),s("p",[t._v("This makes sure that in req.rawBody the correct content is parsed so that you can compare the hashed req.rawBody with the "),s("code",[t._v("BTCPAY-SIG")]),t._v(" header value.")]),t._v(" "),s("p",[t._v("However, if you are using TypeScript, you might run into this error:")]),t._v(" "),s("div",{staticClass:"language- extra-class"},[s("pre",{pre:!0,attrs:{class:"language-text"}},[s("code",[t._v("Property 'rawBody' does not exist on type 'Request'.\n")])])]),s("p",[t._v("The temporary fix is to use the "),s("code",[t._v("as")]),t._v(" keyword to tell the compiler to consider the "),s("code",[t._v("req")]),t._v(" object as another type when you accessing the "),s("code",[t._v("rawBody")]),t._v(". Here is an example of how to obtain "),s("code",[t._v("rawBody")]),t._v(" using this workaround, no need for the middleware code above:")]),t._v(" "),s("div",{staticClass:"language-JS extra-class"},[s("pre",{pre:!0,attrs:{class:"language-js"}},[s("code",[s("span",{pre:!0,attrs:{class:"token keyword"}},[t._v("import")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("{")]),t._v(" Request"),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v(" Response "),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("}")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token keyword"}},[t._v("from")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token string"}},[t._v('"express-serve-static-core"')]),t._v("\n"),s("span",{pre:!0,attrs:{class:"token keyword"}},[t._v("import")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("{")]),t._v(" https "),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("}")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token keyword"}},[t._v("from")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token string"}},[t._v('"firebase-functions"')]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(";")]),t._v("\n\ntype FirebaseRequest "),s("span",{pre:!0,attrs:{class:"token operator"}},[t._v("=")]),t._v(" https"),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(".")]),t._v("Request\n\n"),s("span",{pre:!0,attrs:{class:"token keyword"}},[t._v("const")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token function-variable function"}},[t._v("myFunc")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token operator"}},[t._v("=")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token keyword"}},[t._v("async")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("(")]),s("span",{pre:!0,attrs:{class:"token parameter"}},[s("span",{pre:!0,attrs:{class:"token literal-property property"}},[t._v("req")]),s("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" Request"),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token literal-property property"}},[t._v("res")]),s("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" Response")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(")")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token operator"}},[t._v("=>")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("{")]),t._v("\n "),s("span",{pre:!0,attrs:{class:"token keyword"}},[t._v("const")]),t._v(" rawBody "),s("span",{pre:!0,attrs:{class:"token operator"}},[t._v("=")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("(")]),t._v("req "),s("span",{pre:!0,attrs:{class:"token keyword"}},[t._v("as")]),t._v(" FirebaseRequest"),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(")")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(".")]),t._v("rawBody"),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(";")]),t._v("\n"),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("}")]),t._v("\n")])])]),s("p",[t._v("Replace "),s("code",[t._v("req.rawBody")]),t._v(" with "),s("code",[t._v("rawBody")]),t._v(" in the next sections if utilizing this method with TypeScript.")]),t._v(" "),s("p",[t._v("In your router it looks like this put all together: (Change "),s("code",[t._v("webhookSecret")]),t._v(" with the "),s("code",[t._v("secret")]),t._v(" you got back from the previous step when registering the webhook).")]),t._v(" "),s("div",{staticClass:"language-JS extra-class"},[s("pre",{pre:!0,attrs:{class:"language-js"}},[s("code",[t._v("app"),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(".")]),s("span",{pre:!0,attrs:{class:"token function"}},[t._v("post")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("(")]),s("span",{pre:!0,attrs:{class:"token string"}},[t._v("'/your-webhook-endpoint'")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("(")]),s("span",{pre:!0,attrs:{class:"token parameter"}},[t._v("req"),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v(" res")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(")")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token operator"}},[t._v("=>")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("{")]),t._v("\n "),s("span",{pre:!0,attrs:{class:"token keyword"}},[t._v("const")]),t._v(" sigHashAlg "),s("span",{pre:!0,attrs:{class:"token operator"}},[t._v("=")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token string"}},[t._v("'sha256'")]),t._v("\n "),s("span",{pre:!0,attrs:{class:"token keyword"}},[t._v("const")]),t._v(" sigHeaderName "),s("span",{pre:!0,attrs:{class:"token operator"}},[t._v("=")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token string"}},[t._v("'BTCPAY-SIG'")]),t._v("\n "),s("span",{pre:!0,attrs:{class:"token keyword"}},[t._v("const")]),t._v(" webhookSecret "),s("span",{pre:!0,attrs:{class:"token operator"}},[t._v("=")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token string"}},[t._v("'SECRET_FROM_REGISTERING_WEBHOOK'")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token comment"}},[t._v("// see previous step")]),t._v("\n "),s("span",{pre:!0,attrs:{class:"token keyword"}},[t._v("if")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("(")]),s("span",{pre:!0,attrs:{class:"token operator"}},[t._v("!")]),t._v("req"),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(".")]),t._v("rawBody"),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(")")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("{")]),t._v("\n res"),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(".")]),s("span",{pre:!0,attrs:{class:"token function"}},[t._v("status")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("(")]),s("span",{pre:!0,attrs:{class:"token number"}},[t._v("500")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(")")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(".")]),s("span",{pre:!0,attrs:{class:"token function"}},[t._v("send")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("(")]),s("span",{pre:!0,attrs:{class:"token string"}},[t._v("'Request body empty'")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(")")]),t._v("\n "),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("}")]),t._v("\n "),s("span",{pre:!0,attrs:{class:"token keyword"}},[t._v("const")]),t._v(" checksum "),s("span",{pre:!0,attrs:{class:"token operator"}},[t._v("=")]),t._v(" Buffer"),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(".")]),s("span",{pre:!0,attrs:{class:"token function"}},[t._v("from")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("(")]),t._v("req"),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(".")]),s("span",{pre:!0,attrs:{class:"token function"}},[t._v("get")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("(")]),t._v("sigHeaderName"),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(")")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token operator"}},[t._v("||")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token string"}},[t._v("''")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token string"}},[t._v("'utf8'")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(")")]),t._v("\n "),s("span",{pre:!0,attrs:{class:"token keyword"}},[t._v("const")]),t._v(" hmac "),s("span",{pre:!0,attrs:{class:"token operator"}},[t._v("=")]),t._v(" crypto"),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(".")]),s("span",{pre:!0,attrs:{class:"token function"}},[t._v("createHmac")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("(")]),t._v("sigHashAlg"),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v(" webhookSecret"),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(")")]),t._v("\n "),s("span",{pre:!0,attrs:{class:"token keyword"}},[t._v("const")]),t._v(" digest "),s("span",{pre:!0,attrs:{class:"token operator"}},[t._v("=")]),t._v(" Buffer"),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(".")]),s("span",{pre:!0,attrs:{class:"token function"}},[t._v("from")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("(")]),t._v("\n sigHashAlg "),s("span",{pre:!0,attrs:{class:"token operator"}},[t._v("+")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token string"}},[t._v("'='")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token operator"}},[t._v("+")]),t._v(" hmac"),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(".")]),s("span",{pre:!0,attrs:{class:"token function"}},[t._v("update")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("(")]),t._v("req"),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(".")]),t._v("rawBody"),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(")")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(".")]),s("span",{pre:!0,attrs:{class:"token function"}},[t._v("digest")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("(")]),s("span",{pre:!0,attrs:{class:"token string"}},[t._v("'hex'")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(")")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v("\n "),s("span",{pre:!0,attrs:{class:"token string"}},[t._v("'utf8'")]),t._v("\n "),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(")")]),t._v("\n\n "),s("span",{pre:!0,attrs:{class:"token keyword"}},[t._v("if")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("(")]),t._v("\n checksum"),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(".")]),t._v("length "),s("span",{pre:!0,attrs:{class:"token operator"}},[t._v("!==")]),t._v(" digest"),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(".")]),t._v("length "),s("span",{pre:!0,attrs:{class:"token operator"}},[t._v("||")]),t._v("\n "),s("span",{pre:!0,attrs:{class:"token operator"}},[t._v("!")]),t._v("crypto"),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(".")]),s("span",{pre:!0,attrs:{class:"token function"}},[t._v("timingSafeEqual")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("(")]),t._v("digest"),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v(" checksum"),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(")")]),t._v("\n "),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(")")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("{")]),t._v("\n console"),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(".")]),s("span",{pre:!0,attrs:{class:"token function"}},[t._v("log")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("(")]),s("span",{pre:!0,attrs:{class:"token template-string"}},[s("span",{pre:!0,attrs:{class:"token template-punctuation string"}},[t._v("`")]),s("span",{pre:!0,attrs:{class:"token string"}},[t._v("Request body digest (")]),s("span",{pre:!0,attrs:{class:"token interpolation"}},[s("span",{pre:!0,attrs:{class:"token interpolation-punctuation punctuation"}},[t._v("${")]),t._v("digest"),s("span",{pre:!0,attrs:{class:"token interpolation-punctuation punctuation"}},[t._v("}")])]),s("span",{pre:!0,attrs:{class:"token string"}},[t._v(") did not match ")]),s("span",{pre:!0,attrs:{class:"token interpolation"}},[s("span",{pre:!0,attrs:{class:"token interpolation-punctuation punctuation"}},[t._v("${")]),t._v("sigHeaderName"),s("span",{pre:!0,attrs:{class:"token interpolation-punctuation punctuation"}},[t._v("}")])]),s("span",{pre:!0,attrs:{class:"token string"}},[t._v(" (")]),s("span",{pre:!0,attrs:{class:"token interpolation"}},[s("span",{pre:!0,attrs:{class:"token interpolation-punctuation punctuation"}},[t._v("${")]),t._v("checksum"),s("span",{pre:!0,attrs:{class:"token interpolation-punctuation punctuation"}},[t._v("}")])]),s("span",{pre:!0,attrs:{class:"token string"}},[t._v(")")]),s("span",{pre:!0,attrs:{class:"token template-punctuation string"}},[t._v("`")])]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(")")]),t._v("\n res"),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(".")]),s("span",{pre:!0,attrs:{class:"token function"}},[t._v("status")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("(")]),s("span",{pre:!0,attrs:{class:"token number"}},[t._v("500")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(")")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(".")]),s("span",{pre:!0,attrs:{class:"token function"}},[t._v("send")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("(")]),s("span",{pre:!0,attrs:{class:"token template-string"}},[s("span",{pre:!0,attrs:{class:"token template-punctuation string"}},[t._v("`")]),s("span",{pre:!0,attrs:{class:"token string"}},[t._v("Request body digest (")]),s("span",{pre:!0,attrs:{class:"token interpolation"}},[s("span",{pre:!0,attrs:{class:"token interpolation-punctuation punctuation"}},[t._v("${")]),t._v("digest"),s("span",{pre:!0,attrs:{class:"token interpolation-punctuation punctuation"}},[t._v("}")])]),s("span",{pre:!0,attrs:{class:"token string"}},[t._v(") did not match ")]),s("span",{pre:!0,attrs:{class:"token interpolation"}},[s("span",{pre:!0,attrs:{class:"token interpolation-punctuation punctuation"}},[t._v("${")]),t._v("sigHeaderName"),s("span",{pre:!0,attrs:{class:"token interpolation-punctuation punctuation"}},[t._v("}")])]),s("span",{pre:!0,attrs:{class:"token string"}},[t._v(" (")]),s("span",{pre:!0,attrs:{class:"token interpolation"}},[s("span",{pre:!0,attrs:{class:"token interpolation-punctuation punctuation"}},[t._v("${")]),t._v("checksum"),s("span",{pre:!0,attrs:{class:"token interpolation-punctuation punctuation"}},[t._v("}")])]),s("span",{pre:!0,attrs:{class:"token string"}},[t._v(")")]),s("span",{pre:!0,attrs:{class:"token template-punctuation string"}},[t._v("`")])]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(")")]),t._v("\n "),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("}")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token keyword"}},[t._v("else")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("{")]),t._v("\n\n "),s("span",{pre:!0,attrs:{class:"token comment"}},[t._v("// Your own processing code goes here. E.g. update your internal order id depending on the invoice payment status.")]),t._v("\n\n res"),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(".")]),s("span",{pre:!0,attrs:{class:"token function"}},[t._v("status")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("(")]),s("span",{pre:!0,attrs:{class:"token number"}},[t._v("200")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(")")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(".")]),s("span",{pre:!0,attrs:{class:"token function"}},[t._v("send")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("(")]),s("span",{pre:!0,attrs:{class:"token string"}},[t._v("'Success: request body was signed'")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(")")]),t._v("\n "),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("}")]),t._v("\n"),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("}")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(")")]),t._v("\n")])])]),s("h3",{attrs:{id:"issue-a-full-refund-of-an-invoice"}},[s("a",{staticClass:"header-anchor",attrs:{href:"#issue-a-full-refund-of-an-invoice"}},[t._v("#")]),t._v(" Issue a full refund of an invoice")]),t._v(" "),s("p",[t._v("Using the "),s("a",{attrs:{href:"https://docs.btcpayserver.org/API/Greenfield/v1/#operation/Invoices_Refund",target:"_blank",rel:"noopener noreferrer"}},[t._v("invoice refund endpoint"),s("OutboundLink")],1),t._v(" you can issue a full (or even partial) refund of an invoice. This will return a link where the customer can claim the refund.")]),t._v(" "),s("div",{staticClass:"language-JS extra-class"},[s("pre",{pre:!0,attrs:{class:"language-js"}},[s("code",[s("span",{pre:!0,attrs:{class:"token keyword"}},[t._v("const")]),t._v(" btcpayServerUrl "),s("span",{pre:!0,attrs:{class:"token operator"}},[t._v("=")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token string"}},[t._v("'https://mainnet.demo.btcpayserver.org'")]),t._v("\n"),s("span",{pre:!0,attrs:{class:"token keyword"}},[t._v("const")]),t._v(" storeId "),s("span",{pre:!0,attrs:{class:"token operator"}},[t._v("=")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token string"}},[t._v("'YOUR_STORE_ID'")]),t._v("\n"),s("span",{pre:!0,attrs:{class:"token keyword"}},[t._v("const")]),t._v(" apiKey "),s("span",{pre:!0,attrs:{class:"token operator"}},[t._v("=")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token string"}},[t._v("'YOUR_API_KEY'")]),t._v("\n"),s("span",{pre:!0,attrs:{class:"token keyword"}},[t._v("const")]),t._v(" invoiceId "),s("span",{pre:!0,attrs:{class:"token operator"}},[t._v("=")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token string"}},[t._v("'EXISTING_INVOICE_ID'")]),t._v("\n\n"),s("span",{pre:!0,attrs:{class:"token keyword"}},[t._v("const")]),t._v(" apiEndpoint "),s("span",{pre:!0,attrs:{class:"token operator"}},[t._v("=")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token template-string"}},[s("span",{pre:!0,attrs:{class:"token template-punctuation string"}},[t._v("`")]),s("span",{pre:!0,attrs:{class:"token string"}},[t._v("/api/v1/stores/")]),s("span",{pre:!0,attrs:{class:"token interpolation"}},[s("span",{pre:!0,attrs:{class:"token interpolation-punctuation punctuation"}},[t._v("${")]),t._v("storeId"),s("span",{pre:!0,attrs:{class:"token interpolation-punctuation punctuation"}},[t._v("}")])]),s("span",{pre:!0,attrs:{class:"token string"}},[t._v("/invoices/")]),s("span",{pre:!0,attrs:{class:"token interpolation"}},[s("span",{pre:!0,attrs:{class:"token interpolation-punctuation punctuation"}},[t._v("${")]),t._v("invoiceId"),s("span",{pre:!0,attrs:{class:"token interpolation-punctuation punctuation"}},[t._v("}")])]),s("span",{pre:!0,attrs:{class:"token string"}},[t._v("/refund")]),s("span",{pre:!0,attrs:{class:"token template-punctuation string"}},[t._v("`")])]),t._v("\n\n"),s("span",{pre:!0,attrs:{class:"token keyword"}},[t._v("const")]),t._v(" headers "),s("span",{pre:!0,attrs:{class:"token operator"}},[t._v("=")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("{")]),t._v("\n "),s("span",{pre:!0,attrs:{class:"token string-property property"}},[t._v("'Content-Type'")]),s("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token string"}},[t._v("'application/json'")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v("\n "),s("span",{pre:!0,attrs:{class:"token literal-property property"}},[t._v("Authorization")]),s("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token string"}},[t._v("'token '")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token operator"}},[t._v("+")]),t._v(" apiKey\n"),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("}")]),t._v("\n\n"),s("span",{pre:!0,attrs:{class:"token keyword"}},[t._v("const")]),t._v(" payload "),s("span",{pre:!0,attrs:{class:"token operator"}},[t._v("=")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("{")]),t._v("\n "),s("span",{pre:!0,attrs:{class:"token literal-property property"}},[t._v("refundVariant")]),s("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token string"}},[t._v("'CurrentRate'")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v("\n "),s("span",{pre:!0,attrs:{class:"token literal-property property"}},[t._v("paymentMethod")]),s("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token string"}},[t._v("'BTC'")]),t._v("\n"),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("}")]),t._v("\n\n"),s("span",{pre:!0,attrs:{class:"token function"}},[t._v("fetch")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("(")]),t._v("btcpayServerUrl "),s("span",{pre:!0,attrs:{class:"token operator"}},[t._v("+")]),t._v(" apiEndpoint"),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("{")]),t._v("\n "),s("span",{pre:!0,attrs:{class:"token literal-property property"}},[t._v("method")]),s("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token string"}},[t._v("'POST'")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v("\n "),s("span",{pre:!0,attrs:{class:"token literal-property property"}},[t._v("headers")]),s("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" headers"),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v("\n "),s("span",{pre:!0,attrs:{class:"token literal-property property"}},[t._v("body")]),s("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token constant"}},[t._v("JSON")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(".")]),s("span",{pre:!0,attrs:{class:"token function"}},[t._v("stringify")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("(")]),t._v("payload"),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(")")]),t._v("\n"),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("}")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(")")]),t._v("\n "),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(".")]),s("span",{pre:!0,attrs:{class:"token function"}},[t._v("then")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("(")]),s("span",{pre:!0,attrs:{class:"token parameter"}},[t._v("response")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token operator"}},[t._v("=>")]),t._v(" response"),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(".")]),s("span",{pre:!0,attrs:{class:"token function"}},[t._v("json")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("(")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(")")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(")")]),t._v("\n "),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(".")]),s("span",{pre:!0,attrs:{class:"token function"}},[t._v("then")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("(")]),s("span",{pre:!0,attrs:{class:"token parameter"}},[t._v("data")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token operator"}},[t._v("=>")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("{")]),t._v("\n console"),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(".")]),s("span",{pre:!0,attrs:{class:"token function"}},[t._v("log")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("(")]),t._v("data"),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(")")]),t._v("\n res"),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(".")]),s("span",{pre:!0,attrs:{class:"token function"}},[t._v("send")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("(")]),t._v("data"),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(")")]),t._v("\n "),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("}")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(")")]),t._v("\n")])])]),s("h2",{attrs:{id:"btcpay-server-management-examples"}},[s("a",{staticClass:"header-anchor",attrs:{href:"#btcpay-server-management-examples"}},[t._v("#")]),t._v(" BTCPay Server management examples")]),t._v(" "),s("p",[t._v("Here we assume you are an ambassador and host BTCPay Server for your users. You manage your users on your own system and want to create a user and set email and password for their BTCPay Server login. Then using the same credentials to create a store and an API key on behalf of that user.")]),t._v(" "),s("h3",{attrs:{id:"create-a-new-user"}},[s("a",{staticClass:"header-anchor",attrs:{href:"#create-a-new-user"}},[t._v("#")]),t._v(" Create a new user")]),t._v(" "),s("p",[t._v("Creating a new user can be done by using "),s("a",{attrs:{href:"https://docs.btcpayserver.org/API/Greenfield/v1/#operation/Users_CreateUser",target:"_blank",rel:"noopener noreferrer"}},[t._v("this endpoint"),s("OutboundLink")],1),t._v(".")]),t._v(" "),s("div",{staticClass:"language-JS extra-class"},[s("pre",{pre:!0,attrs:{class:"language-js"}},[s("code",[s("span",{pre:!0,attrs:{class:"token keyword"}},[t._v("const")]),t._v(" btcpayServerUrl "),s("span",{pre:!0,attrs:{class:"token operator"}},[t._v("=")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token string"}},[t._v("'https://mainnet.demo.btcpayserver.org'")]),t._v("\n"),s("span",{pre:!0,attrs:{class:"token keyword"}},[t._v("const")]),t._v(" adminApiKey "),s("span",{pre:!0,attrs:{class:"token operator"}},[t._v("=")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token string"}},[t._v("'YOUR_ADMIN_API_KEY'")]),t._v("\n\n"),s("span",{pre:!0,attrs:{class:"token keyword"}},[t._v("const")]),t._v(" apiEndpoint "),s("span",{pre:!0,attrs:{class:"token operator"}},[t._v("=")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token string"}},[t._v("'/api/v1/users'")]),t._v("\n\n"),s("span",{pre:!0,attrs:{class:"token keyword"}},[t._v("const")]),t._v(" headers "),s("span",{pre:!0,attrs:{class:"token operator"}},[t._v("=")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("{")]),t._v("\n "),s("span",{pre:!0,attrs:{class:"token string-property property"}},[t._v("'Content-Type'")]),s("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token string"}},[t._v("'application/json'")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v("\n "),s("span",{pre:!0,attrs:{class:"token literal-property property"}},[t._v("Authorization")]),s("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token string"}},[t._v("'token '")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token operator"}},[t._v("+")]),t._v(" adminApiKey\n"),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("}")]),t._v("\n\n"),s("span",{pre:!0,attrs:{class:"token keyword"}},[t._v("const")]),t._v(" payload "),s("span",{pre:!0,attrs:{class:"token operator"}},[t._v("=")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("{")]),t._v("\n "),s("span",{pre:!0,attrs:{class:"token literal-property property"}},[t._v("email")]),s("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token string"}},[t._v("'satoshi.nakamoto@example.com'")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v("\n "),s("span",{pre:!0,attrs:{class:"token literal-property property"}},[t._v("password")]),s("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token string"}},[t._v("'SuperSecurePasswordsShouldBeQuiteLong123'")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v("\n "),s("span",{pre:!0,attrs:{class:"token literal-property property"}},[t._v("isAdministrator")]),s("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token boolean"}},[t._v("false")]),t._v("\n"),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("}")]),t._v("\n\n"),s("span",{pre:!0,attrs:{class:"token function"}},[t._v("fetch")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("(")]),t._v("btcpayServerUrl "),s("span",{pre:!0,attrs:{class:"token operator"}},[t._v("+")]),t._v(" apiEndpoint"),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("{")]),t._v("\n "),s("span",{pre:!0,attrs:{class:"token literal-property property"}},[t._v("method")]),s("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token string"}},[t._v("'POST'")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v("\n "),s("span",{pre:!0,attrs:{class:"token literal-property property"}},[t._v("headers")]),s("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" headers"),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v("\n "),s("span",{pre:!0,attrs:{class:"token literal-property property"}},[t._v("body")]),s("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token constant"}},[t._v("JSON")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(".")]),s("span",{pre:!0,attrs:{class:"token function"}},[t._v("stringify")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("(")]),t._v("payload"),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(")")]),t._v("\n"),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("}")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(")")]),t._v("\n "),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(".")]),s("span",{pre:!0,attrs:{class:"token function"}},[t._v("then")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("(")]),s("span",{pre:!0,attrs:{class:"token parameter"}},[t._v("response")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token operator"}},[t._v("=>")]),t._v(" response"),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(".")]),s("span",{pre:!0,attrs:{class:"token function"}},[t._v("json")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("(")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(")")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(")")]),t._v("\n "),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(".")]),s("span",{pre:!0,attrs:{class:"token function"}},[t._v("then")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("(")]),s("span",{pre:!0,attrs:{class:"token parameter"}},[t._v("data")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token operator"}},[t._v("=>")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("{")]),t._v("\n console"),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(".")]),s("span",{pre:!0,attrs:{class:"token function"}},[t._v("log")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("(")]),t._v("data"),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(")")]),t._v("\n res"),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(".")]),s("span",{pre:!0,attrs:{class:"token function"}},[t._v("send")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("(")]),t._v("data"),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(")")]),t._v("\n "),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("}")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(")")]),t._v("\n")])])]),s("h3",{attrs:{id:"create-a-new-api-key-for-the-user"}},[s("a",{staticClass:"header-anchor",attrs:{href:"#create-a-new-api-key-for-the-user"}},[t._v("#")]),t._v(" Create a new API key (for the user)")]),t._v(" "),s("p",[t._v("While we can use basic authentication to access the greenfield API, it is recommended to use API Keys to limit the scope of the credentials.")]),t._v(" "),s("p",[t._v("For example: If we want to "),s("a",{attrs:{href:"https://docs.btcpayserver.org/API/Greenfield/v1/#operation/Stores_CreateStore",target:"_blank",rel:"noopener noreferrer"}},[t._v("create a new store"),s("OutboundLink")],1),t._v(" we need the "),s("code",[t._v("btcpay.store.canmodifystoresettings")]),t._v(" permission for the API key. Warning: If you do not pass any permission then the API key will have unrestricted access.")]),t._v(" "),s("p",[t._v("As mentioned above, you can do this through the BTCPay Server UI of your instance, but let's do it through the API using "),s("a",{attrs:{href:"https://docs.btcpayserver.org/API/Greenfield/v1/#operation/ApiKeys_CreateUserApiKey",target:"_blank",rel:"noopener noreferrer"}},[t._v("this endpoint"),s("OutboundLink")],1),t._v(" where we with our admin API key create an API key for our new user.")]),t._v(" "),s("div",{staticClass:"language-js extra-class"},[s("pre",{pre:!0,attrs:{class:"language-js"}},[s("code",[s("span",{pre:!0,attrs:{class:"token keyword"}},[t._v("const")]),t._v(" btcpayServerUrl "),s("span",{pre:!0,attrs:{class:"token operator"}},[t._v("=")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token string"}},[t._v("'https://mainnet.demo.btcpayserver.org'")]),t._v("\n"),s("span",{pre:!0,attrs:{class:"token keyword"}},[t._v("const")]),t._v(" adminApiKey "),s("span",{pre:!0,attrs:{class:"token operator"}},[t._v("=")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token string"}},[t._v("'YOUR_ADMIN_API_KEY'")]),t._v("\n"),s("span",{pre:!0,attrs:{class:"token keyword"}},[t._v("const")]),t._v(" email "),s("span",{pre:!0,attrs:{class:"token operator"}},[t._v("=")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token string"}},[t._v("'satoshi.nakamoto@example.com'")]),t._v("\n\n"),s("span",{pre:!0,attrs:{class:"token keyword"}},[t._v("const")]),t._v(" apiEndpoint "),s("span",{pre:!0,attrs:{class:"token operator"}},[t._v("=")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token template-string"}},[s("span",{pre:!0,attrs:{class:"token template-punctuation string"}},[t._v("`")]),s("span",{pre:!0,attrs:{class:"token string"}},[t._v("/api/v1/users/")]),s("span",{pre:!0,attrs:{class:"token interpolation"}},[s("span",{pre:!0,attrs:{class:"token interpolation-punctuation punctuation"}},[t._v("${")]),t._v("email"),s("span",{pre:!0,attrs:{class:"token interpolation-punctuation punctuation"}},[t._v("}")])]),s("span",{pre:!0,attrs:{class:"token string"}},[t._v("/api-keys")]),s("span",{pre:!0,attrs:{class:"token template-punctuation string"}},[t._v("`")])]),t._v("\n\n"),s("span",{pre:!0,attrs:{class:"token keyword"}},[t._v("const")]),t._v(" headers "),s("span",{pre:!0,attrs:{class:"token operator"}},[t._v("=")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("{")]),t._v("\n "),s("span",{pre:!0,attrs:{class:"token string-property property"}},[t._v("'Content-Type'")]),s("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token string"}},[t._v("'application/json'")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v("\n "),s("span",{pre:!0,attrs:{class:"token literal-property property"}},[t._v("Authorization")]),s("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token string"}},[t._v("'token '")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token operator"}},[t._v("+")]),t._v(" adminApiKey\n"),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("}")]),t._v("\n\n"),s("span",{pre:!0,attrs:{class:"token keyword"}},[t._v("const")]),t._v(" payload "),s("span",{pre:!0,attrs:{class:"token operator"}},[t._v("=")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("{")]),t._v("\n "),s("span",{pre:!0,attrs:{class:"token literal-property property"}},[t._v("label")]),s("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token string"}},[t._v("'Satoshi Nakamoto API Key'")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v("\n "),s("span",{pre:!0,attrs:{class:"token literal-property property"}},[t._v("permissions")]),s("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("[")]),s("span",{pre:!0,attrs:{class:"token string"}},[t._v("'btcpay.store.canmodifystoresettings'")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("]")]),t._v("\n"),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("}")]),t._v("\n\n"),s("span",{pre:!0,attrs:{class:"token function"}},[t._v("fetch")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("(")]),t._v("btcpayServerUrl "),s("span",{pre:!0,attrs:{class:"token operator"}},[t._v("+")]),t._v(" apiEndpoint"),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("{")]),t._v("\n "),s("span",{pre:!0,attrs:{class:"token literal-property property"}},[t._v("method")]),s("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token string"}},[t._v("'POST'")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v("\n "),s("span",{pre:!0,attrs:{class:"token literal-property property"}},[t._v("headers")]),s("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" headers"),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v("\n "),s("span",{pre:!0,attrs:{class:"token literal-property property"}},[t._v("body")]),s("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token constant"}},[t._v("JSON")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(".")]),s("span",{pre:!0,attrs:{class:"token function"}},[t._v("stringify")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("(")]),t._v("payload"),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(")")]),t._v("\n"),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("}")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(")")]),t._v("\n "),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(".")]),s("span",{pre:!0,attrs:{class:"token function"}},[t._v("then")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("(")]),s("span",{pre:!0,attrs:{class:"token parameter"}},[t._v("response")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token operator"}},[t._v("=>")]),t._v(" response"),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(".")]),s("span",{pre:!0,attrs:{class:"token function"}},[t._v("json")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("(")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(")")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(")")]),t._v("\n "),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(".")]),s("span",{pre:!0,attrs:{class:"token function"}},[t._v("then")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("(")]),s("span",{pre:!0,attrs:{class:"token parameter"}},[t._v("data")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token operator"}},[t._v("=>")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("{")]),t._v("\n console"),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(".")]),s("span",{pre:!0,attrs:{class:"token function"}},[t._v("log")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("(")]),t._v("data"),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(")")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token comment"}},[t._v("// returns apiKey")]),t._v("\n res"),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(".")]),s("span",{pre:!0,attrs:{class:"token function"}},[t._v("send")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("(")]),t._v("data"),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(")")]),t._v("\n "),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("}")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(")")]),t._v("\n")])])]),s("h3",{attrs:{id:"create-a-new-store"}},[s("a",{staticClass:"header-anchor",attrs:{href:"#create-a-new-store"}},[t._v("#")]),t._v(" Create a new store")]),t._v(" "),s("p",[t._v("Now, we can use the api key to "),s("a",{attrs:{href:"https://docs.btcpayserver.org/API/Greenfield/v1/#operation/Stores_CreateStore",target:"_blank",rel:"noopener noreferrer"}},[t._v("create a new store"),s("OutboundLink")],1),t._v(".")]),t._v(" "),s("div",{staticClass:"language-JS extra-class"},[s("pre",{pre:!0,attrs:{class:"language-js"}},[s("code",[s("span",{pre:!0,attrs:{class:"token keyword"}},[t._v("const")]),t._v(" btcpayserverUrl "),s("span",{pre:!0,attrs:{class:"token operator"}},[t._v("=")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token string"}},[t._v("'https://mainnet.demo.btcpayserver.org'")]),t._v("\n"),s("span",{pre:!0,attrs:{class:"token keyword"}},[t._v("const")]),t._v(" userApiKey "),s("span",{pre:!0,attrs:{class:"token operator"}},[t._v("=")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token string"}},[t._v("'USER_API_KEY'")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token comment"}},[t._v("// From previous step")]),t._v("\n\n"),s("span",{pre:!0,attrs:{class:"token keyword"}},[t._v("const")]),t._v(" apiEndpoint "),s("span",{pre:!0,attrs:{class:"token operator"}},[t._v("=")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token string"}},[t._v("'/api/v1/stores'")]),t._v("\n\n"),s("span",{pre:!0,attrs:{class:"token keyword"}},[t._v("const")]),t._v(" headers "),s("span",{pre:!0,attrs:{class:"token operator"}},[t._v("=")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("{")]),t._v("\n "),s("span",{pre:!0,attrs:{class:"token string-property property"}},[t._v("'Content-Type'")]),s("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token string"}},[t._v("'application/json'")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v("\n "),s("span",{pre:!0,attrs:{class:"token literal-property property"}},[t._v("Authorization")]),s("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token string"}},[t._v("'token '")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token operator"}},[t._v("+")]),t._v(" userApiKey\n"),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("}")]),t._v("\n"),s("span",{pre:!0,attrs:{class:"token keyword"}},[t._v("const")]),t._v(" payload "),s("span",{pre:!0,attrs:{class:"token operator"}},[t._v("=")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("{")]),t._v("\n "),s("span",{pre:!0,attrs:{class:"token literal-property property"}},[t._v("name")]),s("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token string"}},[t._v("'Satoshi Store'")]),t._v("\n"),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("}")]),t._v("\n\n"),s("span",{pre:!0,attrs:{class:"token function"}},[t._v("fetch")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("(")]),t._v("btcpayServerUrl "),s("span",{pre:!0,attrs:{class:"token operator"}},[t._v("+")]),t._v(" apiEndpoint"),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("{")]),t._v("\n "),s("span",{pre:!0,attrs:{class:"token literal-property property"}},[t._v("method")]),s("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token string"}},[t._v("'POST'")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v("\n "),s("span",{pre:!0,attrs:{class:"token literal-property property"}},[t._v("headers")]),s("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" headers"),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v("\n "),s("span",{pre:!0,attrs:{class:"token literal-property property"}},[t._v("body")]),s("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token constant"}},[t._v("JSON")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(".")]),s("span",{pre:!0,attrs:{class:"token function"}},[t._v("stringify")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("(")]),t._v("payload"),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(")")]),t._v("\n"),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("}")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(")")]),t._v("\n "),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(".")]),s("span",{pre:!0,attrs:{class:"token function"}},[t._v("then")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("(")]),s("span",{pre:!0,attrs:{class:"token parameter"}},[t._v("response")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token operator"}},[t._v("=>")]),t._v(" response"),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(".")]),s("span",{pre:!0,attrs:{class:"token function"}},[t._v("json")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("(")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(")")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(")")]),t._v("\n "),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(".")]),s("span",{pre:!0,attrs:{class:"token function"}},[t._v("then")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("(")]),s("span",{pre:!0,attrs:{class:"token parameter"}},[t._v("data")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token operator"}},[t._v("=>")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("{")]),t._v("\n console"),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(".")]),s("span",{pre:!0,attrs:{class:"token function"}},[t._v("log")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("(")]),t._v("data"),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(")")]),t._v("\n res"),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(".")]),s("span",{pre:!0,attrs:{class:"token function"}},[t._v("send")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("(")]),t._v("data"),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(")")]),t._v("\n "),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("}")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(")")]),t._v("\n")])])]),s("h3",{attrs:{id:"read-store-information"}},[s("a",{staticClass:"header-anchor",attrs:{href:"#read-store-information"}},[t._v("#")]),t._v(" Read store information")]),t._v(" "),s("p",[t._v("We can use the new apikey to "),s("a",{attrs:{href:"https://docs.btcpayserver.org/API/Greenfield/v1/#operation/Stores_GetStore",target:"_blank",rel:"noopener noreferrer"}},[t._v("read store"),s("OutboundLink")],1),t._v(" information:")]),t._v(" "),s("div",{staticClass:"language-JS extra-class"},[s("pre",{pre:!0,attrs:{class:"language-js"}},[s("code",[s("span",{pre:!0,attrs:{class:"token keyword"}},[t._v("const")]),t._v(" btcpayServerUrl "),s("span",{pre:!0,attrs:{class:"token operator"}},[t._v("=")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token string"}},[t._v("'https://mainnet.demo.btcpayserver.org'")]),t._v("\n"),s("span",{pre:!0,attrs:{class:"token keyword"}},[t._v("const")]),t._v(" userApiKey "),s("span",{pre:!0,attrs:{class:"token operator"}},[t._v("=")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token string"}},[t._v("'USER_API_KEY'")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token comment"}},[t._v("// From previous step")]),t._v("\n"),s("span",{pre:!0,attrs:{class:"token keyword"}},[t._v("const")]),t._v(" storeId "),s("span",{pre:!0,attrs:{class:"token operator"}},[t._v("=")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token string"}},[t._v("'STORE_ID'")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token comment"}},[t._v("// From previous step")]),t._v("\n\n"),s("span",{pre:!0,attrs:{class:"token keyword"}},[t._v("const")]),t._v(" apiEndpoint "),s("span",{pre:!0,attrs:{class:"token operator"}},[t._v("=")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token template-string"}},[s("span",{pre:!0,attrs:{class:"token template-punctuation string"}},[t._v("`")]),s("span",{pre:!0,attrs:{class:"token string"}},[t._v("/api/v1/stores/")]),s("span",{pre:!0,attrs:{class:"token interpolation"}},[s("span",{pre:!0,attrs:{class:"token interpolation-punctuation punctuation"}},[t._v("${")]),t._v("storeId"),s("span",{pre:!0,attrs:{class:"token interpolation-punctuation punctuation"}},[t._v("}")])]),s("span",{pre:!0,attrs:{class:"token template-punctuation string"}},[t._v("`")])]),t._v("\n\n"),s("span",{pre:!0,attrs:{class:"token keyword"}},[t._v("const")]),t._v(" headers "),s("span",{pre:!0,attrs:{class:"token operator"}},[t._v("=")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("{")]),t._v("\n "),s("span",{pre:!0,attrs:{class:"token string-property property"}},[t._v("'Content-Type'")]),s("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token string"}},[t._v("'application/json'")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v("\n "),s("span",{pre:!0,attrs:{class:"token literal-property property"}},[t._v("Authorization")]),s("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token string"}},[t._v("'token '")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token operator"}},[t._v("+")]),t._v(" userApiKey\n"),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("}")]),t._v("\n\n"),s("span",{pre:!0,attrs:{class:"token function"}},[t._v("fetch")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("(")]),t._v("btcpayServerUrl "),s("span",{pre:!0,attrs:{class:"token operator"}},[t._v("+")]),t._v(" apiEndpoint"),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("{")]),t._v("\n "),s("span",{pre:!0,attrs:{class:"token literal-property property"}},[t._v("method")]),s("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token string"}},[t._v("'GET'")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v("\n "),s("span",{pre:!0,attrs:{class:"token literal-property property"}},[t._v("headers")]),s("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" headers\n"),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("}")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(")")]),t._v("\n "),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(".")]),s("span",{pre:!0,attrs:{class:"token function"}},[t._v("then")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("(")]),s("span",{pre:!0,attrs:{class:"token parameter"}},[t._v("response")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token operator"}},[t._v("=>")]),t._v(" response"),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(".")]),s("span",{pre:!0,attrs:{class:"token function"}},[t._v("json")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("(")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(")")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(")")]),t._v("\n "),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(".")]),s("span",{pre:!0,attrs:{class:"token function"}},[t._v("then")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("(")]),s("span",{pre:!0,attrs:{class:"token parameter"}},[t._v("data")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token operator"}},[t._v("=>")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("{")]),t._v("\n console"),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(".")]),s("span",{pre:!0,attrs:{class:"token function"}},[t._v("log")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("(")]),t._v("data"),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(")")]),t._v("\n res"),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(".")]),s("span",{pre:!0,attrs:{class:"token function"}},[t._v("send")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("(")]),t._v("data"),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(")")]),t._v("\n "),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("}")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(")")]),t._v("\n")])])])])}),[],!1,null,null,null);s.default=e.exports}}]); \ No newline at end of file diff --git a/assets/js/124.eeed4716.js b/assets/js/124.eff76455.js similarity index 99% rename from assets/js/124.eeed4716.js rename to assets/js/124.eff76455.js index 3408b2ce45..61c6864abd 100644 --- a/assets/js/124.eeed4716.js +++ b/assets/js/124.eff76455.js @@ -1 +1 @@ -(window.webpackJsonp=window.webpackJsonp||[]).push([[124],{771:function(a,s,t){"use strict";t.r(s);var e=t(10),r=Object(e.a)({},(function(){var a=this,s=a._self._c;return s("ContentSlotsDistributor",{attrs:{"slot-key":a.$parent.slotKey}},[s("h1",{attrs:{id:"greenfield-api-example-with-curl"}},[s("a",{staticClass:"header-anchor",attrs:{href:"#greenfield-api-example-with-curl"}},[a._v("#")]),a._v(" Greenfield API example with cURL")]),a._v(" "),s("p",[a._v("The "),s("strong",[s("a",{attrs:{href:"https://docs.btcpayserver.org/API/Greenfield/v1/",target:"_blank",rel:"noopener noreferrer"}},[a._v("Greenfield API"),s("OutboundLink")],1)]),a._v(" (also available on your instance on "),s("code",[a._v("/docs")]),a._v(") allows you to operate BTCPay Server via an easy-to-use REST API.")]),a._v(" "),s("p",[a._v("Note that you can partially generate clients in the language of your choice by using the "),s("a",{attrs:{href:"https://docs.btcpayserver.org/API/Greenfield/v1/swagger.json",target:"_blank",rel:"noopener noreferrer"}},[a._v("Swagger file"),s("OutboundLink")],1),a._v(".")]),a._v(" "),s("p",[a._v("In this guide, we will show you how to use it via command line on linux using "),s("code",[a._v("curl")]),a._v(" and "),s("code",[a._v("jq")]),a._v(".")]),a._v(" "),s("h2",{attrs:{id:"prerequisites"}},[s("a",{staticClass:"header-anchor",attrs:{href:"#prerequisites"}},[a._v("#")]),a._v(" Prerequisites")]),a._v(" "),s("p",[a._v("Unless for a few endpoints like creating a store and API key on behalf of a specific user, Basic Auth should be avoided and an API key should be used instead. Make sure that API keys only have the needed permissions and not more. E.g. if you only create invoices you should not give the API key the permission to manage your stores.")]),a._v(" "),s("p",[a._v("You can create a new API key in the BTCPay Server UI under "),s("code",[a._v("Account")]),a._v(" -> "),s("code",[a._v("Manage account")]),a._v(" -> "),s("code",[a._v("API keys")])]),a._v(" "),s("p",[a._v("For the ecommerce examples below the API key needs the following permissions:")]),a._v(" "),s("ul",[s("li",[a._v("View invoices")]),a._v(" "),s("li",[a._v("Create invoice")]),a._v(" "),s("li",[a._v("Modify invoices")]),a._v(" "),s("li",[a._v("Modify stores webhooks")]),a._v(" "),s("li",[a._v("View your stores")]),a._v(" "),s("li",[a._v("Create non-approved pull payments")])]),a._v(" "),s("p",[a._v("For an overview of available permissions see the "),s("a",{attrs:{href:"https://docs.btcpayserver.org/API/Greenfield/v1/#section/Authentication/API_Key",target:"_blank",rel:"noopener noreferrer"}},[a._v("API documentation"),s("OutboundLink")],1),a._v(" or the permissions documented on each endpoint.")]),a._v(" "),s("h2",{attrs:{id:"ecommerce-examples"}},[s("a",{staticClass:"header-anchor",attrs:{href:"#ecommerce-examples"}},[a._v("#")]),a._v(" eCommerce examples")]),a._v(" "),s("p",[a._v("The following examples will show you how to create a basic eCommerce flow using the Greenfield API by creating an invoice, registering a webhook, processing webhooks, and issuing a full refund of an invoice.")]),a._v(" "),s("h3",{attrs:{id:"create-an-invoice"}},[s("a",{staticClass:"header-anchor",attrs:{href:"#create-an-invoice"}},[a._v("#")]),a._v(" Create an invoice")]),a._v(" "),s("p",[a._v("We create an invoice using the "),s("a",{attrs:{href:"https://docs.btcpayserver.org/API/Greenfield/v1/#operation/Invoices_CreateInvoice",target:"_blank",rel:"noopener noreferrer"}},[a._v("create invoice endpoint"),s("OutboundLink")],1),a._v(". This is a simple example but you can set a lot more data like order id, buyer email or custom metadata. That said, don't store redundant data on the invoice to prevent data leaks in case of a hack. E.g. in most cases it makes no sense to store the customer address on your eCommerce system and also on the BTCPay invoice.")]),a._v(" "),s("div",{staticClass:"language-bash extra-class"},[s("pre",{pre:!0,attrs:{class:"language-bash"}},[s("code",[s("span",{pre:!0,attrs:{class:"token assign-left variable"}},[a._v("BTCPAY_INSTANCE")]),s("span",{pre:!0,attrs:{class:"token operator"}},[a._v("=")]),s("span",{pre:!0,attrs:{class:"token string"}},[a._v('"https://mainnet.demo.btcpayserver.org"')]),a._v("\n"),s("span",{pre:!0,attrs:{class:"token assign-left variable"}},[a._v("API_KEY")]),s("span",{pre:!0,attrs:{class:"token operator"}},[a._v("=")]),s("span",{pre:!0,attrs:{class:"token string"}},[a._v('"YOUR_API_KEY"')]),a._v("\n"),s("span",{pre:!0,attrs:{class:"token assign-left variable"}},[a._v("STORE_ID")]),s("span",{pre:!0,attrs:{class:"token operator"}},[a._v("=")]),s("span",{pre:!0,attrs:{class:"token string"}},[a._v('"YOUR_STORE_ID"')]),a._v("\n"),s("span",{pre:!0,attrs:{class:"token assign-left variable"}},[a._v("AMOUNT")]),s("span",{pre:!0,attrs:{class:"token operator"}},[a._v("=")]),s("span",{pre:!0,attrs:{class:"token string"}},[a._v('"10"')]),a._v("\n"),s("span",{pre:!0,attrs:{class:"token assign-left variable"}},[a._v("CURRENCY")]),s("span",{pre:!0,attrs:{class:"token operator"}},[a._v("=")]),s("span",{pre:!0,attrs:{class:"token string"}},[a._v('"USD"')]),a._v("\n\n"),s("span",{pre:!0,attrs:{class:"token assign-left variable"}},[a._v("BODY")]),s("span",{pre:!0,attrs:{class:"token operator"}},[a._v("=")]),s("span",{pre:!0,attrs:{class:"token string"}},[a._v('"'),s("span",{pre:!0,attrs:{class:"token variable"}},[s("span",{pre:!0,attrs:{class:"token variable"}},[a._v("$(")]),s("span",{pre:!0,attrs:{class:"token builtin class-name"}},[a._v("echo")]),a._v(" "),s("span",{pre:!0,attrs:{class:"token string"}},[a._v('"{}"')]),a._v(" "),s("span",{pre:!0,attrs:{class:"token operator"}},[a._v("|")]),a._v(" jq "),s("span",{pre:!0,attrs:{class:"token parameter variable"}},[a._v("--arg")]),a._v(" "),s("span",{pre:!0,attrs:{class:"token string"}},[a._v('"a"')]),a._v(" "),s("span",{pre:!0,attrs:{class:"token string"}},[a._v('"'),s("span",{pre:!0,attrs:{class:"token variable"}},[a._v("$AMOUNT")]),a._v('"')]),a._v(" "),s("span",{pre:!0,attrs:{class:"token string"}},[a._v("'. + {amount:$a}'")]),a._v(" "),s("span",{pre:!0,attrs:{class:"token punctuation"}},[a._v("\\")]),a._v("\n "),s("span",{pre:!0,attrs:{class:"token operator"}},[a._v("|")]),a._v(" jq "),s("span",{pre:!0,attrs:{class:"token parameter variable"}},[a._v("--arg")]),a._v(" "),s("span",{pre:!0,attrs:{class:"token string"}},[a._v('"a"')]),a._v(" "),s("span",{pre:!0,attrs:{class:"token string"}},[a._v('"'),s("span",{pre:!0,attrs:{class:"token variable"}},[a._v("$CURRENCY")]),a._v('"')]),a._v(" "),s("span",{pre:!0,attrs:{class:"token string"}},[a._v("'. + {currency:$a}'")]),s("span",{pre:!0,attrs:{class:"token variable"}},[a._v(")")])]),a._v('"')]),a._v("\n\n"),s("span",{pre:!0,attrs:{class:"token function"}},[a._v("curl")]),a._v(" "),s("span",{pre:!0,attrs:{class:"token parameter variable"}},[a._v("-s")]),a._v(" "),s("span",{pre:!0,attrs:{class:"token punctuation"}},[a._v("\\")]),a._v("\n "),s("span",{pre:!0,attrs:{class:"token parameter variable"}},[a._v("-H")]),a._v(" "),s("span",{pre:!0,attrs:{class:"token string"}},[a._v('"Content-Type: application/json"')]),a._v(" "),s("span",{pre:!0,attrs:{class:"token punctuation"}},[a._v("\\")]),a._v("\n "),s("span",{pre:!0,attrs:{class:"token parameter variable"}},[a._v("-H")]),a._v(" "),s("span",{pre:!0,attrs:{class:"token string"}},[a._v('"Authorization: token '),s("span",{pre:!0,attrs:{class:"token variable"}},[a._v("$API_KEY")]),a._v('"')]),a._v(" "),s("span",{pre:!0,attrs:{class:"token punctuation"}},[a._v("\\")]),a._v("\n "),s("span",{pre:!0,attrs:{class:"token parameter variable"}},[a._v("-X")]),a._v(" POST "),s("span",{pre:!0,attrs:{class:"token punctuation"}},[a._v("\\")]),a._v("\n "),s("span",{pre:!0,attrs:{class:"token parameter variable"}},[a._v("-d")]),a._v(" "),s("span",{pre:!0,attrs:{class:"token string"}},[a._v('"'),s("span",{pre:!0,attrs:{class:"token variable"}},[a._v("$BODY")]),a._v('"')]),a._v(" "),s("span",{pre:!0,attrs:{class:"token punctuation"}},[a._v("\\")]),a._v("\n "),s("span",{pre:!0,attrs:{class:"token string"}},[a._v('"'),s("span",{pre:!0,attrs:{class:"token variable"}},[a._v("$BTCPAY_INSTANCE")]),a._v("/api/v1/stores/"),s("span",{pre:!0,attrs:{class:"token variable"}},[a._v("$STORE_ID")]),a._v('/invoices"')]),a._v("\n")])])]),s("h3",{attrs:{id:"register-a-webhook-optional"}},[s("a",{staticClass:"header-anchor",attrs:{href:"#register-a-webhook-optional"}},[a._v("#")]),a._v(" Register a webhook (optional)")]),a._v(" "),s("p",[a._v("Let's register a webhook to be notified when the invoice is paid. You can use the "),s("a",{attrs:{href:"https://docs.btcpayserver.org/API/Greenfield/v1/#operation/Webhooks_CreateWebhook",target:"_blank",rel:"noopener noreferrer"}},[a._v("create webhook endpoint"),s("OutboundLink")],1),a._v(" to register a webhook.")]),a._v(" "),s("div",{staticClass:"language-bash extra-class"},[s("pre",{pre:!0,attrs:{class:"language-bash"}},[s("code",[s("span",{pre:!0,attrs:{class:"token assign-left variable"}},[a._v("BTCPAY_INSTANCE")]),s("span",{pre:!0,attrs:{class:"token operator"}},[a._v("=")]),s("span",{pre:!0,attrs:{class:"token string"}},[a._v('"https://mainnet.demo.btcpayserver.org"')]),a._v("\n"),s("span",{pre:!0,attrs:{class:"token assign-left variable"}},[a._v("API_KEY")]),s("span",{pre:!0,attrs:{class:"token operator"}},[a._v("=")]),s("span",{pre:!0,attrs:{class:"token string"}},[a._v('"YOUR_API_KEY"')]),a._v("\n"),s("span",{pre:!0,attrs:{class:"token assign-left variable"}},[a._v("STORE_ID")]),s("span",{pre:!0,attrs:{class:"token operator"}},[a._v("=")]),s("span",{pre:!0,attrs:{class:"token string"}},[a._v('"YOUR_STORE_ID"')]),a._v("\n\n"),s("span",{pre:!0,attrs:{class:"token assign-left variable"}},[a._v("URL")]),s("span",{pre:!0,attrs:{class:"token operator"}},[a._v("=")]),s("span",{pre:!0,attrs:{class:"token string"}},[a._v('"https://example.com/your-webhook-endpoint"')]),a._v("\n\n"),s("span",{pre:!0,attrs:{class:"token assign-left variable"}},[a._v("BODY")]),s("span",{pre:!0,attrs:{class:"token operator"}},[a._v("=")]),s("span",{pre:!0,attrs:{class:"token string"}},[a._v('"'),s("span",{pre:!0,attrs:{class:"token variable"}},[s("span",{pre:!0,attrs:{class:"token variable"}},[a._v("$(")]),s("span",{pre:!0,attrs:{class:"token builtin class-name"}},[a._v("echo")]),a._v(" "),s("span",{pre:!0,attrs:{class:"token string"}},[a._v('"{}"')]),a._v(" "),s("span",{pre:!0,attrs:{class:"token operator"}},[a._v("|")]),a._v(" jq "),s("span",{pre:!0,attrs:{class:"token parameter variable"}},[a._v("--arg")]),a._v(" "),s("span",{pre:!0,attrs:{class:"token string"}},[a._v('"a"')]),a._v(" "),s("span",{pre:!0,attrs:{class:"token string"}},[a._v('"'),s("span",{pre:!0,attrs:{class:"token variable"}},[a._v("$URL")]),a._v('"')]),a._v(" "),s("span",{pre:!0,attrs:{class:"token string"}},[a._v("'. + {url:$a}'")]),s("span",{pre:!0,attrs:{class:"token variable"}},[a._v(")")])]),a._v('"')]),a._v("\n\n"),s("span",{pre:!0,attrs:{class:"token function"}},[a._v("curl")]),a._v(" "),s("span",{pre:!0,attrs:{class:"token parameter variable"}},[a._v("-s")]),a._v(" "),s("span",{pre:!0,attrs:{class:"token punctuation"}},[a._v("\\")]),a._v("\n "),s("span",{pre:!0,attrs:{class:"token parameter variable"}},[a._v("-H")]),a._v(" "),s("span",{pre:!0,attrs:{class:"token string"}},[a._v('"Content-Type: application/json"')]),a._v(" "),s("span",{pre:!0,attrs:{class:"token punctuation"}},[a._v("\\")]),a._v("\n "),s("span",{pre:!0,attrs:{class:"token parameter variable"}},[a._v("-H")]),a._v(" "),s("span",{pre:!0,attrs:{class:"token string"}},[a._v('"Authorization: token '),s("span",{pre:!0,attrs:{class:"token variable"}},[a._v("$API_KEY")]),a._v('"')]),a._v(" "),s("span",{pre:!0,attrs:{class:"token punctuation"}},[a._v("\\")]),a._v("\n "),s("span",{pre:!0,attrs:{class:"token parameter variable"}},[a._v("-X")]),a._v(" POST "),s("span",{pre:!0,attrs:{class:"token punctuation"}},[a._v("\\")]),a._v("\n "),s("span",{pre:!0,attrs:{class:"token parameter variable"}},[a._v("-d")]),a._v(" "),s("span",{pre:!0,attrs:{class:"token string"}},[a._v('"'),s("span",{pre:!0,attrs:{class:"token variable"}},[a._v("$BODY")]),a._v('"')]),a._v(" "),s("span",{pre:!0,attrs:{class:"token punctuation"}},[a._v("\\")]),a._v("\n "),s("span",{pre:!0,attrs:{class:"token string"}},[a._v('"'),s("span",{pre:!0,attrs:{class:"token variable"}},[a._v("$BTCPAY_INSTANCE")]),a._v("/api/v1/stores/"),s("span",{pre:!0,attrs:{class:"token variable"}},[a._v("$STORE_ID")]),a._v('/webhooks"')]),a._v("\n")])])]),s("p",[a._v("This step is optional, you can also manually create a webhook in the BTCPay Server UI in your store "),s("code",[a._v("Settings")]),a._v(" -> "),s("code",[a._v("Webhooks")]),a._v(".")]),a._v(" "),s("h3",{attrs:{id:"validate-and-process-webhooks"}},[s("a",{staticClass:"header-anchor",attrs:{href:"#validate-and-process-webhooks"}},[a._v("#")]),a._v(" Validate and process webhooks")]),a._v(" "),s("p",[a._v("This is not really possible with curl in bash but when you run a webserver. You can check the examples for "),s("RouterLink",{attrs:{to:"/Development/GreenFieldExample-NodeJS/"}},[a._v("NodeJS")]),a._v(" and "),s("RouterLink",{attrs:{to:"/Development/GreenfieldExample-PHP/"}},[a._v("PHP")]),a._v(".")],1),a._v(" "),s("h3",{attrs:{id:"issue-a-full-refund-of-an-invoice"}},[s("a",{staticClass:"header-anchor",attrs:{href:"#issue-a-full-refund-of-an-invoice"}},[a._v("#")]),a._v(" Issue a full refund of an invoice")]),a._v(" "),s("p",[a._v("Using the "),s("a",{attrs:{href:"https://docs.btcpayserver.org/API/Greenfield/v1/#operation/Invoices_Refund",target:"_blank",rel:"noopener noreferrer"}},[a._v("invoice refund endpoint"),s("OutboundLink")],1),a._v(" you can issue a full (or even partial) refund of an invoice. This will return a link where the customer can claim the refund.")]),a._v(" "),s("div",{staticClass:"language-bash extra-class"},[s("pre",{pre:!0,attrs:{class:"language-bash"}},[s("code",[s("span",{pre:!0,attrs:{class:"token assign-left variable"}},[a._v("BTCPAY_INSTANCE")]),s("span",{pre:!0,attrs:{class:"token operator"}},[a._v("=")]),s("span",{pre:!0,attrs:{class:"token string"}},[a._v('"https://mainnet.demo.btcpayserver.org"')]),a._v("\n"),s("span",{pre:!0,attrs:{class:"token assign-left variable"}},[a._v("API_KEY")]),s("span",{pre:!0,attrs:{class:"token operator"}},[a._v("=")]),s("span",{pre:!0,attrs:{class:"token string"}},[a._v('"YOUR_API_KEY"')]),a._v("\n"),s("span",{pre:!0,attrs:{class:"token assign-left variable"}},[a._v("STORE_ID")]),s("span",{pre:!0,attrs:{class:"token operator"}},[a._v("=")]),s("span",{pre:!0,attrs:{class:"token string"}},[a._v('"YOUR_STORE_ID"')]),a._v("\n\n"),s("span",{pre:!0,attrs:{class:"token assign-left variable"}},[a._v("INVOICE_ID")]),s("span",{pre:!0,attrs:{class:"token operator"}},[a._v("=")]),s("span",{pre:!0,attrs:{class:"token string"}},[a._v('"EXISTING_INVOICE_ID"')]),a._v("\n"),s("span",{pre:!0,attrs:{class:"token assign-left variable"}},[a._v("PAYMENT_METHOD")]),s("span",{pre:!0,attrs:{class:"token operator"}},[a._v("=")]),s("span",{pre:!0,attrs:{class:"token string"}},[a._v('"BTC"')]),a._v("\n"),s("span",{pre:!0,attrs:{class:"token assign-left variable"}},[a._v("REFUND_VARIANT")]),s("span",{pre:!0,attrs:{class:"token operator"}},[a._v("=")]),s("span",{pre:!0,attrs:{class:"token string"}},[a._v('"CurrentRate"')]),a._v("\n\n"),s("span",{pre:!0,attrs:{class:"token assign-left variable"}},[a._v("BODY")]),s("span",{pre:!0,attrs:{class:"token operator"}},[a._v("=")]),s("span",{pre:!0,attrs:{class:"token string"}},[a._v('"'),s("span",{pre:!0,attrs:{class:"token variable"}},[s("span",{pre:!0,attrs:{class:"token variable"}},[a._v("$(")]),s("span",{pre:!0,attrs:{class:"token builtin class-name"}},[a._v("echo")]),a._v(" "),s("span",{pre:!0,attrs:{class:"token string"}},[a._v('"{}"')]),a._v(" "),s("span",{pre:!0,attrs:{class:"token operator"}},[a._v("|")]),a._v(" jq "),s("span",{pre:!0,attrs:{class:"token parameter variable"}},[a._v("--arg")]),a._v(" "),s("span",{pre:!0,attrs:{class:"token string"}},[a._v('"a"')]),a._v(" "),s("span",{pre:!0,attrs:{class:"token string"}},[a._v('"'),s("span",{pre:!0,attrs:{class:"token variable"}},[a._v("$REFUND_VARIANT")]),a._v('"')]),a._v(" "),s("span",{pre:!0,attrs:{class:"token string"}},[a._v("'. + {refundVariant:$a}'")]),a._v(" "),s("span",{pre:!0,attrs:{class:"token punctuation"}},[a._v("\\")]),a._v("\n "),s("span",{pre:!0,attrs:{class:"token operator"}},[a._v("|")]),a._v(" jq "),s("span",{pre:!0,attrs:{class:"token parameter variable"}},[a._v("--arg")]),a._v(" "),s("span",{pre:!0,attrs:{class:"token string"}},[a._v('"a"')]),a._v(" "),s("span",{pre:!0,attrs:{class:"token string"}},[a._v('"'),s("span",{pre:!0,attrs:{class:"token variable"}},[a._v("$PAYMENT_METHOD")]),a._v('"')]),a._v(" "),s("span",{pre:!0,attrs:{class:"token string"}},[a._v("'. + {paymentMethod:$a}'")]),s("span",{pre:!0,attrs:{class:"token variable"}},[a._v(")")])]),a._v('"')]),a._v("\n\n"),s("span",{pre:!0,attrs:{class:"token function"}},[a._v("curl")]),a._v(" "),s("span",{pre:!0,attrs:{class:"token parameter variable"}},[a._v("-s")]),a._v(" "),s("span",{pre:!0,attrs:{class:"token punctuation"}},[a._v("\\")]),a._v("\n "),s("span",{pre:!0,attrs:{class:"token parameter variable"}},[a._v("-H")]),a._v(" "),s("span",{pre:!0,attrs:{class:"token string"}},[a._v('"Content-Type: application/json"')]),a._v(" "),s("span",{pre:!0,attrs:{class:"token punctuation"}},[a._v("\\")]),a._v("\n "),s("span",{pre:!0,attrs:{class:"token parameter variable"}},[a._v("-H")]),a._v(" "),s("span",{pre:!0,attrs:{class:"token string"}},[a._v('"Authorization: token '),s("span",{pre:!0,attrs:{class:"token variable"}},[a._v("$API_KEY")]),a._v('"')]),a._v(" "),s("span",{pre:!0,attrs:{class:"token punctuation"}},[a._v("\\")]),a._v("\n "),s("span",{pre:!0,attrs:{class:"token parameter variable"}},[a._v("-X")]),a._v(" POST "),s("span",{pre:!0,attrs:{class:"token punctuation"}},[a._v("\\")]),a._v("\n "),s("span",{pre:!0,attrs:{class:"token parameter variable"}},[a._v("-d")]),a._v(" "),s("span",{pre:!0,attrs:{class:"token string"}},[a._v('"'),s("span",{pre:!0,attrs:{class:"token variable"}},[a._v("$BODY")]),a._v('"')]),a._v(" "),s("span",{pre:!0,attrs:{class:"token punctuation"}},[a._v("\\")]),a._v("\n "),s("span",{pre:!0,attrs:{class:"token string"}},[a._v('"'),s("span",{pre:!0,attrs:{class:"token variable"}},[a._v("$BTCPAY_INSTANCE")]),a._v("/api/v1/stores/"),s("span",{pre:!0,attrs:{class:"token variable"}},[a._v("$STORE_ID")]),a._v("/invoices/"),s("span",{pre:!0,attrs:{class:"token variable"}},[a._v("$INVOICE_ID")]),a._v('/refund"')]),a._v("\n")])])]),s("h2",{attrs:{id:"btcpay-server-management-examples"}},[s("a",{staticClass:"header-anchor",attrs:{href:"#btcpay-server-management-examples"}},[a._v("#")]),a._v(" BTCPay Server management examples")]),a._v(" "),s("p",[a._v("Here we assume you are an ambassador and host BTCPay Server for your users. You manage your users on your own system and want to create a user and set email and password for their BTCPay Server login. Then using the same credentials to create a store and an API key on behalf of that user.")]),a._v(" "),s("h3",{attrs:{id:"create-a-new-user"}},[s("a",{staticClass:"header-anchor",attrs:{href:"#create-a-new-user"}},[a._v("#")]),a._v(" Create a new user")]),a._v(" "),s("p",[a._v("Creating a new user can be done by using "),s("a",{attrs:{href:"https://docs.btcpayserver.org/API/Greenfield/v1/#operation/Users_CreateUser",target:"_blank",rel:"noopener noreferrer"}},[a._v("this endpoint"),s("OutboundLink")],1),a._v(".")]),a._v(" "),s("div",{staticClass:"language-bash extra-class"},[s("pre",{pre:!0,attrs:{class:"language-bash"}},[s("code",[s("span",{pre:!0,attrs:{class:"token assign-left variable"}},[a._v("BTCPAY_INSTANCE")]),s("span",{pre:!0,attrs:{class:"token operator"}},[a._v("=")]),s("span",{pre:!0,attrs:{class:"token string"}},[a._v('"https://mainnet.demo.btcpayserver.org"')]),a._v("\n"),s("span",{pre:!0,attrs:{class:"token assign-left variable"}},[a._v("ADMIN_API_KEY")]),s("span",{pre:!0,attrs:{class:"token operator"}},[a._v("=")]),s("span",{pre:!0,attrs:{class:"token string"}},[a._v('"YOUR_ADMIN_API_KEY"')]),a._v("\n\n"),s("span",{pre:!0,attrs:{class:"token assign-left variable"}},[s("span",{pre:!0,attrs:{class:"token environment constant"}},[a._v("USER")])]),s("span",{pre:!0,attrs:{class:"token operator"}},[a._v("=")]),s("span",{pre:!0,attrs:{class:"token string"}},[a._v('"satoshi.nakamoto@example.com"')]),a._v("\n"),s("span",{pre:!0,attrs:{class:"token assign-left variable"}},[a._v("PASSWORD")]),s("span",{pre:!0,attrs:{class:"token operator"}},[a._v("=")]),s("span",{pre:!0,attrs:{class:"token string"}},[a._v('"SuperSecurePasswordsShouldBeQuiteLong123"')]),a._v("\n\n"),s("span",{pre:!0,attrs:{class:"token assign-left variable"}},[a._v("BODY")]),s("span",{pre:!0,attrs:{class:"token operator"}},[a._v("=")]),s("span",{pre:!0,attrs:{class:"token string"}},[a._v('"'),s("span",{pre:!0,attrs:{class:"token variable"}},[s("span",{pre:!0,attrs:{class:"token variable"}},[a._v("$(")]),s("span",{pre:!0,attrs:{class:"token builtin class-name"}},[a._v("echo")]),a._v(" "),s("span",{pre:!0,attrs:{class:"token string"}},[a._v('"{}"')]),a._v(" "),s("span",{pre:!0,attrs:{class:"token operator"}},[a._v("|")]),a._v(" jq "),s("span",{pre:!0,attrs:{class:"token parameter variable"}},[a._v("--arg")]),a._v(" "),s("span",{pre:!0,attrs:{class:"token string"}},[a._v('"a"')]),a._v(" "),s("span",{pre:!0,attrs:{class:"token string"}},[a._v('"'),s("span",{pre:!0,attrs:{class:"token environment constant"}},[a._v("$USER")]),a._v('"')]),a._v(" "),s("span",{pre:!0,attrs:{class:"token string"}},[a._v("'. + {email:$a}'")]),a._v(" "),s("span",{pre:!0,attrs:{class:"token punctuation"}},[a._v("\\")]),a._v("\n "),s("span",{pre:!0,attrs:{class:"token operator"}},[a._v("|")]),a._v(" jq "),s("span",{pre:!0,attrs:{class:"token parameter variable"}},[a._v("--arg")]),a._v(" "),s("span",{pre:!0,attrs:{class:"token string"}},[a._v('"a"')]),a._v(" "),s("span",{pre:!0,attrs:{class:"token string"}},[a._v('"'),s("span",{pre:!0,attrs:{class:"token variable"}},[a._v("$PASSWORD")]),a._v('"')]),a._v(" "),s("span",{pre:!0,attrs:{class:"token string"}},[a._v("'. + {password:$a}'")]),s("span",{pre:!0,attrs:{class:"token variable"}},[a._v(")")])]),a._v('"')]),a._v("\n"),s("span",{pre:!0,attrs:{class:"token function"}},[a._v("curl")]),a._v(" "),s("span",{pre:!0,attrs:{class:"token parameter variable"}},[a._v("-s")]),a._v(" "),s("span",{pre:!0,attrs:{class:"token punctuation"}},[a._v("\\")]),a._v("\n "),s("span",{pre:!0,attrs:{class:"token parameter variable"}},[a._v("-H")]),a._v(" "),s("span",{pre:!0,attrs:{class:"token string"}},[a._v('"Content-Type: application/json"')]),a._v(" "),s("span",{pre:!0,attrs:{class:"token punctuation"}},[a._v("\\")]),a._v("\n "),s("span",{pre:!0,attrs:{class:"token parameter variable"}},[a._v("-H")]),a._v(" "),s("span",{pre:!0,attrs:{class:"token string"}},[a._v('"Authorization: token '),s("span",{pre:!0,attrs:{class:"token variable"}},[a._v("$ADMIN_API_KEY")]),a._v('"')]),a._v(" "),s("span",{pre:!0,attrs:{class:"token punctuation"}},[a._v("\\")]),a._v("\n "),s("span",{pre:!0,attrs:{class:"token parameter variable"}},[a._v("-X")]),a._v(" POST "),s("span",{pre:!0,attrs:{class:"token punctuation"}},[a._v("\\")]),a._v("\n "),s("span",{pre:!0,attrs:{class:"token parameter variable"}},[a._v("-d")]),a._v(" "),s("span",{pre:!0,attrs:{class:"token string"}},[a._v('"'),s("span",{pre:!0,attrs:{class:"token variable"}},[a._v("$BODY")]),a._v('"')]),a._v(" "),s("span",{pre:!0,attrs:{class:"token punctuation"}},[a._v("\\")]),a._v("\n "),s("span",{pre:!0,attrs:{class:"token string"}},[a._v('"'),s("span",{pre:!0,attrs:{class:"token variable"}},[a._v("$BTCPAY_INSTANCE")]),a._v('/api/v1/users"')]),a._v("\n")])])]),s("h3",{attrs:{id:"create-a-store-on-behalf-of-the-user"}},[s("a",{staticClass:"header-anchor",attrs:{href:"#create-a-store-on-behalf-of-the-user"}},[a._v("#")]),a._v(" Create a store on behalf of the user")]),a._v(" "),s("p",[a._v("Now we create a store with the new users credentials the user becomes the owner "),s("a",{attrs:{href:"https://docs.btcpayserver.org/API/Greenfield/v1/#operation/Stores_CreateStore",target:"_blank",rel:"noopener noreferrer"}},[a._v("create a new store"),s("OutboundLink")],1),a._v(".")]),a._v(" "),s("div",{staticClass:"language-bash extra-class"},[s("pre",{pre:!0,attrs:{class:"language-bash"}},[s("code",[s("span",{pre:!0,attrs:{class:"token assign-left variable"}},[a._v("STORE_NAME")]),s("span",{pre:!0,attrs:{class:"token operator"}},[a._v("=")]),s("span",{pre:!0,attrs:{class:"token string"}},[a._v('"My awesome store"')]),a._v("\n\n"),s("span",{pre:!0,attrs:{class:"token assign-left variable"}},[a._v("BODY")]),s("span",{pre:!0,attrs:{class:"token operator"}},[a._v("=")]),s("span",{pre:!0,attrs:{class:"token string"}},[a._v('"'),s("span",{pre:!0,attrs:{class:"token variable"}},[s("span",{pre:!0,attrs:{class:"token variable"}},[a._v("$(")]),s("span",{pre:!0,attrs:{class:"token builtin class-name"}},[a._v("echo")]),a._v(" "),s("span",{pre:!0,attrs:{class:"token string"}},[a._v('"{}"')]),a._v(" "),s("span",{pre:!0,attrs:{class:"token operator"}},[a._v("|")]),a._v(" jq "),s("span",{pre:!0,attrs:{class:"token parameter variable"}},[a._v("--arg")]),a._v(" "),s("span",{pre:!0,attrs:{class:"token string"}},[a._v('"a"')]),a._v(" "),s("span",{pre:!0,attrs:{class:"token string"}},[a._v('"'),s("span",{pre:!0,attrs:{class:"token variable"}},[a._v("$STORE_NAME")]),a._v('"')]),a._v(" "),s("span",{pre:!0,attrs:{class:"token string"}},[a._v("'. + {name:$a}'")]),s("span",{pre:!0,attrs:{class:"token variable"}},[a._v(")")])]),a._v('"')]),a._v("\n\n"),s("span",{pre:!0,attrs:{class:"token assign-left variable"}},[a._v("NEW_STORE_ID")]),s("span",{pre:!0,attrs:{class:"token operator"}},[a._v("=")]),s("span",{pre:!0,attrs:{class:"token string"}},[a._v('"'),s("span",{pre:!0,attrs:{class:"token variable"}},[s("span",{pre:!0,attrs:{class:"token variable"}},[a._v("$(")]),s("span",{pre:!0,attrs:{class:"token function"}},[a._v("curl")]),a._v(" "),s("span",{pre:!0,attrs:{class:"token parameter variable"}},[a._v("-s")]),a._v(" "),s("span",{pre:!0,attrs:{class:"token punctuation"}},[a._v("\\")]),a._v("\n "),s("span",{pre:!0,attrs:{class:"token parameter variable"}},[a._v("-H")]),a._v(" "),s("span",{pre:!0,attrs:{class:"token string"}},[a._v('"Content-Type: application/json"')]),a._v(" "),s("span",{pre:!0,attrs:{class:"token punctuation"}},[a._v("\\")]),a._v("\n "),s("span",{pre:!0,attrs:{class:"token parameter variable"}},[a._v("--user")]),a._v(" "),s("span",{pre:!0,attrs:{class:"token string"}},[a._v('"'),s("span",{pre:!0,attrs:{class:"token environment constant"}},[a._v("$USER")]),a._v(":"),s("span",{pre:!0,attrs:{class:"token variable"}},[a._v("$PASSWORD")]),a._v('"')]),a._v(" "),s("span",{pre:!0,attrs:{class:"token punctuation"}},[a._v("\\")]),a._v("\n "),s("span",{pre:!0,attrs:{class:"token parameter variable"}},[a._v("-X")]),a._v(" POST "),s("span",{pre:!0,attrs:{class:"token punctuation"}},[a._v("\\")]),a._v("\n "),s("span",{pre:!0,attrs:{class:"token parameter variable"}},[a._v("-d")]),a._v(" "),s("span",{pre:!0,attrs:{class:"token string"}},[a._v('"'),s("span",{pre:!0,attrs:{class:"token variable"}},[a._v("$BODY")]),a._v('"')]),a._v(" "),s("span",{pre:!0,attrs:{class:"token punctuation"}},[a._v("\\")]),a._v("\n "),s("span",{pre:!0,attrs:{class:"token string"}},[a._v('"'),s("span",{pre:!0,attrs:{class:"token variable"}},[a._v("$BTCPAY_INSTANCE")]),a._v('/api/v1/stores"')]),a._v(" "),s("span",{pre:!0,attrs:{class:"token operator"}},[a._v("|")]),a._v(" jq "),s("span",{pre:!0,attrs:{class:"token parameter variable"}},[a._v("-r")]),a._v(" .id"),s("span",{pre:!0,attrs:{class:"token variable"}},[a._v(")")])]),a._v('"')]),a._v("\n\n"),s("span",{pre:!0,attrs:{class:"token builtin class-name"}},[a._v("echo")]),a._v(" "),s("span",{pre:!0,attrs:{class:"token string"}},[a._v('"New store id: '),s("span",{pre:!0,attrs:{class:"token variable"}},[a._v("$NEW_STORE_ID")]),a._v('"')]),a._v("\n")])])]),s("h3",{attrs:{id:"create-a-new-api-key-on-behalf-of-the-user"}},[s("a",{staticClass:"header-anchor",attrs:{href:"#create-a-new-api-key-on-behalf-of-the-user"}},[a._v("#")]),a._v(" Create a new API key on behalf of the user")]),a._v(" "),s("p",[a._v("Now we can create an API key and limit it to the new store with e.g. the "),s("code",[a._v("btcpay.store.canmodifystoresettings")]),a._v(" permission. Likely you also want to allow API key to create invoices, but for this example we keep it simple.")]),a._v(" "),s("p",[a._v('You can find the needed permissions for endpoints on the endpoint docs under "Authorization" or an overview of permissions in the '),s("a",{attrs:{href:"https://docs.btcpayserver.org/API/Greenfield/v1/#section/Authentication/API_Key",target:"_blank",rel:"noopener noreferrer"}},[a._v("authorization section"),s("OutboundLink")],1),a._v(".")]),a._v(" "),s("div",{staticClass:"language-bash extra-class"},[s("pre",{pre:!0,attrs:{class:"language-bash"}},[s("code",[s("span",{pre:!0,attrs:{class:"token assign-left variable"}},[a._v("ADMIN_API_KEY")]),s("span",{pre:!0,attrs:{class:"token operator"}},[a._v("=")]),s("span",{pre:!0,attrs:{class:"token string"}},[a._v('"YOUR_ADMIN_API_KEY"')]),a._v("\n"),s("span",{pre:!0,attrs:{class:"token assign-left variable"}},[s("span",{pre:!0,attrs:{class:"token environment constant"}},[a._v("USER")])]),s("span",{pre:!0,attrs:{class:"token operator"}},[a._v("=")]),s("span",{pre:!0,attrs:{class:"token string"}},[a._v('"satoshi.nakamoto@example.com"')]),a._v("\n"),s("span",{pre:!0,attrs:{class:"token assign-left variable"}},[a._v("PERMISSION")]),s("span",{pre:!0,attrs:{class:"token operator"}},[a._v("=")]),s("span",{pre:!0,attrs:{class:"token string"}},[a._v('"btcpay.store.canmodifystoresettings"')]),a._v("\n"),s("span",{pre:!0,attrs:{class:"token assign-left variable"}},[a._v("NEW_STORE_ID")]),s("span",{pre:!0,attrs:{class:"token operator"}},[a._v("=")]),s("span",{pre:!0,attrs:{class:"token string"}},[a._v('"NEW_STORE_ID_FROM_PREVIOUS_STEP"')]),a._v("\n\n"),s("span",{pre:!0,attrs:{class:"token assign-left variable"}},[a._v("BODY")]),s("span",{pre:!0,attrs:{class:"token operator"}},[a._v("=")]),s("span",{pre:!0,attrs:{class:"token string"}},[a._v('"'),s("span",{pre:!0,attrs:{class:"token variable"}},[s("span",{pre:!0,attrs:{class:"token variable"}},[a._v("$(")]),s("span",{pre:!0,attrs:{class:"token builtin class-name"}},[a._v("echo")]),a._v(" "),s("span",{pre:!0,attrs:{class:"token string"}},[a._v('"{}"')]),a._v(" "),s("span",{pre:!0,attrs:{class:"token operator"}},[a._v("|")]),a._v(" jq "),s("span",{pre:!0,attrs:{class:"token parameter variable"}},[a._v("--arg")]),a._v(" "),s("span",{pre:!0,attrs:{class:"token string"}},[a._v('"a"')]),a._v(" "),s("span",{pre:!0,attrs:{class:"token string"}},[a._v('"'),s("span",{pre:!0,attrs:{class:"token variable"}},[a._v("$PERMISSION")]),a._v(":"),s("span",{pre:!0,attrs:{class:"token variable"}},[a._v("$NEW_STORE_ID")]),a._v('"')]),a._v(" "),s("span",{pre:!0,attrs:{class:"token string"}},[a._v("'. + {permissions:[$a]}'")]),s("span",{pre:!0,attrs:{class:"token variable"}},[a._v(")")])]),a._v('"')]),a._v("\n"),s("span",{pre:!0,attrs:{class:"token assign-left variable"}},[a._v("USER_API_KEY")]),s("span",{pre:!0,attrs:{class:"token operator"}},[a._v("=")]),s("span",{pre:!0,attrs:{class:"token string"}},[a._v('"'),s("span",{pre:!0,attrs:{class:"token variable"}},[s("span",{pre:!0,attrs:{class:"token variable"}},[a._v("$(")]),s("span",{pre:!0,attrs:{class:"token function"}},[a._v("curl")]),a._v(" "),s("span",{pre:!0,attrs:{class:"token parameter variable"}},[a._v("-s")]),a._v(" "),s("span",{pre:!0,attrs:{class:"token punctuation"}},[a._v("\\")]),a._v("\n "),s("span",{pre:!0,attrs:{class:"token parameter variable"}},[a._v("-H")]),a._v(" "),s("span",{pre:!0,attrs:{class:"token string"}},[a._v('"Content-Type: application/json"')]),a._v(" "),s("span",{pre:!0,attrs:{class:"token punctuation"}},[a._v("\\")]),a._v("\n "),s("span",{pre:!0,attrs:{class:"token parameter variable"}},[a._v("-H")]),a._v(" "),s("span",{pre:!0,attrs:{class:"token string"}},[a._v('"Authorization: token '),s("span",{pre:!0,attrs:{class:"token variable"}},[a._v("$ADMIN_API_KEY")]),a._v('"')]),a._v(" "),s("span",{pre:!0,attrs:{class:"token punctuation"}},[a._v("\\")]),a._v("\n "),s("span",{pre:!0,attrs:{class:"token parameter variable"}},[a._v("-X")]),a._v(" POST "),s("span",{pre:!0,attrs:{class:"token punctuation"}},[a._v("\\")]),a._v("\n "),s("span",{pre:!0,attrs:{class:"token parameter variable"}},[a._v("-d")]),a._v(" "),s("span",{pre:!0,attrs:{class:"token string"}},[a._v('"'),s("span",{pre:!0,attrs:{class:"token variable"}},[a._v("$BODY")]),a._v('"')]),a._v(" "),s("span",{pre:!0,attrs:{class:"token punctuation"}},[a._v("\\")]),a._v("\n "),s("span",{pre:!0,attrs:{class:"token string"}},[a._v('"'),s("span",{pre:!0,attrs:{class:"token variable"}},[a._v("$BTCPAY_INSTANCE")]),a._v("/api/v1/users/"),s("span",{pre:!0,attrs:{class:"token environment constant"}},[a._v("$USER")]),a._v('/api-keys"')]),a._v(" "),s("span",{pre:!0,attrs:{class:"token operator"}},[a._v("|")]),a._v(" jq "),s("span",{pre:!0,attrs:{class:"token parameter variable"}},[a._v("-r")]),a._v(" .apiKey"),s("span",{pre:!0,attrs:{class:"token variable"}},[a._v(")")])]),a._v('"')]),a._v("\n\n"),s("span",{pre:!0,attrs:{class:"token builtin class-name"}},[a._v("echo")]),a._v(" "),s("span",{pre:!0,attrs:{class:"token string"}},[a._v('"New user api key: '),s("span",{pre:!0,attrs:{class:"token variable"}},[a._v("$USER_API_KEY")]),a._v('"')]),a._v("\n")])])]),s("h3",{attrs:{id:"read-store-information"}},[s("a",{staticClass:"header-anchor",attrs:{href:"#read-store-information"}},[a._v("#")]),a._v(" Read store information")]),a._v(" "),s("p",[a._v("We can use the new apikey to "),s("a",{attrs:{href:"https://docs.btcpayserver.org/API/Greenfield/v1/#operation/Stores_GetStore",target:"_blank",rel:"noopener noreferrer"}},[a._v("read store"),s("OutboundLink")],1),a._v(" information:")]),a._v(" "),s("div",{staticClass:"language-bash extra-class"},[s("pre",{pre:!0,attrs:{class:"language-bash"}},[s("code",[s("span",{pre:!0,attrs:{class:"token assign-left variable"}},[a._v("USER_API_KEY")]),s("span",{pre:!0,attrs:{class:"token operator"}},[a._v("=")]),s("span",{pre:!0,attrs:{class:"token string"}},[a._v('"API_KEY_FROM_PREVIOUS_STEP"')]),a._v("\n"),s("span",{pre:!0,attrs:{class:"token assign-left variable"}},[a._v("NEW_STORE_ID")]),s("span",{pre:!0,attrs:{class:"token operator"}},[a._v("=")]),s("span",{pre:!0,attrs:{class:"token string"}},[a._v('"NEW_STORE_ID_FROM_BEFORE_PREVIOUS_STEP"')]),a._v("\n\n"),s("span",{pre:!0,attrs:{class:"token function"}},[a._v("curl")]),a._v(" "),s("span",{pre:!0,attrs:{class:"token parameter variable"}},[a._v("-s")]),a._v(" "),s("span",{pre:!0,attrs:{class:"token punctuation"}},[a._v("\\")]),a._v("\n "),s("span",{pre:!0,attrs:{class:"token parameter variable"}},[a._v("-H")]),a._v(" "),s("span",{pre:!0,attrs:{class:"token string"}},[a._v('"Content-Type: application/json"')]),a._v(" "),s("span",{pre:!0,attrs:{class:"token punctuation"}},[a._v("\\")]),a._v("\n "),s("span",{pre:!0,attrs:{class:"token parameter variable"}},[a._v("-H")]),a._v(" "),s("span",{pre:!0,attrs:{class:"token string"}},[a._v('"Authorization: token '),s("span",{pre:!0,attrs:{class:"token variable"}},[a._v("$USER_API_KEY")]),a._v('"')]),a._v(" "),s("span",{pre:!0,attrs:{class:"token punctuation"}},[a._v("\\")]),a._v("\n "),s("span",{pre:!0,attrs:{class:"token parameter variable"}},[a._v("-X")]),a._v(" GET "),s("span",{pre:!0,attrs:{class:"token punctuation"}},[a._v("\\")]),a._v("\n "),s("span",{pre:!0,attrs:{class:"token string"}},[a._v('"'),s("span",{pre:!0,attrs:{class:"token variable"}},[a._v("$BTCPAY_INSTANCE")]),a._v("/api/v1/stores/"),s("span",{pre:!0,attrs:{class:"token variable"}},[a._v("$NEW_STORE_ID")]),a._v('"')]),a._v("\n")])])])])}),[],!1,null,null,null);s.default=r.exports}}]); \ No newline at end of file +(window.webpackJsonp=window.webpackJsonp||[]).push([[124],{772:function(a,s,t){"use strict";t.r(s);var e=t(10),r=Object(e.a)({},(function(){var a=this,s=a._self._c;return s("ContentSlotsDistributor",{attrs:{"slot-key":a.$parent.slotKey}},[s("h1",{attrs:{id:"greenfield-api-example-with-curl"}},[s("a",{staticClass:"header-anchor",attrs:{href:"#greenfield-api-example-with-curl"}},[a._v("#")]),a._v(" Greenfield API example with cURL")]),a._v(" "),s("p",[a._v("The "),s("strong",[s("a",{attrs:{href:"https://docs.btcpayserver.org/API/Greenfield/v1/",target:"_blank",rel:"noopener noreferrer"}},[a._v("Greenfield API"),s("OutboundLink")],1)]),a._v(" (also available on your instance on "),s("code",[a._v("/docs")]),a._v(") allows you to operate BTCPay Server via an easy-to-use REST API.")]),a._v(" "),s("p",[a._v("Note that you can partially generate clients in the language of your choice by using the "),s("a",{attrs:{href:"https://docs.btcpayserver.org/API/Greenfield/v1/swagger.json",target:"_blank",rel:"noopener noreferrer"}},[a._v("Swagger file"),s("OutboundLink")],1),a._v(".")]),a._v(" "),s("p",[a._v("In this guide, we will show you how to use it via command line on linux using "),s("code",[a._v("curl")]),a._v(" and "),s("code",[a._v("jq")]),a._v(".")]),a._v(" "),s("h2",{attrs:{id:"prerequisites"}},[s("a",{staticClass:"header-anchor",attrs:{href:"#prerequisites"}},[a._v("#")]),a._v(" Prerequisites")]),a._v(" "),s("p",[a._v("Unless for a few endpoints like creating a store and API key on behalf of a specific user, Basic Auth should be avoided and an API key should be used instead. Make sure that API keys only have the needed permissions and not more. E.g. if you only create invoices you should not give the API key the permission to manage your stores.")]),a._v(" "),s("p",[a._v("You can create a new API key in the BTCPay Server UI under "),s("code",[a._v("Account")]),a._v(" -> "),s("code",[a._v("Manage account")]),a._v(" -> "),s("code",[a._v("API keys")])]),a._v(" "),s("p",[a._v("For the ecommerce examples below the API key needs the following permissions:")]),a._v(" "),s("ul",[s("li",[a._v("View invoices")]),a._v(" "),s("li",[a._v("Create invoice")]),a._v(" "),s("li",[a._v("Modify invoices")]),a._v(" "),s("li",[a._v("Modify stores webhooks")]),a._v(" "),s("li",[a._v("View your stores")]),a._v(" "),s("li",[a._v("Create non-approved pull payments")])]),a._v(" "),s("p",[a._v("For an overview of available permissions see the "),s("a",{attrs:{href:"https://docs.btcpayserver.org/API/Greenfield/v1/#section/Authentication/API_Key",target:"_blank",rel:"noopener noreferrer"}},[a._v("API documentation"),s("OutboundLink")],1),a._v(" or the permissions documented on each endpoint.")]),a._v(" "),s("h2",{attrs:{id:"ecommerce-examples"}},[s("a",{staticClass:"header-anchor",attrs:{href:"#ecommerce-examples"}},[a._v("#")]),a._v(" eCommerce examples")]),a._v(" "),s("p",[a._v("The following examples will show you how to create a basic eCommerce flow using the Greenfield API by creating an invoice, registering a webhook, processing webhooks, and issuing a full refund of an invoice.")]),a._v(" "),s("h3",{attrs:{id:"create-an-invoice"}},[s("a",{staticClass:"header-anchor",attrs:{href:"#create-an-invoice"}},[a._v("#")]),a._v(" Create an invoice")]),a._v(" "),s("p",[a._v("We create an invoice using the "),s("a",{attrs:{href:"https://docs.btcpayserver.org/API/Greenfield/v1/#operation/Invoices_CreateInvoice",target:"_blank",rel:"noopener noreferrer"}},[a._v("create invoice endpoint"),s("OutboundLink")],1),a._v(". This is a simple example but you can set a lot more data like order id, buyer email or custom metadata. That said, don't store redundant data on the invoice to prevent data leaks in case of a hack. E.g. in most cases it makes no sense to store the customer address on your eCommerce system and also on the BTCPay invoice.")]),a._v(" "),s("div",{staticClass:"language-bash extra-class"},[s("pre",{pre:!0,attrs:{class:"language-bash"}},[s("code",[s("span",{pre:!0,attrs:{class:"token assign-left variable"}},[a._v("BTCPAY_INSTANCE")]),s("span",{pre:!0,attrs:{class:"token operator"}},[a._v("=")]),s("span",{pre:!0,attrs:{class:"token string"}},[a._v('"https://mainnet.demo.btcpayserver.org"')]),a._v("\n"),s("span",{pre:!0,attrs:{class:"token assign-left variable"}},[a._v("API_KEY")]),s("span",{pre:!0,attrs:{class:"token operator"}},[a._v("=")]),s("span",{pre:!0,attrs:{class:"token string"}},[a._v('"YOUR_API_KEY"')]),a._v("\n"),s("span",{pre:!0,attrs:{class:"token assign-left variable"}},[a._v("STORE_ID")]),s("span",{pre:!0,attrs:{class:"token operator"}},[a._v("=")]),s("span",{pre:!0,attrs:{class:"token string"}},[a._v('"YOUR_STORE_ID"')]),a._v("\n"),s("span",{pre:!0,attrs:{class:"token assign-left variable"}},[a._v("AMOUNT")]),s("span",{pre:!0,attrs:{class:"token operator"}},[a._v("=")]),s("span",{pre:!0,attrs:{class:"token string"}},[a._v('"10"')]),a._v("\n"),s("span",{pre:!0,attrs:{class:"token assign-left variable"}},[a._v("CURRENCY")]),s("span",{pre:!0,attrs:{class:"token operator"}},[a._v("=")]),s("span",{pre:!0,attrs:{class:"token string"}},[a._v('"USD"')]),a._v("\n\n"),s("span",{pre:!0,attrs:{class:"token assign-left variable"}},[a._v("BODY")]),s("span",{pre:!0,attrs:{class:"token operator"}},[a._v("=")]),s("span",{pre:!0,attrs:{class:"token string"}},[a._v('"'),s("span",{pre:!0,attrs:{class:"token variable"}},[s("span",{pre:!0,attrs:{class:"token variable"}},[a._v("$(")]),s("span",{pre:!0,attrs:{class:"token builtin class-name"}},[a._v("echo")]),a._v(" "),s("span",{pre:!0,attrs:{class:"token string"}},[a._v('"{}"')]),a._v(" "),s("span",{pre:!0,attrs:{class:"token operator"}},[a._v("|")]),a._v(" jq "),s("span",{pre:!0,attrs:{class:"token parameter variable"}},[a._v("--arg")]),a._v(" "),s("span",{pre:!0,attrs:{class:"token string"}},[a._v('"a"')]),a._v(" "),s("span",{pre:!0,attrs:{class:"token string"}},[a._v('"'),s("span",{pre:!0,attrs:{class:"token variable"}},[a._v("$AMOUNT")]),a._v('"')]),a._v(" "),s("span",{pre:!0,attrs:{class:"token string"}},[a._v("'. + {amount:$a}'")]),a._v(" "),s("span",{pre:!0,attrs:{class:"token punctuation"}},[a._v("\\")]),a._v("\n "),s("span",{pre:!0,attrs:{class:"token operator"}},[a._v("|")]),a._v(" jq "),s("span",{pre:!0,attrs:{class:"token parameter variable"}},[a._v("--arg")]),a._v(" "),s("span",{pre:!0,attrs:{class:"token string"}},[a._v('"a"')]),a._v(" "),s("span",{pre:!0,attrs:{class:"token string"}},[a._v('"'),s("span",{pre:!0,attrs:{class:"token variable"}},[a._v("$CURRENCY")]),a._v('"')]),a._v(" "),s("span",{pre:!0,attrs:{class:"token string"}},[a._v("'. + {currency:$a}'")]),s("span",{pre:!0,attrs:{class:"token variable"}},[a._v(")")])]),a._v('"')]),a._v("\n\n"),s("span",{pre:!0,attrs:{class:"token function"}},[a._v("curl")]),a._v(" "),s("span",{pre:!0,attrs:{class:"token parameter variable"}},[a._v("-s")]),a._v(" "),s("span",{pre:!0,attrs:{class:"token punctuation"}},[a._v("\\")]),a._v("\n "),s("span",{pre:!0,attrs:{class:"token parameter variable"}},[a._v("-H")]),a._v(" "),s("span",{pre:!0,attrs:{class:"token string"}},[a._v('"Content-Type: application/json"')]),a._v(" "),s("span",{pre:!0,attrs:{class:"token punctuation"}},[a._v("\\")]),a._v("\n "),s("span",{pre:!0,attrs:{class:"token parameter variable"}},[a._v("-H")]),a._v(" "),s("span",{pre:!0,attrs:{class:"token string"}},[a._v('"Authorization: token '),s("span",{pre:!0,attrs:{class:"token variable"}},[a._v("$API_KEY")]),a._v('"')]),a._v(" "),s("span",{pre:!0,attrs:{class:"token punctuation"}},[a._v("\\")]),a._v("\n "),s("span",{pre:!0,attrs:{class:"token parameter variable"}},[a._v("-X")]),a._v(" POST "),s("span",{pre:!0,attrs:{class:"token punctuation"}},[a._v("\\")]),a._v("\n "),s("span",{pre:!0,attrs:{class:"token parameter variable"}},[a._v("-d")]),a._v(" "),s("span",{pre:!0,attrs:{class:"token string"}},[a._v('"'),s("span",{pre:!0,attrs:{class:"token variable"}},[a._v("$BODY")]),a._v('"')]),a._v(" "),s("span",{pre:!0,attrs:{class:"token punctuation"}},[a._v("\\")]),a._v("\n "),s("span",{pre:!0,attrs:{class:"token string"}},[a._v('"'),s("span",{pre:!0,attrs:{class:"token variable"}},[a._v("$BTCPAY_INSTANCE")]),a._v("/api/v1/stores/"),s("span",{pre:!0,attrs:{class:"token variable"}},[a._v("$STORE_ID")]),a._v('/invoices"')]),a._v("\n")])])]),s("h3",{attrs:{id:"register-a-webhook-optional"}},[s("a",{staticClass:"header-anchor",attrs:{href:"#register-a-webhook-optional"}},[a._v("#")]),a._v(" Register a webhook (optional)")]),a._v(" "),s("p",[a._v("Let's register a webhook to be notified when the invoice is paid. You can use the "),s("a",{attrs:{href:"https://docs.btcpayserver.org/API/Greenfield/v1/#operation/Webhooks_CreateWebhook",target:"_blank",rel:"noopener noreferrer"}},[a._v("create webhook endpoint"),s("OutboundLink")],1),a._v(" to register a webhook.")]),a._v(" "),s("div",{staticClass:"language-bash extra-class"},[s("pre",{pre:!0,attrs:{class:"language-bash"}},[s("code",[s("span",{pre:!0,attrs:{class:"token assign-left variable"}},[a._v("BTCPAY_INSTANCE")]),s("span",{pre:!0,attrs:{class:"token operator"}},[a._v("=")]),s("span",{pre:!0,attrs:{class:"token string"}},[a._v('"https://mainnet.demo.btcpayserver.org"')]),a._v("\n"),s("span",{pre:!0,attrs:{class:"token assign-left variable"}},[a._v("API_KEY")]),s("span",{pre:!0,attrs:{class:"token operator"}},[a._v("=")]),s("span",{pre:!0,attrs:{class:"token string"}},[a._v('"YOUR_API_KEY"')]),a._v("\n"),s("span",{pre:!0,attrs:{class:"token assign-left variable"}},[a._v("STORE_ID")]),s("span",{pre:!0,attrs:{class:"token operator"}},[a._v("=")]),s("span",{pre:!0,attrs:{class:"token string"}},[a._v('"YOUR_STORE_ID"')]),a._v("\n\n"),s("span",{pre:!0,attrs:{class:"token assign-left variable"}},[a._v("URL")]),s("span",{pre:!0,attrs:{class:"token operator"}},[a._v("=")]),s("span",{pre:!0,attrs:{class:"token string"}},[a._v('"https://example.com/your-webhook-endpoint"')]),a._v("\n\n"),s("span",{pre:!0,attrs:{class:"token assign-left variable"}},[a._v("BODY")]),s("span",{pre:!0,attrs:{class:"token operator"}},[a._v("=")]),s("span",{pre:!0,attrs:{class:"token string"}},[a._v('"'),s("span",{pre:!0,attrs:{class:"token variable"}},[s("span",{pre:!0,attrs:{class:"token variable"}},[a._v("$(")]),s("span",{pre:!0,attrs:{class:"token builtin class-name"}},[a._v("echo")]),a._v(" "),s("span",{pre:!0,attrs:{class:"token string"}},[a._v('"{}"')]),a._v(" "),s("span",{pre:!0,attrs:{class:"token operator"}},[a._v("|")]),a._v(" jq "),s("span",{pre:!0,attrs:{class:"token parameter variable"}},[a._v("--arg")]),a._v(" "),s("span",{pre:!0,attrs:{class:"token string"}},[a._v('"a"')]),a._v(" "),s("span",{pre:!0,attrs:{class:"token string"}},[a._v('"'),s("span",{pre:!0,attrs:{class:"token variable"}},[a._v("$URL")]),a._v('"')]),a._v(" "),s("span",{pre:!0,attrs:{class:"token string"}},[a._v("'. + {url:$a}'")]),s("span",{pre:!0,attrs:{class:"token variable"}},[a._v(")")])]),a._v('"')]),a._v("\n\n"),s("span",{pre:!0,attrs:{class:"token function"}},[a._v("curl")]),a._v(" "),s("span",{pre:!0,attrs:{class:"token parameter variable"}},[a._v("-s")]),a._v(" "),s("span",{pre:!0,attrs:{class:"token punctuation"}},[a._v("\\")]),a._v("\n "),s("span",{pre:!0,attrs:{class:"token parameter variable"}},[a._v("-H")]),a._v(" "),s("span",{pre:!0,attrs:{class:"token string"}},[a._v('"Content-Type: application/json"')]),a._v(" "),s("span",{pre:!0,attrs:{class:"token punctuation"}},[a._v("\\")]),a._v("\n "),s("span",{pre:!0,attrs:{class:"token parameter variable"}},[a._v("-H")]),a._v(" "),s("span",{pre:!0,attrs:{class:"token string"}},[a._v('"Authorization: token '),s("span",{pre:!0,attrs:{class:"token variable"}},[a._v("$API_KEY")]),a._v('"')]),a._v(" "),s("span",{pre:!0,attrs:{class:"token punctuation"}},[a._v("\\")]),a._v("\n "),s("span",{pre:!0,attrs:{class:"token parameter variable"}},[a._v("-X")]),a._v(" POST "),s("span",{pre:!0,attrs:{class:"token punctuation"}},[a._v("\\")]),a._v("\n "),s("span",{pre:!0,attrs:{class:"token parameter variable"}},[a._v("-d")]),a._v(" "),s("span",{pre:!0,attrs:{class:"token string"}},[a._v('"'),s("span",{pre:!0,attrs:{class:"token variable"}},[a._v("$BODY")]),a._v('"')]),a._v(" "),s("span",{pre:!0,attrs:{class:"token punctuation"}},[a._v("\\")]),a._v("\n "),s("span",{pre:!0,attrs:{class:"token string"}},[a._v('"'),s("span",{pre:!0,attrs:{class:"token variable"}},[a._v("$BTCPAY_INSTANCE")]),a._v("/api/v1/stores/"),s("span",{pre:!0,attrs:{class:"token variable"}},[a._v("$STORE_ID")]),a._v('/webhooks"')]),a._v("\n")])])]),s("p",[a._v("This step is optional, you can also manually create a webhook in the BTCPay Server UI in your store "),s("code",[a._v("Settings")]),a._v(" -> "),s("code",[a._v("Webhooks")]),a._v(".")]),a._v(" "),s("h3",{attrs:{id:"validate-and-process-webhooks"}},[s("a",{staticClass:"header-anchor",attrs:{href:"#validate-and-process-webhooks"}},[a._v("#")]),a._v(" Validate and process webhooks")]),a._v(" "),s("p",[a._v("This is not really possible with curl in bash but when you run a webserver. You can check the examples for "),s("RouterLink",{attrs:{to:"/Development/GreenFieldExample-NodeJS/"}},[a._v("NodeJS")]),a._v(" and "),s("RouterLink",{attrs:{to:"/Development/GreenfieldExample-PHP/"}},[a._v("PHP")]),a._v(".")],1),a._v(" "),s("h3",{attrs:{id:"issue-a-full-refund-of-an-invoice"}},[s("a",{staticClass:"header-anchor",attrs:{href:"#issue-a-full-refund-of-an-invoice"}},[a._v("#")]),a._v(" Issue a full refund of an invoice")]),a._v(" "),s("p",[a._v("Using the "),s("a",{attrs:{href:"https://docs.btcpayserver.org/API/Greenfield/v1/#operation/Invoices_Refund",target:"_blank",rel:"noopener noreferrer"}},[a._v("invoice refund endpoint"),s("OutboundLink")],1),a._v(" you can issue a full (or even partial) refund of an invoice. This will return a link where the customer can claim the refund.")]),a._v(" "),s("div",{staticClass:"language-bash extra-class"},[s("pre",{pre:!0,attrs:{class:"language-bash"}},[s("code",[s("span",{pre:!0,attrs:{class:"token assign-left variable"}},[a._v("BTCPAY_INSTANCE")]),s("span",{pre:!0,attrs:{class:"token operator"}},[a._v("=")]),s("span",{pre:!0,attrs:{class:"token string"}},[a._v('"https://mainnet.demo.btcpayserver.org"')]),a._v("\n"),s("span",{pre:!0,attrs:{class:"token assign-left variable"}},[a._v("API_KEY")]),s("span",{pre:!0,attrs:{class:"token operator"}},[a._v("=")]),s("span",{pre:!0,attrs:{class:"token string"}},[a._v('"YOUR_API_KEY"')]),a._v("\n"),s("span",{pre:!0,attrs:{class:"token assign-left variable"}},[a._v("STORE_ID")]),s("span",{pre:!0,attrs:{class:"token operator"}},[a._v("=")]),s("span",{pre:!0,attrs:{class:"token string"}},[a._v('"YOUR_STORE_ID"')]),a._v("\n\n"),s("span",{pre:!0,attrs:{class:"token assign-left variable"}},[a._v("INVOICE_ID")]),s("span",{pre:!0,attrs:{class:"token operator"}},[a._v("=")]),s("span",{pre:!0,attrs:{class:"token string"}},[a._v('"EXISTING_INVOICE_ID"')]),a._v("\n"),s("span",{pre:!0,attrs:{class:"token assign-left variable"}},[a._v("PAYMENT_METHOD")]),s("span",{pre:!0,attrs:{class:"token operator"}},[a._v("=")]),s("span",{pre:!0,attrs:{class:"token string"}},[a._v('"BTC"')]),a._v("\n"),s("span",{pre:!0,attrs:{class:"token assign-left variable"}},[a._v("REFUND_VARIANT")]),s("span",{pre:!0,attrs:{class:"token operator"}},[a._v("=")]),s("span",{pre:!0,attrs:{class:"token string"}},[a._v('"CurrentRate"')]),a._v("\n\n"),s("span",{pre:!0,attrs:{class:"token assign-left variable"}},[a._v("BODY")]),s("span",{pre:!0,attrs:{class:"token operator"}},[a._v("=")]),s("span",{pre:!0,attrs:{class:"token string"}},[a._v('"'),s("span",{pre:!0,attrs:{class:"token variable"}},[s("span",{pre:!0,attrs:{class:"token variable"}},[a._v("$(")]),s("span",{pre:!0,attrs:{class:"token builtin class-name"}},[a._v("echo")]),a._v(" "),s("span",{pre:!0,attrs:{class:"token string"}},[a._v('"{}"')]),a._v(" "),s("span",{pre:!0,attrs:{class:"token operator"}},[a._v("|")]),a._v(" jq "),s("span",{pre:!0,attrs:{class:"token parameter variable"}},[a._v("--arg")]),a._v(" "),s("span",{pre:!0,attrs:{class:"token string"}},[a._v('"a"')]),a._v(" "),s("span",{pre:!0,attrs:{class:"token string"}},[a._v('"'),s("span",{pre:!0,attrs:{class:"token variable"}},[a._v("$REFUND_VARIANT")]),a._v('"')]),a._v(" "),s("span",{pre:!0,attrs:{class:"token string"}},[a._v("'. + {refundVariant:$a}'")]),a._v(" "),s("span",{pre:!0,attrs:{class:"token punctuation"}},[a._v("\\")]),a._v("\n "),s("span",{pre:!0,attrs:{class:"token operator"}},[a._v("|")]),a._v(" jq "),s("span",{pre:!0,attrs:{class:"token parameter variable"}},[a._v("--arg")]),a._v(" "),s("span",{pre:!0,attrs:{class:"token string"}},[a._v('"a"')]),a._v(" "),s("span",{pre:!0,attrs:{class:"token string"}},[a._v('"'),s("span",{pre:!0,attrs:{class:"token variable"}},[a._v("$PAYMENT_METHOD")]),a._v('"')]),a._v(" "),s("span",{pre:!0,attrs:{class:"token string"}},[a._v("'. + {paymentMethod:$a}'")]),s("span",{pre:!0,attrs:{class:"token variable"}},[a._v(")")])]),a._v('"')]),a._v("\n\n"),s("span",{pre:!0,attrs:{class:"token function"}},[a._v("curl")]),a._v(" "),s("span",{pre:!0,attrs:{class:"token parameter variable"}},[a._v("-s")]),a._v(" "),s("span",{pre:!0,attrs:{class:"token punctuation"}},[a._v("\\")]),a._v("\n "),s("span",{pre:!0,attrs:{class:"token parameter variable"}},[a._v("-H")]),a._v(" "),s("span",{pre:!0,attrs:{class:"token string"}},[a._v('"Content-Type: application/json"')]),a._v(" "),s("span",{pre:!0,attrs:{class:"token punctuation"}},[a._v("\\")]),a._v("\n "),s("span",{pre:!0,attrs:{class:"token parameter variable"}},[a._v("-H")]),a._v(" "),s("span",{pre:!0,attrs:{class:"token string"}},[a._v('"Authorization: token '),s("span",{pre:!0,attrs:{class:"token variable"}},[a._v("$API_KEY")]),a._v('"')]),a._v(" "),s("span",{pre:!0,attrs:{class:"token punctuation"}},[a._v("\\")]),a._v("\n "),s("span",{pre:!0,attrs:{class:"token parameter variable"}},[a._v("-X")]),a._v(" POST "),s("span",{pre:!0,attrs:{class:"token punctuation"}},[a._v("\\")]),a._v("\n "),s("span",{pre:!0,attrs:{class:"token parameter variable"}},[a._v("-d")]),a._v(" "),s("span",{pre:!0,attrs:{class:"token string"}},[a._v('"'),s("span",{pre:!0,attrs:{class:"token variable"}},[a._v("$BODY")]),a._v('"')]),a._v(" "),s("span",{pre:!0,attrs:{class:"token punctuation"}},[a._v("\\")]),a._v("\n "),s("span",{pre:!0,attrs:{class:"token string"}},[a._v('"'),s("span",{pre:!0,attrs:{class:"token variable"}},[a._v("$BTCPAY_INSTANCE")]),a._v("/api/v1/stores/"),s("span",{pre:!0,attrs:{class:"token variable"}},[a._v("$STORE_ID")]),a._v("/invoices/"),s("span",{pre:!0,attrs:{class:"token variable"}},[a._v("$INVOICE_ID")]),a._v('/refund"')]),a._v("\n")])])]),s("h2",{attrs:{id:"btcpay-server-management-examples"}},[s("a",{staticClass:"header-anchor",attrs:{href:"#btcpay-server-management-examples"}},[a._v("#")]),a._v(" BTCPay Server management examples")]),a._v(" "),s("p",[a._v("Here we assume you are an ambassador and host BTCPay Server for your users. You manage your users on your own system and want to create a user and set email and password for their BTCPay Server login. Then using the same credentials to create a store and an API key on behalf of that user.")]),a._v(" "),s("h3",{attrs:{id:"create-a-new-user"}},[s("a",{staticClass:"header-anchor",attrs:{href:"#create-a-new-user"}},[a._v("#")]),a._v(" Create a new user")]),a._v(" "),s("p",[a._v("Creating a new user can be done by using "),s("a",{attrs:{href:"https://docs.btcpayserver.org/API/Greenfield/v1/#operation/Users_CreateUser",target:"_blank",rel:"noopener noreferrer"}},[a._v("this endpoint"),s("OutboundLink")],1),a._v(".")]),a._v(" "),s("div",{staticClass:"language-bash extra-class"},[s("pre",{pre:!0,attrs:{class:"language-bash"}},[s("code",[s("span",{pre:!0,attrs:{class:"token assign-left variable"}},[a._v("BTCPAY_INSTANCE")]),s("span",{pre:!0,attrs:{class:"token operator"}},[a._v("=")]),s("span",{pre:!0,attrs:{class:"token string"}},[a._v('"https://mainnet.demo.btcpayserver.org"')]),a._v("\n"),s("span",{pre:!0,attrs:{class:"token assign-left variable"}},[a._v("ADMIN_API_KEY")]),s("span",{pre:!0,attrs:{class:"token operator"}},[a._v("=")]),s("span",{pre:!0,attrs:{class:"token string"}},[a._v('"YOUR_ADMIN_API_KEY"')]),a._v("\n\n"),s("span",{pre:!0,attrs:{class:"token assign-left variable"}},[s("span",{pre:!0,attrs:{class:"token environment constant"}},[a._v("USER")])]),s("span",{pre:!0,attrs:{class:"token operator"}},[a._v("=")]),s("span",{pre:!0,attrs:{class:"token string"}},[a._v('"satoshi.nakamoto@example.com"')]),a._v("\n"),s("span",{pre:!0,attrs:{class:"token assign-left variable"}},[a._v("PASSWORD")]),s("span",{pre:!0,attrs:{class:"token operator"}},[a._v("=")]),s("span",{pre:!0,attrs:{class:"token string"}},[a._v('"SuperSecurePasswordsShouldBeQuiteLong123"')]),a._v("\n\n"),s("span",{pre:!0,attrs:{class:"token assign-left variable"}},[a._v("BODY")]),s("span",{pre:!0,attrs:{class:"token operator"}},[a._v("=")]),s("span",{pre:!0,attrs:{class:"token string"}},[a._v('"'),s("span",{pre:!0,attrs:{class:"token variable"}},[s("span",{pre:!0,attrs:{class:"token variable"}},[a._v("$(")]),s("span",{pre:!0,attrs:{class:"token builtin class-name"}},[a._v("echo")]),a._v(" "),s("span",{pre:!0,attrs:{class:"token string"}},[a._v('"{}"')]),a._v(" "),s("span",{pre:!0,attrs:{class:"token operator"}},[a._v("|")]),a._v(" jq "),s("span",{pre:!0,attrs:{class:"token parameter variable"}},[a._v("--arg")]),a._v(" "),s("span",{pre:!0,attrs:{class:"token string"}},[a._v('"a"')]),a._v(" "),s("span",{pre:!0,attrs:{class:"token string"}},[a._v('"'),s("span",{pre:!0,attrs:{class:"token environment constant"}},[a._v("$USER")]),a._v('"')]),a._v(" "),s("span",{pre:!0,attrs:{class:"token string"}},[a._v("'. + {email:$a}'")]),a._v(" "),s("span",{pre:!0,attrs:{class:"token punctuation"}},[a._v("\\")]),a._v("\n "),s("span",{pre:!0,attrs:{class:"token operator"}},[a._v("|")]),a._v(" jq "),s("span",{pre:!0,attrs:{class:"token parameter variable"}},[a._v("--arg")]),a._v(" "),s("span",{pre:!0,attrs:{class:"token string"}},[a._v('"a"')]),a._v(" "),s("span",{pre:!0,attrs:{class:"token string"}},[a._v('"'),s("span",{pre:!0,attrs:{class:"token variable"}},[a._v("$PASSWORD")]),a._v('"')]),a._v(" "),s("span",{pre:!0,attrs:{class:"token string"}},[a._v("'. + {password:$a}'")]),s("span",{pre:!0,attrs:{class:"token variable"}},[a._v(")")])]),a._v('"')]),a._v("\n"),s("span",{pre:!0,attrs:{class:"token function"}},[a._v("curl")]),a._v(" "),s("span",{pre:!0,attrs:{class:"token parameter variable"}},[a._v("-s")]),a._v(" "),s("span",{pre:!0,attrs:{class:"token punctuation"}},[a._v("\\")]),a._v("\n "),s("span",{pre:!0,attrs:{class:"token parameter variable"}},[a._v("-H")]),a._v(" "),s("span",{pre:!0,attrs:{class:"token string"}},[a._v('"Content-Type: application/json"')]),a._v(" "),s("span",{pre:!0,attrs:{class:"token punctuation"}},[a._v("\\")]),a._v("\n "),s("span",{pre:!0,attrs:{class:"token parameter variable"}},[a._v("-H")]),a._v(" "),s("span",{pre:!0,attrs:{class:"token string"}},[a._v('"Authorization: token '),s("span",{pre:!0,attrs:{class:"token variable"}},[a._v("$ADMIN_API_KEY")]),a._v('"')]),a._v(" "),s("span",{pre:!0,attrs:{class:"token punctuation"}},[a._v("\\")]),a._v("\n "),s("span",{pre:!0,attrs:{class:"token parameter variable"}},[a._v("-X")]),a._v(" POST "),s("span",{pre:!0,attrs:{class:"token punctuation"}},[a._v("\\")]),a._v("\n "),s("span",{pre:!0,attrs:{class:"token parameter variable"}},[a._v("-d")]),a._v(" "),s("span",{pre:!0,attrs:{class:"token string"}},[a._v('"'),s("span",{pre:!0,attrs:{class:"token variable"}},[a._v("$BODY")]),a._v('"')]),a._v(" "),s("span",{pre:!0,attrs:{class:"token punctuation"}},[a._v("\\")]),a._v("\n "),s("span",{pre:!0,attrs:{class:"token string"}},[a._v('"'),s("span",{pre:!0,attrs:{class:"token variable"}},[a._v("$BTCPAY_INSTANCE")]),a._v('/api/v1/users"')]),a._v("\n")])])]),s("h3",{attrs:{id:"create-a-store-on-behalf-of-the-user"}},[s("a",{staticClass:"header-anchor",attrs:{href:"#create-a-store-on-behalf-of-the-user"}},[a._v("#")]),a._v(" Create a store on behalf of the user")]),a._v(" "),s("p",[a._v("Now we create a store with the new users credentials the user becomes the owner "),s("a",{attrs:{href:"https://docs.btcpayserver.org/API/Greenfield/v1/#operation/Stores_CreateStore",target:"_blank",rel:"noopener noreferrer"}},[a._v("create a new store"),s("OutboundLink")],1),a._v(".")]),a._v(" "),s("div",{staticClass:"language-bash extra-class"},[s("pre",{pre:!0,attrs:{class:"language-bash"}},[s("code",[s("span",{pre:!0,attrs:{class:"token assign-left variable"}},[a._v("STORE_NAME")]),s("span",{pre:!0,attrs:{class:"token operator"}},[a._v("=")]),s("span",{pre:!0,attrs:{class:"token string"}},[a._v('"My awesome store"')]),a._v("\n\n"),s("span",{pre:!0,attrs:{class:"token assign-left variable"}},[a._v("BODY")]),s("span",{pre:!0,attrs:{class:"token operator"}},[a._v("=")]),s("span",{pre:!0,attrs:{class:"token string"}},[a._v('"'),s("span",{pre:!0,attrs:{class:"token variable"}},[s("span",{pre:!0,attrs:{class:"token variable"}},[a._v("$(")]),s("span",{pre:!0,attrs:{class:"token builtin class-name"}},[a._v("echo")]),a._v(" "),s("span",{pre:!0,attrs:{class:"token string"}},[a._v('"{}"')]),a._v(" "),s("span",{pre:!0,attrs:{class:"token operator"}},[a._v("|")]),a._v(" jq "),s("span",{pre:!0,attrs:{class:"token parameter variable"}},[a._v("--arg")]),a._v(" "),s("span",{pre:!0,attrs:{class:"token string"}},[a._v('"a"')]),a._v(" "),s("span",{pre:!0,attrs:{class:"token string"}},[a._v('"'),s("span",{pre:!0,attrs:{class:"token variable"}},[a._v("$STORE_NAME")]),a._v('"')]),a._v(" "),s("span",{pre:!0,attrs:{class:"token string"}},[a._v("'. + {name:$a}'")]),s("span",{pre:!0,attrs:{class:"token variable"}},[a._v(")")])]),a._v('"')]),a._v("\n\n"),s("span",{pre:!0,attrs:{class:"token assign-left variable"}},[a._v("NEW_STORE_ID")]),s("span",{pre:!0,attrs:{class:"token operator"}},[a._v("=")]),s("span",{pre:!0,attrs:{class:"token string"}},[a._v('"'),s("span",{pre:!0,attrs:{class:"token variable"}},[s("span",{pre:!0,attrs:{class:"token variable"}},[a._v("$(")]),s("span",{pre:!0,attrs:{class:"token function"}},[a._v("curl")]),a._v(" "),s("span",{pre:!0,attrs:{class:"token parameter variable"}},[a._v("-s")]),a._v(" "),s("span",{pre:!0,attrs:{class:"token punctuation"}},[a._v("\\")]),a._v("\n "),s("span",{pre:!0,attrs:{class:"token parameter variable"}},[a._v("-H")]),a._v(" "),s("span",{pre:!0,attrs:{class:"token string"}},[a._v('"Content-Type: application/json"')]),a._v(" "),s("span",{pre:!0,attrs:{class:"token punctuation"}},[a._v("\\")]),a._v("\n "),s("span",{pre:!0,attrs:{class:"token parameter variable"}},[a._v("--user")]),a._v(" "),s("span",{pre:!0,attrs:{class:"token string"}},[a._v('"'),s("span",{pre:!0,attrs:{class:"token environment constant"}},[a._v("$USER")]),a._v(":"),s("span",{pre:!0,attrs:{class:"token variable"}},[a._v("$PASSWORD")]),a._v('"')]),a._v(" "),s("span",{pre:!0,attrs:{class:"token punctuation"}},[a._v("\\")]),a._v("\n "),s("span",{pre:!0,attrs:{class:"token parameter variable"}},[a._v("-X")]),a._v(" POST "),s("span",{pre:!0,attrs:{class:"token punctuation"}},[a._v("\\")]),a._v("\n "),s("span",{pre:!0,attrs:{class:"token parameter variable"}},[a._v("-d")]),a._v(" "),s("span",{pre:!0,attrs:{class:"token string"}},[a._v('"'),s("span",{pre:!0,attrs:{class:"token variable"}},[a._v("$BODY")]),a._v('"')]),a._v(" "),s("span",{pre:!0,attrs:{class:"token punctuation"}},[a._v("\\")]),a._v("\n "),s("span",{pre:!0,attrs:{class:"token string"}},[a._v('"'),s("span",{pre:!0,attrs:{class:"token variable"}},[a._v("$BTCPAY_INSTANCE")]),a._v('/api/v1/stores"')]),a._v(" "),s("span",{pre:!0,attrs:{class:"token operator"}},[a._v("|")]),a._v(" jq "),s("span",{pre:!0,attrs:{class:"token parameter variable"}},[a._v("-r")]),a._v(" .id"),s("span",{pre:!0,attrs:{class:"token variable"}},[a._v(")")])]),a._v('"')]),a._v("\n\n"),s("span",{pre:!0,attrs:{class:"token builtin class-name"}},[a._v("echo")]),a._v(" "),s("span",{pre:!0,attrs:{class:"token string"}},[a._v('"New store id: '),s("span",{pre:!0,attrs:{class:"token variable"}},[a._v("$NEW_STORE_ID")]),a._v('"')]),a._v("\n")])])]),s("h3",{attrs:{id:"create-a-new-api-key-on-behalf-of-the-user"}},[s("a",{staticClass:"header-anchor",attrs:{href:"#create-a-new-api-key-on-behalf-of-the-user"}},[a._v("#")]),a._v(" Create a new API key on behalf of the user")]),a._v(" "),s("p",[a._v("Now we can create an API key and limit it to the new store with e.g. the "),s("code",[a._v("btcpay.store.canmodifystoresettings")]),a._v(" permission. Likely you also want to allow API key to create invoices, but for this example we keep it simple.")]),a._v(" "),s("p",[a._v('You can find the needed permissions for endpoints on the endpoint docs under "Authorization" or an overview of permissions in the '),s("a",{attrs:{href:"https://docs.btcpayserver.org/API/Greenfield/v1/#section/Authentication/API_Key",target:"_blank",rel:"noopener noreferrer"}},[a._v("authorization section"),s("OutboundLink")],1),a._v(".")]),a._v(" "),s("div",{staticClass:"language-bash extra-class"},[s("pre",{pre:!0,attrs:{class:"language-bash"}},[s("code",[s("span",{pre:!0,attrs:{class:"token assign-left variable"}},[a._v("ADMIN_API_KEY")]),s("span",{pre:!0,attrs:{class:"token operator"}},[a._v("=")]),s("span",{pre:!0,attrs:{class:"token string"}},[a._v('"YOUR_ADMIN_API_KEY"')]),a._v("\n"),s("span",{pre:!0,attrs:{class:"token assign-left variable"}},[s("span",{pre:!0,attrs:{class:"token environment constant"}},[a._v("USER")])]),s("span",{pre:!0,attrs:{class:"token operator"}},[a._v("=")]),s("span",{pre:!0,attrs:{class:"token string"}},[a._v('"satoshi.nakamoto@example.com"')]),a._v("\n"),s("span",{pre:!0,attrs:{class:"token assign-left variable"}},[a._v("PERMISSION")]),s("span",{pre:!0,attrs:{class:"token operator"}},[a._v("=")]),s("span",{pre:!0,attrs:{class:"token string"}},[a._v('"btcpay.store.canmodifystoresettings"')]),a._v("\n"),s("span",{pre:!0,attrs:{class:"token assign-left variable"}},[a._v("NEW_STORE_ID")]),s("span",{pre:!0,attrs:{class:"token operator"}},[a._v("=")]),s("span",{pre:!0,attrs:{class:"token string"}},[a._v('"NEW_STORE_ID_FROM_PREVIOUS_STEP"')]),a._v("\n\n"),s("span",{pre:!0,attrs:{class:"token assign-left variable"}},[a._v("BODY")]),s("span",{pre:!0,attrs:{class:"token operator"}},[a._v("=")]),s("span",{pre:!0,attrs:{class:"token string"}},[a._v('"'),s("span",{pre:!0,attrs:{class:"token variable"}},[s("span",{pre:!0,attrs:{class:"token variable"}},[a._v("$(")]),s("span",{pre:!0,attrs:{class:"token builtin class-name"}},[a._v("echo")]),a._v(" "),s("span",{pre:!0,attrs:{class:"token string"}},[a._v('"{}"')]),a._v(" "),s("span",{pre:!0,attrs:{class:"token operator"}},[a._v("|")]),a._v(" jq "),s("span",{pre:!0,attrs:{class:"token parameter variable"}},[a._v("--arg")]),a._v(" "),s("span",{pre:!0,attrs:{class:"token string"}},[a._v('"a"')]),a._v(" "),s("span",{pre:!0,attrs:{class:"token string"}},[a._v('"'),s("span",{pre:!0,attrs:{class:"token variable"}},[a._v("$PERMISSION")]),a._v(":"),s("span",{pre:!0,attrs:{class:"token variable"}},[a._v("$NEW_STORE_ID")]),a._v('"')]),a._v(" "),s("span",{pre:!0,attrs:{class:"token string"}},[a._v("'. + {permissions:[$a]}'")]),s("span",{pre:!0,attrs:{class:"token variable"}},[a._v(")")])]),a._v('"')]),a._v("\n"),s("span",{pre:!0,attrs:{class:"token assign-left variable"}},[a._v("USER_API_KEY")]),s("span",{pre:!0,attrs:{class:"token operator"}},[a._v("=")]),s("span",{pre:!0,attrs:{class:"token string"}},[a._v('"'),s("span",{pre:!0,attrs:{class:"token variable"}},[s("span",{pre:!0,attrs:{class:"token variable"}},[a._v("$(")]),s("span",{pre:!0,attrs:{class:"token function"}},[a._v("curl")]),a._v(" "),s("span",{pre:!0,attrs:{class:"token parameter variable"}},[a._v("-s")]),a._v(" "),s("span",{pre:!0,attrs:{class:"token punctuation"}},[a._v("\\")]),a._v("\n "),s("span",{pre:!0,attrs:{class:"token parameter variable"}},[a._v("-H")]),a._v(" "),s("span",{pre:!0,attrs:{class:"token string"}},[a._v('"Content-Type: application/json"')]),a._v(" "),s("span",{pre:!0,attrs:{class:"token punctuation"}},[a._v("\\")]),a._v("\n "),s("span",{pre:!0,attrs:{class:"token parameter variable"}},[a._v("-H")]),a._v(" "),s("span",{pre:!0,attrs:{class:"token string"}},[a._v('"Authorization: token '),s("span",{pre:!0,attrs:{class:"token variable"}},[a._v("$ADMIN_API_KEY")]),a._v('"')]),a._v(" "),s("span",{pre:!0,attrs:{class:"token punctuation"}},[a._v("\\")]),a._v("\n "),s("span",{pre:!0,attrs:{class:"token parameter variable"}},[a._v("-X")]),a._v(" POST "),s("span",{pre:!0,attrs:{class:"token punctuation"}},[a._v("\\")]),a._v("\n "),s("span",{pre:!0,attrs:{class:"token parameter variable"}},[a._v("-d")]),a._v(" "),s("span",{pre:!0,attrs:{class:"token string"}},[a._v('"'),s("span",{pre:!0,attrs:{class:"token variable"}},[a._v("$BODY")]),a._v('"')]),a._v(" "),s("span",{pre:!0,attrs:{class:"token punctuation"}},[a._v("\\")]),a._v("\n "),s("span",{pre:!0,attrs:{class:"token string"}},[a._v('"'),s("span",{pre:!0,attrs:{class:"token variable"}},[a._v("$BTCPAY_INSTANCE")]),a._v("/api/v1/users/"),s("span",{pre:!0,attrs:{class:"token environment constant"}},[a._v("$USER")]),a._v('/api-keys"')]),a._v(" "),s("span",{pre:!0,attrs:{class:"token operator"}},[a._v("|")]),a._v(" jq "),s("span",{pre:!0,attrs:{class:"token parameter variable"}},[a._v("-r")]),a._v(" .apiKey"),s("span",{pre:!0,attrs:{class:"token variable"}},[a._v(")")])]),a._v('"')]),a._v("\n\n"),s("span",{pre:!0,attrs:{class:"token builtin class-name"}},[a._v("echo")]),a._v(" "),s("span",{pre:!0,attrs:{class:"token string"}},[a._v('"New user api key: '),s("span",{pre:!0,attrs:{class:"token variable"}},[a._v("$USER_API_KEY")]),a._v('"')]),a._v("\n")])])]),s("h3",{attrs:{id:"read-store-information"}},[s("a",{staticClass:"header-anchor",attrs:{href:"#read-store-information"}},[a._v("#")]),a._v(" Read store information")]),a._v(" "),s("p",[a._v("We can use the new apikey to "),s("a",{attrs:{href:"https://docs.btcpayserver.org/API/Greenfield/v1/#operation/Stores_GetStore",target:"_blank",rel:"noopener noreferrer"}},[a._v("read store"),s("OutboundLink")],1),a._v(" information:")]),a._v(" "),s("div",{staticClass:"language-bash extra-class"},[s("pre",{pre:!0,attrs:{class:"language-bash"}},[s("code",[s("span",{pre:!0,attrs:{class:"token assign-left variable"}},[a._v("USER_API_KEY")]),s("span",{pre:!0,attrs:{class:"token operator"}},[a._v("=")]),s("span",{pre:!0,attrs:{class:"token string"}},[a._v('"API_KEY_FROM_PREVIOUS_STEP"')]),a._v("\n"),s("span",{pre:!0,attrs:{class:"token assign-left variable"}},[a._v("NEW_STORE_ID")]),s("span",{pre:!0,attrs:{class:"token operator"}},[a._v("=")]),s("span",{pre:!0,attrs:{class:"token string"}},[a._v('"NEW_STORE_ID_FROM_BEFORE_PREVIOUS_STEP"')]),a._v("\n\n"),s("span",{pre:!0,attrs:{class:"token function"}},[a._v("curl")]),a._v(" "),s("span",{pre:!0,attrs:{class:"token parameter variable"}},[a._v("-s")]),a._v(" "),s("span",{pre:!0,attrs:{class:"token punctuation"}},[a._v("\\")]),a._v("\n "),s("span",{pre:!0,attrs:{class:"token parameter variable"}},[a._v("-H")]),a._v(" "),s("span",{pre:!0,attrs:{class:"token string"}},[a._v('"Content-Type: application/json"')]),a._v(" "),s("span",{pre:!0,attrs:{class:"token punctuation"}},[a._v("\\")]),a._v("\n "),s("span",{pre:!0,attrs:{class:"token parameter variable"}},[a._v("-H")]),a._v(" "),s("span",{pre:!0,attrs:{class:"token string"}},[a._v('"Authorization: token '),s("span",{pre:!0,attrs:{class:"token variable"}},[a._v("$USER_API_KEY")]),a._v('"')]),a._v(" "),s("span",{pre:!0,attrs:{class:"token punctuation"}},[a._v("\\")]),a._v("\n "),s("span",{pre:!0,attrs:{class:"token parameter variable"}},[a._v("-X")]),a._v(" GET "),s("span",{pre:!0,attrs:{class:"token punctuation"}},[a._v("\\")]),a._v("\n "),s("span",{pre:!0,attrs:{class:"token string"}},[a._v('"'),s("span",{pre:!0,attrs:{class:"token variable"}},[a._v("$BTCPAY_INSTANCE")]),a._v("/api/v1/stores/"),s("span",{pre:!0,attrs:{class:"token variable"}},[a._v("$NEW_STORE_ID")]),a._v('"')]),a._v("\n")])])])])}),[],!1,null,null,null);s.default=r.exports}}]); \ No newline at end of file diff --git a/assets/js/125.591e35dc.js b/assets/js/125.4ed69fbb.js similarity index 99% rename from assets/js/125.591e35dc.js rename to assets/js/125.4ed69fbb.js index 1e478e695d..f64b77ab4e 100644 --- a/assets/js/125.591e35dc.js +++ b/assets/js/125.4ed69fbb.js @@ -1 +1 @@ -(window.webpackJsonp=window.webpackJsonp||[]).push([[125],{775:function(t,s,a){"use strict";a.r(s);var e=a(10),n=Object(e.a)({},(function(){var t=this,s=t._self._c;return s("ContentSlotsDistributor",{attrs:{"slot-key":t.$parent.slotKey}},[s("h1",{attrs:{id:"greenfield-api-examples-with-php"}},[s("a",{staticClass:"header-anchor",attrs:{href:"#greenfield-api-examples-with-php"}},[t._v("#")]),t._v(" Greenfield API examples with PHP")]),t._v(" "),s("p",[t._v("The "),s("strong",[s("a",{attrs:{href:"https://docs.btcpayserver.org/API/Greenfield/v1/",target:"_blank",rel:"noopener noreferrer"}},[t._v("Greenfield API"),s("OutboundLink")],1)]),t._v(" (also available on your instance on "),s("code",[t._v("/docs")]),t._v(") allows you to operate BTCPay Server via an easy-to-use REST API.")]),t._v(" "),s("p",[t._v("Note that you can partially generate clients in the language of your choice by using the "),s("a",{attrs:{href:"https://docs.btcpayserver.org/API/Greenfield/v1/swagger.json",target:"_blank",rel:"noopener noreferrer"}},[t._v("Swagger file"),s("OutboundLink")],1),t._v(".")]),t._v(" "),s("p",[t._v("For PHP we have a client library available which can be found "),s("a",{attrs:{href:"https://github.com/btcpayserver/btcpayserver-greenfield-php",target:"_blank",rel:"noopener noreferrer"}},[t._v("here"),s("OutboundLink")],1),t._v(" and is also available for installation via Composer "),s("code",[t._v("composer require btcpayserver/btcpayserver-greenfield-php")])]),t._v(" "),s("p",[t._v("In this guide, we will give some examples how to use the Greenfield API with our PHP library for eCommerce and BTCPay management. Additional examples can be found "),s("a",{attrs:{href:"https://github.com/btcpayserver/btcpayserver-greenfield-php/tree/master/examples",target:"_blank",rel:"noopener noreferrer"}},[t._v("here"),s("OutboundLink")],1),t._v(".")]),t._v(" "),s("h2",{attrs:{id:"prerequisites"}},[s("a",{staticClass:"header-anchor",attrs:{href:"#prerequisites"}},[t._v("#")]),t._v(" Prerequisites")]),t._v(" "),s("p",[t._v("Unless for a few endpoints like creating a store and API key on behalf of a specific user, Basic Auth should be avoided and an API key should be used instead. Make sure that API keys only have the needed permissions and not more. E.g. if you only create invoices you should not give the API key the permission to manage your stores.")]),t._v(" "),s("p",[t._v("You can create a new API key in the BTCPay Server UI under "),s("code",[t._v("Account")]),t._v(" -> "),s("code",[t._v("Manage account")]),t._v(" -> "),s("code",[t._v("API keys")])]),t._v(" "),s("p",[t._v("For the ecommerce examples below the API key needs the following permissions:")]),t._v(" "),s("ul",[s("li",[t._v("View invoices")]),t._v(" "),s("li",[t._v("Create invoice")]),t._v(" "),s("li",[t._v("Modify invoices")]),t._v(" "),s("li",[t._v("Modify stores webhooks")]),t._v(" "),s("li",[t._v("View your stores")]),t._v(" "),s("li",[t._v("Create non-approved pull payments")])]),t._v(" "),s("p",[t._v("For an overview of available permissions see the "),s("a",{attrs:{href:"https://docs.btcpayserver.org/API/Greenfield/v1/#section/Authentication/API_Key",target:"_blank",rel:"noopener noreferrer"}},[t._v("API documentation"),s("OutboundLink")],1),t._v(" or the permissions documented on each endpoint.")]),t._v(" "),s("h2",{attrs:{id:"ecommerce-examples"}},[s("a",{staticClass:"header-anchor",attrs:{href:"#ecommerce-examples"}},[t._v("#")]),t._v(" eCommerce examples")]),t._v(" "),s("p",[t._v("The following examples will show you how to create a basic eCommerce flow using the Greenfield API by creating an invoice, registering a webhook, processing webhooks, and issuing a full refund of an invoice.")]),t._v(" "),s("h3",{attrs:{id:"create-an-invoice"}},[s("a",{staticClass:"header-anchor",attrs:{href:"#create-an-invoice"}},[t._v("#")]),t._v(" Create an invoice")]),t._v(" "),s("p",[t._v("We create an invoice using the "),s("a",{attrs:{href:"https://docs.btcpayserver.org/API/Greenfield/v1/#operation/Invoices_CreateInvoice",target:"_blank",rel:"noopener noreferrer"}},[t._v("create invoice endpoint"),s("OutboundLink")],1),t._v(". This is a simple example but you can set a lot more data like order id, buyer email or custom metadata. That said, don't store redundant data on the invoice to prevent data leaks in case of a hack. E.g. in most cases it makes no sense to store the customer address on your eCommerce system and also on the BTCPay invoice.")]),t._v(" "),s("div",{staticClass:"language-PHP extra-class"},[s("pre",{pre:!0,attrs:{class:"language-php"}},[s("code",[s("span",{pre:!0,attrs:{class:"token keyword"}},[t._v("require")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token constant"}},[t._v("__DIR__")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token operator"}},[t._v(".")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token string single-quoted-string"}},[t._v("'./vendor/autoload.php'")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(";")]),t._v("\n\n"),s("span",{pre:!0,attrs:{class:"token variable"}},[t._v("$host")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token operator"}},[t._v("=")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token string single-quoted-string"}},[t._v("'https://mainnet.demo.btcpayserver.org'")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(";")]),t._v("\n"),s("span",{pre:!0,attrs:{class:"token variable"}},[t._v("$apiKey")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token operator"}},[t._v("=")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token string single-quoted-string"}},[t._v("'API_KEY'")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(";")]),t._v("\n"),s("span",{pre:!0,attrs:{class:"token variable"}},[t._v("$storeId")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token operator"}},[t._v("=")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token string single-quoted-string"}},[t._v("'STORE_ID'")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(";")]),t._v("\n"),s("span",{pre:!0,attrs:{class:"token variable"}},[t._v("$amount")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token operator"}},[t._v("=")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token number"}},[t._v("10")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(";")]),t._v("\n"),s("span",{pre:!0,attrs:{class:"token variable"}},[t._v("$currency")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token operator"}},[t._v("=")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token string single-quoted-string"}},[t._v("'USD'")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(";")]),t._v("\n"),s("span",{pre:!0,attrs:{class:"token variable"}},[t._v("$orderId")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token operator"}},[t._v("=")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token string single-quoted-string"}},[t._v("'SN21420'")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(";")]),t._v("\n\n"),s("span",{pre:!0,attrs:{class:"token keyword"}},[t._v("try")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("{")]),t._v("\n "),s("span",{pre:!0,attrs:{class:"token variable"}},[t._v("$client")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token operator"}},[t._v("=")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token keyword"}},[t._v("new")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token class-name class-name-fully-qualified"}},[s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("\\")]),t._v("BTCPayServer"),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("\\")]),t._v("Client"),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("\\")]),t._v("Invoice")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("(")]),s("span",{pre:!0,attrs:{class:"token variable"}},[t._v("$host")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token variable"}},[t._v("$apiKey")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(")")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(";")]),t._v("\n "),s("span",{pre:!0,attrs:{class:"token function"}},[t._v("var_dump")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("(")]),t._v("\n "),s("span",{pre:!0,attrs:{class:"token variable"}},[t._v("$client")]),s("span",{pre:!0,attrs:{class:"token operator"}},[t._v("->")]),s("span",{pre:!0,attrs:{class:"token function"}},[t._v("createInvoice")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("(")]),t._v("\n "),s("span",{pre:!0,attrs:{class:"token variable"}},[t._v("$storeId")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v("\n "),s("span",{pre:!0,attrs:{class:"token variable"}},[t._v("$currency")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v("\n "),s("span",{pre:!0,attrs:{class:"token class-name class-name-fully-qualified static-context"}},[s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("\\")]),t._v("BTCPayServer"),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("\\")]),t._v("Util"),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("\\")]),t._v("PreciseNumber")]),s("span",{pre:!0,attrs:{class:"token operator"}},[t._v("::")]),s("span",{pre:!0,attrs:{class:"token function"}},[t._v("parseString")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("(")]),s("span",{pre:!0,attrs:{class:"token variable"}},[t._v("$amount")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(")")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v("\n "),s("span",{pre:!0,attrs:{class:"token variable"}},[t._v("$orderId")]),t._v("\n "),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(")")]),t._v("\n "),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(")")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(";")]),t._v("\n"),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("}")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token keyword"}},[t._v("catch")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("(")]),s("span",{pre:!0,attrs:{class:"token class-name class-name-fully-qualified"}},[s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("\\")]),t._v("Throwable")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token variable"}},[t._v("$e")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(")")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("{")]),t._v("\n "),s("span",{pre:!0,attrs:{class:"token keyword"}},[t._v("echo")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token string double-quoted-string"}},[t._v('"Error: "')]),t._v(" "),s("span",{pre:!0,attrs:{class:"token operator"}},[t._v(".")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token variable"}},[t._v("$e")]),s("span",{pre:!0,attrs:{class:"token operator"}},[t._v("->")]),s("span",{pre:!0,attrs:{class:"token function"}},[t._v("getMessage")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("(")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(")")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(";")]),t._v("\n"),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("}")]),t._v("\n")])])]),s("h3",{attrs:{id:"register-a-webhook-optional"}},[s("a",{staticClass:"header-anchor",attrs:{href:"#register-a-webhook-optional"}},[t._v("#")]),t._v(" Register a webhook (optional)")]),t._v(" "),s("p",[t._v("Let's register a webhook to be notified when the invoice is paid. You can use the "),s("a",{attrs:{href:"https://docs.btcpayserver.org/API/Greenfield/v1/#operation/Webhooks_CreateWebhook",target:"_blank",rel:"noopener noreferrer"}},[t._v("create webhook endpoint"),s("OutboundLink")],1),t._v(" to register a webhook.")]),t._v(" "),s("div",{staticClass:"language-PHP extra-class"},[s("pre",{pre:!0,attrs:{class:"language-php"}},[s("code",[s("span",{pre:!0,attrs:{class:"token keyword"}},[t._v("require")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token constant"}},[t._v("__DIR__")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token operator"}},[t._v(".")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token string single-quoted-string"}},[t._v("'./vendor/autoload.php'")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(";")]),t._v("\n\n"),s("span",{pre:!0,attrs:{class:"token variable"}},[t._v("$host")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token operator"}},[t._v("=")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token string single-quoted-string"}},[t._v("'https://mainnet.demo.btcpayserver.org'")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(";")]),t._v("\n"),s("span",{pre:!0,attrs:{class:"token variable"}},[t._v("$apiKey")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token operator"}},[t._v("=")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token string single-quoted-string"}},[t._v("'API_KEY'")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(";")]),t._v("\n"),s("span",{pre:!0,attrs:{class:"token variable"}},[t._v("$storeId")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token operator"}},[t._v("=")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token string single-quoted-string"}},[t._v("'STORE_ID'")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(";")]),t._v("\n"),s("span",{pre:!0,attrs:{class:"token variable"}},[t._v("$url")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token operator"}},[t._v("=")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token string single-quoted-string"}},[t._v("'https://example.com/webhook'")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(";")]),t._v("\n"),s("span",{pre:!0,attrs:{class:"token variable"}},[t._v("$subscribedEvents")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token operator"}},[t._v("=")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token constant"}},[t._v("null")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(";")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token comment"}},[t._v("// Will subscribe to all events.")]),t._v("\n\n"),s("span",{pre:!0,attrs:{class:"token keyword"}},[t._v("try")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("{")]),t._v("\n "),s("span",{pre:!0,attrs:{class:"token variable"}},[t._v("$client")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token operator"}},[t._v("=")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token keyword"}},[t._v("new")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token class-name class-name-fully-qualified"}},[s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("\\")]),t._v("BTCPayServer"),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("\\")]),t._v("Client"),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("\\")]),t._v("Webhook")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("(")]),s("span",{pre:!0,attrs:{class:"token variable"}},[t._v("$host")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token variable"}},[t._v("$apiKey")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(")")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(";")]),t._v("\n "),s("span",{pre:!0,attrs:{class:"token function"}},[t._v("var_dump")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("(")]),t._v("\n "),s("span",{pre:!0,attrs:{class:"token variable"}},[t._v("$client")]),s("span",{pre:!0,attrs:{class:"token operator"}},[t._v("->")]),s("span",{pre:!0,attrs:{class:"token function"}},[t._v("createWebhook")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("(")]),s("span",{pre:!0,attrs:{class:"token variable"}},[t._v("$storeId")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token variable"}},[t._v("$url")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token variable"}},[t._v("$subscribedEvents")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token constant"}},[t._v("null")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(")")]),t._v("\n "),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(")")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(";")]),t._v("\n"),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("}")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token keyword"}},[t._v("catch")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("(")]),s("span",{pre:!0,attrs:{class:"token class-name class-name-fully-qualified"}},[s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("\\")]),t._v("Throwable")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token variable"}},[t._v("$e")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(")")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("{")]),t._v("\n "),s("span",{pre:!0,attrs:{class:"token keyword"}},[t._v("echo")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token string double-quoted-string"}},[t._v('"Error: "')]),t._v(" "),s("span",{pre:!0,attrs:{class:"token operator"}},[t._v(".")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token variable"}},[t._v("$e")]),s("span",{pre:!0,attrs:{class:"token operator"}},[t._v("->")]),s("span",{pre:!0,attrs:{class:"token function"}},[t._v("getMessage")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("(")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(")")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(";")]),t._v("\n"),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("}")]),t._v("\n")])])]),s("p",[t._v("This step is optional, you can also manually create a webhook in the BTCPay Server UI in your store "),s("code",[t._v("Settings")]),t._v(" -> "),s("code",[t._v("Webhooks")]),t._v(".")]),t._v(" "),s("h3",{attrs:{id:"validate-and-process-webhooks"}},[s("a",{staticClass:"header-anchor",attrs:{href:"#validate-and-process-webhooks"}},[t._v("#")]),t._v(" Validate and process webhooks")]),t._v(" "),s("p",[t._v("The webhook payloads of BTCPay Server are signed, and therefore you can trust its content - but only after proper request validation. The validation of the provided "),s("code",[t._v("BTCPay-Sig")]),t._v(" HTTP-header and payload, is done by the library.")]),t._v(" "),s("p",[t._v("On webhook registration step (see above), you provided an "),s("code",[t._v("url")]),t._v(" that points to an endpoint route on your PHP site. e.g. "),s("code",[t._v("https://example.com/webhook")]),t._v(". The "),s("code",[t._v("secret")]),t._v(" which is used to sign the request was returned in our example above.")]),t._v(" "),s("p",[t._v("On your eCommerce site you can now validate and process the payload of your BTCPay Server webhook like this:")]),t._v(" "),s("div",{staticClass:"language-PHP extra-class"},[s("pre",{pre:!0,attrs:{class:"language-php"}},[s("code",[s("span",{pre:!0,attrs:{class:"token keyword"}},[t._v("require")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token constant"}},[t._v("__DIR__")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token operator"}},[t._v(".")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token string single-quoted-string"}},[t._v("'./vendor/autoload.php'")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(";")]),t._v("\n\n"),s("span",{pre:!0,attrs:{class:"token variable"}},[t._v("$host")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token operator"}},[t._v("=")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token string single-quoted-string"}},[t._v("'https://mainnet.demo.btcpayserver.org'")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(";")]),t._v("\n"),s("span",{pre:!0,attrs:{class:"token variable"}},[t._v("$apiKey")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token operator"}},[t._v("=")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token string single-quoted-string"}},[t._v("'API_KEY'")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(";")]),t._v("\n"),s("span",{pre:!0,attrs:{class:"token variable"}},[t._v("$storeId")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token operator"}},[t._v("=")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token string single-quoted-string"}},[t._v("'STORE_ID'")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(";")]),t._v("\n"),s("span",{pre:!0,attrs:{class:"token variable"}},[t._v("$webhookSecret")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token operator"}},[t._v("=")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token string single-quoted-string"}},[t._v("'WEBHOOK_SECRET'")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(";")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token comment"}},[t._v("// From previous step")]),t._v("\n\n"),s("span",{pre:!0,attrs:{class:"token comment"}},[t._v("// Get the data sent by BTCPay Server.")]),t._v("\n"),s("span",{pre:!0,attrs:{class:"token variable"}},[t._v("$raw_post_data")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token operator"}},[t._v("=")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token function"}},[t._v("file_get_contents")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("(")]),s("span",{pre:!0,attrs:{class:"token string single-quoted-string"}},[t._v("'php://input'")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(")")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(";")]),t._v("\n"),s("span",{pre:!0,attrs:{class:"token variable"}},[t._v("$payload")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token operator"}},[t._v("=")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token function"}},[t._v("json_decode")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("(")]),s("span",{pre:!0,attrs:{class:"token variable"}},[t._v("$raw_post_data")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token constant boolean"}},[t._v("false")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token number"}},[t._v("512")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token constant"}},[t._v("JSON_THROW_ON_ERROR")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(")")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(";")]),t._v("\n\n"),s("span",{pre:!0,attrs:{class:"token comment"}},[t._v("// Get the BTCPay signature header.")]),t._v("\n"),s("span",{pre:!0,attrs:{class:"token comment"}},[t._v("// This is needed as some webservers camel-case the headers, some not.")]),t._v("\n"),s("span",{pre:!0,attrs:{class:"token variable"}},[t._v("$headers")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token operator"}},[t._v("=")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token function"}},[t._v("getallheaders")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("(")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(")")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(";")]),t._v("\n"),s("span",{pre:!0,attrs:{class:"token keyword"}},[t._v("foreach")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("(")]),s("span",{pre:!0,attrs:{class:"token variable"}},[t._v("$headers")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token keyword"}},[t._v("as")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token variable"}},[t._v("$key")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token operator"}},[t._v("=>")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token variable"}},[t._v("$value")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(")")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("{")]),t._v("\n "),s("span",{pre:!0,attrs:{class:"token keyword"}},[t._v("if")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("(")]),s("span",{pre:!0,attrs:{class:"token function"}},[t._v("strtolower")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("(")]),s("span",{pre:!0,attrs:{class:"token variable"}},[t._v("$key")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(")")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token operator"}},[t._v("===")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token string single-quoted-string"}},[t._v("'btcpay-sig'")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(")")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("{")]),t._v("\n "),s("span",{pre:!0,attrs:{class:"token variable"}},[t._v("$sig")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token operator"}},[t._v("=")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token variable"}},[t._v("$value")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(";")]),t._v("\n "),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("}")]),t._v("\n"),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("}")]),t._v("\n\n"),s("span",{pre:!0,attrs:{class:"token variable"}},[t._v("$webhookClient")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token operator"}},[t._v("=")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token keyword"}},[t._v("new")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token class-name class-name-fully-qualified"}},[s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("\\")]),t._v("BTCPayServer"),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("\\")]),t._v("Client"),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("\\")]),t._v("Webhook")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("(")]),s("span",{pre:!0,attrs:{class:"token variable"}},[t._v("$host")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token variable"}},[t._v("$apiKey")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(")")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(";")]),t._v("\n\n"),s("span",{pre:!0,attrs:{class:"token comment"}},[t._v("// Validate the webhook request.")]),t._v("\n"),s("span",{pre:!0,attrs:{class:"token keyword"}},[t._v("if")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("(")]),s("span",{pre:!0,attrs:{class:"token operator"}},[t._v("!")]),s("span",{pre:!0,attrs:{class:"token variable"}},[t._v("$webhookClient")]),s("span",{pre:!0,attrs:{class:"token operator"}},[t._v("->")]),s("span",{pre:!0,attrs:{class:"token function"}},[t._v("isIncomingWebhookRequestValid")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("(")]),s("span",{pre:!0,attrs:{class:"token variable"}},[t._v("$raw_post_data")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token variable"}},[t._v("$sig")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token variable"}},[t._v("$secret")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(")")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(")")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("{")]),t._v("\n "),s("span",{pre:!0,attrs:{class:"token keyword"}},[t._v("throw")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token keyword"}},[t._v("new")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token class-name class-name-fully-qualified"}},[s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("\\")]),t._v("RuntimeException")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("(")]),t._v("\n "),s("span",{pre:!0,attrs:{class:"token string single-quoted-string"}},[t._v("'Invalid BTCPay Server payment webhook message received - signature did not match.'")]),t._v("\n "),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(")")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(";")]),t._v("\n"),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("}")]),t._v("\n\n"),s("span",{pre:!0,attrs:{class:"token keyword"}},[t._v("echo")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token string single-quoted-string"}},[t._v("'Validation OK'")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(";")]),t._v("\n\n"),s("span",{pre:!0,attrs:{class:"token comment"}},[t._v("// Your own processing code goes here. E.g. update your internal order id depending on the invoice payment status.")]),t._v("\n\n")])])]),s("h3",{attrs:{id:"issue-a-full-refund-of-an-invoice"}},[s("a",{staticClass:"header-anchor",attrs:{href:"#issue-a-full-refund-of-an-invoice"}},[t._v("#")]),t._v(" Issue a full refund of an invoice")]),t._v(" "),s("p",[t._v("Using the "),s("a",{attrs:{href:"https://docs.btcpayserver.org/API/Greenfield/v1/#operation/Invoices_Refund",target:"_blank",rel:"noopener noreferrer"}},[t._v("invoice refund endpoint"),s("OutboundLink")],1),t._v(" you can issue a full (or even partial) refund of an invoice. This will return a link where the customer can claim the refund.")]),t._v(" "),s("div",{staticClass:"language-PHP extra-class"},[s("pre",{pre:!0,attrs:{class:"language-php"}},[s("code",[s("span",{pre:!0,attrs:{class:"token keyword"}},[t._v("require")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token constant"}},[t._v("__DIR__")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token operator"}},[t._v(".")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token string single-quoted-string"}},[t._v("'./vendor/autoload.php'")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(";")]),t._v("\n\n"),s("span",{pre:!0,attrs:{class:"token variable"}},[t._v("$host")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token operator"}},[t._v("=")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token string single-quoted-string"}},[t._v("'https://mainnet.demo.btcpayserver.org'")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(";")]),t._v("\n"),s("span",{pre:!0,attrs:{class:"token variable"}},[t._v("$apiKey")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token operator"}},[t._v("=")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token string single-quoted-string"}},[t._v("'API_KEY'")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(";")]),t._v("\n"),s("span",{pre:!0,attrs:{class:"token variable"}},[t._v("$storeId")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token operator"}},[t._v("=")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token string single-quoted-string"}},[t._v("'STORE_ID'")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(";")]),t._v("\n"),s("span",{pre:!0,attrs:{class:"token variable"}},[t._v("$invoiceId")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token operator"}},[t._v("=")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token string single-quoted-string"}},[t._v("'EXISTING_INVOICE_ID'")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(";")]),t._v("\n\n"),s("span",{pre:!0,attrs:{class:"token keyword"}},[t._v("try")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("{")]),t._v("\n "),s("span",{pre:!0,attrs:{class:"token variable"}},[t._v("$client")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token operator"}},[t._v("=")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token keyword"}},[t._v("new")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token class-name class-name-fully-qualified"}},[s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("\\")]),t._v("BTCPayServer"),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("\\")]),t._v("Client"),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("\\")]),t._v("Invoice")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("(")]),s("span",{pre:!0,attrs:{class:"token variable"}},[t._v("$host")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token variable"}},[t._v("$apiKey")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(")")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(";")]),t._v("\n\n "),s("span",{pre:!0,attrs:{class:"token variable"}},[t._v("$refund")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token operator"}},[t._v("=")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token variable"}},[t._v("$client")]),s("span",{pre:!0,attrs:{class:"token operator"}},[t._v("->")]),s("span",{pre:!0,attrs:{class:"token function"}},[t._v("refundInvoice")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("(")]),t._v("\n "),s("span",{pre:!0,attrs:{class:"token variable"}},[t._v("$storeId")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v("\n "),s("span",{pre:!0,attrs:{class:"token variable"}},[t._v("$invoiceId")]),t._v("\n "),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(")")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(";")]),t._v("\n\n "),s("span",{pre:!0,attrs:{class:"token keyword"}},[t._v("echo")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token variable"}},[t._v("$refund")]),s("span",{pre:!0,attrs:{class:"token operator"}},[t._v("->")]),s("span",{pre:!0,attrs:{class:"token function"}},[t._v("getViewLink")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("(")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(")")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(";")]),t._v("\n"),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("}")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token keyword"}},[t._v("catch")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("(")]),s("span",{pre:!0,attrs:{class:"token class-name class-name-fully-qualified"}},[s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("\\")]),t._v("Throwable")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token variable"}},[t._v("$e")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(")")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("{")]),t._v("\n "),s("span",{pre:!0,attrs:{class:"token keyword"}},[t._v("echo")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token string double-quoted-string"}},[t._v('"Error: "')]),t._v(" "),s("span",{pre:!0,attrs:{class:"token operator"}},[t._v(".")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token variable"}},[t._v("$e")]),s("span",{pre:!0,attrs:{class:"token operator"}},[t._v("->")]),s("span",{pre:!0,attrs:{class:"token function"}},[t._v("getMessage")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("(")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(")")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(";")]),t._v("\n"),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("}")]),t._v("\n")])])]),s("h2",{attrs:{id:"btcpay-server-management-examples"}},[s("a",{staticClass:"header-anchor",attrs:{href:"#btcpay-server-management-examples"}},[t._v("#")]),t._v(" BTCPay Server management examples")]),t._v(" "),s("p",[t._v("Here we assume you are an ambassador and host BTCPay Server for your users. You manage your users on your own system and want to create a user and set email and password for their BTCPay Server login. Then using the same credentials to create a store and an API key on behalf of that user.")]),t._v(" "),s("h3",{attrs:{id:"create-a-new-user"}},[s("a",{staticClass:"header-anchor",attrs:{href:"#create-a-new-user"}},[t._v("#")]),t._v(" Create a new user")]),t._v(" "),s("p",[t._v("Creating a new user can be done by using "),s("a",{attrs:{href:"https://docs.btcpayserver.org/API/Greenfield/v1/#operation/Users_CreateUser",target:"_blank",rel:"noopener noreferrer"}},[t._v("this endpoint"),s("OutboundLink")],1),t._v(".")]),t._v(" "),s("div",{staticClass:"language-PHP extra-class"},[s("pre",{pre:!0,attrs:{class:"language-php"}},[s("code",[s("span",{pre:!0,attrs:{class:"token keyword"}},[t._v("require")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token constant"}},[t._v("__DIR__")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token operator"}},[t._v(".")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token string single-quoted-string"}},[t._v("'./vendor/autoload.php'")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(";")]),t._v("\n\n"),s("span",{pre:!0,attrs:{class:"token variable"}},[t._v("$host")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token operator"}},[t._v("=")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token string single-quoted-string"}},[t._v("'https://mainnet.demo.btcpayserver.org'")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(";")]),t._v("\n"),s("span",{pre:!0,attrs:{class:"token variable"}},[t._v("$adminApiKey")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token operator"}},[t._v("=")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token string single-quoted-string"}},[t._v("'ADMIN_API_KEY'")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(";")]),t._v("\n"),s("span",{pre:!0,attrs:{class:"token variable"}},[t._v("$email")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token operator"}},[t._v("=")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token string single-quoted-string"}},[t._v("'satoshi.nakamoto@example.com'")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(";")]),t._v("\n"),s("span",{pre:!0,attrs:{class:"token variable"}},[t._v("$password")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token operator"}},[t._v("=")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token string single-quoted-string"}},[t._v("'SuperSecurePasswordsShouldBeQuiteLong123'")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(";")]),t._v("\n"),s("span",{pre:!0,attrs:{class:"token variable"}},[t._v("$isAdministrator")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token operator"}},[t._v("=")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token constant boolean"}},[t._v("false")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(";")]),t._v("\n\n"),s("span",{pre:!0,attrs:{class:"token keyword"}},[t._v("try")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("{")]),t._v("\n "),s("span",{pre:!0,attrs:{class:"token variable"}},[t._v("$client")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token operator"}},[t._v("=")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token keyword"}},[t._v("new")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token class-name class-name-fully-qualified"}},[s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("\\")]),t._v("BTCPayServer"),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("\\")]),t._v("Client"),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("\\")]),t._v("User")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("(")]),s("span",{pre:!0,attrs:{class:"token variable"}},[t._v("$host")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token variable"}},[t._v("$adminApiKey")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(")")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(";")]),t._v("\n "),s("span",{pre:!0,attrs:{class:"token function"}},[t._v("var_dump")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("(")]),t._v("\n "),s("span",{pre:!0,attrs:{class:"token variable"}},[t._v("$client")]),s("span",{pre:!0,attrs:{class:"token operator"}},[t._v("->")]),s("span",{pre:!0,attrs:{class:"token function"}},[t._v("createUser")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("(")]),s("span",{pre:!0,attrs:{class:"token variable"}},[t._v("$email")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token variable"}},[t._v("$password")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token variable"}},[t._v("$isAdministrator")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(")")]),t._v("\n "),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(")")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(";")]),t._v("\n"),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("}")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token keyword"}},[t._v("catch")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("(")]),s("span",{pre:!0,attrs:{class:"token class-name class-name-fully-qualified"}},[s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("\\")]),t._v("Throwable")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token variable"}},[t._v("$e")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(")")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("{")]),t._v("\n "),s("span",{pre:!0,attrs:{class:"token keyword"}},[t._v("echo")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token string double-quoted-string"}},[t._v('"Error: "')]),t._v(" "),s("span",{pre:!0,attrs:{class:"token operator"}},[t._v(".")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token variable"}},[t._v("$e")]),s("span",{pre:!0,attrs:{class:"token operator"}},[t._v("->")]),s("span",{pre:!0,attrs:{class:"token function"}},[t._v("getMessage")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("(")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(")")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(";")]),t._v("\n"),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("}")]),t._v("\n")])])]),s("h3",{attrs:{id:"create-a-new-api-key-for-the-user"}},[s("a",{staticClass:"header-anchor",attrs:{href:"#create-a-new-api-key-for-the-user"}},[t._v("#")]),t._v(" Create a new API key (for the user)")]),t._v(" "),s("p",[t._v("While we can use basic authentication to access the greenfield API, it is recommended to use API Keys to limit the scope of the credentials.")]),t._v(" "),s("p",[t._v("For example: If we want to "),s("a",{attrs:{href:"https://docs.btcpayserver.org/API/Greenfield/v1/#operation/Stores_CreateStore",target:"_blank",rel:"noopener noreferrer"}},[t._v("create a new store"),s("OutboundLink")],1),t._v(" we need the "),s("code",[t._v("btcpay.store.canmodifystoresettings")]),t._v(" permission for the API key. Warning: If you do not pass any permission then the API key will have unrestricted access.")]),t._v(" "),s("p",[t._v("As mentioned above, you can do this through the BTCPay Server UI of your instance, but let's do it through the API using "),s("a",{attrs:{href:"https://docs.btcpayserver.org/API/Greenfield/v1/#operation/ApiKeys_CreateUserApiKey",target:"_blank",rel:"noopener noreferrer"}},[t._v("this endpoint"),s("OutboundLink")],1),t._v(" where we with our admin API key create an API key for our new user.")]),t._v(" "),s("div",{staticClass:"language-PHP extra-class"},[s("pre",{pre:!0,attrs:{class:"language-php"}},[s("code",[s("span",{pre:!0,attrs:{class:"token keyword"}},[t._v("require")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token constant"}},[t._v("__DIR__")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token operator"}},[t._v(".")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token string single-quoted-string"}},[t._v("'./vendor/autoload.php'")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(";")]),t._v("\n\n"),s("span",{pre:!0,attrs:{class:"token variable"}},[t._v("$host")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token operator"}},[t._v("=")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token string single-quoted-string"}},[t._v("'https://mainnet.demo.btcpayserver.org'")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(";")]),t._v("\n"),s("span",{pre:!0,attrs:{class:"token variable"}},[t._v("$userEmail")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token operator"}},[t._v("=")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token string single-quoted-string"}},[t._v("'satoshi.nakamoto@example.com'")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(";")]),t._v("\n"),s("span",{pre:!0,attrs:{class:"token variable"}},[t._v("$adminApiKey")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token operator"}},[t._v("=")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token string single-quoted-string"}},[t._v("'ADMIN_API_KEY'")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(";")]),t._v("\n\n"),s("span",{pre:!0,attrs:{class:"token keyword"}},[t._v("try")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("{")]),t._v("\n "),s("span",{pre:!0,attrs:{class:"token variable"}},[t._v("$client")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token operator"}},[t._v("=")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token keyword"}},[t._v("new")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token class-name class-name-fully-qualified"}},[s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("\\")]),t._v("BTCPayServer"),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("\\")]),t._v("Client"),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("\\")]),t._v("ApiKey")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("(")]),s("span",{pre:!0,attrs:{class:"token variable"}},[t._v("$host")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token variable"}},[t._v("$adminApiKey")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(")")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(";")]),t._v("\n "),s("span",{pre:!0,attrs:{class:"token variable"}},[t._v("$generatedApiKey")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token operator"}},[t._v("=")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token variable"}},[t._v("$client")]),s("span",{pre:!0,attrs:{class:"token operator"}},[t._v("->")]),s("span",{pre:!0,attrs:{class:"token function"}},[t._v("createApiKeyForUser")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("(")]),s("span",{pre:!0,attrs:{class:"token variable"}},[t._v("$userEmail")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token string single-quoted-string"}},[t._v("'api generated'")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("[")]),s("span",{pre:!0,attrs:{class:"token string single-quoted-string"}},[t._v("'btcpay.store.canmodifystoresettings'")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("]")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(")")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(";")]),t._v("\n"),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("}")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token keyword"}},[t._v("catch")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("(")]),s("span",{pre:!0,attrs:{class:"token class-name class-name-fully-qualified"}},[s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("\\")]),t._v("Throwable")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token variable"}},[t._v("$e")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(")")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("{")]),t._v("\n "),s("span",{pre:!0,attrs:{class:"token keyword"}},[t._v("echo")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token string double-quoted-string"}},[t._v('"Error: "')]),t._v(" "),s("span",{pre:!0,attrs:{class:"token operator"}},[t._v(".")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token variable"}},[t._v("$e")]),s("span",{pre:!0,attrs:{class:"token operator"}},[t._v("->")]),s("span",{pre:!0,attrs:{class:"token function"}},[t._v("getMessage")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("(")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(")")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(";")]),t._v("\n"),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("}")]),t._v("\n\n"),s("span",{pre:!0,attrs:{class:"token keyword"}},[t._v("echo")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token variable"}},[t._v("$generatedApiKey")]),s("span",{pre:!0,attrs:{class:"token operator"}},[t._v("->")]),s("span",{pre:!0,attrs:{class:"token function"}},[t._v("getData")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("(")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(")")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("[")]),s("span",{pre:!0,attrs:{class:"token string single-quoted-string"}},[t._v("'apiKey'")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("]")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(";")]),t._v("\n")])])]),s("h3",{attrs:{id:"create-a-new-store"}},[s("a",{staticClass:"header-anchor",attrs:{href:"#create-a-new-store"}},[t._v("#")]),t._v(" Create a new store")]),t._v(" "),s("p",[t._v("Now, we can use the users API key to "),s("a",{attrs:{href:"https://docs.btcpayserver.org/API/Greenfield/v1/#operation/Stores_CreateStore",target:"_blank",rel:"noopener noreferrer"}},[t._v("create a new store"),s("OutboundLink")],1),t._v(".")]),t._v(" "),s("div",{staticClass:"language-PHP extra-class"},[s("pre",{pre:!0,attrs:{class:"language-php"}},[s("code",[s("span",{pre:!0,attrs:{class:"token keyword"}},[t._v("require")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token constant"}},[t._v("__DIR__")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token operator"}},[t._v(".")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token string single-quoted-string"}},[t._v("'./vendor/autoload.php'")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(";")]),t._v("\n\n"),s("span",{pre:!0,attrs:{class:"token variable"}},[t._v("$host")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token operator"}},[t._v("=")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token string single-quoted-string"}},[t._v("'https://mainnet.demo.btcpayserver.org'")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(";")]),t._v("\n"),s("span",{pre:!0,attrs:{class:"token variable"}},[t._v("$userApiKey")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token operator"}},[t._v("=")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token string single-quoted-string"}},[t._v("'USER_API_KEY'")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(";")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token comment"}},[t._v("// From previous step")]),t._v("\n\n"),s("span",{pre:!0,attrs:{class:"token keyword"}},[t._v("try")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("{")]),t._v("\n "),s("span",{pre:!0,attrs:{class:"token variable"}},[t._v("$client")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token operator"}},[t._v("=")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token keyword"}},[t._v("new")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token class-name class-name-fully-qualified"}},[s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("\\")]),t._v("BTCPayServer"),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("\\")]),t._v("Client"),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("\\")]),t._v("Store")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("(")]),s("span",{pre:!0,attrs:{class:"token variable"}},[t._v("$host")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token variable"}},[t._v("$userApiKey")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(")")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(";")]),t._v("\n "),s("span",{pre:!0,attrs:{class:"token function"}},[t._v("var_dump")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("(")]),s("span",{pre:!0,attrs:{class:"token variable"}},[t._v("$client")]),s("span",{pre:!0,attrs:{class:"token operator"}},[t._v("->")]),s("span",{pre:!0,attrs:{class:"token function"}},[t._v("createStore")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("(")]),s("span",{pre:!0,attrs:{class:"token string single-quoted-string"}},[t._v("'my new store'")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(")")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(")")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(";")]),t._v("\n"),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("}")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token keyword"}},[t._v("catch")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("(")]),s("span",{pre:!0,attrs:{class:"token class-name class-name-fully-qualified"}},[s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("\\")]),t._v("Throwable")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token variable"}},[t._v("$e")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(")")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("{")]),t._v("\n "),s("span",{pre:!0,attrs:{class:"token keyword"}},[t._v("echo")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token string double-quoted-string"}},[t._v('"Error: "')]),t._v(" "),s("span",{pre:!0,attrs:{class:"token operator"}},[t._v(".")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token variable"}},[t._v("$e")]),s("span",{pre:!0,attrs:{class:"token operator"}},[t._v("->")]),s("span",{pre:!0,attrs:{class:"token function"}},[t._v("getMessage")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("(")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(")")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(";")]),t._v("\n"),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("}")]),t._v("\n")])])]),s("h3",{attrs:{id:"read-store-information"}},[s("a",{staticClass:"header-anchor",attrs:{href:"#read-store-information"}},[t._v("#")]),t._v(" Read store information")]),t._v(" "),s("p",[t._v("We can use the new apikey to "),s("a",{attrs:{href:"https://docs.btcpayserver.org/API/Greenfield/v1/#operation/Stores_GetStore",target:"_blank",rel:"noopener noreferrer"}},[t._v("read store"),s("OutboundLink")],1),t._v(" information:")]),t._v(" "),s("div",{staticClass:"language-PHP extra-class"},[s("pre",{pre:!0,attrs:{class:"language-php"}},[s("code",[s("span",{pre:!0,attrs:{class:"token keyword"}},[t._v("require")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token constant"}},[t._v("__DIR__")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token operator"}},[t._v(".")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token string single-quoted-string"}},[t._v("'./vendor/autoload.php'")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(";")]),t._v("\n\n"),s("span",{pre:!0,attrs:{class:"token variable"}},[t._v("$host")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token operator"}},[t._v("=")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token string single-quoted-string"}},[t._v("'https://mainnet.demo.btcpayserver.org'")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(";")]),t._v("\n"),s("span",{pre:!0,attrs:{class:"token variable"}},[t._v("$userApiKey")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token operator"}},[t._v("=")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token string single-quoted-string"}},[t._v("'USER_API_KEY'")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(";")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token comment"}},[t._v("// From previous step")]),t._v("\n"),s("span",{pre:!0,attrs:{class:"token variable"}},[t._v("$storeId")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token operator"}},[t._v("=")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token string single-quoted-string"}},[t._v("'STORE_ID'")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(";")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token comment"}},[t._v("// From previous step")]),t._v("\n\n"),s("span",{pre:!0,attrs:{class:"token keyword"}},[t._v("try")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("{")]),t._v("\n "),s("span",{pre:!0,attrs:{class:"token variable"}},[t._v("$client")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token operator"}},[t._v("=")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token keyword"}},[t._v("new")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token class-name class-name-fully-qualified"}},[s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("\\")]),t._v("BTCPayServer"),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("\\")]),t._v("Client"),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("\\")]),t._v("Store")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("(")]),s("span",{pre:!0,attrs:{class:"token variable"}},[t._v("$host")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token variable"}},[t._v("$userApiKey")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(")")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(";")]),t._v("\n "),s("span",{pre:!0,attrs:{class:"token function"}},[t._v("var_dump")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("(")]),s("span",{pre:!0,attrs:{class:"token variable"}},[t._v("$client")]),s("span",{pre:!0,attrs:{class:"token operator"}},[t._v("->")]),s("span",{pre:!0,attrs:{class:"token function"}},[t._v("getStore")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("(")]),s("span",{pre:!0,attrs:{class:"token variable"}},[t._v("$storeId")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(")")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(")")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(";")]),t._v("\n"),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("}")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token keyword"}},[t._v("catch")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("(")]),s("span",{pre:!0,attrs:{class:"token class-name class-name-fully-qualified"}},[s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("\\")]),t._v("Throwable")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token variable"}},[t._v("$e")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(")")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("{")]),t._v("\n "),s("span",{pre:!0,attrs:{class:"token keyword"}},[t._v("echo")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token string double-quoted-string"}},[t._v('"Error: "')]),t._v(" "),s("span",{pre:!0,attrs:{class:"token operator"}},[t._v(".")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token variable"}},[t._v("$e")]),s("span",{pre:!0,attrs:{class:"token operator"}},[t._v("->")]),s("span",{pre:!0,attrs:{class:"token function"}},[t._v("getMessage")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("(")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(")")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(";")]),t._v("\n"),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("}")]),t._v("\n")])])]),s("p",[t._v("Looking for more examples, you can find them "),s("a",{attrs:{href:"https://github.com/btcpayserver/btcpayserver-greenfield-php/tree/master/examples",target:"_blank",rel:"noopener noreferrer"}},[t._v("here"),s("OutboundLink")],1),t._v(".")])])}),[],!1,null,null,null);s.default=n.exports}}]); \ No newline at end of file +(window.webpackJsonp=window.webpackJsonp||[]).push([[125],{773:function(t,s,a){"use strict";a.r(s);var e=a(10),n=Object(e.a)({},(function(){var t=this,s=t._self._c;return s("ContentSlotsDistributor",{attrs:{"slot-key":t.$parent.slotKey}},[s("h1",{attrs:{id:"greenfield-api-examples-with-php"}},[s("a",{staticClass:"header-anchor",attrs:{href:"#greenfield-api-examples-with-php"}},[t._v("#")]),t._v(" Greenfield API examples with PHP")]),t._v(" "),s("p",[t._v("The "),s("strong",[s("a",{attrs:{href:"https://docs.btcpayserver.org/API/Greenfield/v1/",target:"_blank",rel:"noopener noreferrer"}},[t._v("Greenfield API"),s("OutboundLink")],1)]),t._v(" (also available on your instance on "),s("code",[t._v("/docs")]),t._v(") allows you to operate BTCPay Server via an easy-to-use REST API.")]),t._v(" "),s("p",[t._v("Note that you can partially generate clients in the language of your choice by using the "),s("a",{attrs:{href:"https://docs.btcpayserver.org/API/Greenfield/v1/swagger.json",target:"_blank",rel:"noopener noreferrer"}},[t._v("Swagger file"),s("OutboundLink")],1),t._v(".")]),t._v(" "),s("p",[t._v("For PHP we have a client library available which can be found "),s("a",{attrs:{href:"https://github.com/btcpayserver/btcpayserver-greenfield-php",target:"_blank",rel:"noopener noreferrer"}},[t._v("here"),s("OutboundLink")],1),t._v(" and is also available for installation via Composer "),s("code",[t._v("composer require btcpayserver/btcpayserver-greenfield-php")])]),t._v(" "),s("p",[t._v("In this guide, we will give some examples how to use the Greenfield API with our PHP library for eCommerce and BTCPay management. Additional examples can be found "),s("a",{attrs:{href:"https://github.com/btcpayserver/btcpayserver-greenfield-php/tree/master/examples",target:"_blank",rel:"noopener noreferrer"}},[t._v("here"),s("OutboundLink")],1),t._v(".")]),t._v(" "),s("h2",{attrs:{id:"prerequisites"}},[s("a",{staticClass:"header-anchor",attrs:{href:"#prerequisites"}},[t._v("#")]),t._v(" Prerequisites")]),t._v(" "),s("p",[t._v("Unless for a few endpoints like creating a store and API key on behalf of a specific user, Basic Auth should be avoided and an API key should be used instead. Make sure that API keys only have the needed permissions and not more. E.g. if you only create invoices you should not give the API key the permission to manage your stores.")]),t._v(" "),s("p",[t._v("You can create a new API key in the BTCPay Server UI under "),s("code",[t._v("Account")]),t._v(" -> "),s("code",[t._v("Manage account")]),t._v(" -> "),s("code",[t._v("API keys")])]),t._v(" "),s("p",[t._v("For the ecommerce examples below the API key needs the following permissions:")]),t._v(" "),s("ul",[s("li",[t._v("View invoices")]),t._v(" "),s("li",[t._v("Create invoice")]),t._v(" "),s("li",[t._v("Modify invoices")]),t._v(" "),s("li",[t._v("Modify stores webhooks")]),t._v(" "),s("li",[t._v("View your stores")]),t._v(" "),s("li",[t._v("Create non-approved pull payments")])]),t._v(" "),s("p",[t._v("For an overview of available permissions see the "),s("a",{attrs:{href:"https://docs.btcpayserver.org/API/Greenfield/v1/#section/Authentication/API_Key",target:"_blank",rel:"noopener noreferrer"}},[t._v("API documentation"),s("OutboundLink")],1),t._v(" or the permissions documented on each endpoint.")]),t._v(" "),s("h2",{attrs:{id:"ecommerce-examples"}},[s("a",{staticClass:"header-anchor",attrs:{href:"#ecommerce-examples"}},[t._v("#")]),t._v(" eCommerce examples")]),t._v(" "),s("p",[t._v("The following examples will show you how to create a basic eCommerce flow using the Greenfield API by creating an invoice, registering a webhook, processing webhooks, and issuing a full refund of an invoice.")]),t._v(" "),s("h3",{attrs:{id:"create-an-invoice"}},[s("a",{staticClass:"header-anchor",attrs:{href:"#create-an-invoice"}},[t._v("#")]),t._v(" Create an invoice")]),t._v(" "),s("p",[t._v("We create an invoice using the "),s("a",{attrs:{href:"https://docs.btcpayserver.org/API/Greenfield/v1/#operation/Invoices_CreateInvoice",target:"_blank",rel:"noopener noreferrer"}},[t._v("create invoice endpoint"),s("OutboundLink")],1),t._v(". This is a simple example but you can set a lot more data like order id, buyer email or custom metadata. That said, don't store redundant data on the invoice to prevent data leaks in case of a hack. E.g. in most cases it makes no sense to store the customer address on your eCommerce system and also on the BTCPay invoice.")]),t._v(" "),s("div",{staticClass:"language-PHP extra-class"},[s("pre",{pre:!0,attrs:{class:"language-php"}},[s("code",[s("span",{pre:!0,attrs:{class:"token keyword"}},[t._v("require")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token constant"}},[t._v("__DIR__")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token operator"}},[t._v(".")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token string single-quoted-string"}},[t._v("'./vendor/autoload.php'")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(";")]),t._v("\n\n"),s("span",{pre:!0,attrs:{class:"token variable"}},[t._v("$host")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token operator"}},[t._v("=")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token string single-quoted-string"}},[t._v("'https://mainnet.demo.btcpayserver.org'")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(";")]),t._v("\n"),s("span",{pre:!0,attrs:{class:"token variable"}},[t._v("$apiKey")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token operator"}},[t._v("=")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token string single-quoted-string"}},[t._v("'API_KEY'")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(";")]),t._v("\n"),s("span",{pre:!0,attrs:{class:"token variable"}},[t._v("$storeId")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token operator"}},[t._v("=")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token string single-quoted-string"}},[t._v("'STORE_ID'")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(";")]),t._v("\n"),s("span",{pre:!0,attrs:{class:"token variable"}},[t._v("$amount")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token operator"}},[t._v("=")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token number"}},[t._v("10")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(";")]),t._v("\n"),s("span",{pre:!0,attrs:{class:"token variable"}},[t._v("$currency")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token operator"}},[t._v("=")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token string single-quoted-string"}},[t._v("'USD'")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(";")]),t._v("\n"),s("span",{pre:!0,attrs:{class:"token variable"}},[t._v("$orderId")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token operator"}},[t._v("=")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token string single-quoted-string"}},[t._v("'SN21420'")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(";")]),t._v("\n\n"),s("span",{pre:!0,attrs:{class:"token keyword"}},[t._v("try")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("{")]),t._v("\n "),s("span",{pre:!0,attrs:{class:"token variable"}},[t._v("$client")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token operator"}},[t._v("=")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token keyword"}},[t._v("new")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token class-name class-name-fully-qualified"}},[s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("\\")]),t._v("BTCPayServer"),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("\\")]),t._v("Client"),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("\\")]),t._v("Invoice")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("(")]),s("span",{pre:!0,attrs:{class:"token variable"}},[t._v("$host")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token variable"}},[t._v("$apiKey")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(")")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(";")]),t._v("\n "),s("span",{pre:!0,attrs:{class:"token function"}},[t._v("var_dump")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("(")]),t._v("\n "),s("span",{pre:!0,attrs:{class:"token variable"}},[t._v("$client")]),s("span",{pre:!0,attrs:{class:"token operator"}},[t._v("->")]),s("span",{pre:!0,attrs:{class:"token function"}},[t._v("createInvoice")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("(")]),t._v("\n "),s("span",{pre:!0,attrs:{class:"token variable"}},[t._v("$storeId")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v("\n "),s("span",{pre:!0,attrs:{class:"token variable"}},[t._v("$currency")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v("\n "),s("span",{pre:!0,attrs:{class:"token class-name class-name-fully-qualified static-context"}},[s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("\\")]),t._v("BTCPayServer"),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("\\")]),t._v("Util"),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("\\")]),t._v("PreciseNumber")]),s("span",{pre:!0,attrs:{class:"token operator"}},[t._v("::")]),s("span",{pre:!0,attrs:{class:"token function"}},[t._v("parseString")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("(")]),s("span",{pre:!0,attrs:{class:"token variable"}},[t._v("$amount")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(")")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v("\n "),s("span",{pre:!0,attrs:{class:"token variable"}},[t._v("$orderId")]),t._v("\n "),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(")")]),t._v("\n "),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(")")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(";")]),t._v("\n"),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("}")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token keyword"}},[t._v("catch")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("(")]),s("span",{pre:!0,attrs:{class:"token class-name class-name-fully-qualified"}},[s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("\\")]),t._v("Throwable")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token variable"}},[t._v("$e")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(")")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("{")]),t._v("\n "),s("span",{pre:!0,attrs:{class:"token keyword"}},[t._v("echo")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token string double-quoted-string"}},[t._v('"Error: "')]),t._v(" "),s("span",{pre:!0,attrs:{class:"token operator"}},[t._v(".")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token variable"}},[t._v("$e")]),s("span",{pre:!0,attrs:{class:"token operator"}},[t._v("->")]),s("span",{pre:!0,attrs:{class:"token function"}},[t._v("getMessage")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("(")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(")")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(";")]),t._v("\n"),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("}")]),t._v("\n")])])]),s("h3",{attrs:{id:"register-a-webhook-optional"}},[s("a",{staticClass:"header-anchor",attrs:{href:"#register-a-webhook-optional"}},[t._v("#")]),t._v(" Register a webhook (optional)")]),t._v(" "),s("p",[t._v("Let's register a webhook to be notified when the invoice is paid. You can use the "),s("a",{attrs:{href:"https://docs.btcpayserver.org/API/Greenfield/v1/#operation/Webhooks_CreateWebhook",target:"_blank",rel:"noopener noreferrer"}},[t._v("create webhook endpoint"),s("OutboundLink")],1),t._v(" to register a webhook.")]),t._v(" "),s("div",{staticClass:"language-PHP extra-class"},[s("pre",{pre:!0,attrs:{class:"language-php"}},[s("code",[s("span",{pre:!0,attrs:{class:"token keyword"}},[t._v("require")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token constant"}},[t._v("__DIR__")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token operator"}},[t._v(".")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token string single-quoted-string"}},[t._v("'./vendor/autoload.php'")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(";")]),t._v("\n\n"),s("span",{pre:!0,attrs:{class:"token variable"}},[t._v("$host")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token operator"}},[t._v("=")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token string single-quoted-string"}},[t._v("'https://mainnet.demo.btcpayserver.org'")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(";")]),t._v("\n"),s("span",{pre:!0,attrs:{class:"token variable"}},[t._v("$apiKey")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token operator"}},[t._v("=")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token string single-quoted-string"}},[t._v("'API_KEY'")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(";")]),t._v("\n"),s("span",{pre:!0,attrs:{class:"token variable"}},[t._v("$storeId")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token operator"}},[t._v("=")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token string single-quoted-string"}},[t._v("'STORE_ID'")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(";")]),t._v("\n"),s("span",{pre:!0,attrs:{class:"token variable"}},[t._v("$url")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token operator"}},[t._v("=")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token string single-quoted-string"}},[t._v("'https://example.com/webhook'")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(";")]),t._v("\n"),s("span",{pre:!0,attrs:{class:"token variable"}},[t._v("$subscribedEvents")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token operator"}},[t._v("=")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token constant"}},[t._v("null")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(";")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token comment"}},[t._v("// Will subscribe to all events.")]),t._v("\n\n"),s("span",{pre:!0,attrs:{class:"token keyword"}},[t._v("try")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("{")]),t._v("\n "),s("span",{pre:!0,attrs:{class:"token variable"}},[t._v("$client")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token operator"}},[t._v("=")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token keyword"}},[t._v("new")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token class-name class-name-fully-qualified"}},[s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("\\")]),t._v("BTCPayServer"),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("\\")]),t._v("Client"),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("\\")]),t._v("Webhook")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("(")]),s("span",{pre:!0,attrs:{class:"token variable"}},[t._v("$host")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token variable"}},[t._v("$apiKey")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(")")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(";")]),t._v("\n "),s("span",{pre:!0,attrs:{class:"token function"}},[t._v("var_dump")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("(")]),t._v("\n "),s("span",{pre:!0,attrs:{class:"token variable"}},[t._v("$client")]),s("span",{pre:!0,attrs:{class:"token operator"}},[t._v("->")]),s("span",{pre:!0,attrs:{class:"token function"}},[t._v("createWebhook")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("(")]),s("span",{pre:!0,attrs:{class:"token variable"}},[t._v("$storeId")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token variable"}},[t._v("$url")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token variable"}},[t._v("$subscribedEvents")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token constant"}},[t._v("null")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(")")]),t._v("\n "),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(")")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(";")]),t._v("\n"),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("}")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token keyword"}},[t._v("catch")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("(")]),s("span",{pre:!0,attrs:{class:"token class-name class-name-fully-qualified"}},[s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("\\")]),t._v("Throwable")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token variable"}},[t._v("$e")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(")")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("{")]),t._v("\n "),s("span",{pre:!0,attrs:{class:"token keyword"}},[t._v("echo")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token string double-quoted-string"}},[t._v('"Error: "')]),t._v(" "),s("span",{pre:!0,attrs:{class:"token operator"}},[t._v(".")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token variable"}},[t._v("$e")]),s("span",{pre:!0,attrs:{class:"token operator"}},[t._v("->")]),s("span",{pre:!0,attrs:{class:"token function"}},[t._v("getMessage")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("(")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(")")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(";")]),t._v("\n"),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("}")]),t._v("\n")])])]),s("p",[t._v("This step is optional, you can also manually create a webhook in the BTCPay Server UI in your store "),s("code",[t._v("Settings")]),t._v(" -> "),s("code",[t._v("Webhooks")]),t._v(".")]),t._v(" "),s("h3",{attrs:{id:"validate-and-process-webhooks"}},[s("a",{staticClass:"header-anchor",attrs:{href:"#validate-and-process-webhooks"}},[t._v("#")]),t._v(" Validate and process webhooks")]),t._v(" "),s("p",[t._v("The webhook payloads of BTCPay Server are signed, and therefore you can trust its content - but only after proper request validation. The validation of the provided "),s("code",[t._v("BTCPay-Sig")]),t._v(" HTTP-header and payload, is done by the library.")]),t._v(" "),s("p",[t._v("On webhook registration step (see above), you provided an "),s("code",[t._v("url")]),t._v(" that points to an endpoint route on your PHP site. e.g. "),s("code",[t._v("https://example.com/webhook")]),t._v(". The "),s("code",[t._v("secret")]),t._v(" which is used to sign the request was returned in our example above.")]),t._v(" "),s("p",[t._v("On your eCommerce site you can now validate and process the payload of your BTCPay Server webhook like this:")]),t._v(" "),s("div",{staticClass:"language-PHP extra-class"},[s("pre",{pre:!0,attrs:{class:"language-php"}},[s("code",[s("span",{pre:!0,attrs:{class:"token keyword"}},[t._v("require")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token constant"}},[t._v("__DIR__")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token operator"}},[t._v(".")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token string single-quoted-string"}},[t._v("'./vendor/autoload.php'")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(";")]),t._v("\n\n"),s("span",{pre:!0,attrs:{class:"token variable"}},[t._v("$host")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token operator"}},[t._v("=")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token string single-quoted-string"}},[t._v("'https://mainnet.demo.btcpayserver.org'")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(";")]),t._v("\n"),s("span",{pre:!0,attrs:{class:"token variable"}},[t._v("$apiKey")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token operator"}},[t._v("=")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token string single-quoted-string"}},[t._v("'API_KEY'")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(";")]),t._v("\n"),s("span",{pre:!0,attrs:{class:"token variable"}},[t._v("$storeId")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token operator"}},[t._v("=")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token string single-quoted-string"}},[t._v("'STORE_ID'")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(";")]),t._v("\n"),s("span",{pre:!0,attrs:{class:"token variable"}},[t._v("$webhookSecret")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token operator"}},[t._v("=")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token string single-quoted-string"}},[t._v("'WEBHOOK_SECRET'")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(";")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token comment"}},[t._v("// From previous step")]),t._v("\n\n"),s("span",{pre:!0,attrs:{class:"token comment"}},[t._v("// Get the data sent by BTCPay Server.")]),t._v("\n"),s("span",{pre:!0,attrs:{class:"token variable"}},[t._v("$raw_post_data")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token operator"}},[t._v("=")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token function"}},[t._v("file_get_contents")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("(")]),s("span",{pre:!0,attrs:{class:"token string single-quoted-string"}},[t._v("'php://input'")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(")")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(";")]),t._v("\n"),s("span",{pre:!0,attrs:{class:"token variable"}},[t._v("$payload")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token operator"}},[t._v("=")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token function"}},[t._v("json_decode")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("(")]),s("span",{pre:!0,attrs:{class:"token variable"}},[t._v("$raw_post_data")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token constant boolean"}},[t._v("false")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token number"}},[t._v("512")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token constant"}},[t._v("JSON_THROW_ON_ERROR")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(")")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(";")]),t._v("\n\n"),s("span",{pre:!0,attrs:{class:"token comment"}},[t._v("// Get the BTCPay signature header.")]),t._v("\n"),s("span",{pre:!0,attrs:{class:"token comment"}},[t._v("// This is needed as some webservers camel-case the headers, some not.")]),t._v("\n"),s("span",{pre:!0,attrs:{class:"token variable"}},[t._v("$headers")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token operator"}},[t._v("=")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token function"}},[t._v("getallheaders")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("(")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(")")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(";")]),t._v("\n"),s("span",{pre:!0,attrs:{class:"token keyword"}},[t._v("foreach")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("(")]),s("span",{pre:!0,attrs:{class:"token variable"}},[t._v("$headers")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token keyword"}},[t._v("as")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token variable"}},[t._v("$key")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token operator"}},[t._v("=>")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token variable"}},[t._v("$value")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(")")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("{")]),t._v("\n "),s("span",{pre:!0,attrs:{class:"token keyword"}},[t._v("if")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("(")]),s("span",{pre:!0,attrs:{class:"token function"}},[t._v("strtolower")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("(")]),s("span",{pre:!0,attrs:{class:"token variable"}},[t._v("$key")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(")")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token operator"}},[t._v("===")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token string single-quoted-string"}},[t._v("'btcpay-sig'")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(")")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("{")]),t._v("\n "),s("span",{pre:!0,attrs:{class:"token variable"}},[t._v("$sig")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token operator"}},[t._v("=")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token variable"}},[t._v("$value")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(";")]),t._v("\n "),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("}")]),t._v("\n"),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("}")]),t._v("\n\n"),s("span",{pre:!0,attrs:{class:"token variable"}},[t._v("$webhookClient")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token operator"}},[t._v("=")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token keyword"}},[t._v("new")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token class-name class-name-fully-qualified"}},[s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("\\")]),t._v("BTCPayServer"),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("\\")]),t._v("Client"),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("\\")]),t._v("Webhook")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("(")]),s("span",{pre:!0,attrs:{class:"token variable"}},[t._v("$host")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token variable"}},[t._v("$apiKey")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(")")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(";")]),t._v("\n\n"),s("span",{pre:!0,attrs:{class:"token comment"}},[t._v("// Validate the webhook request.")]),t._v("\n"),s("span",{pre:!0,attrs:{class:"token keyword"}},[t._v("if")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("(")]),s("span",{pre:!0,attrs:{class:"token operator"}},[t._v("!")]),s("span",{pre:!0,attrs:{class:"token variable"}},[t._v("$webhookClient")]),s("span",{pre:!0,attrs:{class:"token operator"}},[t._v("->")]),s("span",{pre:!0,attrs:{class:"token function"}},[t._v("isIncomingWebhookRequestValid")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("(")]),s("span",{pre:!0,attrs:{class:"token variable"}},[t._v("$raw_post_data")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token variable"}},[t._v("$sig")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token variable"}},[t._v("$secret")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(")")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(")")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("{")]),t._v("\n "),s("span",{pre:!0,attrs:{class:"token keyword"}},[t._v("throw")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token keyword"}},[t._v("new")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token class-name class-name-fully-qualified"}},[s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("\\")]),t._v("RuntimeException")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("(")]),t._v("\n "),s("span",{pre:!0,attrs:{class:"token string single-quoted-string"}},[t._v("'Invalid BTCPay Server payment webhook message received - signature did not match.'")]),t._v("\n "),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(")")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(";")]),t._v("\n"),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("}")]),t._v("\n\n"),s("span",{pre:!0,attrs:{class:"token keyword"}},[t._v("echo")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token string single-quoted-string"}},[t._v("'Validation OK'")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(";")]),t._v("\n\n"),s("span",{pre:!0,attrs:{class:"token comment"}},[t._v("// Your own processing code goes here. E.g. update your internal order id depending on the invoice payment status.")]),t._v("\n\n")])])]),s("h3",{attrs:{id:"issue-a-full-refund-of-an-invoice"}},[s("a",{staticClass:"header-anchor",attrs:{href:"#issue-a-full-refund-of-an-invoice"}},[t._v("#")]),t._v(" Issue a full refund of an invoice")]),t._v(" "),s("p",[t._v("Using the "),s("a",{attrs:{href:"https://docs.btcpayserver.org/API/Greenfield/v1/#operation/Invoices_Refund",target:"_blank",rel:"noopener noreferrer"}},[t._v("invoice refund endpoint"),s("OutboundLink")],1),t._v(" you can issue a full (or even partial) refund of an invoice. This will return a link where the customer can claim the refund.")]),t._v(" "),s("div",{staticClass:"language-PHP extra-class"},[s("pre",{pre:!0,attrs:{class:"language-php"}},[s("code",[s("span",{pre:!0,attrs:{class:"token keyword"}},[t._v("require")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token constant"}},[t._v("__DIR__")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token operator"}},[t._v(".")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token string single-quoted-string"}},[t._v("'./vendor/autoload.php'")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(";")]),t._v("\n\n"),s("span",{pre:!0,attrs:{class:"token variable"}},[t._v("$host")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token operator"}},[t._v("=")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token string single-quoted-string"}},[t._v("'https://mainnet.demo.btcpayserver.org'")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(";")]),t._v("\n"),s("span",{pre:!0,attrs:{class:"token variable"}},[t._v("$apiKey")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token operator"}},[t._v("=")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token string single-quoted-string"}},[t._v("'API_KEY'")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(";")]),t._v("\n"),s("span",{pre:!0,attrs:{class:"token variable"}},[t._v("$storeId")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token operator"}},[t._v("=")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token string single-quoted-string"}},[t._v("'STORE_ID'")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(";")]),t._v("\n"),s("span",{pre:!0,attrs:{class:"token variable"}},[t._v("$invoiceId")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token operator"}},[t._v("=")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token string single-quoted-string"}},[t._v("'EXISTING_INVOICE_ID'")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(";")]),t._v("\n\n"),s("span",{pre:!0,attrs:{class:"token keyword"}},[t._v("try")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("{")]),t._v("\n "),s("span",{pre:!0,attrs:{class:"token variable"}},[t._v("$client")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token operator"}},[t._v("=")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token keyword"}},[t._v("new")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token class-name class-name-fully-qualified"}},[s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("\\")]),t._v("BTCPayServer"),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("\\")]),t._v("Client"),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("\\")]),t._v("Invoice")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("(")]),s("span",{pre:!0,attrs:{class:"token variable"}},[t._v("$host")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token variable"}},[t._v("$apiKey")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(")")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(";")]),t._v("\n\n "),s("span",{pre:!0,attrs:{class:"token variable"}},[t._v("$refund")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token operator"}},[t._v("=")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token variable"}},[t._v("$client")]),s("span",{pre:!0,attrs:{class:"token operator"}},[t._v("->")]),s("span",{pre:!0,attrs:{class:"token function"}},[t._v("refundInvoice")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("(")]),t._v("\n "),s("span",{pre:!0,attrs:{class:"token variable"}},[t._v("$storeId")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v("\n "),s("span",{pre:!0,attrs:{class:"token variable"}},[t._v("$invoiceId")]),t._v("\n "),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(")")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(";")]),t._v("\n\n "),s("span",{pre:!0,attrs:{class:"token keyword"}},[t._v("echo")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token variable"}},[t._v("$refund")]),s("span",{pre:!0,attrs:{class:"token operator"}},[t._v("->")]),s("span",{pre:!0,attrs:{class:"token function"}},[t._v("getViewLink")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("(")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(")")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(";")]),t._v("\n"),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("}")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token keyword"}},[t._v("catch")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("(")]),s("span",{pre:!0,attrs:{class:"token class-name class-name-fully-qualified"}},[s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("\\")]),t._v("Throwable")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token variable"}},[t._v("$e")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(")")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("{")]),t._v("\n "),s("span",{pre:!0,attrs:{class:"token keyword"}},[t._v("echo")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token string double-quoted-string"}},[t._v('"Error: "')]),t._v(" "),s("span",{pre:!0,attrs:{class:"token operator"}},[t._v(".")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token variable"}},[t._v("$e")]),s("span",{pre:!0,attrs:{class:"token operator"}},[t._v("->")]),s("span",{pre:!0,attrs:{class:"token function"}},[t._v("getMessage")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("(")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(")")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(";")]),t._v("\n"),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("}")]),t._v("\n")])])]),s("h2",{attrs:{id:"btcpay-server-management-examples"}},[s("a",{staticClass:"header-anchor",attrs:{href:"#btcpay-server-management-examples"}},[t._v("#")]),t._v(" BTCPay Server management examples")]),t._v(" "),s("p",[t._v("Here we assume you are an ambassador and host BTCPay Server for your users. You manage your users on your own system and want to create a user and set email and password for their BTCPay Server login. Then using the same credentials to create a store and an API key on behalf of that user.")]),t._v(" "),s("h3",{attrs:{id:"create-a-new-user"}},[s("a",{staticClass:"header-anchor",attrs:{href:"#create-a-new-user"}},[t._v("#")]),t._v(" Create a new user")]),t._v(" "),s("p",[t._v("Creating a new user can be done by using "),s("a",{attrs:{href:"https://docs.btcpayserver.org/API/Greenfield/v1/#operation/Users_CreateUser",target:"_blank",rel:"noopener noreferrer"}},[t._v("this endpoint"),s("OutboundLink")],1),t._v(".")]),t._v(" "),s("div",{staticClass:"language-PHP extra-class"},[s("pre",{pre:!0,attrs:{class:"language-php"}},[s("code",[s("span",{pre:!0,attrs:{class:"token keyword"}},[t._v("require")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token constant"}},[t._v("__DIR__")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token operator"}},[t._v(".")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token string single-quoted-string"}},[t._v("'./vendor/autoload.php'")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(";")]),t._v("\n\n"),s("span",{pre:!0,attrs:{class:"token variable"}},[t._v("$host")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token operator"}},[t._v("=")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token string single-quoted-string"}},[t._v("'https://mainnet.demo.btcpayserver.org'")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(";")]),t._v("\n"),s("span",{pre:!0,attrs:{class:"token variable"}},[t._v("$adminApiKey")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token operator"}},[t._v("=")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token string single-quoted-string"}},[t._v("'ADMIN_API_KEY'")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(";")]),t._v("\n"),s("span",{pre:!0,attrs:{class:"token variable"}},[t._v("$email")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token operator"}},[t._v("=")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token string single-quoted-string"}},[t._v("'satoshi.nakamoto@example.com'")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(";")]),t._v("\n"),s("span",{pre:!0,attrs:{class:"token variable"}},[t._v("$password")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token operator"}},[t._v("=")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token string single-quoted-string"}},[t._v("'SuperSecurePasswordsShouldBeQuiteLong123'")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(";")]),t._v("\n"),s("span",{pre:!0,attrs:{class:"token variable"}},[t._v("$isAdministrator")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token operator"}},[t._v("=")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token constant boolean"}},[t._v("false")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(";")]),t._v("\n\n"),s("span",{pre:!0,attrs:{class:"token keyword"}},[t._v("try")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("{")]),t._v("\n "),s("span",{pre:!0,attrs:{class:"token variable"}},[t._v("$client")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token operator"}},[t._v("=")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token keyword"}},[t._v("new")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token class-name class-name-fully-qualified"}},[s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("\\")]),t._v("BTCPayServer"),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("\\")]),t._v("Client"),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("\\")]),t._v("User")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("(")]),s("span",{pre:!0,attrs:{class:"token variable"}},[t._v("$host")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token variable"}},[t._v("$adminApiKey")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(")")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(";")]),t._v("\n "),s("span",{pre:!0,attrs:{class:"token function"}},[t._v("var_dump")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("(")]),t._v("\n "),s("span",{pre:!0,attrs:{class:"token variable"}},[t._v("$client")]),s("span",{pre:!0,attrs:{class:"token operator"}},[t._v("->")]),s("span",{pre:!0,attrs:{class:"token function"}},[t._v("createUser")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("(")]),s("span",{pre:!0,attrs:{class:"token variable"}},[t._v("$email")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token variable"}},[t._v("$password")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token variable"}},[t._v("$isAdministrator")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(")")]),t._v("\n "),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(")")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(";")]),t._v("\n"),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("}")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token keyword"}},[t._v("catch")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("(")]),s("span",{pre:!0,attrs:{class:"token class-name class-name-fully-qualified"}},[s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("\\")]),t._v("Throwable")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token variable"}},[t._v("$e")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(")")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("{")]),t._v("\n "),s("span",{pre:!0,attrs:{class:"token keyword"}},[t._v("echo")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token string double-quoted-string"}},[t._v('"Error: "')]),t._v(" "),s("span",{pre:!0,attrs:{class:"token operator"}},[t._v(".")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token variable"}},[t._v("$e")]),s("span",{pre:!0,attrs:{class:"token operator"}},[t._v("->")]),s("span",{pre:!0,attrs:{class:"token function"}},[t._v("getMessage")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("(")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(")")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(";")]),t._v("\n"),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("}")]),t._v("\n")])])]),s("h3",{attrs:{id:"create-a-new-api-key-for-the-user"}},[s("a",{staticClass:"header-anchor",attrs:{href:"#create-a-new-api-key-for-the-user"}},[t._v("#")]),t._v(" Create a new API key (for the user)")]),t._v(" "),s("p",[t._v("While we can use basic authentication to access the greenfield API, it is recommended to use API Keys to limit the scope of the credentials.")]),t._v(" "),s("p",[t._v("For example: If we want to "),s("a",{attrs:{href:"https://docs.btcpayserver.org/API/Greenfield/v1/#operation/Stores_CreateStore",target:"_blank",rel:"noopener noreferrer"}},[t._v("create a new store"),s("OutboundLink")],1),t._v(" we need the "),s("code",[t._v("btcpay.store.canmodifystoresettings")]),t._v(" permission for the API key. Warning: If you do not pass any permission then the API key will have unrestricted access.")]),t._v(" "),s("p",[t._v("As mentioned above, you can do this through the BTCPay Server UI of your instance, but let's do it through the API using "),s("a",{attrs:{href:"https://docs.btcpayserver.org/API/Greenfield/v1/#operation/ApiKeys_CreateUserApiKey",target:"_blank",rel:"noopener noreferrer"}},[t._v("this endpoint"),s("OutboundLink")],1),t._v(" where we with our admin API key create an API key for our new user.")]),t._v(" "),s("div",{staticClass:"language-PHP extra-class"},[s("pre",{pre:!0,attrs:{class:"language-php"}},[s("code",[s("span",{pre:!0,attrs:{class:"token keyword"}},[t._v("require")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token constant"}},[t._v("__DIR__")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token operator"}},[t._v(".")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token string single-quoted-string"}},[t._v("'./vendor/autoload.php'")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(";")]),t._v("\n\n"),s("span",{pre:!0,attrs:{class:"token variable"}},[t._v("$host")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token operator"}},[t._v("=")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token string single-quoted-string"}},[t._v("'https://mainnet.demo.btcpayserver.org'")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(";")]),t._v("\n"),s("span",{pre:!0,attrs:{class:"token variable"}},[t._v("$userEmail")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token operator"}},[t._v("=")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token string single-quoted-string"}},[t._v("'satoshi.nakamoto@example.com'")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(";")]),t._v("\n"),s("span",{pre:!0,attrs:{class:"token variable"}},[t._v("$adminApiKey")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token operator"}},[t._v("=")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token string single-quoted-string"}},[t._v("'ADMIN_API_KEY'")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(";")]),t._v("\n\n"),s("span",{pre:!0,attrs:{class:"token keyword"}},[t._v("try")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("{")]),t._v("\n "),s("span",{pre:!0,attrs:{class:"token variable"}},[t._v("$client")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token operator"}},[t._v("=")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token keyword"}},[t._v("new")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token class-name class-name-fully-qualified"}},[s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("\\")]),t._v("BTCPayServer"),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("\\")]),t._v("Client"),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("\\")]),t._v("ApiKey")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("(")]),s("span",{pre:!0,attrs:{class:"token variable"}},[t._v("$host")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token variable"}},[t._v("$adminApiKey")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(")")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(";")]),t._v("\n "),s("span",{pre:!0,attrs:{class:"token variable"}},[t._v("$generatedApiKey")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token operator"}},[t._v("=")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token variable"}},[t._v("$client")]),s("span",{pre:!0,attrs:{class:"token operator"}},[t._v("->")]),s("span",{pre:!0,attrs:{class:"token function"}},[t._v("createApiKeyForUser")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("(")]),s("span",{pre:!0,attrs:{class:"token variable"}},[t._v("$userEmail")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token string single-quoted-string"}},[t._v("'api generated'")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("[")]),s("span",{pre:!0,attrs:{class:"token string single-quoted-string"}},[t._v("'btcpay.store.canmodifystoresettings'")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("]")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(")")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(";")]),t._v("\n"),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("}")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token keyword"}},[t._v("catch")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("(")]),s("span",{pre:!0,attrs:{class:"token class-name class-name-fully-qualified"}},[s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("\\")]),t._v("Throwable")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token variable"}},[t._v("$e")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(")")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("{")]),t._v("\n "),s("span",{pre:!0,attrs:{class:"token keyword"}},[t._v("echo")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token string double-quoted-string"}},[t._v('"Error: "')]),t._v(" "),s("span",{pre:!0,attrs:{class:"token operator"}},[t._v(".")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token variable"}},[t._v("$e")]),s("span",{pre:!0,attrs:{class:"token operator"}},[t._v("->")]),s("span",{pre:!0,attrs:{class:"token function"}},[t._v("getMessage")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("(")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(")")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(";")]),t._v("\n"),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("}")]),t._v("\n\n"),s("span",{pre:!0,attrs:{class:"token keyword"}},[t._v("echo")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token variable"}},[t._v("$generatedApiKey")]),s("span",{pre:!0,attrs:{class:"token operator"}},[t._v("->")]),s("span",{pre:!0,attrs:{class:"token function"}},[t._v("getData")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("(")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(")")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("[")]),s("span",{pre:!0,attrs:{class:"token string single-quoted-string"}},[t._v("'apiKey'")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("]")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(";")]),t._v("\n")])])]),s("h3",{attrs:{id:"create-a-new-store"}},[s("a",{staticClass:"header-anchor",attrs:{href:"#create-a-new-store"}},[t._v("#")]),t._v(" Create a new store")]),t._v(" "),s("p",[t._v("Now, we can use the users API key to "),s("a",{attrs:{href:"https://docs.btcpayserver.org/API/Greenfield/v1/#operation/Stores_CreateStore",target:"_blank",rel:"noopener noreferrer"}},[t._v("create a new store"),s("OutboundLink")],1),t._v(".")]),t._v(" "),s("div",{staticClass:"language-PHP extra-class"},[s("pre",{pre:!0,attrs:{class:"language-php"}},[s("code",[s("span",{pre:!0,attrs:{class:"token keyword"}},[t._v("require")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token constant"}},[t._v("__DIR__")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token operator"}},[t._v(".")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token string single-quoted-string"}},[t._v("'./vendor/autoload.php'")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(";")]),t._v("\n\n"),s("span",{pre:!0,attrs:{class:"token variable"}},[t._v("$host")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token operator"}},[t._v("=")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token string single-quoted-string"}},[t._v("'https://mainnet.demo.btcpayserver.org'")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(";")]),t._v("\n"),s("span",{pre:!0,attrs:{class:"token variable"}},[t._v("$userApiKey")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token operator"}},[t._v("=")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token string single-quoted-string"}},[t._v("'USER_API_KEY'")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(";")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token comment"}},[t._v("// From previous step")]),t._v("\n\n"),s("span",{pre:!0,attrs:{class:"token keyword"}},[t._v("try")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("{")]),t._v("\n "),s("span",{pre:!0,attrs:{class:"token variable"}},[t._v("$client")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token operator"}},[t._v("=")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token keyword"}},[t._v("new")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token class-name class-name-fully-qualified"}},[s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("\\")]),t._v("BTCPayServer"),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("\\")]),t._v("Client"),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("\\")]),t._v("Store")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("(")]),s("span",{pre:!0,attrs:{class:"token variable"}},[t._v("$host")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token variable"}},[t._v("$userApiKey")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(")")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(";")]),t._v("\n "),s("span",{pre:!0,attrs:{class:"token function"}},[t._v("var_dump")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("(")]),s("span",{pre:!0,attrs:{class:"token variable"}},[t._v("$client")]),s("span",{pre:!0,attrs:{class:"token operator"}},[t._v("->")]),s("span",{pre:!0,attrs:{class:"token function"}},[t._v("createStore")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("(")]),s("span",{pre:!0,attrs:{class:"token string single-quoted-string"}},[t._v("'my new store'")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(")")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(")")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(";")]),t._v("\n"),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("}")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token keyword"}},[t._v("catch")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("(")]),s("span",{pre:!0,attrs:{class:"token class-name class-name-fully-qualified"}},[s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("\\")]),t._v("Throwable")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token variable"}},[t._v("$e")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(")")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("{")]),t._v("\n "),s("span",{pre:!0,attrs:{class:"token keyword"}},[t._v("echo")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token string double-quoted-string"}},[t._v('"Error: "')]),t._v(" "),s("span",{pre:!0,attrs:{class:"token operator"}},[t._v(".")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token variable"}},[t._v("$e")]),s("span",{pre:!0,attrs:{class:"token operator"}},[t._v("->")]),s("span",{pre:!0,attrs:{class:"token function"}},[t._v("getMessage")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("(")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(")")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(";")]),t._v("\n"),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("}")]),t._v("\n")])])]),s("h3",{attrs:{id:"read-store-information"}},[s("a",{staticClass:"header-anchor",attrs:{href:"#read-store-information"}},[t._v("#")]),t._v(" Read store information")]),t._v(" "),s("p",[t._v("We can use the new apikey to "),s("a",{attrs:{href:"https://docs.btcpayserver.org/API/Greenfield/v1/#operation/Stores_GetStore",target:"_blank",rel:"noopener noreferrer"}},[t._v("read store"),s("OutboundLink")],1),t._v(" information:")]),t._v(" "),s("div",{staticClass:"language-PHP extra-class"},[s("pre",{pre:!0,attrs:{class:"language-php"}},[s("code",[s("span",{pre:!0,attrs:{class:"token keyword"}},[t._v("require")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token constant"}},[t._v("__DIR__")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token operator"}},[t._v(".")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token string single-quoted-string"}},[t._v("'./vendor/autoload.php'")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(";")]),t._v("\n\n"),s("span",{pre:!0,attrs:{class:"token variable"}},[t._v("$host")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token operator"}},[t._v("=")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token string single-quoted-string"}},[t._v("'https://mainnet.demo.btcpayserver.org'")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(";")]),t._v("\n"),s("span",{pre:!0,attrs:{class:"token variable"}},[t._v("$userApiKey")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token operator"}},[t._v("=")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token string single-quoted-string"}},[t._v("'USER_API_KEY'")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(";")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token comment"}},[t._v("// From previous step")]),t._v("\n"),s("span",{pre:!0,attrs:{class:"token variable"}},[t._v("$storeId")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token operator"}},[t._v("=")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token string single-quoted-string"}},[t._v("'STORE_ID'")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(";")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token comment"}},[t._v("// From previous step")]),t._v("\n\n"),s("span",{pre:!0,attrs:{class:"token keyword"}},[t._v("try")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("{")]),t._v("\n "),s("span",{pre:!0,attrs:{class:"token variable"}},[t._v("$client")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token operator"}},[t._v("=")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token keyword"}},[t._v("new")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token class-name class-name-fully-qualified"}},[s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("\\")]),t._v("BTCPayServer"),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("\\")]),t._v("Client"),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("\\")]),t._v("Store")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("(")]),s("span",{pre:!0,attrs:{class:"token variable"}},[t._v("$host")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token variable"}},[t._v("$userApiKey")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(")")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(";")]),t._v("\n "),s("span",{pre:!0,attrs:{class:"token function"}},[t._v("var_dump")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("(")]),s("span",{pre:!0,attrs:{class:"token variable"}},[t._v("$client")]),s("span",{pre:!0,attrs:{class:"token operator"}},[t._v("->")]),s("span",{pre:!0,attrs:{class:"token function"}},[t._v("getStore")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("(")]),s("span",{pre:!0,attrs:{class:"token variable"}},[t._v("$storeId")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(")")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(")")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(";")]),t._v("\n"),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("}")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token keyword"}},[t._v("catch")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("(")]),s("span",{pre:!0,attrs:{class:"token class-name class-name-fully-qualified"}},[s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("\\")]),t._v("Throwable")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token variable"}},[t._v("$e")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(")")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("{")]),t._v("\n "),s("span",{pre:!0,attrs:{class:"token keyword"}},[t._v("echo")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token string double-quoted-string"}},[t._v('"Error: "')]),t._v(" "),s("span",{pre:!0,attrs:{class:"token operator"}},[t._v(".")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token variable"}},[t._v("$e")]),s("span",{pre:!0,attrs:{class:"token operator"}},[t._v("->")]),s("span",{pre:!0,attrs:{class:"token function"}},[t._v("getMessage")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("(")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(")")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(";")]),t._v("\n"),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("}")]),t._v("\n")])])]),s("p",[t._v("Looking for more examples, you can find them "),s("a",{attrs:{href:"https://github.com/btcpayserver/btcpayserver-greenfield-php/tree/master/examples",target:"_blank",rel:"noopener noreferrer"}},[t._v("here"),s("OutboundLink")],1),t._v(".")])])}),[],!1,null,null,null);s.default=n.exports}}]); \ No newline at end of file diff --git a/assets/js/126.7e240c49.js b/assets/js/126.699711a4.js similarity index 99% rename from assets/js/126.7e240c49.js rename to assets/js/126.699711a4.js index 37435362a3..71523287a9 100644 --- a/assets/js/126.7e240c49.js +++ b/assets/js/126.699711a4.js @@ -1 +1 @@ -(window.webpackJsonp=window.webpackJsonp||[]).push([[126],{773:function(t,s,a){"use strict";a.r(s);var e=a(10),n=Object(e.a)({},(function(){var t=this,s=t._self._c;return s("ContentSlotsDistributor",{attrs:{"slot-key":t.$parent.slotKey}},[s("h1",{attrs:{id:"invoice-metadata"}},[s("a",{staticClass:"header-anchor",attrs:{href:"#invoice-metadata"}},[t._v("#")]),t._v(" Invoice metadata")]),t._v(" "),s("p",[t._v("Each invoice contains metadata, which is a customizable JSON object that can be tailored through the API during the creation of an invoice. Although it lacks a fixed schema, certain properties within the metadata can be interpreted by the UI.")]),t._v(" "),s("p",[t._v("This page provides an overview of these properties and explains how they are utilized within the BTCPay Server.")]),t._v(" "),s("h2",{attrs:{id:"well-known-properties"}},[s("a",{staticClass:"header-anchor",attrs:{href:"#well-known-properties"}},[t._v("#")]),t._v(" Well-known properties")]),t._v(" "),s("table",[s("thead",[s("tr",[s("th",[t._v("Property path")]),t._v(" "),s("th",[t._v("Description")])])]),t._v(" "),s("tbody",[s("tr",[s("td",[s("code",[t._v(".orderId")])]),t._v(" "),s("td",[t._v("Refers to the order ID from an external system, such as an e-commerce platform like WooCommerce. This property is indexed, allowing for efficient invoice searches using the "),s("code",[t._v("orderId")]),t._v(".")])]),t._v(" "),s("tr",[s("td",[s("code",[t._v(".orderUrl")])]),t._v(" "),s("td",[t._v("Refers to a URL linking back to the order page of the external system. This link is displayed in the invoice details view.")])]),t._v(" "),s("tr",[s("td",[s("code",[t._v(".paymentRequestId")])]),t._v(" "),s("td",[t._v("In the invoice details view, a link is provided for navigating to the payment request page associated with the invoice.")])]),t._v(" "),s("tr",[s("td",[s("code",[t._v(".posData")])]),t._v(" "),s("td",[t._v("A custom JSON object that represents information displayed in the invoice details view.")])]),t._v(" "),s("tr",[s("td",[s("code",[t._v(".receiptData")])]),t._v(" "),s("td",[t._v("A custom JSON object that represents information displayed on the receipt page of an invoice.")])]),t._v(" "),s("tr",[s("td",[s("code",[t._v(".buyerName")])]),t._v(" "),s("td",[t._v("Visible in the invoice details view and in the BitPay API-compatible endpoints.")])]),t._v(" "),s("tr",[s("td",[s("code",[t._v(".buyerEmail")])]),t._v(" "),s("td",[t._v("Visible in the invoice details view and in the BitPay API-compatible endpoints.")])]),t._v(" "),s("tr",[s("td",[s("code",[t._v(".buyerAddress1")])]),t._v(" "),s("td",[t._v("Visible in the invoice details view and in the BitPay API-compatible endpoints.")])]),t._v(" "),s("tr",[s("td",[s("code",[t._v(".buyerAddress2")])]),t._v(" "),s("td",[t._v("Visible in the invoice details view and in the BitPay API-compatible endpoints.")])]),t._v(" "),s("tr",[s("td",[s("code",[t._v(".buyerCity")])]),t._v(" "),s("td",[t._v("Visible in the invoice details view and in the BitPay API-compatible endpoints.")])]),t._v(" "),s("tr",[s("td",[s("code",[t._v(".buyerState")])]),t._v(" "),s("td",[t._v("Visible in the invoice details view and in the BitPay API-compatible endpoints.")])]),t._v(" "),s("tr",[s("td",[s("code",[t._v(".buyerZip")])]),t._v(" "),s("td",[t._v("Visible in the invoice details view and in the BitPay API-compatible endpoints.")])]),t._v(" "),s("tr",[s("td",[s("code",[t._v(".buyerCountry")])]),t._v(" "),s("td",[t._v("Visible in the invoice details view and in the BitPay API-compatible endpoints.")])]),t._v(" "),s("tr",[s("td",[s("code",[t._v(".buyerPhone")])]),t._v(" "),s("td",[t._v("Visible in the invoice details view and in the BitPay API-compatible endpoints.")])]),t._v(" "),s("tr",[s("td",[s("code",[t._v(".itemDesc")])]),t._v(" "),s("td",[t._v("When using the Point of Sale (except in keypad or cart view), this field is set to the item description of the purchased item. This information is included in the CSV invoice export feature and appears in the invoice details view.")])]),t._v(" "),s("tr",[s("td",[s("code",[t._v(".itemCode")])]),t._v(" "),s("td",[t._v("When using the Point of Sale (except in keypad or cart view), this field is set to the item code of the purchased item. This information is included in the CSV invoice export feature and appears in the invoice details view.")])]),t._v(" "),s("tr",[s("td",[s("code",[t._v(".physical")])]),t._v(" "),s("td",[t._v("Boolean value indicating whether this is a physical good; displayed in the invoice details view and in the BitPay API-compatible endpoints.")])]),t._v(" "),s("tr",[s("td",[s("code",[t._v(".taxIncluded")])]),t._v(" "),s("td",[t._v("Number representing the tax amount in the invoice currency. This information will appear in the invoice details view. During invoice creation, the value is automatically rounded to significant digits and ensured not to be greater than the invoice's price.")])])])]),t._v(" "),s("h2",{attrs:{id:"examples"}},[s("a",{staticClass:"header-anchor",attrs:{href:"#examples"}},[t._v("#")]),t._v(" Examples")]),t._v(" "),s("p",[t._v("Point of sale invoice (Product list view):")]),t._v(" "),s("div",{staticClass:"language-json extra-class"},[s("pre",{pre:!0,attrs:{class:"language-json"}},[s("code",[s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("{")]),t._v("\n "),s("span",{pre:!0,attrs:{class:"token property"}},[t._v('"orderId"')]),s("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token string"}},[t._v('"pos-app_346KRC5BjXXXo8cRFKwTBmdR6ZJ4"')]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v("\n "),s("span",{pre:!0,attrs:{class:"token property"}},[t._v('"itemCode"')]),s("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token string"}},[t._v('"green tea"')]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v("\n "),s("span",{pre:!0,attrs:{class:"token property"}},[t._v('"itemDesc"')]),s("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token string"}},[t._v('"Green Tea"')]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v("\n "),s("span",{pre:!0,attrs:{class:"token property"}},[t._v('"orderUrl"')]),s("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token string"}},[t._v('"https://localhost:14142/apps/346KRC5BjXXXo8cRFKwTBmdR6ZJ4/pos"')]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v("\n "),s("span",{pre:!0,attrs:{class:"token property"}},[t._v('"receiptData"')]),s("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("{")]),t._v("\n "),s("span",{pre:!0,attrs:{class:"token property"}},[t._v('"Title"')]),s("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token string"}},[t._v('"Green Tea"')]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v("\n "),s("span",{pre:!0,attrs:{class:"token property"}},[t._v('"Description"')]),s("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token string"}},[t._v("\"Lovely, fresh and tender, Meng Ding Gan Lu ('sweet dew') is grown in the lush Meng Ding Mountains of the southwestern province of Sichuan where it has been cultivated for over a thousand years.\"")]),t._v("\n "),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("}")]),t._v("\n"),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("}")]),t._v("\n")])])]),s("p",[t._v("Point of sale invoice (Cart view):")]),t._v(" "),s("div",{staticClass:"language-json extra-class"},[s("pre",{pre:!0,attrs:{class:"language-json"}},[s("code",[s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("{")]),t._v("\n "),s("span",{pre:!0,attrs:{class:"token property"}},[t._v('"orderId"')]),s("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token string"}},[t._v('"pos-app_346KRC5BjXXXo8cRFKwTBmdR6ZJ4"')]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v("\n "),s("span",{pre:!0,attrs:{class:"token property"}},[t._v('"posData"')]),s("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("{")]),t._v("\n "),s("span",{pre:!0,attrs:{class:"token property"}},[t._v('"tip"')]),s("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token number"}},[t._v("0.48")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v("\n "),s("span",{pre:!0,attrs:{class:"token property"}},[t._v('"cart"')]),s("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("[")]),t._v("\n "),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("{")]),t._v("\n "),s("span",{pre:!0,attrs:{class:"token property"}},[t._v('"id"')]),s("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token string"}},[t._v('"pu erh"')]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v("\n "),s("span",{pre:!0,attrs:{class:"token property"}},[t._v('"count"')]),s("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token number"}},[t._v("1")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v("\n "),s("span",{pre:!0,attrs:{class:"token property"}},[t._v('"image"')]),s("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token string"}},[t._v('"~/img/pos-sample/pu-erh.jpg"')]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v("\n "),s("span",{pre:!0,attrs:{class:"token property"}},[t._v('"price"')]),s("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("{")]),t._v("\n "),s("span",{pre:!0,attrs:{class:"token property"}},[t._v('"type"')]),s("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token number"}},[t._v("2")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v("\n "),s("span",{pre:!0,attrs:{class:"token property"}},[t._v('"value"')]),s("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token number"}},[t._v("2")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v("\n "),s("span",{pre:!0,attrs:{class:"token property"}},[t._v('"formatted"')]),s("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token string"}},[t._v('"$2.00"')]),t._v("\n "),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("}")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v("\n "),s("span",{pre:!0,attrs:{class:"token property"}},[t._v('"title"')]),s("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token string"}},[t._v('"Pu Erh"')]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v("\n "),s("span",{pre:!0,attrs:{class:"token property"}},[t._v('"inventory"')]),s("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token null keyword"}},[t._v("null")]),t._v("\n "),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("}")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v("\n "),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("{")]),t._v("\n "),s("span",{pre:!0,attrs:{class:"token property"}},[t._v('"id"')]),s("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token string"}},[t._v('"rooibos"')]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v("\n "),s("span",{pre:!0,attrs:{class:"token property"}},[t._v('"count"')]),s("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token number"}},[t._v("1")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v("\n "),s("span",{pre:!0,attrs:{class:"token property"}},[t._v('"image"')]),s("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token string"}},[t._v('"~/img/pos-sample/rooibos.jpg"')]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v("\n "),s("span",{pre:!0,attrs:{class:"token property"}},[t._v('"price"')]),s("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("{")]),t._v("\n "),s("span",{pre:!0,attrs:{class:"token property"}},[t._v('"type"')]),s("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token number"}},[t._v("2")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v("\n "),s("span",{pre:!0,attrs:{class:"token property"}},[t._v('"value"')]),s("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token number"}},[t._v("1.2")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v("\n "),s("span",{pre:!0,attrs:{class:"token property"}},[t._v('"formatted"')]),s("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token string"}},[t._v('"$1.20"')]),t._v("\n "),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("}")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v("\n "),s("span",{pre:!0,attrs:{class:"token property"}},[t._v('"title"')]),s("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token string"}},[t._v('"Rooibos"')]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v("\n "),s("span",{pre:!0,attrs:{class:"token property"}},[t._v('"inventory"')]),s("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token null keyword"}},[t._v("null")]),t._v("\n "),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("}")]),t._v("\n "),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("]")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v("\n "),s("span",{pre:!0,attrs:{class:"token property"}},[t._v('"total"')]),s("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token number"}},[t._v("3.68")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v("\n "),s("span",{pre:!0,attrs:{class:"token property"}},[t._v('"subTotal"')]),s("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token number"}},[t._v("3.2")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v("\n "),s("span",{pre:!0,attrs:{class:"token property"}},[t._v('"customAmount"')]),s("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token number"}},[t._v("0")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v("\n "),s("span",{pre:!0,attrs:{class:"token property"}},[t._v('"discountAmount"')]),s("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token number"}},[t._v("0")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v("\n "),s("span",{pre:!0,attrs:{class:"token property"}},[t._v('"discountPercentage"')]),s("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token number"}},[t._v("0")]),t._v("\n "),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("}")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v("\n "),s("span",{pre:!0,attrs:{class:"token property"}},[t._v('"itemDesc"')]),s("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token string"}},[t._v('"Tea shop"')]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v("\n "),s("span",{pre:!0,attrs:{class:"token property"}},[t._v('"orderUrl"')]),s("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token string"}},[t._v('"https://localhost:14142/apps/346KRC5BjXXXo8cRFKwTBmdR6ZJ4/pos"')]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v("\n "),s("span",{pre:!0,attrs:{class:"token property"}},[t._v('"receiptData"')]),s("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("{")]),t._v("\n "),s("span",{pre:!0,attrs:{class:"token property"}},[t._v('"Tip"')]),s("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token string"}},[t._v('"$0.48"')]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v("\n "),s("span",{pre:!0,attrs:{class:"token property"}},[t._v('"Cart"')]),s("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("{")]),t._v("\n "),s("span",{pre:!0,attrs:{class:"token property"}},[t._v('"Pu Erh"')]),s("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token string"}},[t._v('"$2.00 x 1 = $2.00"')]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v("\n "),s("span",{pre:!0,attrs:{class:"token property"}},[t._v('"Rooibos"')]),s("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token string"}},[t._v('"$1.20 x 1 = $1.20"')]),t._v("\n "),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("}")]),t._v("\n "),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("}")]),t._v("\n"),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("}")]),t._v("\n")])])]),s("p",[t._v("Point of sale invoice (Keypad view):")]),t._v(" "),s("div",{staticClass:"language-json extra-class"},[s("pre",{pre:!0,attrs:{class:"language-json"}},[s("code",[s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("{")]),t._v("\n "),s("span",{pre:!0,attrs:{class:"token property"}},[t._v('"orderId"')]),s("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token string"}},[t._v('"pos-app_346KRC5BjXXXo8cRFKwTBmdR6ZJ4"')]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v("\n "),s("span",{pre:!0,attrs:{class:"token property"}},[t._v('"posData"')]),s("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("{")]),t._v("\n "),s("span",{pre:!0,attrs:{class:"token property"}},[t._v('"total"')]),s("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token string"}},[t._v('"12.00"')]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v("\n "),s("span",{pre:!0,attrs:{class:"token property"}},[t._v('"subTotal"')]),s("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token string"}},[t._v('"12.00"')]),t._v("\n "),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("}")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v("\n "),s("span",{pre:!0,attrs:{class:"token property"}},[t._v('"itemDesc"')]),s("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token string"}},[t._v('"Tea shop"')]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v("\n "),s("span",{pre:!0,attrs:{class:"token property"}},[t._v('"orderUrl"')]),s("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token string"}},[t._v('"https://localhost:14142/apps/346KRC5BjXXXo8cRFKwTBmdR6ZJ4/pos"')]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v("\n "),s("span",{pre:!0,attrs:{class:"token property"}},[t._v('"receiptData"')]),s("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("{")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("}")]),t._v("\n"),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("}")]),t._v("\n")])])])])}),[],!1,null,null,null);s.default=n.exports}}]); \ No newline at end of file +(window.webpackJsonp=window.webpackJsonp||[]).push([[126],{774:function(t,s,a){"use strict";a.r(s);var e=a(10),n=Object(e.a)({},(function(){var t=this,s=t._self._c;return s("ContentSlotsDistributor",{attrs:{"slot-key":t.$parent.slotKey}},[s("h1",{attrs:{id:"invoice-metadata"}},[s("a",{staticClass:"header-anchor",attrs:{href:"#invoice-metadata"}},[t._v("#")]),t._v(" Invoice metadata")]),t._v(" "),s("p",[t._v("Each invoice contains metadata, which is a customizable JSON object that can be tailored through the API during the creation of an invoice. Although it lacks a fixed schema, certain properties within the metadata can be interpreted by the UI.")]),t._v(" "),s("p",[t._v("This page provides an overview of these properties and explains how they are utilized within the BTCPay Server.")]),t._v(" "),s("h2",{attrs:{id:"well-known-properties"}},[s("a",{staticClass:"header-anchor",attrs:{href:"#well-known-properties"}},[t._v("#")]),t._v(" Well-known properties")]),t._v(" "),s("table",[s("thead",[s("tr",[s("th",[t._v("Property path")]),t._v(" "),s("th",[t._v("Description")])])]),t._v(" "),s("tbody",[s("tr",[s("td",[s("code",[t._v(".orderId")])]),t._v(" "),s("td",[t._v("Refers to the order ID from an external system, such as an e-commerce platform like WooCommerce. This property is indexed, allowing for efficient invoice searches using the "),s("code",[t._v("orderId")]),t._v(".")])]),t._v(" "),s("tr",[s("td",[s("code",[t._v(".orderUrl")])]),t._v(" "),s("td",[t._v("Refers to a URL linking back to the order page of the external system. This link is displayed in the invoice details view.")])]),t._v(" "),s("tr",[s("td",[s("code",[t._v(".paymentRequestId")])]),t._v(" "),s("td",[t._v("In the invoice details view, a link is provided for navigating to the payment request page associated with the invoice.")])]),t._v(" "),s("tr",[s("td",[s("code",[t._v(".posData")])]),t._v(" "),s("td",[t._v("A custom JSON object that represents information displayed in the invoice details view.")])]),t._v(" "),s("tr",[s("td",[s("code",[t._v(".receiptData")])]),t._v(" "),s("td",[t._v("A custom JSON object that represents information displayed on the receipt page of an invoice.")])]),t._v(" "),s("tr",[s("td",[s("code",[t._v(".buyerName")])]),t._v(" "),s("td",[t._v("Visible in the invoice details view and in the BitPay API-compatible endpoints.")])]),t._v(" "),s("tr",[s("td",[s("code",[t._v(".buyerEmail")])]),t._v(" "),s("td",[t._v("Visible in the invoice details view and in the BitPay API-compatible endpoints.")])]),t._v(" "),s("tr",[s("td",[s("code",[t._v(".buyerAddress1")])]),t._v(" "),s("td",[t._v("Visible in the invoice details view and in the BitPay API-compatible endpoints.")])]),t._v(" "),s("tr",[s("td",[s("code",[t._v(".buyerAddress2")])]),t._v(" "),s("td",[t._v("Visible in the invoice details view and in the BitPay API-compatible endpoints.")])]),t._v(" "),s("tr",[s("td",[s("code",[t._v(".buyerCity")])]),t._v(" "),s("td",[t._v("Visible in the invoice details view and in the BitPay API-compatible endpoints.")])]),t._v(" "),s("tr",[s("td",[s("code",[t._v(".buyerState")])]),t._v(" "),s("td",[t._v("Visible in the invoice details view and in the BitPay API-compatible endpoints.")])]),t._v(" "),s("tr",[s("td",[s("code",[t._v(".buyerZip")])]),t._v(" "),s("td",[t._v("Visible in the invoice details view and in the BitPay API-compatible endpoints.")])]),t._v(" "),s("tr",[s("td",[s("code",[t._v(".buyerCountry")])]),t._v(" "),s("td",[t._v("Visible in the invoice details view and in the BitPay API-compatible endpoints.")])]),t._v(" "),s("tr",[s("td",[s("code",[t._v(".buyerPhone")])]),t._v(" "),s("td",[t._v("Visible in the invoice details view and in the BitPay API-compatible endpoints.")])]),t._v(" "),s("tr",[s("td",[s("code",[t._v(".itemDesc")])]),t._v(" "),s("td",[t._v("When using the Point of Sale (except in keypad or cart view), this field is set to the item description of the purchased item. This information is included in the CSV invoice export feature and appears in the invoice details view.")])]),t._v(" "),s("tr",[s("td",[s("code",[t._v(".itemCode")])]),t._v(" "),s("td",[t._v("When using the Point of Sale (except in keypad or cart view), this field is set to the item code of the purchased item. This information is included in the CSV invoice export feature and appears in the invoice details view.")])]),t._v(" "),s("tr",[s("td",[s("code",[t._v(".physical")])]),t._v(" "),s("td",[t._v("Boolean value indicating whether this is a physical good; displayed in the invoice details view and in the BitPay API-compatible endpoints.")])]),t._v(" "),s("tr",[s("td",[s("code",[t._v(".taxIncluded")])]),t._v(" "),s("td",[t._v("Number representing the tax amount in the invoice currency. This information will appear in the invoice details view. During invoice creation, the value is automatically rounded to significant digits and ensured not to be greater than the invoice's price.")])])])]),t._v(" "),s("h2",{attrs:{id:"examples"}},[s("a",{staticClass:"header-anchor",attrs:{href:"#examples"}},[t._v("#")]),t._v(" Examples")]),t._v(" "),s("p",[t._v("Point of sale invoice (Product list view):")]),t._v(" "),s("div",{staticClass:"language-json extra-class"},[s("pre",{pre:!0,attrs:{class:"language-json"}},[s("code",[s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("{")]),t._v("\n "),s("span",{pre:!0,attrs:{class:"token property"}},[t._v('"orderId"')]),s("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token string"}},[t._v('"pos-app_346KRC5BjXXXo8cRFKwTBmdR6ZJ4"')]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v("\n "),s("span",{pre:!0,attrs:{class:"token property"}},[t._v('"itemCode"')]),s("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token string"}},[t._v('"green tea"')]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v("\n "),s("span",{pre:!0,attrs:{class:"token property"}},[t._v('"itemDesc"')]),s("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token string"}},[t._v('"Green Tea"')]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v("\n "),s("span",{pre:!0,attrs:{class:"token property"}},[t._v('"orderUrl"')]),s("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token string"}},[t._v('"https://localhost:14142/apps/346KRC5BjXXXo8cRFKwTBmdR6ZJ4/pos"')]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v("\n "),s("span",{pre:!0,attrs:{class:"token property"}},[t._v('"receiptData"')]),s("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("{")]),t._v("\n "),s("span",{pre:!0,attrs:{class:"token property"}},[t._v('"Title"')]),s("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token string"}},[t._v('"Green Tea"')]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v("\n "),s("span",{pre:!0,attrs:{class:"token property"}},[t._v('"Description"')]),s("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token string"}},[t._v("\"Lovely, fresh and tender, Meng Ding Gan Lu ('sweet dew') is grown in the lush Meng Ding Mountains of the southwestern province of Sichuan where it has been cultivated for over a thousand years.\"")]),t._v("\n "),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("}")]),t._v("\n"),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("}")]),t._v("\n")])])]),s("p",[t._v("Point of sale invoice (Cart view):")]),t._v(" "),s("div",{staticClass:"language-json extra-class"},[s("pre",{pre:!0,attrs:{class:"language-json"}},[s("code",[s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("{")]),t._v("\n "),s("span",{pre:!0,attrs:{class:"token property"}},[t._v('"orderId"')]),s("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token string"}},[t._v('"pos-app_346KRC5BjXXXo8cRFKwTBmdR6ZJ4"')]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v("\n "),s("span",{pre:!0,attrs:{class:"token property"}},[t._v('"posData"')]),s("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("{")]),t._v("\n "),s("span",{pre:!0,attrs:{class:"token property"}},[t._v('"tip"')]),s("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token number"}},[t._v("0.48")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v("\n "),s("span",{pre:!0,attrs:{class:"token property"}},[t._v('"cart"')]),s("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("[")]),t._v("\n "),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("{")]),t._v("\n "),s("span",{pre:!0,attrs:{class:"token property"}},[t._v('"id"')]),s("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token string"}},[t._v('"pu erh"')]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v("\n "),s("span",{pre:!0,attrs:{class:"token property"}},[t._v('"count"')]),s("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token number"}},[t._v("1")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v("\n "),s("span",{pre:!0,attrs:{class:"token property"}},[t._v('"image"')]),s("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token string"}},[t._v('"~/img/pos-sample/pu-erh.jpg"')]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v("\n "),s("span",{pre:!0,attrs:{class:"token property"}},[t._v('"price"')]),s("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("{")]),t._v("\n "),s("span",{pre:!0,attrs:{class:"token property"}},[t._v('"type"')]),s("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token number"}},[t._v("2")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v("\n "),s("span",{pre:!0,attrs:{class:"token property"}},[t._v('"value"')]),s("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token number"}},[t._v("2")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v("\n "),s("span",{pre:!0,attrs:{class:"token property"}},[t._v('"formatted"')]),s("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token string"}},[t._v('"$2.00"')]),t._v("\n "),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("}")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v("\n "),s("span",{pre:!0,attrs:{class:"token property"}},[t._v('"title"')]),s("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token string"}},[t._v('"Pu Erh"')]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v("\n "),s("span",{pre:!0,attrs:{class:"token property"}},[t._v('"inventory"')]),s("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token null keyword"}},[t._v("null")]),t._v("\n "),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("}")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v("\n "),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("{")]),t._v("\n "),s("span",{pre:!0,attrs:{class:"token property"}},[t._v('"id"')]),s("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token string"}},[t._v('"rooibos"')]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v("\n "),s("span",{pre:!0,attrs:{class:"token property"}},[t._v('"count"')]),s("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token number"}},[t._v("1")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v("\n "),s("span",{pre:!0,attrs:{class:"token property"}},[t._v('"image"')]),s("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token string"}},[t._v('"~/img/pos-sample/rooibos.jpg"')]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v("\n "),s("span",{pre:!0,attrs:{class:"token property"}},[t._v('"price"')]),s("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("{")]),t._v("\n "),s("span",{pre:!0,attrs:{class:"token property"}},[t._v('"type"')]),s("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token number"}},[t._v("2")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v("\n "),s("span",{pre:!0,attrs:{class:"token property"}},[t._v('"value"')]),s("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token number"}},[t._v("1.2")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v("\n "),s("span",{pre:!0,attrs:{class:"token property"}},[t._v('"formatted"')]),s("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token string"}},[t._v('"$1.20"')]),t._v("\n "),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("}")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v("\n "),s("span",{pre:!0,attrs:{class:"token property"}},[t._v('"title"')]),s("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token string"}},[t._v('"Rooibos"')]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v("\n "),s("span",{pre:!0,attrs:{class:"token property"}},[t._v('"inventory"')]),s("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token null keyword"}},[t._v("null")]),t._v("\n "),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("}")]),t._v("\n "),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("]")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v("\n "),s("span",{pre:!0,attrs:{class:"token property"}},[t._v('"total"')]),s("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token number"}},[t._v("3.68")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v("\n "),s("span",{pre:!0,attrs:{class:"token property"}},[t._v('"subTotal"')]),s("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token number"}},[t._v("3.2")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v("\n "),s("span",{pre:!0,attrs:{class:"token property"}},[t._v('"customAmount"')]),s("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token number"}},[t._v("0")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v("\n "),s("span",{pre:!0,attrs:{class:"token property"}},[t._v('"discountAmount"')]),s("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token number"}},[t._v("0")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v("\n "),s("span",{pre:!0,attrs:{class:"token property"}},[t._v('"discountPercentage"')]),s("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token number"}},[t._v("0")]),t._v("\n "),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("}")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v("\n "),s("span",{pre:!0,attrs:{class:"token property"}},[t._v('"itemDesc"')]),s("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token string"}},[t._v('"Tea shop"')]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v("\n "),s("span",{pre:!0,attrs:{class:"token property"}},[t._v('"orderUrl"')]),s("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token string"}},[t._v('"https://localhost:14142/apps/346KRC5BjXXXo8cRFKwTBmdR6ZJ4/pos"')]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v("\n "),s("span",{pre:!0,attrs:{class:"token property"}},[t._v('"receiptData"')]),s("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("{")]),t._v("\n "),s("span",{pre:!0,attrs:{class:"token property"}},[t._v('"Tip"')]),s("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token string"}},[t._v('"$0.48"')]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v("\n "),s("span",{pre:!0,attrs:{class:"token property"}},[t._v('"Cart"')]),s("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("{")]),t._v("\n "),s("span",{pre:!0,attrs:{class:"token property"}},[t._v('"Pu Erh"')]),s("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token string"}},[t._v('"$2.00 x 1 = $2.00"')]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v("\n "),s("span",{pre:!0,attrs:{class:"token property"}},[t._v('"Rooibos"')]),s("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token string"}},[t._v('"$1.20 x 1 = $1.20"')]),t._v("\n "),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("}")]),t._v("\n "),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("}")]),t._v("\n"),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("}")]),t._v("\n")])])]),s("p",[t._v("Point of sale invoice (Keypad view):")]),t._v(" "),s("div",{staticClass:"language-json extra-class"},[s("pre",{pre:!0,attrs:{class:"language-json"}},[s("code",[s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("{")]),t._v("\n "),s("span",{pre:!0,attrs:{class:"token property"}},[t._v('"orderId"')]),s("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token string"}},[t._v('"pos-app_346KRC5BjXXXo8cRFKwTBmdR6ZJ4"')]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v("\n "),s("span",{pre:!0,attrs:{class:"token property"}},[t._v('"posData"')]),s("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("{")]),t._v("\n "),s("span",{pre:!0,attrs:{class:"token property"}},[t._v('"total"')]),s("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token string"}},[t._v('"12.00"')]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v("\n "),s("span",{pre:!0,attrs:{class:"token property"}},[t._v('"subTotal"')]),s("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token string"}},[t._v('"12.00"')]),t._v("\n "),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("}")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v("\n "),s("span",{pre:!0,attrs:{class:"token property"}},[t._v('"itemDesc"')]),s("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token string"}},[t._v('"Tea shop"')]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v("\n "),s("span",{pre:!0,attrs:{class:"token property"}},[t._v('"orderUrl"')]),s("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token string"}},[t._v('"https://localhost:14142/apps/346KRC5BjXXXo8cRFKwTBmdR6ZJ4/pos"')]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v("\n "),s("span",{pre:!0,attrs:{class:"token property"}},[t._v('"receiptData"')]),s("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("{")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("}")]),t._v("\n"),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("}")]),t._v("\n")])])])])}),[],!1,null,null,null);s.default=n.exports}}]); \ No newline at end of file diff --git a/assets/js/127.6fd8c7f3.js b/assets/js/127.3402c98f.js similarity index 99% rename from assets/js/127.6fd8c7f3.js rename to assets/js/127.3402c98f.js index 48cd9e9bc3..b72007dcdf 100644 --- a/assets/js/127.6fd8c7f3.js +++ b/assets/js/127.3402c98f.js @@ -1 +1 @@ -(window.webpackJsonp=window.webpackJsonp||[]).push([[127],{774:function(e,t,r){"use strict";r.r(t);var s=r(10),a=Object(s.a)({},(function(){var e=this,t=e._self._c;return t("ContentSlotsDistributor",{attrs:{"slot-key":e.$parent.slotKey}},[t("h1",{attrs:{id:"local-development"}},[t("a",{staticClass:"header-anchor",attrs:{href:"#local-development"}},[e._v("#")]),e._v(" Local development")]),e._v(" "),t("h2",{attrs:{id:"prerequisites"}},[t("a",{staticClass:"header-anchor",attrs:{href:"#prerequisites"}},[e._v("#")]),e._v(" Prerequisites")]),e._v(" "),t("p",[e._v("For the "),t("strong",[e._v("development environment")]),e._v(" you need to install these tools:")]),e._v(" "),t("ul",[t("li",[t("a",{attrs:{href:"https://dotnet.microsoft.com/en-us/download/dotnet/8.0",target:"_blank",rel:"noopener noreferrer"}},[e._v(".NET 8.0 SDK"),t("OutboundLink")],1)]),e._v(" "),t("li",[e._v("Docker: "),t("a",{attrs:{href:"https://docs.docker.com/docker-for-windows/install/",target:"_blank",rel:"noopener noreferrer"}},[e._v("Windows"),t("OutboundLink")],1),e._v(" | "),t("a",{attrs:{href:"https://docs.docker.com/docker-for-mac/install/",target:"_blank",rel:"noopener noreferrer"}},[e._v("Mac OS"),t("OutboundLink")],1),e._v(" | "),t("a",{attrs:{href:"https://docs.docker.com/install/linux/docker-ce/ubuntu/",target:"_blank",rel:"noopener noreferrer"}},[e._v("Linux"),t("OutboundLink")],1)])]),e._v(" "),t("h2",{attrs:{id:"dependencies"}},[t("a",{staticClass:"header-anchor",attrs:{href:"#dependencies"}},[e._v("#")]),e._v(" Dependencies")]),e._v(" "),t("p",[e._v("To execute tests and run the project for debugging, you need to run a number of "),t("strong",[e._v("dependencies")]),e._v(".")]),e._v(" "),t("p",[e._v("We wrapped all our dependencies in a docker-compose file that you can use to bootstrap the development environment:\nThe file "),t("a",{attrs:{href:"https://github.com/btcpayserver/btcpayserver/blob/master/BTCPayServer.Tests/docker-compose.yml",target:"_blank",rel:"noopener noreferrer"}},[e._v("BTCPayServer.Tests/docker-compose.yml"),t("OutboundLink")],1),e._v(" can be used to spin everything up:")]),e._v(" "),t("div",{staticClass:"language-bash extra-class"},[t("pre",{pre:!0,attrs:{class:"language-bash"}},[t("code",[t("span",{pre:!0,attrs:{class:"token function"}},[e._v("git")]),e._v(" clone https://github.com/btcpayserver/btcpayserver.git\n"),t("span",{pre:!0,attrs:{class:"token builtin class-name"}},[e._v("cd")]),e._v(" btcpayserver/BTCPayServer.Tests\n"),t("span",{pre:!0,attrs:{class:"token function"}},[e._v("docker-compose")]),e._v(" up dev\n")])])]),t("h2",{attrs:{id:"which-ide"}},[t("a",{staticClass:"header-anchor",attrs:{href:"#which-ide"}},[e._v("#")]),e._v(" Which IDE?")]),e._v(" "),t("p",[e._v("We recommend using Visual Studio 2022 (Windows Only) or Rider (cross platform). Visual Studio Code (cross platform) should also be possible, but isn't as straightforward to setup for a comfortable development environment.\nYou can of course use VIM if you are hardcore, .NET Core is easy to use via command-line.")]),e._v(" "),t("p",[e._v("Visual Studio Code, Visual Studio and Rider will run the launch profile "),t("code",[e._v("Bitcoin")]),e._v(".\nThis will run a "),t("strong",[e._v("BTCPay Server instance connecting to the services in your Docker service")]),e._v(", so you can easily debug and step through the code.")]),e._v(" "),t("h2",{attrs:{id:"build-configuration"}},[t("a",{staticClass:"header-anchor",attrs:{href:"#build-configuration"}},[e._v("#")]),e._v(" Build configuration")]),e._v(" "),t("p",[e._v("A build configuration defines how to "),t("strong",[e._v("build BTCPay Server")]),e._v(". For example, whether to include some source files, whether to optimize for debugging or performance.")]),e._v(" "),t("p",[e._v("There are several build configurations:")]),e._v(" "),t("ul",[t("li",[t("code",[e._v("Debug")])]),e._v(" "),t("li",[t("code",[e._v("Release")])]),e._v(" "),t("li",[t("code",[e._v("Altcoins-Debug")])]),e._v(" "),t("li",[t("code",[e._v("Altcoins-Release")])])]),e._v(" "),t("p",[e._v("How to use a different one during your local development depends on your IDE.\nBy default "),t("code",[e._v("Debug")]),e._v(" is used, this is a Bitcoin only build excluding any altcoin dependencies. How to use a different one during your local development depends on your IDE.")]),e._v(" "),t("p",[e._v("You can select which build to use via the "),t("code",[e._v("-c")]),e._v(" switch in "),t("code",[e._v("dotnet")]),e._v(" command line. If you use command line and want to run a Release build:")]),e._v(" "),t("div",{staticClass:"language-bash extra-class"},[t("pre",{pre:!0,attrs:{class:"language-bash"}},[t("code",[e._v("dotnet run "),t("span",{pre:!0,attrs:{class:"token parameter variable"}},[e._v("-c")]),e._v(" Release\n")])])]),t("h2",{attrs:{id:"launch-profiles"}},[t("a",{staticClass:"header-anchor",attrs:{href:"#launch-profiles"}},[e._v("#")]),e._v(" Launch profiles")]),e._v(" "),t("p",[e._v("When you "),t("strong",[e._v("start BTCPay Server locally for local development")]),e._v(", it needs the right parameter so it can connect to the development time dependencies in the docker-compose file.")]),e._v(" "),t("p",[e._v("Those parameters are wrapped into the dotnet concept of "),t("code",[e._v("launch profile")]),e._v(".")]),e._v(" "),t("p",[e._v("The launch profiles are specified in the "),t("a",{attrs:{href:"https://github.com/btcpayserver/btcpayserver/blob/master/BTCPayServer/Properties/launchSettings.json",target:"_blank",rel:"noopener noreferrer"}},[e._v("launchSettings.json"),t("OutboundLink")],1),e._v(".")]),e._v(" "),t("p",[e._v("There are currently three launch profiles:")]),e._v(" "),t("ul",[t("li",[t("code",[e._v("Bitcoin")])]),e._v(" "),t("li",[t("code",[e._v("Bitcoin-HTTPS")])]),e._v(" "),t("li",[t("code",[e._v("Altcoins-HTTPS")])])]),e._v(" "),t("p",[e._v("By default, "),t("code",[e._v("Bitcoin")]),e._v(" is used. How to use a different one during your local development depends on your IDE.")]),e._v(" "),t("p",[e._v("If you use command line, "),t("code",[e._v("dotnet run")]),e._v(" allows you to select the launch profile of your choice:")]),e._v(" "),t("div",{staticClass:"language-bash extra-class"},[t("pre",{pre:!0,attrs:{class:"language-bash"}},[t("code",[e._v("dotnet run --launch-profile Bitcoin\n")])])]),t("h2",{attrs:{id:"running-tests"}},[t("a",{staticClass:"header-anchor",attrs:{href:"#running-tests"}},[e._v("#")]),e._v(" Running tests")]),e._v(" "),t("p",[e._v("Running tests is functioning in the exact same way as running the development time BTCPay Server.")]),e._v(" "),t("div",{staticClass:"language-bash extra-class"},[t("pre",{pre:!0,attrs:{class:"language-bash"}},[t("code",[t("span",{pre:!0,attrs:{class:"token builtin class-name"}},[e._v("cd")]),e._v(" BTCPayServer.Tests\ndotnet "),t("span",{pre:!0,attrs:{class:"token builtin class-name"}},[e._v("test")]),e._v("\n")])])]),t("p",[e._v("The concept of "),t("code",[e._v("launch profile")]),e._v(" does not apply for tests, but the concept of build configuration does. For example, if I want to run tests on the Release build:")]),e._v(" "),t("div",{staticClass:"language-bash extra-class"},[t("pre",{pre:!0,attrs:{class:"language-bash"}},[t("code",[e._v("dotnet "),t("span",{pre:!0,attrs:{class:"token builtin class-name"}},[e._v("test")]),e._v(" "),t("span",{pre:!0,attrs:{class:"token parameter variable"}},[e._v("-c")]),e._v(" Release\n")])])]),t("p",[e._v("The tests are already configured to use the development time dependencies in the docker-compose presented earlier.")]),e._v(" "),t("p",[e._v("You can use the "),t("code",[e._v("--f")]),e._v(" (filter) switch to run a specific test.")]),e._v(" "),t("p",[e._v("If you use an IDE, consult your IDE documentation to run tests or switch to different configurations.")]),e._v(" "),t("h2",{attrs:{id:"altcoin-support-development"}},[t("a",{staticClass:"header-anchor",attrs:{href:"#altcoin-support-development"}},[e._v("#")]),e._v(" Altcoin support development")]),e._v(" "),t("p",[e._v("By default, your IDE or simple "),t("code",[e._v("dotnet run")]),e._v(" will use "),t("code",[e._v("Bitcoin")]),e._v(" launch profile on "),t("code",[e._v("Debug")]),e._v(" build.")]),e._v(" "),t("ul",[t("li",[e._v("This means that BTCPay Server will be hosted on a local HTTP port, building without altcoin support,")]),e._v(" "),t("li",[e._v("Run BTCPay Server to connect to Bitcoin only dependencies specified in "),t("a",{attrs:{href:"https://github.com/btcpayserver/btcpayserver/blob/master/BTCPayServer.Tests/docker-compose.yml",target:"_blank",rel:"noopener noreferrer"}},[e._v("BTCPayServer.Tests/docker-compose.yml"),t("OutboundLink")],1),e._v(".")])]),e._v(" "),t("p",[e._v("If you want to "),t("strong",[e._v("develop with altcoins support")]),e._v(" you need to use the "),t("code",[e._v("Altcoins-HTTPS")]),e._v(" launch profile, on the "),t("code",[e._v("Altcoins-Debug")]),e._v(" build, and run the "),t("a",{attrs:{href:"https://github.com/btcpayserver/btcpayserver/blob/master/BTCPayServer.Tests/docker-compose.altcoins.yml",target:"_blank",rel:"noopener noreferrer"}},[e._v("BTCPayServer.Tests/docker-compose.altcoins.yml"),t("OutboundLink")],1),e._v(".")]),e._v(" "),t("p",[e._v("If using command line:")]),e._v(" "),t("div",{staticClass:"language-bash extra-class"},[t("pre",{pre:!0,attrs:{class:"language-bash"}},[t("code",[t("span",{pre:!0,attrs:{class:"token builtin class-name"}},[e._v("cd")]),e._v(" BTCPayServer.Tests\n"),t("span",{pre:!0,attrs:{class:"token function"}},[e._v("docker-compose")]),e._v(" "),t("span",{pre:!0,attrs:{class:"token parameter variable"}},[e._v("-f")]),e._v(" docker-compose.altcoins.yml up dev\n"),t("span",{pre:!0,attrs:{class:"token builtin class-name"}},[e._v("cd")]),e._v(" "),t("span",{pre:!0,attrs:{class:"token punctuation"}},[e._v("..")]),e._v("/BTCPayServer\ndotnet run "),t("span",{pre:!0,attrs:{class:"token parameter variable"}},[e._v("-c")]),e._v(" Altcoins-Debug --launch-profile Altcoins-HTTPS\n")])])]),t("p",[e._v("For tests")]),e._v(" "),t("div",{staticClass:"language-bash extra-class"},[t("pre",{pre:!0,attrs:{class:"language-bash"}},[t("code",[t("span",{pre:!0,attrs:{class:"token builtin class-name"}},[e._v("cd")]),e._v(" BTCPayServer.Tests\ndotnet "),t("span",{pre:!0,attrs:{class:"token builtin class-name"}},[e._v("test")]),e._v(" "),t("span",{pre:!0,attrs:{class:"token parameter variable"}},[e._v("-c")]),e._v(" Altcoins-Debug\n")])])]),t("h2",{attrs:{id:"https-support-for-local-development"}},[t("a",{staticClass:"header-anchor",attrs:{href:"#https-support-for-local-development"}},[e._v("#")]),e._v(" HTTPS support for local development")]),e._v(" "),t("p",[e._v("Some browser security features may require that you use "),t("strong",[e._v("HTTPS")]),e._v(" to be properly tested.")]),e._v(" "),t("p",[e._v("In this case, use "),t("code",[e._v("Bitcoin-HTTPS")]),e._v(" (or "),t("code",[e._v("Altcoin-HTTPS")]),e._v(") launch profile. This will create a self signed certificate for your development purpose.")]),e._v(" "),t("p",[e._v("However, your browser will not trust it, making it difficult to debug.")]),e._v(" "),t("p",[e._v("You can instruct your OS to trust this development time certificate by running:")]),e._v(" "),t("div",{staticClass:"language-bash extra-class"},[t("pre",{pre:!0,attrs:{class:"language-bash"}},[t("code",[e._v("dotnet dev-certs https "),t("span",{pre:!0,attrs:{class:"token parameter variable"}},[e._v("--trust")]),e._v("\n")])])]),t("h2",{attrs:{id:"videos"}},[t("a",{staticClass:"header-anchor",attrs:{href:"#videos"}},[e._v("#")]),e._v(" Videos")]),e._v(" "),t("p",[e._v("For more information check out these videos:")]),e._v(" "),t("ul",[t("li",[t("a",{attrs:{href:"https://youtube.com/watch?v=ZePbMPSIvHM",target:"_blank",rel:"noopener noreferrer"}},[e._v("How to contribute to BTCPay Server Development (Windows)"),t("OutboundLink")],1),e._v(" by Nicolas Dorier")]),e._v(" "),t("li",[t("a",{attrs:{href:"https://youtube.com/watch?v=j486T_Rk-yw",target:"_blank",rel:"noopener noreferrer"}},[e._v("Setting up BTCPayServer development environment on Linux (Ubuntu)"),t("OutboundLink")],1),e._v(" by RockStarDev")]),e._v(" "),t("li",[t("a",{attrs:{href:"https://youtube.com/watch?v=GWR_CcMsEV0",target:"_blank",rel:"noopener noreferrer"}},[e._v("BTCPay Server Development - Testing pull request, payments (MacOS)"),t("OutboundLink")],1),e._v(" by Pavlenex")])]),e._v(" "),t("p",[e._v("and these notes:")]),e._v(" "),t("ul",[t("li",[t("a",{attrs:{href:"https://github.com/btcpayserver/btcpayserver/blob/master/BTCPayServer.Tests/README.md",target:"_blank",rel:"noopener noreferrer"}},[e._v("How to get started with development"),t("OutboundLink")],1),e._v(" by Nicolas Dorier (covering relevant docker commands, paying regtest invoices)")])])])}),[],!1,null,null,null);t.default=a.exports}}]); \ No newline at end of file +(window.webpackJsonp=window.webpackJsonp||[]).push([[127],{775:function(e,t,r){"use strict";r.r(t);var s=r(10),a=Object(s.a)({},(function(){var e=this,t=e._self._c;return t("ContentSlotsDistributor",{attrs:{"slot-key":e.$parent.slotKey}},[t("h1",{attrs:{id:"local-development"}},[t("a",{staticClass:"header-anchor",attrs:{href:"#local-development"}},[e._v("#")]),e._v(" Local development")]),e._v(" "),t("h2",{attrs:{id:"prerequisites"}},[t("a",{staticClass:"header-anchor",attrs:{href:"#prerequisites"}},[e._v("#")]),e._v(" Prerequisites")]),e._v(" "),t("p",[e._v("For the "),t("strong",[e._v("development environment")]),e._v(" you need to install these tools:")]),e._v(" "),t("ul",[t("li",[t("a",{attrs:{href:"https://dotnet.microsoft.com/en-us/download/dotnet/8.0",target:"_blank",rel:"noopener noreferrer"}},[e._v(".NET 8.0 SDK"),t("OutboundLink")],1)]),e._v(" "),t("li",[e._v("Docker: "),t("a",{attrs:{href:"https://docs.docker.com/docker-for-windows/install/",target:"_blank",rel:"noopener noreferrer"}},[e._v("Windows"),t("OutboundLink")],1),e._v(" | "),t("a",{attrs:{href:"https://docs.docker.com/docker-for-mac/install/",target:"_blank",rel:"noopener noreferrer"}},[e._v("Mac OS"),t("OutboundLink")],1),e._v(" | "),t("a",{attrs:{href:"https://docs.docker.com/install/linux/docker-ce/ubuntu/",target:"_blank",rel:"noopener noreferrer"}},[e._v("Linux"),t("OutboundLink")],1)])]),e._v(" "),t("h2",{attrs:{id:"dependencies"}},[t("a",{staticClass:"header-anchor",attrs:{href:"#dependencies"}},[e._v("#")]),e._v(" Dependencies")]),e._v(" "),t("p",[e._v("To execute tests and run the project for debugging, you need to run a number of "),t("strong",[e._v("dependencies")]),e._v(".")]),e._v(" "),t("p",[e._v("We wrapped all our dependencies in a docker-compose file that you can use to bootstrap the development environment:\nThe file "),t("a",{attrs:{href:"https://github.com/btcpayserver/btcpayserver/blob/master/BTCPayServer.Tests/docker-compose.yml",target:"_blank",rel:"noopener noreferrer"}},[e._v("BTCPayServer.Tests/docker-compose.yml"),t("OutboundLink")],1),e._v(" can be used to spin everything up:")]),e._v(" "),t("div",{staticClass:"language-bash extra-class"},[t("pre",{pre:!0,attrs:{class:"language-bash"}},[t("code",[t("span",{pre:!0,attrs:{class:"token function"}},[e._v("git")]),e._v(" clone https://github.com/btcpayserver/btcpayserver.git\n"),t("span",{pre:!0,attrs:{class:"token builtin class-name"}},[e._v("cd")]),e._v(" btcpayserver/BTCPayServer.Tests\n"),t("span",{pre:!0,attrs:{class:"token function"}},[e._v("docker-compose")]),e._v(" up dev\n")])])]),t("h2",{attrs:{id:"which-ide"}},[t("a",{staticClass:"header-anchor",attrs:{href:"#which-ide"}},[e._v("#")]),e._v(" Which IDE?")]),e._v(" "),t("p",[e._v("We recommend using Visual Studio 2022 (Windows Only) or Rider (cross platform). Visual Studio Code (cross platform) should also be possible, but isn't as straightforward to setup for a comfortable development environment.\nYou can of course use VIM if you are hardcore, .NET Core is easy to use via command-line.")]),e._v(" "),t("p",[e._v("Visual Studio Code, Visual Studio and Rider will run the launch profile "),t("code",[e._v("Bitcoin")]),e._v(".\nThis will run a "),t("strong",[e._v("BTCPay Server instance connecting to the services in your Docker service")]),e._v(", so you can easily debug and step through the code.")]),e._v(" "),t("h2",{attrs:{id:"build-configuration"}},[t("a",{staticClass:"header-anchor",attrs:{href:"#build-configuration"}},[e._v("#")]),e._v(" Build configuration")]),e._v(" "),t("p",[e._v("A build configuration defines how to "),t("strong",[e._v("build BTCPay Server")]),e._v(". For example, whether to include some source files, whether to optimize for debugging or performance.")]),e._v(" "),t("p",[e._v("There are several build configurations:")]),e._v(" "),t("ul",[t("li",[t("code",[e._v("Debug")])]),e._v(" "),t("li",[t("code",[e._v("Release")])]),e._v(" "),t("li",[t("code",[e._v("Altcoins-Debug")])]),e._v(" "),t("li",[t("code",[e._v("Altcoins-Release")])])]),e._v(" "),t("p",[e._v("How to use a different one during your local development depends on your IDE.\nBy default "),t("code",[e._v("Debug")]),e._v(" is used, this is a Bitcoin only build excluding any altcoin dependencies. How to use a different one during your local development depends on your IDE.")]),e._v(" "),t("p",[e._v("You can select which build to use via the "),t("code",[e._v("-c")]),e._v(" switch in "),t("code",[e._v("dotnet")]),e._v(" command line. If you use command line and want to run a Release build:")]),e._v(" "),t("div",{staticClass:"language-bash extra-class"},[t("pre",{pre:!0,attrs:{class:"language-bash"}},[t("code",[e._v("dotnet run "),t("span",{pre:!0,attrs:{class:"token parameter variable"}},[e._v("-c")]),e._v(" Release\n")])])]),t("h2",{attrs:{id:"launch-profiles"}},[t("a",{staticClass:"header-anchor",attrs:{href:"#launch-profiles"}},[e._v("#")]),e._v(" Launch profiles")]),e._v(" "),t("p",[e._v("When you "),t("strong",[e._v("start BTCPay Server locally for local development")]),e._v(", it needs the right parameter so it can connect to the development time dependencies in the docker-compose file.")]),e._v(" "),t("p",[e._v("Those parameters are wrapped into the dotnet concept of "),t("code",[e._v("launch profile")]),e._v(".")]),e._v(" "),t("p",[e._v("The launch profiles are specified in the "),t("a",{attrs:{href:"https://github.com/btcpayserver/btcpayserver/blob/master/BTCPayServer/Properties/launchSettings.json",target:"_blank",rel:"noopener noreferrer"}},[e._v("launchSettings.json"),t("OutboundLink")],1),e._v(".")]),e._v(" "),t("p",[e._v("There are currently three launch profiles:")]),e._v(" "),t("ul",[t("li",[t("code",[e._v("Bitcoin")])]),e._v(" "),t("li",[t("code",[e._v("Bitcoin-HTTPS")])]),e._v(" "),t("li",[t("code",[e._v("Altcoins-HTTPS")])])]),e._v(" "),t("p",[e._v("By default, "),t("code",[e._v("Bitcoin")]),e._v(" is used. How to use a different one during your local development depends on your IDE.")]),e._v(" "),t("p",[e._v("If you use command line, "),t("code",[e._v("dotnet run")]),e._v(" allows you to select the launch profile of your choice:")]),e._v(" "),t("div",{staticClass:"language-bash extra-class"},[t("pre",{pre:!0,attrs:{class:"language-bash"}},[t("code",[e._v("dotnet run --launch-profile Bitcoin\n")])])]),t("h2",{attrs:{id:"running-tests"}},[t("a",{staticClass:"header-anchor",attrs:{href:"#running-tests"}},[e._v("#")]),e._v(" Running tests")]),e._v(" "),t("p",[e._v("Running tests is functioning in the exact same way as running the development time BTCPay Server.")]),e._v(" "),t("div",{staticClass:"language-bash extra-class"},[t("pre",{pre:!0,attrs:{class:"language-bash"}},[t("code",[t("span",{pre:!0,attrs:{class:"token builtin class-name"}},[e._v("cd")]),e._v(" BTCPayServer.Tests\ndotnet "),t("span",{pre:!0,attrs:{class:"token builtin class-name"}},[e._v("test")]),e._v("\n")])])]),t("p",[e._v("The concept of "),t("code",[e._v("launch profile")]),e._v(" does not apply for tests, but the concept of build configuration does. For example, if I want to run tests on the Release build:")]),e._v(" "),t("div",{staticClass:"language-bash extra-class"},[t("pre",{pre:!0,attrs:{class:"language-bash"}},[t("code",[e._v("dotnet "),t("span",{pre:!0,attrs:{class:"token builtin class-name"}},[e._v("test")]),e._v(" "),t("span",{pre:!0,attrs:{class:"token parameter variable"}},[e._v("-c")]),e._v(" Release\n")])])]),t("p",[e._v("The tests are already configured to use the development time dependencies in the docker-compose presented earlier.")]),e._v(" "),t("p",[e._v("You can use the "),t("code",[e._v("--f")]),e._v(" (filter) switch to run a specific test.")]),e._v(" "),t("p",[e._v("If you use an IDE, consult your IDE documentation to run tests or switch to different configurations.")]),e._v(" "),t("h2",{attrs:{id:"altcoin-support-development"}},[t("a",{staticClass:"header-anchor",attrs:{href:"#altcoin-support-development"}},[e._v("#")]),e._v(" Altcoin support development")]),e._v(" "),t("p",[e._v("By default, your IDE or simple "),t("code",[e._v("dotnet run")]),e._v(" will use "),t("code",[e._v("Bitcoin")]),e._v(" launch profile on "),t("code",[e._v("Debug")]),e._v(" build.")]),e._v(" "),t("ul",[t("li",[e._v("This means that BTCPay Server will be hosted on a local HTTP port, building without altcoin support,")]),e._v(" "),t("li",[e._v("Run BTCPay Server to connect to Bitcoin only dependencies specified in "),t("a",{attrs:{href:"https://github.com/btcpayserver/btcpayserver/blob/master/BTCPayServer.Tests/docker-compose.yml",target:"_blank",rel:"noopener noreferrer"}},[e._v("BTCPayServer.Tests/docker-compose.yml"),t("OutboundLink")],1),e._v(".")])]),e._v(" "),t("p",[e._v("If you want to "),t("strong",[e._v("develop with altcoins support")]),e._v(" you need to use the "),t("code",[e._v("Altcoins-HTTPS")]),e._v(" launch profile, on the "),t("code",[e._v("Altcoins-Debug")]),e._v(" build, and run the "),t("a",{attrs:{href:"https://github.com/btcpayserver/btcpayserver/blob/master/BTCPayServer.Tests/docker-compose.altcoins.yml",target:"_blank",rel:"noopener noreferrer"}},[e._v("BTCPayServer.Tests/docker-compose.altcoins.yml"),t("OutboundLink")],1),e._v(".")]),e._v(" "),t("p",[e._v("If using command line:")]),e._v(" "),t("div",{staticClass:"language-bash extra-class"},[t("pre",{pre:!0,attrs:{class:"language-bash"}},[t("code",[t("span",{pre:!0,attrs:{class:"token builtin class-name"}},[e._v("cd")]),e._v(" BTCPayServer.Tests\n"),t("span",{pre:!0,attrs:{class:"token function"}},[e._v("docker-compose")]),e._v(" "),t("span",{pre:!0,attrs:{class:"token parameter variable"}},[e._v("-f")]),e._v(" docker-compose.altcoins.yml up dev\n"),t("span",{pre:!0,attrs:{class:"token builtin class-name"}},[e._v("cd")]),e._v(" "),t("span",{pre:!0,attrs:{class:"token punctuation"}},[e._v("..")]),e._v("/BTCPayServer\ndotnet run "),t("span",{pre:!0,attrs:{class:"token parameter variable"}},[e._v("-c")]),e._v(" Altcoins-Debug --launch-profile Altcoins-HTTPS\n")])])]),t("p",[e._v("For tests")]),e._v(" "),t("div",{staticClass:"language-bash extra-class"},[t("pre",{pre:!0,attrs:{class:"language-bash"}},[t("code",[t("span",{pre:!0,attrs:{class:"token builtin class-name"}},[e._v("cd")]),e._v(" BTCPayServer.Tests\ndotnet "),t("span",{pre:!0,attrs:{class:"token builtin class-name"}},[e._v("test")]),e._v(" "),t("span",{pre:!0,attrs:{class:"token parameter variable"}},[e._v("-c")]),e._v(" Altcoins-Debug\n")])])]),t("h2",{attrs:{id:"https-support-for-local-development"}},[t("a",{staticClass:"header-anchor",attrs:{href:"#https-support-for-local-development"}},[e._v("#")]),e._v(" HTTPS support for local development")]),e._v(" "),t("p",[e._v("Some browser security features may require that you use "),t("strong",[e._v("HTTPS")]),e._v(" to be properly tested.")]),e._v(" "),t("p",[e._v("In this case, use "),t("code",[e._v("Bitcoin-HTTPS")]),e._v(" (or "),t("code",[e._v("Altcoin-HTTPS")]),e._v(") launch profile. This will create a self signed certificate for your development purpose.")]),e._v(" "),t("p",[e._v("However, your browser will not trust it, making it difficult to debug.")]),e._v(" "),t("p",[e._v("You can instruct your OS to trust this development time certificate by running:")]),e._v(" "),t("div",{staticClass:"language-bash extra-class"},[t("pre",{pre:!0,attrs:{class:"language-bash"}},[t("code",[e._v("dotnet dev-certs https "),t("span",{pre:!0,attrs:{class:"token parameter variable"}},[e._v("--trust")]),e._v("\n")])])]),t("h2",{attrs:{id:"videos"}},[t("a",{staticClass:"header-anchor",attrs:{href:"#videos"}},[e._v("#")]),e._v(" Videos")]),e._v(" "),t("p",[e._v("For more information check out these videos:")]),e._v(" "),t("ul",[t("li",[t("a",{attrs:{href:"https://youtube.com/watch?v=ZePbMPSIvHM",target:"_blank",rel:"noopener noreferrer"}},[e._v("How to contribute to BTCPay Server Development (Windows)"),t("OutboundLink")],1),e._v(" by Nicolas Dorier")]),e._v(" "),t("li",[t("a",{attrs:{href:"https://youtube.com/watch?v=j486T_Rk-yw",target:"_blank",rel:"noopener noreferrer"}},[e._v("Setting up BTCPayServer development environment on Linux (Ubuntu)"),t("OutboundLink")],1),e._v(" by RockStarDev")]),e._v(" "),t("li",[t("a",{attrs:{href:"https://youtube.com/watch?v=GWR_CcMsEV0",target:"_blank",rel:"noopener noreferrer"}},[e._v("BTCPay Server Development - Testing pull request, payments (MacOS)"),t("OutboundLink")],1),e._v(" by Pavlenex")])]),e._v(" "),t("p",[e._v("and these notes:")]),e._v(" "),t("ul",[t("li",[t("a",{attrs:{href:"https://github.com/btcpayserver/btcpayserver/blob/master/BTCPayServer.Tests/README.md",target:"_blank",rel:"noopener noreferrer"}},[e._v("How to get started with development"),t("OutboundLink")],1),e._v(" by Nicolas Dorier (covering relevant docker commands, paying regtest invoices)")])])])}),[],!1,null,null,null);t.default=a.exports}}]); \ No newline at end of file diff --git a/assets/js/128.7b1b9f1c.js b/assets/js/128.e4e2b2fa.js similarity index 99% rename from assets/js/128.7b1b9f1c.js rename to assets/js/128.e4e2b2fa.js index 7e0c0f81b0..ed6fa8a2cb 100644 --- a/assets/js/128.7b1b9f1c.js +++ b/assets/js/128.e4e2b2fa.js @@ -1 +1 @@ -(window.webpackJsonp=window.webpackJsonp||[]).push([[128],{776:function(e,t,s){"use strict";s.r(t);var a=s(10),r=Object(a.a)({},(function(){var e=this,t=e._self._c;return t("ContentSlotsDistributor",{attrs:{"slot-key":e.$parent.slotKey}},[t("h1",{attrs:{id:"local-development"}},[t("a",{staticClass:"header-anchor",attrs:{href:"#local-development"}},[e._v("#")]),e._v(" Local development")]),e._v(" "),t("h2",{attrs:{id:"prerequisites"}},[t("a",{staticClass:"header-anchor",attrs:{href:"#prerequisites"}},[e._v("#")]),e._v(" Prerequisites")]),e._v(" "),t("p",[e._v("For the "),t("strong",[e._v("development environment")]),e._v(" you need to install these tools:")]),e._v(" "),t("ul",[t("li",[t("a",{attrs:{href:"https://dotnet.microsoft.com/en-us/download/dotnet/8.0",target:"_blank",rel:"noopener noreferrer"}},[e._v(".NET 8.0 SDK"),t("OutboundLink")],1)]),e._v(" "),t("li",[e._v("Docker: "),t("a",{attrs:{href:"https://docs.docker.com/docker-for-windows/install/",target:"_blank",rel:"noopener noreferrer"}},[e._v("Windows"),t("OutboundLink")],1),e._v(" | "),t("a",{attrs:{href:"https://docs.docker.com/docker-for-mac/install/",target:"_blank",rel:"noopener noreferrer"}},[e._v("Mac OS"),t("OutboundLink")],1),e._v(" | "),t("a",{attrs:{href:"https://docs.docker.com/install/linux/docker-ce/ubuntu/",target:"_blank",rel:"noopener noreferrer"}},[e._v("Linux"),t("OutboundLink")],1)])]),e._v(" "),t("h2",{attrs:{id:"dependencies"}},[t("a",{staticClass:"header-anchor",attrs:{href:"#dependencies"}},[e._v("#")]),e._v(" Dependencies")]),e._v(" "),t("p",[e._v("To execute tests and run the project for debugging, you need to run a number of "),t("strong",[e._v("dependencies")]),e._v(".")]),e._v(" "),t("p",[e._v("We wrapped all our dependencies in a docker-compose file that you can use to bootstrap the development environment:\nThe file "),t("a",{attrs:{href:"https://github.com/btcpayserver/btcpayserver/blob/master/BTCPayServer.Tests/docker-compose.yml",target:"_blank",rel:"noopener noreferrer"}},[e._v("BTCPayServer.Tests/docker-compose.yml"),t("OutboundLink")],1),e._v(" can be used to spin everything up:")]),e._v(" "),t("div",{staticClass:"language-bash extra-class"},[t("pre",{pre:!0,attrs:{class:"language-bash"}},[t("code",[t("span",{pre:!0,attrs:{class:"token function"}},[e._v("git")]),e._v(" clone https://github.com/btcpayserver/btcpayserver.git\n"),t("span",{pre:!0,attrs:{class:"token builtin class-name"}},[e._v("cd")]),e._v(" btcpayserver/BTCPayServer.Tests\n"),t("span",{pre:!0,attrs:{class:"token function"}},[e._v("docker-compose")]),e._v(" up dev\n")])])]),t("h2",{attrs:{id:"which-ide"}},[t("a",{staticClass:"header-anchor",attrs:{href:"#which-ide"}},[e._v("#")]),e._v(" Which IDE?")]),e._v(" "),t("p",[e._v("We recommend using Visual Studio 2022 (Windows Only) or Rider (cross platform). Visual Studio Code (cross platform) should also be possible, but isn't as straightforward to setup for a comfortable development environment.\nYou can of course use VIM if you are hardcore, .NET Core is easy to use via command-line.")]),e._v(" "),t("p",[e._v("Visual Studio Code, Visual Studio and Rider will run the launch profile "),t("code",[e._v("Bitcoin")]),e._v(".\nThis will run a "),t("strong",[e._v("BTCPay Server instance connecting to the services in your Docker service")]),e._v(", so you can easily debug and step through the code.")]),e._v(" "),t("h2",{attrs:{id:"build-configuration"}},[t("a",{staticClass:"header-anchor",attrs:{href:"#build-configuration"}},[e._v("#")]),e._v(" Build configuration")]),e._v(" "),t("p",[e._v("A build configuration defines how to "),t("strong",[e._v("build BTCPay Server")]),e._v(". For example, whether to include some source files, whether to optimize for debugging or performance.")]),e._v(" "),t("p",[e._v("There are several build configurations:")]),e._v(" "),t("ul",[t("li",[t("code",[e._v("Debug")])]),e._v(" "),t("li",[t("code",[e._v("Release")])]),e._v(" "),t("li",[t("code",[e._v("Altcoins-Debug")])]),e._v(" "),t("li",[t("code",[e._v("Altcoins-Release")])])]),e._v(" "),t("p",[e._v("How to use a different one during your local development depends on your IDE.\nBy default "),t("code",[e._v("Debug")]),e._v(" is used, this is a Bitcoin only build excluding any altcoin dependencies. How to use a different one during your local development depends on your IDE.")]),e._v(" "),t("p",[e._v("You can select which build to use via the "),t("code",[e._v("-c")]),e._v(" switch in "),t("code",[e._v("dotnet")]),e._v(" command line. If you use command line and want to run a Release build:")]),e._v(" "),t("div",{staticClass:"language-bash extra-class"},[t("pre",{pre:!0,attrs:{class:"language-bash"}},[t("code",[e._v("dotnet run "),t("span",{pre:!0,attrs:{class:"token parameter variable"}},[e._v("-c")]),e._v(" Release\n")])])]),t("h2",{attrs:{id:"launch-profiles"}},[t("a",{staticClass:"header-anchor",attrs:{href:"#launch-profiles"}},[e._v("#")]),e._v(" Launch profiles")]),e._v(" "),t("p",[e._v("When you "),t("strong",[e._v("start BTCPay Server locally for local development")]),e._v(", it needs the right parameter so it can connect to the development time dependencies in the docker-compose file.")]),e._v(" "),t("p",[e._v("Those parameters are wrapped into the dotnet concept of "),t("code",[e._v("launch profile")]),e._v(".")]),e._v(" "),t("p",[e._v("The launch profiles are specified in the "),t("a",{attrs:{href:"https://github.com/btcpayserver/btcpayserver/blob/master/BTCPayServer/Properties/launchSettings.json",target:"_blank",rel:"noopener noreferrer"}},[e._v("launchSettings.json"),t("OutboundLink")],1),e._v(".")]),e._v(" "),t("p",[e._v("There are currently three launch profiles:")]),e._v(" "),t("ul",[t("li",[t("code",[e._v("Bitcoin")])]),e._v(" "),t("li",[t("code",[e._v("Bitcoin-HTTPS")])]),e._v(" "),t("li",[t("code",[e._v("Altcoins-HTTPS")])])]),e._v(" "),t("p",[e._v("By default, "),t("code",[e._v("Bitcoin")]),e._v(" is used. How to use a different one during your local development depends on your IDE.")]),e._v(" "),t("p",[e._v("If you use command line, "),t("code",[e._v("dotnet run")]),e._v(" allows you to select the launch profile of your choice:")]),e._v(" "),t("div",{staticClass:"language-bash extra-class"},[t("pre",{pre:!0,attrs:{class:"language-bash"}},[t("code",[e._v("dotnet run --launch-profile Bitcoin\n")])])]),t("h2",{attrs:{id:"running-tests"}},[t("a",{staticClass:"header-anchor",attrs:{href:"#running-tests"}},[e._v("#")]),e._v(" Running tests")]),e._v(" "),t("p",[e._v("Running tests is functioning in the exact same way as running the development time BTCPay Server.")]),e._v(" "),t("div",{staticClass:"language-bash extra-class"},[t("pre",{pre:!0,attrs:{class:"language-bash"}},[t("code",[t("span",{pre:!0,attrs:{class:"token builtin class-name"}},[e._v("cd")]),e._v(" BTCPayServer.Tests\ndotnet "),t("span",{pre:!0,attrs:{class:"token builtin class-name"}},[e._v("test")]),e._v("\n")])])]),t("p",[e._v("The concept of "),t("code",[e._v("launch profile")]),e._v(" does not apply for tests, but the concept of build configuration does. For example, if I want to run tests on the Release build:")]),e._v(" "),t("div",{staticClass:"language-bash extra-class"},[t("pre",{pre:!0,attrs:{class:"language-bash"}},[t("code",[e._v("dotnet "),t("span",{pre:!0,attrs:{class:"token builtin class-name"}},[e._v("test")]),e._v(" "),t("span",{pre:!0,attrs:{class:"token parameter variable"}},[e._v("-c")]),e._v(" Release\n")])])]),t("p",[e._v("The tests are already configured to use the development time dependencies in the docker-compose presented earlier.")]),e._v(" "),t("p",[e._v("You can use the "),t("code",[e._v("--f")]),e._v(" (filter) switch to run a specific test.")]),e._v(" "),t("p",[e._v("If you use an IDE, consult your IDE documentation to run tests or switch to different configurations.")]),e._v(" "),t("h2",{attrs:{id:"altcoin-support-development"}},[t("a",{staticClass:"header-anchor",attrs:{href:"#altcoin-support-development"}},[e._v("#")]),e._v(" Altcoin support development")]),e._v(" "),t("p",[e._v("By default, your IDE or simple "),t("code",[e._v("dotnet run")]),e._v(" will use "),t("code",[e._v("Bitcoin")]),e._v(" launch profile on "),t("code",[e._v("Debug")]),e._v(" build.")]),e._v(" "),t("ul",[t("li",[e._v("This means that BTCPay Server will be hosted on a local HTTP port, building without altcoin support,")]),e._v(" "),t("li",[e._v("Run BTCPay Server to connect to Bitcoin only dependencies specified in "),t("a",{attrs:{href:"https://github.com/btcpayserver/btcpayserver/blob/master/BTCPayServer.Tests/docker-compose.yml",target:"_blank",rel:"noopener noreferrer"}},[e._v("BTCPayServer.Tests/docker-compose.yml"),t("OutboundLink")],1),e._v(".")])]),e._v(" "),t("p",[e._v("If you want to "),t("strong",[e._v("develop with altcoins support")]),e._v(" you need to use the "),t("code",[e._v("Altcoins-HTTPS")]),e._v(" launch profile, on the "),t("code",[e._v("Altcoins-Debug")]),e._v(" build, and run the "),t("a",{attrs:{href:"https://github.com/btcpayserver/btcpayserver/blob/master/BTCPayServer.Tests/docker-compose.altcoins.yml",target:"_blank",rel:"noopener noreferrer"}},[e._v("BTCPayServer.Tests/docker-compose.altcoins.yml"),t("OutboundLink")],1),e._v(".")]),e._v(" "),t("p",[e._v("If using command line:")]),e._v(" "),t("div",{staticClass:"language-bash extra-class"},[t("pre",{pre:!0,attrs:{class:"language-bash"}},[t("code",[t("span",{pre:!0,attrs:{class:"token builtin class-name"}},[e._v("cd")]),e._v(" BTCPayServer.Tests\n"),t("span",{pre:!0,attrs:{class:"token function"}},[e._v("docker-compose")]),e._v(" "),t("span",{pre:!0,attrs:{class:"token parameter variable"}},[e._v("-f")]),e._v(" docker-compose.altcoins.yml up dev\n"),t("span",{pre:!0,attrs:{class:"token builtin class-name"}},[e._v("cd")]),e._v(" "),t("span",{pre:!0,attrs:{class:"token punctuation"}},[e._v("..")]),e._v("/BTCPayServer\ndotnet run "),t("span",{pre:!0,attrs:{class:"token parameter variable"}},[e._v("-c")]),e._v(" Altcoins-Debug --launch-profile Altcoins-HTTPS\n")])])]),t("p",[e._v("For tests")]),e._v(" "),t("div",{staticClass:"language-bash extra-class"},[t("pre",{pre:!0,attrs:{class:"language-bash"}},[t("code",[t("span",{pre:!0,attrs:{class:"token builtin class-name"}},[e._v("cd")]),e._v(" BTCPayServer.Tests\ndotnet "),t("span",{pre:!0,attrs:{class:"token builtin class-name"}},[e._v("test")]),e._v(" "),t("span",{pre:!0,attrs:{class:"token parameter variable"}},[e._v("-c")]),e._v(" Altcoins-Debug\n")])])]),t("h2",{attrs:{id:"https-support-for-local-development"}},[t("a",{staticClass:"header-anchor",attrs:{href:"#https-support-for-local-development"}},[e._v("#")]),e._v(" HTTPS support for local development")]),e._v(" "),t("p",[e._v("Some browser security features may require that you use "),t("strong",[e._v("HTTPS")]),e._v(" to be properly tested.")]),e._v(" "),t("p",[e._v("In this case, use "),t("code",[e._v("Bitcoin-HTTPS")]),e._v(" (or "),t("code",[e._v("Altcoin-HTTPS")]),e._v(") launch profile. This will create a self signed certificate for your development purpose.")]),e._v(" "),t("p",[e._v("However, your browser will not trust it, making it difficult to debug.")]),e._v(" "),t("p",[e._v("You can instruct your OS to trust this development time certificate by running:")]),e._v(" "),t("div",{staticClass:"language-bash extra-class"},[t("pre",{pre:!0,attrs:{class:"language-bash"}},[t("code",[e._v("dotnet dev-certs https "),t("span",{pre:!0,attrs:{class:"token parameter variable"}},[e._v("--trust")]),e._v("\n")])])]),t("h2",{attrs:{id:"videos"}},[t("a",{staticClass:"header-anchor",attrs:{href:"#videos"}},[e._v("#")]),e._v(" Videos")]),e._v(" "),t("p",[e._v("For more information check out these videos:")]),e._v(" "),t("ul",[t("li",[t("a",{attrs:{href:"https://youtube.com/watch?v=ZePbMPSIvHM",target:"_blank",rel:"noopener noreferrer"}},[e._v("How to contribute to BTCPay Server Development (Windows)"),t("OutboundLink")],1),e._v(" by Nicolas Dorier")]),e._v(" "),t("li",[t("a",{attrs:{href:"https://youtube.com/watch?v=j486T_Rk-yw",target:"_blank",rel:"noopener noreferrer"}},[e._v("Setting up BTCPayServer development environment on Linux (Ubuntu)"),t("OutboundLink")],1),e._v(" by RockStarDev")]),e._v(" "),t("li",[t("a",{attrs:{href:"https://youtube.com/watch?v=GWR_CcMsEV0",target:"_blank",rel:"noopener noreferrer"}},[e._v("BTCPay Server Development - Testing pull request, payments (MacOS)"),t("OutboundLink")],1),e._v(" by Pavlenex")])]),e._v(" "),t("p",[e._v("and these notes:")]),e._v(" "),t("ul",[t("li",[t("a",{attrs:{href:"https://github.com/btcpayserver/btcpayserver/blob/master/BTCPayServer.Tests/README.md",target:"_blank",rel:"noopener noreferrer"}},[e._v("How to get started with development"),t("OutboundLink")],1),e._v(" by Nicolas Dorier (covering relevant docker commands, paying regtest invoices)")])]),e._v(" "),t("h2",{attrs:{id:"how-to-manually-test-payments"}},[t("a",{staticClass:"header-anchor",attrs:{href:"#how-to-manually-test-payments"}},[e._v("#")]),e._v(" How to manually test payments")]),e._v(" "),t("h3",{attrs:{id:"using-the-test-bitcoin-cli"}},[t("a",{staticClass:"header-anchor",attrs:{href:"#using-the-test-bitcoin-cli"}},[e._v("#")]),e._v(" Using the test bitcoin-cli")]),e._v(" "),t("p",[e._v("You can call bitcoin-cli inside the container with "),t("code",[e._v("docker exec")]),e._v(".\nFor example, if you want to send "),t("code",[e._v("0.23111090")]),e._v(" to "),t("code",[e._v("mohu16LH66ptoWGEL1GtP6KHTBJYXMWhEf")]),e._v(":")]),e._v(" "),t("div",{staticClass:"language-sh extra-class"},[t("pre",{pre:!0,attrs:{class:"language-sh"}},[t("code",[e._v("./docker-bitcoin-cli.sh sendtoaddress "),t("span",{pre:!0,attrs:{class:"token string"}},[e._v('"mohu16LH66ptoWGEL1GtP6KHTBJYXMWhEf"')]),e._v(" "),t("span",{pre:!0,attrs:{class:"token number"}},[e._v("0.23111090")]),e._v("\n")])])]),t("p",[e._v("If you are using Powershell:")]),e._v(" "),t("div",{staticClass:"language-powershell extra-class"},[t("pre",{pre:!0,attrs:{class:"language-powershell"}},[t("code",[t("span",{pre:!0,attrs:{class:"token punctuation"}},[e._v(".")]),e._v("\\docker-bitcoin-"),t("span",{pre:!0,attrs:{class:"token function"}},[e._v("cli")]),t("span",{pre:!0,attrs:{class:"token punctuation"}},[e._v(".")]),e._v("ps1 sendtoaddress "),t("span",{pre:!0,attrs:{class:"token string"}},[e._v('"mohu16LH66ptoWGEL1GtP6KHTBJYXMWhEf"')]),e._v(" 0"),t("span",{pre:!0,attrs:{class:"token punctuation"}},[e._v(".")]),e._v("23111090\n")])])]),t("p",[e._v("You can also generate blocks:")]),e._v(" "),t("div",{staticClass:"language-powershell extra-class"},[t("pre",{pre:!0,attrs:{class:"language-powershell"}},[t("code",[t("span",{pre:!0,attrs:{class:"token punctuation"}},[e._v(".")]),e._v("\\docker-bitcoin-generate"),t("span",{pre:!0,attrs:{class:"token punctuation"}},[e._v(".")]),e._v("ps1 3\n")])])]),t("h3",{attrs:{id:"using-polar-to-test-lightning-payments"}},[t("a",{staticClass:"header-anchor",attrs:{href:"#using-polar-to-test-lightning-payments"}},[e._v("#")]),e._v(" Using Polar to test Lightning payments")]),e._v(" "),t("ul",[t("li",[e._v("Install and run "),t("a",{attrs:{href:"https://lightningpolar.com/",target:"_blank",rel:"noopener noreferrer"}},[e._v("Polar"),t("OutboundLink")],1),e._v(". Setup a small network of nodes.")]),e._v(" "),t("li",[e._v("Go to your store's General Settings and enable Lightning.")]),e._v(" "),t("li",[e._v("Build your connection string using the Connect information in the Polar app.")])]),e._v(" "),t("p",[e._v('LND Connection string example:\ntype=lnd-rest;server=https://127.0.0.1:8084/;macaroonfilepath="local path to admin.macaroon on your computer, without these quotes";allowinsecure=true')]),e._v(" "),t("p",[e._v("Now you can create a Lightning invoice on BTCPay Server regtest and make a payment through Polar.")]),e._v(" "),t("p",[e._v('PLEASE NOTE: You may get an exception break in Visual Studio. You must quickly click "Continue" in VS so the invoice is generated.\nOr, uncheck the box that says, "Break when this exception type is thrown".')]),e._v(" "),t("h3",{attrs:{id:"using-the-test-litecoin-cli"}},[t("a",{staticClass:"header-anchor",attrs:{href:"#using-the-test-litecoin-cli"}},[e._v("#")]),e._v(" Using the test litecoin-cli")]),e._v(" "),t("p",[e._v("Same as bitcoin-cli, but with "),t("code",[e._v(".\\docker-litecoin-cli.ps1")]),e._v(" and "),t("code",[e._v(".\\docker-litecoin-cli.sh")]),e._v(" instead.")]),e._v(" "),t("h3",{attrs:{id:"using-the-test-lightning-cli"}},[t("a",{staticClass:"header-anchor",attrs:{href:"#using-the-test-lightning-cli"}},[e._v("#")]),e._v(" Using the test lightning-cli")]),e._v(" "),t("p",[e._v("If you are using Linux:")]),e._v(" "),t("div",{staticClass:"language-sh extra-class"},[t("pre",{pre:!0,attrs:{class:"language-sh"}},[t("code",[e._v("./docker-customer-lightning-cli.sh pay lnbcrt100u1pd2e6uspp5ajnadvhazjrz55twd5k6yeg9u87wpw0q2fdr7g960yl5asv5fmnqdq9d3hkccqpxmedyrk0ehw5ueqx5e0r4qrrv74cewddfcvsxaawqz7634cmjj39sqwy5tvhz0hasktkk6t9pqfdh3edmf3z09zst5y7khv3rvxh8ctqqw6mwhh\n")])])]),t("p",[e._v("If you are using Powershell:")]),e._v(" "),t("div",{staticClass:"language-powershell extra-class"},[t("pre",{pre:!0,attrs:{class:"language-powershell"}},[t("code",[t("span",{pre:!0,attrs:{class:"token punctuation"}},[e._v(".")]),e._v("\\docker-customer-lightning-"),t("span",{pre:!0,attrs:{class:"token function"}},[e._v("cli")]),t("span",{pre:!0,attrs:{class:"token punctuation"}},[e._v(".")]),e._v("ps1 pay lnbcrt100u1pd2e6uspp5ajnadvhazjrz55twd5k6yeg9u87wpw0q2fdr7g960yl5asv5fmnqdq9d3hkccqpxmedyrk0ehw5ueqx5e0r4qrrv74cewddfcvsxaawqz7634cmjj39sqwy5tvhz0hasktkk6t9pqfdh3edmf3z09zst5y7khv3rvxh8ctqqw6mwhh\n")])])]),t("p",[e._v("If you get this message:")]),e._v(" "),t("div",{staticClass:"language-json extra-class"},[t("pre",{pre:!0,attrs:{class:"language-json"}},[t("code",[t("span",{pre:!0,attrs:{class:"token punctuation"}},[e._v("{")]),e._v(" "),t("span",{pre:!0,attrs:{class:"token property"}},[e._v('"code"')]),e._v(" "),t("span",{pre:!0,attrs:{class:"token operator"}},[e._v(":")]),e._v(" "),t("span",{pre:!0,attrs:{class:"token number"}},[e._v("205")]),t("span",{pre:!0,attrs:{class:"token punctuation"}},[e._v(",")]),e._v(" "),t("span",{pre:!0,attrs:{class:"token property"}},[e._v('"message"')]),e._v(" "),t("span",{pre:!0,attrs:{class:"token operator"}},[e._v(":")]),e._v(" "),t("span",{pre:!0,attrs:{class:"token string"}},[e._v('"Could not find a route"')]),t("span",{pre:!0,attrs:{class:"token punctuation"}},[e._v(",")]),e._v(" "),t("span",{pre:!0,attrs:{class:"token property"}},[e._v('"data"')]),e._v(" "),t("span",{pre:!0,attrs:{class:"token operator"}},[e._v(":")]),e._v(" "),t("span",{pre:!0,attrs:{class:"token punctuation"}},[e._v("{")]),e._v(" "),t("span",{pre:!0,attrs:{class:"token property"}},[e._v('"getroute_tries"')]),e._v(" "),t("span",{pre:!0,attrs:{class:"token operator"}},[e._v(":")]),e._v(" "),t("span",{pre:!0,attrs:{class:"token number"}},[e._v("1")]),t("span",{pre:!0,attrs:{class:"token punctuation"}},[e._v(",")]),e._v(" "),t("span",{pre:!0,attrs:{class:"token property"}},[e._v('"sendpay_tries"')]),e._v(" "),t("span",{pre:!0,attrs:{class:"token operator"}},[e._v(":")]),e._v(" "),t("span",{pre:!0,attrs:{class:"token number"}},[e._v("0")]),e._v(" "),t("span",{pre:!0,attrs:{class:"token punctuation"}},[e._v("}")]),e._v(" "),t("span",{pre:!0,attrs:{class:"token punctuation"}},[e._v("}")]),e._v("\n")])])]),t("p",[e._v("Please, run the test "),t("code",[e._v("CanSetLightningServer")]),e._v(", this will establish a channel between the customer and the merchant, then, retry.")]),e._v(" "),t("p",[e._v("Alternatively you can run the "),t("code",[e._v("./docker-lightning-channel-setup.sh")]),e._v(" script to establish the channel connection.\nThe "),t("code",[e._v("./docker-lightning-channel-teardown.sh")]),e._v(" script closes any existing lightning channels.")]),e._v(" "),t("h3",{attrs:{id:"alternative-lightning-testing-using-polar-to-test-lightning-payments"}},[t("a",{staticClass:"header-anchor",attrs:{href:"#alternative-lightning-testing-using-polar-to-test-lightning-payments"}},[e._v("#")]),e._v(" Alternative Lightning testing: Using Polar to test Lightning payments")]),e._v(" "),t("ul",[t("li",[e._v("Install and run "),t("a",{attrs:{href:"https://lightningpolar.com/",target:"_blank",rel:"noopener noreferrer"}},[e._v("Polar"),t("OutboundLink")],1),e._v(". Setup a small network of nodes.")]),e._v(" "),t("li",[e._v("Go to your store's General Settings and enable Lightning.")]),e._v(" "),t("li",[e._v("Build your connection string using the Connect information in the Polar app.")])]),e._v(" "),t("p",[e._v('LND Connection string example:\ntype=lnd-rest;server=https://127.0.0.1:8084/;macaroonfilepath="local path to admin.macaroon on your computer, without these quotes";allowinsecure=true')]),e._v(" "),t("p",[e._v("Now you can create a lightning invoice on BTCPay Server regtest and make a payment through Polar.")]),e._v(" "),t("p",[e._v('PLEASE NOTE: You may get an exception break in Visual Studio. You must quickly click "Continue" in VS so the invoice is generated.\nOr, uncheck the box that says, "Break when this exception type is thrown".')]),e._v(" "),t("h2",{attrs:{id:"faq"}},[t("a",{staticClass:"header-anchor",attrs:{href:"#faq"}},[e._v("#")]),e._v(" FAQ")]),e._v(" "),t("h3",{attrs:{id:"docker-compose-up-dev-failed-or-tests-are-not-passing-what-should-i-do"}},[t("a",{staticClass:"header-anchor",attrs:{href:"#docker-compose-up-dev-failed-or-tests-are-not-passing-what-should-i-do"}},[e._v("#")]),e._v(" "),t("code",[e._v("docker-compose up dev")]),e._v(" failed or tests are not passing, what should I do?")]),e._v(" "),t("ol",[t("li",[e._v("Run "),t("code",[e._v("docker-compose down --volumes")]),e._v(" (this will reset your test environment)")]),e._v(" "),t("li",[e._v("Run "),t("code",[e._v("docker-compose pull")]),e._v(" (this will ensure you have the latest images)")]),e._v(" "),t("li",[e._v("Run again with "),t("code",[e._v("docker-compose up dev")])])]),e._v(" "),t("h3",{attrs:{id:"how-to-run-the-altcoin-environment"}},[t("a",{staticClass:"header-anchor",attrs:{href:"#how-to-run-the-altcoin-environment"}},[e._v("#")]),e._v(" How to run the Altcoin environment?")]),e._v(" "),t("p",[t("code",[e._v("docker-compose -f docker-compose.altcoins.yml up dev")])]),e._v(" "),t("p",[e._v("If you still have issues, try to restart docker.")]),e._v(" "),t("h3",{attrs:{id:"how-to-run-the-selenium-test-with-a-browser"}},[t("a",{staticClass:"header-anchor",attrs:{href:"#how-to-run-the-selenium-test-with-a-browser"}},[e._v("#")]),e._v(" How to run the Selenium test with a browser?")]),e._v(" "),t("p",[e._v("Run "),t("code",[e._v("dotnet user-secrets set RunSeleniumInBrowser true")]),e._v(" to run tests in browser.")]),e._v(" "),t("p",[e._v("To switch back to headless mode (recommended) you can run "),t("code",[e._v("dotnet user-secrets remove RunSeleniumInBrowser")]),e._v(".")]),e._v(" "),t("h3",{attrs:{id:"session-not-created-this-version-of-chromedriver-only-supports-chrome-version-88"}},[t("a",{staticClass:"header-anchor",attrs:{href:"#session-not-created-this-version-of-chromedriver-only-supports-chrome-version-88"}},[e._v("#")]),e._v(" Session not created: This version of ChromeDriver only supports Chrome version 88")]),e._v(" "),t("p",[e._v("When you run tests for selenium, you may end up with this error.\nThis happen when we update the selenium packages on BTCPay Server while you did not update your chrome version.")]),e._v(" "),t("p",[e._v("If you want to use a older chrome driver on "),t("a",{attrs:{href:"https://chromedriver.chromium.org/downloads",target:"_blank",rel:"noopener noreferrer"}},[e._v("this page"),t("OutboundLink")],1),e._v(" then point to it with")]),e._v(" "),t("p",[t("code",[e._v('dotnet user-secrets set ChromeDriverDirectory "path/to/the/driver/directory"')])])])}),[],!1,null,null,null);t.default=r.exports}}]); \ No newline at end of file +(window.webpackJsonp=window.webpackJsonp||[]).push([[128],{777:function(e,t,s){"use strict";s.r(t);var a=s(10),r=Object(a.a)({},(function(){var e=this,t=e._self._c;return t("ContentSlotsDistributor",{attrs:{"slot-key":e.$parent.slotKey}},[t("h1",{attrs:{id:"local-development"}},[t("a",{staticClass:"header-anchor",attrs:{href:"#local-development"}},[e._v("#")]),e._v(" Local development")]),e._v(" "),t("h2",{attrs:{id:"prerequisites"}},[t("a",{staticClass:"header-anchor",attrs:{href:"#prerequisites"}},[e._v("#")]),e._v(" Prerequisites")]),e._v(" "),t("p",[e._v("For the "),t("strong",[e._v("development environment")]),e._v(" you need to install these tools:")]),e._v(" "),t("ul",[t("li",[t("a",{attrs:{href:"https://dotnet.microsoft.com/en-us/download/dotnet/8.0",target:"_blank",rel:"noopener noreferrer"}},[e._v(".NET 8.0 SDK"),t("OutboundLink")],1)]),e._v(" "),t("li",[e._v("Docker: "),t("a",{attrs:{href:"https://docs.docker.com/docker-for-windows/install/",target:"_blank",rel:"noopener noreferrer"}},[e._v("Windows"),t("OutboundLink")],1),e._v(" | "),t("a",{attrs:{href:"https://docs.docker.com/docker-for-mac/install/",target:"_blank",rel:"noopener noreferrer"}},[e._v("Mac OS"),t("OutboundLink")],1),e._v(" | "),t("a",{attrs:{href:"https://docs.docker.com/install/linux/docker-ce/ubuntu/",target:"_blank",rel:"noopener noreferrer"}},[e._v("Linux"),t("OutboundLink")],1)])]),e._v(" "),t("h2",{attrs:{id:"dependencies"}},[t("a",{staticClass:"header-anchor",attrs:{href:"#dependencies"}},[e._v("#")]),e._v(" Dependencies")]),e._v(" "),t("p",[e._v("To execute tests and run the project for debugging, you need to run a number of "),t("strong",[e._v("dependencies")]),e._v(".")]),e._v(" "),t("p",[e._v("We wrapped all our dependencies in a docker-compose file that you can use to bootstrap the development environment:\nThe file "),t("a",{attrs:{href:"https://github.com/btcpayserver/btcpayserver/blob/master/BTCPayServer.Tests/docker-compose.yml",target:"_blank",rel:"noopener noreferrer"}},[e._v("BTCPayServer.Tests/docker-compose.yml"),t("OutboundLink")],1),e._v(" can be used to spin everything up:")]),e._v(" "),t("div",{staticClass:"language-bash extra-class"},[t("pre",{pre:!0,attrs:{class:"language-bash"}},[t("code",[t("span",{pre:!0,attrs:{class:"token function"}},[e._v("git")]),e._v(" clone https://github.com/btcpayserver/btcpayserver.git\n"),t("span",{pre:!0,attrs:{class:"token builtin class-name"}},[e._v("cd")]),e._v(" btcpayserver/BTCPayServer.Tests\n"),t("span",{pre:!0,attrs:{class:"token function"}},[e._v("docker-compose")]),e._v(" up dev\n")])])]),t("h2",{attrs:{id:"which-ide"}},[t("a",{staticClass:"header-anchor",attrs:{href:"#which-ide"}},[e._v("#")]),e._v(" Which IDE?")]),e._v(" "),t("p",[e._v("We recommend using Visual Studio 2022 (Windows Only) or Rider (cross platform). Visual Studio Code (cross platform) should also be possible, but isn't as straightforward to setup for a comfortable development environment.\nYou can of course use VIM if you are hardcore, .NET Core is easy to use via command-line.")]),e._v(" "),t("p",[e._v("Visual Studio Code, Visual Studio and Rider will run the launch profile "),t("code",[e._v("Bitcoin")]),e._v(".\nThis will run a "),t("strong",[e._v("BTCPay Server instance connecting to the services in your Docker service")]),e._v(", so you can easily debug and step through the code.")]),e._v(" "),t("h2",{attrs:{id:"build-configuration"}},[t("a",{staticClass:"header-anchor",attrs:{href:"#build-configuration"}},[e._v("#")]),e._v(" Build configuration")]),e._v(" "),t("p",[e._v("A build configuration defines how to "),t("strong",[e._v("build BTCPay Server")]),e._v(". For example, whether to include some source files, whether to optimize for debugging or performance.")]),e._v(" "),t("p",[e._v("There are several build configurations:")]),e._v(" "),t("ul",[t("li",[t("code",[e._v("Debug")])]),e._v(" "),t("li",[t("code",[e._v("Release")])]),e._v(" "),t("li",[t("code",[e._v("Altcoins-Debug")])]),e._v(" "),t("li",[t("code",[e._v("Altcoins-Release")])])]),e._v(" "),t("p",[e._v("How to use a different one during your local development depends on your IDE.\nBy default "),t("code",[e._v("Debug")]),e._v(" is used, this is a Bitcoin only build excluding any altcoin dependencies. How to use a different one during your local development depends on your IDE.")]),e._v(" "),t("p",[e._v("You can select which build to use via the "),t("code",[e._v("-c")]),e._v(" switch in "),t("code",[e._v("dotnet")]),e._v(" command line. If you use command line and want to run a Release build:")]),e._v(" "),t("div",{staticClass:"language-bash extra-class"},[t("pre",{pre:!0,attrs:{class:"language-bash"}},[t("code",[e._v("dotnet run "),t("span",{pre:!0,attrs:{class:"token parameter variable"}},[e._v("-c")]),e._v(" Release\n")])])]),t("h2",{attrs:{id:"launch-profiles"}},[t("a",{staticClass:"header-anchor",attrs:{href:"#launch-profiles"}},[e._v("#")]),e._v(" Launch profiles")]),e._v(" "),t("p",[e._v("When you "),t("strong",[e._v("start BTCPay Server locally for local development")]),e._v(", it needs the right parameter so it can connect to the development time dependencies in the docker-compose file.")]),e._v(" "),t("p",[e._v("Those parameters are wrapped into the dotnet concept of "),t("code",[e._v("launch profile")]),e._v(".")]),e._v(" "),t("p",[e._v("The launch profiles are specified in the "),t("a",{attrs:{href:"https://github.com/btcpayserver/btcpayserver/blob/master/BTCPayServer/Properties/launchSettings.json",target:"_blank",rel:"noopener noreferrer"}},[e._v("launchSettings.json"),t("OutboundLink")],1),e._v(".")]),e._v(" "),t("p",[e._v("There are currently three launch profiles:")]),e._v(" "),t("ul",[t("li",[t("code",[e._v("Bitcoin")])]),e._v(" "),t("li",[t("code",[e._v("Bitcoin-HTTPS")])]),e._v(" "),t("li",[t("code",[e._v("Altcoins-HTTPS")])])]),e._v(" "),t("p",[e._v("By default, "),t("code",[e._v("Bitcoin")]),e._v(" is used. How to use a different one during your local development depends on your IDE.")]),e._v(" "),t("p",[e._v("If you use command line, "),t("code",[e._v("dotnet run")]),e._v(" allows you to select the launch profile of your choice:")]),e._v(" "),t("div",{staticClass:"language-bash extra-class"},[t("pre",{pre:!0,attrs:{class:"language-bash"}},[t("code",[e._v("dotnet run --launch-profile Bitcoin\n")])])]),t("h2",{attrs:{id:"running-tests"}},[t("a",{staticClass:"header-anchor",attrs:{href:"#running-tests"}},[e._v("#")]),e._v(" Running tests")]),e._v(" "),t("p",[e._v("Running tests is functioning in the exact same way as running the development time BTCPay Server.")]),e._v(" "),t("div",{staticClass:"language-bash extra-class"},[t("pre",{pre:!0,attrs:{class:"language-bash"}},[t("code",[t("span",{pre:!0,attrs:{class:"token builtin class-name"}},[e._v("cd")]),e._v(" BTCPayServer.Tests\ndotnet "),t("span",{pre:!0,attrs:{class:"token builtin class-name"}},[e._v("test")]),e._v("\n")])])]),t("p",[e._v("The concept of "),t("code",[e._v("launch profile")]),e._v(" does not apply for tests, but the concept of build configuration does. For example, if I want to run tests on the Release build:")]),e._v(" "),t("div",{staticClass:"language-bash extra-class"},[t("pre",{pre:!0,attrs:{class:"language-bash"}},[t("code",[e._v("dotnet "),t("span",{pre:!0,attrs:{class:"token builtin class-name"}},[e._v("test")]),e._v(" "),t("span",{pre:!0,attrs:{class:"token parameter variable"}},[e._v("-c")]),e._v(" Release\n")])])]),t("p",[e._v("The tests are already configured to use the development time dependencies in the docker-compose presented earlier.")]),e._v(" "),t("p",[e._v("You can use the "),t("code",[e._v("--f")]),e._v(" (filter) switch to run a specific test.")]),e._v(" "),t("p",[e._v("If you use an IDE, consult your IDE documentation to run tests or switch to different configurations.")]),e._v(" "),t("h2",{attrs:{id:"altcoin-support-development"}},[t("a",{staticClass:"header-anchor",attrs:{href:"#altcoin-support-development"}},[e._v("#")]),e._v(" Altcoin support development")]),e._v(" "),t("p",[e._v("By default, your IDE or simple "),t("code",[e._v("dotnet run")]),e._v(" will use "),t("code",[e._v("Bitcoin")]),e._v(" launch profile on "),t("code",[e._v("Debug")]),e._v(" build.")]),e._v(" "),t("ul",[t("li",[e._v("This means that BTCPay Server will be hosted on a local HTTP port, building without altcoin support,")]),e._v(" "),t("li",[e._v("Run BTCPay Server to connect to Bitcoin only dependencies specified in "),t("a",{attrs:{href:"https://github.com/btcpayserver/btcpayserver/blob/master/BTCPayServer.Tests/docker-compose.yml",target:"_blank",rel:"noopener noreferrer"}},[e._v("BTCPayServer.Tests/docker-compose.yml"),t("OutboundLink")],1),e._v(".")])]),e._v(" "),t("p",[e._v("If you want to "),t("strong",[e._v("develop with altcoins support")]),e._v(" you need to use the "),t("code",[e._v("Altcoins-HTTPS")]),e._v(" launch profile, on the "),t("code",[e._v("Altcoins-Debug")]),e._v(" build, and run the "),t("a",{attrs:{href:"https://github.com/btcpayserver/btcpayserver/blob/master/BTCPayServer.Tests/docker-compose.altcoins.yml",target:"_blank",rel:"noopener noreferrer"}},[e._v("BTCPayServer.Tests/docker-compose.altcoins.yml"),t("OutboundLink")],1),e._v(".")]),e._v(" "),t("p",[e._v("If using command line:")]),e._v(" "),t("div",{staticClass:"language-bash extra-class"},[t("pre",{pre:!0,attrs:{class:"language-bash"}},[t("code",[t("span",{pre:!0,attrs:{class:"token builtin class-name"}},[e._v("cd")]),e._v(" BTCPayServer.Tests\n"),t("span",{pre:!0,attrs:{class:"token function"}},[e._v("docker-compose")]),e._v(" "),t("span",{pre:!0,attrs:{class:"token parameter variable"}},[e._v("-f")]),e._v(" docker-compose.altcoins.yml up dev\n"),t("span",{pre:!0,attrs:{class:"token builtin class-name"}},[e._v("cd")]),e._v(" "),t("span",{pre:!0,attrs:{class:"token punctuation"}},[e._v("..")]),e._v("/BTCPayServer\ndotnet run "),t("span",{pre:!0,attrs:{class:"token parameter variable"}},[e._v("-c")]),e._v(" Altcoins-Debug --launch-profile Altcoins-HTTPS\n")])])]),t("p",[e._v("For tests")]),e._v(" "),t("div",{staticClass:"language-bash extra-class"},[t("pre",{pre:!0,attrs:{class:"language-bash"}},[t("code",[t("span",{pre:!0,attrs:{class:"token builtin class-name"}},[e._v("cd")]),e._v(" BTCPayServer.Tests\ndotnet "),t("span",{pre:!0,attrs:{class:"token builtin class-name"}},[e._v("test")]),e._v(" "),t("span",{pre:!0,attrs:{class:"token parameter variable"}},[e._v("-c")]),e._v(" Altcoins-Debug\n")])])]),t("h2",{attrs:{id:"https-support-for-local-development"}},[t("a",{staticClass:"header-anchor",attrs:{href:"#https-support-for-local-development"}},[e._v("#")]),e._v(" HTTPS support for local development")]),e._v(" "),t("p",[e._v("Some browser security features may require that you use "),t("strong",[e._v("HTTPS")]),e._v(" to be properly tested.")]),e._v(" "),t("p",[e._v("In this case, use "),t("code",[e._v("Bitcoin-HTTPS")]),e._v(" (or "),t("code",[e._v("Altcoin-HTTPS")]),e._v(") launch profile. This will create a self signed certificate for your development purpose.")]),e._v(" "),t("p",[e._v("However, your browser will not trust it, making it difficult to debug.")]),e._v(" "),t("p",[e._v("You can instruct your OS to trust this development time certificate by running:")]),e._v(" "),t("div",{staticClass:"language-bash extra-class"},[t("pre",{pre:!0,attrs:{class:"language-bash"}},[t("code",[e._v("dotnet dev-certs https "),t("span",{pre:!0,attrs:{class:"token parameter variable"}},[e._v("--trust")]),e._v("\n")])])]),t("h2",{attrs:{id:"videos"}},[t("a",{staticClass:"header-anchor",attrs:{href:"#videos"}},[e._v("#")]),e._v(" Videos")]),e._v(" "),t("p",[e._v("For more information check out these videos:")]),e._v(" "),t("ul",[t("li",[t("a",{attrs:{href:"https://youtube.com/watch?v=ZePbMPSIvHM",target:"_blank",rel:"noopener noreferrer"}},[e._v("How to contribute to BTCPay Server Development (Windows)"),t("OutboundLink")],1),e._v(" by Nicolas Dorier")]),e._v(" "),t("li",[t("a",{attrs:{href:"https://youtube.com/watch?v=j486T_Rk-yw",target:"_blank",rel:"noopener noreferrer"}},[e._v("Setting up BTCPayServer development environment on Linux (Ubuntu)"),t("OutboundLink")],1),e._v(" by RockStarDev")]),e._v(" "),t("li",[t("a",{attrs:{href:"https://youtube.com/watch?v=GWR_CcMsEV0",target:"_blank",rel:"noopener noreferrer"}},[e._v("BTCPay Server Development - Testing pull request, payments (MacOS)"),t("OutboundLink")],1),e._v(" by Pavlenex")])]),e._v(" "),t("p",[e._v("and these notes:")]),e._v(" "),t("ul",[t("li",[t("a",{attrs:{href:"https://github.com/btcpayserver/btcpayserver/blob/master/BTCPayServer.Tests/README.md",target:"_blank",rel:"noopener noreferrer"}},[e._v("How to get started with development"),t("OutboundLink")],1),e._v(" by Nicolas Dorier (covering relevant docker commands, paying regtest invoices)")])]),e._v(" "),t("h2",{attrs:{id:"how-to-manually-test-payments"}},[t("a",{staticClass:"header-anchor",attrs:{href:"#how-to-manually-test-payments"}},[e._v("#")]),e._v(" How to manually test payments")]),e._v(" "),t("h3",{attrs:{id:"using-the-test-bitcoin-cli"}},[t("a",{staticClass:"header-anchor",attrs:{href:"#using-the-test-bitcoin-cli"}},[e._v("#")]),e._v(" Using the test bitcoin-cli")]),e._v(" "),t("p",[e._v("You can call bitcoin-cli inside the container with "),t("code",[e._v("docker exec")]),e._v(".\nFor example, if you want to send "),t("code",[e._v("0.23111090")]),e._v(" to "),t("code",[e._v("mohu16LH66ptoWGEL1GtP6KHTBJYXMWhEf")]),e._v(":")]),e._v(" "),t("div",{staticClass:"language-sh extra-class"},[t("pre",{pre:!0,attrs:{class:"language-sh"}},[t("code",[e._v("./docker-bitcoin-cli.sh sendtoaddress "),t("span",{pre:!0,attrs:{class:"token string"}},[e._v('"mohu16LH66ptoWGEL1GtP6KHTBJYXMWhEf"')]),e._v(" "),t("span",{pre:!0,attrs:{class:"token number"}},[e._v("0.23111090")]),e._v("\n")])])]),t("p",[e._v("If you are using Powershell:")]),e._v(" "),t("div",{staticClass:"language-powershell extra-class"},[t("pre",{pre:!0,attrs:{class:"language-powershell"}},[t("code",[t("span",{pre:!0,attrs:{class:"token punctuation"}},[e._v(".")]),e._v("\\docker-bitcoin-"),t("span",{pre:!0,attrs:{class:"token function"}},[e._v("cli")]),t("span",{pre:!0,attrs:{class:"token punctuation"}},[e._v(".")]),e._v("ps1 sendtoaddress "),t("span",{pre:!0,attrs:{class:"token string"}},[e._v('"mohu16LH66ptoWGEL1GtP6KHTBJYXMWhEf"')]),e._v(" 0"),t("span",{pre:!0,attrs:{class:"token punctuation"}},[e._v(".")]),e._v("23111090\n")])])]),t("p",[e._v("You can also generate blocks:")]),e._v(" "),t("div",{staticClass:"language-powershell extra-class"},[t("pre",{pre:!0,attrs:{class:"language-powershell"}},[t("code",[t("span",{pre:!0,attrs:{class:"token punctuation"}},[e._v(".")]),e._v("\\docker-bitcoin-generate"),t("span",{pre:!0,attrs:{class:"token punctuation"}},[e._v(".")]),e._v("ps1 3\n")])])]),t("h3",{attrs:{id:"using-polar-to-test-lightning-payments"}},[t("a",{staticClass:"header-anchor",attrs:{href:"#using-polar-to-test-lightning-payments"}},[e._v("#")]),e._v(" Using Polar to test Lightning payments")]),e._v(" "),t("ul",[t("li",[e._v("Install and run "),t("a",{attrs:{href:"https://lightningpolar.com/",target:"_blank",rel:"noopener noreferrer"}},[e._v("Polar"),t("OutboundLink")],1),e._v(". Setup a small network of nodes.")]),e._v(" "),t("li",[e._v("Go to your store's General Settings and enable Lightning.")]),e._v(" "),t("li",[e._v("Build your connection string using the Connect information in the Polar app.")])]),e._v(" "),t("p",[e._v('LND Connection string example:\ntype=lnd-rest;server=https://127.0.0.1:8084/;macaroonfilepath="local path to admin.macaroon on your computer, without these quotes";allowinsecure=true')]),e._v(" "),t("p",[e._v("Now you can create a Lightning invoice on BTCPay Server regtest and make a payment through Polar.")]),e._v(" "),t("p",[e._v('PLEASE NOTE: You may get an exception break in Visual Studio. You must quickly click "Continue" in VS so the invoice is generated.\nOr, uncheck the box that says, "Break when this exception type is thrown".')]),e._v(" "),t("h3",{attrs:{id:"using-the-test-litecoin-cli"}},[t("a",{staticClass:"header-anchor",attrs:{href:"#using-the-test-litecoin-cli"}},[e._v("#")]),e._v(" Using the test litecoin-cli")]),e._v(" "),t("p",[e._v("Same as bitcoin-cli, but with "),t("code",[e._v(".\\docker-litecoin-cli.ps1")]),e._v(" and "),t("code",[e._v(".\\docker-litecoin-cli.sh")]),e._v(" instead.")]),e._v(" "),t("h3",{attrs:{id:"using-the-test-lightning-cli"}},[t("a",{staticClass:"header-anchor",attrs:{href:"#using-the-test-lightning-cli"}},[e._v("#")]),e._v(" Using the test lightning-cli")]),e._v(" "),t("p",[e._v("If you are using Linux:")]),e._v(" "),t("div",{staticClass:"language-sh extra-class"},[t("pre",{pre:!0,attrs:{class:"language-sh"}},[t("code",[e._v("./docker-customer-lightning-cli.sh pay lnbcrt100u1pd2e6uspp5ajnadvhazjrz55twd5k6yeg9u87wpw0q2fdr7g960yl5asv5fmnqdq9d3hkccqpxmedyrk0ehw5ueqx5e0r4qrrv74cewddfcvsxaawqz7634cmjj39sqwy5tvhz0hasktkk6t9pqfdh3edmf3z09zst5y7khv3rvxh8ctqqw6mwhh\n")])])]),t("p",[e._v("If you are using Powershell:")]),e._v(" "),t("div",{staticClass:"language-powershell extra-class"},[t("pre",{pre:!0,attrs:{class:"language-powershell"}},[t("code",[t("span",{pre:!0,attrs:{class:"token punctuation"}},[e._v(".")]),e._v("\\docker-customer-lightning-"),t("span",{pre:!0,attrs:{class:"token function"}},[e._v("cli")]),t("span",{pre:!0,attrs:{class:"token punctuation"}},[e._v(".")]),e._v("ps1 pay lnbcrt100u1pd2e6uspp5ajnadvhazjrz55twd5k6yeg9u87wpw0q2fdr7g960yl5asv5fmnqdq9d3hkccqpxmedyrk0ehw5ueqx5e0r4qrrv74cewddfcvsxaawqz7634cmjj39sqwy5tvhz0hasktkk6t9pqfdh3edmf3z09zst5y7khv3rvxh8ctqqw6mwhh\n")])])]),t("p",[e._v("If you get this message:")]),e._v(" "),t("div",{staticClass:"language-json extra-class"},[t("pre",{pre:!0,attrs:{class:"language-json"}},[t("code",[t("span",{pre:!0,attrs:{class:"token punctuation"}},[e._v("{")]),e._v(" "),t("span",{pre:!0,attrs:{class:"token property"}},[e._v('"code"')]),e._v(" "),t("span",{pre:!0,attrs:{class:"token operator"}},[e._v(":")]),e._v(" "),t("span",{pre:!0,attrs:{class:"token number"}},[e._v("205")]),t("span",{pre:!0,attrs:{class:"token punctuation"}},[e._v(",")]),e._v(" "),t("span",{pre:!0,attrs:{class:"token property"}},[e._v('"message"')]),e._v(" "),t("span",{pre:!0,attrs:{class:"token operator"}},[e._v(":")]),e._v(" "),t("span",{pre:!0,attrs:{class:"token string"}},[e._v('"Could not find a route"')]),t("span",{pre:!0,attrs:{class:"token punctuation"}},[e._v(",")]),e._v(" "),t("span",{pre:!0,attrs:{class:"token property"}},[e._v('"data"')]),e._v(" "),t("span",{pre:!0,attrs:{class:"token operator"}},[e._v(":")]),e._v(" "),t("span",{pre:!0,attrs:{class:"token punctuation"}},[e._v("{")]),e._v(" "),t("span",{pre:!0,attrs:{class:"token property"}},[e._v('"getroute_tries"')]),e._v(" "),t("span",{pre:!0,attrs:{class:"token operator"}},[e._v(":")]),e._v(" "),t("span",{pre:!0,attrs:{class:"token number"}},[e._v("1")]),t("span",{pre:!0,attrs:{class:"token punctuation"}},[e._v(",")]),e._v(" "),t("span",{pre:!0,attrs:{class:"token property"}},[e._v('"sendpay_tries"')]),e._v(" "),t("span",{pre:!0,attrs:{class:"token operator"}},[e._v(":")]),e._v(" "),t("span",{pre:!0,attrs:{class:"token number"}},[e._v("0")]),e._v(" "),t("span",{pre:!0,attrs:{class:"token punctuation"}},[e._v("}")]),e._v(" "),t("span",{pre:!0,attrs:{class:"token punctuation"}},[e._v("}")]),e._v("\n")])])]),t("p",[e._v("Please, run the test "),t("code",[e._v("CanSetLightningServer")]),e._v(", this will establish a channel between the customer and the merchant, then, retry.")]),e._v(" "),t("p",[e._v("Alternatively you can run the "),t("code",[e._v("./docker-lightning-channel-setup.sh")]),e._v(" script to establish the channel connection.\nThe "),t("code",[e._v("./docker-lightning-channel-teardown.sh")]),e._v(" script closes any existing lightning channels.")]),e._v(" "),t("h3",{attrs:{id:"alternative-lightning-testing-using-polar-to-test-lightning-payments"}},[t("a",{staticClass:"header-anchor",attrs:{href:"#alternative-lightning-testing-using-polar-to-test-lightning-payments"}},[e._v("#")]),e._v(" Alternative Lightning testing: Using Polar to test Lightning payments")]),e._v(" "),t("ul",[t("li",[e._v("Install and run "),t("a",{attrs:{href:"https://lightningpolar.com/",target:"_blank",rel:"noopener noreferrer"}},[e._v("Polar"),t("OutboundLink")],1),e._v(". Setup a small network of nodes.")]),e._v(" "),t("li",[e._v("Go to your store's General Settings and enable Lightning.")]),e._v(" "),t("li",[e._v("Build your connection string using the Connect information in the Polar app.")])]),e._v(" "),t("p",[e._v('LND Connection string example:\ntype=lnd-rest;server=https://127.0.0.1:8084/;macaroonfilepath="local path to admin.macaroon on your computer, without these quotes";allowinsecure=true')]),e._v(" "),t("p",[e._v("Now you can create a lightning invoice on BTCPay Server regtest and make a payment through Polar.")]),e._v(" "),t("p",[e._v('PLEASE NOTE: You may get an exception break in Visual Studio. You must quickly click "Continue" in VS so the invoice is generated.\nOr, uncheck the box that says, "Break when this exception type is thrown".')]),e._v(" "),t("h2",{attrs:{id:"faq"}},[t("a",{staticClass:"header-anchor",attrs:{href:"#faq"}},[e._v("#")]),e._v(" FAQ")]),e._v(" "),t("h3",{attrs:{id:"docker-compose-up-dev-failed-or-tests-are-not-passing-what-should-i-do"}},[t("a",{staticClass:"header-anchor",attrs:{href:"#docker-compose-up-dev-failed-or-tests-are-not-passing-what-should-i-do"}},[e._v("#")]),e._v(" "),t("code",[e._v("docker-compose up dev")]),e._v(" failed or tests are not passing, what should I do?")]),e._v(" "),t("ol",[t("li",[e._v("Run "),t("code",[e._v("docker-compose down --volumes")]),e._v(" (this will reset your test environment)")]),e._v(" "),t("li",[e._v("Run "),t("code",[e._v("docker-compose pull")]),e._v(" (this will ensure you have the latest images)")]),e._v(" "),t("li",[e._v("Run again with "),t("code",[e._v("docker-compose up dev")])])]),e._v(" "),t("h3",{attrs:{id:"how-to-run-the-altcoin-environment"}},[t("a",{staticClass:"header-anchor",attrs:{href:"#how-to-run-the-altcoin-environment"}},[e._v("#")]),e._v(" How to run the Altcoin environment?")]),e._v(" "),t("p",[t("code",[e._v("docker-compose -f docker-compose.altcoins.yml up dev")])]),e._v(" "),t("p",[e._v("If you still have issues, try to restart docker.")]),e._v(" "),t("h3",{attrs:{id:"how-to-run-the-selenium-test-with-a-browser"}},[t("a",{staticClass:"header-anchor",attrs:{href:"#how-to-run-the-selenium-test-with-a-browser"}},[e._v("#")]),e._v(" How to run the Selenium test with a browser?")]),e._v(" "),t("p",[e._v("Run "),t("code",[e._v("dotnet user-secrets set RunSeleniumInBrowser true")]),e._v(" to run tests in browser.")]),e._v(" "),t("p",[e._v("To switch back to headless mode (recommended) you can run "),t("code",[e._v("dotnet user-secrets remove RunSeleniumInBrowser")]),e._v(".")]),e._v(" "),t("h3",{attrs:{id:"session-not-created-this-version-of-chromedriver-only-supports-chrome-version-88"}},[t("a",{staticClass:"header-anchor",attrs:{href:"#session-not-created-this-version-of-chromedriver-only-supports-chrome-version-88"}},[e._v("#")]),e._v(" Session not created: This version of ChromeDriver only supports Chrome version 88")]),e._v(" "),t("p",[e._v("When you run tests for selenium, you may end up with this error.\nThis happen when we update the selenium packages on BTCPay Server while you did not update your chrome version.")]),e._v(" "),t("p",[e._v("If you want to use a older chrome driver on "),t("a",{attrs:{href:"https://chromedriver.chromium.org/downloads",target:"_blank",rel:"noopener noreferrer"}},[e._v("this page"),t("OutboundLink")],1),e._v(" then point to it with")]),e._v(" "),t("p",[t("code",[e._v('dotnet user-secrets set ChromeDriverDirectory "path/to/the/driver/directory"')])])])}),[],!1,null,null,null);t.default=r.exports}}]); \ No newline at end of file diff --git a/assets/js/129.6748d4ca.js b/assets/js/129.939d6d01.js similarity index 98% rename from assets/js/129.6748d4ca.js rename to assets/js/129.939d6d01.js index 0ed5b1a160..d9fe384d2c 100644 --- a/assets/js/129.6748d4ca.js +++ b/assets/js/129.939d6d01.js @@ -1 +1 @@ -(window.webpackJsonp=window.webpackJsonp||[]).push([[129],{778:function(e,t,r){"use strict";r.r(t);var o=r(10),n=Object(o.a)({},(function(){var e=this,t=e._self._c;return t("ContentSlotsDistributor",{attrs:{"slot-key":e.$parent.slotKey}},[t("h1",{attrs:{id:"testnet-demo"}},[t("a",{staticClass:"header-anchor",attrs:{href:"#testnet-demo"}},[e._v("#")]),e._v(" Testnet demo")]),e._v(" "),t("p",[e._v("First let's create a new store:")]),e._v(" "),t("ol",[t("li",[e._v("Go to the "),t("a",{attrs:{href:"https://testnet.demo.btcpayserver.org/",target:"_blank",rel:"noopener noreferrer"}},[e._v("Testnet website"),t("OutboundLink")],1)]),e._v(" "),t("li",[e._v("On the right side click on "),t("strong",[e._v("Create an account")]),e._v(" to "),t("a",{attrs:{href:"https://testnet.demo.btcpayserver.org/register",target:"_blank",rel:"noopener noreferrer"}},[e._v("create an account"),t("OutboundLink")],1),e._v(" or "),t("strong",[e._v("Sign In")]),e._v(" if you already have an account.")]),e._v(" "),t("li",[e._v("After having signed in, create a new store.")])]),e._v(" "),t("p",[e._v("Let's use Electrum to create a testnet wallet for your store:")]),e._v(" "),t("ol",[t("li",[e._v("Download "),t("a",{attrs:{href:"https://electrum.org",target:"_blank",rel:"noopener noreferrer"}},[e._v("Electrum"),t("OutboundLink")],1)]),e._v(" "),t("li",[e._v("Run Electrum with parameter "),t("code",[e._v("--testnet")]),e._v(" (i.e. on Mac OS using "),t("code",[e._v("open -a Electrum.app --args --testnet")]),e._v(")")]),e._v(" "),t("li",[e._v("Click through the wizard and create a test wallet, using the default settings Electrum proposes")]),e._v(" "),t("li",[e._v('After the wallet is set up, go to "Wallet" > "Information" in the Electrum menu.')]),e._v(" "),t("li",[e._v('Copy the "Master Public Key" string (starting by '),t("code",[e._v("*pub...")]),e._v(")")])]),e._v(" "),t("p",[e._v("Let's configure the store so it uses your Electrum wallet:")]),e._v(" "),t("ol",[t("li",[e._v("Go to the Settings page of your store in BTCPay")]),e._v(" "),t("li",[e._v('On the "General Settings" page you will find the "Wallet" section - click the "Setup" button for configuring an on-chain wallet.')]),e._v(" "),t("li",[e._v('Paste the "Master Public Key" copied from Electrum into the "Derivation Scheme" text field and click "Continue"')]),e._v(" "),t("li",[e._v('Confirm the addresses by clicking on "Receive" in Electrum: The "Receiving address" should match the first address shown in BTCPay')]),e._v(" "),t("li",[e._v("After that your test wallet should appear on the "),t("a",{attrs:{href:"https://testnet.demo.btcpayserver.org/wallets",target:"_blank",rel:"noopener noreferrer"}},[e._v("Wallets page"),t("OutboundLink")],1),e._v(" of your BTCPay account")])]),e._v(" "),t("p",[e._v("Then you can create an invoice, either through")]),e._v(" "),t("ul",[t("li",[e._v('The "Invoice" menu on the website or')]),e._v(" "),t("li",[e._v("The process documented in the "),t("RouterLink",{attrs:{to:"/CustomIntegration/"}},[e._v("Custom integration")])],1)]),e._v(" "),t("h2",{attrs:{id:"questions"}},[t("a",{staticClass:"header-anchor",attrs:{href:"#questions"}},[e._v("#")]),e._v(" Questions")]),e._v(" "),t("p",[e._v("If you have questions about the BTCPay Server on Testnet, you can join the "),t("a",{attrs:{href:"https://chat.btcpayserver.org/",target:"_blank",rel:"noopener noreferrer"}},[e._v("community chat"),t("OutboundLink")],1),e._v(".\nIf you have questions about any of the other tools or commands, etc. it's likely you can find answers to your questions by doing a search on the internet or on "),t("a",{attrs:{href:"https://stackoverflow.com/",target:"_blank",rel:"noopener noreferrer"}},[e._v("StackOverflow"),t("OutboundLink")],1),e._v(".")])])}),[],!1,null,null,null);t.default=n.exports}}]); \ No newline at end of file +(window.webpackJsonp=window.webpackJsonp||[]).push([[129],{779:function(e,t,r){"use strict";r.r(t);var o=r(10),n=Object(o.a)({},(function(){var e=this,t=e._self._c;return t("ContentSlotsDistributor",{attrs:{"slot-key":e.$parent.slotKey}},[t("h1",{attrs:{id:"testnet-demo"}},[t("a",{staticClass:"header-anchor",attrs:{href:"#testnet-demo"}},[e._v("#")]),e._v(" Testnet demo")]),e._v(" "),t("p",[e._v("First let's create a new store:")]),e._v(" "),t("ol",[t("li",[e._v("Go to the "),t("a",{attrs:{href:"https://testnet.demo.btcpayserver.org/",target:"_blank",rel:"noopener noreferrer"}},[e._v("Testnet website"),t("OutboundLink")],1)]),e._v(" "),t("li",[e._v("On the right side click on "),t("strong",[e._v("Create an account")]),e._v(" to "),t("a",{attrs:{href:"https://testnet.demo.btcpayserver.org/register",target:"_blank",rel:"noopener noreferrer"}},[e._v("create an account"),t("OutboundLink")],1),e._v(" or "),t("strong",[e._v("Sign In")]),e._v(" if you already have an account.")]),e._v(" "),t("li",[e._v("After having signed in, create a new store.")])]),e._v(" "),t("p",[e._v("Let's use Electrum to create a testnet wallet for your store:")]),e._v(" "),t("ol",[t("li",[e._v("Download "),t("a",{attrs:{href:"https://electrum.org",target:"_blank",rel:"noopener noreferrer"}},[e._v("Electrum"),t("OutboundLink")],1)]),e._v(" "),t("li",[e._v("Run Electrum with parameter "),t("code",[e._v("--testnet")]),e._v(" (i.e. on Mac OS using "),t("code",[e._v("open -a Electrum.app --args --testnet")]),e._v(")")]),e._v(" "),t("li",[e._v("Click through the wizard and create a test wallet, using the default settings Electrum proposes")]),e._v(" "),t("li",[e._v('After the wallet is set up, go to "Wallet" > "Information" in the Electrum menu.')]),e._v(" "),t("li",[e._v('Copy the "Master Public Key" string (starting by '),t("code",[e._v("*pub...")]),e._v(")")])]),e._v(" "),t("p",[e._v("Let's configure the store so it uses your Electrum wallet:")]),e._v(" "),t("ol",[t("li",[e._v("Go to the Settings page of your store in BTCPay")]),e._v(" "),t("li",[e._v('On the "General Settings" page you will find the "Wallet" section - click the "Setup" button for configuring an on-chain wallet.')]),e._v(" "),t("li",[e._v('Paste the "Master Public Key" copied from Electrum into the "Derivation Scheme" text field and click "Continue"')]),e._v(" "),t("li",[e._v('Confirm the addresses by clicking on "Receive" in Electrum: The "Receiving address" should match the first address shown in BTCPay')]),e._v(" "),t("li",[e._v("After that your test wallet should appear on the "),t("a",{attrs:{href:"https://testnet.demo.btcpayserver.org/wallets",target:"_blank",rel:"noopener noreferrer"}},[e._v("Wallets page"),t("OutboundLink")],1),e._v(" of your BTCPay account")])]),e._v(" "),t("p",[e._v("Then you can create an invoice, either through")]),e._v(" "),t("ul",[t("li",[e._v('The "Invoice" menu on the website or')]),e._v(" "),t("li",[e._v("The process documented in the "),t("RouterLink",{attrs:{to:"/CustomIntegration/"}},[e._v("Custom integration")])],1)]),e._v(" "),t("h2",{attrs:{id:"questions"}},[t("a",{staticClass:"header-anchor",attrs:{href:"#questions"}},[e._v("#")]),e._v(" Questions")]),e._v(" "),t("p",[e._v("If you have questions about the BTCPay Server on Testnet, you can join the "),t("a",{attrs:{href:"https://chat.btcpayserver.org/",target:"_blank",rel:"noopener noreferrer"}},[e._v("community chat"),t("OutboundLink")],1),e._v(".\nIf you have questions about any of the other tools or commands, etc. it's likely you can find answers to your questions by doing a search on the internet or on "),t("a",{attrs:{href:"https://stackoverflow.com/",target:"_blank",rel:"noopener noreferrer"}},[e._v("StackOverflow"),t("OutboundLink")],1),e._v(".")])])}),[],!1,null,null,null);t.default=n.exports}}]); \ No newline at end of file diff --git a/assets/js/130.12b296c8.js b/assets/js/130.91803ee2.js similarity index 99% rename from assets/js/130.12b296c8.js rename to assets/js/130.91803ee2.js index 197c24bb10..7045e8ba4b 100644 --- a/assets/js/130.12b296c8.js +++ b/assets/js/130.91803ee2.js @@ -1 +1 @@ -(window.webpackJsonp=window.webpackJsonp||[]).push([[130],{782:function(e,t,r){"use strict";r.r(t);var a=r(10),n=Object(a.a)({},(function(){var e=this,t=e._self._c;return t("ContentSlotsDistributor",{attrs:{"slot-key":e.$parent.slotKey}},[t("h1",{attrs:{id:"introduction"}},[t("a",{staticClass:"header-anchor",attrs:{href:"#introduction"}},[e._v("#")]),e._v(" Introduction")]),e._v(" "),t("p",[e._v("While "),t("RouterLink",{attrs:{to:"/LunaNodeWebDeployment/"}},[e._v("our instructions")]),e._v(" cover how to install BTCPayServer in one click on Azure or Lunanode, BTCPay Server is not limited to those options.")],1),e._v(" "),t("p",[e._v("You will find below information about how you can install BTCPay Server easily in any environment having docker available.")]),e._v(" "),t("h1",{attrs:{id:"architecture"}},[t("a",{staticClass:"header-anchor",attrs:{href:"#architecture"}},[e._v("#")]),e._v(" Architecture")]),e._v(" "),t("figure",[t("img",{attrs:{src:"https://github.com/btcpayserver/btcpayserver-doc/raw/master/docs/img/Architecture.png",alt:"Architecture",title:"Architecture"}})]),e._v(" "),t("p",[e._v("As you can see, BTCPay depends on several pieces of infrastructure, mainly:")]),e._v(" "),t("ul",[t("li",[e._v("A lightweight block explorer (NBXplorer),")]),e._v(" "),t("li",[e._v("A database (PostgreSQL),")]),e._v(" "),t("li",[e._v("A full node (eg. Bitcoin Core)")])]),e._v(" "),t("p",[e._v("There can be more dependencies if you support more than just standard Bitcoin transactions, including:")]),e._v(" "),t("ul",[t("li",[t("a",{attrs:{href:"https://github.com/ElementsProject/lightning",target:"_blank",rel:"noopener noreferrer"}},[e._v("Core Lightning (CLN)"),t("OutboundLink")],1)]),e._v(" "),t("li",[t("a",{attrs:{href:"https://github.com/litecoin-project/litecoin",target:"_blank",rel:"noopener noreferrer"}},[e._v("LitecoinD"),t("OutboundLink")],1),e._v(" and other coin daemons")]),e._v(" "),t("li",[e._v("And more...")])]),e._v(" "),t("p",[e._v("Note: The setup process can be time consuming, but is heavily automated to make it a fun and easy experience.")]),e._v(" "),t("p",[e._v("Take a look at how BTCPay works in a video below.")]),e._v(" "),t("a",{staticClass:"ytEmbed",staticStyle:{"background-image":"url(https://img.youtube.com/vi/nr0UNbz3AoQ/hqdefault.jpg)"},attrs:{href:"https://www.youtube.com/watch?v=nr0UNbz3AoQ",title:"YouTube","data-id":"nr0UNbz3AoQ"}},[t("iframe",{attrs:{title:"YouTube","data-src":"https://www.youtube-nocookie.com/embed/nr0UNbz3AoQ?&autoplay=1&autohide=1&modestbranding=1&color=white&rel=0",frameborder:"0",allow:"autoplay;encrypted-media;picture-in-picture",allowfullscreen:""}})]),e._v(" "),t("p",[e._v("Here is a presentation of the global architecture at Advancing Bitcoin conference.")]),e._v(" "),t("a",{staticClass:"ytEmbed",staticStyle:{"background-image":"url(https://img.youtube.com/vi/Up0dvorzSNM/hqdefault.jpg)"},attrs:{href:"https://www.youtube.com/watch?v=Up0dvorzSNM",title:"BTCPay - Architecture overview","data-id":"Up0dvorzSNM"}},[t("iframe",{attrs:{title:"BTCPay - Architecture overview","data-src":"https://www.youtube-nocookie.com/embed/Up0dvorzSNM?&autoplay=1&autohide=1&modestbranding=1&color=white&rel=0",frameborder:"0",allow:"autoplay;encrypted-media;picture-in-picture",allowfullscreen:""}})]),e._v(" "),t("h1",{attrs:{id:"full-installation-for-technical-users"}},[t("a",{staticClass:"header-anchor",attrs:{href:"#full-installation-for-technical-users"}},[e._v("#")]),e._v(" Full installation (for technical users)")]),e._v(" "),t("p",[e._v("You can also install BTCPay Server on your own machine or VPS instance.")]),e._v(" "),t("p",[e._v("The officially supported setup is driven by Docker (and Docker-Compose).")]),e._v(" "),t("p",[e._v("First, make sure you have a domain name pointing to your host "),t("code",[e._v("A record")]),e._v(", with ports "),t("code",[e._v("443")]),e._v(" and "),t("code",[e._v("80")]),e._v(" externally accessible. For Lightning Network, port "),t("code",[e._v("9735")]),e._v(" is required ("),t("code",[e._v("9736")]),e._v(" if you use Litecoin Lightning). Otherwise, you will have to set a domain manually by running "),t("code",[e._v("changedomain.sh")]),e._v(".")]),e._v(" "),t("p",[e._v("Let's assume your domain is "),t("code",[e._v("btcpay.EXAMPLE.com")]),e._v(".")]),e._v(" "),t("p",[e._v("The setup below assumes you want to support Bitcoin, Core Lightning (CLN), HTTPS automatically configured by Nginx. It also enables node pruning, which you can "),t("a",{attrs:{href:"#generated-docker-compose"}},[e._v("modify")]),e._v(" or ignore if you have enough disk space for a full node. Finally, your domain is "),t("code",[e._v("btcpay.EXAMPLE.com")]),e._v(" should reflect your actual domain name.")]),e._v(" "),t("p",[t("a",{attrs:{href:"#environment-variables"}},[e._v("Environment variables")]),e._v(" can be tailored to your needs. Some variables require additional storage space.")]),e._v(" "),t("div",{staticClass:"language-bash extra-class"},[t("pre",{pre:!0,attrs:{class:"language-bash"}},[t("code",[t("span",{pre:!0,attrs:{class:"token comment"}},[e._v("# Login as root")]),e._v("\n"),t("span",{pre:!0,attrs:{class:"token function"}},[e._v("sudo")]),e._v(" "),t("span",{pre:!0,attrs:{class:"token function"}},[e._v("su")]),e._v(" -\n\n"),t("span",{pre:!0,attrs:{class:"token comment"}},[e._v("# Create a folder for BTCPay")]),e._v("\n"),t("span",{pre:!0,attrs:{class:"token function"}},[e._v("mkdir")]),e._v(" BTCPayServer\n"),t("span",{pre:!0,attrs:{class:"token builtin class-name"}},[e._v("cd")]),e._v(" BTCPayServer\n\n"),t("span",{pre:!0,attrs:{class:"token comment"}},[e._v("# Clone this repository")]),e._v("\n"),t("span",{pre:!0,attrs:{class:"token function"}},[e._v("git")]),e._v(" clone https://github.com/btcpayserver/btcpayserver-docker\n"),t("span",{pre:!0,attrs:{class:"token builtin class-name"}},[e._v("cd")]),e._v(" btcpayserver-docker\n\n"),t("span",{pre:!0,attrs:{class:"token comment"}},[e._v("# Run btcpay-setup.sh with the right parameters")]),e._v("\n"),t("span",{pre:!0,attrs:{class:"token builtin class-name"}},[e._v("export")]),e._v(" "),t("span",{pre:!0,attrs:{class:"token assign-left variable"}},[e._v("BTCPAY_HOST")]),t("span",{pre:!0,attrs:{class:"token operator"}},[e._v("=")]),t("span",{pre:!0,attrs:{class:"token string"}},[e._v('"btcpay.EXAMPLE.com"')]),e._v("\n"),t("span",{pre:!0,attrs:{class:"token builtin class-name"}},[e._v("export")]),e._v(" "),t("span",{pre:!0,attrs:{class:"token assign-left variable"}},[e._v("NBITCOIN_NETWORK")]),t("span",{pre:!0,attrs:{class:"token operator"}},[e._v("=")]),t("span",{pre:!0,attrs:{class:"token string"}},[e._v('"mainnet"')]),e._v("\n"),t("span",{pre:!0,attrs:{class:"token builtin class-name"}},[e._v("export")]),e._v(" "),t("span",{pre:!0,attrs:{class:"token assign-left variable"}},[e._v("BTCPAYGEN_CRYPTO1")]),t("span",{pre:!0,attrs:{class:"token operator"}},[e._v("=")]),t("span",{pre:!0,attrs:{class:"token string"}},[e._v('"btc"')]),e._v("\n"),t("span",{pre:!0,attrs:{class:"token builtin class-name"}},[e._v("export")]),e._v(" "),t("span",{pre:!0,attrs:{class:"token assign-left variable"}},[e._v("BTCPAYGEN_ADDITIONAL_FRAGMENTS")]),t("span",{pre:!0,attrs:{class:"token operator"}},[e._v("=")]),t("span",{pre:!0,attrs:{class:"token string"}},[e._v('"opt-save-storage-s"')]),e._v("\n"),t("span",{pre:!0,attrs:{class:"token builtin class-name"}},[e._v("export")]),e._v(" "),t("span",{pre:!0,attrs:{class:"token assign-left variable"}},[e._v("BTCPAYGEN_REVERSEPROXY")]),t("span",{pre:!0,attrs:{class:"token operator"}},[e._v("=")]),t("span",{pre:!0,attrs:{class:"token string"}},[e._v('"nginx"')]),e._v("\n"),t("span",{pre:!0,attrs:{class:"token builtin class-name"}},[e._v("export")]),e._v(" "),t("span",{pre:!0,attrs:{class:"token assign-left variable"}},[e._v("BTCPAYGEN_LIGHTNING")]),t("span",{pre:!0,attrs:{class:"token operator"}},[e._v("=")]),t("span",{pre:!0,attrs:{class:"token string"}},[e._v('"clightning"')]),e._v("\n"),t("span",{pre:!0,attrs:{class:"token builtin class-name"}},[e._v("export")]),e._v(" "),t("span",{pre:!0,attrs:{class:"token assign-left variable"}},[e._v("BTCPAY_ENABLE_SSH")]),t("span",{pre:!0,attrs:{class:"token operator"}},[e._v("=")]),e._v("true\n"),t("span",{pre:!0,attrs:{class:"token builtin class-name"}},[e._v(".")]),e._v(" ./btcpay-setup.sh "),t("span",{pre:!0,attrs:{class:"token parameter variable"}},[e._v("-i")]),e._v("\n\n"),t("span",{pre:!0,attrs:{class:"token builtin class-name"}},[e._v("exit")]),e._v("\n")])])]),t("p",[t("code",[e._v("btcpay-setup.sh")]),e._v(" will then:")]),e._v(" "),t("ul",[t("li",[e._v("Install Docker")]),e._v(" "),t("li",[e._v("Install Docker-Compose")]),e._v(" "),t("li",[e._v("Make sure BTCPay starts at reboot via upstart or systemd")]),e._v(" "),t("li",[e._v("Setup environment variables to use BTCPay utilities")]),e._v(" "),t("li",[e._v("Add BTCPay utilities in /usr/bin")]),e._v(" "),t("li",[e._v("Start BTCPay Server")])]),e._v(" "),t("p",[e._v("Video below guides you step by step on how to set up BTCPay Server on a VPS with Docker.")]),e._v(" "),t("a",{staticClass:"ytEmbed",staticStyle:{"background-image":"url(https://img.youtube.com/vi/x6hqTFgHqhA/hqdefault.jpg)"},attrs:{href:"https://www.youtube.com/watch?v=x6hqTFgHqhA",title:"YouTube","data-id":"x6hqTFgHqhA"}},[t("iframe",{attrs:{title:"YouTube","data-src":"https://www.youtube-nocookie.com/embed/x6hqTFgHqhA?&autoplay=1&autohide=1&modestbranding=1&color=white&rel=0",frameborder:"0",allow:"autoplay;encrypted-media;picture-in-picture",allowfullscreen:""}})]),e._v(" "),t("p",[e._v("Check out this video if you're interested in learning more about setting up "),t("a",{attrs:{href:"https://www.youtube.com/playlist?list=PLH4m2oS2ratfaprAFx9E3ZDjwxNKvCk4e",target:"_blank",rel:"noopener noreferrer"}},[e._v("BTCPay with Docker Compose"),t("OutboundLink")],1),e._v(".")]),e._v(" "),t("figure",[t("a",{attrs:{href:"https://hub.docker.com/r/btcpayserver/btcpayserver/",target:"_blank",rel:"noopener noreferrer"}},[t("img",{attrs:{src:"https://img.shields.io/docker/automated/btcpayserver/btcpayserver.svg",alt:"Docker automated build",title:"Docker automated build"}}),t("OutboundLink")],1)]),e._v(" "),t("h1",{attrs:{id:"environment-variables"}},[t("a",{staticClass:"header-anchor",attrs:{href:"#environment-variables"}},[e._v("#")]),e._v(" Environment variables")]),e._v(" "),t("p",[t("code",[e._v("btcpay-setup.sh")]),e._v(" will use the following environment variables:")]),e._v(" "),t("ul",[t("li",[t("code",[e._v("BTCPAY_HOST")]),e._v(": The hostname of your website (eg. "),t("code",[e._v("btcpay.example.com")]),e._v(")")]),e._v(" "),t("li",[t("code",[e._v("BTCPAY_ADDITIONAL_HOSTS")]),e._v(": Optional, specify additional domains to your BTCPayServer with https support if enabled. (eg. example2.com,example3.com)")]),e._v(" "),t("li",[t("code",[e._v("REVERSEPROXY_HTTP_PORT")]),e._v(": The public port the reverse proxy binds to for HTTP traffic (default: 80)")]),e._v(" "),t("li",[t("code",[e._v("REVERSEPROXY_HTTPS_PORT")]),e._v(": The public port the reverse proxy binds to for HTTPS traffic (default: 443)")]),e._v(" "),t("li",[t("code",[e._v("REVERSEPROXY_DEFAULT_HOST")]),e._v(": Optional, if using a reverse proxy nginx, specify which website should be presented if the server is accessed by its IP or by an unrecognized domain name.")]),e._v(" "),t("li",[t("code",[e._v("NOREVERSEPROXY_HTTP_PORT")]),e._v(": Optional, if not using a reverse proxy, specify which port should be opened for HTTP traffic. (default: 80)")]),e._v(" "),t("li",[t("code",[e._v("NBITCOIN_NETWORK")]),e._v(": The type of network to use (eg. "),t("code",[e._v("mainnet")]),e._v(", "),t("code",[e._v("testnet")]),e._v(", or "),t("code",[e._v("regtest")]),e._v(". Default: "),t("code",[e._v("mainnet")]),e._v(")")]),e._v(" "),t("li",[t("code",[e._v("LIGHTNING_ALIAS")]),e._v(": An alias for your lightning network node, if used")]),e._v(" "),t("li",[t("code",[e._v("BTCPAYGEN_CRYPTO1")]),e._v(": First supported crypto currency (eg. "),t("code",[e._v("btc")]),e._v(", "),t("code",[e._v("ltc")]),e._v(". Default: "),t("code",[e._v("btc")]),e._v(")")]),e._v(" "),t("li",[t("code",[e._v("BTCPAYGEN_CRYPTO2")]),e._v(": Second supported crypto currency (eg. "),t("code",[e._v("btc")]),e._v(", "),t("code",[e._v("ltc")]),e._v(". Default: "),t("code",[e._v("(empty)")]),e._v(")")]),e._v(" "),t("li",[t("code",[e._v("BTCPAYGEN_CRYPTON")]),e._v(": N'th supported crypto currency where N is 9 at maximum. (eg. "),t("code",[e._v("btc")]),e._v(", "),t("code",[e._v("ltc")]),e._v(". Default: "),t("code",[e._v("(empty)")]),e._v(")")]),e._v(" "),t("li",[t("code",[e._v("BTCPAYGEN_REVERSEPROXY")]),e._v(": Specify reverse proxy to use; NGinx has HTTPS support. (eg. "),t("code",[e._v("nginx")]),e._v(", "),t("code",[e._v("traefik")]),e._v(", "),t("code",[e._v("(empty)")]),e._v(". Default: "),t("code",[e._v("nginx")]),e._v(")")]),e._v(" "),t("li",[t("code",[e._v("BTCPAYGEN_LIGHTNING")]),e._v(": Lightning network implementation to use (eg. "),t("code",[e._v("clightning")]),e._v(", "),t("code",[e._v("lnd")]),e._v(", Default: "),t("code",[e._v("(empty)")]),e._v(")")]),e._v(" "),t("li",[t("code",[e._v("BTCPAYGEN_SUBNAME")]),e._v(": The subname of the generated docker-compose file, where the full name is "),t("code",[e._v("Generated/docker-compose.SUBNAME.yml")]),e._v(" (Default: "),t("code",[e._v("generated")]),e._v(")")]),e._v(" "),t("li",[t("code",[e._v("BTCPAYGEN_ADDITIONAL_FRAGMENTS")]),e._v(": Semicolon-separated list of additional fragments you want to use (eg. "),t("code",[e._v("opt-save-storage")]),e._v(")")]),e._v(" "),t("li",[t("code",[e._v("LETSENCRYPT_EMAIL")]),e._v(": An email will be sent to this address if certificate expires and fails to renew automatically (eg. "),t("code",[e._v("me@example.com")]),e._v(")")]),e._v(" "),t("li",[t("code",[e._v("ACME_CA_URI")]),e._v(": The API endpoint to ask for HTTPS certificate (Default: "),t("code",[e._v("production")]),e._v(")")]),e._v(" "),t("li",[t("code",[e._v("BTCPAY_ENABLE_SSH")]),e._v(": Optional, gives BTCPay Server SSH access to the host by allowing it to edit authorized_keys of the host, it can be used for managing the authorized_keys or updating BTCPay Server directly through the website. (Default: false)")]),e._v(" "),t("li",[t("code",[e._v("BTCPAYGEN_DOCKER_IMAGE")]),e._v(": Optional, Specify which generator image to use if you have customized the C# generator. Set to "),t("code",[e._v("btcpayserver/docker-compose-generator:local")]),e._v(" to build the generator locally at runtime.")]),e._v(" "),t("li",[t("code",[e._v("BTCPAY_IMAGE")]),e._v(": Optional, Specify which btcpayserver image to use if you have a customized btcpayserver.")]),e._v(" "),t("li",[t("code",[e._v("BTCPAYGEN_EXCLUDE_FRAGMENTS")]),e._v(": Semicolon-separated list of fragments you want to forcefully exclude (eg. "),t("code",[e._v("litecoin-clightning")]),e._v(")")]),e._v(" "),t("li",[t("code",[e._v("TOR_RELAY_NICKNAME")]),e._v(": If tor relay is activated with opt-add-tor-relay, the relay nickname")]),e._v(" "),t("li",[t("code",[e._v("TOR_RELAY_EMAIL")]),e._v(": If tor relay is activated with opt-add-tor-relay, the email for Tor to contact you regarding your relay")])]),e._v(" "),t("p",[e._v("Additionally, there are specific environment variables for some addons:")]),e._v(" "),t("ul",[t("li",[t("code",[e._v("LIBREPATRON_HOST")]),e._v(": If libre patron is activated with "),t("a",{attrs:{href:"https://github.com/btcpayserver/btcpayserver-docker/blob/master/docker-compose-generator/docker-fragments/opt-add-librepatron.yml",target:"_blank",rel:"noopener noreferrer"}},[e._v("opt-add-librepatron"),t("OutboundLink")],1),e._v(", the hostname of your libre patron website (eg. "),t("code",[e._v("librepatron.example.com")]),e._v(")")]),e._v(" "),t("li",[t("code",[e._v("ZAMMAD_HOST")]),e._v(": If zammad is activated with "),t("a",{attrs:{href:"https://github.com/btcpayserver/btcpayserver-docker/blob/master/docker-compose-generator/docker-fragments/opt-add-zammad.yml",target:"_blank",rel:"noopener noreferrer"}},[e._v("opt-add-zammad"),t("OutboundLink")],1),e._v(", the hostname of your zammad website (eg. "),t("code",[e._v("zammad.example.com")]),e._v(")")]),e._v(" "),t("li",[t("code",[e._v("WOOCOMMERCE_HOST")]),e._v(": If woocommerce is activated with "),t("a",{attrs:{href:"https://github.com/btcpayserver/btcpayserver-docker/blob/master/docker-compose-generator/docker-fragments/opt-add-woocommerce.yml",target:"_blank",rel:"noopener noreferrer"}},[e._v("opt-add-woocommerce"),t("OutboundLink")],1),e._v(", the hostname of your woocommerce website (eg. "),t("code",[e._v("store.example.com")]),e._v(")")]),e._v(" "),t("li",[t("code",[e._v("EPS_XPUB")]),e._v(": If Electrum Personal Server (EPS) is activated with "),t("a",{attrs:{href:"https://github.com/btcpayserver/btcpayserver-docker/blob/master/docker-compose-generator/docker-fragments/opt-add-electrum-ps.yml",target:"_blank",rel:"noopener noreferrer"}},[e._v("opt-add-electrum-ps"),t("OutboundLink")],1),e._v(", you must set the Extended Public Key (XPUB, YPUB or ZPUB) of the wallet you want to use, before first run of the EPS server. If you accidentally start EPS without this, it will not work properly as the model of EPS is to monitor only specified wallets.")]),e._v(" "),t("li",[e._v("If Bitcoin Wallet Tracker is activated with "),t("a",{attrs:{href:"https://github.com/btcpayserver/btcpayserver-docker/blob/master/docker-compose-generator/docker-fragments/opt-add-bwt.yml",target:"_blank",rel:"noopener noreferrer"}},[e._v("opt-add-bwt"),t("OutboundLink")],1),e._v(", you can use "),t("code",[e._v("BWT_XPUB")]),e._v("/"),t("code",[e._v("BWT_XPUB_*")]),e._v(" (to set your XPUB/YPUB/ZPUB), "),t("code",[e._v("BWT_DESCRIPTOR")]),e._v("/"),t("code",[e._v("BWT_DESCRIPTOR_*")]),e._v(" (for script descriptors), "),t("code",[e._v("BWT_RESCAN_SINCE")]),e._v(" (set to the wallet creation date in YYYY-MM-DD to speed up the rescan), "),t("code",[e._v("BWT_BITCOIND_WALLET")]),e._v(" and "),t("code",[e._v("BWT_GAP_LIMIT")]),e._v(".")]),e._v(" "),t("li",[t("code",[e._v("LND_WTCLIENT_SWEEP_FEE")]),e._v(": If LND watchtower is activated with "),t("a",{attrs:{href:"https://github.com/btcpayserver/btcpayserver-docker/blob/master/docker-compose-generator/docker-fragments/opt-lnd-wtclient.yml",target:"_blank",rel:"noopener noreferrer"}},[e._v("opt-lnd-wtclient"),t("OutboundLink")],1),e._v(", you can use "),t("code",[e._v("LND_WTCLIENT_SWEEP_FEE")]),e._v(" to change the sweep fee used in constructing the justice transaction (default is 10 sat/byte)")]),e._v(" "),t("li",[t("code",[e._v("FIREFLY_HOST")]),e._v(": If fireflyiii is activated with "),t("a",{attrs:{href:"https://github.com/btcpayserver/btcpayserver-docker/blob/master/docker-compose-generator/docker-fragments/opt-add-fireflyiii.yml",target:"_blank",rel:"noopener noreferrer"}},[e._v("opt-add-fireflyiii"),t("OutboundLink")],1),e._v(", the hostname of your fireflyiii website (eg. "),t("code",[e._v("firefly.example.com")]),e._v(")")]),e._v(" "),t("li",[t("code",[e._v("CLOUDFLARE_TUNNEL_TOKEN")]),e._v(": Used to expose your instance to clearnet with a Cloudflare Argo Tunnel (if cloudflare tunnel is activated with "),t("a",{attrs:{href:"https://github.com/btcpayserver/btcpayserver-docker/blob/master/docker-compose-generator/docker-fragments/opt-add-cloudflared.yml",target:"_blank",rel:"noopener noreferrer"}},[e._v("opt-add-cloudflared"),t("OutboundLink")],1),e._v(", for setup instructions "),t("RouterLink",{attrs:{to:"/Docker/cloudflare-tunnel/"}},[e._v("see documentation")]),e._v(")")],1)]),e._v(" "),t("h1",{attrs:{id:"tooling"}},[t("a",{staticClass:"header-anchor",attrs:{href:"#tooling"}},[e._v("#")]),e._v(" Tooling")]),e._v(" "),t("p",[e._v("A wide variety of useful scripts are available once BTCPay is installed:")]),e._v(" "),t("ul",[t("li",[t("code",[e._v("bitcoin-cli.sh")]),e._v(": Access your Bitcoin node instance (for RPC)")]),e._v(" "),t("li",[t("code",[e._v("bitcoin-lightning-cli.sh")]),e._v(": Access your CLN node instance (for RPC)")]),e._v(" "),t("li",[t("code",[e._v("changedomain.sh")]),e._v(": Change the domain of your BTCPayServer (remember to disable 2FA/U2F first, as you risk being unable to log in to your account)")]),e._v(" "),t("li",[t("code",[e._v("btcpay-update.sh")]),e._v(": Update BTCPayServer to the latest version")]),e._v(" "),t("li",[t("code",[e._v("btcpay-up.sh")]),e._v(": Run "),t("code",[e._v("docker-compose up")])]),e._v(" "),t("li",[t("code",[e._v("btcpay-down.sh")]),e._v(": Run "),t("code",[e._v("docker-compose down")])]),e._v(" "),t("li",[t("code",[e._v("btcpay-setup.sh")]),e._v(": Change the settings of your server")]),e._v(" "),t("li",[t("code",[e._v("btcpay-clean.sh")]),e._v(": Purge any unused docker images")]),e._v(" "),t("li",[t("code",[e._v(". ./btcpay-setup.sh")]),e._v(": Information about additional parameters")]),e._v(" "),t("li",[t("code",[e._v(". ./btcpay-setup.sh -i")]),e._v(": Set up your BTCPayServer")]),e._v(" "),t("li",[t("code",[e._v("btcpay-restart.sh")]),e._v(": Restart your BTCPayServer")])]),e._v(" "),t("h1",{attrs:{id:"under-the-hood"}},[t("a",{staticClass:"header-anchor",attrs:{href:"#under-the-hood"}},[e._v("#")]),e._v(" Under the hood")]),e._v(" "),t("h2",{attrs:{id:"generated-docker-compose"}},[t("a",{staticClass:"header-anchor",attrs:{href:"#generated-docker-compose"}},[e._v("#")]),e._v(" Generated docker-compose")]),e._v(" "),t("p",[e._v("When you run "),t("code",[e._v("btcpay-setup.sh")]),e._v(", your environment variables are used by "),t("a",{attrs:{href:"https://github.com/btcpayserver/btcpayserver-docker/blob/master/build.sh",target:"_blank",rel:"noopener noreferrer"}},[e._v("build.sh"),t("OutboundLink")],1),e._v(" (or "),t("a",{attrs:{href:"https://github.com/btcpayserver/btcpayserver-docker/blob/master/build.ps1",target:"_blank",rel:"noopener noreferrer"}},[e._v("build.ps1"),t("OutboundLink")],1),e._v(") to generate a docker-compose adapted for your needs. For the full list of options, see: "),t("a",{attrs:{href:"#environment-variables"}},[e._v("Environment variables")])]),e._v(" "),t("p",[e._v("By default, the generated file is "),t("code",[e._v("Generated/docker-compose.generated.yml")]),e._v(", constructed from the relevant "),t("a",{attrs:{href:"https://github.com/btcpayserver/btcpayserver-docker/blob/master/docker-compose-generator/docker-fragments",target:"_blank",rel:"noopener noreferrer"}},[e._v("Docker fragments"),t("OutboundLink")],1),e._v(" for your setup.")]),e._v(" "),t("p",[e._v("Available "),t("code",[e._v("BTCPAYGEN_ADDITIONAL_FRAGMENTS")]),e._v(" currently are:")]),e._v(" "),t("ul",[t("li",[t("a",{attrs:{href:"https://github.com/btcpayserver/btcpayserver-docker/blob/master/docker-compose-generator/docker-fragments/opt-save-storage.yml",target:"_blank",rel:"noopener noreferrer"}},[e._v("opt-save-storage"),t("OutboundLink")],1),e._v(" will keep around 1 year of blocks (prune BTC for 100 GB)")]),e._v(" "),t("li",[t("a",{attrs:{href:"https://github.com/btcpayserver/btcpayserver-docker/blob/master/docker-compose-generator/docker-fragments/opt-save-storage-s.yml",target:"_blank",rel:"noopener noreferrer"}},[e._v("opt-save-storage-s"),t("OutboundLink")],1),e._v(" will keep around 6 months of blocks (prune BTC for 50 GB)")]),e._v(" "),t("li",[t("a",{attrs:{href:"https://github.com/btcpayserver/btcpayserver-docker/blob/master/docker-compose-generator/docker-fragments/opt-save-storage-xs.yml",target:"_blank",rel:"noopener noreferrer"}},[e._v("opt-save-storage-xs"),t("OutboundLink")],1),e._v(" will keep around 3 months of blocks (prune BTC for 25 GB)")]),e._v(" "),t("li",[t("a",{attrs:{href:"https://github.com/btcpayserver/btcpayserver-docker/blob/master/docker-compose-generator/docker-fragments/opt-save-storage-xxs.yml",target:"_blank",rel:"noopener noreferrer"}},[e._v("opt-save-storage-xxs"),t("OutboundLink")],1),e._v(" will keep around 2 weeks of blocks (prune BTC for 5 GB) (lightning not supported)")]),e._v(" "),t("li",[t("a",{attrs:{href:"https://github.com/btcpayserver/btcpayserver-docker/blob/master/docker-compose-generator/docker-fragments/opt-lnd-autocompact.yml",target:"_blank",rel:"noopener noreferrer"}},[e._v("opt-lnd-autocompact"),t("OutboundLink")],1),e._v(" will activate auto compacting of LND database.")]),e._v(" "),t("li",[t("a",{attrs:{href:"https://github.com/btcpayserver/btcpayserver-docker/blob/master/docker-compose-generator/docker-fragments/opt-lnd-autopilot.yml",target:"_blank",rel:"noopener noreferrer"}},[e._v("opt-lnd-autopilot"),t("OutboundLink")],1),e._v(" will activate auto pilot on LND. (5 channels, 60% of allocation)")]),e._v(" "),t("li",[t("a",{attrs:{href:"https://github.com/btcpayserver/btcpayserver-docker/blob/master/docker-compose-generator/docker-fragments/opt-lnd-keysend.yml",target:"_blank",rel:"noopener noreferrer"}},[e._v("opt-lnd-keysend"),t("OutboundLink")],1),e._v(" will activate keysend on LND.")]),e._v(" "),t("li",[t("a",{attrs:{href:"https://github.com/btcpayserver/btcpayserver-docker/blob/master/docker-compose-generator/docker-fragments/opt-lnd-wtclient.yml",target:"_blank",rel:"noopener noreferrer"}},[e._v("opt-lnd-wtclient"),t("OutboundLink")],1),e._v(" will activate the watchtower client on LND. "),t("code",[e._v("LND_WTCLIENT_SWEEP_FEE")]),e._v(" can be used to override the default 10 sat/byte justice transaction fee")]),e._v(" "),t("li",[t("a",{attrs:{href:"https://github.com/btcpayserver/btcpayserver-docker/blob/master/docker-compose-generator/docker-fragments/opt-lnd-watchtower.yml",target:"_blank",rel:"noopener noreferrer"}},[e._v("opt-lnd-watchtower"),t("OutboundLink")],1),e._v(" will activate the LND watchtower RPC")]),e._v(" "),t("li",[t("a",{attrs:{href:"https://github.com/btcpayserver/btcpayserver-docker/blob/master/docker-compose-generator/docker-fragments/opt-save-memory.yml",target:"_blank",rel:"noopener noreferrer"}},[e._v("opt-save-memory"),t("OutboundLink")],1),e._v(" will decrease the default dbcache at the expense of longer synchronization time. (Useful if your machine is less than 2GB)")]),e._v(" "),t("li",[t("a",{attrs:{href:"https://github.com/btcpayserver/btcpayserver-docker/blob/master/docker-compose-generator/docker-fragments/opt-more-memory.yml",target:"_blank",rel:"noopener noreferrer"}},[e._v("opt-more-memory"),t("OutboundLink")],1),e._v(" will increase the default dbcache to make synchronization faster (Useful if your machine is has around 4GB)")]),e._v(" "),t("li",[t("a",{attrs:{href:"https://github.com/btcpayserver/btcpayserver-docker/blob/master/docker-compose-generator/docker-fragments/opt-add-btcqbo.yml",target:"_blank",rel:"noopener noreferrer"}},[e._v("opt-add-btcqbo"),t("OutboundLink")],1),e._v(" will allow you to create an invoice on Quickbooks which include a way for your customer to pay on BTCPay Server (More information on this "),t("a",{attrs:{href:"https://github.com/JeffVandrewJr/btcqbo/",target:"_blank",rel:"noopener noreferrer"}},[e._v("github repository"),t("OutboundLink")],1),e._v(", this add-on is maintained by "),t("a",{attrs:{href:"https://github.com/JeffVandrewJr",target:"_blank",rel:"noopener noreferrer"}},[e._v("JeffVandrewJr"),t("OutboundLink")],1),e._v(", see more on "),t("a",{attrs:{href:"https://www.youtube.com/watch?v=srgwL9ozg6c",target:"_blank",rel:"noopener noreferrer"}},[e._v("this video"),t("OutboundLink")],1),e._v(")")]),e._v(" "),t("li",[t("a",{attrs:{href:"https://github.com/btcpayserver/btcpayserver-docker/blob/master/docker-compose-generator/docker-fragments/opt-add-librepatron.yml",target:"_blank",rel:"noopener noreferrer"}},[e._v("opt-add-librepatron"),t("OutboundLink")],1),e._v(", for a self-hosted Patreon alternative backed by BTCPay (More information on this "),t("a",{attrs:{href:"https://github.com/JeffVandrewJr/patron",target:"_blank",rel:"noopener noreferrer"}},[e._v("github repository"),t("OutboundLink")],1),e._v(", this add-on is maintained by "),t("a",{attrs:{href:"https://github.com/JeffVandrewJr",target:"_blank",rel:"noopener noreferrer"}},[e._v("JeffVandrewJr"),t("OutboundLink")],1),e._v(".")]),e._v(" "),t("li",[t("a",{attrs:{href:"https://github.com/btcpayserver/btcpayserver-docker/blob/master/docker-compose-generator/docker-fragments/opt-add-woocommerce.yml",target:"_blank",rel:"noopener noreferrer"}},[e._v("opt-add-woocommerce"),t("OutboundLink")],1),e._v(", for a self-hosted woocommerce with BTCPay Server plugin pre installed.")]),e._v(" "),t("li",[t("a",{attrs:{href:"https://github.com/btcpayserver/btcpayserver-docker/blob/master/docker-compose-generator/docker-fragments/opt-add-tor.yml",target:"_blank",rel:"noopener noreferrer"}},[e._v("opt-add-tor"),t("OutboundLink")],1),e._v(", for exposing BTCPayServer, Woocommerce, your lightning nodes as hidden services and accept onion peers for your full node. Warning: This options is for working around NAT and firewall problems as well as to help protect your customer's privacy. This will not protect your privacy against a targeted attack against you.")]),e._v(" "),t("li",[t("a",{attrs:{href:"https://github.com/btcpayserver/btcpayserver-docker/blob/master/docker-compose-generator/docker-fragments/opt-add-btctransmuter.yml",target:"_blank",rel:"noopener noreferrer"}},[e._v("opt-add-btctransmuter"),t("OutboundLink")],1),e._v(", for a self-hosted IFTTT style service for crypto services such as fiat settlement. (More information on this "),t("a",{attrs:{href:"https://github.com/btcpayserver/btcTransmuter/",target:"_blank",rel:"noopener noreferrer"}},[e._v("github repository"),t("OutboundLink")],1)]),e._v(" "),t("li",[t("a",{attrs:{href:"https://github.com/btcpayserver/btcpayserver-docker/blob/master/docker-compose-generator/docker-fragments/opt-txindex.yml",target:"_blank",rel:"noopener noreferrer"}},[e._v("opt-txindex"),t("OutboundLink")],1),e._v(", to enable txindex=1 in bitcoin.conf if you require txindexing for Bisq, DOJO, etc.")]),e._v(" "),t("li",[t("a",{attrs:{href:"https://github.com/btcpayserver/btcpayserver-docker/blob/master/docker-compose-generator/docker-fragments/opt-expose-unsafe.yml",target:"_blank",rel:"noopener noreferrer"}},[e._v("opt-expose-unsafe"),t("OutboundLink")],1),e._v(", to unsafely expose bitcoind P2P port 8333 if you require P2P for Bisq, DOJO, Esplora, etc. WARNING: ONLY USE ON TRUSTED LAN OR WITH FIREWALL RULES WHITELISTING SPECIFIC HOSTS")]),e._v(" "),t("li",[t("a",{attrs:{href:"https://github.com/btcpayserver/btcpayserver-docker/blob/master/docker-compose-generator/docker-fragments/opt-add-tor-relay.yml",target:"_blank",rel:"noopener noreferrer"}},[e._v("opt-add-tor-relay"),t("OutboundLink")],1),e._v(", for a non-exit tor relay. Make sure to have port 9001 accessible externally. "),t("a",{attrs:{href:"https://community.torproject.org/relay/community-resources/eff-tor-legal-faq",target:"_blank",rel:"noopener noreferrer"}},[e._v("Please read the legal implications of running a tor relay"),t("OutboundLink")],1),e._v(" and "),t("a",{attrs:{href:"https://trac.torproject.org/projects/tor/wiki/TorRelayGuide#RelayRequirements",target:"_blank",rel:"noopener noreferrer"}},[e._v("what resources are used to operate the relay"),t("OutboundLink")],1),e._v(".")]),e._v(" "),t("li",[t("a",{attrs:{href:"https://github.com/btcpayserver/btcpayserver-docker/blob/master/docker-compose-generator/docker-fragments/opt-add-electrumx.yml",target:"_blank",rel:"noopener noreferrer"}},[e._v("opt-add-electrumx"),t("OutboundLink")],1),e._v(", to integrate a full ElectrumX server (from official source) with BTCPay, using the BTCPay server's full bitcoin node for complete privacy when using your own Electrum wallet. You can also open port 50002 up to the internet on your router etc, to be part of the ElectrumX network, helping other Electrum wallet users to get connected. The bitcoin option "),t("code",[e._v("-txindex")]),e._v(" is mandatory for ElectrumX, and this fragment will enable it on your BTCPay server automatically - No need to use the fragment opt-txindex.yml.")]),e._v(" "),t("li",[t("a",{attrs:{href:"https://github.com/btcpayserver/btcpayserver-docker/blob/master/docker-compose-generator/docker-fragments/opt-add-electrum-ps.yml",target:"_blank",rel:"noopener noreferrer"}},[e._v("opt-add-electrum-ps"),t("OutboundLink")],1),e._v(", to integrate Electrum Personal Server (EPS) with BTCPay (EPS is a single-user alternative to the ElectrumX Server option above). EPS will also use the BTCPay server's full bitcoin node for complete privacy when using your own Electrum wallet, for your own personal use (i.e. other users cannot use your server to verify transactions). Also, the bitcoin option "),t("code",[e._v("-txindex")]),e._v(" is NOT mandatory for EPS, and it will run on a pruned node (unlike ElectrumX). You will need to add your XPUB/YPUB/ZPUB as environment variable "),t("code",[e._v("EPS_XPUB")]),e._v(" before enabling EPS for the first time (see above section on environment variables, and see "),t("RouterLink",{attrs:{to:"/ElectrumPersonalServer/"}},[e._v("full documentation")]),e._v(" for details).")],1),e._v(" "),t("li",[t("a",{attrs:{href:"https://github.com/btcpayserver/btcpayserver-docker/blob/master/docker-compose-generator/docker-fragments/opt-add-bwt.yml",target:"_blank",rel:"noopener noreferrer"}},[e._v("opt-add-electrum-bwt"),t("OutboundLink")],1),e._v(", to integrate the "),t("a",{attrs:{href:"https://github.com/bwt-dev/bwt",target:"_blank",rel:"noopener noreferrer"}},[e._v("Bitcoin Wallet Tracker"),t("OutboundLink")],1),e._v(" Electrum server, which uses a personal wallet index model similar to that of EPS. You will need to set "),t("code",[e._v("BWT_XPUB")]),e._v(" with your XPUB/YPUB/ZPUB (see environment variables section). The server will only be available locally and through an onion service.")]),e._v(" "),t("li",[t("a",{attrs:{href:"https://github.com/btcpayserver/btcpayserver-docker/blob/master/docker-compose-generator/docker-fragments/opt-add-configurator.yml",target:"_blank",rel:"noopener noreferrer"}},[e._v("opt-add-configurator"),t("OutboundLink")],1),e._v(", to integrate the "),t("a",{attrs:{href:"https://install.btcpayserver.org",target:"_blank",rel:"noopener noreferrer"}},[e._v("BTCPay Server Configurator"),t("OutboundLink")],1),e._v(" to manage your BTCPay deployment through a UI, and to allow new deployments elsewhere easily.")]),e._v(" "),t("li",[t("a",{attrs:{href:"https://github.com/btcpayserver/btcpayserver-docker/blob/master/docker-compose-generator/docker-fragments/opt-add-pihole.yml",target:"_blank",rel:"noopener noreferrer"}},[e._v("opt-add-pihole"),t("OutboundLink")],1),e._v(" ("),t("RouterLink",{attrs:{to:"/Docker/pihole/"}},[e._v("See the documentation")]),e._v(")")],1),e._v(" "),t("li",[t("a",{attrs:{href:"https://github.com/btcpayserver/btcpayserver-docker/blob/master/docker-compose-generator/docker-fragments/opt-add-ndlc.yml",target:"_blank",rel:"noopener noreferrer"}},[e._v("opt-add-ndlc"),t("OutboundLink")],1),e._v(" ("),t("RouterLink",{attrs:{to:"/Docker/ndlc/"}},[e._v("See the documentation")]),e._v(")")],1),e._v(" "),t("li",[t("a",{attrs:{href:"https://github.com/btcpayserver/btcpayserver-docker/blob/master/docker-compose-generator/docker-fragments/opt-add-lightning-terminal.yml",target:"_blank",rel:"noopener noreferrer"}},[e._v("opt-add-lightning-terminal"),t("OutboundLink")],1),e._v(" for "),t("a",{attrs:{href:"https://github.com/lightninglabs/lightning-terminal",target:"_blank",rel:"noopener noreferrer"}},[e._v("Lightning Terminal/LiT"),t("OutboundLink")],1),e._v(". Maintained by "),t("a",{attrs:{href:"https://github.com/dennisreimann",target:"_blank",rel:"noopener noreferrer"}},[e._v("dennisreimann"),t("OutboundLink")],1),e._v(".")]),e._v(" "),t("li",[t("a",{attrs:{href:"https://github.com/btcpayserver/btcpayserver-docker/blob/master/docker-compose-generator/docker-fragments/opt-add-mempool.yml",target:"_blank",rel:"noopener noreferrer"}},[e._v("opt-add-mempool"),t("OutboundLink")],1),e._v(" for "),t("a",{attrs:{href:"https://github.com/mempool/mempool",target:"_blank",rel:"noopener noreferrer"}},[e._v("Mempool"),t("OutboundLink")],1),e._v(". Maintained by "),t("a",{attrs:{href:"https://github.com/dennisreimann",target:"_blank",rel:"noopener noreferrer"}},[e._v("dennisreimann"),t("OutboundLink")],1),e._v(".")]),e._v(" "),t("li",[t("a",{attrs:{href:"https://github.com/btcpayserver/btcpayserver-docker/blob/master/docker-compose-generator/docker-fragments/opt-add-sphinxrelay.yml",target:"_blank",rel:"noopener noreferrer"}},[e._v("opt-add-sphinxrelay"),t("OutboundLink")],1),e._v(" for "),t("a",{attrs:{href:"https://github.com/stakwork/sphinx-relay",target:"_blank",rel:"noopener noreferrer"}},[e._v("Sphinx Relay"),t("OutboundLink")],1),e._v(". Maintained by "),t("a",{attrs:{href:"https://github.com/dennisreimann",target:"_blank",rel:"noopener noreferrer"}},[e._v("dennisreimann"),t("OutboundLink")],1),e._v(".")]),e._v(" "),t("li",[t("a",{attrs:{href:"https://github.com/btcpayserver/btcpayserver-docker/blob/master/docker-compose-generator/docker-fragments/opt-add-tallycoin-connect.yml",target:"_blank",rel:"noopener noreferrer"}},[e._v("opt-add-tallycoin-connect"),t("OutboundLink")],1),e._v(" for "),t("a",{attrs:{href:"https://github.com/djbooth007/tallycoin_connect",target:"_blank",rel:"noopener noreferrer"}},[e._v("Tallycoin Connect"),t("OutboundLink")],1),e._v(". Maintained by "),t("a",{attrs:{href:"https://github.com/dennisreimann",target:"_blank",rel:"noopener noreferrer"}},[e._v("dennisreimann"),t("OutboundLink")],1),e._v(".")]),e._v(" "),t("li",[t("a",{attrs:{href:"https://github.com/btcpayserver/btcpayserver-docker/blob/master/docker-compose-generator/docker-fragments/opt-add-thunderhub.yml",target:"_blank",rel:"noopener noreferrer"}},[e._v("opt-add-thunderhub"),t("OutboundLink")],1),e._v(" for a LND Lightning Node Manager in your Browser. Maintained by "),t("a",{attrs:{href:"https://github.com/apotdevin",target:"_blank",rel:"noopener noreferrer"}},[e._v("apotdevin"),t("OutboundLink")],1),e._v(".")]),e._v(" "),t("li",[t("a",{attrs:{href:"https://github.com/btcpayserver/btcpayserver-docker/blob/master/docker-compose-generator/docker-fragments/opt-add-teos.yml",target:"_blank",rel:"noopener noreferrer"}},[e._v("opt-add-teos"),t("OutboundLink")],1),e._v(" for "),t("a",{attrs:{href:"https://github.com/talaia-labs/python-teos",target:"_blank",rel:"noopener noreferrer"}},[e._v("The Eye Of Satoshi"),t("OutboundLink")],1),e._v(", a BOLT13 Lightning Watchtower. Use port 9814 on your server or Tor to connect.")]),e._v(" "),t("li",[t("a",{attrs:{href:"https://github.com/btcpayserver/btcpayserver-docker/blob/master/docker-compose-generator/docker-fragments/opt-add-chatwoot.yml",target:"_blank",rel:"noopener noreferrer"}},[e._v("opt-add-chatwoot"),t("OutboundLink")],1),e._v(" for open source chat support system. ("),t("RouterLink",{attrs:{to:"/Docker/chatwoot/"}},[e._v("See the documentation")]),e._v(")")],1),e._v(" "),t("li",[t("a",{attrs:{href:"https://github.com/btcpayserver/btcpayserver-docker/blob/master/docker-compose-generator/docker-fragments/opt-add-zammad.yml",target:"_blank",rel:"noopener noreferrer"}},[e._v("opt-add-zammad"),t("OutboundLink")],1),e._v(" for "),t("a",{attrs:{href:"https://zammad.com/features",target:"_blank",rel:"noopener noreferrer"}},[e._v("Zammad"),t("OutboundLink")],1),e._v(", a web based open source helpdesk/customer support system with many features to manage customer communication via several channels like telephone, facebook, twitter, chat and e-mails")]),e._v(" "),t("li",[t("a",{attrs:{href:"https://github.com/btcpayserver/btcpayserver-docker/blob/master/docker-compose-generator/docker-fragments/opt-monero-expose.yml",target:"_blank",rel:"noopener noreferrer"}},[e._v("opt-monero-expose"),t("OutboundLink")],1),e._v(" to expose monero node's RPC port at 127.0.0.1:18081 to connect your own wallet. Use f.e. ssh port forwarding to forward to your own computer.")]),e._v(" "),t("li",[t("a",{attrs:{href:"https://github.com/btcpayserver/btcpayserver-docker/blob/master/docker-compose-generator/docker-fragments/opt-add-fireflyiii.yml",target:"_blank",rel:"noopener noreferrer"}},[e._v("opt-add-fireflyiii"),t("OutboundLink")],1),e._v(" ("),t("RouterLink",{attrs:{to:"/Docker/fireflyiii/"}},[e._v("See the documentation")]),e._v(")")],1),e._v(" "),t("li",[t("a",{attrs:{href:"https://github.com/btcpayserver/btcpayserver-docker/blob/master/docker-compose-generator/docker-fragments/opt-add-joinmarket.yml",target:"_blank",rel:"noopener noreferrer"}},[e._v("opt-add-joinmarket"),t("OutboundLink")],1),e._v(" ("),t("RouterLink",{attrs:{to:"/Docker/joinmarket/"}},[e._v("See the documentation")]),e._v(")")],1),e._v(" "),t("li",[t("a",{attrs:{href:"https://github.com/btcpayserver/btcpayserver-docker/blob/master/docker-compose-generator/docker-fragments/opt-add-helipad.yml",target:"_blank",rel:"noopener noreferrer"}},[e._v("opt-add-helipad"),t("OutboundLink")],1),e._v(" for "),t("a",{attrs:{href:"https://github.com/Podcastindex-org/helipad",target:"_blank",rel:"noopener noreferrer"}},[e._v("Podcastindex.org Helipad"),t("OutboundLink")],1),e._v(". Requires LND.")]),e._v(" "),t("li",[t("a",{attrs:{href:"https://github.com/btcpayserver/btcpayserver-docker/blob/master/docker-compose-generator/docker-fragments/opt-add-nostr-relay.yml",target:"_blank",rel:"noopener noreferrer"}},[e._v("opt-add-nostr-relay"),t("OutboundLink")],1),e._v(" for "),t("a",{attrs:{href:"https://github.com/kukks/Nnostr",target:"_blank",rel:"noopener noreferrer"}},[e._v("Nostr Relay"),t("OutboundLink")],1),e._v(".")]),e._v(" "),t("li",[t("a",{attrs:{href:"https://github.com/btcpayserver/btcpayserver-docker/blob/master/docker-compose-generator/docker-fragments/opt-add-cloudflared.yml",target:"_blank",rel:"noopener noreferrer"}},[e._v("opt-add-cloudflared"),t("OutboundLink")],1),e._v(" to expose your local server on clearnet painlessly ("),t("RouterLink",{attrs:{to:"/Docker/cloudflare-tunnel/"}},[e._v("see documentation")]),e._v(").")],1),e._v(" "),t("li",[t("a",{attrs:{href:"https://github.com/btcpayserver/btcpayserver-docker/blob/master/docker-compose-generator/docker-fragments/opt-add-torq.yml",target:"_blank",rel:"noopener noreferrer"}},[e._v("opt-add-torq"),t("OutboundLink")],1),e._v(" to install "),t("a",{attrs:{href:"https://github.com/lncapital/torq",target:"_blank",rel:"noopener noreferrer"}},[e._v("Torq"),t("OutboundLink")],1),e._v(" node management application. Requires LND.")]),e._v(" "),t("li",[t("a",{attrs:{href:"https://github.com/btcpayserver/btcpayserver-docker/blob/master/docker-compose-generator/docker-fragments/opt-add-snapdrop.yml",target:"_blank",rel:"noopener noreferrer"}},[e._v("opt-add-snapdrop"),t("OutboundLink")],1),e._v(" to install "),t("a",{attrs:{href:"https://snapdrop.net/",target:"_blank",rel:"noopener noreferrer"}},[e._v("Snapdrop"),t("OutboundLink")],1),e._v(". You can then browse to "),t("code",[e._v("/snapdrop")]),e._v(" of your server to access it.")])]),e._v(" "),t("p",[e._v("You can also create your own "),t("a",{attrs:{href:"#how-can-i-customize-the-generated-docker-compose-file"}},[e._v("custom fragments")]),e._v(".")]),e._v(" "),t("p",[e._v("If you want to add an option to "),t("code",[e._v("BTCPAYGEN_ADDITIONAL_FRAGMENTS")]),e._v(" and re-configure your install:")]),e._v(" "),t("div",{staticClass:"language-bash extra-class"},[t("pre",{pre:!0,attrs:{class:"language-bash"}},[t("code",[t("span",{pre:!0,attrs:{class:"token builtin class-name"}},[e._v("export")]),e._v(" "),t("span",{pre:!0,attrs:{class:"token assign-left variable"}},[e._v("BTCPAYGEN_ADDITIONAL_FRAGMENTS")]),t("span",{pre:!0,attrs:{class:"token operator"}},[e._v("=")]),t("span",{pre:!0,attrs:{class:"token string"}},[e._v('"'),t("span",{pre:!0,attrs:{class:"token variable"}},[e._v("$BTCPAYGEN_ADDITIONAL_FRAGMENTS")]),e._v(';opt-lnd-autopilot"')]),e._v("\n"),t("span",{pre:!0,attrs:{class:"token builtin class-name"}},[e._v(".")]),e._v(" btcpay-setup.sh "),t("span",{pre:!0,attrs:{class:"token parameter variable"}},[e._v("-i")]),e._v("\n")])])]),t("p",[e._v("For example, if you want "),t("code",[e._v("btc")]),e._v(" and "),t("code",[e._v("ltc")]),e._v(" support with "),t("code",[e._v("nginx")]),e._v(" and "),t("code",[e._v("clightning")]),e._v(" inside "),t("code",[e._v("Generated/docker-compose.custom.yml")]),e._v(":")]),e._v(" "),t("p",[e._v("Note: The first run might take a while, but following runs are instantaneous.")]),e._v(" "),t("p",[e._v("On Windows (run in "),t("a",{attrs:{href:"https://docs.microsoft.com/en-us/powershell/scripting/windows-powershell/starting-windows-powershell",target:"_blank",rel:"noopener noreferrer"}},[e._v("powershell"),t("OutboundLink")],1),e._v("):")]),e._v(" "),t("div",{staticClass:"language-powershell extra-class"},[t("pre",{pre:!0,attrs:{class:"language-powershell"}},[t("code",[t("span",{pre:!0,attrs:{class:"token function"}},[e._v("Invoke-Command")]),e._v(" "),t("span",{pre:!0,attrs:{class:"token punctuation"}},[e._v("{")]),e._v("\n "),t("span",{pre:!0,attrs:{class:"token variable"}},[e._v("$BTCPAYGEN_CRYPTO1")]),e._v("="),t("span",{pre:!0,attrs:{class:"token string"}},[e._v('"btc"')]),e._v("\n "),t("span",{pre:!0,attrs:{class:"token variable"}},[e._v("$BTCPAYGEN_CRYPTO2")]),e._v("="),t("span",{pre:!0,attrs:{class:"token string"}},[e._v('"ltc"')]),e._v("\n "),t("span",{pre:!0,attrs:{class:"token variable"}},[e._v("$BTCPAYGEN_REVERSEPROXY")]),e._v("="),t("span",{pre:!0,attrs:{class:"token string"}},[e._v('"nginx"')]),e._v("\n "),t("span",{pre:!0,attrs:{class:"token variable"}},[e._v("$BTCPAYGEN_LIGHTNING")]),e._v("="),t("span",{pre:!0,attrs:{class:"token string"}},[e._v('"clightning"')]),e._v("\n "),t("span",{pre:!0,attrs:{class:"token variable"}},[e._v("$BTCPAYGEN_SUBNAME")]),e._v("="),t("span",{pre:!0,attrs:{class:"token string"}},[e._v('"custom"')]),e._v("\n "),t("span",{pre:!0,attrs:{class:"token punctuation"}},[e._v(".")]),e._v(" "),t("span",{pre:!0,attrs:{class:"token punctuation"}},[e._v(".")]),e._v("\\build"),t("span",{pre:!0,attrs:{class:"token punctuation"}},[e._v(".")]),e._v("ps1\n"),t("span",{pre:!0,attrs:{class:"token punctuation"}},[e._v("}")]),e._v("\n")])])]),t("p",[e._v("On Linux:")]),e._v(" "),t("div",{staticClass:"language-bash extra-class"},[t("pre",{pre:!0,attrs:{class:"language-bash"}},[t("code",[t("span",{pre:!0,attrs:{class:"token assign-left variable"}},[e._v("BTCPAYGEN_CRYPTO1")]),t("span",{pre:!0,attrs:{class:"token operator"}},[e._v("=")]),t("span",{pre:!0,attrs:{class:"token string"}},[e._v('"btc"')]),e._v(" "),t("span",{pre:!0,attrs:{class:"token punctuation"}},[e._v("\\")]),e._v("\n"),t("span",{pre:!0,attrs:{class:"token assign-left variable"}},[e._v("BTCPAYGEN_CRYPTO2")]),t("span",{pre:!0,attrs:{class:"token operator"}},[e._v("=")]),t("span",{pre:!0,attrs:{class:"token string"}},[e._v('"ltc"')]),e._v(" "),t("span",{pre:!0,attrs:{class:"token punctuation"}},[e._v("\\")]),e._v("\n"),t("span",{pre:!0,attrs:{class:"token assign-left variable"}},[e._v("BTCPAYGEN_REVERSEPROXY")]),t("span",{pre:!0,attrs:{class:"token operator"}},[e._v("=")]),t("span",{pre:!0,attrs:{class:"token string"}},[e._v('"nginx"')]),e._v(" "),t("span",{pre:!0,attrs:{class:"token punctuation"}},[e._v("\\")]),e._v("\n"),t("span",{pre:!0,attrs:{class:"token assign-left variable"}},[e._v("BTCPAYGEN_LIGHTNING")]),t("span",{pre:!0,attrs:{class:"token operator"}},[e._v("=")]),t("span",{pre:!0,attrs:{class:"token string"}},[e._v('"clightning"')]),e._v(" "),t("span",{pre:!0,attrs:{class:"token punctuation"}},[e._v("\\")]),e._v("\n"),t("span",{pre:!0,attrs:{class:"token assign-left variable"}},[e._v("BTCPAYGEN_SUBNAME")]),t("span",{pre:!0,attrs:{class:"token operator"}},[e._v("=")]),t("span",{pre:!0,attrs:{class:"token string"}},[e._v('"custom"')]),e._v(" "),t("span",{pre:!0,attrs:{class:"token punctuation"}},[e._v("\\")]),e._v("\n./build.sh\n")])])]),t("p",[e._v("Next, you will need to configure the runtime environment variables for "),t("code",[e._v("Generated/docker-compose.custom.yml")]),e._v(":")]),e._v(" "),t("ul",[t("li",[e._v("If you are using NGinx, "),t("a",{attrs:{href:"https://github.com/btcpayserver/btcpayserver-docker/blob/master/Production/README.md",target:"_blank",rel:"noopener noreferrer"}},[e._v("read this"),t("OutboundLink")],1),e._v(".")]),e._v(" "),t("li",[e._v("If you are not using NGinx, "),t("a",{attrs:{href:"https://github.com/btcpayserver/btcpayserver-docker/blob/master/Production-NoReverseProxy/README.md",target:"_blank",rel:"noopener noreferrer"}},[e._v("read this instead"),t("OutboundLink")],1),e._v(".")])]),e._v(" "),t("h2",{attrs:{id:"again-what-does-btcpay-setupsh-do"}},[t("a",{staticClass:"header-anchor",attrs:{href:"#again-what-does-btcpay-setupsh-do"}},[e._v("#")]),e._v(" Again, what does "),t("code",[e._v("btcpay-setup.sh")]),e._v(" do?")]),e._v(" "),t("p",[t("code",[e._v("btcpay-setup.sh")]),e._v(" is a utility which does the following:")]),e._v(" "),t("ol",[t("li",[e._v("Makes sure docker and docker-compose are installed on your system")]),e._v(" "),t("li",[e._v("Generates a docker-compose via "),t("code",[e._v("./build.sh")])]),e._v(" "),t("li",[e._v("Sets up an "),t("a",{attrs:{href:"https://docs.docker.com/compose/env-file/",target:"_blank",rel:"noopener noreferrer"}},[e._v("Environment File"),t("OutboundLink")],1),e._v(" to configure your docker-compose")]),e._v(" "),t("li",[e._v("Sets up environment variables so the tools described in "),t("a",{attrs:{href:"#tooling"}},[e._v("Tooling")]),e._v(" can work")]),e._v(" "),t("li",[e._v("Adds symlinks of those tools into "),t("code",[e._v("/usr/bin")])]),e._v(" "),t("li",[e._v("Makes sure BTCPay restarts on reboot via upstart or systemd")]),e._v(" "),t("li",[e._v("Starts BTCPay via docker-compose")])]),e._v(" "),t("h2",{attrs:{id:"overview-of-files-generated-by-btcpay-setupsh"}},[t("a",{staticClass:"header-anchor",attrs:{href:"#overview-of-files-generated-by-btcpay-setupsh"}},[e._v("#")]),e._v(" Overview of files generated by "),t("code",[e._v("btcpay-setup.sh")])]),e._v(" "),t("p",[t("code",[e._v("/etc/profile.d/btcpay-env.sh")]),e._v(" ensures that your environment variables are correctly setup when you login, so you can use the tools:")]),e._v(" "),t("div",{staticClass:"language-bash extra-class"},[t("pre",{pre:!0,attrs:{class:"language-bash"}},[t("code",[t("span",{pre:!0,attrs:{class:"token builtin class-name"}},[e._v("export")]),e._v(" "),t("span",{pre:!0,attrs:{class:"token assign-left variable"}},[e._v("BTCPAYGEN_OLD_PREGEN")]),t("span",{pre:!0,attrs:{class:"token operator"}},[e._v("=")]),t("span",{pre:!0,attrs:{class:"token string"}},[e._v('"false"')]),e._v("\n"),t("span",{pre:!0,attrs:{class:"token builtin class-name"}},[e._v("export")]),e._v(" "),t("span",{pre:!0,attrs:{class:"token assign-left variable"}},[e._v("BTCPAYGEN_CRYPTO1")]),t("span",{pre:!0,attrs:{class:"token operator"}},[e._v("=")]),t("span",{pre:!0,attrs:{class:"token string"}},[e._v('"btc"')]),e._v("\n"),t("span",{pre:!0,attrs:{class:"token builtin class-name"}},[e._v("export")]),e._v(" "),t("span",{pre:!0,attrs:{class:"token assign-left variable"}},[e._v("BTCPAYGEN_CRYPTO2")]),t("span",{pre:!0,attrs:{class:"token operator"}},[e._v("=")]),t("span",{pre:!0,attrs:{class:"token string"}},[e._v('""')]),e._v("\n"),t("span",{pre:!0,attrs:{class:"token builtin class-name"}},[e._v("export")]),e._v(" "),t("span",{pre:!0,attrs:{class:"token assign-left variable"}},[e._v("BTCPAYGEN_CRYPTO3")]),t("span",{pre:!0,attrs:{class:"token operator"}},[e._v("=")]),t("span",{pre:!0,attrs:{class:"token string"}},[e._v('""')]),e._v("\n"),t("span",{pre:!0,attrs:{class:"token builtin class-name"}},[e._v("export")]),e._v(" "),t("span",{pre:!0,attrs:{class:"token assign-left variable"}},[e._v("BTCPAYGEN_CRYPTO4")]),t("span",{pre:!0,attrs:{class:"token operator"}},[e._v("=")]),t("span",{pre:!0,attrs:{class:"token string"}},[e._v('""')]),e._v("\n"),t("span",{pre:!0,attrs:{class:"token builtin class-name"}},[e._v("export")]),e._v(" "),t("span",{pre:!0,attrs:{class:"token assign-left variable"}},[e._v("BTCPAYGEN_CRYPTO5")]),t("span",{pre:!0,attrs:{class:"token operator"}},[e._v("=")]),t("span",{pre:!0,attrs:{class:"token string"}},[e._v('""')]),e._v("\n"),t("span",{pre:!0,attrs:{class:"token builtin class-name"}},[e._v("export")]),e._v(" "),t("span",{pre:!0,attrs:{class:"token assign-left variable"}},[e._v("BTCPAYGEN_CRYPTO6")]),t("span",{pre:!0,attrs:{class:"token operator"}},[e._v("=")]),t("span",{pre:!0,attrs:{class:"token string"}},[e._v('""')]),e._v("\n"),t("span",{pre:!0,attrs:{class:"token builtin class-name"}},[e._v("export")]),e._v(" "),t("span",{pre:!0,attrs:{class:"token assign-left variable"}},[e._v("BTCPAYGEN_CRYPTO7")]),t("span",{pre:!0,attrs:{class:"token operator"}},[e._v("=")]),t("span",{pre:!0,attrs:{class:"token string"}},[e._v('""')]),e._v("\n"),t("span",{pre:!0,attrs:{class:"token builtin class-name"}},[e._v("export")]),e._v(" "),t("span",{pre:!0,attrs:{class:"token assign-left variable"}},[e._v("BTCPAYGEN_CRYPTO8")]),t("span",{pre:!0,attrs:{class:"token operator"}},[e._v("=")]),t("span",{pre:!0,attrs:{class:"token string"}},[e._v('""')]),e._v("\n"),t("span",{pre:!0,attrs:{class:"token builtin class-name"}},[e._v("export")]),e._v(" "),t("span",{pre:!0,attrs:{class:"token assign-left variable"}},[e._v("BTCPAYGEN_CRYPTO9")]),t("span",{pre:!0,attrs:{class:"token operator"}},[e._v("=")]),t("span",{pre:!0,attrs:{class:"token string"}},[e._v('""')]),e._v("\n"),t("span",{pre:!0,attrs:{class:"token builtin class-name"}},[e._v("export")]),e._v(" "),t("span",{pre:!0,attrs:{class:"token assign-left variable"}},[e._v("BTCPAYGEN_LIGHTNING")]),t("span",{pre:!0,attrs:{class:"token operator"}},[e._v("=")]),t("span",{pre:!0,attrs:{class:"token string"}},[e._v('"clightning"')]),e._v("\n"),t("span",{pre:!0,attrs:{class:"token builtin class-name"}},[e._v("export")]),e._v(" "),t("span",{pre:!0,attrs:{class:"token assign-left variable"}},[e._v("BTCPAYGEN_REVERSEPROXY")]),t("span",{pre:!0,attrs:{class:"token operator"}},[e._v("=")]),t("span",{pre:!0,attrs:{class:"token string"}},[e._v('"nginx"')]),e._v("\n"),t("span",{pre:!0,attrs:{class:"token builtin class-name"}},[e._v("export")]),e._v(" "),t("span",{pre:!0,attrs:{class:"token assign-left variable"}},[e._v("BTCPAYGEN_ADDITIONAL_FRAGMENTS")]),t("span",{pre:!0,attrs:{class:"token operator"}},[e._v("=")]),t("span",{pre:!0,attrs:{class:"token string"}},[e._v('""')]),e._v("\n"),t("span",{pre:!0,attrs:{class:"token builtin class-name"}},[e._v("export")]),e._v(" "),t("span",{pre:!0,attrs:{class:"token assign-left variable"}},[e._v("BTCPAY_DOCKER_COMPOSE")]),t("span",{pre:!0,attrs:{class:"token operator"}},[e._v("=")]),t("span",{pre:!0,attrs:{class:"token string"}},[e._v('"/var/lib/waagent/custom-script/download/0/btcpayserver-docker/Production/docker-compose.generated.yml"')]),e._v("\n"),t("span",{pre:!0,attrs:{class:"token builtin class-name"}},[e._v("export")]),e._v(" "),t("span",{pre:!0,attrs:{class:"token assign-left variable"}},[e._v("BTCPAY_BASE_DIRECTORY")]),t("span",{pre:!0,attrs:{class:"token operator"}},[e._v("=")]),t("span",{pre:!0,attrs:{class:"token string"}},[e._v('"/var/lib/waagent/custom-script/download/0"')]),e._v("\n"),t("span",{pre:!0,attrs:{class:"token builtin class-name"}},[e._v("export")]),e._v(" "),t("span",{pre:!0,attrs:{class:"token assign-left variable"}},[e._v("BTCPAY_ENV_FILE")]),t("span",{pre:!0,attrs:{class:"token operator"}},[e._v("=")]),t("span",{pre:!0,attrs:{class:"token string"}},[e._v('"/var/lib/waagent/custom-script/download/0/.env"')]),e._v("\n"),t("span",{pre:!0,attrs:{class:"token builtin class-name"}},[e._v("export")]),e._v(" "),t("span",{pre:!0,attrs:{class:"token assign-left variable"}},[e._v("BTCPAY_HOST_SSHKEYFILE")]),t("span",{pre:!0,attrs:{class:"token operator"}},[e._v("=")]),t("span",{pre:!0,attrs:{class:"token string"}},[e._v('"/root/.ssh/id_rsa_btcpay"')]),e._v("\n"),t("span",{pre:!0,attrs:{class:"token keyword"}},[e._v("if")]),e._v(" "),t("span",{pre:!0,attrs:{class:"token function"}},[e._v("cat")]),e._v(" "),t("span",{pre:!0,attrs:{class:"token variable"}},[e._v("$BTCPAY_ENV_FILE")]),e._v(" "),t("span",{pre:!0,attrs:{class:"token operator"}},[e._v("&>")]),e._v(" /dev/null"),t("span",{pre:!0,attrs:{class:"token punctuation"}},[e._v(";")]),e._v(" "),t("span",{pre:!0,attrs:{class:"token keyword"}},[e._v("then")]),e._v("\n "),t("span",{pre:!0,attrs:{class:"token builtin class-name"}},[e._v("export")]),e._v(" "),t("span",{pre:!0,attrs:{class:"token variable"}},[t("span",{pre:!0,attrs:{class:"token variable"}},[e._v("$(")]),t("span",{pre:!0,attrs:{class:"token function"}},[e._v("grep")]),e._v(" "),t("span",{pre:!0,attrs:{class:"token parameter variable"}},[e._v("-v")]),e._v(" "),t("span",{pre:!0,attrs:{class:"token string"}},[e._v("'^#'")]),e._v(" "),t("span",{pre:!0,attrs:{class:"token string"}},[e._v('"'),t("span",{pre:!0,attrs:{class:"token variable"}},[e._v("$BTCPAY_ENV_FILE")]),e._v('"')]),e._v(" "),t("span",{pre:!0,attrs:{class:"token operator"}},[e._v("|")]),e._v(" "),t("span",{pre:!0,attrs:{class:"token function"}},[e._v("xargs")]),t("span",{pre:!0,attrs:{class:"token variable"}},[e._v(")")])]),e._v("\n"),t("span",{pre:!0,attrs:{class:"token keyword"}},[e._v("fi")]),e._v("\n")])])]),t("p",[t("code",[e._v("/etc/systemd/system/btcpayserver.service")]),e._v(" ensures that you can control btcpay via "),t("code",[e._v("systemctl")]),e._v(", and that BTCPayServer starts on reboot:")]),e._v(" "),t("div",{staticClass:"language-ini extra-class"},[t("pre",{pre:!0,attrs:{class:"language-ini"}},[t("code",[t("span",{pre:!0,attrs:{class:"token section"}},[t("span",{pre:!0,attrs:{class:"token punctuation"}},[e._v("[")]),t("span",{pre:!0,attrs:{class:"token section-name selector"}},[e._v("Unit")]),t("span",{pre:!0,attrs:{class:"token punctuation"}},[e._v("]")])]),e._v("\n"),t("span",{pre:!0,attrs:{class:"token key attr-name"}},[e._v("Description")]),t("span",{pre:!0,attrs:{class:"token punctuation"}},[e._v("=")]),t("span",{pre:!0,attrs:{class:"token value attr-value"}},[e._v("BTCPayServer service")]),e._v("\n"),t("span",{pre:!0,attrs:{class:"token key attr-name"}},[e._v("After")]),t("span",{pre:!0,attrs:{class:"token punctuation"}},[e._v("=")]),t("span",{pre:!0,attrs:{class:"token value attr-value"}},[e._v("docker.service network-online.target")]),e._v("\n"),t("span",{pre:!0,attrs:{class:"token key attr-name"}},[e._v("Requires")]),t("span",{pre:!0,attrs:{class:"token punctuation"}},[e._v("=")]),t("span",{pre:!0,attrs:{class:"token value attr-value"}},[e._v("docker.service network-online.target")]),e._v("\n\n"),t("span",{pre:!0,attrs:{class:"token section"}},[t("span",{pre:!0,attrs:{class:"token punctuation"}},[e._v("[")]),t("span",{pre:!0,attrs:{class:"token section-name selector"}},[e._v("Service")]),t("span",{pre:!0,attrs:{class:"token punctuation"}},[e._v("]")])]),e._v("\n"),t("span",{pre:!0,attrs:{class:"token key attr-name"}},[e._v("Type")]),t("span",{pre:!0,attrs:{class:"token punctuation"}},[e._v("=")]),t("span",{pre:!0,attrs:{class:"token value attr-value"}},[e._v("oneshot")]),e._v("\n"),t("span",{pre:!0,attrs:{class:"token key attr-name"}},[e._v("RemainAfterExit")]),t("span",{pre:!0,attrs:{class:"token punctuation"}},[e._v("=")]),t("span",{pre:!0,attrs:{class:"token value attr-value"}},[e._v("yes")]),e._v("\n\n"),t("span",{pre:!0,attrs:{class:"token key attr-name"}},[e._v("ExecStart")]),t("span",{pre:!0,attrs:{class:"token punctuation"}},[e._v("=")]),t("span",{pre:!0,attrs:{class:"token value attr-value"}},[e._v("/bin/bash -c '. /etc/profile.d/btcpay-env.sh && cd \"$BTCPAY_BASE_DIRECTORY/btcpayserver-docker\" && . helpers.sh && btcpay_up'")]),e._v("\n"),t("span",{pre:!0,attrs:{class:"token key attr-name"}},[e._v("ExecStop")]),t("span",{pre:!0,attrs:{class:"token punctuation"}},[e._v("=")]),t("span",{pre:!0,attrs:{class:"token value attr-value"}},[e._v("/bin/bash -c '. /etc/profile.d/btcpay-env.sh && cd \"$BTCPAY_BASE_DIRECTORY/btcpayserver-docker\" && . helpers.sh && btcpay_down'")]),e._v("\n"),t("span",{pre:!0,attrs:{class:"token key attr-name"}},[e._v("ExecReload")]),t("span",{pre:!0,attrs:{class:"token punctuation"}},[e._v("=")]),t("span",{pre:!0,attrs:{class:"token value attr-value"}},[e._v("/bin/bash -c '. /etc/profile.d/btcpay-env.sh && cd \"$BTCPAY_BASE_DIRECTORY/btcpayserver-docker\" && . helpers.sh && btcpay_restart'")]),e._v("\n\n"),t("span",{pre:!0,attrs:{class:"token section"}},[t("span",{pre:!0,attrs:{class:"token punctuation"}},[e._v("[")]),t("span",{pre:!0,attrs:{class:"token section-name selector"}},[e._v("Install")]),t("span",{pre:!0,attrs:{class:"token punctuation"}},[e._v("]")])]),e._v("\n"),t("span",{pre:!0,attrs:{class:"token key attr-name"}},[e._v("WantedBy")]),t("span",{pre:!0,attrs:{class:"token punctuation"}},[e._v("=")]),t("span",{pre:!0,attrs:{class:"token value attr-value"}},[e._v("multi-user.target")]),e._v("\n")])])]),t("p",[t("code",[e._v(".env")]),e._v(" ("),t("code",[e._v("$BTCPAY_ENV_FILE")]),e._v(") contains environment variables passed to the containers managed by your docker-compose:")]),e._v(" "),t("div",{staticClass:"language-ini extra-class"},[t("pre",{pre:!0,attrs:{class:"language-ini"}},[t("code",[t("span",{pre:!0,attrs:{class:"token key attr-name"}},[e._v("BTCPAY_HOST")]),t("span",{pre:!0,attrs:{class:"token punctuation"}},[e._v("=")]),t("span",{pre:!0,attrs:{class:"token value attr-value"}},[e._v("btcpay.EXAMPLE.com")]),e._v("\n"),t("span",{pre:!0,attrs:{class:"token key attr-name"}},[e._v("ACME_CA_URI")]),t("span",{pre:!0,attrs:{class:"token punctuation"}},[e._v("=")]),t("span",{pre:!0,attrs:{class:"token value attr-value"}},[e._v("production")]),e._v("\n"),t("span",{pre:!0,attrs:{class:"token key attr-name"}},[e._v("NBITCOIN_NETWORK")]),t("span",{pre:!0,attrs:{class:"token punctuation"}},[e._v("=")]),t("span",{pre:!0,attrs:{class:"token value attr-value"}},[e._v("mainnet")]),e._v("\n"),t("span",{pre:!0,attrs:{class:"token key attr-name"}},[e._v("LETSENCRYPT_EMAIL")]),t("span",{pre:!0,attrs:{class:"token punctuation"}},[e._v("=")]),t("span",{pre:!0,attrs:{class:"token value attr-value"}},[e._v("me@EXAMPLE.com")]),e._v("\n"),t("span",{pre:!0,attrs:{class:"token key attr-name"}},[e._v("BTCPAY_SSHTRUSTEDFINGERPRINTS")]),t("span",{pre:!0,attrs:{class:"token punctuation"}},[e._v("=")]),t("span",{pre:!0,attrs:{class:"token value attr-value"}},[e._v("SHA256:eSCD7NtQ/Q6IBl2iRB9caAQ3lDZd8s8iUL6SdeNnhpA")]),e._v("\n"),t("span",{pre:!0,attrs:{class:"token key attr-name"}},[e._v("BTCPAY_SSHKEYFILE")]),t("span",{pre:!0,attrs:{class:"token punctuation"}},[e._v("=")]),t("span",{pre:!0,attrs:{class:"token value attr-value"}},[e._v("/datadir/id_rsa")]),e._v("\n")])])]),t("h1",{attrs:{id:"how-can-i-add-an-altcoin-to-btcpayserver"}},[t("a",{staticClass:"header-anchor",attrs:{href:"#how-can-i-add-an-altcoin-to-btcpayserver"}},[e._v("#")]),e._v(" How can I add an altcoin to BTCPayServer?")]),e._v(" "),t("ol",[t("li",[e._v("Add support for your crypto to "),t("a",{attrs:{href:"https://github.com/MetacoSA/NBitcoin/tree/master/NBitcoin.Altcoins",target:"_blank",rel:"noopener noreferrer"}},[e._v("NBitcoin"),t("OutboundLink")],1),e._v(", "),t("a",{attrs:{href:"https://github.com/dgarage/NBXplorer",target:"_blank",rel:"noopener noreferrer"}},[e._v("NBxplorer"),t("OutboundLink")],1),e._v(", and "),t("a",{attrs:{href:"https://github.com/btcpayserver/btcpayserver",target:"_blank",rel:"noopener noreferrer"}},[e._v("BTCPayServer"),t("OutboundLink")],1),e._v(". (Use examples from other coins)")]),e._v(" "),t("li",[e._v("Create your own docker image ("),t("a",{attrs:{href:"https://hub.docker.com/r/nicolasdorier/docker-bitcoin/",target:"_blank",rel:"noopener noreferrer"}},[e._v("Example for BTC"),t("OutboundLink")],1),e._v(")")]),e._v(" "),t("li",[e._v("Create a docker-compose fragment ("),t("a",{attrs:{href:"https://github.com/btcpayserver/btcpayserver-docker/blob/master/docker-compose-generator/docker-fragments/bitcoin.yml",target:"_blank",rel:"noopener noreferrer"}},[e._v("Example for BTC"),t("OutboundLink")],1),e._v(")")]),e._v(" "),t("li",[e._v("Add your "),t("code",[e._v("CryptoDefinition")]),e._v(" ("),t("a",{attrs:{href:"https://github.com/btcpayserver/btcpayserver-docker/blob/master/docker-compose-generator/src/CryptoDefinition.cs",target:"_blank",rel:"noopener noreferrer"}},[e._v("Example for BTC"),t("OutboundLink")],1),e._v(")")])]),e._v(" "),t("p",[t("code",[e._v("build.sh")]),e._v(" is using a pre-built image of the "),t("code",[e._v("docker-compose generator")]),e._v(" on "),t("a",{attrs:{href:"https://hub.docker.com/r/btcpayserver/docker-compose-generator/",target:"_blank",rel:"noopener noreferrer"}},[e._v("docker hub"),t("OutboundLink")],1),e._v(".\nIf you modify the code source of "),t("code",[e._v("docker-compose generator")]),e._v(" (for example, the "),t("code",[e._v("CryptoDefinition")]),e._v(" "),t("a",{attrs:{href:"https://github.com/btcpayserver/btcpayserver-docker/blob/master/docker-compose-generator/src/CryptoDefinition.cs",target:"_blank",rel:"noopener noreferrer"}},[e._v("Example for BTC"),t("OutboundLink")],1),e._v("), you need to configure "),t("code",[e._v("build.sh")]),e._v(" to use your own image by setting the environment variable "),t("code",[e._v("BTCPAYGEN_DOCKER_IMAGE")]),e._v(" to "),t("code",[e._v("btcpayserver/docker-compose-generator:local")]),e._v(".")]),e._v(" "),t("div",{staticClass:"language-bash extra-class"},[t("pre",{pre:!0,attrs:{class:"language-bash"}},[t("code",[t("span",{pre:!0,attrs:{class:"token builtin class-name"}},[e._v("cd")]),e._v(" docker-compose-generator\n"),t("span",{pre:!0,attrs:{class:"token assign-left variable"}},[e._v("BTCPAYGEN_DOCKER_IMAGE")]),t("span",{pre:!0,attrs:{class:"token operator"}},[e._v("=")]),t("span",{pre:!0,attrs:{class:"token string"}},[e._v('"btcpayserver/docker-compose-generator:local"')]),e._v("\n")])])]),t("p",[e._v("Or on powershell:")]),e._v(" "),t("div",{staticClass:"language-powershell extra-class"},[t("pre",{pre:!0,attrs:{class:"language-powershell"}},[t("code",[e._v("cd docker-compose-generator\n"),t("span",{pre:!0,attrs:{class:"token variable"}},[e._v("$BTCPAYGEN_DOCKER_IMAGE")]),e._v("="),t("span",{pre:!0,attrs:{class:"token string"}},[e._v('"btcpayserver/docker-compose-generator:local"')]),e._v("\n")])])]),t("p",[e._v("Then run "),t("code",[e._v("./build.sh")]),e._v(" or "),t("code",[e._v(". .\\build.ps1")]),e._v(".\nThis will generate your docker-compose in the "),t("code",[e._v("Generated")]),e._v(" folder, which you can then run and test.")]),e._v(" "),t("p",[e._v("Note that BTCPayServer developers will not spend excessive time testing your image, so make sure it works.")]),e._v(" "),t("h1",{attrs:{id:"support"}},[t("a",{staticClass:"header-anchor",attrs:{href:"#support"}},[e._v("#")]),e._v(" Support")]),e._v(" "),t("table",[t("thead",[t("tr",[t("th",[e._v("Image")]),e._v(" "),t("th",[e._v("Version")]),e._v(" "),t("th",{staticStyle:{"text-align":"center"}},[e._v("x64")]),e._v(" "),t("th",{staticStyle:{"text-align":"center"}},[e._v("arm32v7")]),e._v(" "),t("th",{staticStyle:{"text-align":"center"}},[e._v("arm64v8")]),e._v(" "),t("th",{staticStyle:{"text-align":"center"}},[e._v("links")])])]),e._v(" "),t("tbody",[t("tr",[t("td",[e._v("btcpayserver/docker-compose-generator")]),e._v(" "),t("td",[e._v("latest")]),e._v(" "),t("td",{staticStyle:{"text-align":"center"}},[t("a",{attrs:{href:"https://raw.githubusercontent.com/btcpayserver/btcpayserver-docker/dcg-latest/docker-compose-generator/Dockerfile",target:"_blank",rel:"noopener noreferrer"}},[e._v("✔️"),t("OutboundLink")],1)]),e._v(" "),t("td",{staticStyle:{"text-align":"center"}},[t("a",{attrs:{href:"https://raw.githubusercontent.com/btcpayserver/btcpayserver-docker/dcg-latest/docker-compose-generator/Dockerfile",target:"_blank",rel:"noopener noreferrer"}},[e._v("✔️"),t("OutboundLink")],1)]),e._v(" "),t("td",{staticStyle:{"text-align":"center"}},[t("a",{attrs:{href:"https://raw.githubusercontent.com/btcpayserver/btcpayserver-docker/dcg-latest/docker-compose-generator/Dockerfile",target:"_blank",rel:"noopener noreferrer"}},[e._v("✔️"),t("OutboundLink")],1)]),e._v(" "),t("td",{staticStyle:{"text-align":"center"}},[t("a",{attrs:{href:"https://github.com/btcpayserver/btcpayserver-docker",target:"_blank",rel:"noopener noreferrer"}},[e._v("Github"),t("OutboundLink")],1),e._v(" - "),t("a",{attrs:{href:"https://hub.docker.com/r/btcpayserver/docker-compose-generator",target:"_blank",rel:"noopener noreferrer"}},[e._v("DockerHub"),t("OutboundLink")],1)])]),e._v(" "),t("tr",[t("td",[e._v("btcpayserver/lightning")]),e._v(" "),t("td",[e._v("v24.05")]),e._v(" "),t("td",{staticStyle:{"text-align":"center"}},[t("a",{attrs:{href:"https://raw.githubusercontent.com/btcpayserver/lightning/basedon-v24.05/Dockerfile",target:"_blank",rel:"noopener noreferrer"}},[e._v("✔️"),t("OutboundLink")],1)]),e._v(" "),t("td",{staticStyle:{"text-align":"center"}},[t("a",{attrs:{href:"https://raw.githubusercontent.com/btcpayserver/lightning/basedon-v24.05/Dockerfile",target:"_blank",rel:"noopener noreferrer"}},[e._v("✔️"),t("OutboundLink")],1)]),e._v(" "),t("td",{staticStyle:{"text-align":"center"}},[t("a",{attrs:{href:"https://raw.githubusercontent.com/btcpayserver/lightning/basedon-v24.05/Dockerfile",target:"_blank",rel:"noopener noreferrer"}},[e._v("✔️"),t("OutboundLink")],1)]),e._v(" "),t("td",{staticStyle:{"text-align":"center"}},[t("a",{attrs:{href:"https://github.com/btcpayserver/lightning",target:"_blank",rel:"noopener noreferrer"}},[e._v("Github"),t("OutboundLink")],1),e._v(" - "),t("a",{attrs:{href:"https://hub.docker.com/r/btcpayserver/lightning",target:"_blank",rel:"noopener noreferrer"}},[e._v("DockerHub"),t("OutboundLink")],1)])]),e._v(" "),t("tr",[t("td",[e._v("shahanafarooqui/rtl")]),e._v(" "),t("td",[e._v("0.15.0")]),e._v(" "),t("td",{staticStyle:{"text-align":"center"}},[t("a",{attrs:{href:"https://raw.githubusercontent.com/Ride-The-Lightning/RTL/v0.15.0/dockerfiles/Dockerfile",target:"_blank",rel:"noopener noreferrer"}},[e._v("✔️"),t("OutboundLink")],1)]),e._v(" "),t("td",{staticStyle:{"text-align":"center"}},[t("a",{attrs:{href:"https://raw.githubusercontent.com/Ride-The-Lightning/RTL/v0.15.0/dockerfiles/Dockerfile.arm32v7",target:"_blank",rel:"noopener noreferrer"}},[e._v("✔️"),t("OutboundLink")],1)]),e._v(" "),t("td",{staticStyle:{"text-align":"center"}},[t("a",{attrs:{href:"https://raw.githubusercontent.com/Ride-The-Lightning/RTL/v0.15.0/dockerfiles/Dockerfile.arm64v8",target:"_blank",rel:"noopener noreferrer"}},[e._v("✔️"),t("OutboundLink")],1)]),e._v(" "),t("td",{staticStyle:{"text-align":"center"}},[t("a",{attrs:{href:"https://github.com/Ride-The-Lightning/RTL",target:"_blank",rel:"noopener noreferrer"}},[e._v("Github"),t("OutboundLink")],1),e._v(" - "),t("a",{attrs:{href:"https://hub.docker.com/r/shahanafarooqui/rtl",target:"_blank",rel:"noopener noreferrer"}},[e._v("DockerHub"),t("OutboundLink")],1)])]),e._v(" "),t("tr",[t("td",[e._v("btcpayserver/lnd")]),e._v(" "),t("td",[e._v("v0.18.3-beta")]),e._v(" "),t("td",{staticStyle:{"text-align":"center"}},[t("a",{attrs:{href:"https://raw.githubusercontent.com/btcpayserver/lnd/basedon-v0.18.3-beta/linuxamd64.Dockerfile",target:"_blank",rel:"noopener noreferrer"}},[e._v("✔️"),t("OutboundLink")],1)]),e._v(" "),t("td",{staticStyle:{"text-align":"center"}},[t("a",{attrs:{href:"https://raw.githubusercontent.com/btcpayserver/lnd/basedon-v0.18.3-beta/linuxarm32v7.Dockerfile",target:"_blank",rel:"noopener noreferrer"}},[e._v("✔️"),t("OutboundLink")],1)]),e._v(" "),t("td",{staticStyle:{"text-align":"center"}},[t("a",{attrs:{href:"https://raw.githubusercontent.com/btcpayserver/lnd/basedon-v0.18.3-beta/linuxarm64v8.Dockerfile",target:"_blank",rel:"noopener noreferrer"}},[e._v("✔️"),t("OutboundLink")],1)]),e._v(" "),t("td",{staticStyle:{"text-align":"center"}},[t("a",{attrs:{href:"https://github.com/btcpayserver/lnd",target:"_blank",rel:"noopener noreferrer"}},[e._v("Github"),t("OutboundLink")],1),e._v(" - "),t("a",{attrs:{href:"https://hub.docker.com/r/btcpayserver/lnd",target:"_blank",rel:"noopener noreferrer"}},[e._v("DockerHub"),t("OutboundLink")],1)])]),e._v(" "),t("tr",[t("td",[e._v("btcpayserver/bitcoin")]),e._v(" "),t("td",[e._v("26.0")]),e._v(" "),t("td",{staticStyle:{"text-align":"center"}},[t("a",{attrs:{href:"https://raw.githubusercontent.com/btcpayserver/dockerfile-deps/Bitcoin/26.0/Bitcoin/26.0/linuxamd64.Dockerfile",target:"_blank",rel:"noopener noreferrer"}},[e._v("✔️"),t("OutboundLink")],1)]),e._v(" "),t("td",{staticStyle:{"text-align":"center"}},[t("a",{attrs:{href:"https://raw.githubusercontent.com/btcpayserver/dockerfile-deps/Bitcoin/26.0/Bitcoin/26.0/linuxarm32v7.Dockerfile",target:"_blank",rel:"noopener noreferrer"}},[e._v("✔️"),t("OutboundLink")],1)]),e._v(" "),t("td",{staticStyle:{"text-align":"center"}},[t("a",{attrs:{href:"https://raw.githubusercontent.com/btcpayserver/dockerfile-deps/Bitcoin/26.0/Bitcoin/26.0/linuxarm64v8.Dockerfile",target:"_blank",rel:"noopener noreferrer"}},[e._v("✔️"),t("OutboundLink")],1)]),e._v(" "),t("td",{staticStyle:{"text-align":"center"}},[t("a",{attrs:{href:"https://github.com/btcpayserver/dockerfile-deps",target:"_blank",rel:"noopener noreferrer"}},[e._v("Github"),t("OutboundLink")],1),e._v(" - "),t("a",{attrs:{href:"https://hub.docker.com/r/btcpayserver/bitcoin",target:"_blank",rel:"noopener noreferrer"}},[e._v("DockerHub"),t("OutboundLink")],1)])]),e._v(" "),t("tr",[t("td",[e._v("btcpayserver/btcpayserver")]),e._v(" "),t("td",[e._v("1.13.5$?")]),e._v(" "),t("td",{staticStyle:{"text-align":"center"}},[t("a",{attrs:{href:"https://raw.githubusercontent.com/btcpayserver/btcpayserver/v1.13.5/Dockerfile",target:"_blank",rel:"noopener noreferrer"}},[e._v("✔️"),t("OutboundLink")],1)]),e._v(" "),t("td",{staticStyle:{"text-align":"center"}},[t("a",{attrs:{href:"https://raw.githubusercontent.com/btcpayserver/btcpayserver/v1.13.5/Dockerfile",target:"_blank",rel:"noopener noreferrer"}},[e._v("✔️"),t("OutboundLink")],1)]),e._v(" "),t("td",{staticStyle:{"text-align":"center"}},[t("a",{attrs:{href:"https://raw.githubusercontent.com/btcpayserver/btcpayserver/v1.13.5/Dockerfile",target:"_blank",rel:"noopener noreferrer"}},[e._v("✔️"),t("OutboundLink")],1)]),e._v(" "),t("td",{staticStyle:{"text-align":"center"}},[t("a",{attrs:{href:"https://github.com/btcpayserver/btcpayserver",target:"_blank",rel:"noopener noreferrer"}},[e._v("Github"),t("OutboundLink")],1),e._v(" - "),t("a",{attrs:{href:"https://hub.docker.com/r/btcpayserver/btcpayserver",target:"_blank",rel:"noopener noreferrer"}},[e._v("DockerHub"),t("OutboundLink")],1)])]),e._v(" "),t("tr",[t("td",[e._v("btcpayserver/monero")]),e._v(" "),t("td",[e._v("0.18.3.3")]),e._v(" "),t("td",{staticStyle:{"text-align":"center"}},[t("a",{attrs:{href:"https://raw.githubusercontent.com/btcpayserver/dockerfile-deps/Monero/0.18.3.3/Monero/0.18.3.3/linuxamd64.Dockerfile",target:"_blank",rel:"noopener noreferrer"}},[e._v("✔️"),t("OutboundLink")],1)]),e._v(" "),t("td",{staticStyle:{"text-align":"center"}},[t("a",{attrs:{href:"https://raw.githubusercontent.com/btcpayserver/dockerfile-deps/Monero/0.18.3.3/Monero/0.18.3.3/linuxarm32v7.Dockerfile",target:"_blank",rel:"noopener noreferrer"}},[e._v("✔️"),t("OutboundLink")],1)]),e._v(" "),t("td",{staticStyle:{"text-align":"center"}},[t("a",{attrs:{href:"https://raw.githubusercontent.com/btcpayserver/dockerfile-deps/Monero/0.18.3.3/Monero/0.18.3.3/linuxarm64v8.Dockerfile",target:"_blank",rel:"noopener noreferrer"}},[e._v("✔️"),t("OutboundLink")],1)]),e._v(" "),t("td",{staticStyle:{"text-align":"center"}},[t("a",{attrs:{href:"https://github.com/btcpayserver/dockerfile-deps",target:"_blank",rel:"noopener noreferrer"}},[e._v("Github"),t("OutboundLink")],1),e._v(" - "),t("a",{attrs:{href:"https://hub.docker.com/r/btcpayserver/monero",target:"_blank",rel:"noopener noreferrer"}},[e._v("DockerHub"),t("OutboundLink")],1)])]),e._v(" "),t("tr",[t("td",[e._v("nicolasdorier/nbxplorer")]),e._v(" "),t("td",[e._v("2.5.7")]),e._v(" "),t("td",{staticStyle:{"text-align":"center"}},[t("a",{attrs:{href:"https://raw.githubusercontent.com/dgarage/nbxplorer/v2.5.7/Dockerfile",target:"_blank",rel:"noopener noreferrer"}},[e._v("✔️"),t("OutboundLink")],1)]),e._v(" "),t("td",{staticStyle:{"text-align":"center"}},[t("a",{attrs:{href:"https://raw.githubusercontent.com/dgarage/nbxplorer/v2.5.7/Dockerfile",target:"_blank",rel:"noopener noreferrer"}},[e._v("✔️"),t("OutboundLink")],1)]),e._v(" "),t("td",{staticStyle:{"text-align":"center"}},[t("a",{attrs:{href:"https://raw.githubusercontent.com/dgarage/nbxplorer/v2.5.7/Dockerfile",target:"_blank",rel:"noopener noreferrer"}},[e._v("✔️"),t("OutboundLink")],1)]),e._v(" "),t("td",{staticStyle:{"text-align":"center"}},[t("a",{attrs:{href:"https://github.com/dgarage/nbxplorer",target:"_blank",rel:"noopener noreferrer"}},[e._v("Github"),t("OutboundLink")],1),e._v(" - "),t("a",{attrs:{href:"https://hub.docker.com/r/nicolasdorier/nbxplorer",target:"_blank",rel:"noopener noreferrer"}},[e._v("DockerHub"),t("OutboundLink")],1)])]),e._v(" "),t("tr",[t("td",[e._v("btcpayserver/letsencrypt-nginx-proxy-companion")]),e._v(" "),t("td",[e._v("2.2.9-2")]),e._v(" "),t("td",{staticStyle:{"text-align":"center"}},[t("a",{attrs:{href:"https://raw.githubusercontent.com/btcpayserver/docker-letsencrypt-nginx-proxy-companion/v2.2.9-2/Dockerfile",target:"_blank",rel:"noopener noreferrer"}},[e._v("✔️"),t("OutboundLink")],1)]),e._v(" "),t("td",{staticStyle:{"text-align":"center"}},[t("a",{attrs:{href:"https://raw.githubusercontent.com/btcpayserver/docker-letsencrypt-nginx-proxy-companion/v2.2.9-2/Dockerfile",target:"_blank",rel:"noopener noreferrer"}},[e._v("✔️"),t("OutboundLink")],1)]),e._v(" "),t("td",{staticStyle:{"text-align":"center"}},[t("a",{attrs:{href:"https://raw.githubusercontent.com/btcpayserver/docker-letsencrypt-nginx-proxy-companion/v2.2.9-2/Dockerfile",target:"_blank",rel:"noopener noreferrer"}},[e._v("✔️"),t("OutboundLink")],1)]),e._v(" "),t("td",{staticStyle:{"text-align":"center"}},[t("a",{attrs:{href:"https://github.com/btcpayserver/docker-letsencrypt-nginx-proxy-companion",target:"_blank",rel:"noopener noreferrer"}},[e._v("Github"),t("OutboundLink")],1),e._v(" - "),t("a",{attrs:{href:"https://hub.docker.com/r/btcpayserver/letsencrypt-nginx-proxy-companion",target:"_blank",rel:"noopener noreferrer"}},[e._v("DockerHub"),t("OutboundLink")],1)])]),e._v(" "),t("tr",[t("td",[e._v("nginx")]),e._v(" "),t("td",[e._v("1.25.3-bookworm")]),e._v(" "),t("td",{staticStyle:{"text-align":"center"}},[t("a",{attrs:{href:"https://raw.githubusercontent.com/nginxinc/docker-nginx/1.23.2/stable/debian/Dockerfile",target:"_blank",rel:"noopener noreferrer"}},[e._v("✔️"),t("OutboundLink")],1)]),e._v(" "),t("td",{staticStyle:{"text-align":"center"}},[t("a",{attrs:{href:"https://raw.githubusercontent.com/nginxinc/docker-nginx/1.23.2/stable/debian/Dockerfile",target:"_blank",rel:"noopener noreferrer"}},[e._v("✔️"),t("OutboundLink")],1)]),e._v(" "),t("td",{staticStyle:{"text-align":"center"}},[t("a",{attrs:{href:"https://raw.githubusercontent.com/nginxinc/docker-nginx/1.23.2/stable/debian/Dockerfile",target:"_blank",rel:"noopener noreferrer"}},[e._v("✔️"),t("OutboundLink")],1)]),e._v(" "),t("td",{staticStyle:{"text-align":"center"}},[t("a",{attrs:{href:"https://github.com/nginxinc/docker-nginx",target:"_blank",rel:"noopener noreferrer"}},[e._v("Github"),t("OutboundLink")],1),e._v(" - "),t("a",{attrs:{href:"https://hub.docker.com/_/nginx",target:"_blank",rel:"noopener noreferrer"}},[e._v("DockerHub"),t("OutboundLink")],1)])]),e._v(" "),t("tr",[t("td",[e._v("btcpayserver/docker-gen")]),e._v(" "),t("td",[e._v("0.10.7")]),e._v(" "),t("td",{staticStyle:{"text-align":"center"}},[t("a",{attrs:{href:"https://raw.githubusercontent.com/btcpayserver/docker-gen/0.10.7/Dockerfile.alpine",target:"_blank",rel:"noopener noreferrer"}},[e._v("✔️"),t("OutboundLink")],1)]),e._v(" "),t("td",{staticStyle:{"text-align":"center"}},[t("a",{attrs:{href:"https://raw.githubusercontent.com/btcpayserver/docker-gen/0.10.7/Dockerfile.alpine",target:"_blank",rel:"noopener noreferrer"}},[e._v("✔️"),t("OutboundLink")],1)]),e._v(" "),t("td",{staticStyle:{"text-align":"center"}},[t("a",{attrs:{href:"https://raw.githubusercontent.com/btcpayserver/docker-gen/0.10.7/Dockerfile.alpine",target:"_blank",rel:"noopener noreferrer"}},[e._v("✔️"),t("OutboundLink")],1)]),e._v(" "),t("td",{staticStyle:{"text-align":"center"}},[t("a",{attrs:{href:"https://github.com/btcpayserver/docker-gen",target:"_blank",rel:"noopener noreferrer"}},[e._v("Github"),t("OutboundLink")],1),e._v(" - "),t("a",{attrs:{href:"https://hub.docker.com/r/btcpayserver/docker-gen",target:"_blank",rel:"noopener noreferrer"}},[e._v("DockerHub"),t("OutboundLink")],1)])]),e._v(" "),t("tr",[t("td",[e._v("btcpayserver/btctransmuter")]),e._v(" "),t("td",[e._v("0.0.59")]),e._v(" "),t("td",{staticStyle:{"text-align":"center"}},[t("a",{attrs:{href:"https://raw.githubusercontent.com/btcpayserver/btctransmuter/v0.0.59/Dockerfiles/amd64.Dockerfile",target:"_blank",rel:"noopener noreferrer"}},[e._v("✔️"),t("OutboundLink")],1)]),e._v(" "),t("td",{staticStyle:{"text-align":"center"}},[t("a",{attrs:{href:"https://raw.githubusercontent.com/btcpayserver/btctransmuter/v0.0.59/Dockerfiles/arm32v7.Dockerfile",target:"_blank",rel:"noopener noreferrer"}},[e._v("✔️"),t("OutboundLink")],1)]),e._v(" "),t("td",{staticStyle:{"text-align":"center"}},[t("a",{attrs:{href:"https://raw.githubusercontent.com/btcpayserver/btctransmuter/v0.0.59/Dockerfiles/arm64v8.Dockerfile",target:"_blank",rel:"noopener noreferrer"}},[e._v("✔️"),t("OutboundLink")],1)]),e._v(" "),t("td",{staticStyle:{"text-align":"center"}},[t("a",{attrs:{href:"https://github.com/btcpayserver/btctransmuter",target:"_blank",rel:"noopener noreferrer"}},[e._v("Github"),t("OutboundLink")],1),e._v(" - "),t("a",{attrs:{href:"https://hub.docker.com/r/btcpayserver/btctransmuter",target:"_blank",rel:"noopener noreferrer"}},[e._v("DockerHub"),t("OutboundLink")],1)])]),e._v(" "),t("tr",[t("td",[e._v("btcpayserver/cloudflared")]),e._v(" "),t("td",[e._v("2023.10.0")]),e._v(" "),t("td",{staticStyle:{"text-align":"center"}},[t("a",{attrs:{href:"https://raw.githubusercontent.com/btcpayserver/dockerfile-deps/Cloudflared/2023.10.0/Cloudflared/2023.10.0/linuxamd64.Dockerfile",target:"_blank",rel:"noopener noreferrer"}},[e._v("✔️"),t("OutboundLink")],1)]),e._v(" "),t("td",{staticStyle:{"text-align":"center"}},[t("a",{attrs:{href:"https://raw.githubusercontent.com/btcpayserver/dockerfile-deps/Cloudflared/2023.10.0/Cloudflared/2023.10.0/linuxarm32v7.Dockerfile",target:"_blank",rel:"noopener noreferrer"}},[e._v("✔️"),t("OutboundLink")],1)]),e._v(" "),t("td",{staticStyle:{"text-align":"center"}},[t("a",{attrs:{href:"https://raw.githubusercontent.com/btcpayserver/dockerfile-deps/Cloudflared/2023.10.0/Cloudflared/2023.10.0/linuxarm64v8.Dockerfile",target:"_blank",rel:"noopener noreferrer"}},[e._v("✔️"),t("OutboundLink")],1)]),e._v(" "),t("td",{staticStyle:{"text-align":"center"}},[t("a",{attrs:{href:"https://github.com/btcpayserver/dockerfile-deps",target:"_blank",rel:"noopener noreferrer"}},[e._v("Github"),t("OutboundLink")],1),e._v(" - "),t("a",{attrs:{href:"https://hub.docker.com/r/btcpayserver/cloudflared",target:"_blank",rel:"noopener noreferrer"}},[e._v("DockerHub"),t("OutboundLink")],1)])]),e._v(" "),t("tr",[t("td",[e._v("btcpayserver/btcpayserver-configurator")]),e._v(" "),t("td",[e._v("0.0.21")]),e._v(" "),t("td",{staticStyle:{"text-align":"center"}},[t("a",{attrs:{href:"https://raw.githubusercontent.com/btcpayserver/btcpayserver-configurator/v0.0.21/Dockerfiles/amd64.Dockerfile",target:"_blank",rel:"noopener noreferrer"}},[e._v("✔️"),t("OutboundLink")],1)]),e._v(" "),t("td",{staticStyle:{"text-align":"center"}},[t("a",{attrs:{href:"https://raw.githubusercontent.com/btcpayserver/btcpayserver-configurator/v0.0.21/Dockerfiles/arm32v7.Dockerfile",target:"_blank",rel:"noopener noreferrer"}},[e._v("✔️"),t("OutboundLink")],1)]),e._v(" "),t("td",{staticStyle:{"text-align":"center"}},[t("a",{attrs:{href:"https://raw.githubusercontent.com/btcpayserver/btcpayserver-configurator/v0.0.21/Dockerfiles/arm64v8.Dockerfile",target:"_blank",rel:"noopener noreferrer"}},[e._v("✔️"),t("OutboundLink")],1)]),e._v(" "),t("td",{staticStyle:{"text-align":"center"}},[t("a",{attrs:{href:"https://github.com/btcpayserver/btcpayserver-configurator",target:"_blank",rel:"noopener noreferrer"}},[e._v("Github"),t("OutboundLink")],1),e._v(" - "),t("a",{attrs:{href:"https://hub.docker.com/r/btcpayserver/btcpayserver-configurator",target:"_blank",rel:"noopener noreferrer"}},[e._v("DockerHub"),t("OutboundLink")],1)])]),e._v(" "),t("tr",[t("td",[e._v("btcpayserver/eps")]),e._v(" "),t("td",[e._v("0.2.2")]),e._v(" "),t("td",{staticStyle:{"text-align":"center"}},[t("a",{attrs:{href:"https://raw.githubusercontent.com/btcpayserver/dockerfile-deps/EPS/0.2.2/EPS/0.2.2/linuxamd64.Dockerfile",target:"_blank",rel:"noopener noreferrer"}},[e._v("✔️"),t("OutboundLink")],1)]),e._v(" "),t("td",{staticStyle:{"text-align":"center"}},[t("a",{attrs:{href:"https://raw.githubusercontent.com/btcpayserver/dockerfile-deps/EPS/0.2.2/EPS/0.2.2/linuxarm32v7.Dockerfile",target:"_blank",rel:"noopener noreferrer"}},[e._v("✔️"),t("OutboundLink")],1)]),e._v(" "),t("td",{staticStyle:{"text-align":"center"}},[t("a",{attrs:{href:"https://raw.githubusercontent.com/btcpayserver/dockerfile-deps/EPS/0.2.2/EPS/0.2.2/linuxarm64v8.Dockerfile",target:"_blank",rel:"noopener noreferrer"}},[e._v("✔️"),t("OutboundLink")],1)]),e._v(" "),t("td",{staticStyle:{"text-align":"center"}},[t("a",{attrs:{href:"https://github.com/btcpayserver/dockerfile-deps",target:"_blank",rel:"noopener noreferrer"}},[e._v("Github"),t("OutboundLink")],1),e._v(" - "),t("a",{attrs:{href:"https://hub.docker.com/r/btcpayserver/eps",target:"_blank",rel:"noopener noreferrer"}},[e._v("DockerHub"),t("OutboundLink")],1)])]),e._v(" "),t("tr",[t("td",[e._v("btcpayserver/joinmarket")]),e._v(" "),t("td",[e._v("0.9.10")]),e._v(" "),t("td",{staticStyle:{"text-align":"center"}},[t("a",{attrs:{href:"https://raw.githubusercontent.com/btcpayserver/dockerfile-deps/JoinMarket/0.9.10/JoinMarket/0.9.10/linuxamd64.Dockerfile",target:"_blank",rel:"noopener noreferrer"}},[e._v("✔️"),t("OutboundLink")],1)]),e._v(" "),t("td",{staticStyle:{"text-align":"center"}},[t("a",{attrs:{href:"https://raw.githubusercontent.com/btcpayserver/dockerfile-deps/JoinMarket/0.9.10/JoinMarket/0.9.10/linuxarm32v7.Dockerfile",target:"_blank",rel:"noopener noreferrer"}},[e._v("✔️"),t("OutboundLink")],1)]),e._v(" "),t("td",{staticStyle:{"text-align":"center"}},[t("a",{attrs:{href:"https://raw.githubusercontent.com/btcpayserver/dockerfile-deps/JoinMarket/0.9.10/JoinMarket/0.9.10/linuxarm64v8.Dockerfile",target:"_blank",rel:"noopener noreferrer"}},[e._v("✔️"),t("OutboundLink")],1)]),e._v(" "),t("td",{staticStyle:{"text-align":"center"}},[t("a",{attrs:{href:"https://github.com/btcpayserver/dockerfile-deps",target:"_blank",rel:"noopener noreferrer"}},[e._v("Github"),t("OutboundLink")],1),e._v(" - "),t("a",{attrs:{href:"https://hub.docker.com/r/btcpayserver/joinmarket",target:"_blank",rel:"noopener noreferrer"}},[e._v("DockerHub"),t("OutboundLink")],1)])]),e._v(" "),t("tr",[t("td",[e._v("nicolasdorier/ndlc-cli")]),e._v(" "),t("td",[e._v("1.0.1")]),e._v(" "),t("td",{staticStyle:{"text-align":"center"}},[t("a",{attrs:{href:"https://raw.githubusercontent.com/dgarage/ndlc/releases/1.0.1/amd64.Dockerfile",target:"_blank",rel:"noopener noreferrer"}},[e._v("✔️"),t("OutboundLink")],1)]),e._v(" "),t("td",{staticStyle:{"text-align":"center"}},[t("a",{attrs:{href:"https://raw.githubusercontent.com/dgarage/ndlc/releases/1.0.1/arm32v7.Dockerfile",target:"_blank",rel:"noopener noreferrer"}},[e._v("✔️"),t("OutboundLink")],1)]),e._v(" "),t("td",{staticStyle:{"text-align":"center"}},[t("a",{attrs:{href:"https://raw.githubusercontent.com/dgarage/ndlc/releases/1.0.1/arm64v8.Dockerfile",target:"_blank",rel:"noopener noreferrer"}},[e._v("✔️"),t("OutboundLink")],1)]),e._v(" "),t("td",{staticStyle:{"text-align":"center"}},[t("a",{attrs:{href:"https://github.com/dgarage/ndlc",target:"_blank",rel:"noopener noreferrer"}},[e._v("Github"),t("OutboundLink")],1),e._v(" - "),t("a",{attrs:{href:"https://hub.docker.com/r/nicolasdorier/ndlc-cli",target:"_blank",rel:"noopener noreferrer"}},[e._v("DockerHub"),t("OutboundLink")],1)])]),e._v(" "),t("tr",[t("td",[e._v("pihole/pihole")]),e._v(" "),t("td",[e._v("2023.05.2")]),e._v(" "),t("td",{staticStyle:{"text-align":"center"}},[t("a",{attrs:{href:"https://raw.githubusercontent.com/pi-hole/docker-pi-hole/2023.05.2/src/Dockerfile",target:"_blank",rel:"noopener noreferrer"}},[e._v("✔️"),t("OutboundLink")],1)]),e._v(" "),t("td",{staticStyle:{"text-align":"center"}},[t("a",{attrs:{href:"https://raw.githubusercontent.com/pi-hole/docker-pi-hole/2023.05.2/src/Dockerfile",target:"_blank",rel:"noopener noreferrer"}},[e._v("✔️"),t("OutboundLink")],1)]),e._v(" "),t("td",{staticStyle:{"text-align":"center"}},[t("a",{attrs:{href:"https://raw.githubusercontent.com/pi-hole/docker-pi-hole/2023.05.2/src/Dockerfile",target:"_blank",rel:"noopener noreferrer"}},[e._v("✔️"),t("OutboundLink")],1)]),e._v(" "),t("td",{staticStyle:{"text-align":"center"}},[t("a",{attrs:{href:"https://github.com/pi-hole/docker-pi-hole",target:"_blank",rel:"noopener noreferrer"}},[e._v("Github"),t("OutboundLink")],1),e._v(" - "),t("a",{attrs:{href:"https://hub.docker.com/r/pihole/pihole",target:"_blank",rel:"noopener noreferrer"}},[e._v("DockerHub"),t("OutboundLink")],1)])]),e._v(" "),t("tr",[t("td",[e._v("btcpayserver/snapdrop")]),e._v(" "),t("td",[e._v("1.2")]),e._v(" "),t("td",{staticStyle:{"text-align":"center"}},[t("a",{attrs:{href:"https://raw.githubusercontent.com/btcpayserver/dockerfile-deps/Snapdrop/1.2/Snapdrop/1.2/Dockerfile",target:"_blank",rel:"noopener noreferrer"}},[e._v("✔️"),t("OutboundLink")],1)]),e._v(" "),t("td",{staticStyle:{"text-align":"center"}},[t("a",{attrs:{href:"https://raw.githubusercontent.com/btcpayserver/dockerfile-deps/Snapdrop/1.2/Snapdrop/1.2/Dockerfile",target:"_blank",rel:"noopener noreferrer"}},[e._v("✔️"),t("OutboundLink")],1)]),e._v(" "),t("td",{staticStyle:{"text-align":"center"}},[t("a",{attrs:{href:"https://raw.githubusercontent.com/btcpayserver/dockerfile-deps/Snapdrop/1.2/Snapdrop/1.2/Dockerfile",target:"_blank",rel:"noopener noreferrer"}},[e._v("✔️"),t("OutboundLink")],1)]),e._v(" "),t("td",{staticStyle:{"text-align":"center"}},[t("a",{attrs:{href:"https://github.com/btcpayserver/dockerfile-deps",target:"_blank",rel:"noopener noreferrer"}},[e._v("Github"),t("OutboundLink")],1),e._v(" - "),t("a",{attrs:{href:"https://hub.docker.com/r/btcpayserver/snapdrop",target:"_blank",rel:"noopener noreferrer"}},[e._v("DockerHub"),t("OutboundLink")],1)])]),e._v(" "),t("tr",[t("td",[e._v("btcpayserver/tor")]),e._v(" "),t("td",[e._v("0.4.8.10")]),e._v(" "),t("td",{staticStyle:{"text-align":"center"}},[t("a",{attrs:{href:"https://raw.githubusercontent.com/btcpayserver/dockerfile-deps/Tor/0.4.8.10/Tor/0.4.8.10/linuxamd64.Dockerfile",target:"_blank",rel:"noopener noreferrer"}},[e._v("✔️"),t("OutboundLink")],1)]),e._v(" "),t("td",{staticStyle:{"text-align":"center"}},[t("a",{attrs:{href:"https://raw.githubusercontent.com/btcpayserver/dockerfile-deps/Tor/0.4.8.10/Tor/0.4.8.10/linuxarm32v7.Dockerfile",target:"_blank",rel:"noopener noreferrer"}},[e._v("✔️"),t("OutboundLink")],1)]),e._v(" "),t("td",{staticStyle:{"text-align":"center"}},[t("a",{attrs:{href:"https://raw.githubusercontent.com/btcpayserver/dockerfile-deps/Tor/0.4.8.10/Tor/0.4.8.10/linuxarm64v8.Dockerfile",target:"_blank",rel:"noopener noreferrer"}},[e._v("✔️"),t("OutboundLink")],1)]),e._v(" "),t("td",{staticStyle:{"text-align":"center"}},[t("a",{attrs:{href:"https://github.com/btcpayserver/dockerfile-deps",target:"_blank",rel:"noopener noreferrer"}},[e._v("Github"),t("OutboundLink")],1),e._v(" - "),t("a",{attrs:{href:"https://hub.docker.com/r/btcpayserver/tor",target:"_blank",rel:"noopener noreferrer"}},[e._v("DockerHub"),t("OutboundLink")],1)])]),e._v(" "),t("tr",[t("td",[e._v("btcpayserver/woocommerce")]),e._v(" "),t("td",[e._v("3.1.0")]),e._v(" "),t("td",{staticStyle:{"text-align":"center"}},[t("a",{attrs:{href:"https://raw.githubusercontent.com/btcpayserver/dockerfile-deps/WooCommerce/3.1.0/WooCommerce/3.1.0/linuxamd64.Dockerfile",target:"_blank",rel:"noopener noreferrer"}},[e._v("✔️"),t("OutboundLink")],1)]),e._v(" "),t("td",{staticStyle:{"text-align":"center"}},[e._v("️❌")]),e._v(" "),t("td",{staticStyle:{"text-align":"center"}},[t("a",{attrs:{href:"https://raw.githubusercontent.com/btcpayserver/dockerfile-deps/WooCommerce/3.1.0/WooCommerce/3.1.0/linuxarm64v8.Dockerfile",target:"_blank",rel:"noopener noreferrer"}},[e._v("✔️"),t("OutboundLink")],1)]),e._v(" "),t("td",{staticStyle:{"text-align":"center"}},[t("a",{attrs:{href:"https://github.com/btcpayserver/dockerfile-deps",target:"_blank",rel:"noopener noreferrer"}},[e._v("Github"),t("OutboundLink")],1),e._v(" - "),t("a",{attrs:{href:"https://hub.docker.com/r/btcpayserver/woocommerce",target:"_blank",rel:"noopener noreferrer"}},[e._v("DockerHub"),t("OutboundLink")],1)])]),e._v(" "),t("tr",[t("td",[e._v("btcpayserver/postgres")]),e._v(" "),t("td",[e._v("13.13")]),e._v(" "),t("td",{staticStyle:{"text-align":"center"}},[t("a",{attrs:{href:"https://raw.githubusercontent.com/btcpayserver/dockerfile-deps/Postgres/13.13/Postgres/13.13/linuxamd64.Dockerfile",target:"_blank",rel:"noopener noreferrer"}},[e._v("✔️"),t("OutboundLink")],1)]),e._v(" "),t("td",{staticStyle:{"text-align":"center"}},[t("a",{attrs:{href:"https://raw.githubusercontent.com/btcpayserver/dockerfile-deps/Postgres/13.13/Postgres/13.13/linuxarm32v7.Dockerfile",target:"_blank",rel:"noopener noreferrer"}},[e._v("✔️"),t("OutboundLink")],1)]),e._v(" "),t("td",{staticStyle:{"text-align":"center"}},[t("a",{attrs:{href:"https://raw.githubusercontent.com/btcpayserver/dockerfile-deps/Postgres/13.13/Postgres/13.13/linuxarm64v8.Dockerfile",target:"_blank",rel:"noopener noreferrer"}},[e._v("✔️"),t("OutboundLink")],1)]),e._v(" "),t("td",{staticStyle:{"text-align":"center"}},[t("a",{attrs:{href:"https://github.com/btcpayserver/dockerfile-deps",target:"_blank",rel:"noopener noreferrer"}},[e._v("Github"),t("OutboundLink")],1),e._v(" - "),t("a",{attrs:{href:"https://hub.docker.com/r/btcpayserver/postgres",target:"_blank",rel:"noopener noreferrer"}},[e._v("DockerHub"),t("OutboundLink")],1)])]),e._v(" "),t("tr",[t("td",[e._v("kamigawabul/btglnd")]),e._v(" "),t("td",[e._v("latest")]),e._v(" "),t("td",{staticStyle:{"text-align":"center"}},[t("a",{attrs:{href:"https://raw.githubusercontent.com/vutov/lnd/master/Dockerfile",target:"_blank",rel:"noopener noreferrer"}},[e._v("✔️"),t("OutboundLink")],1)]),e._v(" "),t("td",{staticStyle:{"text-align":"center"}},[e._v("️❌")]),e._v(" "),t("td",{staticStyle:{"text-align":"center"}},[e._v("️❌")]),e._v(" "),t("td",{staticStyle:{"text-align":"center"}},[t("a",{attrs:{href:"https://github.com/vutov/lnd",target:"_blank",rel:"noopener noreferrer"}},[e._v("Github"),t("OutboundLink")],1),e._v(" - "),t("a",{attrs:{href:"https://hub.docker.com/r/kamigawabul/btglnd",target:"_blank",rel:"noopener noreferrer"}},[e._v("DockerHub"),t("OutboundLink")],1)])]),e._v(" "),t("tr",[t("td",[e._v("kamigawabul/docker-bitcoingold")]),e._v(" "),t("td",[e._v("0.15.2")]),e._v(" "),t("td",{staticStyle:{"text-align":"center"}},[t("a",{attrs:{href:"https://raw.githubusercontent.com/Vutov/docker-bitcoin/master/bitcoingold/0.15.2/Dockerfile",target:"_blank",rel:"noopener noreferrer"}},[e._v("✔️"),t("OutboundLink")],1)]),e._v(" "),t("td",{staticStyle:{"text-align":"center"}},[e._v("️❌")]),e._v(" "),t("td",{staticStyle:{"text-align":"center"}},[e._v("️❌")]),e._v(" "),t("td",{staticStyle:{"text-align":"center"}},[t("a",{attrs:{href:"https://github.com/Vutov/docker-bitcoin",target:"_blank",rel:"noopener noreferrer"}},[e._v("Github"),t("OutboundLink")],1),e._v(" - "),t("a",{attrs:{href:"https://hub.docker.com/r/kamigawabul/docker-bitcoingold",target:"_blank",rel:"noopener noreferrer"}},[e._v("DockerHub"),t("OutboundLink")],1)])]),e._v(" "),t("tr",[t("td",[e._v("acinq/eclair")]),e._v(" "),t("td",[e._v("release-0.7.0")]),e._v(" "),t("td",{staticStyle:{"text-align":"center"}},[t("a",{attrs:{href:"https://raw.githubusercontent.com/ACINQ/eclair/v0.7.0/Dockerfile",target:"_blank",rel:"noopener noreferrer"}},[e._v("✔️"),t("OutboundLink")],1)]),e._v(" "),t("td",{staticStyle:{"text-align":"center"}},[e._v("️❌")]),e._v(" "),t("td",{staticStyle:{"text-align":"center"}},[e._v("️❌")]),e._v(" "),t("td",{staticStyle:{"text-align":"center"}},[t("a",{attrs:{href:"https://github.com/ACINQ/eclair",target:"_blank",rel:"noopener noreferrer"}},[e._v("Github"),t("OutboundLink")],1),e._v(" - "),t("a",{attrs:{href:"https://hub.docker.com/r/acinq/eclair",target:"_blank",rel:"noopener noreferrer"}},[e._v("DockerHub"),t("OutboundLink")],1)])]),e._v(" "),t("tr",[t("td",[e._v("chekaz/docker-bitcoinplus")]),e._v(" "),t("td",[e._v("2.7.0")]),e._v(" "),t("td",{staticStyle:{"text-align":"center"}},[t("a",{attrs:{href:"https://raw.githubusercontent.com/ChekaZ/docker/master/bitcoinplus/2.7.0/Dockerfile",target:"_blank",rel:"noopener noreferrer"}},[e._v("✔️"),t("OutboundLink")],1)]),e._v(" "),t("td",{staticStyle:{"text-align":"center"}},[e._v("️❌")]),e._v(" "),t("td",{staticStyle:{"text-align":"center"}},[e._v("️❌")]),e._v(" "),t("td",{staticStyle:{"text-align":"center"}},[t("a",{attrs:{href:"https://github.com/ChekaZ/docker",target:"_blank",rel:"noopener noreferrer"}},[e._v("Github"),t("OutboundLink")],1),e._v(" - "),t("a",{attrs:{href:"https://hub.docker.com/r/chekaz/docker-bitcoinplus",target:"_blank",rel:"noopener noreferrer"}},[e._v("DockerHub"),t("OutboundLink")],1)])]),e._v(" "),t("tr",[t("td",[e._v("dalijolijo/docker-bitcore")]),e._v(" "),t("td",[e._v("0.90.9.10")]),e._v(" "),t("td",{staticStyle:{"text-align":"center"}},[t("a",{attrs:{href:"https://raw.githubusercontent.com/dalijolijo/btcpayserver-docker-bitcore/master/docker-bitcored/Dockerfile",target:"_blank",rel:"noopener noreferrer"}},[e._v("✔️"),t("OutboundLink")],1)]),e._v(" "),t("td",{staticStyle:{"text-align":"center"}},[e._v("️❌")]),e._v(" "),t("td",{staticStyle:{"text-align":"center"}},[e._v("️❌")]),e._v(" "),t("td",{staticStyle:{"text-align":"center"}},[t("a",{attrs:{href:"https://github.com/dalijolijo/btcpayserver-docker-bitcore",target:"_blank",rel:"noopener noreferrer"}},[e._v("Github"),t("OutboundLink")],1),e._v(" - "),t("a",{attrs:{href:"https://hub.docker.com/r/dalijolijo/docker-bitcore",target:"_blank",rel:"noopener noreferrer"}},[e._v("DockerHub"),t("OutboundLink")],1)])]),e._v(" "),t("tr",[t("td",[e._v("btcpayserver/dash")]),e._v(" "),t("td",[e._v("20.1.0")]),e._v(" "),t("td",{staticStyle:{"text-align":"center"}},[t("a",{attrs:{href:"https://raw.githubusercontent.com/btcpayserver/dockerfile-deps/Dash/20.1.0/Dash/20.1.0/linuxamd64.Dockerfile",target:"_blank",rel:"noopener noreferrer"}},[e._v("✔️"),t("OutboundLink")],1)]),e._v(" "),t("td",{staticStyle:{"text-align":"center"}},[e._v("️❌")]),e._v(" "),t("td",{staticStyle:{"text-align":"center"}},[t("a",{attrs:{href:"https://raw.githubusercontent.com/btcpayserver/dockerfile-deps/Dash/20.1.0/Dash/20.1.0/linuxarm64v8.Dockerfile",target:"_blank",rel:"noopener noreferrer"}},[e._v("✔️"),t("OutboundLink")],1)]),e._v(" "),t("td",{staticStyle:{"text-align":"center"}},[t("a",{attrs:{href:"https://github.com/btcpayserver/dockerfile-deps",target:"_blank",rel:"noopener noreferrer"}},[e._v("Github"),t("OutboundLink")],1),e._v(" - "),t("a",{attrs:{href:"https://hub.docker.com/r/btcpayserver/dash",target:"_blank",rel:"noopener noreferrer"}},[e._v("DockerHub"),t("OutboundLink")],1)])]),e._v(" "),t("tr",[t("td",[e._v("btcpayserver/dogecoin")]),e._v(" "),t("td",[e._v("1.14.7")]),e._v(" "),t("td",{staticStyle:{"text-align":"center"}},[t("a",{attrs:{href:"https://raw.githubusercontent.com/btcpayserver/dockerfile-deps/Dogecoin/1.14.7/Dogecoin/1.14.7/linuxamd64.Dockerfile",target:"_blank",rel:"noopener noreferrer"}},[e._v("✔️"),t("OutboundLink")],1)]),e._v(" "),t("td",{staticStyle:{"text-align":"center"}},[e._v("️❌")]),e._v(" "),t("td",{staticStyle:{"text-align":"center"}},[e._v("️❌")]),e._v(" "),t("td",{staticStyle:{"text-align":"center"}},[t("a",{attrs:{href:"https://github.com/btcpayserver/dockerfile-deps",target:"_blank",rel:"noopener noreferrer"}},[e._v("Github"),t("OutboundLink")],1),e._v(" - "),t("a",{attrs:{href:"https://hub.docker.com/r/btcpayserver/dogecoin",target:"_blank",rel:"noopener noreferrer"}},[e._v("DockerHub"),t("OutboundLink")],1)])]),e._v(" "),t("tr",[t("td",[e._v("chekaz/docker-feathercoin")]),e._v(" "),t("td",[e._v("0.16.3")]),e._v(" "),t("td",{staticStyle:{"text-align":"center"}},[t("a",{attrs:{href:"https://raw.githubusercontent.com/ChekaZ/docker/master/feathercoin/0.16.3/Dockerfile",target:"_blank",rel:"noopener noreferrer"}},[e._v("✔️"),t("OutboundLink")],1)]),e._v(" "),t("td",{staticStyle:{"text-align":"center"}},[e._v("️❌")]),e._v(" "),t("td",{staticStyle:{"text-align":"center"}},[e._v("️❌")]),e._v(" "),t("td",{staticStyle:{"text-align":"center"}},[t("a",{attrs:{href:"https://github.com/ChekaZ/docker",target:"_blank",rel:"noopener noreferrer"}},[e._v("Github"),t("OutboundLink")],1),e._v(" - "),t("a",{attrs:{href:"https://hub.docker.com/r/chekaz/docker-feathercoin",target:"_blank",rel:"noopener noreferrer"}},[e._v("DockerHub"),t("OutboundLink")],1)])]),e._v(" "),t("tr",[t("td",[e._v("groestlcoin/lightning")]),e._v(" "),t("td",[e._v("v23.05")]),e._v(" "),t("td",{staticStyle:{"text-align":"center"}},[t("a",{attrs:{href:"https://raw.githubusercontent.com/Groestlcoin/lightning/v23.05/Dockerfile",target:"_blank",rel:"noopener noreferrer"}},[e._v("✔️"),t("OutboundLink")],1)]),e._v(" "),t("td",{staticStyle:{"text-align":"center"}},[e._v("️❌")]),e._v(" "),t("td",{staticStyle:{"text-align":"center"}},[e._v("️❌")]),e._v(" "),t("td",{staticStyle:{"text-align":"center"}},[t("a",{attrs:{href:"https://github.com/Groestlcoin/lightning",target:"_blank",rel:"noopener noreferrer"}},[e._v("Github"),t("OutboundLink")],1),e._v(" - "),t("a",{attrs:{href:"https://hub.docker.com/r/groestlcoin/lightning",target:"_blank",rel:"noopener noreferrer"}},[e._v("DockerHub"),t("OutboundLink")],1)])]),e._v(" "),t("tr",[t("td",[e._v("groestlcoin/groestlcoin-lightning-charge")]),e._v(" "),t("td",[e._v("version-0.4.22")]),e._v(" "),t("td",{staticStyle:{"text-align":"center"}},[t("a",{attrs:{href:"https://raw.githubusercontent.com/Groestlcoin/groestlcoin-lightning-charge/v0.4.22/Dockerfile",target:"_blank",rel:"noopener noreferrer"}},[e._v("✔️"),t("OutboundLink")],1)]),e._v(" "),t("td",{staticStyle:{"text-align":"center"}},[e._v("️❌")]),e._v(" "),t("td",{staticStyle:{"text-align":"center"}},[e._v("️❌")]),e._v(" "),t("td",{staticStyle:{"text-align":"center"}},[t("a",{attrs:{href:"https://github.com/Groestlcoin/groestlcoin-lightning-charge",target:"_blank",rel:"noopener noreferrer"}},[e._v("Github"),t("OutboundLink")],1),e._v(" - "),t("a",{attrs:{href:"https://hub.docker.com/r/groestlcoin/groestlcoin-lightning-charge",target:"_blank",rel:"noopener noreferrer"}},[e._v("DockerHub"),t("OutboundLink")],1)])]),e._v(" "),t("tr",[t("td",[e._v("groestlcoin/groestlcoin-spark")]),e._v(" "),t("td",[e._v("version-0.2.16")]),e._v(" "),t("td",{staticStyle:{"text-align":"center"}},[t("a",{attrs:{href:"https://raw.githubusercontent.com/Groestlcoin/groestlcoin-spark/v0.2.16/Dockerfile",target:"_blank",rel:"noopener noreferrer"}},[e._v("✔️"),t("OutboundLink")],1)]),e._v(" "),t("td",{staticStyle:{"text-align":"center"}},[e._v("️❌")]),e._v(" "),t("td",{staticStyle:{"text-align":"center"}},[e._v("️❌")]),e._v(" "),t("td",{staticStyle:{"text-align":"center"}},[t("a",{attrs:{href:"https://github.com/Groestlcoin/groestlcoin-spark",target:"_blank",rel:"noopener noreferrer"}},[e._v("Github"),t("OutboundLink")],1),e._v(" - "),t("a",{attrs:{href:"https://hub.docker.com/r/groestlcoin/groestlcoin-spark",target:"_blank",rel:"noopener noreferrer"}},[e._v("DockerHub"),t("OutboundLink")],1)])]),e._v(" "),t("tr",[t("td",[e._v("groestlcoin/eclair")]),e._v(" "),t("td",[e._v("v0.6.0")]),e._v(" "),t("td",{staticStyle:{"text-align":"center"}},[t("a",{attrs:{href:"https://raw.githubusercontent.com/Groestlcoin/eclair/v0.6.0/Dockerfile",target:"_blank",rel:"noopener noreferrer"}},[e._v("✔️"),t("OutboundLink")],1)]),e._v(" "),t("td",{staticStyle:{"text-align":"center"}},[e._v("️❌")]),e._v(" "),t("td",{staticStyle:{"text-align":"center"}},[e._v("️❌")]),e._v(" "),t("td",{staticStyle:{"text-align":"center"}},[t("a",{attrs:{href:"https://github.com/Groestlcoin/eclair",target:"_blank",rel:"noopener noreferrer"}},[e._v("Github"),t("OutboundLink")],1),e._v(" - "),t("a",{attrs:{href:"https://hub.docker.com/r/groestlcoin/eclair",target:"_blank",rel:"noopener noreferrer"}},[e._v("DockerHub"),t("OutboundLink")],1)])]),e._v(" "),t("tr",[t("td",[e._v("groestlcoin/lnd")]),e._v(" "),t("td",[e._v("v0.10.0-grs")]),e._v(" "),t("td",{staticStyle:{"text-align":"center"}},[t("a",{attrs:{href:"https://raw.githubusercontent.com/Groestlcoin/lnd/v0.10.0-grs/Dockerfile",target:"_blank",rel:"noopener noreferrer"}},[e._v("✔️"),t("OutboundLink")],1)]),e._v(" "),t("td",{staticStyle:{"text-align":"center"}},[e._v("️❌")]),e._v(" "),t("td",{staticStyle:{"text-align":"center"}},[e._v("️❌")]),e._v(" "),t("td",{staticStyle:{"text-align":"center"}},[t("a",{attrs:{href:"https://github.com/Groestlcoin/lnd",target:"_blank",rel:"noopener noreferrer"}},[e._v("Github"),t("OutboundLink")],1),e._v(" - "),t("a",{attrs:{href:"https://hub.docker.com/r/groestlcoin/lnd",target:"_blank",rel:"noopener noreferrer"}},[e._v("DockerHub"),t("OutboundLink")],1)])]),e._v(" "),t("tr",[t("td",[e._v("btcpayserver/groestlcoin")]),e._v(" "),t("td",[e._v("25.0")]),e._v(" "),t("td",{staticStyle:{"text-align":"center"}},[t("a",{attrs:{href:"https://raw.githubusercontent.com/btcpayserver/dockerfile-deps/Groestlcoin/25.0/Groestlcoin/25.0/linuxamd64.Dockerfile",target:"_blank",rel:"noopener noreferrer"}},[e._v("✔️"),t("OutboundLink")],1)]),e._v(" "),t("td",{staticStyle:{"text-align":"center"}},[t("a",{attrs:{href:"https://raw.githubusercontent.com/btcpayserver/dockerfile-deps/Groestlcoin/25.0/Groestlcoin/25.0/linuxarm32v7.Dockerfile",target:"_blank",rel:"noopener noreferrer"}},[e._v("✔️"),t("OutboundLink")],1)]),e._v(" "),t("td",{staticStyle:{"text-align":"center"}},[t("a",{attrs:{href:"https://raw.githubusercontent.com/btcpayserver/dockerfile-deps/Groestlcoin/25.0/Groestlcoin/25.0/linuxarm64v8.Dockerfile",target:"_blank",rel:"noopener noreferrer"}},[e._v("✔️"),t("OutboundLink")],1)]),e._v(" "),t("td",{staticStyle:{"text-align":"center"}},[t("a",{attrs:{href:"https://github.com/btcpayserver/dockerfile-deps",target:"_blank",rel:"noopener noreferrer"}},[e._v("Github"),t("OutboundLink")],1),e._v(" - "),t("a",{attrs:{href:"https://hub.docker.com/r/btcpayserver/groestlcoin",target:"_blank",rel:"noopener noreferrer"}},[e._v("DockerHub"),t("OutboundLink")],1)])]),e._v(" "),t("tr",[t("td",[e._v("btcpayserver/elements")]),e._v(" "),t("td",[e._v("23.2.3")]),e._v(" "),t("td",{staticStyle:{"text-align":"center"}},[t("a",{attrs:{href:"https://raw.githubusercontent.com/btcpayserver/dockerfile-deps/Elements/23.2.3/Elements/23.2.3/linuxamd64.Dockerfile",target:"_blank",rel:"noopener noreferrer"}},[e._v("✔️"),t("OutboundLink")],1)]),e._v(" "),t("td",{staticStyle:{"text-align":"center"}},[t("a",{attrs:{href:"https://raw.githubusercontent.com/btcpayserver/dockerfile-deps/Elements/23.2.3/Elements/23.2.3/linuxarm32v7.Dockerfile",target:"_blank",rel:"noopener noreferrer"}},[e._v("✔️"),t("OutboundLink")],1)]),e._v(" "),t("td",{staticStyle:{"text-align":"center"}},[t("a",{attrs:{href:"https://raw.githubusercontent.com/btcpayserver/dockerfile-deps/Elements/23.2.3/Elements/23.2.3/linuxarm64v8.Dockerfile",target:"_blank",rel:"noopener noreferrer"}},[e._v("✔️"),t("OutboundLink")],1)]),e._v(" "),t("td",{staticStyle:{"text-align":"center"}},[t("a",{attrs:{href:"https://github.com/btcpayserver/dockerfile-deps",target:"_blank",rel:"noopener noreferrer"}},[e._v("Github"),t("OutboundLink")],1),e._v(" - "),t("a",{attrs:{href:"https://hub.docker.com/r/btcpayserver/elements",target:"_blank",rel:"noopener noreferrer"}},[e._v("DockerHub"),t("OutboundLink")],1)])]),e._v(" "),t("tr",[t("td",[e._v("btcpayserver/litecoin")]),e._v(" "),t("td",[e._v("0.21.2.1-2")]),e._v(" "),t("td",{staticStyle:{"text-align":"center"}},[t("a",{attrs:{href:"https://raw.githubusercontent.com/btcpayserver/dockerfile-deps/Litecoin/0.21.2.1-2/Litecoin/0.21.2.1/linuxamd64.Dockerfile",target:"_blank",rel:"noopener noreferrer"}},[e._v("✔️"),t("OutboundLink")],1)]),e._v(" "),t("td",{staticStyle:{"text-align":"center"}},[t("a",{attrs:{href:"https://raw.githubusercontent.com/btcpayserver/dockerfile-deps/Litecoin/0.21.2.1-2/Litecoin/0.21.2.1/linuxarm32v7.Dockerfile",target:"_blank",rel:"noopener noreferrer"}},[e._v("✔️"),t("OutboundLink")],1)]),e._v(" "),t("td",{staticStyle:{"text-align":"center"}},[t("a",{attrs:{href:"https://raw.githubusercontent.com/btcpayserver/dockerfile-deps/Litecoin/0.21.2.1-2/Litecoin/0.21.2.1/linuxarm64v8.Dockerfile",target:"_blank",rel:"noopener noreferrer"}},[e._v("✔️"),t("OutboundLink")],1)]),e._v(" "),t("td",{staticStyle:{"text-align":"center"}},[t("a",{attrs:{href:"https://github.com/btcpayserver/dockerfile-deps",target:"_blank",rel:"noopener noreferrer"}},[e._v("Github"),t("OutboundLink")],1),e._v(" - "),t("a",{attrs:{href:"https://hub.docker.com/r/btcpayserver/litecoin",target:"_blank",rel:"noopener noreferrer"}},[e._v("DockerHub"),t("OutboundLink")],1)])]),e._v(" "),t("tr",[t("td",[e._v("wakiyamap/docker-monacoin")]),e._v(" "),t("td",[e._v("0.20.2")]),e._v(" "),t("td",{staticStyle:{"text-align":"center"}},[t("a",{attrs:{href:"https://raw.githubusercontent.com/wakiyamap/docker-bitcoin/master/monacoin/0.20.2/Dockerfile",target:"_blank",rel:"noopener noreferrer"}},[e._v("✔️"),t("OutboundLink")],1)]),e._v(" "),t("td",{staticStyle:{"text-align":"center"}},[e._v("️❌")]),e._v(" "),t("td",{staticStyle:{"text-align":"center"}},[e._v("️❌")]),e._v(" "),t("td",{staticStyle:{"text-align":"center"}},[t("a",{attrs:{href:"https://github.com/wakiyamap/docker-bitcoin",target:"_blank",rel:"noopener noreferrer"}},[e._v("Github"),t("OutboundLink")],1),e._v(" - "),t("a",{attrs:{href:"https://hub.docker.com/r/wakiyamap/docker-monacoin",target:"_blank",rel:"noopener noreferrer"}},[e._v("DockerHub"),t("OutboundLink")],1)])]),e._v(" "),t("tr",[t("td",[e._v("redis")]),e._v(" "),t("td",[e._v("6.2.2-buster")]),e._v(" "),t("td",{staticStyle:{"text-align":"center"}},[t("a",{attrs:{href:"https://raw.githubusercontent.com/docker-library/redis/f1a8498333ae3ab340b5b39fbac1d7e1dc0d628c/5.0/Dockerfile",target:"_blank",rel:"noopener noreferrer"}},[e._v("✔️"),t("OutboundLink")],1)]),e._v(" "),t("td",{staticStyle:{"text-align":"center"}},[e._v("️❌")]),e._v(" "),t("td",{staticStyle:{"text-align":"center"}},[e._v("️❌")]),e._v(" "),t("td",{staticStyle:{"text-align":"center"}},[t("a",{attrs:{href:"https://github.com/docker-library/redis",target:"_blank",rel:"noopener noreferrer"}},[e._v("Github"),t("OutboundLink")],1),e._v(" - "),t("a",{attrs:{href:"https://hub.docker.com/_/redis",target:"_blank",rel:"noopener noreferrer"}},[e._v("DockerHub"),t("OutboundLink")],1)])]),e._v(" "),t("tr",[t("td",[e._v("jvandrew/btcqbo")]),e._v(" "),t("td",[e._v("0.3.36")]),e._v(" "),t("td",{staticStyle:{"text-align":"center"}},[t("a",{attrs:{href:"https://raw.githubusercontent.com/JeffVandrewJr/btcqbo/v0.3.36/Dockerfile",target:"_blank",rel:"noopener noreferrer"}},[e._v("✔️"),t("OutboundLink")],1)]),e._v(" "),t("td",{staticStyle:{"text-align":"center"}},[e._v("️❌")]),e._v(" "),t("td",{staticStyle:{"text-align":"center"}},[e._v("️❌")]),e._v(" "),t("td",{staticStyle:{"text-align":"center"}},[t("a",{attrs:{href:"https://github.com/JeffVandrewJr/btcqbo",target:"_blank",rel:"noopener noreferrer"}},[e._v("Github"),t("OutboundLink")],1),e._v(" - "),t("a",{attrs:{href:"https://hub.docker.com/r/jvandrew/btcqbo",target:"_blank",rel:"noopener noreferrer"}},[e._v("DockerHub"),t("OutboundLink")],1)])]),e._v(" "),t("tr",[t("td",[e._v("shesek/bwt")]),e._v(" "),t("td",[e._v("0.2.2-electrum")]),e._v(" "),t("td",{staticStyle:{"text-align":"center"}},[t("a",{attrs:{href:"https://raw.githubusercontent.com/bwt-dev/bwt/v0.2.2/docker/Dockerfile",target:"_blank",rel:"noopener noreferrer"}},[e._v("✔️"),t("OutboundLink")],1)]),e._v(" "),t("td",{staticStyle:{"text-align":"center"}},[t("a",{attrs:{href:"https://raw.githubusercontent.com/bwt-dev/bwt/v0.2.2/docker/arm32v7.Dockerfile",target:"_blank",rel:"noopener noreferrer"}},[e._v("✔️"),t("OutboundLink")],1)]),e._v(" "),t("td",{staticStyle:{"text-align":"center"}},[t("a",{attrs:{href:"https://raw.githubusercontent.com/bwt-dev/bwt/v0.2.2/docker/arm64v8.Dockerfile",target:"_blank",rel:"noopener noreferrer"}},[e._v("✔️"),t("OutboundLink")],1)]),e._v(" "),t("td",{staticStyle:{"text-align":"center"}},[t("a",{attrs:{href:"https://github.com/bwt-dev/bwt",target:"_blank",rel:"noopener noreferrer"}},[e._v("Github"),t("OutboundLink")],1),e._v(" - "),t("a",{attrs:{href:"https://hub.docker.com/r/shesek/bwt",target:"_blank",rel:"noopener noreferrer"}},[e._v("DockerHub"),t("OutboundLink")],1)])]),e._v(" "),t("tr",[t("td",[e._v("chatwoot/chatwoot")]),e._v(" "),t("td",[e._v("v1.7.0")]),e._v(" "),t("td",{staticStyle:{"text-align":"center"}},[t("a",{attrs:{href:"https://raw.githubusercontent.com/chatwoot/chatwoot/v1.7.0/docker/Dockerfile",target:"_blank",rel:"noopener noreferrer"}},[e._v("✔️"),t("OutboundLink")],1)]),e._v(" "),t("td",{staticStyle:{"text-align":"center"}},[t("a",{attrs:{href:"https://raw.githubusercontent.com/chatwoot/chatwoot/v1.7.0/docker/Dockerfile",target:"_blank",rel:"noopener noreferrer"}},[e._v("✔️"),t("OutboundLink")],1)]),e._v(" "),t("td",{staticStyle:{"text-align":"center"}},[t("a",{attrs:{href:"https://raw.githubusercontent.com/chatwoot/chatwoot/v1.7.0/docker/Dockerfile",target:"_blank",rel:"noopener noreferrer"}},[e._v("✔️"),t("OutboundLink")],1)]),e._v(" "),t("td",{staticStyle:{"text-align":"center"}},[t("a",{attrs:{href:"https://github.com/chatwoot/chatwoot",target:"_blank",rel:"noopener noreferrer"}},[e._v("Github"),t("OutboundLink")],1),e._v(" - "),t("a",{attrs:{href:"https://hub.docker.com/r/chatwoot/chatwoot",target:"_blank",rel:"noopener noreferrer"}},[e._v("DockerHub"),t("OutboundLink")],1)])]),e._v(" "),t("tr",[t("td",[e._v("lukechilds/electrumx")]),e._v(" "),t("td",[e._v("latest")]),e._v(" "),t("td",{staticStyle:{"text-align":"center"}},[t("a",{attrs:{href:"https://raw.githubusercontent.com/lukechilds/docker-electrumx/master/Dockerfile",target:"_blank",rel:"noopener noreferrer"}},[e._v("✔️"),t("OutboundLink")],1)]),e._v(" "),t("td",{staticStyle:{"text-align":"center"}},[e._v("️❌")]),e._v(" "),t("td",{staticStyle:{"text-align":"center"}},[e._v("️❌")]),e._v(" "),t("td",{staticStyle:{"text-align":"center"}},[t("a",{attrs:{href:"https://github.com/lukechilds/docker-electrumx",target:"_blank",rel:"noopener noreferrer"}},[e._v("Github"),t("OutboundLink")],1),e._v(" - "),t("a",{attrs:{href:"https://hub.docker.com/r/lukechilds/electrumx",target:"_blank",rel:"noopener noreferrer"}},[e._v("DockerHub"),t("OutboundLink")],1)])]),e._v(" "),t("tr",[t("td",[e._v("fireflyiii/core")]),e._v(" "),t("td",[e._v("latest")]),e._v(" "),t("td",{staticStyle:{"text-align":"center"}},[t("a",{attrs:{href:"https://dev.azure.com/Firefly-III/66fb773b-063e-42d7-b6a5-e7729a22e8b3/_apis/git/repositories/e9c3dcf8-4533-4ef1-83cc-75527cab3377/items?path=%2FDockerfile&versionDescriptor%5BversionOptions%5D=0&versionDescriptor%5BversionType%5D=0&versionDescriptor%5Bversion%5D=main&resolveLfs=true&%24format=octetStream&api-version=5.0&download=true",target:"_blank",rel:"noopener noreferrer"}},[e._v("✔️"),t("OutboundLink")],1)]),e._v(" "),t("td",{staticStyle:{"text-align":"center"}},[t("a",{attrs:{href:"https://dev.azure.com/Firefly-III/66fb773b-063e-42d7-b6a5-e7729a22e8b3/_apis/git/repositories/e9c3dcf8-4533-4ef1-83cc-75527cab3377/items?path=%2FDockerfile&versionDescriptor%5BversionOptions%5D=0&versionDescriptor%5BversionType%5D=0&versionDescriptor%5Bversion%5D=main&resolveLfs=true&%24format=octetStream&api-version=5.0&download=true",target:"_blank",rel:"noopener noreferrer"}},[e._v("✔️"),t("OutboundLink")],1)]),e._v(" "),t("td",{staticStyle:{"text-align":"center"}},[t("a",{attrs:{href:"https://dev.azure.com/Firefly-III/66fb773b-063e-42d7-b6a5-e7729a22e8b3/_apis/git/repositories/e9c3dcf8-4533-4ef1-83cc-75527cab3377/items?path=%2FDockerfile&versionDescriptor%5BversionOptions%5D=0&versionDescriptor%5BversionType%5D=0&versionDescriptor%5Bversion%5D=main&resolveLfs=true&%24format=octetStream&api-version=5.0&download=true",target:"_blank",rel:"noopener noreferrer"}},[e._v("✔️"),t("OutboundLink")],1)]),e._v(" "),t("td",{staticStyle:{"text-align":"center"}},[t("a",{attrs:{href:"https://dev.azure.com/Firefly-III/_git/MainImage",target:"_blank",rel:"noopener noreferrer"}},[e._v("Github"),t("OutboundLink")],1),e._v(" - "),t("a",{attrs:{href:"https://hub.docker.com/r/fireflyiii/core",target:"_blank",rel:"noopener noreferrer"}},[e._v("DockerHub"),t("OutboundLink")],1)])]),e._v(" "),t("tr",[t("td",[e._v("podcastindexorg/podcasting20-helipad")]),e._v(" "),t("td",[e._v("v0.1.10")]),e._v(" "),t("td",{staticStyle:{"text-align":"center"}},[t("a",{attrs:{href:"https://raw.githubusercontent.com/Podcastindex-org/helipad/v0.1.10/umbrel/Dockerfile",target:"_blank",rel:"noopener noreferrer"}},[e._v("✔️"),t("OutboundLink")],1)]),e._v(" "),t("td",{staticStyle:{"text-align":"center"}},[t("a",{attrs:{href:"https://raw.githubusercontent.com/Podcastindex-org/helipad/v0.1.10/umbrel/Dockerfile",target:"_blank",rel:"noopener noreferrer"}},[e._v("✔️"),t("OutboundLink")],1)]),e._v(" "),t("td",{staticStyle:{"text-align":"center"}},[t("a",{attrs:{href:"https://raw.githubusercontent.com/Podcastindex-org/helipad/v0.1.10/umbrel/Dockerfile",target:"_blank",rel:"noopener noreferrer"}},[e._v("✔️"),t("OutboundLink")],1)]),e._v(" "),t("td",{staticStyle:{"text-align":"center"}},[t("a",{attrs:{href:"https://github.com/Podcastindex-org/helipad",target:"_blank",rel:"noopener noreferrer"}},[e._v("Github"),t("OutboundLink")],1),e._v(" - "),t("a",{attrs:{href:"https://hub.docker.com/r/podcastindexorg/podcasting20-helipad",target:"_blank",rel:"noopener noreferrer"}},[e._v("DockerHub"),t("OutboundLink")],1)])]),e._v(" "),t("tr",[t("td",[e._v("jvandrew/librepatron")]),e._v(" "),t("td",[e._v("0.7.39")]),e._v(" "),t("td",{staticStyle:{"text-align":"center"}},[t("a",{attrs:{href:"https://raw.githubusercontent.com/JeffVandrewJr/patron/v0.7.39/Dockerfile",target:"_blank",rel:"noopener noreferrer"}},[e._v("✔️"),t("OutboundLink")],1)]),e._v(" "),t("td",{staticStyle:{"text-align":"center"}},[e._v("️❌")]),e._v(" "),t("td",{staticStyle:{"text-align":"center"}},[e._v("️❌")]),e._v(" "),t("td",{staticStyle:{"text-align":"center"}},[t("a",{attrs:{href:"https://github.com/JeffVandrewJr/patron",target:"_blank",rel:"noopener noreferrer"}},[e._v("Github"),t("OutboundLink")],1),e._v(" - "),t("a",{attrs:{href:"https://hub.docker.com/r/jvandrew/librepatron",target:"_blank",rel:"noopener noreferrer"}},[e._v("DockerHub"),t("OutboundLink")],1)])]),e._v(" "),t("tr",[t("td",[e._v("jvandrew/isso")]),e._v(" "),t("td",[e._v("atron.22")]),e._v(" "),t("td",{staticStyle:{"text-align":"center"}},[t("a",{attrs:{href:"https://raw.githubusercontent.com/JeffVandrewJr/isso/patron.22/Dockerfile",target:"_blank",rel:"noopener noreferrer"}},[e._v("✔️"),t("OutboundLink")],1)]),e._v(" "),t("td",{staticStyle:{"text-align":"center"}},[e._v("️❌")]),e._v(" "),t("td",{staticStyle:{"text-align":"center"}},[e._v("️❌")]),e._v(" "),t("td",{staticStyle:{"text-align":"center"}},[t("a",{attrs:{href:"https://github.com/JeffVandrewJr/isso",target:"_blank",rel:"noopener noreferrer"}},[e._v("Github"),t("OutboundLink")],1),e._v(" - "),t("a",{attrs:{href:"https://hub.docker.com/r/jvandrew/isso",target:"_blank",rel:"noopener noreferrer"}},[e._v("DockerHub"),t("OutboundLink")],1)])]),e._v(" "),t("tr",[t("td",[e._v("lightninglabs/lightning-terminal")]),e._v(" "),t("td",[e._v("v0.12.3-alpha-path-prefix")]),e._v(" "),t("td",{staticStyle:{"text-align":"center"}},[t("a",{attrs:{href:"https://raw.githubusercontent.com/lightninglabs/lightning-terminal/v0.12.3-alpha/Dockerfile",target:"_blank",rel:"noopener noreferrer"}},[e._v("✔️"),t("OutboundLink")],1)]),e._v(" "),t("td",{staticStyle:{"text-align":"center"}},[e._v("️❌")]),e._v(" "),t("td",{staticStyle:{"text-align":"center"}},[t("a",{attrs:{href:"https://raw.githubusercontent.com/lightninglabs/lightning-terminal/v0.12.3-alpha/Dockerfile",target:"_blank",rel:"noopener noreferrer"}},[e._v("✔️"),t("OutboundLink")],1)]),e._v(" "),t("td",{staticStyle:{"text-align":"center"}},[t("a",{attrs:{href:"https://github.com/lightninglabs/lightning-terminal",target:"_blank",rel:"noopener noreferrer"}},[e._v("Github"),t("OutboundLink")],1),e._v(" - "),t("a",{attrs:{href:"https://hub.docker.com/r/lightninglabs/lightning-terminal",target:"_blank",rel:"noopener noreferrer"}},[e._v("DockerHub"),t("OutboundLink")],1)])]),e._v(" "),t("tr",[t("td",[e._v("mempool/frontend")]),e._v(" "),t("td",[e._v("v2.5.0")]),e._v(" "),t("td",{staticStyle:{"text-align":"center"}},[t("a",{attrs:{href:"https://raw.githubusercontent.com/mempool/mempool/v2.5.0/docker/frontend/Dockerfile",target:"_blank",rel:"noopener noreferrer"}},[e._v("✔️"),t("OutboundLink")],1)]),e._v(" "),t("td",{staticStyle:{"text-align":"center"}},[t("a",{attrs:{href:"https://raw.githubusercontent.com/mempool/mempool/v2.5.0/docker/frontend/Dockerfile",target:"_blank",rel:"noopener noreferrer"}},[e._v("✔️"),t("OutboundLink")],1)]),e._v(" "),t("td",{staticStyle:{"text-align":"center"}},[t("a",{attrs:{href:"https://raw.githubusercontent.com/mempool/mempool/v2.5.0/docker/frontend/Dockerfile",target:"_blank",rel:"noopener noreferrer"}},[e._v("✔️"),t("OutboundLink")],1)]),e._v(" "),t("td",{staticStyle:{"text-align":"center"}},[t("a",{attrs:{href:"https://github.com/mempool/mempool",target:"_blank",rel:"noopener noreferrer"}},[e._v("Github"),t("OutboundLink")],1),e._v(" - "),t("a",{attrs:{href:"https://hub.docker.com/r/mempool/frontend",target:"_blank",rel:"noopener noreferrer"}},[e._v("DockerHub"),t("OutboundLink")],1)])]),e._v(" "),t("tr",[t("td",[e._v("mempool/backend")]),e._v(" "),t("td",[e._v("v2.5.0")]),e._v(" "),t("td",{staticStyle:{"text-align":"center"}},[t("a",{attrs:{href:"https://raw.githubusercontent.com/mempool/mempool/v2.5.0/docker/backend/Dockerfile",target:"_blank",rel:"noopener noreferrer"}},[e._v("✔️"),t("OutboundLink")],1)]),e._v(" "),t("td",{staticStyle:{"text-align":"center"}},[t("a",{attrs:{href:"https://raw.githubusercontent.com/mempool/mempool/v2.5.0/docker/backend/Dockerfile",target:"_blank",rel:"noopener noreferrer"}},[e._v("✔️"),t("OutboundLink")],1)]),e._v(" "),t("td",{staticStyle:{"text-align":"center"}},[t("a",{attrs:{href:"https://raw.githubusercontent.com/mempool/mempool/v2.5.0/docker/backend/Dockerfile",target:"_blank",rel:"noopener noreferrer"}},[e._v("✔️"),t("OutboundLink")],1)]),e._v(" "),t("td",{staticStyle:{"text-align":"center"}},[t("a",{attrs:{href:"https://github.com/mempool/mempool",target:"_blank",rel:"noopener noreferrer"}},[e._v("Github"),t("OutboundLink")],1),e._v(" - "),t("a",{attrs:{href:"https://hub.docker.com/r/mempool/backend",target:"_blank",rel:"noopener noreferrer"}},[e._v("DockerHub"),t("OutboundLink")],1)])]),e._v(" "),t("tr",[t("td",[e._v("mariadb")]),e._v(" "),t("td",[e._v("10.11")]),e._v(" "),t("td",{staticStyle:{"text-align":"center"}},[t("a",{attrs:{href:"https://raw.githubusercontent.com/docker-library/mariadb/master/10.11/Dockerfile",target:"_blank",rel:"noopener noreferrer"}},[e._v("✔️"),t("OutboundLink")],1)]),e._v(" "),t("td",{staticStyle:{"text-align":"center"}},[e._v("️❌")]),e._v(" "),t("td",{staticStyle:{"text-align":"center"}},[e._v("️❌")]),e._v(" "),t("td",{staticStyle:{"text-align":"center"}},[t("a",{attrs:{href:"https://github.com/docker-library/mariadb",target:"_blank",rel:"noopener noreferrer"}},[e._v("Github"),t("OutboundLink")],1),e._v(" - "),t("a",{attrs:{href:"https://hub.docker.com/_/mariadb",target:"_blank",rel:"noopener noreferrer"}},[e._v("DockerHub"),t("OutboundLink")],1)])]),e._v(" "),t("tr",[t("td",[e._v("kukks/nnostr-relay")]),e._v(" "),t("td",[e._v("v0.0.23")]),e._v(" "),t("td",{staticStyle:{"text-align":"center"}},[t("a",{attrs:{href:"https://raw.githubusercontent.com/kukks/nnostr/Relay/v0.0.23/Relay/Dockerfile",target:"_blank",rel:"noopener noreferrer"}},[e._v("✔️"),t("OutboundLink")],1)]),e._v(" "),t("td",{staticStyle:{"text-align":"center"}},[t("a",{attrs:{href:"https://raw.githubusercontent.com/kukks/nnostr/Relay/v0.0.23/Relay/Dockerfile",target:"_blank",rel:"noopener noreferrer"}},[e._v("✔️"),t("OutboundLink")],1)]),e._v(" "),t("td",{staticStyle:{"text-align":"center"}},[t("a",{attrs:{href:"https://raw.githubusercontent.com/kukks/nnostr/Relay/v0.0.23/Relay/Dockerfile",target:"_blank",rel:"noopener noreferrer"}},[e._v("✔️"),t("OutboundLink")],1)]),e._v(" "),t("td",{staticStyle:{"text-align":"center"}},[t("a",{attrs:{href:"https://github.com/kukks/nnostr",target:"_blank",rel:"noopener noreferrer"}},[e._v("Github"),t("OutboundLink")],1),e._v(" - "),t("a",{attrs:{href:"https://hub.docker.com/r/kukks/nnostr-relay",target:"_blank",rel:"noopener noreferrer"}},[e._v("DockerHub"),t("OutboundLink")],1)])]),e._v(" "),t("tr",[t("td",[e._v("sphinxlightning/sphinx-relay")]),e._v(" "),t("td",[e._v("v2.2.9")]),e._v(" "),t("td",{staticStyle:{"text-align":"center"}},[t("a",{attrs:{href:"https://raw.githubusercontent.com/stakwork/sphinx-relay/v2.2.9/Dockerfile",target:"_blank",rel:"noopener noreferrer"}},[e._v("✔️"),t("OutboundLink")],1)]),e._v(" "),t("td",{staticStyle:{"text-align":"center"}},[t("a",{attrs:{href:"https://raw.githubusercontent.com/stakwork/sphinx-relay/v2.2.9/Dockerfile",target:"_blank",rel:"noopener noreferrer"}},[e._v("✔️"),t("OutboundLink")],1)]),e._v(" "),t("td",{staticStyle:{"text-align":"center"}},[t("a",{attrs:{href:"https://raw.githubusercontent.com/stakwork/sphinx-relay/v2.2.9/Dockerfile",target:"_blank",rel:"noopener noreferrer"}},[e._v("✔️"),t("OutboundLink")],1)]),e._v(" "),t("td",{staticStyle:{"text-align":"center"}},[t("a",{attrs:{href:"https://github.com/stakwork/sphinx-relay",target:"_blank",rel:"noopener noreferrer"}},[e._v("Github"),t("OutboundLink")],1),e._v(" - "),t("a",{attrs:{href:"https://hub.docker.com/r/sphinxlightning/sphinx-relay",target:"_blank",rel:"noopener noreferrer"}},[e._v("DockerHub"),t("OutboundLink")],1)])]),e._v(" "),t("tr",[t("td",[e._v("djbooth007/tallycoin_connect")]),e._v(" "),t("td",[e._v("v1.8.0")]),e._v(" "),t("td",{staticStyle:{"text-align":"center"}},[t("a",{attrs:{href:"https://raw.githubusercontent.com/djbooth007/tallycoin_connect/v1.8.0/Dockerfile",target:"_blank",rel:"noopener noreferrer"}},[e._v("✔️"),t("OutboundLink")],1)]),e._v(" "),t("td",{staticStyle:{"text-align":"center"}},[t("a",{attrs:{href:"https://raw.githubusercontent.com/djbooth007/tallycoin_connect/v1.8.0/Dockerfile.arm32v7",target:"_blank",rel:"noopener noreferrer"}},[e._v("✔️"),t("OutboundLink")],1)]),e._v(" "),t("td",{staticStyle:{"text-align":"center"}},[t("a",{attrs:{href:"https://raw.githubusercontent.com/djbooth007/tallycoin_connect/v1.8.0/Dockerfile.arm64v8",target:"_blank",rel:"noopener noreferrer"}},[e._v("✔️"),t("OutboundLink")],1)]),e._v(" "),t("td",{staticStyle:{"text-align":"center"}},[t("a",{attrs:{href:"https://github.com/djbooth007/tallycoin_connect",target:"_blank",rel:"noopener noreferrer"}},[e._v("Github"),t("OutboundLink")],1),e._v(" - "),t("a",{attrs:{href:"https://hub.docker.com/r/djbooth007/tallycoin_connect",target:"_blank",rel:"noopener noreferrer"}},[e._v("DockerHub"),t("OutboundLink")],1)])]),e._v(" "),t("tr",[t("td",[e._v("benjaminchodroff/rust-teos")]),e._v(" "),t("td",[e._v("latest")]),e._v(" "),t("td",{staticStyle:{"text-align":"center"}},[t("a",{attrs:{href:"https://raw.githubusercontent.com/benjaminchodroff/rust-teos/master/docker/Dockerfile",target:"_blank",rel:"noopener noreferrer"}},[e._v("✔️"),t("OutboundLink")],1)]),e._v(" "),t("td",{staticStyle:{"text-align":"center"}},[e._v("️❌")]),e._v(" "),t("td",{staticStyle:{"text-align":"center"}},[e._v("️❌")]),e._v(" "),t("td",{staticStyle:{"text-align":"center"}},[t("a",{attrs:{href:"https://github.com/benjaminchodroff/rust-teos",target:"_blank",rel:"noopener noreferrer"}},[e._v("Github"),t("OutboundLink")],1),e._v(" - "),t("a",{attrs:{href:"https://hub.docker.com/r/benjaminchodroff/rust-teos",target:"_blank",rel:"noopener noreferrer"}},[e._v("DockerHub"),t("OutboundLink")],1)])]),e._v(" "),t("tr",[t("td",[e._v("apotdevin/thunderhub")]),e._v(" "),t("td",[e._v("base-v0.13.31")]),e._v(" "),t("td",{staticStyle:{"text-align":"center"}},[t("a",{attrs:{href:"https://raw.githubusercontent.com/apotdevin/thunderhub/v0.13.31/Dockerfile",target:"_blank",rel:"noopener noreferrer"}},[e._v("✔️"),t("OutboundLink")],1)]),e._v(" "),t("td",{staticStyle:{"text-align":"center"}},[t("a",{attrs:{href:"https://raw.githubusercontent.com/apotdevin/thunderhub/v0.13.31/Dockerfile",target:"_blank",rel:"noopener noreferrer"}},[e._v("✔️"),t("OutboundLink")],1)]),e._v(" "),t("td",{staticStyle:{"text-align":"center"}},[t("a",{attrs:{href:"https://raw.githubusercontent.com/apotdevin/thunderhub/v0.13.31/Dockerfile",target:"_blank",rel:"noopener noreferrer"}},[e._v("✔️"),t("OutboundLink")],1)]),e._v(" "),t("td",{staticStyle:{"text-align":"center"}},[t("a",{attrs:{href:"https://github.com/apotdevin/thunderhub",target:"_blank",rel:"noopener noreferrer"}},[e._v("Github"),t("OutboundLink")],1),e._v(" - "),t("a",{attrs:{href:"https://hub.docker.com/r/apotdevin/thunderhub",target:"_blank",rel:"noopener noreferrer"}},[e._v("DockerHub"),t("OutboundLink")],1)])]),e._v(" "),t("tr",[t("td",[e._v("lncapital/torq")]),e._v(" "),t("td",[e._v("0.20.3")]),e._v(" "),t("td",{staticStyle:{"text-align":"center"}},[t("a",{attrs:{href:"https://raw.githubusercontent.com/lncapital/torq/master/README.md",target:"_blank",rel:"noopener noreferrer"}},[e._v("✔️"),t("OutboundLink")],1)]),e._v(" "),t("td",{staticStyle:{"text-align":"center"}},[t("a",{attrs:{href:"https://raw.githubusercontent.com/lncapital/torq/master/README.md",target:"_blank",rel:"noopener noreferrer"}},[e._v("✔️"),t("OutboundLink")],1)]),e._v(" "),t("td",{staticStyle:{"text-align":"center"}},[t("a",{attrs:{href:"https://raw.githubusercontent.com/lncapital/torq/master/README.md",target:"_blank",rel:"noopener noreferrer"}},[e._v("✔️"),t("OutboundLink")],1)]),e._v(" "),t("td",{staticStyle:{"text-align":"center"}},[t("a",{attrs:{href:"https://github.com/lncapital/torq",target:"_blank",rel:"noopener noreferrer"}},[e._v("Github"),t("OutboundLink")],1),e._v(" - "),t("a",{attrs:{href:"https://hub.docker.com/r/lncapital/torq",target:"_blank",rel:"noopener noreferrer"}},[e._v("DockerHub"),t("OutboundLink")],1)])]),e._v(" "),t("tr",[t("td",[e._v("timescale/timescaledb")]),e._v(" "),t("td",[e._v("latest-pg14")]),e._v(" "),t("td",{staticStyle:{"text-align":"center"}},[t("a",{attrs:{href:"https://raw.githubusercontent.com/timescale/timescaledb-docker/main/Dockerfile",target:"_blank",rel:"noopener noreferrer"}},[e._v("✔️"),t("OutboundLink")],1)]),e._v(" "),t("td",{staticStyle:{"text-align":"center"}},[t("a",{attrs:{href:"https://raw.githubusercontent.com/timescale/timescaledb-docker/main/Dockerfile",target:"_blank",rel:"noopener noreferrer"}},[e._v("✔️"),t("OutboundLink")],1)]),e._v(" "),t("td",{staticStyle:{"text-align":"center"}},[t("a",{attrs:{href:"https://raw.githubusercontent.com/timescale/timescaledb-docker/main/Dockerfile",target:"_blank",rel:"noopener noreferrer"}},[e._v("✔️"),t("OutboundLink")],1)]),e._v(" "),t("td",{staticStyle:{"text-align":"center"}},[t("a",{attrs:{href:"https://github.com/timescale/timescaledb-docker",target:"_blank",rel:"noopener noreferrer"}},[e._v("Github"),t("OutboundLink")],1),e._v(" - "),t("a",{attrs:{href:"https://hub.docker.com/r/timescale/timescaledb",target:"_blank",rel:"noopener noreferrer"}},[e._v("DockerHub"),t("OutboundLink")],1)])]),e._v(" "),t("tr",[t("td",[e._v("zammad/zammad-docker-compose")]),e._v(" "),t("td",[e._v("zammad-postgresql-3.4.0-4")]),e._v(" "),t("td",{staticStyle:{"text-align":"center"}},[t("a",{attrs:{href:"https://raw.githubusercontent.com/zammad/zammad-docker-compose/ff20084ce2829486076e9781fe27407ca6cc09bb/containers/zammad-postgresql/Dockerfile",target:"_blank",rel:"noopener noreferrer"}},[e._v("✔️"),t("OutboundLink")],1)]),e._v(" "),t("td",{staticStyle:{"text-align":"center"}},[e._v("️❌")]),e._v(" "),t("td",{staticStyle:{"text-align":"center"}},[e._v("️❌")]),e._v(" "),t("td",{staticStyle:{"text-align":"center"}},[t("a",{attrs:{href:"https://github.com/zammad/zammad-docker-compose",target:"_blank",rel:"noopener noreferrer"}},[e._v("Github"),t("OutboundLink")],1),e._v(" - "),t("a",{attrs:{href:"https://hub.docker.com/r/zammad/zammad-docker-compose",target:"_blank",rel:"noopener noreferrer"}},[e._v("DockerHub"),t("OutboundLink")],1)])]),e._v(" "),t("tr",[t("td",[e._v("memcached")]),e._v(" "),t("td",[e._v("1.5.22-alpine")]),e._v(" "),t("td",{staticStyle:{"text-align":"center"}},[t("a",{attrs:{href:"https://raw.githubusercontent.com/docker-library/memcached/eb38bf28263b8e5bb7367797cb7b181b65d769bd/alpine/Dockerfile",target:"_blank",rel:"noopener noreferrer"}},[e._v("✔️"),t("OutboundLink")],1)]),e._v(" "),t("td",{staticStyle:{"text-align":"center"}},[e._v("️❌")]),e._v(" "),t("td",{staticStyle:{"text-align":"center"}},[e._v("️❌")]),e._v(" "),t("td",{staticStyle:{"text-align":"center"}},[t("a",{attrs:{href:"https://github.com/docker-library/memcached",target:"_blank",rel:"noopener noreferrer"}},[e._v("Github"),t("OutboundLink")],1),e._v(" - "),t("a",{attrs:{href:"https://hub.docker.com/_/memcached",target:"_blank",rel:"noopener noreferrer"}},[e._v("DockerHub"),t("OutboundLink")],1)])]),e._v(" "),t("tr",[t("td",[e._v("traefik")]),e._v(" "),t("td",[e._v("v2.6")]),e._v(" "),t("td",{staticStyle:{"text-align":"center"}},[t("a",{attrs:{href:"https://raw.githubusercontent.com/containous/traefik-library-image/master/scratch/Dockerfile",target:"_blank",rel:"noopener noreferrer"}},[e._v("✔️"),t("OutboundLink")],1)]),e._v(" "),t("td",{staticStyle:{"text-align":"center"}},[e._v("️❌")]),e._v(" "),t("td",{staticStyle:{"text-align":"center"}},[e._v("️❌")]),e._v(" "),t("td",{staticStyle:{"text-align":"center"}},[t("a",{attrs:{href:"https://github.com/containous/traefik-library-image",target:"_blank",rel:"noopener noreferrer"}},[e._v("Github"),t("OutboundLink")],1),e._v(" - "),t("a",{attrs:{href:"https://hub.docker.com/_/traefik",target:"_blank",rel:"noopener noreferrer"}},[e._v("DockerHub"),t("OutboundLink")],1)])]),e._v(" "),t("tr",[t("td",[e._v("chekaz/docker-trezarcoin")]),e._v(" "),t("td",[e._v("0.13.0")]),e._v(" "),t("td",{staticStyle:{"text-align":"center"}},[t("a",{attrs:{href:"https://raw.githubusercontent.com/ChekaZ/docker/master/trezarcoin/1.2.0/Dockerfile",target:"_blank",rel:"noopener noreferrer"}},[e._v("✔️"),t("OutboundLink")],1)]),e._v(" "),t("td",{staticStyle:{"text-align":"center"}},[e._v("️❌")]),e._v(" "),t("td",{staticStyle:{"text-align":"center"}},[e._v("️❌")]),e._v(" "),t("td",{staticStyle:{"text-align":"center"}},[t("a",{attrs:{href:"https://github.com/ChekaZ/docker",target:"_blank",rel:"noopener noreferrer"}},[e._v("Github"),t("OutboundLink")],1),e._v(" - "),t("a",{attrs:{href:"https://hub.docker.com/r/chekaz/docker-trezarcoin",target:"_blank",rel:"noopener noreferrer"}},[e._v("DockerHub"),t("OutboundLink")],1)])]),e._v(" "),t("tr",[t("td",[e._v("romanornr/docker-viacoin")]),e._v(" "),t("td",[e._v("0.15.2")]),e._v(" "),t("td",{staticStyle:{"text-align":"center"}},[t("a",{attrs:{href:"https://raw.githubusercontent.com/viacoin/docker-viacoin/master/viacoin/0.15.2/docker-viacoin",target:"_blank",rel:"noopener noreferrer"}},[e._v("✔️"),t("OutboundLink")],1)]),e._v(" "),t("td",{staticStyle:{"text-align":"center"}},[e._v("️❌")]),e._v(" "),t("td",{staticStyle:{"text-align":"center"}},[e._v("️❌")]),e._v(" "),t("td",{staticStyle:{"text-align":"center"}},[t("a",{attrs:{href:"https://github.com/viacoin/docker-viacoin",target:"_blank",rel:"noopener noreferrer"}},[e._v("Github"),t("OutboundLink")],1),e._v(" - "),t("a",{attrs:{href:"https://hub.docker.com/r/romanornr/docker-viacoin",target:"_blank",rel:"noopener noreferrer"}},[e._v("DockerHub"),t("OutboundLink")],1)])])])]),e._v(" "),t("h1",{attrs:{id:"faq"}},[t("a",{staticClass:"header-anchor",attrs:{href:"#faq"}},[e._v("#")]),e._v(" FAQ")]),e._v(" "),t("h2",{attrs:{id:"how-can-i-modify-my-environment"}},[t("a",{staticClass:"header-anchor",attrs:{href:"#how-can-i-modify-my-environment"}},[e._v("#")]),e._v(" How can I modify my environment?")]),e._v(" "),t("p",[e._v("As root, run "),t("code",[e._v(". btcpay-setup.sh")]),e._v("; this will show you the environment variable it is expecting.\nFor example, if you support "),t("code",[e._v("btc")]),e._v(" and "),t("code",[e._v("ltc")]),e._v(" already, and want to add "),t("code",[e._v("btg")]),e._v(":")]),e._v(" "),t("div",{staticClass:"language-bash extra-class"},[t("pre",{pre:!0,attrs:{class:"language-bash"}},[t("code",[t("span",{pre:!0,attrs:{class:"token builtin class-name"}},[e._v("export")]),e._v(" "),t("span",{pre:!0,attrs:{class:"token assign-left variable"}},[e._v("BTCPAYGEN_CRYPTO3")]),t("span",{pre:!0,attrs:{class:"token operator"}},[e._v("=")]),t("span",{pre:!0,attrs:{class:"token string"}},[e._v("'btg'")]),e._v("\n"),t("span",{pre:!0,attrs:{class:"token builtin class-name"}},[e._v(".")]),e._v(" btcpay-setup.sh "),t("span",{pre:!0,attrs:{class:"token parameter variable"}},[e._v("-i")]),e._v("\n")])])]),t("h2",{attrs:{id:"i-deployed-before-btcpay-setupsh-existed-before-may-17-2018-can-i-migrate-to-this-new-system"}},[t("a",{staticClass:"header-anchor",attrs:{href:"#i-deployed-before-btcpay-setupsh-existed-before-may-17-2018-can-i-migrate-to-this-new-system"}},[e._v("#")]),e._v(" I deployed before "),t("code",[e._v("btcpay-setup.sh")]),e._v(" existed (before May 17, 2018), can I migrate to this new system?")]),e._v(" "),t("p",[e._v("Yes, run the following commands to update:")]),e._v(" "),t("div",{staticClass:"language-bash extra-class"},[t("pre",{pre:!0,attrs:{class:"language-bash"}},[t("code",[t("span",{pre:!0,attrs:{class:"token function"}},[e._v("sudo")]),e._v(" "),t("span",{pre:!0,attrs:{class:"token function"}},[e._v("su")]),e._v(" -\n\n"),t("span",{pre:!0,attrs:{class:"token builtin class-name"}},[e._v("cd")]),e._v(" "),t("span",{pre:!0,attrs:{class:"token variable"}},[e._v("$DOWNLOAD_ROOT")]),e._v("/btcpayserver-docker\n"),t("span",{pre:!0,attrs:{class:"token function"}},[e._v("git")]),e._v(" checkout master\n"),t("span",{pre:!0,attrs:{class:"token function"}},[e._v("git")]),e._v(" pull\n"),t("span",{pre:!0,attrs:{class:"token function"}},[e._v("git")]),e._v(" checkout 9acb5d8067cb5c46f59858137feb699b41ac9f19\nbtcpay-update.sh\n"),t("span",{pre:!0,attrs:{class:"token builtin class-name"}},[e._v(".")]),e._v(" ./btcpay-setup.sh "),t("span",{pre:!0,attrs:{class:"token parameter variable"}},[e._v("-i")]),e._v("\n"),t("span",{pre:!0,attrs:{class:"token function"}},[e._v("git")]),e._v(" checkout master\nbtcpay-update.sh\n\n"),t("span",{pre:!0,attrs:{class:"token builtin class-name"}},[e._v("exit")]),e._v("\n")])])]),t("h2",{attrs:{id:"im-getting-an-error-on-windows-cannot-create-container-for-service-docker-mount-denied"}},[t("a",{staticClass:"header-anchor",attrs:{href:"#im-getting-an-error-on-windows-cannot-create-container-for-service-docker-mount-denied"}},[e._v("#")]),e._v(" I'm getting an error on Windows: "),t("code",[e._v("Cannot create container for service docker: Mount denied")]),e._v("?")]),e._v(" "),t("p",[e._v("If you see this error:")]),e._v(" "),t("p",[t("code",[e._v("Cannot create container for service docker: b'Mount denied:\\nThe source path \"\\\\\\\\var\\\\\\\\run\\\\\\\\docker.sock:/var/run/docker.sock\"\\nis not a valid Windows path'")]),e._v(".")]),e._v(" "),t("p",[e._v("Run this in "),t("a",{attrs:{href:"https://docs.microsoft.com/en-us/powershell/scripting/windows-powershell/starting-windows-powershell",target:"_blank",rel:"noopener noreferrer"}},[e._v("powershell"),t("OutboundLink")],1),e._v(":")]),e._v(" "),t("div",{staticClass:"language-powershell extra-class"},[t("pre",{pre:!0,attrs:{class:"language-powershell"}},[t("code",[t("span",{pre:!0,attrs:{class:"token variable"}},[e._v("$Env")]),e._v(":COMPOSE_CONVERT_WINDOWS_PATHS=1\n")])])]),t("p",[e._v("Then, run "),t("code",[e._v("docker-compose -f EXAMPLE.yml up")]),e._v(".")]),e._v(" "),t("p",[e._v("This bug comes from Docker for Windows and is "),t("a",{attrs:{href:"https://github.com/docker/for-win/issues/1829",target:"_blank",rel:"noopener noreferrer"}},[e._v("tracked on Github"),t("OutboundLink")],1),e._v(".")]),e._v(" "),t("h2",{attrs:{id:"how-i-can-prune-my-nodes"}},[t("a",{staticClass:"header-anchor",attrs:{href:"#how-i-can-prune-my-nodes"}},[e._v("#")]),e._v(" How I can prune my node(s)?")]),e._v(" "),t("p",[e._v("This will prune your Bitcoin full node to a maximum of 100GB (of blocks):")]),e._v(" "),t("div",{staticClass:"language-bash extra-class"},[t("pre",{pre:!0,attrs:{class:"language-bash"}},[t("code",[t("span",{pre:!0,attrs:{class:"token builtin class-name"}},[e._v("export")]),e._v(" "),t("span",{pre:!0,attrs:{class:"token assign-left variable"}},[e._v("BTCPAYGEN_ADDITIONAL_FRAGMENTS")]),t("span",{pre:!0,attrs:{class:"token operator"}},[e._v("=")]),t("span",{pre:!0,attrs:{class:"token string"}},[e._v('"opt-save-storage"')]),e._v("\n"),t("span",{pre:!0,attrs:{class:"token builtin class-name"}},[e._v(".")]),e._v(" ./btcpay-setup.sh "),t("span",{pre:!0,attrs:{class:"token parameter variable"}},[e._v("-i")]),e._v("\n")])])]),t("p",[e._v("Other options are "),t("a",{attrs:{href:"#generated-docker-compose"}},[e._v("documented here")]),e._v(".")]),e._v(" "),t("h2",{attrs:{id:"how-can-i-customize-the-generated-docker-compose-file"}},[t("a",{staticClass:"header-anchor",attrs:{href:"#how-can-i-customize-the-generated-docker-compose-file"}},[e._v("#")]),e._v(" How can I customize the generated docker-compose file?")]),e._v(" "),t("p",[e._v("In some instances, you might want to customize your environment in more detail. While you could modify "),t("code",[e._v("Generated/docker-compose.generated.yml")]),e._v(" manually, your changes would be overwritten the next time you run "),t("code",[e._v("btcpay-update.sh")]),e._v(".")]),e._v(" "),t("p",[e._v("Luckily, you can leverage "),t("code",[e._v("BTCPAYGEN_ADDITIONAL_FRAGMENTS")]),e._v(" for this!")]),e._v(" "),t("p",[e._v("Let's enable "),t("strong",[e._v("pruning to 60 GB")]),e._v(", for example:")]),e._v(" "),t("p",[e._v("First, copy "),t("a",{attrs:{href:"https://github.com/btcpayserver/btcpayserver-docker/blob/master/docker-compose-generator/docker-fragments/opt-save-storage.yml",target:"_blank",rel:"noopener noreferrer"}},[e._v("opt-save-storage"),t("OutboundLink")],1),e._v(" into the "),t("a",{attrs:{href:"https://github.com/btcpayserver/btcpayserver-docker/blob/master/docker-compose-generator/docker-fragments",target:"_blank",rel:"noopener noreferrer"}},[e._v("the docker fragment folder"),t("OutboundLink")],1),e._v(" as "),t("code",[e._v("opt-save-storage.custom.yml")]),e._v(". "),t("strong",[e._v("Important:")]),e._v(" the file must end with "),t("code",[e._v(".custom.yml")]),e._v(", or there will be git conflicts whenever you run "),t("code",[e._v("btcpay-update.sh")]),e._v(".")]),e._v(" "),t("p",[e._v("Modify the new "),t("code",[e._v("opt-save-storage.custom.yml")]),e._v(" file to your taste:")]),e._v(" "),t("div",{staticClass:"language-diff extra-class"},[t("pre",{pre:!0,attrs:{class:"language-diff"}},[t("code",[e._v('@@ -14,8 +14,7 @@ version: "3"\n'),t("span",{pre:!0,attrs:{class:"token unchanged"}},[t("span",{pre:!0,attrs:{class:"token prefix unchanged"}},[e._v(" ")]),t("span",{pre:!0,attrs:{class:"token line"}},[e._v("services:\n")]),t("span",{pre:!0,attrs:{class:"token prefix unchanged"}},[e._v(" ")]),t("span",{pre:!0,attrs:{class:"token line"}},[e._v(" bitcoind:\n")]),t("span",{pre:!0,attrs:{class:"token prefix unchanged"}},[e._v(" ")]),t("span",{pre:!0,attrs:{class:"token line"}},[e._v(" environment:\n")])]),t("span",{pre:!0,attrs:{class:"token deleted-sign deleted"}},[t("span",{pre:!0,attrs:{class:"token prefix deleted"}},[e._v("-")]),t("span",{pre:!0,attrs:{class:"token line"}},[e._v(" BITCOIN_EXTRA_ARGS: prune=100000\n")])]),t("span",{pre:!0,attrs:{class:"token inserted-sign inserted"}},[t("span",{pre:!0,attrs:{class:"token prefix inserted"}},[e._v("+")]),t("span",{pre:!0,attrs:{class:"token line"}},[e._v(" BITCOIN_EXTRA_ARGS: prune=60000\n")])])])])]),t("p",[e._v("Then set it up:")]),e._v(" "),t("div",{staticClass:"language-bash extra-class"},[t("pre",{pre:!0,attrs:{class:"language-bash"}},[t("code",[t("span",{pre:!0,attrs:{class:"token builtin class-name"}},[e._v("export")]),e._v(" "),t("span",{pre:!0,attrs:{class:"token assign-left variable"}},[e._v("BTCPAYGEN_ADDITIONAL_FRAGMENTS")]),t("span",{pre:!0,attrs:{class:"token operator"}},[e._v("=")]),t("span",{pre:!0,attrs:{class:"token string"}},[e._v('"'),t("span",{pre:!0,attrs:{class:"token variable"}},[e._v("$BTCPAYGEN_ADDITIONAL_FRAGMENTS")]),e._v(';opt-save-storage.custom"')]),e._v("\n"),t("span",{pre:!0,attrs:{class:"token builtin class-name"}},[e._v(".")]),e._v(" ./btcpay-setup.sh "),t("span",{pre:!0,attrs:{class:"token parameter variable"}},[e._v("-i")]),e._v("\n")])])]),t("h2",{attrs:{id:"can-i-run-btcpay-server-on-ports-other-than-80-and-443"}},[t("a",{staticClass:"header-anchor",attrs:{href:"#can-i-run-btcpay-server-on-ports-other-than-80-and-443"}},[e._v("#")]),e._v(" Can I run BTCPay Server on ports other than 80 and 443?")]),e._v(" "),t("p",[e._v("You can change the ports for HTTP and HTTPS by setting the environment variables "),t("code",[e._v("REVERSEPROXY_HTTP_PORT")]),e._v(" and "),t("code",[e._v("REVERSEPROXY_HTTPS_PORT")]),e._v(". This is handy when ports 80 and 443 are already in use on your host, or you want to offload SSL termination with an existing web proxy.")]),e._v(" "),t("p",[e._v("When you set "),t("code",[e._v("REVERSEPROXY_HTTP_PORT")]),e._v(" to another value than 80, the built-in Let's Encrypt certificate will not work, as Let's Encrypt will try to validate your SSL certificate request by connecting from the internet to your domain on port 80. This validation request should be able to reach BTCPay Server in order to receive the certificate.")]),e._v(" "),t("p",[e._v("If you need to run on a different port, it's best to terminate SSL using another web proxy and forward your traffic.")]),e._v(" "),t("h2",{attrs:{id:"can-i-offload-https-termination"}},[t("a",{staticClass:"header-anchor",attrs:{href:"#can-i-offload-https-termination"}},[e._v("#")]),e._v(" Can I offload HTTPS termination?")]),e._v(" "),t("p",[e._v("Yes. Please "),t("RouterLink",{attrs:{to:"/FAQ/FAQ-Deployment/#can-i-use-an-existing-nginx-server-as-a-reverse-proxy-with-ssl-termination"}},[e._v("see the documentation")]),e._v(".")],1),e._v(" "),t("h2",{attrs:{id:"how-can-i-back-up-my-btcpay-server"}},[t("a",{staticClass:"header-anchor",attrs:{href:"#how-can-i-back-up-my-btcpay-server"}},[e._v("#")]),e._v(" How can I back up my BTCPay Server?")]),e._v(" "),t("p",[e._v("See the "),t("RouterLink",{attrs:{to:"/Docker/backup-restore/"}},[e._v("Backup & Restore")]),e._v(" guide in our documentation.")],1),e._v(" "),t("details",[t("summary",[e._v("For backwards compatibility: Click here for the description of the old backup.sh process")]),e._v(" "),t("div",{staticClass:"custom-block warning"},[t("p",{staticClass:"custom-block-title"},[e._v("WARNING")]),e._v(" "),t("p",[e._v("Please consider switching to the "),t("RouterLink",{attrs:{to:"/Docker/backup-restore/"}},[e._v("new Backup & Restore process")]),e._v(", because the "),t("code",[e._v("backup.sh")]),e._v(" will not be maintained anymore.")],1)]),e._v(" "),t("p",[e._v("We provide a backup script that dumps the database and saves the important files:")]),e._v(" "),t("div",{staticClass:"language-bash extra-class"},[t("pre",{pre:!0,attrs:{class:"language-bash"}},[t("code",[t("span",{pre:!0,attrs:{class:"token builtin class-name"}},[e._v("cd")]),e._v(" "),t("span",{pre:!0,attrs:{class:"token string"}},[e._v('"'),t("span",{pre:!0,attrs:{class:"token variable"}},[e._v("$BTCPAY_BASE_DIRECTORY")]),e._v('/btcpayserver-docker"')]),e._v("\n./backup.sh\n")])])]),t("p",[e._v("This will save the backup locally as "),t("code",[e._v("/var/lib/docker/volumes/backup_datadir/_data/backup.tar.gz")]),e._v(".\nThese are the options to customize the backup name and location:")]),e._v(" "),t("ul",[t("li",[t("code",[e._v("BACKUP_TIMESTAMP=true")]),e._v(" saves the backup with datetime as part of the file name, so that backups do not get overwritten.")]),e._v(" "),t("li",[t("code",[e._v("BACKUP_PROVIDER=SCP")]),e._v(" saves the backup remotely, requires additional "),t("code",[e._v("SCP_TARGET")]),e._v(" environment variable (see below).")]),e._v(" "),t("li",[t("code",[e._v("BACKUP_PROVIDER=Dropbox")]),e._v(" saves the backup to Dropbox, requires additional "),t("code",[e._v("DROPBOX_TOKEN")]),e._v(" environment variable (see below).")])]),e._v(" "),t("div",{staticClass:"language-bash extra-class"},[t("pre",{pre:!0,attrs:{class:"language-bash"}},[t("code",[t("span",{pre:!0,attrs:{class:"token builtin class-name"}},[e._v("cd")]),e._v(" "),t("span",{pre:!0,attrs:{class:"token string"}},[e._v('"'),t("span",{pre:!0,attrs:{class:"token variable"}},[e._v("$BTCPAY_BASE_DIRECTORY")]),e._v('/btcpayserver-docker"')]),e._v("\n\n"),t("span",{pre:!0,attrs:{class:"token comment"}},[e._v("# Backup with custom file name and timestamp:")]),e._v("\n"),t("span",{pre:!0,attrs:{class:"token assign-left variable"}},[e._v("BACKUP_TIMESTAMP")]),t("span",{pre:!0,attrs:{class:"token operator"}},[e._v("=")]),e._v("true ./backup.sh\n\n"),t("span",{pre:!0,attrs:{class:"token comment"}},[e._v("# Backup via SCP:")]),e._v("\n"),t("span",{pre:!0,attrs:{class:"token assign-left variable"}},[e._v("BACKUP_PROVIDER")]),t("span",{pre:!0,attrs:{class:"token operator"}},[e._v("=")]),e._v("SCP "),t("span",{pre:!0,attrs:{class:"token assign-left variable"}},[e._v("SCP_TARGET")]),t("span",{pre:!0,attrs:{class:"token operator"}},[e._v("=")]),e._v("myhost:backups/btcpay ./backup.sh\n\n"),t("span",{pre:!0,attrs:{class:"token comment"}},[e._v("# Backup to Dropbox:")]),e._v("\n"),t("span",{pre:!0,attrs:{class:"token assign-left variable"}},[e._v("BACKUP_PROVIDER")]),t("span",{pre:!0,attrs:{class:"token operator"}},[e._v("=")]),e._v("Dropbox "),t("span",{pre:!0,attrs:{class:"token assign-left variable"}},[e._v("DROPBOX_TOKEN")]),t("span",{pre:!0,attrs:{class:"token operator"}},[e._v("=")]),e._v("myDropboxToken ./backup.sh\n")])])]),t("p",[e._v("You can also choose to only dump the database.\nThis option does not need to stop and restart the docker-containers:")]),e._v(" "),t("div",{staticClass:"language-bash extra-class"},[t("pre",{pre:!0,attrs:{class:"language-bash"}},[t("code",[t("span",{pre:!0,attrs:{class:"token builtin class-name"}},[e._v("cd")]),e._v(" "),t("span",{pre:!0,attrs:{class:"token string"}},[e._v('"'),t("span",{pre:!0,attrs:{class:"token variable"}},[e._v("$BTCPAY_BASE_DIRECTORY")]),e._v('/btcpayserver-docker"')]),e._v("\n./backup.sh --only-db\n")])])])]),e._v(" "),t("h2",{attrs:{id:"how-can-i-connect-to-the-database"}},[t("a",{staticClass:"header-anchor",attrs:{href:"#how-can-i-connect-to-the-database"}},[e._v("#")]),e._v(" How can I connect to the database?")]),e._v(" "),t("p",[e._v("On the server you can open a database session by connecting via "),t("code",[e._v("psql")]),e._v(" as the postgres user:")]),e._v(" "),t("div",{staticClass:"language-bash extra-class"},[t("pre",{pre:!0,attrs:{class:"language-bash"}},[t("code",[t("span",{pre:!0,attrs:{class:"token function"}},[e._v("docker")]),e._v(" "),t("span",{pre:!0,attrs:{class:"token builtin class-name"}},[e._v("exec")]),e._v(" "),t("span",{pre:!0,attrs:{class:"token parameter variable"}},[e._v("-ti")]),e._v(" "),t("span",{pre:!0,attrs:{class:"token variable"}},[t("span",{pre:!0,attrs:{class:"token variable"}},[e._v("$(")]),t("span",{pre:!0,attrs:{class:"token function"}},[e._v("docker")]),e._v(" "),t("span",{pre:!0,attrs:{class:"token function"}},[e._v("ps")]),e._v(" "),t("span",{pre:!0,attrs:{class:"token parameter variable"}},[e._v("-a")]),e._v(" "),t("span",{pre:!0,attrs:{class:"token parameter variable"}},[e._v("-q")]),e._v(" "),t("span",{pre:!0,attrs:{class:"token parameter variable"}},[e._v("-f")]),e._v(" "),t("span",{pre:!0,attrs:{class:"token string"}},[e._v('"name=postgres_1"')]),t("span",{pre:!0,attrs:{class:"token variable"}},[e._v(")")])]),e._v(" psql "),t("span",{pre:!0,attrs:{class:"token parameter variable"}},[e._v("-U")]),e._v(" postgres\n")])])]),t("p",[e._v("Then, inside "),t("code",[e._v("psql")]),e._v(" you can select a database and interact with the tables:")]),e._v(" "),t("div",{staticClass:"language-bash extra-class"},[t("pre",{pre:!0,attrs:{class:"language-bash"}},[t("code",[t("span",{pre:!0,attrs:{class:"token comment"}},[e._v("# list databases")]),e._v("\n"),t("span",{pre:!0,attrs:{class:"token punctuation"}},[e._v("\\")]),e._v("l\n\n"),t("span",{pre:!0,attrs:{class:"token comment"}},[e._v("# connect to database")]),e._v("\n"),t("span",{pre:!0,attrs:{class:"token punctuation"}},[e._v("\\")]),e._v("c btcpayservermainnet\n\n"),t("span",{pre:!0,attrs:{class:"token comment"}},[e._v("# list tables")]),e._v("\n"),t("span",{pre:!0,attrs:{class:"token punctuation"}},[e._v("\\")]),e._v("dt\n\n"),t("span",{pre:!0,attrs:{class:"token comment"}},[e._v("# list users")]),e._v("\nSELECT "),t("span",{pre:!0,attrs:{class:"token string"}},[e._v('"Id"')]),e._v(", "),t("span",{pre:!0,attrs:{class:"token string"}},[e._v('"Email"')]),e._v(" FROM "),t("span",{pre:!0,attrs:{class:"token string"}},[e._v('"AspNetUsers"')]),t("span",{pre:!0,attrs:{class:"token punctuation"}},[e._v(";")]),e._v("\n\n"),t("span",{pre:!0,attrs:{class:"token comment"}},[e._v("# end session")]),e._v("\n"),t("span",{pre:!0,attrs:{class:"token punctuation"}},[e._v("\\")]),e._v("q\n")])])]),t("p",[e._v("The main BTCPay Server database tables are part of the "),t("code",[e._v("public")]),e._v(" schema.\nPlugins have their own schema, named after the plugin.")]),e._v(" "),t("p",[e._v("By default, only the tables of the "),t("code",[e._v("public")]),e._v(" schema are shown.\nIf you want to also see and select the plugin tables, you need to extend the search path:")]),e._v(" "),t("div",{staticClass:"language-bash extra-class"},[t("pre",{pre:!0,attrs:{class:"language-bash"}},[t("code",[t("span",{pre:!0,attrs:{class:"token comment"}},[e._v("# list plugin schemas")]),e._v("\nSELECT * FROM pg_catalog.pg_namespace WHERE nspname LIKE "),t("span",{pre:!0,attrs:{class:"token string"}},[e._v("'BTCPayServer.%'")]),t("span",{pre:!0,attrs:{class:"token punctuation"}},[e._v(";")]),e._v("\n\n"),t("span",{pre:!0,attrs:{class:"token comment"}},[e._v("# extend search path")]),e._v("\nSET search_path TO "),t("span",{pre:!0,attrs:{class:"token string"}},[e._v('"BTCPayServer.Plugins.MyPlugin"')]),e._v(", public"),t("span",{pre:!0,attrs:{class:"token punctuation"}},[e._v(";")]),e._v("\n\n"),t("span",{pre:!0,attrs:{class:"token comment"}},[e._v("# table list now also shows the MyPlugin tables")]),e._v("\n"),t("span",{pre:!0,attrs:{class:"token punctuation"}},[e._v("\\")]),e._v("dt\n")])])]),t("h2",{attrs:{id:"how-do-i-upgrade-my-btcpay-server-docker"}},[t("a",{staticClass:"header-anchor",attrs:{href:"#how-do-i-upgrade-my-btcpay-server-docker"}},[e._v("#")]),e._v(" How do I upgrade my BTCPay Server docker?")]),e._v(" "),t("p",[e._v("Run the script "),t("code",[e._v("./btcpay-update.sh")]),e._v(" and patiently wait for your server to be upgraded.")])])}),[],!1,null,null,null);t.default=n.exports}}]); \ No newline at end of file +(window.webpackJsonp=window.webpackJsonp||[]).push([[130],{782:function(e,t,r){"use strict";r.r(t);var a=r(10),n=Object(a.a)({},(function(){var e=this,t=e._self._c;return t("ContentSlotsDistributor",{attrs:{"slot-key":e.$parent.slotKey}},[t("h1",{attrs:{id:"introduction"}},[t("a",{staticClass:"header-anchor",attrs:{href:"#introduction"}},[e._v("#")]),e._v(" Introduction")]),e._v(" "),t("p",[e._v("While "),t("RouterLink",{attrs:{to:"/LunaNodeWebDeployment/"}},[e._v("our instructions")]),e._v(" cover how to install BTCPayServer in one click on Azure or Lunanode, BTCPay Server is not limited to those options.")],1),e._v(" "),t("p",[e._v("You will find below information about how you can install BTCPay Server easily in any environment having docker available.")]),e._v(" "),t("h1",{attrs:{id:"architecture"}},[t("a",{staticClass:"header-anchor",attrs:{href:"#architecture"}},[e._v("#")]),e._v(" Architecture")]),e._v(" "),t("figure",[t("img",{attrs:{src:"https://github.com/btcpayserver/btcpayserver-doc/raw/master/docs/img/Architecture.png",alt:"Architecture",title:"Architecture"}})]),e._v(" "),t("p",[e._v("As you can see, BTCPay depends on several pieces of infrastructure, mainly:")]),e._v(" "),t("ul",[t("li",[e._v("A lightweight block explorer (NBXplorer),")]),e._v(" "),t("li",[e._v("A database (PostgreSQL),")]),e._v(" "),t("li",[e._v("A full node (eg. Bitcoin Core)")])]),e._v(" "),t("p",[e._v("There can be more dependencies if you support more than just standard Bitcoin transactions, including:")]),e._v(" "),t("ul",[t("li",[t("a",{attrs:{href:"https://github.com/ElementsProject/lightning",target:"_blank",rel:"noopener noreferrer"}},[e._v("Core Lightning (CLN)"),t("OutboundLink")],1)]),e._v(" "),t("li",[t("a",{attrs:{href:"https://github.com/litecoin-project/litecoin",target:"_blank",rel:"noopener noreferrer"}},[e._v("LitecoinD"),t("OutboundLink")],1),e._v(" and other coin daemons")]),e._v(" "),t("li",[e._v("And more...")])]),e._v(" "),t("p",[e._v("Note: The setup process can be time consuming, but is heavily automated to make it a fun and easy experience.")]),e._v(" "),t("p",[e._v("Take a look at how BTCPay works in a video below.")]),e._v(" "),t("a",{staticClass:"ytEmbed",staticStyle:{"background-image":"url(https://img.youtube.com/vi/nr0UNbz3AoQ/hqdefault.jpg)"},attrs:{href:"https://www.youtube.com/watch?v=nr0UNbz3AoQ",title:"YouTube","data-id":"nr0UNbz3AoQ"}},[t("iframe",{attrs:{title:"YouTube","data-src":"https://www.youtube-nocookie.com/embed/nr0UNbz3AoQ?&autoplay=1&autohide=1&modestbranding=1&color=white&rel=0",frameborder:"0",allow:"autoplay;encrypted-media;picture-in-picture",allowfullscreen:""}})]),e._v(" "),t("p",[e._v("Here is a presentation of the global architecture at Advancing Bitcoin conference.")]),e._v(" "),t("a",{staticClass:"ytEmbed",staticStyle:{"background-image":"url(https://img.youtube.com/vi/Up0dvorzSNM/hqdefault.jpg)"},attrs:{href:"https://www.youtube.com/watch?v=Up0dvorzSNM",title:"BTCPay - Architecture overview","data-id":"Up0dvorzSNM"}},[t("iframe",{attrs:{title:"BTCPay - Architecture overview","data-src":"https://www.youtube-nocookie.com/embed/Up0dvorzSNM?&autoplay=1&autohide=1&modestbranding=1&color=white&rel=0",frameborder:"0",allow:"autoplay;encrypted-media;picture-in-picture",allowfullscreen:""}})]),e._v(" "),t("h1",{attrs:{id:"full-installation-for-technical-users"}},[t("a",{staticClass:"header-anchor",attrs:{href:"#full-installation-for-technical-users"}},[e._v("#")]),e._v(" Full installation (for technical users)")]),e._v(" "),t("p",[e._v("You can also install BTCPay Server on your own machine or VPS instance.")]),e._v(" "),t("p",[e._v("The officially supported setup is driven by Docker (and Docker-Compose).")]),e._v(" "),t("p",[e._v("First, make sure you have a domain name pointing to your host "),t("code",[e._v("A record")]),e._v(", with ports "),t("code",[e._v("443")]),e._v(" and "),t("code",[e._v("80")]),e._v(" externally accessible. For Lightning Network, port "),t("code",[e._v("9735")]),e._v(" is required ("),t("code",[e._v("9736")]),e._v(" if you use Litecoin Lightning). Otherwise, you will have to set a domain manually by running "),t("code",[e._v("changedomain.sh")]),e._v(".")]),e._v(" "),t("p",[e._v("Let's assume your domain is "),t("code",[e._v("btcpay.EXAMPLE.com")]),e._v(".")]),e._v(" "),t("p",[e._v("The setup below assumes you want to support Bitcoin, Core Lightning (CLN), HTTPS automatically configured by Nginx. It also enables node pruning, which you can "),t("a",{attrs:{href:"#generated-docker-compose"}},[e._v("modify")]),e._v(" or ignore if you have enough disk space for a full node. Finally, your domain is "),t("code",[e._v("btcpay.EXAMPLE.com")]),e._v(" should reflect your actual domain name.")]),e._v(" "),t("p",[t("a",{attrs:{href:"#environment-variables"}},[e._v("Environment variables")]),e._v(" can be tailored to your needs. Some variables require additional storage space.")]),e._v(" "),t("div",{staticClass:"language-bash extra-class"},[t("pre",{pre:!0,attrs:{class:"language-bash"}},[t("code",[t("span",{pre:!0,attrs:{class:"token comment"}},[e._v("# Login as root")]),e._v("\n"),t("span",{pre:!0,attrs:{class:"token function"}},[e._v("sudo")]),e._v(" "),t("span",{pre:!0,attrs:{class:"token function"}},[e._v("su")]),e._v(" -\n\n"),t("span",{pre:!0,attrs:{class:"token comment"}},[e._v("# Create a folder for BTCPay")]),e._v("\n"),t("span",{pre:!0,attrs:{class:"token function"}},[e._v("mkdir")]),e._v(" BTCPayServer\n"),t("span",{pre:!0,attrs:{class:"token builtin class-name"}},[e._v("cd")]),e._v(" BTCPayServer\n\n"),t("span",{pre:!0,attrs:{class:"token comment"}},[e._v("# Clone this repository")]),e._v("\n"),t("span",{pre:!0,attrs:{class:"token function"}},[e._v("git")]),e._v(" clone https://github.com/btcpayserver/btcpayserver-docker\n"),t("span",{pre:!0,attrs:{class:"token builtin class-name"}},[e._v("cd")]),e._v(" btcpayserver-docker\n\n"),t("span",{pre:!0,attrs:{class:"token comment"}},[e._v("# Run btcpay-setup.sh with the right parameters")]),e._v("\n"),t("span",{pre:!0,attrs:{class:"token builtin class-name"}},[e._v("export")]),e._v(" "),t("span",{pre:!0,attrs:{class:"token assign-left variable"}},[e._v("BTCPAY_HOST")]),t("span",{pre:!0,attrs:{class:"token operator"}},[e._v("=")]),t("span",{pre:!0,attrs:{class:"token string"}},[e._v('"btcpay.EXAMPLE.com"')]),e._v("\n"),t("span",{pre:!0,attrs:{class:"token builtin class-name"}},[e._v("export")]),e._v(" "),t("span",{pre:!0,attrs:{class:"token assign-left variable"}},[e._v("NBITCOIN_NETWORK")]),t("span",{pre:!0,attrs:{class:"token operator"}},[e._v("=")]),t("span",{pre:!0,attrs:{class:"token string"}},[e._v('"mainnet"')]),e._v("\n"),t("span",{pre:!0,attrs:{class:"token builtin class-name"}},[e._v("export")]),e._v(" "),t("span",{pre:!0,attrs:{class:"token assign-left variable"}},[e._v("BTCPAYGEN_CRYPTO1")]),t("span",{pre:!0,attrs:{class:"token operator"}},[e._v("=")]),t("span",{pre:!0,attrs:{class:"token string"}},[e._v('"btc"')]),e._v("\n"),t("span",{pre:!0,attrs:{class:"token builtin class-name"}},[e._v("export")]),e._v(" "),t("span",{pre:!0,attrs:{class:"token assign-left variable"}},[e._v("BTCPAYGEN_ADDITIONAL_FRAGMENTS")]),t("span",{pre:!0,attrs:{class:"token operator"}},[e._v("=")]),t("span",{pre:!0,attrs:{class:"token string"}},[e._v('"opt-save-storage-s"')]),e._v("\n"),t("span",{pre:!0,attrs:{class:"token builtin class-name"}},[e._v("export")]),e._v(" "),t("span",{pre:!0,attrs:{class:"token assign-left variable"}},[e._v("BTCPAYGEN_REVERSEPROXY")]),t("span",{pre:!0,attrs:{class:"token operator"}},[e._v("=")]),t("span",{pre:!0,attrs:{class:"token string"}},[e._v('"nginx"')]),e._v("\n"),t("span",{pre:!0,attrs:{class:"token builtin class-name"}},[e._v("export")]),e._v(" "),t("span",{pre:!0,attrs:{class:"token assign-left variable"}},[e._v("BTCPAYGEN_LIGHTNING")]),t("span",{pre:!0,attrs:{class:"token operator"}},[e._v("=")]),t("span",{pre:!0,attrs:{class:"token string"}},[e._v('"clightning"')]),e._v("\n"),t("span",{pre:!0,attrs:{class:"token builtin class-name"}},[e._v("export")]),e._v(" "),t("span",{pre:!0,attrs:{class:"token assign-left variable"}},[e._v("BTCPAY_ENABLE_SSH")]),t("span",{pre:!0,attrs:{class:"token operator"}},[e._v("=")]),e._v("true\n"),t("span",{pre:!0,attrs:{class:"token builtin class-name"}},[e._v(".")]),e._v(" ./btcpay-setup.sh "),t("span",{pre:!0,attrs:{class:"token parameter variable"}},[e._v("-i")]),e._v("\n\n"),t("span",{pre:!0,attrs:{class:"token builtin class-name"}},[e._v("exit")]),e._v("\n")])])]),t("p",[t("code",[e._v("btcpay-setup.sh")]),e._v(" will then:")]),e._v(" "),t("ul",[t("li",[e._v("Install Docker")]),e._v(" "),t("li",[e._v("Install Docker-Compose")]),e._v(" "),t("li",[e._v("Make sure BTCPay starts at reboot via upstart or systemd")]),e._v(" "),t("li",[e._v("Setup environment variables to use BTCPay utilities")]),e._v(" "),t("li",[e._v("Add BTCPay utilities in /usr/bin")]),e._v(" "),t("li",[e._v("Start BTCPay Server")])]),e._v(" "),t("p",[e._v("Video below guides you step by step on how to set up BTCPay Server on a VPS with Docker.")]),e._v(" "),t("a",{staticClass:"ytEmbed",staticStyle:{"background-image":"url(https://img.youtube.com/vi/x6hqTFgHqhA/hqdefault.jpg)"},attrs:{href:"https://www.youtube.com/watch?v=x6hqTFgHqhA",title:"YouTube","data-id":"x6hqTFgHqhA"}},[t("iframe",{attrs:{title:"YouTube","data-src":"https://www.youtube-nocookie.com/embed/x6hqTFgHqhA?&autoplay=1&autohide=1&modestbranding=1&color=white&rel=0",frameborder:"0",allow:"autoplay;encrypted-media;picture-in-picture",allowfullscreen:""}})]),e._v(" "),t("p",[e._v("Check out this video if you're interested in learning more about setting up "),t("a",{attrs:{href:"https://www.youtube.com/playlist?list=PLH4m2oS2ratfaprAFx9E3ZDjwxNKvCk4e",target:"_blank",rel:"noopener noreferrer"}},[e._v("BTCPay with Docker Compose"),t("OutboundLink")],1),e._v(".")]),e._v(" "),t("figure",[t("a",{attrs:{href:"https://hub.docker.com/r/btcpayserver/btcpayserver/",target:"_blank",rel:"noopener noreferrer"}},[t("img",{attrs:{src:"https://img.shields.io/docker/automated/btcpayserver/btcpayserver.svg",alt:"Docker automated build",title:"Docker automated build"}}),t("OutboundLink")],1)]),e._v(" "),t("h1",{attrs:{id:"environment-variables"}},[t("a",{staticClass:"header-anchor",attrs:{href:"#environment-variables"}},[e._v("#")]),e._v(" Environment variables")]),e._v(" "),t("p",[t("code",[e._v("btcpay-setup.sh")]),e._v(" will use the following environment variables:")]),e._v(" "),t("ul",[t("li",[t("code",[e._v("BTCPAY_HOST")]),e._v(": The hostname of your website (eg. "),t("code",[e._v("btcpay.example.com")]),e._v(")")]),e._v(" "),t("li",[t("code",[e._v("BTCPAY_ADDITIONAL_HOSTS")]),e._v(": Optional, specify additional domains to your BTCPayServer with https support if enabled. (eg. example2.com,example3.com)")]),e._v(" "),t("li",[t("code",[e._v("REVERSEPROXY_HTTP_PORT")]),e._v(": The public port the reverse proxy binds to for HTTP traffic (default: 80)")]),e._v(" "),t("li",[t("code",[e._v("REVERSEPROXY_HTTPS_PORT")]),e._v(": The public port the reverse proxy binds to for HTTPS traffic (default: 443)")]),e._v(" "),t("li",[t("code",[e._v("REVERSEPROXY_DEFAULT_HOST")]),e._v(": Optional, if using a reverse proxy nginx, specify which website should be presented if the server is accessed by its IP or by an unrecognized domain name.")]),e._v(" "),t("li",[t("code",[e._v("NOREVERSEPROXY_HTTP_PORT")]),e._v(": Optional, if not using a reverse proxy, specify which port should be opened for HTTP traffic. (default: 80)")]),e._v(" "),t("li",[t("code",[e._v("NBITCOIN_NETWORK")]),e._v(": The type of network to use (eg. "),t("code",[e._v("mainnet")]),e._v(", "),t("code",[e._v("testnet")]),e._v(", or "),t("code",[e._v("regtest")]),e._v(". Default: "),t("code",[e._v("mainnet")]),e._v(")")]),e._v(" "),t("li",[t("code",[e._v("LIGHTNING_ALIAS")]),e._v(": An alias for your lightning network node, if used")]),e._v(" "),t("li",[t("code",[e._v("BTCPAYGEN_CRYPTO1")]),e._v(": First supported crypto currency (eg. "),t("code",[e._v("btc")]),e._v(", "),t("code",[e._v("ltc")]),e._v(". Default: "),t("code",[e._v("btc")]),e._v(")")]),e._v(" "),t("li",[t("code",[e._v("BTCPAYGEN_CRYPTO2")]),e._v(": Second supported crypto currency (eg. "),t("code",[e._v("btc")]),e._v(", "),t("code",[e._v("ltc")]),e._v(". Default: "),t("code",[e._v("(empty)")]),e._v(")")]),e._v(" "),t("li",[t("code",[e._v("BTCPAYGEN_CRYPTON")]),e._v(": N'th supported crypto currency where N is 9 at maximum. (eg. "),t("code",[e._v("btc")]),e._v(", "),t("code",[e._v("ltc")]),e._v(". Default: "),t("code",[e._v("(empty)")]),e._v(")")]),e._v(" "),t("li",[t("code",[e._v("BTCPAYGEN_REVERSEPROXY")]),e._v(": Specify reverse proxy to use; NGinx has HTTPS support. (eg. "),t("code",[e._v("nginx")]),e._v(", "),t("code",[e._v("traefik")]),e._v(", "),t("code",[e._v("(empty)")]),e._v(". Default: "),t("code",[e._v("nginx")]),e._v(")")]),e._v(" "),t("li",[t("code",[e._v("BTCPAYGEN_LIGHTNING")]),e._v(": Lightning network implementation to use (eg. "),t("code",[e._v("clightning")]),e._v(", "),t("code",[e._v("lnd")]),e._v(", Default: "),t("code",[e._v("(empty)")]),e._v(")")]),e._v(" "),t("li",[t("code",[e._v("BTCPAYGEN_SUBNAME")]),e._v(": The subname of the generated docker-compose file, where the full name is "),t("code",[e._v("Generated/docker-compose.SUBNAME.yml")]),e._v(" (Default: "),t("code",[e._v("generated")]),e._v(")")]),e._v(" "),t("li",[t("code",[e._v("BTCPAYGEN_ADDITIONAL_FRAGMENTS")]),e._v(": Semicolon-separated list of additional fragments you want to use (eg. "),t("code",[e._v("opt-save-storage")]),e._v(")")]),e._v(" "),t("li",[t("code",[e._v("LETSENCRYPT_EMAIL")]),e._v(": An email will be sent to this address if certificate expires and fails to renew automatically (eg. "),t("code",[e._v("me@example.com")]),e._v(")")]),e._v(" "),t("li",[t("code",[e._v("ACME_CA_URI")]),e._v(": The API endpoint to ask for HTTPS certificate (Default: "),t("code",[e._v("production")]),e._v(")")]),e._v(" "),t("li",[t("code",[e._v("BTCPAY_ENABLE_SSH")]),e._v(": Optional, gives BTCPay Server SSH access to the host by allowing it to edit authorized_keys of the host, it can be used for managing the authorized_keys or updating BTCPay Server directly through the website. (Default: false)")]),e._v(" "),t("li",[t("code",[e._v("BTCPAYGEN_DOCKER_IMAGE")]),e._v(": Optional, Specify which generator image to use if you have customized the C# generator. Set to "),t("code",[e._v("btcpayserver/docker-compose-generator:local")]),e._v(" to build the generator locally at runtime.")]),e._v(" "),t("li",[t("code",[e._v("BTCPAY_IMAGE")]),e._v(": Optional, Specify which btcpayserver image to use if you have a customized btcpayserver.")]),e._v(" "),t("li",[t("code",[e._v("BTCPAYGEN_EXCLUDE_FRAGMENTS")]),e._v(": Semicolon-separated list of fragments you want to forcefully exclude (eg. "),t("code",[e._v("litecoin-clightning")]),e._v(")")]),e._v(" "),t("li",[t("code",[e._v("TOR_RELAY_NICKNAME")]),e._v(": If tor relay is activated with opt-add-tor-relay, the relay nickname")]),e._v(" "),t("li",[t("code",[e._v("TOR_RELAY_EMAIL")]),e._v(": If tor relay is activated with opt-add-tor-relay, the email for Tor to contact you regarding your relay")])]),e._v(" "),t("p",[e._v("Additionally, there are specific environment variables for some addons:")]),e._v(" "),t("ul",[t("li",[t("code",[e._v("LIBREPATRON_HOST")]),e._v(": If libre patron is activated with "),t("a",{attrs:{href:"https://github.com/btcpayserver/btcpayserver-docker/blob/master/docker-compose-generator/docker-fragments/opt-add-librepatron.yml",target:"_blank",rel:"noopener noreferrer"}},[e._v("opt-add-librepatron"),t("OutboundLink")],1),e._v(", the hostname of your libre patron website (eg. "),t("code",[e._v("librepatron.example.com")]),e._v(")")]),e._v(" "),t("li",[t("code",[e._v("ZAMMAD_HOST")]),e._v(": If zammad is activated with "),t("a",{attrs:{href:"https://github.com/btcpayserver/btcpayserver-docker/blob/master/docker-compose-generator/docker-fragments/opt-add-zammad.yml",target:"_blank",rel:"noopener noreferrer"}},[e._v("opt-add-zammad"),t("OutboundLink")],1),e._v(", the hostname of your zammad website (eg. "),t("code",[e._v("zammad.example.com")]),e._v(")")]),e._v(" "),t("li",[t("code",[e._v("WOOCOMMERCE_HOST")]),e._v(": If woocommerce is activated with "),t("a",{attrs:{href:"https://github.com/btcpayserver/btcpayserver-docker/blob/master/docker-compose-generator/docker-fragments/opt-add-woocommerce.yml",target:"_blank",rel:"noopener noreferrer"}},[e._v("opt-add-woocommerce"),t("OutboundLink")],1),e._v(", the hostname of your woocommerce website (eg. "),t("code",[e._v("store.example.com")]),e._v(")")]),e._v(" "),t("li",[t("code",[e._v("EPS_XPUB")]),e._v(": If Electrum Personal Server (EPS) is activated with "),t("a",{attrs:{href:"https://github.com/btcpayserver/btcpayserver-docker/blob/master/docker-compose-generator/docker-fragments/opt-add-electrum-ps.yml",target:"_blank",rel:"noopener noreferrer"}},[e._v("opt-add-electrum-ps"),t("OutboundLink")],1),e._v(", you must set the Extended Public Key (XPUB, YPUB or ZPUB) of the wallet you want to use, before first run of the EPS server. If you accidentally start EPS without this, it will not work properly as the model of EPS is to monitor only specified wallets.")]),e._v(" "),t("li",[e._v("If Bitcoin Wallet Tracker is activated with "),t("a",{attrs:{href:"https://github.com/btcpayserver/btcpayserver-docker/blob/master/docker-compose-generator/docker-fragments/opt-add-bwt.yml",target:"_blank",rel:"noopener noreferrer"}},[e._v("opt-add-bwt"),t("OutboundLink")],1),e._v(", you can use "),t("code",[e._v("BWT_XPUB")]),e._v("/"),t("code",[e._v("BWT_XPUB_*")]),e._v(" (to set your XPUB/YPUB/ZPUB), "),t("code",[e._v("BWT_DESCRIPTOR")]),e._v("/"),t("code",[e._v("BWT_DESCRIPTOR_*")]),e._v(" (for script descriptors), "),t("code",[e._v("BWT_RESCAN_SINCE")]),e._v(" (set to the wallet creation date in YYYY-MM-DD to speed up the rescan), "),t("code",[e._v("BWT_BITCOIND_WALLET")]),e._v(" and "),t("code",[e._v("BWT_GAP_LIMIT")]),e._v(".")]),e._v(" "),t("li",[t("code",[e._v("LND_WTCLIENT_SWEEP_FEE")]),e._v(": If LND watchtower is activated with "),t("a",{attrs:{href:"https://github.com/btcpayserver/btcpayserver-docker/blob/master/docker-compose-generator/docker-fragments/opt-lnd-wtclient.yml",target:"_blank",rel:"noopener noreferrer"}},[e._v("opt-lnd-wtclient"),t("OutboundLink")],1),e._v(", you can use "),t("code",[e._v("LND_WTCLIENT_SWEEP_FEE")]),e._v(" to change the sweep fee used in constructing the justice transaction (default is 10 sat/byte)")]),e._v(" "),t("li",[t("code",[e._v("FIREFLY_HOST")]),e._v(": If fireflyiii is activated with "),t("a",{attrs:{href:"https://github.com/btcpayserver/btcpayserver-docker/blob/master/docker-compose-generator/docker-fragments/opt-add-fireflyiii.yml",target:"_blank",rel:"noopener noreferrer"}},[e._v("opt-add-fireflyiii"),t("OutboundLink")],1),e._v(", the hostname of your fireflyiii website (eg. "),t("code",[e._v("firefly.example.com")]),e._v(")")]),e._v(" "),t("li",[t("code",[e._v("CLOUDFLARE_TUNNEL_TOKEN")]),e._v(": Used to expose your instance to clearnet with a Cloudflare Argo Tunnel (if cloudflare tunnel is activated with "),t("a",{attrs:{href:"https://github.com/btcpayserver/btcpayserver-docker/blob/master/docker-compose-generator/docker-fragments/opt-add-cloudflared.yml",target:"_blank",rel:"noopener noreferrer"}},[e._v("opt-add-cloudflared"),t("OutboundLink")],1),e._v(", for setup instructions "),t("RouterLink",{attrs:{to:"/Docker/cloudflare-tunnel/"}},[e._v("see documentation")]),e._v(")")],1)]),e._v(" "),t("h1",{attrs:{id:"tooling"}},[t("a",{staticClass:"header-anchor",attrs:{href:"#tooling"}},[e._v("#")]),e._v(" Tooling")]),e._v(" "),t("p",[e._v("A wide variety of useful scripts are available once BTCPay is installed:")]),e._v(" "),t("ul",[t("li",[t("code",[e._v("bitcoin-cli.sh")]),e._v(": Access your Bitcoin node instance (for RPC)")]),e._v(" "),t("li",[t("code",[e._v("bitcoin-lightning-cli.sh")]),e._v(": Access your CLN node instance (for RPC)")]),e._v(" "),t("li",[t("code",[e._v("changedomain.sh")]),e._v(": Change the domain of your BTCPayServer (remember to disable 2FA/U2F first, as you risk being unable to log in to your account)")]),e._v(" "),t("li",[t("code",[e._v("btcpay-update.sh")]),e._v(": Update BTCPayServer to the latest version")]),e._v(" "),t("li",[t("code",[e._v("btcpay-up.sh")]),e._v(": Run "),t("code",[e._v("docker-compose up")])]),e._v(" "),t("li",[t("code",[e._v("btcpay-down.sh")]),e._v(": Run "),t("code",[e._v("docker-compose down")])]),e._v(" "),t("li",[t("code",[e._v("btcpay-setup.sh")]),e._v(": Change the settings of your server")]),e._v(" "),t("li",[t("code",[e._v("btcpay-clean.sh")]),e._v(": Purge any unused docker images")]),e._v(" "),t("li",[t("code",[e._v(". ./btcpay-setup.sh")]),e._v(": Information about additional parameters")]),e._v(" "),t("li",[t("code",[e._v(". ./btcpay-setup.sh -i")]),e._v(": Set up your BTCPayServer")]),e._v(" "),t("li",[t("code",[e._v("btcpay-restart.sh")]),e._v(": Restart your BTCPayServer")])]),e._v(" "),t("h1",{attrs:{id:"under-the-hood"}},[t("a",{staticClass:"header-anchor",attrs:{href:"#under-the-hood"}},[e._v("#")]),e._v(" Under the hood")]),e._v(" "),t("h2",{attrs:{id:"generated-docker-compose"}},[t("a",{staticClass:"header-anchor",attrs:{href:"#generated-docker-compose"}},[e._v("#")]),e._v(" Generated docker-compose")]),e._v(" "),t("p",[e._v("When you run "),t("code",[e._v("btcpay-setup.sh")]),e._v(", your environment variables are used by "),t("a",{attrs:{href:"https://github.com/btcpayserver/btcpayserver-docker/blob/master/build.sh",target:"_blank",rel:"noopener noreferrer"}},[e._v("build.sh"),t("OutboundLink")],1),e._v(" (or "),t("a",{attrs:{href:"https://github.com/btcpayserver/btcpayserver-docker/blob/master/build.ps1",target:"_blank",rel:"noopener noreferrer"}},[e._v("build.ps1"),t("OutboundLink")],1),e._v(") to generate a docker-compose adapted for your needs. For the full list of options, see: "),t("a",{attrs:{href:"#environment-variables"}},[e._v("Environment variables")])]),e._v(" "),t("p",[e._v("By default, the generated file is "),t("code",[e._v("Generated/docker-compose.generated.yml")]),e._v(", constructed from the relevant "),t("a",{attrs:{href:"https://github.com/btcpayserver/btcpayserver-docker/blob/master/docker-compose-generator/docker-fragments",target:"_blank",rel:"noopener noreferrer"}},[e._v("Docker fragments"),t("OutboundLink")],1),e._v(" for your setup.")]),e._v(" "),t("p",[e._v("Available "),t("code",[e._v("BTCPAYGEN_ADDITIONAL_FRAGMENTS")]),e._v(" currently are:")]),e._v(" "),t("ul",[t("li",[t("a",{attrs:{href:"https://github.com/btcpayserver/btcpayserver-docker/blob/master/docker-compose-generator/docker-fragments/opt-save-storage.yml",target:"_blank",rel:"noopener noreferrer"}},[e._v("opt-save-storage"),t("OutboundLink")],1),e._v(" will keep around 1 year of blocks (prune BTC for 100 GB)")]),e._v(" "),t("li",[t("a",{attrs:{href:"https://github.com/btcpayserver/btcpayserver-docker/blob/master/docker-compose-generator/docker-fragments/opt-save-storage-s.yml",target:"_blank",rel:"noopener noreferrer"}},[e._v("opt-save-storage-s"),t("OutboundLink")],1),e._v(" will keep around 6 months of blocks (prune BTC for 50 GB)")]),e._v(" "),t("li",[t("a",{attrs:{href:"https://github.com/btcpayserver/btcpayserver-docker/blob/master/docker-compose-generator/docker-fragments/opt-save-storage-xs.yml",target:"_blank",rel:"noopener noreferrer"}},[e._v("opt-save-storage-xs"),t("OutboundLink")],1),e._v(" will keep around 3 months of blocks (prune BTC for 25 GB)")]),e._v(" "),t("li",[t("a",{attrs:{href:"https://github.com/btcpayserver/btcpayserver-docker/blob/master/docker-compose-generator/docker-fragments/opt-save-storage-xxs.yml",target:"_blank",rel:"noopener noreferrer"}},[e._v("opt-save-storage-xxs"),t("OutboundLink")],1),e._v(" will keep around 2 weeks of blocks (prune BTC for 5 GB) (lightning not supported)")]),e._v(" "),t("li",[t("a",{attrs:{href:"https://github.com/btcpayserver/btcpayserver-docker/blob/master/docker-compose-generator/docker-fragments/opt-lnd-autocompact.yml",target:"_blank",rel:"noopener noreferrer"}},[e._v("opt-lnd-autocompact"),t("OutboundLink")],1),e._v(" will activate auto compacting of LND database.")]),e._v(" "),t("li",[t("a",{attrs:{href:"https://github.com/btcpayserver/btcpayserver-docker/blob/master/docker-compose-generator/docker-fragments/opt-lnd-autopilot.yml",target:"_blank",rel:"noopener noreferrer"}},[e._v("opt-lnd-autopilot"),t("OutboundLink")],1),e._v(" will activate auto pilot on LND. (5 channels, 60% of allocation)")]),e._v(" "),t("li",[t("a",{attrs:{href:"https://github.com/btcpayserver/btcpayserver-docker/blob/master/docker-compose-generator/docker-fragments/opt-lnd-keysend.yml",target:"_blank",rel:"noopener noreferrer"}},[e._v("opt-lnd-keysend"),t("OutboundLink")],1),e._v(" will activate keysend on LND.")]),e._v(" "),t("li",[t("a",{attrs:{href:"https://github.com/btcpayserver/btcpayserver-docker/blob/master/docker-compose-generator/docker-fragments/opt-lnd-wtclient.yml",target:"_blank",rel:"noopener noreferrer"}},[e._v("opt-lnd-wtclient"),t("OutboundLink")],1),e._v(" will activate the watchtower client on LND. "),t("code",[e._v("LND_WTCLIENT_SWEEP_FEE")]),e._v(" can be used to override the default 10 sat/byte justice transaction fee")]),e._v(" "),t("li",[t("a",{attrs:{href:"https://github.com/btcpayserver/btcpayserver-docker/blob/master/docker-compose-generator/docker-fragments/opt-lnd-watchtower.yml",target:"_blank",rel:"noopener noreferrer"}},[e._v("opt-lnd-watchtower"),t("OutboundLink")],1),e._v(" will activate the LND watchtower RPC")]),e._v(" "),t("li",[t("a",{attrs:{href:"https://github.com/btcpayserver/btcpayserver-docker/blob/master/docker-compose-generator/docker-fragments/opt-save-memory.yml",target:"_blank",rel:"noopener noreferrer"}},[e._v("opt-save-memory"),t("OutboundLink")],1),e._v(" will decrease the default dbcache at the expense of longer synchronization time. (Useful if your machine is less than 2GB)")]),e._v(" "),t("li",[t("a",{attrs:{href:"https://github.com/btcpayserver/btcpayserver-docker/blob/master/docker-compose-generator/docker-fragments/opt-more-memory.yml",target:"_blank",rel:"noopener noreferrer"}},[e._v("opt-more-memory"),t("OutboundLink")],1),e._v(" will increase the default dbcache to make synchronization faster (Useful if your machine is has around 4GB)")]),e._v(" "),t("li",[t("a",{attrs:{href:"https://github.com/btcpayserver/btcpayserver-docker/blob/master/docker-compose-generator/docker-fragments/opt-add-btcqbo.yml",target:"_blank",rel:"noopener noreferrer"}},[e._v("opt-add-btcqbo"),t("OutboundLink")],1),e._v(" will allow you to create an invoice on Quickbooks which include a way for your customer to pay on BTCPay Server (More information on this "),t("a",{attrs:{href:"https://github.com/JeffVandrewJr/btcqbo/",target:"_blank",rel:"noopener noreferrer"}},[e._v("github repository"),t("OutboundLink")],1),e._v(", this add-on is maintained by "),t("a",{attrs:{href:"https://github.com/JeffVandrewJr",target:"_blank",rel:"noopener noreferrer"}},[e._v("JeffVandrewJr"),t("OutboundLink")],1),e._v(", see more on "),t("a",{attrs:{href:"https://www.youtube.com/watch?v=srgwL9ozg6c",target:"_blank",rel:"noopener noreferrer"}},[e._v("this video"),t("OutboundLink")],1),e._v(")")]),e._v(" "),t("li",[t("a",{attrs:{href:"https://github.com/btcpayserver/btcpayserver-docker/blob/master/docker-compose-generator/docker-fragments/opt-add-librepatron.yml",target:"_blank",rel:"noopener noreferrer"}},[e._v("opt-add-librepatron"),t("OutboundLink")],1),e._v(", for a self-hosted Patreon alternative backed by BTCPay (More information on this "),t("a",{attrs:{href:"https://github.com/JeffVandrewJr/patron",target:"_blank",rel:"noopener noreferrer"}},[e._v("github repository"),t("OutboundLink")],1),e._v(", this add-on is maintained by "),t("a",{attrs:{href:"https://github.com/JeffVandrewJr",target:"_blank",rel:"noopener noreferrer"}},[e._v("JeffVandrewJr"),t("OutboundLink")],1),e._v(".")]),e._v(" "),t("li",[t("a",{attrs:{href:"https://github.com/btcpayserver/btcpayserver-docker/blob/master/docker-compose-generator/docker-fragments/opt-add-woocommerce.yml",target:"_blank",rel:"noopener noreferrer"}},[e._v("opt-add-woocommerce"),t("OutboundLink")],1),e._v(", for a self-hosted woocommerce with BTCPay Server plugin pre installed.")]),e._v(" "),t("li",[t("a",{attrs:{href:"https://github.com/btcpayserver/btcpayserver-docker/blob/master/docker-compose-generator/docker-fragments/opt-add-tor.yml",target:"_blank",rel:"noopener noreferrer"}},[e._v("opt-add-tor"),t("OutboundLink")],1),e._v(", for exposing BTCPayServer, Woocommerce, your lightning nodes as hidden services and accept onion peers for your full node. Warning: This options is for working around NAT and firewall problems as well as to help protect your customer's privacy. This will not protect your privacy against a targeted attack against you.")]),e._v(" "),t("li",[t("a",{attrs:{href:"https://github.com/btcpayserver/btcpayserver-docker/blob/master/docker-compose-generator/docker-fragments/opt-add-btctransmuter.yml",target:"_blank",rel:"noopener noreferrer"}},[e._v("opt-add-btctransmuter"),t("OutboundLink")],1),e._v(", for a self-hosted IFTTT style service for crypto services such as fiat settlement. (More information on this "),t("a",{attrs:{href:"https://github.com/btcpayserver/btcTransmuter/",target:"_blank",rel:"noopener noreferrer"}},[e._v("github repository"),t("OutboundLink")],1)]),e._v(" "),t("li",[t("a",{attrs:{href:"https://github.com/btcpayserver/btcpayserver-docker/blob/master/docker-compose-generator/docker-fragments/opt-txindex.yml",target:"_blank",rel:"noopener noreferrer"}},[e._v("opt-txindex"),t("OutboundLink")],1),e._v(", to enable txindex=1 in bitcoin.conf if you require txindexing for Bisq, DOJO, etc.")]),e._v(" "),t("li",[t("a",{attrs:{href:"https://github.com/btcpayserver/btcpayserver-docker/blob/master/docker-compose-generator/docker-fragments/opt-expose-unsafe.yml",target:"_blank",rel:"noopener noreferrer"}},[e._v("opt-expose-unsafe"),t("OutboundLink")],1),e._v(", to unsafely expose bitcoind P2P port 8333 if you require P2P for Bisq, DOJO, Esplora, etc. WARNING: ONLY USE ON TRUSTED LAN OR WITH FIREWALL RULES WHITELISTING SPECIFIC HOSTS")]),e._v(" "),t("li",[t("a",{attrs:{href:"https://github.com/btcpayserver/btcpayserver-docker/blob/master/docker-compose-generator/docker-fragments/opt-add-tor-relay.yml",target:"_blank",rel:"noopener noreferrer"}},[e._v("opt-add-tor-relay"),t("OutboundLink")],1),e._v(", for a non-exit tor relay. Make sure to have port 9001 accessible externally. "),t("a",{attrs:{href:"https://community.torproject.org/relay/community-resources/eff-tor-legal-faq",target:"_blank",rel:"noopener noreferrer"}},[e._v("Please read the legal implications of running a tor relay"),t("OutboundLink")],1),e._v(" and "),t("a",{attrs:{href:"https://trac.torproject.org/projects/tor/wiki/TorRelayGuide#RelayRequirements",target:"_blank",rel:"noopener noreferrer"}},[e._v("what resources are used to operate the relay"),t("OutboundLink")],1),e._v(".")]),e._v(" "),t("li",[t("a",{attrs:{href:"https://github.com/btcpayserver/btcpayserver-docker/blob/master/docker-compose-generator/docker-fragments/opt-add-electrumx.yml",target:"_blank",rel:"noopener noreferrer"}},[e._v("opt-add-electrumx"),t("OutboundLink")],1),e._v(", to integrate a full ElectrumX server (from official source) with BTCPay, using the BTCPay server's full bitcoin node for complete privacy when using your own Electrum wallet. You can also open port 50002 up to the internet on your router etc, to be part of the ElectrumX network, helping other Electrum wallet users to get connected. The bitcoin option "),t("code",[e._v("-txindex")]),e._v(" is mandatory for ElectrumX, and this fragment will enable it on your BTCPay server automatically - No need to use the fragment opt-txindex.yml.")]),e._v(" "),t("li",[t("a",{attrs:{href:"https://github.com/btcpayserver/btcpayserver-docker/blob/master/docker-compose-generator/docker-fragments/opt-add-electrum-ps.yml",target:"_blank",rel:"noopener noreferrer"}},[e._v("opt-add-electrum-ps"),t("OutboundLink")],1),e._v(", to integrate Electrum Personal Server (EPS) with BTCPay (EPS is a single-user alternative to the ElectrumX Server option above). EPS will also use the BTCPay server's full bitcoin node for complete privacy when using your own Electrum wallet, for your own personal use (i.e. other users cannot use your server to verify transactions). Also, the bitcoin option "),t("code",[e._v("-txindex")]),e._v(" is NOT mandatory for EPS, and it will run on a pruned node (unlike ElectrumX). You will need to add your XPUB/YPUB/ZPUB as environment variable "),t("code",[e._v("EPS_XPUB")]),e._v(" before enabling EPS for the first time (see above section on environment variables, and see "),t("RouterLink",{attrs:{to:"/ElectrumPersonalServer/"}},[e._v("full documentation")]),e._v(" for details).")],1),e._v(" "),t("li",[t("a",{attrs:{href:"https://github.com/btcpayserver/btcpayserver-docker/blob/master/docker-compose-generator/docker-fragments/opt-add-bwt.yml",target:"_blank",rel:"noopener noreferrer"}},[e._v("opt-add-electrum-bwt"),t("OutboundLink")],1),e._v(", to integrate the "),t("a",{attrs:{href:"https://github.com/bwt-dev/bwt",target:"_blank",rel:"noopener noreferrer"}},[e._v("Bitcoin Wallet Tracker"),t("OutboundLink")],1),e._v(" Electrum server, which uses a personal wallet index model similar to that of EPS. You will need to set "),t("code",[e._v("BWT_XPUB")]),e._v(" with your XPUB/YPUB/ZPUB (see environment variables section). The server will only be available locally and through an onion service.")]),e._v(" "),t("li",[t("a",{attrs:{href:"https://github.com/btcpayserver/btcpayserver-docker/blob/master/docker-compose-generator/docker-fragments/opt-add-configurator.yml",target:"_blank",rel:"noopener noreferrer"}},[e._v("opt-add-configurator"),t("OutboundLink")],1),e._v(", to integrate the "),t("a",{attrs:{href:"https://install.btcpayserver.org",target:"_blank",rel:"noopener noreferrer"}},[e._v("BTCPay Server Configurator"),t("OutboundLink")],1),e._v(" to manage your BTCPay deployment through a UI, and to allow new deployments elsewhere easily.")]),e._v(" "),t("li",[t("a",{attrs:{href:"https://github.com/btcpayserver/btcpayserver-docker/blob/master/docker-compose-generator/docker-fragments/opt-add-pihole.yml",target:"_blank",rel:"noopener noreferrer"}},[e._v("opt-add-pihole"),t("OutboundLink")],1),e._v(" ("),t("RouterLink",{attrs:{to:"/Docker/pihole/"}},[e._v("See the documentation")]),e._v(")")],1),e._v(" "),t("li",[t("a",{attrs:{href:"https://github.com/btcpayserver/btcpayserver-docker/blob/master/docker-compose-generator/docker-fragments/opt-add-ndlc.yml",target:"_blank",rel:"noopener noreferrer"}},[e._v("opt-add-ndlc"),t("OutboundLink")],1),e._v(" ("),t("RouterLink",{attrs:{to:"/Docker/ndlc/"}},[e._v("See the documentation")]),e._v(")")],1),e._v(" "),t("li",[t("a",{attrs:{href:"https://github.com/btcpayserver/btcpayserver-docker/blob/master/docker-compose-generator/docker-fragments/opt-add-lightning-terminal.yml",target:"_blank",rel:"noopener noreferrer"}},[e._v("opt-add-lightning-terminal"),t("OutboundLink")],1),e._v(" for "),t("a",{attrs:{href:"https://github.com/lightninglabs/lightning-terminal",target:"_blank",rel:"noopener noreferrer"}},[e._v("Lightning Terminal/LiT"),t("OutboundLink")],1),e._v(". Maintained by "),t("a",{attrs:{href:"https://github.com/dennisreimann",target:"_blank",rel:"noopener noreferrer"}},[e._v("dennisreimann"),t("OutboundLink")],1),e._v(".")]),e._v(" "),t("li",[t("a",{attrs:{href:"https://github.com/btcpayserver/btcpayserver-docker/blob/master/docker-compose-generator/docker-fragments/opt-add-mempool.yml",target:"_blank",rel:"noopener noreferrer"}},[e._v("opt-add-mempool"),t("OutboundLink")],1),e._v(" for "),t("a",{attrs:{href:"https://github.com/mempool/mempool",target:"_blank",rel:"noopener noreferrer"}},[e._v("Mempool"),t("OutboundLink")],1),e._v(". Maintained by "),t("a",{attrs:{href:"https://github.com/dennisreimann",target:"_blank",rel:"noopener noreferrer"}},[e._v("dennisreimann"),t("OutboundLink")],1),e._v(".")]),e._v(" "),t("li",[t("a",{attrs:{href:"https://github.com/btcpayserver/btcpayserver-docker/blob/master/docker-compose-generator/docker-fragments/opt-add-sphinxrelay.yml",target:"_blank",rel:"noopener noreferrer"}},[e._v("opt-add-sphinxrelay"),t("OutboundLink")],1),e._v(" for "),t("a",{attrs:{href:"https://github.com/stakwork/sphinx-relay",target:"_blank",rel:"noopener noreferrer"}},[e._v("Sphinx Relay"),t("OutboundLink")],1),e._v(". Maintained by "),t("a",{attrs:{href:"https://github.com/dennisreimann",target:"_blank",rel:"noopener noreferrer"}},[e._v("dennisreimann"),t("OutboundLink")],1),e._v(".")]),e._v(" "),t("li",[t("a",{attrs:{href:"https://github.com/btcpayserver/btcpayserver-docker/blob/master/docker-compose-generator/docker-fragments/opt-add-tallycoin-connect.yml",target:"_blank",rel:"noopener noreferrer"}},[e._v("opt-add-tallycoin-connect"),t("OutboundLink")],1),e._v(" for "),t("a",{attrs:{href:"https://github.com/djbooth007/tallycoin_connect",target:"_blank",rel:"noopener noreferrer"}},[e._v("Tallycoin Connect"),t("OutboundLink")],1),e._v(". Maintained by "),t("a",{attrs:{href:"https://github.com/dennisreimann",target:"_blank",rel:"noopener noreferrer"}},[e._v("dennisreimann"),t("OutboundLink")],1),e._v(".")]),e._v(" "),t("li",[t("a",{attrs:{href:"https://github.com/btcpayserver/btcpayserver-docker/blob/master/docker-compose-generator/docker-fragments/opt-add-thunderhub.yml",target:"_blank",rel:"noopener noreferrer"}},[e._v("opt-add-thunderhub"),t("OutboundLink")],1),e._v(" for a LND Lightning Node Manager in your Browser. Maintained by "),t("a",{attrs:{href:"https://github.com/apotdevin",target:"_blank",rel:"noopener noreferrer"}},[e._v("apotdevin"),t("OutboundLink")],1),e._v(".")]),e._v(" "),t("li",[t("a",{attrs:{href:"https://github.com/btcpayserver/btcpayserver-docker/blob/master/docker-compose-generator/docker-fragments/opt-add-teos.yml",target:"_blank",rel:"noopener noreferrer"}},[e._v("opt-add-teos"),t("OutboundLink")],1),e._v(" for "),t("a",{attrs:{href:"https://github.com/talaia-labs/python-teos",target:"_blank",rel:"noopener noreferrer"}},[e._v("The Eye Of Satoshi"),t("OutboundLink")],1),e._v(", a BOLT13 Lightning Watchtower. Use port 9814 on your server or Tor to connect.")]),e._v(" "),t("li",[t("a",{attrs:{href:"https://github.com/btcpayserver/btcpayserver-docker/blob/master/docker-compose-generator/docker-fragments/opt-add-chatwoot.yml",target:"_blank",rel:"noopener noreferrer"}},[e._v("opt-add-chatwoot"),t("OutboundLink")],1),e._v(" for open source chat support system. ("),t("RouterLink",{attrs:{to:"/Docker/chatwoot/"}},[e._v("See the documentation")]),e._v(")")],1),e._v(" "),t("li",[t("a",{attrs:{href:"https://github.com/btcpayserver/btcpayserver-docker/blob/master/docker-compose-generator/docker-fragments/opt-add-zammad.yml",target:"_blank",rel:"noopener noreferrer"}},[e._v("opt-add-zammad"),t("OutboundLink")],1),e._v(" for "),t("a",{attrs:{href:"https://zammad.com/features",target:"_blank",rel:"noopener noreferrer"}},[e._v("Zammad"),t("OutboundLink")],1),e._v(", a web based open source helpdesk/customer support system with many features to manage customer communication via several channels like telephone, facebook, twitter, chat and e-mails")]),e._v(" "),t("li",[t("a",{attrs:{href:"https://github.com/btcpayserver/btcpayserver-docker/blob/master/docker-compose-generator/docker-fragments/opt-monero-expose.yml",target:"_blank",rel:"noopener noreferrer"}},[e._v("opt-monero-expose"),t("OutboundLink")],1),e._v(" to expose monero node's RPC port at 127.0.0.1:18081 to connect your own wallet. Use f.e. ssh port forwarding to forward to your own computer.")]),e._v(" "),t("li",[t("a",{attrs:{href:"https://github.com/btcpayserver/btcpayserver-docker/blob/master/docker-compose-generator/docker-fragments/opt-add-fireflyiii.yml",target:"_blank",rel:"noopener noreferrer"}},[e._v("opt-add-fireflyiii"),t("OutboundLink")],1),e._v(" ("),t("RouterLink",{attrs:{to:"/Docker/fireflyiii/"}},[e._v("See the documentation")]),e._v(")")],1),e._v(" "),t("li",[t("a",{attrs:{href:"https://github.com/btcpayserver/btcpayserver-docker/blob/master/docker-compose-generator/docker-fragments/opt-add-joinmarket.yml",target:"_blank",rel:"noopener noreferrer"}},[e._v("opt-add-joinmarket"),t("OutboundLink")],1),e._v(" ("),t("RouterLink",{attrs:{to:"/Docker/joinmarket/"}},[e._v("See the documentation")]),e._v(")")],1),e._v(" "),t("li",[t("a",{attrs:{href:"https://github.com/btcpayserver/btcpayserver-docker/blob/master/docker-compose-generator/docker-fragments/opt-add-helipad.yml",target:"_blank",rel:"noopener noreferrer"}},[e._v("opt-add-helipad"),t("OutboundLink")],1),e._v(" for "),t("a",{attrs:{href:"https://github.com/Podcastindex-org/helipad",target:"_blank",rel:"noopener noreferrer"}},[e._v("Podcastindex.org Helipad"),t("OutboundLink")],1),e._v(". Requires LND.")]),e._v(" "),t("li",[t("a",{attrs:{href:"https://github.com/btcpayserver/btcpayserver-docker/blob/master/docker-compose-generator/docker-fragments/opt-add-nostr-relay.yml",target:"_blank",rel:"noopener noreferrer"}},[e._v("opt-add-nostr-relay"),t("OutboundLink")],1),e._v(" for "),t("a",{attrs:{href:"https://github.com/kukks/Nnostr",target:"_blank",rel:"noopener noreferrer"}},[e._v("Nostr Relay"),t("OutboundLink")],1),e._v(".")]),e._v(" "),t("li",[t("a",{attrs:{href:"https://github.com/btcpayserver/btcpayserver-docker/blob/master/docker-compose-generator/docker-fragments/opt-add-cloudflared.yml",target:"_blank",rel:"noopener noreferrer"}},[e._v("opt-add-cloudflared"),t("OutboundLink")],1),e._v(" to expose your local server on clearnet painlessly ("),t("RouterLink",{attrs:{to:"/Docker/cloudflare-tunnel/"}},[e._v("see documentation")]),e._v(").")],1),e._v(" "),t("li",[t("a",{attrs:{href:"https://github.com/btcpayserver/btcpayserver-docker/blob/master/docker-compose-generator/docker-fragments/opt-add-torq.yml",target:"_blank",rel:"noopener noreferrer"}},[e._v("opt-add-torq"),t("OutboundLink")],1),e._v(" to install "),t("a",{attrs:{href:"https://github.com/lncapital/torq",target:"_blank",rel:"noopener noreferrer"}},[e._v("Torq"),t("OutboundLink")],1),e._v(" node management application. Requires LND.")]),e._v(" "),t("li",[t("a",{attrs:{href:"https://github.com/btcpayserver/btcpayserver-docker/blob/master/docker-compose-generator/docker-fragments/opt-add-snapdrop.yml",target:"_blank",rel:"noopener noreferrer"}},[e._v("opt-add-snapdrop"),t("OutboundLink")],1),e._v(" to install "),t("a",{attrs:{href:"https://snapdrop.net/",target:"_blank",rel:"noopener noreferrer"}},[e._v("Snapdrop"),t("OutboundLink")],1),e._v(". You can then browse to "),t("code",[e._v("/snapdrop")]),e._v(" of your server to access it.")])]),e._v(" "),t("p",[e._v("You can also create your own "),t("a",{attrs:{href:"#how-can-i-customize-the-generated-docker-compose-file"}},[e._v("custom fragments")]),e._v(".")]),e._v(" "),t("p",[e._v("If you want to add an option to "),t("code",[e._v("BTCPAYGEN_ADDITIONAL_FRAGMENTS")]),e._v(" and re-configure your install:")]),e._v(" "),t("div",{staticClass:"language-bash extra-class"},[t("pre",{pre:!0,attrs:{class:"language-bash"}},[t("code",[t("span",{pre:!0,attrs:{class:"token builtin class-name"}},[e._v("export")]),e._v(" "),t("span",{pre:!0,attrs:{class:"token assign-left variable"}},[e._v("BTCPAYGEN_ADDITIONAL_FRAGMENTS")]),t("span",{pre:!0,attrs:{class:"token operator"}},[e._v("=")]),t("span",{pre:!0,attrs:{class:"token string"}},[e._v('"'),t("span",{pre:!0,attrs:{class:"token variable"}},[e._v("$BTCPAYGEN_ADDITIONAL_FRAGMENTS")]),e._v(';opt-lnd-autopilot"')]),e._v("\n"),t("span",{pre:!0,attrs:{class:"token builtin class-name"}},[e._v(".")]),e._v(" btcpay-setup.sh "),t("span",{pre:!0,attrs:{class:"token parameter variable"}},[e._v("-i")]),e._v("\n")])])]),t("p",[e._v("For example, if you want "),t("code",[e._v("btc")]),e._v(" and "),t("code",[e._v("ltc")]),e._v(" support with "),t("code",[e._v("nginx")]),e._v(" and "),t("code",[e._v("clightning")]),e._v(" inside "),t("code",[e._v("Generated/docker-compose.custom.yml")]),e._v(":")]),e._v(" "),t("p",[e._v("Note: The first run might take a while, but following runs are instantaneous.")]),e._v(" "),t("p",[e._v("On Windows (run in "),t("a",{attrs:{href:"https://docs.microsoft.com/en-us/powershell/scripting/windows-powershell/starting-windows-powershell",target:"_blank",rel:"noopener noreferrer"}},[e._v("powershell"),t("OutboundLink")],1),e._v("):")]),e._v(" "),t("div",{staticClass:"language-powershell extra-class"},[t("pre",{pre:!0,attrs:{class:"language-powershell"}},[t("code",[t("span",{pre:!0,attrs:{class:"token function"}},[e._v("Invoke-Command")]),e._v(" "),t("span",{pre:!0,attrs:{class:"token punctuation"}},[e._v("{")]),e._v("\n "),t("span",{pre:!0,attrs:{class:"token variable"}},[e._v("$BTCPAYGEN_CRYPTO1")]),e._v("="),t("span",{pre:!0,attrs:{class:"token string"}},[e._v('"btc"')]),e._v("\n "),t("span",{pre:!0,attrs:{class:"token variable"}},[e._v("$BTCPAYGEN_CRYPTO2")]),e._v("="),t("span",{pre:!0,attrs:{class:"token string"}},[e._v('"ltc"')]),e._v("\n "),t("span",{pre:!0,attrs:{class:"token variable"}},[e._v("$BTCPAYGEN_REVERSEPROXY")]),e._v("="),t("span",{pre:!0,attrs:{class:"token string"}},[e._v('"nginx"')]),e._v("\n "),t("span",{pre:!0,attrs:{class:"token variable"}},[e._v("$BTCPAYGEN_LIGHTNING")]),e._v("="),t("span",{pre:!0,attrs:{class:"token string"}},[e._v('"clightning"')]),e._v("\n "),t("span",{pre:!0,attrs:{class:"token variable"}},[e._v("$BTCPAYGEN_SUBNAME")]),e._v("="),t("span",{pre:!0,attrs:{class:"token string"}},[e._v('"custom"')]),e._v("\n "),t("span",{pre:!0,attrs:{class:"token punctuation"}},[e._v(".")]),e._v(" "),t("span",{pre:!0,attrs:{class:"token punctuation"}},[e._v(".")]),e._v("\\build"),t("span",{pre:!0,attrs:{class:"token punctuation"}},[e._v(".")]),e._v("ps1\n"),t("span",{pre:!0,attrs:{class:"token punctuation"}},[e._v("}")]),e._v("\n")])])]),t("p",[e._v("On Linux:")]),e._v(" "),t("div",{staticClass:"language-bash extra-class"},[t("pre",{pre:!0,attrs:{class:"language-bash"}},[t("code",[t("span",{pre:!0,attrs:{class:"token assign-left variable"}},[e._v("BTCPAYGEN_CRYPTO1")]),t("span",{pre:!0,attrs:{class:"token operator"}},[e._v("=")]),t("span",{pre:!0,attrs:{class:"token string"}},[e._v('"btc"')]),e._v(" "),t("span",{pre:!0,attrs:{class:"token punctuation"}},[e._v("\\")]),e._v("\n"),t("span",{pre:!0,attrs:{class:"token assign-left variable"}},[e._v("BTCPAYGEN_CRYPTO2")]),t("span",{pre:!0,attrs:{class:"token operator"}},[e._v("=")]),t("span",{pre:!0,attrs:{class:"token string"}},[e._v('"ltc"')]),e._v(" "),t("span",{pre:!0,attrs:{class:"token punctuation"}},[e._v("\\")]),e._v("\n"),t("span",{pre:!0,attrs:{class:"token assign-left variable"}},[e._v("BTCPAYGEN_REVERSEPROXY")]),t("span",{pre:!0,attrs:{class:"token operator"}},[e._v("=")]),t("span",{pre:!0,attrs:{class:"token string"}},[e._v('"nginx"')]),e._v(" "),t("span",{pre:!0,attrs:{class:"token punctuation"}},[e._v("\\")]),e._v("\n"),t("span",{pre:!0,attrs:{class:"token assign-left variable"}},[e._v("BTCPAYGEN_LIGHTNING")]),t("span",{pre:!0,attrs:{class:"token operator"}},[e._v("=")]),t("span",{pre:!0,attrs:{class:"token string"}},[e._v('"clightning"')]),e._v(" "),t("span",{pre:!0,attrs:{class:"token punctuation"}},[e._v("\\")]),e._v("\n"),t("span",{pre:!0,attrs:{class:"token assign-left variable"}},[e._v("BTCPAYGEN_SUBNAME")]),t("span",{pre:!0,attrs:{class:"token operator"}},[e._v("=")]),t("span",{pre:!0,attrs:{class:"token string"}},[e._v('"custom"')]),e._v(" "),t("span",{pre:!0,attrs:{class:"token punctuation"}},[e._v("\\")]),e._v("\n./build.sh\n")])])]),t("p",[e._v("Next, you will need to configure the runtime environment variables for "),t("code",[e._v("Generated/docker-compose.custom.yml")]),e._v(":")]),e._v(" "),t("ul",[t("li",[e._v("If you are using NGinx, "),t("a",{attrs:{href:"https://github.com/btcpayserver/btcpayserver-docker/blob/master/Production/README.md",target:"_blank",rel:"noopener noreferrer"}},[e._v("read this"),t("OutboundLink")],1),e._v(".")]),e._v(" "),t("li",[e._v("If you are not using NGinx, "),t("a",{attrs:{href:"https://github.com/btcpayserver/btcpayserver-docker/blob/master/Production-NoReverseProxy/README.md",target:"_blank",rel:"noopener noreferrer"}},[e._v("read this instead"),t("OutboundLink")],1),e._v(".")])]),e._v(" "),t("h2",{attrs:{id:"again-what-does-btcpay-setupsh-do"}},[t("a",{staticClass:"header-anchor",attrs:{href:"#again-what-does-btcpay-setupsh-do"}},[e._v("#")]),e._v(" Again, what does "),t("code",[e._v("btcpay-setup.sh")]),e._v(" do?")]),e._v(" "),t("p",[t("code",[e._v("btcpay-setup.sh")]),e._v(" is a utility which does the following:")]),e._v(" "),t("ol",[t("li",[e._v("Makes sure docker and docker-compose are installed on your system")]),e._v(" "),t("li",[e._v("Generates a docker-compose via "),t("code",[e._v("./build.sh")])]),e._v(" "),t("li",[e._v("Sets up an "),t("a",{attrs:{href:"https://docs.docker.com/compose/env-file/",target:"_blank",rel:"noopener noreferrer"}},[e._v("Environment File"),t("OutboundLink")],1),e._v(" to configure your docker-compose")]),e._v(" "),t("li",[e._v("Sets up environment variables so the tools described in "),t("a",{attrs:{href:"#tooling"}},[e._v("Tooling")]),e._v(" can work")]),e._v(" "),t("li",[e._v("Adds symlinks of those tools into "),t("code",[e._v("/usr/bin")])]),e._v(" "),t("li",[e._v("Makes sure BTCPay restarts on reboot via upstart or systemd")]),e._v(" "),t("li",[e._v("Starts BTCPay via docker-compose")])]),e._v(" "),t("h2",{attrs:{id:"overview-of-files-generated-by-btcpay-setupsh"}},[t("a",{staticClass:"header-anchor",attrs:{href:"#overview-of-files-generated-by-btcpay-setupsh"}},[e._v("#")]),e._v(" Overview of files generated by "),t("code",[e._v("btcpay-setup.sh")])]),e._v(" "),t("p",[t("code",[e._v("/etc/profile.d/btcpay-env.sh")]),e._v(" ensures that your environment variables are correctly setup when you login, so you can use the tools:")]),e._v(" "),t("div",{staticClass:"language-bash extra-class"},[t("pre",{pre:!0,attrs:{class:"language-bash"}},[t("code",[t("span",{pre:!0,attrs:{class:"token builtin class-name"}},[e._v("export")]),e._v(" "),t("span",{pre:!0,attrs:{class:"token assign-left variable"}},[e._v("BTCPAYGEN_OLD_PREGEN")]),t("span",{pre:!0,attrs:{class:"token operator"}},[e._v("=")]),t("span",{pre:!0,attrs:{class:"token string"}},[e._v('"false"')]),e._v("\n"),t("span",{pre:!0,attrs:{class:"token builtin class-name"}},[e._v("export")]),e._v(" "),t("span",{pre:!0,attrs:{class:"token assign-left variable"}},[e._v("BTCPAYGEN_CRYPTO1")]),t("span",{pre:!0,attrs:{class:"token operator"}},[e._v("=")]),t("span",{pre:!0,attrs:{class:"token string"}},[e._v('"btc"')]),e._v("\n"),t("span",{pre:!0,attrs:{class:"token builtin class-name"}},[e._v("export")]),e._v(" "),t("span",{pre:!0,attrs:{class:"token assign-left variable"}},[e._v("BTCPAYGEN_CRYPTO2")]),t("span",{pre:!0,attrs:{class:"token operator"}},[e._v("=")]),t("span",{pre:!0,attrs:{class:"token string"}},[e._v('""')]),e._v("\n"),t("span",{pre:!0,attrs:{class:"token builtin class-name"}},[e._v("export")]),e._v(" "),t("span",{pre:!0,attrs:{class:"token assign-left variable"}},[e._v("BTCPAYGEN_CRYPTO3")]),t("span",{pre:!0,attrs:{class:"token operator"}},[e._v("=")]),t("span",{pre:!0,attrs:{class:"token string"}},[e._v('""')]),e._v("\n"),t("span",{pre:!0,attrs:{class:"token builtin class-name"}},[e._v("export")]),e._v(" "),t("span",{pre:!0,attrs:{class:"token assign-left variable"}},[e._v("BTCPAYGEN_CRYPTO4")]),t("span",{pre:!0,attrs:{class:"token operator"}},[e._v("=")]),t("span",{pre:!0,attrs:{class:"token string"}},[e._v('""')]),e._v("\n"),t("span",{pre:!0,attrs:{class:"token builtin class-name"}},[e._v("export")]),e._v(" "),t("span",{pre:!0,attrs:{class:"token assign-left variable"}},[e._v("BTCPAYGEN_CRYPTO5")]),t("span",{pre:!0,attrs:{class:"token operator"}},[e._v("=")]),t("span",{pre:!0,attrs:{class:"token string"}},[e._v('""')]),e._v("\n"),t("span",{pre:!0,attrs:{class:"token builtin class-name"}},[e._v("export")]),e._v(" "),t("span",{pre:!0,attrs:{class:"token assign-left variable"}},[e._v("BTCPAYGEN_CRYPTO6")]),t("span",{pre:!0,attrs:{class:"token operator"}},[e._v("=")]),t("span",{pre:!0,attrs:{class:"token string"}},[e._v('""')]),e._v("\n"),t("span",{pre:!0,attrs:{class:"token builtin class-name"}},[e._v("export")]),e._v(" "),t("span",{pre:!0,attrs:{class:"token assign-left variable"}},[e._v("BTCPAYGEN_CRYPTO7")]),t("span",{pre:!0,attrs:{class:"token operator"}},[e._v("=")]),t("span",{pre:!0,attrs:{class:"token string"}},[e._v('""')]),e._v("\n"),t("span",{pre:!0,attrs:{class:"token builtin class-name"}},[e._v("export")]),e._v(" "),t("span",{pre:!0,attrs:{class:"token assign-left variable"}},[e._v("BTCPAYGEN_CRYPTO8")]),t("span",{pre:!0,attrs:{class:"token operator"}},[e._v("=")]),t("span",{pre:!0,attrs:{class:"token string"}},[e._v('""')]),e._v("\n"),t("span",{pre:!0,attrs:{class:"token builtin class-name"}},[e._v("export")]),e._v(" "),t("span",{pre:!0,attrs:{class:"token assign-left variable"}},[e._v("BTCPAYGEN_CRYPTO9")]),t("span",{pre:!0,attrs:{class:"token operator"}},[e._v("=")]),t("span",{pre:!0,attrs:{class:"token string"}},[e._v('""')]),e._v("\n"),t("span",{pre:!0,attrs:{class:"token builtin class-name"}},[e._v("export")]),e._v(" "),t("span",{pre:!0,attrs:{class:"token assign-left variable"}},[e._v("BTCPAYGEN_LIGHTNING")]),t("span",{pre:!0,attrs:{class:"token operator"}},[e._v("=")]),t("span",{pre:!0,attrs:{class:"token string"}},[e._v('"clightning"')]),e._v("\n"),t("span",{pre:!0,attrs:{class:"token builtin class-name"}},[e._v("export")]),e._v(" "),t("span",{pre:!0,attrs:{class:"token assign-left variable"}},[e._v("BTCPAYGEN_REVERSEPROXY")]),t("span",{pre:!0,attrs:{class:"token operator"}},[e._v("=")]),t("span",{pre:!0,attrs:{class:"token string"}},[e._v('"nginx"')]),e._v("\n"),t("span",{pre:!0,attrs:{class:"token builtin class-name"}},[e._v("export")]),e._v(" "),t("span",{pre:!0,attrs:{class:"token assign-left variable"}},[e._v("BTCPAYGEN_ADDITIONAL_FRAGMENTS")]),t("span",{pre:!0,attrs:{class:"token operator"}},[e._v("=")]),t("span",{pre:!0,attrs:{class:"token string"}},[e._v('""')]),e._v("\n"),t("span",{pre:!0,attrs:{class:"token builtin class-name"}},[e._v("export")]),e._v(" "),t("span",{pre:!0,attrs:{class:"token assign-left variable"}},[e._v("BTCPAY_DOCKER_COMPOSE")]),t("span",{pre:!0,attrs:{class:"token operator"}},[e._v("=")]),t("span",{pre:!0,attrs:{class:"token string"}},[e._v('"/var/lib/waagent/custom-script/download/0/btcpayserver-docker/Production/docker-compose.generated.yml"')]),e._v("\n"),t("span",{pre:!0,attrs:{class:"token builtin class-name"}},[e._v("export")]),e._v(" "),t("span",{pre:!0,attrs:{class:"token assign-left variable"}},[e._v("BTCPAY_BASE_DIRECTORY")]),t("span",{pre:!0,attrs:{class:"token operator"}},[e._v("=")]),t("span",{pre:!0,attrs:{class:"token string"}},[e._v('"/var/lib/waagent/custom-script/download/0"')]),e._v("\n"),t("span",{pre:!0,attrs:{class:"token builtin class-name"}},[e._v("export")]),e._v(" "),t("span",{pre:!0,attrs:{class:"token assign-left variable"}},[e._v("BTCPAY_ENV_FILE")]),t("span",{pre:!0,attrs:{class:"token operator"}},[e._v("=")]),t("span",{pre:!0,attrs:{class:"token string"}},[e._v('"/var/lib/waagent/custom-script/download/0/.env"')]),e._v("\n"),t("span",{pre:!0,attrs:{class:"token builtin class-name"}},[e._v("export")]),e._v(" "),t("span",{pre:!0,attrs:{class:"token assign-left variable"}},[e._v("BTCPAY_HOST_SSHKEYFILE")]),t("span",{pre:!0,attrs:{class:"token operator"}},[e._v("=")]),t("span",{pre:!0,attrs:{class:"token string"}},[e._v('"/root/.ssh/id_rsa_btcpay"')]),e._v("\n"),t("span",{pre:!0,attrs:{class:"token keyword"}},[e._v("if")]),e._v(" "),t("span",{pre:!0,attrs:{class:"token function"}},[e._v("cat")]),e._v(" "),t("span",{pre:!0,attrs:{class:"token variable"}},[e._v("$BTCPAY_ENV_FILE")]),e._v(" "),t("span",{pre:!0,attrs:{class:"token operator"}},[e._v("&>")]),e._v(" /dev/null"),t("span",{pre:!0,attrs:{class:"token punctuation"}},[e._v(";")]),e._v(" "),t("span",{pre:!0,attrs:{class:"token keyword"}},[e._v("then")]),e._v("\n "),t("span",{pre:!0,attrs:{class:"token builtin class-name"}},[e._v("export")]),e._v(" "),t("span",{pre:!0,attrs:{class:"token variable"}},[t("span",{pre:!0,attrs:{class:"token variable"}},[e._v("$(")]),t("span",{pre:!0,attrs:{class:"token function"}},[e._v("grep")]),e._v(" "),t("span",{pre:!0,attrs:{class:"token parameter variable"}},[e._v("-v")]),e._v(" "),t("span",{pre:!0,attrs:{class:"token string"}},[e._v("'^#'")]),e._v(" "),t("span",{pre:!0,attrs:{class:"token string"}},[e._v('"'),t("span",{pre:!0,attrs:{class:"token variable"}},[e._v("$BTCPAY_ENV_FILE")]),e._v('"')]),e._v(" "),t("span",{pre:!0,attrs:{class:"token operator"}},[e._v("|")]),e._v(" "),t("span",{pre:!0,attrs:{class:"token function"}},[e._v("xargs")]),t("span",{pre:!0,attrs:{class:"token variable"}},[e._v(")")])]),e._v("\n"),t("span",{pre:!0,attrs:{class:"token keyword"}},[e._v("fi")]),e._v("\n")])])]),t("p",[t("code",[e._v("/etc/systemd/system/btcpayserver.service")]),e._v(" ensures that you can control btcpay via "),t("code",[e._v("systemctl")]),e._v(", and that BTCPayServer starts on reboot:")]),e._v(" "),t("div",{staticClass:"language-ini extra-class"},[t("pre",{pre:!0,attrs:{class:"language-ini"}},[t("code",[t("span",{pre:!0,attrs:{class:"token section"}},[t("span",{pre:!0,attrs:{class:"token punctuation"}},[e._v("[")]),t("span",{pre:!0,attrs:{class:"token section-name selector"}},[e._v("Unit")]),t("span",{pre:!0,attrs:{class:"token punctuation"}},[e._v("]")])]),e._v("\n"),t("span",{pre:!0,attrs:{class:"token key attr-name"}},[e._v("Description")]),t("span",{pre:!0,attrs:{class:"token punctuation"}},[e._v("=")]),t("span",{pre:!0,attrs:{class:"token value attr-value"}},[e._v("BTCPayServer service")]),e._v("\n"),t("span",{pre:!0,attrs:{class:"token key attr-name"}},[e._v("After")]),t("span",{pre:!0,attrs:{class:"token punctuation"}},[e._v("=")]),t("span",{pre:!0,attrs:{class:"token value attr-value"}},[e._v("docker.service network-online.target")]),e._v("\n"),t("span",{pre:!0,attrs:{class:"token key attr-name"}},[e._v("Requires")]),t("span",{pre:!0,attrs:{class:"token punctuation"}},[e._v("=")]),t("span",{pre:!0,attrs:{class:"token value attr-value"}},[e._v("docker.service network-online.target")]),e._v("\n\n"),t("span",{pre:!0,attrs:{class:"token section"}},[t("span",{pre:!0,attrs:{class:"token punctuation"}},[e._v("[")]),t("span",{pre:!0,attrs:{class:"token section-name selector"}},[e._v("Service")]),t("span",{pre:!0,attrs:{class:"token punctuation"}},[e._v("]")])]),e._v("\n"),t("span",{pre:!0,attrs:{class:"token key attr-name"}},[e._v("Type")]),t("span",{pre:!0,attrs:{class:"token punctuation"}},[e._v("=")]),t("span",{pre:!0,attrs:{class:"token value attr-value"}},[e._v("oneshot")]),e._v("\n"),t("span",{pre:!0,attrs:{class:"token key attr-name"}},[e._v("RemainAfterExit")]),t("span",{pre:!0,attrs:{class:"token punctuation"}},[e._v("=")]),t("span",{pre:!0,attrs:{class:"token value attr-value"}},[e._v("yes")]),e._v("\n\n"),t("span",{pre:!0,attrs:{class:"token key attr-name"}},[e._v("ExecStart")]),t("span",{pre:!0,attrs:{class:"token punctuation"}},[e._v("=")]),t("span",{pre:!0,attrs:{class:"token value attr-value"}},[e._v("/bin/bash -c '. /etc/profile.d/btcpay-env.sh && cd \"$BTCPAY_BASE_DIRECTORY/btcpayserver-docker\" && . helpers.sh && btcpay_up'")]),e._v("\n"),t("span",{pre:!0,attrs:{class:"token key attr-name"}},[e._v("ExecStop")]),t("span",{pre:!0,attrs:{class:"token punctuation"}},[e._v("=")]),t("span",{pre:!0,attrs:{class:"token value attr-value"}},[e._v("/bin/bash -c '. /etc/profile.d/btcpay-env.sh && cd \"$BTCPAY_BASE_DIRECTORY/btcpayserver-docker\" && . helpers.sh && btcpay_down'")]),e._v("\n"),t("span",{pre:!0,attrs:{class:"token key attr-name"}},[e._v("ExecReload")]),t("span",{pre:!0,attrs:{class:"token punctuation"}},[e._v("=")]),t("span",{pre:!0,attrs:{class:"token value attr-value"}},[e._v("/bin/bash -c '. /etc/profile.d/btcpay-env.sh && cd \"$BTCPAY_BASE_DIRECTORY/btcpayserver-docker\" && . helpers.sh && btcpay_restart'")]),e._v("\n\n"),t("span",{pre:!0,attrs:{class:"token section"}},[t("span",{pre:!0,attrs:{class:"token punctuation"}},[e._v("[")]),t("span",{pre:!0,attrs:{class:"token section-name selector"}},[e._v("Install")]),t("span",{pre:!0,attrs:{class:"token punctuation"}},[e._v("]")])]),e._v("\n"),t("span",{pre:!0,attrs:{class:"token key attr-name"}},[e._v("WantedBy")]),t("span",{pre:!0,attrs:{class:"token punctuation"}},[e._v("=")]),t("span",{pre:!0,attrs:{class:"token value attr-value"}},[e._v("multi-user.target")]),e._v("\n")])])]),t("p",[t("code",[e._v(".env")]),e._v(" ("),t("code",[e._v("$BTCPAY_ENV_FILE")]),e._v(") contains environment variables passed to the containers managed by your docker-compose:")]),e._v(" "),t("div",{staticClass:"language-ini extra-class"},[t("pre",{pre:!0,attrs:{class:"language-ini"}},[t("code",[t("span",{pre:!0,attrs:{class:"token key attr-name"}},[e._v("BTCPAY_HOST")]),t("span",{pre:!0,attrs:{class:"token punctuation"}},[e._v("=")]),t("span",{pre:!0,attrs:{class:"token value attr-value"}},[e._v("btcpay.EXAMPLE.com")]),e._v("\n"),t("span",{pre:!0,attrs:{class:"token key attr-name"}},[e._v("ACME_CA_URI")]),t("span",{pre:!0,attrs:{class:"token punctuation"}},[e._v("=")]),t("span",{pre:!0,attrs:{class:"token value attr-value"}},[e._v("production")]),e._v("\n"),t("span",{pre:!0,attrs:{class:"token key attr-name"}},[e._v("NBITCOIN_NETWORK")]),t("span",{pre:!0,attrs:{class:"token punctuation"}},[e._v("=")]),t("span",{pre:!0,attrs:{class:"token value attr-value"}},[e._v("mainnet")]),e._v("\n"),t("span",{pre:!0,attrs:{class:"token key attr-name"}},[e._v("LETSENCRYPT_EMAIL")]),t("span",{pre:!0,attrs:{class:"token punctuation"}},[e._v("=")]),t("span",{pre:!0,attrs:{class:"token value attr-value"}},[e._v("me@EXAMPLE.com")]),e._v("\n"),t("span",{pre:!0,attrs:{class:"token key attr-name"}},[e._v("BTCPAY_SSHTRUSTEDFINGERPRINTS")]),t("span",{pre:!0,attrs:{class:"token punctuation"}},[e._v("=")]),t("span",{pre:!0,attrs:{class:"token value attr-value"}},[e._v("SHA256:eSCD7NtQ/Q6IBl2iRB9caAQ3lDZd8s8iUL6SdeNnhpA")]),e._v("\n"),t("span",{pre:!0,attrs:{class:"token key attr-name"}},[e._v("BTCPAY_SSHKEYFILE")]),t("span",{pre:!0,attrs:{class:"token punctuation"}},[e._v("=")]),t("span",{pre:!0,attrs:{class:"token value attr-value"}},[e._v("/datadir/id_rsa")]),e._v("\n")])])]),t("h1",{attrs:{id:"how-can-i-add-an-altcoin-to-btcpayserver"}},[t("a",{staticClass:"header-anchor",attrs:{href:"#how-can-i-add-an-altcoin-to-btcpayserver"}},[e._v("#")]),e._v(" How can I add an altcoin to BTCPayServer?")]),e._v(" "),t("ol",[t("li",[e._v("Add support for your crypto to "),t("a",{attrs:{href:"https://github.com/MetacoSA/NBitcoin/tree/master/NBitcoin.Altcoins",target:"_blank",rel:"noopener noreferrer"}},[e._v("NBitcoin"),t("OutboundLink")],1),e._v(", "),t("a",{attrs:{href:"https://github.com/dgarage/NBXplorer",target:"_blank",rel:"noopener noreferrer"}},[e._v("NBxplorer"),t("OutboundLink")],1),e._v(", and "),t("a",{attrs:{href:"https://github.com/btcpayserver/btcpayserver",target:"_blank",rel:"noopener noreferrer"}},[e._v("BTCPayServer"),t("OutboundLink")],1),e._v(". (Use examples from other coins)")]),e._v(" "),t("li",[e._v("Create your own docker image ("),t("a",{attrs:{href:"https://hub.docker.com/r/nicolasdorier/docker-bitcoin/",target:"_blank",rel:"noopener noreferrer"}},[e._v("Example for BTC"),t("OutboundLink")],1),e._v(")")]),e._v(" "),t("li",[e._v("Create a docker-compose fragment ("),t("a",{attrs:{href:"https://github.com/btcpayserver/btcpayserver-docker/blob/master/docker-compose-generator/docker-fragments/bitcoin.yml",target:"_blank",rel:"noopener noreferrer"}},[e._v("Example for BTC"),t("OutboundLink")],1),e._v(")")]),e._v(" "),t("li",[e._v("Add your "),t("code",[e._v("CryptoDefinition")]),e._v(" ("),t("a",{attrs:{href:"https://github.com/btcpayserver/btcpayserver-docker/blob/master/docker-compose-generator/src/CryptoDefinition.cs",target:"_blank",rel:"noopener noreferrer"}},[e._v("Example for BTC"),t("OutboundLink")],1),e._v(")")])]),e._v(" "),t("p",[t("code",[e._v("build.sh")]),e._v(" is using a pre-built image of the "),t("code",[e._v("docker-compose generator")]),e._v(" on "),t("a",{attrs:{href:"https://hub.docker.com/r/btcpayserver/docker-compose-generator/",target:"_blank",rel:"noopener noreferrer"}},[e._v("docker hub"),t("OutboundLink")],1),e._v(".\nIf you modify the code source of "),t("code",[e._v("docker-compose generator")]),e._v(" (for example, the "),t("code",[e._v("CryptoDefinition")]),e._v(" "),t("a",{attrs:{href:"https://github.com/btcpayserver/btcpayserver-docker/blob/master/docker-compose-generator/src/CryptoDefinition.cs",target:"_blank",rel:"noopener noreferrer"}},[e._v("Example for BTC"),t("OutboundLink")],1),e._v("), you need to configure "),t("code",[e._v("build.sh")]),e._v(" to use your own image by setting the environment variable "),t("code",[e._v("BTCPAYGEN_DOCKER_IMAGE")]),e._v(" to "),t("code",[e._v("btcpayserver/docker-compose-generator:local")]),e._v(".")]),e._v(" "),t("div",{staticClass:"language-bash extra-class"},[t("pre",{pre:!0,attrs:{class:"language-bash"}},[t("code",[t("span",{pre:!0,attrs:{class:"token builtin class-name"}},[e._v("cd")]),e._v(" docker-compose-generator\n"),t("span",{pre:!0,attrs:{class:"token assign-left variable"}},[e._v("BTCPAYGEN_DOCKER_IMAGE")]),t("span",{pre:!0,attrs:{class:"token operator"}},[e._v("=")]),t("span",{pre:!0,attrs:{class:"token string"}},[e._v('"btcpayserver/docker-compose-generator:local"')]),e._v("\n")])])]),t("p",[e._v("Or on powershell:")]),e._v(" "),t("div",{staticClass:"language-powershell extra-class"},[t("pre",{pre:!0,attrs:{class:"language-powershell"}},[t("code",[e._v("cd docker-compose-generator\n"),t("span",{pre:!0,attrs:{class:"token variable"}},[e._v("$BTCPAYGEN_DOCKER_IMAGE")]),e._v("="),t("span",{pre:!0,attrs:{class:"token string"}},[e._v('"btcpayserver/docker-compose-generator:local"')]),e._v("\n")])])]),t("p",[e._v("Then run "),t("code",[e._v("./build.sh")]),e._v(" or "),t("code",[e._v(". .\\build.ps1")]),e._v(".\nThis will generate your docker-compose in the "),t("code",[e._v("Generated")]),e._v(" folder, which you can then run and test.")]),e._v(" "),t("p",[e._v("Note that BTCPayServer developers will not spend excessive time testing your image, so make sure it works.")]),e._v(" "),t("h1",{attrs:{id:"support"}},[t("a",{staticClass:"header-anchor",attrs:{href:"#support"}},[e._v("#")]),e._v(" Support")]),e._v(" "),t("table",[t("thead",[t("tr",[t("th",[e._v("Image")]),e._v(" "),t("th",[e._v("Version")]),e._v(" "),t("th",{staticStyle:{"text-align":"center"}},[e._v("x64")]),e._v(" "),t("th",{staticStyle:{"text-align":"center"}},[e._v("arm32v7")]),e._v(" "),t("th",{staticStyle:{"text-align":"center"}},[e._v("arm64v8")]),e._v(" "),t("th",{staticStyle:{"text-align":"center"}},[e._v("links")])])]),e._v(" "),t("tbody",[t("tr",[t("td",[e._v("btcpayserver/docker-compose-generator")]),e._v(" "),t("td",[e._v("latest")]),e._v(" "),t("td",{staticStyle:{"text-align":"center"}},[t("a",{attrs:{href:"https://raw.githubusercontent.com/btcpayserver/btcpayserver-docker/dcg-latest/docker-compose-generator/Dockerfile",target:"_blank",rel:"noopener noreferrer"}},[e._v("✔️"),t("OutboundLink")],1)]),e._v(" "),t("td",{staticStyle:{"text-align":"center"}},[t("a",{attrs:{href:"https://raw.githubusercontent.com/btcpayserver/btcpayserver-docker/dcg-latest/docker-compose-generator/Dockerfile",target:"_blank",rel:"noopener noreferrer"}},[e._v("✔️"),t("OutboundLink")],1)]),e._v(" "),t("td",{staticStyle:{"text-align":"center"}},[t("a",{attrs:{href:"https://raw.githubusercontent.com/btcpayserver/btcpayserver-docker/dcg-latest/docker-compose-generator/Dockerfile",target:"_blank",rel:"noopener noreferrer"}},[e._v("✔️"),t("OutboundLink")],1)]),e._v(" "),t("td",{staticStyle:{"text-align":"center"}},[t("a",{attrs:{href:"https://github.com/btcpayserver/btcpayserver-docker",target:"_blank",rel:"noopener noreferrer"}},[e._v("Github"),t("OutboundLink")],1),e._v(" - "),t("a",{attrs:{href:"https://hub.docker.com/r/btcpayserver/docker-compose-generator",target:"_blank",rel:"noopener noreferrer"}},[e._v("DockerHub"),t("OutboundLink")],1)])]),e._v(" "),t("tr",[t("td",[e._v("btcpayserver/lightning")]),e._v(" "),t("td",[e._v("v24.05")]),e._v(" "),t("td",{staticStyle:{"text-align":"center"}},[t("a",{attrs:{href:"https://raw.githubusercontent.com/btcpayserver/lightning/basedon-v24.05/Dockerfile",target:"_blank",rel:"noopener noreferrer"}},[e._v("✔️"),t("OutboundLink")],1)]),e._v(" "),t("td",{staticStyle:{"text-align":"center"}},[t("a",{attrs:{href:"https://raw.githubusercontent.com/btcpayserver/lightning/basedon-v24.05/Dockerfile",target:"_blank",rel:"noopener noreferrer"}},[e._v("✔️"),t("OutboundLink")],1)]),e._v(" "),t("td",{staticStyle:{"text-align":"center"}},[t("a",{attrs:{href:"https://raw.githubusercontent.com/btcpayserver/lightning/basedon-v24.05/Dockerfile",target:"_blank",rel:"noopener noreferrer"}},[e._v("✔️"),t("OutboundLink")],1)]),e._v(" "),t("td",{staticStyle:{"text-align":"center"}},[t("a",{attrs:{href:"https://github.com/btcpayserver/lightning",target:"_blank",rel:"noopener noreferrer"}},[e._v("Github"),t("OutboundLink")],1),e._v(" - "),t("a",{attrs:{href:"https://hub.docker.com/r/btcpayserver/lightning",target:"_blank",rel:"noopener noreferrer"}},[e._v("DockerHub"),t("OutboundLink")],1)])]),e._v(" "),t("tr",[t("td",[e._v("shahanafarooqui/rtl")]),e._v(" "),t("td",[e._v("0.15.0")]),e._v(" "),t("td",{staticStyle:{"text-align":"center"}},[t("a",{attrs:{href:"https://raw.githubusercontent.com/Ride-The-Lightning/RTL/v0.15.0/dockerfiles/Dockerfile",target:"_blank",rel:"noopener noreferrer"}},[e._v("✔️"),t("OutboundLink")],1)]),e._v(" "),t("td",{staticStyle:{"text-align":"center"}},[t("a",{attrs:{href:"https://raw.githubusercontent.com/Ride-The-Lightning/RTL/v0.15.0/dockerfiles/Dockerfile.arm32v7",target:"_blank",rel:"noopener noreferrer"}},[e._v("✔️"),t("OutboundLink")],1)]),e._v(" "),t("td",{staticStyle:{"text-align":"center"}},[t("a",{attrs:{href:"https://raw.githubusercontent.com/Ride-The-Lightning/RTL/v0.15.0/dockerfiles/Dockerfile.arm64v8",target:"_blank",rel:"noopener noreferrer"}},[e._v("✔️"),t("OutboundLink")],1)]),e._v(" "),t("td",{staticStyle:{"text-align":"center"}},[t("a",{attrs:{href:"https://github.com/Ride-The-Lightning/RTL",target:"_blank",rel:"noopener noreferrer"}},[e._v("Github"),t("OutboundLink")],1),e._v(" - "),t("a",{attrs:{href:"https://hub.docker.com/r/shahanafarooqui/rtl",target:"_blank",rel:"noopener noreferrer"}},[e._v("DockerHub"),t("OutboundLink")],1)])]),e._v(" "),t("tr",[t("td",[e._v("btcpayserver/lnd")]),e._v(" "),t("td",[e._v("v0.18.3-beta")]),e._v(" "),t("td",{staticStyle:{"text-align":"center"}},[t("a",{attrs:{href:"https://raw.githubusercontent.com/btcpayserver/lnd/basedon-v0.18.3-beta/linuxamd64.Dockerfile",target:"_blank",rel:"noopener noreferrer"}},[e._v("✔️"),t("OutboundLink")],1)]),e._v(" "),t("td",{staticStyle:{"text-align":"center"}},[t("a",{attrs:{href:"https://raw.githubusercontent.com/btcpayserver/lnd/basedon-v0.18.3-beta/linuxarm32v7.Dockerfile",target:"_blank",rel:"noopener noreferrer"}},[e._v("✔️"),t("OutboundLink")],1)]),e._v(" "),t("td",{staticStyle:{"text-align":"center"}},[t("a",{attrs:{href:"https://raw.githubusercontent.com/btcpayserver/lnd/basedon-v0.18.3-beta/linuxarm64v8.Dockerfile",target:"_blank",rel:"noopener noreferrer"}},[e._v("✔️"),t("OutboundLink")],1)]),e._v(" "),t("td",{staticStyle:{"text-align":"center"}},[t("a",{attrs:{href:"https://github.com/btcpayserver/lnd",target:"_blank",rel:"noopener noreferrer"}},[e._v("Github"),t("OutboundLink")],1),e._v(" - "),t("a",{attrs:{href:"https://hub.docker.com/r/btcpayserver/lnd",target:"_blank",rel:"noopener noreferrer"}},[e._v("DockerHub"),t("OutboundLink")],1)])]),e._v(" "),t("tr",[t("td",[e._v("btcpayserver/bitcoin")]),e._v(" "),t("td",[e._v("26.0")]),e._v(" "),t("td",{staticStyle:{"text-align":"center"}},[t("a",{attrs:{href:"https://raw.githubusercontent.com/btcpayserver/dockerfile-deps/Bitcoin/26.0/Bitcoin/26.0/linuxamd64.Dockerfile",target:"_blank",rel:"noopener noreferrer"}},[e._v("✔️"),t("OutboundLink")],1)]),e._v(" "),t("td",{staticStyle:{"text-align":"center"}},[t("a",{attrs:{href:"https://raw.githubusercontent.com/btcpayserver/dockerfile-deps/Bitcoin/26.0/Bitcoin/26.0/linuxarm32v7.Dockerfile",target:"_blank",rel:"noopener noreferrer"}},[e._v("✔️"),t("OutboundLink")],1)]),e._v(" "),t("td",{staticStyle:{"text-align":"center"}},[t("a",{attrs:{href:"https://raw.githubusercontent.com/btcpayserver/dockerfile-deps/Bitcoin/26.0/Bitcoin/26.0/linuxarm64v8.Dockerfile",target:"_blank",rel:"noopener noreferrer"}},[e._v("✔️"),t("OutboundLink")],1)]),e._v(" "),t("td",{staticStyle:{"text-align":"center"}},[t("a",{attrs:{href:"https://github.com/btcpayserver/dockerfile-deps",target:"_blank",rel:"noopener noreferrer"}},[e._v("Github"),t("OutboundLink")],1),e._v(" - "),t("a",{attrs:{href:"https://hub.docker.com/r/btcpayserver/bitcoin",target:"_blank",rel:"noopener noreferrer"}},[e._v("DockerHub"),t("OutboundLink")],1)])]),e._v(" "),t("tr",[t("td",[e._v("btcpayserver/btcpayserver")]),e._v(" "),t("td",[e._v("1.13.5$?")]),e._v(" "),t("td",{staticStyle:{"text-align":"center"}},[t("a",{attrs:{href:"https://raw.githubusercontent.com/btcpayserver/btcpayserver/v1.13.5/Dockerfile",target:"_blank",rel:"noopener noreferrer"}},[e._v("✔️"),t("OutboundLink")],1)]),e._v(" "),t("td",{staticStyle:{"text-align":"center"}},[t("a",{attrs:{href:"https://raw.githubusercontent.com/btcpayserver/btcpayserver/v1.13.5/Dockerfile",target:"_blank",rel:"noopener noreferrer"}},[e._v("✔️"),t("OutboundLink")],1)]),e._v(" "),t("td",{staticStyle:{"text-align":"center"}},[t("a",{attrs:{href:"https://raw.githubusercontent.com/btcpayserver/btcpayserver/v1.13.5/Dockerfile",target:"_blank",rel:"noopener noreferrer"}},[e._v("✔️"),t("OutboundLink")],1)]),e._v(" "),t("td",{staticStyle:{"text-align":"center"}},[t("a",{attrs:{href:"https://github.com/btcpayserver/btcpayserver",target:"_blank",rel:"noopener noreferrer"}},[e._v("Github"),t("OutboundLink")],1),e._v(" - "),t("a",{attrs:{href:"https://hub.docker.com/r/btcpayserver/btcpayserver",target:"_blank",rel:"noopener noreferrer"}},[e._v("DockerHub"),t("OutboundLink")],1)])]),e._v(" "),t("tr",[t("td",[e._v("btcpayserver/monero")]),e._v(" "),t("td",[e._v("0.18.3.3")]),e._v(" "),t("td",{staticStyle:{"text-align":"center"}},[t("a",{attrs:{href:"https://raw.githubusercontent.com/btcpayserver/dockerfile-deps/Monero/0.18.3.3/Monero/0.18.3.3/linuxamd64.Dockerfile",target:"_blank",rel:"noopener noreferrer"}},[e._v("✔️"),t("OutboundLink")],1)]),e._v(" "),t("td",{staticStyle:{"text-align":"center"}},[t("a",{attrs:{href:"https://raw.githubusercontent.com/btcpayserver/dockerfile-deps/Monero/0.18.3.3/Monero/0.18.3.3/linuxarm32v7.Dockerfile",target:"_blank",rel:"noopener noreferrer"}},[e._v("✔️"),t("OutboundLink")],1)]),e._v(" "),t("td",{staticStyle:{"text-align":"center"}},[t("a",{attrs:{href:"https://raw.githubusercontent.com/btcpayserver/dockerfile-deps/Monero/0.18.3.3/Monero/0.18.3.3/linuxarm64v8.Dockerfile",target:"_blank",rel:"noopener noreferrer"}},[e._v("✔️"),t("OutboundLink")],1)]),e._v(" "),t("td",{staticStyle:{"text-align":"center"}},[t("a",{attrs:{href:"https://github.com/btcpayserver/dockerfile-deps",target:"_blank",rel:"noopener noreferrer"}},[e._v("Github"),t("OutboundLink")],1),e._v(" - "),t("a",{attrs:{href:"https://hub.docker.com/r/btcpayserver/monero",target:"_blank",rel:"noopener noreferrer"}},[e._v("DockerHub"),t("OutboundLink")],1)])]),e._v(" "),t("tr",[t("td",[e._v("nicolasdorier/nbxplorer")]),e._v(" "),t("td",[e._v("2.5.8")]),e._v(" "),t("td",{staticStyle:{"text-align":"center"}},[t("a",{attrs:{href:"https://raw.githubusercontent.com/dgarage/nbxplorer/v2.5.8/Dockerfile",target:"_blank",rel:"noopener noreferrer"}},[e._v("✔️"),t("OutboundLink")],1)]),e._v(" "),t("td",{staticStyle:{"text-align":"center"}},[t("a",{attrs:{href:"https://raw.githubusercontent.com/dgarage/nbxplorer/v2.5.8/Dockerfile",target:"_blank",rel:"noopener noreferrer"}},[e._v("✔️"),t("OutboundLink")],1)]),e._v(" "),t("td",{staticStyle:{"text-align":"center"}},[t("a",{attrs:{href:"https://raw.githubusercontent.com/dgarage/nbxplorer/v2.5.8/Dockerfile",target:"_blank",rel:"noopener noreferrer"}},[e._v("✔️"),t("OutboundLink")],1)]),e._v(" "),t("td",{staticStyle:{"text-align":"center"}},[t("a",{attrs:{href:"https://github.com/dgarage/nbxplorer",target:"_blank",rel:"noopener noreferrer"}},[e._v("Github"),t("OutboundLink")],1),e._v(" - "),t("a",{attrs:{href:"https://hub.docker.com/r/nicolasdorier/nbxplorer",target:"_blank",rel:"noopener noreferrer"}},[e._v("DockerHub"),t("OutboundLink")],1)])]),e._v(" "),t("tr",[t("td",[e._v("btcpayserver/letsencrypt-nginx-proxy-companion")]),e._v(" "),t("td",[e._v("2.2.9-2")]),e._v(" "),t("td",{staticStyle:{"text-align":"center"}},[t("a",{attrs:{href:"https://raw.githubusercontent.com/btcpayserver/docker-letsencrypt-nginx-proxy-companion/v2.2.9-2/Dockerfile",target:"_blank",rel:"noopener noreferrer"}},[e._v("✔️"),t("OutboundLink")],1)]),e._v(" "),t("td",{staticStyle:{"text-align":"center"}},[t("a",{attrs:{href:"https://raw.githubusercontent.com/btcpayserver/docker-letsencrypt-nginx-proxy-companion/v2.2.9-2/Dockerfile",target:"_blank",rel:"noopener noreferrer"}},[e._v("✔️"),t("OutboundLink")],1)]),e._v(" "),t("td",{staticStyle:{"text-align":"center"}},[t("a",{attrs:{href:"https://raw.githubusercontent.com/btcpayserver/docker-letsencrypt-nginx-proxy-companion/v2.2.9-2/Dockerfile",target:"_blank",rel:"noopener noreferrer"}},[e._v("✔️"),t("OutboundLink")],1)]),e._v(" "),t("td",{staticStyle:{"text-align":"center"}},[t("a",{attrs:{href:"https://github.com/btcpayserver/docker-letsencrypt-nginx-proxy-companion",target:"_blank",rel:"noopener noreferrer"}},[e._v("Github"),t("OutboundLink")],1),e._v(" - "),t("a",{attrs:{href:"https://hub.docker.com/r/btcpayserver/letsencrypt-nginx-proxy-companion",target:"_blank",rel:"noopener noreferrer"}},[e._v("DockerHub"),t("OutboundLink")],1)])]),e._v(" "),t("tr",[t("td",[e._v("nginx")]),e._v(" "),t("td",[e._v("1.25.3-bookworm")]),e._v(" "),t("td",{staticStyle:{"text-align":"center"}},[t("a",{attrs:{href:"https://raw.githubusercontent.com/nginxinc/docker-nginx/1.23.2/stable/debian/Dockerfile",target:"_blank",rel:"noopener noreferrer"}},[e._v("✔️"),t("OutboundLink")],1)]),e._v(" "),t("td",{staticStyle:{"text-align":"center"}},[t("a",{attrs:{href:"https://raw.githubusercontent.com/nginxinc/docker-nginx/1.23.2/stable/debian/Dockerfile",target:"_blank",rel:"noopener noreferrer"}},[e._v("✔️"),t("OutboundLink")],1)]),e._v(" "),t("td",{staticStyle:{"text-align":"center"}},[t("a",{attrs:{href:"https://raw.githubusercontent.com/nginxinc/docker-nginx/1.23.2/stable/debian/Dockerfile",target:"_blank",rel:"noopener noreferrer"}},[e._v("✔️"),t("OutboundLink")],1)]),e._v(" "),t("td",{staticStyle:{"text-align":"center"}},[t("a",{attrs:{href:"https://github.com/nginxinc/docker-nginx",target:"_blank",rel:"noopener noreferrer"}},[e._v("Github"),t("OutboundLink")],1),e._v(" - "),t("a",{attrs:{href:"https://hub.docker.com/_/nginx",target:"_blank",rel:"noopener noreferrer"}},[e._v("DockerHub"),t("OutboundLink")],1)])]),e._v(" "),t("tr",[t("td",[e._v("btcpayserver/docker-gen")]),e._v(" "),t("td",[e._v("0.10.7")]),e._v(" "),t("td",{staticStyle:{"text-align":"center"}},[t("a",{attrs:{href:"https://raw.githubusercontent.com/btcpayserver/docker-gen/0.10.7/Dockerfile.alpine",target:"_blank",rel:"noopener noreferrer"}},[e._v("✔️"),t("OutboundLink")],1)]),e._v(" "),t("td",{staticStyle:{"text-align":"center"}},[t("a",{attrs:{href:"https://raw.githubusercontent.com/btcpayserver/docker-gen/0.10.7/Dockerfile.alpine",target:"_blank",rel:"noopener noreferrer"}},[e._v("✔️"),t("OutboundLink")],1)]),e._v(" "),t("td",{staticStyle:{"text-align":"center"}},[t("a",{attrs:{href:"https://raw.githubusercontent.com/btcpayserver/docker-gen/0.10.7/Dockerfile.alpine",target:"_blank",rel:"noopener noreferrer"}},[e._v("✔️"),t("OutboundLink")],1)]),e._v(" "),t("td",{staticStyle:{"text-align":"center"}},[t("a",{attrs:{href:"https://github.com/btcpayserver/docker-gen",target:"_blank",rel:"noopener noreferrer"}},[e._v("Github"),t("OutboundLink")],1),e._v(" - "),t("a",{attrs:{href:"https://hub.docker.com/r/btcpayserver/docker-gen",target:"_blank",rel:"noopener noreferrer"}},[e._v("DockerHub"),t("OutboundLink")],1)])]),e._v(" "),t("tr",[t("td",[e._v("btcpayserver/btctransmuter")]),e._v(" "),t("td",[e._v("0.0.59")]),e._v(" "),t("td",{staticStyle:{"text-align":"center"}},[t("a",{attrs:{href:"https://raw.githubusercontent.com/btcpayserver/btctransmuter/v0.0.59/Dockerfiles/amd64.Dockerfile",target:"_blank",rel:"noopener noreferrer"}},[e._v("✔️"),t("OutboundLink")],1)]),e._v(" "),t("td",{staticStyle:{"text-align":"center"}},[t("a",{attrs:{href:"https://raw.githubusercontent.com/btcpayserver/btctransmuter/v0.0.59/Dockerfiles/arm32v7.Dockerfile",target:"_blank",rel:"noopener noreferrer"}},[e._v("✔️"),t("OutboundLink")],1)]),e._v(" "),t("td",{staticStyle:{"text-align":"center"}},[t("a",{attrs:{href:"https://raw.githubusercontent.com/btcpayserver/btctransmuter/v0.0.59/Dockerfiles/arm64v8.Dockerfile",target:"_blank",rel:"noopener noreferrer"}},[e._v("✔️"),t("OutboundLink")],1)]),e._v(" "),t("td",{staticStyle:{"text-align":"center"}},[t("a",{attrs:{href:"https://github.com/btcpayserver/btctransmuter",target:"_blank",rel:"noopener noreferrer"}},[e._v("Github"),t("OutboundLink")],1),e._v(" - "),t("a",{attrs:{href:"https://hub.docker.com/r/btcpayserver/btctransmuter",target:"_blank",rel:"noopener noreferrer"}},[e._v("DockerHub"),t("OutboundLink")],1)])]),e._v(" "),t("tr",[t("td",[e._v("btcpayserver/cloudflared")]),e._v(" "),t("td",[e._v("2023.10.0")]),e._v(" "),t("td",{staticStyle:{"text-align":"center"}},[t("a",{attrs:{href:"https://raw.githubusercontent.com/btcpayserver/dockerfile-deps/Cloudflared/2023.10.0/Cloudflared/2023.10.0/linuxamd64.Dockerfile",target:"_blank",rel:"noopener noreferrer"}},[e._v("✔️"),t("OutboundLink")],1)]),e._v(" "),t("td",{staticStyle:{"text-align":"center"}},[t("a",{attrs:{href:"https://raw.githubusercontent.com/btcpayserver/dockerfile-deps/Cloudflared/2023.10.0/Cloudflared/2023.10.0/linuxarm32v7.Dockerfile",target:"_blank",rel:"noopener noreferrer"}},[e._v("✔️"),t("OutboundLink")],1)]),e._v(" "),t("td",{staticStyle:{"text-align":"center"}},[t("a",{attrs:{href:"https://raw.githubusercontent.com/btcpayserver/dockerfile-deps/Cloudflared/2023.10.0/Cloudflared/2023.10.0/linuxarm64v8.Dockerfile",target:"_blank",rel:"noopener noreferrer"}},[e._v("✔️"),t("OutboundLink")],1)]),e._v(" "),t("td",{staticStyle:{"text-align":"center"}},[t("a",{attrs:{href:"https://github.com/btcpayserver/dockerfile-deps",target:"_blank",rel:"noopener noreferrer"}},[e._v("Github"),t("OutboundLink")],1),e._v(" - "),t("a",{attrs:{href:"https://hub.docker.com/r/btcpayserver/cloudflared",target:"_blank",rel:"noopener noreferrer"}},[e._v("DockerHub"),t("OutboundLink")],1)])]),e._v(" "),t("tr",[t("td",[e._v("btcpayserver/btcpayserver-configurator")]),e._v(" "),t("td",[e._v("0.0.21")]),e._v(" "),t("td",{staticStyle:{"text-align":"center"}},[t("a",{attrs:{href:"https://raw.githubusercontent.com/btcpayserver/btcpayserver-configurator/v0.0.21/Dockerfiles/amd64.Dockerfile",target:"_blank",rel:"noopener noreferrer"}},[e._v("✔️"),t("OutboundLink")],1)]),e._v(" "),t("td",{staticStyle:{"text-align":"center"}},[t("a",{attrs:{href:"https://raw.githubusercontent.com/btcpayserver/btcpayserver-configurator/v0.0.21/Dockerfiles/arm32v7.Dockerfile",target:"_blank",rel:"noopener noreferrer"}},[e._v("✔️"),t("OutboundLink")],1)]),e._v(" "),t("td",{staticStyle:{"text-align":"center"}},[t("a",{attrs:{href:"https://raw.githubusercontent.com/btcpayserver/btcpayserver-configurator/v0.0.21/Dockerfiles/arm64v8.Dockerfile",target:"_blank",rel:"noopener noreferrer"}},[e._v("✔️"),t("OutboundLink")],1)]),e._v(" "),t("td",{staticStyle:{"text-align":"center"}},[t("a",{attrs:{href:"https://github.com/btcpayserver/btcpayserver-configurator",target:"_blank",rel:"noopener noreferrer"}},[e._v("Github"),t("OutboundLink")],1),e._v(" - "),t("a",{attrs:{href:"https://hub.docker.com/r/btcpayserver/btcpayserver-configurator",target:"_blank",rel:"noopener noreferrer"}},[e._v("DockerHub"),t("OutboundLink")],1)])]),e._v(" "),t("tr",[t("td",[e._v("btcpayserver/eps")]),e._v(" "),t("td",[e._v("0.2.2")]),e._v(" "),t("td",{staticStyle:{"text-align":"center"}},[t("a",{attrs:{href:"https://raw.githubusercontent.com/btcpayserver/dockerfile-deps/EPS/0.2.2/EPS/0.2.2/linuxamd64.Dockerfile",target:"_blank",rel:"noopener noreferrer"}},[e._v("✔️"),t("OutboundLink")],1)]),e._v(" "),t("td",{staticStyle:{"text-align":"center"}},[t("a",{attrs:{href:"https://raw.githubusercontent.com/btcpayserver/dockerfile-deps/EPS/0.2.2/EPS/0.2.2/linuxarm32v7.Dockerfile",target:"_blank",rel:"noopener noreferrer"}},[e._v("✔️"),t("OutboundLink")],1)]),e._v(" "),t("td",{staticStyle:{"text-align":"center"}},[t("a",{attrs:{href:"https://raw.githubusercontent.com/btcpayserver/dockerfile-deps/EPS/0.2.2/EPS/0.2.2/linuxarm64v8.Dockerfile",target:"_blank",rel:"noopener noreferrer"}},[e._v("✔️"),t("OutboundLink")],1)]),e._v(" "),t("td",{staticStyle:{"text-align":"center"}},[t("a",{attrs:{href:"https://github.com/btcpayserver/dockerfile-deps",target:"_blank",rel:"noopener noreferrer"}},[e._v("Github"),t("OutboundLink")],1),e._v(" - "),t("a",{attrs:{href:"https://hub.docker.com/r/btcpayserver/eps",target:"_blank",rel:"noopener noreferrer"}},[e._v("DockerHub"),t("OutboundLink")],1)])]),e._v(" "),t("tr",[t("td",[e._v("btcpayserver/joinmarket")]),e._v(" "),t("td",[e._v("0.9.10")]),e._v(" "),t("td",{staticStyle:{"text-align":"center"}},[t("a",{attrs:{href:"https://raw.githubusercontent.com/btcpayserver/dockerfile-deps/JoinMarket/0.9.10/JoinMarket/0.9.10/linuxamd64.Dockerfile",target:"_blank",rel:"noopener noreferrer"}},[e._v("✔️"),t("OutboundLink")],1)]),e._v(" "),t("td",{staticStyle:{"text-align":"center"}},[t("a",{attrs:{href:"https://raw.githubusercontent.com/btcpayserver/dockerfile-deps/JoinMarket/0.9.10/JoinMarket/0.9.10/linuxarm32v7.Dockerfile",target:"_blank",rel:"noopener noreferrer"}},[e._v("✔️"),t("OutboundLink")],1)]),e._v(" "),t("td",{staticStyle:{"text-align":"center"}},[t("a",{attrs:{href:"https://raw.githubusercontent.com/btcpayserver/dockerfile-deps/JoinMarket/0.9.10/JoinMarket/0.9.10/linuxarm64v8.Dockerfile",target:"_blank",rel:"noopener noreferrer"}},[e._v("✔️"),t("OutboundLink")],1)]),e._v(" "),t("td",{staticStyle:{"text-align":"center"}},[t("a",{attrs:{href:"https://github.com/btcpayserver/dockerfile-deps",target:"_blank",rel:"noopener noreferrer"}},[e._v("Github"),t("OutboundLink")],1),e._v(" - "),t("a",{attrs:{href:"https://hub.docker.com/r/btcpayserver/joinmarket",target:"_blank",rel:"noopener noreferrer"}},[e._v("DockerHub"),t("OutboundLink")],1)])]),e._v(" "),t("tr",[t("td",[e._v("nicolasdorier/ndlc-cli")]),e._v(" "),t("td",[e._v("1.0.1")]),e._v(" "),t("td",{staticStyle:{"text-align":"center"}},[t("a",{attrs:{href:"https://raw.githubusercontent.com/dgarage/ndlc/releases/1.0.1/amd64.Dockerfile",target:"_blank",rel:"noopener noreferrer"}},[e._v("✔️"),t("OutboundLink")],1)]),e._v(" "),t("td",{staticStyle:{"text-align":"center"}},[t("a",{attrs:{href:"https://raw.githubusercontent.com/dgarage/ndlc/releases/1.0.1/arm32v7.Dockerfile",target:"_blank",rel:"noopener noreferrer"}},[e._v("✔️"),t("OutboundLink")],1)]),e._v(" "),t("td",{staticStyle:{"text-align":"center"}},[t("a",{attrs:{href:"https://raw.githubusercontent.com/dgarage/ndlc/releases/1.0.1/arm64v8.Dockerfile",target:"_blank",rel:"noopener noreferrer"}},[e._v("✔️"),t("OutboundLink")],1)]),e._v(" "),t("td",{staticStyle:{"text-align":"center"}},[t("a",{attrs:{href:"https://github.com/dgarage/ndlc",target:"_blank",rel:"noopener noreferrer"}},[e._v("Github"),t("OutboundLink")],1),e._v(" - "),t("a",{attrs:{href:"https://hub.docker.com/r/nicolasdorier/ndlc-cli",target:"_blank",rel:"noopener noreferrer"}},[e._v("DockerHub"),t("OutboundLink")],1)])]),e._v(" "),t("tr",[t("td",[e._v("pihole/pihole")]),e._v(" "),t("td",[e._v("2023.05.2")]),e._v(" "),t("td",{staticStyle:{"text-align":"center"}},[t("a",{attrs:{href:"https://raw.githubusercontent.com/pi-hole/docker-pi-hole/2023.05.2/src/Dockerfile",target:"_blank",rel:"noopener noreferrer"}},[e._v("✔️"),t("OutboundLink")],1)]),e._v(" "),t("td",{staticStyle:{"text-align":"center"}},[t("a",{attrs:{href:"https://raw.githubusercontent.com/pi-hole/docker-pi-hole/2023.05.2/src/Dockerfile",target:"_blank",rel:"noopener noreferrer"}},[e._v("✔️"),t("OutboundLink")],1)]),e._v(" "),t("td",{staticStyle:{"text-align":"center"}},[t("a",{attrs:{href:"https://raw.githubusercontent.com/pi-hole/docker-pi-hole/2023.05.2/src/Dockerfile",target:"_blank",rel:"noopener noreferrer"}},[e._v("✔️"),t("OutboundLink")],1)]),e._v(" "),t("td",{staticStyle:{"text-align":"center"}},[t("a",{attrs:{href:"https://github.com/pi-hole/docker-pi-hole",target:"_blank",rel:"noopener noreferrer"}},[e._v("Github"),t("OutboundLink")],1),e._v(" - "),t("a",{attrs:{href:"https://hub.docker.com/r/pihole/pihole",target:"_blank",rel:"noopener noreferrer"}},[e._v("DockerHub"),t("OutboundLink")],1)])]),e._v(" "),t("tr",[t("td",[e._v("btcpayserver/snapdrop")]),e._v(" "),t("td",[e._v("1.2")]),e._v(" "),t("td",{staticStyle:{"text-align":"center"}},[t("a",{attrs:{href:"https://raw.githubusercontent.com/btcpayserver/dockerfile-deps/Snapdrop/1.2/Snapdrop/1.2/Dockerfile",target:"_blank",rel:"noopener noreferrer"}},[e._v("✔️"),t("OutboundLink")],1)]),e._v(" "),t("td",{staticStyle:{"text-align":"center"}},[t("a",{attrs:{href:"https://raw.githubusercontent.com/btcpayserver/dockerfile-deps/Snapdrop/1.2/Snapdrop/1.2/Dockerfile",target:"_blank",rel:"noopener noreferrer"}},[e._v("✔️"),t("OutboundLink")],1)]),e._v(" "),t("td",{staticStyle:{"text-align":"center"}},[t("a",{attrs:{href:"https://raw.githubusercontent.com/btcpayserver/dockerfile-deps/Snapdrop/1.2/Snapdrop/1.2/Dockerfile",target:"_blank",rel:"noopener noreferrer"}},[e._v("✔️"),t("OutboundLink")],1)]),e._v(" "),t("td",{staticStyle:{"text-align":"center"}},[t("a",{attrs:{href:"https://github.com/btcpayserver/dockerfile-deps",target:"_blank",rel:"noopener noreferrer"}},[e._v("Github"),t("OutboundLink")],1),e._v(" - "),t("a",{attrs:{href:"https://hub.docker.com/r/btcpayserver/snapdrop",target:"_blank",rel:"noopener noreferrer"}},[e._v("DockerHub"),t("OutboundLink")],1)])]),e._v(" "),t("tr",[t("td",[e._v("btcpayserver/tor")]),e._v(" "),t("td",[e._v("0.4.8.10")]),e._v(" "),t("td",{staticStyle:{"text-align":"center"}},[t("a",{attrs:{href:"https://raw.githubusercontent.com/btcpayserver/dockerfile-deps/Tor/0.4.8.10/Tor/0.4.8.10/linuxamd64.Dockerfile",target:"_blank",rel:"noopener noreferrer"}},[e._v("✔️"),t("OutboundLink")],1)]),e._v(" "),t("td",{staticStyle:{"text-align":"center"}},[t("a",{attrs:{href:"https://raw.githubusercontent.com/btcpayserver/dockerfile-deps/Tor/0.4.8.10/Tor/0.4.8.10/linuxarm32v7.Dockerfile",target:"_blank",rel:"noopener noreferrer"}},[e._v("✔️"),t("OutboundLink")],1)]),e._v(" "),t("td",{staticStyle:{"text-align":"center"}},[t("a",{attrs:{href:"https://raw.githubusercontent.com/btcpayserver/dockerfile-deps/Tor/0.4.8.10/Tor/0.4.8.10/linuxarm64v8.Dockerfile",target:"_blank",rel:"noopener noreferrer"}},[e._v("✔️"),t("OutboundLink")],1)]),e._v(" "),t("td",{staticStyle:{"text-align":"center"}},[t("a",{attrs:{href:"https://github.com/btcpayserver/dockerfile-deps",target:"_blank",rel:"noopener noreferrer"}},[e._v("Github"),t("OutboundLink")],1),e._v(" - "),t("a",{attrs:{href:"https://hub.docker.com/r/btcpayserver/tor",target:"_blank",rel:"noopener noreferrer"}},[e._v("DockerHub"),t("OutboundLink")],1)])]),e._v(" "),t("tr",[t("td",[e._v("btcpayserver/woocommerce")]),e._v(" "),t("td",[e._v("3.1.0")]),e._v(" "),t("td",{staticStyle:{"text-align":"center"}},[t("a",{attrs:{href:"https://raw.githubusercontent.com/btcpayserver/dockerfile-deps/WooCommerce/3.1.0/WooCommerce/3.1.0/linuxamd64.Dockerfile",target:"_blank",rel:"noopener noreferrer"}},[e._v("✔️"),t("OutboundLink")],1)]),e._v(" "),t("td",{staticStyle:{"text-align":"center"}},[e._v("️❌")]),e._v(" "),t("td",{staticStyle:{"text-align":"center"}},[t("a",{attrs:{href:"https://raw.githubusercontent.com/btcpayserver/dockerfile-deps/WooCommerce/3.1.0/WooCommerce/3.1.0/linuxarm64v8.Dockerfile",target:"_blank",rel:"noopener noreferrer"}},[e._v("✔️"),t("OutboundLink")],1)]),e._v(" "),t("td",{staticStyle:{"text-align":"center"}},[t("a",{attrs:{href:"https://github.com/btcpayserver/dockerfile-deps",target:"_blank",rel:"noopener noreferrer"}},[e._v("Github"),t("OutboundLink")],1),e._v(" - "),t("a",{attrs:{href:"https://hub.docker.com/r/btcpayserver/woocommerce",target:"_blank",rel:"noopener noreferrer"}},[e._v("DockerHub"),t("OutboundLink")],1)])]),e._v(" "),t("tr",[t("td",[e._v("btcpayserver/postgres")]),e._v(" "),t("td",[e._v("13.13")]),e._v(" "),t("td",{staticStyle:{"text-align":"center"}},[t("a",{attrs:{href:"https://raw.githubusercontent.com/btcpayserver/dockerfile-deps/Postgres/13.13/Postgres/13.13/linuxamd64.Dockerfile",target:"_blank",rel:"noopener noreferrer"}},[e._v("✔️"),t("OutboundLink")],1)]),e._v(" "),t("td",{staticStyle:{"text-align":"center"}},[t("a",{attrs:{href:"https://raw.githubusercontent.com/btcpayserver/dockerfile-deps/Postgres/13.13/Postgres/13.13/linuxarm32v7.Dockerfile",target:"_blank",rel:"noopener noreferrer"}},[e._v("✔️"),t("OutboundLink")],1)]),e._v(" "),t("td",{staticStyle:{"text-align":"center"}},[t("a",{attrs:{href:"https://raw.githubusercontent.com/btcpayserver/dockerfile-deps/Postgres/13.13/Postgres/13.13/linuxarm64v8.Dockerfile",target:"_blank",rel:"noopener noreferrer"}},[e._v("✔️"),t("OutboundLink")],1)]),e._v(" "),t("td",{staticStyle:{"text-align":"center"}},[t("a",{attrs:{href:"https://github.com/btcpayserver/dockerfile-deps",target:"_blank",rel:"noopener noreferrer"}},[e._v("Github"),t("OutboundLink")],1),e._v(" - "),t("a",{attrs:{href:"https://hub.docker.com/r/btcpayserver/postgres",target:"_blank",rel:"noopener noreferrer"}},[e._v("DockerHub"),t("OutboundLink")],1)])]),e._v(" "),t("tr",[t("td",[e._v("kamigawabul/btglnd")]),e._v(" "),t("td",[e._v("latest")]),e._v(" "),t("td",{staticStyle:{"text-align":"center"}},[t("a",{attrs:{href:"https://raw.githubusercontent.com/vutov/lnd/master/Dockerfile",target:"_blank",rel:"noopener noreferrer"}},[e._v("✔️"),t("OutboundLink")],1)]),e._v(" "),t("td",{staticStyle:{"text-align":"center"}},[e._v("️❌")]),e._v(" "),t("td",{staticStyle:{"text-align":"center"}},[e._v("️❌")]),e._v(" "),t("td",{staticStyle:{"text-align":"center"}},[t("a",{attrs:{href:"https://github.com/vutov/lnd",target:"_blank",rel:"noopener noreferrer"}},[e._v("Github"),t("OutboundLink")],1),e._v(" - "),t("a",{attrs:{href:"https://hub.docker.com/r/kamigawabul/btglnd",target:"_blank",rel:"noopener noreferrer"}},[e._v("DockerHub"),t("OutboundLink")],1)])]),e._v(" "),t("tr",[t("td",[e._v("kamigawabul/docker-bitcoingold")]),e._v(" "),t("td",[e._v("0.15.2")]),e._v(" "),t("td",{staticStyle:{"text-align":"center"}},[t("a",{attrs:{href:"https://raw.githubusercontent.com/Vutov/docker-bitcoin/master/bitcoingold/0.15.2/Dockerfile",target:"_blank",rel:"noopener noreferrer"}},[e._v("✔️"),t("OutboundLink")],1)]),e._v(" "),t("td",{staticStyle:{"text-align":"center"}},[e._v("️❌")]),e._v(" "),t("td",{staticStyle:{"text-align":"center"}},[e._v("️❌")]),e._v(" "),t("td",{staticStyle:{"text-align":"center"}},[t("a",{attrs:{href:"https://github.com/Vutov/docker-bitcoin",target:"_blank",rel:"noopener noreferrer"}},[e._v("Github"),t("OutboundLink")],1),e._v(" - "),t("a",{attrs:{href:"https://hub.docker.com/r/kamigawabul/docker-bitcoingold",target:"_blank",rel:"noopener noreferrer"}},[e._v("DockerHub"),t("OutboundLink")],1)])]),e._v(" "),t("tr",[t("td",[e._v("acinq/eclair")]),e._v(" "),t("td",[e._v("release-0.7.0")]),e._v(" "),t("td",{staticStyle:{"text-align":"center"}},[t("a",{attrs:{href:"https://raw.githubusercontent.com/ACINQ/eclair/v0.7.0/Dockerfile",target:"_blank",rel:"noopener noreferrer"}},[e._v("✔️"),t("OutboundLink")],1)]),e._v(" "),t("td",{staticStyle:{"text-align":"center"}},[e._v("️❌")]),e._v(" "),t("td",{staticStyle:{"text-align":"center"}},[e._v("️❌")]),e._v(" "),t("td",{staticStyle:{"text-align":"center"}},[t("a",{attrs:{href:"https://github.com/ACINQ/eclair",target:"_blank",rel:"noopener noreferrer"}},[e._v("Github"),t("OutboundLink")],1),e._v(" - "),t("a",{attrs:{href:"https://hub.docker.com/r/acinq/eclair",target:"_blank",rel:"noopener noreferrer"}},[e._v("DockerHub"),t("OutboundLink")],1)])]),e._v(" "),t("tr",[t("td",[e._v("chekaz/docker-bitcoinplus")]),e._v(" "),t("td",[e._v("2.7.0")]),e._v(" "),t("td",{staticStyle:{"text-align":"center"}},[t("a",{attrs:{href:"https://raw.githubusercontent.com/ChekaZ/docker/master/bitcoinplus/2.7.0/Dockerfile",target:"_blank",rel:"noopener noreferrer"}},[e._v("✔️"),t("OutboundLink")],1)]),e._v(" "),t("td",{staticStyle:{"text-align":"center"}},[e._v("️❌")]),e._v(" "),t("td",{staticStyle:{"text-align":"center"}},[e._v("️❌")]),e._v(" "),t("td",{staticStyle:{"text-align":"center"}},[t("a",{attrs:{href:"https://github.com/ChekaZ/docker",target:"_blank",rel:"noopener noreferrer"}},[e._v("Github"),t("OutboundLink")],1),e._v(" - "),t("a",{attrs:{href:"https://hub.docker.com/r/chekaz/docker-bitcoinplus",target:"_blank",rel:"noopener noreferrer"}},[e._v("DockerHub"),t("OutboundLink")],1)])]),e._v(" "),t("tr",[t("td",[e._v("dalijolijo/docker-bitcore")]),e._v(" "),t("td",[e._v("0.90.9.10")]),e._v(" "),t("td",{staticStyle:{"text-align":"center"}},[t("a",{attrs:{href:"https://raw.githubusercontent.com/dalijolijo/btcpayserver-docker-bitcore/master/docker-bitcored/Dockerfile",target:"_blank",rel:"noopener noreferrer"}},[e._v("✔️"),t("OutboundLink")],1)]),e._v(" "),t("td",{staticStyle:{"text-align":"center"}},[e._v("️❌")]),e._v(" "),t("td",{staticStyle:{"text-align":"center"}},[e._v("️❌")]),e._v(" "),t("td",{staticStyle:{"text-align":"center"}},[t("a",{attrs:{href:"https://github.com/dalijolijo/btcpayserver-docker-bitcore",target:"_blank",rel:"noopener noreferrer"}},[e._v("Github"),t("OutboundLink")],1),e._v(" - "),t("a",{attrs:{href:"https://hub.docker.com/r/dalijolijo/docker-bitcore",target:"_blank",rel:"noopener noreferrer"}},[e._v("DockerHub"),t("OutboundLink")],1)])]),e._v(" "),t("tr",[t("td",[e._v("btcpayserver/dash")]),e._v(" "),t("td",[e._v("20.1.0")]),e._v(" "),t("td",{staticStyle:{"text-align":"center"}},[t("a",{attrs:{href:"https://raw.githubusercontent.com/btcpayserver/dockerfile-deps/Dash/20.1.0/Dash/20.1.0/linuxamd64.Dockerfile",target:"_blank",rel:"noopener noreferrer"}},[e._v("✔️"),t("OutboundLink")],1)]),e._v(" "),t("td",{staticStyle:{"text-align":"center"}},[e._v("️❌")]),e._v(" "),t("td",{staticStyle:{"text-align":"center"}},[t("a",{attrs:{href:"https://raw.githubusercontent.com/btcpayserver/dockerfile-deps/Dash/20.1.0/Dash/20.1.0/linuxarm64v8.Dockerfile",target:"_blank",rel:"noopener noreferrer"}},[e._v("✔️"),t("OutboundLink")],1)]),e._v(" "),t("td",{staticStyle:{"text-align":"center"}},[t("a",{attrs:{href:"https://github.com/btcpayserver/dockerfile-deps",target:"_blank",rel:"noopener noreferrer"}},[e._v("Github"),t("OutboundLink")],1),e._v(" - "),t("a",{attrs:{href:"https://hub.docker.com/r/btcpayserver/dash",target:"_blank",rel:"noopener noreferrer"}},[e._v("DockerHub"),t("OutboundLink")],1)])]),e._v(" "),t("tr",[t("td",[e._v("btcpayserver/dogecoin")]),e._v(" "),t("td",[e._v("1.14.7")]),e._v(" "),t("td",{staticStyle:{"text-align":"center"}},[t("a",{attrs:{href:"https://raw.githubusercontent.com/btcpayserver/dockerfile-deps/Dogecoin/1.14.7/Dogecoin/1.14.7/linuxamd64.Dockerfile",target:"_blank",rel:"noopener noreferrer"}},[e._v("✔️"),t("OutboundLink")],1)]),e._v(" "),t("td",{staticStyle:{"text-align":"center"}},[e._v("️❌")]),e._v(" "),t("td",{staticStyle:{"text-align":"center"}},[e._v("️❌")]),e._v(" "),t("td",{staticStyle:{"text-align":"center"}},[t("a",{attrs:{href:"https://github.com/btcpayserver/dockerfile-deps",target:"_blank",rel:"noopener noreferrer"}},[e._v("Github"),t("OutboundLink")],1),e._v(" - "),t("a",{attrs:{href:"https://hub.docker.com/r/btcpayserver/dogecoin",target:"_blank",rel:"noopener noreferrer"}},[e._v("DockerHub"),t("OutboundLink")],1)])]),e._v(" "),t("tr",[t("td",[e._v("chekaz/docker-feathercoin")]),e._v(" "),t("td",[e._v("0.16.3")]),e._v(" "),t("td",{staticStyle:{"text-align":"center"}},[t("a",{attrs:{href:"https://raw.githubusercontent.com/ChekaZ/docker/master/feathercoin/0.16.3/Dockerfile",target:"_blank",rel:"noopener noreferrer"}},[e._v("✔️"),t("OutboundLink")],1)]),e._v(" "),t("td",{staticStyle:{"text-align":"center"}},[e._v("️❌")]),e._v(" "),t("td",{staticStyle:{"text-align":"center"}},[e._v("️❌")]),e._v(" "),t("td",{staticStyle:{"text-align":"center"}},[t("a",{attrs:{href:"https://github.com/ChekaZ/docker",target:"_blank",rel:"noopener noreferrer"}},[e._v("Github"),t("OutboundLink")],1),e._v(" - "),t("a",{attrs:{href:"https://hub.docker.com/r/chekaz/docker-feathercoin",target:"_blank",rel:"noopener noreferrer"}},[e._v("DockerHub"),t("OutboundLink")],1)])]),e._v(" "),t("tr",[t("td",[e._v("groestlcoin/lightning")]),e._v(" "),t("td",[e._v("v23.05")]),e._v(" "),t("td",{staticStyle:{"text-align":"center"}},[t("a",{attrs:{href:"https://raw.githubusercontent.com/Groestlcoin/lightning/v23.05/Dockerfile",target:"_blank",rel:"noopener noreferrer"}},[e._v("✔️"),t("OutboundLink")],1)]),e._v(" "),t("td",{staticStyle:{"text-align":"center"}},[e._v("️❌")]),e._v(" "),t("td",{staticStyle:{"text-align":"center"}},[e._v("️❌")]),e._v(" "),t("td",{staticStyle:{"text-align":"center"}},[t("a",{attrs:{href:"https://github.com/Groestlcoin/lightning",target:"_blank",rel:"noopener noreferrer"}},[e._v("Github"),t("OutboundLink")],1),e._v(" - "),t("a",{attrs:{href:"https://hub.docker.com/r/groestlcoin/lightning",target:"_blank",rel:"noopener noreferrer"}},[e._v("DockerHub"),t("OutboundLink")],1)])]),e._v(" "),t("tr",[t("td",[e._v("groestlcoin/groestlcoin-lightning-charge")]),e._v(" "),t("td",[e._v("version-0.4.22")]),e._v(" "),t("td",{staticStyle:{"text-align":"center"}},[t("a",{attrs:{href:"https://raw.githubusercontent.com/Groestlcoin/groestlcoin-lightning-charge/v0.4.22/Dockerfile",target:"_blank",rel:"noopener noreferrer"}},[e._v("✔️"),t("OutboundLink")],1)]),e._v(" "),t("td",{staticStyle:{"text-align":"center"}},[e._v("️❌")]),e._v(" "),t("td",{staticStyle:{"text-align":"center"}},[e._v("️❌")]),e._v(" "),t("td",{staticStyle:{"text-align":"center"}},[t("a",{attrs:{href:"https://github.com/Groestlcoin/groestlcoin-lightning-charge",target:"_blank",rel:"noopener noreferrer"}},[e._v("Github"),t("OutboundLink")],1),e._v(" - "),t("a",{attrs:{href:"https://hub.docker.com/r/groestlcoin/groestlcoin-lightning-charge",target:"_blank",rel:"noopener noreferrer"}},[e._v("DockerHub"),t("OutboundLink")],1)])]),e._v(" "),t("tr",[t("td",[e._v("groestlcoin/groestlcoin-spark")]),e._v(" "),t("td",[e._v("version-0.2.16")]),e._v(" "),t("td",{staticStyle:{"text-align":"center"}},[t("a",{attrs:{href:"https://raw.githubusercontent.com/Groestlcoin/groestlcoin-spark/v0.2.16/Dockerfile",target:"_blank",rel:"noopener noreferrer"}},[e._v("✔️"),t("OutboundLink")],1)]),e._v(" "),t("td",{staticStyle:{"text-align":"center"}},[e._v("️❌")]),e._v(" "),t("td",{staticStyle:{"text-align":"center"}},[e._v("️❌")]),e._v(" "),t("td",{staticStyle:{"text-align":"center"}},[t("a",{attrs:{href:"https://github.com/Groestlcoin/groestlcoin-spark",target:"_blank",rel:"noopener noreferrer"}},[e._v("Github"),t("OutboundLink")],1),e._v(" - "),t("a",{attrs:{href:"https://hub.docker.com/r/groestlcoin/groestlcoin-spark",target:"_blank",rel:"noopener noreferrer"}},[e._v("DockerHub"),t("OutboundLink")],1)])]),e._v(" "),t("tr",[t("td",[e._v("groestlcoin/eclair")]),e._v(" "),t("td",[e._v("v0.6.0")]),e._v(" "),t("td",{staticStyle:{"text-align":"center"}},[t("a",{attrs:{href:"https://raw.githubusercontent.com/Groestlcoin/eclair/v0.6.0/Dockerfile",target:"_blank",rel:"noopener noreferrer"}},[e._v("✔️"),t("OutboundLink")],1)]),e._v(" "),t("td",{staticStyle:{"text-align":"center"}},[e._v("️❌")]),e._v(" "),t("td",{staticStyle:{"text-align":"center"}},[e._v("️❌")]),e._v(" "),t("td",{staticStyle:{"text-align":"center"}},[t("a",{attrs:{href:"https://github.com/Groestlcoin/eclair",target:"_blank",rel:"noopener noreferrer"}},[e._v("Github"),t("OutboundLink")],1),e._v(" - "),t("a",{attrs:{href:"https://hub.docker.com/r/groestlcoin/eclair",target:"_blank",rel:"noopener noreferrer"}},[e._v("DockerHub"),t("OutboundLink")],1)])]),e._v(" "),t("tr",[t("td",[e._v("groestlcoin/lnd")]),e._v(" "),t("td",[e._v("v0.10.0-grs")]),e._v(" "),t("td",{staticStyle:{"text-align":"center"}},[t("a",{attrs:{href:"https://raw.githubusercontent.com/Groestlcoin/lnd/v0.10.0-grs/Dockerfile",target:"_blank",rel:"noopener noreferrer"}},[e._v("✔️"),t("OutboundLink")],1)]),e._v(" "),t("td",{staticStyle:{"text-align":"center"}},[e._v("️❌")]),e._v(" "),t("td",{staticStyle:{"text-align":"center"}},[e._v("️❌")]),e._v(" "),t("td",{staticStyle:{"text-align":"center"}},[t("a",{attrs:{href:"https://github.com/Groestlcoin/lnd",target:"_blank",rel:"noopener noreferrer"}},[e._v("Github"),t("OutboundLink")],1),e._v(" - "),t("a",{attrs:{href:"https://hub.docker.com/r/groestlcoin/lnd",target:"_blank",rel:"noopener noreferrer"}},[e._v("DockerHub"),t("OutboundLink")],1)])]),e._v(" "),t("tr",[t("td",[e._v("btcpayserver/groestlcoin")]),e._v(" "),t("td",[e._v("25.0")]),e._v(" "),t("td",{staticStyle:{"text-align":"center"}},[t("a",{attrs:{href:"https://raw.githubusercontent.com/btcpayserver/dockerfile-deps/Groestlcoin/25.0/Groestlcoin/25.0/linuxamd64.Dockerfile",target:"_blank",rel:"noopener noreferrer"}},[e._v("✔️"),t("OutboundLink")],1)]),e._v(" "),t("td",{staticStyle:{"text-align":"center"}},[t("a",{attrs:{href:"https://raw.githubusercontent.com/btcpayserver/dockerfile-deps/Groestlcoin/25.0/Groestlcoin/25.0/linuxarm32v7.Dockerfile",target:"_blank",rel:"noopener noreferrer"}},[e._v("✔️"),t("OutboundLink")],1)]),e._v(" "),t("td",{staticStyle:{"text-align":"center"}},[t("a",{attrs:{href:"https://raw.githubusercontent.com/btcpayserver/dockerfile-deps/Groestlcoin/25.0/Groestlcoin/25.0/linuxarm64v8.Dockerfile",target:"_blank",rel:"noopener noreferrer"}},[e._v("✔️"),t("OutboundLink")],1)]),e._v(" "),t("td",{staticStyle:{"text-align":"center"}},[t("a",{attrs:{href:"https://github.com/btcpayserver/dockerfile-deps",target:"_blank",rel:"noopener noreferrer"}},[e._v("Github"),t("OutboundLink")],1),e._v(" - "),t("a",{attrs:{href:"https://hub.docker.com/r/btcpayserver/groestlcoin",target:"_blank",rel:"noopener noreferrer"}},[e._v("DockerHub"),t("OutboundLink")],1)])]),e._v(" "),t("tr",[t("td",[e._v("btcpayserver/elements")]),e._v(" "),t("td",[e._v("23.2.3")]),e._v(" "),t("td",{staticStyle:{"text-align":"center"}},[t("a",{attrs:{href:"https://raw.githubusercontent.com/btcpayserver/dockerfile-deps/Elements/23.2.3/Elements/23.2.3/linuxamd64.Dockerfile",target:"_blank",rel:"noopener noreferrer"}},[e._v("✔️"),t("OutboundLink")],1)]),e._v(" "),t("td",{staticStyle:{"text-align":"center"}},[t("a",{attrs:{href:"https://raw.githubusercontent.com/btcpayserver/dockerfile-deps/Elements/23.2.3/Elements/23.2.3/linuxarm32v7.Dockerfile",target:"_blank",rel:"noopener noreferrer"}},[e._v("✔️"),t("OutboundLink")],1)]),e._v(" "),t("td",{staticStyle:{"text-align":"center"}},[t("a",{attrs:{href:"https://raw.githubusercontent.com/btcpayserver/dockerfile-deps/Elements/23.2.3/Elements/23.2.3/linuxarm64v8.Dockerfile",target:"_blank",rel:"noopener noreferrer"}},[e._v("✔️"),t("OutboundLink")],1)]),e._v(" "),t("td",{staticStyle:{"text-align":"center"}},[t("a",{attrs:{href:"https://github.com/btcpayserver/dockerfile-deps",target:"_blank",rel:"noopener noreferrer"}},[e._v("Github"),t("OutboundLink")],1),e._v(" - "),t("a",{attrs:{href:"https://hub.docker.com/r/btcpayserver/elements",target:"_blank",rel:"noopener noreferrer"}},[e._v("DockerHub"),t("OutboundLink")],1)])]),e._v(" "),t("tr",[t("td",[e._v("btcpayserver/litecoin")]),e._v(" "),t("td",[e._v("0.21.2.1-2")]),e._v(" "),t("td",{staticStyle:{"text-align":"center"}},[t("a",{attrs:{href:"https://raw.githubusercontent.com/btcpayserver/dockerfile-deps/Litecoin/0.21.2.1-2/Litecoin/0.21.2.1/linuxamd64.Dockerfile",target:"_blank",rel:"noopener noreferrer"}},[e._v("✔️"),t("OutboundLink")],1)]),e._v(" "),t("td",{staticStyle:{"text-align":"center"}},[t("a",{attrs:{href:"https://raw.githubusercontent.com/btcpayserver/dockerfile-deps/Litecoin/0.21.2.1-2/Litecoin/0.21.2.1/linuxarm32v7.Dockerfile",target:"_blank",rel:"noopener noreferrer"}},[e._v("✔️"),t("OutboundLink")],1)]),e._v(" "),t("td",{staticStyle:{"text-align":"center"}},[t("a",{attrs:{href:"https://raw.githubusercontent.com/btcpayserver/dockerfile-deps/Litecoin/0.21.2.1-2/Litecoin/0.21.2.1/linuxarm64v8.Dockerfile",target:"_blank",rel:"noopener noreferrer"}},[e._v("✔️"),t("OutboundLink")],1)]),e._v(" "),t("td",{staticStyle:{"text-align":"center"}},[t("a",{attrs:{href:"https://github.com/btcpayserver/dockerfile-deps",target:"_blank",rel:"noopener noreferrer"}},[e._v("Github"),t("OutboundLink")],1),e._v(" - "),t("a",{attrs:{href:"https://hub.docker.com/r/btcpayserver/litecoin",target:"_blank",rel:"noopener noreferrer"}},[e._v("DockerHub"),t("OutboundLink")],1)])]),e._v(" "),t("tr",[t("td",[e._v("wakiyamap/docker-monacoin")]),e._v(" "),t("td",[e._v("0.20.2")]),e._v(" "),t("td",{staticStyle:{"text-align":"center"}},[t("a",{attrs:{href:"https://raw.githubusercontent.com/wakiyamap/docker-bitcoin/master/monacoin/0.20.2/Dockerfile",target:"_blank",rel:"noopener noreferrer"}},[e._v("✔️"),t("OutboundLink")],1)]),e._v(" "),t("td",{staticStyle:{"text-align":"center"}},[e._v("️❌")]),e._v(" "),t("td",{staticStyle:{"text-align":"center"}},[e._v("️❌")]),e._v(" "),t("td",{staticStyle:{"text-align":"center"}},[t("a",{attrs:{href:"https://github.com/wakiyamap/docker-bitcoin",target:"_blank",rel:"noopener noreferrer"}},[e._v("Github"),t("OutboundLink")],1),e._v(" - "),t("a",{attrs:{href:"https://hub.docker.com/r/wakiyamap/docker-monacoin",target:"_blank",rel:"noopener noreferrer"}},[e._v("DockerHub"),t("OutboundLink")],1)])]),e._v(" "),t("tr",[t("td",[e._v("redis")]),e._v(" "),t("td",[e._v("6.2.2-buster")]),e._v(" "),t("td",{staticStyle:{"text-align":"center"}},[t("a",{attrs:{href:"https://raw.githubusercontent.com/docker-library/redis/f1a8498333ae3ab340b5b39fbac1d7e1dc0d628c/5.0/Dockerfile",target:"_blank",rel:"noopener noreferrer"}},[e._v("✔️"),t("OutboundLink")],1)]),e._v(" "),t("td",{staticStyle:{"text-align":"center"}},[e._v("️❌")]),e._v(" "),t("td",{staticStyle:{"text-align":"center"}},[e._v("️❌")]),e._v(" "),t("td",{staticStyle:{"text-align":"center"}},[t("a",{attrs:{href:"https://github.com/docker-library/redis",target:"_blank",rel:"noopener noreferrer"}},[e._v("Github"),t("OutboundLink")],1),e._v(" - "),t("a",{attrs:{href:"https://hub.docker.com/_/redis",target:"_blank",rel:"noopener noreferrer"}},[e._v("DockerHub"),t("OutboundLink")],1)])]),e._v(" "),t("tr",[t("td",[e._v("jvandrew/btcqbo")]),e._v(" "),t("td",[e._v("0.3.36")]),e._v(" "),t("td",{staticStyle:{"text-align":"center"}},[t("a",{attrs:{href:"https://raw.githubusercontent.com/JeffVandrewJr/btcqbo/v0.3.36/Dockerfile",target:"_blank",rel:"noopener noreferrer"}},[e._v("✔️"),t("OutboundLink")],1)]),e._v(" "),t("td",{staticStyle:{"text-align":"center"}},[e._v("️❌")]),e._v(" "),t("td",{staticStyle:{"text-align":"center"}},[e._v("️❌")]),e._v(" "),t("td",{staticStyle:{"text-align":"center"}},[t("a",{attrs:{href:"https://github.com/JeffVandrewJr/btcqbo",target:"_blank",rel:"noopener noreferrer"}},[e._v("Github"),t("OutboundLink")],1),e._v(" - "),t("a",{attrs:{href:"https://hub.docker.com/r/jvandrew/btcqbo",target:"_blank",rel:"noopener noreferrer"}},[e._v("DockerHub"),t("OutboundLink")],1)])]),e._v(" "),t("tr",[t("td",[e._v("shesek/bwt")]),e._v(" "),t("td",[e._v("0.2.2-electrum")]),e._v(" "),t("td",{staticStyle:{"text-align":"center"}},[t("a",{attrs:{href:"https://raw.githubusercontent.com/bwt-dev/bwt/v0.2.2/docker/Dockerfile",target:"_blank",rel:"noopener noreferrer"}},[e._v("✔️"),t("OutboundLink")],1)]),e._v(" "),t("td",{staticStyle:{"text-align":"center"}},[t("a",{attrs:{href:"https://raw.githubusercontent.com/bwt-dev/bwt/v0.2.2/docker/arm32v7.Dockerfile",target:"_blank",rel:"noopener noreferrer"}},[e._v("✔️"),t("OutboundLink")],1)]),e._v(" "),t("td",{staticStyle:{"text-align":"center"}},[t("a",{attrs:{href:"https://raw.githubusercontent.com/bwt-dev/bwt/v0.2.2/docker/arm64v8.Dockerfile",target:"_blank",rel:"noopener noreferrer"}},[e._v("✔️"),t("OutboundLink")],1)]),e._v(" "),t("td",{staticStyle:{"text-align":"center"}},[t("a",{attrs:{href:"https://github.com/bwt-dev/bwt",target:"_blank",rel:"noopener noreferrer"}},[e._v("Github"),t("OutboundLink")],1),e._v(" - "),t("a",{attrs:{href:"https://hub.docker.com/r/shesek/bwt",target:"_blank",rel:"noopener noreferrer"}},[e._v("DockerHub"),t("OutboundLink")],1)])]),e._v(" "),t("tr",[t("td",[e._v("chatwoot/chatwoot")]),e._v(" "),t("td",[e._v("v1.7.0")]),e._v(" "),t("td",{staticStyle:{"text-align":"center"}},[t("a",{attrs:{href:"https://raw.githubusercontent.com/chatwoot/chatwoot/v1.7.0/docker/Dockerfile",target:"_blank",rel:"noopener noreferrer"}},[e._v("✔️"),t("OutboundLink")],1)]),e._v(" "),t("td",{staticStyle:{"text-align":"center"}},[t("a",{attrs:{href:"https://raw.githubusercontent.com/chatwoot/chatwoot/v1.7.0/docker/Dockerfile",target:"_blank",rel:"noopener noreferrer"}},[e._v("✔️"),t("OutboundLink")],1)]),e._v(" "),t("td",{staticStyle:{"text-align":"center"}},[t("a",{attrs:{href:"https://raw.githubusercontent.com/chatwoot/chatwoot/v1.7.0/docker/Dockerfile",target:"_blank",rel:"noopener noreferrer"}},[e._v("✔️"),t("OutboundLink")],1)]),e._v(" "),t("td",{staticStyle:{"text-align":"center"}},[t("a",{attrs:{href:"https://github.com/chatwoot/chatwoot",target:"_blank",rel:"noopener noreferrer"}},[e._v("Github"),t("OutboundLink")],1),e._v(" - "),t("a",{attrs:{href:"https://hub.docker.com/r/chatwoot/chatwoot",target:"_blank",rel:"noopener noreferrer"}},[e._v("DockerHub"),t("OutboundLink")],1)])]),e._v(" "),t("tr",[t("td",[e._v("lukechilds/electrumx")]),e._v(" "),t("td",[e._v("latest")]),e._v(" "),t("td",{staticStyle:{"text-align":"center"}},[t("a",{attrs:{href:"https://raw.githubusercontent.com/lukechilds/docker-electrumx/master/Dockerfile",target:"_blank",rel:"noopener noreferrer"}},[e._v("✔️"),t("OutboundLink")],1)]),e._v(" "),t("td",{staticStyle:{"text-align":"center"}},[e._v("️❌")]),e._v(" "),t("td",{staticStyle:{"text-align":"center"}},[e._v("️❌")]),e._v(" "),t("td",{staticStyle:{"text-align":"center"}},[t("a",{attrs:{href:"https://github.com/lukechilds/docker-electrumx",target:"_blank",rel:"noopener noreferrer"}},[e._v("Github"),t("OutboundLink")],1),e._v(" - "),t("a",{attrs:{href:"https://hub.docker.com/r/lukechilds/electrumx",target:"_blank",rel:"noopener noreferrer"}},[e._v("DockerHub"),t("OutboundLink")],1)])]),e._v(" "),t("tr",[t("td",[e._v("fireflyiii/core")]),e._v(" "),t("td",[e._v("latest")]),e._v(" "),t("td",{staticStyle:{"text-align":"center"}},[t("a",{attrs:{href:"https://dev.azure.com/Firefly-III/66fb773b-063e-42d7-b6a5-e7729a22e8b3/_apis/git/repositories/e9c3dcf8-4533-4ef1-83cc-75527cab3377/items?path=%2FDockerfile&versionDescriptor%5BversionOptions%5D=0&versionDescriptor%5BversionType%5D=0&versionDescriptor%5Bversion%5D=main&resolveLfs=true&%24format=octetStream&api-version=5.0&download=true",target:"_blank",rel:"noopener noreferrer"}},[e._v("✔️"),t("OutboundLink")],1)]),e._v(" "),t("td",{staticStyle:{"text-align":"center"}},[t("a",{attrs:{href:"https://dev.azure.com/Firefly-III/66fb773b-063e-42d7-b6a5-e7729a22e8b3/_apis/git/repositories/e9c3dcf8-4533-4ef1-83cc-75527cab3377/items?path=%2FDockerfile&versionDescriptor%5BversionOptions%5D=0&versionDescriptor%5BversionType%5D=0&versionDescriptor%5Bversion%5D=main&resolveLfs=true&%24format=octetStream&api-version=5.0&download=true",target:"_blank",rel:"noopener noreferrer"}},[e._v("✔️"),t("OutboundLink")],1)]),e._v(" "),t("td",{staticStyle:{"text-align":"center"}},[t("a",{attrs:{href:"https://dev.azure.com/Firefly-III/66fb773b-063e-42d7-b6a5-e7729a22e8b3/_apis/git/repositories/e9c3dcf8-4533-4ef1-83cc-75527cab3377/items?path=%2FDockerfile&versionDescriptor%5BversionOptions%5D=0&versionDescriptor%5BversionType%5D=0&versionDescriptor%5Bversion%5D=main&resolveLfs=true&%24format=octetStream&api-version=5.0&download=true",target:"_blank",rel:"noopener noreferrer"}},[e._v("✔️"),t("OutboundLink")],1)]),e._v(" "),t("td",{staticStyle:{"text-align":"center"}},[t("a",{attrs:{href:"https://dev.azure.com/Firefly-III/_git/MainImage",target:"_blank",rel:"noopener noreferrer"}},[e._v("Github"),t("OutboundLink")],1),e._v(" - "),t("a",{attrs:{href:"https://hub.docker.com/r/fireflyiii/core",target:"_blank",rel:"noopener noreferrer"}},[e._v("DockerHub"),t("OutboundLink")],1)])]),e._v(" "),t("tr",[t("td",[e._v("podcastindexorg/podcasting20-helipad")]),e._v(" "),t("td",[e._v("v0.1.10")]),e._v(" "),t("td",{staticStyle:{"text-align":"center"}},[t("a",{attrs:{href:"https://raw.githubusercontent.com/Podcastindex-org/helipad/v0.1.10/umbrel/Dockerfile",target:"_blank",rel:"noopener noreferrer"}},[e._v("✔️"),t("OutboundLink")],1)]),e._v(" "),t("td",{staticStyle:{"text-align":"center"}},[t("a",{attrs:{href:"https://raw.githubusercontent.com/Podcastindex-org/helipad/v0.1.10/umbrel/Dockerfile",target:"_blank",rel:"noopener noreferrer"}},[e._v("✔️"),t("OutboundLink")],1)]),e._v(" "),t("td",{staticStyle:{"text-align":"center"}},[t("a",{attrs:{href:"https://raw.githubusercontent.com/Podcastindex-org/helipad/v0.1.10/umbrel/Dockerfile",target:"_blank",rel:"noopener noreferrer"}},[e._v("✔️"),t("OutboundLink")],1)]),e._v(" "),t("td",{staticStyle:{"text-align":"center"}},[t("a",{attrs:{href:"https://github.com/Podcastindex-org/helipad",target:"_blank",rel:"noopener noreferrer"}},[e._v("Github"),t("OutboundLink")],1),e._v(" - "),t("a",{attrs:{href:"https://hub.docker.com/r/podcastindexorg/podcasting20-helipad",target:"_blank",rel:"noopener noreferrer"}},[e._v("DockerHub"),t("OutboundLink")],1)])]),e._v(" "),t("tr",[t("td",[e._v("jvandrew/librepatron")]),e._v(" "),t("td",[e._v("0.7.39")]),e._v(" "),t("td",{staticStyle:{"text-align":"center"}},[t("a",{attrs:{href:"https://raw.githubusercontent.com/JeffVandrewJr/patron/v0.7.39/Dockerfile",target:"_blank",rel:"noopener noreferrer"}},[e._v("✔️"),t("OutboundLink")],1)]),e._v(" "),t("td",{staticStyle:{"text-align":"center"}},[e._v("️❌")]),e._v(" "),t("td",{staticStyle:{"text-align":"center"}},[e._v("️❌")]),e._v(" "),t("td",{staticStyle:{"text-align":"center"}},[t("a",{attrs:{href:"https://github.com/JeffVandrewJr/patron",target:"_blank",rel:"noopener noreferrer"}},[e._v("Github"),t("OutboundLink")],1),e._v(" - "),t("a",{attrs:{href:"https://hub.docker.com/r/jvandrew/librepatron",target:"_blank",rel:"noopener noreferrer"}},[e._v("DockerHub"),t("OutboundLink")],1)])]),e._v(" "),t("tr",[t("td",[e._v("jvandrew/isso")]),e._v(" "),t("td",[e._v("atron.22")]),e._v(" "),t("td",{staticStyle:{"text-align":"center"}},[t("a",{attrs:{href:"https://raw.githubusercontent.com/JeffVandrewJr/isso/patron.22/Dockerfile",target:"_blank",rel:"noopener noreferrer"}},[e._v("✔️"),t("OutboundLink")],1)]),e._v(" "),t("td",{staticStyle:{"text-align":"center"}},[e._v("️❌")]),e._v(" "),t("td",{staticStyle:{"text-align":"center"}},[e._v("️❌")]),e._v(" "),t("td",{staticStyle:{"text-align":"center"}},[t("a",{attrs:{href:"https://github.com/JeffVandrewJr/isso",target:"_blank",rel:"noopener noreferrer"}},[e._v("Github"),t("OutboundLink")],1),e._v(" - "),t("a",{attrs:{href:"https://hub.docker.com/r/jvandrew/isso",target:"_blank",rel:"noopener noreferrer"}},[e._v("DockerHub"),t("OutboundLink")],1)])]),e._v(" "),t("tr",[t("td",[e._v("lightninglabs/lightning-terminal")]),e._v(" "),t("td",[e._v("v0.12.3-alpha-path-prefix")]),e._v(" "),t("td",{staticStyle:{"text-align":"center"}},[t("a",{attrs:{href:"https://raw.githubusercontent.com/lightninglabs/lightning-terminal/v0.12.3-alpha/Dockerfile",target:"_blank",rel:"noopener noreferrer"}},[e._v("✔️"),t("OutboundLink")],1)]),e._v(" "),t("td",{staticStyle:{"text-align":"center"}},[e._v("️❌")]),e._v(" "),t("td",{staticStyle:{"text-align":"center"}},[t("a",{attrs:{href:"https://raw.githubusercontent.com/lightninglabs/lightning-terminal/v0.12.3-alpha/Dockerfile",target:"_blank",rel:"noopener noreferrer"}},[e._v("✔️"),t("OutboundLink")],1)]),e._v(" "),t("td",{staticStyle:{"text-align":"center"}},[t("a",{attrs:{href:"https://github.com/lightninglabs/lightning-terminal",target:"_blank",rel:"noopener noreferrer"}},[e._v("Github"),t("OutboundLink")],1),e._v(" - "),t("a",{attrs:{href:"https://hub.docker.com/r/lightninglabs/lightning-terminal",target:"_blank",rel:"noopener noreferrer"}},[e._v("DockerHub"),t("OutboundLink")],1)])]),e._v(" "),t("tr",[t("td",[e._v("mempool/frontend")]),e._v(" "),t("td",[e._v("v2.5.0")]),e._v(" "),t("td",{staticStyle:{"text-align":"center"}},[t("a",{attrs:{href:"https://raw.githubusercontent.com/mempool/mempool/v2.5.0/docker/frontend/Dockerfile",target:"_blank",rel:"noopener noreferrer"}},[e._v("✔️"),t("OutboundLink")],1)]),e._v(" "),t("td",{staticStyle:{"text-align":"center"}},[t("a",{attrs:{href:"https://raw.githubusercontent.com/mempool/mempool/v2.5.0/docker/frontend/Dockerfile",target:"_blank",rel:"noopener noreferrer"}},[e._v("✔️"),t("OutboundLink")],1)]),e._v(" "),t("td",{staticStyle:{"text-align":"center"}},[t("a",{attrs:{href:"https://raw.githubusercontent.com/mempool/mempool/v2.5.0/docker/frontend/Dockerfile",target:"_blank",rel:"noopener noreferrer"}},[e._v("✔️"),t("OutboundLink")],1)]),e._v(" "),t("td",{staticStyle:{"text-align":"center"}},[t("a",{attrs:{href:"https://github.com/mempool/mempool",target:"_blank",rel:"noopener noreferrer"}},[e._v("Github"),t("OutboundLink")],1),e._v(" - "),t("a",{attrs:{href:"https://hub.docker.com/r/mempool/frontend",target:"_blank",rel:"noopener noreferrer"}},[e._v("DockerHub"),t("OutboundLink")],1)])]),e._v(" "),t("tr",[t("td",[e._v("mempool/backend")]),e._v(" "),t("td",[e._v("v2.5.0")]),e._v(" "),t("td",{staticStyle:{"text-align":"center"}},[t("a",{attrs:{href:"https://raw.githubusercontent.com/mempool/mempool/v2.5.0/docker/backend/Dockerfile",target:"_blank",rel:"noopener noreferrer"}},[e._v("✔️"),t("OutboundLink")],1)]),e._v(" "),t("td",{staticStyle:{"text-align":"center"}},[t("a",{attrs:{href:"https://raw.githubusercontent.com/mempool/mempool/v2.5.0/docker/backend/Dockerfile",target:"_blank",rel:"noopener noreferrer"}},[e._v("✔️"),t("OutboundLink")],1)]),e._v(" "),t("td",{staticStyle:{"text-align":"center"}},[t("a",{attrs:{href:"https://raw.githubusercontent.com/mempool/mempool/v2.5.0/docker/backend/Dockerfile",target:"_blank",rel:"noopener noreferrer"}},[e._v("✔️"),t("OutboundLink")],1)]),e._v(" "),t("td",{staticStyle:{"text-align":"center"}},[t("a",{attrs:{href:"https://github.com/mempool/mempool",target:"_blank",rel:"noopener noreferrer"}},[e._v("Github"),t("OutboundLink")],1),e._v(" - "),t("a",{attrs:{href:"https://hub.docker.com/r/mempool/backend",target:"_blank",rel:"noopener noreferrer"}},[e._v("DockerHub"),t("OutboundLink")],1)])]),e._v(" "),t("tr",[t("td",[e._v("mariadb")]),e._v(" "),t("td",[e._v("10.11")]),e._v(" "),t("td",{staticStyle:{"text-align":"center"}},[t("a",{attrs:{href:"https://raw.githubusercontent.com/docker-library/mariadb/master/10.11/Dockerfile",target:"_blank",rel:"noopener noreferrer"}},[e._v("✔️"),t("OutboundLink")],1)]),e._v(" "),t("td",{staticStyle:{"text-align":"center"}},[e._v("️❌")]),e._v(" "),t("td",{staticStyle:{"text-align":"center"}},[e._v("️❌")]),e._v(" "),t("td",{staticStyle:{"text-align":"center"}},[t("a",{attrs:{href:"https://github.com/docker-library/mariadb",target:"_blank",rel:"noopener noreferrer"}},[e._v("Github"),t("OutboundLink")],1),e._v(" - "),t("a",{attrs:{href:"https://hub.docker.com/_/mariadb",target:"_blank",rel:"noopener noreferrer"}},[e._v("DockerHub"),t("OutboundLink")],1)])]),e._v(" "),t("tr",[t("td",[e._v("kukks/nnostr-relay")]),e._v(" "),t("td",[e._v("v0.0.23")]),e._v(" "),t("td",{staticStyle:{"text-align":"center"}},[t("a",{attrs:{href:"https://raw.githubusercontent.com/kukks/nnostr/Relay/v0.0.23/Relay/Dockerfile",target:"_blank",rel:"noopener noreferrer"}},[e._v("✔️"),t("OutboundLink")],1)]),e._v(" "),t("td",{staticStyle:{"text-align":"center"}},[t("a",{attrs:{href:"https://raw.githubusercontent.com/kukks/nnostr/Relay/v0.0.23/Relay/Dockerfile",target:"_blank",rel:"noopener noreferrer"}},[e._v("✔️"),t("OutboundLink")],1)]),e._v(" "),t("td",{staticStyle:{"text-align":"center"}},[t("a",{attrs:{href:"https://raw.githubusercontent.com/kukks/nnostr/Relay/v0.0.23/Relay/Dockerfile",target:"_blank",rel:"noopener noreferrer"}},[e._v("✔️"),t("OutboundLink")],1)]),e._v(" "),t("td",{staticStyle:{"text-align":"center"}},[t("a",{attrs:{href:"https://github.com/kukks/nnostr",target:"_blank",rel:"noopener noreferrer"}},[e._v("Github"),t("OutboundLink")],1),e._v(" - "),t("a",{attrs:{href:"https://hub.docker.com/r/kukks/nnostr-relay",target:"_blank",rel:"noopener noreferrer"}},[e._v("DockerHub"),t("OutboundLink")],1)])]),e._v(" "),t("tr",[t("td",[e._v("sphinxlightning/sphinx-relay")]),e._v(" "),t("td",[e._v("v2.2.9")]),e._v(" "),t("td",{staticStyle:{"text-align":"center"}},[t("a",{attrs:{href:"https://raw.githubusercontent.com/stakwork/sphinx-relay/v2.2.9/Dockerfile",target:"_blank",rel:"noopener noreferrer"}},[e._v("✔️"),t("OutboundLink")],1)]),e._v(" "),t("td",{staticStyle:{"text-align":"center"}},[t("a",{attrs:{href:"https://raw.githubusercontent.com/stakwork/sphinx-relay/v2.2.9/Dockerfile",target:"_blank",rel:"noopener noreferrer"}},[e._v("✔️"),t("OutboundLink")],1)]),e._v(" "),t("td",{staticStyle:{"text-align":"center"}},[t("a",{attrs:{href:"https://raw.githubusercontent.com/stakwork/sphinx-relay/v2.2.9/Dockerfile",target:"_blank",rel:"noopener noreferrer"}},[e._v("✔️"),t("OutboundLink")],1)]),e._v(" "),t("td",{staticStyle:{"text-align":"center"}},[t("a",{attrs:{href:"https://github.com/stakwork/sphinx-relay",target:"_blank",rel:"noopener noreferrer"}},[e._v("Github"),t("OutboundLink")],1),e._v(" - "),t("a",{attrs:{href:"https://hub.docker.com/r/sphinxlightning/sphinx-relay",target:"_blank",rel:"noopener noreferrer"}},[e._v("DockerHub"),t("OutboundLink")],1)])]),e._v(" "),t("tr",[t("td",[e._v("djbooth007/tallycoin_connect")]),e._v(" "),t("td",[e._v("v1.8.0")]),e._v(" "),t("td",{staticStyle:{"text-align":"center"}},[t("a",{attrs:{href:"https://raw.githubusercontent.com/djbooth007/tallycoin_connect/v1.8.0/Dockerfile",target:"_blank",rel:"noopener noreferrer"}},[e._v("✔️"),t("OutboundLink")],1)]),e._v(" "),t("td",{staticStyle:{"text-align":"center"}},[t("a",{attrs:{href:"https://raw.githubusercontent.com/djbooth007/tallycoin_connect/v1.8.0/Dockerfile.arm32v7",target:"_blank",rel:"noopener noreferrer"}},[e._v("✔️"),t("OutboundLink")],1)]),e._v(" "),t("td",{staticStyle:{"text-align":"center"}},[t("a",{attrs:{href:"https://raw.githubusercontent.com/djbooth007/tallycoin_connect/v1.8.0/Dockerfile.arm64v8",target:"_blank",rel:"noopener noreferrer"}},[e._v("✔️"),t("OutboundLink")],1)]),e._v(" "),t("td",{staticStyle:{"text-align":"center"}},[t("a",{attrs:{href:"https://github.com/djbooth007/tallycoin_connect",target:"_blank",rel:"noopener noreferrer"}},[e._v("Github"),t("OutboundLink")],1),e._v(" - "),t("a",{attrs:{href:"https://hub.docker.com/r/djbooth007/tallycoin_connect",target:"_blank",rel:"noopener noreferrer"}},[e._v("DockerHub"),t("OutboundLink")],1)])]),e._v(" "),t("tr",[t("td",[e._v("benjaminchodroff/rust-teos")]),e._v(" "),t("td",[e._v("latest")]),e._v(" "),t("td",{staticStyle:{"text-align":"center"}},[t("a",{attrs:{href:"https://raw.githubusercontent.com/benjaminchodroff/rust-teos/master/docker/Dockerfile",target:"_blank",rel:"noopener noreferrer"}},[e._v("✔️"),t("OutboundLink")],1)]),e._v(" "),t("td",{staticStyle:{"text-align":"center"}},[e._v("️❌")]),e._v(" "),t("td",{staticStyle:{"text-align":"center"}},[e._v("️❌")]),e._v(" "),t("td",{staticStyle:{"text-align":"center"}},[t("a",{attrs:{href:"https://github.com/benjaminchodroff/rust-teos",target:"_blank",rel:"noopener noreferrer"}},[e._v("Github"),t("OutboundLink")],1),e._v(" - "),t("a",{attrs:{href:"https://hub.docker.com/r/benjaminchodroff/rust-teos",target:"_blank",rel:"noopener noreferrer"}},[e._v("DockerHub"),t("OutboundLink")],1)])]),e._v(" "),t("tr",[t("td",[e._v("apotdevin/thunderhub")]),e._v(" "),t("td",[e._v("base-v0.13.31")]),e._v(" "),t("td",{staticStyle:{"text-align":"center"}},[t("a",{attrs:{href:"https://raw.githubusercontent.com/apotdevin/thunderhub/v0.13.31/Dockerfile",target:"_blank",rel:"noopener noreferrer"}},[e._v("✔️"),t("OutboundLink")],1)]),e._v(" "),t("td",{staticStyle:{"text-align":"center"}},[t("a",{attrs:{href:"https://raw.githubusercontent.com/apotdevin/thunderhub/v0.13.31/Dockerfile",target:"_blank",rel:"noopener noreferrer"}},[e._v("✔️"),t("OutboundLink")],1)]),e._v(" "),t("td",{staticStyle:{"text-align":"center"}},[t("a",{attrs:{href:"https://raw.githubusercontent.com/apotdevin/thunderhub/v0.13.31/Dockerfile",target:"_blank",rel:"noopener noreferrer"}},[e._v("✔️"),t("OutboundLink")],1)]),e._v(" "),t("td",{staticStyle:{"text-align":"center"}},[t("a",{attrs:{href:"https://github.com/apotdevin/thunderhub",target:"_blank",rel:"noopener noreferrer"}},[e._v("Github"),t("OutboundLink")],1),e._v(" - "),t("a",{attrs:{href:"https://hub.docker.com/r/apotdevin/thunderhub",target:"_blank",rel:"noopener noreferrer"}},[e._v("DockerHub"),t("OutboundLink")],1)])]),e._v(" "),t("tr",[t("td",[e._v("lncapital/torq")]),e._v(" "),t("td",[e._v("0.20.3")]),e._v(" "),t("td",{staticStyle:{"text-align":"center"}},[t("a",{attrs:{href:"https://raw.githubusercontent.com/lncapital/torq/master/README.md",target:"_blank",rel:"noopener noreferrer"}},[e._v("✔️"),t("OutboundLink")],1)]),e._v(" "),t("td",{staticStyle:{"text-align":"center"}},[t("a",{attrs:{href:"https://raw.githubusercontent.com/lncapital/torq/master/README.md",target:"_blank",rel:"noopener noreferrer"}},[e._v("✔️"),t("OutboundLink")],1)]),e._v(" "),t("td",{staticStyle:{"text-align":"center"}},[t("a",{attrs:{href:"https://raw.githubusercontent.com/lncapital/torq/master/README.md",target:"_blank",rel:"noopener noreferrer"}},[e._v("✔️"),t("OutboundLink")],1)]),e._v(" "),t("td",{staticStyle:{"text-align":"center"}},[t("a",{attrs:{href:"https://github.com/lncapital/torq",target:"_blank",rel:"noopener noreferrer"}},[e._v("Github"),t("OutboundLink")],1),e._v(" - "),t("a",{attrs:{href:"https://hub.docker.com/r/lncapital/torq",target:"_blank",rel:"noopener noreferrer"}},[e._v("DockerHub"),t("OutboundLink")],1)])]),e._v(" "),t("tr",[t("td",[e._v("timescale/timescaledb")]),e._v(" "),t("td",[e._v("latest-pg14")]),e._v(" "),t("td",{staticStyle:{"text-align":"center"}},[t("a",{attrs:{href:"https://raw.githubusercontent.com/timescale/timescaledb-docker/main/Dockerfile",target:"_blank",rel:"noopener noreferrer"}},[e._v("✔️"),t("OutboundLink")],1)]),e._v(" "),t("td",{staticStyle:{"text-align":"center"}},[t("a",{attrs:{href:"https://raw.githubusercontent.com/timescale/timescaledb-docker/main/Dockerfile",target:"_blank",rel:"noopener noreferrer"}},[e._v("✔️"),t("OutboundLink")],1)]),e._v(" "),t("td",{staticStyle:{"text-align":"center"}},[t("a",{attrs:{href:"https://raw.githubusercontent.com/timescale/timescaledb-docker/main/Dockerfile",target:"_blank",rel:"noopener noreferrer"}},[e._v("✔️"),t("OutboundLink")],1)]),e._v(" "),t("td",{staticStyle:{"text-align":"center"}},[t("a",{attrs:{href:"https://github.com/timescale/timescaledb-docker",target:"_blank",rel:"noopener noreferrer"}},[e._v("Github"),t("OutboundLink")],1),e._v(" - "),t("a",{attrs:{href:"https://hub.docker.com/r/timescale/timescaledb",target:"_blank",rel:"noopener noreferrer"}},[e._v("DockerHub"),t("OutboundLink")],1)])]),e._v(" "),t("tr",[t("td",[e._v("zammad/zammad-docker-compose")]),e._v(" "),t("td",[e._v("zammad-postgresql-3.4.0-4")]),e._v(" "),t("td",{staticStyle:{"text-align":"center"}},[t("a",{attrs:{href:"https://raw.githubusercontent.com/zammad/zammad-docker-compose/ff20084ce2829486076e9781fe27407ca6cc09bb/containers/zammad-postgresql/Dockerfile",target:"_blank",rel:"noopener noreferrer"}},[e._v("✔️"),t("OutboundLink")],1)]),e._v(" "),t("td",{staticStyle:{"text-align":"center"}},[e._v("️❌")]),e._v(" "),t("td",{staticStyle:{"text-align":"center"}},[e._v("️❌")]),e._v(" "),t("td",{staticStyle:{"text-align":"center"}},[t("a",{attrs:{href:"https://github.com/zammad/zammad-docker-compose",target:"_blank",rel:"noopener noreferrer"}},[e._v("Github"),t("OutboundLink")],1),e._v(" - "),t("a",{attrs:{href:"https://hub.docker.com/r/zammad/zammad-docker-compose",target:"_blank",rel:"noopener noreferrer"}},[e._v("DockerHub"),t("OutboundLink")],1)])]),e._v(" "),t("tr",[t("td",[e._v("memcached")]),e._v(" "),t("td",[e._v("1.5.22-alpine")]),e._v(" "),t("td",{staticStyle:{"text-align":"center"}},[t("a",{attrs:{href:"https://raw.githubusercontent.com/docker-library/memcached/eb38bf28263b8e5bb7367797cb7b181b65d769bd/alpine/Dockerfile",target:"_blank",rel:"noopener noreferrer"}},[e._v("✔️"),t("OutboundLink")],1)]),e._v(" "),t("td",{staticStyle:{"text-align":"center"}},[e._v("️❌")]),e._v(" "),t("td",{staticStyle:{"text-align":"center"}},[e._v("️❌")]),e._v(" "),t("td",{staticStyle:{"text-align":"center"}},[t("a",{attrs:{href:"https://github.com/docker-library/memcached",target:"_blank",rel:"noopener noreferrer"}},[e._v("Github"),t("OutboundLink")],1),e._v(" - "),t("a",{attrs:{href:"https://hub.docker.com/_/memcached",target:"_blank",rel:"noopener noreferrer"}},[e._v("DockerHub"),t("OutboundLink")],1)])]),e._v(" "),t("tr",[t("td",[e._v("traefik")]),e._v(" "),t("td",[e._v("v2.6")]),e._v(" "),t("td",{staticStyle:{"text-align":"center"}},[t("a",{attrs:{href:"https://raw.githubusercontent.com/containous/traefik-library-image/master/scratch/Dockerfile",target:"_blank",rel:"noopener noreferrer"}},[e._v("✔️"),t("OutboundLink")],1)]),e._v(" "),t("td",{staticStyle:{"text-align":"center"}},[e._v("️❌")]),e._v(" "),t("td",{staticStyle:{"text-align":"center"}},[e._v("️❌")]),e._v(" "),t("td",{staticStyle:{"text-align":"center"}},[t("a",{attrs:{href:"https://github.com/containous/traefik-library-image",target:"_blank",rel:"noopener noreferrer"}},[e._v("Github"),t("OutboundLink")],1),e._v(" - "),t("a",{attrs:{href:"https://hub.docker.com/_/traefik",target:"_blank",rel:"noopener noreferrer"}},[e._v("DockerHub"),t("OutboundLink")],1)])]),e._v(" "),t("tr",[t("td",[e._v("chekaz/docker-trezarcoin")]),e._v(" "),t("td",[e._v("0.13.0")]),e._v(" "),t("td",{staticStyle:{"text-align":"center"}},[t("a",{attrs:{href:"https://raw.githubusercontent.com/ChekaZ/docker/master/trezarcoin/1.2.0/Dockerfile",target:"_blank",rel:"noopener noreferrer"}},[e._v("✔️"),t("OutboundLink")],1)]),e._v(" "),t("td",{staticStyle:{"text-align":"center"}},[e._v("️❌")]),e._v(" "),t("td",{staticStyle:{"text-align":"center"}},[e._v("️❌")]),e._v(" "),t("td",{staticStyle:{"text-align":"center"}},[t("a",{attrs:{href:"https://github.com/ChekaZ/docker",target:"_blank",rel:"noopener noreferrer"}},[e._v("Github"),t("OutboundLink")],1),e._v(" - "),t("a",{attrs:{href:"https://hub.docker.com/r/chekaz/docker-trezarcoin",target:"_blank",rel:"noopener noreferrer"}},[e._v("DockerHub"),t("OutboundLink")],1)])]),e._v(" "),t("tr",[t("td",[e._v("romanornr/docker-viacoin")]),e._v(" "),t("td",[e._v("0.15.2")]),e._v(" "),t("td",{staticStyle:{"text-align":"center"}},[t("a",{attrs:{href:"https://raw.githubusercontent.com/viacoin/docker-viacoin/master/viacoin/0.15.2/docker-viacoin",target:"_blank",rel:"noopener noreferrer"}},[e._v("✔️"),t("OutboundLink")],1)]),e._v(" "),t("td",{staticStyle:{"text-align":"center"}},[e._v("️❌")]),e._v(" "),t("td",{staticStyle:{"text-align":"center"}},[e._v("️❌")]),e._v(" "),t("td",{staticStyle:{"text-align":"center"}},[t("a",{attrs:{href:"https://github.com/viacoin/docker-viacoin",target:"_blank",rel:"noopener noreferrer"}},[e._v("Github"),t("OutboundLink")],1),e._v(" - "),t("a",{attrs:{href:"https://hub.docker.com/r/romanornr/docker-viacoin",target:"_blank",rel:"noopener noreferrer"}},[e._v("DockerHub"),t("OutboundLink")],1)])])])]),e._v(" "),t("h1",{attrs:{id:"faq"}},[t("a",{staticClass:"header-anchor",attrs:{href:"#faq"}},[e._v("#")]),e._v(" FAQ")]),e._v(" "),t("h2",{attrs:{id:"how-can-i-modify-my-environment"}},[t("a",{staticClass:"header-anchor",attrs:{href:"#how-can-i-modify-my-environment"}},[e._v("#")]),e._v(" How can I modify my environment?")]),e._v(" "),t("p",[e._v("As root, run "),t("code",[e._v(". btcpay-setup.sh")]),e._v("; this will show you the environment variable it is expecting.\nFor example, if you support "),t("code",[e._v("btc")]),e._v(" and "),t("code",[e._v("ltc")]),e._v(" already, and want to add "),t("code",[e._v("btg")]),e._v(":")]),e._v(" "),t("div",{staticClass:"language-bash extra-class"},[t("pre",{pre:!0,attrs:{class:"language-bash"}},[t("code",[t("span",{pre:!0,attrs:{class:"token builtin class-name"}},[e._v("export")]),e._v(" "),t("span",{pre:!0,attrs:{class:"token assign-left variable"}},[e._v("BTCPAYGEN_CRYPTO3")]),t("span",{pre:!0,attrs:{class:"token operator"}},[e._v("=")]),t("span",{pre:!0,attrs:{class:"token string"}},[e._v("'btg'")]),e._v("\n"),t("span",{pre:!0,attrs:{class:"token builtin class-name"}},[e._v(".")]),e._v(" btcpay-setup.sh "),t("span",{pre:!0,attrs:{class:"token parameter variable"}},[e._v("-i")]),e._v("\n")])])]),t("h2",{attrs:{id:"i-deployed-before-btcpay-setupsh-existed-before-may-17-2018-can-i-migrate-to-this-new-system"}},[t("a",{staticClass:"header-anchor",attrs:{href:"#i-deployed-before-btcpay-setupsh-existed-before-may-17-2018-can-i-migrate-to-this-new-system"}},[e._v("#")]),e._v(" I deployed before "),t("code",[e._v("btcpay-setup.sh")]),e._v(" existed (before May 17, 2018), can I migrate to this new system?")]),e._v(" "),t("p",[e._v("Yes, run the following commands to update:")]),e._v(" "),t("div",{staticClass:"language-bash extra-class"},[t("pre",{pre:!0,attrs:{class:"language-bash"}},[t("code",[t("span",{pre:!0,attrs:{class:"token function"}},[e._v("sudo")]),e._v(" "),t("span",{pre:!0,attrs:{class:"token function"}},[e._v("su")]),e._v(" -\n\n"),t("span",{pre:!0,attrs:{class:"token builtin class-name"}},[e._v("cd")]),e._v(" "),t("span",{pre:!0,attrs:{class:"token variable"}},[e._v("$DOWNLOAD_ROOT")]),e._v("/btcpayserver-docker\n"),t("span",{pre:!0,attrs:{class:"token function"}},[e._v("git")]),e._v(" checkout master\n"),t("span",{pre:!0,attrs:{class:"token function"}},[e._v("git")]),e._v(" pull\n"),t("span",{pre:!0,attrs:{class:"token function"}},[e._v("git")]),e._v(" checkout 9acb5d8067cb5c46f59858137feb699b41ac9f19\nbtcpay-update.sh\n"),t("span",{pre:!0,attrs:{class:"token builtin class-name"}},[e._v(".")]),e._v(" ./btcpay-setup.sh "),t("span",{pre:!0,attrs:{class:"token parameter variable"}},[e._v("-i")]),e._v("\n"),t("span",{pre:!0,attrs:{class:"token function"}},[e._v("git")]),e._v(" checkout master\nbtcpay-update.sh\n\n"),t("span",{pre:!0,attrs:{class:"token builtin class-name"}},[e._v("exit")]),e._v("\n")])])]),t("h2",{attrs:{id:"im-getting-an-error-on-windows-cannot-create-container-for-service-docker-mount-denied"}},[t("a",{staticClass:"header-anchor",attrs:{href:"#im-getting-an-error-on-windows-cannot-create-container-for-service-docker-mount-denied"}},[e._v("#")]),e._v(" I'm getting an error on Windows: "),t("code",[e._v("Cannot create container for service docker: Mount denied")]),e._v("?")]),e._v(" "),t("p",[e._v("If you see this error:")]),e._v(" "),t("p",[t("code",[e._v("Cannot create container for service docker: b'Mount denied:\\nThe source path \"\\\\\\\\var\\\\\\\\run\\\\\\\\docker.sock:/var/run/docker.sock\"\\nis not a valid Windows path'")]),e._v(".")]),e._v(" "),t("p",[e._v("Run this in "),t("a",{attrs:{href:"https://docs.microsoft.com/en-us/powershell/scripting/windows-powershell/starting-windows-powershell",target:"_blank",rel:"noopener noreferrer"}},[e._v("powershell"),t("OutboundLink")],1),e._v(":")]),e._v(" "),t("div",{staticClass:"language-powershell extra-class"},[t("pre",{pre:!0,attrs:{class:"language-powershell"}},[t("code",[t("span",{pre:!0,attrs:{class:"token variable"}},[e._v("$Env")]),e._v(":COMPOSE_CONVERT_WINDOWS_PATHS=1\n")])])]),t("p",[e._v("Then, run "),t("code",[e._v("docker-compose -f EXAMPLE.yml up")]),e._v(".")]),e._v(" "),t("p",[e._v("This bug comes from Docker for Windows and is "),t("a",{attrs:{href:"https://github.com/docker/for-win/issues/1829",target:"_blank",rel:"noopener noreferrer"}},[e._v("tracked on Github"),t("OutboundLink")],1),e._v(".")]),e._v(" "),t("h2",{attrs:{id:"how-i-can-prune-my-nodes"}},[t("a",{staticClass:"header-anchor",attrs:{href:"#how-i-can-prune-my-nodes"}},[e._v("#")]),e._v(" How I can prune my node(s)?")]),e._v(" "),t("p",[e._v("This will prune your Bitcoin full node to a maximum of 100GB (of blocks):")]),e._v(" "),t("div",{staticClass:"language-bash extra-class"},[t("pre",{pre:!0,attrs:{class:"language-bash"}},[t("code",[t("span",{pre:!0,attrs:{class:"token builtin class-name"}},[e._v("export")]),e._v(" "),t("span",{pre:!0,attrs:{class:"token assign-left variable"}},[e._v("BTCPAYGEN_ADDITIONAL_FRAGMENTS")]),t("span",{pre:!0,attrs:{class:"token operator"}},[e._v("=")]),t("span",{pre:!0,attrs:{class:"token string"}},[e._v('"opt-save-storage"')]),e._v("\n"),t("span",{pre:!0,attrs:{class:"token builtin class-name"}},[e._v(".")]),e._v(" ./btcpay-setup.sh "),t("span",{pre:!0,attrs:{class:"token parameter variable"}},[e._v("-i")]),e._v("\n")])])]),t("p",[e._v("Other options are "),t("a",{attrs:{href:"#generated-docker-compose"}},[e._v("documented here")]),e._v(".")]),e._v(" "),t("h2",{attrs:{id:"how-can-i-customize-the-generated-docker-compose-file"}},[t("a",{staticClass:"header-anchor",attrs:{href:"#how-can-i-customize-the-generated-docker-compose-file"}},[e._v("#")]),e._v(" How can I customize the generated docker-compose file?")]),e._v(" "),t("p",[e._v("In some instances, you might want to customize your environment in more detail. While you could modify "),t("code",[e._v("Generated/docker-compose.generated.yml")]),e._v(" manually, your changes would be overwritten the next time you run "),t("code",[e._v("btcpay-update.sh")]),e._v(".")]),e._v(" "),t("p",[e._v("Luckily, you can leverage "),t("code",[e._v("BTCPAYGEN_ADDITIONAL_FRAGMENTS")]),e._v(" for this!")]),e._v(" "),t("p",[e._v("Let's enable "),t("strong",[e._v("pruning to 60 GB")]),e._v(", for example:")]),e._v(" "),t("p",[e._v("First, copy "),t("a",{attrs:{href:"https://github.com/btcpayserver/btcpayserver-docker/blob/master/docker-compose-generator/docker-fragments/opt-save-storage.yml",target:"_blank",rel:"noopener noreferrer"}},[e._v("opt-save-storage"),t("OutboundLink")],1),e._v(" into the "),t("a",{attrs:{href:"https://github.com/btcpayserver/btcpayserver-docker/blob/master/docker-compose-generator/docker-fragments",target:"_blank",rel:"noopener noreferrer"}},[e._v("the docker fragment folder"),t("OutboundLink")],1),e._v(" as "),t("code",[e._v("opt-save-storage.custom.yml")]),e._v(". "),t("strong",[e._v("Important:")]),e._v(" the file must end with "),t("code",[e._v(".custom.yml")]),e._v(", or there will be git conflicts whenever you run "),t("code",[e._v("btcpay-update.sh")]),e._v(".")]),e._v(" "),t("p",[e._v("Modify the new "),t("code",[e._v("opt-save-storage.custom.yml")]),e._v(" file to your taste:")]),e._v(" "),t("div",{staticClass:"language-diff extra-class"},[t("pre",{pre:!0,attrs:{class:"language-diff"}},[t("code",[e._v('@@ -14,8 +14,7 @@ version: "3"\n'),t("span",{pre:!0,attrs:{class:"token unchanged"}},[t("span",{pre:!0,attrs:{class:"token prefix unchanged"}},[e._v(" ")]),t("span",{pre:!0,attrs:{class:"token line"}},[e._v("services:\n")]),t("span",{pre:!0,attrs:{class:"token prefix unchanged"}},[e._v(" ")]),t("span",{pre:!0,attrs:{class:"token line"}},[e._v(" bitcoind:\n")]),t("span",{pre:!0,attrs:{class:"token prefix unchanged"}},[e._v(" ")]),t("span",{pre:!0,attrs:{class:"token line"}},[e._v(" environment:\n")])]),t("span",{pre:!0,attrs:{class:"token deleted-sign deleted"}},[t("span",{pre:!0,attrs:{class:"token prefix deleted"}},[e._v("-")]),t("span",{pre:!0,attrs:{class:"token line"}},[e._v(" BITCOIN_EXTRA_ARGS: prune=100000\n")])]),t("span",{pre:!0,attrs:{class:"token inserted-sign inserted"}},[t("span",{pre:!0,attrs:{class:"token prefix inserted"}},[e._v("+")]),t("span",{pre:!0,attrs:{class:"token line"}},[e._v(" BITCOIN_EXTRA_ARGS: prune=60000\n")])])])])]),t("p",[e._v("Then set it up:")]),e._v(" "),t("div",{staticClass:"language-bash extra-class"},[t("pre",{pre:!0,attrs:{class:"language-bash"}},[t("code",[t("span",{pre:!0,attrs:{class:"token builtin class-name"}},[e._v("export")]),e._v(" "),t("span",{pre:!0,attrs:{class:"token assign-left variable"}},[e._v("BTCPAYGEN_ADDITIONAL_FRAGMENTS")]),t("span",{pre:!0,attrs:{class:"token operator"}},[e._v("=")]),t("span",{pre:!0,attrs:{class:"token string"}},[e._v('"'),t("span",{pre:!0,attrs:{class:"token variable"}},[e._v("$BTCPAYGEN_ADDITIONAL_FRAGMENTS")]),e._v(';opt-save-storage.custom"')]),e._v("\n"),t("span",{pre:!0,attrs:{class:"token builtin class-name"}},[e._v(".")]),e._v(" ./btcpay-setup.sh "),t("span",{pre:!0,attrs:{class:"token parameter variable"}},[e._v("-i")]),e._v("\n")])])]),t("h2",{attrs:{id:"can-i-run-btcpay-server-on-ports-other-than-80-and-443"}},[t("a",{staticClass:"header-anchor",attrs:{href:"#can-i-run-btcpay-server-on-ports-other-than-80-and-443"}},[e._v("#")]),e._v(" Can I run BTCPay Server on ports other than 80 and 443?")]),e._v(" "),t("p",[e._v("You can change the ports for HTTP and HTTPS by setting the environment variables "),t("code",[e._v("REVERSEPROXY_HTTP_PORT")]),e._v(" and "),t("code",[e._v("REVERSEPROXY_HTTPS_PORT")]),e._v(". This is handy when ports 80 and 443 are already in use on your host, or you want to offload SSL termination with an existing web proxy.")]),e._v(" "),t("p",[e._v("When you set "),t("code",[e._v("REVERSEPROXY_HTTP_PORT")]),e._v(" to another value than 80, the built-in Let's Encrypt certificate will not work, as Let's Encrypt will try to validate your SSL certificate request by connecting from the internet to your domain on port 80. This validation request should be able to reach BTCPay Server in order to receive the certificate.")]),e._v(" "),t("p",[e._v("If you need to run on a different port, it's best to terminate SSL using another web proxy and forward your traffic.")]),e._v(" "),t("h2",{attrs:{id:"can-i-offload-https-termination"}},[t("a",{staticClass:"header-anchor",attrs:{href:"#can-i-offload-https-termination"}},[e._v("#")]),e._v(" Can I offload HTTPS termination?")]),e._v(" "),t("p",[e._v("Yes. Please "),t("RouterLink",{attrs:{to:"/FAQ/FAQ-Deployment/#can-i-use-an-existing-nginx-server-as-a-reverse-proxy-with-ssl-termination"}},[e._v("see the documentation")]),e._v(".")],1),e._v(" "),t("h2",{attrs:{id:"how-can-i-back-up-my-btcpay-server"}},[t("a",{staticClass:"header-anchor",attrs:{href:"#how-can-i-back-up-my-btcpay-server"}},[e._v("#")]),e._v(" How can I back up my BTCPay Server?")]),e._v(" "),t("p",[e._v("See the "),t("RouterLink",{attrs:{to:"/Docker/backup-restore/"}},[e._v("Backup & Restore")]),e._v(" guide in our documentation.")],1),e._v(" "),t("details",[t("summary",[e._v("For backwards compatibility: Click here for the description of the old backup.sh process")]),e._v(" "),t("div",{staticClass:"custom-block warning"},[t("p",{staticClass:"custom-block-title"},[e._v("WARNING")]),e._v(" "),t("p",[e._v("Please consider switching to the "),t("RouterLink",{attrs:{to:"/Docker/backup-restore/"}},[e._v("new Backup & Restore process")]),e._v(", because the "),t("code",[e._v("backup.sh")]),e._v(" will not be maintained anymore.")],1)]),e._v(" "),t("p",[e._v("We provide a backup script that dumps the database and saves the important files:")]),e._v(" "),t("div",{staticClass:"language-bash extra-class"},[t("pre",{pre:!0,attrs:{class:"language-bash"}},[t("code",[t("span",{pre:!0,attrs:{class:"token builtin class-name"}},[e._v("cd")]),e._v(" "),t("span",{pre:!0,attrs:{class:"token string"}},[e._v('"'),t("span",{pre:!0,attrs:{class:"token variable"}},[e._v("$BTCPAY_BASE_DIRECTORY")]),e._v('/btcpayserver-docker"')]),e._v("\n./backup.sh\n")])])]),t("p",[e._v("This will save the backup locally as "),t("code",[e._v("/var/lib/docker/volumes/backup_datadir/_data/backup.tar.gz")]),e._v(".\nThese are the options to customize the backup name and location:")]),e._v(" "),t("ul",[t("li",[t("code",[e._v("BACKUP_TIMESTAMP=true")]),e._v(" saves the backup with datetime as part of the file name, so that backups do not get overwritten.")]),e._v(" "),t("li",[t("code",[e._v("BACKUP_PROVIDER=SCP")]),e._v(" saves the backup remotely, requires additional "),t("code",[e._v("SCP_TARGET")]),e._v(" environment variable (see below).")]),e._v(" "),t("li",[t("code",[e._v("BACKUP_PROVIDER=Dropbox")]),e._v(" saves the backup to Dropbox, requires additional "),t("code",[e._v("DROPBOX_TOKEN")]),e._v(" environment variable (see below).")])]),e._v(" "),t("div",{staticClass:"language-bash extra-class"},[t("pre",{pre:!0,attrs:{class:"language-bash"}},[t("code",[t("span",{pre:!0,attrs:{class:"token builtin class-name"}},[e._v("cd")]),e._v(" "),t("span",{pre:!0,attrs:{class:"token string"}},[e._v('"'),t("span",{pre:!0,attrs:{class:"token variable"}},[e._v("$BTCPAY_BASE_DIRECTORY")]),e._v('/btcpayserver-docker"')]),e._v("\n\n"),t("span",{pre:!0,attrs:{class:"token comment"}},[e._v("# Backup with custom file name and timestamp:")]),e._v("\n"),t("span",{pre:!0,attrs:{class:"token assign-left variable"}},[e._v("BACKUP_TIMESTAMP")]),t("span",{pre:!0,attrs:{class:"token operator"}},[e._v("=")]),e._v("true ./backup.sh\n\n"),t("span",{pre:!0,attrs:{class:"token comment"}},[e._v("# Backup via SCP:")]),e._v("\n"),t("span",{pre:!0,attrs:{class:"token assign-left variable"}},[e._v("BACKUP_PROVIDER")]),t("span",{pre:!0,attrs:{class:"token operator"}},[e._v("=")]),e._v("SCP "),t("span",{pre:!0,attrs:{class:"token assign-left variable"}},[e._v("SCP_TARGET")]),t("span",{pre:!0,attrs:{class:"token operator"}},[e._v("=")]),e._v("myhost:backups/btcpay ./backup.sh\n\n"),t("span",{pre:!0,attrs:{class:"token comment"}},[e._v("# Backup to Dropbox:")]),e._v("\n"),t("span",{pre:!0,attrs:{class:"token assign-left variable"}},[e._v("BACKUP_PROVIDER")]),t("span",{pre:!0,attrs:{class:"token operator"}},[e._v("=")]),e._v("Dropbox "),t("span",{pre:!0,attrs:{class:"token assign-left variable"}},[e._v("DROPBOX_TOKEN")]),t("span",{pre:!0,attrs:{class:"token operator"}},[e._v("=")]),e._v("myDropboxToken ./backup.sh\n")])])]),t("p",[e._v("You can also choose to only dump the database.\nThis option does not need to stop and restart the docker-containers:")]),e._v(" "),t("div",{staticClass:"language-bash extra-class"},[t("pre",{pre:!0,attrs:{class:"language-bash"}},[t("code",[t("span",{pre:!0,attrs:{class:"token builtin class-name"}},[e._v("cd")]),e._v(" "),t("span",{pre:!0,attrs:{class:"token string"}},[e._v('"'),t("span",{pre:!0,attrs:{class:"token variable"}},[e._v("$BTCPAY_BASE_DIRECTORY")]),e._v('/btcpayserver-docker"')]),e._v("\n./backup.sh --only-db\n")])])])]),e._v(" "),t("h2",{attrs:{id:"how-can-i-connect-to-the-database"}},[t("a",{staticClass:"header-anchor",attrs:{href:"#how-can-i-connect-to-the-database"}},[e._v("#")]),e._v(" How can I connect to the database?")]),e._v(" "),t("p",[e._v("On the server you can open a database session by connecting via "),t("code",[e._v("psql")]),e._v(" as the postgres user:")]),e._v(" "),t("div",{staticClass:"language-bash extra-class"},[t("pre",{pre:!0,attrs:{class:"language-bash"}},[t("code",[t("span",{pre:!0,attrs:{class:"token function"}},[e._v("docker")]),e._v(" "),t("span",{pre:!0,attrs:{class:"token builtin class-name"}},[e._v("exec")]),e._v(" "),t("span",{pre:!0,attrs:{class:"token parameter variable"}},[e._v("-ti")]),e._v(" "),t("span",{pre:!0,attrs:{class:"token variable"}},[t("span",{pre:!0,attrs:{class:"token variable"}},[e._v("$(")]),t("span",{pre:!0,attrs:{class:"token function"}},[e._v("docker")]),e._v(" "),t("span",{pre:!0,attrs:{class:"token function"}},[e._v("ps")]),e._v(" "),t("span",{pre:!0,attrs:{class:"token parameter variable"}},[e._v("-a")]),e._v(" "),t("span",{pre:!0,attrs:{class:"token parameter variable"}},[e._v("-q")]),e._v(" "),t("span",{pre:!0,attrs:{class:"token parameter variable"}},[e._v("-f")]),e._v(" "),t("span",{pre:!0,attrs:{class:"token string"}},[e._v('"name=postgres_1"')]),t("span",{pre:!0,attrs:{class:"token variable"}},[e._v(")")])]),e._v(" psql "),t("span",{pre:!0,attrs:{class:"token parameter variable"}},[e._v("-U")]),e._v(" postgres\n")])])]),t("p",[e._v("Then, inside "),t("code",[e._v("psql")]),e._v(" you can select a database and interact with the tables:")]),e._v(" "),t("div",{staticClass:"language-bash extra-class"},[t("pre",{pre:!0,attrs:{class:"language-bash"}},[t("code",[t("span",{pre:!0,attrs:{class:"token comment"}},[e._v("# list databases")]),e._v("\n"),t("span",{pre:!0,attrs:{class:"token punctuation"}},[e._v("\\")]),e._v("l\n\n"),t("span",{pre:!0,attrs:{class:"token comment"}},[e._v("# connect to database")]),e._v("\n"),t("span",{pre:!0,attrs:{class:"token punctuation"}},[e._v("\\")]),e._v("c btcpayservermainnet\n\n"),t("span",{pre:!0,attrs:{class:"token comment"}},[e._v("# list tables")]),e._v("\n"),t("span",{pre:!0,attrs:{class:"token punctuation"}},[e._v("\\")]),e._v("dt\n\n"),t("span",{pre:!0,attrs:{class:"token comment"}},[e._v("# list users")]),e._v("\nSELECT "),t("span",{pre:!0,attrs:{class:"token string"}},[e._v('"Id"')]),e._v(", "),t("span",{pre:!0,attrs:{class:"token string"}},[e._v('"Email"')]),e._v(" FROM "),t("span",{pre:!0,attrs:{class:"token string"}},[e._v('"AspNetUsers"')]),t("span",{pre:!0,attrs:{class:"token punctuation"}},[e._v(";")]),e._v("\n\n"),t("span",{pre:!0,attrs:{class:"token comment"}},[e._v("# end session")]),e._v("\n"),t("span",{pre:!0,attrs:{class:"token punctuation"}},[e._v("\\")]),e._v("q\n")])])]),t("p",[e._v("The main BTCPay Server database tables are part of the "),t("code",[e._v("public")]),e._v(" schema.\nPlugins have their own schema, named after the plugin.")]),e._v(" "),t("p",[e._v("By default, only the tables of the "),t("code",[e._v("public")]),e._v(" schema are shown.\nIf you want to also see and select the plugin tables, you need to extend the search path:")]),e._v(" "),t("div",{staticClass:"language-bash extra-class"},[t("pre",{pre:!0,attrs:{class:"language-bash"}},[t("code",[t("span",{pre:!0,attrs:{class:"token comment"}},[e._v("# list plugin schemas")]),e._v("\nSELECT * FROM pg_catalog.pg_namespace WHERE nspname LIKE "),t("span",{pre:!0,attrs:{class:"token string"}},[e._v("'BTCPayServer.%'")]),t("span",{pre:!0,attrs:{class:"token punctuation"}},[e._v(";")]),e._v("\n\n"),t("span",{pre:!0,attrs:{class:"token comment"}},[e._v("# extend search path")]),e._v("\nSET search_path TO "),t("span",{pre:!0,attrs:{class:"token string"}},[e._v('"BTCPayServer.Plugins.MyPlugin"')]),e._v(", public"),t("span",{pre:!0,attrs:{class:"token punctuation"}},[e._v(";")]),e._v("\n\n"),t("span",{pre:!0,attrs:{class:"token comment"}},[e._v("# table list now also shows the MyPlugin tables")]),e._v("\n"),t("span",{pre:!0,attrs:{class:"token punctuation"}},[e._v("\\")]),e._v("dt\n")])])]),t("h2",{attrs:{id:"how-do-i-upgrade-my-btcpay-server-docker"}},[t("a",{staticClass:"header-anchor",attrs:{href:"#how-do-i-upgrade-my-btcpay-server-docker"}},[e._v("#")]),e._v(" How do I upgrade my BTCPay Server docker?")]),e._v(" "),t("p",[e._v("Run the script "),t("code",[e._v("./btcpay-update.sh")]),e._v(" and patiently wait for your server to be upgraded.")])])}),[],!1,null,null,null);t.default=n.exports}}]); \ No newline at end of file diff --git a/assets/js/132.08af3bd5.js b/assets/js/132.067cc005.js similarity index 98% rename from assets/js/132.08af3bd5.js rename to assets/js/132.067cc005.js index 53897cc842..60d37fe6e1 100644 --- a/assets/js/132.08af3bd5.js +++ b/assets/js/132.067cc005.js @@ -1 +1 @@ -(window.webpackJsonp=window.webpackJsonp||[]).push([[132],{784:function(t,a,s){"use strict";s.r(a);var e=s(10),r=Object(e.a)({},(function(){var t=this,a=t._self._c;return a("ContentSlotsDistributor",{attrs:{"slot-key":t.$parent.slotKey}},[a("h1",{attrs:{id:"chatwoot-support"}},[a("a",{staticClass:"header-anchor",attrs:{href:"#chatwoot-support"}},[t._v("#")]),t._v(" Chatwoot support")]),t._v(" "),a("p",[a("a",{attrs:{href:"https://www.chatwoot.com/",target:"_blank",rel:"noopener noreferrer"}},[t._v("Chatwoot"),a("OutboundLink")],1),t._v(" is a customer support tool for instant messaging channels which can help businesses provide exceptional customer support.")]),t._v(" "),a("h2",{attrs:{id:"how-to-use"}},[a("a",{staticClass:"header-anchor",attrs:{href:"#how-to-use"}},[t._v("#")]),t._v(" How to use")]),t._v(" "),a("ol",[a("li",[t._v("Connect as root to your server")]),t._v(" "),a("li",[t._v("create chatwoot configuration file where "),a("code",[t._v("{CONFIG DATA HERE}")]),t._v(" is replaced by settings from "),a("a",{attrs:{href:"https://www.chatwoot.com/docs/environment-variables",target:"_blank",rel:"noopener noreferrer"}},[t._v("here"),a("OutboundLink")],1)])]),t._v(" "),a("div",{staticClass:"language-bash extra-class"},[a("pre",{pre:!0,attrs:{class:"language-bash"}},[a("code",[a("span",{pre:!0,attrs:{class:"token function"}},[t._v("sudo")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token function"}},[t._v("su")]),t._v(" -\n"),a("span",{pre:!0,attrs:{class:"token builtin class-name"}},[t._v("cd")]),t._v(" btcpayserver-docker\n"),a("span",{pre:!0,attrs:{class:"token function"}},[t._v("cat")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token operator"}},[t._v(">>")]),t._v(" Generated/chatwoot-config.env "),a("span",{pre:!0,attrs:{class:"token operator"}},[t._v("<<")]),a("span",{pre:!0,attrs:{class:"token string"}},[t._v("EOL\n{CONFIG DATA HERE}\n{CONFIG DATA HERE}\nEOL")]),t._v("\n")])])]),a("ol",{attrs:{start:"3"}},[a("li",[t._v("Add chatwoot as an option to your BTCPay deployment and set the host to use (point DNS to server as well)")])]),t._v(" "),a("div",{staticClass:"language-bash extra-class"},[a("pre",{pre:!0,attrs:{class:"language-bash"}},[a("code",[a("span",{pre:!0,attrs:{class:"token assign-left variable"}},[t._v("CHATWOOT_HOST")]),a("span",{pre:!0,attrs:{class:"token operator"}},[t._v("=")]),a("span",{pre:!0,attrs:{class:"token string"}},[t._v('"chatwoot.xpayserver.com"')]),t._v("\n"),a("span",{pre:!0,attrs:{class:"token assign-left variable"}},[t._v("BTCPAYGEN_ADDITIONAL_FRAGMENTS")]),a("span",{pre:!0,attrs:{class:"token operator"}},[t._v("=")]),a("span",{pre:!0,attrs:{class:"token string"}},[t._v('"'),a("span",{pre:!0,attrs:{class:"token variable"}},[t._v("$BTCPAYGEN_ADDITIONAL_FRAGMENTS")]),t._v(';opt-add-chatwoot"')]),t._v("\n"),a("span",{pre:!0,attrs:{class:"token builtin class-name"}},[t._v(".")]),t._v(" btcpay-setup.sh "),a("span",{pre:!0,attrs:{class:"token parameter variable"}},[t._v("-i")]),t._v("\n\n")])])]),a("ol",{attrs:{start:"4"}},[a("li",[t._v("Wait for BTPay to be online and then create the database for chatwoot")])]),t._v(" "),a("div",{staticClass:"language-bash extra-class"},[a("pre",{pre:!0,attrs:{class:"language-bash"}},[a("code",[a("span",{pre:!0,attrs:{class:"token function"}},[t._v("docker")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token builtin class-name"}},[t._v("exec")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token parameter variable"}},[t._v("-ti")]),t._v(" chatwoot "),a("span",{pre:!0,attrs:{class:"token function"}},[t._v("sh")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token parameter variable"}},[t._v("-c")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token string"}},[t._v('"export DISABLE_DATABASE_ENVIRONMENT_CHECK=1 && bundle exec rails db:reset"')]),t._v("\n")])])]),a("ol",{attrs:{start:"4"}},[a("li",[t._v("Go to chatwoot website at https://chatwoot.xpayserver.com and set up.")])])])}),[],!1,null,null,null);a.default=r.exports}}]); \ No newline at end of file +(window.webpackJsonp=window.webpackJsonp||[]).push([[132],{785:function(t,a,s){"use strict";s.r(a);var e=s(10),r=Object(e.a)({},(function(){var t=this,a=t._self._c;return a("ContentSlotsDistributor",{attrs:{"slot-key":t.$parent.slotKey}},[a("h1",{attrs:{id:"chatwoot-support"}},[a("a",{staticClass:"header-anchor",attrs:{href:"#chatwoot-support"}},[t._v("#")]),t._v(" Chatwoot support")]),t._v(" "),a("p",[a("a",{attrs:{href:"https://www.chatwoot.com/",target:"_blank",rel:"noopener noreferrer"}},[t._v("Chatwoot"),a("OutboundLink")],1),t._v(" is a customer support tool for instant messaging channels which can help businesses provide exceptional customer support.")]),t._v(" "),a("h2",{attrs:{id:"how-to-use"}},[a("a",{staticClass:"header-anchor",attrs:{href:"#how-to-use"}},[t._v("#")]),t._v(" How to use")]),t._v(" "),a("ol",[a("li",[t._v("Connect as root to your server")]),t._v(" "),a("li",[t._v("create chatwoot configuration file where "),a("code",[t._v("{CONFIG DATA HERE}")]),t._v(" is replaced by settings from "),a("a",{attrs:{href:"https://www.chatwoot.com/docs/environment-variables",target:"_blank",rel:"noopener noreferrer"}},[t._v("here"),a("OutboundLink")],1)])]),t._v(" "),a("div",{staticClass:"language-bash extra-class"},[a("pre",{pre:!0,attrs:{class:"language-bash"}},[a("code",[a("span",{pre:!0,attrs:{class:"token function"}},[t._v("sudo")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token function"}},[t._v("su")]),t._v(" -\n"),a("span",{pre:!0,attrs:{class:"token builtin class-name"}},[t._v("cd")]),t._v(" btcpayserver-docker\n"),a("span",{pre:!0,attrs:{class:"token function"}},[t._v("cat")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token operator"}},[t._v(">>")]),t._v(" Generated/chatwoot-config.env "),a("span",{pre:!0,attrs:{class:"token operator"}},[t._v("<<")]),a("span",{pre:!0,attrs:{class:"token string"}},[t._v("EOL\n{CONFIG DATA HERE}\n{CONFIG DATA HERE}\nEOL")]),t._v("\n")])])]),a("ol",{attrs:{start:"3"}},[a("li",[t._v("Add chatwoot as an option to your BTCPay deployment and set the host to use (point DNS to server as well)")])]),t._v(" "),a("div",{staticClass:"language-bash extra-class"},[a("pre",{pre:!0,attrs:{class:"language-bash"}},[a("code",[a("span",{pre:!0,attrs:{class:"token assign-left variable"}},[t._v("CHATWOOT_HOST")]),a("span",{pre:!0,attrs:{class:"token operator"}},[t._v("=")]),a("span",{pre:!0,attrs:{class:"token string"}},[t._v('"chatwoot.xpayserver.com"')]),t._v("\n"),a("span",{pre:!0,attrs:{class:"token assign-left variable"}},[t._v("BTCPAYGEN_ADDITIONAL_FRAGMENTS")]),a("span",{pre:!0,attrs:{class:"token operator"}},[t._v("=")]),a("span",{pre:!0,attrs:{class:"token string"}},[t._v('"'),a("span",{pre:!0,attrs:{class:"token variable"}},[t._v("$BTCPAYGEN_ADDITIONAL_FRAGMENTS")]),t._v(';opt-add-chatwoot"')]),t._v("\n"),a("span",{pre:!0,attrs:{class:"token builtin class-name"}},[t._v(".")]),t._v(" btcpay-setup.sh "),a("span",{pre:!0,attrs:{class:"token parameter variable"}},[t._v("-i")]),t._v("\n\n")])])]),a("ol",{attrs:{start:"4"}},[a("li",[t._v("Wait for BTPay to be online and then create the database for chatwoot")])]),t._v(" "),a("div",{staticClass:"language-bash extra-class"},[a("pre",{pre:!0,attrs:{class:"language-bash"}},[a("code",[a("span",{pre:!0,attrs:{class:"token function"}},[t._v("docker")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token builtin class-name"}},[t._v("exec")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token parameter variable"}},[t._v("-ti")]),t._v(" chatwoot "),a("span",{pre:!0,attrs:{class:"token function"}},[t._v("sh")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token parameter variable"}},[t._v("-c")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token string"}},[t._v('"export DISABLE_DATABASE_ENVIRONMENT_CHECK=1 && bundle exec rails db:reset"')]),t._v("\n")])])]),a("ol",{attrs:{start:"4"}},[a("li",[t._v("Go to chatwoot website at https://chatwoot.xpayserver.com and set up.")])])])}),[],!1,null,null,null);a.default=r.exports}}]); \ No newline at end of file diff --git a/assets/js/134.ab5076a2.js b/assets/js/134.9e55741b.js similarity index 99% rename from assets/js/134.ab5076a2.js rename to assets/js/134.9e55741b.js index c626210ba3..010e6e6eb3 100644 --- a/assets/js/134.ab5076a2.js +++ b/assets/js/134.9e55741b.js @@ -1 +1 @@ -(window.webpackJsonp=window.webpackJsonp||[]).push([[134],{788:function(a,e,t){"use strict";t.r(e);var s=t(10),r=Object(s.a)({},(function(){var a=this,e=a._self._c;return e("ContentSlotsDistributor",{attrs:{"slot-key":a.$parent.slotKey}},[e("h1",{attrs:{id:"joinmarket-support"}},[e("a",{staticClass:"header-anchor",attrs:{href:"#joinmarket-support"}},[a._v("#")]),a._v(" Joinmarket support")]),a._v(" "),e("p",[a._v("JoinMarket is software to create a special kind of bitcoin transaction called a CoinJoin transaction. Its aim is to improve the confidentiality and privacy of bitcoin transactions.")]),a._v(" "),e("p",[a._v("You will be able to use your bitcoin to help other protect their privacy, while earning a yield for this service.")]),a._v(" "),e("p",[a._v("See "),e("a",{attrs:{href:"https://github.com/JoinMarket-Org/JoinMarket-Docs/blob/master/High-level-design.md",target:"_blank",rel:"noopener noreferrer"}},[a._v("the documentation of the joinmarket project"),e("OutboundLink")],1),a._v(" for more details.")]),a._v(" "),e("p",[a._v("This is a very advanced functionality, and there is no easy way to recover if something goes wrong.")]),a._v(" "),e("p",[a._v("For hardcore bitcoiners only.")]),a._v(" "),e("h2",{attrs:{id:"how-to-use"}},[e("a",{staticClass:"header-anchor",attrs:{href:"#how-to-use"}},[a._v("#")]),a._v(" How to use")]),a._v(" "),e("div",{staticClass:"language-bash extra-class"},[e("pre",{pre:!0,attrs:{class:"language-bash"}},[e("code",[e("span",{pre:!0,attrs:{class:"token assign-left variable"}},[a._v("BTCPAYGEN_ADDITIONAL_FRAGMENTS")]),e("span",{pre:!0,attrs:{class:"token operator"}},[a._v("=")]),e("span",{pre:!0,attrs:{class:"token string"}},[a._v('"'),e("span",{pre:!0,attrs:{class:"token variable"}},[a._v("$BTCPAYGEN_ADDITIONAL_FRAGMENTS")]),a._v(';opt-add-joinmarket"')]),a._v("\n"),e("span",{pre:!0,attrs:{class:"token builtin class-name"}},[a._v(".")]),a._v(" btcpay-setup.sh "),e("span",{pre:!0,attrs:{class:"token parameter variable"}},[a._v("-i")]),a._v("\n")])])]),e("p",[a._v("Then you need to setup your default joinmarket wallet:")]),a._v(" "),e("div",{staticClass:"language-bash extra-class"},[e("pre",{pre:!0,attrs:{class:"language-bash"}},[e("code",[a._v("jm.sh wallet-tool-generate\njm.sh set-wallet "),e("span",{pre:!0,attrs:{class:"token operator"}},[a._v("<")]),a._v("wallet_file_name"),e("span",{pre:!0,attrs:{class:"token operator"}},[a._v(">")]),a._v(" "),e("span",{pre:!0,attrs:{class:"token operator"}},[a._v("<")]),a._v("password"),e("span",{pre:!0,attrs:{class:"token operator"}},[a._v(">")]),a._v("\n")])])]),e("p",[a._v("Once done, you will need to send some money to the joinmarket wallet:")]),a._v(" "),e("div",{staticClass:"language-bash extra-class"},[e("pre",{pre:!0,attrs:{class:"language-bash"}},[e("code",[a._v("jm.sh wallet-tool\n")])])]),e("h2",{attrs:{id:"how-to-change-joinmarket-configuration"}},[e("a",{staticClass:"header-anchor",attrs:{href:"#how-to-change-joinmarket-configuration"}},[a._v("#")]),a._v(" How to change joinmarket configuration?")]),a._v(" "),e("p",[a._v("Connect to your container, and edit your configuration:")]),a._v(" "),e("div",{staticClass:"language-bash extra-class"},[e("pre",{pre:!0,attrs:{class:"language-bash"}},[e("code",[a._v("jm.sh "),e("span",{pre:!0,attrs:{class:"token function"}},[a._v("bash")]),a._v("\n"),e("span",{pre:!0,attrs:{class:"token function"}},[a._v("vim")]),a._v(" "),e("span",{pre:!0,attrs:{class:"token variable"}},[a._v("$CONFIG")]),a._v("\n")])])]),e("h2",{attrs:{id:"managing-your-wallet"}},[e("a",{staticClass:"header-anchor",attrs:{href:"#managing-your-wallet"}},[a._v("#")]),a._v(" Managing your wallet")]),a._v(" "),e("p",[a._v("By running "),e("code",[a._v("jm.sh")]),a._v(" without parameter, you will get a bunch of command that you can run such as:")]),a._v(" "),e("div",{staticClass:"language- extra-class"},[e("pre",{pre:!0,attrs:{class:"language-text"}},[e("code",[a._v("Usage:\n------\n\nTooling to setup your joinmarket yield generator\n\n wallet-tool: Run wallet-tools.py on the wallet\n wallet-tool-generate: Generate a new wallet\n set-wallet: Set the wallet that the yield generator need to use\n bash: Open an interactive bash session in the joinmarket container\n receive-payjoin: Receive a payjoin payment\n sendpayment: Send a payjoin through coinjoin (password needed)\n\nExample:\n * jm.sh wallet-tool-generate\n * jm.sh set-wallet wallet.jmdat mypassword\n * jm.sh wallet-tool\n * jm.sh receive-payjoin \n * jm.sh sendpayment
    \n * jm.sh wallet-tool history\n * jm.sh bash\n")])])]),e("p",[a._v("Note "),e("code",[a._v("jm.sh")]),a._v(" commands are wrapper around joinmarket scripts. Those are just convenience command, you can always directly connect to the container via "),e("code",[a._v("jm.sh bash")]),a._v(" and achieve the same result with the joinmarket python scripts.")]),a._v(" "),e("h2",{attrs:{id:"getting-command-prompt-into-the-container"}},[e("a",{staticClass:"header-anchor",attrs:{href:"#getting-command-prompt-into-the-container"}},[a._v("#")]),a._v(" Getting command prompt into the container")]),a._v(" "),e("p",[a._v("You can connect to the container and have direct access to joinmarket scripts such as:")]),a._v(" "),e("div",{staticClass:"language-bash extra-class"},[e("pre",{pre:!0,attrs:{class:"language-bash"}},[e("code",[a._v("jm.sh "),e("span",{pre:!0,attrs:{class:"token function"}},[a._v("bash")]),a._v("\nsendpayment.py wallet.jmdat "),e("span",{pre:!0,attrs:{class:"token punctuation"}},[a._v("..")]),a._v(".\n")])])]),e("h2",{attrs:{id:"managing-the-services-such-as-yield-generators"}},[e("a",{staticClass:"header-anchor",attrs:{href:"#managing-the-services-such-as-yield-generators"}},[a._v("#")]),a._v(" Managing the services such as yield generators")]),a._v(" "),e("p",[a._v("First connect to the container's bash")]),a._v(" "),e("div",{staticClass:"language-bash extra-class"},[e("pre",{pre:!0,attrs:{class:"language-bash"}},[e("code",[a._v("jm.sh "),e("span",{pre:!0,attrs:{class:"token function"}},[a._v("bash")]),a._v("\n")])])]),e("p",[a._v("You can list available services to run:")]),a._v(" "),e("div",{staticClass:"language-bash extra-class"},[e("pre",{pre:!0,attrs:{class:"language-bash"}},[e("code",[a._v("supervisorctl status\n")])])]),e("p",[a._v("Which might show you")]),a._v(" "),e("div",{staticClass:"language-bash extra-class"},[e("pre",{pre:!0,attrs:{class:"language-bash"}},[e("code",[a._v("root"),e("span",{pre:!0,attrs:{class:"token operator"}},[a._v(">")]),a._v(" supervisorctl status\nob-watcher STOPPED Not started\nyg-privacyenhanced STOPPED Not started\nyield-generator-basic STOPPED Not started\n")])])]),e("p",[a._v("You can start a yield generator with:")]),a._v(" "),e("div",{staticClass:"language-bash extra-class"},[e("pre",{pre:!0,attrs:{class:"language-bash"}},[e("code",[a._v("supervisorctl start yg-privacyenhanced\n")])])]),e("p",[a._v("*** Note that services will NOT be restarted automatically if the container restart. ***")]),a._v(" "),e("p",[a._v("If you want to automatically restart the service when the container restart,")]),a._v(" "),e("div",{staticClass:"language-bash extra-class"},[e("pre",{pre:!0,attrs:{class:"language-bash"}},[e("code",[e("span",{pre:!0,attrs:{class:"token function"}},[a._v("vim")]),a._v(" "),e("span",{pre:!0,attrs:{class:"token variable"}},[a._v("$AUTO_START")]),a._v("\n")])])]),e("p",[a._v("Then remove the comment "),e("code",[a._v("#")]),a._v(" in front of the service name you want to automatically restart.")]),a._v(" "),e("h2",{attrs:{id:"ob-watcher"}},[e("a",{staticClass:"header-anchor",attrs:{href:"#ob-watcher"}},[a._v("#")]),a._v(" OB-Watcher")]),a._v(" "),e("p",[a._v("The "),e("code",[a._v("ob-watcher")]),a._v(" service allows you to "),e("a",{attrs:{href:"https://github.com/JoinMarket-Org/joinmarket-clientserver/blob/master/docs/orderbook.md",target:"_blank",rel:"noopener noreferrer"}},[a._v("see an order book"),e("OutboundLink")],1),a._v(".")]),a._v(" "),e("p",[a._v("You can activate it:")]),a._v(" "),e("div",{staticClass:"language-bash extra-class"},[e("pre",{pre:!0,attrs:{class:"language-bash"}},[e("code",[a._v("supervisorctl start ob-watcher\n")])])]),e("p",[a._v("Then you can browse it by browsing "),e("code",[a._v("https://.com/obwatch/")])]),a._v(" "),e("h2",{attrs:{id:"troubleshooting"}},[e("a",{staticClass:"header-anchor",attrs:{href:"#troubleshooting"}},[a._v("#")]),a._v(" Troubleshooting")]),a._v(" "),e("h3",{attrs:{id:"error-failed-to-load-wallet-you-need-to-remove-the-lock-file"}},[e("a",{staticClass:"header-anchor",attrs:{href:"#error-failed-to-load-wallet-you-need-to-remove-the-lock-file"}},[a._v("#")]),a._v(" Error: Failed to load wallet, you need to remove the lock file")]),a._v(" "),e("p",[a._v("You might sometimes get the following error when running a python script for joinmarket:")]),a._v(" "),e("div",{staticClass:"language- extra-class"},[e("pre",{pre:!0,attrs:{class:"language-text"}},[e("code",[a._v("Failed to load wallet, error message: RetryableStorageError('File is currently in use (locked by pid 12822). If this is a leftover from a crashed instance you need to remove the lock file `/root/.joinmarket/wallets/.wallet.jmdat.lock` manually.')\n")])])]),e("p",[a._v("This is because a service using the wallet is running, so you need to shut it down before running the command.")]),a._v(" "),e("p",[a._v("Check which service is running:")]),a._v(" "),e("div",{staticClass:"language-bash extra-class"},[e("pre",{pre:!0,attrs:{class:"language-bash"}},[e("code",[a._v("supervisorctl status\n")])])]),e("p",[a._v("And stop it")]),a._v(" "),e("div",{staticClass:"language-bash extra-class"},[e("pre",{pre:!0,attrs:{class:"language-bash"}},[e("code",[a._v("supervisorctl stop yg-privacyenhanced\n")])])]),e("h3",{attrs:{id:"read-the-logs-of-services"}},[e("a",{staticClass:"header-anchor",attrs:{href:"#read-the-logs-of-services"}},[a._v("#")]),a._v(" Read the logs of services")]),a._v(" "),e("p",[a._v("You can use the "),e("code",[a._v("supervisorctl tail")]),a._v(" command:")]),a._v(" "),e("div",{staticClass:"language-bash extra-class"},[e("pre",{pre:!0,attrs:{class:"language-bash"}},[e("code",[a._v("supervisorctl "),e("span",{pre:!0,attrs:{class:"token function"}},[a._v("tail")]),a._v(" yg-privacyenhanced\n")])])]),e("p",[a._v("You can also check the logs in the "),e("code",[a._v("$DATADIR/logs")]),a._v(" folder.")])])}),[],!1,null,null,null);e.default=r.exports}}]); \ No newline at end of file +(window.webpackJsonp=window.webpackJsonp||[]).push([[134],{790:function(a,e,t){"use strict";t.r(e);var s=t(10),r=Object(s.a)({},(function(){var a=this,e=a._self._c;return e("ContentSlotsDistributor",{attrs:{"slot-key":a.$parent.slotKey}},[e("h1",{attrs:{id:"joinmarket-support"}},[e("a",{staticClass:"header-anchor",attrs:{href:"#joinmarket-support"}},[a._v("#")]),a._v(" Joinmarket support")]),a._v(" "),e("p",[a._v("JoinMarket is software to create a special kind of bitcoin transaction called a CoinJoin transaction. Its aim is to improve the confidentiality and privacy of bitcoin transactions.")]),a._v(" "),e("p",[a._v("You will be able to use your bitcoin to help other protect their privacy, while earning a yield for this service.")]),a._v(" "),e("p",[a._v("See "),e("a",{attrs:{href:"https://github.com/JoinMarket-Org/JoinMarket-Docs/blob/master/High-level-design.md",target:"_blank",rel:"noopener noreferrer"}},[a._v("the documentation of the joinmarket project"),e("OutboundLink")],1),a._v(" for more details.")]),a._v(" "),e("p",[a._v("This is a very advanced functionality, and there is no easy way to recover if something goes wrong.")]),a._v(" "),e("p",[a._v("For hardcore bitcoiners only.")]),a._v(" "),e("h2",{attrs:{id:"how-to-use"}},[e("a",{staticClass:"header-anchor",attrs:{href:"#how-to-use"}},[a._v("#")]),a._v(" How to use")]),a._v(" "),e("div",{staticClass:"language-bash extra-class"},[e("pre",{pre:!0,attrs:{class:"language-bash"}},[e("code",[e("span",{pre:!0,attrs:{class:"token assign-left variable"}},[a._v("BTCPAYGEN_ADDITIONAL_FRAGMENTS")]),e("span",{pre:!0,attrs:{class:"token operator"}},[a._v("=")]),e("span",{pre:!0,attrs:{class:"token string"}},[a._v('"'),e("span",{pre:!0,attrs:{class:"token variable"}},[a._v("$BTCPAYGEN_ADDITIONAL_FRAGMENTS")]),a._v(';opt-add-joinmarket"')]),a._v("\n"),e("span",{pre:!0,attrs:{class:"token builtin class-name"}},[a._v(".")]),a._v(" btcpay-setup.sh "),e("span",{pre:!0,attrs:{class:"token parameter variable"}},[a._v("-i")]),a._v("\n")])])]),e("p",[a._v("Then you need to setup your default joinmarket wallet:")]),a._v(" "),e("div",{staticClass:"language-bash extra-class"},[e("pre",{pre:!0,attrs:{class:"language-bash"}},[e("code",[a._v("jm.sh wallet-tool-generate\njm.sh set-wallet "),e("span",{pre:!0,attrs:{class:"token operator"}},[a._v("<")]),a._v("wallet_file_name"),e("span",{pre:!0,attrs:{class:"token operator"}},[a._v(">")]),a._v(" "),e("span",{pre:!0,attrs:{class:"token operator"}},[a._v("<")]),a._v("password"),e("span",{pre:!0,attrs:{class:"token operator"}},[a._v(">")]),a._v("\n")])])]),e("p",[a._v("Once done, you will need to send some money to the joinmarket wallet:")]),a._v(" "),e("div",{staticClass:"language-bash extra-class"},[e("pre",{pre:!0,attrs:{class:"language-bash"}},[e("code",[a._v("jm.sh wallet-tool\n")])])]),e("h2",{attrs:{id:"how-to-change-joinmarket-configuration"}},[e("a",{staticClass:"header-anchor",attrs:{href:"#how-to-change-joinmarket-configuration"}},[a._v("#")]),a._v(" How to change joinmarket configuration?")]),a._v(" "),e("p",[a._v("Connect to your container, and edit your configuration:")]),a._v(" "),e("div",{staticClass:"language-bash extra-class"},[e("pre",{pre:!0,attrs:{class:"language-bash"}},[e("code",[a._v("jm.sh "),e("span",{pre:!0,attrs:{class:"token function"}},[a._v("bash")]),a._v("\n"),e("span",{pre:!0,attrs:{class:"token function"}},[a._v("vim")]),a._v(" "),e("span",{pre:!0,attrs:{class:"token variable"}},[a._v("$CONFIG")]),a._v("\n")])])]),e("h2",{attrs:{id:"managing-your-wallet"}},[e("a",{staticClass:"header-anchor",attrs:{href:"#managing-your-wallet"}},[a._v("#")]),a._v(" Managing your wallet")]),a._v(" "),e("p",[a._v("By running "),e("code",[a._v("jm.sh")]),a._v(" without parameter, you will get a bunch of command that you can run such as:")]),a._v(" "),e("div",{staticClass:"language- extra-class"},[e("pre",{pre:!0,attrs:{class:"language-text"}},[e("code",[a._v("Usage:\n------\n\nTooling to setup your joinmarket yield generator\n\n wallet-tool: Run wallet-tools.py on the wallet\n wallet-tool-generate: Generate a new wallet\n set-wallet: Set the wallet that the yield generator need to use\n bash: Open an interactive bash session in the joinmarket container\n receive-payjoin: Receive a payjoin payment\n sendpayment: Send a payjoin through coinjoin (password needed)\n\nExample:\n * jm.sh wallet-tool-generate\n * jm.sh set-wallet wallet.jmdat mypassword\n * jm.sh wallet-tool\n * jm.sh receive-payjoin \n * jm.sh sendpayment
    \n * jm.sh wallet-tool history\n * jm.sh bash\n")])])]),e("p",[a._v("Note "),e("code",[a._v("jm.sh")]),a._v(" commands are wrapper around joinmarket scripts. Those are just convenience command, you can always directly connect to the container via "),e("code",[a._v("jm.sh bash")]),a._v(" and achieve the same result with the joinmarket python scripts.")]),a._v(" "),e("h2",{attrs:{id:"getting-command-prompt-into-the-container"}},[e("a",{staticClass:"header-anchor",attrs:{href:"#getting-command-prompt-into-the-container"}},[a._v("#")]),a._v(" Getting command prompt into the container")]),a._v(" "),e("p",[a._v("You can connect to the container and have direct access to joinmarket scripts such as:")]),a._v(" "),e("div",{staticClass:"language-bash extra-class"},[e("pre",{pre:!0,attrs:{class:"language-bash"}},[e("code",[a._v("jm.sh "),e("span",{pre:!0,attrs:{class:"token function"}},[a._v("bash")]),a._v("\nsendpayment.py wallet.jmdat "),e("span",{pre:!0,attrs:{class:"token punctuation"}},[a._v("..")]),a._v(".\n")])])]),e("h2",{attrs:{id:"managing-the-services-such-as-yield-generators"}},[e("a",{staticClass:"header-anchor",attrs:{href:"#managing-the-services-such-as-yield-generators"}},[a._v("#")]),a._v(" Managing the services such as yield generators")]),a._v(" "),e("p",[a._v("First connect to the container's bash")]),a._v(" "),e("div",{staticClass:"language-bash extra-class"},[e("pre",{pre:!0,attrs:{class:"language-bash"}},[e("code",[a._v("jm.sh "),e("span",{pre:!0,attrs:{class:"token function"}},[a._v("bash")]),a._v("\n")])])]),e("p",[a._v("You can list available services to run:")]),a._v(" "),e("div",{staticClass:"language-bash extra-class"},[e("pre",{pre:!0,attrs:{class:"language-bash"}},[e("code",[a._v("supervisorctl status\n")])])]),e("p",[a._v("Which might show you")]),a._v(" "),e("div",{staticClass:"language-bash extra-class"},[e("pre",{pre:!0,attrs:{class:"language-bash"}},[e("code",[a._v("root"),e("span",{pre:!0,attrs:{class:"token operator"}},[a._v(">")]),a._v(" supervisorctl status\nob-watcher STOPPED Not started\nyg-privacyenhanced STOPPED Not started\nyield-generator-basic STOPPED Not started\n")])])]),e("p",[a._v("You can start a yield generator with:")]),a._v(" "),e("div",{staticClass:"language-bash extra-class"},[e("pre",{pre:!0,attrs:{class:"language-bash"}},[e("code",[a._v("supervisorctl start yg-privacyenhanced\n")])])]),e("p",[a._v("*** Note that services will NOT be restarted automatically if the container restart. ***")]),a._v(" "),e("p",[a._v("If you want to automatically restart the service when the container restart,")]),a._v(" "),e("div",{staticClass:"language-bash extra-class"},[e("pre",{pre:!0,attrs:{class:"language-bash"}},[e("code",[e("span",{pre:!0,attrs:{class:"token function"}},[a._v("vim")]),a._v(" "),e("span",{pre:!0,attrs:{class:"token variable"}},[a._v("$AUTO_START")]),a._v("\n")])])]),e("p",[a._v("Then remove the comment "),e("code",[a._v("#")]),a._v(" in front of the service name you want to automatically restart.")]),a._v(" "),e("h2",{attrs:{id:"ob-watcher"}},[e("a",{staticClass:"header-anchor",attrs:{href:"#ob-watcher"}},[a._v("#")]),a._v(" OB-Watcher")]),a._v(" "),e("p",[a._v("The "),e("code",[a._v("ob-watcher")]),a._v(" service allows you to "),e("a",{attrs:{href:"https://github.com/JoinMarket-Org/joinmarket-clientserver/blob/master/docs/orderbook.md",target:"_blank",rel:"noopener noreferrer"}},[a._v("see an order book"),e("OutboundLink")],1),a._v(".")]),a._v(" "),e("p",[a._v("You can activate it:")]),a._v(" "),e("div",{staticClass:"language-bash extra-class"},[e("pre",{pre:!0,attrs:{class:"language-bash"}},[e("code",[a._v("supervisorctl start ob-watcher\n")])])]),e("p",[a._v("Then you can browse it by browsing "),e("code",[a._v("https://.com/obwatch/")])]),a._v(" "),e("h2",{attrs:{id:"troubleshooting"}},[e("a",{staticClass:"header-anchor",attrs:{href:"#troubleshooting"}},[a._v("#")]),a._v(" Troubleshooting")]),a._v(" "),e("h3",{attrs:{id:"error-failed-to-load-wallet-you-need-to-remove-the-lock-file"}},[e("a",{staticClass:"header-anchor",attrs:{href:"#error-failed-to-load-wallet-you-need-to-remove-the-lock-file"}},[a._v("#")]),a._v(" Error: Failed to load wallet, you need to remove the lock file")]),a._v(" "),e("p",[a._v("You might sometimes get the following error when running a python script for joinmarket:")]),a._v(" "),e("div",{staticClass:"language- extra-class"},[e("pre",{pre:!0,attrs:{class:"language-text"}},[e("code",[a._v("Failed to load wallet, error message: RetryableStorageError('File is currently in use (locked by pid 12822). If this is a leftover from a crashed instance you need to remove the lock file `/root/.joinmarket/wallets/.wallet.jmdat.lock` manually.')\n")])])]),e("p",[a._v("This is because a service using the wallet is running, so you need to shut it down before running the command.")]),a._v(" "),e("p",[a._v("Check which service is running:")]),a._v(" "),e("div",{staticClass:"language-bash extra-class"},[e("pre",{pre:!0,attrs:{class:"language-bash"}},[e("code",[a._v("supervisorctl status\n")])])]),e("p",[a._v("And stop it")]),a._v(" "),e("div",{staticClass:"language-bash extra-class"},[e("pre",{pre:!0,attrs:{class:"language-bash"}},[e("code",[a._v("supervisorctl stop yg-privacyenhanced\n")])])]),e("h3",{attrs:{id:"read-the-logs-of-services"}},[e("a",{staticClass:"header-anchor",attrs:{href:"#read-the-logs-of-services"}},[a._v("#")]),a._v(" Read the logs of services")]),a._v(" "),e("p",[a._v("You can use the "),e("code",[a._v("supervisorctl tail")]),a._v(" command:")]),a._v(" "),e("div",{staticClass:"language-bash extra-class"},[e("pre",{pre:!0,attrs:{class:"language-bash"}},[e("code",[a._v("supervisorctl "),e("span",{pre:!0,attrs:{class:"token function"}},[a._v("tail")]),a._v(" yg-privacyenhanced\n")])])]),e("p",[a._v("You can also check the logs in the "),e("code",[a._v("$DATADIR/logs")]),a._v(" folder.")])])}),[],!1,null,null,null);e.default=r.exports}}]); \ No newline at end of file diff --git a/assets/js/135.f1adbc24.js b/assets/js/135.45f98247.js similarity index 97% rename from assets/js/135.f1adbc24.js rename to assets/js/135.45f98247.js index 2213450d93..edc6d2d644 100644 --- a/assets/js/135.f1adbc24.js +++ b/assets/js/135.45f98247.js @@ -1 +1 @@ -(window.webpackJsonp=window.webpackJsonp||[]).push([[135],{789:function(a,t,s){"use strict";s.r(t);var e=s(10),n=Object(e.a)({},(function(){var a=this,t=a._self._c;return t("ContentSlotsDistributor",{attrs:{"slot-key":a.$parent.slotKey}},[t("h1",{attrs:{id:"lightning-terminal-lit"}},[t("a",{staticClass:"header-anchor",attrs:{href:"#lightning-terminal-lit"}},[a._v("#")]),a._v(" Lightning Terminal (LiT)")]),a._v(" "),t("p",[t("a",{attrs:{href:"https://github.com/lightninglabs/lightning-terminal",target:"_blank",rel:"noopener noreferrer"}},[a._v("Lightning Terminal"),t("OutboundLink")],1),a._v(" (LiT) is a browser-based interface for managing channel liquidity.\nIt integrates the Lightning Labs services Loop, Poold and Faraday all in one and offers a web UI to manage them.\nLND required.")]),a._v(" "),t("h2",{attrs:{id:"installation"}},[t("a",{staticClass:"header-anchor",attrs:{href:"#installation"}},[a._v("#")]),a._v(" Installation")]),a._v(" "),t("p",[a._v("To install the Lightning Terminal service, you need to set a password for the login.")]),a._v(" "),t("div",{staticClass:"language-bash extra-class"},[t("pre",{pre:!0,attrs:{class:"language-bash"}},[t("code",[t("span",{pre:!0,attrs:{class:"token comment"}},[a._v("# Set password")]),a._v("\n"),t("span",{pre:!0,attrs:{class:"token builtin class-name"}},[a._v("export")]),a._v(" "),t("span",{pre:!0,attrs:{class:"token assign-left variable"}},[a._v("LIT_PASSWD")]),t("span",{pre:!0,attrs:{class:"token operator"}},[a._v("=")]),t("span",{pre:!0,attrs:{class:"token string"}},[a._v('"sUpErSeCuRe"')]),a._v("\n\n"),t("span",{pre:!0,attrs:{class:"token comment"}},[a._v("# Add fragment and run setup")]),a._v("\n"),t("span",{pre:!0,attrs:{class:"token builtin class-name"}},[a._v("export")]),a._v(" "),t("span",{pre:!0,attrs:{class:"token assign-left variable"}},[a._v("BTCPAYGEN_ADDITIONAL_FRAGMENTS")]),t("span",{pre:!0,attrs:{class:"token operator"}},[a._v("=")]),t("span",{pre:!0,attrs:{class:"token string"}},[a._v('"'),t("span",{pre:!0,attrs:{class:"token variable"}},[a._v("$BTCPAYGEN_ADDITIONAL_FRAGMENTS")]),a._v(';opt-add-lightning-terminal"')]),a._v("\n"),t("span",{pre:!0,attrs:{class:"token builtin class-name"}},[a._v(".")]),a._v(" btcpay-setup.sh "),t("span",{pre:!0,attrs:{class:"token parameter variable"}},[a._v("-i")]),a._v("\n")])])]),t("p",[a._v("Afterwards you should see Lightning Terminal appear as a service on the Server Settings > Services page in BTCPay Server.")]),a._v(" "),t("h2",{attrs:{id:"troubleshooting"}},[t("a",{staticClass:"header-anchor",attrs:{href:"#troubleshooting"}},[a._v("#")]),a._v(" Troubleshooting")]),a._v(" "),t("p",[a._v("To see the logs of the Lightning Terminal service, you can run this command:")]),a._v(" "),t("div",{staticClass:"language-bash extra-class"},[t("pre",{pre:!0,attrs:{class:"language-bash"}},[t("code",[t("span",{pre:!0,attrs:{class:"token function"}},[a._v("docker")]),a._v(" logs "),t("span",{pre:!0,attrs:{class:"token parameter variable"}},[a._v("-f")]),a._v(" generated_lnd_lit_1\n")])])])])}),[],!1,null,null,null);t.default=n.exports}}]); \ No newline at end of file +(window.webpackJsonp=window.webpackJsonp||[]).push([[135],{788:function(a,t,s){"use strict";s.r(t);var e=s(10),n=Object(e.a)({},(function(){var a=this,t=a._self._c;return t("ContentSlotsDistributor",{attrs:{"slot-key":a.$parent.slotKey}},[t("h1",{attrs:{id:"lightning-terminal-lit"}},[t("a",{staticClass:"header-anchor",attrs:{href:"#lightning-terminal-lit"}},[a._v("#")]),a._v(" Lightning Terminal (LiT)")]),a._v(" "),t("p",[t("a",{attrs:{href:"https://github.com/lightninglabs/lightning-terminal",target:"_blank",rel:"noopener noreferrer"}},[a._v("Lightning Terminal"),t("OutboundLink")],1),a._v(" (LiT) is a browser-based interface for managing channel liquidity.\nIt integrates the Lightning Labs services Loop, Poold and Faraday all in one and offers a web UI to manage them.\nLND required.")]),a._v(" "),t("h2",{attrs:{id:"installation"}},[t("a",{staticClass:"header-anchor",attrs:{href:"#installation"}},[a._v("#")]),a._v(" Installation")]),a._v(" "),t("p",[a._v("To install the Lightning Terminal service, you need to set a password for the login.")]),a._v(" "),t("div",{staticClass:"language-bash extra-class"},[t("pre",{pre:!0,attrs:{class:"language-bash"}},[t("code",[t("span",{pre:!0,attrs:{class:"token comment"}},[a._v("# Set password")]),a._v("\n"),t("span",{pre:!0,attrs:{class:"token builtin class-name"}},[a._v("export")]),a._v(" "),t("span",{pre:!0,attrs:{class:"token assign-left variable"}},[a._v("LIT_PASSWD")]),t("span",{pre:!0,attrs:{class:"token operator"}},[a._v("=")]),t("span",{pre:!0,attrs:{class:"token string"}},[a._v('"sUpErSeCuRe"')]),a._v("\n\n"),t("span",{pre:!0,attrs:{class:"token comment"}},[a._v("# Add fragment and run setup")]),a._v("\n"),t("span",{pre:!0,attrs:{class:"token builtin class-name"}},[a._v("export")]),a._v(" "),t("span",{pre:!0,attrs:{class:"token assign-left variable"}},[a._v("BTCPAYGEN_ADDITIONAL_FRAGMENTS")]),t("span",{pre:!0,attrs:{class:"token operator"}},[a._v("=")]),t("span",{pre:!0,attrs:{class:"token string"}},[a._v('"'),t("span",{pre:!0,attrs:{class:"token variable"}},[a._v("$BTCPAYGEN_ADDITIONAL_FRAGMENTS")]),a._v(';opt-add-lightning-terminal"')]),a._v("\n"),t("span",{pre:!0,attrs:{class:"token builtin class-name"}},[a._v(".")]),a._v(" btcpay-setup.sh "),t("span",{pre:!0,attrs:{class:"token parameter variable"}},[a._v("-i")]),a._v("\n")])])]),t("p",[a._v("Afterwards you should see Lightning Terminal appear as a service on the Server Settings > Services page in BTCPay Server.")]),a._v(" "),t("h2",{attrs:{id:"troubleshooting"}},[t("a",{staticClass:"header-anchor",attrs:{href:"#troubleshooting"}},[a._v("#")]),a._v(" Troubleshooting")]),a._v(" "),t("p",[a._v("To see the logs of the Lightning Terminal service, you can run this command:")]),a._v(" "),t("div",{staticClass:"language-bash extra-class"},[t("pre",{pre:!0,attrs:{class:"language-bash"}},[t("code",[t("span",{pre:!0,attrs:{class:"token function"}},[a._v("docker")]),a._v(" logs "),t("span",{pre:!0,attrs:{class:"token parameter variable"}},[a._v("-f")]),a._v(" generated_lnd_lit_1\n")])])])])}),[],!1,null,null,null);t.default=n.exports}}]); \ No newline at end of file diff --git a/assets/js/136.408150a6.js b/assets/js/136.e0d1a8c9.js similarity index 98% rename from assets/js/136.408150a6.js rename to assets/js/136.e0d1a8c9.js index d8be67f195..7fcde5b50d 100644 --- a/assets/js/136.408150a6.js +++ b/assets/js/136.e0d1a8c9.js @@ -1 +1 @@ -(window.webpackJsonp=window.webpackJsonp||[]).push([[136],{790:function(t,e,a){"use strict";a.r(e);var o=a(10),s=Object(o.a)({},(function(){var t=this,e=t._self._c;return e("ContentSlotsDistributor",{attrs:{"slot-key":t.$parent.slotKey}},[e("h1",{attrs:{id:"ndlc-support"}},[e("a",{staticClass:"header-anchor",attrs:{href:"#ndlc-support"}},[t._v("#")]),t._v(" NDLC support")]),t._v(" "),e("div",{staticClass:"custom-block danger"},[e("p",{staticClass:"custom-block-title"},[t._v("Disclaimer")]),t._v(" "),e("p",[t._v("This project is experimental and based on a protocol which is still evolving everyday.\nUse with caution.")]),t._v(" "),e("p",[t._v("I will take no attempt at maintaining backwards compatibility at this stage.")])]),t._v(" "),e("h2",{attrs:{id:"introduction"}},[e("a",{staticClass:"header-anchor",attrs:{href:"#introduction"}},[t._v("#")]),t._v(" Introduction")]),t._v(" "),e("p",[t._v("A DLC can be seen as a smart contract involving two "),e("code",[t._v("parties")]),t._v(", a future "),e("code",[t._v("event")]),t._v(", a set of outcomes and a "),e("code",[t._v("payoff function")]),t._v(".\nAn "),e("code",[t._v("outcome")]),t._v(" can be "),e("code",[t._v("attested")]),t._v(" by an "),e("code",[t._v("oracle")]),t._v(". The "),e("code",[t._v("oracle")]),t._v(" does not need to interact with either party, and its only role is to "),e("code",[t._v("attest")]),t._v(" the outcome of the event.")]),t._v(" "),e("p",[t._v("The "),e("code",[t._v("payoff function")]),t._v(" determines the two parties' profit or loss depending on which outcome get "),e("code",[t._v("attested")]),t._v(".")]),t._v(" "),e("p",[t._v("The "),e("code",[t._v("oracle")]),t._v(" roles is to define the "),e("code",[t._v("event")]),t._v(" and "),e("code",[t._v("attest")]),t._v(" a single outcome of the event.")]),t._v(" "),e("p",[t._v("Let's call Alice and Bob the two parties of the contract, and Olivia the oracle.")]),t._v(" "),e("p",[t._v("A DLC will show two transactions on the chain:")]),t._v(" "),e("ul",[e("li",[t._v("The Funding Transaction")]),t._v(" "),e("li",[t._v("The Contract Execution Transaction (CET)")])]),t._v(" "),e("p",[t._v("The "),e("code",[t._v("Funding Transaction")]),t._v(" is a transaction built by the two parties of the contract, locking their collateral for the contract.")]),t._v(" "),e("p",[t._v("The "),e("code",[t._v("Contract Execution Transaction")]),t._v(" (or "),e("code",[t._v("CET")]),t._v(") is the transaction distributing the locked collateral according to the "),e("code",[t._v("payoff function")]),t._v(" for the outcome attested by the oracle.")]),t._v(" "),e("p",[t._v("The following documentation is also explained in this video.")]),t._v(" "),e("a",{staticClass:"ytEmbed",staticStyle:{"background-image":"url(https://img.youtube.com/vi/DakwshnNkho/hqdefault.jpg)"},attrs:{href:"https://www.youtube.com/watch?v=DakwshnNkho",title:"How to make a DLC with NDLC-CLI","data-id":"DakwshnNkho"}},[e("iframe",{attrs:{title:"How to make a DLC with NDLC-CLI","data-src":"https://www.youtube-nocookie.com/embed/DakwshnNkho?&autoplay=1&autohide=1&modestbranding=1&color=white&rel=0",frameborder:"0",allow:"autoplay;encrypted-media;picture-in-picture",allowfullscreen:""}})]),t._v(" "),e("h2",{attrs:{id:"how-to-use"}},[e("a",{staticClass:"header-anchor",attrs:{href:"#how-to-use"}},[t._v("#")]),t._v(" How to use")]),t._v(" "),e("p",[t._v("You need to add ndlc's docker fragment to your install with:")]),t._v(" "),e("div",{staticClass:"language-bash extra-class"},[e("pre",{pre:!0,attrs:{class:"language-bash"}},[e("code",[e("span",{pre:!0,attrs:{class:"token assign-left variable"}},[t._v("BTCPAYGEN_ADDITIONAL_FRAGMENTS")]),e("span",{pre:!0,attrs:{class:"token operator"}},[t._v("=")]),e("span",{pre:!0,attrs:{class:"token string"}},[t._v('"'),e("span",{pre:!0,attrs:{class:"token variable"}},[t._v("$BTCPAYGEN_ADDITIONAL_FRAGMENTS")]),t._v(';opt-add-ndlc"')]),t._v("\n"),e("span",{pre:!0,attrs:{class:"token builtin class-name"}},[t._v(".")]),t._v(" btcpay-setup.sh "),e("span",{pre:!0,attrs:{class:"token parameter variable"}},[t._v("-i")]),t._v("\n")])])]),e("p",[t._v("You can then use "),e("code",[t._v("ndlc-cli.sh")]),t._v(" to run use ndlc-cli, for example:")]),t._v(" "),e("div",{staticClass:"language-bash extra-class"},[e("pre",{pre:!0,attrs:{class:"language-bash"}},[e("code",[t._v("ndlc.sh oracle generate MyOwnOracle\n")])])]),e("p",[t._v("Read our documentation on our "),e("a",{attrs:{href:"https://github.com/dgarage/NDLC/blob/master/docs/Concepts.md",target:"_blank",rel:"noopener noreferrer"}},[t._v("GitHub repository"),e("OutboundLink")],1),t._v(".")])])}),[],!1,null,null,null);e.default=s.exports}}]); \ No newline at end of file +(window.webpackJsonp=window.webpackJsonp||[]).push([[136],{789:function(t,e,a){"use strict";a.r(e);var o=a(10),s=Object(o.a)({},(function(){var t=this,e=t._self._c;return e("ContentSlotsDistributor",{attrs:{"slot-key":t.$parent.slotKey}},[e("h1",{attrs:{id:"ndlc-support"}},[e("a",{staticClass:"header-anchor",attrs:{href:"#ndlc-support"}},[t._v("#")]),t._v(" NDLC support")]),t._v(" "),e("div",{staticClass:"custom-block danger"},[e("p",{staticClass:"custom-block-title"},[t._v("Disclaimer")]),t._v(" "),e("p",[t._v("This project is experimental and based on a protocol which is still evolving everyday.\nUse with caution.")]),t._v(" "),e("p",[t._v("I will take no attempt at maintaining backwards compatibility at this stage.")])]),t._v(" "),e("h2",{attrs:{id:"introduction"}},[e("a",{staticClass:"header-anchor",attrs:{href:"#introduction"}},[t._v("#")]),t._v(" Introduction")]),t._v(" "),e("p",[t._v("A DLC can be seen as a smart contract involving two "),e("code",[t._v("parties")]),t._v(", a future "),e("code",[t._v("event")]),t._v(", a set of outcomes and a "),e("code",[t._v("payoff function")]),t._v(".\nAn "),e("code",[t._v("outcome")]),t._v(" can be "),e("code",[t._v("attested")]),t._v(" by an "),e("code",[t._v("oracle")]),t._v(". The "),e("code",[t._v("oracle")]),t._v(" does not need to interact with either party, and its only role is to "),e("code",[t._v("attest")]),t._v(" the outcome of the event.")]),t._v(" "),e("p",[t._v("The "),e("code",[t._v("payoff function")]),t._v(" determines the two parties' profit or loss depending on which outcome get "),e("code",[t._v("attested")]),t._v(".")]),t._v(" "),e("p",[t._v("The "),e("code",[t._v("oracle")]),t._v(" roles is to define the "),e("code",[t._v("event")]),t._v(" and "),e("code",[t._v("attest")]),t._v(" a single outcome of the event.")]),t._v(" "),e("p",[t._v("Let's call Alice and Bob the two parties of the contract, and Olivia the oracle.")]),t._v(" "),e("p",[t._v("A DLC will show two transactions on the chain:")]),t._v(" "),e("ul",[e("li",[t._v("The Funding Transaction")]),t._v(" "),e("li",[t._v("The Contract Execution Transaction (CET)")])]),t._v(" "),e("p",[t._v("The "),e("code",[t._v("Funding Transaction")]),t._v(" is a transaction built by the two parties of the contract, locking their collateral for the contract.")]),t._v(" "),e("p",[t._v("The "),e("code",[t._v("Contract Execution Transaction")]),t._v(" (or "),e("code",[t._v("CET")]),t._v(") is the transaction distributing the locked collateral according to the "),e("code",[t._v("payoff function")]),t._v(" for the outcome attested by the oracle.")]),t._v(" "),e("p",[t._v("The following documentation is also explained in this video.")]),t._v(" "),e("a",{staticClass:"ytEmbed",staticStyle:{"background-image":"url(https://img.youtube.com/vi/DakwshnNkho/hqdefault.jpg)"},attrs:{href:"https://www.youtube.com/watch?v=DakwshnNkho",title:"How to make a DLC with NDLC-CLI","data-id":"DakwshnNkho"}},[e("iframe",{attrs:{title:"How to make a DLC with NDLC-CLI","data-src":"https://www.youtube-nocookie.com/embed/DakwshnNkho?&autoplay=1&autohide=1&modestbranding=1&color=white&rel=0",frameborder:"0",allow:"autoplay;encrypted-media;picture-in-picture",allowfullscreen:""}})]),t._v(" "),e("h2",{attrs:{id:"how-to-use"}},[e("a",{staticClass:"header-anchor",attrs:{href:"#how-to-use"}},[t._v("#")]),t._v(" How to use")]),t._v(" "),e("p",[t._v("You need to add ndlc's docker fragment to your install with:")]),t._v(" "),e("div",{staticClass:"language-bash extra-class"},[e("pre",{pre:!0,attrs:{class:"language-bash"}},[e("code",[e("span",{pre:!0,attrs:{class:"token assign-left variable"}},[t._v("BTCPAYGEN_ADDITIONAL_FRAGMENTS")]),e("span",{pre:!0,attrs:{class:"token operator"}},[t._v("=")]),e("span",{pre:!0,attrs:{class:"token string"}},[t._v('"'),e("span",{pre:!0,attrs:{class:"token variable"}},[t._v("$BTCPAYGEN_ADDITIONAL_FRAGMENTS")]),t._v(';opt-add-ndlc"')]),t._v("\n"),e("span",{pre:!0,attrs:{class:"token builtin class-name"}},[t._v(".")]),t._v(" btcpay-setup.sh "),e("span",{pre:!0,attrs:{class:"token parameter variable"}},[t._v("-i")]),t._v("\n")])])]),e("p",[t._v("You can then use "),e("code",[t._v("ndlc-cli.sh")]),t._v(" to run use ndlc-cli, for example:")]),t._v(" "),e("div",{staticClass:"language-bash extra-class"},[e("pre",{pre:!0,attrs:{class:"language-bash"}},[e("code",[t._v("ndlc.sh oracle generate MyOwnOracle\n")])])]),e("p",[t._v("Read our documentation on our "),e("a",{attrs:{href:"https://github.com/dgarage/NDLC/blob/master/docs/Concepts.md",target:"_blank",rel:"noopener noreferrer"}},[t._v("GitHub repository"),e("OutboundLink")],1),t._v(".")])])}),[],!1,null,null,null);e.default=s.exports}}]); \ No newline at end of file diff --git a/assets/js/137.035c7ebe.js b/assets/js/137.b9a5e189.js similarity index 98% rename from assets/js/137.035c7ebe.js rename to assets/js/137.b9a5e189.js index ddf5eab65f..17c27998f6 100644 --- a/assets/js/137.035c7ebe.js +++ b/assets/js/137.b9a5e189.js @@ -1 +1 @@ -(window.webpackJsonp=window.webpackJsonp||[]).push([[137],{791:function(e,a,t){"use strict";t.r(a);var s=t(10),r=Object(s.a)({},(function(){var e=this,a=e._self._c;return a("ContentSlotsDistributor",{attrs:{"slot-key":e.$parent.slotKey}},[a("h1",{attrs:{id:"pi-hole-support"}},[a("a",{staticClass:"header-anchor",attrs:{href:"#pi-hole-support"}},[e._v("#")]),e._v(" Pi-Hole support")]),e._v(" "),a("p",[a("a",{attrs:{href:"https://pi-hole.net/",target:"_blank",rel:"noopener noreferrer"}},[e._v("Pi-Hole"),a("OutboundLink")],1),e._v(" is a black hole for internet advertisement.\nIt works as a DNS server which blacklist domains tied to advertisement. If you use it as your main DNS server and it detects your query is trying to resolve a domain belonging to an advertisement company, it will resolve the domain to IP "),a("code",[e._v("0.0.0.0")]),e._v(", preventing the advertisement to load on any computer using this DNS server.")]),e._v(" "),a("p",[e._v("Note that our pi-hole integration is meant to be used in a "),a("strong",[e._v("local network")]),e._v(". Please do not try to use this option on a VPS.")]),e._v(" "),a("h2",{attrs:{id:"how-to-use"}},[a("a",{staticClass:"header-anchor",attrs:{href:"#how-to-use"}},[e._v("#")]),e._v(" How to use")]),e._v(" "),a("p",[e._v("Let's imagine the local IP of your BTCPay Server is "),a("code",[e._v("192.168.1.2")]),e._v(".")]),e._v(" "),a("ol",[a("li",[e._v("Connect as root to your server")]),e._v(" "),a("li",[e._v("Add pihole as an option to your docker deployment")])]),e._v(" "),a("div",{staticClass:"language-bash extra-class"},[a("pre",{pre:!0,attrs:{class:"language-bash"}},[a("code",[a("span",{pre:!0,attrs:{class:"token assign-left variable"}},[e._v("BTCPAYGEN_ADDITIONAL_FRAGMENTS")]),a("span",{pre:!0,attrs:{class:"token operator"}},[e._v("=")]),a("span",{pre:!0,attrs:{class:"token string"}},[e._v('"'),a("span",{pre:!0,attrs:{class:"token variable"}},[e._v("$BTCPAYGEN_ADDITIONAL_FRAGMENTS")]),e._v(';opt-add-pihole"')]),e._v("\n"),a("span",{pre:!0,attrs:{class:"token builtin class-name"}},[e._v(".")]),e._v(" btcpay-setup.sh "),a("span",{pre:!0,attrs:{class:"token parameter variable"}},[e._v("-i")]),e._v("\n")])])]),a("ol",{attrs:{start:"3"}},[a("li",[e._v("If your server has a firewall, make sure it allow incoming traffic to port "),a("code",[e._v("53 (UDP)")]),e._v(".")]),e._v(" "),a("li",[e._v("Configure your home router DHCP server to use "),a("code",[e._v("192.168.1.2")]),e._v(" as primary DNS server.")])]),e._v(" "),a("p",[e._v("From now everytime a device will connect to your local network, they will automatically use pi-hole as a DNS server. Advertisements will go to a black hole for all devices.")]),e._v(" "),a("h2",{attrs:{id:"using-the-dashboard"}},[a("a",{staticClass:"header-anchor",attrs:{href:"#using-the-dashboard"}},[e._v("#")]),e._v(" Using the dashboard")]),e._v(" "),a("p",[e._v("Pi-Hole comes with a very nice admin dashboard to monitor its activity.\nIt is disabled by default. To enable it, you need to configure "),a("code",[e._v("PIHOLE_SERVERIP")]),e._v(" to the IP of your server:")]),e._v(" "),a("div",{staticClass:"language-bash extra-class"},[a("pre",{pre:!0,attrs:{class:"language-bash"}},[a("code",[a("span",{pre:!0,attrs:{class:"token assign-left variable"}},[e._v("PIHOLE_SERVERIP")]),a("span",{pre:!0,attrs:{class:"token operator"}},[e._v("=")]),a("span",{pre:!0,attrs:{class:"token string"}},[e._v('"192.168.1.2"')]),e._v("\n"),a("span",{pre:!0,attrs:{class:"token builtin class-name"}},[e._v(".")]),e._v(" btcpay-setup.sh "),a("span",{pre:!0,attrs:{class:"token parameter variable"}},[e._v("-i")]),e._v("\n")])])]),a("p",[e._v("If your device is using pi-hole as a DNS server, you should now be able to browse "),a("code",[e._v("http://pi.hole/admin")]),e._v(" to connect to your dashboard.")]),e._v(" "),a("p",[e._v("You can find the admin password in the logs of pihole:")]),e._v(" "),a("div",{staticClass:"language-bash extra-class"},[a("pre",{pre:!0,attrs:{class:"language-bash"}},[a("code",[a("span",{pre:!0,attrs:{class:"token function"}},[e._v("docker")]),e._v(" logs pihole "),a("span",{pre:!0,attrs:{class:"token operator"}},[e._v("|")]),e._v(" "),a("span",{pre:!0,attrs:{class:"token function"}},[e._v("grep")]),e._v(" random\n")])])]),a("p",[e._v("If the password does not work, you can try to reset the password:")]),e._v(" "),a("div",{staticClass:"language-bash extra-class"},[a("pre",{pre:!0,attrs:{class:"language-bash"}},[a("code",[e._v("pihole.sh "),a("span",{pre:!0,attrs:{class:"token parameter variable"}},[e._v("-a")]),e._v(" "),a("span",{pre:!0,attrs:{class:"token parameter variable"}},[e._v("-p")]),e._v("\n"),a("span",{pre:!0,attrs:{class:"token function"}},[e._v("docker")]),e._v(" restart pihole\n")])])]),a("p",[e._v("Then running again")]),e._v(" "),a("div",{staticClass:"language-bash extra-class"},[a("pre",{pre:!0,attrs:{class:"language-bash"}},[a("code",[a("span",{pre:!0,attrs:{class:"token function"}},[e._v("docker")]),e._v(" logs pihole "),a("span",{pre:!0,attrs:{class:"token operator"}},[e._v("|")]),e._v(" "),a("span",{pre:!0,attrs:{class:"token function"}},[e._v("grep")]),e._v(" random\n")])])])])}),[],!1,null,null,null);a.default=r.exports}}]); \ No newline at end of file +(window.webpackJsonp=window.webpackJsonp||[]).push([[137],{793:function(e,a,t){"use strict";t.r(a);var s=t(10),r=Object(s.a)({},(function(){var e=this,a=e._self._c;return a("ContentSlotsDistributor",{attrs:{"slot-key":e.$parent.slotKey}},[a("h1",{attrs:{id:"pi-hole-support"}},[a("a",{staticClass:"header-anchor",attrs:{href:"#pi-hole-support"}},[e._v("#")]),e._v(" Pi-Hole support")]),e._v(" "),a("p",[a("a",{attrs:{href:"https://pi-hole.net/",target:"_blank",rel:"noopener noreferrer"}},[e._v("Pi-Hole"),a("OutboundLink")],1),e._v(" is a black hole for internet advertisement.\nIt works as a DNS server which blacklist domains tied to advertisement. If you use it as your main DNS server and it detects your query is trying to resolve a domain belonging to an advertisement company, it will resolve the domain to IP "),a("code",[e._v("0.0.0.0")]),e._v(", preventing the advertisement to load on any computer using this DNS server.")]),e._v(" "),a("p",[e._v("Note that our pi-hole integration is meant to be used in a "),a("strong",[e._v("local network")]),e._v(". Please do not try to use this option on a VPS.")]),e._v(" "),a("h2",{attrs:{id:"how-to-use"}},[a("a",{staticClass:"header-anchor",attrs:{href:"#how-to-use"}},[e._v("#")]),e._v(" How to use")]),e._v(" "),a("p",[e._v("Let's imagine the local IP of your BTCPay Server is "),a("code",[e._v("192.168.1.2")]),e._v(".")]),e._v(" "),a("ol",[a("li",[e._v("Connect as root to your server")]),e._v(" "),a("li",[e._v("Add pihole as an option to your docker deployment")])]),e._v(" "),a("div",{staticClass:"language-bash extra-class"},[a("pre",{pre:!0,attrs:{class:"language-bash"}},[a("code",[a("span",{pre:!0,attrs:{class:"token assign-left variable"}},[e._v("BTCPAYGEN_ADDITIONAL_FRAGMENTS")]),a("span",{pre:!0,attrs:{class:"token operator"}},[e._v("=")]),a("span",{pre:!0,attrs:{class:"token string"}},[e._v('"'),a("span",{pre:!0,attrs:{class:"token variable"}},[e._v("$BTCPAYGEN_ADDITIONAL_FRAGMENTS")]),e._v(';opt-add-pihole"')]),e._v("\n"),a("span",{pre:!0,attrs:{class:"token builtin class-name"}},[e._v(".")]),e._v(" btcpay-setup.sh "),a("span",{pre:!0,attrs:{class:"token parameter variable"}},[e._v("-i")]),e._v("\n")])])]),a("ol",{attrs:{start:"3"}},[a("li",[e._v("If your server has a firewall, make sure it allow incoming traffic to port "),a("code",[e._v("53 (UDP)")]),e._v(".")]),e._v(" "),a("li",[e._v("Configure your home router DHCP server to use "),a("code",[e._v("192.168.1.2")]),e._v(" as primary DNS server.")])]),e._v(" "),a("p",[e._v("From now everytime a device will connect to your local network, they will automatically use pi-hole as a DNS server. Advertisements will go to a black hole for all devices.")]),e._v(" "),a("h2",{attrs:{id:"using-the-dashboard"}},[a("a",{staticClass:"header-anchor",attrs:{href:"#using-the-dashboard"}},[e._v("#")]),e._v(" Using the dashboard")]),e._v(" "),a("p",[e._v("Pi-Hole comes with a very nice admin dashboard to monitor its activity.\nIt is disabled by default. To enable it, you need to configure "),a("code",[e._v("PIHOLE_SERVERIP")]),e._v(" to the IP of your server:")]),e._v(" "),a("div",{staticClass:"language-bash extra-class"},[a("pre",{pre:!0,attrs:{class:"language-bash"}},[a("code",[a("span",{pre:!0,attrs:{class:"token assign-left variable"}},[e._v("PIHOLE_SERVERIP")]),a("span",{pre:!0,attrs:{class:"token operator"}},[e._v("=")]),a("span",{pre:!0,attrs:{class:"token string"}},[e._v('"192.168.1.2"')]),e._v("\n"),a("span",{pre:!0,attrs:{class:"token builtin class-name"}},[e._v(".")]),e._v(" btcpay-setup.sh "),a("span",{pre:!0,attrs:{class:"token parameter variable"}},[e._v("-i")]),e._v("\n")])])]),a("p",[e._v("If your device is using pi-hole as a DNS server, you should now be able to browse "),a("code",[e._v("http://pi.hole/admin")]),e._v(" to connect to your dashboard.")]),e._v(" "),a("p",[e._v("You can find the admin password in the logs of pihole:")]),e._v(" "),a("div",{staticClass:"language-bash extra-class"},[a("pre",{pre:!0,attrs:{class:"language-bash"}},[a("code",[a("span",{pre:!0,attrs:{class:"token function"}},[e._v("docker")]),e._v(" logs pihole "),a("span",{pre:!0,attrs:{class:"token operator"}},[e._v("|")]),e._v(" "),a("span",{pre:!0,attrs:{class:"token function"}},[e._v("grep")]),e._v(" random\n")])])]),a("p",[e._v("If the password does not work, you can try to reset the password:")]),e._v(" "),a("div",{staticClass:"language-bash extra-class"},[a("pre",{pre:!0,attrs:{class:"language-bash"}},[a("code",[e._v("pihole.sh "),a("span",{pre:!0,attrs:{class:"token parameter variable"}},[e._v("-a")]),e._v(" "),a("span",{pre:!0,attrs:{class:"token parameter variable"}},[e._v("-p")]),e._v("\n"),a("span",{pre:!0,attrs:{class:"token function"}},[e._v("docker")]),e._v(" restart pihole\n")])])]),a("p",[e._v("Then running again")]),e._v(" "),a("div",{staticClass:"language-bash extra-class"},[a("pre",{pre:!0,attrs:{class:"language-bash"}},[a("code",[a("span",{pre:!0,attrs:{class:"token function"}},[e._v("docker")]),e._v(" logs pihole "),a("span",{pre:!0,attrs:{class:"token operator"}},[e._v("|")]),e._v(" "),a("span",{pre:!0,attrs:{class:"token function"}},[e._v("grep")]),e._v(" random\n")])])])])}),[],!1,null,null,null);a.default=r.exports}}]); \ No newline at end of file diff --git a/assets/js/139.fa64e0db.js b/assets/js/139.be751450.js similarity index 99% rename from assets/js/139.fa64e0db.js rename to assets/js/139.be751450.js index 425f217bb9..ba1febea17 100644 --- a/assets/js/139.fa64e0db.js +++ b/assets/js/139.be751450.js @@ -1 +1 @@ -(window.webpackJsonp=window.webpackJsonp||[]).push([[139],{793:function(e,t,r){"use strict";r.r(t);var a=r(10),o=Object(a.a)({},(function(){var e=this,t=e._self._c;return t("ContentSlotsDistributor",{attrs:{"slot-key":e.$parent.slotKey}},[t("h1",{attrs:{id:"accept-bitcoin-on-your-drupal-commerce-store-using-btcpay-server"}},[t("a",{staticClass:"header-anchor",attrs:{href:"#accept-bitcoin-on-your-drupal-commerce-store-using-btcpay-server"}},[e._v("#")]),e._v(" Accept Bitcoin on your Drupal Commerce Store using BTCPay Server")]),e._v(" "),t("p",[e._v("Introducing BTCPay Server payment module for "),t("a",{attrs:{href:"https://www.drupal.org/project/commerce",target:"_blank",rel:"noopener noreferrer"}},[e._v("Drupal Commerce 2.x"),t("OutboundLink")],1),e._v(". Drupal Commerce Store owners can now accept payments using Bitcoin and other cryptocurrencies directly through BTCPay Server without any third-party intermediary.")]),e._v(" "),t("p",[e._v("BTCPay Server supports a wide range of cryptocurrencies, with the potential for future extensions. Here are the currencies you can use now on BTCPay Server:")]),e._v(" "),t("ul",[t("li",[e._v("BTC (Bitcoin)")]),e._v(" "),t("li",[e._v("Bitcoin layer-two network (the Lightning Network) for fast and zero/low-fee transactions")]),e._v(" "),t("li",[e._v("Altcoins with full node integration including coins like Monero (XMR) and Litecoin (LTC).")]),e._v(" "),t("li",[e._v("Other Major Altcoins: Supported through plugins via platforms such as "),t("RouterLink",{attrs:{to:"/Trocador/"}},[e._v("Trocador")]),e._v(", "),t("RouterLink",{attrs:{to:"/SideShift/"}},[e._v("SideShift")]),e._v(", and FixedFloat.")],1)]),e._v(" "),t("p",[e._v("Want to accept Bitcoin on your Drupal Commerce store? Visit the "),t("a",{attrs:{href:"https://drupal.org/project/commerce_btcpay",target:"_blank",rel:"noopener noreferrer"}},[e._v("project page on Drupal.org"),t("OutboundLink")],1)]),e._v(" "),t("h2",{attrs:{id:"demo-store"}},[t("a",{staticClass:"header-anchor",attrs:{href:"#demo-store"}},[e._v("#")]),e._v(" Demo store")]),e._v(" "),t("p",[e._v("A Drupal Commerce demo store connected with a (testnet) BTCPay Server where you can try the checkout (Bitcoin + Lightning Network) can be found here:"),t("br"),e._v(" "),t("a",{attrs:{href:"http://drupal.demo.btcpay.tech/",target:"_blank",rel:"noopener noreferrer"}},[e._v("http://drupal.demo.btcpay.tech"),t("OutboundLink")],1)]),e._v(" "),t("h2",{attrs:{id:"requirements"}},[t("a",{staticClass:"header-anchor",attrs:{href:"#requirements"}},[e._v("#")]),e._v(" Requirements")]),e._v(" "),t("ul",[t("li",[e._v("BTCPay Server ("),t("a",{attrs:{href:"/deployment/deployment"}},[e._v("self hosted or 3rd party")]),e._v(" or "),t("a",{attrs:{href:"/btcpay-basics/tryitout"}},[e._v("quick start with a testserver")]),e._v(")")]),e._v(" "),t("li",[e._v("Drupal Commerce 2.x installed ("),t("a",{attrs:{href:"https://docs.drupalcommerce.org/commerce2/developer-guide/install-update/installation",target:"_blank",rel:"noopener noreferrer"}},[e._v("installation guide"),t("OutboundLink")],1),e._v(")")]),e._v(" "),t("li",[e._v("Drupal: "),t("a",{attrs:{href:"https://www.drupal.org/docs/8/core/modules/file/overview#content-accessing-private-files",target:"_blank",rel:"noopener noreferrer"}},[e._v("configured and writable private file system"),t("OutboundLink")],1)])]),e._v(" "),t("h2",{attrs:{id:"installation-and-configuration-guide-for-the-btcpay-server-drupal-commerce-integration"}},[t("a",{staticClass:"header-anchor",attrs:{href:"#installation-and-configuration-guide-for-the-btcpay-server-drupal-commerce-integration"}},[e._v("#")]),e._v(" Installation and configuration Guide for the BTCPay Server - Drupal Commerce Integration")]),e._v(" "),t("p",[e._v("Ready to accept Bitcoin on your Drupal Commerce Store? Follow this quick and easy guide to install and configure the BTCPay Drupal Commerce module. For a quick run through, check out our installation and configuration screencast:")]),e._v(" "),t("a",{staticClass:"ytEmbed",staticStyle:{"background-image":"url(https://img.youtube.com/vi/XBZwyC2v48s/hqdefault.jpg)"},attrs:{href:"https://youtube.com/watch?v=XBZwyC2v48s",title:"BTCPay Server - Drupal Commerce 2.x quick walkthrough","data-id":"XBZwyC2v48s"}},[t("iframe",{attrs:{title:"BTCPay Server - Drupal Commerce 2.x quick walkthrough","data-src":"https://www.youtube-nocookie.com/embed/XBZwyC2v48s?&autoplay=1&autohide=1&modestbranding=1&color=white&rel=0",frameborder:"0",allow:"autoplay;encrypted-media;picture-in-picture",allowfullscreen:""}})]),e._v(" "),t("h3",{attrs:{id:"easy-setup-steps"}},[t("a",{staticClass:"header-anchor",attrs:{href:"#easy-setup-steps"}},[e._v("#")]),e._v(" Easy setup steps")]),e._v(" "),t("h4",{attrs:{id:"generate-pairing-code-on-btcpay-server"}},[t("a",{staticClass:"header-anchor",attrs:{href:"#generate-pairing-code-on-btcpay-server"}},[e._v("#")]),e._v(" Generate pairing code on BTCPay server")]),e._v(" "),t("ol",[t("li",[t("strong",[e._v("Setup your store:")]),e._v(" You'd need a BTCPay server instance to get started. Don't have one? click "),t("RouterLink",{attrs:{to:"/RegisterAccount/"}},[e._v("here")]),e._v(" for a step by step guide.")],1),e._v(" "),t("li",[t("strong",[e._v("Access Tokens:")]),e._v(' Once you have your BTCPay Server instance setup and store created, navigate to the store settings and select "'),t("strong",[e._v("Access Tokens")]),e._v('"')]),e._v(" "),t("li",[e._v("Create a new token by clicking on "),t("strong",[e._v("[Create a new token]")])]),e._v(" "),t("li",[t("strong",[e._v("Label:")]),e._v(" enter some label (eg. my store)")]),e._v(" "),t("li",[t("strong",[e._v("Public key:")]),e._v(" this needs to be left "),t("strong",[e._v("empty")])]),e._v(" "),t("li",[t("strong",[e._v("Facade:")]),e._v(' Type in "merchant"')]),e._v(" "),t("li",[e._v("Click on "),t("strong",[e._v("[Request pairing]")])]),e._v(" "),t("li",[e._v("On the next screen choose your configured store in ** Pair to** select dropdown and click on "),t("strong",[e._v("[approve]")])]),e._v(" "),t("li",[e._v('Note down the displayed 7-digit code at the top status message, e.g. "d7afaXr"'),t("br"),e._v("\n(you will need that code below on gateway configuration, see below)")])]),e._v(" "),t("h4",{attrs:{id:"commerce-btcpay-installation-configuration"}},[t("a",{staticClass:"header-anchor",attrs:{href:"#commerce-btcpay-installation-configuration"}},[e._v("#")]),e._v(" Commerce BTCPay: Installation + configuration")]),e._v(" "),t("ol",[t("li",[e._v("Install module: "),t("code",[e._v("composer require drupal/commerce_btcpay")])]),e._v(" "),t("li",[e._v("Enable the module: "),t("code",[e._v("drush en commerce_btcpay -y")])]),e._v(" "),t("li",[e._v("Make sure you have configured "),t("a",{attrs:{href:"https://www.drupal.org/docs/8/core/modules/file/overview#content-accessing-private-files",target:"_blank",rel:"noopener noreferrer"}},[e._v("private file system"),t("OutboundLink")],1),e._v(" (needed to store encrypted public+private key)")]),e._v(" "),t("li",[e._v("Commerce BTCPay configuration ("),t("strong",[e._v("Commerce -> Configuration -> Payment -> Payment gateways")]),e._v("):")]),e._v(" "),t("li",[e._v('Add payment method "BTCPay"\n'),t("ul",[t("li",[t("strong",[e._v("Mode")]),e._v(": Test or Live (you can configure both individually)")]),e._v(" "),t("li",[t("strong",[e._v("Test/Live server host")]),e._v(": enter your URL without https:// prefix e.g. btcpay.yourserver.com (Note - valid SSL certificate needed)")]),e._v(" "),t("li",[t("strong",[e._v("Test/Live Paring code")]),e._v(': enter the 7-digit pairing code from BTCPay "Access tokens" page')]),e._v(" "),t("li",[e._v("Click "),t("strong",[e._v("Save")]),e._v(" to finalize the setup."),t("br"),e._v("\nYou should see a message that the tokens were successfully created.")])])])]),e._v(" "),t("h2",{attrs:{id:"status"}},[t("a",{staticClass:"header-anchor",attrs:{href:"#status"}},[e._v("#")]),e._v(" Status")]),e._v(" "),t("p",[t("strong",[e._v("This module is currently in alpha stage but has proven stable without issues.")]),t("br"),e._v("\nFuture updates and releases will be available on the "),t("a",{attrs:{href:"https://drupal.org/project/commerce_btcpay",target:"_blank",rel:"noopener noreferrer"}},[e._v("project page on drupal.org"),t("OutboundLink")],1)]),e._v(" "),t("h2",{attrs:{id:"about-btcpay-server"}},[t("a",{staticClass:"header-anchor",attrs:{href:"#about-btcpay-server"}},[e._v("#")]),e._v(" About BTCPay Server")]),e._v(" "),t("blockquote",[t("p",[t("a",{attrs:{href:"https://btcpayserver.org/",target:"_blank",rel:"noopener noreferrer"}},[e._v("BTCPay Server"),t("OutboundLink")],1),e._v(" is a self-hosted, open-source cryptocurrency payment processor know for its security, privacy, and censorship resistance.")])]),e._v(" "),t("p",[e._v("It's free to use and allows you to become your own payment processor.\n"),t("strong",[e._v("To get a full overview check out our "),t("a",{attrs:{href:""}},[e._v("documentation")]),e._v(".")])]),e._v(" "),t("h2",{attrs:{id:"compatible-with-bitpay-api"}},[t("a",{staticClass:"header-anchor",attrs:{href:"#compatible-with-bitpay-api"}},[e._v("#")]),e._v(" Compatible with BitPay API")]),e._v(" "),t("p",[e._v("BTCPay was created to be an alternative to 3rd party payment provider "),t("a",{attrs:{href:"https://bitpay.com",target:"_blank",rel:"noopener noreferrer"}},[e._v("BitPay"),t("OutboundLink")],1),e._v(". Therefore, BTCPay is invoice API compatible and you can use this payment plugin also with the official BitPay API and sites. The power of BTCPay is that you can become your own payment provider.")]),e._v(" "),t("p",[e._v("Teaser: future versions of this plugin will be based on the BTCPay Server Greenfield API which is much more powerful and allows more features.")]),e._v(" "),t("h2",{attrs:{id:"get-support"}},[t("a",{staticClass:"header-anchor",attrs:{href:"#get-support"}},[e._v("#")]),e._v(" Get Support")]),e._v(" "),t("p",[e._v("You can open an issue on our "),t("a",{attrs:{href:"https://github.com/btcpayserver/commerce_btcpay/issues",target:"_blank",rel:"noopener noreferrer"}},[e._v("Github repository"),t("OutboundLink")],1),e._v(" or reach us on "),t("a",{attrs:{href:"https://t.me/btcpayserver",target:"_blank",rel:"noopener noreferrer"}},[e._v("Telegram"),t("OutboundLink")],1),e._v(" or "),t("a",{attrs:{href:"http://chat.btcpayserver.org/",target:"_blank",rel:"noopener noreferrer"}},[e._v("Mattermost chat"),t("OutboundLink")],1)])])}),[],!1,null,null,null);t.default=o.exports}}]); \ No newline at end of file +(window.webpackJsonp=window.webpackJsonp||[]).push([[139],{791:function(e,t,r){"use strict";r.r(t);var a=r(10),o=Object(a.a)({},(function(){var e=this,t=e._self._c;return t("ContentSlotsDistributor",{attrs:{"slot-key":e.$parent.slotKey}},[t("h1",{attrs:{id:"accept-bitcoin-on-your-drupal-commerce-store-using-btcpay-server"}},[t("a",{staticClass:"header-anchor",attrs:{href:"#accept-bitcoin-on-your-drupal-commerce-store-using-btcpay-server"}},[e._v("#")]),e._v(" Accept Bitcoin on your Drupal Commerce Store using BTCPay Server")]),e._v(" "),t("p",[e._v("Introducing BTCPay Server payment module for "),t("a",{attrs:{href:"https://www.drupal.org/project/commerce",target:"_blank",rel:"noopener noreferrer"}},[e._v("Drupal Commerce 2.x"),t("OutboundLink")],1),e._v(". Drupal Commerce Store owners can now accept payments using Bitcoin and other cryptocurrencies directly through BTCPay Server without any third-party intermediary.")]),e._v(" "),t("p",[e._v("BTCPay Server supports a wide range of cryptocurrencies, with the potential for future extensions. Here are the currencies you can use now on BTCPay Server:")]),e._v(" "),t("ul",[t("li",[e._v("BTC (Bitcoin)")]),e._v(" "),t("li",[e._v("Bitcoin layer-two network (the Lightning Network) for fast and zero/low-fee transactions")]),e._v(" "),t("li",[e._v("Altcoins with full node integration including coins like Monero (XMR) and Litecoin (LTC).")]),e._v(" "),t("li",[e._v("Other Major Altcoins: Supported through plugins via platforms such as "),t("RouterLink",{attrs:{to:"/Trocador/"}},[e._v("Trocador")]),e._v(", "),t("RouterLink",{attrs:{to:"/SideShift/"}},[e._v("SideShift")]),e._v(", and FixedFloat.")],1)]),e._v(" "),t("p",[e._v("Want to accept Bitcoin on your Drupal Commerce store? Visit the "),t("a",{attrs:{href:"https://drupal.org/project/commerce_btcpay",target:"_blank",rel:"noopener noreferrer"}},[e._v("project page on Drupal.org"),t("OutboundLink")],1)]),e._v(" "),t("h2",{attrs:{id:"demo-store"}},[t("a",{staticClass:"header-anchor",attrs:{href:"#demo-store"}},[e._v("#")]),e._v(" Demo store")]),e._v(" "),t("p",[e._v("A Drupal Commerce demo store connected with a (testnet) BTCPay Server where you can try the checkout (Bitcoin + Lightning Network) can be found here:"),t("br"),e._v(" "),t("a",{attrs:{href:"http://drupal.demo.btcpay.tech/",target:"_blank",rel:"noopener noreferrer"}},[e._v("http://drupal.demo.btcpay.tech"),t("OutboundLink")],1)]),e._v(" "),t("h2",{attrs:{id:"requirements"}},[t("a",{staticClass:"header-anchor",attrs:{href:"#requirements"}},[e._v("#")]),e._v(" Requirements")]),e._v(" "),t("ul",[t("li",[e._v("BTCPay Server ("),t("a",{attrs:{href:"/deployment/deployment"}},[e._v("self hosted or 3rd party")]),e._v(" or "),t("a",{attrs:{href:"/btcpay-basics/tryitout"}},[e._v("quick start with a testserver")]),e._v(")")]),e._v(" "),t("li",[e._v("Drupal Commerce 2.x installed ("),t("a",{attrs:{href:"https://docs.drupalcommerce.org/commerce2/developer-guide/install-update/installation",target:"_blank",rel:"noopener noreferrer"}},[e._v("installation guide"),t("OutboundLink")],1),e._v(")")]),e._v(" "),t("li",[e._v("Drupal: "),t("a",{attrs:{href:"https://www.drupal.org/docs/8/core/modules/file/overview#content-accessing-private-files",target:"_blank",rel:"noopener noreferrer"}},[e._v("configured and writable private file system"),t("OutboundLink")],1)])]),e._v(" "),t("h2",{attrs:{id:"installation-and-configuration-guide-for-the-btcpay-server-drupal-commerce-integration"}},[t("a",{staticClass:"header-anchor",attrs:{href:"#installation-and-configuration-guide-for-the-btcpay-server-drupal-commerce-integration"}},[e._v("#")]),e._v(" Installation and configuration Guide for the BTCPay Server - Drupal Commerce Integration")]),e._v(" "),t("p",[e._v("Ready to accept Bitcoin on your Drupal Commerce Store? Follow this quick and easy guide to install and configure the BTCPay Drupal Commerce module. For a quick run through, check out our installation and configuration screencast:")]),e._v(" "),t("a",{staticClass:"ytEmbed",staticStyle:{"background-image":"url(https://img.youtube.com/vi/XBZwyC2v48s/hqdefault.jpg)"},attrs:{href:"https://youtube.com/watch?v=XBZwyC2v48s",title:"BTCPay Server - Drupal Commerce 2.x quick walkthrough","data-id":"XBZwyC2v48s"}},[t("iframe",{attrs:{title:"BTCPay Server - Drupal Commerce 2.x quick walkthrough","data-src":"https://www.youtube-nocookie.com/embed/XBZwyC2v48s?&autoplay=1&autohide=1&modestbranding=1&color=white&rel=0",frameborder:"0",allow:"autoplay;encrypted-media;picture-in-picture",allowfullscreen:""}})]),e._v(" "),t("h3",{attrs:{id:"easy-setup-steps"}},[t("a",{staticClass:"header-anchor",attrs:{href:"#easy-setup-steps"}},[e._v("#")]),e._v(" Easy setup steps")]),e._v(" "),t("h4",{attrs:{id:"generate-pairing-code-on-btcpay-server"}},[t("a",{staticClass:"header-anchor",attrs:{href:"#generate-pairing-code-on-btcpay-server"}},[e._v("#")]),e._v(" Generate pairing code on BTCPay server")]),e._v(" "),t("ol",[t("li",[t("strong",[e._v("Setup your store:")]),e._v(" You'd need a BTCPay server instance to get started. Don't have one? click "),t("RouterLink",{attrs:{to:"/RegisterAccount/"}},[e._v("here")]),e._v(" for a step by step guide.")],1),e._v(" "),t("li",[t("strong",[e._v("Access Tokens:")]),e._v(' Once you have your BTCPay Server instance setup and store created, navigate to the store settings and select "'),t("strong",[e._v("Access Tokens")]),e._v('"')]),e._v(" "),t("li",[e._v("Create a new token by clicking on "),t("strong",[e._v("[Create a new token]")])]),e._v(" "),t("li",[t("strong",[e._v("Label:")]),e._v(" enter some label (eg. my store)")]),e._v(" "),t("li",[t("strong",[e._v("Public key:")]),e._v(" this needs to be left "),t("strong",[e._v("empty")])]),e._v(" "),t("li",[t("strong",[e._v("Facade:")]),e._v(' Type in "merchant"')]),e._v(" "),t("li",[e._v("Click on "),t("strong",[e._v("[Request pairing]")])]),e._v(" "),t("li",[e._v("On the next screen choose your configured store in ** Pair to** select dropdown and click on "),t("strong",[e._v("[approve]")])]),e._v(" "),t("li",[e._v('Note down the displayed 7-digit code at the top status message, e.g. "d7afaXr"'),t("br"),e._v("\n(you will need that code below on gateway configuration, see below)")])]),e._v(" "),t("h4",{attrs:{id:"commerce-btcpay-installation-configuration"}},[t("a",{staticClass:"header-anchor",attrs:{href:"#commerce-btcpay-installation-configuration"}},[e._v("#")]),e._v(" Commerce BTCPay: Installation + configuration")]),e._v(" "),t("ol",[t("li",[e._v("Install module: "),t("code",[e._v("composer require drupal/commerce_btcpay")])]),e._v(" "),t("li",[e._v("Enable the module: "),t("code",[e._v("drush en commerce_btcpay -y")])]),e._v(" "),t("li",[e._v("Make sure you have configured "),t("a",{attrs:{href:"https://www.drupal.org/docs/8/core/modules/file/overview#content-accessing-private-files",target:"_blank",rel:"noopener noreferrer"}},[e._v("private file system"),t("OutboundLink")],1),e._v(" (needed to store encrypted public+private key)")]),e._v(" "),t("li",[e._v("Commerce BTCPay configuration ("),t("strong",[e._v("Commerce -> Configuration -> Payment -> Payment gateways")]),e._v("):")]),e._v(" "),t("li",[e._v('Add payment method "BTCPay"\n'),t("ul",[t("li",[t("strong",[e._v("Mode")]),e._v(": Test or Live (you can configure both individually)")]),e._v(" "),t("li",[t("strong",[e._v("Test/Live server host")]),e._v(": enter your URL without https:// prefix e.g. btcpay.yourserver.com (Note - valid SSL certificate needed)")]),e._v(" "),t("li",[t("strong",[e._v("Test/Live Paring code")]),e._v(': enter the 7-digit pairing code from BTCPay "Access tokens" page')]),e._v(" "),t("li",[e._v("Click "),t("strong",[e._v("Save")]),e._v(" to finalize the setup."),t("br"),e._v("\nYou should see a message that the tokens were successfully created.")])])])]),e._v(" "),t("h2",{attrs:{id:"status"}},[t("a",{staticClass:"header-anchor",attrs:{href:"#status"}},[e._v("#")]),e._v(" Status")]),e._v(" "),t("p",[t("strong",[e._v("This module is currently in alpha stage but has proven stable without issues.")]),t("br"),e._v("\nFuture updates and releases will be available on the "),t("a",{attrs:{href:"https://drupal.org/project/commerce_btcpay",target:"_blank",rel:"noopener noreferrer"}},[e._v("project page on drupal.org"),t("OutboundLink")],1)]),e._v(" "),t("h2",{attrs:{id:"about-btcpay-server"}},[t("a",{staticClass:"header-anchor",attrs:{href:"#about-btcpay-server"}},[e._v("#")]),e._v(" About BTCPay Server")]),e._v(" "),t("blockquote",[t("p",[t("a",{attrs:{href:"https://btcpayserver.org/",target:"_blank",rel:"noopener noreferrer"}},[e._v("BTCPay Server"),t("OutboundLink")],1),e._v(" is a self-hosted, open-source cryptocurrency payment processor know for its security, privacy, and censorship resistance.")])]),e._v(" "),t("p",[e._v("It's free to use and allows you to become your own payment processor.\n"),t("strong",[e._v("To get a full overview check out our "),t("a",{attrs:{href:""}},[e._v("documentation")]),e._v(".")])]),e._v(" "),t("h2",{attrs:{id:"compatible-with-bitpay-api"}},[t("a",{staticClass:"header-anchor",attrs:{href:"#compatible-with-bitpay-api"}},[e._v("#")]),e._v(" Compatible with BitPay API")]),e._v(" "),t("p",[e._v("BTCPay was created to be an alternative to 3rd party payment provider "),t("a",{attrs:{href:"https://bitpay.com",target:"_blank",rel:"noopener noreferrer"}},[e._v("BitPay"),t("OutboundLink")],1),e._v(". Therefore, BTCPay is invoice API compatible and you can use this payment plugin also with the official BitPay API and sites. The power of BTCPay is that you can become your own payment provider.")]),e._v(" "),t("p",[e._v("Teaser: future versions of this plugin will be based on the BTCPay Server Greenfield API which is much more powerful and allows more features.")]),e._v(" "),t("h2",{attrs:{id:"get-support"}},[t("a",{staticClass:"header-anchor",attrs:{href:"#get-support"}},[e._v("#")]),e._v(" Get Support")]),e._v(" "),t("p",[e._v("You can open an issue on our "),t("a",{attrs:{href:"https://github.com/btcpayserver/commerce_btcpay/issues",target:"_blank",rel:"noopener noreferrer"}},[e._v("Github repository"),t("OutboundLink")],1),e._v(" or reach us on "),t("a",{attrs:{href:"https://t.me/btcpayserver",target:"_blank",rel:"noopener noreferrer"}},[e._v("Telegram"),t("OutboundLink")],1),e._v(" or "),t("a",{attrs:{href:"http://chat.btcpayserver.org/",target:"_blank",rel:"noopener noreferrer"}},[e._v("Mattermost chat"),t("OutboundLink")],1)])])}),[],!1,null,null,null);t.default=o.exports}}]); \ No newline at end of file diff --git a/assets/js/14.d5ad0da7.js b/assets/js/14.86a0a34c.js similarity index 89% rename from assets/js/14.d5ad0da7.js rename to assets/js/14.86a0a34c.js index 5ab1579910..65ca4bb19c 100644 --- a/assets/js/14.d5ad0da7.js +++ b/assets/js/14.86a0a34c.js @@ -1 +1 @@ -(window.webpackJsonp=window.webpackJsonp||[]).push([[14],{294:function(e,t,a){e.exports=a.p+"assets/img/btcpay-vm--19-troubleshoot-403-callback.51193927.png"},593:function(e,t,a){e.exports=a.p+"assets/img/btcpay-vm--01-install-web.4d28e0bd.png"},594:function(e,t,a){e.exports=a.p+"assets/img/btcpay-vm--02-install-upload.8972740d.png"},595:function(e,t,a){e.exports=a.p+"assets/img/btcpay-vm--03-enable-plugin.1b4a6c9f.png"},596:function(e,t,a){e.exports=a.p+"assets/img/btcpay-vm--04-add-new-payment-method.e5a94ee3.png"},597:function(e,t,a){e.exports=a.p+"assets/img/btcpay-vm--05-payment-method-details.adf89c97.png"},598:function(e,t,a){e.exports=a.p+"assets/img/btcpay-vm--06-payment-method-configuration-tab.45617db0.png"},599:function(e,t,a){e.exports=a.p+"assets/img/btcpay-vm--07-account-manage.d477b8b4.png"},600:function(e,t,a){e.exports=a.p+"assets/img/btcpay-vm--08-add-api-key.a58b2941.png"},601:function(e,t,a){e.exports=a.p+"assets/img/btcpay-vm--09-permissions-and-select-store.9ccef388.png"},602:function(e,t,a){e.exports=a.p+"assets/img/btcpay-vm--10-permissions-set.74d76936.png"},603:function(e,t,a){e.exports=a.p+"assets/img/btcpay-vm--11-copy-api-key.94be9878.png"},604:function(e,t,a){e.exports=a.p+"assets/img/btcpay-vm--12-copy-store-id.84c19f9f.png"},605:function(e,t,a){e.exports=a.p+"assets/img/btcpay-vm--13-save-vm-payment-method-form.0a3e52bd.png"},606:function(e,t,a){e.exports=a.p+"assets/img/btcpay-vm--14-create-webhook.1b6e4881.png"},607:function(e,t,a){e.exports=a.p+"assets/img/btcpay-vm--15-webhook-payload-url.37a4f55f.png"},608:function(e,t,a){e.exports=a.p+"assets/img/btcpay-vm--16-webhook-copy-secret.71b0dd07.png"},609:function(e,t,a){e.exports=a.p+"assets/img/btcpay-vm--16-virtuemart-configuration-save.ee549862.png"},610:function(e,t,a){e.exports=a.p+"assets/img/btcpay-vm--17-webhook-save.dfd4fca5.png"},611:function(e,t,a){e.exports=a.p+"assets/img/btcpay-vm--18-troubleshoot-copy-callback-url.70d08e31.png"},852:function(e,t,a){"use strict";a.r(t);var o=a(10),r=Object(o.a)({},(function(){var e=this,t=e._self._c;return t("ContentSlotsDistributor",{attrs:{"slot-key":e.$parent.slotKey}},[t("h1",{attrs:{id:"joomla-virtuemart-integration"}},[t("a",{staticClass:"header-anchor",attrs:{href:"#joomla-virtuemart-integration"}},[e._v("#")]),e._v(" Joomla VirtueMart integration")]),e._v(" "),t("p",[e._v("This document explains how to "),t("strong",[e._v("integrate BTCPay Server into your Joomla VirtueMart store")]),e._v(".\nWatch the video below to go along the document |")]),e._v(" "),t("a",{staticClass:"ytEmbed",staticStyle:{"background-image":"url(https://img.youtube.com/vi/k7XfybLAky0/hqdefault.jpg)"},attrs:{href:"https://youtu.be/k7XfybLAky0",title:"BTCPay Server - Joomla VirtueMart","data-id":"k7XfybLAky0"}},[t("iframe",{attrs:{title:"BTCPay Server - Joomla VirtueMart","data-src":"https://www.youtube-nocookie.com/embed/k7XfybLAky0?&autoplay=1&autohide=1&modestbranding=1&color=white&rel=0",frameborder:"0",allow:"autoplay;encrypted-media;picture-in-picture",allowfullscreen:""}})]),e._v(" "),t("h2",{attrs:{id:"requirements"}},[t("a",{staticClass:"header-anchor",attrs:{href:"#requirements"}},[e._v("#")]),e._v(" Requirements")]),e._v(" "),t("p",[e._v("Please ensure that you meet the following requirements before installing this plugin.")]),e._v(" "),t("ul",[t("li",[e._v("PHP version 7.4 or newer")]),e._v(" "),t("li",[e._v("The curl, gd, intl, json, and mbstring PHP extensions are available")]),e._v(" "),t("li",[e._v("A VirtueMart 3 / 4 store ("),t("a",{attrs:{href:"https://www.virtuemart.net/downloads",target:"_blank",rel:"noopener noreferrer"}},[e._v("Download and installation instructions"),t("OutboundLink")],1),e._v(")")]),e._v(" "),t("li",[e._v("You have a BTCPay Server version 1.3.0 or later, either "),t("RouterLink",{attrs:{to:"/Deployment/"}},[e._v("self-hosted")]),e._v(" or "),t("RouterLink",{attrs:{to:"/Deployment/ThirdPartyHosting/"}},[e._v("hosted by a third-party")])],1),e._v(" "),t("li",[t("RouterLink",{attrs:{to:"/RegisterAccount/"}},[e._v("You've a registered account on the instance")])],1),e._v(" "),t("li",[t("RouterLink",{attrs:{to:"/CreateStore/"}},[e._v("You've a BTCPay store on the instance")])],1),e._v(" "),t("li",[t("RouterLink",{attrs:{to:"/WalletSetup/"}},[e._v("You've a wallet connected to your store")])],1)]),e._v(" "),t("h2",{attrs:{id:"1-install-btcpay-plugin"}},[t("a",{staticClass:"header-anchor",attrs:{href:"#1-install-btcpay-plugin"}},[e._v("#")]),e._v(" 1. Install BTCPay Plugin")]),e._v(" "),t("p",[e._v("There are three ways to "),t("strong",[e._v("download BTCPay for VirtueMart plugin")]),e._v(":")]),e._v(" "),t("ul",[t("li",[e._v("Via the Admin Dashboard (recommended, see below)")]),e._v(" "),t("li",[t("a",{attrs:{href:"https://extensions.joomla.org/extension/vm-payment-btcpay-for-virtuemart/",target:"_blank",rel:"noopener noreferrer"}},[e._v("Joomla Extension Directory (JED)"),t("OutboundLink")],1)]),e._v(" "),t("li",[t("a",{attrs:{href:"https://github.com/btcpayserver/joomla-virtuemart/releases",target:"_blank",rel:"noopener noreferrer"}},[e._v("GitHub Repository"),t("OutboundLink")],1)])]),e._v(" "),t("h3",{attrs:{id:"11-install-plugin-from-joomla-admin-dashboard-recommended"}},[t("a",{staticClass:"header-anchor",attrs:{href:"#11-install-plugin-from-joomla-admin-dashboard-recommended"}},[e._v("#")]),e._v(" 1.1 Install plugin from Joomla Admin Dashboard (recommended)")]),e._v(" "),t("ol",[t("li",[e._v("Menu: Extensions > Manage > Install")]),e._v(" "),t("li",[e._v('On "Install from Web" tab search for "btcpay"')]),e._v(" "),t("li",[e._v("Click on BTCPay for VirtueMart and [Install] button")]),e._v(" "),t("li",[e._v("Continue with step 1.3")])]),e._v(" "),t("figure",[t("img",{attrs:{src:a(593),alt:"BTCPay Virtuemart: Plugin installation web",title:"BTCPay Virtuemart: Plugin installation web"}})]),e._v(" "),t("h3",{attrs:{id:"12-download-and-install-plugin-from-jed-or-github"}},[t("a",{staticClass:"header-anchor",attrs:{href:"#12-download-and-install-plugin-from-jed-or-github"}},[e._v("#")]),e._v(" 1.2 Download and install plugin from JED or GitHub")]),e._v(" "),t("ol",[t("li",[e._v("Download the latest BTCPay plugin from "),t("a",{attrs:{href:"https://github.com/btcpayserver/joomla-virtuemart/releases",target:"_blank",rel:"noopener noreferrer"}},[e._v("Github"),t("OutboundLink")],1),e._v(" or "),t("a",{attrs:{href:"https://extensions.joomla.org/extension/vm-payment-btcpay-for-virtuemart/",target:"_blank",rel:"noopener noreferrer"}},[e._v("JED"),t("OutboundLink")],1)]),e._v(" "),t("li",[e._v("Menu: Extensions -> Manage -> Install")]),e._v(" "),t("li",[e._v('On tab "Upload Package File" upload the '),t("code",[e._v("btcpayvm.zip")])])]),e._v(" "),t("figure",[t("img",{attrs:{src:a(594),alt:"BTCPay Virtuemart: Plugin installation upload",title:"BTCPay Virtuemart: Plugin installation upload"}})]),e._v(" "),t("h3",{attrs:{id:"13-enable-the-plugin"}},[t("a",{staticClass:"header-anchor",attrs:{href:"#13-enable-the-plugin"}},[e._v("#")]),e._v(" 1.3 Enable the plugin")]),e._v(" "),t("ol",[t("li",[e._v("Menu: Extensions -> Plugins")]),e._v(" "),t("li",[e._v('Search for "btcpay"')]),e._v(" "),t("li",[e._v('On "Status" column click the red circle to enable the plugin')])]),e._v(" "),t("figure",[t("img",{attrs:{src:a(595),alt:"BTCPay Virtuemart: Enable plugin",title:"BTCPay Virtuemart: Enable plugin"}})]),e._v(" "),t("h2",{attrs:{id:"2-connecting-virtuemart-and-btcpay-server"}},[t("a",{staticClass:"header-anchor",attrs:{href:"#2-connecting-virtuemart-and-btcpay-server"}},[e._v("#")]),e._v(" 2. Connecting VirtueMart and BTCPay Server")]),e._v(" "),t("p",[e._v("BTCPay for Virtuemart plugin is a "),t("strong",[e._v("bridge between your BTCPay Server (payment processor) and your e-commerce store")]),e._v(".\nNo matter if you're using a self-hosted or third-party solution, the connection process is identical.")]),e._v(" "),t("h3",{attrs:{id:"21-add-btcpay-payment-gateway-in-virtuemart"}},[t("a",{staticClass:"header-anchor",attrs:{href:"#21-add-btcpay-payment-gateway-in-virtuemart"}},[e._v("#")]),e._v(" 2.1 Add BTCPay payment gateway in VirtueMart")]),e._v(" "),t("ol",[t("li",[e._v("Menu: VirtueMart -> Payment Methods")]),e._v(" "),t("li",[e._v("Click button "),t("strong",[e._v("[New]")]),e._v(" "),t("img",{attrs:{src:a(596),alt:"BTCPay Virtuemart: Add new payment method",title:"BTCPay Virtuemart: Add new payment method"}})]),e._v(" "),t("li",[e._v('Configure the payment method according to your needs. Make sure on "Payment Method" dropdown you have "BTCPay for VirtueMart" selected and the payment method is published '),t("img",{attrs:{src:a(597),alt:"BTCPay Virtuemart: Payment method details",title:"BTCPay Virtuemart: Payment method details"}})]),e._v(" "),t("li",[e._v("Hit the "),t("strong",[e._v("[Save]")]),e._v(" button (the plugin table will get created)")])]),e._v(" "),t("p",[e._v('Now you can switch to the "Configuration" tab where we can connect to our BTCPay Server instance. First we need to create an API key.')]),e._v(" "),t("figure",[t("img",{attrs:{src:a(598),alt:"BTCPay Virtuemart: Payment method configuration tab",title:"BTCPay Virtuemart: Payment method configuration tab"}})]),e._v(" "),t("h3",{attrs:{id:"22-create-an-api-key-and-configure-permissions"}},[t("a",{staticClass:"header-anchor",attrs:{href:"#22-create-an-api-key-and-configure-permissions"}},[e._v("#")]),e._v(" 2.2 Create an API key and configure permissions")]),e._v(" "),t("p",[e._v("On BTCPay Server instance:")]),e._v(" "),t("ol",[t("li",[e._v("Click on "),t("em",[e._v("[Account]")])]),e._v(" "),t("li",[e._v("Click on "),t("em",[e._v("[Manage Account]")]),e._v(" "),t("img",{attrs:{src:a(599),alt:"BTCPay Joomla VirtueMart: Manage Account",title:"BTCPay Joomla VirtueMart: Manage Account"}})]),e._v(" "),t("li",[e._v("Go to the tab "),t("em",[e._v('"API Keys"')])]),e._v(" "),t("li",[e._v("Click "),t("em",[e._v("[Generate Key]")]),e._v(" to select permissions.\n"),t("img",{attrs:{src:a(600),alt:"BTCPay Joomla VirtueMart: API Keys overview",title:"BTCPay Joomla VirtueMart: API Keys overview"}})]),e._v(" "),t("li",[e._v("Add a label. "),t("strong",[e._v("Important:")]),e._v(" click on the "),t("em",[e._v('"Select specific stores"')]),e._v(" link for the following permissions: "),t("code",[e._v("View invoices")]),e._v(", "),t("code",[e._v("Create invoice")]),e._v(", "),t("code",[e._v("Modify invoices")]),e._v(", "),t("code",[e._v("Modify stores webhooks")]),e._v(", "),t("code",[e._v("View your stores")]),e._v(" and select the specific store you created for your VirtueMart site. It should look like when everything is set:\n"),t("img",{attrs:{src:a(601),alt:"BTCPay Joomla VirtueMart: API Keys Permissions",title:"BTCPay Joomla VirtueMart: API Keys Permissions"}})]),e._v(" "),t("li",[e._v("Click on "),t("em",[e._v("[Generate API Key]")]),e._v(" "),t("img",{attrs:{src:a(602),alt:"BTCPay Joomla VirtueMart: API Keys Save",title:"BTCPay Joomla VirtueMart: API Keys Save"}})]),e._v(" "),t("li",[e._v("Copy the generated API Key to your "),t("em",[e._v("VirtueMart BTCPay Payment Method Settings")]),e._v(" form\n"),t("img",{attrs:{src:a(603),alt:"BTCPay Joomla VirtueMart: Copy API Key",title:"BTCPay Joomla VirtueMart: Copy API Key"}})]),e._v(" "),t("li",[e._v("Go to Settings and copy the store ID to your "),t("em",[e._v("VirtueMart BTCPay Payment Method Settings")]),e._v(" form\n"),t("img",{attrs:{src:a(604),alt:"BTCPay Joomla VirtueMart: Copy Store ID",title:"BTCPay Joomla VirtueMart: Copy Store ID"}})]),e._v(" "),t("li",[e._v("On the "),t("em",[e._v("VirtueMart BTCPay Payment Method Settings")]),e._v(" form make sure "),t("strong",[e._v("BTPCay Server URL")]),e._v(", "),t("strong",[e._v("API Key")]),e._v(" and "),t("strong",[e._v("Store ID")]),e._v(" are set and click "),t("strong",[e._v("[Save]")]),e._v(" "),t("img",{attrs:{src:a(605),alt:"BTCPay Joomla VirtueMart: Save VirtueMart Settings form",title:"BTCPay Joomla VirtueMart: Save VirtueMart Settings form"}})])]),e._v(" "),t("h3",{attrs:{id:"23-create-a-webhook-on-btcpay-server"}},[t("a",{staticClass:"header-anchor",attrs:{href:"#23-create-a-webhook-on-btcpay-server"}},[e._v("#")]),e._v(" 2.3 Create a webhook on BTCPay Server")]),e._v(" "),t("p",[e._v("Setting up a webhook is important that your gets updates on invoice status changes from BTCPay Server.")]),e._v(" "),t("ol",[t("li",[t("p",[e._v("On BTCPay Server instance go to your store settings, tab "),t("strong",[e._v("[Webhooks]")]),e._v(", click "),t("strong",[e._v("[Create Webhook]")]),e._v(" "),t("img",{attrs:{src:a(606),alt:"BTCPay Joomla VirtueMart: Create webhook",title:"BTCPay Joomla VirtueMart: Create webhook"}})])]),e._v(" "),t("li",[t("p",[e._v("From "),t("em",[e._v("VirtueMart BTCPay Payment Method Settings")]),e._v(" copy the "),t("strong",[e._v("Webhook callback URL")]),e._v(" to webhook settings "),t("strong",[e._v("Payload URL")]),e._v(".\n"),t("img",{attrs:{src:a(607),alt:"BTCPay Joomla VirtueMart: Webhook payload URL",title:"BTCPay Joomla VirtueMart: Webhook payload URL"}})])]),e._v(" "),t("li",[t("p",[e._v("On webhook settings click on the eye to reveal webhook secret. Copy that secret to your "),t("em",[e._v("VirtueMart BTCPay Payment Method Settings")]),e._v(" form "),t("strong",[e._v("Webhook Secret")]),e._v(" input and "),t("strong",[e._v("[Save]")]),e._v(" the VirtueMart configuration again.\n"),t("img",{attrs:{src:a(608),alt:"BTCPay Joomla VirtueMart: Webhook payload URL",title:"BTCPay Joomla VirtueMart: Webhook payload URL"}}),e._v(" "),t("img",{attrs:{src:a(609),alt:"BTCPay Joomla VirtueMart: Webhook VM save configuration",title:"BTCPay Joomla VirtueMart: Webhook VM save configuration"}})])]),e._v(" "),t("li",[t("p",[e._v("Back on webhook settings, enable "),t("strong",[e._v("Automatic redelivery")]),e._v(" and click "),t("strong",[e._v("[Add webhook]")]),e._v(" to save the webhook.\n"),t("img",{attrs:{src:a(610),alt:"BTCPay Joomla VirtueMart: Webhook payload URL",title:"BTCPay Joomla VirtueMart: Webhook payload URL"}})])])]),e._v(" "),t("h2",{attrs:{id:"3-test-the-checkout"}},[t("a",{staticClass:"header-anchor",attrs:{href:"#3-test-the-checkout"}},[e._v("#")]),e._v(" 3. Test the checkout")]),e._v(" "),t("p",[e._v("Everything is ready to go now. Do a small test purchase and make sure the order status gets updated according to the BTCPay invoice status. On BTCPay Server invoice details you can see if the webhook events were fired successfully.")]),e._v(" "),t("h2",{attrs:{id:"customizing-virtuemart-btcpay-payment-method-settings"}},[t("a",{staticClass:"header-anchor",attrs:{href:"#customizing-virtuemart-btcpay-payment-method-settings"}},[e._v("#")]),e._v(" Customizing VirtueMart BTCPay payment method settings")]),e._v(" "),t("p",[e._v('Your VirtueMart BTCPay payment method settings can be found in menu: VirtueMart -> Payment Methods. Click on the payment method of type "btcpayvm" you created.')]),e._v(" "),t("h3",{attrs:{id:"section-btcpay-server-connection-settings"}},[t("a",{staticClass:"header-anchor",attrs:{href:"#section-btcpay-server-connection-settings"}},[e._v("#")]),e._v(" Section: BTCPay Server connection settings")]),e._v(" "),t("p",[e._v("This is the most important part of the configuration. The data entered here will connect your VirtueMart shop with your counterparty store configured on BTCPay Server.")]),e._v(" "),t("p",[t("strong",[e._v("BTCPay Server URL")])]),e._v(" "),t("p",[e._v("URL to your BTCPay Server instance, including protocol e.g. "),t("code",[e._v("https://btcpay.yourdomain.com")]),e._v(".")]),e._v(" "),t("p",[t("strong",[e._v("API Key")])]),e._v(" "),t("p",[e._v("Your BTCPay API Key as mentioned "),t("a",{attrs:{href:"#22-create-an-api-key-and-configure-permissions"}},[e._v("here")]),e._v(".")]),e._v(" "),t("p",[t("strong",[e._v("Store ID")])]),e._v(" "),t("p",[e._v("The store ID of your BTCPay Server store. Can be found on the store settings page. See 8. "),t("a",{attrs:{href:"#22-create-an-api-key-and-configure-permissions"}},[e._v("here")])]),e._v(" "),t("p",[t("strong",[e._v("Webhook Secret")])]),e._v(" "),t("p",[e._v("The wehbook secret which was generated on webhook createion, see "),t("a",{attrs:{href:"#23-create-a-webhook-on-btcpay-server"}},[e._v("here")])]),e._v(" "),t("p",[t("strong",[e._v("Webhook callback URL")])]),e._v(" "),t("p",[e._v("This field is auto-generated by the plugin and helps you when creating the webhook on BTCPay Server. It contains the needed payment method id and parameters to allow processing of callbacks.")]),e._v(" "),t("h3",{attrs:{id:"section-order-states-mapping"}},[t("a",{staticClass:"header-anchor",attrs:{href:"#section-order-states-mapping"}},[e._v("#")]),e._v(" Section: Order states mapping")]),e._v(" "),t("p",[e._v("You can adjust the mapping of BTCPay Server invoice status to VirtueMart order states. On the left are the invoice states and on the right the order states. The defaults here should be good to go - but if you need, you can overwrite them.")]),e._v(" "),t("p",[e._v("VirtueMart order statuses are explained "),t("a",{attrs:{href:"https://docs.virtuemart.net/manual/configuration-menu/order-statuses.html",target:"_blank",rel:"noopener noreferrer"}},[e._v("here"),t("OutboundLink")],1)]),e._v(" "),t("p",[e._v("BTCPay server invoice statuses are explained "),t("RouterLink",{attrs:{to:"/Invoices/#invoice-statuses"}},[e._v("here")])],1),e._v(" "),t("h3",{attrs:{id:"section-restrictions"}},[t("a",{staticClass:"header-anchor",attrs:{href:"#section-restrictions"}},[e._v("#")]),e._v(" Section: Restrictions")]),e._v(" "),t("p",[e._v("These are VirtueMart provided restrictions you know from other payment plugins. You can restrict the amount or countries when the payment method will be available.")]),e._v(" "),t("h3",{attrs:{id:"section-discounts-and-fees"}},[t("a",{staticClass:"header-anchor",attrs:{href:"#section-discounts-and-fees"}},[e._v("#")]),e._v(" Section Discounts and fees")]),e._v(" "),t("p",[e._v("These are VirtueMart provided settings. You can set a fee, cashback and apply tax rules or set a custom logo for the payment method.")]),e._v(" "),t("h2",{attrs:{id:"troubleshooting"}},[t("a",{staticClass:"header-anchor",attrs:{href:"#troubleshooting"}},[e._v("#")]),e._v(" Troubleshooting")]),e._v(" "),t("h3",{attrs:{id:"error-on-checkout-there-was-an-error-processing-the-payment-on-btcpay-server-please-try-again-and-contact-us-if-the-problem-persists-"}},[t("a",{staticClass:"header-anchor",attrs:{href:"#error-on-checkout-there-was-an-error-processing-the-payment-on-btcpay-server-please-try-again-and-contact-us-if-the-problem-persists-"}},[e._v("#")]),e._v(' Error on checkout "There was an error processing the payment on BTCPay Server. Please try again and contact us if the problem persists."')]),e._v(" "),t("p",[e._v("This means something went wrong with creating the invoice on BTCPay Server. It could be either wrong api key, store id or another communication error. You can find the error logs of the plugin in the following directory: "),t("code",[e._v("administrator/logs")]),e._v(" there you will have one or more files called "),t("code",[e._v("btcpayvm.X.log.php")]),e._v(" where "),t("code",[e._v("X")]),e._v(" is a number e.g. "),t("code",[e._v("btcpayvm.0.log.php")]),e._v(" you will find timestamped errors there that should give you a hint what the problem is.")]),e._v(" "),t("p",[t("strong",[e._v("Example")]),e._v(":")]),e._v(" "),t("blockquote",[t("p",[e._v('2022-05-24 21:10:50 ERROR Error during POST to https://btcpay.example.com/api/v1/stores/4kD5bvAF5j8DokHqAzxb6MFDV4ikabcdefghijklm/invoices. Got response (401): {"code":"unauthenticated","message":"Authentication is required for accessing this endpoint"}')])]),e._v(" "),t("ul",[t("li",[t("p",[e._v("This means there is some authentication error. Likely your api key does not have permission create invoices for that store. Make sure you gave the api key the right permissions and you give it to the right store and also entered that in VirtueMart payment configuration form.")])]),e._v(" "),t("li",[t("p",[e._v('Another reason could be that you use a legacy api key. The legacy api keys are located in store settings -> Access Tokens. But you need to create an account api key which is located in Account -> Manage Account -> tab "API Keys". See section '),t("a",{attrs:{href:"#22-create-an-api-key-and-configure-permissions"}},[e._v("2.2 Create an API key and configure permissions")]),e._v(".")])])]),e._v(" "),t("h2",{attrs:{id:"the-order-states-do-not-update-although-the-invoice-has-been-paid"}},[t("a",{staticClass:"header-anchor",attrs:{href:"#the-order-states-do-not-update-although-the-invoice-has-been-paid"}},[e._v("#")]),e._v(" The order states do not update although the invoice has been paid")]),e._v(" "),t("p",[e._v('Please check the details of your invoice if there were any errors on sending the webhook request. Some hosting providers, firewall setups or Joomla security plugins may block POST requests to your site which lead to a http status of "403 forbidden".')]),e._v(" "),t("p",[e._v("You can check and verify yourself if there is something blocking requests to your site in one of these two ways:")]),e._v(" "),t("p",[t("strong",[e._v("1. Copy webhook callback URL")]),e._v("\ngo to your "),t("em",[e._v("VirtueMart BTCPay Payment Method Settings")]),e._v(' and copy the "Webhook callback URL". e.g. '),t("code",[e._v("https://EXAMPLE.COM/index.php?option=com_virtuemart&view=pluginresponse&task=pluginnotification&pm=2")])]),e._v(" "),t("figure",[t("img",{attrs:{src:a(611),alt:"BTCPay Joomla VirtueMart: Webhook payload URL",title:"BTCPay Joomla VirtueMart: Webhook payload URL"}})]),e._v(" "),t("p",[t("strong",[e._v("2.1 Check using a command line (Linux or MacOS):")])]),e._v(" "),t("div",{staticClass:"language- extra-class"},[t("pre",{pre:!0,attrs:{class:"language-text"}},[t("code",[e._v('curl -vX POST -H "Content-Type: application/json" \\\n -d \'{"data": "test"}\' WEBHOOK_CALLBACK_URL\n')])])]),t("p",[e._v("(replace "),t("code",[e._v("WEBHOOK_CALLBACK_URL")]),e._v(" with the one copied above)")]),e._v(" "),t("p",[e._v("Result:")]),e._v(" "),t("div",{staticClass:"language- extra-class"},[t("pre",{pre:!0,attrs:{class:"language-text"}},[t("code",[e._v(".... snip ....\n* upload completely sent off: 16 out of 16 bytes\n< HTTP/1.1 403 Forbidden\n< access-control-allow-origin: *\n< Content-Type: application/json; charset=UTF-8\n< X-Cloud-Trace-Context: 4f07d5b2e5c2f05949d04421a8e2dd6a\n< Date: Thu, 17 Feb 2022 10:06:50 GMT\n< Server: Google Frontend\n< Content-Length: 26\n")])])]),t("p",[e._v('If you see that line "HTTP/1.1 403 Forbidden" or "HTTP/2 403" then something is blocking data sent to your VirtueMart site. You should ask your hosting provider or make sure no firewall or plugin is blocking the requests.')]),e._v(" "),t("p",[t("strong",[e._v("2.2 Check using an online service (if you do not have a command line available:")])]),e._v(" "),t("ul",[t("li",[e._v("Go to "),t("a",{attrs:{href:"https://reqbin.com/post-online",target:"_blank",rel:"noopener noreferrer"}},[e._v("https://reqbin.com/post-online"),t("OutboundLink")],1)]),e._v(" "),t("li",[t("ol",[t("li",[e._v("Enter your callback url (copied from step 1 above): "),t("code",[e._v("https://EXAMPLE.COM/index.php?option=com_virtuemart&view=pluginresponse&task=pluginnotification&pm=2")]),e._v("\n(replace this URL with the webhook callback url from step 1)")])])]),e._v(" "),t("li",[e._v('Make sure "POST" is selected')]),e._v(" "),t("li",[t("ol",{attrs:{start:"2"}},[t("li",[e._v("Click [Send]")])])])]),e._v(" "),t("figure",[t("img",{attrs:{src:a(294),alt:"BTCPay Joomla VirtueMart: Webhook payload URL forbidden",title:"BTCPay Joomla VirtueMart: Webhook payload URL forbidden"}})]),e._v(" "),t("p",[e._v('If you see "'),t("strong",[e._v("Status 403 (Forbidden)")]),e._v('" then POST requests to your site are blocked for some reason. You should ask your hosting provider or make sure no firewall or plugin is blocking the requests. If you see any other status code (200, 500, ...) a firewall problem seems to not apply, you probably need to further investigate.')]),e._v(" "),t("h2",{attrs:{id:"i-have-troubles-with-using-the-plugin-or-some-other-related-questions"}},[t("a",{staticClass:"header-anchor",attrs:{href:"#i-have-troubles-with-using-the-plugin-or-some-other-related-questions"}},[e._v("#")]),e._v(" I have troubles with using the plugin or some other related questions")]),e._v(" "),t("p",[e._v("Feel free to join our support channel over at "),t("a",{attrs:{href:"https://chat.btcpayserver.org/",target:"_blank",rel:"noopener noreferrer"}},[e._v("https://chat.btcpayserver.org/"),t("OutboundLink")],1),e._v(" if you need help or have any further questions.")])])}),[],!1,null,null,null);t.default=r.exports}}]); \ No newline at end of file +(window.webpackJsonp=window.webpackJsonp||[]).push([[14],{294:function(e,t,a){e.exports=a.p+"assets/img/btcpay-vm--19-troubleshoot-403-callback.51193927.png"},601:function(e,t,a){e.exports=a.p+"assets/img/btcpay-vm--01-install-web.4d28e0bd.png"},602:function(e,t,a){e.exports=a.p+"assets/img/btcpay-vm--02-install-upload.8972740d.png"},603:function(e,t,a){e.exports=a.p+"assets/img/btcpay-vm--03-enable-plugin.1b4a6c9f.png"},604:function(e,t,a){e.exports=a.p+"assets/img/btcpay-vm--04-add-new-payment-method.e5a94ee3.png"},605:function(e,t,a){e.exports=a.p+"assets/img/btcpay-vm--05-payment-method-details.adf89c97.png"},606:function(e,t,a){e.exports=a.p+"assets/img/btcpay-vm--06-payment-method-configuration-tab.45617db0.png"},607:function(e,t,a){e.exports=a.p+"assets/img/btcpay-vm--07-account-manage.d477b8b4.png"},608:function(e,t,a){e.exports=a.p+"assets/img/btcpay-vm--08-add-api-key.a58b2941.png"},609:function(e,t,a){e.exports=a.p+"assets/img/btcpay-vm--09-permissions-and-select-store.9ccef388.png"},610:function(e,t,a){e.exports=a.p+"assets/img/btcpay-vm--10-permissions-set.74d76936.png"},611:function(e,t,a){e.exports=a.p+"assets/img/btcpay-vm--11-copy-api-key.94be9878.png"},612:function(e,t,a){e.exports=a.p+"assets/img/btcpay-vm--12-copy-store-id.84c19f9f.png"},613:function(e,t,a){e.exports=a.p+"assets/img/btcpay-vm--13-save-vm-payment-method-form.0a3e52bd.png"},614:function(e,t,a){e.exports=a.p+"assets/img/btcpay-vm--14-create-webhook.1b6e4881.png"},615:function(e,t,a){e.exports=a.p+"assets/img/btcpay-vm--15-webhook-payload-url.37a4f55f.png"},616:function(e,t,a){e.exports=a.p+"assets/img/btcpay-vm--16-webhook-copy-secret.71b0dd07.png"},617:function(e,t,a){e.exports=a.p+"assets/img/btcpay-vm--16-virtuemart-configuration-save.ee549862.png"},618:function(e,t,a){e.exports=a.p+"assets/img/btcpay-vm--17-webhook-save.dfd4fca5.png"},619:function(e,t,a){e.exports=a.p+"assets/img/btcpay-vm--18-troubleshoot-copy-callback-url.70d08e31.png"},854:function(e,t,a){"use strict";a.r(t);var o=a(10),r=Object(o.a)({},(function(){var e=this,t=e._self._c;return t("ContentSlotsDistributor",{attrs:{"slot-key":e.$parent.slotKey}},[t("h1",{attrs:{id:"joomla-virtuemart-integration"}},[t("a",{staticClass:"header-anchor",attrs:{href:"#joomla-virtuemart-integration"}},[e._v("#")]),e._v(" Joomla VirtueMart integration")]),e._v(" "),t("p",[e._v("This document explains how to "),t("strong",[e._v("integrate BTCPay Server into your Joomla VirtueMart store")]),e._v(".\nWatch the video below to go along the document |")]),e._v(" "),t("a",{staticClass:"ytEmbed",staticStyle:{"background-image":"url(https://img.youtube.com/vi/k7XfybLAky0/hqdefault.jpg)"},attrs:{href:"https://youtu.be/k7XfybLAky0",title:"BTCPay Server - Joomla VirtueMart","data-id":"k7XfybLAky0"}},[t("iframe",{attrs:{title:"BTCPay Server - Joomla VirtueMart","data-src":"https://www.youtube-nocookie.com/embed/k7XfybLAky0?&autoplay=1&autohide=1&modestbranding=1&color=white&rel=0",frameborder:"0",allow:"autoplay;encrypted-media;picture-in-picture",allowfullscreen:""}})]),e._v(" "),t("h2",{attrs:{id:"requirements"}},[t("a",{staticClass:"header-anchor",attrs:{href:"#requirements"}},[e._v("#")]),e._v(" Requirements")]),e._v(" "),t("p",[e._v("Please ensure that you meet the following requirements before installing this plugin.")]),e._v(" "),t("ul",[t("li",[e._v("PHP version 7.4 or newer")]),e._v(" "),t("li",[e._v("The curl, gd, intl, json, and mbstring PHP extensions are available")]),e._v(" "),t("li",[e._v("A VirtueMart 3 / 4 store ("),t("a",{attrs:{href:"https://www.virtuemart.net/downloads",target:"_blank",rel:"noopener noreferrer"}},[e._v("Download and installation instructions"),t("OutboundLink")],1),e._v(")")]),e._v(" "),t("li",[e._v("You have a BTCPay Server version 1.3.0 or later, either "),t("RouterLink",{attrs:{to:"/Deployment/"}},[e._v("self-hosted")]),e._v(" or "),t("RouterLink",{attrs:{to:"/Deployment/ThirdPartyHosting/"}},[e._v("hosted by a third-party")])],1),e._v(" "),t("li",[t("RouterLink",{attrs:{to:"/RegisterAccount/"}},[e._v("You've a registered account on the instance")])],1),e._v(" "),t("li",[t("RouterLink",{attrs:{to:"/CreateStore/"}},[e._v("You've a BTCPay store on the instance")])],1),e._v(" "),t("li",[t("RouterLink",{attrs:{to:"/WalletSetup/"}},[e._v("You've a wallet connected to your store")])],1)]),e._v(" "),t("h2",{attrs:{id:"1-install-btcpay-plugin"}},[t("a",{staticClass:"header-anchor",attrs:{href:"#1-install-btcpay-plugin"}},[e._v("#")]),e._v(" 1. Install BTCPay Plugin")]),e._v(" "),t("p",[e._v("There are three ways to "),t("strong",[e._v("download BTCPay for VirtueMart plugin")]),e._v(":")]),e._v(" "),t("ul",[t("li",[e._v("Via the Admin Dashboard (recommended, see below)")]),e._v(" "),t("li",[t("a",{attrs:{href:"https://extensions.joomla.org/extension/vm-payment-btcpay-for-virtuemart/",target:"_blank",rel:"noopener noreferrer"}},[e._v("Joomla Extension Directory (JED)"),t("OutboundLink")],1)]),e._v(" "),t("li",[t("a",{attrs:{href:"https://github.com/btcpayserver/joomla-virtuemart/releases",target:"_blank",rel:"noopener noreferrer"}},[e._v("GitHub Repository"),t("OutboundLink")],1)])]),e._v(" "),t("h3",{attrs:{id:"11-install-plugin-from-joomla-admin-dashboard-recommended"}},[t("a",{staticClass:"header-anchor",attrs:{href:"#11-install-plugin-from-joomla-admin-dashboard-recommended"}},[e._v("#")]),e._v(" 1.1 Install plugin from Joomla Admin Dashboard (recommended)")]),e._v(" "),t("ol",[t("li",[e._v("Menu: Extensions > Manage > Install")]),e._v(" "),t("li",[e._v('On "Install from Web" tab search for "btcpay"')]),e._v(" "),t("li",[e._v("Click on BTCPay for VirtueMart and [Install] button")]),e._v(" "),t("li",[e._v("Continue with step 1.3")])]),e._v(" "),t("figure",[t("img",{attrs:{src:a(601),alt:"BTCPay Virtuemart: Plugin installation web",title:"BTCPay Virtuemart: Plugin installation web"}})]),e._v(" "),t("h3",{attrs:{id:"12-download-and-install-plugin-from-jed-or-github"}},[t("a",{staticClass:"header-anchor",attrs:{href:"#12-download-and-install-plugin-from-jed-or-github"}},[e._v("#")]),e._v(" 1.2 Download and install plugin from JED or GitHub")]),e._v(" "),t("ol",[t("li",[e._v("Download the latest BTCPay plugin from "),t("a",{attrs:{href:"https://github.com/btcpayserver/joomla-virtuemart/releases",target:"_blank",rel:"noopener noreferrer"}},[e._v("Github"),t("OutboundLink")],1),e._v(" or "),t("a",{attrs:{href:"https://extensions.joomla.org/extension/vm-payment-btcpay-for-virtuemart/",target:"_blank",rel:"noopener noreferrer"}},[e._v("JED"),t("OutboundLink")],1)]),e._v(" "),t("li",[e._v("Menu: Extensions -> Manage -> Install")]),e._v(" "),t("li",[e._v('On tab "Upload Package File" upload the '),t("code",[e._v("btcpayvm.zip")])])]),e._v(" "),t("figure",[t("img",{attrs:{src:a(602),alt:"BTCPay Virtuemart: Plugin installation upload",title:"BTCPay Virtuemart: Plugin installation upload"}})]),e._v(" "),t("h3",{attrs:{id:"13-enable-the-plugin"}},[t("a",{staticClass:"header-anchor",attrs:{href:"#13-enable-the-plugin"}},[e._v("#")]),e._v(" 1.3 Enable the plugin")]),e._v(" "),t("ol",[t("li",[e._v("Menu: Extensions -> Plugins")]),e._v(" "),t("li",[e._v('Search for "btcpay"')]),e._v(" "),t("li",[e._v('On "Status" column click the red circle to enable the plugin')])]),e._v(" "),t("figure",[t("img",{attrs:{src:a(603),alt:"BTCPay Virtuemart: Enable plugin",title:"BTCPay Virtuemart: Enable plugin"}})]),e._v(" "),t("h2",{attrs:{id:"2-connecting-virtuemart-and-btcpay-server"}},[t("a",{staticClass:"header-anchor",attrs:{href:"#2-connecting-virtuemart-and-btcpay-server"}},[e._v("#")]),e._v(" 2. Connecting VirtueMart and BTCPay Server")]),e._v(" "),t("p",[e._v("BTCPay for Virtuemart plugin is a "),t("strong",[e._v("bridge between your BTCPay Server (payment processor) and your e-commerce store")]),e._v(".\nNo matter if you're using a self-hosted or third-party solution, the connection process is identical.")]),e._v(" "),t("h3",{attrs:{id:"21-add-btcpay-payment-gateway-in-virtuemart"}},[t("a",{staticClass:"header-anchor",attrs:{href:"#21-add-btcpay-payment-gateway-in-virtuemart"}},[e._v("#")]),e._v(" 2.1 Add BTCPay payment gateway in VirtueMart")]),e._v(" "),t("ol",[t("li",[e._v("Menu: VirtueMart -> Payment Methods")]),e._v(" "),t("li",[e._v("Click button "),t("strong",[e._v("[New]")]),e._v(" "),t("img",{attrs:{src:a(604),alt:"BTCPay Virtuemart: Add new payment method",title:"BTCPay Virtuemart: Add new payment method"}})]),e._v(" "),t("li",[e._v('Configure the payment method according to your needs. Make sure on "Payment Method" dropdown you have "BTCPay for VirtueMart" selected and the payment method is published '),t("img",{attrs:{src:a(605),alt:"BTCPay Virtuemart: Payment method details",title:"BTCPay Virtuemart: Payment method details"}})]),e._v(" "),t("li",[e._v("Hit the "),t("strong",[e._v("[Save]")]),e._v(" button (the plugin table will get created)")])]),e._v(" "),t("p",[e._v('Now you can switch to the "Configuration" tab where we can connect to our BTCPay Server instance. First we need to create an API key.')]),e._v(" "),t("figure",[t("img",{attrs:{src:a(606),alt:"BTCPay Virtuemart: Payment method configuration tab",title:"BTCPay Virtuemart: Payment method configuration tab"}})]),e._v(" "),t("h3",{attrs:{id:"22-create-an-api-key-and-configure-permissions"}},[t("a",{staticClass:"header-anchor",attrs:{href:"#22-create-an-api-key-and-configure-permissions"}},[e._v("#")]),e._v(" 2.2 Create an API key and configure permissions")]),e._v(" "),t("p",[e._v("On BTCPay Server instance:")]),e._v(" "),t("ol",[t("li",[e._v("Click on "),t("em",[e._v("[Account]")])]),e._v(" "),t("li",[e._v("Click on "),t("em",[e._v("[Manage Account]")]),e._v(" "),t("img",{attrs:{src:a(607),alt:"BTCPay Joomla VirtueMart: Manage Account",title:"BTCPay Joomla VirtueMart: Manage Account"}})]),e._v(" "),t("li",[e._v("Go to the tab "),t("em",[e._v('"API Keys"')])]),e._v(" "),t("li",[e._v("Click "),t("em",[e._v("[Generate Key]")]),e._v(" to select permissions.\n"),t("img",{attrs:{src:a(608),alt:"BTCPay Joomla VirtueMart: API Keys overview",title:"BTCPay Joomla VirtueMart: API Keys overview"}})]),e._v(" "),t("li",[e._v("Add a label. "),t("strong",[e._v("Important:")]),e._v(" click on the "),t("em",[e._v('"Select specific stores"')]),e._v(" link for the following permissions: "),t("code",[e._v("View invoices")]),e._v(", "),t("code",[e._v("Create invoice")]),e._v(", "),t("code",[e._v("Modify invoices")]),e._v(", "),t("code",[e._v("Modify stores webhooks")]),e._v(", "),t("code",[e._v("View your stores")]),e._v(" and select the specific store you created for your VirtueMart site. It should look like when everything is set:\n"),t("img",{attrs:{src:a(609),alt:"BTCPay Joomla VirtueMart: API Keys Permissions",title:"BTCPay Joomla VirtueMart: API Keys Permissions"}})]),e._v(" "),t("li",[e._v("Click on "),t("em",[e._v("[Generate API Key]")]),e._v(" "),t("img",{attrs:{src:a(610),alt:"BTCPay Joomla VirtueMart: API Keys Save",title:"BTCPay Joomla VirtueMart: API Keys Save"}})]),e._v(" "),t("li",[e._v("Copy the generated API Key to your "),t("em",[e._v("VirtueMart BTCPay Payment Method Settings")]),e._v(" form\n"),t("img",{attrs:{src:a(611),alt:"BTCPay Joomla VirtueMart: Copy API Key",title:"BTCPay Joomla VirtueMart: Copy API Key"}})]),e._v(" "),t("li",[e._v("Go to Settings and copy the store ID to your "),t("em",[e._v("VirtueMart BTCPay Payment Method Settings")]),e._v(" form\n"),t("img",{attrs:{src:a(612),alt:"BTCPay Joomla VirtueMart: Copy Store ID",title:"BTCPay Joomla VirtueMart: Copy Store ID"}})]),e._v(" "),t("li",[e._v("On the "),t("em",[e._v("VirtueMart BTCPay Payment Method Settings")]),e._v(" form make sure "),t("strong",[e._v("BTPCay Server URL")]),e._v(", "),t("strong",[e._v("API Key")]),e._v(" and "),t("strong",[e._v("Store ID")]),e._v(" are set and click "),t("strong",[e._v("[Save]")]),e._v(" "),t("img",{attrs:{src:a(613),alt:"BTCPay Joomla VirtueMart: Save VirtueMart Settings form",title:"BTCPay Joomla VirtueMart: Save VirtueMart Settings form"}})])]),e._v(" "),t("h3",{attrs:{id:"23-create-a-webhook-on-btcpay-server"}},[t("a",{staticClass:"header-anchor",attrs:{href:"#23-create-a-webhook-on-btcpay-server"}},[e._v("#")]),e._v(" 2.3 Create a webhook on BTCPay Server")]),e._v(" "),t("p",[e._v("Setting up a webhook is important that your gets updates on invoice status changes from BTCPay Server.")]),e._v(" "),t("ol",[t("li",[t("p",[e._v("On BTCPay Server instance go to your store settings, tab "),t("strong",[e._v("[Webhooks]")]),e._v(", click "),t("strong",[e._v("[Create Webhook]")]),e._v(" "),t("img",{attrs:{src:a(614),alt:"BTCPay Joomla VirtueMart: Create webhook",title:"BTCPay Joomla VirtueMart: Create webhook"}})])]),e._v(" "),t("li",[t("p",[e._v("From "),t("em",[e._v("VirtueMart BTCPay Payment Method Settings")]),e._v(" copy the "),t("strong",[e._v("Webhook callback URL")]),e._v(" to webhook settings "),t("strong",[e._v("Payload URL")]),e._v(".\n"),t("img",{attrs:{src:a(615),alt:"BTCPay Joomla VirtueMart: Webhook payload URL",title:"BTCPay Joomla VirtueMart: Webhook payload URL"}})])]),e._v(" "),t("li",[t("p",[e._v("On webhook settings click on the eye to reveal webhook secret. Copy that secret to your "),t("em",[e._v("VirtueMart BTCPay Payment Method Settings")]),e._v(" form "),t("strong",[e._v("Webhook Secret")]),e._v(" input and "),t("strong",[e._v("[Save]")]),e._v(" the VirtueMart configuration again.\n"),t("img",{attrs:{src:a(616),alt:"BTCPay Joomla VirtueMart: Webhook payload URL",title:"BTCPay Joomla VirtueMart: Webhook payload URL"}}),e._v(" "),t("img",{attrs:{src:a(617),alt:"BTCPay Joomla VirtueMart: Webhook VM save configuration",title:"BTCPay Joomla VirtueMart: Webhook VM save configuration"}})])]),e._v(" "),t("li",[t("p",[e._v("Back on webhook settings, enable "),t("strong",[e._v("Automatic redelivery")]),e._v(" and click "),t("strong",[e._v("[Add webhook]")]),e._v(" to save the webhook.\n"),t("img",{attrs:{src:a(618),alt:"BTCPay Joomla VirtueMart: Webhook payload URL",title:"BTCPay Joomla VirtueMart: Webhook payload URL"}})])])]),e._v(" "),t("h2",{attrs:{id:"3-test-the-checkout"}},[t("a",{staticClass:"header-anchor",attrs:{href:"#3-test-the-checkout"}},[e._v("#")]),e._v(" 3. Test the checkout")]),e._v(" "),t("p",[e._v("Everything is ready to go now. Do a small test purchase and make sure the order status gets updated according to the BTCPay invoice status. On BTCPay Server invoice details you can see if the webhook events were fired successfully.")]),e._v(" "),t("h2",{attrs:{id:"customizing-virtuemart-btcpay-payment-method-settings"}},[t("a",{staticClass:"header-anchor",attrs:{href:"#customizing-virtuemart-btcpay-payment-method-settings"}},[e._v("#")]),e._v(" Customizing VirtueMart BTCPay payment method settings")]),e._v(" "),t("p",[e._v('Your VirtueMart BTCPay payment method settings can be found in menu: VirtueMart -> Payment Methods. Click on the payment method of type "btcpayvm" you created.')]),e._v(" "),t("h3",{attrs:{id:"section-btcpay-server-connection-settings"}},[t("a",{staticClass:"header-anchor",attrs:{href:"#section-btcpay-server-connection-settings"}},[e._v("#")]),e._v(" Section: BTCPay Server connection settings")]),e._v(" "),t("p",[e._v("This is the most important part of the configuration. The data entered here will connect your VirtueMart shop with your counterparty store configured on BTCPay Server.")]),e._v(" "),t("p",[t("strong",[e._v("BTCPay Server URL")])]),e._v(" "),t("p",[e._v("URL to your BTCPay Server instance, including protocol e.g. "),t("code",[e._v("https://btcpay.yourdomain.com")]),e._v(".")]),e._v(" "),t("p",[t("strong",[e._v("API Key")])]),e._v(" "),t("p",[e._v("Your BTCPay API Key as mentioned "),t("a",{attrs:{href:"#22-create-an-api-key-and-configure-permissions"}},[e._v("here")]),e._v(".")]),e._v(" "),t("p",[t("strong",[e._v("Store ID")])]),e._v(" "),t("p",[e._v("The store ID of your BTCPay Server store. Can be found on the store settings page. See 8. "),t("a",{attrs:{href:"#22-create-an-api-key-and-configure-permissions"}},[e._v("here")])]),e._v(" "),t("p",[t("strong",[e._v("Webhook Secret")])]),e._v(" "),t("p",[e._v("The wehbook secret which was generated on webhook createion, see "),t("a",{attrs:{href:"#23-create-a-webhook-on-btcpay-server"}},[e._v("here")])]),e._v(" "),t("p",[t("strong",[e._v("Webhook callback URL")])]),e._v(" "),t("p",[e._v("This field is auto-generated by the plugin and helps you when creating the webhook on BTCPay Server. It contains the needed payment method id and parameters to allow processing of callbacks.")]),e._v(" "),t("h3",{attrs:{id:"section-order-states-mapping"}},[t("a",{staticClass:"header-anchor",attrs:{href:"#section-order-states-mapping"}},[e._v("#")]),e._v(" Section: Order states mapping")]),e._v(" "),t("p",[e._v("You can adjust the mapping of BTCPay Server invoice status to VirtueMart order states. On the left are the invoice states and on the right the order states. The defaults here should be good to go - but if you need, you can overwrite them.")]),e._v(" "),t("p",[e._v("VirtueMart order statuses are explained "),t("a",{attrs:{href:"https://docs.virtuemart.net/manual/configuration-menu/order-statuses.html",target:"_blank",rel:"noopener noreferrer"}},[e._v("here"),t("OutboundLink")],1)]),e._v(" "),t("p",[e._v("BTCPay server invoice statuses are explained "),t("RouterLink",{attrs:{to:"/Invoices/#invoice-statuses"}},[e._v("here")])],1),e._v(" "),t("h3",{attrs:{id:"section-restrictions"}},[t("a",{staticClass:"header-anchor",attrs:{href:"#section-restrictions"}},[e._v("#")]),e._v(" Section: Restrictions")]),e._v(" "),t("p",[e._v("These are VirtueMart provided restrictions you know from other payment plugins. You can restrict the amount or countries when the payment method will be available.")]),e._v(" "),t("h3",{attrs:{id:"section-discounts-and-fees"}},[t("a",{staticClass:"header-anchor",attrs:{href:"#section-discounts-and-fees"}},[e._v("#")]),e._v(" Section Discounts and fees")]),e._v(" "),t("p",[e._v("These are VirtueMart provided settings. You can set a fee, cashback and apply tax rules or set a custom logo for the payment method.")]),e._v(" "),t("h2",{attrs:{id:"troubleshooting"}},[t("a",{staticClass:"header-anchor",attrs:{href:"#troubleshooting"}},[e._v("#")]),e._v(" Troubleshooting")]),e._v(" "),t("h3",{attrs:{id:"error-on-checkout-there-was-an-error-processing-the-payment-on-btcpay-server-please-try-again-and-contact-us-if-the-problem-persists-"}},[t("a",{staticClass:"header-anchor",attrs:{href:"#error-on-checkout-there-was-an-error-processing-the-payment-on-btcpay-server-please-try-again-and-contact-us-if-the-problem-persists-"}},[e._v("#")]),e._v(' Error on checkout "There was an error processing the payment on BTCPay Server. Please try again and contact us if the problem persists."')]),e._v(" "),t("p",[e._v("This means something went wrong with creating the invoice on BTCPay Server. It could be either wrong api key, store id or another communication error. You can find the error logs of the plugin in the following directory: "),t("code",[e._v("administrator/logs")]),e._v(" there you will have one or more files called "),t("code",[e._v("btcpayvm.X.log.php")]),e._v(" where "),t("code",[e._v("X")]),e._v(" is a number e.g. "),t("code",[e._v("btcpayvm.0.log.php")]),e._v(" you will find timestamped errors there that should give you a hint what the problem is.")]),e._v(" "),t("p",[t("strong",[e._v("Example")]),e._v(":")]),e._v(" "),t("blockquote",[t("p",[e._v('2022-05-24 21:10:50 ERROR Error during POST to https://btcpay.example.com/api/v1/stores/4kD5bvAF5j8DokHqAzxb6MFDV4ikabcdefghijklm/invoices. Got response (401): {"code":"unauthenticated","message":"Authentication is required for accessing this endpoint"}')])]),e._v(" "),t("ul",[t("li",[t("p",[e._v("This means there is some authentication error. Likely your api key does not have permission create invoices for that store. Make sure you gave the api key the right permissions and you give it to the right store and also entered that in VirtueMart payment configuration form.")])]),e._v(" "),t("li",[t("p",[e._v('Another reason could be that you use a legacy api key. The legacy api keys are located in store settings -> Access Tokens. But you need to create an account api key which is located in Account -> Manage Account -> tab "API Keys". See section '),t("a",{attrs:{href:"#22-create-an-api-key-and-configure-permissions"}},[e._v("2.2 Create an API key and configure permissions")]),e._v(".")])])]),e._v(" "),t("h2",{attrs:{id:"the-order-states-do-not-update-although-the-invoice-has-been-paid"}},[t("a",{staticClass:"header-anchor",attrs:{href:"#the-order-states-do-not-update-although-the-invoice-has-been-paid"}},[e._v("#")]),e._v(" The order states do not update although the invoice has been paid")]),e._v(" "),t("p",[e._v('Please check the details of your invoice if there were any errors on sending the webhook request. Some hosting providers, firewall setups or Joomla security plugins may block POST requests to your site which lead to a http status of "403 forbidden".')]),e._v(" "),t("p",[e._v("You can check and verify yourself if there is something blocking requests to your site in one of these two ways:")]),e._v(" "),t("p",[t("strong",[e._v("1. Copy webhook callback URL")]),e._v("\ngo to your "),t("em",[e._v("VirtueMart BTCPay Payment Method Settings")]),e._v(' and copy the "Webhook callback URL". e.g. '),t("code",[e._v("https://EXAMPLE.COM/index.php?option=com_virtuemart&view=pluginresponse&task=pluginnotification&pm=2")])]),e._v(" "),t("figure",[t("img",{attrs:{src:a(619),alt:"BTCPay Joomla VirtueMart: Webhook payload URL",title:"BTCPay Joomla VirtueMart: Webhook payload URL"}})]),e._v(" "),t("p",[t("strong",[e._v("2.1 Check using a command line (Linux or MacOS):")])]),e._v(" "),t("div",{staticClass:"language- extra-class"},[t("pre",{pre:!0,attrs:{class:"language-text"}},[t("code",[e._v('curl -vX POST -H "Content-Type: application/json" \\\n -d \'{"data": "test"}\' WEBHOOK_CALLBACK_URL\n')])])]),t("p",[e._v("(replace "),t("code",[e._v("WEBHOOK_CALLBACK_URL")]),e._v(" with the one copied above)")]),e._v(" "),t("p",[e._v("Result:")]),e._v(" "),t("div",{staticClass:"language- extra-class"},[t("pre",{pre:!0,attrs:{class:"language-text"}},[t("code",[e._v(".... snip ....\n* upload completely sent off: 16 out of 16 bytes\n< HTTP/1.1 403 Forbidden\n< access-control-allow-origin: *\n< Content-Type: application/json; charset=UTF-8\n< X-Cloud-Trace-Context: 4f07d5b2e5c2f05949d04421a8e2dd6a\n< Date: Thu, 17 Feb 2022 10:06:50 GMT\n< Server: Google Frontend\n< Content-Length: 26\n")])])]),t("p",[e._v('If you see that line "HTTP/1.1 403 Forbidden" or "HTTP/2 403" then something is blocking data sent to your VirtueMart site. You should ask your hosting provider or make sure no firewall or plugin is blocking the requests.')]),e._v(" "),t("p",[t("strong",[e._v("2.2 Check using an online service (if you do not have a command line available:")])]),e._v(" "),t("ul",[t("li",[e._v("Go to "),t("a",{attrs:{href:"https://reqbin.com/post-online",target:"_blank",rel:"noopener noreferrer"}},[e._v("https://reqbin.com/post-online"),t("OutboundLink")],1)]),e._v(" "),t("li",[t("ol",[t("li",[e._v("Enter your callback url (copied from step 1 above): "),t("code",[e._v("https://EXAMPLE.COM/index.php?option=com_virtuemart&view=pluginresponse&task=pluginnotification&pm=2")]),e._v("\n(replace this URL with the webhook callback url from step 1)")])])]),e._v(" "),t("li",[e._v('Make sure "POST" is selected')]),e._v(" "),t("li",[t("ol",{attrs:{start:"2"}},[t("li",[e._v("Click [Send]")])])])]),e._v(" "),t("figure",[t("img",{attrs:{src:a(294),alt:"BTCPay Joomla VirtueMart: Webhook payload URL forbidden",title:"BTCPay Joomla VirtueMart: Webhook payload URL forbidden"}})]),e._v(" "),t("p",[e._v('If you see "'),t("strong",[e._v("Status 403 (Forbidden)")]),e._v('" then POST requests to your site are blocked for some reason. You should ask your hosting provider or make sure no firewall or plugin is blocking the requests. If you see any other status code (200, 500, ...) a firewall problem seems to not apply, you probably need to further investigate.')]),e._v(" "),t("h2",{attrs:{id:"i-have-troubles-with-using-the-plugin-or-some-other-related-questions"}},[t("a",{staticClass:"header-anchor",attrs:{href:"#i-have-troubles-with-using-the-plugin-or-some-other-related-questions"}},[e._v("#")]),e._v(" I have troubles with using the plugin or some other related questions")]),e._v(" "),t("p",[e._v("Feel free to join our support channel over at "),t("a",{attrs:{href:"https://chat.btcpayserver.org/",target:"_blank",rel:"noopener noreferrer"}},[e._v("https://chat.btcpayserver.org/"),t("OutboundLink")],1),e._v(" if you need help or have any further questions.")])])}),[],!1,null,null,null);t.default=r.exports}}]); \ No newline at end of file diff --git a/assets/js/141.44364e5b.js b/assets/js/141.5a80cca8.js similarity index 99% rename from assets/js/141.44364e5b.js rename to assets/js/141.5a80cca8.js index ee3810a505..56a86df4d7 100644 --- a/assets/js/141.44364e5b.js +++ b/assets/js/141.5a80cca8.js @@ -1 +1 @@ -(window.webpackJsonp=window.webpackJsonp||[]).push([[141],{795:function(e,t,r){"use strict";r.r(t);var o=r(10),n=Object(o.a)({},(function(){var e=this,t=e._self._c;return t("ContentSlotsDistributor",{attrs:{"slot-key":e.$parent.slotKey}},[t("h1",{attrs:{id:"electrum-personal-server-eps-integration"}},[t("a",{staticClass:"header-anchor",attrs:{href:"#electrum-personal-server-eps-integration"}},[e._v("#")]),e._v(" Electrum Personal Server (EPS) integration")]),e._v(" "),t("p",[t("a",{attrs:{href:"https://github.com/chris-belcher/electrum-personal-server",target:"_blank",rel:"noopener noreferrer"}},[e._v("Electrum Personal Server or EPS"),t("OutboundLink")],1),e._v(" is a personal version of public Electrum servers like "),t("RouterLink",{attrs:{to:"/ElectrumX/"}},[e._v("ElectrumX")]),e._v(".")],1),e._v(" "),t("p",[t("strong",[e._v("EPS can be integrated into BTCPay Server")]),e._v(" using the optional docker fragment "),t("a",{attrs:{href:"https://github.com/btcpayserver/btcpayserver-docker/blob/master/docker-compose-generator/docker-fragments/opt-add-electrum-ps.yml",target:"_blank",rel:"noopener noreferrer"}},[e._v("opt-add-electrum-ps.yml"),t("OutboundLink")],1),e._v(". Use EPS when you want to use your own full node (included in BTCPay Server) to verify your own transactions privately when using Electrum Wallet.")]),e._v(" "),t("p",[e._v("The biggest difference with public Electrum servers (eg. ElectrumX), is that "),t("strong",[e._v("EPS is for monitoring only your own wallet(s)")]),e._v('. The "XPUB" (extended public key) of the wallet you use in Electrum must be shared with EPS in order for it to function all all. Other than this, it functions (from an end user perspective) in the same way as ElectrumX etc. It is '),t("strong",[e._v("easy to integrate into BTCPay")]),e._v(" just follow the instructions below.")]),e._v(" "),t("p",[e._v("EPS does not require "),t("code",[e._v("txindex")]),e._v(" and works on a pruned node.")]),e._v(" "),t("h2",{attrs:{id:"about-tor-support"}},[t("a",{staticClass:"header-anchor",attrs:{href:"#about-tor-support"}},[e._v("#")]),e._v(" About Tor support")]),e._v(" "),t("p",[e._v("By default your EPS is accessible over Tor. You can run the following command line via SSH on your server to get your Tor address:")]),e._v(" "),t("div",{staticClass:"language-bash extra-class"},[t("pre",{pre:!0,attrs:{class:"language-bash"}},[t("code",[t("span",{pre:!0,attrs:{class:"token function"}},[e._v("cat")]),e._v(" /var/lib/docker/volumes/generated_tor_servicesdir/_data/btc-electrum-ps/hostname\n")])])]),t("p",[e._v("You can can also go to your BTCPay Server > Server Settings > Services and find the tor link in "),t("code",[e._v("Other TOR hidden services")]),e._v(".")]),e._v(" "),t("p",[e._v("On the Electrum wallet machine, if you want to connect to your server via Tor, we assume in this tutorial that you run the Tor Browser locally, and thus you will use SOCKS5 port "),t("code",[e._v("9150")]),e._v(". If you run Tor through the command line instead, the local SOCKS5 port is "),t("code",[e._v("9050")]),e._v(".")]),e._v(" "),t("h2",{attrs:{id:"how-to-enable-electrum-personal-server-eps-in-btcpay"}},[t("a",{staticClass:"header-anchor",attrs:{href:"#how-to-enable-electrum-personal-server-eps-in-btcpay"}},[e._v("#")]),e._v(" How to enable Electrum Personal Server (EPS) in BTCPay:")]),e._v(" "),t("ol",[t("li",[t("p",[t("strong",[e._v("If you do not use Tor")]),e._v(", EPS is accessible for Electrum Wallets via TCP port 50002. You need to open this port up fully at least to be available within your own network to any PC or Android device running Electrum Wallet, and turn on port forwarding. If you use Tor, you can skip this step.")])]),e._v(" "),t("li",[t("p",[e._v('As EPS is for a single wallet (single user), you must specify the XPUB/YPUB/ZPUB of your wallet as an environment varable before you enable the EPS docker-fragment. In Electrum Wallet go to the "Wallet" menu then select "Information" to copy and paste yours. Set ENV variable for your wallet XPUB and enable the Docker Additional Fragment on your BTCPay node by running the following steps:')])])]),e._v(" "),t("div",{staticClass:"language-bash extra-class"},[t("pre",{pre:!0,attrs:{class:"language-bash"}},[t("code",[t("span",{pre:!0,attrs:{class:"token builtin class-name"}},[e._v("export")]),e._v(" "),t("span",{pre:!0,attrs:{class:"token assign-left variable"}},[e._v("BTCPAYGEN_ADDITIONAL_FRAGMENTS")]),t("span",{pre:!0,attrs:{class:"token operator"}},[e._v("=")]),t("span",{pre:!0,attrs:{class:"token string"}},[e._v('"'),t("span",{pre:!0,attrs:{class:"token variable"}},[e._v("$BTCPAYGEN_ADDITIONAL_FRAGMENTS")]),e._v(';opt-add-electrum-ps"')]),e._v("\n"),t("span",{pre:!0,attrs:{class:"token builtin class-name"}},[e._v("export")]),e._v(" "),t("span",{pre:!0,attrs:{class:"token assign-left variable"}},[e._v("EPS_XPUB")]),t("span",{pre:!0,attrs:{class:"token operator"}},[e._v("=")]),t("span",{pre:!0,attrs:{class:"token string"}},[e._v('"XPUB_ADD_YOUR_XPUB_YPUB_OR_ZPUB_HERE"')]),e._v("\n"),t("span",{pre:!0,attrs:{class:"token builtin class-name"}},[e._v(".")]),e._v(" btcpay-setup.sh "),t("span",{pre:!0,attrs:{class:"token parameter variable"}},[e._v("-i")]),e._v("\n")])])]),t("ol",{attrs:{start:"3"}},[t("li",[e._v("WAIT for your Bitcoin full node and EPS server to fully sync:\nYou can check the status of bitcoin core sync by going to your domain for BTCPay server, and it will show you on the front page. Or, you can check from the command line as well, using these commands:\n"),t("code",[e._v("docker logs btcpayserver_bitcoind")]),e._v(" - this will show you the bitcoin core blockchain sync status (and ALL other info about your node, including any errors)\n"),t("code",[e._v("docker logs generated_electrum_ps_1")]),e._v(" - this will show you the EPS sync status. Note: EPS will NOT start syncing until bitcoin full node has finished syncing, you will see errors until that is finished and these can be ignored.")])]),e._v(" "),t("p",[e._v("Once all syncing for both bitcoin and EPS have finished synching, you can proceed to the next step. (Note: Electrum wallets will not connect to an EPS server that has not finished synching)")]),e._v(" "),t("h2",{attrs:{id:"how-to-connect-electrum-wallet-to-eps"}},[t("a",{staticClass:"header-anchor",attrs:{href:"#how-to-connect-electrum-wallet-to-eps"}},[e._v("#")]),e._v(" How to connect Electrum Wallet to EPS")]),e._v(" "),t("p",[e._v("There are three ways to use your server from Electrum Wallet:")]),e._v(" "),t("ol",[t("li",[e._v("By editing the configuration file")]),e._v(" "),t("li",[e._v("By running Electrum by the command line")]),e._v(" "),t("li",[e._v("Via the user interface (not recommended, bad privacy)")])]),e._v(" "),t("h4",{attrs:{id:"option-1-connect-to-your-eps-server-by-directly-editing-electrum-wallet-config-file-before-even-opening-the-electrum-wallet-gui-recommended-for-full-privacy"}},[t("a",{staticClass:"header-anchor",attrs:{href:"#option-1-connect-to-your-eps-server-by-directly-editing-electrum-wallet-config-file-before-even-opening-the-electrum-wallet-gui-recommended-for-full-privacy"}},[e._v("#")]),e._v(" Option 1: Connect to your EPS Server by directly editing Electrum Wallet config file (before even opening the Electrum wallet GUI - recommended for full privacy):")]),e._v(" "),t("p",[e._v("You can "),t("strong",[e._v("setup your Electrum server")]),e._v(" by editing the configuration file.")]),e._v(" "),t("p",[e._v("In the "),t("a",{attrs:{href:"https://electrum.readthedocs.io/en/latest/faq.html#where-is-my-wallet-file-located",target:"_blank",rel:"noopener noreferrer"}},[e._v("Electrum Wallet folder"),t("OutboundLink")],1),e._v(", open and edit the "),t("code",[e._v("config")]),e._v(" file like this:")]),e._v(" "),t("ol",[t("li",[t("p",[e._v("Find line: "),t("code",[e._v('"auto_connect": true,')]),e._v(" and switch it to: "),t("code",[e._v('"auto_connect": false,')]),e._v(" - this will prevent your Electrum Wallet from auto-connecting to other 3rd party Electrum Servers at launch time (to obtain block headers and transaction information).")])]),e._v(" "),t("li",[t("p",[e._v("Find line: "),t("code",[e._v('"oneserver": false,')]),e._v(" and switch it to: "),t("code",[e._v('"oneserver": true,')]),e._v(" - ensures that all data is obtained from just one server.")])]),e._v(" "),t("li",[t("p",[e._v("Find or add line: "),t("code",[e._v('"server": "yourserver:50002:s",')]),e._v("and switch it to your own EPS Server's IP address, in the example above this would be: "),t("code",[e._v('"server": "192.168.1.3:50002:s",')]),e._v("- hard code your IP address as the default upon opening the Wallet.")])])]),e._v(" "),t("p",[e._v("These 3 steps strongly recommended for full privacy by locking down Electrum Wallet to one single connection with your private server only ("),t("a",{attrs:{href:"https://github.com/chris-belcher/electrum-personal-server#how-to",target:"_blank",rel:"noopener noreferrer"}},[e._v("Reference"),t("OutboundLink")],1),e._v(").")]),e._v(" "),t("ol",{attrs:{start:"4"}},[t("li",[e._v("("),t("strong",[e._v("If you use Tor")]),e._v(") If you run Tor Browser, you can use it as SOCK5 proxy by adding "),t("code",[e._v('"proxy": "socks5:127.0.0.1:9150::",')]),e._v(" to the configuration file.")])]),e._v(" "),t("h4",{attrs:{id:"option-3-connect-to-your-eps-server-by-command-line"}},[t("a",{staticClass:"header-anchor",attrs:{href:"#option-3-connect-to-your-eps-server-by-command-line"}},[e._v("#")]),e._v(" Option 3: Connect to your EPS Server by command line")]),e._v(" "),t("p",[e._v("You can run electrum via command line "),t("code",[e._v("electrum --oneserver --server yourserver:50002:s")]),e._v(".")]),e._v(" "),t("p",[e._v("If you use Tor, add "),t("code",[e._v("-p socks5:localhost:9150")]),e._v(".")]),e._v(" "),t("h4",{attrs:{id:"option-4-connect-to-your-eps-server-from-electrum-wallet-gui-not-recommended-as-this-will-momentarily-connects-with-other-random-public-electrum-servers-if-you-are-online"}},[t("a",{staticClass:"header-anchor",attrs:{href:"#option-4-connect-to-your-eps-server-from-electrum-wallet-gui-not-recommended-as-this-will-momentarily-connects-with-other-random-public-electrum-servers-if-you-are-online"}},[e._v("#")]),e._v(" Option 4: Connect to your EPS Server from Electrum Wallet GUI (not recommended as this will momentarily connects with other random public Electrum servers if you are online):")]),e._v(" "),t("ol",[t("li",[e._v("Open Electrum Wallet. When you click the traffic light (green or red) at the bottom of your Electrum Wallet, you will see a screen with a list of all the available Electrum servers that your wallet can connect to, normally with the "),t("code",[e._v("Select Server Automatically")]),e._v(" box already checked:")])]),e._v(" "),t("figure",[t("img",{attrs:{src:"https://user-images.githubusercontent.com/1388507/68437521-8a5eb580-01c1-11ea-9ece-0666353a6742.png",alt:"ElectrumWalletServerList",title:"ElectrumWalletServerList"}})]),e._v(" "),t("ol",{attrs:{start:"2"}},[t("li",[e._v("Now is the time to UNCHECK that "),t("code",[e._v("Select Server Automatically")]),e._v(" setting, which will enable you to enter the IP address or domain or hostname of your EPS Server. In the case below, the EPS server is on the local network at "),t("code",[e._v("192.168.1.3")]),e._v(" so we enter that manually (leave port as 50002) and press "),t("code",[e._v("close")]),e._v(".")])]),e._v(" "),t("figure",[t("img",{attrs:{src:"https://user-images.githubusercontent.com/1388507/68496320-4e276580-0252-11ea-8caf-facc8a246d70.png",alt:"EnterElectrumServerIP",title:"EnterElectrumServerIP"}})]),e._v(" "),t("ol",{attrs:{start:"4"}},[t("li",[t("p",[e._v("("),t("strong",[e._v("If you use Tor")]),e._v(") Go to proxy, then click on "),t("code",[e._v("Use Tor Proxy at port 9150")]),e._v(".")])]),e._v(" "),t("li",[t("p",[e._v("If all of the above worked well, and your node is healthy and synched, you will get a green traffic light down the bottom right of the wallet screen - that means success!")])])]),e._v(" "),t("h3",{attrs:{id:"reflection-on-what-has-been-achieved"}},[t("a",{staticClass:"header-anchor",attrs:{href:"#reflection-on-what-has-been-achieved"}},[e._v("#")]),e._v(" Reflection on what has been achieved:")]),e._v(" "),t("p",[e._v("You are now running your very "),t("strong",[e._v("own private EPS Server")]),e._v(". All Electrum Wallet related data transfer happens directly between your EPS Server and the bitcoin blockchain, without going over any other 3rd party servers. You have attained full bitcoin transaction privacy (at least from the perspective of your blockchain queries and transactions, payment/receive addresses etc - nobody except you and the blockchain can see what you are doing).")]),e._v(" "),t("h3",{attrs:{id:"troubleshooting"}},[t("a",{staticClass:"header-anchor",attrs:{href:"#troubleshooting"}},[e._v("#")]),e._v(" Troubleshooting:")]),e._v(" "),t("p",[e._v("So there is one thing you may encounter, where even after you did everything correctly, you still get a red traffic light (which means not connected to any server) in the steps above. Any other troubleshooting tips that people encounter can be added, I would suggest to make a PR to this document directly.")]),e._v(" "),t("ul",[t("li",[e._v("If you get a red traffic light, shutdown Electrum Wallet completely, then go to your Electrum Wallet folder ("),t("a",{attrs:{href:"https://electrum.readthedocs.io/en/latest/faq.html#where-is-my-wallet-file-located",target:"_blank",rel:"noopener noreferrer"}},[e._v("see here"),t("OutboundLink")],1),e._v(" if you don't know where that is).")])]),e._v(" "),t("p",[e._v("Inside the Electrum Wallet folder (in this case below, it is what it looks like on a Mac) locate the "),t("code",[e._v("certs")]),e._v(" directory and delete the certificate for the server you are trying to connect to, in this case "),t("code",[e._v("192.168.1.3")]),e._v(", by dragging it to the Trash.")]),e._v(" "),t("figure",[t("img",{attrs:{src:"https://user-images.githubusercontent.com/1388507/68497330-9a73a500-0254-11ea-9349-71bdb3bd9511.png",alt:"Certs",title:"Certs"}})]),e._v(" "),t("p",[e._v("Start up Electrum Wallet again, and connect to your "),t("strong",[e._v("EPS server")]),e._v(". If it is fully synched, it will now likely show a green traffic light, and you are good to go.")])])}),[],!1,null,null,null);t.default=n.exports}}]); \ No newline at end of file +(window.webpackJsonp=window.webpackJsonp||[]).push([[141],{796:function(e,t,r){"use strict";r.r(t);var o=r(10),n=Object(o.a)({},(function(){var e=this,t=e._self._c;return t("ContentSlotsDistributor",{attrs:{"slot-key":e.$parent.slotKey}},[t("h1",{attrs:{id:"electrum-personal-server-eps-integration"}},[t("a",{staticClass:"header-anchor",attrs:{href:"#electrum-personal-server-eps-integration"}},[e._v("#")]),e._v(" Electrum Personal Server (EPS) integration")]),e._v(" "),t("p",[t("a",{attrs:{href:"https://github.com/chris-belcher/electrum-personal-server",target:"_blank",rel:"noopener noreferrer"}},[e._v("Electrum Personal Server or EPS"),t("OutboundLink")],1),e._v(" is a personal version of public Electrum servers like "),t("RouterLink",{attrs:{to:"/ElectrumX/"}},[e._v("ElectrumX")]),e._v(".")],1),e._v(" "),t("p",[t("strong",[e._v("EPS can be integrated into BTCPay Server")]),e._v(" using the optional docker fragment "),t("a",{attrs:{href:"https://github.com/btcpayserver/btcpayserver-docker/blob/master/docker-compose-generator/docker-fragments/opt-add-electrum-ps.yml",target:"_blank",rel:"noopener noreferrer"}},[e._v("opt-add-electrum-ps.yml"),t("OutboundLink")],1),e._v(". Use EPS when you want to use your own full node (included in BTCPay Server) to verify your own transactions privately when using Electrum Wallet.")]),e._v(" "),t("p",[e._v("The biggest difference with public Electrum servers (eg. ElectrumX), is that "),t("strong",[e._v("EPS is for monitoring only your own wallet(s)")]),e._v('. The "XPUB" (extended public key) of the wallet you use in Electrum must be shared with EPS in order for it to function all all. Other than this, it functions (from an end user perspective) in the same way as ElectrumX etc. It is '),t("strong",[e._v("easy to integrate into BTCPay")]),e._v(" just follow the instructions below.")]),e._v(" "),t("p",[e._v("EPS does not require "),t("code",[e._v("txindex")]),e._v(" and works on a pruned node.")]),e._v(" "),t("h2",{attrs:{id:"about-tor-support"}},[t("a",{staticClass:"header-anchor",attrs:{href:"#about-tor-support"}},[e._v("#")]),e._v(" About Tor support")]),e._v(" "),t("p",[e._v("By default your EPS is accessible over Tor. You can run the following command line via SSH on your server to get your Tor address:")]),e._v(" "),t("div",{staticClass:"language-bash extra-class"},[t("pre",{pre:!0,attrs:{class:"language-bash"}},[t("code",[t("span",{pre:!0,attrs:{class:"token function"}},[e._v("cat")]),e._v(" /var/lib/docker/volumes/generated_tor_servicesdir/_data/btc-electrum-ps/hostname\n")])])]),t("p",[e._v("You can can also go to your BTCPay Server > Server Settings > Services and find the tor link in "),t("code",[e._v("Other TOR hidden services")]),e._v(".")]),e._v(" "),t("p",[e._v("On the Electrum wallet machine, if you want to connect to your server via Tor, we assume in this tutorial that you run the Tor Browser locally, and thus you will use SOCKS5 port "),t("code",[e._v("9150")]),e._v(". If you run Tor through the command line instead, the local SOCKS5 port is "),t("code",[e._v("9050")]),e._v(".")]),e._v(" "),t("h2",{attrs:{id:"how-to-enable-electrum-personal-server-eps-in-btcpay"}},[t("a",{staticClass:"header-anchor",attrs:{href:"#how-to-enable-electrum-personal-server-eps-in-btcpay"}},[e._v("#")]),e._v(" How to enable Electrum Personal Server (EPS) in BTCPay:")]),e._v(" "),t("ol",[t("li",[t("p",[t("strong",[e._v("If you do not use Tor")]),e._v(", EPS is accessible for Electrum Wallets via TCP port 50002. You need to open this port up fully at least to be available within your own network to any PC or Android device running Electrum Wallet, and turn on port forwarding. If you use Tor, you can skip this step.")])]),e._v(" "),t("li",[t("p",[e._v('As EPS is for a single wallet (single user), you must specify the XPUB/YPUB/ZPUB of your wallet as an environment varable before you enable the EPS docker-fragment. In Electrum Wallet go to the "Wallet" menu then select "Information" to copy and paste yours. Set ENV variable for your wallet XPUB and enable the Docker Additional Fragment on your BTCPay node by running the following steps:')])])]),e._v(" "),t("div",{staticClass:"language-bash extra-class"},[t("pre",{pre:!0,attrs:{class:"language-bash"}},[t("code",[t("span",{pre:!0,attrs:{class:"token builtin class-name"}},[e._v("export")]),e._v(" "),t("span",{pre:!0,attrs:{class:"token assign-left variable"}},[e._v("BTCPAYGEN_ADDITIONAL_FRAGMENTS")]),t("span",{pre:!0,attrs:{class:"token operator"}},[e._v("=")]),t("span",{pre:!0,attrs:{class:"token string"}},[e._v('"'),t("span",{pre:!0,attrs:{class:"token variable"}},[e._v("$BTCPAYGEN_ADDITIONAL_FRAGMENTS")]),e._v(';opt-add-electrum-ps"')]),e._v("\n"),t("span",{pre:!0,attrs:{class:"token builtin class-name"}},[e._v("export")]),e._v(" "),t("span",{pre:!0,attrs:{class:"token assign-left variable"}},[e._v("EPS_XPUB")]),t("span",{pre:!0,attrs:{class:"token operator"}},[e._v("=")]),t("span",{pre:!0,attrs:{class:"token string"}},[e._v('"XPUB_ADD_YOUR_XPUB_YPUB_OR_ZPUB_HERE"')]),e._v("\n"),t("span",{pre:!0,attrs:{class:"token builtin class-name"}},[e._v(".")]),e._v(" btcpay-setup.sh "),t("span",{pre:!0,attrs:{class:"token parameter variable"}},[e._v("-i")]),e._v("\n")])])]),t("ol",{attrs:{start:"3"}},[t("li",[e._v("WAIT for your Bitcoin full node and EPS server to fully sync:\nYou can check the status of bitcoin core sync by going to your domain for BTCPay server, and it will show you on the front page. Or, you can check from the command line as well, using these commands:\n"),t("code",[e._v("docker logs btcpayserver_bitcoind")]),e._v(" - this will show you the bitcoin core blockchain sync status (and ALL other info about your node, including any errors)\n"),t("code",[e._v("docker logs generated_electrum_ps_1")]),e._v(" - this will show you the EPS sync status. Note: EPS will NOT start syncing until bitcoin full node has finished syncing, you will see errors until that is finished and these can be ignored.")])]),e._v(" "),t("p",[e._v("Once all syncing for both bitcoin and EPS have finished synching, you can proceed to the next step. (Note: Electrum wallets will not connect to an EPS server that has not finished synching)")]),e._v(" "),t("h2",{attrs:{id:"how-to-connect-electrum-wallet-to-eps"}},[t("a",{staticClass:"header-anchor",attrs:{href:"#how-to-connect-electrum-wallet-to-eps"}},[e._v("#")]),e._v(" How to connect Electrum Wallet to EPS")]),e._v(" "),t("p",[e._v("There are three ways to use your server from Electrum Wallet:")]),e._v(" "),t("ol",[t("li",[e._v("By editing the configuration file")]),e._v(" "),t("li",[e._v("By running Electrum by the command line")]),e._v(" "),t("li",[e._v("Via the user interface (not recommended, bad privacy)")])]),e._v(" "),t("h4",{attrs:{id:"option-1-connect-to-your-eps-server-by-directly-editing-electrum-wallet-config-file-before-even-opening-the-electrum-wallet-gui-recommended-for-full-privacy"}},[t("a",{staticClass:"header-anchor",attrs:{href:"#option-1-connect-to-your-eps-server-by-directly-editing-electrum-wallet-config-file-before-even-opening-the-electrum-wallet-gui-recommended-for-full-privacy"}},[e._v("#")]),e._v(" Option 1: Connect to your EPS Server by directly editing Electrum Wallet config file (before even opening the Electrum wallet GUI - recommended for full privacy):")]),e._v(" "),t("p",[e._v("You can "),t("strong",[e._v("setup your Electrum server")]),e._v(" by editing the configuration file.")]),e._v(" "),t("p",[e._v("In the "),t("a",{attrs:{href:"https://electrum.readthedocs.io/en/latest/faq.html#where-is-my-wallet-file-located",target:"_blank",rel:"noopener noreferrer"}},[e._v("Electrum Wallet folder"),t("OutboundLink")],1),e._v(", open and edit the "),t("code",[e._v("config")]),e._v(" file like this:")]),e._v(" "),t("ol",[t("li",[t("p",[e._v("Find line: "),t("code",[e._v('"auto_connect": true,')]),e._v(" and switch it to: "),t("code",[e._v('"auto_connect": false,')]),e._v(" - this will prevent your Electrum Wallet from auto-connecting to other 3rd party Electrum Servers at launch time (to obtain block headers and transaction information).")])]),e._v(" "),t("li",[t("p",[e._v("Find line: "),t("code",[e._v('"oneserver": false,')]),e._v(" and switch it to: "),t("code",[e._v('"oneserver": true,')]),e._v(" - ensures that all data is obtained from just one server.")])]),e._v(" "),t("li",[t("p",[e._v("Find or add line: "),t("code",[e._v('"server": "yourserver:50002:s",')]),e._v("and switch it to your own EPS Server's IP address, in the example above this would be: "),t("code",[e._v('"server": "192.168.1.3:50002:s",')]),e._v("- hard code your IP address as the default upon opening the Wallet.")])])]),e._v(" "),t("p",[e._v("These 3 steps strongly recommended for full privacy by locking down Electrum Wallet to one single connection with your private server only ("),t("a",{attrs:{href:"https://github.com/chris-belcher/electrum-personal-server#how-to",target:"_blank",rel:"noopener noreferrer"}},[e._v("Reference"),t("OutboundLink")],1),e._v(").")]),e._v(" "),t("ol",{attrs:{start:"4"}},[t("li",[e._v("("),t("strong",[e._v("If you use Tor")]),e._v(") If you run Tor Browser, you can use it as SOCK5 proxy by adding "),t("code",[e._v('"proxy": "socks5:127.0.0.1:9150::",')]),e._v(" to the configuration file.")])]),e._v(" "),t("h4",{attrs:{id:"option-3-connect-to-your-eps-server-by-command-line"}},[t("a",{staticClass:"header-anchor",attrs:{href:"#option-3-connect-to-your-eps-server-by-command-line"}},[e._v("#")]),e._v(" Option 3: Connect to your EPS Server by command line")]),e._v(" "),t("p",[e._v("You can run electrum via command line "),t("code",[e._v("electrum --oneserver --server yourserver:50002:s")]),e._v(".")]),e._v(" "),t("p",[e._v("If you use Tor, add "),t("code",[e._v("-p socks5:localhost:9150")]),e._v(".")]),e._v(" "),t("h4",{attrs:{id:"option-4-connect-to-your-eps-server-from-electrum-wallet-gui-not-recommended-as-this-will-momentarily-connects-with-other-random-public-electrum-servers-if-you-are-online"}},[t("a",{staticClass:"header-anchor",attrs:{href:"#option-4-connect-to-your-eps-server-from-electrum-wallet-gui-not-recommended-as-this-will-momentarily-connects-with-other-random-public-electrum-servers-if-you-are-online"}},[e._v("#")]),e._v(" Option 4: Connect to your EPS Server from Electrum Wallet GUI (not recommended as this will momentarily connects with other random public Electrum servers if you are online):")]),e._v(" "),t("ol",[t("li",[e._v("Open Electrum Wallet. When you click the traffic light (green or red) at the bottom of your Electrum Wallet, you will see a screen with a list of all the available Electrum servers that your wallet can connect to, normally with the "),t("code",[e._v("Select Server Automatically")]),e._v(" box already checked:")])]),e._v(" "),t("figure",[t("img",{attrs:{src:"https://user-images.githubusercontent.com/1388507/68437521-8a5eb580-01c1-11ea-9ece-0666353a6742.png",alt:"ElectrumWalletServerList",title:"ElectrumWalletServerList"}})]),e._v(" "),t("ol",{attrs:{start:"2"}},[t("li",[e._v("Now is the time to UNCHECK that "),t("code",[e._v("Select Server Automatically")]),e._v(" setting, which will enable you to enter the IP address or domain or hostname of your EPS Server. In the case below, the EPS server is on the local network at "),t("code",[e._v("192.168.1.3")]),e._v(" so we enter that manually (leave port as 50002) and press "),t("code",[e._v("close")]),e._v(".")])]),e._v(" "),t("figure",[t("img",{attrs:{src:"https://user-images.githubusercontent.com/1388507/68496320-4e276580-0252-11ea-8caf-facc8a246d70.png",alt:"EnterElectrumServerIP",title:"EnterElectrumServerIP"}})]),e._v(" "),t("ol",{attrs:{start:"4"}},[t("li",[t("p",[e._v("("),t("strong",[e._v("If you use Tor")]),e._v(") Go to proxy, then click on "),t("code",[e._v("Use Tor Proxy at port 9150")]),e._v(".")])]),e._v(" "),t("li",[t("p",[e._v("If all of the above worked well, and your node is healthy and synched, you will get a green traffic light down the bottom right of the wallet screen - that means success!")])])]),e._v(" "),t("h3",{attrs:{id:"reflection-on-what-has-been-achieved"}},[t("a",{staticClass:"header-anchor",attrs:{href:"#reflection-on-what-has-been-achieved"}},[e._v("#")]),e._v(" Reflection on what has been achieved:")]),e._v(" "),t("p",[e._v("You are now running your very "),t("strong",[e._v("own private EPS Server")]),e._v(". All Electrum Wallet related data transfer happens directly between your EPS Server and the bitcoin blockchain, without going over any other 3rd party servers. You have attained full bitcoin transaction privacy (at least from the perspective of your blockchain queries and transactions, payment/receive addresses etc - nobody except you and the blockchain can see what you are doing).")]),e._v(" "),t("h3",{attrs:{id:"troubleshooting"}},[t("a",{staticClass:"header-anchor",attrs:{href:"#troubleshooting"}},[e._v("#")]),e._v(" Troubleshooting:")]),e._v(" "),t("p",[e._v("So there is one thing you may encounter, where even after you did everything correctly, you still get a red traffic light (which means not connected to any server) in the steps above. Any other troubleshooting tips that people encounter can be added, I would suggest to make a PR to this document directly.")]),e._v(" "),t("ul",[t("li",[e._v("If you get a red traffic light, shutdown Electrum Wallet completely, then go to your Electrum Wallet folder ("),t("a",{attrs:{href:"https://electrum.readthedocs.io/en/latest/faq.html#where-is-my-wallet-file-located",target:"_blank",rel:"noopener noreferrer"}},[e._v("see here"),t("OutboundLink")],1),e._v(" if you don't know where that is).")])]),e._v(" "),t("p",[e._v("Inside the Electrum Wallet folder (in this case below, it is what it looks like on a Mac) locate the "),t("code",[e._v("certs")]),e._v(" directory and delete the certificate for the server you are trying to connect to, in this case "),t("code",[e._v("192.168.1.3")]),e._v(", by dragging it to the Trash.")]),e._v(" "),t("figure",[t("img",{attrs:{src:"https://user-images.githubusercontent.com/1388507/68497330-9a73a500-0254-11ea-9349-71bdb3bd9511.png",alt:"Certs",title:"Certs"}})]),e._v(" "),t("p",[e._v("Start up Electrum Wallet again, and connect to your "),t("strong",[e._v("EPS server")]),e._v(". If it is fully synched, it will now likely show a green traffic light, and you are good to go.")])])}),[],!1,null,null,null);t.default=n.exports}}]); \ No newline at end of file diff --git a/assets/js/142.4b98bfcb.js b/assets/js/142.b44d0731.js similarity index 99% rename from assets/js/142.4b98bfcb.js rename to assets/js/142.b44d0731.js index 9381798500..99c2222f7b 100644 --- a/assets/js/142.4b98bfcb.js +++ b/assets/js/142.b44d0731.js @@ -1 +1 @@ -(window.webpackJsonp=window.webpackJsonp||[]).push([[142],{798:function(e,t,r){"use strict";r.r(t);var a=r(10),o=Object(a.a)({},(function(){var e=this,t=e._self._c;return t("ContentSlotsDistributor",{attrs:{"slot-key":e.$parent.slotKey}},[t("h1",{attrs:{id:"electrumx"}},[t("a",{staticClass:"header-anchor",attrs:{href:"#electrumx"}},[e._v("#")]),e._v(" ElectrumX")]),e._v(" "),t("p",[e._v("This document explains how to "),t("strong",[e._v("connect Electrum Wallet to an ElectrumX Server")]),e._v(".")]),e._v(" "),t("p",[t("strong",[e._v("Note:")]),e._v(" the "),t("a",{attrs:{href:"https://github.com/btcpayserver/btcpayserver-docker",target:"_blank",rel:"noopener noreferrer"}},[e._v("docker version of BTCPay Server"),t("OutboundLink")],1),e._v(" (since Nov 7th 2019, version 1.0.3.137) supports full integration with "),t("a",{attrs:{href:"https://electrumx.readthedocs.io/en/latest/features.html",target:"_blank",rel:"noopener noreferrer"}},[e._v("ElectrumX"),t("OutboundLink")],1),e._v(" is the most widely implemented software used for Electrum public servers that your local Electrum wallet relies upon to get all the details of, or broadcast transactions to the bitcoin blockchain. Skip to Section 2 below, to read more on what this all means, and how to set it up on your BTCPay stack.")]),e._v(" "),t("h2",{attrs:{id:"how-to-integrate-electrumx-into-your-btcpay-server-and-connect-your-electrum-wallet-to-it-for-your-complete-privacy"}},[t("a",{staticClass:"header-anchor",attrs:{href:"#how-to-integrate-electrumx-into-your-btcpay-server-and-connect-your-electrum-wallet-to-it-for-your-complete-privacy"}},[e._v("#")]),e._v(" How to integrate ElectrumX into your BTCPay Server and connect your Electrum Wallet to it for your complete privacy")]),e._v(" "),t("h3",{attrs:{id:"only-available-in-btcpay-docker-version"}},[t("a",{staticClass:"header-anchor",attrs:{href:"#only-available-in-btcpay-docker-version"}},[e._v("#")]),e._v(" (only available in BTCPay docker version)")]),e._v(" "),t("p",[e._v("Before we proceed, it is important to understand how your Electrum wallet on your PC/Mac functions so well/fast, without having its own bitcoin full node. In actual fact, Electrum Wallet relies on a community effort to maintain a bunch of servers all around the world with a bitcoin full node that do this job for you! They are called Electrum Servers, and you can be a part of that community to make that network even stronger, lets see how.")]),e._v(" "),t("p",[e._v("When you click the little traffic light at the bottom of your Electrum Wallet here:")]),e._v(" "),t("figure",[t("img",{attrs:{src:"https://user-images.githubusercontent.com/1388507/68437133-5636c500-01c0-11ea-822c-6e72bd6d60ea.png",alt:"ElectrumWalletMainScreenLight",title:"ElectrumWalletMainScreenLight"}})]),e._v(" "),t("p",[e._v('You will see this screen with a list of all the available Electrum servers that your wallet can connect to, normally with "Select Server Automatically" already checked:')]),e._v(" "),t("figure",[t("img",{attrs:{src:"https://user-images.githubusercontent.com/1388507/68437521-8a5eb580-01c1-11ea-9ece-0666353a6742.png",alt:"ElectrumWalletServerList",title:"ElectrumWalletServerList"}})]),e._v(" "),t("p",[e._v('While using Electrum Wallet with "Select Server Automatically" on is the easiest, every transaction that you make/browse/broadcast in your Electrum Wallet will be done via someone else\'s server - this is a privacy risk, that will be mitigated by setting up and using your own ElectrumX Server.')]),e._v(" "),t("h2",{attrs:{id:"section-21-enable-your-own-electrumx-server-fully-integrated-with-your-btcpay-servers-full-bitcoin-node"}},[t("a",{staticClass:"header-anchor",attrs:{href:"#section-21-enable-your-own-electrumx-server-fully-integrated-with-your-btcpay-servers-full-bitcoin-node"}},[e._v("#")]),e._v(" Section 2.1 Enable Your Own ElectrumX Server (fully integrated with your BTCPay Server's full bitcoin node)")]),e._v(" "),t("h3",{attrs:{id:"prerequisites-mandatory"}},[t("a",{staticClass:"header-anchor",attrs:{href:"#prerequisites-mandatory"}},[e._v("#")]),e._v(" Prerequisites (mandatory):")]),e._v(" "),t("ol",[t("li",[e._v("Docker only: Only the "),t("RouterLink",{attrs:{to:"/Docker/"}},[e._v("Docker version of BTCPay Server")]),e._v(" is supported.")],1),e._v(" "),t("li",[e._v("Unpruned BTCPay node: Make sure your BTCPay implementation is NOT "),t("RouterLink",{attrs:{to:"/FAQ/Synchronization/#can-i-skip-the-synchronization"}},[e._v("pruned")]),e._v(" (i.e. you have synched and stored from genesis block. Check that you do NOT use the opt-save-storage "),t("RouterLink",{attrs:{to:"/Docker/#generated-docker-compose"}},[e._v("Environment Variable")]),e._v(")")],1),e._v(" "),t("li",[e._v("Drive space: At least 400GB of drive space on the device where your docker volumes are stored is required (as at the writing of this documentation on 9th Nov 2019, the total hard drive space used is 333GB - with full node and ElectrumX enabled - and of course this will grow further over time).")]),e._v(" "),t("li",[e._v("Additional Fragments: You are familiar with how to use BTCPay's "),t("RouterLink",{attrs:{to:"/Docker/#environment-variables"}},[e._v("Additional Fragment")]),e._v(" feature as part of your environment variable setup.")],1),e._v(" "),t("li",[e._v("Server architecture: The (official) "),t("a",{attrs:{href:"https://github.com/lukechilds/docker-electrumx",target:"_blank",rel:"noopener noreferrer"}},[e._v("ElectrumX docker"),t("OutboundLink")],1),e._v(" used here is only tested on a BTCPay Server running on x86_64 architecture. So far it is tested extensively on Ubuntu 18.04 and Debian Buster. Unless it is overhauled and tested well on Raspberry Pi (and other architectures) it likely will not work.")]),e._v(" "),t("li",[e._v("Basic Linux command line knowledge: is assumed.")])]),e._v(" "),t("h3",{attrs:{id:"how-will-enabling-electrumx-server-affect-an-existing-btcpay-implementation"}},[t("a",{staticClass:"header-anchor",attrs:{href:"#how-will-enabling-electrumx-server-affect-an-existing-btcpay-implementation"}},[e._v("#")]),e._v(" How will enabling ElectrumX Server affect an existing BTCPay implementation?:")]),e._v(" "),t("p",[e._v("Fundamentally, setting up ElectrumX in BTCPay server is simple, and will not affect the rest of your implementation. The only pre-requisites are as above. The "),t("a",{attrs:{href:"https://github.com/lukechilds/docker-electrumx",target:"_blank",rel:"noopener noreferrer"}},[e._v("ElectrumX official docker release"),t("OutboundLink")],1),e._v(" is enabled in BTCPay by activating the "),t("RouterLink",{attrs:{to:"/Docker/#generated-docker-compose"}},[e._v("additional fragment")]),e._v(" called "),t("a",{attrs:{href:"https://github.com/btcpayserver/btcpayserver-docker/blob/master/docker-compose-generator/docker-fragments/opt-add-electrumx.yml",target:"_blank",rel:"noopener noreferrer"}},[t("code",[e._v("opt-add-electumx")]),t("OutboundLink")],1),e._v(". This fragment will not only enable and start the ElectrumX server, it will also enable "),t("code",[e._v("txindex=1")]),e._v(" in your bitcoin full node. "),t("code",[e._v("txindex=1")]),e._v(" (Transaction Index=ON) is a bitcoin core feature required for ElectrumX to be able to serve your Electrum Wallet detailed transaction data for any transaction, directly from the blockchain, without getting it from any third party server.")],1),e._v(" "),t("p",[e._v("If you have been running your BTCPay Server for a while but haven't had "),t("code",[e._v("txindex=1")]),e._v(" set until now, then it might take a few hours to build the index, this is no issue and it should not involve downtime of more than a few hours - better to set this to run overnight though when nobody will be using your node. Note: If you want to rebuild the index from scratch, launch bitcoind once with the "),t("code",[e._v("reindex=1")]),e._v(" option (warning: this reindex option may take a VERY long time, and is not enabled out of the box as you likely dont need it, and hence is not in scope of this document).")]),e._v(" "),t("h3",{attrs:{id:"steps-to-enable-electrumx-server-in-btcpay"}},[t("a",{staticClass:"header-anchor",attrs:{href:"#steps-to-enable-electrumx-server-in-btcpay"}},[e._v("#")]),e._v(" Steps to enable ElectrumX Server in BTCPay:")]),e._v(" "),t("p",[e._v("Here are all the steps to "),t("strong",[e._v("enable ElectrumX Server in your BTCPay node")]),e._v(' (read carefully as you may need to adjust for your specific setup, especially if you use other custom or conflicting "fragments" (pruning, less-memory etc. To reiterate, you should NOT proceed further here if you run a pruned BTCPay node.')]),e._v(" "),t("ol",[t("li",[t("p",[e._v("ElectrumX Server is accessible for Electrum Wallets via TCP port 50002. You need to open this port up fully at least to be available within your own network to any PC or Android device running Electrum Wallet, and turn on port forwarding (you can also port forward 50002 from your Internet/WAN, to enable other Electrum Wallet users from the Internet to query your server).")])]),e._v(" "),t("li",[t("p",[e._v("Enable the Docker Additional Fragment on your BTCPay node by running the following commands (this is assuming a brand new BTCPay installation with LND and ElectrumX, please tweak accordingly using the "),t("RouterLink",{attrs:{to:"/Docker/#generated-docker-compose"}},[e._v("relevant documentation")]),e._v(":")],1)]),e._v(" "),t("li",[t("p",[e._v("Follow the "),t("a",{attrs:{href:"https://github.com/btcpayserver/btcpayserver-docker#full-installation-for-technical-users",target:"_blank",rel:"noopener noreferrer"}},[e._v("normal setup and install of BTCPay Server"),t("OutboundLink")],1),e._v(", then after this command "),t("code",[e._v("cd btcpayserver-docker")]),e._v(", follow the below instructions instead of those in the link. If you already have a BTCPay Server running, then just follow from the next step.")])]),e._v(" "),t("li",[t("p",[e._v("Set your environment variables:")])])]),e._v(" "),t("div",{staticClass:"language-bash extra-class"},[t("pre",{pre:!0,attrs:{class:"language-bash"}},[t("code",[t("span",{pre:!0,attrs:{class:"token builtin class-name"}},[e._v("export")]),e._v(" "),t("span",{pre:!0,attrs:{class:"token assign-left variable"}},[e._v("BTCPAY_HOST")]),t("span",{pre:!0,attrs:{class:"token operator"}},[e._v("=")]),t("span",{pre:!0,attrs:{class:"token string"}},[e._v('"YOURHOST.com"')]),e._v("\n"),t("span",{pre:!0,attrs:{class:"token builtin class-name"}},[e._v("export")]),e._v(" "),t("span",{pre:!0,attrs:{class:"token assign-left variable"}},[e._v("NBITCOIN_NETWORK")]),t("span",{pre:!0,attrs:{class:"token operator"}},[e._v("=")]),t("span",{pre:!0,attrs:{class:"token string"}},[e._v('"mainnet"')]),e._v("\n"),t("span",{pre:!0,attrs:{class:"token builtin class-name"}},[e._v("export")]),e._v(" "),t("span",{pre:!0,attrs:{class:"token assign-left variable"}},[e._v("BTCPAYGEN_CRYPTO1")]),t("span",{pre:!0,attrs:{class:"token operator"}},[e._v("=")]),t("span",{pre:!0,attrs:{class:"token string"}},[e._v('"btc"')]),e._v("\n"),t("span",{pre:!0,attrs:{class:"token builtin class-name"}},[e._v("export")]),e._v(" "),t("span",{pre:!0,attrs:{class:"token assign-left variable"}},[e._v("BTCPAYGEN_REVERSEPROXY")]),t("span",{pre:!0,attrs:{class:"token operator"}},[e._v("=")]),t("span",{pre:!0,attrs:{class:"token string"}},[e._v('"nginx"')]),e._v("\n"),t("span",{pre:!0,attrs:{class:"token builtin class-name"}},[e._v("export")]),e._v(" "),t("span",{pre:!0,attrs:{class:"token assign-left variable"}},[e._v("BTCPAYGEN_LIGHTNING")]),t("span",{pre:!0,attrs:{class:"token operator"}},[e._v("=")]),t("span",{pre:!0,attrs:{class:"token string"}},[e._v('"lnd"')]),e._v("\n"),t("span",{pre:!0,attrs:{class:"token builtin class-name"}},[e._v("export")]),e._v(" "),t("span",{pre:!0,attrs:{class:"token assign-left variable"}},[e._v("LIGHTNING_ALIAS")]),t("span",{pre:!0,attrs:{class:"token operator"}},[e._v("=")]),t("span",{pre:!0,attrs:{class:"token string"}},[e._v('"MY_LN"')]),e._v("\n"),t("span",{pre:!0,attrs:{class:"token builtin class-name"}},[e._v("export")]),e._v(" "),t("span",{pre:!0,attrs:{class:"token assign-left variable"}},[e._v("LETSENCRYPT_EMAIL")]),t("span",{pre:!0,attrs:{class:"token operator"}},[e._v("=")]),t("span",{pre:!0,attrs:{class:"token string"}},[e._v('"you@example.com"')]),e._v("\n"),t("span",{pre:!0,attrs:{class:"token builtin class-name"}},[e._v("export")]),e._v(" "),t("span",{pre:!0,attrs:{class:"token assign-left variable"}},[e._v("BTCPAYGEN_ADDITIONAL_FRAGMENTS")]),t("span",{pre:!0,attrs:{class:"token operator"}},[e._v("=")]),t("span",{pre:!0,attrs:{class:"token string"}},[e._v('"opt-add-electrumx;opt-more-memory"')]),e._v("\n")])])]),t("p",[e._v("You can run all of that as one command after you tweak it to your needs. The main part for our purposes in this guide of course is "),t("code",[e._v('BTCPAYGEN_ADDITIONAL_FRAGMENTS="opt-add-electrumx"')]),e._v(". Note: "),t("code",[e._v("opt-more-memory")]),e._v(" can be removed if you like, but I really recommend it if your system has more than 1GB of RAM/memory that you can assign to BTCPay server, it will speed synching your node and the general performance of ElectrumX up drastically.")]),e._v(" "),t("ol",{attrs:{start:"5"}},[t("li",[t("p",[e._v("Set up or reconfigure BTCPay Server with ElectrumX:")]),e._v(" "),t("p",[t("code",[e._v("cd ~/BTCPayServer/btcpayserver-docker && . ./btcpay-setup.sh -i")])]),e._v(" "),t("p",[e._v('This will setup (or re-setup) your server with everything needed including ElectrumX, and it all should "just work". But, it will trigger at least a couple of hours of syncing the '),t("code",[e._v("txindex")]),e._v(", and if it is a new server, could be a couple of days depending on your hardware.")])]),e._v(" "),t("li",[t("p",[e._v("WAIT for your node to fully sync:\nYou can check the status of bitcoin core sync by going to your domain for BTCPay server, and it will show you on the front page. Or, you can check from the command line as well, using these commands:")]),e._v(" "),t("p",[t("code",[e._v("docker logs btcpayserver_bitcoind")]),e._v(" - this will show you the bitcoin core blockchain sync status (and ALL other info about your node, including any errors)")]),e._v(" "),t("p",[t("code",[e._v("docker logs generated_electrumx_1")]),e._v(" - this will show you the ElectrumX sync status. Note: ElectrumX will NOT start syncing until bitcoin full node has finished syncing, you will see errors until that is finished and these can be ignored.")])])]),e._v(" "),t("p",[e._v("Once all syncing for both bitcoin and ElectrumX has finished you can proceed to the next step. (Note: Electrum wallets will not connect to an Electrum server that has not finished synching)")]),e._v(" "),t("h2",{attrs:{id:"section-22-connect-your-electrum-wallet-desktop-or-android-to-your-electrumx-server"}},[t("a",{staticClass:"header-anchor",attrs:{href:"#section-22-connect-your-electrum-wallet-desktop-or-android-to-your-electrumx-server"}},[e._v("#")]),e._v(" Section 2.2 Connect your Electrum Wallet (Desktop or Android) to your ElectrumX Server")]),e._v(" "),t("h3",{attrs:{id:"connect-to-electrumx-from-electrum-wallet-on-your-macpclinux-machine"}},[t("a",{staticClass:"header-anchor",attrs:{href:"#connect-to-electrumx-from-electrum-wallet-on-your-macpclinux-machine"}},[e._v("#")]),e._v(" Connect to ElectrumX from Electrum Wallet on your Mac/PC/Linux Machine:")]),e._v(" "),t("p",[e._v('Read all of this first before proceeding. You may wish to do just the "Protip" below instead of the manual steps in the Electrum Wallet GUI.')]),e._v(" "),t("p",[e._v("Open Electrum Wallet. When you click the traffic light at the bottom of your Electrum Wallet:")]),e._v(" "),t("figure",[t("img",{attrs:{src:"https://user-images.githubusercontent.com/1388507/68437133-5636c500-01c0-11ea-822c-6e72bd6d60ea.png",alt:"ElectrumWalletMainScreenLight",title:"ElectrumWalletMainScreenLight"}})]),e._v(" "),t("p",[e._v("You will see this screen with a list of all the available Electrum servers that your wallet can connect to, normally with "),t("code",[e._v("Select Server Automatically")]),e._v(" already checked:")]),e._v(" "),t("figure",[t("img",{attrs:{src:"https://user-images.githubusercontent.com/1388507/68437521-8a5eb580-01c1-11ea-9ece-0666353a6742.png",alt:"ElectrumWalletServerList",title:"ElectrumWalletServerList"}})]),e._v(" "),t("p",[e._v("Now is the time to UNCHECK that "),t("code",[e._v("Select Server Automatically")]),e._v(" setting, which will enable you to enter the IP address or domain or hostname of your ElectrumX Server. In the case below, the ElectrumX server is on the local network at "),t("code",[e._v("192.168.1.3")]),e._v(" so we enter that manually (leave port as 50002) and press "),t("code",[e._v("close")]),e._v(".")]),e._v(" "),t("figure",[t("img",{attrs:{src:"https://user-images.githubusercontent.com/1388507/68496320-4e276580-0252-11ea-8caf-facc8a246d70.png",alt:"EnterElectrumXServerIP",title:"EnterElectrumXServerIP"}})]),e._v(" "),t("p",[e._v("If all of the above worked well, and your node is healthy, you will get a green traffic light down the bottom right of the wallet interface as pictured here - that means success!:")]),e._v(" "),t("figure",[t("img",{attrs:{src:"https://user-images.githubusercontent.com/1388507/68437133-5636c500-01c0-11ea-822c-6e72bd6d60ea.png",alt:"ElectrumWalletMainScreenLight",title:"ElectrumWalletMainScreenLight"}})]),e._v(" "),t("h4",{attrs:{id:"protip-optionally-perform-the-above-steps-directly-in-electrum-wallet-config-file-before-even-opening-the-wallet-gui"}},[t("a",{staticClass:"header-anchor",attrs:{href:"#protip-optionally-perform-the-above-steps-directly-in-electrum-wallet-config-file-before-even-opening-the-wallet-gui"}},[e._v("#")]),e._v(" Protip - optionally perform the above steps directly in Electrum Wallet config file before even opening the wallet GUI:")]),e._v(" "),t("p",[e._v("If you prefer to avoid connecting to other servers from the outset when you open Electrum Wallet, do the following before you open Electrum Wallet GUI.")]),e._v(" "),t("p",[e._v("In the Electrum Wallet folder ("),t("a",{attrs:{href:"https://electrum.readthedocs.io/en/latest/faq.html#where-is-my-wallet-file-located",target:"_blank",rel:"noopener noreferrer"}},[e._v("see here"),t("OutboundLink")],1),e._v(" if you don't know where that is), open and edit the "),t("code",[e._v("config")]),e._v(" file like this:")]),e._v(" "),t("ol",[t("li",[t("p",[e._v("Find line: "),t("code",[e._v('"auto_connect": true,')]),e._v(" and switch it to: "),t("code",[e._v('"auto_connect": false,')]),e._v(" - this will prevent your Electrum Wallet from auto-connecting to other 3rd party Electrum Servers at launch time (to obtain block headers and transaction information).")])]),e._v(" "),t("li",[t("p",[e._v("Find line: "),t("code",[e._v('"oneserver": false,')]),e._v(" and switch it to: "),t("code",[e._v('"oneserver": true,')]),e._v(" - ensures that all data is obtained from just one server.")])]),e._v(" "),t("li",[t("p",[e._v("Find or add line: "),t("code",[e._v('"server": "SOMEIPADDRESS:50002:s",')]),e._v("and switch it to your own ElectrumX Server's IP address, in the example above this would be: "),t("code",[e._v('"server": "192.168.1.3:50002:s",')]),e._v("- hard code your IP address as the default upon opening the Wallet.")])])]),e._v(" "),t("p",[e._v("These 3 steps optional but recommended for full privacy by locking down Electrum Wallet to one single connection with your private server ("),t("a",{attrs:{href:"https://github.com/chris-belcher/electrum-personal-server#how-to",target:"_blank",rel:"noopener noreferrer"}},[e._v("Reference"),t("OutboundLink")],1),e._v(").")]),e._v(" "),t("h3",{attrs:{id:"reflection-on-what-has-been-achieved"}},[t("a",{staticClass:"header-anchor",attrs:{href:"#reflection-on-what-has-been-achieved"}},[e._v("#")]),e._v(" Reflection on what has been achieved:")]),e._v(" "),t("p",[e._v("You are now running your very "),t("strong",[e._v("own private ElectrumX Server")]),e._v(". All Electrum Wallet related data transfer happens directly between your ElectrumX Server and the bitcoin blockchain, without going over any other 3rd party servers. You have attained full bitcoin transaction privacy (at least from the perspective of your blockchain queries and transactions, payment/receive addresses etc - nobody except you and the blockchain can see what you are doing).")]),e._v(" "),t("h3",{attrs:{id:"troubleshooting"}},[t("a",{staticClass:"header-anchor",attrs:{href:"#troubleshooting"}},[e._v("#")]),e._v(" Troubleshooting:")]),e._v(" "),t("p",[e._v("So there is one thing you may encounter, where even after you did everything correctly, you still get a red traffic light (which means not connected to any server) in the steps above. Any other troubleshooting tips that people encounter can be added, I would suggest to make a PR to this document directly.")]),e._v(" "),t("ul",[t("li",[e._v("If you get a red traffic light, shutdown Electrum Wallet completely, then go to your Electrum Wallet folder ("),t("a",{attrs:{href:"https://electrum.readthedocs.io/en/latest/faq.html#where-is-my-wallet-file-located",target:"_blank",rel:"noopener noreferrer"}},[e._v("see here"),t("OutboundLink")],1),e._v(" if you don't know where that is).")])]),e._v(" "),t("p",[e._v("Inside the Electrum Wallet folder (in this case below, it is what it looks like on a Mac) locate the "),t("code",[e._v("certs")]),e._v(" directory and delete the certificate for the server you are trying to connect to, in this case "),t("code",[e._v("192.168.1.3")]),e._v(", by dragging it to the Trash.")]),e._v(" "),t("figure",[t("img",{attrs:{src:"https://user-images.githubusercontent.com/1388507/68497330-9a73a500-0254-11ea-9349-71bdb3bd9511.png",alt:"Certs",title:"Certs"}})]),e._v(" "),t("p",[e._v("Start up Electrum Wallet again, and connect to your ElectrumX server. If it is fully synched, it will now likely show a green traffic light, and you are good to go.")])])}),[],!1,null,null,null);t.default=o.exports}}]); \ No newline at end of file +(window.webpackJsonp=window.webpackJsonp||[]).push([[142],{797:function(e,t,r){"use strict";r.r(t);var a=r(10),o=Object(a.a)({},(function(){var e=this,t=e._self._c;return t("ContentSlotsDistributor",{attrs:{"slot-key":e.$parent.slotKey}},[t("h1",{attrs:{id:"electrumx"}},[t("a",{staticClass:"header-anchor",attrs:{href:"#electrumx"}},[e._v("#")]),e._v(" ElectrumX")]),e._v(" "),t("p",[e._v("This document explains how to "),t("strong",[e._v("connect Electrum Wallet to an ElectrumX Server")]),e._v(".")]),e._v(" "),t("p",[t("strong",[e._v("Note:")]),e._v(" the "),t("a",{attrs:{href:"https://github.com/btcpayserver/btcpayserver-docker",target:"_blank",rel:"noopener noreferrer"}},[e._v("docker version of BTCPay Server"),t("OutboundLink")],1),e._v(" (since Nov 7th 2019, version 1.0.3.137) supports full integration with "),t("a",{attrs:{href:"https://electrumx.readthedocs.io/en/latest/features.html",target:"_blank",rel:"noopener noreferrer"}},[e._v("ElectrumX"),t("OutboundLink")],1),e._v(" is the most widely implemented software used for Electrum public servers that your local Electrum wallet relies upon to get all the details of, or broadcast transactions to the bitcoin blockchain. Skip to Section 2 below, to read more on what this all means, and how to set it up on your BTCPay stack.")]),e._v(" "),t("h2",{attrs:{id:"how-to-integrate-electrumx-into-your-btcpay-server-and-connect-your-electrum-wallet-to-it-for-your-complete-privacy"}},[t("a",{staticClass:"header-anchor",attrs:{href:"#how-to-integrate-electrumx-into-your-btcpay-server-and-connect-your-electrum-wallet-to-it-for-your-complete-privacy"}},[e._v("#")]),e._v(" How to integrate ElectrumX into your BTCPay Server and connect your Electrum Wallet to it for your complete privacy")]),e._v(" "),t("h3",{attrs:{id:"only-available-in-btcpay-docker-version"}},[t("a",{staticClass:"header-anchor",attrs:{href:"#only-available-in-btcpay-docker-version"}},[e._v("#")]),e._v(" (only available in BTCPay docker version)")]),e._v(" "),t("p",[e._v("Before we proceed, it is important to understand how your Electrum wallet on your PC/Mac functions so well/fast, without having its own bitcoin full node. In actual fact, Electrum Wallet relies on a community effort to maintain a bunch of servers all around the world with a bitcoin full node that do this job for you! They are called Electrum Servers, and you can be a part of that community to make that network even stronger, lets see how.")]),e._v(" "),t("p",[e._v("When you click the little traffic light at the bottom of your Electrum Wallet here:")]),e._v(" "),t("figure",[t("img",{attrs:{src:"https://user-images.githubusercontent.com/1388507/68437133-5636c500-01c0-11ea-822c-6e72bd6d60ea.png",alt:"ElectrumWalletMainScreenLight",title:"ElectrumWalletMainScreenLight"}})]),e._v(" "),t("p",[e._v('You will see this screen with a list of all the available Electrum servers that your wallet can connect to, normally with "Select Server Automatically" already checked:')]),e._v(" "),t("figure",[t("img",{attrs:{src:"https://user-images.githubusercontent.com/1388507/68437521-8a5eb580-01c1-11ea-9ece-0666353a6742.png",alt:"ElectrumWalletServerList",title:"ElectrumWalletServerList"}})]),e._v(" "),t("p",[e._v('While using Electrum Wallet with "Select Server Automatically" on is the easiest, every transaction that you make/browse/broadcast in your Electrum Wallet will be done via someone else\'s server - this is a privacy risk, that will be mitigated by setting up and using your own ElectrumX Server.')]),e._v(" "),t("h2",{attrs:{id:"section-21-enable-your-own-electrumx-server-fully-integrated-with-your-btcpay-servers-full-bitcoin-node"}},[t("a",{staticClass:"header-anchor",attrs:{href:"#section-21-enable-your-own-electrumx-server-fully-integrated-with-your-btcpay-servers-full-bitcoin-node"}},[e._v("#")]),e._v(" Section 2.1 Enable Your Own ElectrumX Server (fully integrated with your BTCPay Server's full bitcoin node)")]),e._v(" "),t("h3",{attrs:{id:"prerequisites-mandatory"}},[t("a",{staticClass:"header-anchor",attrs:{href:"#prerequisites-mandatory"}},[e._v("#")]),e._v(" Prerequisites (mandatory):")]),e._v(" "),t("ol",[t("li",[e._v("Docker only: Only the "),t("RouterLink",{attrs:{to:"/Docker/"}},[e._v("Docker version of BTCPay Server")]),e._v(" is supported.")],1),e._v(" "),t("li",[e._v("Unpruned BTCPay node: Make sure your BTCPay implementation is NOT "),t("RouterLink",{attrs:{to:"/FAQ/Synchronization/#can-i-skip-the-synchronization"}},[e._v("pruned")]),e._v(" (i.e. you have synched and stored from genesis block. Check that you do NOT use the opt-save-storage "),t("RouterLink",{attrs:{to:"/Docker/#generated-docker-compose"}},[e._v("Environment Variable")]),e._v(")")],1),e._v(" "),t("li",[e._v("Drive space: At least 400GB of drive space on the device where your docker volumes are stored is required (as at the writing of this documentation on 9th Nov 2019, the total hard drive space used is 333GB - with full node and ElectrumX enabled - and of course this will grow further over time).")]),e._v(" "),t("li",[e._v("Additional Fragments: You are familiar with how to use BTCPay's "),t("RouterLink",{attrs:{to:"/Docker/#environment-variables"}},[e._v("Additional Fragment")]),e._v(" feature as part of your environment variable setup.")],1),e._v(" "),t("li",[e._v("Server architecture: The (official) "),t("a",{attrs:{href:"https://github.com/lukechilds/docker-electrumx",target:"_blank",rel:"noopener noreferrer"}},[e._v("ElectrumX docker"),t("OutboundLink")],1),e._v(" used here is only tested on a BTCPay Server running on x86_64 architecture. So far it is tested extensively on Ubuntu 18.04 and Debian Buster. Unless it is overhauled and tested well on Raspberry Pi (and other architectures) it likely will not work.")]),e._v(" "),t("li",[e._v("Basic Linux command line knowledge: is assumed.")])]),e._v(" "),t("h3",{attrs:{id:"how-will-enabling-electrumx-server-affect-an-existing-btcpay-implementation"}},[t("a",{staticClass:"header-anchor",attrs:{href:"#how-will-enabling-electrumx-server-affect-an-existing-btcpay-implementation"}},[e._v("#")]),e._v(" How will enabling ElectrumX Server affect an existing BTCPay implementation?:")]),e._v(" "),t("p",[e._v("Fundamentally, setting up ElectrumX in BTCPay server is simple, and will not affect the rest of your implementation. The only pre-requisites are as above. The "),t("a",{attrs:{href:"https://github.com/lukechilds/docker-electrumx",target:"_blank",rel:"noopener noreferrer"}},[e._v("ElectrumX official docker release"),t("OutboundLink")],1),e._v(" is enabled in BTCPay by activating the "),t("RouterLink",{attrs:{to:"/Docker/#generated-docker-compose"}},[e._v("additional fragment")]),e._v(" called "),t("a",{attrs:{href:"https://github.com/btcpayserver/btcpayserver-docker/blob/master/docker-compose-generator/docker-fragments/opt-add-electrumx.yml",target:"_blank",rel:"noopener noreferrer"}},[t("code",[e._v("opt-add-electumx")]),t("OutboundLink")],1),e._v(". This fragment will not only enable and start the ElectrumX server, it will also enable "),t("code",[e._v("txindex=1")]),e._v(" in your bitcoin full node. "),t("code",[e._v("txindex=1")]),e._v(" (Transaction Index=ON) is a bitcoin core feature required for ElectrumX to be able to serve your Electrum Wallet detailed transaction data for any transaction, directly from the blockchain, without getting it from any third party server.")],1),e._v(" "),t("p",[e._v("If you have been running your BTCPay Server for a while but haven't had "),t("code",[e._v("txindex=1")]),e._v(" set until now, then it might take a few hours to build the index, this is no issue and it should not involve downtime of more than a few hours - better to set this to run overnight though when nobody will be using your node. Note: If you want to rebuild the index from scratch, launch bitcoind once with the "),t("code",[e._v("reindex=1")]),e._v(" option (warning: this reindex option may take a VERY long time, and is not enabled out of the box as you likely dont need it, and hence is not in scope of this document).")]),e._v(" "),t("h3",{attrs:{id:"steps-to-enable-electrumx-server-in-btcpay"}},[t("a",{staticClass:"header-anchor",attrs:{href:"#steps-to-enable-electrumx-server-in-btcpay"}},[e._v("#")]),e._v(" Steps to enable ElectrumX Server in BTCPay:")]),e._v(" "),t("p",[e._v("Here are all the steps to "),t("strong",[e._v("enable ElectrumX Server in your BTCPay node")]),e._v(' (read carefully as you may need to adjust for your specific setup, especially if you use other custom or conflicting "fragments" (pruning, less-memory etc. To reiterate, you should NOT proceed further here if you run a pruned BTCPay node.')]),e._v(" "),t("ol",[t("li",[t("p",[e._v("ElectrumX Server is accessible for Electrum Wallets via TCP port 50002. You need to open this port up fully at least to be available within your own network to any PC or Android device running Electrum Wallet, and turn on port forwarding (you can also port forward 50002 from your Internet/WAN, to enable other Electrum Wallet users from the Internet to query your server).")])]),e._v(" "),t("li",[t("p",[e._v("Enable the Docker Additional Fragment on your BTCPay node by running the following commands (this is assuming a brand new BTCPay installation with LND and ElectrumX, please tweak accordingly using the "),t("RouterLink",{attrs:{to:"/Docker/#generated-docker-compose"}},[e._v("relevant documentation")]),e._v(":")],1)]),e._v(" "),t("li",[t("p",[e._v("Follow the "),t("a",{attrs:{href:"https://github.com/btcpayserver/btcpayserver-docker#full-installation-for-technical-users",target:"_blank",rel:"noopener noreferrer"}},[e._v("normal setup and install of BTCPay Server"),t("OutboundLink")],1),e._v(", then after this command "),t("code",[e._v("cd btcpayserver-docker")]),e._v(", follow the below instructions instead of those in the link. If you already have a BTCPay Server running, then just follow from the next step.")])]),e._v(" "),t("li",[t("p",[e._v("Set your environment variables:")])])]),e._v(" "),t("div",{staticClass:"language-bash extra-class"},[t("pre",{pre:!0,attrs:{class:"language-bash"}},[t("code",[t("span",{pre:!0,attrs:{class:"token builtin class-name"}},[e._v("export")]),e._v(" "),t("span",{pre:!0,attrs:{class:"token assign-left variable"}},[e._v("BTCPAY_HOST")]),t("span",{pre:!0,attrs:{class:"token operator"}},[e._v("=")]),t("span",{pre:!0,attrs:{class:"token string"}},[e._v('"YOURHOST.com"')]),e._v("\n"),t("span",{pre:!0,attrs:{class:"token builtin class-name"}},[e._v("export")]),e._v(" "),t("span",{pre:!0,attrs:{class:"token assign-left variable"}},[e._v("NBITCOIN_NETWORK")]),t("span",{pre:!0,attrs:{class:"token operator"}},[e._v("=")]),t("span",{pre:!0,attrs:{class:"token string"}},[e._v('"mainnet"')]),e._v("\n"),t("span",{pre:!0,attrs:{class:"token builtin class-name"}},[e._v("export")]),e._v(" "),t("span",{pre:!0,attrs:{class:"token assign-left variable"}},[e._v("BTCPAYGEN_CRYPTO1")]),t("span",{pre:!0,attrs:{class:"token operator"}},[e._v("=")]),t("span",{pre:!0,attrs:{class:"token string"}},[e._v('"btc"')]),e._v("\n"),t("span",{pre:!0,attrs:{class:"token builtin class-name"}},[e._v("export")]),e._v(" "),t("span",{pre:!0,attrs:{class:"token assign-left variable"}},[e._v("BTCPAYGEN_REVERSEPROXY")]),t("span",{pre:!0,attrs:{class:"token operator"}},[e._v("=")]),t("span",{pre:!0,attrs:{class:"token string"}},[e._v('"nginx"')]),e._v("\n"),t("span",{pre:!0,attrs:{class:"token builtin class-name"}},[e._v("export")]),e._v(" "),t("span",{pre:!0,attrs:{class:"token assign-left variable"}},[e._v("BTCPAYGEN_LIGHTNING")]),t("span",{pre:!0,attrs:{class:"token operator"}},[e._v("=")]),t("span",{pre:!0,attrs:{class:"token string"}},[e._v('"lnd"')]),e._v("\n"),t("span",{pre:!0,attrs:{class:"token builtin class-name"}},[e._v("export")]),e._v(" "),t("span",{pre:!0,attrs:{class:"token assign-left variable"}},[e._v("LIGHTNING_ALIAS")]),t("span",{pre:!0,attrs:{class:"token operator"}},[e._v("=")]),t("span",{pre:!0,attrs:{class:"token string"}},[e._v('"MY_LN"')]),e._v("\n"),t("span",{pre:!0,attrs:{class:"token builtin class-name"}},[e._v("export")]),e._v(" "),t("span",{pre:!0,attrs:{class:"token assign-left variable"}},[e._v("LETSENCRYPT_EMAIL")]),t("span",{pre:!0,attrs:{class:"token operator"}},[e._v("=")]),t("span",{pre:!0,attrs:{class:"token string"}},[e._v('"you@example.com"')]),e._v("\n"),t("span",{pre:!0,attrs:{class:"token builtin class-name"}},[e._v("export")]),e._v(" "),t("span",{pre:!0,attrs:{class:"token assign-left variable"}},[e._v("BTCPAYGEN_ADDITIONAL_FRAGMENTS")]),t("span",{pre:!0,attrs:{class:"token operator"}},[e._v("=")]),t("span",{pre:!0,attrs:{class:"token string"}},[e._v('"opt-add-electrumx;opt-more-memory"')]),e._v("\n")])])]),t("p",[e._v("You can run all of that as one command after you tweak it to your needs. The main part for our purposes in this guide of course is "),t("code",[e._v('BTCPAYGEN_ADDITIONAL_FRAGMENTS="opt-add-electrumx"')]),e._v(". Note: "),t("code",[e._v("opt-more-memory")]),e._v(" can be removed if you like, but I really recommend it if your system has more than 1GB of RAM/memory that you can assign to BTCPay server, it will speed synching your node and the general performance of ElectrumX up drastically.")]),e._v(" "),t("ol",{attrs:{start:"5"}},[t("li",[t("p",[e._v("Set up or reconfigure BTCPay Server with ElectrumX:")]),e._v(" "),t("p",[t("code",[e._v("cd ~/BTCPayServer/btcpayserver-docker && . ./btcpay-setup.sh -i")])]),e._v(" "),t("p",[e._v('This will setup (or re-setup) your server with everything needed including ElectrumX, and it all should "just work". But, it will trigger at least a couple of hours of syncing the '),t("code",[e._v("txindex")]),e._v(", and if it is a new server, could be a couple of days depending on your hardware.")])]),e._v(" "),t("li",[t("p",[e._v("WAIT for your node to fully sync:\nYou can check the status of bitcoin core sync by going to your domain for BTCPay server, and it will show you on the front page. Or, you can check from the command line as well, using these commands:")]),e._v(" "),t("p",[t("code",[e._v("docker logs btcpayserver_bitcoind")]),e._v(" - this will show you the bitcoin core blockchain sync status (and ALL other info about your node, including any errors)")]),e._v(" "),t("p",[t("code",[e._v("docker logs generated_electrumx_1")]),e._v(" - this will show you the ElectrumX sync status. Note: ElectrumX will NOT start syncing until bitcoin full node has finished syncing, you will see errors until that is finished and these can be ignored.")])])]),e._v(" "),t("p",[e._v("Once all syncing for both bitcoin and ElectrumX has finished you can proceed to the next step. (Note: Electrum wallets will not connect to an Electrum server that has not finished synching)")]),e._v(" "),t("h2",{attrs:{id:"section-22-connect-your-electrum-wallet-desktop-or-android-to-your-electrumx-server"}},[t("a",{staticClass:"header-anchor",attrs:{href:"#section-22-connect-your-electrum-wallet-desktop-or-android-to-your-electrumx-server"}},[e._v("#")]),e._v(" Section 2.2 Connect your Electrum Wallet (Desktop or Android) to your ElectrumX Server")]),e._v(" "),t("h3",{attrs:{id:"connect-to-electrumx-from-electrum-wallet-on-your-macpclinux-machine"}},[t("a",{staticClass:"header-anchor",attrs:{href:"#connect-to-electrumx-from-electrum-wallet-on-your-macpclinux-machine"}},[e._v("#")]),e._v(" Connect to ElectrumX from Electrum Wallet on your Mac/PC/Linux Machine:")]),e._v(" "),t("p",[e._v('Read all of this first before proceeding. You may wish to do just the "Protip" below instead of the manual steps in the Electrum Wallet GUI.')]),e._v(" "),t("p",[e._v("Open Electrum Wallet. When you click the traffic light at the bottom of your Electrum Wallet:")]),e._v(" "),t("figure",[t("img",{attrs:{src:"https://user-images.githubusercontent.com/1388507/68437133-5636c500-01c0-11ea-822c-6e72bd6d60ea.png",alt:"ElectrumWalletMainScreenLight",title:"ElectrumWalletMainScreenLight"}})]),e._v(" "),t("p",[e._v("You will see this screen with a list of all the available Electrum servers that your wallet can connect to, normally with "),t("code",[e._v("Select Server Automatically")]),e._v(" already checked:")]),e._v(" "),t("figure",[t("img",{attrs:{src:"https://user-images.githubusercontent.com/1388507/68437521-8a5eb580-01c1-11ea-9ece-0666353a6742.png",alt:"ElectrumWalletServerList",title:"ElectrumWalletServerList"}})]),e._v(" "),t("p",[e._v("Now is the time to UNCHECK that "),t("code",[e._v("Select Server Automatically")]),e._v(" setting, which will enable you to enter the IP address or domain or hostname of your ElectrumX Server. In the case below, the ElectrumX server is on the local network at "),t("code",[e._v("192.168.1.3")]),e._v(" so we enter that manually (leave port as 50002) and press "),t("code",[e._v("close")]),e._v(".")]),e._v(" "),t("figure",[t("img",{attrs:{src:"https://user-images.githubusercontent.com/1388507/68496320-4e276580-0252-11ea-8caf-facc8a246d70.png",alt:"EnterElectrumXServerIP",title:"EnterElectrumXServerIP"}})]),e._v(" "),t("p",[e._v("If all of the above worked well, and your node is healthy, you will get a green traffic light down the bottom right of the wallet interface as pictured here - that means success!:")]),e._v(" "),t("figure",[t("img",{attrs:{src:"https://user-images.githubusercontent.com/1388507/68437133-5636c500-01c0-11ea-822c-6e72bd6d60ea.png",alt:"ElectrumWalletMainScreenLight",title:"ElectrumWalletMainScreenLight"}})]),e._v(" "),t("h4",{attrs:{id:"protip-optionally-perform-the-above-steps-directly-in-electrum-wallet-config-file-before-even-opening-the-wallet-gui"}},[t("a",{staticClass:"header-anchor",attrs:{href:"#protip-optionally-perform-the-above-steps-directly-in-electrum-wallet-config-file-before-even-opening-the-wallet-gui"}},[e._v("#")]),e._v(" Protip - optionally perform the above steps directly in Electrum Wallet config file before even opening the wallet GUI:")]),e._v(" "),t("p",[e._v("If you prefer to avoid connecting to other servers from the outset when you open Electrum Wallet, do the following before you open Electrum Wallet GUI.")]),e._v(" "),t("p",[e._v("In the Electrum Wallet folder ("),t("a",{attrs:{href:"https://electrum.readthedocs.io/en/latest/faq.html#where-is-my-wallet-file-located",target:"_blank",rel:"noopener noreferrer"}},[e._v("see here"),t("OutboundLink")],1),e._v(" if you don't know where that is), open and edit the "),t("code",[e._v("config")]),e._v(" file like this:")]),e._v(" "),t("ol",[t("li",[t("p",[e._v("Find line: "),t("code",[e._v('"auto_connect": true,')]),e._v(" and switch it to: "),t("code",[e._v('"auto_connect": false,')]),e._v(" - this will prevent your Electrum Wallet from auto-connecting to other 3rd party Electrum Servers at launch time (to obtain block headers and transaction information).")])]),e._v(" "),t("li",[t("p",[e._v("Find line: "),t("code",[e._v('"oneserver": false,')]),e._v(" and switch it to: "),t("code",[e._v('"oneserver": true,')]),e._v(" - ensures that all data is obtained from just one server.")])]),e._v(" "),t("li",[t("p",[e._v("Find or add line: "),t("code",[e._v('"server": "SOMEIPADDRESS:50002:s",')]),e._v("and switch it to your own ElectrumX Server's IP address, in the example above this would be: "),t("code",[e._v('"server": "192.168.1.3:50002:s",')]),e._v("- hard code your IP address as the default upon opening the Wallet.")])])]),e._v(" "),t("p",[e._v("These 3 steps optional but recommended for full privacy by locking down Electrum Wallet to one single connection with your private server ("),t("a",{attrs:{href:"https://github.com/chris-belcher/electrum-personal-server#how-to",target:"_blank",rel:"noopener noreferrer"}},[e._v("Reference"),t("OutboundLink")],1),e._v(").")]),e._v(" "),t("h3",{attrs:{id:"reflection-on-what-has-been-achieved"}},[t("a",{staticClass:"header-anchor",attrs:{href:"#reflection-on-what-has-been-achieved"}},[e._v("#")]),e._v(" Reflection on what has been achieved:")]),e._v(" "),t("p",[e._v("You are now running your very "),t("strong",[e._v("own private ElectrumX Server")]),e._v(". All Electrum Wallet related data transfer happens directly between your ElectrumX Server and the bitcoin blockchain, without going over any other 3rd party servers. You have attained full bitcoin transaction privacy (at least from the perspective of your blockchain queries and transactions, payment/receive addresses etc - nobody except you and the blockchain can see what you are doing).")]),e._v(" "),t("h3",{attrs:{id:"troubleshooting"}},[t("a",{staticClass:"header-anchor",attrs:{href:"#troubleshooting"}},[e._v("#")]),e._v(" Troubleshooting:")]),e._v(" "),t("p",[e._v("So there is one thing you may encounter, where even after you did everything correctly, you still get a red traffic light (which means not connected to any server) in the steps above. Any other troubleshooting tips that people encounter can be added, I would suggest to make a PR to this document directly.")]),e._v(" "),t("ul",[t("li",[e._v("If you get a red traffic light, shutdown Electrum Wallet completely, then go to your Electrum Wallet folder ("),t("a",{attrs:{href:"https://electrum.readthedocs.io/en/latest/faq.html#where-is-my-wallet-file-located",target:"_blank",rel:"noopener noreferrer"}},[e._v("see here"),t("OutboundLink")],1),e._v(" if you don't know where that is).")])]),e._v(" "),t("p",[e._v("Inside the Electrum Wallet folder (in this case below, it is what it looks like on a Mac) locate the "),t("code",[e._v("certs")]),e._v(" directory and delete the certificate for the server you are trying to connect to, in this case "),t("code",[e._v("192.168.1.3")]),e._v(", by dragging it to the Trash.")]),e._v(" "),t("figure",[t("img",{attrs:{src:"https://user-images.githubusercontent.com/1388507/68497330-9a73a500-0254-11ea-9349-71bdb3bd9511.png",alt:"Certs",title:"Certs"}})]),e._v(" "),t("p",[e._v("Start up Electrum Wallet again, and connect to your ElectrumX server. If it is fully synched, it will now likely show a green traffic light, and you are good to go.")])])}),[],!1,null,null,null);t.default=o.exports}}]); \ No newline at end of file diff --git a/assets/js/143.bb365e29.js b/assets/js/143.3eef0d65.js similarity index 99% rename from assets/js/143.bb365e29.js rename to assets/js/143.3eef0d65.js index a55ff40420..cfc75593a4 100644 --- a/assets/js/143.bb365e29.js +++ b/assets/js/143.3eef0d65.js @@ -1 +1 @@ -(window.webpackJsonp=window.webpackJsonp||[]).push([[143],{796:function(t,a,e){"use strict";e.r(a);var o=e(10),n=Object(o.a)({},(function(){var t=this,a=t._self._c;return a("ContentSlotsDistributor",{attrs:{"slot-key":t.$parent.slotKey}},[a("h1",{attrs:{id:"altcoins-faq"}},[a("a",{staticClass:"header-anchor",attrs:{href:"#altcoins-faq"}},[t._v("#")]),t._v(" Altcoins FAQ")]),t._v(" "),a("p",[t._v("This page answers some of the common questions about alternative cryptocurrencies - altcoins.")]),t._v(" "),a("p"),a("div",{staticClass:"table-of-contents"},[a("ul",[a("li",[a("a",{attrs:{href:"#which-coins-does-btcpay-server-support"}},[t._v("Which coins does BTCPay Server support?")])]),a("li",[a("a",{attrs:{href:"#can-an-xyz-coin-be-added-in-btcpay"}},[t._v("Can an XYZ coin be added in BTCPay?")])]),a("li",[a("a",{attrs:{href:"#how-to-add-an-altcoin-in-btcpay"}},[t._v("How to add an altcoin in BTCPay?")])]),a("li",[a("a",{attrs:{href:"#how-to-add-an-altcoin-to-an-existing-btcpay-deployment"}},[t._v("How to add an altcoin to an existing BTCPay deployment?")])]),a("li",[a("a",{attrs:{href:"#how-to-remove-a-coin-from-btcpay"}},[t._v("How to remove a coin from BTCPay?")])])])]),a("p"),t._v(" "),a("h2",{attrs:{id:"which-coins-does-btcpay-server-support"}},[a("a",{staticClass:"header-anchor",attrs:{href:"#which-coins-does-btcpay-server-support"}},[t._v("#")]),t._v(" Which coins does BTCPay Server support?")]),t._v(" "),a("p",[t._v("Bitcoin is the only focus of the project and its core developers. However, opt in integrations are present for several altcoins:")]),t._v(" "),a("ul",[a("li",[t._v("BGold (BTG) (also known as Bitcoin Gold)")]),t._v(" "),a("li",[t._v("BPlus (XBC) (also known as Bitcoin Plus)")]),t._v(" "),a("li",[t._v("Bitcore (BTX)")]),t._v(" "),a("li",[t._v("Dash (DASH)")]),t._v(" "),a("li",[t._v("Dogecoin (DOGE)")]),t._v(" "),a("li",[t._v("Feathercoin (FTC)")]),t._v(" "),a("li",[t._v("Groestlcoin (GRS)")]),t._v(" "),a("li",[t._v("Htmlcoin (HTML) (also known as Althash)")]),t._v(" "),a("li",[t._v("Liquid Bitcoin (LBTC) (comes with Liquid Tether support USDt) "),a("a",{attrs:{href:"https://github.com/btcpayserver/btcpayserver/issues/1282",target:"_blank",rel:"noopener noreferrer"}},[t._v("(notes on deployment & usage)"),a("OutboundLink")],1)]),t._v(" "),a("li",[t._v("Litecoin (LTC)")]),t._v(" "),a("li",[t._v("Monacoin (MONA)")]),t._v(" "),a("li",[t._v("Monero (XMR) "),a("a",{attrs:{href:"https://sethforprivacy.com/guides/accepting-monero-via-btcpay-server/",target:"_blank",rel:"noopener noreferrer"}},[t._v("(guide on deployment and usage)"),a("OutboundLink")],1)]),t._v(" "),a("li",[t._v("Polis (POLIS)")]),t._v(" "),a("li",[t._v("Viacoin (VIA)")])]),t._v(" "),a("p",[t._v("Altcoins are maintained by their respective communities and are listed here only for convenience. For support regarding Altcoin deployment, functionalities or issues, please contact the Altcoin maintainer or community directly.")]),t._v(" "),a("h2",{attrs:{id:"can-an-xyz-coin-be-added-in-btcpay"}},[a("a",{staticClass:"header-anchor",attrs:{href:"#can-an-xyz-coin-be-added-in-btcpay"}},[t._v("#")]),t._v(" Can an XYZ coin be added in BTCPay?")]),t._v(" "),a("p",[t._v("No. BTCPay developers don't add alternative coins on request. Adding a new coin explicitly depends on the community and developers of those coins. Furthermore, BTCPay developers do not spend excessive time testing nor maintaining the altcoins. If you're submitting a PR for a new coin, make sure that it works. If the altcoin integration is not actively maintained it will be removed from BTCPay.")]),t._v(" "),a("h2",{attrs:{id:"how-to-add-an-altcoin-in-btcpay"}},[a("a",{staticClass:"header-anchor",attrs:{href:"#how-to-add-an-altcoin-in-btcpay"}},[t._v("#")]),t._v(" How to add an altcoin in BTCPay?")]),t._v(" "),a("p",[t._v("To add a new coin to BTCPay, please "),a("RouterLink",{attrs:{to:"/Development/Altcoins/#how-can-i-add-an-altcoin-to-btcpayserver"}},[t._v("follow the instructions here")]),t._v(".")],1),t._v(" "),a("h2",{attrs:{id:"how-to-add-an-altcoin-to-an-existing-btcpay-deployment"}},[a("a",{staticClass:"header-anchor",attrs:{href:"#how-to-add-an-altcoin-to-an-existing-btcpay-deployment"}},[t._v("#")]),t._v(" How to add an altcoin to an existing BTCPay deployment?")]),t._v(" "),a("p",[t._v("If you want to expand the number of coins in your existing BTCPay Server installation, make sure that you have enough storage space on your machine.")]),t._v(" "),a("p",[t._v("In this example, we only have Bitcoin, and we're adding Litecoin to our docker deployment.")]),t._v(" "),a("p",[t._v("The coin structure:")]),t._v(" "),a("div",{staticClass:"language- extra-class"},[a("pre",{pre:!0,attrs:{class:"language-text"}},[a("code",[t._v("BTCPAYGEN_CRYPTO1: First supported cryptocurrency (e.g., BTC, LTC. Default: btc)\nBTCPAYGEN_CRYPTO2: Second supported crypto currency (e.g. btc, ltc. Default: (empty))\nBTCPAYGEN_CRYPTON: N'th supported crypto currency where N is 9 at maximum. (eg. btc, ltc. Default: (empty))\n")])])]),a("p",[t._v("To add Litecoin, as your second coin (CRYPTO2) do this :")]),t._v(" "),a("div",{staticClass:"language-bash extra-class"},[a("pre",{pre:!0,attrs:{class:"language-bash"}},[a("code",[a("span",{pre:!0,attrs:{class:"token function"}},[t._v("sudo")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token function"}},[t._v("su")]),t._v(" -\n"),a("span",{pre:!0,attrs:{class:"token builtin class-name"}},[t._v("export")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token assign-left variable"}},[t._v("BTCPAYGEN_CRYPTO2")]),a("span",{pre:!0,attrs:{class:"token operator"}},[t._v("=")]),a("span",{pre:!0,attrs:{class:"token string"}},[t._v('"ltc"')]),t._v("\n"),a("span",{pre:!0,attrs:{class:"token builtin class-name"}},[t._v(".")]),t._v(" ./btcpay-setup.sh "),a("span",{pre:!0,attrs:{class:"token parameter variable"}},[t._v("-i")]),t._v("\n")])])]),a("h2",{attrs:{id:"how-to-remove-a-coin-from-btcpay"}},[a("a",{staticClass:"header-anchor",attrs:{href:"#how-to-remove-a-coin-from-btcpay"}},[t._v("#")]),t._v(" How to remove a coin from BTCPay?")]),t._v(" "),a("p",[t._v("In the "),a("a",{attrs:{href:"#how-to-add-an-altcoin-to-an-existing-btcpay-deployment"}},[t._v("example above")]),t._v(" we've added Litecoin as the second coin. To remove a particular coin, use the following command:")]),t._v(" "),a("div",{staticClass:"language-bash extra-class"},[a("pre",{pre:!0,attrs:{class:"language-bash"}},[a("code",[a("span",{pre:!0,attrs:{class:"token function"}},[t._v("sudo")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token function"}},[t._v("su")]),t._v(" -\n"),a("span",{pre:!0,attrs:{class:"token builtin class-name"}},[t._v("export")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token assign-left variable"}},[t._v("BTCPAYGEN_CRYPTO2")]),a("span",{pre:!0,attrs:{class:"token operator"}},[t._v("=")]),a("span",{pre:!0,attrs:{class:"token string"}},[t._v('""')]),t._v("\n"),a("span",{pre:!0,attrs:{class:"token builtin class-name"}},[t._v(".")]),t._v(" ./btcpay-setup.sh "),a("span",{pre:!0,attrs:{class:"token parameter variable"}},[t._v("-i")]),t._v("\n")])])]),a("p",[t._v("Where CRYPTO"),a("strong",[t._v("2")]),t._v(" should be replaced with a coin number you wish to remove. If you have an XYZ coin as "),a("code",[t._v("BTCPAYGEN_CRYPTO3")]),t._v(", and you want to remove it, you should use CRYPTO"),a("strong",[t._v("3")]),t._v(".")])])}),[],!1,null,null,null);a.default=n.exports}}]); \ No newline at end of file +(window.webpackJsonp=window.webpackJsonp||[]).push([[143],{798:function(t,a,e){"use strict";e.r(a);var o=e(10),n=Object(o.a)({},(function(){var t=this,a=t._self._c;return a("ContentSlotsDistributor",{attrs:{"slot-key":t.$parent.slotKey}},[a("h1",{attrs:{id:"altcoins-faq"}},[a("a",{staticClass:"header-anchor",attrs:{href:"#altcoins-faq"}},[t._v("#")]),t._v(" Altcoins FAQ")]),t._v(" "),a("p",[t._v("This page answers some of the common questions about alternative cryptocurrencies - altcoins.")]),t._v(" "),a("p"),a("div",{staticClass:"table-of-contents"},[a("ul",[a("li",[a("a",{attrs:{href:"#which-coins-does-btcpay-server-support"}},[t._v("Which coins does BTCPay Server support?")])]),a("li",[a("a",{attrs:{href:"#can-an-xyz-coin-be-added-in-btcpay"}},[t._v("Can an XYZ coin be added in BTCPay?")])]),a("li",[a("a",{attrs:{href:"#how-to-add-an-altcoin-in-btcpay"}},[t._v("How to add an altcoin in BTCPay?")])]),a("li",[a("a",{attrs:{href:"#how-to-add-an-altcoin-to-an-existing-btcpay-deployment"}},[t._v("How to add an altcoin to an existing BTCPay deployment?")])]),a("li",[a("a",{attrs:{href:"#how-to-remove-a-coin-from-btcpay"}},[t._v("How to remove a coin from BTCPay?")])])])]),a("p"),t._v(" "),a("h2",{attrs:{id:"which-coins-does-btcpay-server-support"}},[a("a",{staticClass:"header-anchor",attrs:{href:"#which-coins-does-btcpay-server-support"}},[t._v("#")]),t._v(" Which coins does BTCPay Server support?")]),t._v(" "),a("p",[t._v("Bitcoin is the only focus of the project and its core developers. However, opt in integrations are present for several altcoins:")]),t._v(" "),a("ul",[a("li",[t._v("BGold (BTG) (also known as Bitcoin Gold)")]),t._v(" "),a("li",[t._v("BPlus (XBC) (also known as Bitcoin Plus)")]),t._v(" "),a("li",[t._v("Bitcore (BTX)")]),t._v(" "),a("li",[t._v("Dash (DASH)")]),t._v(" "),a("li",[t._v("Dogecoin (DOGE)")]),t._v(" "),a("li",[t._v("Feathercoin (FTC)")]),t._v(" "),a("li",[t._v("Groestlcoin (GRS)")]),t._v(" "),a("li",[t._v("Htmlcoin (HTML) (also known as Althash)")]),t._v(" "),a("li",[t._v("Liquid Bitcoin (LBTC) (comes with Liquid Tether support USDt) "),a("a",{attrs:{href:"https://github.com/btcpayserver/btcpayserver/issues/1282",target:"_blank",rel:"noopener noreferrer"}},[t._v("(notes on deployment & usage)"),a("OutboundLink")],1)]),t._v(" "),a("li",[t._v("Litecoin (LTC)")]),t._v(" "),a("li",[t._v("Monacoin (MONA)")]),t._v(" "),a("li",[t._v("Monero (XMR) "),a("a",{attrs:{href:"https://sethforprivacy.com/guides/accepting-monero-via-btcpay-server/",target:"_blank",rel:"noopener noreferrer"}},[t._v("(guide on deployment and usage)"),a("OutboundLink")],1)]),t._v(" "),a("li",[t._v("Polis (POLIS)")]),t._v(" "),a("li",[t._v("Viacoin (VIA)")])]),t._v(" "),a("p",[t._v("Altcoins are maintained by their respective communities and are listed here only for convenience. For support regarding Altcoin deployment, functionalities or issues, please contact the Altcoin maintainer or community directly.")]),t._v(" "),a("h2",{attrs:{id:"can-an-xyz-coin-be-added-in-btcpay"}},[a("a",{staticClass:"header-anchor",attrs:{href:"#can-an-xyz-coin-be-added-in-btcpay"}},[t._v("#")]),t._v(" Can an XYZ coin be added in BTCPay?")]),t._v(" "),a("p",[t._v("No. BTCPay developers don't add alternative coins on request. Adding a new coin explicitly depends on the community and developers of those coins. Furthermore, BTCPay developers do not spend excessive time testing nor maintaining the altcoins. If you're submitting a PR for a new coin, make sure that it works. If the altcoin integration is not actively maintained it will be removed from BTCPay.")]),t._v(" "),a("h2",{attrs:{id:"how-to-add-an-altcoin-in-btcpay"}},[a("a",{staticClass:"header-anchor",attrs:{href:"#how-to-add-an-altcoin-in-btcpay"}},[t._v("#")]),t._v(" How to add an altcoin in BTCPay?")]),t._v(" "),a("p",[t._v("To add a new coin to BTCPay, please "),a("RouterLink",{attrs:{to:"/Development/Altcoins/#how-can-i-add-an-altcoin-to-btcpayserver"}},[t._v("follow the instructions here")]),t._v(".")],1),t._v(" "),a("h2",{attrs:{id:"how-to-add-an-altcoin-to-an-existing-btcpay-deployment"}},[a("a",{staticClass:"header-anchor",attrs:{href:"#how-to-add-an-altcoin-to-an-existing-btcpay-deployment"}},[t._v("#")]),t._v(" How to add an altcoin to an existing BTCPay deployment?")]),t._v(" "),a("p",[t._v("If you want to expand the number of coins in your existing BTCPay Server installation, make sure that you have enough storage space on your machine.")]),t._v(" "),a("p",[t._v("In this example, we only have Bitcoin, and we're adding Litecoin to our docker deployment.")]),t._v(" "),a("p",[t._v("The coin structure:")]),t._v(" "),a("div",{staticClass:"language- extra-class"},[a("pre",{pre:!0,attrs:{class:"language-text"}},[a("code",[t._v("BTCPAYGEN_CRYPTO1: First supported cryptocurrency (e.g., BTC, LTC. Default: btc)\nBTCPAYGEN_CRYPTO2: Second supported crypto currency (e.g. btc, ltc. Default: (empty))\nBTCPAYGEN_CRYPTON: N'th supported crypto currency where N is 9 at maximum. (eg. btc, ltc. Default: (empty))\n")])])]),a("p",[t._v("To add Litecoin, as your second coin (CRYPTO2) do this :")]),t._v(" "),a("div",{staticClass:"language-bash extra-class"},[a("pre",{pre:!0,attrs:{class:"language-bash"}},[a("code",[a("span",{pre:!0,attrs:{class:"token function"}},[t._v("sudo")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token function"}},[t._v("su")]),t._v(" -\n"),a("span",{pre:!0,attrs:{class:"token builtin class-name"}},[t._v("export")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token assign-left variable"}},[t._v("BTCPAYGEN_CRYPTO2")]),a("span",{pre:!0,attrs:{class:"token operator"}},[t._v("=")]),a("span",{pre:!0,attrs:{class:"token string"}},[t._v('"ltc"')]),t._v("\n"),a("span",{pre:!0,attrs:{class:"token builtin class-name"}},[t._v(".")]),t._v(" ./btcpay-setup.sh "),a("span",{pre:!0,attrs:{class:"token parameter variable"}},[t._v("-i")]),t._v("\n")])])]),a("h2",{attrs:{id:"how-to-remove-a-coin-from-btcpay"}},[a("a",{staticClass:"header-anchor",attrs:{href:"#how-to-remove-a-coin-from-btcpay"}},[t._v("#")]),t._v(" How to remove a coin from BTCPay?")]),t._v(" "),a("p",[t._v("In the "),a("a",{attrs:{href:"#how-to-add-an-altcoin-to-an-existing-btcpay-deployment"}},[t._v("example above")]),t._v(" we've added Litecoin as the second coin. To remove a particular coin, use the following command:")]),t._v(" "),a("div",{staticClass:"language-bash extra-class"},[a("pre",{pre:!0,attrs:{class:"language-bash"}},[a("code",[a("span",{pre:!0,attrs:{class:"token function"}},[t._v("sudo")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token function"}},[t._v("su")]),t._v(" -\n"),a("span",{pre:!0,attrs:{class:"token builtin class-name"}},[t._v("export")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token assign-left variable"}},[t._v("BTCPAYGEN_CRYPTO2")]),a("span",{pre:!0,attrs:{class:"token operator"}},[t._v("=")]),a("span",{pre:!0,attrs:{class:"token string"}},[t._v('""')]),t._v("\n"),a("span",{pre:!0,attrs:{class:"token builtin class-name"}},[t._v(".")]),t._v(" ./btcpay-setup.sh "),a("span",{pre:!0,attrs:{class:"token parameter variable"}},[t._v("-i")]),t._v("\n")])])]),a("p",[t._v("Where CRYPTO"),a("strong",[t._v("2")]),t._v(" should be replaced with a coin number you wish to remove. If you have an XYZ coin as "),a("code",[t._v("BTCPAYGEN_CRYPTO3")]),t._v(", and you want to remove it, you should use CRYPTO"),a("strong",[t._v("3")]),t._v(".")])])}),[],!1,null,null,null);a.default=n.exports}}]); \ No newline at end of file diff --git a/assets/js/146.85a59329.js b/assets/js/146.132fed3f.js similarity index 99% rename from assets/js/146.85a59329.js rename to assets/js/146.132fed3f.js index 918f313650..035de849b6 100644 --- a/assets/js/146.85a59329.js +++ b/assets/js/146.132fed3f.js @@ -1 +1 @@ -(window.webpackJsonp=window.webpackJsonp||[]).push([[146],{809:function(e,t,r){"use strict";r.r(t);var a=r(10),o=Object(a.a)({},(function(){var e=this,t=e._self._c;return t("ContentSlotsDistributor",{attrs:{"slot-key":e.$parent.slotKey}},[t("h1",{attrs:{id:"btcpay-server-accept-bitcoin-payments-in-grandnode"}},[t("a",{staticClass:"header-anchor",attrs:{href:"#btcpay-server-accept-bitcoin-payments-in-grandnode"}},[e._v("#")]),e._v(" BTCPay Server – Accept Bitcoin payments in GrandNode")]),e._v(" "),t("figure",[t("img",{attrs:{src:"https://raw.githubusercontent.com/btcpayserver/grandnode/main/GrandNodeAcceptBitcoin.png",alt:"BTCPay GrandNode Banner",title:"BTCPay GrandNode Banner"}})]),e._v(" "),t("h2",{attrs:{id:"plugin-overview"}},[t("a",{staticClass:"header-anchor",attrs:{href:"#plugin-overview"}},[e._v("#")]),e._v(" Plugin Overview")]),e._v(" "),t("p",[e._v("This plugin allows you to easily start accepting Bitcoin payments in your GrandNode e-commerce store using BTCPay Server — a free, self-hosted and open-source payment gateway.")]),e._v(" "),t("h2",{attrs:{id:"features"}},[t("a",{staticClass:"header-anchor",attrs:{href:"#features"}},[e._v("#")]),e._v(" Features")]),e._v(" "),t("ul",[t("li",[e._v("0% Fees: Enjoy a payment gateway with no fees. Yes, really!")]),e._v(" "),t("li",[e._v("No complicated KYC needed, you're your own self-hosted payment gateway")]),e._v(" "),t("li",[e._v("Automated invoice management and refunds")]),e._v(" "),t("li",[e._v("Simple and customizable checkout UX, available in 30+ languages")]),e._v(" "),t("li",[e._v("Direct payments to your wallet, no intermediary")]),e._v(" "),t("li",[e._v("Reporting and accounting – CSV exports")]),e._v(" "),t("li",[e._v("Real-time exchange price tracking for correct payment amounts")]),e._v(" "),t("li",[e._v("Community-driven support")]),e._v(" "),t("li",[e._v("Extensive documentation and video tutorials")])]),e._v(" "),t("h2",{attrs:{id:"getting-started"}},[t("a",{staticClass:"header-anchor",attrs:{href:"#getting-started"}},[e._v("#")]),e._v(" Getting Started")]),e._v(" "),t("h3",{attrs:{id:"download-and-installation"}},[t("a",{staticClass:"header-anchor",attrs:{href:"#download-and-installation"}},[e._v("#")]),e._v(" Download and installation")]),e._v(" "),t("p",[e._v("The plugins can be downloaded through through "),t("a",{attrs:{href:"https://github.com/btcpayserver/nopcommerce/releases",target:"_blank",rel:"noopener noreferrer"}},[e._v("GitHub"),t("OutboundLink")],1),e._v(" or "),t("a",{attrs:{href:"https://grandnode.com/btcpay-server-accept-bitcoin-payments",target:"_blank",rel:"noopener noreferrer"}},[e._v("GrandNode Extension Marketplace"),t("OutboundLink")],1),e._v(".")]),e._v(" "),t("p",[e._v("For installing the plugin on GrandNode, you can either upload the plugin directly to the "),t("code",[e._v("/plugins")]),e._v(" folder in your GrandNode main directory and restart your application, or use the Admin Panel to upload the plugin.")]),e._v(" "),t("p",[e._v("In the "),t("strong",[e._v("Admin Panel")]),e._v(", navigate to "),t("strong",[e._v("Plugins -> Local Plugins")]),e._v(" and click the "),t("strong",[e._v('"Upload"')]),e._v(' button. Ensure the plugin file is in ZIP for successful upload. After uploading, find the plugin in the list, click "Install" next to it, and enable it if needed​.')]),e._v(" "),t("h2",{attrs:{id:"plugin-configuration"}},[t("a",{staticClass:"header-anchor",attrs:{href:"#plugin-configuration"}},[e._v("#")]),e._v(" Plugin configuration")]),e._v(" "),t("p",[e._v("You can configure the plugin either automatically or manually, depending on your preferences and requirements.")]),e._v(" "),t("h3",{attrs:{id:"automatic-configuration"}},[t("a",{staticClass:"header-anchor",attrs:{href:"#automatic-configuration"}},[e._v("#")]),e._v(" Automatic Configuration")]),e._v(" "),t("ol",[t("li",[e._v('Enter Url to your BTCPay Server into "BTCPay Url" field. (e.g. https://mainnet.demo.btcpayserver.org)')]),e._v(" "),t("li",[e._v('Click on the "Configure automatically" button to be redirected to the API authorization page of your BTCPay Server')]),e._v(" "),t("li",[e._v("On the authorization page: Select the store you want to connect to your GrandNode (you might need to login first)")]),e._v(" "),t("li",[e._v('Click on "Authorize App" button and you will be redirected back to your GrandNode')]),e._v(" "),t("li",[e._v('The "API Key", "BTCPay Store ID" and "Webhook Secret" fields will be automatically filled and a webhook created')]),e._v(" "),t("li",[e._v('Click "Save" button at bottom to persist the configuration. Congrats, the configuration is now complete!')])]),e._v(" "),t("p",[t("em",[e._v("Note: given the architecture of GrandNode, it is possible that malfunctions in redirections may occur. Particularly if https is disabled or incorrectly configured. In this case, please opt for manual configuration.")])]),e._v(" "),t("h3",{attrs:{id:"manual-configuration"}},[t("a",{staticClass:"header-anchor",attrs:{href:"#manual-configuration"}},[e._v("#")]),e._v(" Manual Configuration")]),e._v(" "),t("p",[e._v("Ensure that the following fields are filled out:")]),e._v(" "),t("ul",[t("li",[e._v("BTCPay Url")]),e._v(" "),t("li",[e._v("BTCPay Store ID")]),e._v(" "),t("li",[e._v("API Key")]),e._v(" "),t("li",[e._v("WebHook Secret")])]),e._v(" "),t("h4",{attrs:{id:"btcpay-url"}},[t("a",{staticClass:"header-anchor",attrs:{href:"#btcpay-url"}},[e._v("#")]),e._v(" BTCPay URL")]),e._v(" "),t("p",[e._v("In the BTCPay URL field of your GrandNode, simply input the link to your self-hosted server or the one hosted by a "),t("a",{attrs:{href:"https://directory.btcpayserver.org/filter/hosts",target:"_blank",rel:"noopener noreferrer"}},[e._v("third-party provider"),t("OutboundLink")],1),e._v(". For example; https://mainnet.demo.btcpayserver.org")]),e._v(" "),t("h4",{attrs:{id:"btcpay-store-id"}},[t("a",{staticClass:"header-anchor",attrs:{href:"#btcpay-store-id"}},[e._v("#")]),e._v(" BTCPay Store ID")]),e._v(" "),t("p",[e._v("BTCPay "),t("strong",[e._v("Store ID")]),e._v(" can be obtained from your BTCPay Server, in Store Settings > General > Store ID field. Copy it and paste it over in the "),t("code",[e._v("BTCPay Store ID")]),e._v(" field.")]),e._v(" "),t("h4",{attrs:{id:"generating-the-api-key"}},[t("a",{staticClass:"header-anchor",attrs:{href:"#generating-the-api-key"}},[e._v("#")]),e._v(" Generating the API key")]),e._v(" "),t("ol",[t("li",[e._v("To create the "),t("strong",[e._v("BTCPay API key")]),e._v(", click on the "),t("code",[e._v("Account")]),e._v(" located at the bottom of the sidebar.")]),e._v(" "),t("li",[e._v("Click on the "),t("code",[e._v("Manage Account > API Key")]),e._v(".")]),e._v(" "),t("li",[e._v("Click on the "),t("code",[e._v("Generate API key")]),e._v(" button")]),e._v(" "),t("li",[e._v("Click on the checkboxes and enable the following permissions:")])]),e._v(" "),t("ul",[t("li",[e._v("View invoices")]),e._v(" "),t("li",[e._v("Create an invoice")]),e._v(" "),t("li",[e._v("Modify invoices")]),e._v(" "),t("li",[e._v("Modify selected stores' webhooks")]),e._v(" "),t("li",[e._v("View your stores")]),e._v(" "),t("li",[e._v("Create non-approved pull payments in selected stores (optional)")])]),e._v(" "),t("p",[t("em",[e._v("Note: To use the "),t("RouterLink",{attrs:{to:"/Refund/#refunds"}},[e._v("refund feature")]),e._v(', you must also add the "Create non-approved pull payments" permission. After a refund, an order note is created where you can copy the pull payments link and send to your customer to claim it (this order note is also visible by the customer). The customer can request the refund on that page by filling out refund address.')],1)]),e._v(" "),t("h4",{attrs:{id:"generating-the-webhook"}},[t("a",{staticClass:"header-anchor",attrs:{href:"#generating-the-webhook"}},[e._v("#")]),e._v(" Generating the webhook")]),e._v(" "),t("ol",[t("li",[e._v('In your GrandNode, copy the "Webhook Url" shown on the bottom of the BTCPay plugin configuration screen.')]),e._v(" "),t("li",[e._v("Next, go to your BTCPay Server "),t("code",[e._v("Store Settings > Webhooks")])]),e._v(" "),t("li",[e._v("Click on the "),t("code",[e._v("Create Webhook")]),e._v(" button")]),e._v(" "),t("li",[e._v("Paste the "),t("code",[e._v("Webhook Url")]),e._v(" you copied from GrandNode (step 1) into "),t("code",[e._v("Payload URL")]),e._v(" field")]),e._v(" "),t("li",[e._v('Click on the "Eye" icon next to the '),t("code",[e._v("Secret")]),e._v(" field to reveal the secret key and copy it.")]),e._v(" "),t("li",[e._v("Don't forget to click on the "),t("code",[e._v("Add webhook")]),e._v(" to apply all the changes.")]),e._v(" "),t("li",[e._v("Go back GrandNode and paste the Secret Key into the "),t("code",[e._v("WebHook Secret")]),e._v(" field")]),e._v(" "),t("li",[e._v("Click save to apply all the changes")])]),e._v(" "),t("p",[e._v("Now your BTCPay Server is connected to your GranNode sucessfully.")]),e._v(" "),t("h2",{attrs:{id:"support"}},[t("a",{staticClass:"header-anchor",attrs:{href:"#support"}},[e._v("#")]),e._v(" Support")]),e._v(" "),t("p",[e._v("Feel free to join our support channel over at "),t("a",{attrs:{href:"https://chat.btcpayserver.org/",target:"_blank",rel:"noopener noreferrer"}},[e._v("Mattermost"),t("OutboundLink")],1),e._v(" or "),t("a",{attrs:{href:"https://t.me/btcpayserver",target:"_blank",rel:"noopener noreferrer"}},[e._v("Telegram"),t("OutboundLink")],1),e._v(" if you need help or have any further questions.")]),e._v(" "),t("p",[e._v("If experience a bug please "),t("a",{attrs:{href:"https://github.com/btcpayserver/btcpay-grandnode-plugin/issues",target:"_blank",rel:"noopener noreferrer"}},[e._v("open a bug report"),t("OutboundLink")],1)]),e._v(" "),t("h2",{attrs:{id:"license"}},[t("a",{staticClass:"header-anchor",attrs:{href:"#license"}},[e._v("#")]),e._v(" License")]),e._v(" "),t("p",[e._v("This plugin is released under the "),t("a",{attrs:{href:"https://github.com/btcpayserver/grandnode.git/blob/master/LICENSE",target:"_blank",rel:"noopener noreferrer"}},[e._v("MIT License"),t("OutboundLink")],1),e._v(".")]),e._v(" "),t("p",[e._v("The non-profit "),t("a",{attrs:{href:"https://btcpayserver.org",target:"_blank",rel:"noopener noreferrer"}},[e._v("BTCPay Server Foundation"),t("OutboundLink")],1),e._v(" is committed to keeping this powerful payment plugin free forever. Our mission is to enable anyone to accept bitcoin regardless of financial, technical, social or political barriers.")]),e._v(" "),t("hr")])}),[],!1,null,null,null);t.default=o.exports}}]); \ No newline at end of file +(window.webpackJsonp=window.webpackJsonp||[]).push([[146],{810:function(e,t,r){"use strict";r.r(t);var a=r(10),o=Object(a.a)({},(function(){var e=this,t=e._self._c;return t("ContentSlotsDistributor",{attrs:{"slot-key":e.$parent.slotKey}},[t("h1",{attrs:{id:"btcpay-server-accept-bitcoin-payments-in-grandnode"}},[t("a",{staticClass:"header-anchor",attrs:{href:"#btcpay-server-accept-bitcoin-payments-in-grandnode"}},[e._v("#")]),e._v(" BTCPay Server – Accept Bitcoin payments in GrandNode")]),e._v(" "),t("figure",[t("img",{attrs:{src:"https://raw.githubusercontent.com/btcpayserver/grandnode/main/GrandNodeAcceptBitcoin.png",alt:"BTCPay GrandNode Banner",title:"BTCPay GrandNode Banner"}})]),e._v(" "),t("h2",{attrs:{id:"plugin-overview"}},[t("a",{staticClass:"header-anchor",attrs:{href:"#plugin-overview"}},[e._v("#")]),e._v(" Plugin Overview")]),e._v(" "),t("p",[e._v("This plugin allows you to easily start accepting Bitcoin payments in your GrandNode e-commerce store using BTCPay Server — a free, self-hosted and open-source payment gateway.")]),e._v(" "),t("h2",{attrs:{id:"features"}},[t("a",{staticClass:"header-anchor",attrs:{href:"#features"}},[e._v("#")]),e._v(" Features")]),e._v(" "),t("ul",[t("li",[e._v("0% Fees: Enjoy a payment gateway with no fees. Yes, really!")]),e._v(" "),t("li",[e._v("No complicated KYC needed, you're your own self-hosted payment gateway")]),e._v(" "),t("li",[e._v("Automated invoice management and refunds")]),e._v(" "),t("li",[e._v("Simple and customizable checkout UX, available in 30+ languages")]),e._v(" "),t("li",[e._v("Direct payments to your wallet, no intermediary")]),e._v(" "),t("li",[e._v("Reporting and accounting – CSV exports")]),e._v(" "),t("li",[e._v("Real-time exchange price tracking for correct payment amounts")]),e._v(" "),t("li",[e._v("Community-driven support")]),e._v(" "),t("li",[e._v("Extensive documentation and video tutorials")])]),e._v(" "),t("h2",{attrs:{id:"getting-started"}},[t("a",{staticClass:"header-anchor",attrs:{href:"#getting-started"}},[e._v("#")]),e._v(" Getting Started")]),e._v(" "),t("h3",{attrs:{id:"download-and-installation"}},[t("a",{staticClass:"header-anchor",attrs:{href:"#download-and-installation"}},[e._v("#")]),e._v(" Download and installation")]),e._v(" "),t("p",[e._v("The plugins can be downloaded through through "),t("a",{attrs:{href:"https://github.com/btcpayserver/nopcommerce/releases",target:"_blank",rel:"noopener noreferrer"}},[e._v("GitHub"),t("OutboundLink")],1),e._v(" or "),t("a",{attrs:{href:"https://grandnode.com/btcpay-server-accept-bitcoin-payments",target:"_blank",rel:"noopener noreferrer"}},[e._v("GrandNode Extension Marketplace"),t("OutboundLink")],1),e._v(".")]),e._v(" "),t("p",[e._v("For installing the plugin on GrandNode, you can either upload the plugin directly to the "),t("code",[e._v("/plugins")]),e._v(" folder in your GrandNode main directory and restart your application, or use the Admin Panel to upload the plugin.")]),e._v(" "),t("p",[e._v("In the "),t("strong",[e._v("Admin Panel")]),e._v(", navigate to "),t("strong",[e._v("Plugins -> Local Plugins")]),e._v(" and click the "),t("strong",[e._v('"Upload"')]),e._v(' button. Ensure the plugin file is in ZIP for successful upload. After uploading, find the plugin in the list, click "Install" next to it, and enable it if needed​.')]),e._v(" "),t("h2",{attrs:{id:"plugin-configuration"}},[t("a",{staticClass:"header-anchor",attrs:{href:"#plugin-configuration"}},[e._v("#")]),e._v(" Plugin configuration")]),e._v(" "),t("p",[e._v("You can configure the plugin either automatically or manually, depending on your preferences and requirements.")]),e._v(" "),t("h3",{attrs:{id:"automatic-configuration"}},[t("a",{staticClass:"header-anchor",attrs:{href:"#automatic-configuration"}},[e._v("#")]),e._v(" Automatic Configuration")]),e._v(" "),t("ol",[t("li",[e._v('Enter Url to your BTCPay Server into "BTCPay Url" field. (e.g. https://mainnet.demo.btcpayserver.org)')]),e._v(" "),t("li",[e._v('Click on the "Configure automatically" button to be redirected to the API authorization page of your BTCPay Server')]),e._v(" "),t("li",[e._v("On the authorization page: Select the store you want to connect to your GrandNode (you might need to login first)")]),e._v(" "),t("li",[e._v('Click on "Authorize App" button and you will be redirected back to your GrandNode')]),e._v(" "),t("li",[e._v('The "API Key", "BTCPay Store ID" and "Webhook Secret" fields will be automatically filled and a webhook created')]),e._v(" "),t("li",[e._v('Click "Save" button at bottom to persist the configuration. Congrats, the configuration is now complete!')])]),e._v(" "),t("p",[t("em",[e._v("Note: given the architecture of GrandNode, it is possible that malfunctions in redirections may occur. Particularly if https is disabled or incorrectly configured. In this case, please opt for manual configuration.")])]),e._v(" "),t("h3",{attrs:{id:"manual-configuration"}},[t("a",{staticClass:"header-anchor",attrs:{href:"#manual-configuration"}},[e._v("#")]),e._v(" Manual Configuration")]),e._v(" "),t("p",[e._v("Ensure that the following fields are filled out:")]),e._v(" "),t("ul",[t("li",[e._v("BTCPay Url")]),e._v(" "),t("li",[e._v("BTCPay Store ID")]),e._v(" "),t("li",[e._v("API Key")]),e._v(" "),t("li",[e._v("WebHook Secret")])]),e._v(" "),t("h4",{attrs:{id:"btcpay-url"}},[t("a",{staticClass:"header-anchor",attrs:{href:"#btcpay-url"}},[e._v("#")]),e._v(" BTCPay URL")]),e._v(" "),t("p",[e._v("In the BTCPay URL field of your GrandNode, simply input the link to your self-hosted server or the one hosted by a "),t("a",{attrs:{href:"https://directory.btcpayserver.org/filter/hosts",target:"_blank",rel:"noopener noreferrer"}},[e._v("third-party provider"),t("OutboundLink")],1),e._v(". For example; https://mainnet.demo.btcpayserver.org")]),e._v(" "),t("h4",{attrs:{id:"btcpay-store-id"}},[t("a",{staticClass:"header-anchor",attrs:{href:"#btcpay-store-id"}},[e._v("#")]),e._v(" BTCPay Store ID")]),e._v(" "),t("p",[e._v("BTCPay "),t("strong",[e._v("Store ID")]),e._v(" can be obtained from your BTCPay Server, in Store Settings > General > Store ID field. Copy it and paste it over in the "),t("code",[e._v("BTCPay Store ID")]),e._v(" field.")]),e._v(" "),t("h4",{attrs:{id:"generating-the-api-key"}},[t("a",{staticClass:"header-anchor",attrs:{href:"#generating-the-api-key"}},[e._v("#")]),e._v(" Generating the API key")]),e._v(" "),t("ol",[t("li",[e._v("To create the "),t("strong",[e._v("BTCPay API key")]),e._v(", click on the "),t("code",[e._v("Account")]),e._v(" located at the bottom of the sidebar.")]),e._v(" "),t("li",[e._v("Click on the "),t("code",[e._v("Manage Account > API Key")]),e._v(".")]),e._v(" "),t("li",[e._v("Click on the "),t("code",[e._v("Generate API key")]),e._v(" button")]),e._v(" "),t("li",[e._v("Click on the checkboxes and enable the following permissions:")])]),e._v(" "),t("ul",[t("li",[e._v("View invoices")]),e._v(" "),t("li",[e._v("Create an invoice")]),e._v(" "),t("li",[e._v("Modify invoices")]),e._v(" "),t("li",[e._v("Modify selected stores' webhooks")]),e._v(" "),t("li",[e._v("View your stores")]),e._v(" "),t("li",[e._v("Create non-approved pull payments in selected stores (optional)")])]),e._v(" "),t("p",[t("em",[e._v("Note: To use the "),t("RouterLink",{attrs:{to:"/Refund/#refunds"}},[e._v("refund feature")]),e._v(', you must also add the "Create non-approved pull payments" permission. After a refund, an order note is created where you can copy the pull payments link and send to your customer to claim it (this order note is also visible by the customer). The customer can request the refund on that page by filling out refund address.')],1)]),e._v(" "),t("h4",{attrs:{id:"generating-the-webhook"}},[t("a",{staticClass:"header-anchor",attrs:{href:"#generating-the-webhook"}},[e._v("#")]),e._v(" Generating the webhook")]),e._v(" "),t("ol",[t("li",[e._v('In your GrandNode, copy the "Webhook Url" shown on the bottom of the BTCPay plugin configuration screen.')]),e._v(" "),t("li",[e._v("Next, go to your BTCPay Server "),t("code",[e._v("Store Settings > Webhooks")])]),e._v(" "),t("li",[e._v("Click on the "),t("code",[e._v("Create Webhook")]),e._v(" button")]),e._v(" "),t("li",[e._v("Paste the "),t("code",[e._v("Webhook Url")]),e._v(" you copied from GrandNode (step 1) into "),t("code",[e._v("Payload URL")]),e._v(" field")]),e._v(" "),t("li",[e._v('Click on the "Eye" icon next to the '),t("code",[e._v("Secret")]),e._v(" field to reveal the secret key and copy it.")]),e._v(" "),t("li",[e._v("Don't forget to click on the "),t("code",[e._v("Add webhook")]),e._v(" to apply all the changes.")]),e._v(" "),t("li",[e._v("Go back GrandNode and paste the Secret Key into the "),t("code",[e._v("WebHook Secret")]),e._v(" field")]),e._v(" "),t("li",[e._v("Click save to apply all the changes")])]),e._v(" "),t("p",[e._v("Now your BTCPay Server is connected to your GranNode sucessfully.")]),e._v(" "),t("h2",{attrs:{id:"support"}},[t("a",{staticClass:"header-anchor",attrs:{href:"#support"}},[e._v("#")]),e._v(" Support")]),e._v(" "),t("p",[e._v("Feel free to join our support channel over at "),t("a",{attrs:{href:"https://chat.btcpayserver.org/",target:"_blank",rel:"noopener noreferrer"}},[e._v("Mattermost"),t("OutboundLink")],1),e._v(" or "),t("a",{attrs:{href:"https://t.me/btcpayserver",target:"_blank",rel:"noopener noreferrer"}},[e._v("Telegram"),t("OutboundLink")],1),e._v(" if you need help or have any further questions.")]),e._v(" "),t("p",[e._v("If experience a bug please "),t("a",{attrs:{href:"https://github.com/btcpayserver/btcpay-grandnode-plugin/issues",target:"_blank",rel:"noopener noreferrer"}},[e._v("open a bug report"),t("OutboundLink")],1)]),e._v(" "),t("h2",{attrs:{id:"license"}},[t("a",{staticClass:"header-anchor",attrs:{href:"#license"}},[e._v("#")]),e._v(" License")]),e._v(" "),t("p",[e._v("This plugin is released under the "),t("a",{attrs:{href:"https://github.com/btcpayserver/grandnode.git/blob/master/LICENSE",target:"_blank",rel:"noopener noreferrer"}},[e._v("MIT License"),t("OutboundLink")],1),e._v(".")]),e._v(" "),t("p",[e._v("The non-profit "),t("a",{attrs:{href:"https://btcpayserver.org",target:"_blank",rel:"noopener noreferrer"}},[e._v("BTCPay Server Foundation"),t("OutboundLink")],1),e._v(" is committed to keeping this powerful payment plugin free forever. Our mission is to enable anyone to accept bitcoin regardless of financial, technical, social or political barriers.")]),e._v(" "),t("hr")])}),[],!1,null,null,null);t.default=o.exports}}]); \ No newline at end of file diff --git a/assets/js/147.9992b702.js b/assets/js/147.db8217fe.js similarity index 98% rename from assets/js/147.9992b702.js rename to assets/js/147.db8217fe.js index 8a0168c988..4bde4b207d 100644 --- a/assets/js/147.9992b702.js +++ b/assets/js/147.db8217fe.js @@ -1 +1 @@ -(window.webpackJsonp=window.webpackJsonp||[]).push([[147],{817:function(e,n,t){"use strict";t.r(n);var i=t(10),o=Object(i.a)({},(function(){var e=this,n=e._self._c;return n("ContentSlotsDistributor",{attrs:{"slot-key":e.$parent.slotKey}},[n("h1",{attrs:{id:"opening-and-operating-payment-channels"}},[n("a",{staticClass:"header-anchor",attrs:{href:"#opening-and-operating-payment-channels"}},[e._v("#")]),e._v(" Opening and operating payment channels")]),e._v(" "),n("p",[e._v("Given that the Lightning Network is a relatively new technology under active development, getting your freshly deployed node ready to send and receive payments, still, requires a couple of steps.")]),e._v(" "),n("p",[e._v("Overview:")]),e._v(" "),n("ol",[n("li",[e._v("The lightning node is deployed, enabled and its on-chain wallet is funded")]),e._v(" "),n("li",[e._v("A peer is identified and the first payment channel is opened")]),e._v(" "),n("li",[e._v("Inbound and outbound liquidity is acquired. The node is now able to "),n("strong",[e._v("send")]),e._v(" and "),n("strong",[e._v("receive")])]),e._v(" "),n("li",[e._v("Liquidity management, an ongoing process to maintain the capacity to "),n("strong",[e._v("send")]),e._v(" and "),n("strong",[e._v("receive")])])]),e._v(" "),n("p",[e._v("Key considerations:")]),e._v(" "),n("ul",[n("li",[n("strong",[e._v("Choosing")]),e._v(" the channel partner. Consider opening the first channel to a well connected peer with robust uptime. This will increase the chances for your payments to be routed and settled.")]),e._v(" "),n("li",[n("strong",[e._v("Inbound")]),e._v(" vs "),n("strong",[e._v("outbound")]),e._v(" capacity. Outbound capacity allows nodes to "),n("strong",[e._v("send")]),e._v(" payments whereas inbound capacity allows nodes to "),n("strong",[e._v("receive")]),e._v(" payments. As a merchant using lightning, having inbound capacity is essential for customers to be able to pay you.")]),e._v(" "),n("li",[n("strong",[e._v("Inbound capacity")]),e._v(". A node adds inbound capacity by either spending sats from its local balance or having other nodes in the network open channels to it.")]),e._v(" "),n("li",[n("strong",[e._v("Liquidity management")]),e._v(": maintaining the ability to send and receive is a continous process where a balance between inbound vs outbound capacity has to be maintained across payment channels. This capacity distribution must be adjusted depending upon the use case of the node operator.")]),e._v(" "),n("li",[n("strong",[e._v("Lightning Service Providers")]),e._v(": LSPs offer paid third-party services that improve the ease of operating a lightning network node. Such services can be used to acquire inbound capacity or to automate the rebalancing process.")])]),e._v(" "),n("p",[e._v("Below a set of good resources for a deeper dive into topics such as:")]),e._v(" "),n("ul",[n("li",[n("a",{attrs:{href:"https://docs.lightning.engineering/the-lightning-network/the-gossip-network/identify-good-peers",target:"_blank",rel:"noopener noreferrer"}},[e._v("Good peers on the LN"),n("OutboundLink")],1)]),e._v(" "),n("li",[n("a",{attrs:{href:"https://bitcoin.design/guide/how-it-works/nodes/#lightning-nodes",target:"_blank",rel:"noopener noreferrer"}},[e._v("Lightning node types"),n("OutboundLink")],1)]),e._v(" "),n("li",[n("a",{attrs:{href:"https://bitcoin.design/guide/how-it-works/liquidity/",target:"_blank",rel:"noopener noreferrer"}},[e._v("What is Lightning liquidity?"),n("OutboundLink")],1)]),e._v(" "),n("li",[n("a",{attrs:{href:"https://lightningnetwork.plus/posts/234",target:"_blank",rel:"noopener noreferrer"}},[e._v("How to get inbound capacity?"),n("OutboundLink")],1)]),e._v(" "),n("li",[n("a",{attrs:{href:"https://docs.lightning.engineering/the-lightning-network/liquidity/manage-liquidity#rebalancing-channels",target:"_blank",rel:"noopener noreferrer"}},[e._v("How to manage liquidity?"),n("OutboundLink")],1)]),e._v(" "),n("li",[n("a",{attrs:{href:"https://bitcoin.design/guide/how-it-works/lightning-services/",target:"_blank",rel:"noopener noreferrer"}},[e._v("Lightning service providers (LSP)"),n("OutboundLink")],1)])])])}),[],!1,null,null,null);n.default=o.exports}}]); \ No newline at end of file +(window.webpackJsonp=window.webpackJsonp||[]).push([[147],{816:function(e,n,t){"use strict";t.r(n);var i=t(10),o=Object(i.a)({},(function(){var e=this,n=e._self._c;return n("ContentSlotsDistributor",{attrs:{"slot-key":e.$parent.slotKey}},[n("h1",{attrs:{id:"opening-and-operating-payment-channels"}},[n("a",{staticClass:"header-anchor",attrs:{href:"#opening-and-operating-payment-channels"}},[e._v("#")]),e._v(" Opening and operating payment channels")]),e._v(" "),n("p",[e._v("Given that the Lightning Network is a relatively new technology under active development, getting your freshly deployed node ready to send and receive payments, still, requires a couple of steps.")]),e._v(" "),n("p",[e._v("Overview:")]),e._v(" "),n("ol",[n("li",[e._v("The lightning node is deployed, enabled and its on-chain wallet is funded")]),e._v(" "),n("li",[e._v("A peer is identified and the first payment channel is opened")]),e._v(" "),n("li",[e._v("Inbound and outbound liquidity is acquired. The node is now able to "),n("strong",[e._v("send")]),e._v(" and "),n("strong",[e._v("receive")])]),e._v(" "),n("li",[e._v("Liquidity management, an ongoing process to maintain the capacity to "),n("strong",[e._v("send")]),e._v(" and "),n("strong",[e._v("receive")])])]),e._v(" "),n("p",[e._v("Key considerations:")]),e._v(" "),n("ul",[n("li",[n("strong",[e._v("Choosing")]),e._v(" the channel partner. Consider opening the first channel to a well connected peer with robust uptime. This will increase the chances for your payments to be routed and settled.")]),e._v(" "),n("li",[n("strong",[e._v("Inbound")]),e._v(" vs "),n("strong",[e._v("outbound")]),e._v(" capacity. Outbound capacity allows nodes to "),n("strong",[e._v("send")]),e._v(" payments whereas inbound capacity allows nodes to "),n("strong",[e._v("receive")]),e._v(" payments. As a merchant using lightning, having inbound capacity is essential for customers to be able to pay you.")]),e._v(" "),n("li",[n("strong",[e._v("Inbound capacity")]),e._v(". A node adds inbound capacity by either spending sats from its local balance or having other nodes in the network open channels to it.")]),e._v(" "),n("li",[n("strong",[e._v("Liquidity management")]),e._v(": maintaining the ability to send and receive is a continous process where a balance between inbound vs outbound capacity has to be maintained across payment channels. This capacity distribution must be adjusted depending upon the use case of the node operator.")]),e._v(" "),n("li",[n("strong",[e._v("Lightning Service Providers")]),e._v(": LSPs offer paid third-party services that improve the ease of operating a lightning network node. Such services can be used to acquire inbound capacity or to automate the rebalancing process.")])]),e._v(" "),n("p",[e._v("Below a set of good resources for a deeper dive into topics such as:")]),e._v(" "),n("ul",[n("li",[n("a",{attrs:{href:"https://docs.lightning.engineering/the-lightning-network/the-gossip-network/identify-good-peers",target:"_blank",rel:"noopener noreferrer"}},[e._v("Good peers on the LN"),n("OutboundLink")],1)]),e._v(" "),n("li",[n("a",{attrs:{href:"https://bitcoin.design/guide/how-it-works/nodes/#lightning-nodes",target:"_blank",rel:"noopener noreferrer"}},[e._v("Lightning node types"),n("OutboundLink")],1)]),e._v(" "),n("li",[n("a",{attrs:{href:"https://bitcoin.design/guide/how-it-works/liquidity/",target:"_blank",rel:"noopener noreferrer"}},[e._v("What is Lightning liquidity?"),n("OutboundLink")],1)]),e._v(" "),n("li",[n("a",{attrs:{href:"https://lightningnetwork.plus/posts/234",target:"_blank",rel:"noopener noreferrer"}},[e._v("How to get inbound capacity?"),n("OutboundLink")],1)]),e._v(" "),n("li",[n("a",{attrs:{href:"https://docs.lightning.engineering/the-lightning-network/liquidity/manage-liquidity#rebalancing-channels",target:"_blank",rel:"noopener noreferrer"}},[e._v("How to manage liquidity?"),n("OutboundLink")],1)]),e._v(" "),n("li",[n("a",{attrs:{href:"https://bitcoin.design/guide/how-it-works/lightning-services/",target:"_blank",rel:"noopener noreferrer"}},[e._v("Lightning service providers (LSP)"),n("OutboundLink")],1)])])])}),[],!1,null,null,null);n.default=o.exports}}]); \ No newline at end of file diff --git a/assets/js/148.f1aeeb8a.js b/assets/js/148.6311d87b.js similarity index 96% rename from assets/js/148.f1aeeb8a.js rename to assets/js/148.6311d87b.js index dacd3fbd74..9b7a232e49 100644 --- a/assets/js/148.f1aeeb8a.js +++ b/assets/js/148.6311d87b.js @@ -1 +1 @@ -(window.webpackJsonp=window.webpackJsonp||[]).push([[148],{818:function(e,t,r){"use strict";r.r(t);var a=r(10),n=Object(a.a)({},(function(){var e=this,t=e._self._c;return t("ContentSlotsDistributor",{attrs:{"slot-key":e.$parent.slotKey}},[t("h1",{attrs:{id:"btcpay-magento-integration"}},[t("a",{staticClass:"header-anchor",attrs:{href:"#btcpay-magento-integration"}},[e._v("#")]),e._v(" BTCPay Magento Integration")]),e._v(" "),t("p",[e._v("If you're using "),t("strong",[e._v("Magento")]),e._v(", an open-source e-commerce platform written in PHP, you can "),t("strong",[e._v("integrate BTCPay Server and use it as a payment processor")]),e._v(".")]),e._v(" "),t("h2",{attrs:{id:"magento-1"}},[t("a",{staticClass:"header-anchor",attrs:{href:"#magento-1"}},[e._v("#")]),e._v(" Magento 1")]),e._v(" "),t("ol",[t("li",[e._v("Download "),t("a",{attrs:{href:"https://github.com/btcpayserver/magento-plugin",target:"_blank",rel:"noopener noreferrer"}},[e._v("BTCPay Magento Plugin"),t("OutboundLink")],1)]),e._v(" "),t("li",[e._v("Follow the "),t("a",{attrs:{href:"https://github.com/btcpayserver/magento-plugin/blob/master/GUIDE.md",target:"_blank",rel:"noopener noreferrer"}},[e._v("quick-start guide here"),t("OutboundLink")],1)])]),e._v(" "),t("h2",{attrs:{id:"magento-2"}},[t("a",{staticClass:"header-anchor",attrs:{href:"#magento-2"}},[e._v("#")]),e._v(" Magento 2")]),e._v(" "),t("p",[e._v("We recommend using the "),t("strong",[e._v("Magento 2 module")]),e._v(" developed by "),t("a",{attrs:{href:"https://www.storefront.be",target:"_blank",rel:"noopener noreferrer"}},[e._v("Storefront.be"),t("OutboundLink")],1),e._v(", since it is the most feature-complete and robust. Storefront is also committed to maintaining the module as newer Magento versions are released.")]),e._v(" "),t("p",[e._v("The Magento 2 module is available for free at "),t("a",{attrs:{href:"https://github.com/btcpayserver/magento2-plugin",target:"_blank",rel:"noopener noreferrer"}},[e._v("our Github repository"),t("OutboundLink")],1)])])}),[],!1,null,null,null);t.default=n.exports}}]); \ No newline at end of file +(window.webpackJsonp=window.webpackJsonp||[]).push([[148],{819:function(e,t,r){"use strict";r.r(t);var a=r(10),n=Object(a.a)({},(function(){var e=this,t=e._self._c;return t("ContentSlotsDistributor",{attrs:{"slot-key":e.$parent.slotKey}},[t("h1",{attrs:{id:"btcpay-magento-integration"}},[t("a",{staticClass:"header-anchor",attrs:{href:"#btcpay-magento-integration"}},[e._v("#")]),e._v(" BTCPay Magento Integration")]),e._v(" "),t("p",[e._v("If you're using "),t("strong",[e._v("Magento")]),e._v(", an open-source e-commerce platform written in PHP, you can "),t("strong",[e._v("integrate BTCPay Server and use it as a payment processor")]),e._v(".")]),e._v(" "),t("h2",{attrs:{id:"magento-1"}},[t("a",{staticClass:"header-anchor",attrs:{href:"#magento-1"}},[e._v("#")]),e._v(" Magento 1")]),e._v(" "),t("ol",[t("li",[e._v("Download "),t("a",{attrs:{href:"https://github.com/btcpayserver/magento-plugin",target:"_blank",rel:"noopener noreferrer"}},[e._v("BTCPay Magento Plugin"),t("OutboundLink")],1)]),e._v(" "),t("li",[e._v("Follow the "),t("a",{attrs:{href:"https://github.com/btcpayserver/magento-plugin/blob/master/GUIDE.md",target:"_blank",rel:"noopener noreferrer"}},[e._v("quick-start guide here"),t("OutboundLink")],1)])]),e._v(" "),t("h2",{attrs:{id:"magento-2"}},[t("a",{staticClass:"header-anchor",attrs:{href:"#magento-2"}},[e._v("#")]),e._v(" Magento 2")]),e._v(" "),t("p",[e._v("We recommend using the "),t("strong",[e._v("Magento 2 module")]),e._v(" developed by "),t("a",{attrs:{href:"https://www.storefront.be",target:"_blank",rel:"noopener noreferrer"}},[e._v("Storefront.be"),t("OutboundLink")],1),e._v(", since it is the most feature-complete and robust. Storefront is also committed to maintaining the module as newer Magento versions are released.")]),e._v(" "),t("p",[e._v("The Magento 2 module is available for free at "),t("a",{attrs:{href:"https://github.com/btcpayserver/magento2-plugin",target:"_blank",rel:"noopener noreferrer"}},[e._v("our Github repository"),t("OutboundLink")],1)])])}),[],!1,null,null,null);t.default=n.exports}}]); \ No newline at end of file diff --git a/assets/js/149.d11440da.js b/assets/js/149.cbc2b002.js similarity index 99% rename from assets/js/149.d11440da.js rename to assets/js/149.cbc2b002.js index f2a43ff747..5e3aeb08fb 100644 --- a/assets/js/149.d11440da.js +++ b/assets/js/149.cbc2b002.js @@ -1 +1 @@ -(window.webpackJsonp=window.webpackJsonp||[]).push([[149],{819:function(t,a,s){"use strict";s.r(a);var e=s(10),n=Object(e.a)({},(function(){var t=this,a=t._self._c;return a("ContentSlotsDistributor",{attrs:{"slot-key":t.$parent.slotKey}},[a("h1",{attrs:{id:"api-specification"}},[a("a",{staticClass:"header-anchor",attrs:{href:"#api-specification"}},[t._v("#")]),t._v(" API Specification")]),t._v(" "),a("p",[t._v("NBXplorer is a multi crypto currency lightweight block explorer.")]),t._v(" "),a("p",[t._v("NBXplorer does not index the whole blockchain, rather, it listens transactions and blocks from a trusted full node and index only addresses and transactions which belongs to a "),a("code",[t._v("DerivationScheme")]),t._v(" that you decide to track.")]),t._v(" "),a("h2",{attrs:{id:"table-of-content"}},[a("a",{staticClass:"header-anchor",attrs:{href:"#table-of-content"}},[t._v("#")]),t._v(" Table of content")]),t._v(" "),a("ul",[a("li",[a("a",{attrs:{href:"#configuration"}},[t._v("Configuration")])]),t._v(" "),a("li",[a("a",{attrs:{href:"#tracked-sources"}},[t._v("Tracked Sources")]),t._v(" "),a("ul",[a("li",[a("a",{attrs:{href:"#derivationScheme"}},[t._v("Derivation schemes")])]),t._v(" "),a("li",[a("a",{attrs:{href:"#groups"}},[t._v("Groups")])]),t._v(" "),a("li",[a("a",{attrs:{href:"#addresses"}},[t._v("Addresses")])])])]),t._v(" "),a("li",[a("a",{attrs:{href:"#authentication"}},[t._v("Authentication")])]),t._v(" "),a("li",[a("a",{attrs:{href:"#track"}},[t._v("Tracking derivation scheme or address")])]),t._v(" "),a("li",[a("a",{attrs:{href:"#transactions"}},[t._v("Query transactions of tracked sources")])]),t._v(" "),a("li",[a("a",{attrs:{href:"#singletransaction"}},[t._v("Query specifc transactions of tracked sources")])]),t._v(" "),a("li",[a("a",{attrs:{href:"#balance"}},[t._v("Get balance of tracked sources")])]),t._v(" "),a("li",[a("a",{attrs:{href:"#gettransaction"}},[t._v("Get a transaction")])]),t._v(" "),a("li",[a("a",{attrs:{href:"#status"}},[t._v("Get connection status to the chain")])]),t._v(" "),a("li",[a("a",{attrs:{href:"#unused"}},[t._v("Get a new unused address")])]),t._v(" "),a("li",[a("a",{attrs:{href:"#scriptPubKey"}},[t._v("Get scriptPubKey information of a Derivation Scheme")])]),t._v(" "),a("li",[a("a",{attrs:{href:"#utxos"}},[t._v("Get available Unspent Transaction Outputs (UTXOs) of tracked sources")])]),t._v(" "),a("li",[a("a",{attrs:{href:"#websocket"}},[t._v("Notifications via websocket")])]),t._v(" "),a("li",[a("a",{attrs:{href:"#broadcast"}},[t._v("Broadcast a transaction")])]),t._v(" "),a("li",[a("a",{attrs:{href:"#rescan"}},[t._v("Rescan a transaction")])]),t._v(" "),a("li",[a("a",{attrs:{href:"#feerate"}},[t._v("Get fee rate")])]),t._v(" "),a("li",[a("a",{attrs:{href:"#scanUtxoSet"}},[t._v("Scan UTXO Set")])]),t._v(" "),a("li",[a("a",{attrs:{href:"#wipe"}},[t._v("Wipe derivation scheme transactions")])]),t._v(" "),a("li",[a("a",{attrs:{href:"#eventStream"}},[t._v("Query event stream")])]),t._v(" "),a("li",[a("a",{attrs:{href:"#eventStreamLatest"}},[t._v("Query event stream from most recent")])]),t._v(" "),a("li",[a("a",{attrs:{href:"#psbt"}},[t._v("Create Partially Signed Bitcoin Transaction")])]),t._v(" "),a("li",[a("a",{attrs:{href:"#updatepsbt"}},[t._v("Update Partially Signed Bitcoin Transaction")])]),t._v(" "),a("li",[a("a",{attrs:{href:"#metadata"}},[t._v("Attach metadata to a derivation scheme")])]),t._v(" "),a("li",[a("a",{attrs:{href:"#detachmetadata"}},[t._v("Detach metadata from a derivation scheme")])]),t._v(" "),a("li",[a("a",{attrs:{href:"#getmetadata"}},[t._v("Retrieve metadata from a derivation scheme")])]),t._v(" "),a("li",[a("a",{attrs:{href:"#pruning"}},[t._v("Manual pruning")])]),t._v(" "),a("li",[a("a",{attrs:{href:"#wallet"}},[t._v("Generate a wallet")])]),t._v(" "),a("li",[a("a",{attrs:{href:"#rpc-proxy"}},[t._v("Node RPC Proxy")])]),t._v(" "),a("li",[a("a",{attrs:{href:"#health"}},[t._v("Health check")])]),t._v(" "),a("li",[a("a",{attrs:{href:"#liquid"}},[t._v("Liquid integration")])]),t._v(" "),a("li",[a("a",{attrs:{href:"#create-group"}},[t._v("Create group")])]),t._v(" "),a("li",[a("a",{attrs:{href:"#get-group"}},[t._v("Get group")])]),t._v(" "),a("li",[a("a",{attrs:{href:"#add-group-children"}},[t._v("Add group children")])]),t._v(" "),a("li",[a("a",{attrs:{href:"#delete-group-children"}},[t._v("Add address to group")])])]),t._v(" "),a("h2",{attrs:{id:"configuration"}},[a("a",{staticClass:"header-anchor",attrs:{href:"#configuration"}},[t._v("#")]),t._v(" Configuration")]),t._v(" "),a("p",[t._v("You can check the available settings with "),a("code",[t._v("--help")]),t._v(".")]),t._v(" "),a("p",[t._v("NBXplorer can be configured in three way:")]),t._v(" "),a("ul",[a("li",[t._v("Through command line arguments (eg. "),a("code",[t._v("--chains btc")]),t._v(")")]),t._v(" "),a("li",[t._v("Through environment variables (eg. "),a("code",[t._v("NBXPLORER_CHAINS=btc")]),t._v(")")]),t._v(" "),a("li",[t._v("Through configuration file (eg. "),a("code",[t._v("chains=btc")]),t._v(")")])]),t._v(" "),a("p",[t._v("If you use configuration file, you can find it on windows in:")]),t._v(" "),a("div",{staticClass:"language-pwsh extra-class"},[a("pre",{pre:!0,attrs:{class:"language-text"}},[a("code",[t._v("C:\\Users\\\\AppData\\Roaming\\NBXplorer\\\\settings.config\n")])])]),a("p",[t._v("On linux or mac:")]),t._v(" "),a("div",{staticClass:"language-bash extra-class"},[a("pre",{pre:!0,attrs:{class:"language-bash"}},[a("code",[t._v("~/.nbxplorer/"),a("span",{pre:!0,attrs:{class:"token operator"}},[t._v("<")]),t._v("network"),a("span",{pre:!0,attrs:{class:"token operator"}},[t._v(">")]),t._v("/settings.config\n")])])]),a("p",[t._v("Be careful, if you run NBXplorer with "),a("code",[t._v("dotnet run")]),t._v(", you should do it this way, with settings after the "),a("code",[t._v("--")]),t._v(":")]),t._v(" "),a("div",{staticClass:"language-bash extra-class"},[a("pre",{pre:!0,attrs:{class:"language-bash"}},[a("code",[t._v("dotnet run --no-launch-profile --no-build "),a("span",{pre:!0,attrs:{class:"token parameter variable"}},[t._v("-c")]),t._v(" Release "),a("span",{pre:!0,attrs:{class:"token parameter variable"}},[t._v("-p")]),t._v(" ."),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("\\")]),t._v("NBXplorer"),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("\\")]),t._v("NBXplorer.csproj -- "),a("span",{pre:!0,attrs:{class:"token parameter variable"}},[t._v("--chains")]),t._v(" btc\n")])])]),a("p",[t._v("Else, launch profiles, which are settings meant to be used only for debugging time, might be taken into account.")]),t._v(" "),a("h2",{attrs:{id:"tracked-sources"}},[a("a",{staticClass:"header-anchor",attrs:{href:"#tracked-sources"}},[t._v("#")]),t._v(" "),a("a",{attrs:{name:"tracked-source"}}),t._v("Tracked Sources")]),t._v(" "),a("p",[t._v("A tracked source is a generic way to track a set of scripts (addresses) and its UTXOs, transactions, and balances.")]),t._v(" "),a("h3",{attrs:{id:"derivation-scheme"}},[a("a",{staticClass:"header-anchor",attrs:{href:"#derivation-scheme"}},[t._v("#")]),t._v(" "),a("a",{attrs:{name:"derivationScheme"}}),t._v("Derivation scheme")]),t._v(" "),a("p",[t._v("A derivation scheme, also called "),a("code",[t._v("derivationStrategy")]),t._v(" in the code, is a flexible way to define how to generate deterministic addresses for a wallet.\nNBXplorer will track any addresses on the "),a("code",[t._v("0/x")]),t._v(", "),a("code",[t._v("1/x")]),t._v(" and "),a("code",[t._v("x")]),t._v(" path.")]),t._v(" "),a("p",[t._v("Here a documentation of the different derivation scheme supported:")]),t._v(" "),a("table",[a("thead",[a("tr",[a("th",[t._v("Address type")]),t._v(" "),a("th",[t._v("Format")])])]),t._v(" "),a("tbody",[a("tr",[a("td",[t._v("P2WPKH")]),t._v(" "),a("td",[t._v("xpub1")])]),t._v(" "),a("tr",[a("td",[t._v("P2SH-P2WPKH")]),t._v(" "),a("td",[t._v("xpub1-[p2sh]")])]),t._v(" "),a("tr",[a("td",[t._v("P2PKH")]),t._v(" "),a("td",[t._v("xpub-[legacy]")])]),t._v(" "),a("tr",[a("td",[t._v("Multi-sig P2WSH")]),t._v(" "),a("td",[t._v("2-of-xpub1-xpub2")])]),t._v(" "),a("tr",[a("td",[t._v("Multi-sig P2SH-P2WSH")]),t._v(" "),a("td",[t._v("2-of-xpub1-xpub2-[p2sh]")])]),t._v(" "),a("tr",[a("td",[t._v("Multi-sig P2SH")]),t._v(" "),a("td",[t._v("2-of-xpub1-xpub2-[legacy]")])]),t._v(" "),a("tr",[a("td",[t._v("P2TR")]),t._v(" "),a("td",[t._v("xpub1-[taproot]")])])])]),t._v(" "),a("p",[t._v("For multisig, the public keys are ordered before generating the address by default for privacy reason, use "),a("code",[t._v("-[keeporder]")]),t._v(" to disable it.")]),t._v(" "),a("p",[t._v("You can use more than one options at same time, example: "),a("code",[t._v("2-of-xpub1-xpub2-[legacy]-[keeporder]")])]),t._v(" "),a("p",[t._v("Most of routes asks for a "),a("code",[t._v("cryptoCode")]),t._v(". This identify the crypto currency to request data from. (eg. "),a("code",[t._v("BTC")]),t._v(", "),a("code",[t._v("LTC")]),t._v("...)")]),t._v(" "),a("p",[t._v("Note: Taproot is incompatible with all other options.")]),t._v(" "),a("p",[t._v("You can create one by calling "),a("a",{attrs:{href:"#track"}},[t._v("Tracking derivation scheme or address")]),t._v(".")]),t._v(" "),a("h3",{attrs:{id:"groups"}},[a("a",{staticClass:"header-anchor",attrs:{href:"#groups"}},[t._v("#")]),t._v(" "),a("a",{attrs:{name:"groups"}}),t._v("Groups")]),t._v(" "),a("p",[t._v("A group is a tracked source which serves as a logical method for grouping several tracked sources into a single entity. You can add or remove tracked sources to and from a group.")]),t._v(" "),a("p",[t._v("Additionally, specific addresses can be tracked through the group.")]),t._v(" "),a("p",[t._v("Every address attached by a child tracked source will be added to the group, including all related UTXOs and transactions.")]),t._v(" "),a("p",[t._v("A group can have any number of children, and a group can also be a child of another group.\nPlease note that all the children are returned by "),a("a",{attrs:{href:"#get-group"}},[t._v("Get a group")]),t._v(". As such, it is advised not to add too many children to avoid slowing down this call.")]),t._v(" "),a("p",[t._v("A group tracked source's format is "),a("code",[t._v("GROUP:groupid")]),t._v(".")]),t._v(" "),a("p",[t._v("You can create a new group by calling "),a("a",{attrs:{href:"#create-group"}},[t._v("Create a group")]),t._v(".")]),t._v(" "),a("h3",{attrs:{id:"addresses"}},[a("a",{staticClass:"header-anchor",attrs:{href:"#addresses"}},[t._v("#")]),t._v(" "),a("a",{attrs:{name:"addresses"}}),t._v("Addresses")]),t._v(" "),a("p",[t._v("This refers to a tracked source that monitors a single address. It functions similarly to a group, but with only one specific address to it.")]),t._v(" "),a("p",[t._v("The address tracked source's format is "),a("code",[t._v("ADDRESS:bc1...")]),t._v(".")]),t._v(" "),a("p",[t._v("You can create one by calling "),a("a",{attrs:{href:"#track"}},[t._v("Tracking derivation scheme or address")]),t._v(".")]),t._v(" "),a("h2",{attrs:{id:"authentication"}},[a("a",{staticClass:"header-anchor",attrs:{href:"#authentication"}},[t._v("#")]),t._v(" Authentication")]),t._v(" "),a("p",[t._v("By default a cookie file is generated when NBXplorer is starting, for windows in:")]),t._v(" "),a("div",{staticClass:"language-pwsh extra-class"},[a("pre",{pre:!0,attrs:{class:"language-text"}},[a("code",[t._v("C:\\Users\\\\AppData\\Roaming\\NBXplorer\\\\.cookie\n")])])]),a("p",[t._v("On linux or mac:")]),t._v(" "),a("div",{staticClass:"language-bash extra-class"},[a("pre",{pre:!0,attrs:{class:"language-bash"}},[a("code",[t._v("~/.nbxplorer/"),a("span",{pre:!0,attrs:{class:"token operator"}},[t._v("<")]),t._v("network"),a("span",{pre:!0,attrs:{class:"token operator"}},[t._v(">")]),t._v("/.cookie\n")])])]),a("p",[t._v("The content of this cookie must be used is used as HTTP BASIC authentication to use the API.")]),t._v(" "),a("p",[t._v("This can be disabled with "),a("code",[t._v("--noauth")]),t._v(".")]),t._v(" "),a("p",[t._v("Also, NBXPlorer listen by default on "),a("code",[t._v("127.0.0.1")]),t._v(", if you want to access it from another machine, run "),a("code",[t._v('--bind "0.0.0.0"')]),t._v(".")]),t._v(" "),a("h2",{attrs:{id:"tracking-derivation-scheme-or-address"}},[a("a",{staticClass:"header-anchor",attrs:{href:"#tracking-derivation-scheme-or-address"}},[t._v("#")]),t._v(" "),a("a",{attrs:{name:"track"}}),t._v("Tracking derivation scheme or address")]),t._v(" "),a("p",[t._v("This call add a derivation scheme tracked source, or a address tracked source.")]),t._v(" "),a("p",[a("code",[t._v("HTTP POST v1/cryptos/{cryptoCode}/derivations/{derivationScheme}")]),t._v(" "),a("code",[t._v("HTTP POST v1/cryptos/{cryptoCode}/addresses/{address}")])]),t._v(" "),a("p",[t._v("Returns nothing.")]),t._v(" "),a("p",[t._v("Optionally, you can attach a json body:")]),t._v(" "),a("div",{staticClass:"language-json extra-class"},[a("pre",{pre:!0,attrs:{class:"language-json"}},[a("code",[t._v(" "),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("{")]),t._v("\n "),a("span",{pre:!0,attrs:{class:"token property"}},[t._v('"derivationOptions"')]),a("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("[")]),t._v("\n "),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("{")]),t._v("\n "),a("span",{pre:!0,attrs:{class:"token property"}},[t._v('"feature"')]),a("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token string"}},[t._v('"Deposit"')]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v("\n "),a("span",{pre:!0,attrs:{class:"token property"}},[t._v('"minAddresses"')]),a("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token number"}},[t._v("30")]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v("\n "),a("span",{pre:!0,attrs:{class:"token property"}},[t._v('"maxAddresses"')]),a("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token null keyword"}},[t._v("null")]),t._v("\n "),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("}")]),t._v("\n "),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("]")]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v("\n "),a("span",{pre:!0,attrs:{class:"token property"}},[t._v('"wait"')]),a("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token boolean"}},[t._v("true")]),t._v("\n"),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("}")]),t._v("\n")])])]),a("ul",[a("li",[a("code",[t._v("wait")]),t._v(": Optional. If "),a("code",[t._v("true")]),t._v(" the call will return when all addresses has been generated, addresses will be generated in the background (default: "),a("code",[t._v("false")]),t._v(")")]),t._v(" "),a("li",[a("code",[t._v("derivationOptions")]),t._v(": Optional. Options to manually start the address generation process. (default: empty)")]),t._v(" "),a("li",[a("code",[t._v("derivationOptions.feature")]),t._v(": Optional. Define to which feature this option should be used. (defaut: null, which match all feature)")]),t._v(" "),a("li",[a("code",[t._v("derivationOptions.minAddresses")]),t._v(": Optional. The minimum addresses that need to be generated with this call. (default: null, make sure the number of address in the pool is between MinGap and MaxGap)")]),t._v(" "),a("li",[a("code",[t._v("derivationOptions.maxAddresses")]),t._v(": Optional. The maximum addresses that need to be generated with this call. (default: null, make sure the number of address in the pool is between MinGap and MaxGap)")])]),t._v(" "),a("h2",{attrs:{id:"query-transactions-of-tracked-sources"}},[a("a",{staticClass:"header-anchor",attrs:{href:"#query-transactions-of-tracked-sources"}},[t._v("#")]),t._v(" "),a("a",{attrs:{name:"transactions"}}),t._v("Query transactions of tracked sources")]),t._v(" "),a("p",[t._v("To query all transactions of a tracked source:")]),t._v(" "),a("p",[a("code",[t._v("HTTP GET v1/cryptos/{cryptoCode}/derivations/{derivationScheme}/transactions")]),t._v(" "),a("code",[t._v("HTTP GET v1/cryptos/{cryptoCode}/addresses/{address}/transactions")]),t._v(" "),a("code",[t._v("HTTP GET v1/cryptos/{cryptoCode}/groups/{groupId}/transactions")])]),t._v(" "),a("p",[t._v("Optional Parameters:")]),t._v(" "),a("ul",[a("li",[a("code",[t._v("includeTransaction")]),t._v(" includes the hex of the transaction, not only information (default: true)")])]),t._v(" "),a("p",[t._v("Returns:")]),t._v(" "),a("div",{staticClass:"language-json extra-class"},[a("pre",{pre:!0,attrs:{class:"language-json"}},[a("code",[a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("{")]),t._v("\n "),a("span",{pre:!0,attrs:{class:"token property"}},[t._v('"height"')]),a("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token number"}},[t._v("104")]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v("\n "),a("span",{pre:!0,attrs:{class:"token property"}},[t._v('"confirmedTransactions"')]),a("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("{")]),t._v("\n "),a("span",{pre:!0,attrs:{class:"token property"}},[t._v('"transactions"')]),a("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("[")]),t._v("\n "),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("{")]),t._v("\n "),a("span",{pre:!0,attrs:{class:"token property"}},[t._v('"blockHash"')]),a("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token string"}},[t._v('"3e7bcca309f92ab78a47c1cdd1166de9190fa49e97165c93e2b10ae1a14b99eb"')]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v("\n "),a("span",{pre:!0,attrs:{class:"token property"}},[t._v('"confirmations"')]),a("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token number"}},[t._v("1")]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v("\n "),a("span",{pre:!0,attrs:{class:"token property"}},[t._v('"height"')]),a("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token number"}},[t._v("104")]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v("\n "),a("span",{pre:!0,attrs:{class:"token property"}},[t._v('"transactionId"')]),a("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token string"}},[t._v('"cc33dfaf2ed794b11af83dc6e29303e2d8ff9e5e29303153dad1a1d3d8b43e40"')]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v("\n "),a("span",{pre:!0,attrs:{class:"token property"}},[t._v('"transaction"')]),a("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token string"}},[t._v('"020000000166d6befa387fd646f77a10e4b0f0e66b3569f18a83f77104a0c440e4156f80890000000048473044022064b1398653171440d3e79924cb6593633e7b2c3d80b60a2e21d6c6e287ee785a02203899009df443d0a0a1b06cb970aee0158d35166fd3e26d4e3e85570738e706d101feffffff028c02102401000000160014ee0a1889783da2e1f9bba47be4184b6610efd00400e1f5050000000016001452f88af314ef3b6d03d40a5fd1f2c906188a477567000000"')]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v("\n "),a("span",{pre:!0,attrs:{class:"token property"}},[t._v('"outputs"')]),a("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("[")]),t._v("\n "),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("{")]),t._v("\n "),a("span",{pre:!0,attrs:{class:"token property"}},[t._v('"keyPath"')]),a("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token string"}},[t._v('"0/0"')]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v("\n "),a("span",{pre:!0,attrs:{class:"token property"}},[t._v('"scriptPubKey"')]),a("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token string"}},[t._v('"001452f88af314ef3b6d03d40a5fd1f2c906188a4775"')]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v("\n "),a("span",{pre:!0,attrs:{class:"token property"}},[t._v('"index"')]),a("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token number"}},[t._v("1")]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v("\n "),a("span",{pre:!0,attrs:{class:"token property"}},[t._v('"value"')]),a("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token number"}},[t._v("100000000")]),t._v("\n "),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("}")]),t._v("\n "),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("]")]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v("\n "),a("span",{pre:!0,attrs:{class:"token property"}},[t._v('"inputs"')]),a("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("[")]),t._v("\n "),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("{")]),t._v("\n "),a("span",{pre:!0,attrs:{class:"token property"}},[t._v('"inputIndex"')]),a("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token number"}},[t._v("0")]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v("\n "),a("span",{pre:!0,attrs:{class:"token property"}},[t._v('"transactionId"')]),a("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token string"}},[t._v('"194d6dc4e1c4c983b5235ad2b82cc7c48c36def4960fdcf37697253c9d9854a2"')]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v("\n "),a("span",{pre:!0,attrs:{class:"token property"}},[t._v('"scriptPubKey"')]),a("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token string"}},[t._v('"001409249118830af97a029217f3a8744973c5a4a02e"')]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v("\n "),a("span",{pre:!0,attrs:{class:"token property"}},[t._v('"index"')]),a("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token number"}},[t._v("4")]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v("\n "),a("span",{pre:!0,attrs:{class:"token property"}},[t._v('"value"')]),a("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token number"}},[t._v("90000000")]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v("\n "),a("span",{pre:!0,attrs:{class:"token property"}},[t._v('"address"')]),a("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token string"}},[t._v('"bcrt1qpyjfzxyrptuh5q5jzle6sazfw0z6fgpwuz2rye"')]),t._v("\n "),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("}")]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v("\n "),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("{")]),t._v("\n "),a("span",{pre:!0,attrs:{class:"token property"}},[t._v('"inputIndex"')]),a("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token number"}},[t._v("1")]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v("\n "),a("span",{pre:!0,attrs:{class:"token property"}},[t._v('"transactionId"')]),a("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token string"}},[t._v('"194d6dc4e1c4c983b5235ad2b82cc7c48c36def4960fdcf37697253c9d9854a2"')]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v("\n "),a("span",{pre:!0,attrs:{class:"token property"}},[t._v('"scriptPubKey"')]),a("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token string"}},[t._v('"0014d83837bd474d799ad4decba4bac561a7356e0371"')]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v("\n "),a("span",{pre:!0,attrs:{class:"token property"}},[t._v('"index"')]),a("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token number"}},[t._v("1")]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v("\n "),a("span",{pre:!0,attrs:{class:"token property"}},[t._v('"value"')]),a("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token number"}},[t._v("50000000")]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v("\n "),a("span",{pre:!0,attrs:{class:"token property"}},[t._v('"address"')]),a("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token string"}},[t._v('"bcrt1qmqur0028f4ue44x7ewjt43tp5u6kuqm3eqa3ua"')]),t._v("\n "),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("}")]),t._v("\n "),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("]")]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v("\n "),a("span",{pre:!0,attrs:{class:"token property"}},[t._v('"timestamp"')]),a("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token number"}},[t._v("1540381888")]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v("\n "),a("span",{pre:!0,attrs:{class:"token property"}},[t._v('"balanceChange"')]),a("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token number"}},[t._v("100000000")]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v("\n "),a("span",{pre:!0,attrs:{class:"token property"}},[t._v('"replaceable"')]),a("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token boolean"}},[t._v("false")]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v("\n "),a("span",{pre:!0,attrs:{class:"token property"}},[t._v('"replacing"')]),a("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token null keyword"}},[t._v("null")]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v("\n "),a("span",{pre:!0,attrs:{class:"token property"}},[t._v('"replacedBy"')]),a("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token null keyword"}},[t._v("null")]),t._v("\n "),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("}")]),t._v("\n "),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("]")]),t._v("\n "),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("}")]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v("\n "),a("span",{pre:!0,attrs:{class:"token property"}},[t._v('"unconfirmedTransactions"')]),a("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("{")]),t._v("\n "),a("span",{pre:!0,attrs:{class:"token property"}},[t._v('"transactions"')]),a("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("[")]),t._v("\n "),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("{")]),t._v("\n "),a("span",{pre:!0,attrs:{class:"token property"}},[t._v('"blockHash"')]),a("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token null keyword"}},[t._v("null")]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v("\n "),a("span",{pre:!0,attrs:{class:"token property"}},[t._v('"confirmations"')]),a("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token number"}},[t._v("0")]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v("\n "),a("span",{pre:!0,attrs:{class:"token property"}},[t._v('"height"')]),a("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token null keyword"}},[t._v("null")]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v("\n "),a("span",{pre:!0,attrs:{class:"token property"}},[t._v('"transactionId"')]),a("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token string"}},[t._v('"7ec0bcbd3b7685b6bbdb4287a250b64bfcb799dbbbcffa78c00e6cc11185e5f1"')]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v("\n "),a("span",{pre:!0,attrs:{class:"token property"}},[t._v('"transaction"')]),a("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token null keyword"}},[t._v("null")]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v("\n "),a("span",{pre:!0,attrs:{class:"token property"}},[t._v('"outputs"')]),a("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("[")]),t._v("\n "),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("{")]),t._v("\n "),a("span",{pre:!0,attrs:{class:"token property"}},[t._v('"keyPath"')]),a("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token string"}},[t._v('"0"')]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v("\n "),a("span",{pre:!0,attrs:{class:"token property"}},[t._v('"scriptPubKey"')]),a("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token string"}},[t._v('"0014b39fc4eb5c6dd238d39449b70a2e30d575426d99"')]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v("\n "),a("span",{pre:!0,attrs:{class:"token property"}},[t._v('"index"')]),a("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token number"}},[t._v("1")]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v("\n "),a("span",{pre:!0,attrs:{class:"token property"}},[t._v('"value"')]),a("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token number"}},[t._v("100000000")]),t._v("\n "),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("}")]),t._v("\n "),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("]")]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v("\n "),a("span",{pre:!0,attrs:{class:"token property"}},[t._v('"inputs"')]),a("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("[")]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("]")]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v("\n "),a("span",{pre:!0,attrs:{class:"token property"}},[t._v('"timestamp"')]),a("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token number"}},[t._v("1540381889")]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v("\n "),a("span",{pre:!0,attrs:{class:"token property"}},[t._v('"balanceChange"')]),a("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token number"}},[t._v("100000000")]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v("\n "),a("span",{pre:!0,attrs:{class:"token property"}},[t._v('"replaceable"')]),a("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token boolean"}},[t._v("false")]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v("\n "),a("span",{pre:!0,attrs:{class:"token property"}},[t._v('"replacing"')]),a("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token string"}},[t._v('"e070e213a0815b84b4ae96d4d64ce551158524364d3522e7d6bd5415c6c15d3f"')]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v("\n "),a("span",{pre:!0,attrs:{class:"token property"}},[t._v('"replacedBy"')]),a("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token null keyword"}},[t._v("null")]),t._v("\n "),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("}")]),t._v("\n "),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("]")]),t._v("\n "),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("}")]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v("\n "),a("span",{pre:!0,attrs:{class:"token property"}},[t._v('"replacedTransactions"')]),a("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("{")]),t._v("\n "),a("span",{pre:!0,attrs:{class:"token property"}},[t._v('"transactions"')]),a("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("[")]),t._v("\n "),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("{")]),t._v("\n "),a("span",{pre:!0,attrs:{class:"token property"}},[t._v('"blockHash"')]),a("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token null keyword"}},[t._v("null")]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v("\n "),a("span",{pre:!0,attrs:{class:"token property"}},[t._v('"confirmations"')]),a("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token number"}},[t._v("0")]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v("\n "),a("span",{pre:!0,attrs:{class:"token property"}},[t._v('"height"')]),a("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token null keyword"}},[t._v("null")]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v("\n "),a("span",{pre:!0,attrs:{class:"token property"}},[t._v('"transactionId"')]),a("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token string"}},[t._v('"7ec0bcbd3b7685b6bbdb4287a250b64bfcb799dbbbcffa78c00e6cc11185e5f1"')]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v("\n "),a("span",{pre:!0,attrs:{class:"token property"}},[t._v('"transaction"')]),a("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token null keyword"}},[t._v("null")]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v("\n "),a("span",{pre:!0,attrs:{class:"token property"}},[t._v('"outputs"')]),a("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("[")]),t._v("\n "),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("{")]),t._v("\n "),a("span",{pre:!0,attrs:{class:"token property"}},[t._v('"keyPath"')]),a("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token string"}},[t._v('"0"')]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v("\n "),a("span",{pre:!0,attrs:{class:"token property"}},[t._v('"scriptPubKey"')]),a("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token string"}},[t._v('"0014b39fc4eb5c6dd238d39449b70a2e30d575426d99"')]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v("\n "),a("span",{pre:!0,attrs:{class:"token property"}},[t._v('"index"')]),a("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token number"}},[t._v("1")]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v("\n "),a("span",{pre:!0,attrs:{class:"token property"}},[t._v('"value"')]),a("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token number"}},[t._v("100000000")]),t._v("\n "),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("}")]),t._v("\n "),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("]")]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v("\n "),a("span",{pre:!0,attrs:{class:"token property"}},[t._v('"inputs"')]),a("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("[")]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("]")]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v("\n "),a("span",{pre:!0,attrs:{class:"token property"}},[t._v('"timestamp"')]),a("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token number"}},[t._v("1540381889")]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v("\n "),a("span",{pre:!0,attrs:{class:"token property"}},[t._v('"balanceChange"')]),a("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token number"}},[t._v("100000000")]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v("\n "),a("span",{pre:!0,attrs:{class:"token property"}},[t._v('"replaceable"')]),a("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token boolean"}},[t._v("false")]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v("\n "),a("span",{pre:!0,attrs:{class:"token property"}},[t._v('"replacing"')]),a("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token null keyword"}},[t._v("null")]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v("\n "),a("span",{pre:!0,attrs:{class:"token property"}},[t._v('"replacedBy"')]),a("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token string"}},[t._v('"7ec0bcbd3b7685b6bbdb4287a250b64bfcb799dbbbcffa78c00e6cc11185e5f1"')]),t._v("\n "),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("}")]),t._v("\n "),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("]")]),t._v("\n "),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("}")]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v("\n "),a("span",{pre:!0,attrs:{class:"token property"}},[t._v('"immatureTransactions"')]),a("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("{")]),t._v("\n "),a("span",{pre:!0,attrs:{class:"token property"}},[t._v('"transactions"')]),a("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("[")]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("]")]),t._v("\n "),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("}")]),t._v("\n"),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("}")]),t._v("\n")])])]),a("ul",[a("li",[a("code",[t._v("inputs")]),t._v(": The spent outputs of this transaction.")]),t._v(" "),a("li",[a("code",[t._v("inputs.inputIndex")]),t._v(": The index of the input in this transaction.")]),t._v(" "),a("li",[a("code",[t._v("replaceable")]),t._v(": "),a("code",[t._v("true")]),t._v(" if the transaction can be replaced (the transaction has RBF activated, is in the unconfirmed list and is not an intermediate transaction in a chain of unconfirmed transaction)")]),t._v(" "),a("li",[a("code",[t._v("replacing")]),t._v(": Only set in the unconfirmed list, and is pointing to a transaction id in the replaced list.")]),t._v(" "),a("li",[a("code",[t._v("replacedBy")]),t._v(": Only set in the replaced list, and is pointing to a transaction id in the unconfirmed list.")]),t._v(" "),a("li",[a("code",[t._v("immatureTransactions")]),t._v(": Coinbase transactions with less than 100 confirmations.")])]),t._v(" "),a("p",[t._v("Note for liquid, "),a("code",[t._v("balanceChange")]),t._v(" is an array of "),a("a",{attrs:{href:"#liquid"}},[t._v("AssetMoney")]),t._v(".\nNote that the list of confirmed transaction also include immature transactions.")]),t._v(" "),a("h2",{attrs:{id:"query-specifc-transactions-of-tracked-sources"}},[a("a",{staticClass:"header-anchor",attrs:{href:"#query-specifc-transactions-of-tracked-sources"}},[t._v("#")]),t._v(" "),a("a",{attrs:{name:"singletransaction"}}),t._v("Query specifc transactions of tracked sources")]),t._v(" "),a("p",[a("code",[t._v("HTTP GET v1/cryptos/{cryptoCode}/derivations/{derivationScheme}/transactions/{txId}")]),t._v(" "),a("code",[t._v("HTTP GET v1/cryptos/{cryptoCode}/addresses/{address}/transactions/{txId}")]),t._v(" "),a("code",[t._v("HTTP GET v1/cryptos/{cryptoCode}/groups/{groupId}/transactions/{txId}")])]),t._v(" "),a("p",[t._v("Error codes:")]),t._v(" "),a("ul",[a("li",[t._v("HTTP 404: Transaction not found")])]),t._v(" "),a("p",[t._v("Optional Parameters:")]),t._v(" "),a("ul",[a("li",[a("code",[t._v("includeTransaction")]),t._v(" includes the hex of the transaction, not only information (default: true)")])]),t._v(" "),a("p",[t._v("Returns:")]),t._v(" "),a("div",{staticClass:"language-json extra-class"},[a("pre",{pre:!0,attrs:{class:"language-json"}},[a("code",[a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("{")]),t._v("\n "),a("span",{pre:!0,attrs:{class:"token property"}},[t._v('"blockHash"')]),a("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token null keyword"}},[t._v("null")]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v("\n "),a("span",{pre:!0,attrs:{class:"token property"}},[t._v('"confirmations"')]),a("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token number"}},[t._v("0")]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v("\n "),a("span",{pre:!0,attrs:{class:"token property"}},[t._v('"height"')]),a("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token null keyword"}},[t._v("null")]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v("\n "),a("span",{pre:!0,attrs:{class:"token property"}},[t._v('"transactionId"')]),a("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token string"}},[t._v('"7ec0bcbd3b7685b6bbdb4287a250b64bfcb799dbbbcffa78c00e6cc11185e5f1"')]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v("\n "),a("span",{pre:!0,attrs:{class:"token property"}},[t._v('"transaction"')]),a("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token null keyword"}},[t._v("null")]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v("\n "),a("span",{pre:!0,attrs:{class:"token property"}},[t._v('"outputs"')]),a("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("[")]),t._v("\n "),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("{")]),t._v("\n "),a("span",{pre:!0,attrs:{class:"token property"}},[t._v('"scriptPubKey"')]),a("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token string"}},[t._v('"0014b39fc4eb5c6dd238d39449b70a2e30d575426d99"')]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v("\n "),a("span",{pre:!0,attrs:{class:"token property"}},[t._v('"index"')]),a("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token number"}},[t._v("1")]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v("\n "),a("span",{pre:!0,attrs:{class:"token property"}},[t._v('"value"')]),a("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token number"}},[t._v("100000000")]),t._v("\n "),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("}")]),t._v("\n "),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("]")]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v("\n "),a("span",{pre:!0,attrs:{class:"token property"}},[t._v('"inputs"')]),a("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("[")]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("]")]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v("\n "),a("span",{pre:!0,attrs:{class:"token property"}},[t._v('"timestamp"')]),a("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token number"}},[t._v("1540381889")]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v("\n "),a("span",{pre:!0,attrs:{class:"token property"}},[t._v('"balanceChange"')]),a("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token number"}},[t._v("100000000")]),t._v("\n"),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("}")]),t._v("\n")])])]),a("h2",{attrs:{id:"get-balance-of-tracked-sources"}},[a("a",{staticClass:"header-anchor",attrs:{href:"#get-balance-of-tracked-sources"}},[t._v("#")]),t._v(" "),a("a",{attrs:{name:"balance"}}),t._v("Get balance of tracked sources")]),t._v(" "),a("p",[a("code",[t._v("HTTP GET v1/cryptos/{cryptoCode}/derivations/{derivationScheme}/balance")]),t._v(" "),a("code",[t._v("HTTP GET v1/cryptos/{cryptoCode}/addresses/{address}/balance")]),t._v(" "),a("code",[t._v("HTTP GET v1/cryptos/{cryptoCode}/groups/{groupId}/balance")])]),t._v(" "),a("p",[t._v("Returns:")]),t._v(" "),a("div",{staticClass:"language-json extra-class"},[a("pre",{pre:!0,attrs:{class:"language-json"}},[a("code",[a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("{")]),t._v("\n "),a("span",{pre:!0,attrs:{class:"token property"}},[t._v('"unconfirmed"')]),a("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token number"}},[t._v("110000000")]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v("\n "),a("span",{pre:!0,attrs:{class:"token property"}},[t._v('"confirmed"')]),a("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token number"}},[t._v("100000000")]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v("\n "),a("span",{pre:!0,attrs:{class:"token property"}},[t._v('"available"')]),a("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token number"}},[t._v("210000000")]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v("\n "),a("span",{pre:!0,attrs:{class:"token property"}},[t._v('"immature"')]),a("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token number"}},[t._v("0")]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v("\n "),a("span",{pre:!0,attrs:{class:"token property"}},[t._v('"total"')]),a("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token number"}},[t._v("210000000")]),t._v("\n"),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("}")]),t._v("\n")])])]),a("p",[t._v("Note for liquid, the values are array of "),a("a",{attrs:{href:"#liquid"}},[t._v("AssetMoney")]),t._v(".")]),t._v(" "),a("ul",[a("li",[a("code",[t._v("unconfirmed")]),t._v(": How the confirmed balance would be updated once all the unconfirmed transactions were confirmed.")]),t._v(" "),a("li",[a("code",[t._v("confirmed")]),t._v(": The balance of all funds in confirmed transactions.")]),t._v(" "),a("li",[a("code",[t._v("total")]),t._v(": The total of funds owned (ie, "),a("code",[t._v("confirmed + unconfirmed")]),t._v(")")]),t._v(" "),a("li",[a("code",[t._v("immature")]),t._v(": The total unspendable funds (ie, coinbase reward which need 100 confirmations before being spendable)")]),t._v(" "),a("li",[a("code",[t._v("available")]),t._v(": The total spendable balance. (ie, "),a("code",[t._v("total - immature")]),t._v(")")])]),t._v(" "),a("p",[t._v("Immature funds is the sum of UTXO's belonging to a coinbase transaction with less than 100 confirmations.")]),t._v(" "),a("h2",{attrs:{id:"get-a-transaction"}},[a("a",{staticClass:"header-anchor",attrs:{href:"#get-a-transaction"}},[t._v("#")]),t._v(" "),a("a",{attrs:{name:"gettransaction"}}),t._v("Get a transaction")]),t._v(" "),a("p",[a("code",[t._v("HTTP GET v1/cryptos/{cryptoCode}/transactions/{txId}")])]),t._v(" "),a("p",[t._v("Optional Parameters:")]),t._v(" "),a("ul",[a("li",[a("code",[t._v("includeTransaction")]),t._v(" includes the hex of the transaction, not only information (default: true)")])]),t._v(" "),a("p",[t._v("Error codes:")]),t._v(" "),a("ul",[a("li",[t._v("HTTP 404: Transaction not found")])]),t._v(" "),a("p",[t._v("Returns:")]),t._v(" "),a("div",{staticClass:"language-json extra-class"},[a("pre",{pre:!0,attrs:{class:"language-json"}},[a("code",[a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("{")]),t._v("\n "),a("span",{pre:!0,attrs:{class:"token property"}},[t._v('"confirmations"')]),a("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token number"}},[t._v("3")]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v("\n "),a("span",{pre:!0,attrs:{class:"token property"}},[t._v('"blockId"')]),a("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token string"}},[t._v('"5efa23803df818cd21faa0c11e84db28c8352e76acb93d0c0adfe123db827190"')]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v("\n "),a("span",{pre:!0,attrs:{class:"token property"}},[t._v('"transactionHash"')]),a("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token string"}},[t._v('"ed86c55b519c26ab4ba8130c976294753934c1f9f6d30203e65bb222648a8cdf"')]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v("\n "),a("span",{pre:!0,attrs:{class:"token property"}},[t._v('"transaction"')]),a("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token string"}},[t._v('"0200000001205dcde69a5bd2b3281d387e6f125338f9ccb904d94df383ff56d9923599681e000000004847304402200b9d78e01691339acb238d7cd7a40ae620796bdcf8cb167dff4e100b71a2b0950220518e3a955ea7229d57c0160ecf491e8048662d7112fe5feaa312ff71388fda9701feffffff028c02102401000000160014a4ccb74ada7dd01b3018c3308894fea27b4813be00e1f5050000000016001408f86300ddff26ddf779ddce833f7e9e7442156c67000000"')]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v("\n "),a("span",{pre:!0,attrs:{class:"token property"}},[t._v('"height"')]),a("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token number"}},[t._v("104")]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v("\n "),a("span",{pre:!0,attrs:{class:"token property"}},[t._v('"timestamp"')]),a("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token number"}},[t._v("1540390804")]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v("\n "),a("span",{pre:!0,attrs:{class:"token property"}},[t._v('"replacedBy"')]),a("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token string"}},[t._v('"7ec0bcbd3b7685b6bbdb4287a250b64bfcb799dbbbcffa78c00e6cc11185e5f1"')]),t._v("\n"),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("}")]),t._v("\n")])])]),a("p",[a("code",[t._v("height")]),t._v(" and "),a("code",[t._v("blockId")]),t._v(" will be null if the transaction is not confirmed.")]),t._v(" "),a("h2",{attrs:{id:"get-connection-status-to-the-chain"}},[a("a",{staticClass:"header-anchor",attrs:{href:"#get-connection-status-to-the-chain"}},[t._v("#")]),t._v(" "),a("a",{attrs:{name:"status"}}),t._v("Get connection status to the chain")]),t._v(" "),a("p",[a("code",[t._v("HTTP GET v1/cryptos/{cryptoCode}/status")])]),t._v(" "),a("p",[t._v("Returns:")]),t._v(" "),a("div",{staticClass:"language-json extra-class"},[a("pre",{pre:!0,attrs:{class:"language-json"}},[a("code",[a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("{")]),t._v("\n "),a("span",{pre:!0,attrs:{class:"token property"}},[t._v('"bitcoinStatus"')]),a("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("{")]),t._v("\n "),a("span",{pre:!0,attrs:{class:"token property"}},[t._v('"blocks"')]),a("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token number"}},[t._v("103")]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v("\n "),a("span",{pre:!0,attrs:{class:"token property"}},[t._v('"headers"')]),a("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token number"}},[t._v("103")]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v("\n "),a("span",{pre:!0,attrs:{class:"token property"}},[t._v('"verificationProgress"')]),a("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token number"}},[t._v("1.0")]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v("\n "),a("span",{pre:!0,attrs:{class:"token property"}},[t._v('"isSynched"')]),a("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token boolean"}},[t._v("true")]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v("\n "),a("span",{pre:!0,attrs:{class:"token property"}},[t._v('"incrementalRelayFee"')]),a("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token number"}},[t._v("1")]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v("\n "),a("span",{pre:!0,attrs:{class:"token property"}},[t._v('"minRelayTxFee"')]),a("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token number"}},[t._v("1")]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v("\n "),a("span",{pre:!0,attrs:{class:"token property"}},[t._v('"capabilities"')]),a("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("{")]),t._v("\n "),a("span",{pre:!0,attrs:{class:"token property"}},[t._v('"canScanTxoutSet"')]),a("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token boolean"}},[t._v("true")]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v("\n "),a("span",{pre:!0,attrs:{class:"token property"}},[t._v('"canSupportSegwit"')]),a("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token boolean"}},[t._v("true")]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v("\n "),a("span",{pre:!0,attrs:{class:"token property"}},[t._v('"canSupportTaproot"')]),a("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token boolean"}},[t._v("true")]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v("\n "),a("span",{pre:!0,attrs:{class:"token property"}},[t._v('"canSupportTransactionCheck"')]),a("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token boolean"}},[t._v("true")]),t._v("\n "),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("}")]),t._v("\n "),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("}")]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v("\n "),a("span",{pre:!0,attrs:{class:"token property"}},[t._v('"isFullySynched"')]),a("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token boolean"}},[t._v("true")]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v("\n "),a("span",{pre:!0,attrs:{class:"token property"}},[t._v('"chainHeight"')]),a("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token number"}},[t._v("103")]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v("\n "),a("span",{pre:!0,attrs:{class:"token property"}},[t._v('"syncHeight"')]),a("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token number"}},[t._v("103")]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v("\n "),a("span",{pre:!0,attrs:{class:"token property"}},[t._v('"networkType"')]),a("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token string"}},[t._v('"Regtest"')]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v("\n "),a("span",{pre:!0,attrs:{class:"token property"}},[t._v('"cryptoCode"')]),a("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token string"}},[t._v('"BTC"')]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v("\n "),a("span",{pre:!0,attrs:{class:"token property"}},[t._v('"instanceName"')]),a("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token string"}},[t._v('"MyInstance"')]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v("\n "),a("span",{pre:!0,attrs:{class:"token property"}},[t._v('"supportedCryptoCodes"')]),a("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("[")]),t._v("\n "),a("span",{pre:!0,attrs:{class:"token string"}},[t._v('"BTC"')]),t._v("\n "),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("]")]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v("\n "),a("span",{pre:!0,attrs:{class:"token property"}},[t._v('"version"')]),a("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token string"}},[t._v('"1.0.3.5"')]),t._v("\n"),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("}")]),t._v("\n")])])]),a("p",[a("code",[t._v("instanceName")]),t._v(" can be configured via configuration's key "),a("code",[t._v("instancename")]),t._v(".")]),t._v(" "),a("h2",{attrs:{id:"get-a-new-unused-address"}},[a("a",{staticClass:"header-anchor",attrs:{href:"#get-a-new-unused-address"}},[t._v("#")]),t._v(" "),a("a",{attrs:{name:"unused"}}),t._v("Get a new unused address")]),t._v(" "),a("p",[a("code",[t._v("HTTP GET v1/cryptos/{cryptoCode}/derivations/{derivationScheme}/addresses/unused")])]),t._v(" "),a("p",[t._v("Error codes:")]),t._v(" "),a("ul",[a("li",[t._v("HTTP 404: "),a("code",[t._v("cryptoCode-not-supported")])]),t._v(" "),a("li",[t._v("HTTP 400: "),a("code",[t._v("strategy-not-found")])])]),t._v(" "),a("p",[t._v("Optional parameters:")]),t._v(" "),a("ul",[a("li",[a("code",[t._v("feature")]),t._v(": Use "),a("code",[t._v("Deposit")]),t._v(" to get a deposit address ("),a("code",[t._v("0/x")]),t._v("), "),a("code",[t._v("Change")]),t._v(" to get a change address ("),a("code",[t._v("1/x")]),t._v("), "),a("code",[t._v("Direct")]),t._v(" to get "),a("code",[t._v("x")]),t._v(" or "),a("code",[t._v("Custom")]),t._v(" if "),a("code",[t._v("customKeyPathTemplate")]),t._v(" is configured (default: "),a("code",[t._v("Deposit")]),t._v(")")]),t._v(" "),a("li",[a("code",[t._v("skip")]),t._v(": How many addresses to skip, needed if the user want multiple unused addresses (default:0)")]),t._v(" "),a("li",[a("code",[t._v("reserve")]),t._v(": Mark the returned address as used (default: false)")])]),t._v(" "),a("p",[t._v("Returns:")]),t._v(" "),a("div",{staticClass:"language-json extra-class"},[a("pre",{pre:!0,attrs:{class:"language-json"}},[a("code",[a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("{")]),t._v("\n "),a("span",{pre:!0,attrs:{class:"token property"}},[t._v('"trackedSource"')]),a("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token string"}},[t._v('"DERIVATIONSCHEME:tpubD6NzVbkrYhZ4Wo2RMq8Xbnrorf1xnABkKMS3EGshPkQ3Z4N4GN8uyLuDPvnK7Ekc2FHdXbLvcuZny1gPiohMksFGKmaX3APD2DbTeBWj751-[p2sh]"')]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v("\n "),a("span",{pre:!0,attrs:{class:"token property"}},[t._v('"feature"')]),a("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token string"}},[t._v('"Deposit"')]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v("\n "),a("span",{pre:!0,attrs:{class:"token property"}},[t._v('"derivationStrategy"')]),a("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token string"}},[t._v('"tpubD6NzVbkrYhZ4Wo2RMq8Xbnrorf1xnABkKMS3EGshPkQ3Z4N4GN8uyLuDPvnK7Ekc2FHdXbLvcuZny1gPiohMksFGKmaX3APD2DbTeBWj751-[p2sh]"')]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v("\n "),a("span",{pre:!0,attrs:{class:"token property"}},[t._v('"keyPath"')]),a("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token string"}},[t._v('"0/2"')]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v("\n "),a("span",{pre:!0,attrs:{class:"token property"}},[t._v('"scriptPubKey"')]),a("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token string"}},[t._v('"a91412cbf6154ef6d9aecf9c978dc2bdc43f1881dd5f87"')]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v("\n "),a("span",{pre:!0,attrs:{class:"token property"}},[t._v('"address"')]),a("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token string"}},[t._v('"2MtxcVDMiRrJ3V4zfsAwZGbZfPiDUxSXDY2"')]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v("\n "),a("span",{pre:!0,attrs:{class:"token property"}},[t._v('"redeem"')]),a("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token string"}},[t._v('"0014e2eb89edba1fe6c6c0863699eeb78f6ec3271b45"')]),t._v("\n"),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("}")]),t._v("\n")])])]),a("p",[t._v("Note: "),a("code",[t._v("redeem")]),t._v(" is returning the segwit redeem if the derivation scheme is a P2SH-P2WSH or P2WSH, or the p2sh redeem if just a p2sh.")]),t._v(" "),a("h2",{attrs:{id:"get-scriptpubkey-information-of-a-derivation-scheme"}},[a("a",{staticClass:"header-anchor",attrs:{href:"#get-scriptpubkey-information-of-a-derivation-scheme"}},[t._v("#")]),t._v(" "),a("a",{attrs:{name:"scriptPubKey"}}),t._v("Get scriptPubKey information of a Derivation Scheme")]),t._v(" "),a("p",[a("code",[t._v("HTTP GET v1/cryptos/{cryptoCode}/derivations/{derivationScheme}/scripts/{script}")])]),t._v(" "),a("p",[t._v("Error codes:")]),t._v(" "),a("ul",[a("li",[t._v("HTTP 404: "),a("code",[t._v("cryptoCode-not-supported")])])]),t._v(" "),a("p",[t._v("Returns:")]),t._v(" "),a("div",{staticClass:"language-json extra-class"},[a("pre",{pre:!0,attrs:{class:"language-json"}},[a("code",[a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("{")]),t._v("\n "),a("span",{pre:!0,attrs:{class:"token property"}},[t._v('"trackedSource"')]),a("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token string"}},[t._v('"DERIVATIONSCHEME:tpubD6NzVbkrYhZ4WcPozSqALNCrJEt4C45sPDhEBBuokoCeDgjX6YTs4QVvhD9kao6f2uZLqZF4qcXprYyRqooSXr1uPp1KPH1o4m6aw9nxbiA"')]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v("\n "),a("span",{pre:!0,attrs:{class:"token property"}},[t._v('"feature"')]),a("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token string"}},[t._v('"Deposit"')]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v("\n "),a("span",{pre:!0,attrs:{class:"token property"}},[t._v('"derivationStrategy"')]),a("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token string"}},[t._v('"tpubD6NzVbkrYhZ4WcPozSqALNCrJEt4C45sPDhEBBuokoCeDgjX6YTs4QVvhD9kao6f2uZLqZF4qcXprYyRqooSXr1uPp1KPH1o4m6aw9nxbiA"')]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v("\n "),a("span",{pre:!0,attrs:{class:"token property"}},[t._v('"keyPath"')]),a("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token string"}},[t._v('"0/0"')]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v("\n "),a("span",{pre:!0,attrs:{class:"token property"}},[t._v('"scriptPubKey"')]),a("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token string"}},[t._v('"001460c25d29559774803f262acf5ee5c922eff52ccd"')]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v("\n "),a("span",{pre:!0,attrs:{class:"token property"}},[t._v('"address"')]),a("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token string"}},[t._v('"tb1qvrp96224ja6gq0ex9t84aewfythl2txdkpdmu0"')]),t._v("\n"),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("}")]),t._v("\n")])])]),a("h2",{attrs:{id:"get-available-unspent-transaction-outputs-utxos-of-tracked-sources"}},[a("a",{staticClass:"header-anchor",attrs:{href:"#get-available-unspent-transaction-outputs-utxos-of-tracked-sources"}},[t._v("#")]),t._v(" "),a("a",{attrs:{name:"utxos"}}),t._v("Get available Unspent Transaction Outputs (UTXOs) of tracked sources")]),t._v(" "),a("p",[a("code",[t._v("HTTP GET v1/cryptos/{cryptoCode}/derivations/{derivationScheme}/utxos")]),t._v(" "),a("code",[t._v("HTTP GET v1/cryptos/{cryptoCode}/addresses/{address}/utxos")]),t._v(" "),a("code",[t._v("HTTP GET v1/cryptos/{cryptoCode}/groups/{groupId}/utxos")])]),t._v(" "),a("p",[t._v("Error:")]),t._v(" "),a("ul",[a("li",[t._v("HTTP 404: "),a("code",[t._v("cryptoCode-not-supported")])])]),t._v(" "),a("p",[t._v("Result:")]),t._v(" "),a("div",{staticClass:"language-json extra-class"},[a("pre",{pre:!0,attrs:{class:"language-json"}},[a("code",[a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("{")]),t._v("\n "),a("span",{pre:!0,attrs:{class:"token property"}},[t._v('"trackedSource"')]),a("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token string"}},[t._v('"DERIVATIONSCHEME:tpubD6NzVbkrYhZ4XQVi1sSEDBWTcicDqVSCTnYDxpwGwcSZVbPii2b7baRg57YfL64ed36sBRe6GviihHwhy3D1cnBe5uXb27DjrDZCKUA7PQi"')]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v("\n "),a("span",{pre:!0,attrs:{class:"token property"}},[t._v('"derivationStrategy"')]),a("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token string"}},[t._v('"tpubD6NzVbkrYhZ4XQVi1sSEDBWTcicDqVSCTnYDxpwGwcSZVbPii2b7baRg57YfL64ed36sBRe6GviihHwhy3D1cnBe5uXb27DjrDZCKUA7PQi"')]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v("\n "),a("span",{pre:!0,attrs:{class:"token property"}},[t._v('"currentHeight"')]),a("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token number"}},[t._v("107")]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v("\n "),a("span",{pre:!0,attrs:{class:"token property"}},[t._v('"unconfirmed"')]),a("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("{")]),t._v("\n "),a("span",{pre:!0,attrs:{class:"token property"}},[t._v('"utxOs"')]),a("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("[")]),t._v("\n "),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("{")]),t._v("\n "),a("span",{pre:!0,attrs:{class:"token property"}},[t._v('"feature"')]),a("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token string"}},[t._v('"Deposit"')]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v("\n "),a("span",{pre:!0,attrs:{class:"token property"}},[t._v('"outpoint"')]),a("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token string"}},[t._v('"10ba4bcadd03130b1bd98b0bc7aea9910f871b25b87ec06e484456e84440c88a01000000"')]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v("\n "),a("span",{pre:!0,attrs:{class:"token property"}},[t._v('"index"')]),a("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token number"}},[t._v("1")]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v("\n "),a("span",{pre:!0,attrs:{class:"token property"}},[t._v('"transactionHash"')]),a("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token string"}},[t._v('"8ac84044e85644486ec07eb8251b870f91a9aec70b8bd91b0b1303ddca4bba10"')]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v("\n "),a("span",{pre:!0,attrs:{class:"token property"}},[t._v('"scriptPubKey"')]),a("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token string"}},[t._v('"00149681ae465a045e2068460b9d281cf97dede87cd8"')]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v("\n "),a("span",{pre:!0,attrs:{class:"token property"}},[t._v('"address"')]),a("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token string"}},[t._v('"bcrt1qj6q6u3j6q30zq6zxpwwjs88e0hk7slxcunru7u"')]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v("\n "),a("span",{pre:!0,attrs:{class:"token property"}},[t._v('"value"')]),a("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token number"}},[t._v("100000000")]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v("\n "),a("span",{pre:!0,attrs:{class:"token property"}},[t._v('"keyPath"')]),a("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token string"}},[t._v('"0/0"')]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v("\n "),a("span",{pre:!0,attrs:{class:"token property"}},[t._v('"timestamp"')]),a("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token number"}},[t._v("1540376171")]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v("\n "),a("span",{pre:!0,attrs:{class:"token property"}},[t._v('"confirmations"')]),a("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token number"}},[t._v("0")]),t._v("\n "),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("}")]),t._v("\n "),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("]")]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v("\n "),a("span",{pre:!0,attrs:{class:"token property"}},[t._v('"spentOutpoints"')]),a("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("[")]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("]")]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v("\n "),a("span",{pre:!0,attrs:{class:"token property"}},[t._v('"hasChanges"')]),a("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token boolean"}},[t._v("true")]),t._v("\n "),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("}")]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v("\n "),a("span",{pre:!0,attrs:{class:"token property"}},[t._v('"confirmed"')]),a("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("{")]),t._v("\n "),a("span",{pre:!0,attrs:{class:"token property"}},[t._v('"utxOs"')]),a("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("[")]),t._v("\n "),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("{")]),t._v("\n "),a("span",{pre:!0,attrs:{class:"token property"}},[t._v('"feature"')]),a("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token string"}},[t._v('"Deposit"')]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v("\n "),a("span",{pre:!0,attrs:{class:"token property"}},[t._v('"outpoint"')]),a("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token string"}},[t._v('"29ca6590f3f03a6523ad79975392e74e385bf2b7dafe6c537ffa12f9e124348800000000"')]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v("\n "),a("span",{pre:!0,attrs:{class:"token property"}},[t._v('"index"')]),a("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token number"}},[t._v("0")]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v("\n "),a("span",{pre:!0,attrs:{class:"token property"}},[t._v('"transactionHash"')]),a("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token string"}},[t._v('"883424e1f912fa7f536cfedab7f25b384ee792539779ad23653af0f39065ca29"')]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v("\n "),a("span",{pre:!0,attrs:{class:"token property"}},[t._v('"scriptPubKey"')]),a("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token string"}},[t._v('"001436a37f2f508650f7074bec4d091fc82bb01cc57f"')]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v("\n "),a("span",{pre:!0,attrs:{class:"token property"}},[t._v('"address"')]),a("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token string"}},[t._v('"bcrt1qx63h7t6sseg0wp6ta3xsj87g9wcpe3tlgqgnql"')]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v("\n "),a("span",{pre:!0,attrs:{class:"token property"}},[t._v('"value"')]),a("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token number"}},[t._v("50000000")]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v("\n "),a("span",{pre:!0,attrs:{class:"token property"}},[t._v('"keyPath"')]),a("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token string"}},[t._v('"0/3"')]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v("\n "),a("span",{pre:!0,attrs:{class:"token property"}},[t._v('"timestamp"')]),a("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token number"}},[t._v("1540376174")]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v("\n "),a("span",{pre:!0,attrs:{class:"token property"}},[t._v('"confirmations"')]),a("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token number"}},[t._v("1")]),t._v("\n "),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("}")]),t._v("\n "),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("]")]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v("\n "),a("span",{pre:!0,attrs:{class:"token property"}},[t._v('"spentOutpoints"')]),a("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("[")]),t._v("\n "),a("span",{pre:!0,attrs:{class:"token string"}},[t._v('"9345f9585d643a31202e686ec7a4c2fe17917a5e7731a79d2327d24d25c0339f01000000"')]),t._v("\n "),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("]")]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v("\n "),a("span",{pre:!0,attrs:{class:"token property"}},[t._v('"spentUnconfirmed"')]),a("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("[")]),t._v("\n "),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("{")]),t._v("\n "),a("span",{pre:!0,attrs:{class:"token property"}},[t._v('"feature"')]),a("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token string"}},[t._v('"Deposit"')]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v("\n "),a("span",{pre:!0,attrs:{class:"token property"}},[t._v('"outpoint"')]),a("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token string"}},[t._v('"c8fd6675624d0b88056b9eaf945c5fd0c4614f7ddf44eb81911b3a66ba0e57a001000000"')]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v("\n "),a("span",{pre:!0,attrs:{class:"token property"}},[t._v('"index"')]),a("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token number"}},[t._v("1")]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v("\n "),a("span",{pre:!0,attrs:{class:"token property"}},[t._v('"transactionHash"')]),a("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token string"}},[t._v('"a0570eba663a1b9181eb44df7d4f61c4d05f5c94af9e6b05880b4d627566fdc8"')]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v("\n "),a("span",{pre:!0,attrs:{class:"token property"}},[t._v('"scriptPubKey"')]),a("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token string"}},[t._v('"0014d77089591a85fa3a91e14f587c50e4b777ffd833"')]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v("\n "),a("span",{pre:!0,attrs:{class:"token property"}},[t._v('"address"')]),a("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token string"}},[t._v('"bcrt1q6acgjkg6shar4y0pfav8c58ykamllkpnz6rnxh"')]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v("\n "),a("span",{pre:!0,attrs:{class:"token property"}},[t._v('"value"')]),a("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token number"}},[t._v("100000")]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v("\n "),a("span",{pre:!0,attrs:{class:"token property"}},[t._v('"keyPath"')]),a("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token string"}},[t._v('"0/0"')]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v("\n "),a("span",{pre:!0,attrs:{class:"token property"}},[t._v('"timestamp"')]),a("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token number"}},[t._v("1699930040")]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v("\n "),a("span",{pre:!0,attrs:{class:"token property"}},[t._v('"confirmations"')]),a("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token number"}},[t._v("0")]),t._v("\n "),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("}")]),t._v("\n "),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("]")]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v("\n "),a("span",{pre:!0,attrs:{class:"token property"}},[t._v('"hasChanges"')]),a("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token boolean"}},[t._v("true")]),t._v("\n "),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("}")]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v("\n "),a("span",{pre:!0,attrs:{class:"token property"}},[t._v('"hasChanges"')]),a("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token boolean"}},[t._v("true")]),t._v("\n"),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("}")]),t._v("\n")])])]),a("p",[t._v("Response:")]),t._v(" "),a("ul",[a("li",[a("code",[t._v("confirmed.utxOs")]),t._v(": UTXOs that are confirmed. (UTXO spent by an unconfirmed transaction are also included)")]),t._v(" "),a("li",[a("code",[t._v("unconfirmed.spentOutpoints")]),t._v(": Always empty.")]),t._v(" "),a("li",[a("code",[t._v("unconfirmed.utxOs")]),t._v(": UTXOs that will be confirmed once the unconfirmed transactions are confirmed.")]),t._v(" "),a("li",[a("code",[t._v("unconfirmed.spentOutpoints")]),t._v(": Confirmed UTXOs that will spent once the transactions are confirmed.")]),t._v(" "),a("li",[a("code",[t._v("spentUnconfirmed")]),t._v(": UTXOs that are spent by an unconfirmed transaction.")])]),t._v(" "),a("p",[t._v("This call does not returns conflicted unconfirmed UTXOs.\nNote that confirmed utxo, do not include immature UTXOs. (ie. UTXOs belonging to a coinbase transaction with less than 100 confirmations)")]),t._v(" "),a("h2",{attrs:{id:"notifications-via-websocket"}},[a("a",{staticClass:"header-anchor",attrs:{href:"#notifications-via-websocket"}},[t._v("#")]),t._v(" "),a("a",{attrs:{name:"websocket"}}),t._v("Notifications via websocket")]),t._v(" "),a("p",[t._v("NBXplorer implements real-time notification via websocket supports for new block or transaction.")]),t._v(" "),a("p",[a("code",[t._v("HTTP GET v1/cryptos/{cryptoCode}/connect")])]),t._v(" "),a("p",[t._v("Once you are connected to the websocket, you can subscribe to block notifications by sending the following JSON to it.")]),t._v(" "),a("div",{staticClass:"language-json extra-class"},[a("pre",{pre:!0,attrs:{class:"language-json"}},[a("code",[a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("{")]),t._v("\n "),a("span",{pre:!0,attrs:{class:"token property"}},[t._v('"type"')]),a("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token string"}},[t._v('"subscribeblock"')]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v("\n "),a("span",{pre:!0,attrs:{class:"token property"}},[t._v('"data"')]),a("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("{")]),t._v("\n "),a("span",{pre:!0,attrs:{class:"token property"}},[t._v('"cryptoCode"')]),a("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token string"}},[t._v('"BTC"')]),t._v("\n "),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("}")]),t._v("\n"),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("}")]),t._v("\n")])])]),a("p",[t._v("Then a notification will be delivered through the websocket when a new block is mined:")]),t._v(" "),a("div",{staticClass:"language-json extra-class"},[a("pre",{pre:!0,attrs:{class:"language-json"}},[a("code",[a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("{")]),t._v("\n "),a("span",{pre:!0,attrs:{class:"token property"}},[t._v('"type"')]),a("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token string"}},[t._v('"newblock"')]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v("\n "),a("span",{pre:!0,attrs:{class:"token property"}},[t._v('"eventId"')]),a("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token number"}},[t._v("1")]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v("\n "),a("span",{pre:!0,attrs:{class:"token property"}},[t._v('"data"')]),a("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("{")]),t._v("\n "),a("span",{pre:!0,attrs:{class:"token property"}},[t._v('"height"')]),a("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token number"}},[t._v("104")]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v("\n "),a("span",{pre:!0,attrs:{class:"token property"}},[t._v('"hash"')]),a("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token string"}},[t._v('"10b0e5178aaf42c4a938f0d37430413b7d76feae14b01fc07e1f23300b8821ce"')]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v("\n "),a("span",{pre:!0,attrs:{class:"token property"}},[t._v('"previousBlockHash"')]),a("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token string"}},[t._v('"4c6a9c1cadf143c87249519639e86e236feac9d3cea2904e4c42bc5bc32a48a7"')]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v("\n "),a("span",{pre:!0,attrs:{class:"token property"}},[t._v('"cryptoCode"')]),a("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token string"}},[t._v('"BTC"')]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v("\n "),a("span",{pre:!0,attrs:{class:"token property"}},[t._v('"confirmations"')]),a("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token number"}},[t._v("1")]),t._v("\n "),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("}")]),t._v("\n"),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("}")]),t._v("\n")])])]),a("p",[t._v("For notification concerning "),a("code",[t._v("Derivation Scheme")]),t._v(" transactions, you can subscribe by sending through the websocket:")]),t._v(" "),a("div",{staticClass:"language-json extra-class"},[a("pre",{pre:!0,attrs:{class:"language-json"}},[a("code",[a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("{")]),t._v("\n "),a("span",{pre:!0,attrs:{class:"token property"}},[t._v('"type"')]),a("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token string"}},[t._v('"subscribetransaction"')]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v("\n "),a("span",{pre:!0,attrs:{class:"token property"}},[t._v('"data"')]),a("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("{")]),t._v("\n "),a("span",{pre:!0,attrs:{class:"token property"}},[t._v('"cryptoCode"')]),a("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token string"}},[t._v('"BTC"')]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v("\n "),a("span",{pre:!0,attrs:{class:"token property"}},[t._v('"derivationSchemes"')]),a("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("[")]),t._v("\n "),a("span",{pre:!0,attrs:{class:"token string"}},[t._v('"tpubD6NzVbkrYhZ4YL91Ez5fdgaBPQbFhedFdn5gQL4tSCJn1usmHsV1L6VokzLbgcqzh9hiBnfnQANp5BYW15QdFGRKspZVSW1v2QY917RDs1V-[legacy]"')]),t._v("\n "),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("]")]),t._v("\n "),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("}")]),t._v("\n"),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("}")]),t._v("\n")])])]),a("p",[t._v("Then you will receive such notifications when a transaction is impacting the "),a("code",[t._v("derivation scheme")]),t._v(":")]),t._v(" "),a("div",{staticClass:"language-json extra-class"},[a("pre",{pre:!0,attrs:{class:"language-json"}},[a("code",[a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("{")]),t._v("\n "),a("span",{pre:!0,attrs:{class:"token property"}},[t._v('"type"')]),a("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token string"}},[t._v('"newtransaction"')]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v("\n "),a("span",{pre:!0,attrs:{class:"token property"}},[t._v('"eventId"')]),a("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token number"}},[t._v("2")]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v("\n "),a("span",{pre:!0,attrs:{class:"token property"}},[t._v('"data"')]),a("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("{")]),t._v("\n "),a("span",{pre:!0,attrs:{class:"token property"}},[t._v('"blockId"')]),a("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token null keyword"}},[t._v("null")]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v("\n "),a("span",{pre:!0,attrs:{class:"token property"}},[t._v('"trackedSource"')]),a("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token string"}},[t._v('"DERIVATIONSCHEME:tpubD6NzVbkrYhZ4X2p2D8kx6XV9V5iCJKMBHuBim1BLnZAZC1JobYkdwSrwF8R74V2oUWkJG3H24LwxnXs9wb6Ksivs2gj4RudMteyVai2AsmA-[p2sh]"')]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v("\n "),a("span",{pre:!0,attrs:{class:"token property"}},[t._v('"derivationStrategy"')]),a("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token string"}},[t._v('"tpubD6NzVbkrYhZ4X2p2D8kx6XV9V5iCJKMBHuBim1BLnZAZC1JobYkdwSrwF8R74V2oUWkJG3H24LwxnXs9wb6Ksivs2gj4RudMteyVai2AsmA-[p2sh]"')]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v("\n "),a("span",{pre:!0,attrs:{class:"token property"}},[t._v('"transactionData"')]),a("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("{")]),t._v("\n "),a("span",{pre:!0,attrs:{class:"token property"}},[t._v('"confirmations"')]),a("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token number"}},[t._v("0")]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v("\n "),a("span",{pre:!0,attrs:{class:"token property"}},[t._v('"blockId"')]),a("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token null keyword"}},[t._v("null")]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v("\n "),a("span",{pre:!0,attrs:{class:"token property"}},[t._v('"transactionHash"')]),a("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token string"}},[t._v('"f135537b40ac7a524273176b60e464b7f279f622031ec53af302d959966d7364"')]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v("\n "),a("span",{pre:!0,attrs:{class:"token property"}},[t._v('"transaction"')]),a("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token string"}},[t._v('"0200000001dd7f53b09438fed83abe25dd6cdc30ee2092ce8c855cb9e7b0faa38aba8bc0f500000000484730440220093a837ff4be4b64b2ed4625abb128966caad0cb7830cac7af4f615bbf6b52ce02206227a3ddec3fac9e49f414eeab1388d0e67829620ac3a8fb2f4bbfc5b67bd02901feffffff0200e1f5050000000017a91476de0c5d07fd202880672bc702162b7f18e13aca87640210240100000017a9147cfa038496438a6d3c95cfac990f4dffc6cb44f28768000000"')]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v("\n "),a("span",{pre:!0,attrs:{class:"token property"}},[t._v('"height"')]),a("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token null keyword"}},[t._v("null")]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v("\n "),a("span",{pre:!0,attrs:{class:"token property"}},[t._v('"timestamp"')]),a("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token number"}},[t._v("1540434424")]),t._v("\n "),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("}")]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v("\n "),a("span",{pre:!0,attrs:{class:"token property"}},[t._v('"inputs"')]),a("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("[")]),t._v("\n "),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("{")]),t._v("\n "),a("span",{pre:!0,attrs:{class:"token property"}},[t._v('"inputIndex"')]),a("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token number"}},[t._v("0")]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v("\n "),a("span",{pre:!0,attrs:{class:"token property"}},[t._v('"transactionId"')]),a("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token string"}},[t._v('"194d6dc4e1c4c983b5235ad2b82cc7c48c36def4960fdcf37697253c9d9854a2"')]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v("\n "),a("span",{pre:!0,attrs:{class:"token property"}},[t._v('"scriptPubKey"')]),a("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token string"}},[t._v('"001409249118830af97a029217f3a8744973c5a4a02e"')]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v("\n "),a("span",{pre:!0,attrs:{class:"token property"}},[t._v('"index"')]),a("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token number"}},[t._v("4")]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v("\n "),a("span",{pre:!0,attrs:{class:"token property"}},[t._v('"value"')]),a("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token number"}},[t._v("90000000")]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v("\n "),a("span",{pre:!0,attrs:{class:"token property"}},[t._v('"address"')]),a("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token string"}},[t._v('"bcrt1qpyjfzxyrptuh5q5jzle6sazfw0z6fgpwuz2rye"')]),t._v("\n "),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("}")]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v("\n "),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("{")]),t._v("\n "),a("span",{pre:!0,attrs:{class:"token property"}},[t._v('"inputIndex"')]),a("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token number"}},[t._v("1")]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v("\n "),a("span",{pre:!0,attrs:{class:"token property"}},[t._v('"transactionId"')]),a("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token string"}},[t._v('"194d6dc4e1c4c983b5235ad2b82cc7c48c36def4960fdcf37697253c9d9854a2"')]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v("\n "),a("span",{pre:!0,attrs:{class:"token property"}},[t._v('"scriptPubKey"')]),a("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token string"}},[t._v('"0014d83837bd474d799ad4decba4bac561a7356e0371"')]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v("\n "),a("span",{pre:!0,attrs:{class:"token property"}},[t._v('"index"')]),a("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token number"}},[t._v("1")]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v("\n "),a("span",{pre:!0,attrs:{class:"token property"}},[t._v('"value"')]),a("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token number"}},[t._v("50000000")]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v("\n "),a("span",{pre:!0,attrs:{class:"token property"}},[t._v('"address"')]),a("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token string"}},[t._v('"bcrt1qmqur0028f4ue44x7ewjt43tp5u6kuqm3eqa3ua"')]),t._v("\n "),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("}")]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("]")]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v("\n "),a("span",{pre:!0,attrs:{class:"token property"}},[t._v('"outputs"')]),a("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("[")]),t._v("\n "),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("{")]),t._v("\n "),a("span",{pre:!0,attrs:{class:"token property"}},[t._v('"keyPath"')]),a("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token string"}},[t._v('"0/1"')]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v("\n "),a("span",{pre:!0,attrs:{class:"token property"}},[t._v('"scriptPubKey"')]),a("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token string"}},[t._v('"a91476de0c5d07fd202880672bc702162b7f18e13aca87"')]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v("\n "),a("span",{pre:!0,attrs:{class:"token property"}},[t._v('"address"')]),a("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token string"}},[t._v('"2N45jj76a7YjGLDoKs2mnQ4tt5N7t6R9xoM"')]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v("\n "),a("span",{pre:!0,attrs:{class:"token property"}},[t._v('"redeem"')]),a("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token string"}},[t._v('"00147d31e1c7959cd047bb7b9b35e4c877a28efe2f0b"')]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v("\n "),a("span",{pre:!0,attrs:{class:"token property"}},[t._v('"index"')]),a("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token number"}},[t._v("0")]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v("\n "),a("span",{pre:!0,attrs:{class:"token property"}},[t._v('"value"')]),a("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token number"}},[t._v("100000000")]),t._v("\n "),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("}")]),t._v("\n "),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("]")]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v("\n "),a("span",{pre:!0,attrs:{class:"token property"}},[t._v('"cryptoCode"')]),a("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token string"}},[t._v('"BTC"')]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v("\n "),a("span",{pre:!0,attrs:{class:"token property"}},[t._v('"replacing"')]),a("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("[")]),a("span",{pre:!0,attrs:{class:"token string"}},[t._v('"25d6bc1b2812670550aca8b2984670203b5ebf00e75f9b2bbf1940c3fa27841e"')]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token string"}},[t._v('"81a20eb55ec16b92c65d4e142278fd521caa9e5dcad9d941c8e256dbd917ae84"')]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("]")]),t._v("\n "),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("}")]),t._v("\n"),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("}")]),t._v("\n")])])]),a("p",[t._v("If you want all transactions of all derivation schemes of BTC, send this to the WebSocket:")]),t._v(" "),a("div",{staticClass:"language-json extra-class"},[a("pre",{pre:!0,attrs:{class:"language-json"}},[a("code",[a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("{")]),t._v("\n "),a("span",{pre:!0,attrs:{class:"token property"}},[t._v('"type"')]),a("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token string"}},[t._v('"subscribetransaction"')]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v("\n "),a("span",{pre:!0,attrs:{class:"token property"}},[t._v('"data"')]),a("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("{")]),t._v("\n "),a("span",{pre:!0,attrs:{class:"token property"}},[t._v('"cryptoCode"')]),a("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token string"}},[t._v('"BTC"')]),t._v("\n "),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("}")]),t._v("\n"),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("}")]),t._v("\n")])])]),a("p",[t._v("If you want all transactions of all derivation schemes of all crypto currencies, send this to the WebSocket:")]),t._v(" "),a("div",{staticClass:"language-json extra-class"},[a("pre",{pre:!0,attrs:{class:"language-json"}},[a("code",[a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("{")]),t._v("\n "),a("span",{pre:!0,attrs:{class:"token property"}},[t._v('"type"')]),a("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token string"}},[t._v('"subscribetransaction"')]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v("\n "),a("span",{pre:!0,attrs:{class:"token property"}},[t._v('"data"')]),a("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("{")]),t._v("\n "),a("span",{pre:!0,attrs:{class:"token property"}},[t._v('"cryptoCode"')]),a("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token string"}},[t._v('"*"')]),t._v("\n "),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("}")]),t._v("\n"),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("}")]),t._v("\n")])])]),a("p",[t._v("As an alternative to get notification, you can also use long polling with the "),a("a",{attrs:{href:"#eventStream"}},[t._v("event stream")]),t._v(".")]),t._v(" "),a("p",[t._v("Fields:")]),t._v(" "),a("ul",[a("li",[a("code",[t._v("replacing")]),t._v(": The list of the unconfirmed transactions of this wallet which have been replaced by this new transaction. This can typically be used to detect when the sender is bumping fee. This can't be used to detect when the sender is attempting to abort a transaction.")])]),t._v(" "),a("h2",{attrs:{id:"broadcast-a-transaction"}},[a("a",{staticClass:"header-anchor",attrs:{href:"#broadcast-a-transaction"}},[t._v("#")]),t._v(" "),a("a",{attrs:{name:"broadcast"}}),t._v("Broadcast a transaction")]),t._v(" "),a("p",[a("code",[t._v("HTTP POST v1/cryptos/{cryptoCode}/transactions")])]),t._v(" "),a("p",[t._v("Body:")]),t._v(" "),a("p",[t._v("Raw bytes of the transaction.")]),t._v(" "),a("p",[t._v("Parameter:")]),t._v(" "),a("ul",[a("li",[a("code",[t._v("testMempoolAccept")]),t._v(": If "),a("code",[t._v("true")]),t._v(", will not attempt to broadcast the transaction but just test its acceptance in the mempool. (default: "),a("code",[t._v("false")]),t._v(")")])]),t._v(" "),a("p",[t._v("Error codes:")]),t._v(" "),a("ul",[a("li",[t._v("HTTP 404: "),a("code",[t._v("cryptoCode-not-supported")])]),t._v(" "),a("li",[t._v("HTTP 400: "),a("code",[t._v("rpc-unavailable")])]),t._v(" "),a("li",[t._v("HTTP 400: "),a("code",[t._v("not-supported")]),t._v(" if "),a("code",[t._v("testMempoolAccept")]),t._v(" is "),a("code",[t._v("true")]),t._v(", but the underlying node does not support it")])]),t._v(" "),a("p",[t._v("Returns:")]),t._v(" "),a("div",{staticClass:"language-json extra-class"},[a("pre",{pre:!0,attrs:{class:"language-json"}},[a("code",[a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("{")]),t._v("\n "),a("span",{pre:!0,attrs:{class:"token property"}},[t._v('"success"')]),a("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),a("span",{pre:!0,attrs:{class:"token boolean"}},[t._v("false")]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v("\n "),a("span",{pre:!0,attrs:{class:"token property"}},[t._v('"rpcCode"')]),a("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),a("span",{pre:!0,attrs:{class:"token number"}},[t._v("-25")]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v("\n "),a("span",{pre:!0,attrs:{class:"token property"}},[t._v('"rpcCodeMessage"')]),a("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),a("span",{pre:!0,attrs:{class:"token string"}},[t._v('"General error during transaction submission"')]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v("\n "),a("span",{pre:!0,attrs:{class:"token property"}},[t._v('"rpcMessage"')]),a("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),a("span",{pre:!0,attrs:{class:"token string"}},[t._v('"Missing inputs"')]),t._v("\n"),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("}")]),t._v("\n")])])]),a("h2",{attrs:{id:"rescan-a-transaction"}},[a("a",{staticClass:"header-anchor",attrs:{href:"#rescan-a-transaction"}},[t._v("#")]),t._v(" "),a("a",{attrs:{name:"rescan"}}),t._v("Rescan a transaction")]),t._v(" "),a("p",[t._v("NBXplorer does not rescan the whole blockchain when tracking a new derivation scheme.\nThis means that if the derivation scheme already received UTXOs in the past, NBXplorer will not be aware of it and might reuse addresses already generated in the past, and will not show past transactions.")]),t._v(" "),a("p",[t._v("By using this route, you can ask NBXplorer to rescan specific transactions found in the blockchain.\nThis way, the transactions and the UTXOs present before tracking the derivation scheme will appear correctly.")]),t._v(" "),a("p",[a("code",[t._v("HTTP POST v1/cryptos/{cryptoCode}/rescan")])]),t._v(" "),a("p",[t._v("Body:")]),t._v(" "),a("div",{staticClass:"language-json extra-class"},[a("pre",{pre:!0,attrs:{class:"language-json"}},[a("code",[a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("{")]),t._v("\n "),a("span",{pre:!0,attrs:{class:"token property"}},[t._v('"transactions"')]),a("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("[")]),t._v("\n "),a("span",{pre:!0,attrs:{class:"token comment"}},[t._v("// Specify the blockId and transactionId to scan. Your node must not be pruned for this to work.")]),t._v("\n "),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("{")]),t._v("\n "),a("span",{pre:!0,attrs:{class:"token property"}},[t._v('"blockId"')]),a("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),a("span",{pre:!0,attrs:{class:"token string"}},[t._v('"19b44484c79c40d4e74da406e25390348b86a252c1ab784cfd7198c724a0169f"')]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v("\n "),a("span",{pre:!0,attrs:{class:"token property"}},[t._v('"transactionId"')]),a("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),a("span",{pre:!0,attrs:{class:"token string"}},[t._v('"f83c7f31e2c39202bbbca619ab354ca8841721cf3440a253e056a7bea43e9745"')]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v("\n "),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("}")]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v("\n "),a("span",{pre:!0,attrs:{class:"token comment"}},[t._v("// Only the transactionId is specified. Your node must run --txindex=1 for this to work")]),t._v("\n "),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("{")]),t._v("\n "),a("span",{pre:!0,attrs:{class:"token property"}},[t._v('"transactionId"')]),a("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),a("span",{pre:!0,attrs:{class:"token string"}},[t._v('"754c14060b958de0ff4e77e2ccdca617964c939d40ec9a01ef21fca2aad78d00"')]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v("\n "),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("}")]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v("\n "),a("span",{pre:!0,attrs:{class:"token comment"}},[t._v("// This will index the transaction without using RPC. Careful: A wrong blockId will corrupt the database.")]),t._v("\n "),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("{")]),t._v("\n "),a("span",{pre:!0,attrs:{class:"token property"}},[t._v('"blockId"')]),a("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),a("span",{pre:!0,attrs:{class:"token string"}},[t._v('"19b44484c79c40d4e74da406e25390348b86a252c1ab784cfd7198c724a0169f"')]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v("\n "),a("span",{pre:!0,attrs:{class:"token property"}},[t._v('"transaction"')]),a("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),a("span",{pre:!0,attrs:{class:"token string"}},[t._v('"02000000000101008dd7aaa2fc21ef019aec409d934c9617a6dccce2774effe08d950b06144c750000000000feffffff026c3e2e12010000001600143072110b34b66acd9469b2882d6d57a8ae27183900e1f505000000001600140429b3eebb7d55c50ca36ace12ae874ff2fd16af0247304402202e32739cc6e42877699d4159159941f3cc39027c7626f9962cca9a865816d43502205389e9d6c1a4cab41f2c504413cf0f46a5c1f8814f368e03c9bf1f8017c6787e012103b8858085f2a0c9c906fb793bedb2c115c340de1f7b279d6099f675ddf3eec0bf67000000"')]),t._v("\n "),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("}")]),t._v("\n "),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("]")]),t._v("\n"),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("}")]),t._v("\n")])])]),a("p",[t._v("Returns:")]),t._v(" "),a("p",[t._v("HTTP 200")]),t._v(" "),a("p",[t._v("Error codes:")]),t._v(" "),a("ul",[a("li",[t._v("HTTP 400: "),a("code",[t._v("rpc-unavailable")])])]),t._v(" "),a("h2",{attrs:{id:"get-fee-rate"}},[a("a",{staticClass:"header-anchor",attrs:{href:"#get-fee-rate"}},[t._v("#")]),t._v(" "),a("a",{attrs:{name:"feerate"}}),t._v("Get fee rate")]),t._v(" "),a("p",[t._v("HTTP GET v1/cryptos/{cryptoCode}/fees/{blockCount}")]),t._v(" "),a("p",[t._v("Get expected fee rate for being confirmed in "),a("code",[t._v("blockCount")]),t._v(" blocks.")]),t._v(" "),a("p",[t._v("Error codes:")]),t._v(" "),a("ul",[a("li",[t._v("HTTP 400: "),a("code",[t._v("fee-estimation-unavailable")])]),t._v(" "),a("li",[t._v("HTTP 404: "),a("code",[t._v("cryptoCode-not-supported")])]),t._v(" "),a("li",[t._v("HTTP 400: "),a("code",[t._v("rpc-unavailable")])])]),t._v(" "),a("p",[t._v("Returns:")]),t._v(" "),a("div",{staticClass:"language-json extra-class"},[a("pre",{pre:!0,attrs:{class:"language-json"}},[a("code",[a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("{")]),t._v("\n "),a("span",{pre:!0,attrs:{class:"token property"}},[t._v('"feeRate"')]),a("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token number"}},[t._v("5")]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v("\n "),a("span",{pre:!0,attrs:{class:"token property"}},[t._v('"blockCount"')]),a("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token number"}},[t._v("1")]),t._v("\n"),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("}")]),t._v("\n")])])]),a("p",[t._v("The fee rate is in satoshi/byte.")]),t._v(" "),a("h2",{attrs:{id:"scan-utxo-set"}},[a("a",{staticClass:"header-anchor",attrs:{href:"#scan-utxo-set"}},[t._v("#")]),t._v(" "),a("a",{attrs:{name:"scanUtxoSet"}}),t._v("Scan UTXO Set")]),t._v(" "),a("p",[t._v("NBXplorer can scan the UTXO Set for output belonging to your derivationScheme.")]),t._v(" "),a("p",[a("code",[t._v("HTTP POST v1/cryptos/BTC/derivations/{derivationScheme}/utxos/scan")])]),t._v(" "),a("p",[t._v("In order to not consume too much RAM, NBXplorer splits the addresses to scan in several "),a("code",[t._v("batch")]),t._v(" and scan the whole UTXO set sequentially.\nThree branches are scanned: 0/x, 1/x and x.")]),t._v(" "),a("p",[t._v("If a UTXO in one branch get found at a specific x, then all addresses inferior to index x will be considered used and not proposed when fetching a new unused address.")]),t._v(" "),a("p",[t._v("Query parameters:")]),t._v(" "),a("ul",[a("li",[a("code",[t._v("batchSize")]),t._v(" the number of addresses scanned at once per derivation scheme branch (default: 1000)")]),t._v(" "),a("li",[a("code",[t._v("gapLimit")]),t._v(" If no UTXO are detected in this interval, the scan stop (default: 10000)")]),t._v(" "),a("li",[a("code",[t._v("from")]),t._v(" the first address index to check (default: 0)")])]),t._v(" "),a("p",[t._v("This call queue the request for scanning and returns immediately.")]),t._v(" "),a("p",[t._v("Error codes:")]),t._v(" "),a("ul",[a("li",[t._v("HTTP 405: "),a("code",[t._v("scanutxoset-not-suported")]),t._v(" ScanUTXOSet is not supported for this currency")]),t._v(" "),a("li",[t._v("HTTP 409: "),a("code",[t._v("scanutxoset-in-progress")]),t._v(" ScanUTXOSet has already been called for this derivationScheme")]),t._v(" "),a("li",[t._v("HTTP 400: "),a("code",[t._v("rpc-unavailable")])])]),t._v(" "),a("h2",{attrs:{id:"get-scan-status"}},[a("a",{staticClass:"header-anchor",attrs:{href:"#get-scan-status"}},[t._v("#")]),t._v(" Get scan status")]),t._v(" "),a("p",[t._v("You can poll the status of the scan. Note that if the scan is complete, the result will be kept for 24H.\nThe state can be:")]),t._v(" "),a("ul",[a("li",[a("code",[t._v("Queued")]),t._v(" the demand has been done, but the scan request is queuing to be started")]),t._v(" "),a("li",[a("code",[t._v("Pending")]),t._v(" the scan is in progress")]),t._v(" "),a("li",[a("code",[t._v("Complete")]),t._v(" the scan is successful")]),t._v(" "),a("li",[a("code",[t._v("Error")]),t._v(" the scan errored")])]),t._v(" "),a("div",{staticClass:"language-json extra-class"},[a("pre",{pre:!0,attrs:{class:"language-json"}},[a("code",[a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("{")]),t._v("\n "),a("span",{pre:!0,attrs:{class:"token property"}},[t._v('"error"')]),a("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token null keyword"}},[t._v("null")]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v("\n "),a("span",{pre:!0,attrs:{class:"token property"}},[t._v('"queuedAt"')]),a("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token number"}},[t._v("1540439841")]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v("\n "),a("span",{pre:!0,attrs:{class:"token property"}},[t._v('"status"')]),a("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token string"}},[t._v('"Pending"')]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v("\n "),a("span",{pre:!0,attrs:{class:"token property"}},[t._v('"progress"')]),a("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("{")]),t._v("\n "),a("span",{pre:!0,attrs:{class:"token property"}},[t._v('"startedAt"')]),a("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token number"}},[t._v("1540439841")]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v("\n "),a("span",{pre:!0,attrs:{class:"token property"}},[t._v('"completedAt"')]),a("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token null keyword"}},[t._v("null")]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v("\n "),a("span",{pre:!0,attrs:{class:"token property"}},[t._v('"found"')]),a("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token number"}},[t._v("2")]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v("\n "),a("span",{pre:!0,attrs:{class:"token property"}},[t._v('"batchNumber"')]),a("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token number"}},[t._v("9")]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v("\n "),a("span",{pre:!0,attrs:{class:"token property"}},[t._v('"remainingBatches"')]),a("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token number"}},[t._v("1")]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v("\n "),a("span",{pre:!0,attrs:{class:"token property"}},[t._v('"currentBatchProgress"')]),a("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token number"}},[t._v("50")]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v("\n "),a("span",{pre:!0,attrs:{class:"token property"}},[t._v('"remainingSeconds"')]),a("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token number"}},[t._v("10")]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v("\n "),a("span",{pre:!0,attrs:{class:"token property"}},[t._v('"overallProgress"')]),a("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token number"}},[t._v("91")]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v("\n "),a("span",{pre:!0,attrs:{class:"token property"}},[t._v('"from"')]),a("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token number"}},[t._v("900")]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v("\n "),a("span",{pre:!0,attrs:{class:"token property"}},[t._v('"count"')]),a("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token number"}},[t._v("100")]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v("\n "),a("span",{pre:!0,attrs:{class:"token property"}},[t._v('"totalSearched"')]),a("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token number"}},[t._v("2700")]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v("\n "),a("span",{pre:!0,attrs:{class:"token property"}},[t._v('"totalSizeOfUTXOSet"')]),a("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token null keyword"}},[t._v("null")]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v("\n "),a("span",{pre:!0,attrs:{class:"token property"}},[t._v('"highestKeyIndexFound"')]),a("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("{")]),t._v("\n "),a("span",{pre:!0,attrs:{class:"token property"}},[t._v('"change"')]),a("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token null keyword"}},[t._v("null")]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v("\n "),a("span",{pre:!0,attrs:{class:"token property"}},[t._v('"deposit"')]),a("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token number"}},[t._v("51")]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v("\n "),a("span",{pre:!0,attrs:{class:"token property"}},[t._v('"direct"')]),a("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token null keyword"}},[t._v("null")]),t._v("\n "),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("}")]),t._v("\n "),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("}")]),t._v("\n"),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("}")]),t._v("\n")])])]),a("p",[a("code",[t._v("TotalSizeOfUTXOSet")]),t._v(" is set only when the scan is complete.")]),t._v(" "),a("p",[t._v("Error codes:")]),t._v(" "),a("ul",[a("li",[t._v("HTTP 404 "),a("code",[t._v("scanutxoset-info-not-found")]),t._v(" if the scan has been done above the last 24H.")])]),t._v(" "),a("h2",{attrs:{id:"wipe-derivation-scheme-transactions"}},[a("a",{staticClass:"header-anchor",attrs:{href:"#wipe-derivation-scheme-transactions"}},[t._v("#")]),t._v(" "),a("a",{attrs:{name:"wipe"}}),t._v("Wipe derivation scheme transactions")]),t._v(" "),a("p",[t._v("Wipe all the transactions from a derivation scheme.")]),t._v(" "),a("p",[a("code",[t._v("HTTP POST cryptos/{cryptoCode}/derivations/{derivationScheme}/utxos/wipe")])]),t._v(" "),a("h2",{attrs:{id:"query-event-stream"}},[a("a",{staticClass:"header-anchor",attrs:{href:"#query-event-stream"}},[t._v("#")]),t._v(" "),a("a",{attrs:{name:"eventStream"}}),t._v("Query event stream")]),t._v(" "),a("p",[t._v("All notifications sent through websocket are also saved in a crypto specifc event stream.")]),t._v(" "),a("p",[a("code",[t._v("HTTP GET v1/cryptos/{cryptoCode}/events")])]),t._v(" "),a("p",[t._v("Query parameters:")]),t._v(" "),a("ul",[a("li",[a("code",[t._v("lastEventId")]),t._v(": Will query all events which happened after this event id, the first event has id 1 (default: 0)")]),t._v(" "),a("li",[a("code",[t._v("longPolling")]),t._v(": If no events have been received since "),a("code",[t._v("lastEventId")]),t._v(", the call will block (default: false)")]),t._v(" "),a("li",[a("code",[t._v("limit")]),t._v(": Limit the maximum number of events to return (default: null)")])]),t._v(" "),a("p",[t._v("All events are registered in a query stream which you can replay by keeping track of the "),a("code",[t._v("lastEventId")]),t._v(".\nThe smallest "),a("code",[t._v("eventId")]),t._v(" is 1.")]),t._v(" "),a("div",{staticClass:"language-json extra-class"},[a("pre",{pre:!0,attrs:{class:"language-json"}},[a("code",[a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("[")]),t._v("\n "),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("{")]),t._v("\n "),a("span",{pre:!0,attrs:{class:"token property"}},[t._v('"eventId"')]),a("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token number"}},[t._v("1")]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v("\n "),a("span",{pre:!0,attrs:{class:"token property"}},[t._v('"type"')]),a("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token string"}},[t._v('"newblock"')]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v("\n "),a("span",{pre:!0,attrs:{class:"token property"}},[t._v('"data"')]),a("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("{")]),t._v("\n "),a("span",{pre:!0,attrs:{class:"token property"}},[t._v('"height"')]),a("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token number"}},[t._v("104")]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v("\n "),a("span",{pre:!0,attrs:{class:"token property"}},[t._v('"hash"')]),a("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token string"}},[t._v('"1f31c605c0a5d54b65fa39dc8cb4db025be63c66280279ade9338571a9e63d35"')]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v("\n "),a("span",{pre:!0,attrs:{class:"token property"}},[t._v('"previousBlockHash"')]),a("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token string"}},[t._v('"7639350b31f3ce07ff976ebae772fef1602b30a10ccb8ca69047fe0fe8b9083c"')]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v("\n "),a("span",{pre:!0,attrs:{class:"token property"}},[t._v('"cryptoCode"')]),a("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token string"}},[t._v('"BTC"')]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v("\n "),a("span",{pre:!0,attrs:{class:"token property"}},[t._v('"confirmations"')]),a("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token number"}},[t._v("1")]),t._v("\n "),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("}")]),t._v("\n "),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("}")]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v("\n "),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("{")]),t._v("\n "),a("span",{pre:!0,attrs:{class:"token property"}},[t._v('"eventId"')]),a("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token number"}},[t._v("2")]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v("\n "),a("span",{pre:!0,attrs:{class:"token property"}},[t._v('"type"')]),a("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token string"}},[t._v('"newtransaction"')]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v("\n "),a("span",{pre:!0,attrs:{class:"token property"}},[t._v('"data"')]),a("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("{")]),t._v("\n "),a("span",{pre:!0,attrs:{class:"token property"}},[t._v('"blockId"')]),a("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token null keyword"}},[t._v("null")]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v("\n "),a("span",{pre:!0,attrs:{class:"token property"}},[t._v('"trackedSource"')]),a("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token string"}},[t._v('"DERIVATIONSCHEME:tpubD6NzVbkrYhZ4XfeFUTn2D4RQ7D5HpvnHywa3eZYhxZBriRTsfe8ZKFSDMcEMBqGrAighxxmq5VUqoRvo7DnNMS5VbJjRHwqDfCAMXLwAL5j"')]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v("\n "),a("span",{pre:!0,attrs:{class:"token property"}},[t._v('"derivationStrategy"')]),a("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token string"}},[t._v('"tpubD6NzVbkrYhZ4XfeFUTn2D4RQ7D5HpvnHywa3eZYhxZBriRTsfe8ZKFSDMcEMBqGrAighxxmq5VUqoRvo7DnNMS5VbJjRHwqDfCAMXLwAL5j"')]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v("\n "),a("span",{pre:!0,attrs:{class:"token property"}},[t._v('"transactionData"')]),a("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("{")]),t._v("\n "),a("span",{pre:!0,attrs:{class:"token property"}},[t._v('"confirmations"')]),a("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token number"}},[t._v("0")]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v("\n "),a("span",{pre:!0,attrs:{class:"token property"}},[t._v('"blockId"')]),a("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token null keyword"}},[t._v("null")]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v("\n "),a("span",{pre:!0,attrs:{class:"token property"}},[t._v('"transactionHash"')]),a("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token string"}},[t._v('"500359d971698c021587ea952bd38bd57dafc2b99615f71f7f978af394682737"')]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v("\n "),a("span",{pre:!0,attrs:{class:"token property"}},[t._v('"transaction"')]),a("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token string"}},[t._v('"0200000001b8af58c5dbed4bd0ea60ae8ba7e68e66143440b8c1c69b6eaaf719566676ab1b0000000048473044022040b419aeb9042a53fb2d03abec911901ed42fc50d6a143e322bc61d51e4e35a9022073c10fe827b53332d50fbde581e36ad31f57b98ec35a125562dc8c739762ec8901feffffff028c02102401000000160014b6bedaf0cb795c01a1e427bd7752d6ef058964f100e1f50500000000160014c5e0b07f40b8dbe69b22864d84d83d5b4120835368000000"')]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v("\n "),a("span",{pre:!0,attrs:{class:"token property"}},[t._v('"height"')]),a("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token null keyword"}},[t._v("null")]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v("\n "),a("span",{pre:!0,attrs:{class:"token property"}},[t._v('"timestamp"')]),a("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token number"}},[t._v("1542703963")]),t._v("\n "),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("}")]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v("\n "),a("span",{pre:!0,attrs:{class:"token property"}},[t._v('"outputs"')]),a("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("[")]),t._v("\n "),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("{")]),t._v("\n "),a("span",{pre:!0,attrs:{class:"token property"}},[t._v('"keyPath"')]),a("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token string"}},[t._v('"0/0"')]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v("\n "),a("span",{pre:!0,attrs:{class:"token property"}},[t._v('"scriptPubKey"')]),a("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token string"}},[t._v('"0014c5e0b07f40b8dbe69b22864d84d83d5b41208353"')]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v("\n "),a("span",{pre:!0,attrs:{class:"token property"}},[t._v('"address"')]),a("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token string"}},[t._v('"bcrt1qchstql6qhrd7dxezsexcfkpatdqjpq6nntvtrd"')]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v("\n "),a("span",{pre:!0,attrs:{class:"token property"}},[t._v('"index"')]),a("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token number"}},[t._v("1")]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v("\n "),a("span",{pre:!0,attrs:{class:"token property"}},[t._v('"value"')]),a("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token number"}},[t._v("100000000")]),t._v("\n "),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("}")]),t._v("\n "),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("]")]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v("\n "),a("span",{pre:!0,attrs:{class:"token property"}},[t._v('"cryptoCode"')]),a("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token string"}},[t._v('"BTC"')]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v("\n "),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("}")]),t._v("\n "),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("}")]),t._v("\n"),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("]")]),t._v("\n")])])]),a("h2",{attrs:{id:"query-event-stream-from-most-recent"}},[a("a",{staticClass:"header-anchor",attrs:{href:"#query-event-stream-from-most-recent"}},[t._v("#")]),t._v(" "),a("a",{attrs:{name:"eventStreamLatest"}}),t._v("Query event stream (from most recent)")]),t._v(" "),a("p",[t._v("Exact same as "),a("a",{attrs:{href:"#eventStream"}},[t._v("event stream")]),t._v(" but it returns a maximum number "),a("code",[t._v("#limit")]),t._v(" of the most recent events.")]),t._v(" "),a("p",[a("code",[t._v("HTTP GET v1/cryptos/{cryptoCode}/events/latest")])]),t._v(" "),a("p",[t._v("Query parameters:")]),t._v(" "),a("ul",[a("li",[a("code",[t._v("limit")]),t._v(": Limit the maximum number of events to return (default: 10)")])]),t._v(" "),a("h2",{attrs:{id:"create-partially-signed-bitcoin-transaction"}},[a("a",{staticClass:"header-anchor",attrs:{href:"#create-partially-signed-bitcoin-transaction"}},[t._v("#")]),t._v(" "),a("a",{attrs:{name:"psbt"}}),t._v("Create Partially Signed Bitcoin Transaction")]),t._v(" "),a("p",[t._v("Create a "),a("a",{attrs:{href:"https://github.com/bitcoin/bips/blob/master/bip-0174.mediawiki",target:"_blank",rel:"noopener noreferrer"}},[t._v("Partially Signed Bitcoin Transaction"),a("OutboundLink")],1),t._v(" (PSBT).")]),t._v(" "),a("p",[t._v("A PSBT is a standard format to represent a transaction with pending signatures associated to it.\nA PSBT can be signed independently by many signers, and combined together before broadcast.")]),t._v(" "),a("p",[a("code",[t._v("HTTP POST v1/cryptos/{cryptoCode}/derivations/{derivationScheme}/psbt/create")])]),t._v(" "),a("p",[t._v("Error codes:")]),t._v(" "),a("ul",[a("li",[t._v("HTTP 400: "),a("code",[t._v("not-enough-funds")])]),t._v(" "),a("li",[t._v("HTTP 400: "),a("code",[t._v("output-too-small")]),t._v(" (if the output on which the "),a("code",[t._v("substractFee=true")]),t._v(" is too small to cover the fees)")]),t._v(" "),a("li",[t._v("HTTP 400: "),a("code",[t._v("fee-estimation-unavailable")])]),t._v(" "),a("li",[t._v("HTTP 404: "),a("code",[t._v("cryptoCode-not-supported")])])]),t._v(" "),a("p",[t._v("Fields:")]),t._v(" "),a("div",{staticClass:"language-json extra-class"},[a("pre",{pre:!0,attrs:{class:"language-json"}},[a("code",[a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("{")]),t._v("\n "),a("span",{pre:!0,attrs:{class:"token property"}},[t._v('"seed"')]),a("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token number"}},[t._v("1")]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v("\n "),a("span",{pre:!0,attrs:{class:"token property"}},[t._v('"rbf"')]),a("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token boolean"}},[t._v("false")]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v("\n "),a("span",{pre:!0,attrs:{class:"token property"}},[t._v('"version"')]),a("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token number"}},[t._v("1")]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v("\n "),a("span",{pre:!0,attrs:{class:"token property"}},[t._v('"timeLock"')]),a("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token number"}},[t._v("512000")]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v("\n "),a("span",{pre:!0,attrs:{class:"token property"}},[t._v('"includeGlobalXPub"')]),a("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token boolean"}},[t._v("false")]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v("\n "),a("span",{pre:!0,attrs:{class:"token property"}},[t._v('"explicitChangeAddress"')]),a("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token string"}},[t._v('"mu5kevv6FiLygJfVvxQnB4hArXCUArMC7C"')]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v("\n "),a("span",{pre:!0,attrs:{class:"token property"}},[t._v('"destinations"')]),a("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("[")]),t._v("\n "),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("{")]),t._v("\n "),a("span",{pre:!0,attrs:{class:"token property"}},[t._v('"destination"')]),a("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token string"}},[t._v('"mu5kevv6FiLygJfVvxQnB4hArXCUArMC7C"')]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v("\n "),a("span",{pre:!0,attrs:{class:"token property"}},[t._v('"amount"')]),a("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token number"}},[t._v("50000000")]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v("\n "),a("span",{pre:!0,attrs:{class:"token property"}},[t._v('"substractFees"')]),a("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token boolean"}},[t._v("false")]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v("\n "),a("span",{pre:!0,attrs:{class:"token property"}},[t._v('"sweepAll"')]),a("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token boolean"}},[t._v("false")]),t._v("\n "),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("}")]),t._v("\n "),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("]")]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v("\n "),a("span",{pre:!0,attrs:{class:"token property"}},[t._v('"feePreference"')]),a("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("{")]),t._v("\n "),a("span",{pre:!0,attrs:{class:"token property"}},[t._v('"explicitFeeRate"')]),a("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token number"}},[t._v("10")]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v("\n "),a("span",{pre:!0,attrs:{class:"token property"}},[t._v('"explicitFee"')]),a("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token number"}},[t._v("23000")]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v("\n "),a("span",{pre:!0,attrs:{class:"token property"}},[t._v('"blockTarget"')]),a("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token number"}},[t._v("1")]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v("\n "),a("span",{pre:!0,attrs:{class:"token property"}},[t._v('"fallbackFeeRate"')]),a("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token number"}},[t._v("100")]),t._v("\n "),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("}")]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v("\n "),a("span",{pre:!0,attrs:{class:"token property"}},[t._v('"discourageFeeSniping"')]),a("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token boolean"}},[t._v("true")]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v("\n "),a("span",{pre:!0,attrs:{class:"token property"}},[t._v('"reserveChangeAddress"')]),a("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token boolean"}},[t._v("false")]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v("\n "),a("span",{pre:!0,attrs:{class:"token property"}},[t._v('"spendAllMatchingOutpoints"')]),a("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token boolean"}},[t._v("false")]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v("\n "),a("span",{pre:!0,attrs:{class:"token property"}},[t._v('"minConfirmations"')]),a("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token number"}},[t._v("0")]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v("\n "),a("span",{pre:!0,attrs:{class:"token property"}},[t._v('"excludeOutpoints"')]),a("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("[")]),t._v("\n "),a("span",{pre:!0,attrs:{class:"token string"}},[t._v('"7c02d7d6923ab5e9bbdadf7cf6873a5454ae5aa86d15308ed8d68840a79cf644-1"')]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v("\n "),a("span",{pre:!0,attrs:{class:"token string"}},[t._v('"7c02d7d6923ab5e9bbdadf7cf6873a5454ae5aa86d15308ed8d68840a79cf644-2"')]),t._v("\n "),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("]")]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v("\n "),a("span",{pre:!0,attrs:{class:"token property"}},[t._v('"includeOnlyOutpoints"')]),a("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("[")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token string"}},[t._v('"7c02d7d6923ab5e9bbdadf7cf6873a5454ae5aa86d15308ed8d68840a79cf644-1"')]),t._v(" "),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("]")]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v("\n "),a("span",{pre:!0,attrs:{class:"token property"}},[t._v('"minValue"')]),a("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token number"}},[t._v("1000")]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v("\n "),a("span",{pre:!0,attrs:{class:"token property"}},[t._v('"rebaseKeyPaths"')]),a("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("[")]),t._v("\n "),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("{")]),t._v("\n "),a("span",{pre:!0,attrs:{class:"token property"}},[t._v('"accountKey"')]),a("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token string"}},[t._v('"tpubD6NzVbkrYhZ4XfeFUTn2D4RQ7D5HpvnHywa3eZYhxZBriRTsfe8ZKFSDMcEMBqGrAighxxmq5VUqoRvo7DnNMS5VbJjRHwqDfCAMXLwAL5j"')]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v("\n "),a("span",{pre:!0,attrs:{class:"token property"}},[t._v('"accountKeyPath"')]),a("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token string"}},[t._v("\"ab5ed9ab/49'/0'/0'\"")]),t._v("\n "),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("}")]),t._v("\n "),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("]")]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v("\n "),a("span",{pre:!0,attrs:{class:"token property"}},[t._v('"disableFingerprintRandomization"')]),a("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token boolean"}},[t._v("false")]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v("\n "),a("span",{pre:!0,attrs:{class:"token property"}},[t._v('"alwaysIncludeNonWitnessUTXO"')]),a("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token boolean"}},[t._v("false")]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v("\n "),a("span",{pre:!0,attrs:{class:"token property"}},[t._v('"mergeOutputs"')]),a("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token boolean"}},[t._v("true")]),t._v("\n"),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("}")]),t._v("\n")])])]),a("ul",[a("li",[a("code",[t._v("seed")]),t._v(": Optional, default to null, a seed to specific to get a deterministic PSBT (useful for tests)")]),t._v(" "),a("li",[a("code",[t._v("version")]),t._v(": Optional, the version of the transaction (default: 1, if "),a("code",[t._v("disableFingerprintRandomization")]),t._v(" is "),a("code",[t._v("true")]),t._v(")")]),t._v(" "),a("li",[a("code",[t._v("timeLock")]),t._v(": Optional, The timelock of the transaction, activate RBF if not null (default: 0, if "),a("code",[t._v("disableFingerprintRandomization")]),t._v(" is "),a("code",[t._v("true")]),t._v(")")]),t._v(" "),a("li",[a("code",[t._v("includeGlobalXPub")]),t._v(": Optional. Whether or not to include the global xpubs of the derivation scheme in the PSBT. (default: false)")]),t._v(" "),a("li",[a("code",[t._v("rbf")]),t._v(": Optional, determine if the transaction should have Replace By Fee (RBF) activated (default: "),a("code",[t._v("true")]),t._v(", if "),a("code",[t._v("disableFingerprintRandomization")]),t._v(" is "),a("code",[t._v("true")]),t._v(")")]),t._v(" "),a("li",[a("code",[t._v("reserveChangeAddress")]),t._v(": default to false, whether the creation of this PSBT will reserve a new change address.")]),t._v(" "),a("li",[a("code",[t._v("spendAllMatchingOutpoints")]),t._v(": If "),a("code",[t._v("true")]),t._v(", all the UTXOs that have been selected will be used as input in the PSBT. (default to false)")]),t._v(" "),a("li",[a("code",[t._v("explicitChangeAddress")]),t._v(": default to null, use a specific change address (Optional, mutually exclusive with reserveChangeAddress)")]),t._v(" "),a("li",[a("code",[t._v("minConfirmations")]),t._v(": default to 0, the minimum confirmations a UTXO need to be selected. (by default unconfirmed and confirmed UTXO will be used)")]),t._v(" "),a("li",[a("code",[t._v("includeOnlyOutpoints")]),t._v(": Only select the following outpoints for creating the PSBT. Note that it can also select outpoints that has been already spent, but where the spending is unconfirmed, so it can be used for RBF. (default to null)")]),t._v(" "),a("li",[a("code",[t._v("excludeOutpoints")]),t._v(": Do not select the following outpoints for creating the PSBT (default to empty)")]),t._v(" "),a("li",[a("code",[t._v("minValue")]),t._v(": UTXO's with value below this amount will be ignored (default to null)")]),t._v(" "),a("li",[a("code",[t._v("destinations")]),t._v(": Required, the destinations where to send the money")]),t._v(" "),a("li",[a("code",[t._v("destinations[].destination")]),t._v(": Required, the destination address")]),t._v(" "),a("li",[a("code",[t._v("destinations[].amount")]),t._v(" Send this amount to the destination (Mutually exclusive with: sweepAll)")]),t._v(" "),a("li",[a("code",[t._v("destinations[].substractFees")]),t._v(" Default to false, will substract the fees of this transaction to this destination (Mutually exclusive with: sweepAll)")]),t._v(" "),a("li",[a("code",[t._v("destinations[].sweepAll")]),t._v(" Deault to false, will sweep all the balance of your wallet to this destination (Mutually exclusive with: amount, substractFees)")]),t._v(" "),a("li",[a("code",[t._v("feePreference")]),t._v(": Optional, determines how fees for the transaction are calculated, default to the full node estimation for 1 block target.")]),t._v(" "),a("li",[a("code",[t._v("feePreference.explicitFeeRate")]),t._v(": An explicit fee rate for the transaction in Satoshi per vBytes (Mutually exclusive with: blockTarget, explicitFee, fallbackFeeRate)")]),t._v(" "),a("li",[a("code",[t._v("feePreference.explicitFee")]),t._v(": An explicit fee for the transaction in Satoshi (Mutually exclusive with: blockTarget, explicitFeeRate, fallbackFeeRate)")]),t._v(" "),a("li",[a("code",[t._v("feePreference.blockTarget")]),t._v(": A number of blocks after which the user expect one confirmation (Mutually exclusive with: explicitFeeRate, explicitFee)")]),t._v(" "),a("li",[a("code",[t._v("feePreference.fallbackFeeRate")]),t._v(": If the NBXplorer's node does not have proper fee estimation, this specific rate will be use in Satoshi per vBytes, this make sure that "),a("code",[t._v("fee-estimation-unavailable")]),t._v(" is never sent. (Mutually exclusive with: explicitFeeRate, explicitFee)")]),t._v(" "),a("li",[a("code",[t._v("discourageFeeSniping")]),t._v(": If "),a("code",[t._v("timeLock")]),t._v(" is not set, set the timeLock to a random value to discourage fee sniping (default to "),a("code",[t._v("true")]),t._v(", if "),a("code",[t._v("disableFingerprintRandomization")]),t._v(" is "),a("code",[t._v("true")]),t._v(")")]),t._v(" "),a("li",[a("code",[t._v("rebaseKeyPaths")]),t._v(": Optional. rebase the hdkey paths (if no rebase, the key paths are relative to the xpub that NBXplorer knows about), a rebase can transform (PubKey0, 0/0, accountFingerprint) by (PubKey0, m/49'/0'/0/0, masterFingerprint)")]),t._v(" "),a("li",[a("code",[t._v("rebaseKeyPaths[].accountKey")]),t._v(": The account key to rebase")]),t._v(" "),a("li",[a("code",[t._v("rebaseKeyPaths[].accountKeyPath")]),t._v(": The path from the root to the account key prefixed by the master public key fingerprint.")]),t._v(" "),a("li",[a("code",[t._v("disableFingerprintRandomization")]),t._v(": Disable the randomization of default parameter's value to match the network's fingerprint distribution. (randomized default values are "),a("code",[t._v("version")]),t._v(", "),a("code",[t._v("timeLock")]),t._v(", "),a("code",[t._v("rbf")]),t._v(", "),a("code",[t._v("discourageFeeSniping")]),t._v(")")]),t._v(" "),a("li",[a("code",[t._v("alwaysIncludeNonWitnessUTXO")]),t._v(": Try to set the full transaction in "),a("code",[t._v("non_witness_utxo")]),t._v(", even for segwit inputs (default to "),a("code",[t._v("false")]),t._v(")")]),t._v(" "),a("li",[a("code",[t._v("mergeOutputs")]),t._v(": Optional, default to true, whether the outputs sending to the same scriptPubKey should be merged into a single output.")])]),t._v(" "),a("p",[t._v("Response:")]),t._v(" "),a("div",{staticClass:"language-json extra-class"},[a("pre",{pre:!0,attrs:{class:"language-json"}},[a("code",[a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("{")]),t._v("\n "),a("span",{pre:!0,attrs:{class:"token property"}},[t._v('"psbt"')]),a("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token string"}},[t._v('"cHNidP8BAHcBAAAAASjvZHM29AbxO4IGGHbk3IE82yciSQFr2Ihge7P9P1HeAQAAAAD/////AmzQMAEAAAAAGXapFG1/TpHnIajdweam5Z3V9s6oGWBRiKyAw8kBAAAAABl2qRSVNmCfrnVeIwVkuTrCR6EvRFCP7IisAAAAAAABAP10AQEAAAACe9C2c9VL+gfYpic4c+Wk/Nn7bvhewA82owtcUDo/tPoAAAAAakcwRAIgUlLS0SDj7IXeY44x21eUg16Vh4qbJe+NDQ/ywUrB84kCIGLU5Vec2bjL1DZhUmDueLrf0uh/PycOK7FWg/Ptvwi0ASED7OpQGf+HzIRwWKZ1Hmd8h6vxkFOt5RlJ3u/flzNTesv/////818+qp4hLnw9DWOD+a601fLjFciZ/4iCNT1M9g+kMvkAAAAAakcwRAIgfk+bUUYfRs6AU1mt5unV4fZxCit34g8pE5fsawUM7H0CIBGpSil8+JCHdAHxKU2I7CvEBzAyz3ggd9RlH+QQSnlkASEC/wwlQ07b3xdSQaEf+wRJEnzEJT2GPNTY4Wb3Gg1hxFz/////AoDw+gIAAAAAGXapFHoZHSjaWNcmJk7sSHvRG29RaqIiiKxQlPoCAAAAABl2qRTSKm2x4ITWeuYLwCv3PUDtt+CL+YisAAAAACIGA1KRWHyJqdpbUzuezCSzj4+bj1+gNWGEibLG0BMj9/RmDDAn+hsBAAAAAgAAAAAiAgIuwas0MohgjmGIXoOgS95USEDawK//ZqrVEi5UIfP/FAwwJ/obAQAAAAMAAAAAAA=="')]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v("\n "),a("span",{pre:!0,attrs:{class:"token property"}},[t._v('"changeAddress"')]),a("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token string"}},[t._v('"mqVvTQKsdJ36Z8m5uFWQSA5nhrJ5NHQ2Hs"')]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v("\n "),a("span",{pre:!0,attrs:{class:"token property"}},[t._v('"suggestions"')]),a("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v("\n "),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("{")]),t._v("\n "),a("span",{pre:!0,attrs:{class:"token property"}},[t._v('"shouldEnforceLowR"')]),a("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token boolean"}},[t._v("true")]),t._v("\n "),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("}")]),t._v("\n"),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("}")]),t._v("\n")])])]),a("ul",[a("li",[a("code",[t._v("psbt")]),t._v(": The partially signed bitcoin transaction in Base64.")]),t._v(" "),a("li",[a("code",[t._v("changeAddress")]),t._v(": The change address of the transaction, useful for tests (can be null)")]),t._v(" "),a("li",[a("code",[t._v("suggestions")]),t._v(": Suggestions to the signer of the PSBT (null value if "),a("code",[t._v("disableFingerprintRandomization")]),t._v(" is set to "),a("code",[t._v("false")]),t._v(")")]),t._v(" "),a("li",[a("code",[t._v("suggestions.shouldEnforceLowR")]),t._v(": If "),a("code",[t._v("true")]),t._v(", the signer should enforce the creation of 71 bytes ECDSA signature to maximize privacy.")])]),t._v(" "),a("p",[t._v("Note, in the example above, if the "),a("a",{attrs:{href:"#metadata"}},[t._v("metadata")]),t._v(" "),a("code",[t._v("AccountKeyPath")]),t._v(" is set to "),a("code",[t._v("ab5ed9ab/49'/0'/0'")]),t._v(", then you don't have to pass "),a("code",[t._v("rebaseKeyPaths")]),t._v(".")]),t._v(" "),a("h2",{attrs:{id:"update-partially-signed-bitcoin-transaction"}},[a("a",{staticClass:"header-anchor",attrs:{href:"#update-partially-signed-bitcoin-transaction"}},[t._v("#")]),t._v(" "),a("a",{attrs:{name:"updatepsbt"}}),t._v("Update Partially Signed Bitcoin Transaction")]),t._v(" "),a("p",[a("code",[t._v("HTTP POST v1/cryptos/{cryptoCode}/psbt/update")])]),t._v(" "),a("p",[t._v("NBXplorer will take to complete as much information as it can about this PSBT.")]),t._v(" "),a("div",{staticClass:"language-json extra-class"},[a("pre",{pre:!0,attrs:{class:"language-json"}},[a("code",[a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("{")]),t._v("\n "),a("span",{pre:!0,attrs:{class:"token property"}},[t._v('"psbt"')]),a("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token string"}},[t._v('"cHNidP8BAHcBAAAAASjvZHM29AbxO4IGGHbk3IE82yciSQFr2Ihge7P9P1HeAQAAAAD/////AmzQMAEAAAAAGXapFG1/TpHnIajdweam5Z3V9s6oGWBRiKyAw8kBAAAAABl2qRSVNmCfrnVeIwVkuTrCR6EvRFCP7IisAAAAAAABAP10AQEAAAACe9C2c9VL+gfYpic4c+Wk/Nn7bvhewA82owtcUDo/tPoAAAAAakcwRAIgUlLS0SDj7IXeY44x21eUg16Vh4qbJe+NDQ/ywUrB84kCIGLU5Vec2bjL1DZhUmDueLrf0uh/PycOK7FWg/Ptvwi0ASED7OpQGf+HzIRwWKZ1Hmd8h6vxkFOt5RlJ3u/flzNTesv/////818+qp4hLnw9DWOD+a601fLjFciZ/4iCNT1M9g+kMvkAAAAAakcwRAIgfk+bUUYfRs6AU1mt5unV4fZxCit34g8pE5fsawUM7H0CIBGpSil8+JCHdAHxKU2I7CvEBzAyz3ggd9RlH+QQSnlkASEC/wwlQ07b3xdSQaEf+wRJEnzEJT2GPNTY4Wb3Gg1hxFz/////AoDw+gIAAAAAGXapFHoZHSjaWNcmJk7sSHvRG29RaqIiiKxQlPoCAAAAABl2qRTSKm2x4ITWeuYLwCv3PUDtt+CL+YisAAAAACIGA1KRWHyJqdpbUzuezCSzj4+bj1+gNWGEibLG0BMj9/RmDDAn+hsBAAAAAgAAAAAiAgIuwas0MohgjmGIXoOgS95USEDawK//ZqrVEi5UIfP/FAwwJ/obAQAAAAMAAAAAAA=="')]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v("\n "),a("span",{pre:!0,attrs:{class:"token property"}},[t._v('"derivationScheme"')]),a("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token string"}},[t._v('"tpubD6NzVbkrYhZ4WcPozSqALNCrJEt4C45sPDhEBBuokoCeDgjX6YTs4QVvhD9kao6f2uZLqZF4qcXprYyRqooSXr1uPp1KPH1o4m6aw9nxbiA"')]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v("\n "),a("span",{pre:!0,attrs:{class:"token property"}},[t._v('"includeGlobalXPub"')]),a("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token boolean"}},[t._v("false")]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v("\n "),a("span",{pre:!0,attrs:{class:"token property"}},[t._v('"rebaseKeyPaths"')]),a("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("[")]),t._v("\n "),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("{")]),t._v("\n "),a("span",{pre:!0,attrs:{class:"token property"}},[t._v('"accountKey"')]),a("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token string"}},[t._v('"tpubD6NzVbkrYhZ4XfeFUTn2D4RQ7D5HpvnHywa3eZYhxZBriRTsfe8ZKFSDMcEMBqGrAighxxmq5VUqoRvo7DnNMS5VbJjRHwqDfCAMXLwAL5j"')]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v("\n "),a("span",{pre:!0,attrs:{class:"token property"}},[t._v('"accountKeyPath"')]),a("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token string"}},[t._v("\"ab5ed9ab/49'/0'/0'\"")]),t._v("\n "),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("}")]),t._v("\n "),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("]")]),t._v("\n"),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("}")]),t._v("\n")])])]),a("ul",[a("li",[a("code",[t._v("psbt")]),t._v(": Required. A potentially incomplete PSBT that you want to update (Input WitnessUTXO, NonWitnessUTXO)")]),t._v(" "),a("li",[a("code",[t._v("derivationScheme")]),t._v(": Optional. If specified, will complete HDKeyPaths, witness script and redeem script information in the PSBT belonging to this derivationScheme.")]),t._v(" "),a("li",[a("code",[t._v("includeGlobalXPub")]),t._v(": Optional. Whether or not to include the global xpubs of the derivation scheme in the PSBT. (default: false)")]),t._v(" "),a("li",[a("code",[t._v("rebaseKeyPaths")]),t._v(": Optional. Rebase the hdkey paths (if no rebase, the key paths are relative to the xpub that NBXplorer knows about), a rebase can transform (PubKey0, 0/0, accountFingerprint) by (PubKey0, m/49'/0'/0/0, masterFingerprint)")]),t._v(" "),a("li",[a("code",[t._v("rebaseKeyPaths[].accountKey")]),t._v(": The account key to rebase")]),t._v(" "),a("li",[a("code",[t._v("rebaseKeyPaths[].accountKeyPath")]),t._v(": The path from the root to the account key prefixed by the master public key fingerprint.")]),t._v(" "),a("li",[a("code",[t._v("alwaysIncludeNonWitnessUTXO")]),t._v(": Try to set the full transaction in "),a("code",[t._v("non_witness_utxo")]),t._v(", even for segwit inputs (default to "),a("code",[t._v("false")]),t._v(")")])]),t._v(" "),a("p",[t._v("Response:")]),t._v(" "),a("div",{staticClass:"language-json extra-class"},[a("pre",{pre:!0,attrs:{class:"language-json"}},[a("code",[a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("{")]),t._v("\n "),a("span",{pre:!0,attrs:{class:"token property"}},[t._v('"psbt"')]),a("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token string"}},[t._v('"cHNidP8BAHcBAAAAASjvZHM29AbxO4IGGHbk3IE82yciSQFr2Ihge7P9P1HeAQAAAAD/////AmzQMAEAAAAAGXapFG1/TpHnIajdweam5Z3V9s6oGWBRiKyAw8kBAAAAABl2qRSVNmCfrnVeIwVkuTrCR6EvRFCP7IisAAAAAAABAP10AQEAAAACe9C2c9VL+gfYpic4c+Wk/Nn7bvhewA82owtcUDo/tPoAAAAAakcwRAIgUlLS0SDj7IXeY44x21eUg16Vh4qbJe+NDQ/ywUrB84kCIGLU5Vec2bjL1DZhUmDueLrf0uh/PycOK7FWg/Ptvwi0ASED7OpQGf+HzIRwWKZ1Hmd8h6vxkFOt5RlJ3u/flzNTesv/////818+qp4hLnw9DWOD+a601fLjFciZ/4iCNT1M9g+kMvkAAAAAakcwRAIgfk+bUUYfRs6AU1mt5unV4fZxCit34g8pE5fsawUM7H0CIBGpSil8+JCHdAHxKU2I7CvEBzAyz3ggd9RlH+QQSnlkASEC/wwlQ07b3xdSQaEf+wRJEnzEJT2GPNTY4Wb3Gg1hxFz/////AoDw+gIAAAAAGXapFHoZHSjaWNcmJk7sSHvRG29RaqIiiKxQlPoCAAAAABl2qRTSKm2x4ITWeuYLwCv3PUDtt+CL+YisAAAAACIGA1KRWHyJqdpbUzuezCSzj4+bj1+gNWGEibLG0BMj9/RmDDAn+hsBAAAAAgAAAAAiAgIuwas0MohgjmGIXoOgS95USEDawK//ZqrVEi5UIfP/FAwwJ/obAQAAAAMAAAAAAA=="')]),t._v("\n"),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("}")]),t._v("\n")])])]),a("p",[t._v("Note, in the example above, if the "),a("a",{attrs:{href:"#metadata"}},[t._v("metadata")]),t._v(" "),a("code",[t._v("AccountKeyPath")]),t._v(" is set to "),a("code",[t._v("ab5ed9ab/49'/0'/0'")]),t._v(", then you don't have to pass "),a("code",[t._v("rebaseKeyPaths")]),t._v(".")]),t._v(" "),a("h2",{attrs:{id:"attach-metadata-to-a-derivation-scheme"}},[a("a",{staticClass:"header-anchor",attrs:{href:"#attach-metadata-to-a-derivation-scheme"}},[t._v("#")]),t._v(" "),a("a",{attrs:{name:"metadata"}}),t._v("Attach metadata to a derivation scheme")]),t._v(" "),a("p",[t._v("You can attach JSON metadata to a derivation scheme:")]),t._v(" "),a("p",[a("code",[t._v("HTTP POST v1/cryptos/{cryptoCode}/derivations/{derivationScheme}/metadata/{key}")])]),t._v(" "),a("p",[t._v("The body can be any JSON token.")]),t._v(" "),a("p",[t._v("Body:")]),t._v(" "),a("div",{staticClass:"language-json extra-class"},[a("pre",{pre:!0,attrs:{class:"language-json"}},[a("code",[a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("{")]),t._v("\n "),a("span",{pre:!0,attrs:{class:"token property"}},[t._v('"example"')]),a("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token string"}},[t._v('"value"')]),t._v("\n"),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("}")]),t._v("\n")])])]),a("h2",{attrs:{id:"detach-metadata-from-a-derivation-scheme"}},[a("a",{staticClass:"header-anchor",attrs:{href:"#detach-metadata-from-a-derivation-scheme"}},[t._v("#")]),t._v(" "),a("a",{attrs:{name:"detachmetadata"}}),t._v("Detach metadata from a derivation scheme")]),t._v(" "),a("p",[a("code",[t._v("HTTP POST v1/cryptos/{cryptoCode}/derivations/{derivationScheme}/metadata/{key}")]),t._v(" "),a("code",[t._v("HTTP POST v1/cryptos/{cryptoCode}/addresses/{derivationScheme}/metadata/{key}")]),t._v(" "),a("code",[t._v("HTTP POST v1/groups/{derivationScheme}/metadata/{key}")])]),t._v(" "),a("p",[t._v("Call without body and without content type.")]),t._v(" "),a("h2",{attrs:{id:"retrieve-metadata-from-a-derivation-scheme"}},[a("a",{staticClass:"header-anchor",attrs:{href:"#retrieve-metadata-from-a-derivation-scheme"}},[t._v("#")]),t._v(" "),a("a",{attrs:{name:"getmetadata"}}),t._v("Retrieve metadata from a derivation scheme")]),t._v(" "),a("p",[t._v("You retrieve the JSON metadata of a derivation scheme:")]),t._v(" "),a("p",[a("code",[t._v("HTTP GET v1/cryptos/{cryptoCode}/derivations/{derivationScheme}/metadata/{key}")]),t._v(" "),a("code",[t._v("HTTP GET v1/cryptos/{cryptoCode}/addresses/{derivationScheme}/metadata/{key}")]),t._v(" "),a("code",[t._v("HTTP GET v1/groups/{derivationScheme}/metadata/{key}")])]),t._v(" "),a("p",[t._v("Error codes:")]),t._v(" "),a("ul",[a("li",[t._v("HTTP 404: The key is not found")])]),t._v(" "),a("p",[t._v("The body can be any piece of JSON.")]),t._v(" "),a("p",[t._v("Body:")]),t._v(" "),a("div",{staticClass:"language-json extra-class"},[a("pre",{pre:!0,attrs:{class:"language-json"}},[a("code",[a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("{")]),t._v("\n "),a("span",{pre:!0,attrs:{class:"token property"}},[t._v('"example"')]),a("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token string"}},[t._v('"value"')]),t._v("\n"),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("}")]),t._v("\n")])])]),a("h2",{attrs:{id:"manual-pruning"}},[a("a",{staticClass:"header-anchor",attrs:{href:"#manual-pruning"}},[t._v("#")]),t._v(" "),a("a",{attrs:{name:"pruning"}}),t._v("Manual pruning")]),t._v(" "),a("p",[t._v("NBXplorer has an auto pruning feature configurable with "),a("code",[t._v("--autopruning x")]),t._v(" where "),a("code",[t._v("x")]),t._v(" is in second. If a call to NBXplorer's "),a("code",[t._v("Get utxo")]),t._v(" or "),a("code",[t._v("Get PSBT")]),t._v(" takes more time than "),a("code",[t._v("x seconds")]),t._v(", then the auto pruning will delete transactions whose all UTXOs have been already spent and which are old enough.")]),t._v(" "),a("p",[t._v("You can however force pruning by calling:")]),t._v(" "),a("p",[a("code",[t._v("HTTP POST v1/cryptos/{cryptoCode}/derivations/{derivationScheme}/prune")])]),t._v(" "),a("p",[t._v("Request:")]),t._v(" "),a("div",{staticClass:"language-json extra-class"},[a("pre",{pre:!0,attrs:{class:"language-json"}},[a("code",[a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("{")]),t._v("\n "),a("span",{pre:!0,attrs:{class:"token property"}},[t._v('"daysToKeep"')]),a("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token number"}},[t._v("1.0")]),t._v("\n"),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("}")]),t._v("\n")])])]),a("ul",[a("li",[a("code",[t._v("daysToKeep")]),t._v(": Optional. The number of days of history to keep. (Default: 1.0)")])]),t._v(" "),a("p",[t._v("Response:")]),t._v(" "),a("div",{staticClass:"language-json extra-class"},[a("pre",{pre:!0,attrs:{class:"language-json"}},[a("code",[a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("{")]),t._v("\n "),a("span",{pre:!0,attrs:{class:"token property"}},[t._v('"totalPruned"')]),a("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token number"}},[t._v("10")]),t._v("\n"),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("}")]),t._v("\n")])])]),a("ul",[a("li",[a("code",[t._v("totalPruned")]),t._v(" is the number of transactions pruned from the derivation scheme")])]),t._v(" "),a("h2",{attrs:{id:"generate-a-wallet"}},[a("a",{staticClass:"header-anchor",attrs:{href:"#generate-a-wallet"}},[t._v("#")]),t._v(" "),a("a",{attrs:{name:"wallet"}}),t._v("Generate a wallet")]),t._v(" "),a("p",[t._v("NBXplorer will generate and save a mnemonic and create a derivationScheme.")]),t._v(" "),a("p",[a("code",[t._v("HTTP POST v1/cryptos/{cryptoCode}/derivations")])]),t._v(" "),a("p",[t._v("Request:")]),t._v(" "),a("div",{staticClass:"language-json extra-class"},[a("pre",{pre:!0,attrs:{class:"language-json"}},[a("code",[a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("{")]),t._v("\n "),a("span",{pre:!0,attrs:{class:"token property"}},[t._v('"accountNumber"')]),a("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token number"}},[t._v("2")]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v("\n "),a("span",{pre:!0,attrs:{class:"token property"}},[t._v('"wordList"')]),a("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token string"}},[t._v('"French"')]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v("\n "),a("span",{pre:!0,attrs:{class:"token property"}},[t._v('"existingMnemonic"')]),a("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token string"}},[t._v('"musicien sinistre divertir réussir louve alliage péplum innocent filmer stipuler chignon utopie effusion heureux légal"')]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v("\n "),a("span",{pre:!0,attrs:{class:"token property"}},[t._v('"wordCount"')]),a("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token number"}},[t._v("15")]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v("\n "),a("span",{pre:!0,attrs:{class:"token property"}},[t._v('"scriptPubKeyType"')]),a("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token string"}},[t._v('"SegwitP2SH"')]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v("\n "),a("span",{pre:!0,attrs:{class:"token property"}},[t._v('"passphrase"')]),a("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token string"}},[t._v('"hello"')]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v("\n "),a("span",{pre:!0,attrs:{class:"token property"}},[t._v('"importKeysToRPC"')]),a("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token boolean"}},[t._v("true")]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v("\n "),a("span",{pre:!0,attrs:{class:"token property"}},[t._v('"savePrivateKeys"')]),a("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token boolean"}},[t._v("true")]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v("\n "),a("span",{pre:!0,attrs:{class:"token property"}},[t._v('"additionalOptions"')]),a("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("{")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token property"}},[t._v('"slip77"')]),a("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token string"}},[t._v('"6c2de18eabeff3f7822bc724ad482bef0557f3e1c1e1c75b7a393a5ced4de616"')]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("}")]),t._v("\n"),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("}")]),t._v("\n")])])]),a("ul",[a("li",[a("code",[t._v("accountNumber")]),t._v(": Optional, the account number used for determining the keypath that NBXplorer will track, see "),a("code",[t._v("accountKeyPath")]),t._v(" in the response. (Default: "),a("code",[t._v("0")]),t._v(")")]),t._v(" "),a("li",[a("code",[t._v("existingMnemonic")]),t._v(": Optional, an existing "),a("a",{attrs:{href:"https://github.com/bitcoin/bips/blob/master/bip-0039.mediawiki",target:"_blank",rel:"noopener noreferrer"}},[t._v("BIP39"),a("OutboundLink")],1),t._v(" mnemonic seed to import instead of generating.")]),t._v(" "),a("li",[a("code",[t._v("wordList")]),t._v(": Optional, the "),a("a",{attrs:{href:"https://github.com/bitcoin/bips/blob/master/bip-0039.mediawiki",target:"_blank",rel:"noopener noreferrer"}},[t._v("BIP39"),a("OutboundLink")],1),t._v(" wordlist to use when generating the mnemonic, available: English, French, Japanese, Spanish, ChineseSimplified (Defaut: "),a("code",[t._v("English")]),t._v(")")]),t._v(" "),a("li",[a("code",[t._v("wordCount")]),t._v(": Optional, the "),a("a",{attrs:{href:"https://github.com/bitcoin/bips/blob/master/bip-0039.mediawiki",target:"_blank",rel:"noopener noreferrer"}},[t._v("BIP39"),a("OutboundLink")],1),t._v(" word count in the mnemonic (Default: "),a("code",[t._v("12")]),t._v(")")]),t._v(" "),a("li",[a("code",[t._v("scriptPubKeyType")]),t._v(": Optional, the type of scriptPubKey (address) to generate, available: Legacy, Segwit, SegwitP2SH, Taproot (Default: "),a("code",[t._v("Segwit")]),t._v(" or "),a("code",[t._v("Legacy")]),t._v(" if "),a("code",[t._v("cryptoCode")]),t._v(" does not support segwit)")]),t._v(" "),a("li",[a("code",[t._v("passphrase")]),t._v(": Optional, the "),a("a",{attrs:{href:"https://github.com/bitcoin/bips/blob/master/bip-0039.mediawiki",target:"_blank",rel:"noopener noreferrer"}},[t._v("BIP39"),a("OutboundLink")],1),t._v(" passphrase. (Default: empty string)")]),t._v(" "),a("li",[a("code",[t._v("importKeysToRPC")]),t._v(": Optional, if true, every times a call to "),a("a",{attrs:{href:"#unused"}},[t._v("get a new unused address")]),t._v(" is called, the private key will be imported into the underlying node via RPC's "),a("code",[t._v("importprivkey")]),t._v(". (Default: "),a("code",[t._v("false")]),t._v(")")]),t._v(" "),a("li",[a("code",[t._v("savePrivateKeys")]),t._v(": If true, private keys will be saved inside the following metadata "),a("code",[t._v("Mnemonic")]),t._v(", "),a("code",[t._v("MasterHDKey")]),t._v(" and "),a("code",[t._v("AccountHDKey")]),t._v(".")]),t._v(" "),a("li",[a("code",[t._v("additionalOptions")]),t._v(": Optional, additional options that a derivation scheme of some networks may support, such as "),a("a",{attrs:{href:"#liquid"}},[t._v("Liquid")])])]),t._v(" "),a("p",[t._v("The "),a("code",[t._v("importKeysToRPC")]),t._v(" is only useful if one need to manage his wallet via the node's cli tooling.")]),t._v(" "),a("p",[t._v("Response:")]),t._v(" "),a("div",{staticClass:"language-json extra-class"},[a("pre",{pre:!0,attrs:{class:"language-json"}},[a("code",[a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("{")]),t._v("\n "),a("span",{pre:!0,attrs:{class:"token property"}},[t._v('"mnemonic"')]),a("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token string"}},[t._v('"musicien sinistre divertir réussir louve alliage péplum innocent filmer stipuler chignon utopie effusion heureux légal"')]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v("\n "),a("span",{pre:!0,attrs:{class:"token property"}},[t._v('"passphrase"')]),a("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token string"}},[t._v('"hello"')]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v("\n "),a("span",{pre:!0,attrs:{class:"token property"}},[t._v('"wordList"')]),a("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token string"}},[t._v('"French"')]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v("\n "),a("span",{pre:!0,attrs:{class:"token property"}},[t._v('"wordCount"')]),a("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token number"}},[t._v("15")]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v("\n "),a("span",{pre:!0,attrs:{class:"token property"}},[t._v('"masterHDKey"')]),a("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token string"}},[t._v('"tprv8ZgxMBicQKsPdv26BvirqqQCZJPSYEkSW7Por7a7r2PpsCUKHjjT18Gwk8k4FtkvqvakMFnsv9uaXHHoibieRd5BMhGCPYxVLaVY9vqpaxb"')]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v("\n "),a("span",{pre:!0,attrs:{class:"token property"}},[t._v('"accountHDKey"')]),a("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token string"}},[t._v('"tprv8gPRns62uoh4zbRatcxUWZY7aX3XsTchHBp79YL6E3fEocsgd6XjThU4r7E3iUemBffeLSjcjXyD1VrmHMwNceVipFL7txTFMgKm4kehuSR"')]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v("\n "),a("span",{pre:!0,attrs:{class:"token property"}},[t._v('"accountKeyPath"')]),a("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token string"}},[t._v("\"a0aa59b4/49'/1'/2'\"")]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v("\n "),a("span",{pre:!0,attrs:{class:"token property"}},[t._v('"accountDescriptor"')]),a("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token string"}},[t._v("\"sh(wpkh([a0aa59b4/49'/1'/2']tpubDD5TwH8H4BNjt4TNnGd4uyCE9YZU2nobrVQtS4NPeKTde78TFVMKeC5w2G1nj7amQbGDptv4FtDBLuVQhofegQaZdFVuuxuCGpZQ4jZ6L5q))\"")]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v("\n "),a("span",{pre:!0,attrs:{class:"token property"}},[t._v('"derivationScheme"')]),a("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token string"}},[t._v('"tpubDD5TwH8H4BNjt4TNnGd4uyCE9YZU2nobrVQtS4NPeKTde78TFVMKeC5w2G1nj7amQbGDptv4FtDBLuVQhofegQaZdFVuuxuCGpZQ4jZ6L5q-[p2sh]"')]),t._v("\n"),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("}")]),t._v("\n")])])]),a("ul",[a("li",[a("code",[t._v("mnemonic")]),t._v(": The generated "),a("a",{attrs:{href:"https://github.com/bitcoin/bips/blob/master/bip-0039.mediawiki",target:"_blank",rel:"noopener noreferrer"}},[t._v("BIP39"),a("OutboundLink")],1),t._v(" mnemonic.")]),t._v(" "),a("li",[a("code",[t._v("passphrase")]),t._v(": The "),a("a",{attrs:{href:"https://github.com/bitcoin/bips/blob/master/bip-0039.mediawiki",target:"_blank",rel:"noopener noreferrer"}},[t._v("BIP39"),a("OutboundLink")],1),t._v(" passphrase.")]),t._v(" "),a("li",[a("code",[t._v("wordList")]),t._v(": The "),a("a",{attrs:{href:"https://github.com/bitcoin/bips/blob/master/bip-0039.mediawiki",target:"_blank",rel:"noopener noreferrer"}},[t._v("BIP39"),a("OutboundLink")],1),t._v(" wordlist to use when generating the mnemonic.")]),t._v(" "),a("li",[a("code",[t._v("wordCount")]),t._v(": The "),a("a",{attrs:{href:"https://github.com/bitcoin/bips/blob/master/bip-0039.mediawiki",target:"_blank",rel:"noopener noreferrer"}},[t._v("BIP39"),a("OutboundLink")],1),t._v(" word count in the mnemonic.")]),t._v(" "),a("li",[a("code",[t._v("masterHDKey")]),t._v(": The "),a("a",{attrs:{href:"https://github.com/bitcoin/bips/blob/master/bip-0032.mediawiki",target:"_blank",rel:"noopener noreferrer"}},[t._v("BIP32"),a("OutboundLink")],1),t._v(" master key derived from the mnemonic and passphrase.")]),t._v(" "),a("li",[a("code",[t._v("accountHDKey")]),t._v(": The "),a("a",{attrs:{href:"https://github.com/bitcoin/bips/blob/master/bip-0032.mediawiki",target:"_blank",rel:"noopener noreferrer"}},[t._v("BIP32"),a("OutboundLink")],1),t._v(" account key derived from the "),a("code",[t._v("masterHDKey")]),t._v(" and "),a("code",[t._v("accountKeyPath")]),t._v(".")]),t._v(" "),a("li",[a("code",[t._v("accountKeyPath")]),t._v(": The fingerprint of the master key as defined by The "),a("a",{attrs:{href:"https://github.com/bitcoin/bips/blob/master/bip-0174.mediawiki",target:"_blank",rel:"noopener noreferrer"}},[t._v("BIP174"),a("OutboundLink")],1),t._v(", followed by the derivation path used to generate the "),a("code",[t._v("derivationScheme")]),t._v(". ("),a("a",{attrs:{href:"https://github.com/bitcoin/bips/blob/master/bip-0043.mediawiki",target:"_blank",rel:"noopener noreferrer"}},[t._v("Purpose field"),a("OutboundLink")],1),t._v(" based on "),a("a",{attrs:{href:"https://github.com/bitcoin/bips/blob/master/bip-0044.mediawiki",target:"_blank",rel:"noopener noreferrer"}},[t._v("BIP44"),a("OutboundLink")],1),t._v(", "),a("a",{attrs:{href:"https://github.com/bitcoin/bips/blob/master/bip-0049.mediawiki",target:"_blank",rel:"noopener noreferrer"}},[t._v("BIP49"),a("OutboundLink")],1),t._v(" or "),a("a",{attrs:{href:"https://github.com/bitcoin/bips/blob/master/bip-0084.mediawiki",target:"_blank",rel:"noopener noreferrer"}},[t._v("BIP84"),a("OutboundLink")],1),t._v(" and "),a("a",{attrs:{href:"https://github.com/satoshilabs/slips/blob/master/slip-0044.md",target:"_blank",rel:"noopener noreferrer"}},[t._v("SLIP44"),a("OutboundLink")],1),t._v(" for the coin type)")]),t._v(" "),a("li",[a("code",[t._v("accountDescriptor")]),t._v(": The output descriptor of the created account public key.")]),t._v(" "),a("li",[a("code",[t._v("derivationScheme")]),t._v(": The "),a("a",{attrs:{href:"#derivationScheme"}},[t._v("derivation scheme")]),t._v(" that is being tracked by NBXplorer.")])]),t._v(" "),a("p",[a("a",{attrs:{href:"#metadata"}},[t._v("Metadata")]),t._v(" for this derivation scheme after this call:")]),t._v(" "),a("ul",[a("li",[a("code",[t._v("Mnemonic")]),t._v(": The mnemonic generated. (if "),a("code",[t._v("savePrivateKeys")]),t._v(" is "),a("code",[t._v("true")]),t._v(")")]),t._v(" "),a("li",[a("code",[t._v("MasterHDKey")]),t._v(": The "),a("a",{attrs:{href:"https://github.com/bitcoin/bips/blob/master/bip-0032.mediawiki",target:"_blank",rel:"noopener noreferrer"}},[t._v("xpriv"),a("OutboundLink")],1),t._v(" master key generated by the mnemonic and passphrase. (if "),a("code",[t._v("savePrivateKeys")]),t._v(" is "),a("code",[t._v("true")]),t._v(")")]),t._v(" "),a("li",[a("code",[t._v("AccountHDKey")]),t._v(": The derived "),a("a",{attrs:{href:"https://github.com/bitcoin/bips/blob/master/bip-0032.mediawiki",target:"_blank",rel:"noopener noreferrer"}},[t._v("xpriv"),a("OutboundLink")],1),t._v(" account key from the "),a("code",[t._v("MasterHDKey")]),t._v(" and "),a("code",[t._v("AccountKeyPath")]),t._v(". (if "),a("code",[t._v("savePrivateKeys")]),t._v(" is "),a("code",[t._v("true")]),t._v(")")]),t._v(" "),a("li",[a("code",[t._v("AccountKeyPath")]),t._v(": The fingerprint of the master key as defined by The "),a("a",{attrs:{href:"https://github.com/bitcoin/bips/blob/master/bip-0174.mediawiki",target:"_blank",rel:"noopener noreferrer"}},[t._v("BIP174"),a("OutboundLink")],1),t._v(", followed by the derivation path used to generate the "),a("code",[t._v("derivationScheme")]),t._v(". ("),a("a",{attrs:{href:"https://github.com/bitcoin/bips/blob/master/bip-0043.mediawiki",target:"_blank",rel:"noopener noreferrer"}},[t._v("Purpose field"),a("OutboundLink")],1),t._v(" based on "),a("a",{attrs:{href:"https://github.com/bitcoin/bips/blob/master/bip-0044.mediawiki",target:"_blank",rel:"noopener noreferrer"}},[t._v("BIP44"),a("OutboundLink")],1),t._v(", "),a("a",{attrs:{href:"https://github.com/bitcoin/bips/blob/master/bip-0049.mediawiki",target:"_blank",rel:"noopener noreferrer"}},[t._v("BIP49"),a("OutboundLink")],1),t._v(" or "),a("a",{attrs:{href:"https://github.com/bitcoin/bips/blob/master/bip-0084.mediawiki",target:"_blank",rel:"noopener noreferrer"}},[t._v("BIP84"),a("OutboundLink")],1),t._v(" and "),a("a",{attrs:{href:"https://github.com/satoshilabs/slips/blob/master/slip-0044.md",target:"_blank",rel:"noopener noreferrer"}},[t._v("SLIP44"),a("OutboundLink")],1),t._v(" for the coin type)")]),t._v(" "),a("li",[a("code",[t._v("ImportAddressToRPC")]),t._v(": "),a("code",[t._v("Legacy")]),t._v(" (or "),a("code",[t._v("True")]),t._v(", for old wallet) if the generated addresses are added to legacy style Bitcoin core wallet. "),a("code",[t._v("Descriptors")]),t._v(" or "),a("code",[t._v("DescriptorsReadOnly")]),t._v(" if the generated addresses and private keys are added to a descriptor enabled Bitcoin Core wallet.")]),t._v(" "),a("li",[a("code",[t._v("AccountDescriptor")]),t._v(": The output descriptor format of the derivation scheme.")]),t._v(" "),a("li",[a("code",[t._v("Birthdate")]),t._v(": The birthdate of the wallet in ISO-8601 format.")])]),t._v(" "),a("p",[t._v("Note that the metadata "),a("code",[t._v("AccountKeyPath")]),t._v(" is leveraged by "),a("a",{attrs:{href:"#psbt"}},[t._v("Create a PSBT")]),t._v(" and "),a("a",{attrs:{href:"#updatepsbt"}},[t._v("Update a PSBT")]),t._v(".")]),t._v(" "),a("h2",{attrs:{id:"node-rpc-proxy"}},[a("a",{staticClass:"header-anchor",attrs:{href:"#node-rpc-proxy"}},[t._v("#")]),t._v(" "),a("a",{attrs:{name:"rpc-proxy"}}),t._v("Node RPC Proxy")]),t._v(" "),a("p",[t._v("NBXplorer allows you to query the node's JSON-RPC through it when "),a("code",[t._v("exposerpc")]),t._v(" option is enabled")]),t._v(" "),a("p",[a("code",[t._v("HTTP POST v1/cryptos/{cryptoCode}/rpc")]),t._v("\nwith Header "),a("code",[t._v("Content-Type")]),t._v(" set to value "),a("code",[t._v("application/json")]),t._v(" or "),a("code",[t._v("application/json-rpc")])]),t._v(" "),a("p",[t._v("Error codes:")]),t._v(" "),a("ul",[a("li",[t._v("HTTP 415: You did not send the correct "),a("code",[t._v("Content-Type")]),t._v(" header.")]),t._v(" "),a("li",[t._v("HTTP 404: "),a("code",[t._v("cryptoCode-not-supported")])]),t._v(" "),a("li",[t._v("HTTP 401: "),a("code",[t._v("json-rpc-not-exposed")])]),t._v(" "),a("li",[t._v("HTTP 400: "),a("code",[t._v("rpc-unavailable")])]),t._v(" "),a("li",[t._v("HTTP 422: "),a("code",[t._v("no-json-rpc-request")])])]),t._v(" "),a("p",[t._v("Request:")]),t._v(" "),a("div",{staticClass:"language-json extra-class"},[a("pre",{pre:!0,attrs:{class:"language-json"}},[a("code",[a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("{")]),a("span",{pre:!0,attrs:{class:"token property"}},[t._v('"jsonrpc"')]),a("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token string"}},[t._v('"1.0"')]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token property"}},[t._v('"id"')]),a("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),a("span",{pre:!0,attrs:{class:"token string"}},[t._v('"1"')]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token property"}},[t._v('"method"')]),a("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token string"}},[t._v('"getblockchaininfo"')]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token property"}},[t._v('"params"')]),a("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("[")]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("]")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("}")]),t._v("\n")])])]),a("p",[t._v("Response:")]),t._v(" "),a("div",{staticClass:"language-json extra-class"},[a("pre",{pre:!0,attrs:{class:"language-json"}},[a("code",[a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("{")]),t._v("\n "),a("span",{pre:!0,attrs:{class:"token property"}},[t._v('"error"')]),a("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token null keyword"}},[t._v("null")]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v("\n "),a("span",{pre:!0,attrs:{class:"token property"}},[t._v('"result"')]),a("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("{")]),t._v("\n "),a("span",{pre:!0,attrs:{class:"token property"}},[t._v('"chain"')]),a("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token string"}},[t._v('"regtest"')]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v("\n ...\n "),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("}")]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v("\n "),a("span",{pre:!0,attrs:{class:"token property"}},[t._v('"resultString"')]),a("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token string"}},[t._v('"..."')]),t._v("\n"),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("}")]),t._v("\n")])])]),a("p",[t._v("NOTE: Batch commands are also supported by sending the JSON-RPC requests in an array. The result is also returned in an array.")]),t._v(" "),a("h2",{attrs:{id:"health-check"}},[a("a",{staticClass:"header-anchor",attrs:{href:"#health-check"}},[t._v("#")]),t._v(" "),a("a",{attrs:{name:"health"}}),t._v("Health check")]),t._v(" "),a("p",[t._v("A endpoint that can be used without the need for "),a("a",{attrs:{href:"#auth"}},[t._v("authentication")]),t._v(" which will returns HTTP 200 only if all nodes connected to NBXplorer are ready.")]),t._v(" "),a("p",[a("code",[t._v("HTTP GET /health")])]),t._v(" "),a("p",[t._v("It will output the state for each nodes in JSON, whose format might change in the future.")]),t._v(" "),a("h2",{attrs:{id:"liquid-integration"}},[a("a",{staticClass:"header-anchor",attrs:{href:"#liquid-integration"}},[t._v("#")]),t._v(" "),a("a",{attrs:{name:"liquid"}}),t._v("Liquid integration")]),t._v(" "),a("p",[t._v("NBXplorer supports liquid, the API is the same as all the other coins, except for the following:")]),t._v(" "),a("ul",[a("li",[t._v("All references to "),a("code",[t._v("value")]),t._v(" which normally contains an integer of the amount of the altcoin will instead output a JSON Object of type "),a("code",[t._v("AssetMoney")]),t._v(".")]),t._v(" "),a("li",[t._v("If NBXplorer is unable to unblind a value, then the value will be "),a("code",[t._v("null")]),t._v(".")]),t._v(" "),a("li",[a("a",{attrs:{href:"#transactions"}},[t._v("When listing the transaction of a derivation scheme")]),t._v(", the "),a("code",[t._v("balanceChange")]),t._v(" elements is instead a "),a("code",[t._v("JSON array of AssetMoney")]),t._v(".")]),t._v(" "),a("li",[a("a",{attrs:{href:"#balance"}},[t._v("Get Balance")]),t._v(" returns values as "),a("code",[t._v("JSON array of AssetMoney")]),t._v(".")]),t._v(" "),a("li",[a("a",{attrs:{href:"#unused"}},[t._v("Get a new unused address")]),t._v(" returns a confidential address. (See note below)")]),t._v(" "),a("li",[a("a",{attrs:{href:"#psbt"}},[t._v("Create Partially Signed Bitcoin Transaction")]),t._v(" is not supported.")]),t._v(" "),a("li",[a("a",{attrs:{href:"#updatepsbt"}},[t._v("Update Partially Signed Bitcoin Transaction")]),t._v(" is not supported")]),t._v(" "),a("li",[a("a",{attrs:{href:"#scanUtxoSet"}},[t._v("Scan UTXO Set")]),t._v(" is not supported.")]),t._v(" "),a("li",[t._v("Any sort of recovery is not supported.")])]),t._v(" "),a("p",[t._v("The "),a("code",[t._v("AssetMoney")]),t._v(" JSON format is:")]),t._v(" "),a("div",{staticClass:"language-json extra-class"},[a("pre",{pre:!0,attrs:{class:"language-json"}},[a("code",[a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("{")]),t._v("\n "),a("span",{pre:!0,attrs:{class:"token property"}},[t._v('"assetId"')]),a("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token string"}},[t._v('"abc"')]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v("\n "),a("span",{pre:!0,attrs:{class:"token property"}},[t._v('"value"')]),a("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token number"}},[t._v("123")]),t._v("\n"),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("}")]),t._v("\n")])])]),a("h3",{attrs:{id:"liquid-confidential-addresses"}},[a("a",{staticClass:"header-anchor",attrs:{href:"#liquid-confidential-addresses"}},[t._v("#")]),t._v(" Liquid Confidential Addresses")]),t._v(" "),a("p",[t._v("Liquid confidential addresses are supported in two ways:")]),t._v(" "),a("ul",[a("li",[t._v("By default, the blinding key of the confidential address is derived directly from the "),a("code",[t._v("derivationScheme")]),t._v(". If the "),a("code",[t._v("scriptPubKey")]),t._v(" "),a("code",[t._v("0/2")]),t._v(" is generated, the blinding private key used by NBXplorer is the SHA256 of the scriptPubKey at "),a("code",[t._v("0/2/0")]),t._v(".")]),t._v(" "),a("li",[a("a",{attrs:{href:"https://github.com/satoshilabs/slips/blob/master/slip-0077.md",target:"_blank",rel:"noopener noreferrer"}},[t._v("SLIP77"),a("OutboundLink")],1),t._v(", by suffixing the derivation scheme with either:\n"),a("ul",[a("li",[t._v("the mnemonic seed derivation (usually the same as your wallet's)"),a("code",[t._v("-[slip77=all all all all all all all all all all all all]")])]),t._v(" "),a("li",[t._v("the master blinding key in hex or wif format"),a("code",[t._v("-[slip77=6c2de18eabeff3f7822bc724ad482bef0557f3e1c1e1c75b7a393a5ced4de616]")]),t._v("\nYou may also choose to not use confidential addresses by applying the suffix "),a("code",[t._v("-[unblinded]")]),t._v(" to the derivation scheme")])])])]),t._v(" "),a("h3",{attrs:{id:"liquid-transactions-support"}},[a("a",{staticClass:"header-anchor",attrs:{href:"#liquid-transactions-support"}},[t._v("#")]),t._v(" Liquid Transactions support")]),t._v(" "),a("p",[t._v("Due to the changes in the transaction format in Elements networks to support assets, we do not support transaction building features.")]),t._v(" "),a("p",[t._v("In order to send in and out of liquid, we advise you to rely on the RPC command line interface of the liquid deamon.\nFor doing this you need to "),a("a",{attrs:{href:"#wallet"}},[t._v("Generate a wallet")]),t._v(" with "),a("code",[t._v("importAddressToRPC")]),t._v(" and "),a("code",[t._v("savePrivateKeys")]),t._v(" set to "),a("code",[t._v("true")]),t._v(".")]),t._v(" "),a("p",[t._v("Be careful to not expose your NBXplorer server on internet, your private keys can be "),a("a",{attrs:{href:"#getmetadata"}},[t._v("retrieved trivially")]),t._v(".")]),t._v(" "),a("h2",{attrs:{id:"groups-2"}},[a("a",{staticClass:"header-anchor",attrs:{href:"#groups-2"}},[t._v("#")]),t._v(" Groups")]),t._v(" "),a("h3",{attrs:{id:"create-group"}},[a("a",{staticClass:"header-anchor",attrs:{href:"#create-group"}},[t._v("#")]),t._v(" "),a("a",{attrs:{name:"create-group"}}),t._v("Create group")]),t._v(" "),a("p",[t._v("Create a new empty group.")]),t._v(" "),a("p",[a("code",[t._v("HTTP POST v1/groups")])]),t._v(" "),a("p",[t._v("No body required")]),t._v(" "),a("p",[t._v("Response")]),t._v(" "),a("div",{staticClass:"language-json extra-class"},[a("pre",{pre:!0,attrs:{class:"language-json"}},[a("code",[a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("{")]),t._v("\n "),a("span",{pre:!0,attrs:{class:"token property"}},[t._v('"trackedSource"')]),a("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token string"}},[t._v('"GROUP:6N23bHztah546P6xQT"')]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v("\n "),a("span",{pre:!0,attrs:{class:"token property"}},[t._v('"groupId"')]),a("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token string"}},[t._v('"6N23bHztah546P6xQT"')]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v("\n "),a("span",{pre:!0,attrs:{class:"token property"}},[t._v('"children"')]),a("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("[")]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("]")]),t._v("\n"),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("}")]),t._v("\n")])])]),a("h3",{attrs:{id:"get-group"}},[a("a",{staticClass:"header-anchor",attrs:{href:"#get-group"}},[t._v("#")]),t._v(" "),a("a",{attrs:{name:"get-group"}}),t._v("Get group")]),t._v(" "),a("p",[a("code",[t._v("HTTP GET v1/groups/{groupId}")])]),t._v(" "),a("p",[t._v("Get the group")]),t._v(" "),a("div",{staticClass:"language-json extra-class"},[a("pre",{pre:!0,attrs:{class:"language-json"}},[a("code",[a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("{")]),t._v("\n "),a("span",{pre:!0,attrs:{class:"token property"}},[t._v('"trackedSource"')]),a("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token string"}},[t._v('"GROUP:6N23bHztah546P6xQT"')]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v("\n "),a("span",{pre:!0,attrs:{class:"token property"}},[t._v('"groupId"')]),a("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token string"}},[t._v('"6N23bHztah546P6xQT"')]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v("\n "),a("span",{pre:!0,attrs:{class:"token property"}},[t._v('"children"')]),a("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("[")]),t._v("\n "),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("{")]),t._v("\n "),a("span",{pre:!0,attrs:{class:"token property"}},[t._v('"trackedSource"')]),a("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token string"}},[t._v('"GROUP:Es26NSg5xTqbpRz3FY"')]),t._v("\n "),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("}")]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v("\n "),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("{")]),t._v("\n "),a("span",{pre:!0,attrs:{class:"token property"}},[t._v('"cryptoCode"')]),a("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token string"}},[t._v('"BTC"')]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v("\n "),a("span",{pre:!0,attrs:{class:"token property"}},[t._v('"trackedSource"')]),a("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token string"}},[t._v('"DERIVATIONSCHEME:tpubDC6xFicnheK85vUNGjegu4HuJGg8nPiRk26jhW7n8GTCnb2aqizTFzyG1Jw42ZUs19nKU8V3Xi38WyVqem5ytbjFsREMWUH8QMYpzgmNdus"')]),t._v("\n "),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("}")]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v("\n "),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("{")]),t._v("\n "),a("span",{pre:!0,attrs:{class:"token property"}},[t._v('"cryptoCode"')]),a("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token string"}},[t._v('"BTC"')]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v("\n "),a("span",{pre:!0,attrs:{class:"token property"}},[t._v('"trackedSource"')]),a("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token string"}},[t._v('"DERIVATIONSCHEME:tpubDC45vUDsFAAqwYKz5hSLi5yJLNduJzpmTw6QTMRPrwdXURoyL81H8oZAaL8EiwEgg92qgMa9h1bB4Y1BZpy9CTNPfjfxvFcWxeiKBHCqSdc"')]),t._v("\n "),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("}")]),t._v("\n "),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("]")]),t._v("\n"),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("}")]),t._v("\n")])])]),a("h3",{attrs:{id:"add-group-children"}},[a("a",{staticClass:"header-anchor",attrs:{href:"#add-group-children"}},[t._v("#")]),t._v(" "),a("a",{attrs:{name:"add-group-children"}}),t._v("Add group children")]),t._v(" "),a("p",[t._v("Add children to a group.")]),t._v(" "),a("p",[a("code",[t._v("HTTP POST v1/groups/{groupId}/children")])]),t._v(" "),a("p",[t._v("Request:")]),t._v(" "),a("div",{staticClass:"language-json extra-class"},[a("pre",{pre:!0,attrs:{class:"language-json"}},[a("code",[a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("[")]),t._v("\n "),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("{")]),t._v("\n "),a("span",{pre:!0,attrs:{class:"token property"}},[t._v('"trackedSource"')]),a("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token string"}},[t._v('"GROUP:Es26NSg5xTqbpRz3FY"')]),t._v("\n "),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("}")]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v("\n "),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("{")]),t._v("\n "),a("span",{pre:!0,attrs:{class:"token property"}},[t._v('"cryptoCode"')]),a("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token string"}},[t._v('"BTC"')]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v("\n "),a("span",{pre:!0,attrs:{class:"token property"}},[t._v('"trackedSource"')]),a("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token string"}},[t._v('"DERIVATIONSCHEME:tpubDC6xFicnheK85vUNGjegu4HuJGg8nPiRk26jhW7n8GTCnb2aqizTFzyG1Jw42ZUs19nKU8V3Xi38WyVqem5ytbjFsREMWUH8QMYpzgmNdus"')]),t._v("\n "),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("}")]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v("\n "),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("{")]),t._v("\n "),a("span",{pre:!0,attrs:{class:"token property"}},[t._v('"cryptoCode"')]),a("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token string"}},[t._v('"BTC"')]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v("\n "),a("span",{pre:!0,attrs:{class:"token property"}},[t._v('"trackedSource"')]),a("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token string"}},[t._v('"DERIVATIONSCHEME:tpubDC45vUDsFAAqwYKz5hSLi5yJLNduJzpmTw6QTMRPrwdXURoyL81H8oZAaL8EiwEgg92qgMa9h1bB4Y1BZpy9CTNPfjfxvFcWxeiKBHCqSdc"')]),t._v("\n "),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("}")]),t._v("\n"),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("]")]),t._v("\n")])])]),a("p",[t._v("Response:")]),t._v(" "),a("div",{staticClass:"language-json extra-class"},[a("pre",{pre:!0,attrs:{class:"language-json"}},[a("code",[a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("{")]),t._v("\n "),a("span",{pre:!0,attrs:{class:"token property"}},[t._v('"trackedSource"')]),a("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token string"}},[t._v('"GROUP:6N23bHztah546P6xQT"')]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v("\n "),a("span",{pre:!0,attrs:{class:"token property"}},[t._v('"groupId"')]),a("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token string"}},[t._v('"6N23bHztah546P6xQT"')]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v("\n "),a("span",{pre:!0,attrs:{class:"token property"}},[t._v('"children"')]),a("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("[")]),t._v("\n "),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("{")]),t._v("\n "),a("span",{pre:!0,attrs:{class:"token property"}},[t._v('"trackedSource"')]),a("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token string"}},[t._v('"GROUP:Es26NSg5xTqbpRz3FY"')]),t._v("\n "),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("}")]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v("\n "),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("{")]),t._v("\n "),a("span",{pre:!0,attrs:{class:"token property"}},[t._v('"cryptoCode"')]),a("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token string"}},[t._v('"BTC"')]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v("\n "),a("span",{pre:!0,attrs:{class:"token property"}},[t._v('"trackedSource"')]),a("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token string"}},[t._v('"DERIVATIONSCHEME:tpubDC6xFicnheK85vUNGjegu4HuJGg8nPiRk26jhW7n8GTCnb2aqizTFzyG1Jw42ZUs19nKU8V3Xi38WyVqem5ytbjFsREMWUH8QMYpzgmNdus"')]),t._v("\n "),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("}")]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v("\n "),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("{")]),t._v("\n "),a("span",{pre:!0,attrs:{class:"token property"}},[t._v('"cryptoCode"')]),a("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token string"}},[t._v('"BTC"')]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v("\n "),a("span",{pre:!0,attrs:{class:"token property"}},[t._v('"trackedSource"')]),a("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token string"}},[t._v('"DERIVATIONSCHEME:tpubDC45vUDsFAAqwYKz5hSLi5yJLNduJzpmTw6QTMRPrwdXURoyL81H8oZAaL8EiwEgg92qgMa9h1bB4Y1BZpy9CTNPfjfxvFcWxeiKBHCqSdc"')]),t._v("\n "),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("}")]),t._v("\n "),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("]")]),t._v("\n"),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("}")]),t._v("\n")])])]),a("h3",{attrs:{id:"delete-group-children"}},[a("a",{staticClass:"header-anchor",attrs:{href:"#delete-group-children"}},[t._v("#")]),t._v(" "),a("a",{attrs:{name:"delete-group-children"}}),t._v("Delete group children")]),t._v(" "),a("p",[t._v("Remove children from a group.")]),t._v(" "),a("p",[a("code",[t._v("HTTP DELETE v1/groups/{groupId}/children")])]),t._v(" "),a("p",[t._v("Request:")]),t._v(" "),a("div",{staticClass:"language-json extra-class"},[a("pre",{pre:!0,attrs:{class:"language-json"}},[a("code",[a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("[")]),t._v("\n "),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("{")]),t._v("\n "),a("span",{pre:!0,attrs:{class:"token property"}},[t._v('"trackedSource"')]),a("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token string"}},[t._v('"GROUP:Es26NSg5xTqbpRz3FY"')]),t._v("\n "),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("}")]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v("\n "),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("{")]),t._v("\n "),a("span",{pre:!0,attrs:{class:"token property"}},[t._v('"cryptoCode"')]),a("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token string"}},[t._v('"BTC"')]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v("\n "),a("span",{pre:!0,attrs:{class:"token property"}},[t._v('"trackedSource"')]),a("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token string"}},[t._v('"DERIVATIONSCHEME:tpubDC6xFicnheK85vUNGjegu4HuJGg8nPiRk26jhW7n8GTCnb2aqizTFzyG1Jw42ZUs19nKU8V3Xi38WyVqem5ytbjFsREMWUH8QMYpzgmNdus"')]),t._v("\n "),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("}")]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v("\n "),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("{")]),t._v("\n "),a("span",{pre:!0,attrs:{class:"token property"}},[t._v('"cryptoCode"')]),a("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token string"}},[t._v('"BTC"')]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v("\n "),a("span",{pre:!0,attrs:{class:"token property"}},[t._v('"trackedSource"')]),a("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token string"}},[t._v('"DERIVATIONSCHEME:tpubDC45vUDsFAAqwYKz5hSLi5yJLNduJzpmTw6QTMRPrwdXURoyL81H8oZAaL8EiwEgg92qgMa9h1bB4Y1BZpy9CTNPfjfxvFcWxeiKBHCqSdc"')]),t._v("\n "),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("}")]),t._v("\n"),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("]")]),t._v("\n")])])]),a("p",[t._v("Response:")]),t._v(" "),a("div",{staticClass:"language-json extra-class"},[a("pre",{pre:!0,attrs:{class:"language-json"}},[a("code",[a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("{")]),t._v("\n "),a("span",{pre:!0,attrs:{class:"token property"}},[t._v('"trackedSource"')]),a("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token string"}},[t._v('"GROUP:6N23bHztah546P6xQT"')]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v("\n "),a("span",{pre:!0,attrs:{class:"token property"}},[t._v('"groupId"')]),a("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token string"}},[t._v('"6N23bHztah546P6xQT"')]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v("\n "),a("span",{pre:!0,attrs:{class:"token property"}},[t._v('"children"')]),a("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("[")]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("]")]),t._v("\n"),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("}")]),t._v("\n")])])]),a("h3",{attrs:{id:"add-address-to-group"}},[a("a",{staticClass:"header-anchor",attrs:{href:"#add-address-to-group"}},[t._v("#")]),t._v(" "),a("a",{attrs:{name:"add-group-address"}}),t._v("Add address to group")]),t._v(" "),a("p",[t._v("You can add addresses manually inside the group.")]),t._v(" "),a("p",[a("code",[t._v("HTTP POST v1/cryptos/BTC/groups/{groupId}/addresses")])]),t._v(" "),a("p",[t._v("Request:")]),t._v(" "),a("div",{staticClass:"language-json extra-class"},[a("pre",{pre:!0,attrs:{class:"language-json"}},[a("code",[a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("[")]),t._v("\n "),a("span",{pre:!0,attrs:{class:"token string"}},[t._v('"n3XyBWEKWLxm5EzrrvLCJyCQrRhVWQ8YGa"')]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v("\n "),a("span",{pre:!0,attrs:{class:"token string"}},[t._v('"n4FBNYjZny7sC4pzAVaTtnGTtiwMHV5nkY"')]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v("\n "),a("span",{pre:!0,attrs:{class:"token string"}},[t._v('"mxrkNvovmmatB2vHVkNtVZ7dLLuDkPe5nr"')]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v("\n "),a("span",{pre:!0,attrs:{class:"token string"}},[t._v('"mh43vYeeJAzzSXBPaQ3D9qXzLFwWhmZEGw"')]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v("\n "),a("span",{pre:!0,attrs:{class:"token string"}},[t._v('"mkNfpqBrKyHs5wTsreLLhWAwnZPPH6seqe"')]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v("\n "),a("span",{pre:!0,attrs:{class:"token string"}},[t._v('"n4nzmHnKsByo5pgdjVDuvbXMMY7gKAcZJy"')]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v("\n "),a("span",{pre:!0,attrs:{class:"token string"}},[t._v('"mrxCU6b7RmyNXz1WJ4uJRZfdKSnwzagRov"')]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v("\n "),a("span",{pre:!0,attrs:{class:"token string"}},[t._v('"msy6dEmKav8CpDX6TR8wsLPVFUoy4HDk2t"')]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v("\n "),a("span",{pre:!0,attrs:{class:"token string"}},[t._v('"mw84oRAoojVPxHm9J514KTqpr6ozVFcWtH"')]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v("\n "),a("span",{pre:!0,attrs:{class:"token string"}},[t._v('"muNtSq7tG3gBwh2L1ZHEKQRYuNuHPm5YZC"')]),t._v("\n"),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("]")]),t._v("\n")])])]),a("p",[t._v("Response:\nHTTP 200.")])])}),[],!1,null,null,null);a.default=n.exports}}]); \ No newline at end of file +(window.webpackJsonp=window.webpackJsonp||[]).push([[149],{818:function(t,a,s){"use strict";s.r(a);var e=s(10),n=Object(e.a)({},(function(){var t=this,a=t._self._c;return a("ContentSlotsDistributor",{attrs:{"slot-key":t.$parent.slotKey}},[a("h1",{attrs:{id:"api-specification"}},[a("a",{staticClass:"header-anchor",attrs:{href:"#api-specification"}},[t._v("#")]),t._v(" API Specification")]),t._v(" "),a("p",[t._v("NBXplorer is a multi crypto currency lightweight block explorer.")]),t._v(" "),a("p",[t._v("NBXplorer does not index the whole blockchain, rather, it listens transactions and blocks from a trusted full node and index only addresses and transactions which belongs to a "),a("code",[t._v("DerivationScheme")]),t._v(" that you decide to track.")]),t._v(" "),a("h2",{attrs:{id:"table-of-content"}},[a("a",{staticClass:"header-anchor",attrs:{href:"#table-of-content"}},[t._v("#")]),t._v(" Table of content")]),t._v(" "),a("ul",[a("li",[a("a",{attrs:{href:"#configuration"}},[t._v("Configuration")])]),t._v(" "),a("li",[a("a",{attrs:{href:"#tracked-sources"}},[t._v("Tracked Sources")]),t._v(" "),a("ul",[a("li",[a("a",{attrs:{href:"#derivationScheme"}},[t._v("Derivation schemes")])]),t._v(" "),a("li",[a("a",{attrs:{href:"#groups"}},[t._v("Groups")])]),t._v(" "),a("li",[a("a",{attrs:{href:"#addresses"}},[t._v("Addresses")])])])]),t._v(" "),a("li",[a("a",{attrs:{href:"#authentication"}},[t._v("Authentication")])]),t._v(" "),a("li",[a("a",{attrs:{href:"#track"}},[t._v("Tracking derivation scheme or address")])]),t._v(" "),a("li",[a("a",{attrs:{href:"#transactions"}},[t._v("Query transactions of tracked sources")])]),t._v(" "),a("li",[a("a",{attrs:{href:"#singletransaction"}},[t._v("Query specifc transactions of tracked sources")])]),t._v(" "),a("li",[a("a",{attrs:{href:"#balance"}},[t._v("Get balance of tracked sources")])]),t._v(" "),a("li",[a("a",{attrs:{href:"#gettransaction"}},[t._v("Get a transaction")])]),t._v(" "),a("li",[a("a",{attrs:{href:"#status"}},[t._v("Get connection status to the chain")])]),t._v(" "),a("li",[a("a",{attrs:{href:"#unused"}},[t._v("Get a new unused address")])]),t._v(" "),a("li",[a("a",{attrs:{href:"#scriptPubKey"}},[t._v("Get scriptPubKey information of a Derivation Scheme")])]),t._v(" "),a("li",[a("a",{attrs:{href:"#utxos"}},[t._v("Get available Unspent Transaction Outputs (UTXOs) of tracked sources")])]),t._v(" "),a("li",[a("a",{attrs:{href:"#websocket"}},[t._v("Notifications via websocket")])]),t._v(" "),a("li",[a("a",{attrs:{href:"#broadcast"}},[t._v("Broadcast a transaction")])]),t._v(" "),a("li",[a("a",{attrs:{href:"#rescan"}},[t._v("Rescan a transaction")])]),t._v(" "),a("li",[a("a",{attrs:{href:"#feerate"}},[t._v("Get fee rate")])]),t._v(" "),a("li",[a("a",{attrs:{href:"#scanUtxoSet"}},[t._v("Scan UTXO Set")])]),t._v(" "),a("li",[a("a",{attrs:{href:"#wipe"}},[t._v("Wipe derivation scheme transactions")])]),t._v(" "),a("li",[a("a",{attrs:{href:"#eventStream"}},[t._v("Query event stream")])]),t._v(" "),a("li",[a("a",{attrs:{href:"#eventStreamLatest"}},[t._v("Query event stream from most recent")])]),t._v(" "),a("li",[a("a",{attrs:{href:"#psbt"}},[t._v("Create Partially Signed Bitcoin Transaction")])]),t._v(" "),a("li",[a("a",{attrs:{href:"#updatepsbt"}},[t._v("Update Partially Signed Bitcoin Transaction")])]),t._v(" "),a("li",[a("a",{attrs:{href:"#metadata"}},[t._v("Attach metadata to a derivation scheme")])]),t._v(" "),a("li",[a("a",{attrs:{href:"#detachmetadata"}},[t._v("Detach metadata from a derivation scheme")])]),t._v(" "),a("li",[a("a",{attrs:{href:"#getmetadata"}},[t._v("Retrieve metadata from a derivation scheme")])]),t._v(" "),a("li",[a("a",{attrs:{href:"#pruning"}},[t._v("Manual pruning")])]),t._v(" "),a("li",[a("a",{attrs:{href:"#wallet"}},[t._v("Generate a wallet")])]),t._v(" "),a("li",[a("a",{attrs:{href:"#rpc-proxy"}},[t._v("Node RPC Proxy")])]),t._v(" "),a("li",[a("a",{attrs:{href:"#health"}},[t._v("Health check")])]),t._v(" "),a("li",[a("a",{attrs:{href:"#liquid"}},[t._v("Liquid integration")])]),t._v(" "),a("li",[a("a",{attrs:{href:"#create-group"}},[t._v("Create group")])]),t._v(" "),a("li",[a("a",{attrs:{href:"#get-group"}},[t._v("Get group")])]),t._v(" "),a("li",[a("a",{attrs:{href:"#add-group-children"}},[t._v("Add group children")])]),t._v(" "),a("li",[a("a",{attrs:{href:"#delete-group-children"}},[t._v("Add address to group")])])]),t._v(" "),a("h2",{attrs:{id:"configuration"}},[a("a",{staticClass:"header-anchor",attrs:{href:"#configuration"}},[t._v("#")]),t._v(" Configuration")]),t._v(" "),a("p",[t._v("You can check the available settings with "),a("code",[t._v("--help")]),t._v(".")]),t._v(" "),a("p",[t._v("NBXplorer can be configured in three way:")]),t._v(" "),a("ul",[a("li",[t._v("Through command line arguments (eg. "),a("code",[t._v("--chains btc")]),t._v(")")]),t._v(" "),a("li",[t._v("Through environment variables (eg. "),a("code",[t._v("NBXPLORER_CHAINS=btc")]),t._v(")")]),t._v(" "),a("li",[t._v("Through configuration file (eg. "),a("code",[t._v("chains=btc")]),t._v(")")])]),t._v(" "),a("p",[t._v("If you use configuration file, you can find it on windows in:")]),t._v(" "),a("div",{staticClass:"language-pwsh extra-class"},[a("pre",{pre:!0,attrs:{class:"language-text"}},[a("code",[t._v("C:\\Users\\\\AppData\\Roaming\\NBXplorer\\\\settings.config\n")])])]),a("p",[t._v("On linux or mac:")]),t._v(" "),a("div",{staticClass:"language-bash extra-class"},[a("pre",{pre:!0,attrs:{class:"language-bash"}},[a("code",[t._v("~/.nbxplorer/"),a("span",{pre:!0,attrs:{class:"token operator"}},[t._v("<")]),t._v("network"),a("span",{pre:!0,attrs:{class:"token operator"}},[t._v(">")]),t._v("/settings.config\n")])])]),a("p",[t._v("Be careful, if you run NBXplorer with "),a("code",[t._v("dotnet run")]),t._v(", you should do it this way, with settings after the "),a("code",[t._v("--")]),t._v(":")]),t._v(" "),a("div",{staticClass:"language-bash extra-class"},[a("pre",{pre:!0,attrs:{class:"language-bash"}},[a("code",[t._v("dotnet run --no-launch-profile --no-build "),a("span",{pre:!0,attrs:{class:"token parameter variable"}},[t._v("-c")]),t._v(" Release "),a("span",{pre:!0,attrs:{class:"token parameter variable"}},[t._v("-p")]),t._v(" ."),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("\\")]),t._v("NBXplorer"),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("\\")]),t._v("NBXplorer.csproj -- "),a("span",{pre:!0,attrs:{class:"token parameter variable"}},[t._v("--chains")]),t._v(" btc\n")])])]),a("p",[t._v("Else, launch profiles, which are settings meant to be used only for debugging time, might be taken into account.")]),t._v(" "),a("h2",{attrs:{id:"tracked-sources"}},[a("a",{staticClass:"header-anchor",attrs:{href:"#tracked-sources"}},[t._v("#")]),t._v(" "),a("a",{attrs:{name:"tracked-source"}}),t._v("Tracked Sources")]),t._v(" "),a("p",[t._v("A tracked source is a generic way to track a set of scripts (addresses) and its UTXOs, transactions, and balances.")]),t._v(" "),a("h3",{attrs:{id:"derivation-scheme"}},[a("a",{staticClass:"header-anchor",attrs:{href:"#derivation-scheme"}},[t._v("#")]),t._v(" "),a("a",{attrs:{name:"derivationScheme"}}),t._v("Derivation scheme")]),t._v(" "),a("p",[t._v("A derivation scheme, also called "),a("code",[t._v("derivationStrategy")]),t._v(" in the code, is a flexible way to define how to generate deterministic addresses for a wallet.\nNBXplorer will track any addresses on the "),a("code",[t._v("0/x")]),t._v(", "),a("code",[t._v("1/x")]),t._v(" and "),a("code",[t._v("x")]),t._v(" path.")]),t._v(" "),a("p",[t._v("Here a documentation of the different derivation scheme supported:")]),t._v(" "),a("table",[a("thead",[a("tr",[a("th",[t._v("Address type")]),t._v(" "),a("th",[t._v("Format")])])]),t._v(" "),a("tbody",[a("tr",[a("td",[t._v("P2WPKH")]),t._v(" "),a("td",[t._v("xpub1")])]),t._v(" "),a("tr",[a("td",[t._v("P2SH-P2WPKH")]),t._v(" "),a("td",[t._v("xpub1-[p2sh]")])]),t._v(" "),a("tr",[a("td",[t._v("P2PKH")]),t._v(" "),a("td",[t._v("xpub-[legacy]")])]),t._v(" "),a("tr",[a("td",[t._v("Multi-sig P2WSH")]),t._v(" "),a("td",[t._v("2-of-xpub1-xpub2")])]),t._v(" "),a("tr",[a("td",[t._v("Multi-sig P2SH-P2WSH")]),t._v(" "),a("td",[t._v("2-of-xpub1-xpub2-[p2sh]")])]),t._v(" "),a("tr",[a("td",[t._v("Multi-sig P2SH")]),t._v(" "),a("td",[t._v("2-of-xpub1-xpub2-[legacy]")])]),t._v(" "),a("tr",[a("td",[t._v("P2TR")]),t._v(" "),a("td",[t._v("xpub1-[taproot]")])])])]),t._v(" "),a("p",[t._v("For multisig, the public keys are ordered before generating the address by default for privacy reason, use "),a("code",[t._v("-[keeporder]")]),t._v(" to disable it.")]),t._v(" "),a("p",[t._v("You can use more than one options at same time, example: "),a("code",[t._v("2-of-xpub1-xpub2-[legacy]-[keeporder]")])]),t._v(" "),a("p",[t._v("Most of routes asks for a "),a("code",[t._v("cryptoCode")]),t._v(". This identify the crypto currency to request data from. (eg. "),a("code",[t._v("BTC")]),t._v(", "),a("code",[t._v("LTC")]),t._v("...)")]),t._v(" "),a("p",[t._v("Note: Taproot is incompatible with all other options.")]),t._v(" "),a("p",[t._v("You can create one by calling "),a("a",{attrs:{href:"#track"}},[t._v("Tracking derivation scheme or address")]),t._v(".")]),t._v(" "),a("h3",{attrs:{id:"groups"}},[a("a",{staticClass:"header-anchor",attrs:{href:"#groups"}},[t._v("#")]),t._v(" "),a("a",{attrs:{name:"groups"}}),t._v("Groups")]),t._v(" "),a("p",[t._v("A group is a tracked source which serves as a logical method for grouping several tracked sources into a single entity. You can add or remove tracked sources to and from a group.")]),t._v(" "),a("p",[t._v("Additionally, specific addresses can be tracked through the group.")]),t._v(" "),a("p",[t._v("Every address attached by a child tracked source will be added to the group, including all related UTXOs and transactions.")]),t._v(" "),a("p",[t._v("A group can have any number of children, and a group can also be a child of another group.\nPlease note that all the children are returned by "),a("a",{attrs:{href:"#get-group"}},[t._v("Get a group")]),t._v(". As such, it is advised not to add too many children to avoid slowing down this call.")]),t._v(" "),a("p",[t._v("A group tracked source's format is "),a("code",[t._v("GROUP:groupid")]),t._v(".")]),t._v(" "),a("p",[t._v("You can create a new group by calling "),a("a",{attrs:{href:"#create-group"}},[t._v("Create a group")]),t._v(".")]),t._v(" "),a("h3",{attrs:{id:"addresses"}},[a("a",{staticClass:"header-anchor",attrs:{href:"#addresses"}},[t._v("#")]),t._v(" "),a("a",{attrs:{name:"addresses"}}),t._v("Addresses")]),t._v(" "),a("p",[t._v("This refers to a tracked source that monitors a single address. It functions similarly to a group, but with only one specific address to it.")]),t._v(" "),a("p",[t._v("The address tracked source's format is "),a("code",[t._v("ADDRESS:bc1...")]),t._v(".")]),t._v(" "),a("p",[t._v("You can create one by calling "),a("a",{attrs:{href:"#track"}},[t._v("Tracking derivation scheme or address")]),t._v(".")]),t._v(" "),a("h2",{attrs:{id:"authentication"}},[a("a",{staticClass:"header-anchor",attrs:{href:"#authentication"}},[t._v("#")]),t._v(" Authentication")]),t._v(" "),a("p",[t._v("By default a cookie file is generated when NBXplorer is starting, for windows in:")]),t._v(" "),a("div",{staticClass:"language-pwsh extra-class"},[a("pre",{pre:!0,attrs:{class:"language-text"}},[a("code",[t._v("C:\\Users\\\\AppData\\Roaming\\NBXplorer\\\\.cookie\n")])])]),a("p",[t._v("On linux or mac:")]),t._v(" "),a("div",{staticClass:"language-bash extra-class"},[a("pre",{pre:!0,attrs:{class:"language-bash"}},[a("code",[t._v("~/.nbxplorer/"),a("span",{pre:!0,attrs:{class:"token operator"}},[t._v("<")]),t._v("network"),a("span",{pre:!0,attrs:{class:"token operator"}},[t._v(">")]),t._v("/.cookie\n")])])]),a("p",[t._v("The content of this cookie must be used is used as HTTP BASIC authentication to use the API.")]),t._v(" "),a("p",[t._v("This can be disabled with "),a("code",[t._v("--noauth")]),t._v(".")]),t._v(" "),a("p",[t._v("Also, NBXPlorer listen by default on "),a("code",[t._v("127.0.0.1")]),t._v(", if you want to access it from another machine, run "),a("code",[t._v('--bind "0.0.0.0"')]),t._v(".")]),t._v(" "),a("h2",{attrs:{id:"tracking-derivation-scheme-or-address"}},[a("a",{staticClass:"header-anchor",attrs:{href:"#tracking-derivation-scheme-or-address"}},[t._v("#")]),t._v(" "),a("a",{attrs:{name:"track"}}),t._v("Tracking derivation scheme or address")]),t._v(" "),a("p",[t._v("This call add a derivation scheme tracked source, or a address tracked source.")]),t._v(" "),a("p",[a("code",[t._v("HTTP POST v1/cryptos/{cryptoCode}/derivations/{derivationScheme}")]),t._v(" "),a("code",[t._v("HTTP POST v1/cryptos/{cryptoCode}/addresses/{address}")])]),t._v(" "),a("p",[t._v("Returns nothing.")]),t._v(" "),a("p",[t._v("Optionally, you can attach a json body:")]),t._v(" "),a("div",{staticClass:"language-json extra-class"},[a("pre",{pre:!0,attrs:{class:"language-json"}},[a("code",[t._v(" "),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("{")]),t._v("\n "),a("span",{pre:!0,attrs:{class:"token property"}},[t._v('"derivationOptions"')]),a("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("[")]),t._v("\n "),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("{")]),t._v("\n "),a("span",{pre:!0,attrs:{class:"token property"}},[t._v('"feature"')]),a("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token string"}},[t._v('"Deposit"')]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v("\n "),a("span",{pre:!0,attrs:{class:"token property"}},[t._v('"minAddresses"')]),a("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token number"}},[t._v("30")]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v("\n "),a("span",{pre:!0,attrs:{class:"token property"}},[t._v('"maxAddresses"')]),a("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token null keyword"}},[t._v("null")]),t._v("\n "),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("}")]),t._v("\n "),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("]")]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v("\n "),a("span",{pre:!0,attrs:{class:"token property"}},[t._v('"wait"')]),a("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token boolean"}},[t._v("true")]),t._v("\n"),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("}")]),t._v("\n")])])]),a("ul",[a("li",[a("code",[t._v("wait")]),t._v(": Optional. If "),a("code",[t._v("true")]),t._v(" the call will return when all addresses has been generated, addresses will be generated in the background (default: "),a("code",[t._v("false")]),t._v(")")]),t._v(" "),a("li",[a("code",[t._v("derivationOptions")]),t._v(": Optional. Options to manually start the address generation process. (default: empty)")]),t._v(" "),a("li",[a("code",[t._v("derivationOptions.feature")]),t._v(": Optional. Define to which feature this option should be used. (defaut: null, which match all feature)")]),t._v(" "),a("li",[a("code",[t._v("derivationOptions.minAddresses")]),t._v(": Optional. The minimum addresses that need to be generated with this call. (default: null, make sure the number of address in the pool is between MinGap and MaxGap)")]),t._v(" "),a("li",[a("code",[t._v("derivationOptions.maxAddresses")]),t._v(": Optional. The maximum addresses that need to be generated with this call. (default: null, make sure the number of address in the pool is between MinGap and MaxGap)")])]),t._v(" "),a("h2",{attrs:{id:"query-transactions-of-tracked-sources"}},[a("a",{staticClass:"header-anchor",attrs:{href:"#query-transactions-of-tracked-sources"}},[t._v("#")]),t._v(" "),a("a",{attrs:{name:"transactions"}}),t._v("Query transactions of tracked sources")]),t._v(" "),a("p",[t._v("To query all transactions of a tracked source:")]),t._v(" "),a("p",[a("code",[t._v("HTTP GET v1/cryptos/{cryptoCode}/derivations/{derivationScheme}/transactions")]),t._v(" "),a("code",[t._v("HTTP GET v1/cryptos/{cryptoCode}/addresses/{address}/transactions")]),t._v(" "),a("code",[t._v("HTTP GET v1/cryptos/{cryptoCode}/groups/{groupId}/transactions")])]),t._v(" "),a("p",[t._v("Optional Parameters:")]),t._v(" "),a("ul",[a("li",[a("code",[t._v("includeTransaction")]),t._v(" includes the hex of the transaction, not only information (default: true)")])]),t._v(" "),a("p",[t._v("Returns:")]),t._v(" "),a("div",{staticClass:"language-json extra-class"},[a("pre",{pre:!0,attrs:{class:"language-json"}},[a("code",[a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("{")]),t._v("\n "),a("span",{pre:!0,attrs:{class:"token property"}},[t._v('"height"')]),a("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token number"}},[t._v("104")]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v("\n "),a("span",{pre:!0,attrs:{class:"token property"}},[t._v('"confirmedTransactions"')]),a("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("{")]),t._v("\n "),a("span",{pre:!0,attrs:{class:"token property"}},[t._v('"transactions"')]),a("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("[")]),t._v("\n "),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("{")]),t._v("\n "),a("span",{pre:!0,attrs:{class:"token property"}},[t._v('"blockHash"')]),a("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token string"}},[t._v('"3e7bcca309f92ab78a47c1cdd1166de9190fa49e97165c93e2b10ae1a14b99eb"')]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v("\n "),a("span",{pre:!0,attrs:{class:"token property"}},[t._v('"confirmations"')]),a("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token number"}},[t._v("1")]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v("\n "),a("span",{pre:!0,attrs:{class:"token property"}},[t._v('"height"')]),a("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token number"}},[t._v("104")]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v("\n "),a("span",{pre:!0,attrs:{class:"token property"}},[t._v('"transactionId"')]),a("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token string"}},[t._v('"cc33dfaf2ed794b11af83dc6e29303e2d8ff9e5e29303153dad1a1d3d8b43e40"')]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v("\n "),a("span",{pre:!0,attrs:{class:"token property"}},[t._v('"transaction"')]),a("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token string"}},[t._v('"020000000166d6befa387fd646f77a10e4b0f0e66b3569f18a83f77104a0c440e4156f80890000000048473044022064b1398653171440d3e79924cb6593633e7b2c3d80b60a2e21d6c6e287ee785a02203899009df443d0a0a1b06cb970aee0158d35166fd3e26d4e3e85570738e706d101feffffff028c02102401000000160014ee0a1889783da2e1f9bba47be4184b6610efd00400e1f5050000000016001452f88af314ef3b6d03d40a5fd1f2c906188a477567000000"')]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v("\n "),a("span",{pre:!0,attrs:{class:"token property"}},[t._v('"outputs"')]),a("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("[")]),t._v("\n "),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("{")]),t._v("\n "),a("span",{pre:!0,attrs:{class:"token property"}},[t._v('"keyPath"')]),a("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token string"}},[t._v('"0/0"')]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v("\n "),a("span",{pre:!0,attrs:{class:"token property"}},[t._v('"scriptPubKey"')]),a("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token string"}},[t._v('"001452f88af314ef3b6d03d40a5fd1f2c906188a4775"')]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v("\n "),a("span",{pre:!0,attrs:{class:"token property"}},[t._v('"index"')]),a("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token number"}},[t._v("1")]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v("\n "),a("span",{pre:!0,attrs:{class:"token property"}},[t._v('"value"')]),a("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token number"}},[t._v("100000000")]),t._v("\n "),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("}")]),t._v("\n "),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("]")]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v("\n "),a("span",{pre:!0,attrs:{class:"token property"}},[t._v('"inputs"')]),a("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("[")]),t._v("\n "),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("{")]),t._v("\n "),a("span",{pre:!0,attrs:{class:"token property"}},[t._v('"inputIndex"')]),a("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token number"}},[t._v("0")]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v("\n "),a("span",{pre:!0,attrs:{class:"token property"}},[t._v('"transactionId"')]),a("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token string"}},[t._v('"194d6dc4e1c4c983b5235ad2b82cc7c48c36def4960fdcf37697253c9d9854a2"')]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v("\n "),a("span",{pre:!0,attrs:{class:"token property"}},[t._v('"scriptPubKey"')]),a("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token string"}},[t._v('"001409249118830af97a029217f3a8744973c5a4a02e"')]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v("\n "),a("span",{pre:!0,attrs:{class:"token property"}},[t._v('"index"')]),a("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token number"}},[t._v("4")]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v("\n "),a("span",{pre:!0,attrs:{class:"token property"}},[t._v('"value"')]),a("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token number"}},[t._v("90000000")]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v("\n "),a("span",{pre:!0,attrs:{class:"token property"}},[t._v('"address"')]),a("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token string"}},[t._v('"bcrt1qpyjfzxyrptuh5q5jzle6sazfw0z6fgpwuz2rye"')]),t._v("\n "),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("}")]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v("\n "),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("{")]),t._v("\n "),a("span",{pre:!0,attrs:{class:"token property"}},[t._v('"inputIndex"')]),a("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token number"}},[t._v("1")]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v("\n "),a("span",{pre:!0,attrs:{class:"token property"}},[t._v('"transactionId"')]),a("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token string"}},[t._v('"194d6dc4e1c4c983b5235ad2b82cc7c48c36def4960fdcf37697253c9d9854a2"')]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v("\n "),a("span",{pre:!0,attrs:{class:"token property"}},[t._v('"scriptPubKey"')]),a("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token string"}},[t._v('"0014d83837bd474d799ad4decba4bac561a7356e0371"')]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v("\n "),a("span",{pre:!0,attrs:{class:"token property"}},[t._v('"index"')]),a("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token number"}},[t._v("1")]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v("\n "),a("span",{pre:!0,attrs:{class:"token property"}},[t._v('"value"')]),a("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token number"}},[t._v("50000000")]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v("\n "),a("span",{pre:!0,attrs:{class:"token property"}},[t._v('"address"')]),a("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token string"}},[t._v('"bcrt1qmqur0028f4ue44x7ewjt43tp5u6kuqm3eqa3ua"')]),t._v("\n "),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("}")]),t._v("\n "),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("]")]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v("\n "),a("span",{pre:!0,attrs:{class:"token property"}},[t._v('"timestamp"')]),a("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token number"}},[t._v("1540381888")]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v("\n "),a("span",{pre:!0,attrs:{class:"token property"}},[t._v('"balanceChange"')]),a("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token number"}},[t._v("100000000")]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v("\n "),a("span",{pre:!0,attrs:{class:"token property"}},[t._v('"replaceable"')]),a("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token boolean"}},[t._v("false")]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v("\n "),a("span",{pre:!0,attrs:{class:"token property"}},[t._v('"replacing"')]),a("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token null keyword"}},[t._v("null")]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v("\n "),a("span",{pre:!0,attrs:{class:"token property"}},[t._v('"replacedBy"')]),a("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token null keyword"}},[t._v("null")]),t._v("\n "),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("}")]),t._v("\n "),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("]")]),t._v("\n "),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("}")]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v("\n "),a("span",{pre:!0,attrs:{class:"token property"}},[t._v('"unconfirmedTransactions"')]),a("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("{")]),t._v("\n "),a("span",{pre:!0,attrs:{class:"token property"}},[t._v('"transactions"')]),a("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("[")]),t._v("\n "),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("{")]),t._v("\n "),a("span",{pre:!0,attrs:{class:"token property"}},[t._v('"blockHash"')]),a("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token null keyword"}},[t._v("null")]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v("\n "),a("span",{pre:!0,attrs:{class:"token property"}},[t._v('"confirmations"')]),a("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token number"}},[t._v("0")]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v("\n "),a("span",{pre:!0,attrs:{class:"token property"}},[t._v('"height"')]),a("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token null keyword"}},[t._v("null")]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v("\n "),a("span",{pre:!0,attrs:{class:"token property"}},[t._v('"transactionId"')]),a("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token string"}},[t._v('"7ec0bcbd3b7685b6bbdb4287a250b64bfcb799dbbbcffa78c00e6cc11185e5f1"')]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v("\n "),a("span",{pre:!0,attrs:{class:"token property"}},[t._v('"transaction"')]),a("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token null keyword"}},[t._v("null")]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v("\n "),a("span",{pre:!0,attrs:{class:"token property"}},[t._v('"outputs"')]),a("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("[")]),t._v("\n "),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("{")]),t._v("\n "),a("span",{pre:!0,attrs:{class:"token property"}},[t._v('"keyPath"')]),a("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token string"}},[t._v('"0"')]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v("\n "),a("span",{pre:!0,attrs:{class:"token property"}},[t._v('"scriptPubKey"')]),a("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token string"}},[t._v('"0014b39fc4eb5c6dd238d39449b70a2e30d575426d99"')]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v("\n "),a("span",{pre:!0,attrs:{class:"token property"}},[t._v('"index"')]),a("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token number"}},[t._v("1")]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v("\n "),a("span",{pre:!0,attrs:{class:"token property"}},[t._v('"value"')]),a("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token number"}},[t._v("100000000")]),t._v("\n "),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("}")]),t._v("\n "),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("]")]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v("\n "),a("span",{pre:!0,attrs:{class:"token property"}},[t._v('"inputs"')]),a("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("[")]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("]")]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v("\n "),a("span",{pre:!0,attrs:{class:"token property"}},[t._v('"timestamp"')]),a("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token number"}},[t._v("1540381889")]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v("\n "),a("span",{pre:!0,attrs:{class:"token property"}},[t._v('"balanceChange"')]),a("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token number"}},[t._v("100000000")]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v("\n "),a("span",{pre:!0,attrs:{class:"token property"}},[t._v('"replaceable"')]),a("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token boolean"}},[t._v("false")]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v("\n "),a("span",{pre:!0,attrs:{class:"token property"}},[t._v('"replacing"')]),a("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token string"}},[t._v('"e070e213a0815b84b4ae96d4d64ce551158524364d3522e7d6bd5415c6c15d3f"')]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v("\n "),a("span",{pre:!0,attrs:{class:"token property"}},[t._v('"replacedBy"')]),a("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token null keyword"}},[t._v("null")]),t._v("\n "),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("}")]),t._v("\n "),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("]")]),t._v("\n "),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("}")]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v("\n "),a("span",{pre:!0,attrs:{class:"token property"}},[t._v('"replacedTransactions"')]),a("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("{")]),t._v("\n "),a("span",{pre:!0,attrs:{class:"token property"}},[t._v('"transactions"')]),a("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("[")]),t._v("\n "),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("{")]),t._v("\n "),a("span",{pre:!0,attrs:{class:"token property"}},[t._v('"blockHash"')]),a("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token null keyword"}},[t._v("null")]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v("\n "),a("span",{pre:!0,attrs:{class:"token property"}},[t._v('"confirmations"')]),a("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token number"}},[t._v("0")]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v("\n "),a("span",{pre:!0,attrs:{class:"token property"}},[t._v('"height"')]),a("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token null keyword"}},[t._v("null")]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v("\n "),a("span",{pre:!0,attrs:{class:"token property"}},[t._v('"transactionId"')]),a("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token string"}},[t._v('"7ec0bcbd3b7685b6bbdb4287a250b64bfcb799dbbbcffa78c00e6cc11185e5f1"')]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v("\n "),a("span",{pre:!0,attrs:{class:"token property"}},[t._v('"transaction"')]),a("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token null keyword"}},[t._v("null")]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v("\n "),a("span",{pre:!0,attrs:{class:"token property"}},[t._v('"outputs"')]),a("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("[")]),t._v("\n "),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("{")]),t._v("\n "),a("span",{pre:!0,attrs:{class:"token property"}},[t._v('"keyPath"')]),a("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token string"}},[t._v('"0"')]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v("\n "),a("span",{pre:!0,attrs:{class:"token property"}},[t._v('"scriptPubKey"')]),a("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token string"}},[t._v('"0014b39fc4eb5c6dd238d39449b70a2e30d575426d99"')]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v("\n "),a("span",{pre:!0,attrs:{class:"token property"}},[t._v('"index"')]),a("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token number"}},[t._v("1")]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v("\n "),a("span",{pre:!0,attrs:{class:"token property"}},[t._v('"value"')]),a("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token number"}},[t._v("100000000")]),t._v("\n "),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("}")]),t._v("\n "),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("]")]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v("\n "),a("span",{pre:!0,attrs:{class:"token property"}},[t._v('"inputs"')]),a("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("[")]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("]")]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v("\n "),a("span",{pre:!0,attrs:{class:"token property"}},[t._v('"timestamp"')]),a("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token number"}},[t._v("1540381889")]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v("\n "),a("span",{pre:!0,attrs:{class:"token property"}},[t._v('"balanceChange"')]),a("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token number"}},[t._v("100000000")]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v("\n "),a("span",{pre:!0,attrs:{class:"token property"}},[t._v('"replaceable"')]),a("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token boolean"}},[t._v("false")]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v("\n "),a("span",{pre:!0,attrs:{class:"token property"}},[t._v('"replacing"')]),a("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token null keyword"}},[t._v("null")]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v("\n "),a("span",{pre:!0,attrs:{class:"token property"}},[t._v('"replacedBy"')]),a("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token string"}},[t._v('"7ec0bcbd3b7685b6bbdb4287a250b64bfcb799dbbbcffa78c00e6cc11185e5f1"')]),t._v("\n "),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("}")]),t._v("\n "),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("]")]),t._v("\n "),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("}")]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v("\n "),a("span",{pre:!0,attrs:{class:"token property"}},[t._v('"immatureTransactions"')]),a("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("{")]),t._v("\n "),a("span",{pre:!0,attrs:{class:"token property"}},[t._v('"transactions"')]),a("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("[")]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("]")]),t._v("\n "),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("}")]),t._v("\n"),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("}")]),t._v("\n")])])]),a("ul",[a("li",[a("code",[t._v("inputs")]),t._v(": The spent outputs of this transaction.")]),t._v(" "),a("li",[a("code",[t._v("inputs.inputIndex")]),t._v(": The index of the input in this transaction.")]),t._v(" "),a("li",[a("code",[t._v("replaceable")]),t._v(": "),a("code",[t._v("true")]),t._v(" if the transaction can be replaced (the transaction has RBF activated, is in the unconfirmed list and is not an intermediate transaction in a chain of unconfirmed transaction)")]),t._v(" "),a("li",[a("code",[t._v("replacing")]),t._v(": Only set in the unconfirmed list, and is pointing to a transaction id in the replaced list.")]),t._v(" "),a("li",[a("code",[t._v("replacedBy")]),t._v(": Only set in the replaced list, and is pointing to a transaction id in the unconfirmed list.")]),t._v(" "),a("li",[a("code",[t._v("immatureTransactions")]),t._v(": Coinbase transactions with less than 100 confirmations.")])]),t._v(" "),a("p",[t._v("Note for liquid, "),a("code",[t._v("balanceChange")]),t._v(" is an array of "),a("a",{attrs:{href:"#liquid"}},[t._v("AssetMoney")]),t._v(".\nNote that the list of confirmed transaction also include immature transactions.")]),t._v(" "),a("h2",{attrs:{id:"query-specifc-transactions-of-tracked-sources"}},[a("a",{staticClass:"header-anchor",attrs:{href:"#query-specifc-transactions-of-tracked-sources"}},[t._v("#")]),t._v(" "),a("a",{attrs:{name:"singletransaction"}}),t._v("Query specifc transactions of tracked sources")]),t._v(" "),a("p",[a("code",[t._v("HTTP GET v1/cryptos/{cryptoCode}/derivations/{derivationScheme}/transactions/{txId}")]),t._v(" "),a("code",[t._v("HTTP GET v1/cryptos/{cryptoCode}/addresses/{address}/transactions/{txId}")]),t._v(" "),a("code",[t._v("HTTP GET v1/cryptos/{cryptoCode}/groups/{groupId}/transactions/{txId}")])]),t._v(" "),a("p",[t._v("Error codes:")]),t._v(" "),a("ul",[a("li",[t._v("HTTP 404: Transaction not found")])]),t._v(" "),a("p",[t._v("Optional Parameters:")]),t._v(" "),a("ul",[a("li",[a("code",[t._v("includeTransaction")]),t._v(" includes the hex of the transaction, not only information (default: true)")])]),t._v(" "),a("p",[t._v("Returns:")]),t._v(" "),a("div",{staticClass:"language-json extra-class"},[a("pre",{pre:!0,attrs:{class:"language-json"}},[a("code",[a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("{")]),t._v("\n "),a("span",{pre:!0,attrs:{class:"token property"}},[t._v('"blockHash"')]),a("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token null keyword"}},[t._v("null")]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v("\n "),a("span",{pre:!0,attrs:{class:"token property"}},[t._v('"confirmations"')]),a("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token number"}},[t._v("0")]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v("\n "),a("span",{pre:!0,attrs:{class:"token property"}},[t._v('"height"')]),a("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token null keyword"}},[t._v("null")]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v("\n "),a("span",{pre:!0,attrs:{class:"token property"}},[t._v('"transactionId"')]),a("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token string"}},[t._v('"7ec0bcbd3b7685b6bbdb4287a250b64bfcb799dbbbcffa78c00e6cc11185e5f1"')]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v("\n "),a("span",{pre:!0,attrs:{class:"token property"}},[t._v('"transaction"')]),a("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token null keyword"}},[t._v("null")]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v("\n "),a("span",{pre:!0,attrs:{class:"token property"}},[t._v('"outputs"')]),a("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("[")]),t._v("\n "),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("{")]),t._v("\n "),a("span",{pre:!0,attrs:{class:"token property"}},[t._v('"scriptPubKey"')]),a("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token string"}},[t._v('"0014b39fc4eb5c6dd238d39449b70a2e30d575426d99"')]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v("\n "),a("span",{pre:!0,attrs:{class:"token property"}},[t._v('"index"')]),a("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token number"}},[t._v("1")]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v("\n "),a("span",{pre:!0,attrs:{class:"token property"}},[t._v('"value"')]),a("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token number"}},[t._v("100000000")]),t._v("\n "),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("}")]),t._v("\n "),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("]")]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v("\n "),a("span",{pre:!0,attrs:{class:"token property"}},[t._v('"inputs"')]),a("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("[")]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("]")]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v("\n "),a("span",{pre:!0,attrs:{class:"token property"}},[t._v('"timestamp"')]),a("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token number"}},[t._v("1540381889")]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v("\n "),a("span",{pre:!0,attrs:{class:"token property"}},[t._v('"balanceChange"')]),a("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token number"}},[t._v("100000000")]),t._v("\n"),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("}")]),t._v("\n")])])]),a("h2",{attrs:{id:"get-balance-of-tracked-sources"}},[a("a",{staticClass:"header-anchor",attrs:{href:"#get-balance-of-tracked-sources"}},[t._v("#")]),t._v(" "),a("a",{attrs:{name:"balance"}}),t._v("Get balance of tracked sources")]),t._v(" "),a("p",[a("code",[t._v("HTTP GET v1/cryptos/{cryptoCode}/derivations/{derivationScheme}/balance")]),t._v(" "),a("code",[t._v("HTTP GET v1/cryptos/{cryptoCode}/addresses/{address}/balance")]),t._v(" "),a("code",[t._v("HTTP GET v1/cryptos/{cryptoCode}/groups/{groupId}/balance")])]),t._v(" "),a("p",[t._v("Returns:")]),t._v(" "),a("div",{staticClass:"language-json extra-class"},[a("pre",{pre:!0,attrs:{class:"language-json"}},[a("code",[a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("{")]),t._v("\n "),a("span",{pre:!0,attrs:{class:"token property"}},[t._v('"unconfirmed"')]),a("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token number"}},[t._v("110000000")]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v("\n "),a("span",{pre:!0,attrs:{class:"token property"}},[t._v('"confirmed"')]),a("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token number"}},[t._v("100000000")]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v("\n "),a("span",{pre:!0,attrs:{class:"token property"}},[t._v('"available"')]),a("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token number"}},[t._v("210000000")]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v("\n "),a("span",{pre:!0,attrs:{class:"token property"}},[t._v('"immature"')]),a("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token number"}},[t._v("0")]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v("\n "),a("span",{pre:!0,attrs:{class:"token property"}},[t._v('"total"')]),a("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token number"}},[t._v("210000000")]),t._v("\n"),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("}")]),t._v("\n")])])]),a("p",[t._v("Note for liquid, the values are array of "),a("a",{attrs:{href:"#liquid"}},[t._v("AssetMoney")]),t._v(".")]),t._v(" "),a("ul",[a("li",[a("code",[t._v("unconfirmed")]),t._v(": How the confirmed balance would be updated once all the unconfirmed transactions were confirmed.")]),t._v(" "),a("li",[a("code",[t._v("confirmed")]),t._v(": The balance of all funds in confirmed transactions.")]),t._v(" "),a("li",[a("code",[t._v("total")]),t._v(": The total of funds owned (ie, "),a("code",[t._v("confirmed + unconfirmed")]),t._v(")")]),t._v(" "),a("li",[a("code",[t._v("immature")]),t._v(": The total unspendable funds (ie, coinbase reward which need 100 confirmations before being spendable)")]),t._v(" "),a("li",[a("code",[t._v("available")]),t._v(": The total spendable balance. (ie, "),a("code",[t._v("total - immature")]),t._v(")")])]),t._v(" "),a("p",[t._v("Immature funds is the sum of UTXO's belonging to a coinbase transaction with less than 100 confirmations.")]),t._v(" "),a("h2",{attrs:{id:"get-a-transaction"}},[a("a",{staticClass:"header-anchor",attrs:{href:"#get-a-transaction"}},[t._v("#")]),t._v(" "),a("a",{attrs:{name:"gettransaction"}}),t._v("Get a transaction")]),t._v(" "),a("p",[a("code",[t._v("HTTP GET v1/cryptos/{cryptoCode}/transactions/{txId}")])]),t._v(" "),a("p",[t._v("Optional Parameters:")]),t._v(" "),a("ul",[a("li",[a("code",[t._v("includeTransaction")]),t._v(" includes the hex of the transaction, not only information (default: true)")])]),t._v(" "),a("p",[t._v("Error codes:")]),t._v(" "),a("ul",[a("li",[t._v("HTTP 404: Transaction not found")])]),t._v(" "),a("p",[t._v("Returns:")]),t._v(" "),a("div",{staticClass:"language-json extra-class"},[a("pre",{pre:!0,attrs:{class:"language-json"}},[a("code",[a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("{")]),t._v("\n "),a("span",{pre:!0,attrs:{class:"token property"}},[t._v('"confirmations"')]),a("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token number"}},[t._v("3")]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v("\n "),a("span",{pre:!0,attrs:{class:"token property"}},[t._v('"blockId"')]),a("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token string"}},[t._v('"5efa23803df818cd21faa0c11e84db28c8352e76acb93d0c0adfe123db827190"')]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v("\n "),a("span",{pre:!0,attrs:{class:"token property"}},[t._v('"transactionHash"')]),a("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token string"}},[t._v('"ed86c55b519c26ab4ba8130c976294753934c1f9f6d30203e65bb222648a8cdf"')]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v("\n "),a("span",{pre:!0,attrs:{class:"token property"}},[t._v('"transaction"')]),a("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token string"}},[t._v('"0200000001205dcde69a5bd2b3281d387e6f125338f9ccb904d94df383ff56d9923599681e000000004847304402200b9d78e01691339acb238d7cd7a40ae620796bdcf8cb167dff4e100b71a2b0950220518e3a955ea7229d57c0160ecf491e8048662d7112fe5feaa312ff71388fda9701feffffff028c02102401000000160014a4ccb74ada7dd01b3018c3308894fea27b4813be00e1f5050000000016001408f86300ddff26ddf779ddce833f7e9e7442156c67000000"')]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v("\n "),a("span",{pre:!0,attrs:{class:"token property"}},[t._v('"height"')]),a("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token number"}},[t._v("104")]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v("\n "),a("span",{pre:!0,attrs:{class:"token property"}},[t._v('"timestamp"')]),a("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token number"}},[t._v("1540390804")]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v("\n "),a("span",{pre:!0,attrs:{class:"token property"}},[t._v('"replacedBy"')]),a("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token string"}},[t._v('"7ec0bcbd3b7685b6bbdb4287a250b64bfcb799dbbbcffa78c00e6cc11185e5f1"')]),t._v("\n"),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("}")]),t._v("\n")])])]),a("p",[a("code",[t._v("height")]),t._v(" and "),a("code",[t._v("blockId")]),t._v(" will be null if the transaction is not confirmed.")]),t._v(" "),a("h2",{attrs:{id:"get-connection-status-to-the-chain"}},[a("a",{staticClass:"header-anchor",attrs:{href:"#get-connection-status-to-the-chain"}},[t._v("#")]),t._v(" "),a("a",{attrs:{name:"status"}}),t._v("Get connection status to the chain")]),t._v(" "),a("p",[a("code",[t._v("HTTP GET v1/cryptos/{cryptoCode}/status")])]),t._v(" "),a("p",[t._v("Returns:")]),t._v(" "),a("div",{staticClass:"language-json extra-class"},[a("pre",{pre:!0,attrs:{class:"language-json"}},[a("code",[a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("{")]),t._v("\n "),a("span",{pre:!0,attrs:{class:"token property"}},[t._v('"bitcoinStatus"')]),a("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("{")]),t._v("\n "),a("span",{pre:!0,attrs:{class:"token property"}},[t._v('"blocks"')]),a("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token number"}},[t._v("103")]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v("\n "),a("span",{pre:!0,attrs:{class:"token property"}},[t._v('"headers"')]),a("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token number"}},[t._v("103")]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v("\n "),a("span",{pre:!0,attrs:{class:"token property"}},[t._v('"verificationProgress"')]),a("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token number"}},[t._v("1.0")]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v("\n "),a("span",{pre:!0,attrs:{class:"token property"}},[t._v('"isSynched"')]),a("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token boolean"}},[t._v("true")]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v("\n "),a("span",{pre:!0,attrs:{class:"token property"}},[t._v('"incrementalRelayFee"')]),a("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token number"}},[t._v("1")]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v("\n "),a("span",{pre:!0,attrs:{class:"token property"}},[t._v('"minRelayTxFee"')]),a("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token number"}},[t._v("1")]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v("\n "),a("span",{pre:!0,attrs:{class:"token property"}},[t._v('"capabilities"')]),a("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("{")]),t._v("\n "),a("span",{pre:!0,attrs:{class:"token property"}},[t._v('"canScanTxoutSet"')]),a("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token boolean"}},[t._v("true")]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v("\n "),a("span",{pre:!0,attrs:{class:"token property"}},[t._v('"canSupportSegwit"')]),a("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token boolean"}},[t._v("true")]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v("\n "),a("span",{pre:!0,attrs:{class:"token property"}},[t._v('"canSupportTaproot"')]),a("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token boolean"}},[t._v("true")]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v("\n "),a("span",{pre:!0,attrs:{class:"token property"}},[t._v('"canSupportTransactionCheck"')]),a("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token boolean"}},[t._v("true")]),t._v("\n "),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("}")]),t._v("\n "),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("}")]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v("\n "),a("span",{pre:!0,attrs:{class:"token property"}},[t._v('"isFullySynched"')]),a("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token boolean"}},[t._v("true")]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v("\n "),a("span",{pre:!0,attrs:{class:"token property"}},[t._v('"chainHeight"')]),a("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token number"}},[t._v("103")]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v("\n "),a("span",{pre:!0,attrs:{class:"token property"}},[t._v('"syncHeight"')]),a("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token number"}},[t._v("103")]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v("\n "),a("span",{pre:!0,attrs:{class:"token property"}},[t._v('"networkType"')]),a("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token string"}},[t._v('"Regtest"')]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v("\n "),a("span",{pre:!0,attrs:{class:"token property"}},[t._v('"cryptoCode"')]),a("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token string"}},[t._v('"BTC"')]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v("\n "),a("span",{pre:!0,attrs:{class:"token property"}},[t._v('"instanceName"')]),a("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token string"}},[t._v('"MyInstance"')]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v("\n "),a("span",{pre:!0,attrs:{class:"token property"}},[t._v('"supportedCryptoCodes"')]),a("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("[")]),t._v("\n "),a("span",{pre:!0,attrs:{class:"token string"}},[t._v('"BTC"')]),t._v("\n "),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("]")]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v("\n "),a("span",{pre:!0,attrs:{class:"token property"}},[t._v('"version"')]),a("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token string"}},[t._v('"1.0.3.5"')]),t._v("\n"),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("}")]),t._v("\n")])])]),a("p",[a("code",[t._v("instanceName")]),t._v(" can be configured via configuration's key "),a("code",[t._v("instancename")]),t._v(".")]),t._v(" "),a("h2",{attrs:{id:"get-a-new-unused-address"}},[a("a",{staticClass:"header-anchor",attrs:{href:"#get-a-new-unused-address"}},[t._v("#")]),t._v(" "),a("a",{attrs:{name:"unused"}}),t._v("Get a new unused address")]),t._v(" "),a("p",[a("code",[t._v("HTTP GET v1/cryptos/{cryptoCode}/derivations/{derivationScheme}/addresses/unused")])]),t._v(" "),a("p",[t._v("Error codes:")]),t._v(" "),a("ul",[a("li",[t._v("HTTP 404: "),a("code",[t._v("cryptoCode-not-supported")])]),t._v(" "),a("li",[t._v("HTTP 400: "),a("code",[t._v("strategy-not-found")])])]),t._v(" "),a("p",[t._v("Optional parameters:")]),t._v(" "),a("ul",[a("li",[a("code",[t._v("feature")]),t._v(": Use "),a("code",[t._v("Deposit")]),t._v(" to get a deposit address ("),a("code",[t._v("0/x")]),t._v("), "),a("code",[t._v("Change")]),t._v(" to get a change address ("),a("code",[t._v("1/x")]),t._v("), "),a("code",[t._v("Direct")]),t._v(" to get "),a("code",[t._v("x")]),t._v(" or "),a("code",[t._v("Custom")]),t._v(" if "),a("code",[t._v("customKeyPathTemplate")]),t._v(" is configured (default: "),a("code",[t._v("Deposit")]),t._v(")")]),t._v(" "),a("li",[a("code",[t._v("skip")]),t._v(": How many addresses to skip, needed if the user want multiple unused addresses (default:0)")]),t._v(" "),a("li",[a("code",[t._v("reserve")]),t._v(": Mark the returned address as used (default: false)")])]),t._v(" "),a("p",[t._v("Returns:")]),t._v(" "),a("div",{staticClass:"language-json extra-class"},[a("pre",{pre:!0,attrs:{class:"language-json"}},[a("code",[a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("{")]),t._v("\n "),a("span",{pre:!0,attrs:{class:"token property"}},[t._v('"trackedSource"')]),a("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token string"}},[t._v('"DERIVATIONSCHEME:tpubD6NzVbkrYhZ4Wo2RMq8Xbnrorf1xnABkKMS3EGshPkQ3Z4N4GN8uyLuDPvnK7Ekc2FHdXbLvcuZny1gPiohMksFGKmaX3APD2DbTeBWj751-[p2sh]"')]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v("\n "),a("span",{pre:!0,attrs:{class:"token property"}},[t._v('"feature"')]),a("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token string"}},[t._v('"Deposit"')]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v("\n "),a("span",{pre:!0,attrs:{class:"token property"}},[t._v('"derivationStrategy"')]),a("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token string"}},[t._v('"tpubD6NzVbkrYhZ4Wo2RMq8Xbnrorf1xnABkKMS3EGshPkQ3Z4N4GN8uyLuDPvnK7Ekc2FHdXbLvcuZny1gPiohMksFGKmaX3APD2DbTeBWj751-[p2sh]"')]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v("\n "),a("span",{pre:!0,attrs:{class:"token property"}},[t._v('"keyPath"')]),a("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token string"}},[t._v('"0/2"')]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v("\n "),a("span",{pre:!0,attrs:{class:"token property"}},[t._v('"scriptPubKey"')]),a("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token string"}},[t._v('"a91412cbf6154ef6d9aecf9c978dc2bdc43f1881dd5f87"')]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v("\n "),a("span",{pre:!0,attrs:{class:"token property"}},[t._v('"address"')]),a("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token string"}},[t._v('"2MtxcVDMiRrJ3V4zfsAwZGbZfPiDUxSXDY2"')]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v("\n "),a("span",{pre:!0,attrs:{class:"token property"}},[t._v('"redeem"')]),a("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token string"}},[t._v('"0014e2eb89edba1fe6c6c0863699eeb78f6ec3271b45"')]),t._v("\n"),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("}")]),t._v("\n")])])]),a("p",[t._v("Note: "),a("code",[t._v("redeem")]),t._v(" is returning the segwit redeem if the derivation scheme is a P2SH-P2WSH or P2WSH, or the p2sh redeem if just a p2sh.")]),t._v(" "),a("h2",{attrs:{id:"get-scriptpubkey-information-of-a-derivation-scheme"}},[a("a",{staticClass:"header-anchor",attrs:{href:"#get-scriptpubkey-information-of-a-derivation-scheme"}},[t._v("#")]),t._v(" "),a("a",{attrs:{name:"scriptPubKey"}}),t._v("Get scriptPubKey information of a Derivation Scheme")]),t._v(" "),a("p",[a("code",[t._v("HTTP GET v1/cryptos/{cryptoCode}/derivations/{derivationScheme}/scripts/{script}")])]),t._v(" "),a("p",[t._v("Error codes:")]),t._v(" "),a("ul",[a("li",[t._v("HTTP 404: "),a("code",[t._v("cryptoCode-not-supported")])])]),t._v(" "),a("p",[t._v("Returns:")]),t._v(" "),a("div",{staticClass:"language-json extra-class"},[a("pre",{pre:!0,attrs:{class:"language-json"}},[a("code",[a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("{")]),t._v("\n "),a("span",{pre:!0,attrs:{class:"token property"}},[t._v('"trackedSource"')]),a("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token string"}},[t._v('"DERIVATIONSCHEME:tpubD6NzVbkrYhZ4WcPozSqALNCrJEt4C45sPDhEBBuokoCeDgjX6YTs4QVvhD9kao6f2uZLqZF4qcXprYyRqooSXr1uPp1KPH1o4m6aw9nxbiA"')]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v("\n "),a("span",{pre:!0,attrs:{class:"token property"}},[t._v('"feature"')]),a("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token string"}},[t._v('"Deposit"')]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v("\n "),a("span",{pre:!0,attrs:{class:"token property"}},[t._v('"derivationStrategy"')]),a("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token string"}},[t._v('"tpubD6NzVbkrYhZ4WcPozSqALNCrJEt4C45sPDhEBBuokoCeDgjX6YTs4QVvhD9kao6f2uZLqZF4qcXprYyRqooSXr1uPp1KPH1o4m6aw9nxbiA"')]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v("\n "),a("span",{pre:!0,attrs:{class:"token property"}},[t._v('"keyPath"')]),a("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token string"}},[t._v('"0/0"')]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v("\n "),a("span",{pre:!0,attrs:{class:"token property"}},[t._v('"scriptPubKey"')]),a("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token string"}},[t._v('"001460c25d29559774803f262acf5ee5c922eff52ccd"')]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v("\n "),a("span",{pre:!0,attrs:{class:"token property"}},[t._v('"address"')]),a("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token string"}},[t._v('"tb1qvrp96224ja6gq0ex9t84aewfythl2txdkpdmu0"')]),t._v("\n"),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("}")]),t._v("\n")])])]),a("h2",{attrs:{id:"get-available-unspent-transaction-outputs-utxos-of-tracked-sources"}},[a("a",{staticClass:"header-anchor",attrs:{href:"#get-available-unspent-transaction-outputs-utxos-of-tracked-sources"}},[t._v("#")]),t._v(" "),a("a",{attrs:{name:"utxos"}}),t._v("Get available Unspent Transaction Outputs (UTXOs) of tracked sources")]),t._v(" "),a("p",[a("code",[t._v("HTTP GET v1/cryptos/{cryptoCode}/derivations/{derivationScheme}/utxos")]),t._v(" "),a("code",[t._v("HTTP GET v1/cryptos/{cryptoCode}/addresses/{address}/utxos")]),t._v(" "),a("code",[t._v("HTTP GET v1/cryptos/{cryptoCode}/groups/{groupId}/utxos")])]),t._v(" "),a("p",[t._v("Error:")]),t._v(" "),a("ul",[a("li",[t._v("HTTP 404: "),a("code",[t._v("cryptoCode-not-supported")])])]),t._v(" "),a("p",[t._v("Result:")]),t._v(" "),a("div",{staticClass:"language-json extra-class"},[a("pre",{pre:!0,attrs:{class:"language-json"}},[a("code",[a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("{")]),t._v("\n "),a("span",{pre:!0,attrs:{class:"token property"}},[t._v('"trackedSource"')]),a("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token string"}},[t._v('"DERIVATIONSCHEME:tpubD6NzVbkrYhZ4XQVi1sSEDBWTcicDqVSCTnYDxpwGwcSZVbPii2b7baRg57YfL64ed36sBRe6GviihHwhy3D1cnBe5uXb27DjrDZCKUA7PQi"')]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v("\n "),a("span",{pre:!0,attrs:{class:"token property"}},[t._v('"derivationStrategy"')]),a("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token string"}},[t._v('"tpubD6NzVbkrYhZ4XQVi1sSEDBWTcicDqVSCTnYDxpwGwcSZVbPii2b7baRg57YfL64ed36sBRe6GviihHwhy3D1cnBe5uXb27DjrDZCKUA7PQi"')]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v("\n "),a("span",{pre:!0,attrs:{class:"token property"}},[t._v('"currentHeight"')]),a("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token number"}},[t._v("107")]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v("\n "),a("span",{pre:!0,attrs:{class:"token property"}},[t._v('"unconfirmed"')]),a("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("{")]),t._v("\n "),a("span",{pre:!0,attrs:{class:"token property"}},[t._v('"utxOs"')]),a("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("[")]),t._v("\n "),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("{")]),t._v("\n "),a("span",{pre:!0,attrs:{class:"token property"}},[t._v('"feature"')]),a("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token string"}},[t._v('"Deposit"')]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v("\n "),a("span",{pre:!0,attrs:{class:"token property"}},[t._v('"outpoint"')]),a("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token string"}},[t._v('"10ba4bcadd03130b1bd98b0bc7aea9910f871b25b87ec06e484456e84440c88a01000000"')]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v("\n "),a("span",{pre:!0,attrs:{class:"token property"}},[t._v('"index"')]),a("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token number"}},[t._v("1")]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v("\n "),a("span",{pre:!0,attrs:{class:"token property"}},[t._v('"transactionHash"')]),a("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token string"}},[t._v('"8ac84044e85644486ec07eb8251b870f91a9aec70b8bd91b0b1303ddca4bba10"')]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v("\n "),a("span",{pre:!0,attrs:{class:"token property"}},[t._v('"scriptPubKey"')]),a("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token string"}},[t._v('"00149681ae465a045e2068460b9d281cf97dede87cd8"')]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v("\n "),a("span",{pre:!0,attrs:{class:"token property"}},[t._v('"address"')]),a("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token string"}},[t._v('"bcrt1qj6q6u3j6q30zq6zxpwwjs88e0hk7slxcunru7u"')]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v("\n "),a("span",{pre:!0,attrs:{class:"token property"}},[t._v('"value"')]),a("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token number"}},[t._v("100000000")]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v("\n "),a("span",{pre:!0,attrs:{class:"token property"}},[t._v('"keyPath"')]),a("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token string"}},[t._v('"0/0"')]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v("\n "),a("span",{pre:!0,attrs:{class:"token property"}},[t._v('"timestamp"')]),a("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token number"}},[t._v("1540376171")]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v("\n "),a("span",{pre:!0,attrs:{class:"token property"}},[t._v('"confirmations"')]),a("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token number"}},[t._v("0")]),t._v("\n "),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("}")]),t._v("\n "),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("]")]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v("\n "),a("span",{pre:!0,attrs:{class:"token property"}},[t._v('"spentOutpoints"')]),a("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("[")]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("]")]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v("\n "),a("span",{pre:!0,attrs:{class:"token property"}},[t._v('"hasChanges"')]),a("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token boolean"}},[t._v("true")]),t._v("\n "),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("}")]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v("\n "),a("span",{pre:!0,attrs:{class:"token property"}},[t._v('"confirmed"')]),a("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("{")]),t._v("\n "),a("span",{pre:!0,attrs:{class:"token property"}},[t._v('"utxOs"')]),a("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("[")]),t._v("\n "),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("{")]),t._v("\n "),a("span",{pre:!0,attrs:{class:"token property"}},[t._v('"feature"')]),a("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token string"}},[t._v('"Deposit"')]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v("\n "),a("span",{pre:!0,attrs:{class:"token property"}},[t._v('"outpoint"')]),a("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token string"}},[t._v('"29ca6590f3f03a6523ad79975392e74e385bf2b7dafe6c537ffa12f9e124348800000000"')]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v("\n "),a("span",{pre:!0,attrs:{class:"token property"}},[t._v('"index"')]),a("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token number"}},[t._v("0")]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v("\n "),a("span",{pre:!0,attrs:{class:"token property"}},[t._v('"transactionHash"')]),a("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token string"}},[t._v('"883424e1f912fa7f536cfedab7f25b384ee792539779ad23653af0f39065ca29"')]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v("\n "),a("span",{pre:!0,attrs:{class:"token property"}},[t._v('"scriptPubKey"')]),a("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token string"}},[t._v('"001436a37f2f508650f7074bec4d091fc82bb01cc57f"')]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v("\n "),a("span",{pre:!0,attrs:{class:"token property"}},[t._v('"address"')]),a("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token string"}},[t._v('"bcrt1qx63h7t6sseg0wp6ta3xsj87g9wcpe3tlgqgnql"')]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v("\n "),a("span",{pre:!0,attrs:{class:"token property"}},[t._v('"value"')]),a("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token number"}},[t._v("50000000")]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v("\n "),a("span",{pre:!0,attrs:{class:"token property"}},[t._v('"keyPath"')]),a("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token string"}},[t._v('"0/3"')]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v("\n "),a("span",{pre:!0,attrs:{class:"token property"}},[t._v('"timestamp"')]),a("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token number"}},[t._v("1540376174")]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v("\n "),a("span",{pre:!0,attrs:{class:"token property"}},[t._v('"confirmations"')]),a("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token number"}},[t._v("1")]),t._v("\n "),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("}")]),t._v("\n "),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("]")]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v("\n "),a("span",{pre:!0,attrs:{class:"token property"}},[t._v('"spentOutpoints"')]),a("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("[")]),t._v("\n "),a("span",{pre:!0,attrs:{class:"token string"}},[t._v('"9345f9585d643a31202e686ec7a4c2fe17917a5e7731a79d2327d24d25c0339f01000000"')]),t._v("\n "),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("]")]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v("\n "),a("span",{pre:!0,attrs:{class:"token property"}},[t._v('"spentUnconfirmed"')]),a("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("[")]),t._v("\n "),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("{")]),t._v("\n "),a("span",{pre:!0,attrs:{class:"token property"}},[t._v('"feature"')]),a("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token string"}},[t._v('"Deposit"')]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v("\n "),a("span",{pre:!0,attrs:{class:"token property"}},[t._v('"outpoint"')]),a("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token string"}},[t._v('"c8fd6675624d0b88056b9eaf945c5fd0c4614f7ddf44eb81911b3a66ba0e57a001000000"')]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v("\n "),a("span",{pre:!0,attrs:{class:"token property"}},[t._v('"index"')]),a("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token number"}},[t._v("1")]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v("\n "),a("span",{pre:!0,attrs:{class:"token property"}},[t._v('"transactionHash"')]),a("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token string"}},[t._v('"a0570eba663a1b9181eb44df7d4f61c4d05f5c94af9e6b05880b4d627566fdc8"')]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v("\n "),a("span",{pre:!0,attrs:{class:"token property"}},[t._v('"scriptPubKey"')]),a("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token string"}},[t._v('"0014d77089591a85fa3a91e14f587c50e4b777ffd833"')]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v("\n "),a("span",{pre:!0,attrs:{class:"token property"}},[t._v('"address"')]),a("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token string"}},[t._v('"bcrt1q6acgjkg6shar4y0pfav8c58ykamllkpnz6rnxh"')]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v("\n "),a("span",{pre:!0,attrs:{class:"token property"}},[t._v('"value"')]),a("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token number"}},[t._v("100000")]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v("\n "),a("span",{pre:!0,attrs:{class:"token property"}},[t._v('"keyPath"')]),a("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token string"}},[t._v('"0/0"')]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v("\n "),a("span",{pre:!0,attrs:{class:"token property"}},[t._v('"timestamp"')]),a("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token number"}},[t._v("1699930040")]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v("\n "),a("span",{pre:!0,attrs:{class:"token property"}},[t._v('"confirmations"')]),a("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token number"}},[t._v("0")]),t._v("\n "),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("}")]),t._v("\n "),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("]")]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v("\n "),a("span",{pre:!0,attrs:{class:"token property"}},[t._v('"hasChanges"')]),a("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token boolean"}},[t._v("true")]),t._v("\n "),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("}")]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v("\n "),a("span",{pre:!0,attrs:{class:"token property"}},[t._v('"hasChanges"')]),a("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token boolean"}},[t._v("true")]),t._v("\n"),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("}")]),t._v("\n")])])]),a("p",[t._v("Response:")]),t._v(" "),a("ul",[a("li",[a("code",[t._v("confirmed.utxOs")]),t._v(": UTXOs that are confirmed. (UTXO spent by an unconfirmed transaction are also included)")]),t._v(" "),a("li",[a("code",[t._v("unconfirmed.spentOutpoints")]),t._v(": Always empty.")]),t._v(" "),a("li",[a("code",[t._v("unconfirmed.utxOs")]),t._v(": UTXOs that will be confirmed once the unconfirmed transactions are confirmed.")]),t._v(" "),a("li",[a("code",[t._v("unconfirmed.spentOutpoints")]),t._v(": Confirmed UTXOs that will spent once the transactions are confirmed.")]),t._v(" "),a("li",[a("code",[t._v("spentUnconfirmed")]),t._v(": UTXOs that are spent by an unconfirmed transaction.")])]),t._v(" "),a("p",[t._v("This call does not returns conflicted unconfirmed UTXOs.\nNote that confirmed utxo, do not include immature UTXOs. (ie. UTXOs belonging to a coinbase transaction with less than 100 confirmations)")]),t._v(" "),a("h2",{attrs:{id:"notifications-via-websocket"}},[a("a",{staticClass:"header-anchor",attrs:{href:"#notifications-via-websocket"}},[t._v("#")]),t._v(" "),a("a",{attrs:{name:"websocket"}}),t._v("Notifications via websocket")]),t._v(" "),a("p",[t._v("NBXplorer implements real-time notification via websocket supports for new block or transaction.")]),t._v(" "),a("p",[a("code",[t._v("HTTP GET v1/cryptos/{cryptoCode}/connect")])]),t._v(" "),a("p",[t._v("Once you are connected to the websocket, you can subscribe to block notifications by sending the following JSON to it.")]),t._v(" "),a("div",{staticClass:"language-json extra-class"},[a("pre",{pre:!0,attrs:{class:"language-json"}},[a("code",[a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("{")]),t._v("\n "),a("span",{pre:!0,attrs:{class:"token property"}},[t._v('"type"')]),a("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token string"}},[t._v('"subscribeblock"')]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v("\n "),a("span",{pre:!0,attrs:{class:"token property"}},[t._v('"data"')]),a("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("{")]),t._v("\n "),a("span",{pre:!0,attrs:{class:"token property"}},[t._v('"cryptoCode"')]),a("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token string"}},[t._v('"BTC"')]),t._v("\n "),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("}")]),t._v("\n"),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("}")]),t._v("\n")])])]),a("p",[t._v("Then a notification will be delivered through the websocket when a new block is mined:")]),t._v(" "),a("div",{staticClass:"language-json extra-class"},[a("pre",{pre:!0,attrs:{class:"language-json"}},[a("code",[a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("{")]),t._v("\n "),a("span",{pre:!0,attrs:{class:"token property"}},[t._v('"type"')]),a("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token string"}},[t._v('"newblock"')]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v("\n "),a("span",{pre:!0,attrs:{class:"token property"}},[t._v('"eventId"')]),a("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token number"}},[t._v("1")]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v("\n "),a("span",{pre:!0,attrs:{class:"token property"}},[t._v('"data"')]),a("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("{")]),t._v("\n "),a("span",{pre:!0,attrs:{class:"token property"}},[t._v('"height"')]),a("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token number"}},[t._v("104")]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v("\n "),a("span",{pre:!0,attrs:{class:"token property"}},[t._v('"hash"')]),a("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token string"}},[t._v('"10b0e5178aaf42c4a938f0d37430413b7d76feae14b01fc07e1f23300b8821ce"')]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v("\n "),a("span",{pre:!0,attrs:{class:"token property"}},[t._v('"previousBlockHash"')]),a("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token string"}},[t._v('"4c6a9c1cadf143c87249519639e86e236feac9d3cea2904e4c42bc5bc32a48a7"')]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v("\n "),a("span",{pre:!0,attrs:{class:"token property"}},[t._v('"cryptoCode"')]),a("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token string"}},[t._v('"BTC"')]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v("\n "),a("span",{pre:!0,attrs:{class:"token property"}},[t._v('"confirmations"')]),a("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token number"}},[t._v("1")]),t._v("\n "),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("}")]),t._v("\n"),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("}")]),t._v("\n")])])]),a("p",[t._v("For notification concerning "),a("code",[t._v("Derivation Scheme")]),t._v(" transactions, you can subscribe by sending through the websocket:")]),t._v(" "),a("div",{staticClass:"language-json extra-class"},[a("pre",{pre:!0,attrs:{class:"language-json"}},[a("code",[a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("{")]),t._v("\n "),a("span",{pre:!0,attrs:{class:"token property"}},[t._v('"type"')]),a("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token string"}},[t._v('"subscribetransaction"')]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v("\n "),a("span",{pre:!0,attrs:{class:"token property"}},[t._v('"data"')]),a("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("{")]),t._v("\n "),a("span",{pre:!0,attrs:{class:"token property"}},[t._v('"cryptoCode"')]),a("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token string"}},[t._v('"BTC"')]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v("\n "),a("span",{pre:!0,attrs:{class:"token property"}},[t._v('"derivationSchemes"')]),a("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("[")]),t._v("\n "),a("span",{pre:!0,attrs:{class:"token string"}},[t._v('"tpubD6NzVbkrYhZ4YL91Ez5fdgaBPQbFhedFdn5gQL4tSCJn1usmHsV1L6VokzLbgcqzh9hiBnfnQANp5BYW15QdFGRKspZVSW1v2QY917RDs1V-[legacy]"')]),t._v("\n "),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("]")]),t._v("\n "),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("}")]),t._v("\n"),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("}")]),t._v("\n")])])]),a("p",[t._v("Then you will receive such notifications when a transaction is impacting the "),a("code",[t._v("derivation scheme")]),t._v(":")]),t._v(" "),a("div",{staticClass:"language-json extra-class"},[a("pre",{pre:!0,attrs:{class:"language-json"}},[a("code",[a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("{")]),t._v("\n "),a("span",{pre:!0,attrs:{class:"token property"}},[t._v('"type"')]),a("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token string"}},[t._v('"newtransaction"')]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v("\n "),a("span",{pre:!0,attrs:{class:"token property"}},[t._v('"eventId"')]),a("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token number"}},[t._v("2")]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v("\n "),a("span",{pre:!0,attrs:{class:"token property"}},[t._v('"data"')]),a("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("{")]),t._v("\n "),a("span",{pre:!0,attrs:{class:"token property"}},[t._v('"blockId"')]),a("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token null keyword"}},[t._v("null")]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v("\n "),a("span",{pre:!0,attrs:{class:"token property"}},[t._v('"trackedSource"')]),a("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token string"}},[t._v('"DERIVATIONSCHEME:tpubD6NzVbkrYhZ4X2p2D8kx6XV9V5iCJKMBHuBim1BLnZAZC1JobYkdwSrwF8R74V2oUWkJG3H24LwxnXs9wb6Ksivs2gj4RudMteyVai2AsmA-[p2sh]"')]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v("\n "),a("span",{pre:!0,attrs:{class:"token property"}},[t._v('"derivationStrategy"')]),a("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token string"}},[t._v('"tpubD6NzVbkrYhZ4X2p2D8kx6XV9V5iCJKMBHuBim1BLnZAZC1JobYkdwSrwF8R74V2oUWkJG3H24LwxnXs9wb6Ksivs2gj4RudMteyVai2AsmA-[p2sh]"')]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v("\n "),a("span",{pre:!0,attrs:{class:"token property"}},[t._v('"transactionData"')]),a("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("{")]),t._v("\n "),a("span",{pre:!0,attrs:{class:"token property"}},[t._v('"confirmations"')]),a("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token number"}},[t._v("0")]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v("\n "),a("span",{pre:!0,attrs:{class:"token property"}},[t._v('"blockId"')]),a("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token null keyword"}},[t._v("null")]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v("\n "),a("span",{pre:!0,attrs:{class:"token property"}},[t._v('"transactionHash"')]),a("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token string"}},[t._v('"f135537b40ac7a524273176b60e464b7f279f622031ec53af302d959966d7364"')]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v("\n "),a("span",{pre:!0,attrs:{class:"token property"}},[t._v('"transaction"')]),a("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token string"}},[t._v('"0200000001dd7f53b09438fed83abe25dd6cdc30ee2092ce8c855cb9e7b0faa38aba8bc0f500000000484730440220093a837ff4be4b64b2ed4625abb128966caad0cb7830cac7af4f615bbf6b52ce02206227a3ddec3fac9e49f414eeab1388d0e67829620ac3a8fb2f4bbfc5b67bd02901feffffff0200e1f5050000000017a91476de0c5d07fd202880672bc702162b7f18e13aca87640210240100000017a9147cfa038496438a6d3c95cfac990f4dffc6cb44f28768000000"')]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v("\n "),a("span",{pre:!0,attrs:{class:"token property"}},[t._v('"height"')]),a("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token null keyword"}},[t._v("null")]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v("\n "),a("span",{pre:!0,attrs:{class:"token property"}},[t._v('"timestamp"')]),a("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token number"}},[t._v("1540434424")]),t._v("\n "),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("}")]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v("\n "),a("span",{pre:!0,attrs:{class:"token property"}},[t._v('"inputs"')]),a("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("[")]),t._v("\n "),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("{")]),t._v("\n "),a("span",{pre:!0,attrs:{class:"token property"}},[t._v('"inputIndex"')]),a("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token number"}},[t._v("0")]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v("\n "),a("span",{pre:!0,attrs:{class:"token property"}},[t._v('"transactionId"')]),a("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token string"}},[t._v('"194d6dc4e1c4c983b5235ad2b82cc7c48c36def4960fdcf37697253c9d9854a2"')]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v("\n "),a("span",{pre:!0,attrs:{class:"token property"}},[t._v('"scriptPubKey"')]),a("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token string"}},[t._v('"001409249118830af97a029217f3a8744973c5a4a02e"')]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v("\n "),a("span",{pre:!0,attrs:{class:"token property"}},[t._v('"index"')]),a("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token number"}},[t._v("4")]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v("\n "),a("span",{pre:!0,attrs:{class:"token property"}},[t._v('"value"')]),a("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token number"}},[t._v("90000000")]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v("\n "),a("span",{pre:!0,attrs:{class:"token property"}},[t._v('"address"')]),a("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token string"}},[t._v('"bcrt1qpyjfzxyrptuh5q5jzle6sazfw0z6fgpwuz2rye"')]),t._v("\n "),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("}")]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v("\n "),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("{")]),t._v("\n "),a("span",{pre:!0,attrs:{class:"token property"}},[t._v('"inputIndex"')]),a("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token number"}},[t._v("1")]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v("\n "),a("span",{pre:!0,attrs:{class:"token property"}},[t._v('"transactionId"')]),a("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token string"}},[t._v('"194d6dc4e1c4c983b5235ad2b82cc7c48c36def4960fdcf37697253c9d9854a2"')]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v("\n "),a("span",{pre:!0,attrs:{class:"token property"}},[t._v('"scriptPubKey"')]),a("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token string"}},[t._v('"0014d83837bd474d799ad4decba4bac561a7356e0371"')]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v("\n "),a("span",{pre:!0,attrs:{class:"token property"}},[t._v('"index"')]),a("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token number"}},[t._v("1")]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v("\n "),a("span",{pre:!0,attrs:{class:"token property"}},[t._v('"value"')]),a("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token number"}},[t._v("50000000")]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v("\n "),a("span",{pre:!0,attrs:{class:"token property"}},[t._v('"address"')]),a("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token string"}},[t._v('"bcrt1qmqur0028f4ue44x7ewjt43tp5u6kuqm3eqa3ua"')]),t._v("\n "),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("}")]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("]")]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v("\n "),a("span",{pre:!0,attrs:{class:"token property"}},[t._v('"outputs"')]),a("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("[")]),t._v("\n "),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("{")]),t._v("\n "),a("span",{pre:!0,attrs:{class:"token property"}},[t._v('"keyPath"')]),a("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token string"}},[t._v('"0/1"')]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v("\n "),a("span",{pre:!0,attrs:{class:"token property"}},[t._v('"scriptPubKey"')]),a("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token string"}},[t._v('"a91476de0c5d07fd202880672bc702162b7f18e13aca87"')]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v("\n "),a("span",{pre:!0,attrs:{class:"token property"}},[t._v('"address"')]),a("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token string"}},[t._v('"2N45jj76a7YjGLDoKs2mnQ4tt5N7t6R9xoM"')]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v("\n "),a("span",{pre:!0,attrs:{class:"token property"}},[t._v('"redeem"')]),a("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token string"}},[t._v('"00147d31e1c7959cd047bb7b9b35e4c877a28efe2f0b"')]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v("\n "),a("span",{pre:!0,attrs:{class:"token property"}},[t._v('"index"')]),a("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token number"}},[t._v("0")]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v("\n "),a("span",{pre:!0,attrs:{class:"token property"}},[t._v('"value"')]),a("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token number"}},[t._v("100000000")]),t._v("\n "),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("}")]),t._v("\n "),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("]")]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v("\n "),a("span",{pre:!0,attrs:{class:"token property"}},[t._v('"cryptoCode"')]),a("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token string"}},[t._v('"BTC"')]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v("\n "),a("span",{pre:!0,attrs:{class:"token property"}},[t._v('"replacing"')]),a("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("[")]),a("span",{pre:!0,attrs:{class:"token string"}},[t._v('"25d6bc1b2812670550aca8b2984670203b5ebf00e75f9b2bbf1940c3fa27841e"')]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token string"}},[t._v('"81a20eb55ec16b92c65d4e142278fd521caa9e5dcad9d941c8e256dbd917ae84"')]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("]")]),t._v("\n "),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("}")]),t._v("\n"),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("}")]),t._v("\n")])])]),a("p",[t._v("If you want all transactions of all derivation schemes of BTC, send this to the WebSocket:")]),t._v(" "),a("div",{staticClass:"language-json extra-class"},[a("pre",{pre:!0,attrs:{class:"language-json"}},[a("code",[a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("{")]),t._v("\n "),a("span",{pre:!0,attrs:{class:"token property"}},[t._v('"type"')]),a("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token string"}},[t._v('"subscribetransaction"')]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v("\n "),a("span",{pre:!0,attrs:{class:"token property"}},[t._v('"data"')]),a("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("{")]),t._v("\n "),a("span",{pre:!0,attrs:{class:"token property"}},[t._v('"cryptoCode"')]),a("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token string"}},[t._v('"BTC"')]),t._v("\n "),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("}")]),t._v("\n"),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("}")]),t._v("\n")])])]),a("p",[t._v("If you want all transactions of all derivation schemes of all crypto currencies, send this to the WebSocket:")]),t._v(" "),a("div",{staticClass:"language-json extra-class"},[a("pre",{pre:!0,attrs:{class:"language-json"}},[a("code",[a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("{")]),t._v("\n "),a("span",{pre:!0,attrs:{class:"token property"}},[t._v('"type"')]),a("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token string"}},[t._v('"subscribetransaction"')]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v("\n "),a("span",{pre:!0,attrs:{class:"token property"}},[t._v('"data"')]),a("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("{")]),t._v("\n "),a("span",{pre:!0,attrs:{class:"token property"}},[t._v('"cryptoCode"')]),a("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token string"}},[t._v('"*"')]),t._v("\n "),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("}")]),t._v("\n"),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("}")]),t._v("\n")])])]),a("p",[t._v("As an alternative to get notification, you can also use long polling with the "),a("a",{attrs:{href:"#eventStream"}},[t._v("event stream")]),t._v(".")]),t._v(" "),a("p",[t._v("Fields:")]),t._v(" "),a("ul",[a("li",[a("code",[t._v("replacing")]),t._v(": The list of the unconfirmed transactions of this wallet which have been replaced by this new transaction. This can typically be used to detect when the sender is bumping fee. This can't be used to detect when the sender is attempting to abort a transaction.")])]),t._v(" "),a("h2",{attrs:{id:"broadcast-a-transaction"}},[a("a",{staticClass:"header-anchor",attrs:{href:"#broadcast-a-transaction"}},[t._v("#")]),t._v(" "),a("a",{attrs:{name:"broadcast"}}),t._v("Broadcast a transaction")]),t._v(" "),a("p",[a("code",[t._v("HTTP POST v1/cryptos/{cryptoCode}/transactions")])]),t._v(" "),a("p",[t._v("Body:")]),t._v(" "),a("p",[t._v("Raw bytes of the transaction.")]),t._v(" "),a("p",[t._v("Parameter:")]),t._v(" "),a("ul",[a("li",[a("code",[t._v("testMempoolAccept")]),t._v(": If "),a("code",[t._v("true")]),t._v(", will not attempt to broadcast the transaction but just test its acceptance in the mempool. (default: "),a("code",[t._v("false")]),t._v(")")])]),t._v(" "),a("p",[t._v("Error codes:")]),t._v(" "),a("ul",[a("li",[t._v("HTTP 404: "),a("code",[t._v("cryptoCode-not-supported")])]),t._v(" "),a("li",[t._v("HTTP 400: "),a("code",[t._v("rpc-unavailable")])]),t._v(" "),a("li",[t._v("HTTP 400: "),a("code",[t._v("not-supported")]),t._v(" if "),a("code",[t._v("testMempoolAccept")]),t._v(" is "),a("code",[t._v("true")]),t._v(", but the underlying node does not support it")])]),t._v(" "),a("p",[t._v("Returns:")]),t._v(" "),a("div",{staticClass:"language-json extra-class"},[a("pre",{pre:!0,attrs:{class:"language-json"}},[a("code",[a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("{")]),t._v("\n "),a("span",{pre:!0,attrs:{class:"token property"}},[t._v('"success"')]),a("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),a("span",{pre:!0,attrs:{class:"token boolean"}},[t._v("false")]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v("\n "),a("span",{pre:!0,attrs:{class:"token property"}},[t._v('"rpcCode"')]),a("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),a("span",{pre:!0,attrs:{class:"token number"}},[t._v("-25")]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v("\n "),a("span",{pre:!0,attrs:{class:"token property"}},[t._v('"rpcCodeMessage"')]),a("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),a("span",{pre:!0,attrs:{class:"token string"}},[t._v('"General error during transaction submission"')]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v("\n "),a("span",{pre:!0,attrs:{class:"token property"}},[t._v('"rpcMessage"')]),a("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),a("span",{pre:!0,attrs:{class:"token string"}},[t._v('"Missing inputs"')]),t._v("\n"),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("}")]),t._v("\n")])])]),a("h2",{attrs:{id:"rescan-a-transaction"}},[a("a",{staticClass:"header-anchor",attrs:{href:"#rescan-a-transaction"}},[t._v("#")]),t._v(" "),a("a",{attrs:{name:"rescan"}}),t._v("Rescan a transaction")]),t._v(" "),a("p",[t._v("NBXplorer does not rescan the whole blockchain when tracking a new derivation scheme.\nThis means that if the derivation scheme already received UTXOs in the past, NBXplorer will not be aware of it and might reuse addresses already generated in the past, and will not show past transactions.")]),t._v(" "),a("p",[t._v("By using this route, you can ask NBXplorer to rescan specific transactions found in the blockchain.\nThis way, the transactions and the UTXOs present before tracking the derivation scheme will appear correctly.")]),t._v(" "),a("p",[a("code",[t._v("HTTP POST v1/cryptos/{cryptoCode}/rescan")])]),t._v(" "),a("p",[t._v("Body:")]),t._v(" "),a("div",{staticClass:"language-json extra-class"},[a("pre",{pre:!0,attrs:{class:"language-json"}},[a("code",[a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("{")]),t._v("\n "),a("span",{pre:!0,attrs:{class:"token property"}},[t._v('"transactions"')]),a("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("[")]),t._v("\n "),a("span",{pre:!0,attrs:{class:"token comment"}},[t._v("// Specify the blockId and transactionId to scan. Your node must not be pruned for this to work.")]),t._v("\n "),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("{")]),t._v("\n "),a("span",{pre:!0,attrs:{class:"token property"}},[t._v('"blockId"')]),a("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),a("span",{pre:!0,attrs:{class:"token string"}},[t._v('"19b44484c79c40d4e74da406e25390348b86a252c1ab784cfd7198c724a0169f"')]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v("\n "),a("span",{pre:!0,attrs:{class:"token property"}},[t._v('"transactionId"')]),a("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),a("span",{pre:!0,attrs:{class:"token string"}},[t._v('"f83c7f31e2c39202bbbca619ab354ca8841721cf3440a253e056a7bea43e9745"')]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v("\n "),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("}")]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v("\n "),a("span",{pre:!0,attrs:{class:"token comment"}},[t._v("// Only the transactionId is specified. Your node must run --txindex=1 for this to work")]),t._v("\n "),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("{")]),t._v("\n "),a("span",{pre:!0,attrs:{class:"token property"}},[t._v('"transactionId"')]),a("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),a("span",{pre:!0,attrs:{class:"token string"}},[t._v('"754c14060b958de0ff4e77e2ccdca617964c939d40ec9a01ef21fca2aad78d00"')]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v("\n "),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("}")]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v("\n "),a("span",{pre:!0,attrs:{class:"token comment"}},[t._v("// This will index the transaction without using RPC. Careful: A wrong blockId will corrupt the database.")]),t._v("\n "),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("{")]),t._v("\n "),a("span",{pre:!0,attrs:{class:"token property"}},[t._v('"blockId"')]),a("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),a("span",{pre:!0,attrs:{class:"token string"}},[t._v('"19b44484c79c40d4e74da406e25390348b86a252c1ab784cfd7198c724a0169f"')]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v("\n "),a("span",{pre:!0,attrs:{class:"token property"}},[t._v('"transaction"')]),a("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),a("span",{pre:!0,attrs:{class:"token string"}},[t._v('"02000000000101008dd7aaa2fc21ef019aec409d934c9617a6dccce2774effe08d950b06144c750000000000feffffff026c3e2e12010000001600143072110b34b66acd9469b2882d6d57a8ae27183900e1f505000000001600140429b3eebb7d55c50ca36ace12ae874ff2fd16af0247304402202e32739cc6e42877699d4159159941f3cc39027c7626f9962cca9a865816d43502205389e9d6c1a4cab41f2c504413cf0f46a5c1f8814f368e03c9bf1f8017c6787e012103b8858085f2a0c9c906fb793bedb2c115c340de1f7b279d6099f675ddf3eec0bf67000000"')]),t._v("\n "),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("}")]),t._v("\n "),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("]")]),t._v("\n"),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("}")]),t._v("\n")])])]),a("p",[t._v("Returns:")]),t._v(" "),a("p",[t._v("HTTP 200")]),t._v(" "),a("p",[t._v("Error codes:")]),t._v(" "),a("ul",[a("li",[t._v("HTTP 400: "),a("code",[t._v("rpc-unavailable")])])]),t._v(" "),a("h2",{attrs:{id:"get-fee-rate"}},[a("a",{staticClass:"header-anchor",attrs:{href:"#get-fee-rate"}},[t._v("#")]),t._v(" "),a("a",{attrs:{name:"feerate"}}),t._v("Get fee rate")]),t._v(" "),a("p",[t._v("HTTP GET v1/cryptos/{cryptoCode}/fees/{blockCount}")]),t._v(" "),a("p",[t._v("Get expected fee rate for being confirmed in "),a("code",[t._v("blockCount")]),t._v(" blocks.")]),t._v(" "),a("p",[t._v("Error codes:")]),t._v(" "),a("ul",[a("li",[t._v("HTTP 400: "),a("code",[t._v("fee-estimation-unavailable")])]),t._v(" "),a("li",[t._v("HTTP 404: "),a("code",[t._v("cryptoCode-not-supported")])]),t._v(" "),a("li",[t._v("HTTP 400: "),a("code",[t._v("rpc-unavailable")])])]),t._v(" "),a("p",[t._v("Returns:")]),t._v(" "),a("div",{staticClass:"language-json extra-class"},[a("pre",{pre:!0,attrs:{class:"language-json"}},[a("code",[a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("{")]),t._v("\n "),a("span",{pre:!0,attrs:{class:"token property"}},[t._v('"feeRate"')]),a("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token number"}},[t._v("5")]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v("\n "),a("span",{pre:!0,attrs:{class:"token property"}},[t._v('"blockCount"')]),a("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token number"}},[t._v("1")]),t._v("\n"),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("}")]),t._v("\n")])])]),a("p",[t._v("The fee rate is in satoshi/byte.")]),t._v(" "),a("h2",{attrs:{id:"scan-utxo-set"}},[a("a",{staticClass:"header-anchor",attrs:{href:"#scan-utxo-set"}},[t._v("#")]),t._v(" "),a("a",{attrs:{name:"scanUtxoSet"}}),t._v("Scan UTXO Set")]),t._v(" "),a("p",[t._v("NBXplorer can scan the UTXO Set for output belonging to your derivationScheme.")]),t._v(" "),a("p",[a("code",[t._v("HTTP POST v1/cryptos/BTC/derivations/{derivationScheme}/utxos/scan")])]),t._v(" "),a("p",[t._v("In order to not consume too much RAM, NBXplorer splits the addresses to scan in several "),a("code",[t._v("batch")]),t._v(" and scan the whole UTXO set sequentially.\nThree branches are scanned: 0/x, 1/x and x.")]),t._v(" "),a("p",[t._v("If a UTXO in one branch get found at a specific x, then all addresses inferior to index x will be considered used and not proposed when fetching a new unused address.")]),t._v(" "),a("p",[t._v("Query parameters:")]),t._v(" "),a("ul",[a("li",[a("code",[t._v("batchSize")]),t._v(" the number of addresses scanned at once per derivation scheme branch (default: 1000)")]),t._v(" "),a("li",[a("code",[t._v("gapLimit")]),t._v(" If no UTXO are detected in this interval, the scan stop (default: 10000)")]),t._v(" "),a("li",[a("code",[t._v("from")]),t._v(" the first address index to check (default: 0)")])]),t._v(" "),a("p",[t._v("This call queue the request for scanning and returns immediately.")]),t._v(" "),a("p",[t._v("Error codes:")]),t._v(" "),a("ul",[a("li",[t._v("HTTP 405: "),a("code",[t._v("scanutxoset-not-suported")]),t._v(" ScanUTXOSet is not supported for this currency")]),t._v(" "),a("li",[t._v("HTTP 409: "),a("code",[t._v("scanutxoset-in-progress")]),t._v(" ScanUTXOSet has already been called for this derivationScheme")]),t._v(" "),a("li",[t._v("HTTP 400: "),a("code",[t._v("rpc-unavailable")])])]),t._v(" "),a("h2",{attrs:{id:"get-scan-status"}},[a("a",{staticClass:"header-anchor",attrs:{href:"#get-scan-status"}},[t._v("#")]),t._v(" Get scan status")]),t._v(" "),a("p",[t._v("You can poll the status of the scan. Note that if the scan is complete, the result will be kept for 24H.\nThe state can be:")]),t._v(" "),a("ul",[a("li",[a("code",[t._v("Queued")]),t._v(" the demand has been done, but the scan request is queuing to be started")]),t._v(" "),a("li",[a("code",[t._v("Pending")]),t._v(" the scan is in progress")]),t._v(" "),a("li",[a("code",[t._v("Complete")]),t._v(" the scan is successful")]),t._v(" "),a("li",[a("code",[t._v("Error")]),t._v(" the scan errored")])]),t._v(" "),a("div",{staticClass:"language-json extra-class"},[a("pre",{pre:!0,attrs:{class:"language-json"}},[a("code",[a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("{")]),t._v("\n "),a("span",{pre:!0,attrs:{class:"token property"}},[t._v('"error"')]),a("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token null keyword"}},[t._v("null")]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v("\n "),a("span",{pre:!0,attrs:{class:"token property"}},[t._v('"queuedAt"')]),a("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token number"}},[t._v("1540439841")]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v("\n "),a("span",{pre:!0,attrs:{class:"token property"}},[t._v('"status"')]),a("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token string"}},[t._v('"Pending"')]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v("\n "),a("span",{pre:!0,attrs:{class:"token property"}},[t._v('"progress"')]),a("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("{")]),t._v("\n "),a("span",{pre:!0,attrs:{class:"token property"}},[t._v('"startedAt"')]),a("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token number"}},[t._v("1540439841")]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v("\n "),a("span",{pre:!0,attrs:{class:"token property"}},[t._v('"completedAt"')]),a("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token null keyword"}},[t._v("null")]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v("\n "),a("span",{pre:!0,attrs:{class:"token property"}},[t._v('"found"')]),a("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token number"}},[t._v("2")]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v("\n "),a("span",{pre:!0,attrs:{class:"token property"}},[t._v('"batchNumber"')]),a("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token number"}},[t._v("9")]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v("\n "),a("span",{pre:!0,attrs:{class:"token property"}},[t._v('"remainingBatches"')]),a("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token number"}},[t._v("1")]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v("\n "),a("span",{pre:!0,attrs:{class:"token property"}},[t._v('"currentBatchProgress"')]),a("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token number"}},[t._v("50")]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v("\n "),a("span",{pre:!0,attrs:{class:"token property"}},[t._v('"remainingSeconds"')]),a("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token number"}},[t._v("10")]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v("\n "),a("span",{pre:!0,attrs:{class:"token property"}},[t._v('"overallProgress"')]),a("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token number"}},[t._v("91")]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v("\n "),a("span",{pre:!0,attrs:{class:"token property"}},[t._v('"from"')]),a("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token number"}},[t._v("900")]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v("\n "),a("span",{pre:!0,attrs:{class:"token property"}},[t._v('"count"')]),a("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token number"}},[t._v("100")]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v("\n "),a("span",{pre:!0,attrs:{class:"token property"}},[t._v('"totalSearched"')]),a("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token number"}},[t._v("2700")]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v("\n "),a("span",{pre:!0,attrs:{class:"token property"}},[t._v('"totalSizeOfUTXOSet"')]),a("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token null keyword"}},[t._v("null")]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v("\n "),a("span",{pre:!0,attrs:{class:"token property"}},[t._v('"highestKeyIndexFound"')]),a("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("{")]),t._v("\n "),a("span",{pre:!0,attrs:{class:"token property"}},[t._v('"change"')]),a("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token null keyword"}},[t._v("null")]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v("\n "),a("span",{pre:!0,attrs:{class:"token property"}},[t._v('"deposit"')]),a("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token number"}},[t._v("51")]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v("\n "),a("span",{pre:!0,attrs:{class:"token property"}},[t._v('"direct"')]),a("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token null keyword"}},[t._v("null")]),t._v("\n "),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("}")]),t._v("\n "),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("}")]),t._v("\n"),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("}")]),t._v("\n")])])]),a("p",[a("code",[t._v("TotalSizeOfUTXOSet")]),t._v(" is set only when the scan is complete.")]),t._v(" "),a("p",[t._v("Error codes:")]),t._v(" "),a("ul",[a("li",[t._v("HTTP 404 "),a("code",[t._v("scanutxoset-info-not-found")]),t._v(" if the scan has been done above the last 24H.")])]),t._v(" "),a("h2",{attrs:{id:"wipe-derivation-scheme-transactions"}},[a("a",{staticClass:"header-anchor",attrs:{href:"#wipe-derivation-scheme-transactions"}},[t._v("#")]),t._v(" "),a("a",{attrs:{name:"wipe"}}),t._v("Wipe derivation scheme transactions")]),t._v(" "),a("p",[t._v("Wipe all the transactions from a derivation scheme.")]),t._v(" "),a("p",[a("code",[t._v("HTTP POST cryptos/{cryptoCode}/derivations/{derivationScheme}/utxos/wipe")])]),t._v(" "),a("h2",{attrs:{id:"query-event-stream"}},[a("a",{staticClass:"header-anchor",attrs:{href:"#query-event-stream"}},[t._v("#")]),t._v(" "),a("a",{attrs:{name:"eventStream"}}),t._v("Query event stream")]),t._v(" "),a("p",[t._v("All notifications sent through websocket are also saved in a crypto specifc event stream.")]),t._v(" "),a("p",[a("code",[t._v("HTTP GET v1/cryptos/{cryptoCode}/events")])]),t._v(" "),a("p",[t._v("Query parameters:")]),t._v(" "),a("ul",[a("li",[a("code",[t._v("lastEventId")]),t._v(": Will query all events which happened after this event id, the first event has id 1 (default: 0)")]),t._v(" "),a("li",[a("code",[t._v("longPolling")]),t._v(": If no events have been received since "),a("code",[t._v("lastEventId")]),t._v(", the call will block (default: false)")]),t._v(" "),a("li",[a("code",[t._v("limit")]),t._v(": Limit the maximum number of events to return (default: null)")])]),t._v(" "),a("p",[t._v("All events are registered in a query stream which you can replay by keeping track of the "),a("code",[t._v("lastEventId")]),t._v(".\nThe smallest "),a("code",[t._v("eventId")]),t._v(" is 1.")]),t._v(" "),a("div",{staticClass:"language-json extra-class"},[a("pre",{pre:!0,attrs:{class:"language-json"}},[a("code",[a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("[")]),t._v("\n "),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("{")]),t._v("\n "),a("span",{pre:!0,attrs:{class:"token property"}},[t._v('"eventId"')]),a("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token number"}},[t._v("1")]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v("\n "),a("span",{pre:!0,attrs:{class:"token property"}},[t._v('"type"')]),a("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token string"}},[t._v('"newblock"')]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v("\n "),a("span",{pre:!0,attrs:{class:"token property"}},[t._v('"data"')]),a("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("{")]),t._v("\n "),a("span",{pre:!0,attrs:{class:"token property"}},[t._v('"height"')]),a("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token number"}},[t._v("104")]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v("\n "),a("span",{pre:!0,attrs:{class:"token property"}},[t._v('"hash"')]),a("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token string"}},[t._v('"1f31c605c0a5d54b65fa39dc8cb4db025be63c66280279ade9338571a9e63d35"')]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v("\n "),a("span",{pre:!0,attrs:{class:"token property"}},[t._v('"previousBlockHash"')]),a("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token string"}},[t._v('"7639350b31f3ce07ff976ebae772fef1602b30a10ccb8ca69047fe0fe8b9083c"')]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v("\n "),a("span",{pre:!0,attrs:{class:"token property"}},[t._v('"cryptoCode"')]),a("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token string"}},[t._v('"BTC"')]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v("\n "),a("span",{pre:!0,attrs:{class:"token property"}},[t._v('"confirmations"')]),a("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token number"}},[t._v("1")]),t._v("\n "),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("}")]),t._v("\n "),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("}")]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v("\n "),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("{")]),t._v("\n "),a("span",{pre:!0,attrs:{class:"token property"}},[t._v('"eventId"')]),a("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token number"}},[t._v("2")]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v("\n "),a("span",{pre:!0,attrs:{class:"token property"}},[t._v('"type"')]),a("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token string"}},[t._v('"newtransaction"')]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v("\n "),a("span",{pre:!0,attrs:{class:"token property"}},[t._v('"data"')]),a("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("{")]),t._v("\n "),a("span",{pre:!0,attrs:{class:"token property"}},[t._v('"blockId"')]),a("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token null keyword"}},[t._v("null")]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v("\n "),a("span",{pre:!0,attrs:{class:"token property"}},[t._v('"trackedSource"')]),a("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token string"}},[t._v('"DERIVATIONSCHEME:tpubD6NzVbkrYhZ4XfeFUTn2D4RQ7D5HpvnHywa3eZYhxZBriRTsfe8ZKFSDMcEMBqGrAighxxmq5VUqoRvo7DnNMS5VbJjRHwqDfCAMXLwAL5j"')]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v("\n "),a("span",{pre:!0,attrs:{class:"token property"}},[t._v('"derivationStrategy"')]),a("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token string"}},[t._v('"tpubD6NzVbkrYhZ4XfeFUTn2D4RQ7D5HpvnHywa3eZYhxZBriRTsfe8ZKFSDMcEMBqGrAighxxmq5VUqoRvo7DnNMS5VbJjRHwqDfCAMXLwAL5j"')]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v("\n "),a("span",{pre:!0,attrs:{class:"token property"}},[t._v('"transactionData"')]),a("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("{")]),t._v("\n "),a("span",{pre:!0,attrs:{class:"token property"}},[t._v('"confirmations"')]),a("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token number"}},[t._v("0")]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v("\n "),a("span",{pre:!0,attrs:{class:"token property"}},[t._v('"blockId"')]),a("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token null keyword"}},[t._v("null")]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v("\n "),a("span",{pre:!0,attrs:{class:"token property"}},[t._v('"transactionHash"')]),a("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token string"}},[t._v('"500359d971698c021587ea952bd38bd57dafc2b99615f71f7f978af394682737"')]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v("\n "),a("span",{pre:!0,attrs:{class:"token property"}},[t._v('"transaction"')]),a("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token string"}},[t._v('"0200000001b8af58c5dbed4bd0ea60ae8ba7e68e66143440b8c1c69b6eaaf719566676ab1b0000000048473044022040b419aeb9042a53fb2d03abec911901ed42fc50d6a143e322bc61d51e4e35a9022073c10fe827b53332d50fbde581e36ad31f57b98ec35a125562dc8c739762ec8901feffffff028c02102401000000160014b6bedaf0cb795c01a1e427bd7752d6ef058964f100e1f50500000000160014c5e0b07f40b8dbe69b22864d84d83d5b4120835368000000"')]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v("\n "),a("span",{pre:!0,attrs:{class:"token property"}},[t._v('"height"')]),a("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token null keyword"}},[t._v("null")]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v("\n "),a("span",{pre:!0,attrs:{class:"token property"}},[t._v('"timestamp"')]),a("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token number"}},[t._v("1542703963")]),t._v("\n "),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("}")]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v("\n "),a("span",{pre:!0,attrs:{class:"token property"}},[t._v('"outputs"')]),a("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("[")]),t._v("\n "),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("{")]),t._v("\n "),a("span",{pre:!0,attrs:{class:"token property"}},[t._v('"keyPath"')]),a("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token string"}},[t._v('"0/0"')]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v("\n "),a("span",{pre:!0,attrs:{class:"token property"}},[t._v('"scriptPubKey"')]),a("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token string"}},[t._v('"0014c5e0b07f40b8dbe69b22864d84d83d5b41208353"')]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v("\n "),a("span",{pre:!0,attrs:{class:"token property"}},[t._v('"address"')]),a("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token string"}},[t._v('"bcrt1qchstql6qhrd7dxezsexcfkpatdqjpq6nntvtrd"')]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v("\n "),a("span",{pre:!0,attrs:{class:"token property"}},[t._v('"index"')]),a("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token number"}},[t._v("1")]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v("\n "),a("span",{pre:!0,attrs:{class:"token property"}},[t._v('"value"')]),a("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token number"}},[t._v("100000000")]),t._v("\n "),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("}")]),t._v("\n "),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("]")]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v("\n "),a("span",{pre:!0,attrs:{class:"token property"}},[t._v('"cryptoCode"')]),a("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token string"}},[t._v('"BTC"')]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v("\n "),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("}")]),t._v("\n "),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("}")]),t._v("\n"),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("]")]),t._v("\n")])])]),a("h2",{attrs:{id:"query-event-stream-from-most-recent"}},[a("a",{staticClass:"header-anchor",attrs:{href:"#query-event-stream-from-most-recent"}},[t._v("#")]),t._v(" "),a("a",{attrs:{name:"eventStreamLatest"}}),t._v("Query event stream (from most recent)")]),t._v(" "),a("p",[t._v("Exact same as "),a("a",{attrs:{href:"#eventStream"}},[t._v("event stream")]),t._v(" but it returns a maximum number "),a("code",[t._v("#limit")]),t._v(" of the most recent events.")]),t._v(" "),a("p",[a("code",[t._v("HTTP GET v1/cryptos/{cryptoCode}/events/latest")])]),t._v(" "),a("p",[t._v("Query parameters:")]),t._v(" "),a("ul",[a("li",[a("code",[t._v("limit")]),t._v(": Limit the maximum number of events to return (default: 10)")])]),t._v(" "),a("h2",{attrs:{id:"create-partially-signed-bitcoin-transaction"}},[a("a",{staticClass:"header-anchor",attrs:{href:"#create-partially-signed-bitcoin-transaction"}},[t._v("#")]),t._v(" "),a("a",{attrs:{name:"psbt"}}),t._v("Create Partially Signed Bitcoin Transaction")]),t._v(" "),a("p",[t._v("Create a "),a("a",{attrs:{href:"https://github.com/bitcoin/bips/blob/master/bip-0174.mediawiki",target:"_blank",rel:"noopener noreferrer"}},[t._v("Partially Signed Bitcoin Transaction"),a("OutboundLink")],1),t._v(" (PSBT).")]),t._v(" "),a("p",[t._v("A PSBT is a standard format to represent a transaction with pending signatures associated to it.\nA PSBT can be signed independently by many signers, and combined together before broadcast.")]),t._v(" "),a("p",[a("code",[t._v("HTTP POST v1/cryptos/{cryptoCode}/derivations/{derivationScheme}/psbt/create")])]),t._v(" "),a("p",[t._v("Error codes:")]),t._v(" "),a("ul",[a("li",[t._v("HTTP 400: "),a("code",[t._v("not-enough-funds")])]),t._v(" "),a("li",[t._v("HTTP 400: "),a("code",[t._v("output-too-small")]),t._v(" (if the output on which the "),a("code",[t._v("substractFee=true")]),t._v(" is too small to cover the fees)")]),t._v(" "),a("li",[t._v("HTTP 400: "),a("code",[t._v("fee-estimation-unavailable")])]),t._v(" "),a("li",[t._v("HTTP 404: "),a("code",[t._v("cryptoCode-not-supported")])])]),t._v(" "),a("p",[t._v("Fields:")]),t._v(" "),a("div",{staticClass:"language-json extra-class"},[a("pre",{pre:!0,attrs:{class:"language-json"}},[a("code",[a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("{")]),t._v("\n "),a("span",{pre:!0,attrs:{class:"token property"}},[t._v('"seed"')]),a("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token number"}},[t._v("1")]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v("\n "),a("span",{pre:!0,attrs:{class:"token property"}},[t._v('"rbf"')]),a("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token boolean"}},[t._v("false")]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v("\n "),a("span",{pre:!0,attrs:{class:"token property"}},[t._v('"version"')]),a("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token number"}},[t._v("1")]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v("\n "),a("span",{pre:!0,attrs:{class:"token property"}},[t._v('"timeLock"')]),a("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token number"}},[t._v("512000")]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v("\n "),a("span",{pre:!0,attrs:{class:"token property"}},[t._v('"includeGlobalXPub"')]),a("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token boolean"}},[t._v("false")]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v("\n "),a("span",{pre:!0,attrs:{class:"token property"}},[t._v('"explicitChangeAddress"')]),a("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token string"}},[t._v('"mu5kevv6FiLygJfVvxQnB4hArXCUArMC7C"')]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v("\n "),a("span",{pre:!0,attrs:{class:"token property"}},[t._v('"destinations"')]),a("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("[")]),t._v("\n "),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("{")]),t._v("\n "),a("span",{pre:!0,attrs:{class:"token property"}},[t._v('"destination"')]),a("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token string"}},[t._v('"mu5kevv6FiLygJfVvxQnB4hArXCUArMC7C"')]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v("\n "),a("span",{pre:!0,attrs:{class:"token property"}},[t._v('"amount"')]),a("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token number"}},[t._v("50000000")]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v("\n "),a("span",{pre:!0,attrs:{class:"token property"}},[t._v('"substractFees"')]),a("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token boolean"}},[t._v("false")]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v("\n "),a("span",{pre:!0,attrs:{class:"token property"}},[t._v('"sweepAll"')]),a("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token boolean"}},[t._v("false")]),t._v("\n "),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("}")]),t._v("\n "),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("]")]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v("\n "),a("span",{pre:!0,attrs:{class:"token property"}},[t._v('"feePreference"')]),a("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("{")]),t._v("\n "),a("span",{pre:!0,attrs:{class:"token property"}},[t._v('"explicitFeeRate"')]),a("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token number"}},[t._v("10")]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v("\n "),a("span",{pre:!0,attrs:{class:"token property"}},[t._v('"explicitFee"')]),a("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token number"}},[t._v("23000")]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v("\n "),a("span",{pre:!0,attrs:{class:"token property"}},[t._v('"blockTarget"')]),a("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token number"}},[t._v("1")]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v("\n "),a("span",{pre:!0,attrs:{class:"token property"}},[t._v('"fallbackFeeRate"')]),a("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token number"}},[t._v("100")]),t._v("\n "),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("}")]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v("\n "),a("span",{pre:!0,attrs:{class:"token property"}},[t._v('"discourageFeeSniping"')]),a("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token boolean"}},[t._v("true")]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v("\n "),a("span",{pre:!0,attrs:{class:"token property"}},[t._v('"reserveChangeAddress"')]),a("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token boolean"}},[t._v("false")]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v("\n "),a("span",{pre:!0,attrs:{class:"token property"}},[t._v('"spendAllMatchingOutpoints"')]),a("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token boolean"}},[t._v("false")]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v("\n "),a("span",{pre:!0,attrs:{class:"token property"}},[t._v('"minConfirmations"')]),a("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token number"}},[t._v("0")]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v("\n "),a("span",{pre:!0,attrs:{class:"token property"}},[t._v('"excludeOutpoints"')]),a("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("[")]),t._v("\n "),a("span",{pre:!0,attrs:{class:"token string"}},[t._v('"7c02d7d6923ab5e9bbdadf7cf6873a5454ae5aa86d15308ed8d68840a79cf644-1"')]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v("\n "),a("span",{pre:!0,attrs:{class:"token string"}},[t._v('"7c02d7d6923ab5e9bbdadf7cf6873a5454ae5aa86d15308ed8d68840a79cf644-2"')]),t._v("\n "),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("]")]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v("\n "),a("span",{pre:!0,attrs:{class:"token property"}},[t._v('"includeOnlyOutpoints"')]),a("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("[")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token string"}},[t._v('"7c02d7d6923ab5e9bbdadf7cf6873a5454ae5aa86d15308ed8d68840a79cf644-1"')]),t._v(" "),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("]")]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v("\n "),a("span",{pre:!0,attrs:{class:"token property"}},[t._v('"minValue"')]),a("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token number"}},[t._v("1000")]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v("\n "),a("span",{pre:!0,attrs:{class:"token property"}},[t._v('"rebaseKeyPaths"')]),a("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("[")]),t._v("\n "),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("{")]),t._v("\n "),a("span",{pre:!0,attrs:{class:"token property"}},[t._v('"accountKey"')]),a("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token string"}},[t._v('"tpubD6NzVbkrYhZ4XfeFUTn2D4RQ7D5HpvnHywa3eZYhxZBriRTsfe8ZKFSDMcEMBqGrAighxxmq5VUqoRvo7DnNMS5VbJjRHwqDfCAMXLwAL5j"')]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v("\n "),a("span",{pre:!0,attrs:{class:"token property"}},[t._v('"accountKeyPath"')]),a("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token string"}},[t._v("\"ab5ed9ab/49'/0'/0'\"")]),t._v("\n "),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("}")]),t._v("\n "),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("]")]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v("\n "),a("span",{pre:!0,attrs:{class:"token property"}},[t._v('"disableFingerprintRandomization"')]),a("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token boolean"}},[t._v("false")]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v("\n "),a("span",{pre:!0,attrs:{class:"token property"}},[t._v('"alwaysIncludeNonWitnessUTXO"')]),a("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token boolean"}},[t._v("false")]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v("\n "),a("span",{pre:!0,attrs:{class:"token property"}},[t._v('"mergeOutputs"')]),a("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token boolean"}},[t._v("true")]),t._v("\n"),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("}")]),t._v("\n")])])]),a("ul",[a("li",[a("code",[t._v("seed")]),t._v(": Optional, default to null, a seed to specific to get a deterministic PSBT (useful for tests)")]),t._v(" "),a("li",[a("code",[t._v("version")]),t._v(": Optional, the version of the transaction (default: 1, if "),a("code",[t._v("disableFingerprintRandomization")]),t._v(" is "),a("code",[t._v("true")]),t._v(")")]),t._v(" "),a("li",[a("code",[t._v("timeLock")]),t._v(": Optional, The timelock of the transaction, activate RBF if not null (default: 0, if "),a("code",[t._v("disableFingerprintRandomization")]),t._v(" is "),a("code",[t._v("true")]),t._v(")")]),t._v(" "),a("li",[a("code",[t._v("includeGlobalXPub")]),t._v(": Optional. Whether or not to include the global xpubs of the derivation scheme in the PSBT. (default: false)")]),t._v(" "),a("li",[a("code",[t._v("rbf")]),t._v(": Optional, determine if the transaction should have Replace By Fee (RBF) activated (default: "),a("code",[t._v("true")]),t._v(", if "),a("code",[t._v("disableFingerprintRandomization")]),t._v(" is "),a("code",[t._v("true")]),t._v(")")]),t._v(" "),a("li",[a("code",[t._v("reserveChangeAddress")]),t._v(": default to false, whether the creation of this PSBT will reserve a new change address.")]),t._v(" "),a("li",[a("code",[t._v("spendAllMatchingOutpoints")]),t._v(": If "),a("code",[t._v("true")]),t._v(", all the UTXOs that have been selected will be used as input in the PSBT. (default to false)")]),t._v(" "),a("li",[a("code",[t._v("explicitChangeAddress")]),t._v(": default to null, use a specific change address (Optional, mutually exclusive with reserveChangeAddress)")]),t._v(" "),a("li",[a("code",[t._v("minConfirmations")]),t._v(": default to 0, the minimum confirmations a UTXO need to be selected. (by default unconfirmed and confirmed UTXO will be used)")]),t._v(" "),a("li",[a("code",[t._v("includeOnlyOutpoints")]),t._v(": Only select the following outpoints for creating the PSBT. Note that it can also select outpoints that has been already spent, but where the spending is unconfirmed, so it can be used for RBF. (default to null)")]),t._v(" "),a("li",[a("code",[t._v("excludeOutpoints")]),t._v(": Do not select the following outpoints for creating the PSBT (default to empty)")]),t._v(" "),a("li",[a("code",[t._v("minValue")]),t._v(": UTXO's with value below this amount will be ignored (default to null)")]),t._v(" "),a("li",[a("code",[t._v("destinations")]),t._v(": Required, the destinations where to send the money")]),t._v(" "),a("li",[a("code",[t._v("destinations[].destination")]),t._v(": Required, the destination address")]),t._v(" "),a("li",[a("code",[t._v("destinations[].amount")]),t._v(" Send this amount to the destination (Mutually exclusive with: sweepAll)")]),t._v(" "),a("li",[a("code",[t._v("destinations[].substractFees")]),t._v(" Default to false, will substract the fees of this transaction to this destination (Mutually exclusive with: sweepAll)")]),t._v(" "),a("li",[a("code",[t._v("destinations[].sweepAll")]),t._v(" Deault to false, will sweep all the balance of your wallet to this destination (Mutually exclusive with: amount, substractFees)")]),t._v(" "),a("li",[a("code",[t._v("feePreference")]),t._v(": Optional, determines how fees for the transaction are calculated, default to the full node estimation for 1 block target.")]),t._v(" "),a("li",[a("code",[t._v("feePreference.explicitFeeRate")]),t._v(": An explicit fee rate for the transaction in Satoshi per vBytes (Mutually exclusive with: blockTarget, explicitFee, fallbackFeeRate)")]),t._v(" "),a("li",[a("code",[t._v("feePreference.explicitFee")]),t._v(": An explicit fee for the transaction in Satoshi (Mutually exclusive with: blockTarget, explicitFeeRate, fallbackFeeRate)")]),t._v(" "),a("li",[a("code",[t._v("feePreference.blockTarget")]),t._v(": A number of blocks after which the user expect one confirmation (Mutually exclusive with: explicitFeeRate, explicitFee)")]),t._v(" "),a("li",[a("code",[t._v("feePreference.fallbackFeeRate")]),t._v(": If the NBXplorer's node does not have proper fee estimation, this specific rate will be use in Satoshi per vBytes, this make sure that "),a("code",[t._v("fee-estimation-unavailable")]),t._v(" is never sent. (Mutually exclusive with: explicitFeeRate, explicitFee)")]),t._v(" "),a("li",[a("code",[t._v("discourageFeeSniping")]),t._v(": If "),a("code",[t._v("timeLock")]),t._v(" is not set, set the timeLock to a random value to discourage fee sniping (default to "),a("code",[t._v("true")]),t._v(", if "),a("code",[t._v("disableFingerprintRandomization")]),t._v(" is "),a("code",[t._v("true")]),t._v(")")]),t._v(" "),a("li",[a("code",[t._v("rebaseKeyPaths")]),t._v(": Optional. rebase the hdkey paths (if no rebase, the key paths are relative to the xpub that NBXplorer knows about), a rebase can transform (PubKey0, 0/0, accountFingerprint) by (PubKey0, m/49'/0'/0/0, masterFingerprint)")]),t._v(" "),a("li",[a("code",[t._v("rebaseKeyPaths[].accountKey")]),t._v(": The account key to rebase")]),t._v(" "),a("li",[a("code",[t._v("rebaseKeyPaths[].accountKeyPath")]),t._v(": The path from the root to the account key prefixed by the master public key fingerprint.")]),t._v(" "),a("li",[a("code",[t._v("disableFingerprintRandomization")]),t._v(": Disable the randomization of default parameter's value to match the network's fingerprint distribution. (randomized default values are "),a("code",[t._v("version")]),t._v(", "),a("code",[t._v("timeLock")]),t._v(", "),a("code",[t._v("rbf")]),t._v(", "),a("code",[t._v("discourageFeeSniping")]),t._v(")")]),t._v(" "),a("li",[a("code",[t._v("alwaysIncludeNonWitnessUTXO")]),t._v(": Try to set the full transaction in "),a("code",[t._v("non_witness_utxo")]),t._v(", even for segwit inputs (default to "),a("code",[t._v("false")]),t._v(")")]),t._v(" "),a("li",[a("code",[t._v("mergeOutputs")]),t._v(": Optional, default to true, whether the outputs sending to the same scriptPubKey should be merged into a single output.")])]),t._v(" "),a("p",[t._v("Response:")]),t._v(" "),a("div",{staticClass:"language-json extra-class"},[a("pre",{pre:!0,attrs:{class:"language-json"}},[a("code",[a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("{")]),t._v("\n "),a("span",{pre:!0,attrs:{class:"token property"}},[t._v('"psbt"')]),a("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token string"}},[t._v('"cHNidP8BAHcBAAAAASjvZHM29AbxO4IGGHbk3IE82yciSQFr2Ihge7P9P1HeAQAAAAD/////AmzQMAEAAAAAGXapFG1/TpHnIajdweam5Z3V9s6oGWBRiKyAw8kBAAAAABl2qRSVNmCfrnVeIwVkuTrCR6EvRFCP7IisAAAAAAABAP10AQEAAAACe9C2c9VL+gfYpic4c+Wk/Nn7bvhewA82owtcUDo/tPoAAAAAakcwRAIgUlLS0SDj7IXeY44x21eUg16Vh4qbJe+NDQ/ywUrB84kCIGLU5Vec2bjL1DZhUmDueLrf0uh/PycOK7FWg/Ptvwi0ASED7OpQGf+HzIRwWKZ1Hmd8h6vxkFOt5RlJ3u/flzNTesv/////818+qp4hLnw9DWOD+a601fLjFciZ/4iCNT1M9g+kMvkAAAAAakcwRAIgfk+bUUYfRs6AU1mt5unV4fZxCit34g8pE5fsawUM7H0CIBGpSil8+JCHdAHxKU2I7CvEBzAyz3ggd9RlH+QQSnlkASEC/wwlQ07b3xdSQaEf+wRJEnzEJT2GPNTY4Wb3Gg1hxFz/////AoDw+gIAAAAAGXapFHoZHSjaWNcmJk7sSHvRG29RaqIiiKxQlPoCAAAAABl2qRTSKm2x4ITWeuYLwCv3PUDtt+CL+YisAAAAACIGA1KRWHyJqdpbUzuezCSzj4+bj1+gNWGEibLG0BMj9/RmDDAn+hsBAAAAAgAAAAAiAgIuwas0MohgjmGIXoOgS95USEDawK//ZqrVEi5UIfP/FAwwJ/obAQAAAAMAAAAAAA=="')]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v("\n "),a("span",{pre:!0,attrs:{class:"token property"}},[t._v('"changeAddress"')]),a("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token string"}},[t._v('"mqVvTQKsdJ36Z8m5uFWQSA5nhrJ5NHQ2Hs"')]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v("\n "),a("span",{pre:!0,attrs:{class:"token property"}},[t._v('"suggestions"')]),a("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v("\n "),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("{")]),t._v("\n "),a("span",{pre:!0,attrs:{class:"token property"}},[t._v('"shouldEnforceLowR"')]),a("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token boolean"}},[t._v("true")]),t._v("\n "),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("}")]),t._v("\n"),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("}")]),t._v("\n")])])]),a("ul",[a("li",[a("code",[t._v("psbt")]),t._v(": The partially signed bitcoin transaction in Base64.")]),t._v(" "),a("li",[a("code",[t._v("changeAddress")]),t._v(": The change address of the transaction, useful for tests (can be null)")]),t._v(" "),a("li",[a("code",[t._v("suggestions")]),t._v(": Suggestions to the signer of the PSBT (null value if "),a("code",[t._v("disableFingerprintRandomization")]),t._v(" is set to "),a("code",[t._v("false")]),t._v(")")]),t._v(" "),a("li",[a("code",[t._v("suggestions.shouldEnforceLowR")]),t._v(": If "),a("code",[t._v("true")]),t._v(", the signer should enforce the creation of 71 bytes ECDSA signature to maximize privacy.")])]),t._v(" "),a("p",[t._v("Note, in the example above, if the "),a("a",{attrs:{href:"#metadata"}},[t._v("metadata")]),t._v(" "),a("code",[t._v("AccountKeyPath")]),t._v(" is set to "),a("code",[t._v("ab5ed9ab/49'/0'/0'")]),t._v(", then you don't have to pass "),a("code",[t._v("rebaseKeyPaths")]),t._v(".")]),t._v(" "),a("h2",{attrs:{id:"update-partially-signed-bitcoin-transaction"}},[a("a",{staticClass:"header-anchor",attrs:{href:"#update-partially-signed-bitcoin-transaction"}},[t._v("#")]),t._v(" "),a("a",{attrs:{name:"updatepsbt"}}),t._v("Update Partially Signed Bitcoin Transaction")]),t._v(" "),a("p",[a("code",[t._v("HTTP POST v1/cryptos/{cryptoCode}/psbt/update")])]),t._v(" "),a("p",[t._v("NBXplorer will take to complete as much information as it can about this PSBT.")]),t._v(" "),a("div",{staticClass:"language-json extra-class"},[a("pre",{pre:!0,attrs:{class:"language-json"}},[a("code",[a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("{")]),t._v("\n "),a("span",{pre:!0,attrs:{class:"token property"}},[t._v('"psbt"')]),a("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token string"}},[t._v('"cHNidP8BAHcBAAAAASjvZHM29AbxO4IGGHbk3IE82yciSQFr2Ihge7P9P1HeAQAAAAD/////AmzQMAEAAAAAGXapFG1/TpHnIajdweam5Z3V9s6oGWBRiKyAw8kBAAAAABl2qRSVNmCfrnVeIwVkuTrCR6EvRFCP7IisAAAAAAABAP10AQEAAAACe9C2c9VL+gfYpic4c+Wk/Nn7bvhewA82owtcUDo/tPoAAAAAakcwRAIgUlLS0SDj7IXeY44x21eUg16Vh4qbJe+NDQ/ywUrB84kCIGLU5Vec2bjL1DZhUmDueLrf0uh/PycOK7FWg/Ptvwi0ASED7OpQGf+HzIRwWKZ1Hmd8h6vxkFOt5RlJ3u/flzNTesv/////818+qp4hLnw9DWOD+a601fLjFciZ/4iCNT1M9g+kMvkAAAAAakcwRAIgfk+bUUYfRs6AU1mt5unV4fZxCit34g8pE5fsawUM7H0CIBGpSil8+JCHdAHxKU2I7CvEBzAyz3ggd9RlH+QQSnlkASEC/wwlQ07b3xdSQaEf+wRJEnzEJT2GPNTY4Wb3Gg1hxFz/////AoDw+gIAAAAAGXapFHoZHSjaWNcmJk7sSHvRG29RaqIiiKxQlPoCAAAAABl2qRTSKm2x4ITWeuYLwCv3PUDtt+CL+YisAAAAACIGA1KRWHyJqdpbUzuezCSzj4+bj1+gNWGEibLG0BMj9/RmDDAn+hsBAAAAAgAAAAAiAgIuwas0MohgjmGIXoOgS95USEDawK//ZqrVEi5UIfP/FAwwJ/obAQAAAAMAAAAAAA=="')]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v("\n "),a("span",{pre:!0,attrs:{class:"token property"}},[t._v('"derivationScheme"')]),a("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token string"}},[t._v('"tpubD6NzVbkrYhZ4WcPozSqALNCrJEt4C45sPDhEBBuokoCeDgjX6YTs4QVvhD9kao6f2uZLqZF4qcXprYyRqooSXr1uPp1KPH1o4m6aw9nxbiA"')]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v("\n "),a("span",{pre:!0,attrs:{class:"token property"}},[t._v('"includeGlobalXPub"')]),a("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token boolean"}},[t._v("false")]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v("\n "),a("span",{pre:!0,attrs:{class:"token property"}},[t._v('"rebaseKeyPaths"')]),a("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("[")]),t._v("\n "),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("{")]),t._v("\n "),a("span",{pre:!0,attrs:{class:"token property"}},[t._v('"accountKey"')]),a("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token string"}},[t._v('"tpubD6NzVbkrYhZ4XfeFUTn2D4RQ7D5HpvnHywa3eZYhxZBriRTsfe8ZKFSDMcEMBqGrAighxxmq5VUqoRvo7DnNMS5VbJjRHwqDfCAMXLwAL5j"')]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v("\n "),a("span",{pre:!0,attrs:{class:"token property"}},[t._v('"accountKeyPath"')]),a("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token string"}},[t._v("\"ab5ed9ab/49'/0'/0'\"")]),t._v("\n "),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("}")]),t._v("\n "),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("]")]),t._v("\n"),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("}")]),t._v("\n")])])]),a("ul",[a("li",[a("code",[t._v("psbt")]),t._v(": Required. A potentially incomplete PSBT that you want to update (Input WitnessUTXO, NonWitnessUTXO)")]),t._v(" "),a("li",[a("code",[t._v("derivationScheme")]),t._v(": Optional. If specified, will complete HDKeyPaths, witness script and redeem script information in the PSBT belonging to this derivationScheme.")]),t._v(" "),a("li",[a("code",[t._v("includeGlobalXPub")]),t._v(": Optional. Whether or not to include the global xpubs of the derivation scheme in the PSBT. (default: false)")]),t._v(" "),a("li",[a("code",[t._v("rebaseKeyPaths")]),t._v(": Optional. Rebase the hdkey paths (if no rebase, the key paths are relative to the xpub that NBXplorer knows about), a rebase can transform (PubKey0, 0/0, accountFingerprint) by (PubKey0, m/49'/0'/0/0, masterFingerprint)")]),t._v(" "),a("li",[a("code",[t._v("rebaseKeyPaths[].accountKey")]),t._v(": The account key to rebase")]),t._v(" "),a("li",[a("code",[t._v("rebaseKeyPaths[].accountKeyPath")]),t._v(": The path from the root to the account key prefixed by the master public key fingerprint.")]),t._v(" "),a("li",[a("code",[t._v("alwaysIncludeNonWitnessUTXO")]),t._v(": Try to set the full transaction in "),a("code",[t._v("non_witness_utxo")]),t._v(", even for segwit inputs (default to "),a("code",[t._v("false")]),t._v(")")])]),t._v(" "),a("p",[t._v("Response:")]),t._v(" "),a("div",{staticClass:"language-json extra-class"},[a("pre",{pre:!0,attrs:{class:"language-json"}},[a("code",[a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("{")]),t._v("\n "),a("span",{pre:!0,attrs:{class:"token property"}},[t._v('"psbt"')]),a("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token string"}},[t._v('"cHNidP8BAHcBAAAAASjvZHM29AbxO4IGGHbk3IE82yciSQFr2Ihge7P9P1HeAQAAAAD/////AmzQMAEAAAAAGXapFG1/TpHnIajdweam5Z3V9s6oGWBRiKyAw8kBAAAAABl2qRSVNmCfrnVeIwVkuTrCR6EvRFCP7IisAAAAAAABAP10AQEAAAACe9C2c9VL+gfYpic4c+Wk/Nn7bvhewA82owtcUDo/tPoAAAAAakcwRAIgUlLS0SDj7IXeY44x21eUg16Vh4qbJe+NDQ/ywUrB84kCIGLU5Vec2bjL1DZhUmDueLrf0uh/PycOK7FWg/Ptvwi0ASED7OpQGf+HzIRwWKZ1Hmd8h6vxkFOt5RlJ3u/flzNTesv/////818+qp4hLnw9DWOD+a601fLjFciZ/4iCNT1M9g+kMvkAAAAAakcwRAIgfk+bUUYfRs6AU1mt5unV4fZxCit34g8pE5fsawUM7H0CIBGpSil8+JCHdAHxKU2I7CvEBzAyz3ggd9RlH+QQSnlkASEC/wwlQ07b3xdSQaEf+wRJEnzEJT2GPNTY4Wb3Gg1hxFz/////AoDw+gIAAAAAGXapFHoZHSjaWNcmJk7sSHvRG29RaqIiiKxQlPoCAAAAABl2qRTSKm2x4ITWeuYLwCv3PUDtt+CL+YisAAAAACIGA1KRWHyJqdpbUzuezCSzj4+bj1+gNWGEibLG0BMj9/RmDDAn+hsBAAAAAgAAAAAiAgIuwas0MohgjmGIXoOgS95USEDawK//ZqrVEi5UIfP/FAwwJ/obAQAAAAMAAAAAAA=="')]),t._v("\n"),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("}")]),t._v("\n")])])]),a("p",[t._v("Note, in the example above, if the "),a("a",{attrs:{href:"#metadata"}},[t._v("metadata")]),t._v(" "),a("code",[t._v("AccountKeyPath")]),t._v(" is set to "),a("code",[t._v("ab5ed9ab/49'/0'/0'")]),t._v(", then you don't have to pass "),a("code",[t._v("rebaseKeyPaths")]),t._v(".")]),t._v(" "),a("h2",{attrs:{id:"attach-metadata-to-a-derivation-scheme"}},[a("a",{staticClass:"header-anchor",attrs:{href:"#attach-metadata-to-a-derivation-scheme"}},[t._v("#")]),t._v(" "),a("a",{attrs:{name:"metadata"}}),t._v("Attach metadata to a derivation scheme")]),t._v(" "),a("p",[t._v("You can attach JSON metadata to a derivation scheme:")]),t._v(" "),a("p",[a("code",[t._v("HTTP POST v1/cryptos/{cryptoCode}/derivations/{derivationScheme}/metadata/{key}")])]),t._v(" "),a("p",[t._v("The body can be any JSON token.")]),t._v(" "),a("p",[t._v("Body:")]),t._v(" "),a("div",{staticClass:"language-json extra-class"},[a("pre",{pre:!0,attrs:{class:"language-json"}},[a("code",[a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("{")]),t._v("\n "),a("span",{pre:!0,attrs:{class:"token property"}},[t._v('"example"')]),a("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token string"}},[t._v('"value"')]),t._v("\n"),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("}")]),t._v("\n")])])]),a("h2",{attrs:{id:"detach-metadata-from-a-derivation-scheme"}},[a("a",{staticClass:"header-anchor",attrs:{href:"#detach-metadata-from-a-derivation-scheme"}},[t._v("#")]),t._v(" "),a("a",{attrs:{name:"detachmetadata"}}),t._v("Detach metadata from a derivation scheme")]),t._v(" "),a("p",[a("code",[t._v("HTTP POST v1/cryptos/{cryptoCode}/derivations/{derivationScheme}/metadata/{key}")]),t._v(" "),a("code",[t._v("HTTP POST v1/cryptos/{cryptoCode}/addresses/{derivationScheme}/metadata/{key}")]),t._v(" "),a("code",[t._v("HTTP POST v1/groups/{derivationScheme}/metadata/{key}")])]),t._v(" "),a("p",[t._v("Call without body and without content type.")]),t._v(" "),a("h2",{attrs:{id:"retrieve-metadata-from-a-derivation-scheme"}},[a("a",{staticClass:"header-anchor",attrs:{href:"#retrieve-metadata-from-a-derivation-scheme"}},[t._v("#")]),t._v(" "),a("a",{attrs:{name:"getmetadata"}}),t._v("Retrieve metadata from a derivation scheme")]),t._v(" "),a("p",[t._v("You retrieve the JSON metadata of a derivation scheme:")]),t._v(" "),a("p",[a("code",[t._v("HTTP GET v1/cryptos/{cryptoCode}/derivations/{derivationScheme}/metadata/{key}")]),t._v(" "),a("code",[t._v("HTTP GET v1/cryptos/{cryptoCode}/addresses/{derivationScheme}/metadata/{key}")]),t._v(" "),a("code",[t._v("HTTP GET v1/groups/{derivationScheme}/metadata/{key}")])]),t._v(" "),a("p",[t._v("Error codes:")]),t._v(" "),a("ul",[a("li",[t._v("HTTP 404: The key is not found")])]),t._v(" "),a("p",[t._v("The body can be any piece of JSON.")]),t._v(" "),a("p",[t._v("Body:")]),t._v(" "),a("div",{staticClass:"language-json extra-class"},[a("pre",{pre:!0,attrs:{class:"language-json"}},[a("code",[a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("{")]),t._v("\n "),a("span",{pre:!0,attrs:{class:"token property"}},[t._v('"example"')]),a("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token string"}},[t._v('"value"')]),t._v("\n"),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("}")]),t._v("\n")])])]),a("h2",{attrs:{id:"manual-pruning"}},[a("a",{staticClass:"header-anchor",attrs:{href:"#manual-pruning"}},[t._v("#")]),t._v(" "),a("a",{attrs:{name:"pruning"}}),t._v("Manual pruning")]),t._v(" "),a("p",[t._v("NBXplorer has an auto pruning feature configurable with "),a("code",[t._v("--autopruning x")]),t._v(" where "),a("code",[t._v("x")]),t._v(" is in second. If a call to NBXplorer's "),a("code",[t._v("Get utxo")]),t._v(" or "),a("code",[t._v("Get PSBT")]),t._v(" takes more time than "),a("code",[t._v("x seconds")]),t._v(", then the auto pruning will delete transactions whose all UTXOs have been already spent and which are old enough.")]),t._v(" "),a("p",[t._v("You can however force pruning by calling:")]),t._v(" "),a("p",[a("code",[t._v("HTTP POST v1/cryptos/{cryptoCode}/derivations/{derivationScheme}/prune")])]),t._v(" "),a("p",[t._v("Request:")]),t._v(" "),a("div",{staticClass:"language-json extra-class"},[a("pre",{pre:!0,attrs:{class:"language-json"}},[a("code",[a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("{")]),t._v("\n "),a("span",{pre:!0,attrs:{class:"token property"}},[t._v('"daysToKeep"')]),a("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token number"}},[t._v("1.0")]),t._v("\n"),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("}")]),t._v("\n")])])]),a("ul",[a("li",[a("code",[t._v("daysToKeep")]),t._v(": Optional. The number of days of history to keep. (Default: 1.0)")])]),t._v(" "),a("p",[t._v("Response:")]),t._v(" "),a("div",{staticClass:"language-json extra-class"},[a("pre",{pre:!0,attrs:{class:"language-json"}},[a("code",[a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("{")]),t._v("\n "),a("span",{pre:!0,attrs:{class:"token property"}},[t._v('"totalPruned"')]),a("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token number"}},[t._v("10")]),t._v("\n"),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("}")]),t._v("\n")])])]),a("ul",[a("li",[a("code",[t._v("totalPruned")]),t._v(" is the number of transactions pruned from the derivation scheme")])]),t._v(" "),a("h2",{attrs:{id:"generate-a-wallet"}},[a("a",{staticClass:"header-anchor",attrs:{href:"#generate-a-wallet"}},[t._v("#")]),t._v(" "),a("a",{attrs:{name:"wallet"}}),t._v("Generate a wallet")]),t._v(" "),a("p",[t._v("NBXplorer will generate and save a mnemonic and create a derivationScheme.")]),t._v(" "),a("p",[a("code",[t._v("HTTP POST v1/cryptos/{cryptoCode}/derivations")])]),t._v(" "),a("p",[t._v("Request:")]),t._v(" "),a("div",{staticClass:"language-json extra-class"},[a("pre",{pre:!0,attrs:{class:"language-json"}},[a("code",[a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("{")]),t._v("\n "),a("span",{pre:!0,attrs:{class:"token property"}},[t._v('"accountNumber"')]),a("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token number"}},[t._v("2")]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v("\n "),a("span",{pre:!0,attrs:{class:"token property"}},[t._v('"wordList"')]),a("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token string"}},[t._v('"French"')]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v("\n "),a("span",{pre:!0,attrs:{class:"token property"}},[t._v('"existingMnemonic"')]),a("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token string"}},[t._v('"musicien sinistre divertir réussir louve alliage péplum innocent filmer stipuler chignon utopie effusion heureux légal"')]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v("\n "),a("span",{pre:!0,attrs:{class:"token property"}},[t._v('"wordCount"')]),a("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token number"}},[t._v("15")]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v("\n "),a("span",{pre:!0,attrs:{class:"token property"}},[t._v('"scriptPubKeyType"')]),a("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token string"}},[t._v('"SegwitP2SH"')]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v("\n "),a("span",{pre:!0,attrs:{class:"token property"}},[t._v('"passphrase"')]),a("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token string"}},[t._v('"hello"')]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v("\n "),a("span",{pre:!0,attrs:{class:"token property"}},[t._v('"importKeysToRPC"')]),a("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token boolean"}},[t._v("true")]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v("\n "),a("span",{pre:!0,attrs:{class:"token property"}},[t._v('"savePrivateKeys"')]),a("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token boolean"}},[t._v("true")]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v("\n "),a("span",{pre:!0,attrs:{class:"token property"}},[t._v('"additionalOptions"')]),a("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("{")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token property"}},[t._v('"slip77"')]),a("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token string"}},[t._v('"6c2de18eabeff3f7822bc724ad482bef0557f3e1c1e1c75b7a393a5ced4de616"')]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("}")]),t._v("\n"),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("}")]),t._v("\n")])])]),a("ul",[a("li",[a("code",[t._v("accountNumber")]),t._v(": Optional, the account number used for determining the keypath that NBXplorer will track, see "),a("code",[t._v("accountKeyPath")]),t._v(" in the response. (Default: "),a("code",[t._v("0")]),t._v(")")]),t._v(" "),a("li",[a("code",[t._v("existingMnemonic")]),t._v(": Optional, an existing "),a("a",{attrs:{href:"https://github.com/bitcoin/bips/blob/master/bip-0039.mediawiki",target:"_blank",rel:"noopener noreferrer"}},[t._v("BIP39"),a("OutboundLink")],1),t._v(" mnemonic seed to import instead of generating.")]),t._v(" "),a("li",[a("code",[t._v("wordList")]),t._v(": Optional, the "),a("a",{attrs:{href:"https://github.com/bitcoin/bips/blob/master/bip-0039.mediawiki",target:"_blank",rel:"noopener noreferrer"}},[t._v("BIP39"),a("OutboundLink")],1),t._v(" wordlist to use when generating the mnemonic, available: English, French, Japanese, Spanish, ChineseSimplified (Defaut: "),a("code",[t._v("English")]),t._v(")")]),t._v(" "),a("li",[a("code",[t._v("wordCount")]),t._v(": Optional, the "),a("a",{attrs:{href:"https://github.com/bitcoin/bips/blob/master/bip-0039.mediawiki",target:"_blank",rel:"noopener noreferrer"}},[t._v("BIP39"),a("OutboundLink")],1),t._v(" word count in the mnemonic (Default: "),a("code",[t._v("12")]),t._v(")")]),t._v(" "),a("li",[a("code",[t._v("scriptPubKeyType")]),t._v(": Optional, the type of scriptPubKey (address) to generate, available: Legacy, Segwit, SegwitP2SH, Taproot (Default: "),a("code",[t._v("Segwit")]),t._v(" or "),a("code",[t._v("Legacy")]),t._v(" if "),a("code",[t._v("cryptoCode")]),t._v(" does not support segwit)")]),t._v(" "),a("li",[a("code",[t._v("passphrase")]),t._v(": Optional, the "),a("a",{attrs:{href:"https://github.com/bitcoin/bips/blob/master/bip-0039.mediawiki",target:"_blank",rel:"noopener noreferrer"}},[t._v("BIP39"),a("OutboundLink")],1),t._v(" passphrase. (Default: empty string)")]),t._v(" "),a("li",[a("code",[t._v("importKeysToRPC")]),t._v(": Optional, if true, every times a call to "),a("a",{attrs:{href:"#unused"}},[t._v("get a new unused address")]),t._v(" is called, the private key will be imported into the underlying node via RPC's "),a("code",[t._v("importprivkey")]),t._v(". (Default: "),a("code",[t._v("false")]),t._v(")")]),t._v(" "),a("li",[a("code",[t._v("savePrivateKeys")]),t._v(": If true, private keys will be saved inside the following metadata "),a("code",[t._v("Mnemonic")]),t._v(", "),a("code",[t._v("MasterHDKey")]),t._v(" and "),a("code",[t._v("AccountHDKey")]),t._v(".")]),t._v(" "),a("li",[a("code",[t._v("additionalOptions")]),t._v(": Optional, additional options that a derivation scheme of some networks may support, such as "),a("a",{attrs:{href:"#liquid"}},[t._v("Liquid")])])]),t._v(" "),a("p",[t._v("The "),a("code",[t._v("importKeysToRPC")]),t._v(" is only useful if one need to manage his wallet via the node's cli tooling.")]),t._v(" "),a("p",[t._v("Response:")]),t._v(" "),a("div",{staticClass:"language-json extra-class"},[a("pre",{pre:!0,attrs:{class:"language-json"}},[a("code",[a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("{")]),t._v("\n "),a("span",{pre:!0,attrs:{class:"token property"}},[t._v('"mnemonic"')]),a("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token string"}},[t._v('"musicien sinistre divertir réussir louve alliage péplum innocent filmer stipuler chignon utopie effusion heureux légal"')]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v("\n "),a("span",{pre:!0,attrs:{class:"token property"}},[t._v('"passphrase"')]),a("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token string"}},[t._v('"hello"')]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v("\n "),a("span",{pre:!0,attrs:{class:"token property"}},[t._v('"wordList"')]),a("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token string"}},[t._v('"French"')]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v("\n "),a("span",{pre:!0,attrs:{class:"token property"}},[t._v('"wordCount"')]),a("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token number"}},[t._v("15")]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v("\n "),a("span",{pre:!0,attrs:{class:"token property"}},[t._v('"masterHDKey"')]),a("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token string"}},[t._v('"tprv8ZgxMBicQKsPdv26BvirqqQCZJPSYEkSW7Por7a7r2PpsCUKHjjT18Gwk8k4FtkvqvakMFnsv9uaXHHoibieRd5BMhGCPYxVLaVY9vqpaxb"')]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v("\n "),a("span",{pre:!0,attrs:{class:"token property"}},[t._v('"accountHDKey"')]),a("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token string"}},[t._v('"tprv8gPRns62uoh4zbRatcxUWZY7aX3XsTchHBp79YL6E3fEocsgd6XjThU4r7E3iUemBffeLSjcjXyD1VrmHMwNceVipFL7txTFMgKm4kehuSR"')]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v("\n "),a("span",{pre:!0,attrs:{class:"token property"}},[t._v('"accountKeyPath"')]),a("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token string"}},[t._v("\"a0aa59b4/49'/1'/2'\"")]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v("\n "),a("span",{pre:!0,attrs:{class:"token property"}},[t._v('"accountDescriptor"')]),a("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token string"}},[t._v("\"sh(wpkh([a0aa59b4/49'/1'/2']tpubDD5TwH8H4BNjt4TNnGd4uyCE9YZU2nobrVQtS4NPeKTde78TFVMKeC5w2G1nj7amQbGDptv4FtDBLuVQhofegQaZdFVuuxuCGpZQ4jZ6L5q))\"")]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v("\n "),a("span",{pre:!0,attrs:{class:"token property"}},[t._v('"derivationScheme"')]),a("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token string"}},[t._v('"tpubDD5TwH8H4BNjt4TNnGd4uyCE9YZU2nobrVQtS4NPeKTde78TFVMKeC5w2G1nj7amQbGDptv4FtDBLuVQhofegQaZdFVuuxuCGpZQ4jZ6L5q-[p2sh]"')]),t._v("\n"),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("}")]),t._v("\n")])])]),a("ul",[a("li",[a("code",[t._v("mnemonic")]),t._v(": The generated "),a("a",{attrs:{href:"https://github.com/bitcoin/bips/blob/master/bip-0039.mediawiki",target:"_blank",rel:"noopener noreferrer"}},[t._v("BIP39"),a("OutboundLink")],1),t._v(" mnemonic.")]),t._v(" "),a("li",[a("code",[t._v("passphrase")]),t._v(": The "),a("a",{attrs:{href:"https://github.com/bitcoin/bips/blob/master/bip-0039.mediawiki",target:"_blank",rel:"noopener noreferrer"}},[t._v("BIP39"),a("OutboundLink")],1),t._v(" passphrase.")]),t._v(" "),a("li",[a("code",[t._v("wordList")]),t._v(": The "),a("a",{attrs:{href:"https://github.com/bitcoin/bips/blob/master/bip-0039.mediawiki",target:"_blank",rel:"noopener noreferrer"}},[t._v("BIP39"),a("OutboundLink")],1),t._v(" wordlist to use when generating the mnemonic.")]),t._v(" "),a("li",[a("code",[t._v("wordCount")]),t._v(": The "),a("a",{attrs:{href:"https://github.com/bitcoin/bips/blob/master/bip-0039.mediawiki",target:"_blank",rel:"noopener noreferrer"}},[t._v("BIP39"),a("OutboundLink")],1),t._v(" word count in the mnemonic.")]),t._v(" "),a("li",[a("code",[t._v("masterHDKey")]),t._v(": The "),a("a",{attrs:{href:"https://github.com/bitcoin/bips/blob/master/bip-0032.mediawiki",target:"_blank",rel:"noopener noreferrer"}},[t._v("BIP32"),a("OutboundLink")],1),t._v(" master key derived from the mnemonic and passphrase.")]),t._v(" "),a("li",[a("code",[t._v("accountHDKey")]),t._v(": The "),a("a",{attrs:{href:"https://github.com/bitcoin/bips/blob/master/bip-0032.mediawiki",target:"_blank",rel:"noopener noreferrer"}},[t._v("BIP32"),a("OutboundLink")],1),t._v(" account key derived from the "),a("code",[t._v("masterHDKey")]),t._v(" and "),a("code",[t._v("accountKeyPath")]),t._v(".")]),t._v(" "),a("li",[a("code",[t._v("accountKeyPath")]),t._v(": The fingerprint of the master key as defined by The "),a("a",{attrs:{href:"https://github.com/bitcoin/bips/blob/master/bip-0174.mediawiki",target:"_blank",rel:"noopener noreferrer"}},[t._v("BIP174"),a("OutboundLink")],1),t._v(", followed by the derivation path used to generate the "),a("code",[t._v("derivationScheme")]),t._v(". ("),a("a",{attrs:{href:"https://github.com/bitcoin/bips/blob/master/bip-0043.mediawiki",target:"_blank",rel:"noopener noreferrer"}},[t._v("Purpose field"),a("OutboundLink")],1),t._v(" based on "),a("a",{attrs:{href:"https://github.com/bitcoin/bips/blob/master/bip-0044.mediawiki",target:"_blank",rel:"noopener noreferrer"}},[t._v("BIP44"),a("OutboundLink")],1),t._v(", "),a("a",{attrs:{href:"https://github.com/bitcoin/bips/blob/master/bip-0049.mediawiki",target:"_blank",rel:"noopener noreferrer"}},[t._v("BIP49"),a("OutboundLink")],1),t._v(" or "),a("a",{attrs:{href:"https://github.com/bitcoin/bips/blob/master/bip-0084.mediawiki",target:"_blank",rel:"noopener noreferrer"}},[t._v("BIP84"),a("OutboundLink")],1),t._v(" and "),a("a",{attrs:{href:"https://github.com/satoshilabs/slips/blob/master/slip-0044.md",target:"_blank",rel:"noopener noreferrer"}},[t._v("SLIP44"),a("OutboundLink")],1),t._v(" for the coin type)")]),t._v(" "),a("li",[a("code",[t._v("accountDescriptor")]),t._v(": The output descriptor of the created account public key.")]),t._v(" "),a("li",[a("code",[t._v("derivationScheme")]),t._v(": The "),a("a",{attrs:{href:"#derivationScheme"}},[t._v("derivation scheme")]),t._v(" that is being tracked by NBXplorer.")])]),t._v(" "),a("p",[a("a",{attrs:{href:"#metadata"}},[t._v("Metadata")]),t._v(" for this derivation scheme after this call:")]),t._v(" "),a("ul",[a("li",[a("code",[t._v("Mnemonic")]),t._v(": The mnemonic generated. (if "),a("code",[t._v("savePrivateKeys")]),t._v(" is "),a("code",[t._v("true")]),t._v(")")]),t._v(" "),a("li",[a("code",[t._v("MasterHDKey")]),t._v(": The "),a("a",{attrs:{href:"https://github.com/bitcoin/bips/blob/master/bip-0032.mediawiki",target:"_blank",rel:"noopener noreferrer"}},[t._v("xpriv"),a("OutboundLink")],1),t._v(" master key generated by the mnemonic and passphrase. (if "),a("code",[t._v("savePrivateKeys")]),t._v(" is "),a("code",[t._v("true")]),t._v(")")]),t._v(" "),a("li",[a("code",[t._v("AccountHDKey")]),t._v(": The derived "),a("a",{attrs:{href:"https://github.com/bitcoin/bips/blob/master/bip-0032.mediawiki",target:"_blank",rel:"noopener noreferrer"}},[t._v("xpriv"),a("OutboundLink")],1),t._v(" account key from the "),a("code",[t._v("MasterHDKey")]),t._v(" and "),a("code",[t._v("AccountKeyPath")]),t._v(". (if "),a("code",[t._v("savePrivateKeys")]),t._v(" is "),a("code",[t._v("true")]),t._v(")")]),t._v(" "),a("li",[a("code",[t._v("AccountKeyPath")]),t._v(": The fingerprint of the master key as defined by The "),a("a",{attrs:{href:"https://github.com/bitcoin/bips/blob/master/bip-0174.mediawiki",target:"_blank",rel:"noopener noreferrer"}},[t._v("BIP174"),a("OutboundLink")],1),t._v(", followed by the derivation path used to generate the "),a("code",[t._v("derivationScheme")]),t._v(". ("),a("a",{attrs:{href:"https://github.com/bitcoin/bips/blob/master/bip-0043.mediawiki",target:"_blank",rel:"noopener noreferrer"}},[t._v("Purpose field"),a("OutboundLink")],1),t._v(" based on "),a("a",{attrs:{href:"https://github.com/bitcoin/bips/blob/master/bip-0044.mediawiki",target:"_blank",rel:"noopener noreferrer"}},[t._v("BIP44"),a("OutboundLink")],1),t._v(", "),a("a",{attrs:{href:"https://github.com/bitcoin/bips/blob/master/bip-0049.mediawiki",target:"_blank",rel:"noopener noreferrer"}},[t._v("BIP49"),a("OutboundLink")],1),t._v(" or "),a("a",{attrs:{href:"https://github.com/bitcoin/bips/blob/master/bip-0084.mediawiki",target:"_blank",rel:"noopener noreferrer"}},[t._v("BIP84"),a("OutboundLink")],1),t._v(" and "),a("a",{attrs:{href:"https://github.com/satoshilabs/slips/blob/master/slip-0044.md",target:"_blank",rel:"noopener noreferrer"}},[t._v("SLIP44"),a("OutboundLink")],1),t._v(" for the coin type)")]),t._v(" "),a("li",[a("code",[t._v("ImportAddressToRPC")]),t._v(": "),a("code",[t._v("Legacy")]),t._v(" (or "),a("code",[t._v("True")]),t._v(", for old wallet) if the generated addresses are added to legacy style Bitcoin core wallet. "),a("code",[t._v("Descriptors")]),t._v(" or "),a("code",[t._v("DescriptorsReadOnly")]),t._v(" if the generated addresses and private keys are added to a descriptor enabled Bitcoin Core wallet.")]),t._v(" "),a("li",[a("code",[t._v("AccountDescriptor")]),t._v(": The output descriptor format of the derivation scheme.")]),t._v(" "),a("li",[a("code",[t._v("Birthdate")]),t._v(": The birthdate of the wallet in ISO-8601 format.")])]),t._v(" "),a("p",[t._v("Note that the metadata "),a("code",[t._v("AccountKeyPath")]),t._v(" is leveraged by "),a("a",{attrs:{href:"#psbt"}},[t._v("Create a PSBT")]),t._v(" and "),a("a",{attrs:{href:"#updatepsbt"}},[t._v("Update a PSBT")]),t._v(".")]),t._v(" "),a("h2",{attrs:{id:"node-rpc-proxy"}},[a("a",{staticClass:"header-anchor",attrs:{href:"#node-rpc-proxy"}},[t._v("#")]),t._v(" "),a("a",{attrs:{name:"rpc-proxy"}}),t._v("Node RPC Proxy")]),t._v(" "),a("p",[t._v("NBXplorer allows you to query the node's JSON-RPC through it when "),a("code",[t._v("exposerpc")]),t._v(" option is enabled")]),t._v(" "),a("p",[a("code",[t._v("HTTP POST v1/cryptos/{cryptoCode}/rpc")]),t._v("\nwith Header "),a("code",[t._v("Content-Type")]),t._v(" set to value "),a("code",[t._v("application/json")]),t._v(" or "),a("code",[t._v("application/json-rpc")])]),t._v(" "),a("p",[t._v("Error codes:")]),t._v(" "),a("ul",[a("li",[t._v("HTTP 415: You did not send the correct "),a("code",[t._v("Content-Type")]),t._v(" header.")]),t._v(" "),a("li",[t._v("HTTP 404: "),a("code",[t._v("cryptoCode-not-supported")])]),t._v(" "),a("li",[t._v("HTTP 401: "),a("code",[t._v("json-rpc-not-exposed")])]),t._v(" "),a("li",[t._v("HTTP 400: "),a("code",[t._v("rpc-unavailable")])]),t._v(" "),a("li",[t._v("HTTP 422: "),a("code",[t._v("no-json-rpc-request")])])]),t._v(" "),a("p",[t._v("Request:")]),t._v(" "),a("div",{staticClass:"language-json extra-class"},[a("pre",{pre:!0,attrs:{class:"language-json"}},[a("code",[a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("{")]),a("span",{pre:!0,attrs:{class:"token property"}},[t._v('"jsonrpc"')]),a("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token string"}},[t._v('"1.0"')]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token property"}},[t._v('"id"')]),a("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),a("span",{pre:!0,attrs:{class:"token string"}},[t._v('"1"')]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token property"}},[t._v('"method"')]),a("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token string"}},[t._v('"getblockchaininfo"')]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token property"}},[t._v('"params"')]),a("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("[")]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("]")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("}")]),t._v("\n")])])]),a("p",[t._v("Response:")]),t._v(" "),a("div",{staticClass:"language-json extra-class"},[a("pre",{pre:!0,attrs:{class:"language-json"}},[a("code",[a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("{")]),t._v("\n "),a("span",{pre:!0,attrs:{class:"token property"}},[t._v('"error"')]),a("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token null keyword"}},[t._v("null")]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v("\n "),a("span",{pre:!0,attrs:{class:"token property"}},[t._v('"result"')]),a("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("{")]),t._v("\n "),a("span",{pre:!0,attrs:{class:"token property"}},[t._v('"chain"')]),a("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token string"}},[t._v('"regtest"')]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v("\n ...\n "),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("}")]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v("\n "),a("span",{pre:!0,attrs:{class:"token property"}},[t._v('"resultString"')]),a("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token string"}},[t._v('"..."')]),t._v("\n"),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("}")]),t._v("\n")])])]),a("p",[t._v("NOTE: Batch commands are also supported by sending the JSON-RPC requests in an array. The result is also returned in an array.")]),t._v(" "),a("h2",{attrs:{id:"health-check"}},[a("a",{staticClass:"header-anchor",attrs:{href:"#health-check"}},[t._v("#")]),t._v(" "),a("a",{attrs:{name:"health"}}),t._v("Health check")]),t._v(" "),a("p",[t._v("A endpoint that can be used without the need for "),a("a",{attrs:{href:"#auth"}},[t._v("authentication")]),t._v(" which will returns HTTP 200 only if all nodes connected to NBXplorer are ready.")]),t._v(" "),a("p",[a("code",[t._v("HTTP GET /health")])]),t._v(" "),a("p",[t._v("It will output the state for each nodes in JSON, whose format might change in the future.")]),t._v(" "),a("h2",{attrs:{id:"liquid-integration"}},[a("a",{staticClass:"header-anchor",attrs:{href:"#liquid-integration"}},[t._v("#")]),t._v(" "),a("a",{attrs:{name:"liquid"}}),t._v("Liquid integration")]),t._v(" "),a("p",[t._v("NBXplorer supports liquid, the API is the same as all the other coins, except for the following:")]),t._v(" "),a("ul",[a("li",[t._v("All references to "),a("code",[t._v("value")]),t._v(" which normally contains an integer of the amount of the altcoin will instead output a JSON Object of type "),a("code",[t._v("AssetMoney")]),t._v(".")]),t._v(" "),a("li",[t._v("If NBXplorer is unable to unblind a value, then the value will be "),a("code",[t._v("null")]),t._v(".")]),t._v(" "),a("li",[a("a",{attrs:{href:"#transactions"}},[t._v("When listing the transaction of a derivation scheme")]),t._v(", the "),a("code",[t._v("balanceChange")]),t._v(" elements is instead a "),a("code",[t._v("JSON array of AssetMoney")]),t._v(".")]),t._v(" "),a("li",[a("a",{attrs:{href:"#balance"}},[t._v("Get Balance")]),t._v(" returns values as "),a("code",[t._v("JSON array of AssetMoney")]),t._v(".")]),t._v(" "),a("li",[a("a",{attrs:{href:"#unused"}},[t._v("Get a new unused address")]),t._v(" returns a confidential address. (See note below)")]),t._v(" "),a("li",[a("a",{attrs:{href:"#psbt"}},[t._v("Create Partially Signed Bitcoin Transaction")]),t._v(" is not supported.")]),t._v(" "),a("li",[a("a",{attrs:{href:"#updatepsbt"}},[t._v("Update Partially Signed Bitcoin Transaction")]),t._v(" is not supported")]),t._v(" "),a("li",[a("a",{attrs:{href:"#scanUtxoSet"}},[t._v("Scan UTXO Set")]),t._v(" is not supported.")]),t._v(" "),a("li",[t._v("Any sort of recovery is not supported.")])]),t._v(" "),a("p",[t._v("The "),a("code",[t._v("AssetMoney")]),t._v(" JSON format is:")]),t._v(" "),a("div",{staticClass:"language-json extra-class"},[a("pre",{pre:!0,attrs:{class:"language-json"}},[a("code",[a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("{")]),t._v("\n "),a("span",{pre:!0,attrs:{class:"token property"}},[t._v('"assetId"')]),a("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token string"}},[t._v('"abc"')]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v("\n "),a("span",{pre:!0,attrs:{class:"token property"}},[t._v('"value"')]),a("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token number"}},[t._v("123")]),t._v("\n"),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("}")]),t._v("\n")])])]),a("h3",{attrs:{id:"liquid-confidential-addresses"}},[a("a",{staticClass:"header-anchor",attrs:{href:"#liquid-confidential-addresses"}},[t._v("#")]),t._v(" Liquid Confidential Addresses")]),t._v(" "),a("p",[t._v("Liquid confidential addresses are supported in two ways:")]),t._v(" "),a("ul",[a("li",[t._v("By default, the blinding key of the confidential address is derived directly from the "),a("code",[t._v("derivationScheme")]),t._v(". If the "),a("code",[t._v("scriptPubKey")]),t._v(" "),a("code",[t._v("0/2")]),t._v(" is generated, the blinding private key used by NBXplorer is the SHA256 of the scriptPubKey at "),a("code",[t._v("0/2/0")]),t._v(".")]),t._v(" "),a("li",[a("a",{attrs:{href:"https://github.com/satoshilabs/slips/blob/master/slip-0077.md",target:"_blank",rel:"noopener noreferrer"}},[t._v("SLIP77"),a("OutboundLink")],1),t._v(", by suffixing the derivation scheme with either:\n"),a("ul",[a("li",[t._v("the mnemonic seed derivation (usually the same as your wallet's)"),a("code",[t._v("-[slip77=all all all all all all all all all all all all]")])]),t._v(" "),a("li",[t._v("the master blinding key in hex or wif format"),a("code",[t._v("-[slip77=6c2de18eabeff3f7822bc724ad482bef0557f3e1c1e1c75b7a393a5ced4de616]")]),t._v("\nYou may also choose to not use confidential addresses by applying the suffix "),a("code",[t._v("-[unblinded]")]),t._v(" to the derivation scheme")])])])]),t._v(" "),a("h3",{attrs:{id:"liquid-transactions-support"}},[a("a",{staticClass:"header-anchor",attrs:{href:"#liquid-transactions-support"}},[t._v("#")]),t._v(" Liquid Transactions support")]),t._v(" "),a("p",[t._v("Due to the changes in the transaction format in Elements networks to support assets, we do not support transaction building features.")]),t._v(" "),a("p",[t._v("In order to send in and out of liquid, we advise you to rely on the RPC command line interface of the liquid deamon.\nFor doing this you need to "),a("a",{attrs:{href:"#wallet"}},[t._v("Generate a wallet")]),t._v(" with "),a("code",[t._v("importAddressToRPC")]),t._v(" and "),a("code",[t._v("savePrivateKeys")]),t._v(" set to "),a("code",[t._v("true")]),t._v(".")]),t._v(" "),a("p",[t._v("Be careful to not expose your NBXplorer server on internet, your private keys can be "),a("a",{attrs:{href:"#getmetadata"}},[t._v("retrieved trivially")]),t._v(".")]),t._v(" "),a("h2",{attrs:{id:"groups-2"}},[a("a",{staticClass:"header-anchor",attrs:{href:"#groups-2"}},[t._v("#")]),t._v(" Groups")]),t._v(" "),a("h3",{attrs:{id:"create-group"}},[a("a",{staticClass:"header-anchor",attrs:{href:"#create-group"}},[t._v("#")]),t._v(" "),a("a",{attrs:{name:"create-group"}}),t._v("Create group")]),t._v(" "),a("p",[t._v("Create a new empty group.")]),t._v(" "),a("p",[a("code",[t._v("HTTP POST v1/groups")])]),t._v(" "),a("p",[t._v("No body required")]),t._v(" "),a("p",[t._v("Response")]),t._v(" "),a("div",{staticClass:"language-json extra-class"},[a("pre",{pre:!0,attrs:{class:"language-json"}},[a("code",[a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("{")]),t._v("\n "),a("span",{pre:!0,attrs:{class:"token property"}},[t._v('"trackedSource"')]),a("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token string"}},[t._v('"GROUP:6N23bHztah546P6xQT"')]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v("\n "),a("span",{pre:!0,attrs:{class:"token property"}},[t._v('"groupId"')]),a("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token string"}},[t._v('"6N23bHztah546P6xQT"')]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v("\n "),a("span",{pre:!0,attrs:{class:"token property"}},[t._v('"children"')]),a("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("[")]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("]")]),t._v("\n"),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("}")]),t._v("\n")])])]),a("h3",{attrs:{id:"get-group"}},[a("a",{staticClass:"header-anchor",attrs:{href:"#get-group"}},[t._v("#")]),t._v(" "),a("a",{attrs:{name:"get-group"}}),t._v("Get group")]),t._v(" "),a("p",[a("code",[t._v("HTTP GET v1/groups/{groupId}")])]),t._v(" "),a("p",[t._v("Get the group")]),t._v(" "),a("div",{staticClass:"language-json extra-class"},[a("pre",{pre:!0,attrs:{class:"language-json"}},[a("code",[a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("{")]),t._v("\n "),a("span",{pre:!0,attrs:{class:"token property"}},[t._v('"trackedSource"')]),a("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token string"}},[t._v('"GROUP:6N23bHztah546P6xQT"')]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v("\n "),a("span",{pre:!0,attrs:{class:"token property"}},[t._v('"groupId"')]),a("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token string"}},[t._v('"6N23bHztah546P6xQT"')]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v("\n "),a("span",{pre:!0,attrs:{class:"token property"}},[t._v('"children"')]),a("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("[")]),t._v("\n "),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("{")]),t._v("\n "),a("span",{pre:!0,attrs:{class:"token property"}},[t._v('"trackedSource"')]),a("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token string"}},[t._v('"GROUP:Es26NSg5xTqbpRz3FY"')]),t._v("\n "),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("}")]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v("\n "),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("{")]),t._v("\n "),a("span",{pre:!0,attrs:{class:"token property"}},[t._v('"cryptoCode"')]),a("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token string"}},[t._v('"BTC"')]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v("\n "),a("span",{pre:!0,attrs:{class:"token property"}},[t._v('"trackedSource"')]),a("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token string"}},[t._v('"DERIVATIONSCHEME:tpubDC6xFicnheK85vUNGjegu4HuJGg8nPiRk26jhW7n8GTCnb2aqizTFzyG1Jw42ZUs19nKU8V3Xi38WyVqem5ytbjFsREMWUH8QMYpzgmNdus"')]),t._v("\n "),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("}")]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v("\n "),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("{")]),t._v("\n "),a("span",{pre:!0,attrs:{class:"token property"}},[t._v('"cryptoCode"')]),a("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token string"}},[t._v('"BTC"')]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v("\n "),a("span",{pre:!0,attrs:{class:"token property"}},[t._v('"trackedSource"')]),a("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token string"}},[t._v('"DERIVATIONSCHEME:tpubDC45vUDsFAAqwYKz5hSLi5yJLNduJzpmTw6QTMRPrwdXURoyL81H8oZAaL8EiwEgg92qgMa9h1bB4Y1BZpy9CTNPfjfxvFcWxeiKBHCqSdc"')]),t._v("\n "),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("}")]),t._v("\n "),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("]")]),t._v("\n"),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("}")]),t._v("\n")])])]),a("h3",{attrs:{id:"add-group-children"}},[a("a",{staticClass:"header-anchor",attrs:{href:"#add-group-children"}},[t._v("#")]),t._v(" "),a("a",{attrs:{name:"add-group-children"}}),t._v("Add group children")]),t._v(" "),a("p",[t._v("Add children to a group.")]),t._v(" "),a("p",[a("code",[t._v("HTTP POST v1/groups/{groupId}/children")])]),t._v(" "),a("p",[t._v("Request:")]),t._v(" "),a("div",{staticClass:"language-json extra-class"},[a("pre",{pre:!0,attrs:{class:"language-json"}},[a("code",[a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("[")]),t._v("\n "),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("{")]),t._v("\n "),a("span",{pre:!0,attrs:{class:"token property"}},[t._v('"trackedSource"')]),a("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token string"}},[t._v('"GROUP:Es26NSg5xTqbpRz3FY"')]),t._v("\n "),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("}")]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v("\n "),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("{")]),t._v("\n "),a("span",{pre:!0,attrs:{class:"token property"}},[t._v('"cryptoCode"')]),a("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token string"}},[t._v('"BTC"')]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v("\n "),a("span",{pre:!0,attrs:{class:"token property"}},[t._v('"trackedSource"')]),a("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token string"}},[t._v('"DERIVATIONSCHEME:tpubDC6xFicnheK85vUNGjegu4HuJGg8nPiRk26jhW7n8GTCnb2aqizTFzyG1Jw42ZUs19nKU8V3Xi38WyVqem5ytbjFsREMWUH8QMYpzgmNdus"')]),t._v("\n "),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("}")]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v("\n "),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("{")]),t._v("\n "),a("span",{pre:!0,attrs:{class:"token property"}},[t._v('"cryptoCode"')]),a("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token string"}},[t._v('"BTC"')]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v("\n "),a("span",{pre:!0,attrs:{class:"token property"}},[t._v('"trackedSource"')]),a("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token string"}},[t._v('"DERIVATIONSCHEME:tpubDC45vUDsFAAqwYKz5hSLi5yJLNduJzpmTw6QTMRPrwdXURoyL81H8oZAaL8EiwEgg92qgMa9h1bB4Y1BZpy9CTNPfjfxvFcWxeiKBHCqSdc"')]),t._v("\n "),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("}")]),t._v("\n"),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("]")]),t._v("\n")])])]),a("p",[t._v("Response:")]),t._v(" "),a("div",{staticClass:"language-json extra-class"},[a("pre",{pre:!0,attrs:{class:"language-json"}},[a("code",[a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("{")]),t._v("\n "),a("span",{pre:!0,attrs:{class:"token property"}},[t._v('"trackedSource"')]),a("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token string"}},[t._v('"GROUP:6N23bHztah546P6xQT"')]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v("\n "),a("span",{pre:!0,attrs:{class:"token property"}},[t._v('"groupId"')]),a("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token string"}},[t._v('"6N23bHztah546P6xQT"')]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v("\n "),a("span",{pre:!0,attrs:{class:"token property"}},[t._v('"children"')]),a("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("[")]),t._v("\n "),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("{")]),t._v("\n "),a("span",{pre:!0,attrs:{class:"token property"}},[t._v('"trackedSource"')]),a("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token string"}},[t._v('"GROUP:Es26NSg5xTqbpRz3FY"')]),t._v("\n "),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("}")]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v("\n "),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("{")]),t._v("\n "),a("span",{pre:!0,attrs:{class:"token property"}},[t._v('"cryptoCode"')]),a("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token string"}},[t._v('"BTC"')]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v("\n "),a("span",{pre:!0,attrs:{class:"token property"}},[t._v('"trackedSource"')]),a("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token string"}},[t._v('"DERIVATIONSCHEME:tpubDC6xFicnheK85vUNGjegu4HuJGg8nPiRk26jhW7n8GTCnb2aqizTFzyG1Jw42ZUs19nKU8V3Xi38WyVqem5ytbjFsREMWUH8QMYpzgmNdus"')]),t._v("\n "),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("}")]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v("\n "),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("{")]),t._v("\n "),a("span",{pre:!0,attrs:{class:"token property"}},[t._v('"cryptoCode"')]),a("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token string"}},[t._v('"BTC"')]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v("\n "),a("span",{pre:!0,attrs:{class:"token property"}},[t._v('"trackedSource"')]),a("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token string"}},[t._v('"DERIVATIONSCHEME:tpubDC45vUDsFAAqwYKz5hSLi5yJLNduJzpmTw6QTMRPrwdXURoyL81H8oZAaL8EiwEgg92qgMa9h1bB4Y1BZpy9CTNPfjfxvFcWxeiKBHCqSdc"')]),t._v("\n "),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("}")]),t._v("\n "),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("]")]),t._v("\n"),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("}")]),t._v("\n")])])]),a("h3",{attrs:{id:"delete-group-children"}},[a("a",{staticClass:"header-anchor",attrs:{href:"#delete-group-children"}},[t._v("#")]),t._v(" "),a("a",{attrs:{name:"delete-group-children"}}),t._v("Delete group children")]),t._v(" "),a("p",[t._v("Remove children from a group.")]),t._v(" "),a("p",[a("code",[t._v("HTTP DELETE v1/groups/{groupId}/children")])]),t._v(" "),a("p",[t._v("Request:")]),t._v(" "),a("div",{staticClass:"language-json extra-class"},[a("pre",{pre:!0,attrs:{class:"language-json"}},[a("code",[a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("[")]),t._v("\n "),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("{")]),t._v("\n "),a("span",{pre:!0,attrs:{class:"token property"}},[t._v('"trackedSource"')]),a("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token string"}},[t._v('"GROUP:Es26NSg5xTqbpRz3FY"')]),t._v("\n "),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("}")]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v("\n "),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("{")]),t._v("\n "),a("span",{pre:!0,attrs:{class:"token property"}},[t._v('"cryptoCode"')]),a("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token string"}},[t._v('"BTC"')]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v("\n "),a("span",{pre:!0,attrs:{class:"token property"}},[t._v('"trackedSource"')]),a("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token string"}},[t._v('"DERIVATIONSCHEME:tpubDC6xFicnheK85vUNGjegu4HuJGg8nPiRk26jhW7n8GTCnb2aqizTFzyG1Jw42ZUs19nKU8V3Xi38WyVqem5ytbjFsREMWUH8QMYpzgmNdus"')]),t._v("\n "),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("}")]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v("\n "),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("{")]),t._v("\n "),a("span",{pre:!0,attrs:{class:"token property"}},[t._v('"cryptoCode"')]),a("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token string"}},[t._v('"BTC"')]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v("\n "),a("span",{pre:!0,attrs:{class:"token property"}},[t._v('"trackedSource"')]),a("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token string"}},[t._v('"DERIVATIONSCHEME:tpubDC45vUDsFAAqwYKz5hSLi5yJLNduJzpmTw6QTMRPrwdXURoyL81H8oZAaL8EiwEgg92qgMa9h1bB4Y1BZpy9CTNPfjfxvFcWxeiKBHCqSdc"')]),t._v("\n "),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("}")]),t._v("\n"),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("]")]),t._v("\n")])])]),a("p",[t._v("Response:")]),t._v(" "),a("div",{staticClass:"language-json extra-class"},[a("pre",{pre:!0,attrs:{class:"language-json"}},[a("code",[a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("{")]),t._v("\n "),a("span",{pre:!0,attrs:{class:"token property"}},[t._v('"trackedSource"')]),a("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token string"}},[t._v('"GROUP:6N23bHztah546P6xQT"')]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v("\n "),a("span",{pre:!0,attrs:{class:"token property"}},[t._v('"groupId"')]),a("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token string"}},[t._v('"6N23bHztah546P6xQT"')]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v("\n "),a("span",{pre:!0,attrs:{class:"token property"}},[t._v('"children"')]),a("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("[")]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("]")]),t._v("\n"),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("}")]),t._v("\n")])])]),a("h3",{attrs:{id:"add-address-to-group"}},[a("a",{staticClass:"header-anchor",attrs:{href:"#add-address-to-group"}},[t._v("#")]),t._v(" "),a("a",{attrs:{name:"add-group-address"}}),t._v("Add address to group")]),t._v(" "),a("p",[t._v("You can add addresses manually inside the group.")]),t._v(" "),a("p",[a("code",[t._v("HTTP POST v1/cryptos/BTC/groups/{groupId}/addresses")])]),t._v(" "),a("p",[t._v("Request:")]),t._v(" "),a("div",{staticClass:"language-json extra-class"},[a("pre",{pre:!0,attrs:{class:"language-json"}},[a("code",[a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("[")]),t._v("\n "),a("span",{pre:!0,attrs:{class:"token string"}},[t._v('"n3XyBWEKWLxm5EzrrvLCJyCQrRhVWQ8YGa"')]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v("\n "),a("span",{pre:!0,attrs:{class:"token string"}},[t._v('"n4FBNYjZny7sC4pzAVaTtnGTtiwMHV5nkY"')]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v("\n "),a("span",{pre:!0,attrs:{class:"token string"}},[t._v('"mxrkNvovmmatB2vHVkNtVZ7dLLuDkPe5nr"')]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v("\n "),a("span",{pre:!0,attrs:{class:"token string"}},[t._v('"mh43vYeeJAzzSXBPaQ3D9qXzLFwWhmZEGw"')]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v("\n "),a("span",{pre:!0,attrs:{class:"token string"}},[t._v('"mkNfpqBrKyHs5wTsreLLhWAwnZPPH6seqe"')]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v("\n "),a("span",{pre:!0,attrs:{class:"token string"}},[t._v('"n4nzmHnKsByo5pgdjVDuvbXMMY7gKAcZJy"')]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v("\n "),a("span",{pre:!0,attrs:{class:"token string"}},[t._v('"mrxCU6b7RmyNXz1WJ4uJRZfdKSnwzagRov"')]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v("\n "),a("span",{pre:!0,attrs:{class:"token string"}},[t._v('"msy6dEmKav8CpDX6TR8wsLPVFUoy4HDk2t"')]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v("\n "),a("span",{pre:!0,attrs:{class:"token string"}},[t._v('"mw84oRAoojVPxHm9J514KTqpr6ozVFcWtH"')]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v("\n "),a("span",{pre:!0,attrs:{class:"token string"}},[t._v('"muNtSq7tG3gBwh2L1ZHEKQRYuNuHPm5YZC"')]),t._v("\n"),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("]")]),t._v("\n")])])]),a("p",[t._v("Response:\nHTTP 200.")])])}),[],!1,null,null,null);a.default=n.exports}}]); \ No newline at end of file diff --git a/assets/js/15.efe4767c.js b/assets/js/15.92b4e302.js similarity index 80% rename from assets/js/15.efe4767c.js rename to assets/js/15.92b4e302.js index c680d59f93..7a9bc0b12e 100644 --- a/assets/js/15.efe4767c.js +++ b/assets/js/15.92b4e302.js @@ -1 +1 @@ -(window.webpackJsonp=window.webpackJsonp||[]).push([[15],{531:function(e,t,s){e.exports=s.p+"assets/img/btcpayshopify1.ec985913.png"},532:function(e,t,s){e.exports=s.p+"assets/img/btcpayshopify2.fef21751.png"},533:function(e,t,s){e.exports=s.p+"assets/img/btcpayshopify3.14ff79a8.png"},534:function(e,t,s){e.exports=s.p+"assets/img/btcpayshopify4.4f0a10ba.png"},535:function(e,t,s){e.exports=s.p+"assets/img/btcpayshopify5.9c789888.png"},536:function(e,t,s){e.exports=s.p+"assets/img/btcpayshopify6.b3df5c96.png"},537:function(e,t,s){e.exports=s.p+"assets/img/btcpayshopify7.74cbdef7.png"},538:function(e,t,s){e.exports=s.p+"assets/img/btcpayshopify8.03fc6a31.png"},539:function(e,t,s){e.exports=s.p+"assets/img/btcpayshopify9.c5dd42ec.png"},540:function(e,t,s){e.exports=s.p+"assets/img/btcpayshopify10.d1cd1d3e.png"},541:function(e,t,s){e.exports=s.p+"assets/img/btcpayshopify11.e0bbe9e5.png"},542:function(e,t,s){e.exports=s.p+"assets/img/btcpayshopify12.1818b41d.png"},543:function(e,t,s){e.exports=s.p+"assets/img/btcpayshopify13.d0551bae.png"},544:function(e,t,s){e.exports=s.p+"assets/img/btcpayshopify14.eb96845f.png"},545:function(e,t,s){e.exports=s.p+"assets/img/btcpayshopify14-2.a9094415.png"},546:function(e,t,s){e.exports=s.p+"assets/img/btcpayshopify15.dac5277c.png"},547:function(e,t,s){e.exports=s.p+"assets/img/btcpayshopify16.dca8f695.png"},548:function(e,t,s){e.exports=s.p+"assets/img/btcpayshopify17.fa8dddec.png"},549:function(e,t,s){e.exports=s.p+"assets/img/btcpayshopify18.102dac6f.png"},837:function(e,t,s){"use strict";s.r(t);var o=s(10),i=Object(o.a)({},(function(){var e=this,t=e._self._c;return t("ContentSlotsDistributor",{attrs:{"slot-key":e.$parent.slotKey}},[t("h1",{attrs:{id:"accept-bitcoin-in-shopify-with-btcpay-server"}},[t("a",{staticClass:"header-anchor",attrs:{href:"#accept-bitcoin-in-shopify-with-btcpay-server"}},[e._v("#")]),e._v(" Accept Bitcoin in Shopify with BTCPay Server")]),e._v(" "),t("p",[e._v("Introducing BTCPay Server for Shopify – open-source payment gateway that enables you accept bitcoin payments directly on your website or stores from customers with no fee.")]),e._v(" "),t("p",[e._v("Our integration with Shopify allows you connect your self-hosted BTCPay Server with your "),t("a",{attrs:{href:"https://www.shopify.com/",target:"_blank",rel:"noopener noreferrer"}},[e._v("Shopify store"),t("OutboundLink")],1),e._v(", enabling you accept Bitcoin payments swiftly and securely.")]),e._v(" "),t("h2",{attrs:{id:"what-btcpay-offers"}},[t("a",{staticClass:"header-anchor",attrs:{href:"#what-btcpay-offers"}},[e._v("#")]),e._v(" What BTCPay offers:")]),e._v(" "),t("ul",[t("li",[t("strong",[e._v("Zero fees")]),e._v(": Enjoy a payment gateway with no fees. Yes, You saw that right. Zero fees!")]),e._v(" "),t("li",[t("strong",[e._v("Direct payment, No middlemen or KYC")]),e._v(": Say goodbye to intermediaries and tedious paperwork, and get your money directly in your wallet")]),e._v(" "),t("li",[t("strong",[e._v("Fully automated system")]),e._v(": BTCPay takes care of payments, invoice management and refunds automatically.")]),e._v(" "),t("li",[t("strong",[e._v("Display Bitcoin QR code at checkout")]),e._v(": Enhance customer experience with an easy and secure payment option.")]),e._v(" "),t("li",[t("strong",[e._v("Self-hosted infrastructure")]),e._v(": Maintain full control over your payment gateway.")]),e._v(" "),t("li",[t("strong",[e._v("Lightning Network integrated")]),e._v(": Instant, fast and low cost payments and payouts")]),e._v(" "),t("li",[t("strong",[e._v("Easy CSV exports")])]),e._v(" "),t("li",[t("strong",[e._v("Versatile plugin system")]),e._v(": Extend functionality according to your needs")]),e._v(" "),t("li",[t("strong",[e._v("Point-of-sale integration")]),e._v(" – Accept payments in your physical shops")]),e._v(" "),t("li",[t("strong",[e._v("Multilingual ready")]),e._v(": Serve a global audience right out of the box.")]),e._v(" "),t("li",[t("strong",[e._v("Community-driven support")]),e._v(": Get responsive assistance from our dedicated community ("),t("a",{attrs:{href:"http://chat.btcpayserver.org/",target:"_blank",rel:"noopener noreferrer"}},[e._v("Mattermost"),t("OutboundLink")],1),e._v(" or "),t("a",{attrs:{href:"https://t.me/btcpayserver",target:"_blank",rel:"noopener noreferrer"}},[e._v("Telegram"),t("OutboundLink")],1),e._v(").")])]),e._v(" "),t("h2",{attrs:{id:"prerequisites"}},[t("a",{staticClass:"header-anchor",attrs:{href:"#prerequisites"}},[e._v("#")]),e._v(" Prerequisites:")]),e._v(" "),t("p",[e._v("Before diving into the setup process, ensure you have the following:")]),e._v(" "),t("ul",[t("li",[e._v("Shopify account")]),e._v(" "),t("li",[e._v("BTCPay Server - "),t("RouterLink",{attrs:{to:"/Deployment/"}},[e._v("self-hosted")]),e._v(" or run by a "),t("RouterLink",{attrs:{to:"/Deployment/ThirdPartyHosting/"}},[e._v("third-party host")]),e._v(" v1.4.8 or later.")],1),e._v(" "),t("li",[t("RouterLink",{attrs:{to:"/CreateStore/"}},[e._v("Created BTCPay Server store")]),e._v(" with "),t("RouterLink",{attrs:{to:"/WalletSetup/"}},[e._v("wallet set up")])],1)]),e._v(" "),t("a",{staticClass:"ytEmbed",staticStyle:{"background-image":"url(https://img.youtube.com/vi/jJjAyvgWVfk/hqdefault.jpg)"},attrs:{href:"https://www.youtube.com/watch?v=jJjAyvgWVfk",title:"BTCPay Server - Shopify Video","data-id":"jJjAyvgWVfk"}},[t("iframe",{attrs:{title:"BTCPay Server - Shopify Video","data-src":"https://www.youtube-nocookie.com/embed/jJjAyvgWVfk?&autoplay=1&autohide=1&modestbranding=1&color=white&rel=0",frameborder:"0",allow:"autoplay;encrypted-media;picture-in-picture",allowfullscreen:""}})]),e._v(" "),t("div",{staticClass:"custom-block warning"},[t("p",{staticClass:"custom-block-title"},[e._v("WARNING")]),e._v(" "),t("p",[e._v("Shopify might give false flags on deprecated API calls. The most likely answer we could find, due to a change by Shopify to specific fields of the "),t("code",[e._v("Order")]),e._v(" resource and is assumed to get used in BTCPay Server. Find more details "),t("a",{attrs:{href:"https://github.com/btcpayserver/btcpayserver/issues/4510",target:"_blank",rel:"noopener noreferrer"}},[e._v("here"),t("OutboundLink")],1)])]),e._v(" "),t("h2",{attrs:{id:"setting-up-btcpay-server-with-shopify"}},[t("a",{staticClass:"header-anchor",attrs:{href:"#setting-up-btcpay-server-with-shopify"}},[e._v("#")]),e._v(" Setting up BTCPay Server with Shopify")]),e._v(" "),t("ol",[t("li",[e._v("In Shopify, click on "),t("code",[e._v("Apps >")]),e._v(" in the left sidebar")]),e._v(" "),t("li",[e._v("On the modal popped up, click on "),t("code",[e._v("App and sales channel settings")])]),e._v(" "),t("li",[e._v("From the page displayed, click on "),t("code",[e._v("Develop apps")]),e._v(" button")]),e._v(" "),t("li",[e._v("If prompted, click on "),t("code",[e._v("Allow custom app development")])]),e._v(" "),t("li",[t("code",[e._v("Create an app")]),e._v(" and name it, e.g. BTCPay Server")]),e._v(" "),t("li",[e._v("On the app page, in "),t("code",[e._v("Overview")]),e._v(" tab, click on the "),t("code",[e._v("Configure Admin API scopes")])]),e._v(" "),t("li",[e._v("In the filter admin access scopes type in "),t("code",[e._v("Orders")])]),e._v(" "),t("li",[e._v("In "),t("code",[e._v("Orders")]),e._v(" enable "),t("code",[e._v("read_orders")]),e._v(" and "),t("code",[e._v("write_orders")]),e._v(" and then click "),t("code",[e._v("Save")])]),e._v(" "),t("li",[e._v("Click on the "),t("code",[e._v("Install App")]),e._v(" in the top right corner and when pop-up window appears click "),t("code",[e._v("Install")])]),e._v(" "),t("li",[e._v("Reveal "),t("code",[e._v("Admin API access token")]),e._v(" and "),t("code",[e._v("copy")]),e._v(" it")]),e._v(" "),t("li",[e._v("In your BTCPay Server, go to your store and on the left sidebar click on "),t("code",[e._v("Shopify")])]),e._v(" "),t("li",[e._v("In the first field, "),t("code",[e._v("Shop name")]),e._v(" enter the subdomain of your Shopify store e.g. SOME_ID.myshopify.com then enter SOME_ID")]),e._v(" "),t("li",[e._v("In third field, "),t("code",[e._v("Admin API access token")]),e._v(" paste the "),t("code",[e._v("Admin API access token")]),e._v(" you just copied from Shopify")]),e._v(" "),t("li",[e._v("In the second field, "),t("code",[e._v("API key")]),e._v(" paste the "),t("code",[e._v("API key")]),e._v(" from Shopify - which you can find at the bottom of the same page where you copied the Admin API access token")]),e._v(" "),t("li",[e._v("Click "),t("code",[e._v("Save")]),e._v(" on BTCPay Shopify settings page")]),e._v(" "),t("li",[e._v("Back on Shopify: On left menu select "),t("code",[e._v("Checkout")]),e._v(' scroll down to "Order status page" and paste the HTML '),t("code",[e._v(" + diff --git a/sitemap.xml b/sitemap.xml index c20ccd9acc..e5535394b2 100644 --- a/sitemap.xml +++ b/sitemap.xml @@ -1 +1 @@ -https://docs.btcpayserver.org/Apps/dailyhttps://docs.btcpayserver.org/AdvancedForms/dailyhttps://docs.btcpayserver.org/BTCPayServer/Security/dailyhttps://docs.btcpayserver.org/BTCPayServer/LocalDevSetup/dailyhttps://docs.btcpayserver.org/BTCPayServer/db-migration/dailyhttps://docs.btcpayserver.org/BTCPayServer/greenfield-authorization/dailyhttps://docs.btcpayserver.org/BTCPayVsOthers/dailyhttps://docs.btcpayserver.org/BTCPayServer/greenfield-development/dailyhttps://docs.btcpayserver.org/BigCommerce/dailyhttps://docs.btcpayserver.org/Breez/dailyhttps://docs.btcpayserver.org/ColdCardWallet/dailyhttps://docs.btcpayserver.org/Bringin/dailyhttps://docs.btcpayserver.org/Community/dailyhttps://docs.btcpayserver.org/Conference-PoS-guide/dailyhttps://docs.btcpayserver.org/Configurator/dailyhttps://docs.btcpayserver.org/ConnectWallet/dailyhttps://docs.btcpayserver.org/Contribute/Design/dailyhttps://docs.btcpayserver.org/Contribute/Dev/dailyhttps://docs.btcpayserver.org/Contribute/DevCode/dailyhttps://docs.btcpayserver.org/Contribute/Misc/dailyhttps://docs.btcpayserver.org/Contribute/DevTest/dailyhttps://docs.btcpayserver.org/Contribute/dailyhttps://docs.btcpayserver.org/Contribute/Write/dailyhttps://docs.btcpayserver.org/Contribute/Translate/dailyhttps://docs.btcpayserver.org/Contribute/WriteBlog/dailyhttps://docs.btcpayserver.org/Contribute/WriteDocs/dailyhttps://docs.btcpayserver.org/Contribute/WriteSoftware/dailyhttps://docs.btcpayserver.org/CreateStore/dailyhttps://docs.btcpayserver.org/CreateWallet/dailyhttps://docs.btcpayserver.org/CustomIntegration/dailyhttps://docs.btcpayserver.org/Deployment/AzurePennyPinching/dailyhttps://docs.btcpayserver.org/Dashboard/dailyhttps://docs.btcpayserver.org/Deployment/Azure/dailyhttps://docs.btcpayserver.org/Deployment/Clovyr/dailyhttps://docs.btcpayserver.org/Deployment/DynamicDNS/dailyhttps://docs.btcpayserver.org/Deployment/GoogleCloud/dailyhttps://docs.btcpayserver.org/Deployment/Hack0/dailyhttps://docs.btcpayserver.org/Deployment/Hardware/dailyhttps://docs.btcpayserver.org/Deployment/HardwareAsAService/dailyhttps://docs.btcpayserver.org/Deployment/LightningInABox/dailyhttps://docs.btcpayserver.org/Deployment/LunaNode/dailyhttps://docs.btcpayserver.org/Deployment/ManualDeployment/dailyhttps://docs.btcpayserver.org/Deployment/ManualDeploymentExtended/dailyhttps://docs.btcpayserver.org/Deployment/dailyhttps://docs.btcpayserver.org/Deployment/ReverseProxyToTor/dailyhttps://docs.btcpayserver.org/Deployment/RaspberryPi4/dailyhttps://docs.btcpayserver.org/Deployment/ReverseSSHtunnel/dailyhttps://docs.btcpayserver.org/Deployment/ThirdPartyHosting/dailyhttps://docs.btcpayserver.org/Deployment/voltagecloud/dailyhttps://docs.btcpayserver.org/Deployment/webdeployment/dailyhttps://docs.btcpayserver.org/Development/Altcoins/dailyhttps://docs.btcpayserver.org/Development/GreenFieldExample/dailyhttps://docs.btcpayserver.org/Development/GreenFieldExample-NodeJS/dailyhttps://docs.btcpayserver.org/Development/InvoiceMetadata/dailyhttps://docs.btcpayserver.org/Development/LocalDev/dailyhttps://docs.btcpayserver.org/Development/GreenfieldExample-PHP/dailyhttps://docs.btcpayserver.org/Development/LocalDevelopment/dailyhttps://docs.btcpayserver.org/Development/Plugins/dailyhttps://docs.btcpayserver.org/Development/TestnetDemo/dailyhttps://docs.btcpayserver.org/Development/dailyhttps://docs.btcpayserver.org/Development/Theme/dailyhttps://docs.btcpayserver.org/Development/ecommerce-integration-guide/dailyhttps://docs.btcpayserver.org/Docker/dailyhttps://docs.btcpayserver.org/Docker/backup-restore/dailyhttps://docs.btcpayserver.org/Docker/chatwoot/dailyhttps://docs.btcpayserver.org/Docker/cloudflare-tunnel/dailyhttps://docs.btcpayserver.org/Docker/fastsync/dailyhttps://docs.btcpayserver.org/Docker/fireflyiii/dailyhttps://docs.btcpayserver.org/Docker/joinmarket/dailyhttps://docs.btcpayserver.org/Docker/lightning-terminal/dailyhttps://docs.btcpayserver.org/Docker/ndlc/dailyhttps://docs.btcpayserver.org/Docker/pihole/dailyhttps://docs.btcpayserver.org/Docker/tallycoin-connect/dailyhttps://docs.btcpayserver.org/Drupal/dailyhttps://docs.btcpayserver.org/DynamicReports/dailyhttps://docs.btcpayserver.org/ElectrumPersonalServer/dailyhttps://docs.btcpayserver.org/FAQ/Altcoin/dailyhttps://docs.btcpayserver.org/ElectrumWallet/dailyhttps://docs.btcpayserver.org/ElectrumX/dailyhttps://docs.btcpayserver.org/FAQ/Deployment/dailyhttps://docs.btcpayserver.org/FAQ/Apps/dailyhttps://docs.btcpayserver.org/FAQ/General/dailyhttps://docs.btcpayserver.org/FAQ/Integrations/dailyhttps://docs.btcpayserver.org/FAQ/LightningNetwork/dailyhttps://docs.btcpayserver.org/FAQ/dailyhttps://docs.btcpayserver.org/FAQ/ServerSettings/dailyhttps://docs.btcpayserver.org/FAQ/Stores/dailyhttps://docs.btcpayserver.org/FAQ/Synchronization/dailyhttps://docs.btcpayserver.org/FAQ/Wallet/dailyhttps://docs.btcpayserver.org/Grandnode/dailyhttps://docs.btcpayserver.org/Guide/dailyhttps://docs.btcpayserver.org/Forms/dailyhttps://docs.btcpayserver.org/InvoiceNinja/dailyhttps://docs.btcpayserver.org/HardwareWalletIntegration/dailyhttps://docs.btcpayserver.org/Invoices/dailyhttps://docs.btcpayserver.org/LightningNetwork/dailyhttps://docs.btcpayserver.org/LedgerWallet/dailyhttps://docs.btcpayserver.org/LightningNetwork_PaymentChannels/dailyhttps://docs.btcpayserver.org/Magento/dailyhttps://docs.btcpayserver.org/NBXplorer/API/dailyhttps://docs.btcpayserver.org/NBXplorer/Postgres-Migration/dailyhttps://docs.btcpayserver.org/NBXplorer/dailyhttps://docs.btcpayserver.org/NBXplorer/Postgres-Schema/dailyhttps://docs.btcpayserver.org/Nopcommerce/dailyhttps://docs.btcpayserver.org/Nostr/dailyhttps://docs.btcpayserver.org/Notifications/dailyhttps://docs.btcpayserver.org/PaymentRequests/dailyhttps://docs.btcpayserver.org/Odoo/dailyhttps://docs.btcpayserver.org/Payroll/dailyhttps://docs.btcpayserver.org/Payouts/dailyhttps://docs.btcpayserver.org/PrestaShop/dailyhttps://docs.btcpayserver.org/PullPayments/dailyhttps://docs.btcpayserver.org/Refund/dailyhttps://docs.btcpayserver.org/dailyhttps://docs.btcpayserver.org/Payjoin/dailyhttps://docs.btcpayserver.org/RegisterAccount/dailyhttps://docs.btcpayserver.org/Reporting/dailyhttps://docs.btcpayserver.org/Shopify/dailyhttps://docs.btcpayserver.org/Shopware/dailyhttps://docs.btcpayserver.org/SideShift/dailyhttps://docs.btcpayserver.org/Sign-PSBT-with-sparrow-wallet/dailyhttps://docs.btcpayserver.org/Support/dailyhttps://docs.btcpayserver.org/Smartstore/dailyhttps://docs.btcpayserver.org/TicketTailor/dailyhttps://docs.btcpayserver.org/Translations/dailyhttps://docs.btcpayserver.org/Transmuter/DCA/dailyhttps://docs.btcpayserver.org/Transmuter/EmailReceiptsPreset/dailyhttps://docs.btcpayserver.org/Transmuter/dailyhttps://docs.btcpayserver.org/Trocador/dailyhttps://docs.btcpayserver.org/UseCase/dailyhttps://docs.btcpayserver.org/Troubleshooting/dailyhttps://docs.btcpayserver.org/TryItOut/dailyhttps://docs.btcpayserver.org/VirtueMart/dailyhttps://docs.btcpayserver.org/Vault/HowToVerify/dailyhttps://docs.btcpayserver.org/Vault/dailyhttps://docs.btcpayserver.org/Wallet/dailyhttps://docs.btcpayserver.org/Wabisabi/dailyhttps://docs.btcpayserver.org/Walkthrough/dailyhttps://docs.btcpayserver.org/WalletSetup/dailyhttps://docs.btcpayserver.org/WhatsNext/dailyhttps://docs.btcpayserver.org/Wix/dailyhttps://docs.btcpayserver.org/WasabiWallet/dailyhttps://docs.btcpayserver.org/WooCommerce/dailyhttps://docs.btcpayserver.org/Xenforo/dailyhttps://docs.btcpayserver.org/Zapier/dailyhttps://docs.btcpayserver.org/OpenCart/daily \ No newline at end of file +https://docs.btcpayserver.org/Apps/dailyhttps://docs.btcpayserver.org/AdvancedForms/dailyhttps://docs.btcpayserver.org/BTCPayServer/LocalDevSetup/dailyhttps://docs.btcpayserver.org/BTCPayServer/Security/dailyhttps://docs.btcpayserver.org/BTCPayServer/db-migration/dailyhttps://docs.btcpayserver.org/BTCPayServer/greenfield-authorization/dailyhttps://docs.btcpayserver.org/BTCPayServer/greenfield-development/dailyhttps://docs.btcpayserver.org/BTCPayVsOthers/dailyhttps://docs.btcpayserver.org/BigCommerce/dailyhttps://docs.btcpayserver.org/Breez/dailyhttps://docs.btcpayserver.org/Bringin/dailyhttps://docs.btcpayserver.org/ColdCardWallet/dailyhttps://docs.btcpayserver.org/Community/dailyhttps://docs.btcpayserver.org/Conference-PoS-guide/dailyhttps://docs.btcpayserver.org/Configurator/dailyhttps://docs.btcpayserver.org/Contribute/Design/dailyhttps://docs.btcpayserver.org/ConnectWallet/dailyhttps://docs.btcpayserver.org/Contribute/Dev/dailyhttps://docs.btcpayserver.org/Contribute/DevTest/dailyhttps://docs.btcpayserver.org/Contribute/DevCode/dailyhttps://docs.btcpayserver.org/Contribute/Misc/dailyhttps://docs.btcpayserver.org/Contribute/dailyhttps://docs.btcpayserver.org/Contribute/Translate/dailyhttps://docs.btcpayserver.org/Contribute/Write/dailyhttps://docs.btcpayserver.org/Contribute/WriteBlog/dailyhttps://docs.btcpayserver.org/Contribute/WriteDocs/dailyhttps://docs.btcpayserver.org/Contribute/WriteSoftware/dailyhttps://docs.btcpayserver.org/CreateStore/dailyhttps://docs.btcpayserver.org/CreateWallet/dailyhttps://docs.btcpayserver.org/CustomIntegration/dailyhttps://docs.btcpayserver.org/Dashboard/dailyhttps://docs.btcpayserver.org/Deployment/Azure/dailyhttps://docs.btcpayserver.org/Deployment/AzurePennyPinching/dailyhttps://docs.btcpayserver.org/Deployment/Clovyr/dailyhttps://docs.btcpayserver.org/Deployment/DynamicDNS/dailyhttps://docs.btcpayserver.org/Deployment/GoogleCloud/dailyhttps://docs.btcpayserver.org/Deployment/Hack0/dailyhttps://docs.btcpayserver.org/Deployment/Hardware/dailyhttps://docs.btcpayserver.org/Deployment/LightningInABox/dailyhttps://docs.btcpayserver.org/Deployment/HardwareAsAService/dailyhttps://docs.btcpayserver.org/Deployment/LunaNode/dailyhttps://docs.btcpayserver.org/Deployment/ManualDeployment/dailyhttps://docs.btcpayserver.org/Deployment/ManualDeploymentExtended/dailyhttps://docs.btcpayserver.org/Deployment/dailyhttps://docs.btcpayserver.org/Deployment/RaspberryPi4/dailyhttps://docs.btcpayserver.org/Deployment/ReverseProxyToTor/dailyhttps://docs.btcpayserver.org/Deployment/ReverseSSHtunnel/dailyhttps://docs.btcpayserver.org/Deployment/ThirdPartyHosting/dailyhttps://docs.btcpayserver.org/Deployment/voltagecloud/dailyhttps://docs.btcpayserver.org/Deployment/webdeployment/dailyhttps://docs.btcpayserver.org/Development/GreenFieldExample-NodeJS/dailyhttps://docs.btcpayserver.org/Development/Altcoins/dailyhttps://docs.btcpayserver.org/Development/GreenFieldExample/dailyhttps://docs.btcpayserver.org/Development/GreenfieldExample-PHP/dailyhttps://docs.btcpayserver.org/Development/InvoiceMetadata/dailyhttps://docs.btcpayserver.org/Development/LocalDev/dailyhttps://docs.btcpayserver.org/Development/Plugins/dailyhttps://docs.btcpayserver.org/Development/LocalDevelopment/dailyhttps://docs.btcpayserver.org/Development/dailyhttps://docs.btcpayserver.org/Development/TestnetDemo/dailyhttps://docs.btcpayserver.org/Development/ecommerce-integration-guide/dailyhttps://docs.btcpayserver.org/Development/Theme/dailyhttps://docs.btcpayserver.org/Docker/dailyhttps://docs.btcpayserver.org/Docker/backup-restore/dailyhttps://docs.btcpayserver.org/Docker/cloudflare-tunnel/dailyhttps://docs.btcpayserver.org/Docker/chatwoot/dailyhttps://docs.btcpayserver.org/Docker/fastsync/dailyhttps://docs.btcpayserver.org/Docker/fireflyiii/dailyhttps://docs.btcpayserver.org/Docker/lightning-terminal/dailyhttps://docs.btcpayserver.org/Docker/ndlc/dailyhttps://docs.btcpayserver.org/Docker/joinmarket/dailyhttps://docs.btcpayserver.org/Drupal/dailyhttps://docs.btcpayserver.org/Docker/tallycoin-connect/dailyhttps://docs.btcpayserver.org/Docker/pihole/dailyhttps://docs.btcpayserver.org/DynamicReports/dailyhttps://docs.btcpayserver.org/ElectrumWallet/dailyhttps://docs.btcpayserver.org/ElectrumPersonalServer/dailyhttps://docs.btcpayserver.org/ElectrumX/dailyhttps://docs.btcpayserver.org/FAQ/Altcoin/dailyhttps://docs.btcpayserver.org/FAQ/Apps/dailyhttps://docs.btcpayserver.org/FAQ/Deployment/dailyhttps://docs.btcpayserver.org/FAQ/General/dailyhttps://docs.btcpayserver.org/FAQ/Integrations/dailyhttps://docs.btcpayserver.org/FAQ/LightningNetwork/dailyhttps://docs.btcpayserver.org/FAQ/dailyhttps://docs.btcpayserver.org/FAQ/ServerSettings/dailyhttps://docs.btcpayserver.org/FAQ/Stores/dailyhttps://docs.btcpayserver.org/FAQ/Synchronization/dailyhttps://docs.btcpayserver.org/FAQ/Wallet/dailyhttps://docs.btcpayserver.org/Forms/dailyhttps://docs.btcpayserver.org/Grandnode/dailyhttps://docs.btcpayserver.org/InvoiceNinja/dailyhttps://docs.btcpayserver.org/HardwareWalletIntegration/dailyhttps://docs.btcpayserver.org/Guide/dailyhttps://docs.btcpayserver.org/Invoices/dailyhttps://docs.btcpayserver.org/LedgerWallet/dailyhttps://docs.btcpayserver.org/LightningNetwork_PaymentChannels/dailyhttps://docs.btcpayserver.org/LightningNetwork/dailyhttps://docs.btcpayserver.org/NBXplorer/API/dailyhttps://docs.btcpayserver.org/Magento/dailyhttps://docs.btcpayserver.org/NBXplorer/Postgres-Schema/dailyhttps://docs.btcpayserver.org/NBXplorer/Postgres-Migration/dailyhttps://docs.btcpayserver.org/NBXplorer/dailyhttps://docs.btcpayserver.org/Nopcommerce/dailyhttps://docs.btcpayserver.org/Nostr/dailyhttps://docs.btcpayserver.org/Notifications/dailyhttps://docs.btcpayserver.org/OpenCart/dailyhttps://docs.btcpayserver.org/Odoo/dailyhttps://docs.btcpayserver.org/Payroll/dailyhttps://docs.btcpayserver.org/PaymentRequests/dailyhttps://docs.btcpayserver.org/PrestaShop/dailyhttps://docs.btcpayserver.org/Payouts/dailyhttps://docs.btcpayserver.org/dailyhttps://docs.btcpayserver.org/Refund/dailyhttps://docs.btcpayserver.org/PullPayments/dailyhttps://docs.btcpayserver.org/RegisterAccount/dailyhttps://docs.btcpayserver.org/Reporting/dailyhttps://docs.btcpayserver.org/Shopify/dailyhttps://docs.btcpayserver.org/SideShift/dailyhttps://docs.btcpayserver.org/Shopware/dailyhttps://docs.btcpayserver.org/Sign-PSBT-with-sparrow-wallet/dailyhttps://docs.btcpayserver.org/Smartstore/dailyhttps://docs.btcpayserver.org/Support/dailyhttps://docs.btcpayserver.org/Translations/dailyhttps://docs.btcpayserver.org/TicketTailor/dailyhttps://docs.btcpayserver.org/Transmuter/DCA/dailyhttps://docs.btcpayserver.org/Transmuter/EmailReceiptsPreset/dailyhttps://docs.btcpayserver.org/Transmuter/dailyhttps://docs.btcpayserver.org/Troubleshooting/dailyhttps://docs.btcpayserver.org/Trocador/dailyhttps://docs.btcpayserver.org/TryItOut/dailyhttps://docs.btcpayserver.org/UseCase/dailyhttps://docs.btcpayserver.org/Vault/HowToVerify/dailyhttps://docs.btcpayserver.org/Vault/dailyhttps://docs.btcpayserver.org/VirtueMart/dailyhttps://docs.btcpayserver.org/Walkthrough/dailyhttps://docs.btcpayserver.org/Wabisabi/dailyhttps://docs.btcpayserver.org/Wallet/dailyhttps://docs.btcpayserver.org/WalletSetup/dailyhttps://docs.btcpayserver.org/WasabiWallet/dailyhttps://docs.btcpayserver.org/WhatsNext/dailyhttps://docs.btcpayserver.org/Wix/dailyhttps://docs.btcpayserver.org/WooCommerce/dailyhttps://docs.btcpayserver.org/Xenforo/dailyhttps://docs.btcpayserver.org/Zapier/dailyhttps://docs.btcpayserver.org/Payjoin/daily \ No newline at end of file