Add a bit of info to whisper protocol

This commit is contained in:
2026-02-27 00:31:06 +11:00
parent 044e516ed3
commit ddcd638937
2 changed files with 19 additions and 0 deletions

View File

@@ -19,6 +19,24 @@
* Only allow specific parameters, unless prefixed with 'x-'
*/
/**
* What I *think* this is:
* Deps: List of transports
*
* Recieving:
* 1. Create from a list of tranpsports and a lsit of items.
* 2. Starts listening on all of the transports and returns a URL (maybe a promise too? Not sure whether it should be a promise or event emitter. Maybe both?)
* 3. Once it recieves a message, decrypt it and resolve the promise with the message.
*
* Sending:
* 1. Create from a list of transports and the URL.
* 2. Encrypt the message
* 3. Send the encrypted message to all of the transports that are in both the requestURL and the list of transports.
*
* Possibilities:
* - Non-ephemeral. Keep listeners alive to allow for multiple requests
*/
import { z } from 'zod/v4';
import { PublicKey } from 'src/crypto/index.js';

View File

@@ -181,6 +181,7 @@ describe('BPlusTree', () => {
it('should handle range on empty tree', () => {
expect(tree.range()).toEqual([]);
expect(tree.range(1, 2)).toEqual([]);
});
it('should handle delete on empty tree', () => {