Nested Parenthetical Madness
Share your code. npm Orgs help your team discover, share, and reuse code. Create a free org »

@evercode-lab/qtumcore-lib

0.0.3 • Public • Published

Qtumcore Library

A pure and powerful JavaScript QTUM library.

OP_CALL support was added:

You can transfer qrc20 tokens and call smart contracts.

Example:

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[0].setScript(tokenScript);
transaction.sign(privateKey);
transaction.serialize(true)

Get Started

npm install qtumcore-lib
bower install qtumcore-lib

Security

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.

Contributing

Please send pull requests for bug fixes, code optimization, and ideas for improvement.

Building the Browser Bundle

To build a qtumcore-lib full bundle for the browser:

gulp browser

This will generate files named qtumcore-lib.js and qtumcore-lib.min.js.

Development & Tests

git clone https://github.com/qtumproject/qtumcore-lib
cd qtumcore-lib
npm install

Run all the tests:

gulp test

You can also run just the Node.js tests with gulp test:node, just the browser tests with gulp test:browser or create a test coverage report (you can open coverage/lcov-report/index.html to visualize it) with gulp coverage.

License

install

npm i @evercode-lab/qtumcore-lib

Downloadsweekly downloads

12

version

0.0.3

license

MIT

homepage

github.com

repository

Gitgithub

last publish

collaborators

  • avatar
  • avatar