https://github.com/pur3miish/eosio-wasm-js
A utility tool that serialises EOSIO based blockchain types to WebAssembly hex string.
https://github.com/pur3miish/eosio-wasm-js
Last synced: 5 months ago
JSON representation
A utility tool that serialises EOSIO based blockchain types to WebAssembly hex string.
- Host: GitHub
- URL: https://github.com/pur3miish/eosio-wasm-js
- Owner: pur3miish
- License: mit
- Created: 2021-09-17T00:12:59.000Z (almost 4 years ago)
- Default Branch: main
- Last Pushed: 2025-01-11T03:31:38.000Z (6 months ago)
- Last Synced: 2025-01-11T03:58:19.695Z (6 months ago)
- Language: JavaScript
- Size: 58.6 KB
- Stars: 0
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- Changelog: changelog.md
- License: LICENSE
Awesome Lists containing this project
README
# 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
```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/"
}
}
```## Example
```js
import serialize from "eosio-wasm-js/serialize.js";console.log(serialize.asset("EOS"));
```> The logged output was “000000000000000001454f5300000000”.
## Support
- [Node.js](https://nodejs.org/en/) `>= 13`.
- [Browser list](https://github.com/browserslist/browserslist) `> 0.5%, not OperaMini all, not IE > 0, not dead`.
- [Deno.js](https://deno.land) Version `^1.30.0`.Consider a [BigInt](https://caniuse.com/?search=bigint) polyfill library for safari 13.
## Exports
The [npm](https://npmjs.com) package [`eosio-wasm-js`](https://npm.im/eosio-wasm-js) features [optimal JavaScript module design](https://jaydenseric.com/blog/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`](./package.json) field [`exports`](https://nodejs.org/api/packages.html#exports):
- [`actions.js`](actions.js)
- [`asset.js`](asset.js)
- [`block_time_stamp.js`](block_time_stamp.js)
- [`bool.js`](bool.js)
- [`bytes.js`](bytes.js)
- [`checksum.js`](checksum.js)
- [`extended_asset.js`](extended_asset.js)
- [`float32.js`](float32.js)
- [`float64.js`](float64.js)
- [`float128.js`](float128.js)
- [`int.js`](int.js)
- [`name.js`](name.js)
- [`public_key.js`](public_key.js)
- [`serialize.js`](serialize.js)
- [`signature.js`](signature.js)
- [`string.js`](string.js)
- [`symbol.js`](symbol.js)
- [`symbol_code.js`](symbol_code.js)
- [`time_point.js`](time_point.js)
- [`time_point_sec.js`](time_point_sec.js)
- [`uint.js`](uint.js)
- [`varint32.js`](varint32.js)
- [`varuint32.js`](varuint32.js)
- [`transaction_header.js`](transaction_header.js)
- [`permission.js`](permission.js)