Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/toorop/go-bitcoind
A Golang client library wrapping the bitcoind JSON RPC API
https://github.com/toorop/go-bitcoind
Last synced: about 6 hours ago
JSON representation
A Golang client library wrapping the bitcoind JSON RPC API
- Host: GitHub
- URL: https://github.com/toorop/go-bitcoind
- Owner: toorop
- License: mit
- Created: 2014-05-08T17:15:04.000Z (over 10 years ago)
- Default Branch: master
- Last Pushed: 2024-03-20T10:09:52.000Z (8 months ago)
- Last Synced: 2024-06-19T17:37:41.093Z (5 months ago)
- Language: Go
- Homepage:
- Size: 194 KB
- Stars: 82
- Watchers: 4
- Forks: 73
- Open Issues: 7
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
bitcoind
===========A Golang client library wrapping the bitcoind JSON RPC API
Installation
-----
$ go get github.com/toorop/go-bitcoindUsage
----package main
import (
"github.com/toorop/go-bitcoind"
"log"
)const (
SERVER_HOST = "You server host"
SERVER_PORT = port (int)
USER = "user"
PASSWD = "passwd"
USESSL = false
WALLET_PASSPHRASE = "WalletPassphrase"
)func main() {
bc, err := bitcoind.New(SERVER_HOST, SERVER_PORT, USER, PASSWD, USESSL)
if err != nil {
log.Fatalln(err)
}//walletpassphrase
err = bc.WalletPassphrase(WALLET_PASSPHRASE, 3600)
log.Println(err)// backupwallet
err = bc.BackupWallet("/tmp/wallet.dat")
log.Println(err)// dumpprivkey
privKey, err := bc.DumpPrivKey("1KU5DX7jKECLxh1nYhmQ7CahY7GMNMVLP3")
log.Println(err, privKey)}
Mores examples in example.go (in examples folder)Documentation
-----
Click on the button below to access the full documentation:[![GoDoc](https://godoc.org/github.com/toorop/go-bitcoind?status.png)](https://godoc.org/github.com/toorop/go-bitcoind)
Unit tests
----
[![Build Status](https://travis-ci.org/Toorop/go-bitcoind.svg)](https://travis-ci.org/toorop/go-bitcoind)More than 100 unit tests are made.
To run tests:
$ go get github.com/onsi/ginkgo/ginkgo
$ go get github.com/onsi/gomega
$ ginkgoRunning Suite: Bitcoind Suite
=============================
Random Seed: 1401120770
Will run 112 of 112 specs•••••••••••••••••••••••••••••••••••
Ran 112 of 112 Specs in 0.001 seconds
SUCCESS! -- 112 Passed | 0 Failed | 0 Pending | 0 Skipped PASSGinkgo ran in 10.856335553s
Test Suite Passed
Todo
-----
* GetBlockTemplate
* sendrawtransaction
* signrawtransaction
* submitblock##### Note on SSL support
Note on ssl support : bitcoind library doesn't verify the server's certificate chain. That means that it accepts any certificate presented by the server and any host name in that certificate. In this mode, TLS is susceptible to man-in-the-middle attacks.
Donation
------![Donation QR](http://api.qrserver.com/v1/create-qr-code/?size=200x200&data=bitcoin:1HgpsmxV52eAjDcoNpVGpYEhGfgN7mM1JB%3Flabel%3DToorop)
[1HgpsmxV52eAjDcoNpVGpYEhGfgN7mM1JB](http://tinyurl.com/mccsoez)