Releases: satoshai-dev/playstacks
@satoshai/playstacks@0.3.0
Minor Changes
-
aac68c0: Add automatic nonce management for sequential transactions
Introduces a
NonceTrackerthat 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
PlaystacksOptionsthat can be set inplaywright.config.ts'suseblock (stacksPrivateKey,stacksNetwork,stacksFeeMultiplier, etc.), eliminating the need to repeat config in every test file. File-leveltestWithStacks()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 withinstanceofchecks 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 configurablerequestTimeoutoption (default 30s). This prevents tests from hanging indefinitely when the Stacks API is slow or unresponsive.
v0.2.0 — Message & Transaction Signing
What's New
Signing Methods
stx_signMessage— sign plaintext messages (Stacks message hash prefix + RSV signature)stx_signStructuredMessage— sign SIP-018 typed/structured messagesstx_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
cvToHexfrom@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 mainnetexamples/satoshai/— SatoshAI login flow on mainnet (connect → sign auth → terminal)
Install
npm install @satoshai/playstacks@0.2.0 @playwright/testFull Changelog: v0.1.1...v0.2.0
v0.1.1 — npm Publish & CI/CD
Changed
- Renamed package from
playstacksto@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
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/connectv8 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 confirmationstacks.callReadOnly(options)— read-only Clarity function callsstacks.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