@ghostlytools/sdk 1.11.1 → 1.11.2
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/app.js +5 -2
- package/dist/app.js.map +1 -1
- package/dist/core.js +111 -18
- package/dist/core.js.map +1 -1
- package/dist/{fakes-LaWqqMv4.js → fakes-DCH5oJMm.js} +3 -3
- package/dist/{fakes-LaWqqMv4.js.map → fakes-DCH5oJMm.js.map} +1 -1
- package/dist/fakes.js +1 -1
- package/dist/index.js +3 -3
- package/dist/{keet-identity-key-CASfmXry.js → keet-identity-key-3EEmDkxz.js} +2 -2
- package/dist/{keet-identity-key-CASfmXry.js.map → keet-identity-key-3EEmDkxz.js.map} +1 -1
- package/dist/{src-BN4AAuHI.js → src-DA7T3Gvo.js} +487 -145
- package/dist/src-DA7T3Gvo.js.map +1 -0
- package/dist/testing.js +4 -4
- package/dist/types/browser/src/engine/paymentAdapters/providers/types.d.ts +6 -1
- package/dist/types/core/src/audioMetadata.d.ts +0 -23
- package/dist/types/core/src/catchUp.d.ts +2 -0
- package/dist/types/core/src/chatFiles.d.ts +6 -0
- package/dist/types/core/src/clipboardGuard.d.ts +24 -7
- package/dist/types/core/src/dhtDelivery.d.ts +13 -0
- package/dist/types/core/src/didDht.d.ts +6 -4
- package/dist/types/core/src/frames.d.ts +11 -0
- package/dist/types/core/src/ghostlink.d.ts +20 -0
- package/dist/types/core/src/groupSession.d.ts +11 -0
- package/dist/types/core/src/http.d.ts +16 -2
- package/dist/types/core/src/identity.d.ts +8 -1
- package/dist/types/core/src/identityProofs.d.ts +7 -0
- package/dist/types/core/src/index.d.ts +1 -0
- package/dist/types/core/src/miniApp.d.ts +4 -1
- package/dist/types/core/src/pairedAppRanges.d.ts +5 -0
- package/dist/types/core/src/relay.d.ts +7 -4
- package/dist/types/core/src/transport.d.ts +3 -1
- package/dist/types/core/src/viewerGuard.d.ts +6 -0
- package/dist/{types-DvtCy3WB.js → types-DYLIIkU8.js} +2 -1
- package/dist/types-DYLIIkU8.js.map +1 -0
- package/dist/{verify-oCL662ms.js → verify-DsXR5sRX.js} +2 -2
- package/dist/{verify-oCL662ms.js.map → verify-DsXR5sRX.js.map} +1 -1
- package/package.json +1 -1
- package/dist/src-BN4AAuHI.js.map +0 -1
- package/dist/types-DvtCy3WB.js.map +0 -1
package/dist/testing.js
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import { l as providerDescriptorProblems, o as isNothingSpentError } from "./types-
|
|
3
|
-
import { i as verifyIdentity, r as descriptorProblems } from "./verify-
|
|
4
|
-
import { _ as fakeAddress, a as fakeAccount, b as fakeOnchain, c as fakeKeySign, d as fakeRecord, f as fakeRecordText, g as TEST_PROVIDERS_FLAG, h as FakeOnchainProvider, i as TEST_IDENTITIES_FLAG, l as fakeKeySubject, m as FakeLightningProvider, n as FAKE_ISSUER, o as fakeAccountToken, p as testIdentitiesEnabled, r as FAKE_RECORD_HOST, s as fakeKey, t as FAKE_IDENTITY_PROVIDERS, u as fakeKeyring, v as fakeInvoice, x as testProvidersEnabled, y as fakeLightning } from "./fakes-
|
|
1
|
+
import { Dd as newIdentityBinding, LT as createIdentity, Ma as decodeBolt11, _d as IdentityExchange, bd as emptyIdentityLedger, od as IDENTITY_MAX_EVIDENCE, sa as isBitcoinAddress, wd as identityStatement } from "./src-DA7T3Gvo.js";
|
|
2
|
+
import { l as providerDescriptorProblems, o as isNothingSpentError } from "./types-DYLIIkU8.js";
|
|
3
|
+
import { i as verifyIdentity, r as descriptorProblems } from "./verify-DsXR5sRX.js";
|
|
4
|
+
import { _ as fakeAddress, a as fakeAccount, b as fakeOnchain, c as fakeKeySign, d as fakeRecord, f as fakeRecordText, g as TEST_PROVIDERS_FLAG, h as FakeOnchainProvider, i as TEST_IDENTITIES_FLAG, l as fakeKeySubject, m as FakeLightningProvider, n as FAKE_ISSUER, o as fakeAccountToken, p as testIdentitiesEnabled, r as FAKE_RECORD_HOST, s as fakeKey, t as FAKE_IDENTITY_PROVIDERS, u as fakeKeyring, v as fakeInvoice, x as testProvidersEnabled, y as fakeLightning } from "./fakes-DCH5oJMm.js";
|
|
5
5
|
import { afterEach, describe, expect, it, vi } from "vitest";
|
|
6
6
|
//#region ../browser/src/engine/paymentAdapters/providers/contractSuite.ts
|
|
7
7
|
var WAIT = 1e4;
|
|
@@ -98,6 +98,11 @@ export interface ProviderDescriptor<P> {
|
|
|
98
98
|
experimental?: boolean;
|
|
99
99
|
/** Checks the form before anything is contacted; throws a message fit for the person. */
|
|
100
100
|
validate?(settings: ProviderSettings, mode: WalletMode): void;
|
|
101
|
+
/**
|
|
102
|
+
* The wallet these (validated) settings reach, whatever their spelling: two sources with the same answer are one
|
|
103
|
+
* wallet, and the same balance. Absent: the same settings, byte for byte.
|
|
104
|
+
*/
|
|
105
|
+
wallet?(settings: ProviderSettings): string;
|
|
101
106
|
/** Connects. The engine then asks `info()` and refuses a network of the other mode. */
|
|
102
107
|
create(settings: ProviderSettings, host: ProviderHost): Promise<P>;
|
|
103
108
|
}
|
|
@@ -114,7 +119,7 @@ export declare const PROVIDER_ID: RegExp;
|
|
|
114
119
|
*/
|
|
115
120
|
export declare function providerDescriptorProblems(d: ProviderDescriptor<unknown>): string[];
|
|
116
121
|
/** The serializable part of a descriptor, for the UI (a function cannot cross the extension's port). */
|
|
117
|
-
export type ProviderDescriptorView = Omit<ProviderDescriptor<unknown>, "create" | "validate">;
|
|
122
|
+
export type ProviderDescriptorView = Omit<ProviderDescriptor<unknown>, "create" | "validate" | "wallet">;
|
|
118
123
|
/** Only these fields reach the UI, whatever else a provider module keeps on its descriptor. */
|
|
119
124
|
export declare const describeProvider: ({ id, label, kind, description, networks, platforms, fields, custodial, experimental }: ProviderDescriptor<unknown>) => ProviderDescriptorView;
|
|
120
125
|
/**
|
|
@@ -1,26 +1,3 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* What an audio file leaves with. A recording made in another app, or a song a tagger went through, says more than its
|
|
3
|
-
* sound: a title or a file name that is where it was recorded (a phone's recorder names it after the place), a comment,
|
|
4
|
-
* a location tag, a picture, the date. The sender removes them before the file is stored and its digest computed, as
|
|
5
|
-
* pictures' and videos' are (pictureMetadata.ts, videoMetadata.ts), without decoding or re-encoding a sample, and the
|
|
6
|
-
* file keeps its size, so no offset in it moves and it plays as it did:
|
|
7
|
-
*
|
|
8
|
-
* - MP4 audio (M4A, a voice note recorded in MP4): videoMetadata.ts's box walk, its `udta` and `meta` emptied.
|
|
9
|
-
* - MP3 and AAC: an ID3v2 tag at the start becomes an empty one (its frames zeros: padding), one at the end (with its
|
|
10
|
-
* footer), an APEv2 tag's items, a Lyrics3v2 tag and an ID3v1 tag's fields become zeros.
|
|
11
|
-
* - FLAC: every metadata block but its stream info and seek table (a Vorbis comment, a picture, a cue sheet, an
|
|
12
|
-
* application's) becomes padding, zeroed.
|
|
13
|
-
* - Ogg Opus, Vorbis and Speex: the comment header keeps its vendor (the encoder's name) and has no comment, the bytes
|
|
14
|
-
* after it zeros; each page it changed has its checksum made again.
|
|
15
|
-
* - WAV: every chunk but its format, data and the ones of the sound itself (`fact`, `cue `, `smpl`, `inst`) becomes
|
|
16
|
-
* `JUNK`, zeroed (an INFO list, an `id3 ` chunk, a broadcast `bext` with its date and originator, XMP).
|
|
17
|
-
* - WebM and Matroska, audio or video: `Tags`, `Attachments`, `Chapters`, the title, the date, the file names and each
|
|
18
|
-
* track's name become `Void` elements (and the SeekHead's entries for them); the muxer's and the writing app's names
|
|
19
|
-
* are zeroed. Clusters, cues and track settings are kept as they are.
|
|
20
|
-
*
|
|
21
|
-
* Fail-closed: a file that is one of these by its bytes and whose tags cannot be removed (truncated, malformed) is
|
|
22
|
-
* refused with `NO_AUDIO_METADATA`, never sent as it was. Any other file goes as it is (other audio formats too).
|
|
23
|
-
*/
|
|
24
1
|
import { type VideoPatch, type VideoSource } from "./videoMetadata.js";
|
|
25
2
|
export declare const AUDIO_METADATA_LIMITS: {
|
|
26
3
|
/** The largest header, element or tag read whole (an Ogg comment header with a picture in it): past this the file is refused. */
|
|
@@ -53,6 +53,8 @@ export declare class CatchUpAnswers<F> {
|
|
|
53
53
|
* good. A frame the edge did not take ends the answer (the member asks again when its edge opens).
|
|
54
54
|
*/
|
|
55
55
|
handOut(to: string, frames: F[]): void;
|
|
56
|
+
/** Whether an answer to `to` still has frames to send, or sent ones its app has not said it handled yet (`hooks.handled`). */
|
|
57
|
+
busy(to: string): boolean;
|
|
56
58
|
/** The next slice of `rest` to `to`, as sent: undefined, and nothing left, when the edge did not take one. */
|
|
57
59
|
private sendSlice;
|
|
58
60
|
/** A slice's frames (`keys`) are on their way to `to` until `done`: its app handled them, or cannot say (`false`). */
|
|
@@ -316,6 +316,12 @@ export declare class ChatFiles {
|
|
|
316
316
|
private readonly moving;
|
|
317
317
|
/** Files that stopped sending for the chat's window alone: they go on once another's bytes are confirmed. */
|
|
318
318
|
private readonly held;
|
|
319
|
+
/**
|
|
320
|
+
* Files this side cancelled while no session carried the cancel (`pf-abort`), said on the next one. The session also
|
|
321
|
+
* goes for a moment when a move swaps it (its capabilities are agreed again): unsaid, the receiver showed the file
|
|
322
|
+
* moving, its bytes kept, until its idle nudge asked 30 s later.
|
|
323
|
+
*/
|
|
324
|
+
private readonly unsaid;
|
|
319
325
|
private attached;
|
|
320
326
|
private peerRoomValue;
|
|
321
327
|
/** What the chat's files may have in flight, sized by the path. */
|
|
@@ -3,15 +3,32 @@
|
|
|
3
3
|
* `clipboard-write`, but Chromium lets `document.execCommand("copy")` write the system clipboard for as long as a tap's
|
|
4
4
|
* activation lasts (seconds, from a timer too), and no sandbox token or permissions policy turns that off. So this
|
|
5
5
|
* script runs first in each of the app's pages (`guardViewerAnswer`) and in the bridge (apps/web/src/svc/bridge.ts):
|
|
6
|
-
* - `execCommand("copy")` and `execCommand("cut")` work only while
|
|
7
|
-
* dispatched
|
|
8
|
-
*
|
|
9
|
-
*
|
|
6
|
+
* - `execCommand("copy")` and `execCommand("cut")` work only while one of the person's own inputs in that window is
|
|
7
|
+
* being dispatched (a trusted `pointerdown`, `pointerup`, `mousedown`, `mouseup`, `click`, `auxclick`, `dblclick`,
|
|
8
|
+
* `contextmenu`, `touchstart`, `touchend`, `keydown`, `keypress` or `keyup`; no script can fire one), or a trusted
|
|
9
|
+
* `submit` or `change` that began while such an input's window was open, and only within a second of that input
|
|
10
|
+
* (from its own `timeStamp`, or from its dispatch where that is later or on another clock): Chromium lets a copy
|
|
11
|
+
* write for seconds after a tap, and a page that spins in its own listener keeps the input being dispatched all
|
|
12
|
+
* that time, while the person may copy something of their own in Ghostly. That window opens as the input is
|
|
13
|
+
* dispatched and closes at the first callback the guard queued at any input that runs (a message on a channel of
|
|
14
|
+
* its own, a `user-blocking` task where `scheduler.postTask` exists, an animation frame), so it holds the input's
|
|
15
|
+
* own dispatch and its default action: the submit of a click on a submit button or of Enter in a field, the change
|
|
16
|
+
* of a checkbox. It also covers the rendering step right after the input: the animation frame callbacks the page
|
|
17
|
+
* asked for before the input run in the frame right after it, ahead of the guard's message and `user-blocking`
|
|
18
|
+
* task (and of its own frame callback, which closes the window there), so a `submit` or `change` one of them fires
|
|
19
|
+
* counts. A `submit` or `change` fired by script (`requestSubmit()`, `click()`) from a timer, a promise, a message
|
|
20
|
+
* or an animation frame asked for at or after the input, or outside any input, does not count. So a copy button, a
|
|
21
|
+
* form, a checkbox, a double click or the app's own context menu copies on the person's tap, and nothing else does
|
|
22
|
+
* (not on load, not from a timer or a promise after a tap). `execCommand("paste")` is refused. Every other command
|
|
23
|
+
* passes as it is. The wrapped `execCommand` is left fixed in place (not writable, not configurable), once per
|
|
24
|
+
* window;
|
|
10
25
|
* - runs in a frame's window before the page holds it, as the WebRTC guard does (`VIEWER_GUARD_SCRIPT`): what a frame
|
|
11
26
|
* element hands out is guarded first, the frames of the document and of its shadow trees are gone over as one loads
|
|
12
27
|
* (an empty frame's first load fires as it is put in the page) and as the page changes, each `srcdoc` frame gets
|
|
13
28
|
* this script first, a declarative shadow root the page's script would make is refused, and with `VIEWER_GUARD_CSP`
|
|
14
|
-
* a `javascript:` URL is refused (its own Trusted Types default policy; one passes every other string on as it is
|
|
29
|
+
* a `javascript:` URL is refused (its own Trusted Types default policy; one passes every other string on as it is,
|
|
30
|
+
* or, once the page made its own `default` policy, to that one's rules: the page's `createPolicy("default")` gets the
|
|
31
|
+
* guard's policy back with them, and the copy of itself it puts in a `srcdoc` frame skips them).
|
|
15
32
|
* A frame's window keeps what was run in it on its first, empty page when the page it loads is of the same origin (the
|
|
16
33
|
* bridge's guard reaches the app's frame then): there this script only watches the new document. Each document it
|
|
17
34
|
* watches is marked (`ghostlyClipboardGuard`, fixed in place): the bridge reads that to know the guard ran in the page
|
|
@@ -21,6 +38,6 @@
|
|
|
21
38
|
* inside a shadow tree written in the HTML the page itself sends, is out of its sight.
|
|
22
39
|
* No backslash, `${` or backtick in it.
|
|
23
40
|
*/
|
|
24
|
-
export declare const CLIPBOARD_GUARD_SCRIPT = "(function noClipboardWrites(w) {\n \"use strict\";\n try {\n const apply = w.Reflect.apply;\n const describe = w.Object.getOwnPropertyDescriptor;\n const define = w.Object.defineProperty;\n const proto = w.Document.prototype;\n const home = w.document;\n const exec = describe(proto, \"execCommand\");\n const fresh = !!exec && exec.configurable === true && typeof exec.value === \"function\";\n const watched = !!describe(home, \"ghostlyClipboardGuard\");\n if (!fresh && watched) return;\n if (!watched) define(home, \"ghostlyClipboardGuard\", { value: true });\n const own = \"<script>(\" + noClipboardWrites + \")(window)<\" + \"/script>\";\n const close = \"<\" + \"/script>\";\n const webRtc = \"<script>(function noWebRtc(\";\n const text = w.String;\n const lower = text.prototype.toLowerCase;\n const slice = text.prototype.slice;\n const index = text.prototype.indexOf;\n const listen = w.EventTarget.prototype.addEventListener;\n const shut = (inner) => {\n try { if (inner && inner !== w) noClipboardWrites(inner); } catch (e) {}\n };\n const count = describe(w, \"length\").get;\n const view = describe(proto, \"defaultView\").get;\n const sweep = () => {\n try { for (let i = apply(count, w, []); i-- > 0;) shut(w[i]); } catch (e) {}\n };\n const elements = w.Element.prototype;\n const getAttribute = elements.getAttribute;\n const setAttribute = elements.setAttribute;\n const removeAttribute = elements.removeAttribute;\n const attachShadow = elements.attachShadow;\n const size = describe(w.NodeList.prototype, \"length\").get;\n const first = (frame) => {\n const doc = apply(getAttribute, frame, [\"srcdoc\"]);\n if (doc === null) return;\n let at = 0;\n if (apply(slice, doc, [0, webRtc.length]) === webRtc) {\n const end = apply(index, doc, [close]);\n if (end >= 0) at = end + close.length;\n }\n if (apply(slice, doc, [at, at + own.length]) === own) return;\n try { apply(setAttribute, frame, [\"srcdoc\", own + doc]); } catch (e) { apply(removeAttribute, frame, [\"srcdoc\"]); }\n };\n const Observer = w.MutationObserver;\n const observe = Observer.prototype.observe;\n const watch = (root, all) => {\n const scan = () => {\n try {\n const frames = apply(all, root, [\"iframe[srcdoc]\"]);\n for (let i = apply(size, frames, []); i-- > 0;) first(frames[i]);\n } catch (e) {}\n sweep();\n };\n apply(observe, new Observer(scan), [root, { subtree: true, childList: true, attributes: true, attributeFilter: [\"srcdoc\"] }]);\n apply(listen, root, [\"load\", sweep, true]);\n scan();\n return root;\n };\n if (fresh) {\n const run = exec.value;\n const phase = describe(w.Event.prototype, \"eventPhase\").get;\n let tap = null;\n let trusted = null;\n const seen = (event) => {\n try {\n const found = describe(event, \"isTrusted\");\n if (found && found.get && apply(found.get, event, []) === true) { tap = event; trusted = found.get; }\n } catch (e) {}\n };\n const taps = [\"pointerdown\", \"pointerup\", \"mousedown\", \"mouseup\", \"click\", \"auxclick\", \"touchstart\", \"touchend\", \"keydown\", \"keyup\"];\n for (let i = 0; i < taps.length; i++) apply(listen, w, [taps[i], seen, true]);\n const tapping = () => {\n try { return tap !== null && apply(trusted, tap, []) === true && apply(phase, tap, []) !== 0; } catch (e) { return false; }\n };\n const guarded = function execCommand(command) {\n const name = apply(lower, text(command), []);\n if (name === \"paste\" || ((name === \"copy\" || name === \"cut\") && !tapping())) return false;\n const args = [name];\n for (let i = 1; i < arguments.length; i++) args[i] = arguments[i];\n return apply(run, this, args);\n };\n define(proto, \"execCommand\", { value: guarded, writable: false, enumerable: exec.enumerable, configurable: false });\n if (w.trustedTypes && !w.trustedTypes.defaultPolicy) {\n try {\n w.trustedTypes.createPolicy(\"default\", {\n createHTML: (input) => input,\n createScript: (input, type, sink) => (sink === \"Location href\" ? null : input),\n createScriptURL: (input) => input,\n });\n } catch (e) {}\n }\n const reopen = proto.open;\n proto.open = function () {\n const got = apply(reopen, this, arguments);\n try { if (apply(view, this, []) === w) apply(listen, this, [\"load\", sweep, true]); } catch (e) {}\n return got;\n };\n const shadowed = (html) => apply(index, apply(lower, html, []), [\"shadowrootmode\"]) >= 0;\n const Refused = w.TypeError;\n const refuse = () => { throw new Refused(\"A declarative shadow root is not allowed here\"); };\n const parsers = [[elements, \"setHTMLUnsafe\"], [w.ShadowRoot && w.ShadowRoot.prototype, \"setHTMLUnsafe\"], [w.Document, \"parseHTMLUnsafe\"]];\n for (let i = 0; i < parsers.length; i++) {\n const owner = parsers[i][0];\n const name = parsers[i][1];\n const real = owner && owner[name];\n if (typeof real !== \"function\") continue;\n owner[name] = function (html) {\n const checked = text(html);\n if (shadowed(checked)) refuse();\n return apply(real, this, arguments.length > 1 ? [checked, arguments[1]] : [checked]);\n };\n }\n let tail = \"\";\n const writes = [\"write\", \"writeln\"];\n for (let i = 0; i < writes.length; i++) {\n const real = proto[writes[i]];\n if (typeof real !== \"function\") continue;\n proto[writes[i]] = function () {\n let checked = \"\";\n for (let j = 0; j < arguments.length; j++) checked += text(arguments[j]);\n if (shadowed(tail + checked)) refuse();\n tail = apply(slice, tail + checked, [-16]);\n return apply(real, this, [checked]);\n };\n }\n const kinds = [\"HTMLIFrameElement\", \"HTMLFrameElement\", \"HTMLObjectElement\", \"HTMLEmbedElement\"];\n const reads = [\"contentWindow\", \"contentDocument\", \"getSVGDocument\"];\n for (let k = 0; k < kinds.length; k++) {\n const owner = w[kinds[k]] && w[kinds[k]].prototype;\n for (let r = 0; r < reads.length; r++) {\n const name = reads[r];\n const found = owner && describe(owner, name);\n const key = found && found.get ? \"get\" : \"value\";\n if (!found || typeof found[key] !== \"function\") continue;\n const read = found[key];\n found[key] = function () {\n const got = apply(read, this, arguments);\n try { shut(name === \"contentWindow\" ? got : apply(view, got, [])); } catch (e) {}\n return got;\n };\n try { define(owner, name, found); } catch (e) {}\n }\n }\n const inShadow = w.DocumentFragment.prototype.querySelectorAll;\n if (attachShadow) {\n elements.attachShadow = function () {\n const root = apply(attachShadow, this, arguments);\n try { watch(root, inShadow); } catch (e) {}\n return root;\n };\n }\n }\n if (!watched) watch(home, proto.querySelectorAll);\n } catch (e) {}\n})(window)";
|
|
41
|
+
export declare const CLIPBOARD_GUARD_SCRIPT = "(function noClipboardWrites(w) {\n \"use strict\";\n try {\n const apply = w.Reflect.apply;\n const describe = w.Object.getOwnPropertyDescriptor;\n const define = w.Object.defineProperty;\n const proto = w.Document.prototype;\n const home = w.document;\n const exec = describe(proto, \"execCommand\");\n const fresh = !!exec && exec.configurable === true && typeof exec.value === \"function\";\n const watched = !!describe(home, \"ghostlyClipboardGuard\");\n if (!fresh && watched) return;\n if (!watched) define(home, \"ghostlyClipboardGuard\", { value: true });\n const own = \"<script>(\" + noClipboardWrites + \")(window)<\" + \"/script>\";\n const close = \"<\" + \"/script>\";\n const webRtc = \"<script>(function noWebRtc(\";\n const text = w.String;\n const lower = text.prototype.toLowerCase;\n const slice = text.prototype.slice;\n const index = text.prototype.indexOf;\n const listen = w.EventTarget.prototype.addEventListener;\n const shut = (inner) => {\n try { if (inner && inner !== w) noClipboardWrites(inner); } catch (e) {}\n };\n const count = describe(w, \"length\").get;\n const view = describe(proto, \"defaultView\").get;\n const sweep = () => {\n try { for (let i = apply(count, w, []); i-- > 0;) shut(w[i]); } catch (e) {}\n };\n const elements = w.Element.prototype;\n const getAttribute = elements.getAttribute;\n const setAttribute = elements.setAttribute;\n const removeAttribute = elements.removeAttribute;\n const attachShadow = elements.attachShadow;\n const size = describe(w.NodeList.prototype, \"length\").get;\n let passing = false;\n const first = (frame) => {\n const doc = apply(getAttribute, frame, [\"srcdoc\"]);\n if (doc === null) return;\n let at = 0;\n if (apply(slice, doc, [0, webRtc.length]) === webRtc) {\n const end = apply(index, doc, [close]);\n if (end >= 0) at = end + close.length;\n }\n if (apply(slice, doc, [at, at + own.length]) === own) return;\n passing = true;\n try { apply(setAttribute, frame, [\"srcdoc\", own + doc]); } catch (e) { apply(removeAttribute, frame, [\"srcdoc\"]); }\n passing = false;\n };\n const Observer = w.MutationObserver;\n const observe = Observer.prototype.observe;\n const watch = (root, all) => {\n const scan = () => {\n try {\n const frames = apply(all, root, [\"iframe[srcdoc]\"]);\n for (let i = apply(size, frames, []); i-- > 0;) first(frames[i]);\n } catch (e) {}\n sweep();\n };\n apply(observe, new Observer(scan), [root, { subtree: true, childList: true, attributes: true, attributeFilter: [\"srcdoc\"] }]);\n apply(listen, root, [\"load\", sweep, true]);\n scan();\n return root;\n };\n if (fresh) {\n const run = exec.value;\n const phase = describe(w.Event.prototype, \"eventPhase\").get;\n const trust = (event) => {\n try {\n const found = describe(event, \"isTrusted\");\n if (found && found.get && apply(found.get, event, []) === true) return found.get;\n } catch (e) {}\n return null;\n };\n const dispatching = (event, trusted) => {\n try { return apply(trusted, event, []) === true && apply(phase, event, []) !== 0; } catch (e) { return false; }\n };\n const stamp = describe(w.Event.prototype, \"timeStamp\");\n const clock = w.performance;\n const tick = clock && clock.now;\n const time = () => { try { return apply(tick, clock, []); } catch (e) { return NaN; } };\n const recent = (at) => time() - at <= 1000;\n const shutters = [];\n try {\n const channel = new w.MessageChannel();\n const post = w.MessagePort.prototype.postMessage;\n const out = channel.port2;\n channel.port1.onmessage = () => settle();\n shutters[0] = () => apply(post, out, [0]);\n } catch (e) {}\n try {\n const tasks = w.scheduler;\n const postTask = tasks && tasks.postTask;\n const urgent = { __proto__: null, priority: \"user-blocking\" };\n if (typeof postTask === \"function\") shutters[shutters.length] = () => { apply(postTask, tasks, [settle, urgent]); };\n } catch (e) {}\n try {\n const frame = w.requestAnimationFrame;\n if (typeof frame === \"function\") shutters[shutters.length] = () => { apply(frame, w, [settle]); };\n } catch (e) {}\n let tap = null;\n let trusted = null;\n let tapped = NaN;\n let open = 0;\n let follows = null;\n const settle = () => { open = 0; follows = null; };\n const seen = (event) => {\n const found = trust(event);\n if (found === null) return;\n let at = time();\n try {\n const given = apply(stamp.get, event, []);\n if (given >= 0 && given < at) at = given;\n } catch (e) {}\n tap = event;\n trusted = found;\n tapped = at;\n if (shutters.length === 0) return;\n open = 1;\n for (let i = 0; i < shutters.length; i++) { try { shutters[i](); } catch (e) {} }\n };\n const taps = [\"pointerdown\", \"pointerup\", \"mousedown\", \"mouseup\", \"click\", \"auxclick\", \"dblclick\", \"contextmenu\", \"touchstart\", \"touchend\", \"keydown\", \"keypress\", \"keyup\"];\n for (let i = 0; i < taps.length; i++) apply(listen, w, [taps[i], seen, true]);\n const followed = (event) => {\n if (open === 0) return;\n const found = trust(event);\n if (found !== null) follows = { event: event, trusted: found, at: tapped, next: follows };\n };\n apply(listen, w, [\"submit\", followed, true]);\n apply(listen, w, [\"change\", followed, true]);\n const tapping = () => {\n if (tap !== null && dispatching(tap, trusted) && recent(tapped)) return true;\n for (let f = follows; f !== null; f = f.next) if (dispatching(f.event, f.trusted) && recent(f.at)) return true;\n return false;\n };\n const guarded = function execCommand(command) {\n const name = apply(lower, text(command), []);\n if (name === \"paste\" || ((name === \"copy\" || name === \"cut\") && !tapping())) return false;\n const args = [name];\n for (let i = 1; i < arguments.length; i++) args[i] = arguments[i];\n return apply(run, this, args);\n };\n define(proto, \"execCommand\", { value: guarded, writable: false, enumerable: exec.enumerable, configurable: false });\n const types = w.trustedTypes;\n if (types && !types.defaultPolicy) {\n try {\n let rules = null;\n const rule = (kind) => (input, type, sink) => {\n if (kind === \"createScript\" && sink === \"Location href\") return null;\n if (passing || rules === null) return input;\n return rules[kind] ? apply(rules[kind], undefined, [input, type, sink]) : null;\n };\n const members = [\"createHTML\", \"createScript\", \"createScriptURL\"];\n const create = types.createPolicy;\n const policy = apply(create, types, [\"default\", { createHTML: rule(members[0]), createScript: rule(members[1]), createScriptURL: rule(members[2]) }]);\n const Mistyped = w.TypeError;\n w.Object.getPrototypeOf(types).createPolicy = function createPolicy(name, options) {\n if (this !== types || rules !== null || text(name) !== \"default\") return apply(create, this, arguments);\n const given = { createHTML: null, createScript: null, createScriptURL: null };\n for (let i = 0; i < members.length; i++) {\n const found = options ? options[members[i]] : undefined;\n if (found === undefined || found === null) continue;\n if (typeof found !== \"function\") throw new Mistyped(\"The policy's \" + members[i] + \" is not a function\");\n given[members[i]] = found;\n }\n rules = given;\n return policy;\n };\n } catch (e) {}\n }\n const reopen = proto.open;\n proto.open = function () {\n const got = apply(reopen, this, arguments);\n try { if (apply(view, this, []) === w) apply(listen, this, [\"load\", sweep, true]); } catch (e) {}\n return got;\n };\n const shadowed = (html) => apply(index, apply(lower, html, []), [\"shadowrootmode\"]) >= 0;\n const Refused = w.TypeError;\n const refuse = () => { throw new Refused(\"A declarative shadow root is not allowed here\"); };\n const parsers = [[elements, \"setHTMLUnsafe\"], [w.ShadowRoot && w.ShadowRoot.prototype, \"setHTMLUnsafe\"], [w.Document, \"parseHTMLUnsafe\"]];\n for (let i = 0; i < parsers.length; i++) {\n const owner = parsers[i][0];\n const name = parsers[i][1];\n const real = owner && owner[name];\n if (typeof real !== \"function\") continue;\n owner[name] = function (html) {\n const checked = text(html);\n if (shadowed(checked)) refuse();\n return apply(real, this, arguments.length > 1 ? [checked, arguments[1]] : [checked]);\n };\n }\n let tail = \"\";\n const writes = [\"write\", \"writeln\"];\n for (let i = 0; i < writes.length; i++) {\n const real = proto[writes[i]];\n if (typeof real !== \"function\") continue;\n proto[writes[i]] = function () {\n let checked = \"\";\n for (let j = 0; j < arguments.length; j++) checked += text(arguments[j]);\n if (shadowed(tail + checked)) refuse();\n tail = apply(slice, tail + checked, [-16]);\n return apply(real, this, [checked]);\n };\n }\n const kinds = [\"HTMLIFrameElement\", \"HTMLFrameElement\", \"HTMLObjectElement\", \"HTMLEmbedElement\"];\n const reads = [\"contentWindow\", \"contentDocument\", \"getSVGDocument\"];\n for (let k = 0; k < kinds.length; k++) {\n const owner = w[kinds[k]] && w[kinds[k]].prototype;\n for (let r = 0; r < reads.length; r++) {\n const name = reads[r];\n const found = owner && describe(owner, name);\n const key = found && found.get ? \"get\" : \"value\";\n if (!found || typeof found[key] !== \"function\") continue;\n const read = found[key];\n found[key] = function () {\n const got = apply(read, this, arguments);\n try { shut(name === \"contentWindow\" ? got : apply(view, got, [])); } catch (e) {}\n return got;\n };\n try { define(owner, name, found); } catch (e) {}\n }\n }\n const inShadow = w.DocumentFragment.prototype.querySelectorAll;\n if (attachShadow) {\n elements.attachShadow = function () {\n const root = apply(attachShadow, this, arguments);\n try { watch(root, inShadow); } catch (e) {}\n return root;\n };\n }\n }\n if (!watched) watch(home, proto.querySelectorAll);\n } catch (e) {}\n})(window)";
|
|
25
42
|
/** `CLIPBOARD_GUARD_SCRIPT`'s hash, as a CSP source: the bridge's policy and a contact's own are given it. */
|
|
26
|
-
export declare const CLIPBOARD_GUARD_HASH = "'sha256-
|
|
43
|
+
export declare const CLIPBOARD_GUARD_HASH = "'sha256-ay9kpYD2BIflB8W9w+iAbo1krsFBwIJunUmXTACfhao='";
|
|
@@ -522,6 +522,19 @@ export declare class DhtDelivery {
|
|
|
522
522
|
private publishOnTick;
|
|
523
523
|
/** How long until the next read of the contact's mailbox (WISP 403, poll pace). */
|
|
524
524
|
get pollMs(): number;
|
|
525
|
+
/**
|
|
526
|
+
* The contact is on DHT only and this side is not: a live link waits on the contact's envelope saying it left, and
|
|
527
|
+
* nothing else of the contact's shows before it (no offer is read, no dial taken, while its mailbox says DHT only). Its
|
|
528
|
+
* reads that are not background ones (the chat open, a text awaiting its receipt) then say `departed`: a few may go over
|
|
529
|
+
* the relays' minute (`DEPARTED_READS` in relay.ts, per mailbox, every relay together, 6 at the open chat's 10 s pace).
|
|
530
|
+
* As plain reads, an extension that stayed on Automatic, its minute spent by what it did before, read nothing of its
|
|
531
|
+
* contact for 40 s after the contact left DHT only, and the matrix's chat stayed "On DHT · retrying live" (E2E full,
|
|
532
|
+
* 2026-11-07 and 11-08). No more reads than before: those it made anyway, the minute spent, go within the allowance.
|
|
533
|
+
* Not while this side is leaving DHT only itself (`signalReads` left, `leavingRead`): its read at the switch stays a
|
|
534
|
+
* plain one, the rest are signaling, so the few requests past a spent minute stay for the dialling side's read of the
|
|
535
|
+
* answer. As a departed read, the switch's took one, and both sides leaving went live in 34 s, against 10.
|
|
536
|
+
*/
|
|
537
|
+
private departedRead;
|
|
525
538
|
/**
|
|
526
539
|
* This side is DHT only, and nothing waits on the contact's mailbox: the contact, pinned, is away (nothing new of its
|
|
527
540
|
* own in `PRESENCE_WINDOW`; it puts a keep-alive every four minutes while there), no text of ours awaits its receipt,
|
|
@@ -124,7 +124,7 @@ export type DidDhtFetch = (url: string, options?: {
|
|
|
124
124
|
}) => Promise<DidDhtFetchResponse>;
|
|
125
125
|
export interface ResolveDidDhtOptions {
|
|
126
126
|
fetch: DidDhtFetch;
|
|
127
|
-
/** Pkarr relays (or did:dht gateways, which answer the same GET) to ask
|
|
127
|
+
/** Pkarr relays (or did:dht gateways, which answer the same GET) to ask, all of them. Default: `DEFAULT_RELAYS`. */
|
|
128
128
|
relays?: string[];
|
|
129
129
|
signal?: AbortSignal;
|
|
130
130
|
}
|
|
@@ -147,9 +147,11 @@ export declare function openDidDhtPayload(did: string, payload: Uint8Array): Dec
|
|
|
147
147
|
seq: bigint;
|
|
148
148
|
};
|
|
149
149
|
/**
|
|
150
|
-
* Resolves a did:dht through Pkarr relays: one GET
|
|
151
|
-
*
|
|
152
|
-
*
|
|
150
|
+
* Resolves a did:dht through Pkarr relays: one GET to each, all at once, and the newest packet that
|
|
151
|
+
* checks out wins (the highest sequence number; on a tie, the relay listed first), so a relay holding
|
|
152
|
+
* an older version cannot bring back a removed key or undo a deactivation. Each answer is bounded to
|
|
153
|
+
* a BEP44 item, its signature checked against the DID's key and its records parsed strictly; a relay
|
|
154
|
+
* that has nothing, fails or serves a packet that does not check out does not count. A deactivated DID
|
|
153
155
|
* resolves (`metadata.deactivated`); everything else that goes wrong throws a `DidDhtError`.
|
|
154
156
|
*/
|
|
155
157
|
export declare function resolveDidDht(did: string, options: ResolveDidDhtOptions): Promise<DidDhtResolution>;
|
|
@@ -22,6 +22,12 @@ export declare const LIMITS: {
|
|
|
22
22
|
readonly maxPathBytes: number;
|
|
23
23
|
/** Requests a host serves at once for one peer. */
|
|
24
24
|
readonly maxConcurrentRequestsPerPeer: 32;
|
|
25
|
+
/**
|
|
26
|
+
* Request-body bytes a host holds for one peer at once, from a body's first chunk until its local fetch settles.
|
|
27
|
+
* Past it a request is refused (`busy`). As much as a client's in-flight requests can carry, so only a peer that
|
|
28
|
+
* ignores that limit reaches it.
|
|
29
|
+
*/
|
|
30
|
+
readonly maxHostBodyBytesPerPeer: number;
|
|
25
31
|
/** Requests a client keeps in flight; the rest wait in a queue. */
|
|
26
32
|
readonly maxClientInFlight: 16;
|
|
27
33
|
/**
|
|
@@ -38,6 +44,11 @@ export declare const LIMITS: {
|
|
|
38
44
|
readonly maxStoredIncomingBytesPerPeer: number;
|
|
39
45
|
readonly requestTimeoutMs: 60000;
|
|
40
46
|
readonly bodyIdleTimeoutMs: 30000;
|
|
47
|
+
/**
|
|
48
|
+
* What a request body must bring in each `bodyIdleTimeoutMs` (unless it ends) to count as moving: a peer that sends a
|
|
49
|
+
* few bytes at a time is let go like one that stalls.
|
|
50
|
+
*/
|
|
51
|
+
readonly minRequestBodyBytesPerIdle: number;
|
|
41
52
|
/** Stop writing to the channel above this many buffered bytes. */
|
|
42
53
|
readonly sendHighWaterMark: number;
|
|
43
54
|
readonly sendLowWaterMark: number;
|
|
@@ -205,6 +205,17 @@ export interface IncomingMessage {
|
|
|
205
205
|
}
|
|
206
206
|
/** Largest `paired-message` frame sent with a preview: a session fails on a frame over 60 KiB (`PairedSession`). */
|
|
207
207
|
export declare const MAX_PAIRED_MESSAGE_FRAME: number;
|
|
208
|
+
/**
|
|
209
|
+
* Texts a contact's link takes: a burst per short window (a reconnect flushes every queued text at once) and a total
|
|
210
|
+
* per hour, both well above what a person or a bot sends. The rest go unconfirmed and come again (the sender's outbox
|
|
211
|
+
* resends with backoff), so a catch-up only slows.
|
|
212
|
+
*/
|
|
213
|
+
export declare const MESSAGE_RECEIVE_LIMITS: {
|
|
214
|
+
readonly burst: 200;
|
|
215
|
+
readonly burstWindowMs: 10000;
|
|
216
|
+
readonly hourly: 1800;
|
|
217
|
+
readonly hourWindowMs: 3600000;
|
|
218
|
+
};
|
|
208
219
|
/**
|
|
209
220
|
* A `paired-message` frame. The preview (`pv`) is left out when the frame would pass `MAX_PAIRED_MESSAGE_FRAME`
|
|
210
221
|
* with it: the text matters, the card does not. A reply (`r`, WISP 401 § Replies) is a few hundred bytes at most
|
|
@@ -788,6 +799,8 @@ export declare class GhostLink {
|
|
|
788
799
|
private readonly pinsReceived;
|
|
789
800
|
/** Edit frames the contact may send per window; the rest go unconfirmed and come again. */
|
|
790
801
|
private readonly editsReceived;
|
|
802
|
+
/** Text frames the contact may send per window (`MESSAGE_RECEIVE_LIMITS`); the rest go unconfirmed and come again. */
|
|
803
|
+
private readonly messagesReceived;
|
|
791
804
|
/** Call signals the contact may send per window; the rest are dropped. */
|
|
792
805
|
private readonly callsReceived;
|
|
793
806
|
/** WebRTC signals the contact may send on the session (`paired-rtc`) per window; the rest are dropped. */
|
|
@@ -1068,6 +1081,13 @@ export declare class GhostLink {
|
|
|
1068
1081
|
private open;
|
|
1069
1082
|
/** Closes what a switch replaced once the contact has had time to move too. */
|
|
1070
1083
|
private retire;
|
|
1084
|
+
/**
|
|
1085
|
+
* Where the receipt of a frame read on `channel` goes: that session while it carries the chat, the one now when a move
|
|
1086
|
+
* replaced it (or moved while the frame was shown), or nowhere.
|
|
1087
|
+
*/
|
|
1088
|
+
private answerOn;
|
|
1089
|
+
/** Counts one text the contact sent; false (and not counted) when either of `messagesReceived` is full. */
|
|
1090
|
+
private takeMessage;
|
|
1071
1091
|
/**
|
|
1072
1092
|
* The WebRTC session a switch moved off is still retiring (`SWITCH_RETIRE_MS`): its data link is open, and a new offer
|
|
1073
1093
|
* cannot go until it closes. Resolves once it has (at once when none is).
|
|
@@ -488,6 +488,12 @@ export declare class GroupSession {
|
|
|
488
488
|
* said it (`heardName`). In memory only; the records held start it.
|
|
489
489
|
*/
|
|
490
490
|
private readonly nickAt;
|
|
491
|
+
/**
|
|
492
|
+
* Member → the name an edge's empty one took away a moment ago (`setNick`), and when. The admin that removed me while
|
|
493
|
+
* I was away says no name on the edge it kept to tell me, as its app opens it, and the commit that removes me comes
|
|
494
|
+
* right after on that edge: that name comes back for the history I keep (`nameKept`). In memory only.
|
|
495
|
+
*/
|
|
496
|
+
private readonly unnamed;
|
|
491
497
|
/** The version of my name record last said to every member (`sayName`). In memory only: said again once per start. */
|
|
492
498
|
private nameSaid;
|
|
493
499
|
/** New name records taken per member, a few a minute (`GROUP_LIMITS.namesPerMember`). In memory only. */
|
|
@@ -712,6 +718,11 @@ export declare class GroupSession {
|
|
|
712
718
|
/** Told out of band (the admin's contact chat) that I was removed, before or instead of the commit. */
|
|
713
719
|
markRemoved(): Promise<void>;
|
|
714
720
|
private out;
|
|
721
|
+
/**
|
|
722
|
+
* Out of the group: a name an edge took away a moment before comes back, as the history I keep still shows it. The
|
|
723
|
+
* edge the admin kept to tell me I was removed says no name as it opens, just before the commit that removed me.
|
|
724
|
+
*/
|
|
725
|
+
private nameKept;
|
|
715
726
|
/**
|
|
716
727
|
* Encrypts and signs a text, keeps it for catch-up and sends it to every other member. `mentions`: places of the
|
|
717
728
|
* text that name members (everyone: the admin only); what does not hold is left out. `reply`: the message it
|
|
@@ -58,9 +58,18 @@ export declare const VIEWER_SERVICE_CSP = "default-src 'self' https: data: blob:
|
|
|
58
58
|
export declare const VIEWER_SERVICE_CSP_RELAY_ONLY = "default-src 'self' data: blob: 'unsafe-inline' 'unsafe-eval'; connect-src 'self'; form-action 'self'";
|
|
59
59
|
/** Ghostly's policy for a contact's app, by whether Hide my IP from contacts is on. */
|
|
60
60
|
export declare function viewerServicePolicy(relayOnly: boolean): string;
|
|
61
|
+
/**
|
|
62
|
+
* The browser features a contact's app in the extension's viewer tab may not use. Its tab is a site of its own, so
|
|
63
|
+
* what the person granted it (camera, microphone, location, a device) would be a site setting of the browser's, which
|
|
64
|
+
* no Delete chat, Clear all data or Delete profile reaches; denied here, the browser never asks and ignores a grant
|
|
65
|
+
* made before. The web app's view is a frame of another site, which gets none of them, and Desktop's window grants none.
|
|
66
|
+
*/
|
|
67
|
+
export declare const VIEWER_PERMISSIONS_POLICY: string;
|
|
61
68
|
/**
|
|
62
69
|
* `headers` with Ghostly's policy after the contact's own, all in one `content-security-policy` joined by commas: a
|
|
63
|
-
* browser enforces every policy of the list, so the contact's can narrow Ghostly's but never widen it.
|
|
70
|
+
* browser enforces every policy of the list, so the contact's can narrow Ghostly's but never widen it. The page's
|
|
71
|
+
* features are Ghostly's alone (`VIEWER_PERMISSIONS_POLICY`): a contact's permissions policy could allow them, and one
|
|
72
|
+
* the browser cannot read would void the whole header, Ghostly's part with it.
|
|
64
73
|
*/
|
|
65
74
|
export declare function withViewerPolicy(headers: HeaderList, relayOnly?: boolean): HeaderList;
|
|
66
75
|
/**
|
|
@@ -104,16 +113,21 @@ export declare class HttpHost {
|
|
|
104
113
|
* so a stream counts toward the limit until its fetch has settled.
|
|
105
114
|
*/
|
|
106
115
|
private readonly live;
|
|
116
|
+
/** Body bytes of the streams in `live`: a peer cannot make the host hold more than `maxHostBodyBytesPerPeer`. */
|
|
117
|
+
private heldBodyBytes;
|
|
107
118
|
constructor(channel: FrameChannel, getService: (id: string) => HostedHttpService | undefined, localFetch: LocalFetch);
|
|
108
119
|
get activeRequests(): number;
|
|
109
120
|
handleRequest(frame: HttpRequestFrame): void;
|
|
110
121
|
handleChunk(chunk: ChunkFrame): void;
|
|
111
122
|
handleReset(frame: ResetFrame): void;
|
|
112
123
|
closeAll(): void;
|
|
113
|
-
|
|
124
|
+
/** A body that brings less than `minRequestBodyBytesPerIdle` in a `bodyIdleTimeoutMs` is let go, even if it trickles. */
|
|
125
|
+
private watchPace;
|
|
114
126
|
/** Ids are reused after a reset, so a stream is current only if it is the one in the map. */
|
|
115
127
|
private isCurrent;
|
|
116
128
|
private end;
|
|
129
|
+
/** The stream no longer counts toward the limits: its body is dropped, or its local fetch has settled. */
|
|
130
|
+
private release;
|
|
117
131
|
private fail;
|
|
118
132
|
private run;
|
|
119
133
|
}
|
|
@@ -9,8 +9,15 @@ export interface Identity {
|
|
|
9
9
|
publicKey: Uint8Array;
|
|
10
10
|
pubKeyZ32: string;
|
|
11
11
|
}
|
|
12
|
-
/** How many public keys `identityFromSeed` keeps: a start with 50 chats and 20 groups derives about 400 distinct ones. */
|
|
12
|
+
/** How many public keys `identityFromSeed` keeps however long ago they were used: a start with 50 chats and 20 groups derives about 400 distinct ones. */
|
|
13
13
|
export declare const IDENTITY_MEMO_SIZE = 1024;
|
|
14
|
+
/**
|
|
15
|
+
* Past `IDENTITY_MEMO_SIZE`, a key is let go only once it has not been asked for this long: a start asks for all of a
|
|
16
|
+
* profile's keys within seconds (a 600-chat one, ~4,000 of them), then asks again for the running links' ones.
|
|
17
|
+
*/
|
|
18
|
+
export declare const IDENTITY_MEMO_IDLE_MS: number;
|
|
19
|
+
/** The most keys kept, used or not: ~410 bytes each in V8 (its id, its key and when it was used), ~6.7 MB in all. */
|
|
20
|
+
export declare const IDENTITY_MEMO_MAX = 16384;
|
|
14
21
|
export declare function identityFromSeed(seed: Uint8Array): Identity;
|
|
15
22
|
export declare function identityFromSeedB64(seedB64: string): Identity;
|
|
16
23
|
export declare function createIdentity(): Identity;
|
|
@@ -140,6 +140,11 @@ export interface SharedIdentity {
|
|
|
140
140
|
id: string;
|
|
141
141
|
provider: string;
|
|
142
142
|
subject: string;
|
|
143
|
+
/**
|
|
144
|
+
* The identity the contact keeps it under (the provider's verified subject: an OIDC binding names the issuer, its
|
|
145
|
+
* account is the issuer and `sub`). Absent in older ledgers.
|
|
146
|
+
*/
|
|
147
|
+
account?: string;
|
|
143
148
|
/** queued: the person chose to share, the contact is not connected yet. */
|
|
144
149
|
status: "queued" | "pending" | "accepted" | "rejected" | "withdrawal-pending" | "withdrawn";
|
|
145
150
|
/** Seconds. When the status last changed. */
|
|
@@ -184,10 +189,12 @@ export interface IdentityLedger {
|
|
|
184
189
|
timeline?: IdentityTimelineEntry[];
|
|
185
190
|
}
|
|
186
191
|
export declare const emptyIdentityLedger: () => IdentityLedger;
|
|
192
|
+
/** `account`: the subject its provider verified (`VerifiedIdentity.subject`); the binding's subject when not given. */
|
|
187
193
|
export interface LocalIdentityProof {
|
|
188
194
|
statement: IdentityStatement;
|
|
189
195
|
evidence: unknown;
|
|
190
196
|
seed: Uint8Array;
|
|
197
|
+
account?: string;
|
|
191
198
|
}
|
|
192
199
|
export interface IdentityExchangeOptions {
|
|
193
200
|
/** This side's view of the authenticated channel; throws when there is none. */
|
|
@@ -84,6 +84,7 @@ export * from './sshsig.js';
|
|
|
84
84
|
export * from "./groupCrypto.js";
|
|
85
85
|
export * from "./groupCommits.js";
|
|
86
86
|
export * from "./groupSession.js";
|
|
87
|
+
export * from "./catchUp.js";
|
|
87
88
|
export * from "./groupMentions.js";
|
|
88
89
|
export * from "./groupWake.js";
|
|
89
90
|
export * from "./groupEdits.js";
|
|
@@ -196,7 +196,10 @@ export type MiniAppEvent = {
|
|
|
196
196
|
};
|
|
197
197
|
/** Limits the broker enforces (and an app can plan for). */
|
|
198
198
|
export declare const MINI_APP_LIMITS: {
|
|
199
|
-
/**
|
|
199
|
+
/**
|
|
200
|
+
* One request, serialized: a stored value's 64 KiB with room for its key (256 bytes, at most six times that as JSON)
|
|
201
|
+
* and `{"id", "type", "args"}` around them.
|
|
202
|
+
*/
|
|
200
203
|
readonly requestBytes: number;
|
|
201
204
|
/** Requests per second, per app. */
|
|
202
205
|
readonly requestsPerSecond: 50;
|
|
@@ -32,6 +32,11 @@ export declare const APP_RANGE_LIMITS: {
|
|
|
32
32
|
* are asked, so a cancelled one counts as the read it started. Twice the asking app's own budget (16 MiB a second).
|
|
33
33
|
*/
|
|
34
34
|
readonly bytesPerSecond: number;
|
|
35
|
+
/**
|
|
36
|
+
* The least one ask counts in `bytesPerSecond`, however few bytes it asked or the file held from its offset: each is
|
|
37
|
+
* a read on this device, so a contact gets at most 512 a second.
|
|
38
|
+
*/
|
|
39
|
+
readonly askFloorBytes: number;
|
|
35
40
|
};
|
|
36
41
|
/**
|
|
37
42
|
* What an `ar-err` says. `not-served`: no serve of that id (never given, or ended); `changed` and
|
|
@@ -94,7 +94,7 @@ export declare const DEPARTED_READS = 6;
|
|
|
94
94
|
/**
|
|
95
95
|
* A 1:1 chat's reads of an invite this side made, while its joiner is due and has not shown (`awaited`, `AWAITING_PEER_MS`
|
|
96
96
|
* in link.ts), may go over a relay's minute within the chat's allowance (`SIGNALING_ALLOWANCE_SHARE`) the same way: at
|
|
97
|
-
* most this many
|
|
97
|
+
* most this many in a minute, every invite and every relay together. And while one asked in the last minute, the departed
|
|
98
98
|
* reads leave them half of that on each relay: the last `AWAITED_READS / 2` of the allowance's reads (`DEPARTED_READS`
|
|
99
99
|
* then take at most 3 on a relay of 30, against 5). Read every 2 to 4 s, they cover the seconds in which a joiner that
|
|
100
100
|
* opened the link at once knocks. Within the chats' allowance, they add nothing to what a relay may see in a minute
|
|
@@ -102,6 +102,9 @@ export declare const DEPARTED_READS = 6;
|
|
|
102
102
|
* another on relays of 30 spent the minute on both 12 s in (two pairings, about 15 requests a relay each), the departed
|
|
103
103
|
* reads of the contact that had just left took the allowance, and the third invite's key was read once, then not until
|
|
104
104
|
* the minute freed: the joiner's knock 48 s late, and join to live in 60 s, against 2.6 and 4.6 s (CLI lab, 2026-11-07).
|
|
105
|
+
* Not this many per invite: a web profile with 150 chats added from old sessions, each an invite awaited from that start,
|
|
106
|
+
* had their reads take the whole allowance at every refill, and a live contact's reads after a reload went once a
|
|
107
|
+
* minute: the chat came back in 2 to 7 min, against 41 to 69 s before (2026-11-07).
|
|
105
108
|
*/
|
|
106
109
|
export declare const AWAITED_READS = 4;
|
|
107
110
|
/**
|
|
@@ -350,8 +353,8 @@ export declare class RelayTransport implements PkarrTransport {
|
|
|
350
353
|
private readonly spentAnswerAllowance;
|
|
351
354
|
/** Per contact, its departed reads past the limit in the last minute, every relay together (`DEPARTED_READS`). */
|
|
352
355
|
private readonly departedOver;
|
|
353
|
-
/**
|
|
354
|
-
private
|
|
356
|
+
/** The awaited reads past the limit in the last minute, every invite and every relay together (`AWAITED_READS`). */
|
|
357
|
+
private awaitedOver;
|
|
355
358
|
/** When an awaited invite's read last asked: the departed reads leave it room for a minute (`AWAITED_READS`). */
|
|
356
359
|
private awaitedAt;
|
|
357
360
|
/**
|
|
@@ -632,7 +635,7 @@ export declare class RelayTransport implements PkarrTransport {
|
|
|
632
635
|
private turnAhead;
|
|
633
636
|
/** A 1:1 chat's read of `key` the budget has held back for `READ_STARVED_MS` without a break. */
|
|
634
637
|
private starved;
|
|
635
|
-
/** This key's departed
|
|
638
|
+
/** This key's departed reads past the limit in the last minute (`DEPARTED_READS`). */
|
|
636
639
|
private overReads;
|
|
637
640
|
/** One more, the keys with none in the last minute dropped. */
|
|
638
641
|
private overAdd;
|
|
@@ -52,7 +52,9 @@ export interface PkarrRequestOptions {
|
|
|
52
52
|
watch?: boolean;
|
|
53
53
|
/**
|
|
54
54
|
* A 1:1 chat's read of a contact that went away from a live session within `DEPARTED_READ_MS` (link.ts): an app that
|
|
55
|
-
* restarts publishes its offer then.
|
|
55
|
+
* restarts publishes its offer then. So is a chat's read of the mailbox of a contact on DHT only, this side not, out of
|
|
56
|
+
* the background (`DhtDelivery.departedRead`): its envelope saying it left is what the live link waits on. A few may go
|
|
57
|
+
* over the relay's minute (`DEPARTED_READS` in relay.ts).
|
|
56
58
|
*/
|
|
57
59
|
departed?: boolean;
|
|
58
60
|
/**
|
|
@@ -32,6 +32,12 @@ export declare const VIEWER_GUARD_HASH = "'sha256-P3jYgJwfoJ/cAS31rQz7Tk99bBwsSe
|
|
|
32
32
|
* `javascript:` URL to the guard's policy before it runs.
|
|
33
33
|
*/
|
|
34
34
|
export declare const VIEWER_GUARD_CSP = "frame-src 'self'; object-src 'self'; require-trusted-types-for 'script'";
|
|
35
|
+
/**
|
|
36
|
+
* `VIEWER_GUARD_CSP` for a worker's own script: no Trusted Types. A worker has no `javascript:` URL, no `execCommand`
|
|
37
|
+
* and no WebRTC for a guard to keep, and no guard runs in it to make the `default` policy, so Trusted Types there
|
|
38
|
+
* would refuse its every `importScripts`, `eval` and `new Function`.
|
|
39
|
+
*/
|
|
40
|
+
export declare const VIEWER_WORKER_GUARD_CSP = "frame-src 'self'; object-src 'self'";
|
|
35
41
|
/** A script `guardViewerAnswer` puts first in each page, and its hash, as a CSP source. */
|
|
36
42
|
export interface PageGuard {
|
|
37
43
|
script: string;
|
|
@@ -52,6 +52,7 @@ function providerDescriptorProblems(d) {
|
|
|
52
52
|
}
|
|
53
53
|
if (typeof d.create !== "function") problems.push("create is not a function");
|
|
54
54
|
if (d.validate !== void 0 && typeof d.validate !== "function") problems.push("validate is not a function");
|
|
55
|
+
if (d.wallet !== void 0 && typeof d.wallet !== "function") problems.push("wallet is not a function");
|
|
55
56
|
return problems;
|
|
56
57
|
}
|
|
57
58
|
/** Only these fields reach the UI, whatever else a provider module keeps on its descriptor. */
|
|
@@ -96,4 +97,4 @@ function redact(error, secrets = {}) {
|
|
|
96
97
|
//#endregion
|
|
97
98
|
export { describeProvider as a, offeredIn as c, PROVIDER_PLATFORMS as i, providerDescriptorProblems as l, PROVIDER_ID as n, isNothingSpentError as o, PROVIDER_NETWORKS as r, networkMode as s, NothingSpentError as t, redact as u };
|
|
98
99
|
|
|
99
|
-
//# sourceMappingURL=types-
|
|
100
|
+
//# sourceMappingURL=types-DYLIIkU8.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"types-DYLIIkU8.js","names":[],"sources":["../../browser/src/engine/paymentAdapters/providers/types.ts"],"sourcesContent":["import type { BitcoinNetwork } from \"@ghostly/core\";\nimport type { WalletMode } from \"../../../shared/mints\";\n\n/**\n * What every wallet provider (a source of Lightning or of on-chain Bitcoin) shares: where it runs, how\n * it is configured, and the one distinction that keeps money safe. See PROVIDERS.md.\n */\n\n/** Where Ghostly runs: the web app, the browser extension (engine in an offscreen document), the Tauri app. */\nexport type ProviderPlatform = \"web\" | \"extension\" | \"desktop\";\nexport const PROVIDER_PLATFORMS: readonly ProviderPlatform[] = [\"web\", \"extension\", \"desktop\"];\nexport type ProviderKind = \"lightning\" | \"onchain\";\n/** The chain a provider's sats live on. Only `bitcoin` is real money; the others belong to the Testnet mode. */\nexport type ProviderNetwork = BitcoinNetwork;\nexport const PROVIDER_NETWORKS: readonly ProviderNetwork[] = [\"bitcoin\", \"signet\", \"testnet\", \"regtest\", \"mutinynet\"];\nexport const networkMode = (network: ProviderNetwork): WalletMode => (network === \"bitcoin\" ? \"mainnet\" : \"testnet\");\n\n/**\n * One field of a provider's configuration form. The wallet card renders these; a provider that needs\n * more registers its own form component instead (apps/ui/src/components/wallet/providers/forms.ts).\n * `secret` fields (an NWC URI, a macaroon, a rune, an API key, a password) are sealed before they are\n * stored, never shown again, never put in the engine state, and never logged.\n */\nexport interface ProviderField {\n name: string;\n label: string;\n kind: \"text\" | \"url\" | \"secret\" | \"select\" | \"textarea\";\n placeholder?: string;\n help?: string;\n optional?: boolean;\n /** `select` only. */\n options?: { value: string; label: string }[];\n /** Pre-filled per mode, e.g. a public test server for Testnet. */\n defaults?: Partial<Record<WalletMode, string>>;\n /**\n * Values offered under a `url` or `text` field (a list to pick from, anything may still be typed), each\n * only while the other fields hold `when`: e.g. a public Esplora server per network.\n */\n suggestions?: { value: string; label: string; when?: Record<string, string> }[];\n /**\n * A server address that can be changed on a saved source without its secrets being typed again, and\n * without changing whose money it is: an Esplora server of a BDK wallet (the wallet is the phrase). The\n * source's \"Change server\" edits these fields only. Never mark a field that picks another account (a\n * node's URL: another node is other money).\n */\n changeable?: boolean;\n}\n\n/** What the person typed, split by the field kinds: `config` is shown back, `secrets` never is. */\nexport interface ProviderSettings {\n config: Record<string, string>;\n secrets: Record<string, string>;\n}\n\n/** What the engine hands a provider's factory. */\nexport interface ProviderHost {\n platform: ProviderPlatform;\n /** The wallet mode the source is for: its provider must be on a network of this mode. */\n mode: WalletMode;\n /**\n * Reserved for the built-in Cashu mint source: the engine's own wallet. It is not part of the SDK, and\n * no other provider should read it.\n */\n cashu?: unknown;\n /**\n * Reserved for the built-in Cashu mint source: the Cashu balance of the mode in the engine's last wallet view, once\n * there is one. The view is made again whenever the wallet changes.\n */\n cashuBalance?: () => number | undefined;\n /** Reserved for the built-in Fedimint source: the engine's Fedimint wallet (its joined federations). Not part of the SDK. */\n fedimint?: unknown;\n /** Ends when the source is replaced, the mode switches or the engine stops: abort long waits on it. */\n signal: AbortSignal;\n /**\n * Desktop only: calls a command of the Tauri app (apps/desktop), for what a WebView cannot do (a pinned\n * certificate, no CORS, a raw socket). Absent on the web and in the extension.\n */\n invoke?: <T>(command: string, args: Record<string, unknown>) => Promise<T>;\n}\n\n/**\n * A provider module's export. Registering a provider is adding its module and one line in\n * `registry.ts`; everything else (storage, sealing, per-mode sources, the card, journals) is shared.\n */\nexport interface ProviderDescriptor<P> {\n id: string;\n label: string;\n kind: ProviderKind;\n /** One line under the name in the source picker: what it is and who holds the money. */\n description: string;\n /** Networks it can run on. A mode lists only providers with a network of that mode. */\n networks: readonly ProviderNetwork[];\n platforms: readonly ProviderPlatform[];\n fields: readonly ProviderField[];\n /** Custodial (someone else holds the sats) or still experimental: said in the picker. */\n custodial?: boolean;\n experimental?: boolean;\n /** Checks the form before anything is contacted; throws a message fit for the person. */\n validate?(settings: ProviderSettings, mode: WalletMode): void;\n /**\n * The wallet these (validated) settings reach, whatever their spelling: two sources with the same answer are one\n * wallet, and the same balance. Absent: the same settings, byte for byte.\n */\n wallet?(settings: ProviderSettings): string;\n /** Connects. The engine then asks `info()` and refuses a network of the other mode. */\n create(settings: ProviderSettings, host: ProviderHost): Promise<P>;\n}\n\n/** A provider can be offered here: it runs on this platform and on a network of this mode. */\nexport const offeredIn = (descriptor: { platforms: readonly ProviderPlatform[]; networks: readonly ProviderNetwork[] }, platform: ProviderPlatform, mode: WalletMode) =>\n descriptor.platforms.includes(platform) && descriptor.networks.some((network) => networkMode(network) === mode);\n\nconst FIELD_KINDS = [\"text\", \"url\", \"secret\", \"select\", \"textarea\"];\n/** What is stored with the profile and sent on the wire in journals: stable, short, lowercase. */\nexport const PROVIDER_ID = /^[a-z][a-z0-9-]{0,31}$/;\n\n/**\n * Problems with a provider descriptor, empty when it is well-formed. The registry refuses a descriptor\n * with any; the contract suite checks the same list, so an author sees them before the app does.\n */\nexport function providerDescriptorProblems(d: ProviderDescriptor<unknown>): string[] {\n const problems: string[] = [];\n if (!PROVIDER_ID.test(d.id ?? \"\")) problems.push(\"id must match ^[a-z][a-z0-9-]{0,31}$\");\n if (!d.label?.trim()) problems.push(\"label is empty\");\n if (d.kind !== \"lightning\" && d.kind !== \"onchain\") problems.push(\"kind must be lightning or onchain\");\n if (!d.description?.trim()) problems.push(\"description is empty: say what it is and who holds the money\");\n if (!Array.isArray(d.networks) || !d.networks.length) problems.push(\"no networks\");\n else for (const n of d.networks) if (!PROVIDER_NETWORKS.includes(n)) problems.push(`unknown network ${String(n)}`);\n if (!Array.isArray(d.platforms) || !d.platforms.length) problems.push(\"no platforms\");\n else for (const p of d.platforms) if (!PROVIDER_PLATFORMS.includes(p)) problems.push(`unknown platform ${String(p)}`);\n if (!Array.isArray(d.fields)) problems.push(\"fields must be a list (empty when there is nothing to configure)\");\n else {\n const names = d.fields.map((f) => f.name);\n if (new Set(names).size !== names.length) problems.push(\"field names are not unique\");\n for (const f of d.fields) {\n if (!/^[a-zA-Z][a-zA-Z0-9_-]{0,63}$/.test(f.name ?? \"\")) problems.push(`field ${String(f.name)} has an invalid name`);\n if (!f.label?.trim()) problems.push(`field ${f.name} has no label`);\n if (!FIELD_KINDS.includes(f.kind)) problems.push(`field ${f.name} has an unknown kind`);\n if (f.kind === \"select\" && !f.options?.length) problems.push(`field ${f.name} is a select without options`);\n if (f.suggestions !== undefined && (!Array.isArray(f.suggestions) || f.suggestions.some((o: { value?: unknown; label?: unknown } | undefined) => typeof o?.value !== \"string\" || typeof o?.label !== \"string\"))) problems.push(`field ${f.name} has malformed suggestions`);\n if (f.changeable && (f.kind === \"secret\" || f.kind === \"select\")) problems.push(`field ${f.name} cannot be changeable: only a server address can`);\n }\n }\n if (typeof d.create !== \"function\") problems.push(\"create is not a function\");\n if (d.validate !== undefined && typeof d.validate !== \"function\") problems.push(\"validate is not a function\");\n if (d.wallet !== undefined && typeof d.wallet !== \"function\") problems.push(\"wallet is not a function\");\n return problems;\n}\n\n/** The serializable part of a descriptor, for the UI (a function cannot cross the extension's port). */\nexport type ProviderDescriptorView = Omit<ProviderDescriptor<unknown>, \"create\" | \"validate\" | \"wallet\">;\n/** Only these fields reach the UI, whatever else a provider module keeps on its descriptor. */\nexport const describeProvider = ({ id, label, kind, description, networks, platforms, fields, custodial, experimental }: ProviderDescriptor<unknown>): ProviderDescriptorView =>\n ({ id, label, kind, description, networks, platforms, fields, custodial, experimental });\n\n/**\n * The provider proved that nothing left the wallet (refused before sending, no route found before any\n * HTLC, a transaction that was never broadcast). Safe to try again, with this or another source.\n *\n * Any other error from a spend means the outcome is UNKNOWN: the payment may be in flight or done. It is\n * recorded as such and only reconciled (asked about), never retried. When in doubt, do not throw this.\n */\nexport class NothingSpentError extends Error {\n constructor(message: string) { super(message); this.name = \"NothingSpentError\"; }\n}\n\n/**\n * The source could not be reached: no answer, a time-out, a refused connection, a server error. The\n * engine keeps trying by itself (with backoff) and shows the source as connecting meanwhile.\n */\nexport class SourceUnreachableError extends Error {\n constructor(message: string, cause?: unknown) { super(message); this.name = \"SourceUnreachableError\"; if (cause !== undefined) Object.assign(this, { cause }); }\n}\n\n/**\n * A setting of the source is wrong (a server on another network, a phrase that makes no wallet): trying\n * again changes nothing until the setting does. The engine shows it as unavailable at once.\n */\nexport class SourceConfigError extends Error {\n constructor(message: string, cause?: unknown) { super(message); this.name = \"SourceConfigError\"; if (cause !== undefined) Object.assign(this, { cause }); }\n}\n\n/** What went wrong connecting a source, by name (a plugin bundles its own copies of these classes). */\nexport type SourceProblem = \"unreachable\" | \"config\" | \"other\";\nexport const sourceProblem = (error: unknown): SourceProblem =>\n error instanceof Error && error.name === \"SourceUnreachableError\" ? \"unreachable\" : error instanceof Error && error.name === \"SourceConfigError\" ? \"config\" : \"other\";\n\n/**\n * Whether an error says nothing was spent. By name, not by class: a provider built outside the app (an\n * SDK plugin bundled with its own copy of `NothingSpentError`) must be understood the same way.\n */\nexport const isNothingSpentError = (error: unknown): error is NothingSpentError =>\n error instanceof NothingSpentError || (error instanceof Error && error.name === \"NothingSpentError\");\n\n/**\n * An error message fit to show and store: every secret the source was given is blanked out, in case a\n * library echoed a URI or a key back.\n */\nexport function redact(error: unknown, secrets: Record<string, string> = {}): string {\n let message = error instanceof Error ? error.message : String(error);\n for (const value of Object.values(secrets)) if (value && value.length >= 4) message = message.split(value).join(\"•••\");\n return message.slice(0, 300);\n}\n"],"mappings":";AAUA,IAAa,qBAAkD;CAAC;CAAO;CAAa;AAAS;AAI7F,IAAa,oBAAgD;CAAC;CAAW;CAAU;CAAW;CAAW;AAAW;AACpH,IAAa,eAAe,YAA0C,YAAY,YAAY,YAAY;;AA8F1G,IAAa,aAAa,YAA8F,UAA4B,SAClJ,WAAW,UAAU,SAAS,QAAQ,KAAK,WAAW,SAAS,MAAM,YAAY,YAAY,OAAO,MAAM,IAAI;AAEhH,IAAM,cAAc;CAAC;CAAQ;CAAO;CAAU;CAAU;AAAU;;AAElE,IAAa,cAAc;;;;;AAM3B,SAAgB,2BAA2B,GAA0C;CACnF,MAAM,WAAqB,CAAC;CAC5B,IAAI,CAAC,YAAY,KAAK,EAAE,MAAM,EAAE,GAAG,SAAS,KAAK,sCAAsC;CACvF,IAAI,CAAC,EAAE,OAAO,KAAK,GAAG,SAAS,KAAK,gBAAgB;CACpD,IAAI,EAAE,SAAS,eAAe,EAAE,SAAS,WAAW,SAAS,KAAK,mCAAmC;CACrG,IAAI,CAAC,EAAE,aAAa,KAAK,GAAG,SAAS,KAAK,8DAA8D;CACxG,IAAI,CAAC,MAAM,QAAQ,EAAE,QAAQ,KAAK,CAAC,EAAE,SAAS,QAAQ,SAAS,KAAK,aAAa;MAC5E,KAAK,MAAM,KAAK,EAAE,UAAU,IAAI,CAAC,kBAAkB,SAAS,CAAC,GAAG,SAAS,KAAK,mBAAmB,OAAO,CAAC,GAAG;CACjH,IAAI,CAAC,MAAM,QAAQ,EAAE,SAAS,KAAK,CAAC,EAAE,UAAU,QAAQ,SAAS,KAAK,cAAc;MAC/E,KAAK,MAAM,KAAK,EAAE,WAAW,IAAI,CAAC,mBAAmB,SAAS,CAAC,GAAG,SAAS,KAAK,oBAAoB,OAAO,CAAC,GAAG;CACpH,IAAI,CAAC,MAAM,QAAQ,EAAE,MAAM,GAAG,SAAS,KAAK,kEAAkE;MACzG;EACH,MAAM,QAAQ,EAAE,OAAO,KAAK,MAAM,EAAE,IAAI;EACxC,IAAI,IAAI,IAAI,KAAK,CAAC,CAAC,SAAS,MAAM,QAAQ,SAAS,KAAK,4BAA4B;EACpF,KAAK,MAAM,KAAK,EAAE,QAAQ;GACxB,IAAI,CAAC,gCAAgC,KAAK,EAAE,QAAQ,EAAE,GAAG,SAAS,KAAK,SAAS,OAAO,EAAE,IAAI,EAAE,qBAAqB;GACpH,IAAI,CAAC,EAAE,OAAO,KAAK,GAAG,SAAS,KAAK,SAAS,EAAE,KAAK,cAAc;GAClE,IAAI,CAAC,YAAY,SAAS,EAAE,IAAI,GAAG,SAAS,KAAK,SAAS,EAAE,KAAK,qBAAqB;GACtF,IAAI,EAAE,SAAS,YAAY,CAAC,EAAE,SAAS,QAAQ,SAAS,KAAK,SAAS,EAAE,KAAK,6BAA6B;GAC1G,IAAI,EAAE,gBAAgB,KAAA,MAAc,CAAC,MAAM,QAAQ,EAAE,WAAW,KAAK,EAAE,YAAY,MAAM,MAAwD,OAAO,GAAG,UAAU,YAAY,OAAO,GAAG,UAAU,QAAQ,IAAI,SAAS,KAAK,SAAS,EAAE,KAAK,2BAA2B;GAC1Q,IAAI,EAAE,eAAe,EAAE,SAAS,YAAY,EAAE,SAAS,WAAW,SAAS,KAAK,SAAS,EAAE,KAAK,iDAAiD;EACnJ;CACF;CACA,IAAI,OAAO,EAAE,WAAW,YAAY,SAAS,KAAK,0BAA0B;CAC5E,IAAI,EAAE,aAAa,KAAA,KAAa,OAAO,EAAE,aAAa,YAAY,SAAS,KAAK,4BAA4B;CAC5G,IAAI,EAAE,WAAW,KAAA,KAAa,OAAO,EAAE,WAAW,YAAY,SAAS,KAAK,0BAA0B;CACtG,OAAO;AACT;;AAKA,IAAa,oBAAoB,EAAE,IAAI,OAAO,MAAM,aAAa,UAAU,WAAW,QAAQ,WAAW,oBACtG;CAAE;CAAI;CAAO;CAAM;CAAa;CAAU;CAAW;CAAQ;CAAW;AAAa;;;;;;;;AASxF,IAAa,oBAAb,cAAuC,MAAM;CAC3C,YAAY,SAAiB;EAAE,MAAM,OAAO;EAAG,KAAK,OAAO;CAAqB;AAClF;;;;;AA2BA,IAAa,uBAAuB,UAClC,iBAAiB,qBAAsB,iBAAiB,SAAS,MAAM,SAAS;;;;;AAMlF,SAAgB,OAAO,OAAgB,UAAkC,CAAC,GAAW;CACnF,IAAI,UAAU,iBAAiB,QAAQ,MAAM,UAAU,OAAO,KAAK;CACnE,KAAK,MAAM,SAAS,OAAO,OAAO,OAAO,GAAG,IAAI,SAAS,MAAM,UAAU,GAAG,UAAU,QAAQ,MAAM,KAAK,CAAC,CAAC,KAAK,KAAK;CACrH,OAAO,QAAQ,MAAM,GAAG,GAAG;AAC7B"}
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { gd as IdentityCheckUnavailable, yd as boundVerifiedIdentity } from "./src-DA7T3Gvo.js";
|
|
2
2
|
//#region ../browser/src/proofs/verify.ts
|
|
3
3
|
var DAY = 86400;
|
|
4
4
|
/**
|
|
@@ -104,4 +104,4 @@ function boundedIdentityFetch(options = { online: () => true }) {
|
|
|
104
104
|
//#endregion
|
|
105
105
|
export { verifyIdentity as i, boundedIdentityFetch as n, descriptorProblems as r, availableSigners as t };
|
|
106
106
|
|
|
107
|
-
//# sourceMappingURL=verify-
|
|
107
|
+
//# sourceMappingURL=verify-DsXR5sRX.js.map
|