Code Monkey home page Code Monkey logo

eosgo-client's Introduction

README

Overview

eosgo-client is a simple Go/Golang wrapper for EOS blockchain (https://eos.io).

It wraps the nodeos RPC API and will offer a high level set of API to simplify the development on top of EOS.

Releases

Current features

Chain API (see rpc/chain.go)

  • get_info
  • get_block
  • get_account
  • get_code
  • get_table_rows
  • abi_json_to_bin
  • abi_bin_to_json
  • push_transaction
  • push_transactions
  • get_required_keys

Wallet API (see rpc/wallet.go)

  • wallet_create
  • wallet_open
  • wallet_lock
  • wallet_lock_all
  • wallet_import_key
  • wallet_list
  • wallet_list_keys
  • wallet_get_public_keys
  • wallet_set_timeout
  • wallet_sign_trx

EOSIO contracts (see rpc/contract.go)

  • newaccount

How to start

Configure your own conf file (for exemple test.conf) based on default.conf one with

    "NODE_PRODUCER_NAME":"eosio",               // see eosio/config.ini file, default is eosio
    "NODE_PUB_KEY":"KEY",                       // see eosio/config.ini file,
    "ENV_EOS_SRC_PATH":"YOURPATH/eos",		    // path to your EOS source folder
    "ENV_EOSGO_PATH":"YOURPATH/eosgo-client",   // path to this eosgo-client project
    "API_PORT": 8888,                           // nodeos PORT
    "API_URL": "localhost",                     // nodeos URL
    "API_METHOD": "http",                       // https or https
    "LOGGING_MODE": "STDOUT",                   // STDOUT or SYSLOG
    "LOGGING_LEVEL": "debug",                   // debug, info or error
    "WALLET_NAME":"NAME",                       // your wallet name
    "WALLET_PRIV_KEY":"KEY"                     // your wallet private key
    "TRANSACTION_EXPIRATION_DELAY":30           // default 30 seconds

Also, you have to create 2 environment vars in order to load your conf file (see default.conf), in your system:

export EOSGO_PATH=/your_path/eosgo-client/.
export EOSGO_CONF=default

or for your IDE (here for a Goland project):

EOSGO_PATH=.;EOSGO_CONF=test

Then, for example of uses, have a look to rpc/chain_test.go, rpc/wallet_test.go and rpc/contract_test.go.

eosgo-client's People

Contributors

romainpellerin avatar

Stargazers

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

Watchers

 avatar  avatar

eosgo-client's Issues

Add go.mod support

It is not possible to import the module properly.

  1. The go.mod file should be present.
  2. Import path of the directories inside the module have to be set as a full module path: "github.com/romainPellerin/eosgo-client/model" instead of just "eosgo-client/model".

eosgo-client compile error ? maybe something error in zero log

[root@JD rpc]# go test -v chain_test.go

eosgo-client/common

../common/Logging.go:69:77: cannot call pointer method on "github.com/rs/zerolog/log".With().Timestamp().Str("module", module).Logger().Output(writer)
../common/Logging.go:69:77: cannot take the address of "github.com/rs/zerolog/log".With().Timestamp().Str("module", module).Logger().Output(writer)
FAIL command-line-arguments [build failed]

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.