eclair

package module
v0.2.3 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Nov 8, 2021 License: Unlicense Imports: 13 Imported by: 4

README

eclair-go

An API wrapper for Eclair that returns gjson results.

Read the documentation.

Quick Start

package main

import (
  "log"
  "github.com/fiatjaf/eclair-go"
)

func main() {
  ln := eclair.Client{Host: "http://localhost:8080", Password: "satoshi21"}
  res, _ := ln.Call("getinfo", nil)
  log.Print(res.Get("nodeId").String())
}

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Client

type Client struct {
	Host     string
	Password string
}

func (*Client) Call

func (c *Client) Call(method string, data map[string]interface{}) (gjson.Result, error)

func (*Client) Websocket

func (c *Client) Websocket() (<-chan gjson.Result, error)

type ErrorResponse

type ErrorResponse struct {
	Error string `json:"error"`
}

type Params

type Params map[string]interface{}

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL