0.26.0-beta.0
Pre-releaseWe're excited to announce version 0.26.0-beta.0, packed with enhancements to make your blockchain applications faster, more versatile, and cost-efficient. Here's what's new:
- Expanded Blockchain Support: Now includes Dogecoin and Pepecoin with bigint for precise handling of large satoshi amounts.
- Disk-Based Caching: Boosts app performance by persisting on-chain objects to disk, ensuring speed even after page reloads.
- Updated P2P Chess Game: Now features a serverless design for direct player interaction (trust-based for now).
- Lower Transaction Fees: Optimized dust calculations reduce costs for on-chain operations.
- Protocol Fees Introduced: Small fees (e.g., ~$0.007 on Litecoin under the current asset value) to support ongoing development.
- Clarified Patent Grant: Automatic license for our patented tech when using the library, with options for custom licensing.
Dive into the details below for a full breakdown of features, improvements, and breaking changes.
Lib
Support for Dogecoin and Pepecoin
This release adds support for Dogecoin and Pepecoin. Both coins have tail emission and an unbounded supply, so satoshi amounts can exceed JavaScript’s safe integer range. We’ve upgraded all satoshi values from number to bigint to guarantee exact on‑chain representation. We’ve renamed the _amount field to _satoshis, so it’s clear you’re dealing with satoshis, not whole coins. To enable bigint support, our packages now target ES2020. #368
// Initialize smart contract wallet for Dogecoin
const computer = new Computer({ chain: 'DOGE', ... })Disk Based Caching
All on-chain objects are now persisted to disk after they’re computed — so your app stays fast, even after a full page reload. #393
In version 0.24 we introduced in‑memory caching, delivering huge speedups for single‑page applications. But because memory isn’t persistent, any on‑chain object had to be recomputed after every reload. Now, with disk‑backed caching, all objects read from the blockchain are automatically written to disk, batched when the read is completed. On reload, your app loads the latest state from disk — no more wasted cycles recomputing state. Upgrading to version 0.26 will bring to your Bitcoin Computer apps an instant performance boost with zero changes to your code.
Unlike other JavaScript caches, we’re not just serializing JSON — we’re persisting full JavaScript objects including their functions. To deliver guaranteed constant‑time lookups, we forbid mutation of functional properties. This constraint maintains JavaScript's expressive power, while ensuring every cached object is retrieved very quickly.
Under the hood, each transaction is now downloaded only once and every JavaScript expression is computed only once, even after page reloads. We’ve also added aggressive HTTP caching, so every cacheable request hits the server at most once. Currently, disk‑backed caching is enabled by default — no configuration required. In future releases, we’ll introduce fine‑tuning options once we’ve gathered more experience using the cache.
Decrease Transaction Fees
We’ve refined our dust-calculation to drive down transaction fees. Metadata such as the JavaScript expressions are stored in outputs with dust amount, so reducing the dust amount makes every on chain operation cheaper. #405
Introducing Protocol Fees
Starting with this release, every transaction built with our library will automatically include a small protocol fee paid to BCDB Inc., the team behind Bitcoin Computer. For most transactions, this fee will be around $0.007 on Litecoin under the current asset value. #405
How It Works
- Embedding Your Code: Each Bitcoin Computer transaction encodes your JavaScript expression and other metadata like the environment into one or more bare multisig scripts, each carrying the smallest allowable (non-dust) output.
- Preventing UTXO Bloat: To ensure these outputs don’t bloat the UTXO set, we include a public key that only BCDB Inc. can spend.
- Sweeping Fees: When on-chain fees fall low enough, BCDB Inc. will collect these dust-level outputs — amounting to about $0.005 per output on Litecoin — to fund continued development.
This approach keeps your UTXO set clean while sustainably supporting the Bitcoin Computer platform. See here for details about how the fees are calculated.
Clarify Patent Grant
When you use our library, you’re automatically granted a license to use our patented technology — no extra steps required. Want to leverage the patented tech without the library? We’ve got you covered — just reach out to us for tailored licensing options. See here for more information.
More Tests
We’ve expanded our integration tests for the lib package to ensure greater reliability. To run the tests, navigate to the lib directory and execute npm test. #366
NakamotoJs
- BigInt support: NakamotoJs now natively supports
bigintvalues. #368 - Integrated testing: Run end‑to‑end tests directly within the NakamotoJs package. #363
- Simplified fixtures: All test fixtures have been converted from JSON to JavaScript to eliminate dynamic imports.
Node
- Expanded mainnet support: The node now supports Dogecoin and Pepecoin. #368
- Robust edge‑case handling: Correctly processes scenarios for BTC, like multiple coinbase transactions sharing the same hash, in line with BIP34.
Apps
Updated Peer-to-Peer Chess Game
We’ve updated our peer-to-peer chess game in which two players can stake an amount — and the winner takes the pot. Until now, an operator was required to run a server. This version removes the need for an operator and any servers besides Bitcoin Computer nodes. However in this version, the two players need to trust one another. In a future update, we will deliver a fully trustless experience. #401
The chess-server package was removed #385
Components
- Added address search in the NavBar #361, #362
- Published components package to NPM for seamless integration #357
- Optimized the wallet component to fetch the latest balance only when it’s visible, boosting performance across all apps #393
- Login form: validations are now enabled, the PATH variable was included again in the .env.examples files, if the .env does not contain CHAIN, NETWORK, URL or PATH, they are displayed in the form #399
- The deploy.ts scripts includes an automatic update of the .env files with the deployed contracts #399
- Defaults coin type to 1 for bip44 path #399
Vite Template
- Enhanced cross-origin isolation by setting the necessary
Cross-Origin-Opener-PolicyandCross-Origin-Embedder-Policyheaders. #359 - Introduced Puppeteer end-to-end tests to validate UI workflows. #362
- Added automated checks to ensure mandatory cross-origin isolation headers are present. #361
- Simplified imports by removing the
bitcoin-computer/libalias in the Vite template (now retained only for Vitest). #362 - Upgraded the Vite template to a standalone package for easier installation and maintenance. #361, #372
Next.js Template
- Introduced a Next.js template, enabling server‑side rendering with client side custody. #401
Documentation & Testing Enhancements
- Expanded documentation: Significant updates and refinements to guides, examples, and API references #360, #364, #365, #366, #367
- In-test debugging: Debug test suites with new support for breakpoints and interactive inspection #373
Breaking Changes
_amount → _satoshis
We've renamed the _amount field to _satoshis and upgraded its type from number to bigint.
Migration steps:
- Replace every
_amountreference with_satoshis. #368 - Wrap numeric values with
BigInt(n)when assigning or computing. - Include a postfix
nfor big integer constant values.
For more on using big integers, see the MDN BigInt guide.
computer.wallet → computer.db.wallet
The computer object now includes a db namespace for improved caching.
Migration step:
- Change all calls from
computer.wallettocomputer.db.wallet.
Full Changelog: v0.24.1-beta.0...v0.26.0-beta.0