GithubHelp home page GithubHelp logo

goga-m / eosjs-cli Goto Github PK

View Code? Open in Web Editor NEW
2.0 1.0 0.0 213 KB

A wizard-like command line user interface to help developers and users to quickly test commands on the eosio blockchain

JavaScript 19.08% WebAssembly 80.92%

eosjs-cli's Introduction

eosjs-cli

A wizard-like command line user interface on top of eosjs to help developers and users quickly learn-by-example and test commands on the eosio blockchain

Notice: This package is intended to be used for development and testing purposes (testnet) and for with real accounts

preview

Installation

npm install eosjs-cli -g

Usage

Run the following command to open the menu:

~$ eosjs-cli

Available Commands

1. Configuration options

View the selected configuration options Example:

{
  chainId: 'e70aaab8997e1dfce58fbfac80cbbb8fecec7b99cf982a9444273cbc64c41473',
  httpEndpoint: 'https://jungle2.cryptolions.io:443',
  expireInSeconds: 60,
  verbose: true,
  broadcast: true,
  sign: true,
  logger: {
    log: null,
    error: null
  }

2. Network information

See the current eos network info Example output:

{
  server_version: '7c0b0d38',
  chain_id: 'e70aaab8997e1dfce58fbfac80cbbb8fecec7b99cf982a9444273cbc64c41473',
  head_block_num: 53374634,
  last_irreversible_block_num: 53374311,
  last_irreversible_block_id: '032e6d679704490e5c4c436f7421bd976e5e2496885efdd7f564b62f7397ff41',
  head_block_id: '032e6eaad971117556ce5c02447b573770c998d0183f7e9abeca0fb2f2756e07',
  head_block_time: '2019-10-06T16:17:18.000',
  head_block_producer: 'batinthedark',
  virtual_block_cpu_limit: 200000000,
  virtual_block_net_limit: 524288000,
  block_cpu_limit: 199900,
  block_net_limit: 524288,
  server_version_string: 'v1.8.4',
  fork_db_head_block_num: 53374634,
  fork_db_head_block_id: '032e6eaad971117556ce5c02447b573770c998d0183f7e9abeca0fb2f2756e07'
}


3. List accounts

List all user's account created from this wallet.l Example output:

[
  {
    name: 'xhjvlcstzqxc',
    privateKey: '5KGcm4CLZxQhtVjwMp2pnhPNK29KLLABGX8MGCbqDMX7efh8Jir',
    pubkey: 'EOS7EhDXZjc1tUsh6W2J2BwmM6YuFK8YQ3K3wQUGggqs5vzED2cPC',
    balance: [
      '92.9230 EOS',
      '100.0000 JUNGLE'
    ]
  },
  {
    name: 'nagiwtrijaql',
    privateKey: '5JP3H4hdgiMFWBb3Tbi8YnjUtrkFVn3HiVtzY9u1FJk4CYn8yyM',
    pubkey: 'EOS5NotdeSXke7RTNohwyyHdRBhk7CQAhLtBzsENsoMrVKEh8DhPU',
    balance: [
      '215.0000 JUNGLE'
    ]
  }
]

4. Create account

This command will guide you step-by-step to create a new account on the blockchain, and will request the necessary info required to create an account on eosio. It will autogenerate public/private keys, autofill with suggested eosio names for faster testing.

In case of an error it will show you the error directly from the blockchain. On succesfull creation it will save the accounts in the local list.

Successfull account creation response:



{
  name: 'wydnacwatlrp',
  creator: 'xhjvlcstzqxc',
  owner: 'EOS7EhDXZjc1tUsh6W2J2BwmM6YuFK8YQ3K3wQUGggqs5vzED2cPC',
  active: 'EOS7EhDXZjc1tUsh6W2J2BwmM6YuFK8YQ3K3wQUGggqs5vzED2cPC'
}



5. Remove account (locally)

Remove an account from the local list.

6. Account information

Will retrieve account information from the blockchain

7. Account actions

Will retrieve account history from the blockchain

8. Transfer funds

Flow to transfer funds to another account

9. Balances

Check for available token balances of an account

10. Issue tokens

Issue a new token. Will deploy the eosio.token contract on the blockchain and will transfer the values to the selected issuer account.

11. Buy RAM

12. Sell RAM

13. Get currency stats

14. Get currency stats

15. Get contract code

16. Set contract code

17. Delegate bandwidth (stake)

eosjs-cli's People

Contributors

goga-m avatar

Stargazers

 avatar  avatar

Watchers

James Cloos avatar

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.