A utility tool that serialises EOSIO and Antelope based blockchain action data to WebAssembly hex string.
npm install eosio-wasm-jseosio-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.
For Node.js
``shell`
$ npm i eosio-wasm-js
For Deno, make sure you include this import in your deno.json file:
`JSON`
{
"imports": {
"eosio-wasm-js/": "https://deno.land/x/eosio_wasm_js/"
}
}
`js
import serialize from "eosio-wasm-js/serialize.js";
console.log(serialize.asset("EOS"));
`
> The logged output was “000000000000000001454f5300000000”.
- Node.js >= 13.> 0.5%, not OperaMini all, not IE > 0, not dead
- Browser list .^1.30.0
- Deno.js Version .
Consider a BigInt polyfill library for safari 13.
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.js
- asset.js
- block_time_stamp.js
- bool.js
- bytes.js
- checksum.js
- extended_asset.js
- float32.js
- float64.js
- float128.js
- int.js
- name.js
- public_key.js
- serialize.js
- signature.js
- string.js
- symbol.js
- symbol_code.js
- time_point.js
- time_point_sec.js
- uint.js
- varint32.js
- varuint32.js
- transaction_header.js
- permission.js`