Client class

Constructors

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.

Properties

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.
read-onlyinherited
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.
read-onlyinherited
url Uri
The URL of the BTCPay server.
read / write

Methods

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.
inherited
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.
override

Operators

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

Constants

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