npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2026 – Pkg Stats / Ryan Hefner

@moveindustries/script-composer-pack

v0.2.4

Published

Self-contained WASM bundle for building batched Move script payloads via the dynamic transaction composer.

Readme

@moveindustries/script-composer-pack

Build batched Move script payloads using the dynamic transaction composer — with the WASM pre-bundled and base64-inlined, so no network fetch or manual asset loading is required at runtime.

What this package does

This package bundles the @moveindustries/dynamic-transaction-composer WebAssembly module directly into JavaScript, eliminating the need for runtime WASM file loading or manual initialization. Call initSync() once, then use TransactionComposer to compose and serialize batched Move function calls into a script payload.

This is a low-level, zero-dependency binding. For a higher-level SDK with transaction building, signing, and submission, see @moveindustries/script-composer-sdk.

Compatibility

| Peer dependency | Supported range | |---|---| | @moveindustries/ts-sdk | ^5.1.7 | | @moveindustries/dynamic-transaction-composer | 0.1.4 |

Node.js 18+ required.

Install

# pnpm
pnpm add @moveindustries/script-composer-pack \
     @moveindustries/dynamic-transaction-composer \
     @moveindustries/ts-sdk

# npm
npm install @moveindustries/script-composer-pack \
            @moveindustries/dynamic-transaction-composer \
            @moveindustries/ts-sdk

# yarn
yarn add @moveindustries/script-composer-pack \
         @moveindustries/dynamic-transaction-composer \
         @moveindustries/ts-sdk

Both peer dependencies must be installed by the consumer.

Usage

import {
  initSync,
  wasmModule,
  TransactionComposer,
  CallArgument,
} from "@moveindustries/script-composer-pack";
import { Aptos, AptosConfig, Network } from "@moveindustries/ts-sdk";
import { BCS } from "@moveindustries/ts-sdk";

// Initialize the bundled WASM once at startup — no network fetch needed.
initSync({ module: wasmModule });

// Build a batched script that calls two Move functions in sequence.
const composer = TransactionComposer.single_signer();

// First call: withdraw coins from the signer's account.
const amountBcs = BCS.bcsSerializeUint64(100_000_000n);
const [withdrawnCoin] = composer.add_batched_call(
  "0x1::coin",
  "withdraw",
  ["0x1::aptos_coin::AptosCoin"],
  [CallArgument.newSigner(0), CallArgument.newBytes(amountBcs)],
);

// Second call: deposit the returned value from the first call.
const recipientBcs = /* BCS-encoded AccountAddress */ new Uint8Array(32);
composer.add_batched_call(
  "0x1::coin",
  "deposit",
  ["0x1::aptos_coin::AptosCoin"],
  [CallArgument.newBytes(recipientBcs), withdrawnCoin],
);

// Serialize into a Move script payload (Uint8Array).
const scriptPayload = composer.generate_batched_calls(/* with_metadata */ true);

// Hand scriptPayload to @moveindustries/ts-sdk to build and submit a script transaction.

To decompile a serialized script back into its function calls (useful for display or auditing):

import { generate_batched_call_payload_wasm } from "@moveindustries/script-composer-pack";

const calls = generate_batched_call_payload_wasm(scriptPayload); // MoveFunctionCall[]

API

| Export | Description | |---|---| | initSync({ module }) | Initialize the bundled WASM module synchronously. Call once before any other API. | | wasmModule | Pre-compiled WebAssembly.Module — pass directly to initSync. | | TransactionComposer | Core builder. Use single_signer() or multi_signer(n) to construct, then chain add_batched_call(...) calls, and finally generate_batched_calls(withMetadata) to serialize. | | CallArgument | Represents a call argument: newSigner(idx) for a signer, newBytes(bytes) for a BCS-encoded value, or the return value of a previous add_batched_call. | | MoveFunctionCall | Represents a single Move function call inside a deserialized script. | | PreviousResult | Internal: a return value from a prior add_batched_call that can be forwarded as an argument. | | generate_batched_call_payload_wasm(script) | Decompiles a serialized Uint8Array script into MoveFunctionCall[]. |

Development

pnpm install
pnpm build        # outputs CJS + ESM bundles to dist/

# Preview a version bump without writing
pnpm run version:bump -- patch --dry-run

# Apply a version bump
pnpm run version:bump -- patch   # or minor / major / 1.2.3

Release

Releases are automated via GitHub Actions. After merging a version-bump PR:

git tag v<version>      # e.g. git tag v0.2.4
git push origin v<version>

The release workflow verifies the tag matches package.json, checks the version hasn't been published yet, builds, publishes to npm via OIDC Trusted Publishing, and creates a GitHub Release.

Prerequisite: an npm Trusted Publisher must be configured on npmjs.com for this repository before pushing the first tag.

License

Apache-2.0 © Move Industries