[BREAKGLASS] A server building plugins for BTCPay Server
https://plugin-builder.btcpayserver.org
Two follow-up items from @rollforsats's 2026-04-27 testing pass: 1. Country code missing from the directory PR diff. Plugins centralise the merchant's country in one form field, but the previous server contract had two separate sinks: top-level `country` for the directory entry, and `Address.Country` for OSM addr:country. If the plugin populated only one, the other path silently dropped the value. Fix: shared `ResolveDirectoryCountry` helper used by both `BuildMerchantEntry` (merchants.json entry) and `BuildPrBody` (PR description). Top-level `country` wins (the directory accepts the special "GLOBAL" pseudonym for online-only services, which has no OSM equivalent), with `Address.Country` as the fallback. OSM addr:country still reads `Address.Country` directly since the "GLOBAL" pseudonym is not valid for OSM addr:* and would fail validation. 2. #btcmap changeset hashtag. Per the BTC Map tagging spec (https://gitea.btcmap.org/teambtcmap/btcmap-general/wiki/Tagging-Merchants#changeset-comments) automated changesets should include the `#btcmap` hashtag in their comment so the BTC Map team can identify the activity. Appended to the create / update / unlist changeset comments in the existing format. `created_by` and `source` tags unchanged. Test coverage: - ResolveDirectoryCountry_PrefersTopLevelCountry: when both fields carry an ISO code, top-level wins. - ResolveDirectoryCountry_FallsBackToAddressCountry: plugin sends only `address.country` -> directory entry still gets the country. - ResolveDirectoryCountry_FallsBackThroughWhitespace: top-level whitespace-only is treated as empty for fallback purposes. - ResolveDirectoryCountry_NullWhenNeitherProvided: neither sink populated -> null (existing conditional `WriteString` skips the key). Local verification: dotnet build clean (0/0 errors), dotnet test 63/63 passing on .NET 10 RC.2. Co-Authored-By: rollforsats <59777267+rollforsats@users.noreply.github.com> |
||
|---|---|---|
| .github/workflows | ||
| PluginBuilder | ||
| PluginBuilder.Tests | ||
| .coderabbit.yaml | ||
| .dockerignore | ||
| .editorconfig | ||
| .gitattributes | ||
| .gitignore | ||
| btcpayserver-plugin-builder.sln | ||
| Cleanup.md | ||
| Dockerfile | ||
| README.md | ||
Introduction
This project hosts a server with a front end which can be used to build BTCPay Server plugins and store the binaries on some storage. You can find our live server on https://plugin-builder.btcpayserver.org/, that is updated through btcpayserver-infra repository.
Prerequisite
It assumes you installed docker on your system.
Configuration
All parameters are configured via environment variables.
PB_POSTGRES: Connection to a postgres database (example:User ID=postgres;Include Error Detail=true;Host=127.0.0.1;Port=61932;Database=btcpayplugin)PB_STORAGE_CONNECTION_STRING: Connection string to azure storage to store build results (example:BlobEndpoint=http://127.0.0.1:32827/satoshi;AccountName=satoshi;AccountKey=Rxb41pUHRe+ibX5XS311tjXpjvu7mVi2xYJvtmq1j2jlUpN+fY/gkzyBMjqwzgj42geXGdYSbPEcu5i5wjSjPw==)PB_CHEAT_MODE: If set totrue, it's considered that the server is running in a development environment and will allow to bypass some security checks (right now only registering admin account).ASPNETCORE_URLS: The url the web server will be listening (example:http://127.0.0.1:8080)PB_DATADIR: Where some persistent data get saved (example:/datadir)
API
Full interactive API documentation is available at /docs on the live server.
The OpenAPI specification is available at /swagger/v1/swagger.json.
Some endpoints require HTTP Basic Auth using your login email and password:
curl --user "email:password" https://plugin-builder.btcpayserver.org/api/v1/plugins/{pluginSlug}/builds/{buildId}