Code Monkey home page Code Monkey logo

nkn-wallet-js's Issues

Error -43001

Hi,

I'm using this package to interact width NKN and when I use this code:

wallet.registerName('MATINMATIN', 'myPassword')

It throws an error and says:

{code: -43001, message: "INVALID TRANSACTION"}

"nkn-wallet": "^0.2.0",
node: v10.15.0

nkn-wallet SDK should appointed dependent module version

Since base-x@3.0.5 base-x commit 172a3d2, base module required argument of encode() MUST isBuffer.

# node --version
v9.11.2
# npm -v
6.4.1
# npm list base-x
/usr/lib
└── [email protected]
# cd nkn-wallet-js && git log |head -1
commit f14a3f1feda039b1a2739f1e7470ddebac46a527

# node examples/node_example.js
/usr/lib/node_modules/base-x/index.js:29
    if (!Buffer.isBuffer(source)) throw new TypeError('Expected Buffer')
                                  ^
TypeError: Expected Buffer
    at Object.encode (/usr/lib/node_modules/base-x/index.js:29:41)
    at Object.programHashString2Address (/home/admin/nkn-wallet-js/lib/crypto/algorithm.js:163:17)
    at new account (/home/admin/nkn-wallet-js/lib/crypto/account.js:29:27)
    at Object.newAccount (/home/admin/nkn-wallet-js/lib/crypto/account.js:61:10)
    at Object.newWallet (/home/admin/nkn-wallet-js/lib/wallet.js:317:28)
    at Object.<anonymous> (/home/admin/nkn-wallet-js/examples/node_example.js:9:26)
    at Module._compile (internal/modules/cjs/loader.js:654:30)
    at Object.Module._extensions..js (internal/modules/cjs/loader.js:665:10)
    at Module.load (internal/modules/cjs/loader.js:566:32)
    at tryModuleLoad (internal/modules/cjs/loader.js:506:12)

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.