FlutterWebln class

Constructors

FlutterWebln()

Properties

hashCode int
The hash code for this object.
no setterinherited
runtimeType Type
A representation of the runtime type of the object.
no setterinherited

Methods

noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
toString() String
A string representation of this object.
inherited

Operators

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

Static Properties

webln → dynamic
Before you start using any of the FlutterWebln methods you need to check for browser support by checking if the variable is defined or not as:
no setter

Static Methods

enable() → dynamic
To begin interacting with WebLN APIs you'll first need to enable the provider as:
getInfo() → dynamic
With getInfo the user gets information about the connected node as:
keysend({required KeysendArgs keysendArgs}) → dynamic
With keysend it request the user to send a keysend payment. This payment only needs a destination public key and amount.
keysendArgs({required String destination, required dynamic amount, Map<String, String>? customRecords}) → KeysendArgs
KeysendArgs parameters data types:
makeInvoice({RequestInvoiceArgs? requestInvoiceArgs}) → dynamic
With makeInvoice the user creates an invoice to be used by the web app as:
requestInvoiceArgs({dynamic amount, dynamic defaultAmount, dynamic minimumAmount, dynamic maximumAmount, String? defaultMemo}) → RequestInvoiceArgs
RequestInvoiceArgs parameters data types:
sendPayment({required String invoice}) → dynamic
With sendPayment the user sends a payment for an invoice. The user needs to provide a BOLT-11 invoice.
signMessage({required String message}) → dynamic
With signMessage it request that the user signs an arbitrary string message.
verifyMessage({required String signature, required String message}) → dynamic
With verifyMessage the users's client verifies the signature against the raw message, and let's the user know if it was valid.