v4.0.1
A utility tool that serialises EOSIO based blockchain types to WebAssembly hex string.
Repository
Current version released
3 years ago
Versions
eosio wasm js
eosio-wasm-js is a tool that converts EOSIO blockchain types into a WASM hex string, making it handy for serializing actions in JS environments for EOSIO transactions.
Installation
For Node.js
$ npm i eosio-wasm-jsFor Deno, make sure you include this import in your deno.json file:
{
"imports": {
"eosio-wasm-js/": "https://deno.land/x/eosio_wasm_js/"
}
}Example
import serialize from "eosio-wasm-js/serialize.mjs";
console.log(serialize.asset("EOS"));The logged output was “000000000000000001454f5300000000”.
Support
- Node.js
>= 13. - Browser list
> 0.5%, not OperaMini all, not IE > 0, not dead. - Deno.js Version
^1.30.0.
Consider a BigInt polyfill library for safari 13.
Exports
The npm package eosio-wasm-js features optimal JavaScript module design. It doesn’t have a main index module, so use deep imports from the ECMAScript modules that are exported via the package.json field exports:
actions.mjsasset.mjsblock_time_stamp.mjsbool.mjsbytes.mjschecksum.mjsextended_asset.mjsfloat32.mjsfloat64.mjsfloat128.mjsint.mjsname.mjspublic_key.mjsserialize.mjssignature.mjsstring.mjssymbol.mjssymbol_code.mjstime_point.mjstime_point_sec.mjsuint.mjsvarint32.mjsvaruint32.mjstransaction_header.mjspermission.mjs