@fleetmesh/leaf 0.1.0 → 0.1.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/descriptor.d.ts +1 -1
- package/dist/did.d.ts +1 -1
- package/dist/giftwrap.d.ts +1 -1
- package/dist/index.d.ts +17 -17
- package/dist/mediation/leaf.d.ts +2 -2
- package/dist/pwa/browser-leaf.d.ts +3 -3
- package/dist/pwa/hub.d.ts +1 -1
- package/dist/pwa/store.d.ts +1 -1
- package/dist/relay.d.ts +1 -1
- package/dist/seal.d.ts +2 -2
- package/dist/session.d.ts +5 -5
- package/package.json +2 -2
package/dist/descriptor.d.ts
CHANGED
package/dist/did.d.ts
CHANGED
package/dist/giftwrap.d.ts
CHANGED
package/dist/index.d.ts
CHANGED
|
@@ -1,17 +1,17 @@
|
|
|
1
|
-
export * as descriptor from './descriptor.
|
|
2
|
-
export * as did from './did.
|
|
3
|
-
export * as didcomm from './didcomm.
|
|
4
|
-
export * as encoding from './encoding.
|
|
5
|
-
export * as event from './event.
|
|
6
|
-
export * as giftwrap from './giftwrap.
|
|
7
|
-
export * as keys from './keys.
|
|
8
|
-
export * as mediation from './mediation/leaf.
|
|
9
|
-
export * as mediationMessages from './mediation/messages.
|
|
10
|
-
export * as negentropy from './negentropy.
|
|
11
|
-
export * as nip44 from './nip44.
|
|
12
|
-
export * as relay from './relay.
|
|
13
|
-
export * as seal from './seal.
|
|
14
|
-
export { LeafSession, type LeafSessionOptions, SessionError } from './session.
|
|
15
|
-
export { type BrowserLeafOptions, startBrowserLeaf, SW_PICKUP } from './pwa/browser-leaf.
|
|
16
|
-
export { type HubEvent, LeafHub, type LeafStatus } from './pwa/hub.
|
|
17
|
-
export { LeafStore } from './pwa/store.
|
|
1
|
+
export * as descriptor from './descriptor.ts';
|
|
2
|
+
export * as did from './did.ts';
|
|
3
|
+
export * as didcomm from './didcomm.ts';
|
|
4
|
+
export * as encoding from './encoding.ts';
|
|
5
|
+
export * as event from './event.ts';
|
|
6
|
+
export * as giftwrap from './giftwrap.ts';
|
|
7
|
+
export * as keys from './keys.ts';
|
|
8
|
+
export * as mediation from './mediation/leaf.ts';
|
|
9
|
+
export * as mediationMessages from './mediation/messages.ts';
|
|
10
|
+
export * as negentropy from './negentropy.ts';
|
|
11
|
+
export * as nip44 from './nip44.ts';
|
|
12
|
+
export * as relay from './relay.ts';
|
|
13
|
+
export * as seal from './seal.ts';
|
|
14
|
+
export { LeafSession, type LeafSessionOptions, SessionError } from './session.ts';
|
|
15
|
+
export { type BrowserLeafOptions, startBrowserLeaf, SW_PICKUP } from './pwa/browser-leaf.ts';
|
|
16
|
+
export { type HubEvent, LeafHub, type LeafStatus } from './pwa/hub.ts';
|
|
17
|
+
export { LeafStore } from './pwa/store.ts';
|
package/dist/mediation/leaf.d.ts
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { type NostrEvent } from '../event.
|
|
2
|
-
import { type ForwardBody, type KeylistUpdateBody, type KeylistUpdateResponseBody, type MediateDenyBody, type MediateGrantBody, type Message, type PickupDeliveryBody, type PickupDeliveryRequestBody, type PickupMessagesReceivedBody } from './messages.
|
|
1
|
+
import { type NostrEvent } from '../event.ts';
|
|
2
|
+
import { type ForwardBody, type KeylistUpdateBody, type KeylistUpdateResponseBody, type MediateDenyBody, type MediateGrantBody, type Message, type PickupDeliveryBody, type PickupDeliveryRequestBody, type PickupMessagesReceivedBody } from './messages.ts';
|
|
3
3
|
/** NIP-66 / kind 11801 query a leaf with no peers sends to bootstrap relays. */
|
|
4
4
|
export declare const DESCRIPTOR_KIND = 11801;
|
|
5
5
|
export declare const COLD_START_FILTER: {
|
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import { LeafHub } from './hub.
|
|
2
|
-
import { type MediatorConfig } from './store.
|
|
3
|
-
import type { SocketFactory } from '../relay.
|
|
1
|
+
import { LeafHub } from './hub.ts';
|
|
2
|
+
import { type MediatorConfig } from './store.ts';
|
|
3
|
+
import type { SocketFactory } from '../relay.ts';
|
|
4
4
|
export interface BrowserLeafOptions {
|
|
5
5
|
mediator: MediatorConfig;
|
|
6
6
|
name?: string;
|
package/dist/pwa/hub.d.ts
CHANGED
package/dist/pwa/store.d.ts
CHANGED
package/dist/relay.d.ts
CHANGED
package/dist/seal.d.ts
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import * as didcomm from './didcomm.
|
|
2
|
-
import type { NostrEvent } from './event.
|
|
1
|
+
import * as didcomm from './didcomm.ts';
|
|
2
|
+
import type { NostrEvent } from './event.ts';
|
|
3
3
|
export declare const FRAGMENT_BYTES = 24000;
|
|
4
4
|
export declare const MAX_FRAGMENTS = 64;
|
|
5
5
|
export declare const ENVELOPE_MAX: number;
|
package/dist/session.d.ts
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
import { type NostrEvent } from './event.
|
|
2
|
-
import { LeafClient, type LeafClientState, type OpenedDelivery } from './mediation/leaf.
|
|
3
|
-
import { type SocketFactory } from './relay.
|
|
4
|
-
import { type Opened } from './seal.
|
|
1
|
+
import { type NostrEvent } from './event.ts';
|
|
2
|
+
import { LeafClient, type LeafClientState, type OpenedDelivery } from './mediation/leaf.ts';
|
|
3
|
+
import { type SocketFactory } from './relay.ts';
|
|
4
|
+
import { type Opened } from './seal.ts';
|
|
5
5
|
export declare class SessionError extends Error {
|
|
6
6
|
}
|
|
7
7
|
export interface LeafSessionOptions {
|
|
@@ -63,7 +63,7 @@ export declare class LeafSession {
|
|
|
63
63
|
/** Send a message and wait for the mediator's answer on its thread. */
|
|
64
64
|
private request;
|
|
65
65
|
requestMediation(): Promise<'granted' | 'denied'>;
|
|
66
|
-
updateKeylist(add?: string[], remove?: string[]): Promise<import("./mediation/messages.
|
|
66
|
+
updateKeylist(add?: string[], remove?: string[]): Promise<import("./mediation/messages.ts").KeylistUpdated[]>;
|
|
67
67
|
/** Drain every registered key until the mediator has nothing left, acking
|
|
68
68
|
* each batch so it purges what was taken. maxRounds bounds a mediator that
|
|
69
69
|
* keeps returning the same batch. */
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@fleetmesh/leaf",
|
|
3
|
-
"version": "0.1.
|
|
3
|
+
"version": "0.1.1",
|
|
4
4
|
"description": "Fleetmesh leaf profile in TypeScript: browsers and PWAs as mediated mesh leaves",
|
|
5
5
|
"license": "CC0-1.0",
|
|
6
6
|
"type": "module",
|
|
@@ -18,7 +18,7 @@
|
|
|
18
18
|
"src"
|
|
19
19
|
],
|
|
20
20
|
"scripts": {
|
|
21
|
-
"build": "tsc --ignoreConfig --target ES2022 --module ESNext --moduleResolution Bundler --lib ES2022,DOM --strict --declaration --rewriteRelativeImportExtensions --outDir dist --rootDir src src/index.ts
|
|
21
|
+
"build": "tsc --ignoreConfig --target ES2022 --module ESNext --moduleResolution Bundler --lib ES2022,DOM --strict --declaration --rewriteRelativeImportExtensions --outDir dist --rootDir src src/index.ts",
|
|
22
22
|
"prepack": "npm run build",
|
|
23
23
|
"test": "vitest run --project node",
|
|
24
24
|
"test:browser": "vitest run --project browser",
|