Skip to content

0.16.0

Latest
Compare
Choose a tag to compare
@raykyri raykyri released this 08 Jul 13:21

Breaking Changes

This release implments a new topic format, so multiple contracts can be used in a single application - e.g. for partial replication, separate "rooms", etc.

  • Class contracts now take a static topic = "..." parameter, and class contracts now take a topic field.
  • For class contracts, the topic now includes the class name by default, e.g. example.com.Object, unless the class is an anonymous class.
  • Topics will include a hash of the snapshot, code, and/or constructor arguments, if any of those three elements are present. For example: example.Object:e8ae8ec9..... Topics initialized with constructor() args will now have a unique topic based on the hash of the arguments.
  • Canvas.initialize now takes topicOverride as an argument, instead of topic.

Other improvements

  • Adds useLiveQuery hook to the @canvas-js/client package.
  • Improved types for the @canvas-js/core/synchronous initializer.
  • Enabled experimental support for browser-to-browser libp2p. To connect to a WebRTC mesh, call .startLibp2p() on a Canvas instance in the browser.