Simple CLN plugin to simplify the BOLT 12 operation
Go to file
Vincenzo Palazzo e4d22e0091
plugin: check the error before accessing response
panic: interface conversion: interface {} is nil, not string

goroutine 1 [running]:
github.com/cln-reckless/cln4go.plugin/pkg/plugin.OceanPay(0xc0000bc000, 0xc0000b2e40)
	/home/vincent/github/work/ocean/ocean-ln/cln-offers/pkg/plugin/pay.go:51 +0x985
github.com/vincenzopalazzo/cln4go/plugin.(*rpcMethod[...]).Call(...)
	/home/vincent/github/work/ocean/ocean-ln/cln-offers/vendor/github.com/vincenzopalazzo/cln4go/plugin/command.go:12
github.com/vincenzopalazzo/cln4go/plugin.(*Plugin[...]).callRPCMethod(0xc000036120, {0xc000012a90?, 0x9}, 0x51bbe0)
	/home/vincent/github/work/ocean/ocean-ln/cln-offers/vendor/github.com/vincenzopalazzo/cln4go/plugin/plugin.go:147 +0x5a
github.com/vincenzopalazzo/cln4go/plugin.(*Plugin[...]).Start(0x576820)
	/home/vincent/github/work/ocean/ocean-ln/cln-offers/vendor/github.com/vincenzopalazzo/cln4go/plugin/plugin.go:219 +0x156
main.main()
	/home/vincent/github/work/ocean/ocean-ln/cln-offers/cmd/plugin.go:17 +0x291

Signed-off-by: Vincenzo Palazzo <vincenzopalazzodev@gmail.com>
2024-03-20 20:04:14 +01:00
.github/workflows Initial commit 2024-02-22 11:10:05 +01:00
cln-integration test: proof of request by a ocean node 2024-03-04 12:51:37 +01:00
cmd tests: write simple test 2024-02-25 16:07:30 +01:00
pkg/plugin plugin: check the error before accessing response 2024-03-20 20:04:14 +01:00
.gitignore Initial commit 2024-02-22 11:10:05 +01:00
LICENSE Initial commit 2024-02-22 11:10:05 +01:00
Makefile ci: fix the rust ci 2024-02-23 12:31:11 +01:00
README.md Initial commit 2024-02-22 11:10:05 +01:00
flake.lock Initial commit 2024-02-22 11:10:05 +01:00
flake.nix test: proof of request by a ocean node 2024-03-04 12:51:37 +01:00
go.mod deps: update cln4go lib 2024-03-04 12:51:19 +01:00
go.sum deps: update cln4go lib 2024-03-04 12:51:19 +01:00

README.md

cln4go

Go library for cln with flexible interface

cln4go Homepage

Table of Content

  • Introduction
  • How to use
  • How to contribute
  • Build with
  • License

Introduction

A minimal template for projects based on cln4go. This should get you started if you want to develop a core lightning plugin using Go.

How to use

You can use the make file in the following way make build OS=<> ARCH=<> for example make build OS=darwin ARCH=amd64 for Mac M1

To produce a binary for the OS and ARCH.

However make build should be used only in release mode, in development mode you must use make that produce a debug binary, and also make a go fmt for you, In addition, it makes a static analysis of the code with the following tool https://github.com/golangci/golangci-lint

So you should install it.

This binary can be used with core lightning using the

--plugin = path_to_this_executable_binary

Built with

License

Template to write a plugin for core lightning in dart lang.

Copyright (C) 2022 Vincenzo Palazzo vincenzopalazzodev@gmail.com ``

This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 2 of the License.

This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details.

You should have received a copy of the GNU General Public License along with this program; if not, write to the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.