forked from dart-lightning/lndart.cln
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
lnlambda: add new package for lnlambda handling
Signed-off-by: Vincenzo Palazzo <[email protected]>
- Loading branch information
1 parent
07968fa
commit 972ce76
Showing
20 changed files
with
464 additions
and
7 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,29 @@ | ||
name: core lightning common sanity Check | ||
|
||
on: | ||
push: | ||
branches: [main] | ||
pull_request: | ||
branches: [main] | ||
|
||
jobs: | ||
test: | ||
runs-on: ${{ matrix.os }} | ||
strategy: | ||
fail-fast: false | ||
matrix: | ||
os: [ubuntu-latest, macos-latest, windows-latest] | ||
sdk: [stable, beta, dev] | ||
flavor: [release] | ||
steps: | ||
- uses: actions/checkout@v2 | ||
- uses: dart-lang/setup-dart@v1 | ||
with: | ||
sdk: ${{ matrix.sdk }} | ||
|
||
- name: sdk ${{ matrix.sdk }} and os ${{ matrix.os }} | ||
run: | | ||
cd packages/cln_common | ||
dart pub get | ||
dart format --set-exit-if-changed . | ||
dart analyze |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,29 @@ | ||
name: core lightning lnlambda sanity Check | ||
|
||
on: | ||
push: | ||
branches: [main] | ||
pull_request: | ||
branches: [main] | ||
|
||
jobs: | ||
test: | ||
runs-on: ${{ matrix.os }} | ||
strategy: | ||
fail-fast: false | ||
matrix: | ||
os: [ubuntu-latest, macos-latest, windows-latest] | ||
sdk: [stable, beta, dev] | ||
flavor: [release] | ||
steps: | ||
- uses: actions/checkout@v2 | ||
- uses: dart-lang/setup-dart@v1 | ||
with: | ||
sdk: ${{ matrix.sdk }} | ||
|
||
- name: sdk ${{ matrix.sdk }} and os ${{ matrix.os }} | ||
run: | | ||
cd packages/lnlambda | ||
dart pub get | ||
dart format --set-exit-if-changed . | ||
dart analyze |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,10 @@ | ||
# Files and directories created by pub. | ||
.dart_tool/ | ||
.packages | ||
|
||
# Conventional directory for build outputs. | ||
build/ | ||
|
||
# Omit committing pubspec.lock for library packages; see | ||
# https://dart.dev/guides/libraries/private-files#pubspeclock. | ||
pubspec.lock |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
## 1.0.0 | ||
|
||
- Initial version. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,25 @@ | ||
CC=dart | ||
FMT=format | ||
ARGS="--help" | ||
PROBLEM= | ||
|
||
default: fmt examples | ||
|
||
dep: | ||
$(CC) pub get | ||
|
||
fmt: | ||
$(CC) $(FMT) . | ||
$(CC) analyze . | ||
|
||
examples: | ||
$(CC) compile exe example/lnlambda_example.dart -o lnlambda_example | ||
|
||
gen: | ||
$(CC) run build_runner build | ||
|
||
clean: | ||
rm lib/src/**/*.g.dart | ||
|
||
check: | ||
$(CC) test |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,84 @@ | ||
<div align="center"> | ||
<h1>lndart.cln_common</h1> | ||
|
||
<img src="https://github.com/dart-lightning/icons/raw/main/main/res/mipmap-xxxhdpi/ic_launcher.png" /> | ||
|
||
<p> | ||
<strong> :dart: minimal interface to run lnlambda function with dart. :dart: </strong> | ||
</p> | ||
|
||
<div> | ||
<p> | ||
<img alt="GitHub Workflow Status" src="https://img.shields.io/github/workflow/status/dart-lightning/clightning.dart/Sanity%20Check?style=flat-square"> | ||
</p> | ||
|
||
<p> | ||
<img alt="Pub Popularity" src="https://img.shields.io/pub/popularity/lnlambda?style=flat-square"> | ||
</p> | ||
|
||
<p> | ||
<img alt="Pub Points" src="https://img.shields.io/pub/points/lnlambda?style=flat-square"> | ||
</p> | ||
|
||
<h4> | ||
<a href="https://github.com/dart-lightning">Project Homepage</a> | ||
</h4> | ||
</div> | ||
</div> | ||
|
||
## Table of Content | ||
|
||
- Introduction | ||
- How to use | ||
- How to contribute | ||
- License | ||
|
||
## Introduction | ||
|
||
Proposed solution for the package fragmentation across different package and application that used a basic package like building blocks. | ||
|
||
## How to Use | ||
|
||
```dart | ||
import 'package:clightning.dart/clightning_rpc.dart'; | ||
Future<void> main() async { } | ||
``` | ||
|
||
## How to contribute | ||
|
||
Read our [Hacking guide](https://docs.page/dart-lightning/lndart.clightning/dev/MAINTAINERS) | ||
|
||
## License | ||
|
||
<div align="center"> | ||
<img src="https://opensource.org/files/osi_keyhole_300X300_90ppi_0.png" width="150" height="150"/> | ||
</div> | ||
|
||
``` | ||
Copyright 2022 Vincenzo Palazzo <[email protected]>. All rights reserved. | ||
Redistribution and use in source and binary forms, with or without modification, | ||
are permitted provided that the following conditions are met: | ||
* Redistributions of source code must retain the above copyright | ||
notice, this list of conditions and the following disclaimer. | ||
* Redistributions in binary form must reproduce the above | ||
copyright notice, this list of conditions and the following | ||
disclaimer in the documentation and/or other materials provided | ||
with the distribution. | ||
* Neither the name of Google Inc. nor the names of its | ||
contributors may be used to endorse or promote products derived | ||
from this software without specific prior written permission. | ||
THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND | ||
ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED | ||
WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE | ||
DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR | ||
ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES | ||
(INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; | ||
LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON | ||
ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT | ||
(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS | ||
SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,34 @@ | ||
# This file configures the static analysis results for your project (errors, | ||
# warnings, and lints). | ||
# | ||
# This enables the 'recommended' set of lints from `package:lints`. | ||
# This set helps identify many issues that may lead to problems when running | ||
# or consuming Dart code, and enforces writing Dart using a single, idiomatic | ||
# style and format. | ||
# | ||
# If you want a smaller set of lints you can change this to specify | ||
# 'package:lints/core.yaml'. These are just the most critical lints | ||
# (the recommended set includes the core lints). | ||
# The core lints are also what is used by pub.dev for scoring packages. | ||
|
||
include: package:lints/recommended.yaml | ||
|
||
# Uncomment the following section to specify additional rules. | ||
|
||
# linter: | ||
# rules: | ||
# - camel_case_types | ||
|
||
analyzer: | ||
exclude: | ||
- "lib/src/model/*.g.dart" | ||
|
||
# analyzer: | ||
# exclude: | ||
# - path/to/excluded/files/** | ||
|
||
# For more information about the core and recommended set of lints, see | ||
# https://dart.dev/go/core-lints | ||
|
||
# For additional information about configuring this file, see | ||
# https://dart.dev/guides/language/analysis-options |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,16 @@ | ||
{ | ||
"package_name": "plugin", | ||
"version": "v0.0.1", | ||
"api": { | ||
"name": "github", | ||
"repository": "dart-lightning/lndart.clightning", | ||
"branch": "main" | ||
}, | ||
"generation_method": { | ||
"name": "header", | ||
"header_filter": true | ||
}, | ||
"serialization_method": { | ||
"name": "md" | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,14 @@ | ||
import 'package:cln_common/cln_common.dart'; | ||
import 'package:lnlambda/lnlambda.dart'; | ||
|
||
void main() { | ||
var client = LNLambdaClient( | ||
nodeID: | ||
"028fe59bd7bbe3982699535e7e43b305c69099fbdd9902b1af5875a121fdb9a3dc", | ||
host: "52.55.124.1:19735", | ||
rune: | ||
"iuFSqODmg91rS57iKParjK0NUb7weqyksEmqruSapW89MyZtZXRob2RebGlzdHxtZXRob2ReZ2V0fG1ldGhvZD1zdW1tYXJ5Jm1ldGhvZC9nZXRzaGFyZWRzZWNyZXQmbWV0aG9kL2xpc3RkYXRhc3RvcmU=", | ||
lambdaServer: "http://ec2-52-55-124-1.compute-1.amazonaws.com:9002"); | ||
var response = client.simpleCall("getinfo", params: {}); | ||
LogManager.getInstance.debug("Response from lambda $response"); | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,8 @@ | ||
/// Support for doing something awesome. | ||
/// | ||
/// More dartdocs go here. | ||
library lnlambda; | ||
|
||
export 'src/lnlambda_base.dart'; | ||
|
||
// TODO: Export any libraries intended for clients of this package. |
Oops, something went wrong.