v0.14.0
The main application API has stabilized now. APIs relating to topics and application upgrades (e.g. migrations, snapshots, contract hashing) are still subject to change.
Breaking Changes
- Signer package names have changed from e.g.
@canvas-js/chain-ethereum
to@canvas-js/signer-ethereum
. - Action signatures have changed from
function(db, ...args) {}
tofunction(...args) {}
. To accessdb: ModelAPI
, usethis.db
instead. We expect to release a wrapper for developers who prefer to use arrow functions to define their applications within the next few weeks. - SIWESigner classes are now initialized with a random signer if you provide
{ burner: true }
as the configuration. Otherwise, they must be initialized with a{ signer: ethers.Wallet }
value. If neither burner nor signer is provided, they will initialize in read-only mode.
New Features, Improvements, Other Changes
- Applications can now be initialized with snapshots of past data. Snapshots are automatically prepended at the start of a log, and applications that use snapshots must include a hash of the snapshot in their topic, e.g.
forum-example.canvas.xyz#ffae63ab95cc5483
. - Added transactions with serializable isolation.
- Added Sign in with Farcaster, for browser logins and miniapp frame logins.
- Added support for providing TypeScript contracts to the runtime, which are compiled using esbuild-wasm.
- Ability to live-edit and live-update applications from the network explorer, to switch in a new running contract.
- Improved type derivation for useLiveQuery() and useCanvas().
- Messages and actions are now encoded in CBOR, and performance has been significantly increased for large databases. This is an automatic upgrade (large applications may take a longer time to start while the automatic migration runs).
- Added internal upgrade functionality to the database. Upgrades run when an application starts, and are resumable if interrupted.
- Fixes some crashes on application shutdown.
- Removed branch tracking and custom merge functions, for performance reasons.
- Removed db.link().