A Tycho TVM disasm.
Requires node 16 or higher.
yarn add @tychosdk/disasm
or
npm i @tychosdk/disasm
import { Cell } from "@ton/core";
import { disasmStructured } from "@tychosdk/disasm";
const code = Cell.fromBase64("te6ccgEBAgEACwABCvgAgHuIAQABYA==");
const parsed = await disasmStructured(code);
{
"root": 0,
"items": [
{
"id": 0,
"type": "code",
"cellHash": "4c22ee65d587da45ad571a90740ea5a50ba58ee88e75769fbc9ac47eef693e68",
"isInline": false,
"offsetBits": 0,
"offsetRefs": 0,
"bits": 40,
"refs": 1,
"opcodes": [
{
"bits": 16,
"name": "ACCEPT",
"gas": 26
},
{
"bits": 16,
"name": "PUSHINT",
"args": [
{
"type": "int",
"value": "123"
}
],
"gas": 26
},
{
"bits": 8,
"refs": 1,
"name": "PUSHREF",
"args": [
{
"type": "cell",
"id": 1
}
],
"gas": 18
}
],
"tail": null
},
{
"id": 1,
"type": "data",
"data": {
"type": "cell",
"boc": "te6ccgEBAQEAAwAAAWA="
}
}
]
}
To install dependencies:
yarn install
To build wasm:
yarn wasm:build
To run tests:
yarn test
To publish:
yarn build
yarn publish --access public
We welcome contributions to the project! If you notice any issues or errors, feel free to open an issue or submit a pull request.
Licensed under either of
- Apache License, Version 2.0 (LICENSE-APACHE or https://www.apache.org/licenses/LICENSE-2.0)
- MIT license (LICENSE-MIT or https://opensource.org/licenses/MIT)
at your option.