Giter Site home page Giter Site logo

micovi / zilcli Goto Github PK

View Code? Open in Web Editor NEW
13.0 1.0 2.0 538.57 MB

Command Line Interface for Zilliqa Network blockchain

Home Page: https://zilcli.app

JavaScript 18.10% Batchfile 0.05% TypeScript 81.85%
cli zilliqa javascript blockchain wallet cli-wallet

zilcli's Introduction

Hi there ๐Ÿ‘‹

zilcli's People

Contributors

chihhaotw avatar dependabot[bot] avatar micovi avatar

Stargazers

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

Watchers

 avatar

Forkers

nisses chihhaotw

zilcli's Issues

Process batch transfers

I tried to push with <<EOF private key to zil-cli but it did not work, any way to make it process batch transactions from list of addresses and balance that need to be sent?

Convert to Bech32 checksum format

Is your feature request related to a problem? Please describe.

Due to EIP-55 being not widely adopted by wallets and exchanges, the 20-bytes base16 checksum variation used by Zilliqa protocol to prevent the loss of funds sent to an Ethereum address is a not viable solution.

Describe the solution you'd like
Zilliqa shall adopt a variation of the bech32 checksum format on the wallets/SDKs level in order to prevent Users from sending ERC20 ZIL tokens from their Ethereum wallets (i.e. MyCrypto/MyEtherWallet) to an native ZIL address and vice versa.

Please note that the native protocol will still utilise the 20-bytes base16 checksum on the backend. This is a cosmetic change of the 20-bytes base16 checksum address to bech32 checksum format that is enforced on the wallets/SDKs level only. It will only be visible to end-users.

Describe alternatives you've considered
N/A

Additional context
Please refer to the technical specification on this new address standard:
https://github.com/Zilliqa/Zilliqa/wiki/Address-Standard

zilliqa-js v0.6.1 includes the Bech32 utility methods that can be imported for zilcli:
https://github.com/Zilliqa/Zilliqa-JavaScript-Library/blob/dev/packages/zilliqa-js-crypto/src/bech32.ts

Cannot install using "npm install -g zilcli"

Here is the error report

$ npm install -g zilcli
npm WARN deprecated [email protected]: [DEPRICATED] moved to @unstoppabledomains/resolution <https://github.com/unstoppabledomains/-unstoppabledomains-resolution>
npm WARN deprecated [email protected]: core-js@<3 is no longer maintained and not recommended for usage due to the number of issues. Please, upgrade your dependencies to the actual version of core-js@3.
npm WARN deprecated [email protected]: request has been deprecated, see https://github.com/request/request/issues/3142

> [email protected] preinstall /usr/local/lib/node_modules/zilcli/node_modules/scrypt
> node node-scrypt-preinstall.js

/usr/local/bin/zilcli -> /usr/local/lib/node_modules/zilcli/bin/run

> [email protected] install /usr/local/lib/node_modules/zilcli/node_modules/keccak
> npm run rebuild || echo "Keccak bindings compilation fail. Pure JS implementation will be used."


> [email protected] rebuild /usr/local/lib/node_modules/zilcli/node_modules/keccak
> node-gyp rebuild

  CXX(target) Release/obj.target/keccak/src/addon.o
  CC(target) Release/obj.target/keccak/src/libkeccak-64/KeccakSpongeWidth1600.o
  CC(target) Release/obj.target/keccak/src/libkeccak-64/KeccakP-1600-opt64.o
  SOLINK_MODULE(target) Release/keccak.node

> [email protected] install /usr/local/lib/node_modules/zilcli/node_modules/scrypt
> node-gyp rebuild

  SOLINK_MODULE(target) Release/copied_files.node
  CC(target) Release/obj.target/scrypt_wrapper/src/util/memlimit.o
  CC(target) Release/obj.target/scrypt_wrapper/src/scryptwrapper/keyderivation.o
  CC(target) Release/obj.target/scrypt_wrapper/src/scryptwrapper/pickparams.o
  CC(target) Release/obj.target/scrypt_wrapper/src/scryptwrapper/hash.o
  LIBTOOL-STATIC Release/scrypt_wrapper.a
  CC(target) Release/obj.target/scrypt_lib/scrypt/scrypt-1.2.0/lib/crypto/crypto_scrypt.o
  CC(target) Release/obj.target/scrypt_lib/scrypt/scrypt-1.2.0/lib/crypto/crypto_scrypt_smix.o
  CC(target) Release/obj.target/scrypt_lib/scrypt/scrypt-1.2.0/libcperciva/util/warnp.o
  CC(target) Release/obj.target/scrypt_lib/scrypt/scrypt-1.2.0/libcperciva/alg/sha256.o
  CC(target) Release/obj.target/scrypt_lib/scrypt/scrypt-1.2.0/libcperciva/util/insecure_memzero.o
  CC(target) Release/obj.target/scrypt_lib/scrypt/scrypt-1.2.0/lib/scryptenc/scryptenc_cpuperf.o
  LIBTOOL-STATIC Release/scrypt_lib.a
  CXX(target) Release/obj.target/scrypt/src/node-boilerplate/scrypt_common.o
  CXX(target) Release/obj.target/scrypt/src/node-boilerplate/scrypt_params_async.o
In file included from ../src/node-boilerplate/scrypt_params_async.cc:4:
In file included from ../src/node-boilerplate/inc/scrypt_params_async.h:28:
In file included from ../src/node-boilerplate/inc/scrypt_async.h:28:
../src/node-boilerplate/inc/scrypt_common.h:39:14: error: no matching member function for call to 'Get'
      N(obj->Get(Nan::New("N").ToLocalChecked())->Uint32Value()),
        ~~~~~^~~
/Users/anton/Library/Caches/node-gyp/13.7.0/include/node/v8.h:3594:43: note: candidate function not viable:
      requires 2 arguments, but 1 was provided
  V8_WARN_UNUSED_RESULT MaybeLocal<Value> Get(Local<Context> context,
                                          ^
/Users/anton/Library/Caches/node-gyp/13.7.0/include/node/v8.h:3597:43: note: candidate function not viable:
      requires 2 arguments, but 1 was provided
  V8_WARN_UNUSED_RESULT MaybeLocal<Value> Get(Local<Context> context,
                                          ^
In file included from ../src/node-boilerplate/scrypt_params_async.cc:4:
In file included from ../src/node-boilerplate/inc/scrypt_params_async.h:28:
In file included from ../src/node-boilerplate/inc/scrypt_async.h:28:
../src/node-boilerplate/inc/scrypt_common.h:40:14: error: no matching member function for call to 'Get'
      r(obj->Get(Nan::New("r").ToLocalChecked())->Uint32Value()),
        ~~~~~^~~
/Users/anton/Library/Caches/node-gyp/13.7.0/include/node/v8.h:3594:43: note: candidate function not viable:
      requires 2 arguments, but 1 was provided
  V8_WARN_UNUSED_RESULT MaybeLocal<Value> Get(Local<Context> context,
                                          ^
/Users/anton/Library/Caches/node-gyp/13.7.0/include/node/v8.h:3597:43: note: candidate function not viable:
      requires 2 arguments, but 1 was provided
  V8_WARN_UNUSED_RESULT MaybeLocal<Value> Get(Local<Context> context,
                                          ^
In file included from ../src/node-boilerplate/scrypt_params_async.cc:4:
In file included from ../src/node-boilerplate/inc/scrypt_params_async.h:28:
In file included from ../src/node-boilerplate/inc/scrypt_async.h:28:
../src/node-boilerplate/inc/scrypt_common.h:41:14: error: no matching member function for call to 'Get'
      p(obj->Get(Nan::New("p").ToLocalChecked())->Uint32Value()) {}
        ~~~~~^~~
/Users/anton/Library/Caches/node-gyp/13.7.0/include/node/v8.h:3594:43: note: candidate function not viable:
      requires 2 arguments, but 1 was provided
  V8_WARN_UNUSED_RESULT MaybeLocal<Value> Get(Local<Context> context,
                                          ^
/Users/anton/Library/Caches/node-gyp/13.7.0/include/node/v8.h:3597:43: note: candidate function not viable:
      requires 2 arguments, but 1 was provided
  V8_WARN_UNUSED_RESULT MaybeLocal<Value> Get(Local<Context> context,
                                          ^
In file included from ../src/node-boilerplate/scrypt_params_async.cc:4:
In file included from ../src/node-boilerplate/inc/scrypt_params_async.h:28:
../src/node-boilerplate/inc/scrypt_async.h:53:17: warning: 'Call' is deprecated [-Wdeprecated-declarations]
      callback->Call(1, argv);
                ^
../../nan/nan.h:1739:3: note: 'Call' has been explicitly marked deprecated here
  NAN_DEPRECATED inline v8::Local<v8::Value>
  ^
../../nan/nan.h:104:40: note: expanded from macro 'NAN_DEPRECATED'
# define NAN_DEPRECATED __attribute__((deprecated))
                                       ^
In file included from ../src/node-boilerplate/scrypt_params_async.cc:4:
../src/node-boilerplate/inc/scrypt_params_async.h:35:36: error: too few arguments to function call, single argument
      'context' was not specified
      maxtime(info[0]->NumberValue()),
              ~~~~~~~~~~~~~~~~~~~~ ^
/Users/anton/Library/Caches/node-gyp/13.7.0/include/node/v8.h:2773:3: note: 'NumberValue' declared here
  V8_WARN_UNUSED_RESULT Maybe<double> NumberValue(Local<Context> context) const;
  ^
/Users/anton/Library/Caches/node-gyp/13.7.0/include/node/v8config.h:419:31: note: expanded from macro
      'V8_WARN_UNUSED_RESULT'
#define V8_WARN_UNUSED_RESULT __attribute__((warn_unused_result))
                              ^
In file included from ../src/node-boilerplate/scrypt_params_async.cc:4:
../src/node-boilerplate/inc/scrypt_params_async.h:36:39: error: too few arguments to function call, single argument
      'context' was not specified
      maxmemfrac(info[1]->NumberValue()),
                 ~~~~~~~~~~~~~~~~~~~~ ^
/Users/anton/Library/Caches/node-gyp/13.7.0/include/node/v8.h:2773:3: note: 'NumberValue' declared here
  V8_WARN_UNUSED_RESULT Maybe<double> NumberValue(Local<Context> context) const;
  ^
/Users/anton/Library/Caches/node-gyp/13.7.0/include/node/v8config.h:419:31: note: expanded from macro
      'V8_WARN_UNUSED_RESULT'
#define V8_WARN_UNUSED_RESULT __attribute__((warn_unused_result))
                              ^
In file included from ../src/node-boilerplate/scrypt_params_async.cc:4:
../src/node-boilerplate/inc/scrypt_params_async.h:37:36: error: too few arguments to function call, single argument
      'context' was not specified
      maxmem(info[2]->IntegerValue()),
             ~~~~~~~~~~~~~~~~~~~~~ ^
/Users/anton/Library/Caches/node-gyp/13.7.0/include/node/v8.h:2774:3: note: 'IntegerValue' declared here
  V8_WARN_UNUSED_RESULT Maybe<int64_t> IntegerValue(
  ^
/Users/anton/Library/Caches/node-gyp/13.7.0/include/node/v8config.h:419:31: note: expanded from macro
      'V8_WARN_UNUSED_RESULT'
#define V8_WARN_UNUSED_RESULT __attribute__((warn_unused_result))
                              ^
In file included from ../src/node-boilerplate/scrypt_params_async.cc:4:
../src/node-boilerplate/inc/scrypt_params_async.h:38:39: error: too few arguments to function call, single argument
      'context' was not specified
      osfreemem(info[3]->IntegerValue())
                ~~~~~~~~~~~~~~~~~~~~~ ^
/Users/anton/Library/Caches/node-gyp/13.7.0/include/node/v8.h:2774:3: note: 'IntegerValue' declared here
  V8_WARN_UNUSED_RESULT Maybe<int64_t> IntegerValue(
  ^
/Users/anton/Library/Caches/node-gyp/13.7.0/include/node/v8config.h:419:31: note: expanded from macro
      'V8_WARN_UNUSED_RESULT'
#define V8_WARN_UNUSED_RESULT __attribute__((warn_unused_result))
                              ^
../src/node-boilerplate/scrypt_params_async.cc:23:8: error: no matching member function for call to 'Set'
  obj->Set(Nan::New("N").ToLocalChecked(), Nan::New<Integer>(logN));
  ~~~~~^~~
/Users/anton/Library/Caches/node-gyp/13.7.0/include/node/v8.h:3547:37: note: candidate function not viable:
      requires 3 arguments, but 2 were provided
  V8_WARN_UNUSED_RESULT Maybe<bool> Set(Local<Context> context,
                                    ^
/Users/anton/Library/Caches/node-gyp/13.7.0/include/node/v8.h:3550:37: note: candidate function not viable:
      requires 3 arguments, but 2 were provided
  V8_WARN_UNUSED_RESULT Maybe<bool> Set(Local<Context> context, uint32_t index,
                                    ^
../src/node-boilerplate/scrypt_params_async.cc:24:8: error: no matching member function for call to 'Set'
  obj->Set(Nan::New("r").ToLocalChecked(), Nan::New<Integer>(r));
  ~~~~~^~~
/Users/anton/Library/Caches/node-gyp/13.7.0/include/node/v8.h:3547:37: note: candidate function not viable:
      requires 3 arguments, but 2 were provided
  V8_WARN_UNUSED_RESULT Maybe<bool> Set(Local<Context> context,
                                    ^
/Users/anton/Library/Caches/node-gyp/13.7.0/include/node/v8.h:3550:37: note: candidate function not viable:
      requires 3 arguments, but 2 were provided
  V8_WARN_UNUSED_RESULT Maybe<bool> Set(Local<Context> context, uint32_t index,
                                    ^
../src/node-boilerplate/scrypt_params_async.cc:25:8: error: no matching member function for call to 'Set'
  obj->Set(Nan::New("p").ToLocalChecked(), Nan::New<Integer>(p));
  ~~~~~^~~
/Users/anton/Library/Caches/node-gyp/13.7.0/include/node/v8.h:3547:37: note: candidate function not viable:
      requires 3 arguments, but 2 were provided
  V8_WARN_UNUSED_RESULT Maybe<bool> Set(Local<Context> context,
                                    ^
/Users/anton/Library/Caches/node-gyp/13.7.0/include/node/v8.h:3550:37: note: candidate function not viable:
      requires 3 arguments, but 2 were provided
  V8_WARN_UNUSED_RESULT Maybe<bool> Set(Local<Context> context, uint32_t index,
                                    ^
../src/node-boilerplate/scrypt_params_async.cc:32:13: warning: 'Call' is deprecated [-Wdeprecated-declarations]
  callback->Call(2, argv);
            ^
../../nan/nan.h:1739:3: note: 'Call' has been explicitly marked deprecated here
  NAN_DEPRECATED inline v8::Local<v8::Value>
  ^
../../nan/nan.h:104:40: note: expanded from macro 'NAN_DEPRECATED'
# define NAN_DEPRECATED __attribute__((deprecated))
                                       ^
2 warnings and 10 errors generated.
make: *** [Release/obj.target/scrypt/src/node-boilerplate/scrypt_params_async.o] Error 1
gyp ERR! build error
gyp ERR! stack Error: `make` failed with exit code: 2
gyp ERR! stack     at ChildProcess.onExit (/usr/local/lib/node_modules/npm/node_modules/node-gyp/lib/build.js:194:23)
gyp ERR! stack     at ChildProcess.emit (events.js:321:20)
gyp ERR! stack     at Process.ChildProcess._handle.onexit (internal/child_process.js:275:12)
gyp ERR! System Darwin 18.7.0
gyp ERR! command "/usr/local/Cellar/node/13.7.0/bin/node" "/usr/local/lib/node_modules/npm/node_modules/node-gyp/bin/node-gyp.js" "rebuild"
gyp ERR! cwd /usr/local/lib/node_modules/zilcli/node_modules/scrypt
gyp ERR! node -v v13.7.0
gyp ERR! node-gyp -v v5.0.5
gyp ERR! not ok
npm ERR! code ELIFECYCLE
npm ERR! errno 1
npm ERR! [email protected] install: `node-gyp rebuild`
npm ERR! Exit status 1
npm ERR!
npm ERR! Failed at the [email protected] install script.
npm ERR! This is probably not a problem with npm. There is likely additional logging output above.

npm ERR! A complete log of this run can be found in:
npm ERR!     /Users/anton/.npm/_logs/2020-02-21T12_33_26_778Z-debug.log

Ability to sign unsigned transactions

We have a signing procedure where we need to be able to do the following:

  1. Generate unsigned transaction to the multisig wallet (can be from an online machine through ZIL GoSDK or similar)
  2. Move the unsigned transaction to an offline machine and sign it (this machine may not connect to the internet at all which is where this tool comes in handy as it can be installed via a .pkg file)
  3. Move the now signed transaction back to the online machine where we generated the unsigned transaction and broadcast it to Zilliqa blockchain

When we looked through the tool we couldn't find the ability to do that, could we have that feature please?

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.