@ghostlytools/cli 1.7.2 → 1.7.4
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/README.md +37 -24
- package/SKILL.md +10 -4
- package/dist/assets/{api-CcuCtc1H.js → api-Chhvpwok.js} +2 -2
- package/dist/assets/{api-tSZELCPQ.js → api-D3i2hwy0.js} +340 -155
- package/dist/assets/api-D3i2hwy0.js.map +1 -0
- package/dist/assets/{apiKit-BFk7GAk9.js → apiKit-BtsHrnoo.js} +60 -8
- package/dist/assets/apiKit-BtsHrnoo.js.map +1 -0
- package/dist/assets/{apps-D6THreq_.js → apps-BFJTqvAt.js} +1 -1
- package/dist/assets/{apps-C5Mi6x9Q.js → apps-BHl97rHs.js} +11 -9
- package/dist/assets/apps-BHl97rHs.js.map +1 -0
- package/dist/assets/{arkade-Cz0B9bJ0.js → arkade-BFE8KkEE.js} +2 -2
- package/dist/assets/{arkade-Cz0B9bJ0.js.map → arkade-BFE8KkEE.js.map} +1 -1
- package/dist/assets/{backup-A0hIa9GE.js → backup-Bbsr6nDi.js} +1 -1
- package/dist/assets/{backup-Wb2sm2dd.js → backup-CxACdtQX.js} +7 -7
- package/dist/assets/{backup-Wb2sm2dd.js.map → backup-CxACdtQX.js.map} +1 -1
- package/dist/assets/{blobFiles-Bckz9fjp.js → blobFiles-DOQDRdDI.js} +3 -3
- package/dist/assets/{blobFiles-Bckz9fjp.js.map → blobFiles-DOQDRdDI.js.map} +1 -1
- package/dist/assets/{buttons-Cf70NVYq.js → buttons-CieBtXEO.js} +35 -9
- package/dist/assets/buttons-CieBtXEO.js.map +1 -0
- package/dist/assets/buttons-YtAj3R_E.js +2 -0
- package/dist/assets/{daemonProof-Bp9lJDxf.js → daemonProof-QmtwDj-N.js} +2 -2
- package/dist/assets/{daemonProof-Bp9lJDxf.js.map → daemonProof-QmtwDj-N.js.map} +1 -1
- package/dist/assets/{envelope-kQ5kYjVE.js → envelope-DYiGwzq_.js} +2 -2
- package/dist/assets/{envelope-kQ5kYjVE.js.map → envelope-DYiGwzq_.js.map} +1 -1
- package/dist/assets/{errors-mnjSQlbX.js → errors-QUGP-jIF.js} +2 -2
- package/dist/assets/errors-QUGP-jIF.js.map +1 -0
- package/dist/assets/{fileBytes-OolN5cSY.js → fileBytes-BPDKufla.js} +1 -1
- package/dist/assets/{fileBytes-BD0v3rRG.js → fileBytes-DNgrRL0R.js} +3 -3
- package/dist/assets/{fileBytes-BD0v3rRG.js.map → fileBytes-DNgrRL0R.js.map} +1 -1
- package/dist/assets/{fileBytes-_fd-2JRY.js → fileBytes-Q3ehcEr8.js} +2 -2
- package/dist/assets/{fileBytes-_fd-2JRY.js.map → fileBytes-Q3ehcEr8.js.map} +1 -1
- package/dist/assets/fileBytesIdb-DZcESfTt.js +2 -0
- package/dist/assets/{fileBytesIdb-NtA8r9EM.js → fileBytesIdb-Dm1EyEbT.js} +3 -3
- package/dist/assets/{fileBytesIdb-NtA8r9EM.js.map → fileBytesIdb-Dm1EyEbT.js.map} +1 -1
- package/dist/assets/{fileBytesOpfs-B8fJwkwM.js → fileBytesOpfs-ZGD21c4Q.js} +3 -3
- package/dist/assets/{fileBytesOpfs-B8fJwkwM.js.map → fileBytesOpfs-ZGD21c4Q.js.map} +1 -1
- package/dist/assets/{groupFiles-D9Ttlm3M.js → groupFiles-CBJIEvCE.js} +572 -6
- package/dist/assets/groupFiles-CBJIEvCE.js.map +1 -0
- package/dist/assets/{host-DpypH-fR.js → host-Va-r_KJz.js} +84 -23
- package/dist/assets/host-Va-r_KJz.js.map +1 -0
- package/dist/assets/{hyperdhtRelay-D1rj84v2.js → hyperdhtRelay-B2uK9tJv.js} +2 -2
- package/dist/assets/{hyperdhtRelay-D1rj84v2.js.map → hyperdhtRelay-B2uK9tJv.js.map} +1 -1
- package/dist/assets/{idb-BlH8-O3R.js → idb-BkOJES5_.js} +5 -3
- package/dist/assets/idb-BkOJES5_.js.map +1 -0
- package/dist/assets/{irohWeb-BTSlWgEX.js → irohWeb-DxeEgQ-W.js} +2 -2
- package/dist/assets/{irohWeb-BTSlWgEX.js.map → irohWeb-DxeEgQ-W.js.map} +1 -1
- package/dist/assets/{main-BwgoQZVu.js → main-BX4oPWCJ.js} +589 -192
- package/dist/assets/main-BX4oPWCJ.js.map +1 -0
- package/dist/assets/{mainline-B1urhbEZ.js → mainline-IfWQOB-J.js} +39 -12
- package/dist/assets/mainline-IfWQOB-J.js.map +1 -0
- package/dist/assets/{networkReason-D2Z0BdIj.js → networkReason-N2vAaoth.js} +3 -3
- package/dist/assets/{networkReason-D2Z0BdIj.js.map → networkReason-N2vAaoth.js.map} +1 -1
- package/dist/assets/{nwc-T2aUK6bi.js → nwc-CzyCtNK2.js} +3 -3
- package/dist/assets/{nwc-T2aUK6bi.js.map → nwc-CzyCtNK2.js.map} +1 -1
- package/dist/assets/{nwcProvider-Dz-ty_DE.js → nwcProvider-DjWmEn3j.js} +2 -2
- package/dist/assets/{nwcProvider-Dz-ty_DE.js.map → nwcProvider-DjWmEn3j.js.map} +1 -1
- package/dist/assets/{profiles-C6XWqre5.js → profiles-DcCeOi7J.js} +104 -10
- package/dist/assets/profiles-DcCeOi7J.js.map +1 -0
- package/dist/assets/{registry-BlSTJlbv.js → registry-BmS02J5h.js} +1 -1
- package/dist/assets/{registry-Bazitl0a.js → registry-CeW8XEQc.js} +45 -14
- package/dist/assets/registry-CeW8XEQc.js.map +1 -0
- package/dist/assets/{resolve-Bx1Eeg-w.js → resolve-BvHkAhDH.js} +66 -29
- package/dist/assets/resolve-BvHkAhDH.js.map +1 -0
- package/dist/assets/{restoredRows-Fv-MuY45.js → restoredRows-mTTp3XNs.js} +2 -2
- package/dist/assets/{restoredRows-Fv-MuY45.js.map → restoredRows-mTTp3XNs.js.map} +1 -1
- package/dist/assets/{server-CnPj9wWh.js → server-BUcJo4vz.js} +1033 -821
- package/dist/assets/server-BUcJo4vz.js.map +1 -0
- package/dist/assets/{src-BsznF3XG.js → src-BB5-5P3s.js} +645 -196
- package/dist/assets/src-BB5-5P3s.js.map +1 -0
- package/dist/assets/{translate-cDBotA-b.js → translate-2WyaRVCr.js} +11 -9
- package/dist/assets/translate-2WyaRVCr.js.map +1 -0
- package/dist/assets/{usdt-DxxLdG60.js → usdt-BLazHiaP.js} +3 -3
- package/dist/assets/{usdt-DxxLdG60.js.map → usdt-BLazHiaP.js.map} +1 -1
- package/dist/assets/{words-qH8gGtmc.js → words-BaumxjXe.js} +5 -3
- package/dist/assets/words-BaumxjXe.js.map +1 -0
- package/dist/ghostly.mjs +1 -1
- package/package.json +1 -1
- package/dist/assets/api-tSZELCPQ.js.map +0 -1
- package/dist/assets/apiKit-BFk7GAk9.js.map +0 -1
- package/dist/assets/apps-C5Mi6x9Q.js.map +0 -1
- package/dist/assets/buttons-Bxxu3lSk.js +0 -2
- package/dist/assets/buttons-Cf70NVYq.js.map +0 -1
- package/dist/assets/errors-mnjSQlbX.js.map +0 -1
- package/dist/assets/fileBytesIdb-CsSQcSxD.js +0 -2
- package/dist/assets/groupFiles-D9Ttlm3M.js.map +0 -1
- package/dist/assets/host-DpypH-fR.js.map +0 -1
- package/dist/assets/idb-BlH8-O3R.js.map +0 -1
- package/dist/assets/main-BwgoQZVu.js.map +0 -1
- package/dist/assets/mainline-B1urhbEZ.js.map +0 -1
- package/dist/assets/profiles-C6XWqre5.js.map +0 -1
- package/dist/assets/registry-Bazitl0a.js.map +0 -1
- package/dist/assets/resolve-Bx1Eeg-w.js.map +0 -1
- package/dist/assets/server-CnPj9wWh.js.map +0 -1
- package/dist/assets/src-BsznF3XG.js.map +0 -1
- package/dist/assets/translate-cDBotA-b.js.map +0 -1
- package/dist/assets/words-qH8gGtmc.js.map +0 -1
|
@@ -1,9 +1,11 @@
|
|
|
1
|
-
import { $n as
|
|
1
|
+
import { $n as readGroupHave, Cu as randomBytes, Dn as decodeBolt11, En as resolveLightningDestination, Ga as replySnippet, Gi as identityStatement, Gn as GROUP_FILE_LIMITS, Hn as engineError, Ji as revokesIdentity, Jn as GROUP_WANT_NO_FRAME, Ki as newIdentityBinding, Kn as GROUP_HAVE_FRAME, Mr as transferEnded, Ta as RateWindow, Tn as requestLnurlInvoice, Ui as emptyIdentityLedger, Un as engineText, Vi as IdentityExchange, Wi as identityRevocationValue, Xn as groupFileFallback, Yn as fetchesByItself, Zn as isGroupMessageId, er as readGroupWant, ga as fileMessageText, jr as FileUplink, kr as ChatFiles, ln as walletNetworkOf, qi as receivedIdentityStatus, rn as WALLET_NETWORKS, tr as readGroupWantNo, wu as toBase64Url, xu as fromBase64Url, zi as IDENTITY_REVOCATION_LABEL } from "./src-BB5-5P3s.js";
|
|
2
2
|
import { a as describeProvider, c as offeredIn, d as sourceProblem, n as PROVIDER_PLATFORMS, o as isNothingSpentError, s as networkMode, t as NothingSpentError, u as redact } from "./types-C4_KafL_.js";
|
|
3
|
-
import { g as wrap, h as transact, i as STORES, m as store, s as databaseName, u as fileStore } from "./idb-
|
|
4
|
-
import { a as sealSeed, i as newDeviceKey, o as unsealSeed, t as networkReason } from "./networkReason-
|
|
3
|
+
import { g as wrap, h as transact, i as STORES, m as store, s as databaseName, u as fileStore } from "./idb-BkOJES5_.js";
|
|
4
|
+
import { a as sealSeed, i as newDeviceKey, o as unsealSeed, t as networkReason } from "./networkReason-N2vAaoth.js";
|
|
5
5
|
import { t as BITCOIN_INVOICE_ON_TESTNET, u as mintNetwork } from "./mints-BrlY773j.js";
|
|
6
|
-
import {
|
|
6
|
+
import { v as boundedIdentityFetch, y as verifyIdentity } from "./resolve-BvHkAhDH.js";
|
|
7
|
+
import { i as fromBase64Url$1 } from "./envelope-DYiGwzq_.js";
|
|
8
|
+
import { f as FILE_BYTES_STEP, o as fileBytes, s as fileBytesOf } from "./fileBytes-DNgrRL0R.js";
|
|
7
9
|
import { sha256 } from "@noble/hashes/sha2.js";
|
|
8
10
|
import { validateMnemonic } from "@scure/bip39";
|
|
9
11
|
import { wordlist } from "@scure/bip39/wordlists/english.js";
|
|
@@ -1861,6 +1863,570 @@ var LightningCards = class {
|
|
|
1861
1863
|
}
|
|
1862
1864
|
};
|
|
1863
1865
|
//#endregion
|
|
1866
|
+
//#region ../browser/src/shared/profileKey.ts
|
|
1867
|
+
/**
|
|
1868
|
+
* Only the record key can hold a newline: the other parts come from the code, so the joined binding still reads one
|
|
1869
|
+
* way (the first two lines, the last line, and the key between them).
|
|
1870
|
+
*/
|
|
1871
|
+
function binding(b) {
|
|
1872
|
+
for (const part of [
|
|
1873
|
+
b.db,
|
|
1874
|
+
b.store,
|
|
1875
|
+
b.field
|
|
1876
|
+
]) if (!part || part.includes("\n")) throw new Error("Invalid sealed field binding");
|
|
1877
|
+
return new TextEncoder().encode([
|
|
1878
|
+
"ghostly-field/2",
|
|
1879
|
+
b.db,
|
|
1880
|
+
b.store,
|
|
1881
|
+
b.key,
|
|
1882
|
+
b.field
|
|
1883
|
+
].join("\n"));
|
|
1884
|
+
}
|
|
1885
|
+
function isSealedField(value) {
|
|
1886
|
+
const v = value;
|
|
1887
|
+
return !!v && typeof v === "object" && v.v === 2 && typeof v.iv === "string" && typeof v.ct === "string";
|
|
1888
|
+
}
|
|
1889
|
+
/** Seals one field under DK with a fresh random 96-bit nonce and no KDF per field. */
|
|
1890
|
+
async function sealField(key, where, value) {
|
|
1891
|
+
const iv = crypto.getRandomValues(/* @__PURE__ */ new Uint8Array(12));
|
|
1892
|
+
const ct = new Uint8Array(await crypto.subtle.encrypt({
|
|
1893
|
+
name: "AES-GCM",
|
|
1894
|
+
iv,
|
|
1895
|
+
additionalData: binding(where)
|
|
1896
|
+
}, key, new TextEncoder().encode(value)));
|
|
1897
|
+
return {
|
|
1898
|
+
v: 2,
|
|
1899
|
+
iv: toBase64Url(iv),
|
|
1900
|
+
ct: toBase64Url(ct)
|
|
1901
|
+
};
|
|
1902
|
+
}
|
|
1903
|
+
/** Opens a field sealed for exactly this place under this DK; anything else fails instead of opening wrong. */
|
|
1904
|
+
async function openField(key, where, sealed) {
|
|
1905
|
+
if (!isSealedField(sealed)) throw new Error("Unsupported sealed field version");
|
|
1906
|
+
const aad = binding(where);
|
|
1907
|
+
try {
|
|
1908
|
+
const iv = fromBase64Url$1(sealed.iv);
|
|
1909
|
+
if (iv.length !== 12) throw new Error("nonce");
|
|
1910
|
+
return new TextDecoder().decode(await crypto.subtle.decrypt({
|
|
1911
|
+
name: "AES-GCM",
|
|
1912
|
+
iv,
|
|
1913
|
+
additionalData: aad
|
|
1914
|
+
}, key, fromBase64Url$1(sealed.ct)));
|
|
1915
|
+
} catch {
|
|
1916
|
+
throw new Error("A sealed field could not be opened: it was changed, or it belongs to another record");
|
|
1917
|
+
}
|
|
1918
|
+
}
|
|
1919
|
+
//#endregion
|
|
1920
|
+
//#region ../browser/src/engine/dataKey.ts
|
|
1921
|
+
var PEER_DB = "ghostly";
|
|
1922
|
+
/**
|
|
1923
|
+
* The profile's data key (DK), when the profile is encrypted and unlocked: the one slot the engine owns. A
|
|
1924
|
+
* non-extractable key; nothing writes it anywhere. Empty, every secret is sealed as today (version 1).
|
|
1925
|
+
*/
|
|
1926
|
+
var slot = null;
|
|
1927
|
+
var onDrop = /* @__PURE__ */ new Set();
|
|
1928
|
+
/** A cache of opened secrets empties itself when the key goes. Returns the way to stop listening. */
|
|
1929
|
+
function whenDataKeyDropped(drop) {
|
|
1930
|
+
onDrop.add(drop);
|
|
1931
|
+
return () => {
|
|
1932
|
+
onDrop.delete(drop);
|
|
1933
|
+
};
|
|
1934
|
+
}
|
|
1935
|
+
async function sealSecret(value, at) {
|
|
1936
|
+
if (slot) return sealField(slot, {
|
|
1937
|
+
db: PEER_DB,
|
|
1938
|
+
...at
|
|
1939
|
+
}, value);
|
|
1940
|
+
const deviceKey = newDeviceKey();
|
|
1941
|
+
return {
|
|
1942
|
+
sealed: await sealSeed(value, deviceKey),
|
|
1943
|
+
deviceKey
|
|
1944
|
+
};
|
|
1945
|
+
}
|
|
1946
|
+
/** Reads both versions: a profile being encrypted holds some of each until its migration ends. */
|
|
1947
|
+
async function openSecret(secret, at) {
|
|
1948
|
+
if (!isSealedField(secret)) return unsealSeed(secret.sealed, secret.deviceKey);
|
|
1949
|
+
if (!slot) throw new Error("This profile is locked. Enter its passphrase first.");
|
|
1950
|
+
return openField(slot, {
|
|
1951
|
+
db: PEER_DB,
|
|
1952
|
+
...at
|
|
1953
|
+
}, secret);
|
|
1954
|
+
}
|
|
1955
|
+
//#endregion
|
|
1956
|
+
//#region ../browser/src/proofs/load.ts
|
|
1957
|
+
/**
|
|
1958
|
+
* The identity proof providers, loaded on first need and not with the app: they and their libraries (OpenPGP, the
|
|
1959
|
+
* Bitcoin signer, the DID, AT Protocol and OpenID Connect checks) are a large part of the code, and the first screen
|
|
1960
|
+
* draws none of it. The engine loads them with the profile's proofs; the UI once it draws something about identities.
|
|
1961
|
+
*/
|
|
1962
|
+
var registry;
|
|
1963
|
+
var loading;
|
|
1964
|
+
var listeners = /* @__PURE__ */ new Set();
|
|
1965
|
+
function loadIdentityProviders() {
|
|
1966
|
+
return loading ??= import("./registry-BmS02J5h.js").then((m) => {
|
|
1967
|
+
registry = m;
|
|
1968
|
+
for (const listener of listeners) listener();
|
|
1969
|
+
return m;
|
|
1970
|
+
}, (error) => {
|
|
1971
|
+
loading = void 0;
|
|
1972
|
+
throw error;
|
|
1973
|
+
});
|
|
1974
|
+
}
|
|
1975
|
+
/** The providers (built in, from plugins, the test ones when asked for), once loaded; none before. */
|
|
1976
|
+
var loadedIdentityProviders = () => registry?.identityProviders() ?? [];
|
|
1977
|
+
//#endregion
|
|
1978
|
+
//#region ../browser/src/engine/identities.ts
|
|
1979
|
+
/** Where a proof key's seed belongs: by proof id, so it still opens once the proof moved to the revocations. */
|
|
1980
|
+
var proofKeyAt = (id) => ({
|
|
1981
|
+
store: STORES.settings,
|
|
1982
|
+
key: id,
|
|
1983
|
+
field: "identityProof.seed"
|
|
1984
|
+
});
|
|
1985
|
+
var KEY = "identityProofs";
|
|
1986
|
+
var REVOCATIONS = "identityRevocations";
|
|
1987
|
+
/** When the contacts' proofs were last looked up for a revocation (ms), so a reload does not look them all up again. */
|
|
1988
|
+
var REVOCATIONS_CHECKED_AT = "identityRevocationsCheckedAt";
|
|
1989
|
+
/** Relays and the DHT forget a record within hours: republish revocations this often while the app runs. */
|
|
1990
|
+
var REPUBLISH_MS = 36e5;
|
|
1991
|
+
/** How often the contacts' proofs are looked up for a revocation (and once shortly after start). */
|
|
1992
|
+
var REVOCATION_CHECK_MS = 432e5;
|
|
1993
|
+
/**
|
|
1994
|
+
* After a contact withdraws a proof, how long to wait before each lookup for its revocation (WISP 300: removing a proof withdraws it from
|
|
1995
|
+
* every chat and revokes it). The notice goes out before the revocation is published, so not at once; each try backs
|
|
1996
|
+
* off, and the first that finds it stops the rest. The 12 h check covers it after that.
|
|
1997
|
+
*/
|
|
1998
|
+
var WITHDRAWN_REVOCATION_TRIES_MS = [
|
|
1999
|
+
2e4,
|
|
2000
|
+
6e4,
|
|
2001
|
+
18e4
|
|
2002
|
+
];
|
|
2003
|
+
/** A proof begun and not completed is dropped this long after, or when a fifth one begins (the CLI says the same). */
|
|
2004
|
+
var IDENTITY_DRAFT_TTL_MS = 18e5;
|
|
2005
|
+
var MAX_PROOFS = 32;
|
|
2006
|
+
var now = () => Math.floor(Date.now() / 1e3);
|
|
2007
|
+
/**
|
|
2008
|
+
* Identity proofs, engine side: the profile's own proofs (made once, on the Identities page) and, per
|
|
2009
|
+
* chat, the `IdentityExchange` that shares them with that contact and checks what the contact shares.
|
|
2010
|
+
* Providers come from the registry; their `verify` runs here, through the shared checks.
|
|
2011
|
+
*/
|
|
2012
|
+
var IdentityProofs = class {
|
|
2013
|
+
host;
|
|
2014
|
+
providers;
|
|
2015
|
+
proofs = [];
|
|
2016
|
+
revocations = [];
|
|
2017
|
+
revocationsCheckedAt = 0;
|
|
2018
|
+
/** Unsealed proof-key seeds, by proof id, for this run only. */
|
|
2019
|
+
seeds = /* @__PURE__ */ new Map();
|
|
2020
|
+
timers = [];
|
|
2021
|
+
unlisten;
|
|
2022
|
+
drafts = /* @__PURE__ */ new Map();
|
|
2023
|
+
exchanges = /* @__PURE__ */ new Map();
|
|
2024
|
+
saving = Promise.resolve();
|
|
2025
|
+
errors = /* @__PURE__ */ new Map();
|
|
2026
|
+
/** Chats whose current connection already got the hello: "ready" is reported more than once per connection. */
|
|
2027
|
+
greeted = /* @__PURE__ */ new Set();
|
|
2028
|
+
fetch;
|
|
2029
|
+
constructor(host, providers = loadedIdentityProviders) {
|
|
2030
|
+
this.host = host;
|
|
2031
|
+
this.providers = providers;
|
|
2032
|
+
this.fetch = boundedIdentityFetch({ online: host.online });
|
|
2033
|
+
}
|
|
2034
|
+
/** The profile's proofs, and the providers that check and show them: loaded here, not with the app. */
|
|
2035
|
+
async load() {
|
|
2036
|
+
const providers = loadIdentityProviders();
|
|
2037
|
+
const settings = await store(STORES.settings, "readonly");
|
|
2038
|
+
[this.proofs, this.revocations, this.revocationsCheckedAt] = await Promise.all([
|
|
2039
|
+
wrap(settings.get(KEY)).then((v) => v ?? []),
|
|
2040
|
+
wrap(settings.get(REVOCATIONS)).then((v) => v ?? []),
|
|
2041
|
+
wrap(settings.get(REVOCATIONS_CHECKED_AT)).then((v) => typeof v === "number" ? v : 0)
|
|
2042
|
+
]);
|
|
2043
|
+
await providers;
|
|
2044
|
+
}
|
|
2045
|
+
/** Background work: republish revocations, look up the contacts' proofs for revocations. */
|
|
2046
|
+
start() {
|
|
2047
|
+
const every = (ms, first, work) => {
|
|
2048
|
+
const tick = () => {
|
|
2049
|
+
work().catch(() => {}).finally(() => {
|
|
2050
|
+
this.timers.push(setTimeout(tick, ms));
|
|
2051
|
+
});
|
|
2052
|
+
};
|
|
2053
|
+
this.timers.push(setTimeout(tick, first));
|
|
2054
|
+
};
|
|
2055
|
+
every(REPUBLISH_MS, 5e3, () => this.republish());
|
|
2056
|
+
const due = Math.min(REVOCATION_CHECK_MS, this.revocationsCheckedAt + REVOCATION_CHECK_MS - Date.now());
|
|
2057
|
+
every(REVOCATION_CHECK_MS, Math.max(6e4, due), () => this.checkRevocations());
|
|
2058
|
+
this.unlisten ??= whenDataKeyDropped(() => this.forgetSeeds());
|
|
2059
|
+
}
|
|
2060
|
+
stop() {
|
|
2061
|
+
for (const t of this.timers) clearTimeout(t);
|
|
2062
|
+
this.timers = [];
|
|
2063
|
+
this.unlisten?.();
|
|
2064
|
+
this.unlisten = void 0;
|
|
2065
|
+
this.forgetSeeds();
|
|
2066
|
+
}
|
|
2067
|
+
forgetSeeds() {
|
|
2068
|
+
for (const seed of this.seeds.values()) seed.fill(0);
|
|
2069
|
+
this.seeds.clear();
|
|
2070
|
+
}
|
|
2071
|
+
/**
|
|
2072
|
+
* Every change of the proofs and revocations, one after the other, each made on what the one before stored: two at
|
|
2073
|
+
* once (two proofs completed, a proof removed while another completes) both from the same list lost one of them.
|
|
2074
|
+
*/
|
|
2075
|
+
save(change) {
|
|
2076
|
+
const run = this.saving.then(async () => {
|
|
2077
|
+
const [proofs, revocations] = change(this.proofs, this.revocations);
|
|
2078
|
+
await transact([STORES.settings], (stores) => {
|
|
2079
|
+
stores[STORES.settings].put(proofs, KEY);
|
|
2080
|
+
stores[STORES.settings].put(revocations, REVOCATIONS);
|
|
2081
|
+
});
|
|
2082
|
+
this.proofs = proofs;
|
|
2083
|
+
this.revocations = revocations;
|
|
2084
|
+
this.host.emit();
|
|
2085
|
+
});
|
|
2086
|
+
this.saving = run.catch(() => {});
|
|
2087
|
+
return run;
|
|
2088
|
+
}
|
|
2089
|
+
async seedOf(id, sealed) {
|
|
2090
|
+
let seed = this.seeds.get(id);
|
|
2091
|
+
if (!seed) {
|
|
2092
|
+
seed = fromBase64Url(await openSecret(sealed, proofKeyAt(id)));
|
|
2093
|
+
this.seeds.set(id, seed);
|
|
2094
|
+
}
|
|
2095
|
+
return seed;
|
|
2096
|
+
}
|
|
2097
|
+
ctx() {
|
|
2098
|
+
return {
|
|
2099
|
+
now: now(),
|
|
2100
|
+
signal: AbortSignal.timeout(3e4),
|
|
2101
|
+
fetch: this.fetch
|
|
2102
|
+
};
|
|
2103
|
+
}
|
|
2104
|
+
verify = (statement, evidence) => verifyIdentity(this.providers(), statement, evidence, this.ctx());
|
|
2105
|
+
revoked = async (statement) => {
|
|
2106
|
+
if (!this.host.online()) return false;
|
|
2107
|
+
const records = await this.host.resolve(statement.binding.key);
|
|
2108
|
+
return !!records && revokesIdentity(records, statement.id);
|
|
2109
|
+
};
|
|
2110
|
+
async local(id) {
|
|
2111
|
+
const p = this.proofs.find((x) => identityStatement(x.binding).id === id);
|
|
2112
|
+
return p && {
|
|
2113
|
+
statement: identityStatement(p.binding),
|
|
2114
|
+
evidence: p.evidence,
|
|
2115
|
+
seed: await this.seedOf(id, p.seed)
|
|
2116
|
+
};
|
|
2117
|
+
}
|
|
2118
|
+
/** Step 1 of adding a proof: a fresh proof key and the statement the external identity must sign. */
|
|
2119
|
+
begin({ provider, subject, validityDays }) {
|
|
2120
|
+
const p = this.providers().find((x) => x.id === provider);
|
|
2121
|
+
if (!p) throw new Error("Unknown kind of identity");
|
|
2122
|
+
const days = validityDays ?? p.validity.defaultDays;
|
|
2123
|
+
if (!Number.isInteger(days) || days < 1 || days > p.validity.maxDays) throw new Error(`Choose between 1 and ${p.validity.maxDays} days`);
|
|
2124
|
+
const canonical = p.subject.normalize(subject);
|
|
2125
|
+
for (const [id, d] of this.drafts) if (Date.now() - d.at > 18e5) {
|
|
2126
|
+
d.seed.fill(0);
|
|
2127
|
+
this.drafts.delete(id);
|
|
2128
|
+
}
|
|
2129
|
+
while (this.drafts.size >= 4) {
|
|
2130
|
+
const [id, d] = this.drafts.entries().next().value;
|
|
2131
|
+
d.seed.fill(0);
|
|
2132
|
+
this.drafts.delete(id);
|
|
2133
|
+
}
|
|
2134
|
+
const { binding, seed } = newIdentityBinding({
|
|
2135
|
+
provider,
|
|
2136
|
+
subject: canonical,
|
|
2137
|
+
validitySeconds: days * 86400
|
|
2138
|
+
});
|
|
2139
|
+
const draftId = toBase64Url(crypto.getRandomValues(/* @__PURE__ */ new Uint8Array(16)));
|
|
2140
|
+
this.drafts.set(draftId, {
|
|
2141
|
+
binding,
|
|
2142
|
+
seed,
|
|
2143
|
+
at: Date.now()
|
|
2144
|
+
});
|
|
2145
|
+
return {
|
|
2146
|
+
draftId,
|
|
2147
|
+
binding
|
|
2148
|
+
};
|
|
2149
|
+
}
|
|
2150
|
+
/** Step 2: the evidence. Verified here, exactly as a contact will, before anything is saved. */
|
|
2151
|
+
async complete({ draftId, evidence }) {
|
|
2152
|
+
const draft = this.drafts.get(draftId);
|
|
2153
|
+
if (!draft) throw new Error("This proof was started too long ago. Start again.");
|
|
2154
|
+
const statement = identityStatement(draft.binding);
|
|
2155
|
+
const verified = await this.verify(statement, JSON.parse(JSON.stringify(evidence ?? null)));
|
|
2156
|
+
if (this.proofs.length >= MAX_PROOFS) throw new Error("Remove an identity first");
|
|
2157
|
+
this.drafts.delete(draftId);
|
|
2158
|
+
const stored = {
|
|
2159
|
+
binding: draft.binding,
|
|
2160
|
+
evidence,
|
|
2161
|
+
seed: await sealSecret(toBase64Url(draft.seed), proofKeyAt(statement.id)),
|
|
2162
|
+
verified,
|
|
2163
|
+
createdAt: Date.now()
|
|
2164
|
+
};
|
|
2165
|
+
this.seeds.set(statement.id, draft.seed);
|
|
2166
|
+
await this.save((proofs, revocations) => {
|
|
2167
|
+
if (proofs.length >= MAX_PROOFS) throw new Error("Remove an identity first");
|
|
2168
|
+
return [[...proofs, stored], revocations];
|
|
2169
|
+
});
|
|
2170
|
+
return this.viewOf(stored);
|
|
2171
|
+
}
|
|
2172
|
+
cancel({ draftId }) {
|
|
2173
|
+
this.drafts.get(draftId)?.seed.fill(0);
|
|
2174
|
+
this.drafts.delete(draftId);
|
|
2175
|
+
}
|
|
2176
|
+
/**
|
|
2177
|
+
* Removes a proof from the profile: withdrawn from every chat it was shared in (each contact is told now
|
|
2178
|
+
* or when it next connects), and revoked for good, by a record its proof key publishes on Pkarr and this
|
|
2179
|
+
* app republishes until the proof would have expired, for contacts it never reconnects to.
|
|
2180
|
+
*/
|
|
2181
|
+
async remove({ id }) {
|
|
2182
|
+
const proof = this.proofs.find((p) => identityStatement(p.binding).id === id);
|
|
2183
|
+
if (!proof) return;
|
|
2184
|
+
for (const linkId of this.host.linkIds()) {
|
|
2185
|
+
const shared = this.host.ledger(linkId)?.shared.find((s) => s.id === id);
|
|
2186
|
+
if (shared && shared.status !== "withdrawn") await this.exchange(linkId)?.withdraw(id, !!this.host.channel(linkId));
|
|
2187
|
+
}
|
|
2188
|
+
const revocation = {
|
|
2189
|
+
id,
|
|
2190
|
+
key: proof.binding.key,
|
|
2191
|
+
seed: proof.seed,
|
|
2192
|
+
revokedAt: now(),
|
|
2193
|
+
expiresAt: Math.min(proof.binding.expiresAt, proof.verified.expiresAt ?? Infinity)
|
|
2194
|
+
};
|
|
2195
|
+
const wasShared = this.host.linkIds().some((l) => this.host.ledger(l)?.shared.some((s) => s.id === id));
|
|
2196
|
+
const revoke = wasShared && revocation.expiresAt > now();
|
|
2197
|
+
await this.save((proofs, revocations) => proofs.some((p) => identityStatement(p.binding).id === id) ? [proofs.filter((p) => identityStatement(p.binding).id !== id), revoke ? [...revocations, revocation] : revocations] : [proofs, revocations]);
|
|
2198
|
+
if (wasShared) this.publishRevocation(revocation).catch(() => {});
|
|
2199
|
+
else {
|
|
2200
|
+
this.seeds.get(id)?.fill(0);
|
|
2201
|
+
this.seeds.delete(id);
|
|
2202
|
+
}
|
|
2203
|
+
}
|
|
2204
|
+
/**
|
|
2205
|
+
* "Clear all data": every proof that was ever shared, and every removed one still being revoked, gets its revocation
|
|
2206
|
+
* record published once more, all at once. Nothing will republish them after the clear, so this is a last word for
|
|
2207
|
+
* contacts who check; proofs posted elsewhere (a Bluesky record, a Pubky file, a DNS record) are the person's to delete.
|
|
2208
|
+
*/
|
|
2209
|
+
async revokeAll() {
|
|
2210
|
+
this.stop();
|
|
2211
|
+
const shared = new Set(this.host.linkIds().flatMap((l) => this.host.ledger(l)?.shared.map((s) => s.id) ?? []));
|
|
2212
|
+
const at = now();
|
|
2213
|
+
const last = [...this.revocations.filter((r) => r.expiresAt > at), ...this.proofs.filter((p) => shared.has(identityStatement(p.binding).id)).map((p) => ({
|
|
2214
|
+
id: identityStatement(p.binding).id,
|
|
2215
|
+
key: p.binding.key,
|
|
2216
|
+
seed: p.seed,
|
|
2217
|
+
revokedAt: at,
|
|
2218
|
+
expiresAt: Math.min(p.binding.expiresAt, p.verified.expiresAt ?? Infinity)
|
|
2219
|
+
}))];
|
|
2220
|
+
await Promise.allSettled(last.map((r) => this.publishRevocation(r)));
|
|
2221
|
+
this.stop();
|
|
2222
|
+
}
|
|
2223
|
+
async publishRevocation(r) {
|
|
2224
|
+
if (!this.host.online()) return;
|
|
2225
|
+
await this.host.publish(await this.seedOf(r.id, r.seed), [{
|
|
2226
|
+
label: IDENTITY_REVOCATION_LABEL,
|
|
2227
|
+
value: identityRevocationValue(r.id, r.revokedAt)
|
|
2228
|
+
}]);
|
|
2229
|
+
}
|
|
2230
|
+
async republish() {
|
|
2231
|
+
const live = this.revocations.filter((r) => r.expiresAt > now());
|
|
2232
|
+
if (live.length !== this.revocations.length) {
|
|
2233
|
+
for (const r of this.revocations) if (!live.includes(r)) {
|
|
2234
|
+
this.seeds.get(r.id)?.fill(0);
|
|
2235
|
+
this.seeds.delete(r.id);
|
|
2236
|
+
}
|
|
2237
|
+
await this.save((proofs, revocations) => [proofs, revocations.filter((r) => r.expiresAt > now())]);
|
|
2238
|
+
}
|
|
2239
|
+
for (const r of live) await this.publishRevocation(r).catch(() => {});
|
|
2240
|
+
}
|
|
2241
|
+
/**
|
|
2242
|
+
* Looks up the contacts' proofs for a revocation (the Pkarr record only, not the provider): the ones standing, and the
|
|
2243
|
+
* ones withdrawn, which a removal also revokes. Not a proof already revoked, nor one past its expiry: its owner
|
|
2244
|
+
* publishes the revocation only until then.
|
|
2245
|
+
*/
|
|
2246
|
+
async checkRevocations() {
|
|
2247
|
+
if (!this.host.online()) return;
|
|
2248
|
+
for (const linkId of this.host.linkIds()) for (const r of this.host.ledger(linkId)?.received ?? []) if (this.revocable(r)) await this.exchange(linkId)?.recheck(r.id, { revocationOnly: true }).catch(() => {});
|
|
2249
|
+
this.revocationsCheckedAt = Date.now();
|
|
2250
|
+
await transact([STORES.settings], (stores) => {
|
|
2251
|
+
stores[STORES.settings].put(this.revocationsCheckedAt, REVOCATIONS_CHECKED_AT);
|
|
2252
|
+
});
|
|
2253
|
+
}
|
|
2254
|
+
revocable(r) {
|
|
2255
|
+
return r.status !== "revoked" && Math.min(r.binding.expiresAt, r.verified.expiresAt ?? Infinity) > now();
|
|
2256
|
+
}
|
|
2257
|
+
/** A proof the contact just withdrew: looked up for its revocation a few times (`WITHDRAWN_REVOCATION_TRIES_MS`). */
|
|
2258
|
+
afterWithdrawal(linkId, id, tries = WITHDRAWN_REVOCATION_TRIES_MS) {
|
|
2259
|
+
const [wait, ...rest] = tries;
|
|
2260
|
+
if (wait === void 0) return;
|
|
2261
|
+
const timer = setTimeout(() => {
|
|
2262
|
+
this.timers = this.timers.filter((t) => t !== timer);
|
|
2263
|
+
const r = this.host.ledger(linkId)?.received.find((x) => x.id === id);
|
|
2264
|
+
if (!r || r.status !== "withdrawn" || !this.revocable(r)) return;
|
|
2265
|
+
(async () => {
|
|
2266
|
+
if ((this.host.online() ? await this.exchange(linkId)?.recheck(id, { revocationOnly: true }).catch(() => void 0) : void 0)?.status !== "revoked") this.afterWithdrawal(linkId, id, rest);
|
|
2267
|
+
})();
|
|
2268
|
+
}, wait);
|
|
2269
|
+
this.timers.push(timer);
|
|
2270
|
+
}
|
|
2271
|
+
views() {
|
|
2272
|
+
return this.proofs.map((p) => this.viewOf(p));
|
|
2273
|
+
}
|
|
2274
|
+
viewOf(p) {
|
|
2275
|
+
const id = identityStatement(p.binding).id;
|
|
2276
|
+
const sharedWith = this.host.linkIds().filter((l) => this.host.ledger(l)?.shared.some((s) => s.id === id && s.status !== "withdrawn" && s.status !== "withdrawal-pending" && s.status !== "rejected")).length;
|
|
2277
|
+
const publicUri = this.publicUri(p);
|
|
2278
|
+
const expiresAt = Math.min(p.binding.expiresAt, p.verified.expiresAt ?? Infinity);
|
|
2279
|
+
const publicProfile = expiresAt > now() ? this.host.publicProfile?.(p.binding.provider, p.verified.subject) : void 0;
|
|
2280
|
+
return {
|
|
2281
|
+
id,
|
|
2282
|
+
provider: p.binding.provider,
|
|
2283
|
+
subject: p.binding.subject,
|
|
2284
|
+
key: p.binding.key,
|
|
2285
|
+
verified: p.verified,
|
|
2286
|
+
issuedAt: p.binding.issuedAt,
|
|
2287
|
+
expiresAt,
|
|
2288
|
+
createdAt: p.createdAt,
|
|
2289
|
+
sharedWith,
|
|
2290
|
+
evidence: p.evidence,
|
|
2291
|
+
...publicUri ? { publicUri } : {},
|
|
2292
|
+
...publicProfile ? { publicProfile } : {}
|
|
2293
|
+
};
|
|
2294
|
+
}
|
|
2295
|
+
/** What the profile's public DID would list for this identity: the provider's URI for the verified subject, if well formed. */
|
|
2296
|
+
publicUri(p) {
|
|
2297
|
+
try {
|
|
2298
|
+
const uri = this.providers().find((x) => x.id === p.binding.provider)?.publicUri?.(p.verified.subject);
|
|
2299
|
+
return uri && /^[A-Za-z][A-Za-z0-9+.-]*:[^\s,;]+$/.test(uri) ? uri : void 0;
|
|
2300
|
+
} catch {
|
|
2301
|
+
return;
|
|
2302
|
+
}
|
|
2303
|
+
}
|
|
2304
|
+
exchange(linkId) {
|
|
2305
|
+
if (!this.host.ledger(linkId)) return void 0;
|
|
2306
|
+
let x = this.exchanges.get(linkId);
|
|
2307
|
+
if (!x) {
|
|
2308
|
+
x = new IdentityExchange({
|
|
2309
|
+
scope: () => {
|
|
2310
|
+
const c = this.host.channel(linkId);
|
|
2311
|
+
if (!c) throw new Error("Connect to this contact first");
|
|
2312
|
+
return c.scope();
|
|
2313
|
+
},
|
|
2314
|
+
send: (frame) => {
|
|
2315
|
+
const c = this.host.channel(linkId);
|
|
2316
|
+
if (!c) throw new Error("Connect to this contact first");
|
|
2317
|
+
c.send(frame);
|
|
2318
|
+
},
|
|
2319
|
+
storage: {
|
|
2320
|
+
read: () => this.host.ledger(linkId) ?? emptyIdentityLedger(),
|
|
2321
|
+
update: async (change) => {
|
|
2322
|
+
await this.host.updateLedger(linkId, change);
|
|
2323
|
+
this.host.emit();
|
|
2324
|
+
}
|
|
2325
|
+
},
|
|
2326
|
+
providers: () => this.providers().map((p) => p.id),
|
|
2327
|
+
localProof: (id) => this.local(id),
|
|
2328
|
+
verify: this.verify,
|
|
2329
|
+
revoked: this.revoked,
|
|
2330
|
+
onError: (error) => {
|
|
2331
|
+
this.errors.set(linkId, error);
|
|
2332
|
+
this.host.emit();
|
|
2333
|
+
}
|
|
2334
|
+
});
|
|
2335
|
+
this.exchanges.set(linkId, x);
|
|
2336
|
+
}
|
|
2337
|
+
return x;
|
|
2338
|
+
}
|
|
2339
|
+
async share({ linkId, id }) {
|
|
2340
|
+
const x = this.exchange(linkId);
|
|
2341
|
+
if (!x) throw new Error("Identities can be shared in paired chats only");
|
|
2342
|
+
const p = this.proofs.find((q) => identityStatement(q.binding).id === id);
|
|
2343
|
+
if (!p) throw new Error("That identity is no longer in your profile");
|
|
2344
|
+
if (Math.min(p.binding.expiresAt, p.verified.expiresAt ?? Infinity) <= now()) throw new Error("This identity has expired. Make a new proof in your profile.");
|
|
2345
|
+
this.errors.delete(linkId);
|
|
2346
|
+
await x.share(id, !!this.host.channel(linkId));
|
|
2347
|
+
}
|
|
2348
|
+
async withdraw({ linkId, id }) {
|
|
2349
|
+
await this.exchange(linkId)?.withdraw(id, !!this.host.channel(linkId));
|
|
2350
|
+
}
|
|
2351
|
+
/** The contact's proof, checked again: its revocation record, then the provider's own check. */
|
|
2352
|
+
async recheck({ linkId, id }) {
|
|
2353
|
+
if (!this.host.online()) throw new Error("Offline: turn the network on to check again");
|
|
2354
|
+
await this.exchange(linkId)?.recheck(id);
|
|
2355
|
+
}
|
|
2356
|
+
/** Only on the person's request: the provider's public name/picture for a verified identity. */
|
|
2357
|
+
async lookupDisplay({ linkId, id }) {
|
|
2358
|
+
if (!this.host.online()) throw new Error("Offline: turn the network on first");
|
|
2359
|
+
const r = this.host.ledger(linkId)?.received.find((x) => x.id === id);
|
|
2360
|
+
const provider = r && this.providers().find((p) => p.id === r.binding.provider);
|
|
2361
|
+
if (!r || !provider?.lookupDisplay) throw new Error("No public profile for this identity");
|
|
2362
|
+
const display = await provider.lookupDisplay(r.verified.subject, { signal: AbortSignal.timeout(15e3) });
|
|
2363
|
+
if (!display) throw new Error("No public profile found");
|
|
2364
|
+
await this.host.updateLedger(linkId, (l) => ({
|
|
2365
|
+
...l,
|
|
2366
|
+
received: l.received.map((x) => x.id === id && x.verified.subject === r.verified.subject ? {
|
|
2367
|
+
...x,
|
|
2368
|
+
display
|
|
2369
|
+
} : x)
|
|
2370
|
+
}));
|
|
2371
|
+
this.host.emit();
|
|
2372
|
+
}
|
|
2373
|
+
async frame(linkId, frame) {
|
|
2374
|
+
const x = this.exchange(linkId);
|
|
2375
|
+
if (!x) return;
|
|
2376
|
+
const withdrawn = frame.t === "idp-withdraw" && typeof frame.id === "string" && this.host.ledger(linkId)?.received.some((r) => r.id === frame.id && r.status !== "withdrawn" && r.status !== "revoked");
|
|
2377
|
+
await x.receive(frame);
|
|
2378
|
+
if (withdrawn && this.host.ledger(linkId)?.received.some((r) => r.id === frame.id && r.status === "withdrawn")) this.afterWithdrawal(linkId, frame.id);
|
|
2379
|
+
}
|
|
2380
|
+
ready(linkId) {
|
|
2381
|
+
if (this.greeted.has(linkId) || !this.host.channel(linkId)) return;
|
|
2382
|
+
try {
|
|
2383
|
+
this.exchange(linkId)?.ready();
|
|
2384
|
+
this.greeted.add(linkId);
|
|
2385
|
+
} catch {}
|
|
2386
|
+
}
|
|
2387
|
+
closed(linkId) {
|
|
2388
|
+
this.greeted.delete(linkId);
|
|
2389
|
+
this.exchanges.get(linkId)?.stop();
|
|
2390
|
+
}
|
|
2391
|
+
forget(linkId) {
|
|
2392
|
+
this.greeted.delete(linkId);
|
|
2393
|
+
this.exchanges.get(linkId)?.stop();
|
|
2394
|
+
this.exchanges.delete(linkId);
|
|
2395
|
+
this.errors.delete(linkId);
|
|
2396
|
+
}
|
|
2397
|
+
linkView(linkId, supported) {
|
|
2398
|
+
const ledger = this.host.ledger(linkId);
|
|
2399
|
+
if (!ledger) return void 0;
|
|
2400
|
+
const { mine, theirs } = this.host.keys(linkId);
|
|
2401
|
+
const t = now();
|
|
2402
|
+
return {
|
|
2403
|
+
support: supported,
|
|
2404
|
+
contactProviders: supported ? this.exchanges.get(linkId)?.contactProviders?.slice() : void 0,
|
|
2405
|
+
shared: ledger.shared,
|
|
2406
|
+
received: ledger.received.map((r) => {
|
|
2407
|
+
const provider = this.providers().find((p) => p.id === r.binding.provider);
|
|
2408
|
+
const status = receivedIdentityStatus(r, theirs, mine, t);
|
|
2409
|
+
const publicProfile = status === "verified" ? this.host.publicProfile?.(r.binding.provider, r.verified.subject) : void 0;
|
|
2410
|
+
return {
|
|
2411
|
+
id: r.id,
|
|
2412
|
+
provider: r.binding.provider,
|
|
2413
|
+
subject: r.verified.subject,
|
|
2414
|
+
verified: r.verified,
|
|
2415
|
+
display: r.display,
|
|
2416
|
+
status,
|
|
2417
|
+
verifiedAt: r.verifiedAt,
|
|
2418
|
+
checkedAt: r.checkedAt,
|
|
2419
|
+
expiresAt: Math.min(r.binding.expiresAt, r.verified.expiresAt ?? Infinity),
|
|
2420
|
+
error: r.error,
|
|
2421
|
+
recheckDue: !!provider?.recheck && t - r.checkedAt >= provider.recheck.afterSeconds,
|
|
2422
|
+
...publicProfile ? { publicProfile } : {}
|
|
2423
|
+
};
|
|
2424
|
+
}),
|
|
2425
|
+
error: this.errors.get(linkId)
|
|
2426
|
+
};
|
|
2427
|
+
}
|
|
2428
|
+
};
|
|
2429
|
+
//#endregion
|
|
1864
2430
|
//#region ../browser/src/shared/storedFiles.ts
|
|
1865
2431
|
/** The bytes a file holds: its metadata says, and a file stored before that says it with its Blob. */
|
|
1866
2432
|
function storedSize(file) {
|
|
@@ -3405,6 +3971,6 @@ function messageFile(kept) {
|
|
|
3405
3971
|
};
|
|
3406
3972
|
}
|
|
3407
3973
|
//#endregion
|
|
3408
|
-
export {
|
|
3974
|
+
export { WrongNetworkError as $, IdentityProofs as A, ProviderSources as B, FileAppender as C, streamStored as D, storedSize as E, LightningCards as F, breezDatabaseInUse as G, CASHU_MINT_SOURCE as H, cardsKey as I, iceServerProblem as J, breezDatabasesFor as K, isRecoveryPhrase as L, sealSecret as M, whenDataKeyDropped as N, waitingGroupFile as O, CASHU_CARD as P, ModeGate as Q, normalizePhrase as R, WALLET_TYPES as S, removeStored as T, cashuMint as U, sourceKey as V, breezDatabase as W, relayOnlyProblem as X, iceServerSetting as Y, ModeChanged as Z, crossNetwork as _, storedGroupFiles as a, setSingleWriterGate as at, walletInstances as b, receivedPairedReply as c, paymentAlias as d, networkLabel as et, paymentWireId as f, createTiming as g, createFailure as h, groupOfFile as i, setAwayWallets as it, openSecret as j, IDENTITY_DRAFT_TTL_MS as k, replyRef as l, assertConfirmedReal as m, groupFileId as n, refuseAway as nt, groupReply as o, WALLET_NAMES as p, dropBreezDatabase as q, groupFileText as r, requireTurn as rt, pairedWireReply as s, GroupFileDesk as t, awayFrom as tt, replyTo as u, paymentNetwork as v, readStored as w, MESSAGE_DETAILS_MAX_BYTES as x, paymentNetworksOf as y, lightningPaying as z };
|
|
3409
3975
|
|
|
3410
|
-
//# sourceMappingURL=groupFiles-
|
|
3976
|
+
//# sourceMappingURL=groupFiles-CBJIEvCE.js.map
|