Skip to content

A Dart implementation of lnurl to decode bech32 lnurl strings.

License

Notifications You must be signed in to change notification settings

bottlepay/dart_lnurl

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

24 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

dart_lnurl

pub package

A Dart implementation of lnurl to decode bech32 lnurl strings. Currently supports the following tags:

  • withdrawRequest
  • payRequest
  • channelRequest
  • login

Features

  • ✅ Decode a bech32-encoded lnurl string.
  • ✅ Handles LUD-17 non-bech32 lnurl string (lnurlw, lnurlp, lnurlc, keyauth).
  • ✅ Make GET request to the decoded ln service and return the response.

Learn more about the lnurl spec here: https://github.com/btcontract/lnurl-rfc

API Reference

Future<LNURLParseResult> getParams(String encodedUrl) Use this to parse an encoded bech32 lnurl string, call the decoded URI, and return the parsed response from the lnurl service. The encodedUrl can either have lightning: in it or not.

String decryptSuccessActionAesPayload({LNURLPaySuccessAction successAction, String preimage})

When doing lnurl pay, the success action could contain an encrypted payload using the payment preimage. Use this function to decrypt that payload.

About

A Dart implementation of lnurl to decode bech32 lnurl strings.

Resources

License

Stars

Watchers

Forks

Packages

No packages published

Languages