### Build BTCPay Server on Linux Source: https://github.com/btcpayserver/btcpayserver/blob/master/README.md Use this script to build BTCPay Server from source on a Linux environment. Ensure .NET SDK v10.0 is installed. ```bash ./build.sh ``` -------------------------------- ### Lightning Channel Setup Script Source: https://github.com/btcpayserver/btcpayserver/blob/master/BTCPayServer.Tests/README.md Execute this script to establish a channel connection between the customer and merchant for Lightning Network testing. This is often a prerequisite for successful payment attempts. ```sh ./docker-lightning-channel-setup.sh ``` -------------------------------- ### Docker Compose Up Dev Source: https://github.com/btcpayserver/btcpayserver/blob/master/BTCPayServer.Tests/README.md Command to start the BTCPayServer development environment using Docker Compose. This command should be run after ensuring all dependencies are up-to-date and the environment is reset if necessary. ```sh docker-compose up dev ``` -------------------------------- ### Build BTCPay Server on PowerShell Source: https://github.com/btcpayserver/btcpayserver/blob/master/README.md Use this script to build BTCPay Server from source on a Windows environment using PowerShell. Ensure .NET SDK v10.0 is installed. ```powershell .\build.ps1 ``` -------------------------------- ### LND Connection String Example Source: https://github.com/btcpayserver/btcpayserver/blob/master/BTCPayServer.Tests/README.md An example of a connection string for LND (Lightning Network Daemon) when using Polar for testing. Replace the macaroon file path with your actual local path. ```plaintext type=lnd-rest;server=https://127.0.0.1:8084/;macaroonfilepath="local path to admin.macaroon on your computer, without these quotes";allowinsecure=true ``` -------------------------------- ### Trust Development Certificate for HTTPS Debugging Source: https://github.com/btcpayserver/btcpayserver/blob/master/README.md Run this command to install the development time certificate in the trust store, necessary for debugging ledger wallet interactions using the Docker-Regtest-https profile. ```bash dotnet dev-certs https --trust ``` -------------------------------- ### Run BTCPay Server with Help Argument on Linux Source: https://github.com/btcpayserver/btcpayserver/blob/master/README.md Execute this command in a Linux terminal to display available command-line arguments for running BTCPay Server. ```bash ./run.sh --help ``` -------------------------------- ### Package a BTCPay Plugin Source: https://github.com/btcpayserver/btcpayserver/blob/master/BTCPayServer.PluginPacker/README.md Run this command in your terminal after building your plugin project. Provide the path to the plugin build directory, the name of the plugin, and the desired output directory for the built package. ```bash dotnet run PATH_TO_PLUGIN_BUILD_DIRECTORY NAME_OF_PLUGIN BUILT_PACKAGE_OUTPUT_DIRECTORY ``` -------------------------------- ### Run BTCPay Server with Help Argument on PowerShell Source: https://github.com/btcpayserver/btcpayserver/blob/master/README.md Execute this command in PowerShell to display available command-line arguments for running BTCPay Server. ```powershell .\run.ps1 --help ``` -------------------------------- ### Run Altcoin Environment Source: https://github.com/btcpayserver/btcpayserver/blob/master/BTCPayServer.Tests/README.md Command to launch the BTCPayServer development environment with altcoin support enabled. This uses a specific Docker Compose file for altcoin configurations. ```sh docker-compose -f docker-compose.altcoins.yml up dev ``` -------------------------------- ### Send Bitcoin via docker-bitcoin-cli (Powershell) Source: https://github.com/btcpayserver/btcpayserver/blob/master/BTCPayServer.Tests/README.md This is the Powershell equivalent for sending Bitcoin to a specified address from within the BTCPayServer development container. Ensure you are in the project root directory. ```powershell .\docker-bitcoin-cli.ps1 sendtoaddress "mohu16LH66ptoWGEL1GtP6KHTBJYXMWhEf" 0.23111090 ``` -------------------------------- ### Pay Lightning invoice via docker-customer-lightning-cli (Linux) Source: https://github.com/btcpayserver/btcpayserver/blob/master/BTCPayServer.Tests/README.md This command is used in Linux environments to pay a Lightning invoice using the customer lightning CLI tool. Ensure the channel is open before attempting to pay. ```sh ./docker-customer-lightning-cli.sh pay lnbcrt100u1pd2e6uspp5ajnadvhazjrz55twd5k6yeg9u87wpw0q2fdr7g960yl5asv5fmnqdq9d3hkccqpxmedyrk0ehw5ueqx5e0r4qrrv74cewddfcvsxaawqz7634cmjj39sqwy5tvhz0hasktkk6t9pqfdh3edmf3z09zst5y7khv3rvxh8ctqqw6mwhh ``` -------------------------------- ### Pay Lightning invoice via docker-customer-lightning-cli (Powershell) Source: https://github.com/btcpayserver/btcpayserver/blob/master/BTCPayServer.Tests/README.md This Powershell command is used to pay a Lightning invoice using the customer lightning CLI tool. If you encounter a 'Could not find a route' error, ensure a channel is established. ```powershell .\docker-customer-lightning-cli.ps1 pay lnbcrt100u1pd2e6uspp5ajnadvhazjrz55twd5k6yeg9u87wpw0q2fdr7g960yl5asv5fmnqdq9d3hkccqpxmedyrk0ehw5ueqx5e0r4qrrv74cewddfcvsxaawqz7634cmjj39sqwy5tvhz0hasktkk6t9pqfdh3edmf3z09zst5y7khv3rvxh8ctqqw6mwhh ``` -------------------------------- ### Generate Bitcoin blocks via docker-bitcoin-generate (Powershell) Source: https://github.com/btcpayserver/btcpayserver/blob/master/BTCPayServer.Tests/README.md Use this Powershell command to generate a specified number of Bitcoin blocks within the development environment. This is useful for testing time-sensitive operations. ```powershell .\docker-bitcoin-generate.ps1 3 ``` -------------------------------- ### Send Bitcoin via docker-bitcoin-cli Source: https://github.com/btcpayserver/btcpayserver/blob/master/BTCPayServer.Tests/README.md Use this command to send Bitcoin to a specified address from within the BTCPayServer development container. Ensure you are in the project root directory. ```sh ./docker-bitcoin-cli.sh sendtoaddress "mohu16LH66ptoWGEL1GtP6KHTBJYXMWhEf" 0.23111090 ``` -------------------------------- ### Docker Compose Down and Pull Source: https://github.com/btcpayserver/btcpayserver/blob/master/BTCPayServer.Tests/README.md Commands to reset and update the BTCPayServer development environment. Running `docker-compose down --volumes` removes all containers, networks, and volumes, effectively resetting the environment. `docker-compose pull` fetches the latest Docker images. ```sh docker-compose down --volumes ``` ```sh docker-compose pull ``` -------------------------------- ### Vulnerability Reporting Template Source: https://github.com/btcpayserver/btcpayserver/blob/master/SECURITY.md Use this template to report security vulnerabilities. It includes fields for description, impact, affected versions, reproduction steps, severity, and suggested mitigations. ```markdown Subject: Vulnerability Report - BTCPay Server Dear BTCPay Server team, I am writing to report a security vulnerability that I have identified in BTCPay Server. I believe this vulnerability poses a significant threat to the security of the project and its users. Here are the details of the vulnerability: * Vulnerability description: [Provide a clear and concise description of the vulnerability] * Impact: [Describe the potential impact of the vulnerability, ie. any potential consequences for the project, its users, or any third parties] * Affected version(s): [Specify which version(s) of the project are affected by the vulnerability] * Steps to reproduce & Proof of Concept: [Provide a step-by-step guide to reproduce the vulnerability, including any screenshots and code snippets you feel would help] * Severity: [Provide your assessment of the severity of the vulnerability, using a scale such as Warning/Low/Medium/High/Critical] * Mitigation or Fix: [Provide your recommendation for a solution or mitigation strategy for the vulnerability] If needed, I [agree/do not agree] to be invited into a Github private fork for the purpose of helping resolve this vulnerability. [Please include a link to your github profile] Please let me know if you need any further information or if you would like to discuss this vulnerability in more detail. Thank you for your attention to this matter. Sincerely, [Your Name/Handle] ``` -------------------------------- ### Append Invoice Frame with URL Parameter Source: https://github.com/btcpayserver/btcpayserver/blob/master/BTCPayServer/wwwroot/tests/index.html Appends an invoice frame to the current page by retrieving an invoice ID from the URL's query parameters. Ensure the btcpay object is available in the global scope. ```javascript window.onload = function(){ const urlParams = new URLSearchParams(window.location.search); const myParam = urlParams.get('invoice'); btcpay.appendInvoiceFrame(myParam); } ``` -------------------------------- ### Lightning Channel Teardown Script Source: https://github.com/btcpayserver/btcpayserver/blob/master/BTCPayServer.Tests/README.md Use this script to close any existing Lightning Network channels. This is useful for resetting the network state during testing. ```sh ./docker-lightning-teardown.sh ``` -------------------------------- ### Generic Request Error Response (400) Source: https://github.com/btcpayserver/btcpayserver/blob/master/docs/greenfield-development.md Use this JSON structure for generic request errors resulting from business logic failures. It includes a unique error code. ```json { "code": "unique-error-code", "message":"a human readable message" } ``` -------------------------------- ### Model Validation Error Response (422) Source: https://github.com/btcpayserver/btcpayserver/blob/master/docs/greenfield-development.md Use this JSON structure when a model validation error occurs on the request. It details specific property issues. ```json [ { "path": "prop-name", "message": "human readable message" } ] ``` === COMPLETE CONTENT === This response contains all available snippets from this library. No additional content exists. Do not make further requests.