Skip to content

Releases: satoshai-dev/playstacks

@satoshai/playstacks@0.3.0

26 Feb 16:43
5e3a1ea

Choose a tag to compare

Minor Changes

  • aac68c0: Add automatic nonce management for sequential transactions

    Introduces a NonceTracker that fetches the initial nonce from the chain and increments it locally after each broadcast, allowing multiple transactions to be sent in a single test without waiting for each to confirm. Nonce tracking resets automatically between tests.

  • e96d035: Support Playwright config-level Stacks settings

    Adds PlaystacksOptions that can be set in playwright.config.ts's use block (stacksPrivateKey, stacksNetwork, stacksFeeMultiplier, etc.), eliminating the need to repeat config in every test file. File-level testWithStacks() overrides still take precedence.

  • e3277ee: Add custom error types for programmatic error handling

    Introduces a typed error hierarchy (PlaystacksError, NetworkError, BroadcastError, ConfirmationError, UserRejectionError, ConfigurationError, FeeEstimationError) so consumers can catch specific errors with instanceof checks instead of parsing error message strings.

  • af774cd: Add configurable request timeouts for all Stacks API calls

    All HTTP requests now use AbortSignal.timeout() with a configurable requestTimeout option (default 30s). This prevents tests from hanging indefinitely when the Stacks API is slow or unresponsive.

v0.2.0 — Message & Transaction Signing

23 Feb 17:36

Choose a tag to compare

What's New

Signing Methods

  • stx_signMessage — sign plaintext messages (Stacks message hash prefix + RSV signature)
  • stx_signStructuredMessage — sign SIP-018 typed/structured messages
  • stx_signTransaction — sign arbitrary unsigned transaction hex

Improvements

  • Xverse 3-address format in getAddresses (BTC payment, BTC ordinals, STX)
  • rejectNext() now skips read-only methods so the rejection flag isn't consumed by background polling
  • Re-export cvToHex from @stacks/transactions

Test Infrastructure

  • Test dApp (apps/test-dapp/) — Vite + vanilla TypeScript exercising every wallet method
  • E2E specs for connect, sign-message, sign-structured, sign-transaction
  • 13 new unit tests (42 total)

Real-World Examples

  • examples/zest/ — Zest Protocol supply + withdraw on mainnet
  • examples/satoshai/ — SatoshAI login flow on mainnet (connect → sign auth → terminal)

Install

npm install @satoshai/playstacks@0.2.0 @playwright/test

Full Changelog: v0.1.1...v0.2.0

v0.1.1 — npm Publish & CI/CD

23 Feb 17:55

Choose a tag to compare

Changed

  • Renamed package from playstacks to @satoshai/playstacks
  • First publish to npm

Added

  • Package README
  • GitHub Actions CI and release workflows
  • Changeset convenience scripts

Full Changelog: https://github.com/satoshai-dev/playstacks/blob/main/CHANGELOG.md

v0.1.0 — E2E Testing SDK for Stacks dApps

23 Feb 17:55

Choose a tag to compare

Added

  • testWithStacks() — Playwright fixture factory with Stacks wallet support
  • Mock Xverse wallet provider via page.addInitScript()
  • Wallet methods: getAddresses, stx_getAddresses, wallet_connect, stx_callContract, stx_transferStx
  • @stacks/connect v8 compatibility
  • Fee estimation with configurable multiplier and max cap
  • Mnemonic and private key support
  • Network configuration: mainnet, testnet, devnet, or custom URL
  • stacks.waitForTx(txid) — poll for on-chain confirmation
  • stacks.callReadOnly(options) — read-only Clarity function calls
  • stacks.getBalance(), stacks.getNonce()
  • stacks.wallet.rejectNext(), stacks.wallet.lastTxId()
  • Post-conditions passthrough for contract calls
  • ESM + CJS dual build via tsup
  • 29 unit tests
  • E2E reference: Zest Protocol supply flow

Full Changelog: https://github.com/satoshai-dev/playstacks/blob/main/CHANGELOG.md