Client class


Client(String url, AsymmetricKeyPair<PublicKey, PrivateKey> keyPair)
Create a client based on a server URL and a AsymmetricKeyPair.
Client.fromBarePrivateKey(String url, BigInt privateKey)
Create a client based on a server URL and a BigInt representation of a private key.


authorizationToken String
This token is required to make a successful request.
read / write
clientId String
aka SIN. This is generated from the public key.
read / write
hashCode int
The hash code for this object.
identity String
Derived from the clientId and used for the 'X-Identity' header.
read / write
keyPair AsymmetricKeyPair<PublicKey, PrivateKey>
The key pair used to sign requests.
read / write
runtimeType Type
A representation of the runtime type of the object.
url Uri
The URL of the BTCPay server.
read / write


clientInitiatedPairing([String label]) Future<String>
Returns a URL to which the user must go to approve the pairing.
createInvoice(double price, String currency) Future<Map<String, dynamic>>
Creates an invoice on the remote.
getInvoice(String id) Future<Map<String, dynamic>>
getToken() Future<String>
Returns a token which is required to create a invoice.
noSuchMethod(Invocation invocation) → dynamic
Invoked when a non-existent method or property is accessed.
serverInitiatedPairing(String pairingCode, [String label]) Future<Map<String, dynamic>>
Pairs a client based on a pairing code provided by the server
toString() String
A string representation of this object.


operator ==(Object other) bool
The equality operator.


apiAccessRequestPath → const String
invoicesPath → const String
tokenPath → const String
userAgent → const String
Used to send an appropriate User-Agent header with the HTTP requests.
'{BTC|Bit}Pay - Dart'