1.0.0 • Published 5 years ago

blockcloudjs-tx v1.0.0

Weekly downloads
-
License
MPL-2.0
Repository
-
Last release
5 years ago

blockcloudjs-tx

INSTALL

npm install blockcloudjs-tx

USAGE

const BlockcloudTx = require("blockcloud-tx");
const privateKey = Buffer.from("e331b6d69882b4cb4ea581d88e0b604039a3de5967688d3dcffdd2270c0fd109", "hex");

const txParams = {
    nonce: "0x00",
    to: "0x0000000000000000000000000000000000000000",
    value: "0x00",
    data: "0x7f7465737432000000000000000000000000000000000000000000000000000000600057",
    chainId: 1
};

const tx = new BlockcloudTx(txParams);
tx.sign(privateKey);
const serializedTx = tx.serialize();

Note: this package expects ECMAScript 6 (ES6) as a minimum environment. From browsers lacking ES6 support, please use a shim (like es6-shim) before including any of the builds from this repo.

API

./docs/

LICENSE

MPL-2.0