GithubHelp home page GithubHelp logo

stevenroose / go-bitcoin-core-rpc Goto Github PK

View Code? Open in Web Editor NEW
19.0 5.0 13.0 165 KB

An RPC client for the Bitcoin Core JSON-RPC API in Go (Golang).

License: ISC License

Go 100.00%
bitcoin golang rpc-client

go-bitcoin-core-rpc's Introduction

go-bitcoin-core-rpc

ISC License GoDoc

rpcclient implements a Bitcoin Core JSON-RPC client package written in Go. It provides a robust and easy to use client for interfacing with a Bitcoin RPC server.

Status

This package is currently under active development. It is already stable and the infrastructure is complete. However, there are still several RPCs left to implement and the API is not stable yet.

Documentation

  • API Reference
  • Example Connects to a bitcoin Core RPC server using HTTP POST mode with TLS disabled and gets the current block count.

Major Features

  • Translates to and from higher-level and easier to use Go types
  • Offers a synchronous (blocking) and asynchronous API

Installation

$ go get -u github.com/stevenroose/go-bitcoin-core-rpc

License

Package rpcclient is licensed under the copyfree ISC License.

go-bitcoin-core-rpc's People

Contributors

gracenoah avatar stevenroose avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar

go-bitcoin-core-rpc's Issues

No support for old bitcoind versions?

Looks like some APIs (ImportAddressRescan in particular) are not backwards compatible with old versions of bitcoind. I can't find a good way to add compatibility without breaking changes. Any ideas?

Missing go.mod and error building on Go 1.18

Trying to build the example with Go 1.18.7 results in a build error: module github.com/btcsuite/btcd@latest found (v0.23.3), but does not contain package github.com/btcsuite/btcd/btcec

Similarly, the same error occurs when trying to use the library in another project.

Full build log:

$ git clone https://github.com/stevenroose/go-bitcoin-core-rpc.git
Cloning into 'go-bitcoin-core-rpc'...
$ cd go-bitcoin-core-rpc/
$ go build .
go: cannot find main module, but found .git/config in /home/me/src/go-bitcoin-core-rpc
        to create a module there, run:
        go mod init
$ go mod init github.com/stevenroose/go-bitcoin-core-rpc
go: creating new go.mod: module github.com/stevenroose/go-bitcoin-core-rpc
go: to add module requirements and sums:
        go mod tidy
$ go mod tidy
go: finding module for package github.com/btcsuite/btcutil
go: finding module for package github.com/btcsuite/btcd/wire
go: finding module for package github.com/btcsuite/btclog
go: finding module for package github.com/btcsuite/btcd/chaincfg
go: finding module for package github.com/btcsuite/btcd/chaincfg/chainhash
go: downloading github.com/btcsuite/btcd v0.23.3
go: downloading github.com/btcsuite/btcutil v1.0.2
go: downloading github.com/btcsuite/btclog v0.0.0-20170628155309-84c8d2346e9f
go: downloading github.com/btcsuite/btcd/chaincfg/chainhash v1.0.1
go: found github.com/btcsuite/btcd/chaincfg in github.com/btcsuite/btcd v0.23.3
go: found github.com/btcsuite/btcd/chaincfg/chainhash in github.com/btcsuite/btcd/chaincfg/chainhash v1.0.1
go: found github.com/btcsuite/btcd/wire in github.com/btcsuite/btcd v0.23.3
go: found github.com/btcsuite/btclog in github.com/btcsuite/btclog v0.0.0-20170628155309-84c8d2346e9f
go: found github.com/btcsuite/btcutil in github.com/btcsuite/btcutil v1.0.2
go: downloading github.com/davecgh/go-spew v1.1.1
go: downloading golang.org/x/crypto v0.0.0-20200622213623-75b288015ac9
go: downloading golang.org/x/sys v0.0.0-20200814200057-3d37ad5750ed
go: finding module for package github.com/btcsuite/btcd/btcec
github.com/stevenroose/go-bitcoin-core-rpc imports
        github.com/btcsuite/btcutil imports
        github.com/btcsuite/btcd/btcec: module github.com/btcsuite/btcd@latest found (v0.23.3), but does not contain package github.com/btcsuite/btcd/btcec

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.