@fuels/vm-tx
v0.66.1
Published
WASM version of `fuel-tx` Rust crate
Readme
@fuels/vm-fuel-tx
WASM version of fuel-tx Rust crate:
- https://crates.io/crates/fuel-tx
- https://github.com/FuelLabs/fuel-vm/tree/master/fuel-tx
Getting Started
Standard Usage (Browser / Node.js)
The default entrypoint includes WASM inlined as base64:
import * as fuel_tx from '@fuels/vm-tx'
await fuel_tx.initWasm();
// fuel_tx.<?>();
// ...Slim Usage (Cloudflare Workers / Custom WASM Loading)
The /slim entrypoint omits the inlined WASM, requiring you to supply it.
This is necessary for environments like Cloudflare Workers where runtime WASM
compilation is disallowed.
Cloudflare Workers
import * as fuel_tx from '@fuels/vm-tx/slim'
import wasm from '@fuels/vm-tx/wasm'
await fuel_tx.initWasm(wasm);
// fuel_tx.<?>();
// ...