earthstar-project / earthstar

Storage for private, distributed, offline-first applications.
https://earthstar-project.org
GNU Lesser General Public License v3.0
623 stars 18 forks source link

Add Peer.identities generator #344

Closed sgwilym closed 1 month ago

sgwilym commented 1 month ago

What's the problem you solved?

There was no way to get an identity out of a Peer without knowing the tag for that identity first.

What solution are you recommending?

Adding a Peer.identities method which returns an async iterable over all of the identity keypairs in storage.

Also

Changed Peer.getWriteCapabilities to Peer.getWriteCaps.