eosgo-client

module
v0.0.0-...-45f22e2 Latest Latest
Warning

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

Go to latest
Published: Apr 19, 2018 License: MIT

README

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.

Directories

Path Synopsis
* * @copyright defined in eosgo-client/LICENSE.txt * @author Romain Pellerin - romain@slyseed.com * * Donation appreciated :) * EOS wallet: 0x8d39307d9a0687c894058115365f6ad0f03b9ff9 * ETH wallet: 0x317b60152f0a90c10cea52d751ccb4dfad2fe9e7 * BTC wallet: 3HdFx8C3WNA6RyyGYKygECGbLD1BxyeqTN * BCH wallet: 14e9fnmcHSZxxd3fnrkaG6EYph9JuWcF9T
* * @copyright defined in eosgo-client/LICENSE.txt * @author Romain Pellerin - romain@slyseed.com * * Donation appreciated :) * EOS wallet: 0x8d39307d9a0687c894058115365f6ad0f03b9ff9 * ETH wallet: 0x317b60152f0a90c10cea52d751ccb4dfad2fe9e7 * BTC wallet: 3HdFx8C3WNA6RyyGYKygECGbLD1BxyeqTN * BCH wallet: 14e9fnmcHSZxxd3fnrkaG6EYph9JuWcF9T

Jump to

Keyboard shortcuts

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