项目作者: monero-integrations

项目描述 :
Go library for Monero RPC
高级语言: Go
项目地址: git://github.com/monero-integrations/monerogo.git
创建时间: 2017-11-10T13:22:43Z
项目社区:https://github.com/monero-integrations/monerogo

开源协议:MIT License

下载


monerogo

OLD! Use https://github.com/sunrisedo/monero

Description

Monero JSON RPC Client

Installation

  1. go get github.com/MarinX/monerogo

HowTo

Daemon Client

To use DaemonClient you need to start your daemon ./monerod which will listen on localhost:18081

  1. package main
  2. import (
  3. "fmt"
  4. "github.com/MarinX/monerogo"
  5. )
  6. func main() {
  7. // creates new daemon client
  8. // the endpoint is http://127.0.0.1:18081/json_rpc
  9. client := monerogo.NewDaemonClient("http://127.0.0.1:18081/json_rpc")
  10. blockCount, err := client.GetBlockCount()
  11. if err != nil {
  12. fmt.Println(err)
  13. return
  14. }
  15. // always check the status of the response from RPC
  16. if blockCount.Status != "OK" {
  17. fmt.Println("RPC method is not OK, got", blockCount.Status)
  18. return
  19. }
  20. fmt.Println("Count:", blockCount.Count)
  21. // you can check more examples in monerogo_test.go file
  22. }

Wallet Client

//TODO

Roadmap

  • Create Daemon RPC client
  • Create Wallet RPC client

License

This library is under the MIT License

Author

Marin Basic

Donate XMR

45gSodJY5hnAL441jiYg2C72LrPoekuPNgLgWKAbW66Bdt9fyC4RcdH8A3qCAogkGPiiwvQuQAmMdDqBbar6oLyeLHfVBzR