v10: Attachments, Read-only shares, and Efficient Sync
v10.0.0 - Squirrel
🐿 Cute, fast, and likes to store things.
This is a major release which introduces attachments, share keypairs, efficient
sync, and much much more. It is the biggest release of Earthstar ever.
As such, this version breaks compatibility with previous versions of Earthstar.
Here are the headline features:
- Attachments. When a new document is written to a Replica you can attach
arbitary binary data to it. This can be used for sharing large images, music,
video, anything. There is no size limit. - Shares with granular read / write access. Share addresses are now the
public key of a share keypair. The public key grants discovery and read
access, the secret key grants write access to the replica. - Efficient sync. Syncing has been completely overhauled to use a new
efficient reconclition mechanism powered by
range-reconcile and
push-pull-push-multicast trees.
The server APIs have also been moved into this repo.
In addition to new features, many APIs have been tweaked or changed entirely.
Please see the API documentation and the README to see what these new API
changes are like.
Server
- Moved existing server APIs into the core module, available as
Server.
Peer
- Added
Peer.onReplicasChange - Added
Peer.onSyncersChange
Replica
- Significantly improved the performance of querying documents.
- Replicas now can create documents with attachments with
Replica.set - Added
Replica.ingestAttachment - Added
Replica.getAttachment - Added
Replica.addAttachments - Added
Replica.wipeDocAtPath - Added
Replica.getEventStream - Added
Replica.getQueryStream - Added
Replica.onEvent - Added
MultiformatReplica, a Replica which is able to read, write, and sync
documents of different formats. - Added
FormatEs5, which supports share keypairs and attachments - Added
ReplicaDriverWeb - Added
ReplicaDriverFs - Added
RelpicaDriverMemory - Added
DocDriverSqliteFFI, which uses an FFI implemetation of Sqlite.
Requires the--unstableflag on Deno. - Updated
syncReplicaAndFsDirto use attachments for large files. ReplicaCachenow has attachment methods
Syncing
-
Added
PartnerLocal, for syncing with local peers. -
Added
PartnerWebServer, for syncing with servers. -
Added
PartnerWebClient, for syncing with web clients. -
Removed earthstar_streaming_rpc as a dependency.
Queries
-
Removed the
contentLengthoptions onQueryFilter. -
Removed
QueryFollower. UseReplica.getQueryStreaminstead. -
queryByTemplateAsyncandqueryByGlobAsynchave had the redundantasync
taken out of their name.
Cryptography
- Added
Crypto.generateShareKeypair - Added
CryptoDriverSodiumwhich uses a WASM version of libsodium for very
fast operations. This is now the default driver on Deno. - Updated
CryptoDriverNobleto use a new, faster, audited version.
Other
- Added a new
SharedSettingsclass for easily saving and retrieving an author
keypair, shares and secrets, and favourite servers. - Added parseAuthorOrShareAddress
- Added a new minified web bundle, available from
https://cdn.earthstar-project.org/js/earthstar.web.v10.0.0.js - Added ARCHITECTURE.md
- Added CONTRIBUTING.md
- Added CODE_OF_CONDUCT.md