btcpay_client 0.1.2

  • Example
  • Installing
  • Versions
  • new50

BTCPay client library for Dart

pub package

This client takes care of communications to a BTCPay server. This is heavily dependent on PointyCastle but eschews reflection so it can be used in Flutter.

This is not a complete library. Pairing and creating invoices is supported but other endpoints are not. Note that most of the heavy lifting is done. The generation of the SIN and the signing of requests.


Add it to your pubspec.yaml:

  btcpay_client: ^0.1.2

Getting Started

Have a look in the example directory for several examples.

Creating a client is done by passing a URL on which to reach your BTCPay server and either a BigInt or a AsymmetricKeyPair.

var client = Client.fromBarePrivateKey("url-to-btcpay-server", someBigInt);
await client.createInvoice(10.0, "EUR");


$ pub run test

Licence overview

All files in this repository fall under the license specified in COPYING. The project is licensed as AGPL with a lesser clause. It may be used within a proprietary project, but the core library and any changes to it must be published online. Source code for this library must always remain free for everybody to access.


  • Update README


  • Update homepage and authors


  • Initial Release


This directory contains several examples.

  • create_invoice.dart: Create an invoice.
  • get_token.dart: Get a token.
  • pair_client_initiated.dart: Client initiated pairing.
  • pair_server_initiated.dart: Server initiated pairing.

Use this package as a library

1. Depend on it

Add this to your package's pubspec.yaml file:

  btcpay_client: ^0.1.2

2. Install it

You can install packages from the command line:

with pub:

$ pub get

with Flutter:

$ flutter packages get

Alternatively, your editor might support pub get or flutter packages get. Check the docs for your editor to learn more.

3. Import it

Now in your Dart code, you can use:

import 'package:btcpay_client/btcpay_client.dart';
Version Uploaded Documentation Archive
0.1.2 Oct 30, 2018 Go to the documentation of btcpay_client 0.1.2 Download btcpay_client 0.1.2 archive
0.1.1 Oct 30, 2018 Go to the documentation of btcpay_client 0.1.1 Download btcpay_client 0.1.1 archive
0.1.0 Oct 30, 2018 Go to the documentation of btcpay_client 0.1.0 Download btcpay_client 0.1.0 archive
Describes how popular the package is relative to other packages. [more]
Code health derived from static analysis. [more]
Reflects how tidy and up-to-date the package is. [more]
Weighted score of the above. [more]
Learn more about scoring.

We analyzed this package on Nov 14, 2018, and provided a score, details, and suggestions below. Analysis was completed with status completed using:

  • Dart: 2.0.0
  • pana: 0.12.6


Detected platforms: Flutter, other

Primary library: package:btcpay_client/btcpay_client.dart with components: io.


Package Constraint Resolved Available
Direct dependencies
Dart SDK >=2.0.0 <3.0.0
asn1lib ^0.5.1 0.5.3
base58check ^1.0.1 1.0.1
convert ^2.0.2 2.0.2
hex ^0.1.2 0.1.2
pointycastle ^1.0.0-rc4 1.0.0-rc4
Transitive dependencies
charcode 1.1.2
collection 1.14.11
crypto 2.0.6
typed_data 1.1.6
Dev dependencies
args ^1.5.0
test ^1.3.4