ricochet 0.2.2
ricochet: ^0.2.2 copied to clipboard
Dart client library for the Ricochet P2P store-and-forward messaging network
0.2.2 #
- The server availability check no longer opens an empty MMA stream. When the client was not connected to a server,
ServerSelectoropened an admin (MMA) stream and closed it with no request. go-ricochet logged each one as a failed request (op=unrouted, 500). The check now only dials the server (host.connect). With dart_libp2p 4.1.6 or later, a check that runs while another dial to the server is in progress joins that dial. - A server that is connected is not marked unavailable. When the check failed but another dial had connected the server in the meantime,
selectServermarked the server unavailable for 30 s, and requests in that time found no server.selectServernow checks the connection again before it marks a server.selectServerByCapacityno longer marks a connected server unavailable when it does not answer the capacity query; it leaves the server out of that choice only. retrieveMessages(throwOnFailure: true)reports a failed retrieval. A retrieval that gets no answer (no server, a timeout, another error) throwsRetrieveFailedExceptioninstead of returning an empty list, so a caller can tell an empty mailbox from one it could not read. Without the option, the behaviour does not change.
0.2.1 #
- Collection items and query results arrive again. go-ricochet now sends an item's content and a QUERY page as raw JSON in the response's
datafield, not as base64 inbody. The client read onlybody, sogetCollectionItemandqueryCollectionreturned no body.CollectionFrame.decodeResponsenow readsdata, and still readsbodyfrom older servers. In both cases the payload is inCollectionFrameResponse.body. queryCollectiontakeswantTotal. A filtered query getsX-Total-Countonly when it asks for it, because the server must scan all matches to count them. WithoutwantTotal,totalCountis null; count the returneditemsinstead.- Paging with a cursor.
queryCollectionandlistCollectionKeystakecursor, andCollectionFrameResponse.nextCursorgives the cursor of the next page. A cursor takes precedence overoffset. - Collection visibility.
createCollectiontakesvisibility, and the newsetCollectionVisibilitychanges it later. The server makes a collection private when no visibility is given, so only its owner can read it. The newCollectionVisibilityenum has the valuesprivate,sharedandpublic. - The store interop harness in
bin/makes the document and the collection that the second client reads public, and asks for the query totals. Against go-ricochet, all 27 checks now pass on both clients (before: 23 and 21).
0.2.0 #
- Works with dart_libp2p 3.x and 4.x.
dart_libp2pis now>=1.0.0 <5.0.0. None of those releases changes an API this package uses. The upper bound had madericochetunresolvable next to dart_libp2p 3.0.0 or later, including 4.1.0, which fixes hole punching for hosts behind NAT. All 30 tests pass against dart_libp2p 4.1.0, and the store interop suite inbin/gives the same results against go-ricochet as 0.1.0 did. - No longer depends on
dart_libp2p_merkle_crdtormerkledag. Nothing in the package imports them, anddart_libp2p_merkle_crdt1.0.0 also requiresdart_libp2p <3.0.0. An app that imports either package must now list it in its ownpubspec.yaml.
0.1.0 #
- First release on pub.dev.
- Depends on
dart_libp2p_merkle_crdtandmerkledagfrom pub.dev instead of local paths.