This is a
playground to test code. It runs a full
Node.js environment and already has all of
npm’s 1,000,000+ packages pre-installed, including
@evercode-lab/qtumcore-lib with all
npm packages installed. Try it out:
This service is provided by RunKit and is not affiliated with npm, Inc or the package authors.
You can transfer qrc20 tokens and call smart contracts.
var data = "a9059cbb000000000000000000000000077bb35d818c0c26bdf37f90ccc87735201d52b40000000000000000000000000000000000000000000000000000000002faf080"; var tokenScript = qtumcore.Script.fromASM("04 9490435 40 " + data + " fe59cbc1704e89a698571413a81f0de9d8f00c69 OP_CALL"); var transaction = new qtumcore.Transaction() .from(utxos) .to("QMHZ2Wim7VoYBY1oUqfCL7vzJBJYi7e4Fv", 0) .change("Qa57xLCsnZCibXzbE4TZJ35VU1RoDWdX1q"); transaction.outputs.setScript(tokenScript); transaction.sign(privateKey); transaction.serialize(true)
npm install qtumcore-lib
bower install qtumcore-lib
We're using qtumcore-lib in production, but please use common sense when doing anything related to finances! We take no responsibility for your implementation decisions.
Please send pull requests for bug fixes, code optimization, and ideas for improvement.
To build a qtumcore-lib full bundle for the browser:
This will generate files named
git clone https://github.com/qtumproject/qtumcore-lib cd qtumcore-lib npm install
Run all the tests:
You can also run just the Node.js tests with
gulp test:node, just the browser tests with
or create a test coverage report (you can open
coverage/lcov-report/index.html to visualize it) with