Compare commits

...

897 Commits

Author SHA1 Message Date
858da35539 Bump NBitcoin 2021-10-12 15:43:17 +09:00
ed52a1012a bump nbx 2021-10-06 19:26:33 +09:00
8ee0a97e9c Replace pruning wallet by wipe transactions 2021-10-06 19:19:01 +09:00
02195ed096 bump 2021-09-26 14:32:16 +09:00
562b96cf1f Update Changelog 2021-09-26 14:22:08 +09:00
f44b54bc59 Sanitize UrlRoot in PayButton 2021-09-26 14:06:52 +09:00
1889dec567 Fix pay button CSP issue when using modal ()
* Fix pay button CSP issue when using modal

Fixes .

* Use event handler, refactor csp tags

* Fix script indentation

* Fix onsubmit event handler integration

Co-authored-by: nicolas.dorier <nicolas.dorier@gmail.com>
2021-09-26 14:06:49 +09:00
aa953ad6a6 bump redoc 2021-09-26 14:05:48 +09:00
6a7d434c89 Make CSP more specific for docs 2021-09-26 14:05:48 +09:00
cc812f96c9 Reset "all stores" values to default 2021-09-26 14:03:02 +09:00
6a4cb0e95c Don't adjust store mode if user is performing an action 2021-09-26 14:02:48 +09:00
4c7149de95 Adjust view 2021-09-26 14:02:36 +09:00
532e847cdd [WIP] Fix issues with Authorization Request page
closes 
2021-09-26 14:02:17 +09:00
3e3d4aea03 Fix documentation page broken by CSP 2021-09-26 14:01:54 +09:00
55bfecd4ed Attempt cover scenarios of switching back to Bitcoin only after taint () 2021-09-26 14:01:12 +09:00
2e4d1f6d37 Should not be able to activate a payment method on an invoice which is not new 2021-09-26 14:01:01 +09:00
a3338b6f80 Fix infinite loop happening if payment method unavailable with on invoices with lazy activation () 2021-09-26 14:00:45 +09:00
ade11faf94 Fix build 2021-09-10 00:08:38 +09:00
401fbb6d9c Update Changelog 2021-09-09 23:55:20 +09:00
e34f001bf8 Fix Summernote XSS possibility () 2021-09-09 23:53:52 +09:00
7384cbd42d The page could crash if the user clicks too many time on Notificate 'Mark as Seen' 2021-09-09 23:53:26 +09:00
13e6675a23 Fix CSP when there is a theme 2021-09-09 23:22:49 +09:00
cbabff755f bump 2021-09-09 22:13:01 +09:00
cda46250fb update HWI lib 2021-09-09 22:11:42 +09:00
929b51f814 Changelog 2021-09-09 22:11:21 +09:00
c460d9e5c6 Do not generate payment methods when 0 amount invoice ()
* Do not generate payment methods when 0 amount invoice

* Add test for 0 amoutn invoices
2021-09-09 21:59:53 +09:00
13a4130fde fix broken plugin page 2021-09-09 21:59:36 +09:00
747e14ca74 Fix for crowdfund perk editor
With no title entered, the editor got stuck in an endless loop, because it recursively invoked the save function without checking for the ID fallback being present.

Fixes .
2021-09-09 21:59:28 +09:00
50b297b048 Add CSP at the website level () 2021-09-09 21:59:14 +09:00
d9a8443081 lang update 2021-08-31 16:02:26 +09:00
918d3b46f0 The checkout would crash for some client if automatic detection of language was checked, and the browser was not setting the accepted language 2021-08-31 16:01:16 +09:00
f53597845e bump btcpayserver 2021-08-31 15:54:38 +09:00
e65a3efc3c Add payjoin fix to changelog 2021-08-31 15:38:14 +09:00
d74fcad9f4 update changelog 2021-08-31 15:36:01 +09:00
19b88fd986 Fix: Impossible to send to two more than two destination (Fix ) 2021-08-31 15:23:56 +09:00
12105ab85c Fix rounding error for the first refund option () ()
* Fix rounding error for the first refund option ()

* Fix rounding issue
2021-08-31 15:08:33 +09:00
723817e3f8 Fix payment request cloning and unexpire if necessary ()
* Unexpire payment requests without expiry date

* Unset expiry date when cloning payment request

* Syntax and code improvements
2021-08-31 15:07:54 +09:00
101fc51787 Bump NBX () 2021-08-30 16:42:22 +09:00
58a5f88943 Hide due amount on invoice if it's zero ()
address 
2021-08-27 16:02:20 +09:00
2e35d0e178 Fix coldcard wallet export path () 2021-08-27 16:00:57 +09:00
319efbeb4b Bump c-lightning on docker-compose altcoins 2021-08-26 15:55:07 +09:00
04e6833e22 Bump c-lightning on docker-compose altcoins 2021-08-26 14:44:57 +09:00
748c882ba1 Bump libraries 2021-08-26 14:34:20 +09:00
ab7d2959ea Update clightning 2021-08-23 13:09:29 +02:00
56d3485d49 Removed the tagline character limit in the crowdfunding app 2021-08-23 13:08:55 +02:00
119ab7b2c0 attempt EnsureNewLightningInvoiceOnPartialPayment test fix 2021-08-23 12:34:36 +02:00
d1ea4e4fa4 Fix bug with top-up invoices when used with "Only enable the payment method after user explicitly chooses it" enabled ()
* Fix bug with top-up invoices when used with "Only enable the payment method after user explicitly chooses it" enabled

* Remove unused "using" directives

* Add "#nullable enable" directive

* check for top-up invoice in LightningLikePaymentHandler
2021-08-23 15:13:26 +09:00
de5ab80038 Fix typo 2021-08-15 08:26:02 +02:00
2d23f3e5d4 bump 2021-08-13 15:51:46 +09:00
77d1580ee3 Fix Display app on website root feature 2021-08-13 15:50:26 +09:00
a20906bc12 Fix paybutton like when no amount set 2021-08-12 10:04:23 +09:00
ffbf70d72b Bump BTCPayServer.Lightning nuget 2021-08-10 10:11:16 +02:00
caa3ff616c Add fix to changelog 2021-08-10 10:11:16 +02:00
7a102ee920 Bumpo Clightning to 0.10.1 2021-08-10 10:11:16 +02:00
8451f34302 Revert "Bumpo Clightning to 0.10.1"
This reverts commit e4bd8e310624aee71a84bf7210da79d57d857625.
2021-08-10 09:31:14 +02:00
e4bd8e3106 Bumpo Clightning to 0.10.1 2021-08-10 09:16:25 +02:00
bc4945c584 Fix hotwallet migration 2 2021-08-10 12:13:00 +09:00
fa96deb1de Fix hotwallet migration 2021-08-10 12:07:13 +09:00
a27217dc62 bump 2021-08-09 23:55:31 +09:00
2dfb637e2f Enhance files actions to accept arrays of fileids ()
* Enhanced Files action by modifying it to accept a list of SelectedFileIds

* Added checks to verify all files passed to the files action exist, Updated tests

* Enhanced Files action to accept an array of fileIds

* Removed redundant fileId list
2021-08-09 23:40:55 +09:00
9387c2c771 1.2.0 Changelog ()
Co-authored-by: d11n <mail@dennisreimann.de>
Co-authored-by: Nicolas Dorier <nicolas.dorier@gmail.com>
Co-authored-by: Pavlenex <pavlenex@btcpayserver.org>
2021-08-09 15:54:03 +02:00
e7e8ed55c2 Remove support for payout to a Bitcoin Url () 2021-08-09 22:43:38 +09:00
cf067ca51b Update successful refund message () 2021-08-09 20:57:29 +09:00
1b7517c05c Add example for orderId query string param in /api/v1/stores/{storeId}/invoices () 2021-08-09 20:33:56 +09:00
103b3b916b Show new store warning icon only if neither on-chain wallet nor LN is configured ()
close 
2021-08-09 20:32:43 +09:00
fa91174b1a Fix finnish 2021-08-09 16:59:52 +09:00
10e3595a82 Fix bulgarian 2021-08-09 16:40:42 +09:00
965beebc66 Fix kazath 2021-08-09 16:37:55 +09:00
83ab1a3b7c Use ulong for configKey of LND rather than uint 2021-08-07 21:52:49 +09:00
7ac83575d4 Update langs 2021-08-05 20:19:51 +09:00
831f73d715 Fix: Swagger Onchain fee rate endpoint mislabeled 2021-08-05 09:28:19 +02:00
245b4ebe63 Remove missing js file from bundles 2021-08-05 07:59:56 +02:00
060f30d0bf Payouts: Unify confirm external payment and manually mark as paid actions () 2021-08-05 14:47:25 +09:00
f84b2c5160 Add proper error message if node/nbxplorer doesn't support taproot () 2021-08-05 13:56:31 +09:00
4e56ef636b Make system plugins shown as system plugins
fixes 
2021-08-04 16:50:25 +02:00
59d0cf666f Update Clightning to altcoin compose too 2021-08-04 16:12:39 +02:00
54cc574405 Update to Clightning 0.10.0 2021-08-04 15:02:24 +02:00
97d16523b5 Wallet send UI improvements ()
* Remove autocompletion for output fields

* Use consistent wording for available balance

* Set min value and hide number spins for amount inputs

* Move add destination button to destination input field

* Fix fiat amount display for multiple destinations case

* Improve display of multiple destinations

* Fix formatting
2021-08-04 20:58:46 +09:00
80086d76a8 Improve Payment Request view ()
* Improve Payment Request view

Closes .

* Fix payment request invoice listing condition
2021-08-04 16:13:33 +09:00
5bf1161884 PoS UI fixes ()
Fixes  
2021-08-04 13:24:25 +09:00
f49954223a Merge pull request from dennisreimann/wallet-import-wording
Improve wallet import wording
2021-08-03 14:23:57 +02:00
98d9efc8d6 Merge pull request from dennisreimann/api-keys-text
Add a period in API Keys description
2021-08-03 14:22:38 +02:00
59f338a0b7 Improve wallet import wording
Closes .
2021-08-03 14:22:26 +02:00
e1eac5c390 Add a period in API Keys description
Fixes 
2021-08-03 14:10:48 +02:00
4c818d0359 Implement topup invoices () 2021-08-03 17:03:00 +09:00
63d4ccc058 Fix missing master fingerprint/account key path on wallet import ()
* Fix missing master fingerprint/account key path on wallet import

Re-adds the view model properties that got removed in 8a1d5bbc57176377a3e76fe3f55f6942bc3fe457 and passes them through the confirm addresses form.

* Add test

This test fails on current master
2021-08-03 14:27:04 +09:00
1b85ab8b54 Improve UI of immature balance, show available balance in wallet list () 2021-08-01 22:13:12 +09:00
906c7eb7ec Show Immature Balance in walletsend page ()
* Wallet Send page also shows immature balance

* changes ans to and

* Immature Balance msg is not tooltip

* Make msg more clear
2021-08-01 21:12:00 +09:00
2207d836f1 Update NBXplorer again 2021-08-01 14:32:04 +09:00
a9cd27e012 Bumping LND to 0.13.1-beta () 2021-08-01 09:20:40 +09:00
eb24cf5f84 Merge pull request from dennisreimann/bg-image
Add white background to Baillie Gifford logo
2021-07-30 19:56:46 +02:00
fae396dc0d Add white background to supporter logo
Addresses . This SVG is also used in the docs.
2021-07-30 19:43:31 +02:00
c70393c7ef Add BG to supporters readme and login page ()
* add Baillie Gifford supporter in readme and login page

* re-format img
2021-07-30 17:48:07 +02:00
a9da79cc58 Use PaymentUrlBuilder for ensuring proper formatting of BIP21 addresses () 2021-07-30 18:47:02 +09:00
4c57405945 Properly clip taxIncluded and invoice's amount () 2021-07-30 18:46:49 +09:00
ad8f347989 Refactoring: Allow ViewsRazor extension to be used by plugins
Moves the `ViewsRazor` extension into Abstractions, so that it can be used by plugins.

Separated out of , prerequisite for the LNbank plugin integration.
2021-07-30 08:27:33 +02:00
68595be323 Improved the names of the Invoice webhooks to reflect the event type in code + better descriptions ()
* Improved the names of the Invoice webhooks to reflect the event type in code + better descriptions

* Gave proper name and better description.

* Update BTCPayServer/wwwroot/swagger/v1/swagger.template.webhooks.json

Co-authored-by: Andrew Camilleri <evilkukka@gmail.com>

Co-authored-by: Andrew Camilleri <evilkukka@gmail.com>
2021-07-30 14:33:23 +09:00
69b855a1e7 Improves create crowdfund view ()
* adds sizings

* adds section headers

* adds section headers and re-ordering

* more re-ordering

* redorder change

* adds switches

* reorders checkmark

* removes spacer + updates header

* adds sizings

* adds section headers

* adds section headers and re-ordering

* more re-ordering

* redorder change

* adds switches

* reorders checkmark

* removes spacer + updates header

* Upgrade flatpickr and adapt styles

* Improve display names

* Toggle and collapse additional options

* Add missing link attributes

* adds switch + title for enabling public crowdfund

* Add helper text for public crowdfund option

Co-authored-by: Dennis Reimann <mail@dennisreimann.de>
2021-07-30 14:31:44 +09:00
6ea96efe68 Update NBitcoin, fix warnings on nullable () 2021-07-29 20:29:34 +09:00
499a231432 Fix: Payment Request status does not update on invoice marked events or when pr amount is changed ()
fixes 
2021-07-28 22:38:26 +09:00
0054fe0886 Refactor copy to clipboard
Separated out of , prerequisite for the LNbank plugin integration.
2021-07-28 08:44:32 +02:00
c59798e9c4 GreenField: Generate Store OnChain Wallet ()
* GreenField: Generate Store OnChain Wallet

* Greenfield: Do not generate wallet if already configured
2021-07-27 23:53:44 +09:00
80483ba76f Start with camera off 2021-07-27 15:31:12 +02:00
5c792c9e09 Make QR Scanner able to switch between sources 2021-07-27 15:31:12 +02:00
fdae221ca5 Allow QR code multiple display modes 2021-07-27 15:31:12 +02:00
ba165ddd4f Local Greenfield Client for Plugins ()
* wip

* Local GreenField Client for Plugins

* support notification handlers being missing

* Initial support for scoped btcpay client

* test out scoped local client

* wip

* small fix

* Throw exception if using local greenfield client and it has not been implemented yet

* adapt based on new changes in BTCPay

* update

* fix tests

* Allow Local client to bypass authorization handler

* Add Misc endpoints to Local API Client

* Add new endpoints

* Apply code review changes
2021-07-27 21:11:47 +09:00
14e4d2d675 Make CSSThemeManager really only focus on theme ()
* Make Settings Repository cache in memory

* Make use of SettingsRepo directly instead of CssThemeManager

* Completely remove CssThemeManager
2021-07-27 21:08:54 +09:00
d505771d96 Make CanUseInternalLightningNode a sub policy of CanModifyServerSettings ()
SInce CanModifyServerSettings can trivially modify any policy around lightning node sharing, it should automatically have access to the lightning node usage perm
2021-07-27 19:23:20 +09:00
d8c1c51a21 Auto-detect language on payment page ()
* Auto-detect language on payment page

based on the requst Accept-Language header, which is the language you configured in your browser/OS and this 99.99% accurate

* Update BTCPayServer/Services/LanguageService.cs

Co-authored-by: britttttk <39231115+britttttk@users.noreply.github.com>

* Update BTCPayServer/Services/LanguageService.cs

Co-authored-by: Andrew Camilleri <evilkukka@gmail.com>

* Update BTCPayServer/Services/LanguageService.cs

Co-authored-by: Andrew Camilleri <evilkukka@gmail.com>

* Update BTCPayServer/Services/LanguageService.cs

Co-authored-by: Andrew Camilleri <evilkukka@gmail.com>

* Added loop for all locales in Accept-Language sorted by weight + check if know this language

* New public method so a unit test can be created for it

* Unit test for language detection

* Fix language service when not in browser context

* fall back to default lang

* Auto-detect setting + ?lang=auto support

* Added invoice param "?lang=auto" info to docs

* Using null-coalescing assignment operator

* Reduce complexity and http dependency in language service

Co-authored-by: britttttk <39231115+britttttk@users.noreply.github.com>
Co-authored-by: Andrew Camilleri <evilkukka@gmail.com>
2021-07-27 08:17:56 +02:00
71cbe716f9 fix sync modal styling 2021-07-26 16:44:41 +02:00
f4df850d25 Greenfield: Rename enabledOnly to enabled?
Allows the filter to work in both directions instead
2021-07-26 12:03:11 +02:00
4d538c61b1 Refactor Get Store Payment Methods
Add tests + docs + new pluggbale format for fetching payment method data + client
2021-07-26 12:03:11 +02:00
17e6179fec Add "stores/{storeId}/payment-methods" endpoint
address 
2021-07-26 12:03:11 +02:00
b7b2f16925 Improves create point of sale view ()
* re-ordering

* adds section header

* updates label on "products"

* changes button to primary

* moves description

* updates partial

* re-ordering + section headers

* more section heads and ordering

* redorders

* Toggle custom amount and tips settings

* Use display name for point of sale app type

* Use switches for enabling options

* Add space before required indicator

* Set and consolidate view model display names

* Move redirects and custom CSS to additional options

* Revert to checkbox for discounts

* adds padding

* removes bs-parent for multiple open elements on accordion

* adds helper text to discount checkbox

* updates "default view" label text

* wording cleanup

* more wording adjustments

* updates

* Add display names for app types

* Extract template editor inline styles

* updates helper text

* Display names for app types

* Typo fix

* Move template back to editor

* Fix selenium test

Co-authored-by: Dennis Reimann <mail@dennisreimann.de>
2021-07-23 12:57:19 +02:00
a7f6bcf36c Updated status message when adding files and related test 2021-07-22 08:49:21 +02:00
590ca4ef56 add support for uploading multiple files to server 2021-07-22 08:49:21 +02:00
04726b3ee4 Payouts: Detect External OnChain Payouts ()
* Refactor and decouple Payout logic

So that we can support lightning + external payout payments

Fixes & refactoring

almost there

final

Remove uneeded payment method checks

Refactor payouts to handle custom payment method specific actions

External onchain payments to approved payouts will now require "confirmation" from the merchant that it was sent by them.

add pill tabs for payout status

* Improve some UX around feature

* add test and some fixes

* Only listen to address tracked source and determine based on wallet get tx call from nbx

* Simplify isInternal for Payout detection

* fix test

* Fix Noreferrer test

* Make EnsureNewLightningInvoiceOnPartialPayment more resilient

* Make notifications section test more resilient in CanUsePullPaymentsViaUI
2021-07-16 09:57:37 +02:00
eb2b523800 Re-enable "Create" button for invoices on correct form input ()
* Re-enable "Create" button for invoices on correct form input

fix 

* Use a more specific selector for form inputs
2021-07-14 23:49:06 +09:00
73b461f8d0 Greenfield: add text search terms to an invoice () 2021-07-14 23:32:20 +09:00
15be593bbd Save paymentRequestId in Metadata when creating invoice for Payment Request ()
* Save paymentRequestId in Metadata when creating invoice

* Added Payment Request ID + link on invoice detail page

* Added paymentRequestId to the webhook payload

* Removed PaymentRequestId from webhook payload (rolled back previous change)

* Using strongly typed InvoiceMetadata

* Added OrderUrl metadata field to invoice + link

* Added Metadata.OrderUrl to docs

* Made orderUrl visible when no orderId is present
2021-07-14 20:43:13 +09:00
73c89ac28d Auto-select store when creating a new invoice ()
* Auto-select store when creating a new invoice

* Set types as nullable in InvoiceController.UI.cs
2021-07-14 20:40:18 +09:00
45679fa29e fix typo in test/[...]/index.cshtml
Fix typo reported by following comment: 179520a211 (r53423646)
2021-07-14 11:04:21 +02:00
861e5b1530 Add webhook delivery status indicator ()
* Add webhook delivery status indicator

As discussed in: https://github.com/btcpayserver/btcpayserver/discussions/2616

* Add relative delivery time to tooltips
2021-07-12 21:58:11 +09:00
d5019f61ce Expose ExplorerClientProvider to plugins via interface 2021-07-12 14:17:25 +02:00
78dd1b0476 Fix store javascript after bootstrap5 update 2021-07-12 14:16:41 +02:00
72d5c11811 Greenfield: Add CanModifyInvoices Permissions () 2021-07-11 00:30:01 +09:00
aefb81b7f0 Add "skip" and "limit" params for onchain txs API endpoint ()
Discussed here: https://github.com/btcpayserver/btcpayserver/discussions/2667
2021-07-10 13:04:01 +09:00
55cc32ce0f Fix new docker compose incompatibility 2021-07-08 12:53:47 +02:00
060fc46e4f Fix system plugins resource loading 2021-07-08 12:53:34 +02:00
4bb3d60b6c Add misc/permissions to document the hierarchical structure () 2021-07-08 14:34:10 +09:00
4222d24d51 Fix: Invoice Search Text crashes invoice creation when value is too long ()
This fix truncates the data to the column's max length to avoid this situation. Fixes . Maybe also fixes 
2021-07-08 12:59:44 +09:00
6c76866f28 Update InvoiceConfirmed to InvoiceSettled in swagger ()
fix 
2021-07-08 12:41:03 +09:00
50be6595bd update InvoiceStatusMark Swagger definition ()
close 
2021-07-07 13:27:04 +09:00
91136d2551 remove unused code in fireworks.js ()
relates to 
2021-07-07 13:25:34 +09:00
2e822c5878 Hiding NetworkFee row in invoice if not applicable 2021-07-06 21:20:13 +02:00
894dca2eef Update BTCPayServer/Views/Shared/Bitcoin/ViewBitcoinLikePaymentData.cshtml 2021-07-06 21:20:13 +02:00
48355129c5 Properly counting transactions that impact NetworkFee 2021-07-06 21:20:13 +02:00
edc9429e84 Displaying NetworkFee if it was present for the invoice 2021-07-06 21:20:13 +02:00
f1a222fbb3 New unit test to scan for external links/forms and if they have rel="noreferrer noopener" ()
* Unit test to check for (possibly) external links

* Add rel="noreferrer noopener" to all external links so unit test passes

* Update BTCPayServer.Tests/UnitTest1.cs

Co-authored-by: Andrew Camilleri <evilkukka@gmail.com>

* Update BTCPayServer.Tests/UnitTest1.cs

Co-authored-by: Andrew Camilleri <evilkukka@gmail.com>

* Fixed bad merge from master

* PascalCasing

Co-authored-by: Andrew Camilleri <evilkukka@gmail.com>
2021-07-06 10:35:42 +02:00
40bbc5850f Greenfield doc error. Should be singular. Rewording to focus on a single result. ()
* Should be singular. Rewording to focus on a single result.

* Update BTCPayServer/wwwroot/swagger/v1/swagger.template.stores-wallet.on-chain.json

Co-authored-by: Andrew Camilleri <evilkukka@gmail.com>

* Update BTCPayServer/wwwroot/swagger/v1/swagger.template.stores-wallet.on-chain.json

Co-authored-by: Andrew Camilleri <evilkukka@gmail.com>

Co-authored-by: Andrew Camilleri <evilkukka@gmail.com>
2021-07-06 10:19:18 +02:00
70baa4087c Hide referer URL to hide our BTCPay Server URL () 2021-07-05 13:51:00 +09:00
8e4f56bd52 Improves notification view ()
* removes hr, adds notification settings link

* adds if else to show "no notifications" or table view

* adds icon to settings button

* Fix link to notification settings

Co-authored-by: Dennis Reimann <mail@dennisreimann.de>
2021-07-05 12:22:24 +09:00
3800780ef2 PoS: Fix images in cart view ()
Fixes an issue I overlooked in  and which was brought up by @dstrukt [on Mattermost](https://chat.btcpayserver.org/btcpayserver/pl/jzxqs7xw33rjfe5itorxygifbe).
2021-07-02 11:28:38 +09:00
6e154f6cbc Merge pull request from dennisreimann/patch-1
2FA: Fix login partial name
2021-06-30 12:26:19 +01:00
673b6d6733 2FA: Fix login partial name
Fixes a typo in the filename, which leads to an exception on login when 2FA is enabled.
2021-06-30 13:11:27 +02:00
6185b93b59 Upgrade to Bootstrap v5.0.2 () 2021-06-30 19:03:43 +09:00
9bbaae9dea Fix visual bug with invoices search help text overlapping invoice action buttons ()
* Fix visual bug with invoices search help text overlapping invoice action buttons

close 

* Update BTCPayServer/Views/Invoice/ListInvoices.cshtml

Co-authored-by: d11n <mail@dennisreimann.de>

Co-authored-by: d11n <mail@dennisreimann.de>
2021-06-30 17:05:34 +09:00
6c856aba48 Introduce Server paging for Payouts List ()
* Introduce Server paging for Payouts List

* Add paging params

* Minor code and formatting improvements

* View updates

* Apply suggestions from code review

Co-authored-by: Zaxounette <51208677+Zaxounette@users.noreply.github.com>

* fix tests

Co-authored-by: Dennis Reimann <mail@dennisreimann.de>
Co-authored-by: Zaxounette <51208677+Zaxounette@users.noreply.github.com>
2021-06-30 16:59:01 +09:00
33de4cccfc Add permission key to API page ()
* Better API key page

Now we can see the permission code + Fixed a margin-bottom when selecting a specific store

* Improve responsiveness of API key permissions

* Improve webhook editing UX

Jumps to edited item after submit

Co-authored-by: Dennis Reimann <mail@dennisreimann.de>
2021-06-30 16:57:38 +09:00
6a79c8a27a Improve create payment request view ()
* formatting

* more edits

* adds section headers

* updates wording

* Update BTCPayServer/Views/PaymentRequest/EditPaymentRequest.cshtml

Co-authored-by: britttttk <39231115+britttttk@users.noreply.github.com>

Co-authored-by: d11n <mail@dennisreimann.de>
Co-authored-by: britttttk <39231115+britttttk@users.noreply.github.com>
2021-06-30 16:56:28 +09:00
631deb9ce7 Removes lightning setup & wallet setup back button ()
* removes back button

* removes wallet back on setupwallet page

* removes navbar section completely

* remove back button on modify wallet page

Co-authored-by: Dennis Reimann <mail@dennisreimann.de>
2021-06-30 14:48:28 +09:00
cb2dd464f1 GreenField: Add StoreId to Invoice model () 2021-06-24 23:15:51 +09:00
dca376cb46 Add files via upload () 2021-06-24 23:13:06 +09:00
89d6c83504 Improves Create Store & Create App views ()
* improves create store

* redorders form elements
2021-06-24 23:06:55 +09:00
2ea3baf36e Minor UI improvements ()
* Added "Checkout" button to invoice detail page

* Added missing icon

All other pages have a "plus" icon on the primary button, except this page

* Button icons are always in front, not after like here was
2021-06-24 19:52:41 +09:00
3338dcac1c Richtext editor fixes ()
* UPdate summernote with Bootstrap 5 integration

* Unify summernote options
2021-06-24 19:51:35 +09:00
0b9a2ee8ec Merge pull request from JimiHFord/fix-invoice-typo
fix invoice typo
2021-06-20 08:14:26 +02:00
78ac1ee15d fix invoice typo 2021-06-19 20:02:55 -07:00
886e9ab511 Update WebhookDataBase Swagger definition ()
close 
2021-06-18 11:01:23 +09:00
3c80621dac Add payjoin option to hot wallet setup ()
* Add payjoin option to hot wallet setup

Enables payjoin by default when creating a hot wallet and offers the user an opt-out.

Test fix

* Display PayJoin option only if it is available

* Test fixes

* Update hot wallet checks

* Test fix after rebase

* Use toggle buttons for enabling options
2021-06-18 10:25:17 +09:00
6b4ff4ce2c Merge pull request from NicolasDorier/refactor/wallet-cleanup
Cleanup some old code in wallet setup
2021-06-17 21:20:28 +09:00
b22aa778e1 Better webhook UI. Full URLs are visible. ()
* Better webhook UI. Full URLs are visible.

* Using Bootstrap CSS class instead of a new class

* Created the generic class .sm:text-nowrap

* Renamed class

* Changed "sm" to "md"
2021-06-17 19:43:47 +09:00
1c440ed36c Update Maintenance.cshtml ()
* Update Maintenance.cshtml

* fix BTCPay Server maintenance error

* Rephrase "derivation settings" to "wallet settings"

* Pay button text fix

* rephrase CoinSwitch description
2021-06-17 19:40:08 +09:00
70f56d5920 Encrypt WalletSetupViewModel.Config 2021-06-17 19:26:50 +09:00
8a1d5bbc57 Remove outdated code in UpdateWallet 2021-06-17 16:39:55 +09:00
956370592f Create a dedicated IsHotwalletProperty in the DerivationSchemeSettings 2021-06-17 15:36:22 +09:00
afd479ac69 Remove the DerivationSchemeViewmodel.Enabled property 2021-06-17 15:08:04 +09:00
39a4be5641 Remove HintAddress 2021-06-17 14:11:01 +09:00
70fcd053cd Signing context cleanup ()
* Signing Context cleanup

Removes extra NBXSeedAvailable property in SigningContext, which got introduced in . It is not needed since each view model involved already has it.

* Fix button in link
2021-06-15 17:35:23 +09:00
c9869922f7 Merge pull request from pavlenex/pnxbet
add pnxbet to readme
2021-06-14 18:27:15 +02:00
8b6a333cd2 add pnxbet to readme 2021-06-14 18:17:40 +02:00
ae329e371a fix link test 2021-06-14 11:32:35 +02:00
cf7c3c2bf7 LightningSupportedPaymentMethod.CryptoCode is never null 2021-06-14 18:22:00 +09:00
3d21d2724e Fix bug with LN payment method API endpoint throwing 500 ()
close 
2021-06-14 18:19:52 +09:00
df64a93808 add pnxbet supporter 2021-06-14 08:42:05 +02:00
6068d384a4 fix missing bundle tag helper 2021-06-14 08:18:03 +02:00
3c0292f074 Wallet: Signing UI improvements ()
* Refactoring to generalize wizard layout

* Wallet: Add intermediate signing options view

* Update BTCPayServer/Views/Wallets/WalletSigningOptions.cshtml

Co-authored-by: britttttk <39231115+britttttk@users.noreply.github.com>

* Skip signing options for hot wallets

* Update signing options wordings, add PSBT doc link

* Fix test

* Remove form route params

* Use decode command for PSBT

Co-authored-by: britttttk <39231115+britttttk@users.noreply.github.com>
2021-06-14 14:06:56 +09:00
371acc84a8 Do not retrieve all payouts in GetPullPayment every time 2021-06-10 18:54:27 +09:00
cd9feccf6e Mark Payouts as Paid ()
* Mark Payouts as Paid

This PR allows users to mark payouts as paid manually through the UI  and through the API. It also sets up the payout proof system to be able store a manual proof that will in a later PR allow you to specify a proof of payment (link or text)

* add docs, test and greenfield client

* remove extra docs stuff

* Update BTCPayServer.Tests/GreenfieldAPITests.cs

Co-authored-by: britttttk <39231115+britttttk@users.noreply.github.com>

* clean up pull payment/payouts fetch code

* Ensure payoutis are retrieved with pull payment

Co-authored-by: britttttk <39231115+britttttk@users.noreply.github.com>
2021-06-10 18:43:45 +09:00
f1f3dffc97 Column improvements quick patch ()
* removes title, switches search input with title

* adds CSS change

* Update BTCPayServer/Views/Server/ListUsers.cshtml

Breakpoint improvement

Co-authored-by: d11n <mail@dennisreimann.de>

* Update BTCPayServer/wwwroot/main/site.css

Co-authored-by: d11n <mail@dennisreimann.de>

* github revision fix

* spacing

* Simplify file details display

* Resolve users list conflict

* Indent fix

* Fix Tor casing

Co-authored-by: d11n <mail@dennisreimann.de>
2021-06-09 17:53:24 +09:00
e4f298acac Set lightning invoice fallback in QR code as uppercase ()
* Set lightning invoice fallback in QR code as uppercase

On the lightning payment view the invoice is encoded as uppercase inside the QR code; however this is not true for the on-chain payment QR code if the invoice is set as fallback option.

This commit sets the fallback invoice as uppercase inside the QR code.

* Adds test case for uppercase fallback lightning invoice

* Apply suggestions from rockstar's review

Co-authored-by: Kukks <evilkukka@gmail.com>
2021-06-08 12:24:17 +09:00
e93b030bfe Update HWI library, warn users to run newer version ()
* Update HWI library, warn users to run newer version

* Update BTCPayServer/wwwroot/js/vaultbridge.ui.js

Co-authored-by: Zaxounette <51208677+Zaxounette@users.noreply.github.com>

* Update BTCPayServer/wwwroot/js/vaultbridge.ui.js

Co-authored-by: Pavlenex <pavle@pavle.org>

Co-authored-by: Zaxounette <51208677+Zaxounette@users.noreply.github.com>
Co-authored-by: Pavlenex <pavle@pavle.org>
2021-06-06 21:02:15 +09:00
64a7abe53a Bootstrap migration fixups ()
* Remove xxl breakpoint

* Remove code bg

* Form updates

* Update PoS accordion

* Update forms

* Fix webhook password toggle

* Update highlight js styles

* Page updates

* Style unformatted checkboxes

* Fix typo

* Update accordions

* Update policies domain mapping

* Update toggles and checkboxes

* Update storage pages

* Fix specter logo filename casing

* Update checkout experience view

* Update webhook view

* Re-add used negative margins

* Update bootstrap

* POS layout fixes

* Decrease size of info icon in main headline

* Update BTCPayServer/Views/Stores/ModifyWebhook.cshtml

Co-authored-by: britttttk <39231115+britttttk@users.noreply.github.com>

Co-authored-by: britttttk <39231115+britttttk@users.noreply.github.com>
2021-06-06 20:44:54 +09:00
784a40e2ed Server Settings Bootstrap/UI Tweaks ()
* server > services columns cleanup

* server > services column patch

* server > files adds text-end to table action column

* server > maintenance updates column

* removes title, switches search input with title

* adds CSS change

* Update BTCPayServer/Views/Server/ListUsers.cshtml

Breakpoint improvement

Co-authored-by: d11n <mail@dennisreimann.de>

* Update BTCPayServer/wwwroot/main/site.css

Co-authored-by: d11n <mail@dennisreimann.de>

Co-authored-by: d11n <mail@dennisreimann.de>
2021-06-06 20:41:14 +09:00
9ecd27dc85 Merge pull request from bolatovumar/feat/test-webhooks
Add ability to send test webhook call
2021-06-04 13:01:57 +02:00
72ef23786b Merge pull request from bolatovumar/feat/greenfield-api-delete-user
Add DELETE action for api/v1/users endpoint
2021-06-04 12:30:36 +02:00
28da78fc78 Improve tests and small refactoring 2021-06-04 12:20:45 +02:00
c345e81902 Simplify template 2021-06-03 21:16:27 -07:00
1b39742919 Simplify FirstOrDefault method call 2021-06-03 21:16:27 -07:00
bc33b32522 Add delivery ID to test webhook succes message 2021-06-03 21:16:27 -07:00
4671f08b64 Augment webhook test error message 2021-06-03 21:16:26 -07:00
9f6f74df59 Show success/error message after sending test webhook 2021-06-03 21:16:26 -07:00
872c99e033 Rename SendDelivery to SendAndSaveDelivery 2021-06-03 21:16:26 -07:00
cb6e8a6937 Simplify TestWebhook method 2021-06-03 21:16:26 -07:00
7c16f8f134 Allow specifying WebhookDeliveryData webhookid right away 2021-06-03 21:16:25 -07:00
ad11b61af2 Formatting 2021-06-03 21:16:25 -07:00
120b82ae00 Update webhook test page design 2021-06-03 21:16:25 -07:00
7cf6c97d3f Return view after webhook test POST call 2021-06-03 21:16:25 -07:00
2262acf12b Add ability to send test webhook call 2021-06-03 21:16:24 -07:00
ca3f97c42f Add missing API key type description 2021-06-02 20:12:53 -07:00
8731055786 Use UserNotFound instead of NotFound 2021-06-02 20:02:31 -07:00
e943c55a91 Add basic tests for delete user endpoint 2021-06-02 20:02:31 -07:00
be05b6aa90 Specify correct return type on delete user methods 2021-06-02 20:02:31 -07:00
0b4d94faf2 Remove unnecessary null check 2021-06-02 20:02:30 -07:00
9f8f677125 Remove unused IsAdmin method 2021-06-02 20:02:30 -07:00
949d6bf584 Replace admin check with CanModifyServerSettings authorization policy 2021-06-02 20:02:30 -07:00
9fc2d2b76b Remove CanDeleteUser constraint from "/api/v1/users/{userId}" endpoint 2021-06-02 20:02:29 -07:00
d9935ada9d Add "/api/v1/users/me" endpoint 2021-06-02 20:02:29 -07:00
b4076b53e8 Add IsAdminUser method to UserService 2021-06-02 20:02:28 -07:00
53c81918a5 Enable nullable reference checking in UsersController 2021-06-02 20:02:28 -07:00
7c11736992 Enable nullable reference checking in UserService 2021-06-02 20:02:28 -07:00
49f168b7b3 Update delete user swagger description 2021-06-02 20:02:27 -07:00
104092702a Simplify DeleteUser method 2021-06-02 20:02:27 -07:00
2ed8341403 Add IsRoleAdmin to user service 2021-06-02 20:02:26 -07:00
e5a196918f Add user service 2021-06-02 20:02:26 -07:00
907ae760e0 Add CanDeleteUser policy 2021-06-02 20:02:25 -07:00
37f7c4e0f9 Add DELETE user Swagger docs 2021-06-02 20:02:25 -07:00
fe107cd23f Add DELETE action for api/v1/users endpoint 2021-06-02 20:02:22 -07:00
a830c1e812 Use ~ prefix for local PoS image references 2021-06-01 14:34:06 +02:00
8eb85acb88 Self-host PoS sample images
As brought up in  and previously been worked on in .
2021-06-01 14:34:06 +02:00
ea8f510eff Merge pull request from pavlenex/remove-supporters
Remove supporters
2021-05-30 17:43:58 +02:00
cbec44bb73 Fix QR Code shower 2021-05-30 10:38:21 +02:00
ac44ed56e0 fixx broken shopify links 2021-05-26 13:11:59 +02:00
dbf2f99c4e Fixing issue with mysql migration and maxLength () 2021-05-25 16:03:49 +09:00
3b04ca229f remove unused images 2021-05-20 11:05:11 +02:00
5b1a171d27 remove supporters from the front page
- BTSE (Expired)
- OkCoin (Expired)
- DGLab (Expired)
- ACINQ (Remove due to front-page tier)
2021-05-20 11:02:18 +02:00
9138c6c70a remove past supporters from the readme
Remove:
- BTSE
- OKCoin
- DGLabs
2021-05-20 10:59:27 +02:00
f1092f910a bump 2021-05-19 20:19:22 +09:00
ebc9ddfeb1 changelog 1.1.2 2021-05-19 20:18:09 +09:00
201b4d6ec0 Fix Shopify parsing () 2021-05-19 16:26:54 +09:00
3b375929c1 Support wider server sync info in greenfield server info ()
fixes 
2021-05-19 13:07:28 +09:00
ed7031981b Bootstrap v5 migration ()
* Swap bootstrap asset files

* Update themes and color definitions

* Move general bootstrap customizations

* Theme updates

Theme updates

* Remove BuildBundlerMinifier

This lead to an error, because BuildBundlerMinifier and BundlerMinifier.Core seem to conflict here. Details: https://stackoverflow.com/a/61119586

* Rewplace btn-block class with w-100

* Update badge classes

* Remove old font family head variable

* Update margin classes

* Cleanups

* Update float classes

* Update text classes

* Update padding classes

* Update border classes

* UPdate dropdown classes

* Update select classes

* Update neutral custom props

* Update bootstrap and customizations

* Update ChromeDriver; disable smooth scroll

https://github.com/SeleniumHQ/selenium/issues/8295

* Improve alert messages

* Improve bootstrap customizations

* Disable reduced motion

See also 7358282f

* Update Bootstrap data attributes

* Update file inputs

* Update input groups

* Replace deprecated jumbotron class

* Update variables; re-add negative margin util classes

* Update cards

* Update form labels

* Debug alerts

* Fix aria-labelledby associations

* Dropdown-related test fixes

* Fix CanUseWebhooks test

* Test fixes

* Nav updates

* Fix nav usage in wallet send and payouts

* Update alert and modal close buttons

* Re-add backdrop properties

* Upgrade Bootstrap to v5 final

* Update screen reader classes

* Update font-weight classes

* Update monospace font classes

* Update accordians

* Update close icon usage

* Cleanup

* Update scripts and style integrations

* Update input group texts

* Update LN node setup page

* Update more form control classes

* Update inline forms

* Add js specific test

* Upgrade Vue.js

* Remove unused JS

* Upgrade Bootstrap to v5.0.1

* Try container related test updates

* Separate jQuery bundle

* Remove jQuery from LND seed backup page

* Remove unused code

* Refactor email autofill js

* Refactor camera scanner JS

* Re-add tests

* Re-add BuildBundlerMinifier

* Do not minify bundles containing Bootstrap

Details https://github.com/madskristensen/BundlerMinifier/issues/558

* Update bundles

* Cleanup JS test

* Cleanup tests involving dropdowns

* Cleanup tests involving collapses

* Cleanup locale additions in ConfigureCore

* Cleanup bundles

* Remove duplicate status message

* Cleanup formatting

* Fix missing validation scripts

* Remove unused unminified Bootstrap js files

* Fix classic theme

* Fix Casa theme

* Fix PoS validation
2021-05-19 11:39:27 +09:00
0eace936b0 Bump 2021-05-14 17:21:32 +09:00
0d70743a47 Do not spam logs with events 2021-05-14 17:17:46 +09:00
778a0f7e8d Fix: Lightning Listener not listening on Lightning payment after activating when using lazy payments () 2021-05-14 17:17:07 +09:00
a8cf6ee8a2 add coinswitch changelog 2021-05-14 10:03:13 +02:00
06a150a558 Changelog for 1.1.1 2021-05-14 16:20:47 +09:00
c551e5cd0a Make sure to only select accounted payments where we should () 2021-05-14 16:16:19 +09:00
776ded0b7e Fix Coinswitch enabledflag and nav category 2021-05-14 09:08:32 +02:00
9e3d99ec39 Do not automatically apply our datetimeoffset binder 2021-05-14 15:47:19 +09:00
6c9c7328bb Fix: Payout Transaction not matching when rate provided longer decima… ()
* Fix: Payout Transaction not matching when rate provided longer decimal precision

fixes  most likely

* Do not sue rounding and ensure crypto amount is saved with correct decimal places

* Round pull payment payout to the nearest digit supported by network

Co-authored-by: nicolas.dorier <nicolas.dorier@gmail.com>
2021-05-13 17:50:08 +09:00
2961a2ed53 Merge pull request from Kukks/fix-pay-button-steps
Fix Pay Button steps and range validation
2021-05-13 17:33:34 +09:00
12836b9f60 Merge pull request from NicolasDorier/udoqnf
Make sure BTCPayServer does not take the culture of the server
2021-05-13 17:32:05 +09:00
17cef99ce8 Spelling improvement () 2021-05-13 17:31:08 +09:00
2194fe43d2 Do not show payments which are not accounted in Payment request 2021-05-12 17:46:57 +09:00
06fef563e3 Fixed 2 typos ()
* Fixed 2 typos

* Update BTCPayServer/Controllers/ManageController.APIKeys.cs

Co-authored-by: Zaxounette <51208677+Zaxounette@users.noreply.github.com>

* Update BTCPayServer/Controllers/ManageController.APIKeys.cs

Co-authored-by: Zaxounette <51208677+Zaxounette@users.noreply.github.com>

Co-authored-by: Zaxounette <51208677+Zaxounette@users.noreply.github.com>
2021-05-07 18:51:10 +02:00
c38eeddc55 Update BC-UR bundle and support decoding hex format of wallet () 2021-05-08 00:35:43 +09:00
84ec33afb3 Update BitCore branding ()
Co-authored-by: dalijolijo <dalijolijo@v220200132547106119.bestsrv.de>
2021-05-08 00:34:38 +09:00
4b30132d06 Make sure BTCPayServer does not take the culture of the server 2021-05-06 20:28:02 +09:00
38942aef25 remove log 2021-05-05 12:19:35 +02:00
200e8330d8 Fix Pay Button steps and range validation
There were numerous issues around different button types and the amount range validation. Also fixes 
2021-05-05 11:27:02 +02:00
86092fc955 Wrap more plugin loading logic in try catch to not crash fatally 2021-05-03 08:35:54 +02:00
50cd4cb3ce bump version 2021-04-29 12:52:55 +09:00
7c857118fa Update Changelog () 2021-04-29 12:51:35 +09:00
4e1b18e2bb do not crash invoice if wellknown metadata keys used with different e… ()
* do not crash invoice if wellknown metadata keys used with different expected types

* fix

* add bits from alt PR
2021-04-28 16:49:10 +09:00
5fe3c1c61f U2fremove ()
* Remove U2F support and JS

* fix final changes

* fix more final stuff
2021-04-28 16:22:09 +09:00
270bd98a10 Remove test code from Fido2 that got merged 2021-04-28 06:26:59 +02:00
02bf5afe0b Migrate existing U2F to Fido2 ()
* Migrate existing U2F to Fido2

This seamlessly switches all u2f registrations over to the new FIDO2 support. Please note that I have not yet added a way to drop the u2f DB and its UI so that we can test the migration works properly for all.

* add testing logic

* fix u2f tests

* remove duplicate status message

* fix test and namespaces

* fix test
2021-04-28 13:14:15 +09:00
c878f63f99 Fix: Double entry for Api Key nav item in Account navigation menu 2021-04-27 14:06:34 +02:00
8083935b47 Greenfield: Deleting a store in the server, should delete only webhooks of this store 2021-04-27 18:55:38 +09:00
c7d11132e5 Merge pull request from dennisreimann/wallet-enabling-fix
Offer enabling toggle only for wallets that are set up
2021-04-27 11:16:10 +02:00
69442a49f1 Offer enabling toggle only for setup wallets 2021-04-27 09:27:52 +02:00
5f9ef0ff62 Greenfield: Human friendly error if webhook or delivery not found 2021-04-27 15:38:42 +09:00
0888cc4f97 Fix: Add Fido2 log filter to tests 2021-04-27 08:18:01 +02:00
6821a9a0a4 Fix: Coinswitch plugin missing nav specification 2021-04-27 07:37:08 +02:00
003e8a979b Fix: Plugins integrations formatting text wrap 2021-04-27 07:36:42 +02:00
08e8050ca5 Add button to copy API key to clipboard ()
* Add button to copy API key to clipboard

* Update "copy API key to clipboard" button appearance
2021-04-27 11:30:26 +09:00
8d5c3c5cdd ModelBinders should not throw exception, but return error on ModelState 2021-04-26 12:55:03 +09:00
dcc4214dcb Make sure model binder error are returning error 422, use DateTimeOffsetModelBinder 2021-04-26 12:37:56 +09:00
ded55a1440 customized api/v1/invoices query parameters to filter results ()
* customized api/v1/invoices query parameters to filter results

* customized api/v1/invoices query parameters to filter results

* update swagger and make parameters as arrays

* change startDate and endDate types to UnixTimestamp

* update invoice status type in swagger and better handle dateTimeoffset

* change status type to array of InvoiceStatus to match controller

* change status type to array of InvoiceStatus to match controller

Co-authored-by: somera <somera@tesla.com>
2021-04-26 11:32:44 +09:00
e0ff03068a add altcoin support for althash / htmlcoin ()
* Switch Althash, keypath, hitbtc ticker

* add Althash

* add Althash

* switch to coingecko provider

* add Althash logo

* Fix stacking issue with rate call

* bump NBitcoin to 5.0.77

* bump NBXplorer.Client to 3.0.21
2021-04-26 11:31:00 +09:00
60c05cab55 Merge pull request from dennisreimann/lightning-setup-redesign
Lightning setup redesign
2021-04-22 17:39:05 +09:00
9c480580ba Merge pull request from dennisreimann/mobile-unread-count
UI: Fix unread count badge on mobile
2021-04-21 17:43:12 +02:00
f3c3f397eb UI: Fix unread count badge on mobile 2021-04-21 17:38:17 +02:00
f6c7f61ec3 Update BTCPayServer/Views/Stores/SetupLightningNode.cshtml
Co-authored-by: Zaxounette <51208677+Zaxounette@users.noreply.github.com>
2021-04-21 14:52:45 +02:00
aae5cce175 Improve custom node details toggling 2021-04-21 14:38:53 +02:00
8a9bea4603 Wording and display improvements 2021-04-20 14:52:00 +02:00
0e3f6acb0a Final tweaks and test fix 2021-04-20 12:23:50 +02:00
bbe621109f Lightning setup redesign 2021-04-20 12:09:27 +02:00
35f47bdfb7 Add and update theme colors 2021-04-20 12:09:26 +02:00
8ca0be5a4d Merge pull request from bolatovumar/unify-pos-app-card-markup
Unify POS app card markup
2021-04-20 18:29:50 +09:00
b6bd7cce6d Merge pull request from NicolasDorier/fweihnq
Give better error for greenfield API
2021-04-20 18:25:10 +09:00
a7cbb3941a Give better error for greenfield API 2021-04-20 18:21:26 +09:00
8957720c94 Merge pull request from dennisreimann/store-payment-method-toggling
Move payment method enabling toggle to store overview
2021-04-20 17:25:34 +09:00
452915478b UI: Fix duplicate status messages ()
The status message is included in the NavLayout, hence the pages that use this layout should not include the status message.

Fixes .
2021-04-20 16:16:21 +09:00
962c80fff8 Remove permission check
Ensured via the controller, see https://github.com/btcpayserver/btcpayserver/pull/2469#discussion_r616289628
2021-04-20 09:10:23 +02:00
aef06c7f61 Wording updates
Thanks @Zaxounette!
2021-04-20 09:09:32 +02:00
52be5746c6 Update BTCPayServer.Tests/SeleniumTester.cs
Co-authored-by: Zaxounette <51208677+Zaxounette@users.noreply.github.com>
2021-04-20 09:03:40 +02:00
b2ff64733d Update BTCPayServer/Controllers/StoresController.Onchain.cs
Co-authored-by: Zaxounette <51208677+Zaxounette@users.noreply.github.com>
2021-04-20 09:03:39 +02:00
85cf36ac4a Update BTCPayServer.Tests/SeleniumTester.cs
Co-authored-by: Zaxounette <51208677+Zaxounette@users.noreply.github.com>
2021-04-20 09:03:38 +02:00
5fda21373e Move enabling toggle to store overview 2021-04-20 09:03:37 +02:00
1ada87ca31 Fix: Do not crash if plugin folder mismatches plugin identifier 2021-04-20 08:38:37 +02:00
0554565b30 FIDO2/WebAuthN Support ()
* FIDO2/WebAuthN Support

This adds initial support for WebAuthN/FIDO2 as another MFA mode. U2F is still intact and runs alongside it for now. Once this is merged, I will start work on migrating U2F support to happen over the FIDO2 protocol instead.

* Refactor and future proof system (prep work of seamless u2f migration)

* attempt js fix for mobile devices

* Apply suggestions from code review

Co-authored-by: d11n <mail@dennisreimann.de>

* fix fido name saving

* do not spam logs and hide loader when failed

* PR Changes

* Apply suggestions from code review

Co-authored-by: d11n <mail@dennisreimann.de>

* attempt fido2 bump

* add name if not named for credentials

Co-authored-by: d11n <mail@dennisreimann.de>
2021-04-20 14:06:32 +09:00
315284d5f5 Fix typo of webhook events property 2021-04-20 12:36:20 +09:00
99b1e391a6 bump NBitcoin 2021-04-20 12:05:48 +09:00
9b50e85d0d Merge pull request from btcpayserver/feat/improving-files-page
Improving File Storage page
2021-04-20 11:06:14 +09:00
e394474dad Update BTCPayServer/Views/Server/Files.cshtml
Co-authored-by: Zaxounette <51208677+Zaxounette@users.noreply.github.com>
2021-04-20 11:05:53 +09:00
7d1761de4f Coin Selection: Confirmed filter ()
Allows provides confirmation count to Greenfield UTXO GET api
2021-04-20 11:02:06 +09:00
dfd4c967b7 fix null reference exception when no tor settings are provided 2021-04-19 07:43:11 +02:00
71305461d4 Cleaning up edit pages for storage providers not to have summary error
Error sandwich be gone
2021-04-18 14:05:12 -05:00
04a29ece3b Only display storage providers that can actually be set in dropdown 2021-04-18 14:03:22 -05:00
99dd6f3e50 Apply suggestions from code review
Co-authored-by: Zaxounette <51208677+Zaxounette@users.noreply.github.com>
2021-04-18 13:42:25 -05:00
8f6048191d Improving navigation between files and storage services and rewording info text 2021-04-18 13:42:17 -05:00
ee0fa71605 Refactor TorService ()
* TorServices Refactor to make value passing easier

* Allow specifying Tor services through config

Format:

BTCPAY_TORSERVICES: "BTCPAYSERVER:URL.ONION:VIRTUALPORT;BTC-P2P:URL.ONION:VIRTUALPORT;BTC-RPC:URL.ONION:VIRTUALPORT;SOMEOTHERONIONSERVICE:URL.ONION:VIRTUALPORT"

* add tests

* Optimize Tor Services loader and ensure it is loaded as a hosted service

* Remove Task from Tor service loader

* Use options to parse Tor services

* Fix booboo

* Fix test after fixing booboo

* Adding timeout on long running CanEnumeratetorServices test

(cherry picked from commit 274b77e3175960158b803410037e2c7ff31984be)

* Renaming timeout variable to better name

* Only allow one of torrcfile or torservices

Co-authored-by: Kukks <evilkukka@gmail.com>
Co-authored-by: rockstardev <rockstardev@users.noreply.github.com>
2021-04-18 11:26:06 +09:00
475a68924e Allow accessing "misc/lang" endpoint with Greenfield auth schemes ()
closes 
2021-04-18 11:22:50 +09:00
c0a544351b Can disable the modification of SSH settings in BTCPay Server ()
* Can disable the modification of SSH settings in BTCPay Server

* Update BTCPayServer/Controllers/ServerController.cs

Co-authored-by: Zaxounette <51208677+Zaxounette@users.noreply.github.com>

* Update BTCPayServer/Controllers/ServerController.cs

Co-authored-by: Zaxounette <51208677+Zaxounette@users.noreply.github.com>

* Update BTCPayServer/Views/Server/SSHService.cshtml

Co-authored-by: Zaxounette <51208677+Zaxounette@users.noreply.github.com>

Co-authored-by: Zaxounette <51208677+Zaxounette@users.noreply.github.com>
2021-04-17 13:29:50 +09:00
15201a927e UI fixes ()
* Fix formatting in bootstrap.css

This looks like it got introduced when resolving a merge conflict.

* Fix typos in views

* Fix semibold style definition
2021-04-16 15:02:40 +09:00
efa567f965 Unify POS app card markup 2021-04-14 20:00:01 -07:00
e1df1c255a Add user id in log when log in 2021-04-15 11:19:06 +09:00
64e34d0ef5 Seaparate CoinSwitch as a plugin ()
* Separate coinswitch as a system plugin

* Decouple Coinswitch from Checkout UI

* remove dummy csproj

* Remove CoinSwitchTests.cs per @NicolasDorier feedback

Co-authored-by: rockstardev <rockstardev@users.noreply.github.com>
2021-04-13 20:19:48 +09:00
2e12befb8b Refactor and decouple Payout logic ()
* Refactor and decouple Payout logic

So that we can support lightning and more complex flows like allowing external payments to payouts.

* fix dropdown align

* switch to simpler buttons

* rebase fixes

add some comments

* rebase fixes

add some comments

* simplify enum caveman logic

* reduce code duplication and db round trips

* Fix pull payment date format

* fix issue with payouts to send page not working correctly

* try fix some style issue

* fix bip21parse
2021-04-13 17:36:49 +09:00
98eee27b93 Remove warnings 2021-04-13 17:06:11 +09:00
8ed853a3b3 Attempt to make selenium less flaky 2021-04-13 15:12:09 +09:00
8fd4a816a6 Allow Payjoin for wallet receive addresses ()
* Allow Payjoin for wallet receive addresses

* wip

* show bip21 and additional work

* style better

* add to docs

* pr changes

* remove from state when unreserved
2021-04-13 12:26:36 +09:00
b12c4c5fa0 Improve and unify page headers ()
* Improve and unify page headers

* Altcoin test fixes

* Update BTCPayServer/Views/Apps/UpdateCrowdfund.cshtml

Co-authored-by: Andrew Camilleri <evilkukka@gmail.com>

* Update BTCPayServer/Views/Apps/UpdateCrowdfund.cshtml

Co-authored-by: Andrew Camilleri <evilkukka@gmail.com>

* Fix missing store name in pairing view

* Fix CanUsePairing test

* Bump header navigation font size

* Use partial tag instead of Html.PartialAsync in views

As suggested by @nicolasdorier. These are equivalent, see details [here](https://docs.microsoft.com/en-us/aspnet/core/mvc/views/partial?view=aspnetcore-3.1#partial-tag-helper).

* Fix docs link

As in .

* Update BTCPayServer/Views/Wallets/SignWithSeed.cshtml

Co-authored-by: britttttk <39231115+britttttk@users.noreply.github.com>

* Update BTCPayServer/Views/Wallets/WalletSendVault.cshtml

Co-authored-by: britttttk <39231115+britttttk@users.noreply.github.com>

* Update BTCPayServer/Views/Wallets/WalletTransactions.cshtml

Co-authored-by: britttttk <39231115+britttttk@users.noreply.github.com>

Co-authored-by: Andrew Camilleri <evilkukka@gmail.com>
Co-authored-by: britttttk <39231115+britttttk@users.noreply.github.com>
2021-04-08 22:32:42 +09:00
6473da7114 Merge pull request from bolatovumar/increase-landing-page-copy-contrast
Increase landing page masthead text contrast
2021-04-08 13:38:44 +02:00
bb78ae59d4 Merge pull request from dennisreimann/fix-hot-wallet-docs-link
Fix hot wallet docs link
2021-04-08 12:21:11 +02:00
459f3c4a93 Document and handle Invoice Metadata better ()
* Document and handle Invoice Metadata better

PosData would crash in certain scenarios when created via API. Invoice metadata known fields were not completely documented

* Fix value setter when null

* fix swagger conformity

* make all swagger invoice metadata optional looking in json
2021-04-08 16:42:18 +09:00
e014b30915 Remove on code warning 2021-04-08 14:33:58 +09:00
cc5a388106 Properly escape script inputs for shopify integration 2021-04-08 13:44:51 +09:00
5de93f8cc4 Abstract Store integrations ()
* Decouple Shopify from Store

* Decouple shopify from store blob

* Update BTCPayServer.Tests.csproj

* Make sure shopify obj is set

* make shopify a system plugin
2021-04-08 13:37:05 +09:00
ad1b708da5 Provide more data through OnChain Wallet API ()
Provides unconf/conf balanaces, keypath + address + timestamp of utxos
2021-04-08 12:43:51 +09:00
c7ff36b314 Increase landing page masthead text contrast 2021-04-07 19:37:35 -07:00
f367480857 GreenField: Add FeeRate To Wallets API ()
* GreenField: Add FeeRate To Wallets API

closes 

* make dedicated endpoint for fee rate

* remove unused call
2021-04-07 15:16:17 +09:00
475809b1a0 Make Invoice Create Faster And Fix Gap Limit Issue ()
* Make Invoice Create Faster And Fix Gap Limit Issue

This make address reserve only when user "activate" paymet method in ui. optional setting in store checkout ui.

* Fix swagger documentation around Lazy payment methods

* fix changed code signature

* Add missing GreenField API for activate feature

* Fix checkout experience styling for activate feature

* Fix issue with Checkout activate button

* Make lightning also work with activation

* Make sure PreparePaymentModel is still called on payment handlers even when unactivated

* Make payment  link return empty if not activated

* Add activate payment method method to client and add test

* remove debugger

* add e2e test

* Rearranging lazy payments position in UI to be near dependent Unified QR code

* fix rebase conflicts

* Make lazy payment method mode activate on UI load.

Co-authored-by: Kukks <evilkukka@gmail.com>
Co-authored-by: rockstardev <rockstardev@users.noreply.github.com>
Co-authored-by: Andrew Camilleri <kukks@btcpayserver.org>
2021-04-07 13:08:42 +09:00
fce7fdb3b7 Update link 2021-04-06 16:32:04 +02:00
b2c72f1d75 Merge pull request from bolatovumar/fix/2434
Set new store hints consistently for API and GUI
2021-04-06 14:50:11 +02:00
f0ac7d2c16 Set new store hints consistently for API and GUI
closes 
2021-04-05 21:24:34 -07:00
7099a3b394 Fix hot wallet docs link
# Conflicts:
#	BTCPayServer/Views/Server/Policies.cshtml
2021-04-05 21:29:41 +02:00
3e985d8554 Fix crash when sat is negative (liquid only) () 2021-04-05 12:39:37 +09:00
f94e8c9719 Fix typo in PoS cart view ()
Noticed by @MaxHillebrand 👀
2021-04-05 12:39:02 +09:00
bbe1442c28 Merge pull request from kristapsk/explorer.bc-2.jp
Fix block explorer links for signet
2021-04-03 12:47:01 +02:00
3a248d7707 Fix block explorer links for signet 2021-04-03 09:19:36 +03:00
0bb1f16d2a Merge pull request from g33kme/patch-1
Update swagger.template.stores-wallet.on-chain.json
2021-04-01 13:59:45 +02:00
0837756152 Update swagger.template.stores-wallet.on-chain.json 2021-04-01 13:48:06 +02:00
23236c96cb Remove internal setters in BTCPayNetwork 2021-04-01 08:56:22 +02:00
6ead5c3800 Plugin FailSafe ()
This introduces the concept of plugins being disabled in the case of an unrecoverable runtime error caused by a plugin.
2021-04-01 12:27:22 +09:00
64db865e1e Changelog 2021-04-01 12:16:23 +09:00
1b2399745d Remove stable and latest branch 2021-04-01 12:06:29 +09:00
94acf60100 Properly show browser date 2021-04-01 11:55:43 +09:00
a4298e8c19 Ensure root app mapping works ()
close 
2021-04-01 11:49:46 +09:00
76985838c4 Improve Lightning setup page ()
* Redesign Lightning setup page

* Improve Lightning setup page

Closes .

* Test fix

* Fix LightningNetworkPaymentMethodAPITests

* Bootstrap customization fix
2021-03-31 20:23:36 +09:00
d24964e900 Merge pull request from dennisreimann/ui-improvements
UI: Header and navigation improvements
2021-03-31 16:08:37 +09:00
f4fde8f5f7 Merge pull request from btcpayserver/feat/lnd-v0.12.1-beta
Bumping LND to v0.12.1
2021-03-31 12:35:39 +09:00
3461dd6464 Changelog for 1.0.7.1 2021-03-30 23:54:43 +09:00
560671b57f Remove autocorrect and autocapitalize for seed input 2021-03-30 19:21:29 +09:00
abf3962d91 Remove old styles 2021-03-30 11:38:04 +02:00
f53a85fcd1 Bootstrap customization fix 2021-03-30 11:38:03 +02:00
73730355b8 Add active indicator for main navigation 2021-03-30 11:38:02 +02:00
8827721605 Layout: Update header and navigation 2021-03-30 11:38:01 +02:00
2497413c60 Fix test 2021-03-30 17:15:03 +09:00
a6537ef282 Update lightning charge 2021-03-30 17:08:58 +09:00
c92adc36c6 Remove useless file 2021-03-30 15:23:36 +09:00
a64f71f186 Add user email search and sort ()
* Add user sort by email

* Add user search by email
2021-03-30 14:32:44 +09:00
0c766a2714 Merge pull request from bumbummen99/patch-3
Fix payment request template
2021-03-30 14:30:56 +09:00
6b7c49431a Merge pull request from AlexGidge/1725-pull-payments-display-date
Changed display date format on View Pull Payments screen
2021-03-30 14:29:46 +09:00
4b37121b75 Updated "required" form input styling () 2021-03-30 14:27:42 +09:00
120c7b9730 Ensure submitting empty currency does not break update PoS page () 2021-03-30 14:26:33 +09:00
1aa233ca47 Order files list by descending timestamp ()
closes 
2021-03-30 14:26:02 +09:00
14e6e492dd Refactor domain mapping () 2021-03-30 11:47:03 +09:00
17bdf55bcc Remove misleading title from hint icon ()
Brought up by @Zaxounette [on Mattermost](https://chat.btcpayserver.org/btcpayserver/pl/yrxqodfswbby5qj69zhpojuefc).
2021-03-30 11:18:24 +09:00
1ae6508a43 Make dates/timespan swagger docs more clear ()
* Make dates/tiemspan swagger docs more clear

* fix schema conformity
2021-03-30 11:18:00 +09:00
b7b6cef880 Fix ratelimiter for forgotpassword 2021-03-28 20:56:46 +09:00
52b5c56da9 Bumping LND to use the latest docker image 2021-03-26 08:52:17 -05:00
85ba9e96a0 Rate limit password forgot 2021-03-26 18:01:59 +09:00
b4e15cb27f Fix Pay-Button url preview ()
* Fix 

Adresses  by creating a new element and setting the url as text rather as html.

* Fix closing tag
2021-03-26 16:37:15 +09:00
068cfe5e3e Decrease command timeout for selenium 2021-03-26 14:31:36 +09:00
c0449a633d Revert "Fix docker-compose for arm64 dev env"
This reverts commit 7dfce5e3061d5e0ada87ede81960f0a50d86615d.
2021-03-26 13:22:54 +09:00
7dfce5e306 Fix docker-compose for arm64 dev env 2021-03-26 12:44:55 +09:00
fd53f7476e Fix flaky test () 2021-03-24 21:33:49 +09:00
ceb541ad8a Upgrade to Bootstrap v4.6 ()
Also upgrades jQuery from v3.2.1 to v3.6.0
2021-03-24 18:47:55 +09:00
d92ced6c6b Make CanUsePayjoin2 more resilient 2021-03-24 14:18:54 +09:00
0847088391 Make CanUsePayjoin2 more resilient 2021-03-24 13:55:46 +09:00
a128685b83 If an input already used in a payjoin is reused in another, we should not attempt to broadcast the original transaction. 2021-03-24 13:48:33 +09:00
749d26fafa Revert "Fix Payjoin test randomly crashing"
This reverts commit 485faf014183321420da8ae7babf5eb9e2668034.
2021-03-23 23:59:26 +09:00
485faf0141 Fix Payjoin test randomly crashing 2021-03-23 18:34:34 +09:00
af9d896510 Do not use Random 2021-03-23 17:53:23 +09:00
1fc114fec7 Check the authentication cookie every 5 min rather than 30min 2021-03-23 17:43:13 +09:00
e6938cef6f Merge pull request from pavlenex/supportercc
Add new supporter to readme
2021-03-22 17:17:42 +01:00
ffafd291ee replace the svg with an improved one 2021-03-22 17:05:46 +01:00
f532759543 add Coincards supporter to readme 2021-03-22 11:28:04 +01:00
db3ba6db3c Merge pull request from AryanJ-NYC/fix-swag-docs
fix swagger docs missing query param
2021-03-21 16:44:06 +01:00
0a333f8476 Merge pull request from bolatovumar/fix/2382
Update Swagger for "/api/v1/stores/{storeId}/payment-methods/LightningNetwork"
2021-03-21 10:50:11 +01:00
738aaeed12 Update Swagger for "/api/v1/stores/{storeId}/payment-methods/LightningNetwork" 2021-03-20 19:53:03 -07:00
ce6c9c91fc Make sure payment method uppercase logic only happens for BTC 2021-03-20 06:52:18 +01:00
7035b71ccd Fix POS item newline break ()
* Fix POS item newline break

fixes 

* Update TemplateEditor.cshtml

* fix template editor with "

* apply sanitize on save
2021-03-19 23:25:04 +09:00
923a567822 Make cookies secure 2021-03-19 20:54:30 +09:00
9b24e9378f Explicitely disallow \ for in filename 2021-03-19 20:22:24 +09:00
779f21a1ca Make sure cookie are HttpOnly 2021-03-19 20:09:55 +09:00
73d70aa5e5 Better validate file names 2021-03-19 18:55:21 +09:00
fc78eacf8f Merge pull request from btcpayserver/addbettermenu
Make main menu show text instead of icons when on small screens
2021-03-18 19:16:21 +01:00
006af636e6 Merge pull request from nosovk/patch-1
turn of autocomplete for PrivKey input
2021-03-16 17:29:25 +01:00
4575fda10a turn of autocomplete for "BIP39 Seed (12/24 word mnemonic phrase) or HD private key" input
autocomplete not pretend to be safe store for your wallet key
2021-03-16 16:05:16 +02:00
6c960628c2 Update pull payment template 2021-03-15 13:27:14 +01:00
00aa7deaae Fix payment request template
Fix payment request template body/page height and footer style.
2021-03-15 13:25:20 +01:00
f722956864 Merge pull request from britttttk/improve-sign-seed-copy
Fix typos on wallet sign with seed page
2021-03-15 09:14:54 +01:00
8f520bff12 Merge pull request from btcpayserver/fix/selenium-tests
Attempting selenium test fix for CanUseLightningSatsFeature
2021-03-14 18:57:41 -05:00
8398534fa0 Attempting selenium test fix for CanUseLightningSatsFeature
Swithcing to using WaitForElement and simplifying finding of alert message
2021-03-14 18:43:16 -05:00
e1fed90b71 bump versions 2021-03-11 22:48:40 +09:00
5ba6e53379 Changelog for 1.0.7.0 2021-03-11 22:45:47 +09:00
d33bdfd50c Make CanUseCoinSelection less flaky 2021-03-11 22:20:25 +09:00
4f5392eb74 Fix test 2021-03-11 22:18:02 +09:00
064087a7c0 fix test 2021-03-11 22:08:36 +09:00
e13821ba49 Fix view-seed 2021-03-11 21:58:20 +09:00
c2b85779c3 Rewrite the CanUseHotWallet, check if the derivationscheme is actually a hotwallet, before retrieving the seed 2021-03-11 21:46:32 +09:00
cdfdad3e3d GreenField API: Wallet API ()
* GreenField: Wallet API

* more work

* wip

* rough fiunish of transaction sending api

* Allow to create tx without broadcasting and small fixes

* Refactor Wallet Receive feature ad add greenfield api for address reserve for wallet

* add wallet api client

* add docs

* fix json converter tags

* fixes and add wallet tests

* fix tests

* fix rebase

* fixes

* just pass the tests already

* ugggh

* small cleanup

* revert int support in numeric string converter and make block id as native number in json

* fix LN endpoint

* try fix flaky test

* Revert "try fix flaky test"

This reverts commit 2e0d256325b892f7741325dcbab01196f74d182a.

* try fix other flaky test

* return proepr error if fee rate could not be fetched

* try fix test again

* reduce fee related logic for wallet api

* try reduce code changes for pr scope

* change auth logic for initial release of wallet api
2021-03-11 21:34:52 +09:00
1f7992e5da Remove some code duplication 2021-03-11 21:29:13 +09:00
4bad7d7c52 Fix issue with store payment methods after having payment method that is no longer supported () 2021-03-10 19:51:51 +09:00
1fcf39d4ab Fix new store incorrectly showing lightning enabled even if not 2021-03-09 17:56:17 +09:00
a64e304d16 Fix new store showing incorrectly being paired to internal node 2021-03-09 17:54:38 +09:00
30c7cbba96 Fix issue around new bech uppercase + vault supported flag () 2021-03-09 12:45:56 +09:00
a7d324901d Reverted "Last Refreshed" back to "Last Updated"
Co-authored-by: Zaxounette <51208677+Zaxounette@users.noreply.github.com>
2021-03-08 08:45:16 +00:00
15c87dc0b6 Fix typos on wallet sign with seed page 2021-03-07 23:30:40 -07:00
0d2de4c421 - Changed to display in user's local date time format 2021-03-07 23:19:39 +00:00
da95bd6127 - Added start date & changed display timezone 2021-03-07 22:51:50 +00:00
e31b5529b0 Fixed a typo in README.md. () 2021-03-07 20:54:36 +09:00
0836df6974 Update invoice log row styling ()
closes 
2021-03-07 20:50:55 +09:00
de4cd55adf Update coingecko exchanges 2021-03-06 13:58:02 +09:00
6b156f2144 Reenabling uppercase BECH32 in QR codes ()
* Reenabling uppercase BECH32 in QR codes

* Fixing the test now that we're uppercasing BECH32 address

* Implementing Nicolas' feedback

Co-authored-by: rockstardev <rockstardev@users.noreply.github.com>
2021-03-06 13:52:25 +09:00
2b1efd9347 Merge pull request from dennisreimann/wallet-setup-finetuning
Wallet setup finetuning
2021-03-06 13:51:01 +09:00
97dd10edc0 Fix some NRE in the FileService 2021-03-06 13:36:36 +09:00
cc4e46d212 Fix NRE if invoice not found 2021-03-06 13:25:40 +09:00
dc0671942d Make main menu show text instead of icons when on small screens 2021-03-05 08:48:15 +01:00
f79c8ab641 Xpub import: Toggle multi-sig examples 2021-03-04 11:07:05 +01:00
314fda7877 Update import wallet cells 2021-03-03 22:27:39 +01:00
aaf77515fc Update icons 2021-03-03 21:29:03 +01:00
b5f7b1aad4 Hover and active states for wizard navigation 2021-03-03 21:17:25 +01:00
d36974a47e Fix test 2021-03-02 12:26:19 +01:00
5bd16f990c Add replace confirmation; distinguish wallet types 2021-03-02 12:26:18 +01:00
28d7924077 Fix AltcoinTests 2021-03-02 12:26:17 +01:00
89ecba961c Remove old AddDerivationSchemes views 2021-03-02 12:26:16 +01:00
3481a5fd19 Fix wording 2021-03-02 12:26:15 +01:00
70a21c5136 Refactoring: Move checking condition up 2021-03-02 12:26:15 +01:00
2e2c9764f3 Remove old Stores.BTCLike controller 2021-03-02 12:26:14 +01:00
bd447b6c79 Fix test 2021-03-02 11:50:01 +09:00
4f6ec3aa32 Merge pull request from btcpayserver/fix/nextnetworkfee-null
Returning 0 for NextNetworkFee if it's null
2021-03-02 11:19:43 +09:00
e37b3179ba Reactivate CanGetRateCryptoCurrenciesByDefault for DSH 2021-03-02 11:14:52 +09:00
808214f973 Fix Rates Test (Dash rate source switched to bitfinex) ()
fixes 
2021-03-02 11:13:05 +09:00
7e714f1ef8 Refactor how we handle and validate LN ConnectionStrings ()
* Refactor how we handle and validate LN ConnectionStrings

* Migrate existing connection string to Internal Node if they are the same. Cleanup some obsolete fields

* Fix typos, remove duplicated method

* Add a InternalNodeRef to LightningSupportedPaymentMethod
2021-03-02 11:11:58 +09:00
e65e46f664 NextNetworkFee is not directly initialized, falling back to null check 2021-03-01 09:56:57 -06:00
5e7eb6635f Initializing NextNetworkFee values if GetFee returns null 2021-03-01 09:33:02 -06:00
49ae62b02e Use library for Payjoin Sender ()
* Use library for Payjoin Sender

* update payjoin sender to use new package and reduce code

* fix using statements
2021-03-01 22:44:53 +09:00
c9cfe5cc6e Fix direct URL for local storage with custom root path ()
* Fix direct URL for local storage with custom root path

* Remove "Context.Request.PathBase" when generating file URL display string
2021-03-01 22:43:57 +09:00
e8df010449 Add redirectAutomatically to GreenField Invoice API () 2021-03-01 22:34:07 +09:00
949136b161 GreenField API: Configure Store Lightning Payment Method v2 ()
* GreenField API: Configure Store Lightning Payment Method

* Remove internal ln node endpoint and use Auth service to check internal node usage

* fix test
2021-02-26 11:58:51 +09:00
1e00c63146 Merge pull request from dennisreimann/policies-ui
Improve policies structure and wordings
2021-02-26 11:49:00 +09:00
6d9b93a407 Merge pull request from dennisreimann/pos-item-button-text
PoS: Custom buy button text per product
2021-02-26 11:45:44 +09:00
37c39ad587 Merge pull request from btcpayserver/invoice-status-marker
Allow invoice to be marked even when new
2021-02-26 11:26:09 +09:00
e3e65878aa Allow invoice to be marked even when new
fixes 
2021-02-26 11:17:03 +09:00
6843b0eaab Merge pull request from btcpayserver/gf/paymenttypeparse
Make payment type parsing more dynamic
2021-02-26 11:00:27 +09:00
e25f76753a Update BTCPayServer.Tests/README.md
Co-authored-by: Max Hillebrand <30683012+MaxHillebrand@users.noreply.github.com>
2021-02-24 17:16:27 +01:00
75c2fabd7f Make Selenium test more robust
Fixes an issue similar to what we fixed in .
2021-02-24 15:10:05 +01:00
35aeb19fcd Controller cleanups 2021-02-24 15:10:04 +01:00
5a00f6a4fc Fix missing view name 2021-02-24 15:10:03 +01:00
3a9fc52b8c Add "vertical-align: middle;" to pay button image CSS ()
closes 
2021-02-24 15:10:02 +01:00
64a8de938b Update BTCPayServer.Tests/README.md
Co-authored-by: Pavlenex <pavle@pavle.org>
2021-02-24 15:09:45 +01:00
605cf407a8 Update README.md
Update README.md 
2021-02-24 15:06:16 +01:00
9ed5297e91 Update README.md
Using Polar to test Lightning payments.
2021-02-24 15:06:15 +01:00
07da404a23 Merge pull request from dennisreimann/webhooks-controller
Webhooks controller fix and cleanup
2021-02-24 22:03:01 +09:00
21467ef65d Add "vertical-align: middle;" to pay button image CSS ()
closes 
2021-02-24 22:01:05 +09:00
4d5b2c4033 Make Selenium test more robust
Fixes an issue similar to what we fixed in .
2021-02-23 16:57:21 +01:00
5e7836b293 Controller cleanups 2021-02-23 16:51:58 +01:00
a6fe61d508 Fix missing view name 2021-02-23 16:51:11 +01:00
c0aa320f0a Improve policies structure and wordings
Closes .
2021-02-23 10:39:26 +01:00
4bcc18fb41 JavaScript formatting fixes 2021-02-23 09:51:25 +01:00
32370545cb Fix variable assignment in yaml parsing loop 2021-02-23 09:50:54 +01:00
2fd8c831c0 Merge pull request from radWorx/dev-with-polar
Update README.md
2021-02-22 10:22:16 +01:00
5b4877c402 PoS: Custom buy button text for custom price 2021-02-22 08:59:59 +01:00
71c11b34f4 Make payment type parsing more dynamic
fixes bug described in 
2021-02-19 08:23:55 +01:00
3123718166 Crowdfund: Add custom buy button text 2021-02-18 12:32:43 +01:00
dfbec71906 PoS: Add test for custom buy button text 2021-02-18 12:20:27 +01:00
757c087afd PoS: Custom buy button text per product
Closes .
2021-02-18 10:54:06 +01:00
b30aa968b0 Merge pull request from dennisreimann/flaky-selenium
Tame flaky Selenium tests
2021-02-18 09:39:28 +01:00
1e902c8dee Tests: Toggle advanced settings via JS instead 2021-02-17 15:54:05 +01:00
db5f64432e Tests: Wait for advanced settings closing animation 2021-02-17 12:34:58 +01:00
6c9c463da9 Fix plugin projects reference in solution ()
Fixes .
2021-02-17 10:56:48 +01:00
c73878ccca Fix missing hot wallet option on seed import ()
* Fix missing hot wallet option on seed import

Thanks @kukks for spotting!

* Tests: Wait for button to be ready for interaction

* Camelcase test selectors

* Tests: Remove general ImplicitWait

* Tests: Add WaitForAndClick helper

* Tests: Refactor SetCheckbox

* Tests: Add WaitForElement helper

* Tests: Refactor and use wait.UntilJsIsReady helper

* Fix missing helper in ethereum tests

* Tests: Some more refactorings
2021-02-17 12:14:29 +09:00
41e453306d Merge pull request from bumbummen99/patch-4
Fix view payment request loading spinner alignment
2021-02-17 12:10:18 +09:00
626c6007fd Merge pull request from btcpayserver/remove-upload-limit
Remove Max body request size
2021-02-16 10:40:43 +09:00
deb88032cb Update README.md
added missing space,
moved below Using the test lightning-cli
2021-02-15 15:15:38 -05:00
eca317b3c4 Fix view payment request loading spinner alignment 2021-02-15 16:37:38 +01:00
9300326483 Remove Max body request size
Upload limit by kestrel restricts plugin upload of 30mb+. this removes that limit
2021-02-15 13:42:08 +01:00
ebc46eb7d2 fix swagger docs missing query param
fixes 
2021-02-15 10:05:54 +01:00
cb83669802 Merge pull request from bumbummen99/patch-2
Fix cart pay button loading spinner vertical alignment
2021-02-15 11:17:57 +09:00
f6f616a21d Fix cart pay button loading spinner vertical alignment 2021-02-14 21:05:26 +01:00
62d50c0189 Profile email change should check email's availability () 2021-02-12 16:48:43 +09:00
dd5b143c13 Update BTCPayServer/Controllers/ManageController.cs
Co-authored-by: d11n <mail@dennisreimann.de>
2021-02-12 16:48:26 +09:00
2e864c32fa Profile email change should check email's availability 2021-02-12 12:48:05 +09:00
f4fa7c927c Wallet setup redesign ()
* Prepare existing layouts and views

* Add icon view component and sprite svg

* Add wallet setup basics

* Add import method view basics

* Use external sprite file instead of inline svg

* Refactor hardware wallet setup flow

* Manually enter an xpub

* Prepare other views

* Update views and models

* Finalize wallet setup flow

* Updat tests, part 1

* Update tests, part 2

* Vaul: Fix missing retry button

* Add better Scan QR subtext

Still tbd.

* Make wallet account an advanced setting

* Prevent empty xpub

* Use textarea for seed input

* Remove redundant error message for missing file upload

* Confirm store updates after generating a new wallet

* Update wording

* Modify existing wallets

* Fix proposed method name

* Suggest using ColdCard Electrum export option only

Advise the user to use the electrum export of the coldcard instead of saying either electrum or wasabi export file … the electurm one contains more info, e.g. the wasabi one doesn't include the account key path.

* More concise WalletSetupMethod setting

* Test fix

* Update wallet removal code

* Fix back navigation quirk in change wallet case

* Fix behaviour on wallet enable/disable

* Fix initial wallet setup

* Improve modify view and messages

* Test fixes

* Seed import fix

Uses the correct form url for confirming addresses

* Quickfixes from design meeting

* Add enable toggle switch on modify page

* Confirm wallet removal

* Update setup view

* Update import view

* Icon finetuning

* Improve import options page

* Refactor QR code scanner

Allow for usage with and without modal

* Update copy and instructions on import pages

* Split generate options: Hot wallet and watch-only

* Implement hot wallet options correctly

* Minor test changes

* Navbar improvements

* Fix tables

* Fix badge color

* Routing related updates

Thanks @kukks for the suggestions!

* Wording updates

Thanks @kukks for the suggestions!

* Extend address types table for xpub import

Thanks @kukks for the suggestions!

* Rename controller

* Unify precondition checks

* Improve removal warning for hot wallets

* Add tooltip on why seed import is not recommended

* Add tooltip icon

* Add Specter import info
2021-02-11 19:48:54 +09:00
3736cbc107 Merge pull request from dennisreimann/specter-wallet-file
Add Specter wallet file import
2021-02-10 23:02:26 +09:00
776825cc66 Merge pull request from dennisreimann/onchain-symbol
Invoices list: Remove icon indicator for onchain
2021-02-10 22:48:34 +09:00
5cb647e57f Merge pull request from bolatovumar/fix-2247
Ensure "No" selection is maintained for custom price in POS app
2021-02-10 22:42:55 +09:00
9c5f826bb4 Merge pull request from bumbummen99/patch-1
Fix current version
2021-02-10 22:35:34 +09:00
6b1803629d Merge pull request from dennisreimann/tabindex
Login: Improve tab navigation for input fields
2021-02-10 22:35:09 +09:00
5cea0571e3 Merge pull request from dennisreimann/checkout-tabs
Checkout: Fix scan/copy tab sizes with varying content
2021-02-10 22:34:24 +09:00
95c8afd5ba Merge pull request from ketominer/fix-mysql-2021
fixed mysql support
2021-02-10 18:26:20 +09:00
ecc9a34359 Checkout: Fix scan/copy tab sizes with varying content
Fixes .
2021-02-08 17:54:40 +01:00
1fed7fb5af fix for sqlite 2021-02-07 21:14:31 +01:00
93d1ded4c2 fixed mysql support 2021-02-07 20:57:48 +01:00
f199775437 Register: Autofocus email field on page load 2021-02-05 13:04:21 +01:00
40271f420d Login: Improve tab navigation for input fields
Improves the tab indexes so that keyboard navigation goes: Email > Password > Sign in > Create account > Forgot password.

Also autofocuses the email field so that you can start typing right away.

Closes .
2021-02-05 13:01:55 +01:00
9e71c02eb9 Merge pull request from pavlenex/readme-improvements
Readme overhaul
2021-02-05 11:29:16 +01:00
c9cbfe630d Fix current version 2021-02-05 03:02:15 +01:00
bf9331b147 Merge pull request from dennisreimann/api-lightning
Fix empty GetLightningClient return value
2021-02-04 11:26:15 +09:00
f223d2e00c Add Specter wallet file import
Closes .
2021-02-03 16:36:45 +01:00
5246e7f035 Fix empty GetLightningClient return value 2021-02-03 11:19:35 +01:00
42de0803c9 Ensure "No" selection is maintained for custom price in POS app 2021-02-02 20:13:39 -08:00
242f9c6197 Merge pull request from btcpayserver/feat/lnd-0.12.0-beta
Updating development LND to v0.12.0-beta
2021-02-02 12:56:29 +09:00
5288198474 Updating connection to merchant_lnd for tests 2021-02-01 01:37:58 -06:00
b21353c4f9 Updating LND in altcoins docker file as well 2021-02-01 01:37:12 -06:00
65a0c6a4b3 Updating development LND to v0.12.0-beta 2021-02-01 00:55:13 -06:00
af5bd89f34 Invoices list: Remove icon indicator for onchain
As [discussed on the chat](https://chat.btcpayserver.org/btcpayserver/pl/tcjy5ornhbd8i8jm4yj9y3maie) the icon feels unnecessary and isn't clear to users. Leaving it off and only indicating Lightning transactions avoids confusion.
2021-01-30 18:53:21 +01:00
73aeffd13c Apply suggestions from code review
Co-authored-by: britttttk <39231115+britttttk@users.noreply.github.com>
2021-01-30 10:58:48 +01:00
03d2f6c017 Merge pull request from btcpayserver/invoice-metadata-test
Improve test on Greenfield Inoice metadata update
2021-01-30 11:17:11 +09:00
7e1481c43f Apply suggestions from code review
Co-authored-by: Zaxounette <51208677+Zaxounette@users.noreply.github.com>
2021-01-29 18:31:41 +01:00
8a1069bf70 Apply suggestions from code review
Co-authored-by: Zaxounette <51208677+Zaxounette@users.noreply.github.com>
2021-01-29 18:30:57 +01:00
6097ab5d12 Update README.md
Co-authored-by: d11n <mail@dennisreimann.de>
2021-01-29 14:04:35 +01:00
d951575f80 Merge branch 'readme-improvements' of https://github.com/pavlenex/btcpayserver into readme-improvements 2021-01-29 12:38:47 +01:00
d887546e58 remove chat 2021-01-29 12:37:59 +01:00
ec3b80cec9 Apply suggestions from code review
Co-authored-by: Andrew Camilleri <evilkukka@gmail.com>
2021-01-29 12:36:12 +01:00
2ef442cf83 Improve readme 2021-01-29 12:19:51 +01:00
6e5a4a7546 Update changelog.md 2021-01-29 18:36:26 +09:00
e0d46002cb Changelog 1.0.6.8 2021-01-29 18:31:40 +09:00
739f13b7a3 Merge pull request from dennisreimann/safe-browsing
Safe browsing quick fixes
2021-01-29 18:24:11 +09:00
34af74b288 Apply URL changes from code review
Co-authored-by: Andrew Camilleri <evilkukka@gmail.com>

Update BTCPayServer/Controllers/AccountController.cs

Co-authored-by: Andrew Camilleri <evilkukka@gmail.com>

Update BTCPayServer/Controllers/AccountController.cs

Co-authored-by: Andrew Camilleri <evilkukka@gmail.com>

Update BTCPayServer/Controllers/AccountController.cs

Co-authored-by: Andrew Camilleri <evilkukka@gmail.com>

Update BTCPayServer/Controllers/AccountController.cs

Co-authored-by: Andrew Camilleri <evilkukka@gmail.com>

Update BTCPayServer/Controllers/AccountController.cs

Co-authored-by: Andrew Camilleri <evilkukka@gmail.com>

Update BTCPayServer/Controllers/AccountController.cs

Co-authored-by: Andrew Camilleri <evilkukka@gmail.com>
2021-01-28 12:33:12 +01:00
4ee0cc8145 Remove clipboard code from main-bundle
See https://github.com/btcpayserver/btcpayserver/issues/2139#issuecomment-768216462
2021-01-28 10:48:06 +01:00
4984674b1d Remove Tor URL from login and register page
Brave and Tor Browser now show availaibility of Tor automatically in the url box of the browser.
2021-01-28 10:47:28 +01:00
f5ee67aafb Remove allowtransparency from checkout overlay 2021-01-28 10:34:34 +01:00
98a1b0da71 Update public account URLs
- /Account/Login -> /login
- /Account/Register -> /register
- /Account/ForgotPassword -> /forgot-password
2021-01-28 10:08:22 +01:00
074ff76d49 Merge pull request from dennisreimann/selenium-tests
Selenium tests: Remove hacks, make them more reliable
2021-01-27 17:50:57 +09:00
b75409a6bf Remove Firefox as option for Selenium tests 2021-01-27 09:35:14 +01:00
94abda6e3e bump lightning libs 2021-01-27 17:21:18 +09:00
68419a9510 Improve password reset email copy ()
* Reset password email copy unified and updated

* Grammar fix for reset email copy

* Email strings added to facilitate html and style and call to action

* First pass html. Saving for later

* Compacted the html and inline styles and removed logo

Co-authored-by: Salie Hendricks <salie@safarinow.com>
2021-01-27 08:42:47 +01:00
db0854f203 Update NBitcoin, NetworkType => ChainName, signet support () 2021-01-27 14:39:38 +09:00
994301ea4c Bump Bitcoin Core and NBXPlorer () 2021-01-26 21:01:32 +09:00
5e344b9be7 Fix missing user secrets code 2021-01-26 10:22:17 +01:00
66d3da8ac9 Remove function checks as they didn't help 2021-01-26 09:40:31 +01:00
71bb876c9e Configure browser settings with user secrets
Default to headless Chrome
2021-01-25 17:23:08 +01:00
1e029f3290 Fix EthereumTests 2021-01-25 16:49:20 +01:00
7926b689fd Default to headless, add Firefox, update Chrome 2021-01-25 15:01:53 +01:00
4638f781f9 Fix JS error 2021-01-25 14:11:11 +01:00
8bea1505dd Cleanups, remove WaitForPageLoad hack 2021-01-25 14:10:40 +01:00
e567f7a80c Refactor tests
Remove the hacky `ScrollTo`, `ForceClick` and `WaitForElement`.
Add the hacky `WaitForPageLoad`.
2021-01-25 13:04:58 +01:00
3774e8dc51 Merge pull request from btcpayserver/feat/new-error-pages
New Error Pages
2021-01-24 23:49:36 -06:00
dc27ffa6ba Http error page 406 for our dear man Jack
Yes, acceptable
2021-01-24 13:41:30 -06:00
ca25eedfbc Extracting common layout for Error Pages 2021-01-24 13:33:34 -06:00
1627c05224 Fixing typos and grammar
Co-authored-by: Umar Bolatov <bolatovumar@gmail.com>
2021-01-24 13:19:26 -06:00
f65ca04507 Http error 502, Miles page 2021-01-24 13:19:26 -06:00
a662b6ef6a Http error 417, page for Pavlenex 2021-01-24 13:19:26 -06:00
bd6d38b3b0 Tests: Move extension method 2021-01-22 12:57:46 +01:00
a890d5300b Update BTCPayServer.Tests/README.md
Co-authored-by: Pavlenex <pavle@pavle.org>
2021-01-19 13:30:45 -05:00
eb8411611a Update README.md
Update README.md 
2021-01-19 13:07:19 -05:00
9360ddf294 Merge branch 'dev-with-polar' of https://github.com/radworx/btcpayserver into dev-with-polar 2021-01-19 13:04:32 -05:00
e3c138fa98 Update README.md
Update README.md 
2021-01-19 13:02:26 -05:00
7147dadb2a Remove dependency to DBriize 2021-01-19 17:19:32 +09:00
8d03738a50 Update BTCPayServer.Tests/README.md
Co-authored-by: britttttk <39231115+britttttk@users.noreply.github.com>
2021-01-18 22:52:21 -05:00
e5540ee79f Update BTCPayServer.Tests/README.md
Co-authored-by: britttttk <39231115+britttttk@users.noreply.github.com>
2021-01-18 22:52:09 -05:00
2ccbb6d6a7 Update BTCPayServer.Tests/README.md
Co-authored-by: britttttk <39231115+britttttk@users.noreply.github.com>
2021-01-18 22:51:59 -05:00
3dce7e7e9f Update README.md
Using Polar to test Lightning payments.
2021-01-18 22:15:52 -05:00
79e8ce9226 Improve test on Greenfield Inoice metadata update 2021-01-18 14:24:38 +01:00
89857ca77c Merge pull request from btcpayserver/fix/error-pages
Improving styling of error pages in preparation for adding new ones
2021-01-17 10:10:02 -06:00
5ce60be78a Update BTCPayServer/Views/Shared/_BTCPaySupporters.cshtml
Co-authored-by: d11n <mail@dennisreimann.de>
2021-01-17 10:09:50 -06:00
600cc20423 changelog 2021-01-17 21:50:02 +09:00
987d09041d bump 2021-01-17 21:45:54 +09:00
df52d01a1d Revert "GreenField API: Configure Store Lightning Payment Method"
This reverts commit b40095f6039dbce20ee92b2da8cd4530c7b8b486.
2021-01-17 21:40:16 +09:00
07de4af581 Revert "Apply suggestions from code review"
This reverts commit 48b2e682bf758ad76b8a50ddcc4473a19f5b0836.
2021-01-17 21:39:20 +09:00
95c50dcc0d Changelog and new release ()
* Changelog and new release

* Update Changelog.md
2021-01-17 19:14:36 +09:00
71a192d0ba Fix SQLite COnnection string setter 2021-01-17 10:02:59 +01:00
9acb8c2ba2 Restoring project name in partial 2021-01-16 16:26:35 -06:00
307f7b6bd7 Improving styling of error pages in preparation for adding new ones 2021-01-16 14:55:31 -06:00
83dd80ae86 Prevent access to wallet features if derivation scheme isn't set () 2021-01-16 19:48:05 +09:00
ccfa85b5e0 fix compile errors 2021-01-16 09:22:07 +01:00
e59821caa1 GetInvoiceRaw used its own dbContext while calling code used a different one which causes the calling context not to track changes - thus nothing is saved. ()
Co-authored-by: Salie Hendricks <salie@safarinow.com>
2021-01-16 09:00:19 +01:00
2215e5e069 Merge pull request from btcpayserver/gf/ln-payment-emthod
GreenField API: Configure Store Lightning Payment Method
2021-01-14 10:07:00 +01:00
48b2e682bf Apply suggestions from code review
Co-authored-by: Dennis Reimann <mail@dennisreimann.de>
2021-01-14 09:19:16 +01:00
5750da574a Add info on how to run the altcoin docker-compose () 2021-01-13 19:26:53 +01:00
b40095f603 GreenField API: Configure Store Lightning Payment Method 2021-01-12 09:25:35 +01:00
ec11585223 Update Changelog 2021-01-11 23:46:17 +09:00
eedf189d44 Improve logs of the invoice text search import 2021-01-11 23:41:05 +09:00
f027d36db8 Do not spam logs for inventory events 2021-01-11 23:33:21 +09:00
0c79474e0c Do not index metadata 2021-01-11 23:32:32 +09:00
610f9e2b22 Log text search migration progress 2021-01-11 23:06:59 +09:00
4db4b28369 Fix crash if DerivationSchemeSettings.Parse parse a 2-of scheme 2021-01-11 22:47:32 +09:00
18464f5cd5 bump 2021-01-11 19:12:48 +09:00
cf24c1307a Changelog 1.0.6.5 ()
* Changelog 1.0.6.5

* Update Changelog.md

Co-authored-by: Zaxounette <51208677+Zaxounette@users.noreply.github.com>

Co-authored-by: Zaxounette <51208677+Zaxounette@users.noreply.github.com>
2021-01-11 19:12:00 +09:00
35e870a8e7 Revert "Remove tests of chaincoin default rate provider ()"
This reverts commit 56daf347b914cf60a99128b96fdca94072af95a5.
2021-01-11 12:11:25 +09:00
01be74b219 Add Bitcoin Output descriptor support ()
* Add Output descriptor support

* Fix exception message and fix Parse Deriv Scheme Settings when electrum

* fix test
2021-01-11 11:22:42 +09:00
b8da6847b9 Plugins flexibility PR ()
* Plugins flexibility PR

* Makes the BTCPayServerOptions.LoadArgs async to support Plugin hooks and actions
* relax the private set modifiers in the BTCPayNetwork
* Separate IPluginHookService from PluginService to reduce dependencies on DI
* fix some small bugs around image path
* Fix bug with new dbreeze migration where data dir was incorrect

* Update BTCPayServer/Plugins/PluginHookService.cs

Co-authored-by: rockstardev <5191402+rockstardev@users.noreply.github.com>

* Update BTCPayServer/Plugins/PluginHookService.cs

Co-authored-by: rockstardev <5191402+rockstardev@users.noreply.github.com>

Co-authored-by: rockstardev <5191402+rockstardev@users.noreply.github.com>
2021-01-07 14:49:53 +01:00
e2e37a0db4 Make sure that the invoice currency is normalized to uppercase (Fix ) 2021-01-07 22:30:57 +09:00
56daf347b9 Remove tests of chaincoin default rate provider () 2021-01-07 22:11:14 +09:00
5098f63175 Merge pull request from dennisreimann/patch-1
UI: Wrap notification text
2021-01-07 14:01:21 +01:00
d9b12a6927 UI: Wrap notification text
Fixes .
2021-01-07 13:58:23 +01:00
fe4ffcfc62 Update notification dropdown styling ()
* Update notification dropdown strings

* Update notification dropdown styling

address 

* Update border color

* Update notification hover color

* Revert "was confirmed paid" to "has been paid" change

* Move styles to site.css

* Update style="border-bottom: 0;" to border-bottom-0

* Update heading

* Add icon sprite

* Add default icon styles

* Use "currentColor" instead of specific color for icon

* Update icon color definition

* Adjust dropdown position

* Update h4 to h5
2021-01-07 18:07:42 +09:00
64a68b95b0 Add API Key QR scan + click to reveal api key in List view () 2021-01-07 17:56:35 +09:00
58d01738ab More Options refactoring ()
* More Options refactoring

Continues refactoring config classes to use the propert Options pattern where possible.
DataDirectories and DatabaseOptions are now configured the Options pattern and the BTCPayOptions is now moved alongside the other config setup

* Move COnfigure logic for Options to the Startup
2021-01-06 23:51:13 +09:00
a18dae6d04 Merge pull request from btcpayserver/fix/deleting-dbriize
Deleting DBriize database folder if present
2021-01-06 10:59:24 +09:00
b2959e583a Use default color for label if the color of a label is not set 2021-01-05 16:33:24 +09:00
a38a4d6f69 Merge pull request from btcpayserver/attempt-onion-modal-fix
Do not tell tor browser to redirect if invoice is loaded as a modal
2021-01-05 14:04:14 +09:00
0a6ea59254 Rewrite the condition to show Onion-Location in a more readable way 2021-01-05 13:44:08 +09:00
04984a51e6 Fixing bug when MigratedInvoiceTextSearchPages is null 2021-01-04 22:40:50 -06:00
8947f13dbe Deleting legacy DBriize database if present 2021-01-04 22:35:00 -06:00
c0549d872c Bump HtmlSanitizer from 4.0.217 to 5.0.372 in /BTCPayServer ()
Bumps [HtmlSanitizer](https://github.com/mganss/HtmlSanitizer) from 4.0.217 to 5.0.372.
- [Release notes](https://github.com/mganss/HtmlSanitizer/releases)
- [Commits](https://github.com/mganss/HtmlSanitizer/compare/v4.0.217...v5.0.372)

Signed-off-by: dependabot[bot] <support@github.com>

Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2021-01-05 13:22:39 +09:00
adcd5f0737 Update year () 2021-01-05 12:38:30 +09:00
0929857b12 Attempt to solve webhooks disappearing () 2021-01-05 12:38:12 +09:00
7d21b39534 Do not tell browser to redirect if invoice is loaded as a modal
fixes 
2021-01-03 14:29:19 +01:00
aaf85216eb Split Options in BTCPayOptions ()
* Split Options in BTCPayOptions

* fix spacing
2021-01-02 13:44:28 +01:00
2c87100ffb Restoring tracking of selected objects so updates work as expected 2021-01-01 02:01:33 -06:00
6c22546577 Merge pull request from btcpayserver/fix/db-refactoring
Refactoring db entities to follow conventions
2021-01-01 01:58:52 -06:00
24177ffc46 Removing partial class since Emperor requested it 2020-12-31 14:08:58 -06:00
8ae4315d43 Database Migration: Removing migration with wrong table name and refreshing 2020-12-31 14:08:58 -06:00
a588c72e6c Database Migration: Renaming InvoiceSearches table to follow convention 2020-12-31 14:08:58 -06:00
a656f86003 Refactoring ApplicationDbContext to order tables and OnModelCreating calls 2020-12-31 14:08:58 -06:00
c9dc60be7b Refactoring Data entities to fit one standard convention 2020-12-31 14:08:57 -06:00
91cb9129ab FGreenField: Add DefaultPaymentMethod to Stores API () 2020-12-29 18:33:44 +09:00
ae32fdeea7 Introduce Additional Data to Store Blob and move obsolete props to migration ()
* Introduce Additional Data to Store Blob and move obsolete props to migration

* Fixes and tests

* Small adjustements to prevent tracking too many objects

Co-authored-by: nicolas.dorier <nicolas.dorier@gmail.com>
2020-12-29 17:58:35 +09:00
5803512820 Remove Default from OnChainPayment Method ()
Makes more sense to do it on the Store endpoint after thinking about it.
2020-12-29 17:38:31 +09:00
553b1f139b Updating links to Zap wallet now that domain moved 2020-12-28 17:18:12 -06:00
623347bc48 Add Label and accountKeyPath to the on chain payment methods () 2020-12-28 13:59:01 +01:00
f64f86fbb6 Make sure the invoice migration loop can be interrupted 2020-12-28 19:13:00 +09:00
39b5462809 Remove only dependency on Dbriize (TextSearch in new invoice column) ()
* Remove only dependency on Dbriize (TextSearch in new invoice column)

* Switch to table for invoice text search

* Adding missing using after rebase

* Removing database migration in preparation for refresh

* Database Migration: Adding InvoiceSearchData

* Refactoring InvoicesRepository to make AddToTextSearch static and non-async

Operation as async is too expensive for simple filtering and AddRange

* Renaming InvoiceQuery property to Take

More inline with what property does by convention, Take is used in conjuction with Skip

* Refactoring SettingsRepository so update of settings can happen in another context

* Adding DbMigrationsHostedService that performs long running data migrations

* Commenting special placing of MigrationStartupTask

* Simplifying code and leaving comment on expected flow

* Resolving problems after merge

* Database Migration: Refreshing database migration, ensuring no unintended changes on ModelSnapshot

Co-authored-by: rockstardev <rockstardev@users.noreply.github.com>
Co-authored-by: Nicolas Dorier <nicolas.dorier@gmail.com>
2020-12-28 19:10:53 +09:00
a6ee64ea63 Remove DB and Directory settings out of the BTCPayServerOptions () 2020-12-27 22:06:00 +09:00
0dcd834535 Improve error checks 2020-12-23 14:10:53 +09:00
f0fc0441bd Remove useless constant 2020-12-23 14:07:24 +09:00
69eaaef963 GreenField: Store OnChain Payment Method ()
* GreenField: Store set payment methods

* add swagger docs

* fix swagger
2020-12-23 14:00:38 +09:00
9dbfe22171 add greenfield authorize UI docs and fix small issues ()
* add greenfield authorize UI docs and fix small issues

* Update ManageController.APIKeys.cs

* Apply suggestions from code review

Co-authored-by: Dennis Reimann <mail@dennisreimann.de>

Co-authored-by: Dennis Reimann <mail@dennisreimann.de>
2020-12-23 13:19:38 +09:00
5ca4e71c34 Introduce QR Code View component ()
* Introduce QR Code View component

* more cleanup

* fix js clipboard

* Fix clipboard confirmation width calculation

* fix tests

Co-authored-by: Dennis Reimann <mail@dennisreimann.de>
2020-12-22 11:18:51 +09:00
26b04e70b1 Fix for classic theme header CSS ()
Fixes .
2020-12-21 14:43:33 +01:00
ad2430496d UI improvements ()
* UI: Consistent spacing on maintenance view

* UI: Empty states for apps, stores and wallets

* UI: Empty state for file storage

* UI: Toggle invoice selection in list on row click

* Update ChromeDriver

* Fix selector in payjoin test
2020-12-21 12:26:43 +01:00
d4ecfa79d6 rename UIExtensionPoint folder ()
Rename to avoid build crashes on Ubuntu
2020-12-21 05:32:41 +01:00
8f4cd929cd Changelog 1.0.6.4 2020-12-18 12:22:11 +09:00
fb213b0e0f Fix Coin selection label filtering 2020-12-17 16:24:49 +01:00
e48d18279c API: Fix behaviour after first admin signup ()
Without updating the `FirstRun` setting it is not possible to login after signing up via the API. Otherwise the `HomeController.Index` action always redirects to the Registration page.
2020-12-17 12:27:01 +01:00
5f46b48d45 API: Fix for invoice not found ()
In case the invoice ID was invalid, this resulted in an exception instead of a 404.
2020-12-17 06:43:43 +01:00
0cc24c8076 UI: Improve invoice view ()
* UI: Improve invoice view

- General improvements for the spacings on the page
- Hides rows of data in case they aren't present
- Improved the PoS data view so that it renders complex objects nicely and adds links for URLs

TDB: For the last row "Links" there's now a special `_urls` property, which renders a list of urls with the key being the title and the value being the URL.

* Update BTCPayServer/Views/Invoice/Invoice.cshtml

Co-authored-by: Andrew Camilleri <evilkukka@gmail.com>

* UI: Handle arrays in PosData view

Co-authored-by: Andrew Camilleri <evilkukka@gmail.com>
2020-12-16 09:15:33 +01:00
2738c749dc Attempt to fix bug of broken Mark as Seen button on deployed instances 2020-12-15 15:44:36 +09:00
a7b178b844 API Keys: Add usage examples link to docs () 2020-12-15 14:35:18 +09:00
69c44b19d4 Merge pull request from pavlenex/master
Re-structure issue template
2020-12-14 10:12:33 +01:00
e6abce8022 Apply Kukk's suggestions from code review
Co-authored-by: Andrew Camilleri <evilkukka@gmail.com>
2020-12-13 13:20:52 +01:00
ab64bbc3b0 bump version 2020-12-13 20:40:17 +09:00
5da83e9945 Changelog for 1.0.6.3 () 2020-12-13 20:39:22 +09:00
0e6a8cc33e improve bug report template
- Add emoji
- Add hidden text to avoid repetition when people file an issue
- add more blank space so it's clear where people need to type
- formatting and better context
2020-12-12 17:52:51 +01:00
2e2ea657ef delete feature request template
Feature request shouldn't be in the issues unless accepted by the community.
2020-12-12 17:40:37 +01:00
e5fb9e2d31 update config yml template 2020-12-12 17:37:00 +01:00
1386f205fd DateTime.Now.ToUniversalTime -> DateTime.UtcNow 2020-12-12 15:25:08 +09:00
a294ad41cb Ensure campaign status is shown correctly in minimal crowdfund app () 2020-12-12 15:23:59 +09:00
ed497cab99 Hide pagination & page size when not necessary ()
* UI: Hide pagination and page size when not necessary

* UI: Use pager component for notifications list

* UI: Use pager component for wallet transactions list

* UI: Improve pager component

* Fix from code review
2020-12-12 15:21:37 +09:00
282d0abb62 Remove bitpay translator () 2020-12-12 15:17:44 +09:00
034b732e7c GreenField: Update invoice metadata ()
* GreenField: Update invoice metadata

* add swagger

Co-authored-by: Nicolas Dorier <nicolas.dorier@gmail.com>
2020-12-12 15:15:34 +09:00
b1e9c005b7 Add "Mark all as seen" button to notification dropdown () 2020-12-12 14:14:50 +09:00
0d144d088e Refactor label implementation (Fix ) () 2020-12-12 14:10:47 +09:00
b2855e74ef Document miscallenous features in the swagger doc () 2020-12-12 14:07:25 +09:00
0652e30c30 GreenField: Notifications API ()
* GreenField: Notifications API

This refactors notifications so that we dont have a bunch of duplicated direct access to db contexts in controllers and then introduces new endpoints to fetch/toggle seen/remove  notifications of the current user.

* add tests + docs

* fix test

* pr changes

* fix permission json
2020-12-11 23:11:08 +09:00
1c58fabc30 Merge pull request from NicolasDorier/doclinks
Add links to API documentation for better discovery
2020-12-11 22:52:27 +09:00
262ba6ee1e Add links to API documentation for better discovery 2020-12-11 22:48:53 +09:00
e0534577d1 Make tests a big stronger 2020-12-11 13:41:39 +09:00
c12423f28b update languages 2020-12-11 12:58:13 +09:00
3dd6577b32 Use the FindBestMatch of LanguageService to fetch the checkout lang 2020-12-11 12:56:13 +09:00
a638b4fb28 Merge pull request from NicolasDorier/checkoutlink
Add checkoutLink and defaultLang to GreenField invoice
2020-12-11 12:28:17 +09:00
798cf66e3f Add checkoutLink and defaultLanguage to GreenField invoice 2020-12-11 12:04:18 +09:00
6cf29123f3 Merge pull request from btcpayserver/greenfield/redirectURL
Add redirectURL to create invoice on Greenfield
2020-12-10 22:33:43 +09:00
e65d42bd61 Add redirectURL to create invoice on Greenfield 2020-12-09 23:20:13 +09:00
febf8ac5b3 Fix doc for create invoice request 2020-12-09 22:55:00 +09:00
c8a9b66694 Merge pull request from bolatovumar/feat/add-pull-payment-css
Add ability to add custom CSS to pull payments
2020-12-09 21:33:16 +09:00
9c185f1081 Merge pull request from dennisreimann/store-setup-mobile
UI: Improve mobile store setup view
2020-12-09 18:43:49 +09:00
0a444508f8 UI: Improve mobile store setup view
According to [this comment](https://github.com/btcpayserver/btcpayserver/pull/2117#issuecomment-741255465).
2020-12-09 09:45:45 +01:00
1d00ee41c4 Merge pull request from dennisreimann/u2f-update
U2F: Update lib and improve error display
2020-12-09 17:33:22 +09:00
266434fe7b Merge pull request from btcpayserver/testfixer
Attempt to fix flaky tests
2020-12-09 16:44:46 +09:00
7c88333060 Merge pull request from btcpayserver/email-spam-protect
Introduce Spam protection
2020-12-09 16:43:49 +09:00
e0b561b12a Update new pull payment page heading 2020-12-08 18:25:59 -08:00
16e5e2d757 Add ability to associate custom CSS with a pull payment 2020-12-08 18:25:58 -08:00
8a07c62603 Merge pull request from dennisreimann/store-setup-mobile
UI: Improve mobile store setup view
2020-12-09 00:02:24 +09:00
4df847bc10 UI: Improve mobile store setup view
According to [this comment](https://github.com/btcpayserver/btcpayserver/pull/2087#issuecomment-737672180).
2020-12-08 15:33:20 +01:00
b5df44ce8e Merge pull request from btcpayserver/pay-button-app-fix
FIx Pay Button Link preview when app mode chosen
2020-12-08 22:54:42 +09:00
716952cd58 Attempt to fix flaky tests 2020-12-08 10:02:03 +01:00
7b9b418e93 FIx Pay Button Link preview when app mode chosen
Apps cannot have a link as they only have a POST action.
2020-12-08 09:49:51 +01:00
dfd7c6d4a6 add tests and reword setting 2020-12-08 08:12:29 +01:00
920caaa524 Pull language updates 2020-12-08 15:23:15 +09:00
13f10657b8 Fix bug: When creating API Key for non-admin, some checked permissions were not included (Fix and Fix ) 2020-12-08 15:20:59 +09:00
dd5fd2e5bb Make sure checkout is not null in createinvoice 2020-12-08 14:54:24 +09:00
97b00053c4 Do not crash on invocie creation error for greenfield (Fix ) 2020-12-08 14:47:20 +09:00
76e46d2fa7 Fix performance issues on query over orderId (fix ) 2020-12-08 14:43:39 +09:00
4c62c5dc22 Merge pull request from btcpayserver/fix/qr-fail-import
do not crash when importing a non-json based QR code
2020-12-06 12:03:57 +09:00
c7209df7e2 Fix swagger docs for pull payments ()
* Fix swagger docs for pull payments

fixes 

* Update BTCPayServer/wwwroot/swagger/v1/swagger.template.pull-payments.json

Co-authored-by: Dennis Reimann <mail@dennisreimann.de>

Co-authored-by: Dennis Reimann <mail@dennisreimann.de>
2020-12-04 12:03:27 +01:00
c17b8e4d9e Introduce Spam protection
fixes 

Adds 2 new options:
* Do not allow stores to use the email settings of the server. Instead, they would need to fill in the email settings in their own store
* Do not allow user creation through the API unless you are an admin.

Both are opt-in and turned off by default.
2020-12-04 08:08:05 +01:00
0ab33b704c do not crash when importing a non-json based QR code
fixes 
2020-12-04 07:41:02 +01:00
ba027de3f7 Merge pull request from btcpayserver/fix/uppercase-qrcode-2
Lowercasing the protocol in QR code because it's not widely supported
2020-12-04 14:43:59 +09:00
3ac257bfda Lowercasing the protocol in QR code because it's not widely supported
https://github.com/btcpayserver/btcpayserver/issues/2099#issuecomment-738550565
2020-12-03 23:39:18 -06:00
ec495ea4d1 bump 2020-12-04 14:15:18 +09:00
3b035158a2 Merge pull request from btcpayserver/fix/uppercase-qrcode
Reverting uppercasing of Bech32 addresses in QR code
2020-12-04 13:00:47 +09:00
36582a2741 Reverting uppercasing of Bech32 addresses in QR code 2020-12-03 17:30:14 -06:00
450d3cb7d2 bump 2020-12-03 23:30:34 +09:00
8d157ac5ca Merge pull request from btcpayserver/fix-sync
Fix sync not showing
2020-12-03 15:49:22 +09:00
89dc379761 Removing word Bitcoin from forks to satisfy Roger ()
Co-authored-by: rockstardev <rockstardev@users.noreply.github.com>
2020-12-03 06:34:38 +01:00
3e800e7e53 Update classic theme for payment requests ()
Fixes .
2020-12-02 15:21:03 +01:00
b12c6289d0 Fix link for webhooks 2020-12-02 20:37:38 +09:00
7e50267cb0 UI: Store setup finetuning ()
* UI: Store setup finetuning

Incorporate @dstrukt's improvement feedback from [this comment](https://github.com/btcpayserver/btcpayserver/pull/2011#issuecomment-735909927).

* Clean up and fix test
2020-12-02 07:45:00 +01:00
6714eb9f7f Fix bug with already used colors being used first for new tx labels ()
* Extend list of available tx label colors

* Ensure unknown label colors are given the least priority

closes 

* Remove new label colors
2020-12-02 07:38:05 +01:00
f1d6f0b2a6 Fix sync not showing
fixes 
2020-12-02 07:19:48 +01:00
445606e2b1 Wait for content to be loaded before U2F actions 2020-12-01 14:31:42 +01:00
ad05f479a8 U2F: Update lib and improve error display
The [previously used U2F library](https://github.com/fido-alliance/google-u2f-ref-code/) has been deprecated. The new one does not override the browsers `window.u2f` functionality if it is natively supported. It also displays the appropriate errors and falls back nicely in case the browser does not support U2F.
2020-11-30 12:43:15 +01:00
a78c1c8278 Update tx label dropdown position ()
close 
2020-11-26 08:57:40 +01:00
06d6d15441 Bump version 2020-11-26 00:15:40 +09:00
87676ece18 Merge pull request from NicolasDorier/changelog/1.0.5.10
Changelog 1.0.6.0
2020-11-26 00:14:52 +09:00
acfd3f1002 Changelog 1.0.5.10 2020-11-26 00:07:29 +09:00
d5cbe66b0e fix monero condition 2020-11-25 06:25:33 +01:00
88aa34747b Automatically generate permissions docs for GreenField ()
* Automatically generate permissions docs for GreenField

* Do a test instead
2020-11-24 10:10:32 +01:00
cc8dcade49 Fix QR code wallet import when not electrum format 2020-11-24 09:54:17 +01:00
a64dd9af16 remove hack 2020-11-23 19:39:53 +09:00
8405ce6369 Merge pull request from NicolasDorier/state-renaming
[Greenfield BREAKING CHANGE] Rename invoice states and payment states
2020-11-23 19:27:41 +09:00
18e68d04f9 Rename invoice states and payment states 2020-11-23 18:28:35 +09:00
f3010f622c fix test 2020-11-23 17:13:29 +09:00
ff87319a74 API: Handle lightning invoice creation errors ()
Catches LightningClient exceptions and responds with a detailed API error (400) instead of a generic server failure (503).
2020-11-23 06:40:13 +01:00
fa517417ed Ensure tx labels display correctly when there are many ()
fix 
2020-11-23 06:34:34 +01:00
f9b86a6b2e Merge pull request from btcpayserver/api/invoice-extras
GreenField: Add Invoice Payment methods endpoints
2020-11-20 10:25:00 +09:00
8a21dfa93f Merge pull request from Kukks/separate-ln-bitcoin-checkout-part2
Separate ln bitcoin checkout part2
2020-11-19 21:04:46 +09:00
c88ae2d7fe Merge pull request from Kukks/monero-fix
Fix monero sync height check
2020-11-19 21:03:46 +09:00
25e979687f Fix monero sync height check
based on issue at https://github.com/monero-project/monero/issues/7029
2020-11-19 12:27:05 +01:00
af866939f4 fix merge 2020-11-19 07:34:22 +01:00
e72becdfcb Merge branch 'master' into separate-ln-bitcoin-checkout-part2 2020-11-19 12:44:01 +09:00
4bd97eecc9 Merge pull request from Kukks/separate-btc-ln-checkout
Separate views of Bitcoin and LN
2020-11-19 12:42:17 +09:00
8ffe6dcfa0 Fix build 2020-11-19 12:40:07 +09:00
23002ac70d Merge pull request from Kukks/plugins-db
Plugins: Allow creation of independent DbContexts
2020-11-19 12:39:26 +09:00
1262ad3cd4 Fix warnings 2020-11-19 12:34:56 +09:00
d8f145c4dc Merge branch 'master' into plugins-db 2020-11-19 12:19:17 +09:00
9c5fd1b478 Merge pull request from NicolasDorier/webhook2
Add Webhooks in store's settings
2020-11-19 12:17:34 +09:00
24f3285003 Let migration assembly resolve from itself 2020-11-18 13:22:05 +01:00
179520a211 Plugins: Allow creation of independent DbContexts
This allows plugins to create custom dbcontexts, which would be namespaced in the scheme with a prefix. Migrations are supported too and the table would be prefixed too
2020-11-18 12:27:26 +01:00
ec31a4fe17 Improve Lightning node info view ()
* Cleanups

* Add store name

* Unify js/non-js HTML
2020-11-17 08:57:14 +01:00
ab780485b2 Center pay button content ()
close 
2020-11-17 08:18:50 +01:00
07c5c2972d Add callback doc 2020-11-16 12:13:27 +09:00
af593117e4 Merge pull request from Kukks/plugins-hooks-actions
Plugins: Hook System
2020-11-16 10:51:50 +09:00
931505d135 Plugins: Hook System
Almost an exact replica of https://developer.wordpress.org/plugins/hooks/
This will allow plugins to extend specific points in business logic, such as validation, invoice payload changes, etc
2020-11-15 14:39:21 +01:00
6c7433b2f1 Merge pull request from btcpayserver/feat/unified-qr
Unified QR code, BIP21 with lightning fallback
2020-11-14 12:11:26 -06:00
38ca0accde Removing section separators 2020-11-14 12:07:11 -06:00
df79c2cf48 Improve tests of webhooks 2020-11-14 13:39:44 +09:00
94bcbeb604 Add Greenfield API 2020-11-13 14:15:03 +09:00
35e45333b1 Uppercasing destination address in QR code if it's Bech32 2020-11-09 23:57:48 -06:00
f17a6f13a4 Adding uppercasing of BITCOIN: scheme 2020-11-09 23:46:31 -06:00
1bff7bdc47 Adding validation to ensure unified QR code works as expected 2020-11-09 23:41:29 -06:00
13cb2c695f Adding onChainWithLnInvoiceFallback parameter to swagger doc 2020-11-09 23:08:07 -06:00
c581b80132 ToUpper for lightning invoice part of unified QR code
Ref: https://github.com/btcpayserver/btcpayserver/pull/2060#issuecomment-723828348
2020-11-09 02:05:17 -06:00
4dd0ae8bdc UnitTest1.cs code reformatting 2020-11-09 01:48:45 -06:00
4db67e5bc5 Adding slight delay to make test less flaky
Ref:
https://app.circleci.com/pipelines/github/btcpayserver/btcpayserver/4181/workflows/101d7b31-e267-4f5a-9892-2abb7b6cb687/jobs/11557
2020-11-09 01:48:12 -06:00
6aa9122160 By convention ln invoices are usually lowercase 2020-11-09 01:14:28 -06:00
f84f2dca64 Adding option for unified onchain QR code to Checkout Experience 2020-11-09 01:11:03 -06:00
3c6992e910 Adding lightning invoice fallback to onchain bitcoin url if enabled 2020-11-09 00:23:09 -06:00
7f79d16f02 Code cleanup of used classes 2020-11-08 23:56:39 -06:00
790c386ba8 Renaming class for enabled text to be consistent between wallet and lightning 2020-11-08 23:33:49 -06:00
ee72badf21 Fixing HTML tag typo 2020-11-08 23:15:21 -06:00
c9c4453660 Fix-up links which ignore custom root path ()
address 
2020-11-08 09:39:10 +01:00
f3611ac693 Add Webhooks in store's settings 2020-11-08 15:57:24 +09:00
cc6fe24e82 Show significant letters in the derivation scheme in store settings 2020-11-08 11:29:36 +09:00
5a7730951a Fix create token button 2020-11-08 11:26:23 +09:00
eef729b5f9 API: Fix open channel validation condition () 2020-11-06 16:52:58 +01:00
0bb0a38649 Merge pull request from NicolasDorier/eventsaver
Decouple event saving from InvoiceNotificationManager
2020-11-06 22:52:19 +09:00
39029adcd8 Merge pull request from dennisreimann/store-setup
Store setup restructuring
2020-11-06 22:28:20 +09:00
c967f91abb Move some code out of InvoiceNotificationManager into InvoiceEventSaverService 2020-11-06 22:24:02 +09:00
1ba0685596 API Docs: Fix lightning invoice for store payload () 2020-11-06 14:00:10 +01:00
f2daa6a150 Improve store setup display 2020-11-06 11:14:00 +01:00
e021d42551 Ensure that there is no LN/Bitcoin specific logic in the Invoice UI endpoint 2020-11-06 11:09:17 +01:00
13509e31ca Don't warn, but hint 2020-11-06 10:50:23 +01:00
b9af805ac1 Store UI: Improve wallet status display 2020-11-06 10:50:22 +01:00
378d2bc8ba Store settings: Improve wallet display 2020-11-06 10:50:21 +01:00
b73aa55a75 Store setup: Restructuring basics 2020-11-06 10:50:20 +01:00
a729dd1380 Separate views of Bitcoin and LN 2020-11-06 09:35:26 +01:00
09335e2cf1 Plugins UI improvements ()
* Improve dependencies display

* Improve version information toggling
2020-11-06 08:06:37 +01:00
31738c465d Plugins: Load plugins by order, aesthetic plugin dependency system ()
* Plugins: Load plugins by order, aesthetic plugin dependency system

Introduces plugins loading in order of installation, BTCPay itself shows up as a system plugin, and that plugins can define other plugins as dependencies.

* use a proper type for plugin dependencies

* rebase fixes

* message when cannot install
2020-11-05 15:43:14 +01:00
38fb64130d Plugins: Recommended plugins and github Remote config options ()
This allows external integrations ( btcpay docker fragments) to highlight specific plugins as recommended to be installed. Also moved the remote option to  a config option instead of a url query param to avoid messy situations where users could get deceived with a generated url. The dockerfiles also have an additional csproj to build and the plugin dir was renamed correctly from extensions to plugins
2020-11-05 10:21:09 +01:00
493b10393b Add warning for zero-conf accept option ()
* Add warning for zero-conf accept option

close 

* Explicitly get element by id
2020-11-03 06:55:45 +01:00
b406f52670 Add warning to configure e-mail server ()
Adds a warning to configure the e-mail server before "Requires a confirmation mail for registering" checkbox can be checked if e-mail server is not configured.

close 
2020-11-03 06:53:49 +01:00
ef3f314754 Remove QuadrigaCX references ()
* Remove QuadrigaCX references

Quadriga has been dead for years. I've removed the references to them and replaced them with a different Canadian exchange (ndax) for example. 

The whole set of instructions could probably use an overhaul, but for now, at least let's get rid of Gerry's presence.

* Remove Quadriga from tests too

Co-authored-by: Kukks <evilkukka@gmail.com>
2020-11-02 13:10:55 +01:00
d2910686cd Fix link from app label () 2020-11-02 12:26:11 +01:00
793b1b56d9 Fix exception when saving checkout experience on new store () 2020-10-31 11:34:40 +01:00
d8f9075e2a Fix NRE 2020-10-30 00:19:23 +09:00
1199d4ead9 Merge pull request from bkiac/master
Fix failing generateaddress when address contains escape sequences in docker-bitcoin-generate.sh
2020-10-29 23:58:00 +09:00
4520e1bb3e Fix potential NRE in polling 2020-10-29 23:17:46 +09:00
afece8193e Fix possibly dirty generated bitcoin address 2020-10-29 14:16:23 +01:00
3b14585d1a Merge pull request from btcpayserver/missing-cs
Fix missing altcoins tab
2020-10-29 16:28:49 +09:00
9cd32a908f Fix missing altcoins tab 2020-10-28 18:04:19 +01:00
b9ca02088d Make a batch query for all pending invoice (Fix ) 2020-10-28 23:21:46 +09:00
440ce0221a Revert "Add thread limit for updating payment states for payment invoices in NBXplorerListener"
This reverts commit 5d9827fb6032a2716eb87ecdc3ce62d53c74e055.
2020-10-28 23:07:30 +09:00
caff7eda9f Revert "Add missing async/await keywords"
This reverts commit 8d0260b64490018c907f996d62f10b54c509dbc8.
2020-10-28 23:07:27 +09:00
aef1cefc18 changelog 1.0.5.9 2020-10-28 19:24:24 +09:00
1385c7cc9b Merge pull request from Rheopyrin/master
Add thread limit for updating payment states for payment invoices in NBXplorerListener
2020-10-28 18:43:50 +09:00
8d0260b644 Add missing async/await keywords 2020-10-27 21:17:56 +02:00
5d9827fb60 Add thread limit for updating payment states for payment invoices in NBXplorerListener 2020-10-27 21:09:53 +02:00
256d711fde fix 2020-10-27 11:01:22 +01:00
1d82c3779b Remove AwaitingConfirmation 2020-10-27 09:49:35 +01:00
abc9d07977 fix swagger format for dates 2020-10-27 09:47:22 +01:00
40d95acfb9 Apply suggestions from code review
Co-authored-by: Dennis Reimann <mail@dennisreimann.de>
2020-10-27 09:47:22 +01:00
9a92bc05db fix json types 2020-10-27 09:47:22 +01:00
8962bf00f6 GreenField: Add Invoice Payment methods endpoints
lets you fetch all active payment methods data + payments made
2020-10-27 09:47:21 +01:00
2083954aa5 add comment 2020-10-27 08:19:41 +01:00
66af258876 fix tests 2020-10-27 08:00:34 +01:00
4ba04031ef Fix specter image 2020-10-27 14:59:07 +09:00
a30456a92d Fix warnings 2020-10-26 14:19:05 +09:00
c8dd13577e Add nuget publishing for plugin packaer and abstractions () 2020-10-25 00:21:50 +09:00
fac35b46bb Display link for Pay button ()
fixes 
2020-10-24 23:52:39 +09:00
748cb778e0 Fix redirect when in modal ()
fixes 
2020-10-24 23:47:05 +09:00
bbcca24bcc Fix typos and improve wording & formatting () 2020-10-24 23:46:35 +09:00
b8c52b1120 fix decimal entry in payment requests ()
fixes 
2020-10-24 12:25:50 +02:00
b1b3ce48ee Toast messages in payment request ()
* Hide toast messages in print

Fixes .

* Optimize payment request toast messages
2020-10-24 10:20:19 +02:00
da864f4c6c bump nbx and nbitcoin 2020-10-24 15:27:48 +09:00
758f627e12 Partially paid invoices should be reused in payment requests. Cleanup the code. () 2020-10-23 21:00:23 +09:00
20322c6ab8 Improve payment print styles ()
* Improve payment print styles

Allows for export as invoice PDF to be used in accounting. Closes .

* Change Transaction ID wording

* Minor payment request UI improvements

* Add amount paid, rate and colorize payment status

* Display rate at invoice level

* Inherit text color in print

* Show full date in print view

* Rearrange payment details

* Add received date for payments

* Fix amount calculation

* Fix validInvoice assignment
2020-10-23 17:37:28 +09:00
7a711f0690 Merge pull request from Kukks/fix-email-search
fix email not included in textsearch
2020-10-23 17:26:10 +09:00
067b977ec8 Do not include maxadditionalfeecontribution if there is no change. () 2020-10-23 11:57:06 +09:00
58f0ca3d8a Improve plugins UI () 2020-10-22 10:58:22 +02:00
4176f3659b Add QR code scan/show for PSBT + Import wallet via QR ()
* Add PSBT QR code scan/show

This PR introduces support to show and read PSBTs in BC-UR format via animated QR codes.  This allows you to use BTCPay with HW devices such as Cobo Vault and Blue wallet to sign transactions without ever exposing the keys outside of that device.
Spec: https://github.com/BlockchainCommons/Research/blob/master/papers/bcr-2020-005-ur.md
I've also bumped the QR code library we sue as it had a bug with large datasets.

* Reuse same code for all and allow wallet import via QR code scan

* remove unecessary js vendor files

* Allow export wallet from settings via QR

* formatting

* bundle

* fix wallet receive bundle
2020-10-21 14:03:11 +02:00
5979fe5eef BTCPay Extensions Part 2 ()
* BTCPay Extensions Part 2

This PR cleans up the extension system a bit in that:
 * It renames the test extension to a more uniform name
 * Allows yo uto have system extensions, which are extensions but bundled by default with the release (and cannot be removed)
 * Adds a tool to help you generate an extension package from a csproj
 * Refactors the UI extension points to a view component
 * Moves some more interfaces to the Abstractions csproj

* Rename to plugins
2020-10-21 14:02:20 +02:00
362ba21567 fix unclosed div 2020-10-21 10:45:24 +02:00
71894ba245 Override Block Explorer Links ()
* Override Block Explorer Links

closes 

* load overrides after save as well

* fix js
2020-10-21 09:53:05 +02:00
2b19e0fbc6 Remove SQLite as default option ()
* Remove SQLite as default option

IF MERGED, STORES WITH NO DB CONFIG WILL NOT START UNTIL CONFIG IS UPDATED WITH `sqlitefile=sqlite.db`

* remove sqlite conn string option

* toggle between abs path or relative for sqlite db

* Update DefaultConfiguration.cs
2020-10-20 13:12:10 +02:00
4d0b402e8b Allow disabling notifications per user and disabling specific notifications per user ()
* Allow disabling notifications per user and disabling specific notifications per use

closes 

* Add disable notifs for all users

* fix term generator for notifications

* sow checkboxes instead of multiselect when js is enabled

* remove js dependency

* fix notif conditions
2020-10-20 13:09:09 +02:00
933e0c30bf Remove empty box on post redirect ()
In case JS is enabled the post redirect page showed an empty box. This box contains the explanation text for the non-JS text.

This changes it to only show the modal box in casee JS is disabled, because the page – even though only visible briefly –  looks weird for users with JS enabled.
2020-10-18 11:10:51 +02:00
b430afe3e1 Merge pull request from btcpayserver/feat/store-hints
Store hints/warnings
2020-10-18 03:11:36 -05:00
2f25f1790e Trying to prevent ocassional chrome crashes
Error: The process started from chrome location /usr/bin/chromium is no longer running, so ChromeDriver is assuming that Chrome has crashed.
2020-10-18 03:11:17 -05:00
d90fcf15bd Verifying presence of wallet warning on store list 2020-10-18 03:11:17 -05:00
be9cc41957 Dismissing lightning hint when connection is setup 2020-10-18 03:11:17 -05:00
ef99eeb300 Adding selenium test for store hints 2020-10-18 03:11:17 -05:00
1646241dfb Switch to POST for dismissing hints 2020-10-18 03:11:17 -05:00
543e628a8b Removing rates hint 2020-10-18 03:11:17 -05:00
36269cbed6 Consistent styling for Back to List 2020-10-18 03:11:17 -05:00
75dcdc72d2 Showing warning hint on stores listing page 2020-10-18 03:11:17 -05:00
f5c90bebdc Support for dismissing hints 2020-10-18 03:11:17 -05:00
15af66de55 Setting hints during store creation and update 2020-10-18 03:11:17 -05:00
17c8ac8248 Moving general store settings in same section 2020-10-18 03:11:17 -05:00
e5c6b9a979 Rearranging store sections and providing warnings for new stores 2020-10-18 03:11:17 -05:00
753849cedd Merge pull request from btcpayserver/forgotpassword
fix forgot password
2020-10-18 11:54:55 +09:00
b81e4c01ec clean altcoins docker compose 2020-10-17 16:09:34 +02:00
2a32b05df1 fix forgot password
If Email verification is turned off but you requested a forgot password form, it would ignore the request internally. Seems like it has been this way since the beginning
2020-10-17 09:25:48 +02:00
e3a0fe88c1 Fix LN invoices ()
* Fix LN invoices

This commit adds more to the previous LN fix in the case of a partial payment to an invoice. While it generated a new LN invoice after 1 partial payment was made, there were some new issues uncovered:
* Any other subsequent partial payments was not listened to  and did not generate an invoice ( fixed by listeneing to received payment event and makng sure that the status was already set `to partialPaid`)
* Any other subsequent partial payments caused a DbConcurrency error and did not generate an invoice ( Fixed in `MarkUnassigned`)
2020-10-17 08:57:21 +02:00
ee3aa49eee Merge pull request from dennisreimann/api-keys-ui
API Keys UI: Properly align form items
2020-10-17 14:38:14 +09:00
dd27ad79bd API Keys UI: Properly align form items 2020-10-16 22:31:09 +02:00
cfd0f556a5 Update changelog 2020-10-16 20:44:41 +09:00
347e70f4ea bump 2020-10-16 20:44:32 +09:00
828aae35ce Revert "The send wallet, by default, include the previous transaction"
This reverts commit 0f743cec4132c7f97a2e94263c044ddefbdccf9b.
2020-10-16 20:29:29 +09:00
2f56783b7e fix domain mapping bug ()
fixes 
2020-10-16 19:59:01 +09:00
dc4ecdaa38 better handling on remote being down 2020-10-15 15:04:11 +02:00
1440e8c55d BTCPay Server Extensions ()
* BTCPay Server Extensions

![demo](https://i.imgur.com/2S00aL2.gif)

* cleanup

* fix

* Polish UI a bit,detect when docker deployment
2020-10-15 21:28:09 +09:00
51a072808f If a password fail to be reset by mail, show proper error (fix ) 2020-10-15 15:36:42 +09:00
0a8c2926ea reword review step for vault 2020-10-14 19:57:27 +09:00
5e79f567a7 Merge pull request from Kukks/hide-conn-string
Do not log the database connection string
2020-10-14 19:23:04 +09:00
e2eb26eb93 Use base65 instead of hex for BIP78 ()
fixes 
2020-10-14 12:01:21 +02:00
740a50a26d fix email not included in textsearch
fixes 
2020-10-14 09:16:31 +02:00
be3f248a5a Do not log the database connection string
fixes 
2020-10-14 09:06:50 +02:00
f2870caed2 Payment redesign ()
* Payment redesign

Guess who's back!

This reverts commit 4174fa648d994e098d8555bca0a5b3a255541cb5.

* Refactor PullPayment state string

Compatible with this one: https://github.com/btcpayserver/btcpayserver/pull/1834/files#diff-a9136096252382b110b9a7ac7747b95aR41

* Use unified copy to clipboard function

* Refactor status text class to helper function
2020-10-13 09:58:46 +02:00
ad22d3fd91 Custom redirect_url for PoS () 2020-10-13 09:51:28 +02:00
9dcd8b6edf Checkout: Overlay improvement and markup fixes ()
* Checkout: Markup fixes

* Checkout: Less translucent overlay

More focus, as discussed in : https://github.com/btcpayserver/btcpayserver/pull/1930#issuecomment-701298441
2020-10-12 17:52:21 +02:00
9607e0e55d Update PayButtonEnable.cshtml ()
* Update PayButtonEnable.cshtml

Edit PayButton Title

* Update BTCPayServer/Views/Stores/PayButtonEnable.cshtml

Co-authored-by: Dennis Reimann <mail@dennisreimann.de>

* Apply suggestions from code review

Co-authored-by: Andrew Camilleri <evilkukka@gmail.com>
Co-authored-by: Dennis Reimann <mail@dennisreimann.de>
2020-10-11 17:46:11 +02:00
ad221eaaa2 bump 2020-10-08 17:51:38 +09:00
74a1a5262d Merge pull request from NicolasDorier/changelog/1.0.5.7
Changelog 1.0.5.7
2020-10-08 17:50:38 +09:00
32ae82d4da Update Changelog.md
Co-authored-by: Andrew Camilleri <evilkukka@gmail.com>
2020-10-08 17:03:46 +09:00
9c6c8d4f8f Changelog 1.0.5.7 2020-10-08 16:55:15 +09:00
45fbe6972b Merge pull request from NicolasDorier/walletsend
Fix: 1 DOGE "absurdly high" fee was trapping DOGE.
2020-10-08 16:38:08 +09:00
c262132a2f Do not check feerate in walletsend model 2020-10-08 16:33:48 +09:00
911a7ef6b5 Merge pull request from btcpayserver/decouple-icon-from-invoice
Decouple payment type icon from UI
2020-10-08 16:30:07 +09:00
8cb3757f5c Decouple payment type icon from UI
We should put an effort to not couple payment methods/types together after spending so much time decoupling things.
2020-10-08 09:19:50 +02:00
10bf914d78 Merge pull request from NicolasDorier/retry-vault
Add Retry button if a BTCPay Vault operation fails
2020-10-08 16:17:10 +09:00
684177ee44 Merge pull request from btcpayserver/invoice-ui-status-show
fix invoice exception status not displaying in list
2020-10-08 15:55:48 +09:00
b2052ca308 fix invoice exception status not displaying in list
fixes 
2020-10-08 08:42:45 +02:00
4174fa648d Revert "Payment redesign" () 2020-10-08 08:37:18 +02:00
182d67881d Add specter to the list of RPC compatible wallet 2020-10-08 15:16:59 +09:00
9284ac7461 Merge pull request from dennisreimann/payment-redesign
Payment redesign
2020-10-08 12:10:28 +09:00
55eec06e77 Merge pull request from btcpayserver/better-users
Add Created date to user, add verified column in list and make user l…
2020-10-08 12:08:16 +09:00
069acf0297 Add Retry button if a BTCPay Vault operation fails 2020-10-08 12:05:03 +09:00
d9d2c7d213 Merge pull request from NicolasDorier/email-pwd
Do not show password in clear text in email configuration (Fix )
2020-10-08 12:01:21 +09:00
83b28e0b00 Merge pull request from btcpayserver/fixu2f-cascade
Make U2F devices cascade delete
2020-10-08 12:00:30 +09:00
c2d52fd48f Merge pull request from dennisreimann/notifications-dropdown
Improve notifications dropdown
2020-10-08 11:58:32 +09:00
32e6643303 Do not ignore IsAdmin settings when creating a new user via the Users page (Fix ) 2020-10-08 11:57:25 +09:00
5faf6be02d Improve notifications dropdown
Minor changes to the spacing, first of all this fixed the notifications dropdown in dark mode.
2020-10-07 22:50:34 +02:00
9ff93ac2d5 add migration 2020-10-07 11:08:11 +02:00
5131d8d328 Fix onion location not always working ()
closes 
2020-10-07 10:21:18 +02:00
2147f8ec8b Make U2F devices cascade delete
fixes 
2020-10-06 17:57:16 +02:00
cfa568a230 Fix modal overlay ()
* Fix modal overlay

fixes 

* fix speed
2020-10-06 09:30:16 +02:00
b2899529c3 fix build 2020-10-05 13:00:26 +02:00
3d2b4cbfa8 Add Created date to user, add verified column in list and make user list use same model as modern lists 2020-10-05 13:00:15 +02:00
d8da8023c2 Add tests 2020-10-05 18:09:00 +09:00
60cadb8b6d Do not show password in clear text in email configuration (Fix ) 2020-10-05 17:57:50 +09:00
dcf8783c2e Add copy link confirmation 2020-10-03 17:04:36 +02:00
eb9dc95c58 Payment UI: Increase horizontal padding for currency 2020-10-01 21:23:49 +02:00
f94fb4f65e Payment UI: Light background for progress bar 2020-10-01 21:23:48 +02:00
e0aff2cf9d Payment UI: Right align totals 2020-10-01 21:23:47 +02:00
d2369f45ce UI: Custom margins for status message 2020-10-01 21:23:46 +02:00
7b718ada63 Pull Payment UI: Test fix 2020-10-01 21:23:45 +02:00
652604a36f Pull Payment UI: Redesign 2020-10-01 21:23:44 +02:00
8a4834dd2b Checkout UI: Decrease overlay opacity 2020-10-01 21:23:43 +02:00
6d49093620 Checkout UI: HTML fixes 2020-10-01 21:23:42 +02:00
489ce0bebc Payment Request UI: Finetuning 2020-10-01 21:23:41 +02:00
58922c23a6 Payment Request UI: Fix if 2020-10-01 21:23:40 +02:00
be3183fc45 Payment Request UI: Status and Payment Details 2020-10-01 21:23:39 +02:00
38b4812eb3 Payment Request UI: Print adaptions 2020-10-01 21:23:38 +02:00
69fdc2d821 UI: Add bootstrap responsive helper for dev env 2020-10-01 21:23:37 +02:00
9104b0f974 Payment Request UI: Main part
fix

fix

fix
2020-10-01 21:23:36 +02:00
6ec7373a1a # This is a combination of 2 commits.
# This is the 1st commit message:

UI: Move noscript styles to header include

Reusability

# This is the commit message :

fix
2020-10-01 21:23:35 +02:00
39be605459 UI: Move noscript styles to header include
Reusability
2020-10-01 21:23:34 +02:00
4d4459fa4e Payment Request UI: Layout and header 2020-10-01 21:23:33 +02:00
891 changed files with 69623 additions and 64565 deletions
.github/ISSUE_TEMPLATE
.gitignore
.run
BTCPayServer.Abstractions
BTCPayServer.Client
BTCPayServer.Client.csprojBTCPayServerClient.Authorization.csBTCPayServerClient.Invoices.csBTCPayServerClient.Lightning.Internal.csBTCPayServerClient.Lightning.Store.csBTCPayServerClient.LightningNetworkPaymentMethods.csBTCPayServerClient.Misc.csBTCPayServerClient.Notifications.csBTCPayServerClient.OnChainPaymentMethods.csBTCPayServerClient.OnChainWallet.csBTCPayServerClient.PullPayments.csBTCPayServerClient.StorePaymentMethods.csBTCPayServerClient.Users.csBTCPayServerClient.Webhooks.csBTCPayServerClient.cs
JsonConverters
Models
Permissions.cs
BTCPayServer.Common
BTCPayServer.Data
BTCPayServer.PluginPacker
BTCPayServer.Plugins.Test
BTCPayServer.Rating
BTCPayServer.Tests
BTCPayServer
BTCPayServer.csproj
Components
Configuration
Contracts
Controllers
AccessTokenController.csAccountController.csAppsController.Crowdfund.csAppsController.PointOfSale.csAppsController.csAppsPublicController.csErrorController.cs
GreenField
HomeController.csInvoiceController.API.csInvoiceController.UI.csInvoiceController.csManageController.APIKeys.csManageController.Notifications.csManageController.U2F.csManageController.csNotificationsController.csPaymentRequestController.csPublicController.csPublicLightningNodeInfoController.csPullPaymentController.csRateController.csServerController.Plugins.csServerController.Storage.csServerController.Users.csServerController.csStorageController.csStoresController.BTCLike.csStoresController.Email.csStoresController.Integrations.csStoresController.LightningLike.csStoresController.Onchain.csStoresController.csUserStoresController.csVaultController.csWalletsController.PSBT.csWalletsController.PullPayments.csWalletsController.cs
CurrencyValue.cs
Data
DerivationSchemeParser.csDerivationSchemeSettings.csEventAggregator.cs
Events
ExplorerClientProvider.csExtensions.cs
Extensions
Fido2
Filters
HostedServices
Hosting
ModelBinders
Models
PaymentRequest
Payments
Plugins
Program.cs
Properties
Security
Services
Storage
TagHelpers.cs
U2F
Views
Account
Apps
AppsPublic
CoinSwitch
Error
EthereumLikeStore
Fido2
Home
Invoice
Manage
MoneroLikeStore
Notifications
PaymentRequest
PublicLightningNodeInfo
PullPayment
Server
Shared
Shopify
Stores
UserStores
Wallets
ZoneLimits.cs_ViewImports.cshtmlbundleconfig.json
wwwroot
_bootstrap_kitchensink.html
cart
checkout
crowdfund-admin
crowdfund/services
img
imlegacy
js
locales
main
modal
paybutton
payment-request-admin
payment-request
pos-admin
swagger/v1
vendor
Build
Changelog.mdLICENSEREADME.mdamd64.Dockerfilearm32v7.Dockerfilearm64v8.Dockerfilebtcpayserver.sln
docs
publish-docker.ps1

@ -1,38 +1,63 @@
---
name: Bug report
about: File a bug report
title: ''
labels: ''
assignees: ''
name: "\U0001F41B Bug report"
about: Report a bug or a technical issue
---
<!--
Thank you for reporting a technical issue.
This issue tracker is only for bug reports and problems.
For general questions please read our documentation docs.btcpayserver.org. You can ask technical questions in discussions https://github.com/btcpayserver/btcpayserver/discussions and general support on our community chat chat.btcpayserver.org
Please fill in as much of the template below as you're able.
-->
**Describe the bug**
A clear and concise description of what the bug is.
**To Reproduce**
Steps to reproduce the behavior:
**To Reproduce the bug**
Steps to reproduce the reported bug:
1. Go to '...'
2. Click on '....'
3. Scroll down to '....'
4. See error
**Expected behavior**
<!--
A clear and concise description of what you expected to happen.
-->
**Screenshots**
<!--
If applicable, add screenshots to help explain your problem.
-->
**Your BTCPay Environment (please complete the following information):**
- BTCPay Server Version [available in the right bottom corner of footer]
- Deployment Method: [e.g. Docker, Manual, Third-Party-hoist]
- Browser [e.g. chrome, safari]
- BTCPay Server Version: <!--[available in the right bottom corner of footer] -->
- Deployment Method: <!--[e.g. Docker, Manual, Third-Party-host]-->
- Browser: <!--[e.g. Chrome, Safari]-->
**Logs (if applicable)**
Basic logs can be found in Server Settings > Logs. More logs https://docs.btcpayserver.org/Troubleshooting/#2-looking-through-the-logs
<!--
Basic logs can be found in Server Settings > Logs.
More logs https://docs.btcpayserver.org/Troubleshooting/#2-looking-through-the-logs
-->
**Setup Parameters**
If you're reporting a deployment issue run `. btcpay-setup.sh -i` and paste your the parameters by obscuring private information.
<!--
If you're reporting a deployment issue run `. btcpay-setup.sh -i` and paste the setup parameters here with your private information removed or obscured.
-->
**Additional context**
<!--
Add any other context about the problem here.
-->

@ -1,5 +1,11 @@
blank_issues_enabled: false
contact_links:
- name: Community Support Chat
contact_links:
- name: 🚀 Discussions
url: https://github.com/btcpayserver/btcpayserver/discussions
about: Technical discussions, questions and feature requests
- name: 📝 Official Documentation
url: https://docs.btcpayserver.org
about: Check our documentation for answers to common questions
- name: 💬 Community Support Chat
url: https://chat.btcpayserver.org/
about: Ask general questions and get community support in real-time.
about: Ask general questions and get community support in real-time

@ -1,23 +0,0 @@
---
name: Feature request
about: Suggest a new feature or enhancement
title: ''
labels: ''
assignees: ''
---
**Is your feature request related to a problem? Please describe.**
A clear and concise description of what the problem is. Ex. I'm always frustrated when [...]
**Describe the solution you'd like**
A clear and concise description of what you want to happen.
**Sketch/Image/Wireframe/Mockup**
If applicable provide examples, wireframes, sketches or images to better explain your idea.
**Describe alternatives you've considered**
A clear and concise description of any alternative solutions or features you've considered.
**Additional context**
Add any other context or screenshots about the feature request here.

1
.gitignore vendored

@ -298,3 +298,4 @@ BTCPayServer/wwwroot/bundles/*
!.vscode/extensions.json
BTCPayServer/testpwd
.DS_Store
Packed Plugins

@ -0,0 +1,21 @@
<component name="ProjectRunConfigurationManager">
<configuration default="false" name="Pack Test Plugin" type="DotNetProject" factoryName=".NET Project" singleton="false">
<option name="EXE_PATH" value="$PROJECT_DIR$/BTCPayServer.PluginPacker/bin/Debug/netcoreapp3.1/BTCPayServer.PluginPacker.dll" />
<option name="PROGRAM_PARAMETERS" value="../../../../BTCPayServer.Plugins.Test\bin\Debug\netcoreapp3.1 BTCPayServer.Plugins.Test &quot;../../../../Packed Plugins&quot;" />
<option name="WORKING_DIRECTORY" value="$PROJECT_DIR$/BTCPayServer.PluginPacker/bin/Debug/netcoreapp3.1" />
<option name="PASS_PARENT_ENVS" value="1" />
<option name="USE_EXTERNAL_CONSOLE" value="0" />
<option name="USE_MONO" value="0" />
<option name="RUNTIME_ARGUMENTS" value="" />
<option name="PROJECT_PATH" value="$PROJECT_DIR$/BTCPayServer.PluginPacker/BTCPayServer.PluginPacker.csproj" />
<option name="PROJECT_EXE_PATH_TRACKING" value="1" />
<option name="PROJECT_ARGUMENTS_TRACKING" value="1" />
<option name="PROJECT_WORKING_DIRECTORY_TRACKING" value="1" />
<option name="PROJECT_KIND" value="DotNetCore" />
<option name="PROJECT_TFM" value=".NETCoreApp,Version=v3.1" />
<method v="2">
<option name="Build" default="false" projectName="BTCPayServer.Plugins.Test" projectPath="C:\Git\btcpayserver\BTCPayServer.Plugins.Test\BTCPayServer.Plugins.Test.csproj" />
<option name="Build" />
</method>
</configuration>
</component>

@ -0,0 +1,42 @@
<Project Sdk="Microsoft.NET.Sdk">
<Import Project="../Build/Version.csproj" Condition="Exists('../Build/Version.csproj')" />
<Import Project="../Build/Common.csproj" />
<PropertyGroup>
<Company>BTCPay Server</Company>
<Copyright>Copyright © BTCPay Server 2020</Copyright>
<Description>A library for BTCPay Server plugin development</Description>
<PackageIcon>icon.png</PackageIcon>
<PackageTags>btcpay,btcpayserver</PackageTags>
<PackageProjectUrl>https://github.com/btcpayserver/btcpayserver/tree/master/BTCPayServer.Abstractions</PackageProjectUrl>
<PackageLicenseExpression>MIT</PackageLicenseExpression>
<RepositoryUrl>https://github.com/btcpayserver/btcpayserver</RepositoryUrl>
<RepositoryType>git</RepositoryType>
</PropertyGroup>
<PropertyGroup Condition=" '$(Configuration)' == 'Release' ">
<PublishRepositoryUrl>true</PublishRepositoryUrl>
<EmbedUntrackedSources>true</EmbedUntrackedSources>
<DebugType>portable</DebugType>
<Optimize>true</Optimize>
<NoWarn>1591;1573;1572;1584;1570;3021</NoWarn>
<GenerateDocumentationFile>true</GenerateDocumentationFile>
</PropertyGroup>
<ItemGroup Condition=" '$(Configuration)' == 'Release' ">
<PackageReference Include="Microsoft.SourceLink.GitHub" Version="1.0.0" PrivateAssets="All" />
</ItemGroup>
<ItemGroup>
<FrameworkReference Include="Microsoft.AspNetCore.App" />
</ItemGroup>
<ItemGroup>
<None Include="icon.png" Pack="true" PackagePath="\" />
</ItemGroup>
<ItemGroup>
<PackageReference Include="Microsoft.EntityFrameworkCore" Version="3.1.4" />
<PackageReference Include="Microsoft.EntityFrameworkCore.Sqlite" Version="3.1.4" />
<PackageReference Include="Npgsql.EntityFrameworkCore.PostgreSQL" Version="3.1.4" />
<PackageReference Include="Pomelo.EntityFrameworkCore.MySql" Version="3.1.1" />
</ItemGroup>
<ItemGroup>
<ProjectReference Include="..\BTCPayServer.Client\BTCPayServer.Client.csproj" />
</ItemGroup>
</Project>

@ -0,0 +1,12 @@
namespace BTCPayServer.Configuration
{
public class DataDirectories
{
public string DataDir { get; set; }
public string PluginDir { get; set; }
public string TempStorageDir { get; set; }
public string StorageDir { get; set; }
}
}

@ -1,4 +1,4 @@
namespace BTCPayServer.Security
namespace BTCPayServer.Abstractions.Constants
{
public class AuthenticationSchemes
{

@ -0,0 +1,109 @@
using System;
using BTCPayServer.Abstractions.Models;
using Microsoft.EntityFrameworkCore;
using Microsoft.EntityFrameworkCore.Metadata;
using Microsoft.EntityFrameworkCore.Migrations;
using Microsoft.Extensions.Options;
using Npgsql.EntityFrameworkCore.PostgreSQL.Migrations;
using Npgsql.EntityFrameworkCore.PostgreSQL.Migrations.Operations;
namespace BTCPayServer.Abstractions.Contracts
{
public abstract class BaseDbContextFactory<T> where T: DbContext
{
private readonly IOptions<DatabaseOptions> _options;
private readonly string _schemaPrefix;
public BaseDbContextFactory(IOptions<DatabaseOptions> options, string schemaPrefix)
{
_options = options;
_schemaPrefix = schemaPrefix;
}
public abstract T CreateContext();
class CustomNpgsqlMigrationsSqlGenerator : NpgsqlMigrationsSqlGenerator
{
public CustomNpgsqlMigrationsSqlGenerator(MigrationsSqlGeneratorDependencies dependencies, IMigrationsAnnotationProvider annotations, Npgsql.EntityFrameworkCore.PostgreSQL.Infrastructure.Internal.INpgsqlOptions opts) : base(dependencies, annotations, opts)
{
}
protected override void Generate(NpgsqlCreateDatabaseOperation operation, IModel model, MigrationCommandListBuilder builder)
{
builder
.Append("CREATE DATABASE ")
.Append(Dependencies.SqlGenerationHelper.DelimitIdentifier(operation.Name));
// POSTGRES gotcha: Indexed Text column (even if PK) are not used if we are not using C locale
builder
.Append(" TEMPLATE ")
.Append(Dependencies.SqlGenerationHelper.DelimitIdentifier("template0"));
builder
.Append(" LC_CTYPE ")
.Append(Dependencies.SqlGenerationHelper.DelimitIdentifier("C"));
builder
.Append(" LC_COLLATE ")
.Append(Dependencies.SqlGenerationHelper.DelimitIdentifier("C"));
builder
.Append(" ENCODING ")
.Append(Dependencies.SqlGenerationHelper.DelimitIdentifier("UTF8"));
if (operation.Tablespace != null)
{
builder
.Append(" TABLESPACE ")
.Append(Dependencies.SqlGenerationHelper.DelimitIdentifier(operation.Tablespace));
}
builder.AppendLine(Dependencies.SqlGenerationHelper.StatementTerminator);
EndStatement(builder, suppressTransaction: true);
}
}
public void ConfigureBuilder(DbContextOptionsBuilder builder)
{
switch (_options.Value.DatabaseType)
{
case DatabaseType.Sqlite:
builder.UseSqlite(_options.Value.ConnectionString, o =>
{
if (!string.IsNullOrEmpty(_schemaPrefix))
{
o.MigrationsHistoryTable(_schemaPrefix);
}
});
break;
case DatabaseType.Postgres:
builder
.UseNpgsql(_options.Value.ConnectionString, o =>
{
o.EnableRetryOnFailure(10);
if (!string.IsNullOrEmpty(_schemaPrefix))
{
o.MigrationsHistoryTable(_schemaPrefix);
}
})
.ReplaceService<IMigrationsSqlGenerator, CustomNpgsqlMigrationsSqlGenerator>();
break;
case DatabaseType.MySQL:
builder.UseMySql(_options.Value.ConnectionString, o =>
{
o.EnableRetryOnFailure(10);
if (!string.IsNullOrEmpty(_schemaPrefix))
{
o.MigrationsHistoryTable(_schemaPrefix);
}
});
break;
default:
throw new ArgumentOutOfRangeException();
}
}
}
}

@ -0,0 +1,10 @@
using System.Threading.Tasks;
using BTCPayServer.Client;
namespace BTCPayServer.Abstractions.Contracts
{
public interface IBTCPayServerClientFactory
{
Task<BTCPayServerClient> Create(string userId, params string[] storeIds);
}
}

@ -0,0 +1,32 @@
using System;
using System.Text.Json.Serialization;
using BTCPayServer.Abstractions.Converters;
using Microsoft.AspNetCore.Builder;
using Microsoft.Extensions.DependencyInjection;
namespace BTCPayServer.Abstractions.Contracts
{
public interface IBTCPayServerPlugin
{
public string Identifier { get; }
string Name { get; }
[JsonConverter(typeof(VersionConverter))]
Version Version { get; }
string Description { get; }
bool SystemPlugin { get; set; }
PluginDependency[] Dependencies { get; }
void Execute(IApplicationBuilder applicationBuilder, IServiceProvider applicationBuilderApplicationServices);
void Execute(IServiceCollection applicationBuilder);
public class PluginDependency
{
public string Identifier { get; set; }
public string Condition { get; set; }
public override string ToString()
{
return $"{Identifier}: {Condition}";
}
}
}
}

@ -0,0 +1,27 @@
using System;
namespace BTCPayServer.Abstractions.Contracts
{
public abstract class BaseNotification
{
public abstract string Identifier { get; }
public abstract string NotificationType { get; }
}
public interface INotificationHandler
{
string NotificationType { get; }
Type NotificationBlobType { get; }
public (string identifier, string name)[] Meta { get; }
void FillViewModel(object notification, NotificationViewModel vm);
}
public class NotificationViewModel
{
public string Id { get; set; }
public DateTimeOffset Created { get; set; }
public string Body { get; set; }
public string ActionLink { get; set; }
public bool Seen { get; set; }
}
}

@ -0,0 +1,10 @@
using System.Threading.Tasks;
namespace BTCPayServer.Abstractions.Contracts
{
public interface IPluginHookAction
{
public string Hook { get; }
Task Execute(object args);
}
}

@ -0,0 +1,11 @@
using System.Threading.Tasks;
namespace BTCPayServer.Abstractions.Contracts
{
public interface IPluginHookFilter
{
public string Hook { get; }
Task<object> Execute(object args);
}
}

@ -0,0 +1,10 @@
using System.Threading.Tasks;
namespace BTCPayServer.Abstractions.Contracts
{
public interface IPluginHookService
{
Task ApplyAction(string hook, object args);
Task<object> ApplyFilter(string hook, object args);
}
}

@ -0,0 +1,13 @@
#nullable enable
using System.Threading;
using System.Threading.Tasks;
namespace BTCPayServer.Abstractions.Contracts
{
public interface ISettingsRepository
{
Task<T?> GetSettingAsync<T>(string? name = null) where T : class;
Task UpdateSetting<T>(T obj, string? name = null) where T : class;
Task<T> WaitSettingsChanged<T>(CancellationToken cancellationToken = default) where T : class;
}
}

@ -1,7 +1,7 @@
using System.Threading;
using System.Threading.Tasks;
namespace BTCPayServer.Hosting
namespace BTCPayServer.Abstractions.Contracts
{
public interface IStartupTask
{

@ -0,0 +1,18 @@
using System.Collections.Generic;
namespace BTCPayServer.Abstractions.Contracts
{
public interface ISyncSummaryProvider
{
bool AllAvailable();
string Partial { get; }
IEnumerable<ISyncStatus> GetStatuses();
}
public interface ISyncStatus
{
public string CryptoCode { get; set; }
public bool Available { get; }
}
}

@ -0,0 +1,9 @@
namespace BTCPayServer.Abstractions.Contracts
{
public interface IUIExtension
{
string Partial { get; }
string Location { get; }
}
}

@ -0,0 +1,19 @@
using System;
using System.Text.Json;
using System.Text.Json.Serialization;
namespace BTCPayServer.Abstractions.Converters
{
public class VersionConverter : JsonConverter<Version>
{
public override Version Read(ref Utf8JsonReader reader, Type typeToConvert, JsonSerializerOptions options)
{
return Version.Parse(reader.GetString());
}
public override void Write(Utf8JsonWriter writer, Version value, JsonSerializerOptions options)
{
writer.WriteStringValue(value.ToString());
}
}
}

@ -0,0 +1,20 @@
using System.Text.Json;
using BTCPayServer.Abstractions.Models;
using Microsoft.AspNetCore.Mvc.ViewFeatures;
namespace BTCPayServer.Abstractions.Extensions
{
public static class SetStatusMessageModelExtensions
{
public static void SetStatusMessageModel(this ITempDataDictionary tempData, StatusMessageModel statusMessage)
{
if (statusMessage == null)
{
tempData.Remove("StatusMessageModel");
return;
}
tempData["StatusMessageModel"] = JsonSerializer.Serialize(statusMessage, new JsonSerializerOptions());
}
}
}

@ -1,6 +1,7 @@
using BTCPayServer.Hosting;
using BTCPayServer.Abstractions.Contracts;
using Microsoft.Extensions.DependencyInjection;
namespace Microsoft.Extensions.DependencyInjection
namespace BTCPayServer.Abstractions.Extensions
{
public static class ServiceCollectionExtensions
{

@ -3,36 +3,64 @@ using System.Globalization;
using Microsoft.AspNetCore.Html;
using Microsoft.AspNetCore.Mvc.ViewFeatures;
namespace BTCPayServer.Views
namespace BTCPayServer.Abstractions.Extensions
{
public static class ViewsRazor
{
public const string ACTIVE_PAGE_KEY = "ActivePage";
public static void SetActivePageAndTitle<T>(this ViewDataDictionary viewData, T activePage, string title = null)
private const string ACTIVE_CATEGORY_KEY = "ActiveCategory";
private const string ACTIVE_PAGE_KEY = "ActivePage";
public static void SetActivePageAndTitle<T>(this ViewDataDictionary viewData, T activePage, string title = null, string mainTitle = null)
where T : IConvertible
{
// Browser Title
viewData["Title"] = title ?? activePage.ToString();
// Breadcrumb
viewData["MainTitle"] = mainTitle;
viewData["PageTitle"] = title;
// Navigation
viewData[ACTIVE_PAGE_KEY] = activePage;
SetActiveCategory(viewData, activePage.GetType());
}
public static void SetActiveCategory<T>(this ViewDataDictionary viewData, T activeCategory)
{
viewData[ACTIVE_CATEGORY_KEY] = activeCategory;
}
public static string IsActiveCategory<T>(this ViewDataDictionary viewData, T category)
{
if (!viewData.ContainsKey(ACTIVE_CATEGORY_KEY))
{
return null;
}
var activeCategory = (T)viewData[ACTIVE_CATEGORY_KEY];
return category.Equals(activeCategory) ? "active" : null;
}
public static string IsActivePage<T>(this ViewDataDictionary viewData, T page)
where T : IConvertible
{
if (!viewData.ContainsKey(ACTIVE_PAGE_KEY))
{
return null;
}
var activePage = (T)viewData[ACTIVE_PAGE_KEY];
return page.Equals(activePage) ? "active" : null;
}
public static HtmlString ToBrowserDate(this DateTimeOffset date)
{
var hello = date.ToString("o", CultureInfo.InvariantCulture);
return new HtmlString($"<span class='localizeDate'>{hello}</span>");
var displayDate = date.ToString("o", CultureInfo.InvariantCulture);
return new HtmlString($"<span class='localizeDate'>{displayDate}</span>");
}
public static HtmlString ToBrowserDate2(this DateTime date)
public static HtmlString ToBrowserDate(this DateTime date)
{
var hello = date.ToString("o", CultureInfo.InvariantCulture);
return new HtmlString($"<span class='localizeDate'>{hello}</span>");
var displayDate = date.ToString("o", CultureInfo.InvariantCulture);
return new HtmlString($"<span class='localizeDate'>{displayDate}</span>");
}
public static string ToTimeAgo(this DateTimeOffset date)
{
var formatted = (DateTimeOffset.UtcNow - date).TimeString() + " ago";

@ -0,0 +1,35 @@
using System;
using System.Reflection;
using BTCPayServer.Abstractions.Contracts;
using Microsoft.AspNetCore.Builder;
using Microsoft.Extensions.DependencyInjection;
namespace BTCPayServer.Abstractions.Models
{
public abstract class BaseBTCPayServerPlugin : IBTCPayServerPlugin
{
public abstract string Identifier { get; }
public abstract string Name { get; }
public virtual Version Version
{
get
{
return Assembly.GetAssembly(GetType())?.GetName().Version ?? new Version(1, 0, 0, 0);
}
}
public abstract string Description { get; }
public bool SystemPlugin { get; set; }
public virtual IBTCPayServerPlugin.PluginDependency[] Dependencies { get; } = Array.Empty<IBTCPayServerPlugin.PluginDependency>();
public virtual void Execute(IApplicationBuilder applicationBuilder,
IServiceProvider applicationBuilderApplicationServices)
{
}
public virtual void Execute(IServiceCollection applicationBuilder)
{
}
}
}

@ -0,0 +1,8 @@
namespace BTCPayServer.Abstractions.Models
{
public class DatabaseOptions
{
public DatabaseType DatabaseType { get; set; }
public string ConnectionString { get; set; }
}
}

@ -0,0 +1,9 @@
namespace BTCPayServer.Abstractions.Models
{
public enum DatabaseType
{
Sqlite,
Postgres,
MySQL,
}
}

@ -1,6 +1,6 @@
using System;
namespace BTCPayServer.Models
namespace BTCPayServer.Abstractions.Models
{
public class StatusMessageModel
{

@ -0,0 +1,7 @@
rm "bin\release\" -Recurse -Force
dotnet pack --configuration Release --include-symbols -p:SymbolPackageFormat=snupkg
$package=(ls .\bin\Release\*.nupkg).FullName
dotnet nuget push $package --source "https://api.nuget.org/v3/index.json"
$ver = ((ls .\bin\release\*.nupkg)[0].Name -replace '.*(\d+\.\d+\.\d+)\.nupkg','$1')
git tag -a "BTCPayServer.Abstractions/v$ver" -m "BTCPayServer.Abstractions/$ver"
git push origin "BTCPayServer.Abstractions/v$ver"

@ -0,0 +1,16 @@
using System.Threading.Tasks;
using BTCPayServer.Abstractions.Contracts;
namespace BTCPayServer.Abstractions.Services
{
public abstract class PluginAction<T>:IPluginHookAction
{
public abstract string Hook { get; }
public Task Execute(object args)
{
return Execute(args is T args1 ? args1 : default);
}
public abstract Task Execute(T arg);
}
}

@ -0,0 +1,17 @@
using System.Threading.Tasks;
using BTCPayServer.Abstractions.Contracts;
namespace BTCPayServer.Abstractions.Services
{
public abstract class PluginHookFilter<T>:IPluginHookFilter
{
public abstract string Hook { get; }
public Task<object> Execute(object args)
{
return Execute(args is T args1 ? args1 : default).ContinueWith(task => task.Result as object);
}
public abstract Task<T> Execute(T arg);
}
}

@ -0,0 +1,16 @@
using BTCPayServer.Abstractions.Contracts;
namespace BTCPayServer.Abstractions.Services
{
public class UIExtension: IUIExtension
{
public UIExtension(string partial, string location)
{
Partial = partial;
Location = location;
}
public string Partial { get; }
public string Location { get; }
}
}

Binary file not shown.

After

(image error) Size: 29 KiB

@ -13,7 +13,7 @@
<RepositoryType>git</RepositoryType>
</PropertyGroup>
<PropertyGroup>
<Version Condition=" '$(Version)' == '' ">1.1.0</Version>
<Version Condition=" '$(Version)' == '' ">1.4.0</Version>
</PropertyGroup>
<PropertyGroup Condition=" '$(Configuration)' == 'Release' ">
<PublishRepositoryUrl>true</PublishRepositoryUrl>
@ -27,8 +27,8 @@
<PackageReference Include="Microsoft.SourceLink.GitHub" Version="1.0.0" PrivateAssets="All" />
</ItemGroup>
<ItemGroup>
<PackageReference Include="NBitcoin" Version="5.0.51" />
<PackageReference Include="BTCPayServer.Lightning.Common" Version="1.2.0" />
<PackageReference Include="NBitcoin" Version="6.0.12" />
<PackageReference Include="BTCPayServer.Lightning.Common" Version="1.2.6" />
<PackageReference Include="Newtonsoft.Json" Version="12.0.3" />
</ItemGroup>
<ItemGroup>

@ -1,5 +1,6 @@
using System;
using System.Collections.Generic;
using System.Threading.Tasks;
namespace BTCPayServer.Client
{

@ -1,21 +1,44 @@
using System;
using System.Collections.Generic;
using System.Linq;
using System.Net.Http;
using System.Threading;
using System.Threading.Tasks;
using BTCPayServer.Client.Models;
using NBitcoin;
namespace BTCPayServer.Client
{
public partial class BTCPayServerClient
{
public virtual async Task<IEnumerable<InvoiceData>> GetInvoices(string storeId, bool includeArchived = false,
public virtual async Task<IEnumerable<InvoiceData>> GetInvoices(string storeId, string[] orderId = null,
InvoiceStatus[] status = null,
DateTimeOffset? startDate = null,
DateTimeOffset? endDate = null,
string textSearch = null,
bool includeArchived = false,
CancellationToken token = default)
{
Dictionary<string, object> queryPayload = new Dictionary<string, object>();
queryPayload.Add(nameof(includeArchived), includeArchived);
if (startDate is DateTimeOffset s)
queryPayload.Add(nameof(startDate), Utils.DateTimeToUnixTime(s));
if (endDate is DateTimeOffset e)
queryPayload.Add(nameof(endDate), Utils.DateTimeToUnixTime(e));
if (orderId != null)
queryPayload.Add(nameof(orderId), orderId);
if (textSearch != null)
queryPayload.Add(nameof(textSearch), textSearch);
if (status != null)
queryPayload.Add(nameof(status), status.Select(s=> s.ToString().ToLower()).ToArray());
var response =
await _httpClient.SendAsync(
CreateHttpRequest($"api/v1/stores/{storeId}/invoices",
new Dictionary<string, object>() {{nameof(includeArchived), includeArchived}}), token);
queryPayload), token);
return await HandleResponse<IEnumerable<InvoiceData>>(response);
}
@ -26,6 +49,13 @@ namespace BTCPayServer.Client
CreateHttpRequest($"api/v1/stores/{storeId}/invoices/{invoiceId}"), token);
return await HandleResponse<InvoiceData>(response);
}
public virtual async Task<InvoicePaymentMethodDataModel[]> GetInvoicePaymentMethods(string storeId, string invoiceId,
CancellationToken token = default)
{
var response = await _httpClient.SendAsync(
CreateHttpRequest($"api/v1/stores/{storeId}/invoices/{invoiceId}/payment-methods"), token);
return await HandleResponse<InvoicePaymentMethodDataModel[]>(response);
}
public virtual async Task ArchiveInvoice(string storeId, string invoiceId,
CancellationToken token = default)
@ -47,12 +77,23 @@ namespace BTCPayServer.Client
return await HandleResponse<InvoiceData>(response);
}
public virtual async Task<InvoiceData> UpdateInvoice(string storeId, string invoiceId,
UpdateInvoiceRequest request, CancellationToken token = default)
{
if (request == null)
throw new ArgumentNullException(nameof(request));
var response = await _httpClient.SendAsync(
CreateHttpRequest($"api/v1/stores/{storeId}/invoices/{invoiceId}", bodyPayload: request,
method: HttpMethod.Put), token);
return await HandleResponse<InvoiceData>(response);
}
public virtual async Task<InvoiceData> MarkInvoiceStatus(string storeId, string invoiceId,
MarkInvoiceStatusRequest request, CancellationToken token = default)
{
if (request == null)
throw new ArgumentNullException(nameof(request));
if (request.Status!= InvoiceStatus.Complete && request.Status!= InvoiceStatus.Invalid)
if (request.Status != InvoiceStatus.Settled && request.Status != InvoiceStatus.Invalid)
throw new ArgumentOutOfRangeException(nameof(request.Status), "Status can only be Invalid or Complete");
var response = await _httpClient.SendAsync(
CreateHttpRequest($"api/v1/stores/{storeId}/invoices/{invoiceId}/status", bodyPayload: request,
@ -67,5 +108,13 @@ namespace BTCPayServer.Client
method: HttpMethod.Post), token);
return await HandleResponse<InvoiceData>(response);
}
public virtual async Task ActivateInvoicePaymentMethod(string storeId, string invoiceId, string paymentMethod, CancellationToken token = default)
{
var response = await _httpClient.SendAsync(
CreateHttpRequest($"api/v1/stores/{storeId}/invoices/{invoiceId}/payment-methods/{paymentMethod}/activate",
method: HttpMethod.Post), token);
await HandleResponse(response);
}
}
}

@ -9,7 +9,7 @@ namespace BTCPayServer.Client
{
public partial class BTCPayServerClient
{
public async Task<LightningNodeInformationData> GetLightningNodeInfo(string cryptoCode,
public virtual async Task<LightningNodeInformationData> GetLightningNodeInfo(string cryptoCode,
CancellationToken token = default)
{
var response = await _httpClient.SendAsync(
@ -18,7 +18,7 @@ namespace BTCPayServer.Client
return await HandleResponse<LightningNodeInformationData>(response);
}
public async Task ConnectToLightningNode(string cryptoCode, ConnectToNodeRequest request,
public virtual async Task ConnectToLightningNode(string cryptoCode, ConnectToNodeRequest request,
CancellationToken token = default)
{
if (request == null)
@ -29,7 +29,7 @@ namespace BTCPayServer.Client
await HandleResponse(response);
}
public async Task<IEnumerable<LightningChannelData>> GetLightningNodeChannels(string cryptoCode,
public virtual async Task<IEnumerable<LightningChannelData>> GetLightningNodeChannels(string cryptoCode,
CancellationToken token = default)
{
var response = await _httpClient.SendAsync(
@ -38,16 +38,16 @@ namespace BTCPayServer.Client
return await HandleResponse<IEnumerable<LightningChannelData>>(response);
}
public async Task<string> OpenLightningChannel(string cryptoCode, OpenLightningChannelRequest request,
public virtual async Task OpenLightningChannel(string cryptoCode, OpenLightningChannelRequest request,
CancellationToken token = default)
{
var response = await _httpClient.SendAsync(
CreateHttpRequest($"api/v1/server/lightning/{cryptoCode}/channels", bodyPayload: request,
method: HttpMethod.Post), token);
return await HandleResponse<string>(response);
await HandleResponse(response);
}
public async Task<string> GetLightningDepositAddress(string cryptoCode, CancellationToken token = default)
public virtual async Task<string> GetLightningDepositAddress(string cryptoCode, CancellationToken token = default)
{
var response = await _httpClient.SendAsync(
CreateHttpRequest($"api/v1/server/lightning/{cryptoCode}/address", method: HttpMethod.Post), token);
@ -55,7 +55,7 @@ namespace BTCPayServer.Client
}
public async Task PayLightningInvoice(string cryptoCode, PayLightningInvoiceRequest request,
public virtual async Task PayLightningInvoice(string cryptoCode, PayLightningInvoiceRequest request,
CancellationToken token = default)
{
if (request == null)
@ -66,7 +66,7 @@ namespace BTCPayServer.Client
await HandleResponse(response);
}
public async Task<LightningInvoiceData> GetLightningInvoice(string cryptoCode,
public virtual async Task<LightningInvoiceData> GetLightningInvoice(string cryptoCode,
string invoiceId, CancellationToken token = default)
{
if (invoiceId == null)
@ -77,7 +77,7 @@ namespace BTCPayServer.Client
return await HandleResponse<LightningInvoiceData>(response);
}
public async Task<LightningInvoiceData> CreateLightningInvoice(string cryptoCode, CreateLightningInvoiceRequest request,
public virtual async Task<LightningInvoiceData> CreateLightningInvoice(string cryptoCode, CreateLightningInvoiceRequest request,
CancellationToken token = default)
{
if (request == null)

@ -9,7 +9,7 @@ namespace BTCPayServer.Client
{
public partial class BTCPayServerClient
{
public async Task<LightningNodeInformationData> GetLightningNodeInfo(string storeId, string cryptoCode,
public virtual async Task<LightningNodeInformationData> GetLightningNodeInfo(string storeId, string cryptoCode,
CancellationToken token = default)
{
var response = await _httpClient.SendAsync(
@ -18,7 +18,7 @@ namespace BTCPayServer.Client
return await HandleResponse<LightningNodeInformationData>(response);
}
public async Task ConnectToLightningNode(string storeId, string cryptoCode, ConnectToNodeRequest request,
public virtual async Task ConnectToLightningNode(string storeId, string cryptoCode, ConnectToNodeRequest request,
CancellationToken token = default)
{
if (request == null)
@ -29,7 +29,7 @@ namespace BTCPayServer.Client
await HandleResponse(response);
}
public async Task<IEnumerable<LightningChannelData>> GetLightningNodeChannels(string storeId, string cryptoCode,
public virtual async Task<IEnumerable<LightningChannelData>> GetLightningNodeChannels(string storeId, string cryptoCode,
CancellationToken token = default)
{
var response = await _httpClient.SendAsync(
@ -38,16 +38,16 @@ namespace BTCPayServer.Client
return await HandleResponse<IEnumerable<LightningChannelData>>(response);
}
public async Task<string> OpenLightningChannel(string storeId, string cryptoCode, OpenLightningChannelRequest request,
public virtual async Task OpenLightningChannel(string storeId, string cryptoCode, OpenLightningChannelRequest request,
CancellationToken token = default)
{
var response = await _httpClient.SendAsync(
CreateHttpRequest($"api/v1/stores/{storeId}/lightning/{cryptoCode}/channels", bodyPayload: request,
method: HttpMethod.Post), token);
return await HandleResponse<string>(response);
await HandleResponse(response);
}
public async Task<string> GetLightningDepositAddress(string storeId, string cryptoCode,
public virtual async Task<string> GetLightningDepositAddress(string storeId, string cryptoCode,
CancellationToken token = default)
{
var response = await _httpClient.SendAsync(
@ -56,7 +56,7 @@ namespace BTCPayServer.Client
return await HandleResponse<string>(response);
}
public async Task PayLightningInvoice(string storeId, string cryptoCode, PayLightningInvoiceRequest request,
public virtual async Task PayLightningInvoice(string storeId, string cryptoCode, PayLightningInvoiceRequest request,
CancellationToken token = default)
{
if (request == null)
@ -67,7 +67,7 @@ namespace BTCPayServer.Client
await HandleResponse(response);
}
public async Task<LightningInvoiceData> GetLightningInvoice(string storeId, string cryptoCode,
public virtual async Task<LightningInvoiceData> GetLightningInvoice(string storeId, string cryptoCode,
string invoiceId, CancellationToken token = default)
{
if (invoiceId == null)
@ -78,7 +78,7 @@ namespace BTCPayServer.Client
return await HandleResponse<LightningInvoiceData>(response);
}
public async Task<LightningInvoiceData> CreateLightningInvoice(string storeId, string cryptoCode,
public virtual async Task<LightningInvoiceData> CreateLightningInvoice(string storeId, string cryptoCode,
CreateLightningInvoiceRequest request, CancellationToken token = default)
{
if (request == null)

@ -0,0 +1,64 @@
using System.Collections.Generic;
using System.Net.Http;
using System.Threading;
using System.Threading.Tasks;
using BTCPayServer.Client.Models;
namespace BTCPayServer.Client
{
public partial class BTCPayServerClient
{
public virtual async Task<IEnumerable<LightningNetworkPaymentMethodData>>
GetStoreLightningNetworkPaymentMethods(string storeId, bool? enabled = null,
CancellationToken token = default)
{
var query = new Dictionary<string, object>();
if (enabled != null)
{
query.Add(nameof(enabled), enabled);
}
var response =
await _httpClient.SendAsync(
CreateHttpRequest($"api/v1/stores/{storeId}/payment-methods/LightningNetwork",
query), token);
return await HandleResponse<IEnumerable<LightningNetworkPaymentMethodData>>(response);
}
public virtual async Task<LightningNetworkPaymentMethodData> GetStoreLightningNetworkPaymentMethod(
string storeId,
string cryptoCode, CancellationToken token = default)
{
var response =
await _httpClient.SendAsync(
CreateHttpRequest($"api/v1/stores/{storeId}/payment-methods/LightningNetwork/{cryptoCode}"), token);
return await HandleResponse<LightningNetworkPaymentMethodData>(response);
}
public virtual async Task RemoveStoreLightningNetworkPaymentMethod(string storeId,
string cryptoCode, CancellationToken token = default)
{
var response =
await _httpClient.SendAsync(
CreateHttpRequest($"api/v1/stores/{storeId}/payment-methods/LightningNetwork/{cryptoCode}",
method: HttpMethod.Delete), token);
await HandleResponse(response);
}
public virtual async Task<LightningNetworkPaymentMethodData> UpdateStoreLightningNetworkPaymentMethod(
string storeId,
string cryptoCode, LightningNetworkPaymentMethodData paymentMethod,
CancellationToken token = default)
{
var response = await _httpClient.SendAsync(
CreateHttpRequest($"api/v1/stores/{storeId}/payment-methods/LightningNetwork/{cryptoCode}",
bodyPayload: paymentMethod, method: HttpMethod.Put), token);
return await HandleResponse<LightningNetworkPaymentMethodData>(response);
}
public virtual Task<LightningNetworkPaymentMethodData>
UpdateStoreLightningNetworkPaymentMethodToInternalNode(string storeId,
string cryptoCode, CancellationToken token = default) => UpdateStoreLightningNetworkPaymentMethod(
storeId, cryptoCode, new LightningNetworkPaymentMethodData(cryptoCode, "Internal Node", true), token);
}
}

@ -0,0 +1,23 @@
using System;
using System.Collections.Generic;
using System.Text;
using System.Threading;
using System.Threading.Tasks;
using BTCPayServer.Client.Models;
namespace BTCPayServer.Client
{
public partial class BTCPayServerClient
{
public virtual async Task<PermissionMetadata[]> GetPermissionMetadata(CancellationToken token = default)
{
var response = await _httpClient.SendAsync(CreateHttpRequest("misc/permissions"), token);
return await HandleResponse<PermissionMetadata[]>(response);
}
public virtual async Task<Language[]> GetAvailableLanguages(CancellationToken token = default)
{
var response = await _httpClient.SendAsync(CreateHttpRequest("misc/lang"), token);
return await HandleResponse<Language[]>(response);
}
}
}

@ -0,0 +1,47 @@
using System;
using System.Collections.Generic;
using System.Net.Http;
using System.Threading;
using System.Threading.Tasks;
using BTCPayServer.Client.Models;
namespace BTCPayServer.Client
{
public partial class BTCPayServerClient
{
public virtual async Task<IEnumerable<NotificationData>> GetNotifications(bool? seen = null,
CancellationToken token = default)
{
var response =
await _httpClient.SendAsync(
CreateHttpRequest($"api/v1/users/me/notifications",
seen != null ? new Dictionary<string, object>() {{nameof(seen), seen}} : null), token);
return await HandleResponse<IEnumerable<NotificationData>>(response);
}
public virtual async Task<NotificationData> GetNotification(string notificationId,
CancellationToken token = default)
{
var response = await _httpClient.SendAsync(
CreateHttpRequest($"api/v1/users/me/notifications/{notificationId}"), token);
return await HandleResponse<NotificationData>(response);
}
public virtual async Task<NotificationData> UpdateNotification(string notificationId, bool? seen,
CancellationToken token = default)
{
var response = await _httpClient.SendAsync(
CreateHttpRequest($"api/v1/users/me/notifications/{notificationId}",
method: HttpMethod.Put, bodyPayload: new UpdateNotification() {Seen = seen}), token);
return await HandleResponse<NotificationData>(response);
}
public virtual async Task RemoveNotification(string notificationId, CancellationToken token = default)
{
var response = await _httpClient.SendAsync(
CreateHttpRequest($"api/v1/users/me/notifications/{notificationId}",
method: HttpMethod.Delete), token);
await HandleResponse(response);
}
}
}

@ -0,0 +1,94 @@
using System.Collections.Generic;
using System.Net.Http;
using System.Threading;
using System.Threading.Tasks;
using BTCPayServer.Client.Models;
namespace BTCPayServer.Client
{
public partial class BTCPayServerClient
{
public virtual async Task<IEnumerable<OnChainPaymentMethodData>> GetStoreOnChainPaymentMethods(string storeId,
bool? enabled = null,
CancellationToken token = default)
{
var query = new Dictionary<string, object>();
if (enabled != null)
{
query.Add(nameof(enabled), enabled);
}
var response =
await _httpClient.SendAsync(
CreateHttpRequest($"api/v1/stores/{storeId}/payment-methods/Onchain",
query), token);
return await HandleResponse<IEnumerable<OnChainPaymentMethodData>>(response);
}
public virtual async Task<OnChainPaymentMethodData> GetStoreOnChainPaymentMethod(string storeId,
string cryptoCode, CancellationToken token = default)
{
var response =
await _httpClient.SendAsync(
CreateHttpRequest($"api/v1/stores/{storeId}/payment-methods/Onchain/{cryptoCode}"), token);
return await HandleResponse<OnChainPaymentMethodData>(response);
}
public virtual async Task RemoveStoreOnChainPaymentMethod(string storeId,
string cryptoCode, CancellationToken token = default)
{
var response =
await _httpClient.SendAsync(
CreateHttpRequest($"api/v1/stores/{storeId}/payment-methods/Onchain/{cryptoCode}",
method: HttpMethod.Delete), token);
await HandleResponse(response);
}
public virtual async Task<OnChainPaymentMethodData> UpdateStoreOnChainPaymentMethod(string storeId,
string cryptoCode, OnChainPaymentMethodData paymentMethod,
CancellationToken token = default)
{
var response = await _httpClient.SendAsync(
CreateHttpRequest($"api/v1/stores/{storeId}/payment-methods/Onchain/{cryptoCode}",
bodyPayload: paymentMethod, method: HttpMethod.Put), token);
return await HandleResponse<OnChainPaymentMethodData>(response);
}
public virtual async Task<OnChainPaymentMethodPreviewResultData>
PreviewProposedStoreOnChainPaymentMethodAddresses(
string storeId, string cryptoCode, OnChainPaymentMethodData paymentMethod, int offset = 0,
int amount = 10,
CancellationToken token = default)
{
var response = await _httpClient.SendAsync(
CreateHttpRequest($"api/v1/stores/{storeId}/payment-methods/Onchain/{cryptoCode}/preview",
bodyPayload: paymentMethod,
queryPayload: new Dictionary<string, object>() {{"offset", offset}, {"amount", amount}},
method: HttpMethod.Post), token);
return await HandleResponse<OnChainPaymentMethodPreviewResultData>(response);
}
public virtual async Task<OnChainPaymentMethodPreviewResultData> PreviewStoreOnChainPaymentMethodAddresses(
string storeId, string cryptoCode, int offset = 0, int amount = 10,
CancellationToken token = default)
{
var response = await _httpClient.SendAsync(
CreateHttpRequest($"api/v1/stores/{storeId}/payment-methods/Onchain/{cryptoCode}/preview",
queryPayload: new Dictionary<string, object>() {{"offset", offset}, {"amount", amount}},
method: HttpMethod.Get), token);
return await HandleResponse<OnChainPaymentMethodPreviewResultData>(response);
}
public virtual async Task<OnChainPaymentMethodDataWithSensitiveData> GenerateOnChainWallet(string storeId,
string cryptoCode, GenerateOnChainWalletRequest request,
CancellationToken token = default)
{
var response = await _httpClient.SendAsync(
CreateHttpRequest($"api/v1/stores/{storeId}/payment-methods/Onchain/{cryptoCode}/generate",
bodyPayload: request,
method: HttpMethod.Post), token);
return await HandleResponse<OnChainPaymentMethodDataWithSensitiveData>(response);
}
}
}

@ -0,0 +1,122 @@
using System;
using System.Collections.Generic;
using System.Linq;
using System.Net.Http;
using System.Threading;
using System.Threading.Tasks;
using BTCPayServer.Client.Models;
using NBitcoin;
namespace BTCPayServer.Client
{
public partial class BTCPayServerClient
{
public virtual async Task<OnChainWalletOverviewData> ShowOnChainWalletOverview(string storeId, string cryptoCode,
CancellationToken token = default)
{
var response =
await _httpClient.SendAsync(
CreateHttpRequest($"api/v1/stores/{storeId}/payment-methods/Onchain/{cryptoCode}/wallet"), token);
return await HandleResponse<OnChainWalletOverviewData>(response);
}
public virtual async Task<OnChainWalletFeeRateData> GetOnChainFeeRate(string storeId, string cryptoCode, int? blockTarget = null,
CancellationToken token = default)
{
Dictionary<string, object> queryParams = new Dictionary<string, object>();
if (blockTarget != null)
{
queryParams.Add("blockTarget",blockTarget);
}
var response =
await _httpClient.SendAsync(
CreateHttpRequest($"api/v1/stores/{storeId}/payment-methods/Onchain/{cryptoCode}/wallet/feeRate", queryParams), token);
return await HandleResponse<OnChainWalletFeeRateData>(response);
}
public virtual async Task<OnChainWalletAddressData> GetOnChainWalletReceiveAddress(string storeId, string cryptoCode, bool forceGenerate = false,
CancellationToken token = default)
{
var response =
await _httpClient.SendAsync(
CreateHttpRequest($"api/v1/stores/{storeId}/payment-methods/Onchain/{cryptoCode}/wallet/address", new Dictionary<string, object>()
{
{"forceGenerate", forceGenerate}
}), token);
return await HandleResponse<OnChainWalletAddressData>(response);
}
public virtual async Task UnReserveOnChainWalletReceiveAddress(string storeId, string cryptoCode,
CancellationToken token = default)
{
var response =
await _httpClient.SendAsync(
CreateHttpRequest($"api/v1/stores/{storeId}/payment-methods/Onchain/{cryptoCode}/wallet/address",method:HttpMethod.Delete), token);
await HandleResponse(response);
}
public virtual async Task<IEnumerable<OnChainWalletTransactionData>> ShowOnChainWalletTransactions(
string storeId, string cryptoCode, TransactionStatus[] statusFilter = null,
CancellationToken token = default)
{
var query = new Dictionary<string, object>();
if (statusFilter?.Any() is true)
{
query.Add(nameof(statusFilter), statusFilter);
}
var response =
await _httpClient.SendAsync(
CreateHttpRequest($"api/v1/stores/{storeId}/payment-methods/Onchain/{cryptoCode}/wallet/transactions", query), token);
return await HandleResponse<IEnumerable<OnChainWalletTransactionData>>(response);
}
public virtual async Task<OnChainWalletTransactionData> GetOnChainWalletTransaction(
string storeId, string cryptoCode, string transactionId,
CancellationToken token = default)
{
var response =
await _httpClient.SendAsync(
CreateHttpRequest($"api/v1/stores/{storeId}/payment-methods/Onchain/{cryptoCode}/wallet/transactions/{transactionId}"), token);
return await HandleResponse<OnChainWalletTransactionData>(response);
}
public virtual async Task<IEnumerable<OnChainWalletUTXOData>> GetOnChainWalletUTXOs(string storeId,
string cryptoCode,
CancellationToken token = default)
{
var response =
await _httpClient.SendAsync(
CreateHttpRequest($"api/v1/stores/{storeId}/payment-methods/Onchain/{cryptoCode}/wallet/utxos"), token);
return await HandleResponse<IEnumerable<OnChainWalletUTXOData>>(response);
}
public virtual async Task<OnChainWalletTransactionData> CreateOnChainTransaction(string storeId,
string cryptoCode, CreateOnChainTransactionRequest request,
CancellationToken token = default)
{
if (!request.ProceedWithBroadcast)
{
throw new ArgumentOutOfRangeException(nameof(request.ProceedWithBroadcast),
"Please use CreateOnChainTransactionButDoNotBroadcast when wanting to only create the transaction");
}
var response =
await _httpClient.SendAsync(
CreateHttpRequest($"api/v1/stores/{storeId}/payment-methods/Onchain/{cryptoCode}/wallet/transactions", null, request, HttpMethod.Post), token);
return await HandleResponse<OnChainWalletTransactionData>(response);
}
public virtual async Task<Transaction> CreateOnChainTransactionButDoNotBroadcast(string storeId,
string cryptoCode, CreateOnChainTransactionRequest request, Network network,
CancellationToken token = default)
{
if (request.ProceedWithBroadcast)
{
throw new ArgumentOutOfRangeException(nameof(request.ProceedWithBroadcast),
"Please use CreateOnChainTransaction when wanting to also broadcast the transaction");
}
var response =
await _httpClient.SendAsync(
CreateHttpRequest($"api/v1/stores/{storeId}/payment-methods/Onchain/{cryptoCode}/wallet/transactions", null, request, HttpMethod.Post), token);
return Transaction.Parse(await HandleResponse<string>(response), network);
}
}
}

@ -9,18 +9,18 @@ namespace BTCPayServer.Client
{
public partial class BTCPayServerClient
{
public async Task<PullPaymentData> CreatePullPayment(string storeId, CreatePullPaymentRequest request, CancellationToken cancellationToken = default)
public virtual async Task<PullPaymentData> CreatePullPayment(string storeId, CreatePullPaymentRequest request, CancellationToken cancellationToken = default)
{
var response = await _httpClient.SendAsync(CreateHttpRequest($"api/v1/stores/{HttpUtility.UrlEncode(storeId)}/pull-payments", bodyPayload: request, method: HttpMethod.Post), cancellationToken);
return await HandleResponse<PullPaymentData>(response);
}
public async Task<PullPaymentData> GetPullPayment(string pullPaymentId, CancellationToken cancellationToken = default)
public virtual async Task<PullPaymentData> GetPullPayment(string pullPaymentId, CancellationToken cancellationToken = default)
{
var response = await _httpClient.SendAsync(CreateHttpRequest($"api/v1/pull-payments/{HttpUtility.UrlEncode(pullPaymentId)}", method: HttpMethod.Get), cancellationToken);
return await HandleResponse<PullPaymentData>(response);
}
public async Task<PullPaymentData[]> GetPullPayments(string storeId, bool includeArchived = false, CancellationToken cancellationToken = default)
public virtual async Task<PullPaymentData[]> GetPullPayments(string storeId, bool includeArchived = false, CancellationToken cancellationToken = default)
{
Dictionary<string, object> query = new Dictionary<string, object>();
query.Add("includeArchived", includeArchived);
@ -28,34 +28,44 @@ namespace BTCPayServer.Client
return await HandleResponse<PullPaymentData[]>(response);
}
public async Task ArchivePullPayment(string storeId, string pullPaymentId, CancellationToken cancellationToken = default)
public virtual async Task ArchivePullPayment(string storeId, string pullPaymentId, CancellationToken cancellationToken = default)
{
var response = await _httpClient.SendAsync(CreateHttpRequest($"api/v1/stores/{HttpUtility.UrlEncode(storeId)}/pull-payments/{HttpUtility.UrlEncode(pullPaymentId)}", method: HttpMethod.Delete), cancellationToken);
await HandleResponse(response);
}
public async Task<PayoutData[]> GetPayouts(string pullPaymentId, bool includeCancelled = false, CancellationToken cancellationToken = default)
public virtual async Task<PayoutData[]> GetPayouts(string pullPaymentId, bool includeCancelled = false, CancellationToken cancellationToken = default)
{
Dictionary<string, object> query = new Dictionary<string, object>();
query.Add("includeCancelled", includeCancelled);
var response = await _httpClient.SendAsync(CreateHttpRequest($"api/v1/pull-payments/{HttpUtility.UrlEncode(pullPaymentId)}/payouts", queryPayload: query, method: HttpMethod.Get), cancellationToken);
return await HandleResponse<PayoutData[]>(response);
}
public async Task<PayoutData> CreatePayout(string pullPaymentId, CreatePayoutRequest payoutRequest, CancellationToken cancellationToken = default)
public virtual async Task<PayoutData> CreatePayout(string pullPaymentId, CreatePayoutRequest payoutRequest, CancellationToken cancellationToken = default)
{
var response = await _httpClient.SendAsync(CreateHttpRequest($"api/v1/pull-payments/{HttpUtility.UrlEncode(pullPaymentId)}/payouts", bodyPayload: payoutRequest, method: HttpMethod.Post), cancellationToken);
return await HandleResponse<PayoutData>(response);
}
public async Task CancelPayout(string storeId, string payoutId, CancellationToken cancellationToken = default)
public virtual async Task CancelPayout(string storeId, string payoutId, CancellationToken cancellationToken = default)
{
var response = await _httpClient.SendAsync(CreateHttpRequest($"api/v1/stores/{HttpUtility.UrlEncode(storeId)}/payouts/{HttpUtility.UrlEncode(payoutId)}", method: HttpMethod.Delete), cancellationToken);
await HandleResponse(response);
}
public async Task<PayoutData> ApprovePayout(string storeId, string payoutId, ApprovePayoutRequest request, CancellationToken cancellationToken = default)
public virtual async Task<PayoutData> ApprovePayout(string storeId, string payoutId, ApprovePayoutRequest request, CancellationToken cancellationToken = default)
{
var response = await _httpClient.SendAsync(CreateHttpRequest($"api/v1/stores/{HttpUtility.UrlEncode(storeId)}/payouts/{HttpUtility.UrlEncode(payoutId)}", bodyPayload: request, method: HttpMethod.Post), cancellationToken);
return await HandleResponse<PayoutData>(response);
}
public async Task MarkPayoutPaid(string storeId, string payoutId,
CancellationToken cancellationToken = default)
{
var response = await _httpClient.SendAsync(
CreateHttpRequest(
$"api/v1/stores/{HttpUtility.UrlEncode(storeId)}/payouts/{HttpUtility.UrlEncode(payoutId)}/mark-paid",
method: HttpMethod.Post), cancellationToken);
await HandleResponse(response);
}
}
}

@ -0,0 +1,27 @@
using System.Collections.Generic;
using System.Threading;
using System.Threading.Tasks;
using BTCPayServer.Client.Models;
namespace BTCPayServer.Client
{
public partial class BTCPayServerClient
{
public virtual async Task<Dictionary<string, GenericPaymentMethodData>> GetStorePaymentMethods(string storeId,
bool? enabled = null,
CancellationToken token = default)
{
var query = new Dictionary<string, object>();
if (enabled != null)
{
query.Add(nameof(enabled), enabled);
}
var response =
await _httpClient.SendAsync(
CreateHttpRequest($"api/v1/stores/{storeId}/payment-methods",
query), token);
return await HandleResponse<Dictionary<string, GenericPaymentMethodData>>(response);
}
}
}

@ -1,3 +1,4 @@
#nullable enable
using System.Net.Http;
using System.Threading;
using System.Threading.Tasks;
@ -19,5 +20,16 @@ namespace BTCPayServer.Client
var response = await _httpClient.SendAsync(CreateHttpRequest("api/v1/users", null, request, HttpMethod.Post), token);
return await HandleResponse<ApplicationUserData>(response);
}
public virtual async Task DeleteUser(string userId, CancellationToken token = default)
{
var response = await _httpClient.SendAsync(CreateHttpRequest($"api/v1/users/{userId}", null, HttpMethod.Delete), token);
await HandleResponse(response);
}
public virtual async Task DeleteCurrentUser(CancellationToken token = default)
{
await DeleteUser("me", token);
}
}
}

@ -0,0 +1,61 @@
using System.Net.Http;
using System.Threading;
using System.Threading.Tasks;
using BTCPayServer.Client.Models;
namespace BTCPayServer.Client
{
public partial class BTCPayServerClient
{
public virtual async Task<StoreWebhookData> CreateWebhook(string storeId, Client.Models.CreateStoreWebhookRequest create, CancellationToken token = default)
{
var response = await _httpClient.SendAsync(CreateHttpRequest($"api/v1/stores/{storeId}/webhooks", bodyPayload: create, method: HttpMethod.Post), token);
return await HandleResponse<StoreWebhookData>(response);
}
public virtual async Task<StoreWebhookData> GetWebhook(string storeId, string webhookId, CancellationToken token = default)
{
var response = await _httpClient.SendAsync(CreateHttpRequest($"api/v1/stores/{storeId}/webhooks/{webhookId}"), token);
if (response.StatusCode == System.Net.HttpStatusCode.NotFound)
return null;
return await HandleResponse<StoreWebhookData>(response);
}
public virtual async Task<StoreWebhookData> UpdateWebhook(string storeId, string webhookId, Models.UpdateStoreWebhookRequest update, CancellationToken token = default)
{
var response = await _httpClient.SendAsync(CreateHttpRequest($"api/v1/stores/{storeId}/webhooks/{webhookId}", bodyPayload: update, method: HttpMethod.Put), token);
return await HandleResponse<StoreWebhookData>(response);
}
public virtual async Task<bool> DeleteWebhook(string storeId, string webhookId, CancellationToken token = default)
{
var response = await _httpClient.SendAsync(CreateHttpRequest($"api/v1/stores/{storeId}/webhooks/{webhookId}", method: HttpMethod.Delete), token);
return response.IsSuccessStatusCode;
}
public virtual async Task<StoreWebhookData[]> GetWebhooks(string storeId, CancellationToken token = default)
{
var response = await _httpClient.SendAsync(CreateHttpRequest($"api/v1/stores/{storeId}/webhooks"), token);
return await HandleResponse<StoreWebhookData[]>(response);
}
public virtual async Task<WebhookDeliveryData[]> GetWebhookDeliveries(string storeId, string webhookId, CancellationToken token = default)
{
var response = await _httpClient.SendAsync(CreateHttpRequest($"api/v1/stores/{storeId}/webhooks/{webhookId}/deliveries"), token);
return await HandleResponse<WebhookDeliveryData[]>(response);
}
public virtual async Task<WebhookDeliveryData> GetWebhookDelivery(string storeId, string webhookId, string deliveryId, CancellationToken token = default)
{
var response = await _httpClient.SendAsync(CreateHttpRequest($"api/v1/stores/{storeId}/webhooks/{webhookId}/deliveries/{deliveryId}"), token);
return await HandleResponse<WebhookDeliveryData>(response);
}
public virtual async Task<string> RedeliverWebhook(string storeId, string webhookId, string deliveryId, CancellationToken token = default)
{
var response = await _httpClient.SendAsync(CreateHttpRequest($"api/v1/stores/{storeId}/webhooks/{webhookId}/deliveries/{deliveryId}/redeliver", null, HttpMethod.Post), token);
return await HandleResponse<string>(response);
}
public virtual async Task<WebhookEvent> GetWebhookDeliveryRequest(string storeId, string webhookId, string deliveryId, CancellationToken token = default)
{
var response = await _httpClient.SendAsync(CreateHttpRequest($"api/v1/stores/{storeId}/webhooks/{webhookId}/deliveries/{deliveryId}/request"), token);
if (response.StatusCode == System.Net.HttpStatusCode.NotFound)
return null;
return await HandleResponse<WebhookEvent>(response);
}
}
}

@ -5,6 +5,7 @@ using System.Linq;
using System.Net.Http;
using System.Net.Http.Headers;
using System.Text;
using System.Threading;
using System.Threading.Tasks;
using Newtonsoft.Json;
@ -65,9 +66,17 @@ namespace BTCPayServer.Client
protected async Task<T> HandleResponse<T>(HttpResponseMessage message)
{
await HandleResponse(message);
return JsonConvert.DeserializeObject<T>(await message.Content.ReadAsStringAsync());
var str = await message.Content.ReadAsStringAsync();
return JsonConvert.DeserializeObject<T>(str);
}
public async Task<T> SendHttpRequest<T>(string path,
Dictionary<string, object> queryPayload = null,
HttpMethod method = null, CancellationToken cancellationToken = default)
{
using var resp = await _httpClient.SendAsync(CreateHttpRequest(path, queryPayload, method), cancellationToken);
return await HandleResponse<T>(resp);
}
protected virtual HttpRequestMessage CreateHttpRequest(string path,
Dictionary<string, object> queryPayload = null,
HttpMethod method = null)

@ -0,0 +1,31 @@
using System;
using NBitcoin;
using NBitcoin.JsonConverters;
using Newtonsoft.Json;
namespace BTCPayServer.Client.JsonConverters
{
public class MnemonicJsonConverter : JsonConverter<Mnemonic>
{
public override Mnemonic ReadJson(JsonReader reader, Type objectType, Mnemonic existingValue, bool hasExistingValue,
JsonSerializer serializer)
{
return reader.TokenType switch
{
JsonToken.String => new Mnemonic((string)reader.Value),
JsonToken.Null => null,
_ => throw new JsonObjectException(reader.Path, "Mnemonic must be a json string")
};
}
public override void WriteJson(JsonWriter writer, Mnemonic value, JsonSerializer serializer)
{
if (value != null)
writer.WriteValue(value.ToString());
else
{
writer.WriteNull();
}
}
}
}

@ -0,0 +1,59 @@
using System;
using System.Collections.Generic;
using System.Linq;
using System.Reflection;
using NBitcoin;
using Newtonsoft.Json;
public class WordcountJsonConverter : JsonConverter
{
static WordcountJsonConverter()
{
_Wordcount = new Dictionary<long, WordCount>()
{
{18, WordCount.Eighteen},
{15, WordCount.Fifteen},
{12, WordCount.Twelve},
{24, WordCount.TwentyFour},
{21, WordCount.TwentyOne}
};
_WordcountReverse = _Wordcount.ToDictionary(kv => kv.Value, kv => kv.Key);
}
public override bool CanConvert(Type objectType)
{
return typeof(NBitcoin.WordCount).GetTypeInfo().IsAssignableFrom(objectType.GetTypeInfo()) ||
typeof(NBitcoin.WordCount?).GetTypeInfo().IsAssignableFrom(objectType.GetTypeInfo());
}
public override object ReadJson(JsonReader reader, Type objectType, object existingValue, JsonSerializer serializer)
{
if (reader.TokenType == JsonToken.Null)
return default;
if (reader.TokenType != JsonToken.Integer)
throw new NBitcoin.JsonConverters.JsonObjectException(
$"Unexpected json token type, expected Integer, actual {reader.TokenType}", reader);
if (!_Wordcount.TryGetValue((long)reader.Value, out var result))
throw new NBitcoin.JsonConverters.JsonObjectException(
$"Invalid WordCount, possible values {string.Join(", ", _Wordcount.Keys.ToArray())} (default: 12)",
reader);
return result;
}
public override void WriteJson(JsonWriter writer, object value, JsonSerializer serializer)
{
if (value is WordCount wc)
writer.WriteValue(_WordcountReverse[wc]);
}
readonly static Dictionary<long, WordCount> _Wordcount = new Dictionary<long, WordCount>()
{
{18, WordCount.Eighteen},
{15, WordCount.Fifteen},
{12, WordCount.Twelve},
{24, WordCount.TwentyFour},
{21, WordCount.TwentyOne}
};
readonly static Dictionary<WordCount, long> _WordcountReverse;
}

@ -0,0 +1,55 @@
using System;
using System.Collections.Generic;
using System.Linq;
using System.Reflection;
using NBitcoin;
using Newtonsoft.Json;
public class WordlistJsonConverter : JsonConverter
{
static WordlistJsonConverter()
{
_Wordlists = new Dictionary<string, Wordlist>(StringComparer.OrdinalIgnoreCase)
{
{"English", Wordlist.English},
{"Japanese", Wordlist.Japanese},
{"Spanish", Wordlist.Spanish},
{"ChineseSimplified", Wordlist.ChineseSimplified},
{"ChineseTraditional", Wordlist.ChineseTraditional},
{"French", Wordlist.French},
{"PortugueseBrazil", Wordlist.PortugueseBrazil},
{"Czech", Wordlist.Czech}
};
_WordlistsReverse = _Wordlists.ToDictionary(kv => kv.Value, kv => kv.Key);
}
public override bool CanConvert(Type objectType)
{
return typeof(Wordlist).GetTypeInfo().IsAssignableFrom(objectType.GetTypeInfo());
}
public override object ReadJson(JsonReader reader, Type objectType, object existingValue, JsonSerializer serializer)
{
if (reader.TokenType == JsonToken.Null)
return null;
if (reader.TokenType != JsonToken.String)
throw new NBitcoin.JsonConverters.JsonObjectException(
$"Unexpected json token type, expected String, actual {reader.TokenType}", reader);
if (!_Wordlists.TryGetValue((string)reader.Value, out var result))
throw new NBitcoin.JsonConverters.JsonObjectException(
$"Invalid wordlist, possible values {string.Join(", ", _Wordlists.Keys.ToArray())} (default: English)",
reader);
return result;
}
public override void WriteJson(JsonWriter writer, object value, JsonSerializer serializer)
{
if (value is Wordlist wl)
writer.WriteValue(_WordlistsReverse[wl]);
}
readonly static Dictionary<string, Wordlist> _Wordlists;
readonly static Dictionary<Wordlist, string> _WordlistsReverse;
}

@ -1,3 +1,6 @@
using System;
using Newtonsoft.Json;
namespace BTCPayServer.Client.Models
{
public class ApplicationUserData
@ -26,5 +29,11 @@ namespace BTCPayServer.Client.Models
/// the roles of the user
/// </summary>
public string[] Roles { get; set; }
/// <summary>
/// the date the user was created. Null if created before v1.0.5.6.
/// </summary>
[JsonConverter(typeof(NBitcoin.JsonConverters.DateTimeToUnixTimeConverter))]
public DateTimeOffset? Created { get; set; }
}
}

@ -7,29 +7,10 @@ using Newtonsoft.Json.Linq;
namespace BTCPayServer.Client.Models
{
public class CreateInvoiceRequest
public class CreateInvoiceRequest : InvoiceDataBase
{
[JsonProperty(ItemConverterType = typeof(NumericStringJsonConverter))]
public decimal Amount { get; set; }
public string Currency { get; set; }
public JObject Metadata { get; set; }
public CheckoutOptions Checkout { get; set; } = new CheckoutOptions();
public class CheckoutOptions
{
[JsonConverter(typeof(StringEnumConverter))]
public SpeedPolicy? SpeedPolicy { get; set; }
public string[] PaymentMethods { get; set; }
[JsonConverter(typeof(TimeSpanJsonConverter.Minutes))]
[JsonProperty("expirationMinutes")]
public TimeSpan? Expiration { get; set; }
[JsonConverter(typeof(TimeSpanJsonConverter.Minutes))]
[JsonProperty("monitoringMinutes")]
public TimeSpan? Monitoring { get; set; }
public double? PaymentTolerance { get; set; }
}
[JsonConverter(typeof(NumericStringJsonConverter))]
public decimal? Amount { get; set; }
public string[] AdditionalSearchTerms { get; set; }
}
}

@ -17,7 +17,7 @@ namespace BTCPayServer.Client.Models
Description = description;
Expiry = expiry;
}
[JsonConverter(typeof(LightMoneyJsonConverter))]
[JsonConverter(typeof(BTCPayServer.Client.JsonConverters.LightMoneyJsonConverter))]
public LightMoney Amount { get; set; }
public string Description { get; set; }
[JsonConverter(typeof(JsonConverters.TimeSpanJsonConverter.Seconds))]

@ -0,0 +1,30 @@
using System.Collections.Generic;
using BTCPayServer.JsonConverters;
using NBitcoin;
using NBitcoin.JsonConverters;
using Newtonsoft.Json;
namespace BTCPayServer.Client.Models
{
public class CreateOnChainTransactionRequest
{
public class CreateOnChainTransactionRequestDestination
{
public string Destination { get; set; }
[JsonConverter(typeof(NumericStringJsonConverter))]
public decimal? Amount { get; set; }
public bool SubtractFromAmount { get; set; }
}
[JsonConverter(typeof(FeeRateJsonConverter))]
public FeeRate FeeRate { get; set; }
public bool ProceedWithPayjoin { get; set; }= true;
public bool ProceedWithBroadcast { get; set; } = true;
public bool NoChange { get; set; } = false;
[JsonProperty(ItemConverterType = typeof(OutpointJsonConverter))]
public List<OutPoint> SelectedInputs { get; set; } = null;
public List<CreateOnChainTransactionRequestDestination> Destinations { get; set; }
[JsonProperty("rbf")]
public bool? RBF { get; set; } = null;
}
}

@ -0,0 +1,25 @@
using BTCPayServer.Client.JsonConverters;
using NBitcoin;
using Newtonsoft.Json;
using Newtonsoft.Json.Converters;
namespace BTCPayServer.Client
{
public class GenerateOnChainWalletRequest
{
public int AccountNumber { get; set; } = 0;
[JsonConverter(typeof(MnemonicJsonConverter))]
public Mnemonic ExistingMnemonic { get; set; }
[JsonConverter(typeof(WordlistJsonConverter))]
public NBitcoin.Wordlist WordList { get; set; }
[JsonConverter(typeof(WordcountJsonConverter))]
public NBitcoin.WordCount? WordCount { get; set; } = NBitcoin.WordCount.Twelve;
[JsonConverter(typeof(StringEnumConverter))]
public NBitcoin.ScriptPubKeyType ScriptPubKeyType { get; set; } = ScriptPubKeyType.Segwit;
public string Passphrase { get; set; }
public bool ImportKeysToRPC { get; set; }
public bool SavePrivateKeys { get; set; }
}
}

@ -0,0 +1,8 @@
namespace BTCPayServer.Client.Models
{
public class GenericPaymentMethodData
{
public bool Enabled { get; set; }
public object Data { get; set; }
}
}

@ -10,8 +10,7 @@ namespace BTCPayServer.Client.Models
}
public GreenfieldAPIError(string code, string message)
{
if (code == null)
throw new ArgumentNullException(nameof(code));
code = code ?? "generic-error";
if (message == null)
throw new ArgumentNullException(nameof(message));
Code = code;

@ -1,14 +1,54 @@
using System;
using System.Collections.Generic;
using BTCPayServer.Client.JsonConverters;
using BTCPayServer.JsonConverters;
using Newtonsoft.Json;
using Newtonsoft.Json.Converters;
using Newtonsoft.Json.Linq;
namespace BTCPayServer.Client.Models
{
public class InvoiceData : CreateInvoiceRequest
public enum InvoiceType
{
Standard,
TopUp
}
public class InvoiceDataBase
{
[JsonConverter(typeof(StringEnumConverter))]
public InvoiceType Type { get; set; }
public string Currency { get; set; }
public JObject Metadata { get; set; }
public CheckoutOptions Checkout { get; set; } = new CheckoutOptions();
public class CheckoutOptions
{
[JsonConverter(typeof(StringEnumConverter))]
public SpeedPolicy? SpeedPolicy { get; set; }
public string[] PaymentMethods { get; set; }
[JsonConverter(typeof(TimeSpanJsonConverter.Minutes))]
[JsonProperty("expirationMinutes")]
public TimeSpan? Expiration { get; set; }
[JsonConverter(typeof(TimeSpanJsonConverter.Minutes))]
[JsonProperty("monitoringMinutes")]
public TimeSpan? Monitoring { get; set; }
public double? PaymentTolerance { get; set; }
[JsonProperty("redirectURL")]
public string RedirectURL { get; set; }
public bool? RedirectAutomatically { get; set; }
public string DefaultLanguage { get; set; }
}
}
public class InvoiceData : InvoiceDataBase
{
public string Id { get; set; }
public string StoreId { get; set; }
[JsonConverter(typeof(NumericStringJsonConverter))]
public decimal Amount { get; set; }
public string CheckoutLink { get; set; }
[JsonConverter(typeof(StringEnumConverter))]
public InvoiceStatus Status { get; set; }
[JsonConverter(typeof(StringEnumConverter))]
@ -20,4 +60,12 @@ namespace BTCPayServer.Client.Models
[JsonConverter(typeof(NBitcoin.JsonConverters.DateTimeToUnixTimeConverter))]
public DateTimeOffset CreatedTime { get; set; }
}
public enum InvoiceStatus
{
New,
Processing,
Expired,
Invalid,
Settled
}
}

@ -0,0 +1,62 @@
using System;
using System.Collections.Generic;
using BTCPayServer.JsonConverters;
using Newtonsoft.Json;
using Newtonsoft.Json.Converters;
namespace BTCPayServer.Client.Models
{
public class InvoicePaymentMethodDataModel
{
public bool Activated { get; set; }
public string Destination { get; set; }
public string PaymentLink { get; set; }
[JsonConverter(typeof(NumericStringJsonConverter))]
public decimal Rate { get; set; }
[JsonConverter(typeof(NumericStringJsonConverter))]
public decimal PaymentMethodPaid { get; set; }
[JsonConverter(typeof(NumericStringJsonConverter))]
public decimal TotalPaid { get; set; }
[JsonConverter(typeof(NumericStringJsonConverter))]
public decimal Due { get; set; }
[JsonConverter(typeof(NumericStringJsonConverter))]
public decimal Amount { get; set; }
[JsonConverter(typeof(NumericStringJsonConverter))]
public decimal NetworkFee { get; set; }
public List<Payment> Payments { get; set; }
public string PaymentMethod { get; set; }
public class Payment
{
public string Id { get; set; }
[JsonConverter(typeof(NBitcoin.JsonConverters.DateTimeToUnixTimeConverter))]
public DateTime ReceivedDate { get; set; }
[JsonConverter(typeof(NumericStringJsonConverter))]
public decimal Value { get; set; }
[JsonConverter(typeof(NumericStringJsonConverter))]
public decimal Fee { get; set; }
[JsonConverter(typeof(StringEnumConverter))]
public PaymentStatus Status { get; set; }
public string Destination { get; set; }
public enum PaymentStatus
{
Invalid,
Processing,
Settled
}
}
}
}

@ -1,12 +0,0 @@
namespace BTCPayServer.Client.Models
{
public enum InvoiceStatus
{
New,
Paid,
Expired,
Invalid,
Complete,
Confirmed
}
}

@ -0,0 +1,14 @@
using System.Collections.Generic;
using Newtonsoft.Json;
using Newtonsoft.Json.Linq;
namespace BTCPayServer.Client.Models
{
public class LabelData
{
public string Type { get; set; }
public string Text { get; set; }
[JsonExtensionData] public Dictionary<string, JToken> AdditionalData { get; set; }
}
}

@ -0,0 +1,21 @@
using System;
using System.Collections.Generic;
using System.Text;
using Newtonsoft.Json;
namespace BTCPayServer.Client.Models
{
public class Language
{
public Language(string code, string displayName)
{
DisplayName = displayName;
Code = code;
}
[JsonProperty("code")]
public string Code { get; set; }
[JsonProperty("currentLanguage")]
public string DisplayName { get; set; }
}
}

@ -0,0 +1,12 @@
namespace BTCPayServer.Client.Models
{
public class LightningNetworkPaymentMethodBaseData
{
public string ConnectionString { get; set; }
public LightningNetworkPaymentMethodBaseData()
{
}
}
}

@ -0,0 +1,26 @@
namespace BTCPayServer.Client.Models
{
public class LightningNetworkPaymentMethodData: LightningNetworkPaymentMethodBaseData
{
/// <summary>
/// Whether the payment method is enabled
/// </summary>
public bool Enabled { get; set; }
/// <summary>
/// Crypto code of the payment method
/// </summary>
public string CryptoCode { get; set; }
public LightningNetworkPaymentMethodData()
{
}
public LightningNetworkPaymentMethodData(string cryptoCode, string connectionString, bool enabled)
{
Enabled = enabled;
CryptoCode = cryptoCode;
ConnectionString = connectionString;
}
}
}

@ -0,0 +1,16 @@
using System;
using Newtonsoft.Json;
namespace BTCPayServer.Client.Models
{
public class NotificationData
{
public string Id { get; set; }
public string Body { get; set; }
public bool Seen { get; set; }
public Uri Link { get; set; }
[JsonConverter(typeof(NBitcoin.JsonConverters.DateTimeToUnixTimeConverter))]
public DateTimeOffset CreatedTime { get; set; }
}
}

@ -0,0 +1,24 @@
using NBitcoin;
using Newtonsoft.Json;
namespace BTCPayServer.Client.Models
{
public class OnChainPaymentMethodBaseData
{
/// <summary>
/// The derivation scheme
/// </summary>
public string DerivationScheme { get; set; }
public string Label { get; set; }
[JsonConverter(typeof(NBitcoin.JsonConverters.KeyPathJsonConverter))]
public RootedKeyPath AccountKeyPath { get; set; }
public OnChainPaymentMethodBaseData()
{
}
}
}

@ -0,0 +1,31 @@
using NBitcoin;
namespace BTCPayServer.Client.Models
{
public class OnChainPaymentMethodData : OnChainPaymentMethodBaseData
{
/// <summary>
/// Whether the payment method is enabled
/// </summary>
public bool Enabled { get; set; }
/// <summary>
/// Crypto code of the payment method
/// </summary>
public string CryptoCode { get; set; }
public OnChainPaymentMethodData()
{
}
public OnChainPaymentMethodData(string cryptoCode, string derivationScheme, bool enabled, string label, RootedKeyPath accountKeyPath)
{
Enabled = enabled;
Label = label;
AccountKeyPath = accountKeyPath;
CryptoCode = cryptoCode;
DerivationScheme = derivationScheme;
}
}
}

@ -0,0 +1,23 @@
using BTCPayServer.Client.JsonConverters;
using NBitcoin;
using Newtonsoft.Json;
namespace BTCPayServer.Client.Models
{
public class OnChainPaymentMethodDataWithSensitiveData : OnChainPaymentMethodData
{
public OnChainPaymentMethodDataWithSensitiveData()
{
}
public OnChainPaymentMethodDataWithSensitiveData(string cryptoCode, string derivationScheme, bool enabled,
string label, RootedKeyPath accountKeyPath, Mnemonic mnemonic) : base(cryptoCode, derivationScheme, enabled,
label, accountKeyPath)
{
Mnemonic = mnemonic;
}
[JsonConverter(typeof(MnemonicJsonConverter))]
public Mnemonic Mnemonic { get; set; }
}
}

@ -0,0 +1,23 @@
using System.Collections.Generic;
namespace BTCPayServer.Client.Models
{
public class OnChainPaymentMethodPreviewResultData
{
/// <summary>
/// a list of addresses generated by the derivation scheme
/// </summary>
public IList<OnChainPaymentMethodPreviewResultAddressItem> Addresses { get; set; } =
new List<OnChainPaymentMethodPreviewResultAddressItem>();
public class OnChainPaymentMethodPreviewResultAddressItem
{
/// <summary>
/// The key path relative to the account key path.
/// </summary>
public string KeyPath { get; set; }
//The address generated at the key path
public string Address { get; set; }
}
}
}

@ -0,0 +1,15 @@
using NBitcoin;
using NBitcoin.JsonConverters;
using Newtonsoft.Json;
namespace BTCPayServer.Client.Models
{
public class OnChainWalletAddressData
{
public string Address { get; set; }
[JsonConverter(typeof(KeyPathJsonConverter))]
public KeyPath KeyPath { get; set; }
public string PaymentLink { get; set; }
}
}

@ -0,0 +1,12 @@
using NBitcoin;
using NBitcoin.JsonConverters;
using Newtonsoft.Json;
namespace BTCPayServer.Client.Models
{
public class OnChainWalletFeeRateData
{
[JsonConverter(typeof(FeeRateJsonConverter))]
public FeeRate FeeRate { get; set; }
}
}

@ -0,0 +1,17 @@
using BTCPayServer.JsonConverters;
using Newtonsoft.Json;
namespace BTCPayServer.Client.Models
{
public class OnChainWalletOverviewData
{
[JsonConverter(typeof(NumericStringJsonConverter))]
public decimal Balance { get; set; }
[JsonConverter(typeof(NumericStringJsonConverter))]
public decimal UnconfirmedBalance { get; set; }
[JsonConverter(typeof(NumericStringJsonConverter))]
public decimal ConfirmedBalance { get; set; }
public string Label { get; set; }
}
}

@ -0,0 +1,34 @@
using System;
using System.Collections.Generic;
using BTCPayServer.JsonConverters;
using NBitcoin;
using NBitcoin.JsonConverters;
using Newtonsoft.Json;
namespace BTCPayServer.Client.Models
{
public class OnChainWalletTransactionData
{
[JsonConverter(typeof(UInt256JsonConverter))]
public uint256 TransactionHash { get; set; }
public string Comment { get; set; }
public Dictionary<string, LabelData> Labels { get; set; } = new Dictionary<string, LabelData>();
[JsonConverter(typeof(NumericStringJsonConverter))]
public decimal Amount { get; set; }
[JsonConverter(typeof(UInt256JsonConverter))]
public uint256 BlockHash { get; set; }
public int? BlockHeight { get; set; }
public int Confirmations { get; set; }
[JsonConverter(typeof(DateTimeToUnixTimeConverter))]
public DateTimeOffset Timestamp { get; set; }
[JsonConverter(typeof(Newtonsoft.Json.Converters.StringEnumConverter))]
public TransactionStatus Status { get; set; }
}
}

@ -0,0 +1,26 @@
using System;
using System.Collections.Generic;
using BTCPayServer.JsonConverters;
using NBitcoin;
using NBitcoin.JsonConverters;
using Newtonsoft.Json;
namespace BTCPayServer.Client.Models
{
public class OnChainWalletUTXOData
{
public string Comment { get; set; }
[JsonConverter(typeof(NumericStringJsonConverter))]
public decimal Amount { get; set; }
[JsonConverter(typeof(OutpointJsonConverter))]
public OutPoint Outpoint { get; set; }
public string Link { get; set; }
public Dictionary<string, LabelData> Labels { get; set; }
[JsonConverter(typeof(DateTimeToUnixTimeConverter))]
public DateTimeOffset Timestamp { get; set; }
[JsonConverter(typeof(KeyPathJsonConverter))]
public KeyPath KeyPath { get; set; }
public string Address { get; set; }
public int Confirmations { get; set; }
}
}

@ -0,0 +1,40 @@
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using Newtonsoft.Json;
namespace BTCPayServer.Client.Models
{
public class PermissionMetadata
{
static PermissionMetadata()
{
Dictionary<string, PermissionMetadata> nodes = new Dictionary<string, PermissionMetadata>();
foreach (var policy in Client.Policies.AllPolicies)
{
nodes.Add(policy, new PermissionMetadata() { PermissionName = policy });
}
foreach (var n in nodes)
{
foreach (var policy in Client.Policies.AllPolicies)
{
if (policy.Equals(n.Key, StringComparison.OrdinalIgnoreCase))
continue;
if (Client.Permission.Create(n.Key).Contains(Client.Permission.Create(policy)))
n.Value.SubPermissions.Add(policy);
}
}
foreach (var n in nodes)
{
n.Value.SubPermissions.Sort();
}
PermissionNodes = nodes.Values.OrderBy(v => v.PermissionName).ToArray();
}
public readonly static PermissionMetadata[] PermissionNodes;
[JsonProperty("name")]
public string PermissionName { get; set; }
[JsonProperty("included")]
public List<string> SubPermissions { get; set; } = new List<string>();
}
}

@ -27,12 +27,17 @@ namespace BTCPayServer.Client.Models
/// <summary>
/// detailed sync information per chain
/// </summary>
public IEnumerable<ServerInfoSyncStatusData> SyncStatus { get; set; }
public IEnumerable<SyncStatus> SyncStatus { get; set; }
}
public class ServerInfoSyncStatusData
public class SyncStatus
{
public string CryptoCode { get; set; }
public virtual bool Available { get; set; }
}
public class ServerInfoSyncStatusData: SyncStatus
{
public int ChainHeight { get; set; }
public int? SyncHeight { get; set; }
public ServerInfoNodeData NodeInformation { get; set; }

@ -30,14 +30,23 @@ namespace BTCPayServer.Client.Models
public double PaymentTolerance { get; set; } = 0;
public bool AnyoneCanCreateInvoice { get; set; }
public bool RequiresRefundEmail { get; set; }
public bool LightningAmountInSatoshi { get; set; }
public bool LightningPrivateRouteHints { get; set; }
public bool OnChainWithLnInvoiceFallback { get; set; }
public bool LazyPaymentMethods { get; set; }
public bool RedirectAutomatically { get; set; }
[JsonProperty(NullValueHandling = NullValueHandling.Ignore)]
public bool ShowRecommendedFee { get; set; } = true;
[JsonProperty(NullValueHandling = NullValueHandling.Ignore)]
public int RecommendedFeeBlockTarget { get; set; } = 1;
public string DefaultPaymentMethod { get; set; }
[JsonProperty(NullValueHandling = NullValueHandling.Ignore)]
public string DefaultLang { get; set; } = "en";
public bool LightningAmountInSatoshi { get; set; }
public string CustomLogo { get; set; }
@ -45,16 +54,11 @@ namespace BTCPayServer.Client.Models
public string HtmlTitle { get; set; }
public bool RedirectAutomatically { get; set; }
public bool RequiresRefundEmail { get; set; }
[JsonConverter(typeof(StringEnumConverter))]
[JsonProperty(NullValueHandling = NullValueHandling.Ignore)]
public NetworkFeeMode NetworkFeeMode { get; set; } = NetworkFeeMode.Never;
public bool PayJoinEnabled { get; set; }
public bool LightningPrivateRouteHints { get; set; }
[JsonExtensionData]

@ -0,0 +1,35 @@
using System;
using System.Collections.Generic;
using System.Text;
using Newtonsoft.Json;
namespace BTCPayServer.Client.Models
{
public class StoreWebhookBaseData
{
public class AuthorizedEventsData
{
public bool Everything { get; set; } = true;
[JsonProperty(ItemConverterType = typeof(Newtonsoft.Json.Converters.StringEnumConverter))]
public WebhookEventType[] SpecificEvents { get; set; } = Array.Empty<WebhookEventType>();
}
public bool Enabled { get; set; } = true;
[JsonProperty(DefaultValueHandling = DefaultValueHandling.Ignore)]
public string Secret { get; set; }
public bool AutomaticRedelivery { get; set; } = true;
public string Url { get; set; }
public AuthorizedEventsData AuthorizedEvents { get; set; } = new AuthorizedEventsData();
}
public class UpdateStoreWebhookRequest : StoreWebhookBaseData
{
}
public class CreateStoreWebhookRequest : StoreWebhookBaseData
{
}
public class StoreWebhookData : StoreWebhookBaseData
{
public string Id { get; set; }
}
}

@ -0,0 +1,9 @@
namespace BTCPayServer.Client.Models
{
public enum TransactionStatus
{
Unconfirmed,
Confirmed,
Replaced
}
}

@ -0,0 +1,9 @@
using Newtonsoft.Json.Linq;
namespace BTCPayServer.Client.Models
{
public class UpdateInvoiceRequest
{
public JObject Metadata { get; set; }
}
}

@ -0,0 +1,7 @@
namespace BTCPayServer.Client.Models
{
public class UpdateNotification
{
public bool? Seen { get; set; }
}
}

@ -0,0 +1,18 @@
using System;
using System.Collections.Generic;
using System.Text;
using Newtonsoft.Json;
namespace BTCPayServer.Client.Models
{
public class WebhookDeliveryData
{
public string Id { get; set; }
[JsonConverter(typeof(NBitcoin.JsonConverters.DateTimeToUnixTimeConverter))]
public DateTimeOffset Timestamp { get; set; }
public int? HttpCode { get; set; }
public string ErrorMessage { get; set; }
[JsonConverter(typeof(Newtonsoft.Json.Converters.StringEnumConverter))]
public WebhookDeliveryStatus Status { get; set; }
}
}

@ -0,0 +1,13 @@
using System;
using System.Collections.Generic;
using System.Text;
namespace BTCPayServer.Client.Models
{
public enum WebhookDeliveryStatus
{
Failed,
HttpError,
HttpSuccess
}
}

@ -0,0 +1,60 @@
using System;
using System.Collections.Generic;
using System.Text;
using Newtonsoft.Json;
using Newtonsoft.Json.Converters;
using Newtonsoft.Json.Linq;
namespace BTCPayServer.Client.Models
{
public class WebhookEvent
{
public readonly static JsonSerializerSettings DefaultSerializerSettings;
static WebhookEvent()
{
DefaultSerializerSettings = new JsonSerializerSettings();
DefaultSerializerSettings.ContractResolver = new Newtonsoft.Json.Serialization.CamelCasePropertyNamesContractResolver();
NBitcoin.JsonConverters.Serializer.RegisterFrontConverters(DefaultSerializerSettings);
DefaultSerializerSettings.Formatting = Formatting.None;
}
public string DeliveryId { get; set; }
public string WebhookId { get; set; }
string _OriginalDeliveryId;
public string OriginalDeliveryId
{
get
{
if (_OriginalDeliveryId is null)
{
// Due to a typo in old version, we serialized `orignalDeliveryId` rather than `orignalDeliveryId`
// We silently fix that here.
// Note we can remove this code later on, as old webhook event are unlikely to be useful to anyone,
// and having a null orignalDeliveryId is not end of the world
if (AdditionalData != null &&
AdditionalData.TryGetValue("orignalDeliveryId", out var tok))
{
_OriginalDeliveryId = tok.Value<string>();
AdditionalData.Remove("orignalDeliveryId");
}
}
return _OriginalDeliveryId;
}
set
{
_OriginalDeliveryId = value;
}
}
public bool IsRedelivery { get; set; }
[JsonConverter(typeof(StringEnumConverter))]
public WebhookEventType Type { get; set; }
[JsonConverter(typeof(NBitcoin.JsonConverters.DateTimeToUnixTimeConverter))]
public DateTimeOffset Timestamp { get; set; }
[JsonExtensionData]
public IDictionary<string, JToken> AdditionalData { get; set; }
public T ReadAs<T>()
{
var str = JsonConvert.SerializeObject(this, DefaultSerializerSettings);
return JsonConvert.DeserializeObject<T>(str, DefaultSerializerSettings);
}
}
}

@ -0,0 +1,16 @@
using System;
using System.Collections.Generic;
using System.Text;
namespace BTCPayServer.Client.Models
{
public enum WebhookEventType
{
InvoiceCreated,
InvoiceReceivedPayment,
InvoiceProcessing,
InvoiceExpired,
InvoiceSettled,
InvoiceInvalid
}
}

@ -0,0 +1,85 @@
using System;
using System.Collections.Generic;
using System.Text;
using Newtonsoft.Json;
using Newtonsoft.Json.Converters;
namespace BTCPayServer.Client.Models
{
public class WebhookInvoiceEvent : WebhookEvent
{
public WebhookInvoiceEvent()
{
}
public WebhookInvoiceEvent(WebhookEventType evtType)
{
this.Type = evtType;
}
[JsonProperty(Order = 1)]
public string StoreId { get; set; }
[JsonProperty(Order = 2)]
public string InvoiceId { get; set; }
}
public class WebhookInvoiceSettledEvent : WebhookInvoiceEvent
{
public WebhookInvoiceSettledEvent()
{
}
public WebhookInvoiceSettledEvent(WebhookEventType evtType) : base(evtType)
{
}
public bool ManuallyMarked { get; set; }
}
public class WebhookInvoiceInvalidEvent : WebhookInvoiceEvent
{
public WebhookInvoiceInvalidEvent()
{
}
public WebhookInvoiceInvalidEvent(WebhookEventType evtType) : base(evtType)
{
}
public bool ManuallyMarked { get; set; }
}
public class WebhookInvoiceProcessingEvent : WebhookInvoiceEvent
{
public WebhookInvoiceProcessingEvent()
{
}
public WebhookInvoiceProcessingEvent(WebhookEventType evtType) : base(evtType)
{
}
public bool OverPaid { get; set; }
}
public class WebhookInvoiceReceivedPaymentEvent : WebhookInvoiceEvent
{
public WebhookInvoiceReceivedPaymentEvent()
{
}
public WebhookInvoiceReceivedPaymentEvent(WebhookEventType evtType) : base(evtType)
{
}
public bool AfterExpiration { get; set; }
}
public class WebhookInvoiceExpiredEvent : WebhookInvoiceEvent
{
public WebhookInvoiceExpiredEvent()
{
}
public WebhookInvoiceExpiredEvent(WebhookEventType evtType) : base(evtType)
{
}
public bool PartiallyPaid { get; set; }
}
}

@ -12,15 +12,20 @@ namespace BTCPayServer.Client
public const string CanUseLightningNodeInStore = "btcpay.store.canuselightningnode";
public const string CanModifyServerSettings = "btcpay.server.canmodifyserversettings";
public const string CanModifyStoreSettings = "btcpay.store.canmodifystoresettings";
public const string CanModifyStoreWebhooks = "btcpay.store.webhooks.canmodifywebhooks";
public const string CanModifyStoreSettingsUnscoped = "btcpay.store.canmodifystoresettings:";
public const string CanViewStoreSettings = "btcpay.store.canviewstoresettings";
public const string CanViewInvoices = "btcpay.store.canviewinvoices";
public const string CanCreateInvoice = "btcpay.store.cancreateinvoice";
public const string CanModifyInvoices = "btcpay.store.canmodifyinvoices";
public const string CanViewPaymentRequests = "btcpay.store.canviewpaymentrequests";
public const string CanModifyPaymentRequests = "btcpay.store.canmodifypaymentrequests";
public const string CanModifyProfile = "btcpay.user.canmodifyprofile";
public const string CanViewProfile = "btcpay.user.canviewprofile";
public const string CanManageNotificationsForUser = "btcpay.user.canmanagenotificationsforuser";
public const string CanViewNotificationsForUser = "btcpay.user.canviewnotificationsforuser";
public const string CanCreateUser = "btcpay.server.cancreateuser";
public const string CanDeleteUser = "btcpay.user.candeleteuser";
public const string CanManagePullPayments = "btcpay.store.canmanagepullpayments";
public const string Unrestricted = "unrestricted";
public static IEnumerable<string> AllPolicies
@ -29,6 +34,8 @@ namespace BTCPayServer.Client
{
yield return CanViewInvoices;
yield return CanCreateInvoice;
yield return CanModifyInvoices;
yield return CanModifyStoreWebhooks;
yield return CanModifyServerSettings;
yield return CanModifyStoreSettings;
yield return CanViewStoreSettings;
@ -37,6 +44,9 @@ namespace BTCPayServer.Client
yield return CanModifyProfile;
yield return CanViewProfile;
yield return CanCreateUser;
yield return CanDeleteUser;
yield return CanManageNotificationsForUser;
yield return CanViewNotificationsForUser;
yield return Unrestricted;
yield return CanUseInternalLightningNode;
yield return CanCreateLightningInvoiceInternalNode;
@ -156,15 +166,20 @@ namespace BTCPayServer.Client
switch (subpolicy)
{
case Policies.CanViewInvoices when this.Policy == Policies.CanModifyStoreSettings:
case Policies.CanViewInvoices when this.Policy == Policies.CanModifyInvoices:
case Policies.CanModifyStoreWebhooks when this.Policy == Policies.CanModifyStoreSettings:
case Policies.CanViewInvoices when this.Policy == Policies.CanViewStoreSettings:
case Policies.CanViewStoreSettings when this.Policy == Policies.CanModifyStoreSettings:
case Policies.CanCreateInvoice when this.Policy == Policies.CanModifyStoreSettings:
case Policies.CanModifyInvoices when this.Policy == Policies.CanModifyStoreSettings:
case Policies.CanViewProfile when this.Policy == Policies.CanModifyProfile:
case Policies.CanModifyPaymentRequests when this.Policy == Policies.CanModifyStoreSettings:
case Policies.CanViewPaymentRequests when this.Policy == Policies.CanModifyStoreSettings:
case Policies.CanViewPaymentRequests when this.Policy == Policies.CanViewStoreSettings:
case Policies.CanCreateLightningInvoiceInternalNode when this.Policy == Policies.CanUseInternalLightningNode:
case Policies.CanCreateLightningInvoiceInStore when this.Policy == Policies.CanUseLightningNodeInStore:
case Policies.CanViewNotificationsForUser when this.Policy == Policies.CanManageNotificationsForUser:
case Policies.CanUseInternalLightningNode when this.Policy == Policies.CanModifyServerSettings:
return true;
default:
return false;

@ -0,0 +1,29 @@
using NBitcoin;
using NBXplorer;
namespace BTCPayServer
{
public partial class BTCPayNetworkProvider
{
public void InitAlthash()
{
var nbxplorerNetwork = NBXplorerNetworkProvider.GetFromCryptoCode("HTML");
Add(new BTCPayNetwork()
{
CryptoCode = nbxplorerNetwork.CryptoCode,
DisplayName = "Althash",
BlockExplorerLink = NetworkType == ChainName.Mainnet ? "https://explorer.htmlcoin.com/api/tx/{0}" : "https://explorer.htmlcoin.com/api/tx/{0}",
NBXplorerNetwork = nbxplorerNetwork,
UriScheme = "htmlcoin",
DefaultRateRules = new[]
{
"HTML_X = HTML_USD",
"HTML_USD = hitbtc(HTML_USD)"
},
CryptoImagePath = "imlegacy/althash.png",
DefaultSettings = BTCPayDefaultSettings.GetDefaultSettings(NetworkType),
CoinType = NetworkType == ChainName.Mainnet ? new KeyPath("88'") : new KeyPath("1'")
});
}
}
}

@ -11,7 +11,7 @@ namespace BTCPayServer
{
CryptoCode = nbxplorerNetwork.CryptoCode,
DisplayName = "Argoneum",
BlockExplorerLink = NetworkType == NetworkType.Mainnet
BlockExplorerLink = NetworkType == ChainName.Mainnet
? "https://chainz.cryptoid.info/agm/tx.dws?{0}"
: "https://chainz.cryptoid.info/agm-test/tx.dws?{0}",
NBXplorerNetwork = nbxplorerNetwork,
@ -23,7 +23,7 @@ namespace BTCPayServer
},
CryptoImagePath = "imlegacy/argoneum.png",
DefaultSettings = BTCPayDefaultSettings.GetDefaultSettings(NetworkType),
CoinType = NetworkType == NetworkType.Mainnet ? new KeyPath("421'")
CoinType = NetworkType == ChainName.Mainnet ? new KeyPath("421'")
: new KeyPath("1'")
});
}

@ -4,14 +4,14 @@ namespace BTCPayServer
{
public partial class BTCPayNetworkProvider
{
public void InitBitcoinGold()
public void InitBGold()
{
var nbxplorerNetwork = NBXplorerNetworkProvider.GetFromCryptoCode("BTG");
Add(new BTCPayNetwork()
{
CryptoCode = nbxplorerNetwork.CryptoCode,
DisplayName = "BGold",
BlockExplorerLink = NetworkType == NetworkType.Mainnet ? "https://explorer.bitcoingold.org/insight/tx/{0}/" : "https://test-explorer.bitcoingold.org/insight/tx/{0}",
BlockExplorerLink = NetworkType == ChainName.Mainnet ? "https://btgexplorer.com/tx/{0}" : "https://testnet.btgexplorer.com/tx/{0}",
NBXplorerNetwork = nbxplorerNetwork,
UriScheme = "bitcoingold",
DefaultRateRules = new[]
@ -22,7 +22,7 @@ namespace BTCPayServer
CryptoImagePath = "imlegacy/btg.svg",
LightningImagePath = "imlegacy/btg-lightning.svg",
DefaultSettings = BTCPayDefaultSettings.GetDefaultSettings(NetworkType),
CoinType = NetworkType == NetworkType.Mainnet ? new KeyPath("156'") : new KeyPath("1'")
CoinType = NetworkType == ChainName.Mainnet ? new KeyPath("156'") : new KeyPath("1'")
});
}
}

@ -0,0 +1,29 @@
using NBitcoin;
using NBXplorer;
namespace BTCPayServer
{
public partial class BTCPayNetworkProvider
{
public void InitBPlus()
{
var nbxplorerNetwork = NBXplorerNetworkProvider.GetFromCryptoCode("XBC");
Add(new BTCPayNetwork()
{
CryptoCode = nbxplorerNetwork.CryptoCode,
DisplayName = "BPlus",
BlockExplorerLink = NetworkType == ChainName.Mainnet ? "https://chainz.cryptoid.info/xbc/tx.dws?{0}" : "https://chainz.cryptoid.info/xbc/tx.dws?{0}",
NBXplorerNetwork = nbxplorerNetwork,
UriScheme = "bplus-fix-it",
DefaultRateRules = new[]
{
"XBC_X = XBC_BTC * BTC_X",
"XBC_BTC = cryptopia(XBC_BTC)"
},
CryptoImagePath = "imlegacy/xbc.png",
DefaultSettings = BTCPayDefaultSettings.GetDefaultSettings(NetworkType),
CoinType = NetworkType == ChainName.Mainnet ? new KeyPath("65'") : new KeyPath("1'")
});
}
}
}

@ -1,29 +0,0 @@
using NBitcoin;
using NBXplorer;
namespace BTCPayServer
{
public partial class BTCPayNetworkProvider
{
public void InitBitcoinplus()
{
var nbxplorerNetwork = NBXplorerNetworkProvider.GetFromCryptoCode("XBC");
Add(new BTCPayNetwork()
{
CryptoCode = nbxplorerNetwork.CryptoCode,
DisplayName = "Bitcoinplus",
BlockExplorerLink = NetworkType == NetworkType.Mainnet ? "https://chainz.cryptoid.info/xbc/tx.dws?{0}" : "https://chainz.cryptoid.info/xbc/tx.dws?{0}",
NBXplorerNetwork = nbxplorerNetwork,
UriScheme = "bitcoinplus",
DefaultRateRules = new[]
{
"XBC_X = XBC_BTC * BTC_X",
"XBC_BTC = cryptopia(XBC_BTC)"
},
CryptoImagePath = "imlegacy/bitcoinplus.png",
DefaultSettings = BTCPayDefaultSettings.GetDefaultSettings(NetworkType),
CoinType = NetworkType == NetworkType.Mainnet ? new KeyPath("65'") : new KeyPath("1'")
});
}
}
}

@ -11,8 +11,8 @@ namespace BTCPayServer
Add(new BTCPayNetwork()
{
CryptoCode = nbxplorerNetwork.CryptoCode,
DisplayName = "Bitcore",
BlockExplorerLink = NetworkType == NetworkType.Mainnet ? "https://insight.bitcore.cc/tx/{0}" : "https://insight.bitcore.cc/tx/{0}",
DisplayName = "BitCore",
BlockExplorerLink = NetworkType == ChainName.Mainnet ? "https://explorer.bitcore.cc/tx/{0}" : "https://explorer.bitcore.cc/tx/{0}",
NBXplorerNetwork = nbxplorerNetwork,
UriScheme = "bitcore",
DefaultRateRules = new[]
@ -23,7 +23,7 @@ namespace BTCPayServer
CryptoImagePath = "imlegacy/bitcore.svg",
LightningImagePath = "imlegacy/bitcore-lightning.svg",
DefaultSettings = BTCPayDefaultSettings.GetDefaultSettings(NetworkType),
CoinType = NetworkType == NetworkType.Mainnet ? new KeyPath("160'") : new KeyPath("1'")
CoinType = NetworkType == ChainName.Mainnet ? new KeyPath("160'") : new KeyPath("1'")
});
}
}

@ -11,7 +11,7 @@ namespace BTCPayServer
{
CryptoCode = nbxplorerNetwork.CryptoCode,
DisplayName = "Chaincoin",
BlockExplorerLink = NetworkType == NetworkType.Mainnet
BlockExplorerLink = NetworkType == ChainName.Mainnet
? "https://explorer.chaincoin.org/Explorer/Transaction/{0}"
: "https://test.explorer.chaincoin.org/Explorer/Transaction/tx/{0}",
NBXplorerNetwork = nbxplorerNetwork,
@ -24,7 +24,7 @@ namespace BTCPayServer
CryptoImagePath = "imlegacy/chaincoin.png",
DefaultSettings = BTCPayDefaultSettings.GetDefaultSettings(NetworkType),
//https://github.com/satoshilabs/slips/blob/master/slip-0044.md
CoinType = NetworkType == NetworkType.Mainnet ? new KeyPath("711'")
CoinType = NetworkType == ChainName.Mainnet ? new KeyPath("711'")
: new KeyPath("1'")
});
}

@ -12,7 +12,7 @@ namespace BTCPayServer
{
CryptoCode = nbxplorerNetwork.CryptoCode,
DisplayName = "Dash",
BlockExplorerLink = NetworkType == NetworkType.Mainnet
BlockExplorerLink = NetworkType == ChainName.Mainnet
? "https://insight.dash.org/insight/tx/{0}"
: "https://testnet-insight.dashevo.org/insight/tx/{0}",
NBXplorerNetwork = nbxplorerNetwork,
@ -20,12 +20,12 @@ namespace BTCPayServer
DefaultRateRules = new[]
{
"DASH_X = DASH_BTC * BTC_X",
"DASH_BTC = bittrex(DASH_BTC)"
"DASH_BTC = bitfinex(DSH_BTC)"
},
CryptoImagePath = "imlegacy/dash.png",
DefaultSettings = BTCPayDefaultSettings.GetDefaultSettings(NetworkType),
//https://github.com/satoshilabs/slips/blob/master/slip-0044.md
CoinType = NetworkType == NetworkType.Mainnet ? new KeyPath("5'")
CoinType = NetworkType == ChainName.Mainnet ? new KeyPath("5'")
: new KeyPath("1'")
});
}

@ -12,7 +12,7 @@ namespace BTCPayServer
{
CryptoCode = nbxplorerNetwork.CryptoCode,
DisplayName = "Dogecoin",
BlockExplorerLink = NetworkType == NetworkType.Mainnet ? "https://dogechain.info/tx/{0}" : "https://dogechain.info/tx/{0}",
BlockExplorerLink = NetworkType == ChainName.Mainnet ? "https://dogechain.info/tx/{0}" : "https://dogechain.info/tx/{0}",
NBXplorerNetwork = nbxplorerNetwork,
UriScheme = "dogecoin",
DefaultRateRules = new[]
@ -22,7 +22,7 @@ namespace BTCPayServer
},
CryptoImagePath = "imlegacy/dogecoin.png",
DefaultSettings = BTCPayDefaultSettings.GetDefaultSettings(NetworkType),
CoinType = NetworkType == NetworkType.Mainnet ? new KeyPath("3'") : new KeyPath("1'")
CoinType = NetworkType == ChainName.Mainnet ? new KeyPath("3'") : new KeyPath("1'")
});
}
}

@ -12,7 +12,7 @@ namespace BTCPayServer
{
CryptoCode = nbxplorerNetwork.CryptoCode,
DisplayName = "Feathercoin",
BlockExplorerLink = NetworkType == NetworkType.Mainnet ? "https://explorer.feathercoin.com/tx/{0}" : "https://explorer.feathercoin.com/tx/{0}",
BlockExplorerLink = NetworkType == ChainName.Mainnet ? "https://explorer.feathercoin.com/tx/{0}" : "https://explorer.feathercoin.com/tx/{0}",
NBXplorerNetwork = nbxplorerNetwork,
UriScheme = "feathercoin",
DefaultRateRules = new[]
@ -22,7 +22,7 @@ namespace BTCPayServer
},
CryptoImagePath = "imlegacy/feathercoin.png",
DefaultSettings = BTCPayDefaultSettings.GetDefaultSettings(NetworkType),
CoinType = NetworkType == NetworkType.Mainnet ? new KeyPath("8'") : new KeyPath("1'")
CoinType = NetworkType == ChainName.Mainnet ? new KeyPath("8'") : new KeyPath("1'")
});
}
}

@ -11,7 +11,7 @@ namespace BTCPayServer
{
CryptoCode = nbxplorerNetwork.CryptoCode,
DisplayName = "Groestlcoin",
BlockExplorerLink = NetworkType == NetworkType.Mainnet
BlockExplorerLink = NetworkType == ChainName.Mainnet
? "https://chainz.cryptoid.info/grs/tx.dws?{0}.htm"
: "https://chainz.cryptoid.info/grs-test/tx.dws?{0}.htm",
NBXplorerNetwork = nbxplorerNetwork,
@ -24,9 +24,10 @@ namespace BTCPayServer
CryptoImagePath = "imlegacy/groestlcoin.png",
LightningImagePath = "imlegacy/groestlcoin-lightning.svg",
DefaultSettings = BTCPayDefaultSettings.GetDefaultSettings(NetworkType),
CoinType = NetworkType == NetworkType.Mainnet ? new KeyPath("17'") : new KeyPath("1'"),
CoinType = NetworkType == ChainName.Mainnet ? new KeyPath("17'") : new KeyPath("1'"),
SupportRBF = true,
SupportPayJoin = true
SupportPayJoin = true,
VaultSupported = true
});
}
}

@ -13,7 +13,7 @@ namespace BTCPayServer
{
CryptoCode = nbxplorerNetwork.CryptoCode,
DisplayName = "Litecoin",
BlockExplorerLink = NetworkType == NetworkType.Mainnet
BlockExplorerLink = NetworkType == ChainName.Mainnet
? "https://live.blockcypher.com/ltc/tx/{0}/"
: "http://explorer.litecointools.com/tx/{0}",
NBXplorerNetwork = nbxplorerNetwork,
@ -26,9 +26,9 @@ namespace BTCPayServer
CryptoImagePath = "imlegacy/litecoin.svg",
LightningImagePath = "imlegacy/litecoin-lightning.svg",
DefaultSettings = BTCPayDefaultSettings.GetDefaultSettings(NetworkType),
CoinType = NetworkType == NetworkType.Mainnet ? new KeyPath("2'") : new KeyPath("1'"),
CoinType = NetworkType == ChainName.Mainnet ? new KeyPath("2'") : new KeyPath("1'"),
//https://github.com/pooler/electrum-ltc/blob/0d6989a9d2fb2edbea421c116e49d1015c7c5a91/electrum_ltc/constants.py
ElectrumMapping = NetworkType == NetworkType.Mainnet
ElectrumMapping = NetworkType == ChainName.Mainnet
? new Dictionary<uint, DerivationType>()
{
{0x0488b21eU, DerivationType.Legacy },

@ -12,7 +12,7 @@ namespace BTCPayServer
{
CryptoCode = nbxplorerNetwork.CryptoCode,
DisplayName = "Monacoin",
BlockExplorerLink = NetworkType == NetworkType.Mainnet ? "https://mona.insight.monaco-ex.org/insight/tx/{0}" : "https://testnet-mona.insight.monaco-ex.org/insight/tx/{0}",
BlockExplorerLink = NetworkType == ChainName.Mainnet ? "https://mona.insight.monaco-ex.org/insight/tx/{0}" : "https://testnet-mona.insight.monaco-ex.org/insight/tx/{0}",
NBXplorerNetwork = nbxplorerNetwork,
UriScheme = "monacoin",
DefaultRateRules = new[]
@ -23,7 +23,7 @@ namespace BTCPayServer
CryptoImagePath = "imlegacy/monacoin.png",
LightningImagePath = "imlegacy/mona-lightning.svg",
DefaultSettings = BTCPayDefaultSettings.GetDefaultSettings(NetworkType),
CoinType = NetworkType == NetworkType.Mainnet ? new KeyPath("22'") : new KeyPath("1'")
CoinType = NetworkType == ChainName.Mainnet ? new KeyPath("22'") : new KeyPath("1'")
});
}
}

Some files were not shown because too many files have changed in this diff Show More