clightning.dart

:dart: Dart framework for C-Lightning to work with the RPC interface :dart:

GitHub Workflow Status

Project Homepage

Table of Content

  • Introduction
  • How to Use
  • How Contribute
  • License

Introduction

TODO

How to Use

import 'package:clightning.dart/clightning_rpc.dart';

Future<void> main() async {
  var client = RPCClient();
  client.connect('/media/vincent/Maxtor/C-lightning/node/bitcoin/lightning-rpc');
  var response = await client.call('getinfo');
  print(response);

  var params = <String, dynamic>{
    'msatoshi': '100000msat',
    'label': 'from-dart-1',
    'description': 'This is a unit test'
  };
  response = await client.call('invoice', params: params);
  print(response);

  params = <String, dynamic>{
    'label': params['label'],
    'status': 'unpaid',
  };
  response = await client.call('delinvoice', params: params);
  print(response);
}
    

How Contribute

TODO

License

Libraries

clightning_rpc