@ghostlytools/cli 1.12.0 → 1.12.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +5 -5
- package/dist/assets/{api-DLzCtePC.js → api-BwEgbvvK.js} +49 -23
- package/dist/assets/api-BwEgbvvK.js.map +1 -0
- package/dist/assets/{api-DYMKyb1k.js → api-jRUXnBdX.js} +2 -2
- package/dist/assets/{apiKit-CVaEzKWQ.js → apiKit-BlsNk-Cx.js} +2 -2
- package/dist/assets/{apiKit-CVaEzKWQ.js.map → apiKit-BlsNk-Cx.js.map} +1 -1
- package/dist/assets/{appFetch-D56GsYuq.js → appFetch-CW9fJPHh.js} +2 -2
- package/dist/assets/{appFetch-D56GsYuq.js.map → appFetch-CW9fJPHh.js.map} +1 -1
- package/dist/assets/{apps-BPFW19Wc.js → apps-BcG4u6SM.js} +1 -1
- package/dist/assets/{apps-XnZ8VEuj.js → apps-CL8TXHhu.js} +6 -6
- package/dist/assets/{apps-XnZ8VEuj.js.map → apps-CL8TXHhu.js.map} +1 -1
- package/dist/assets/{backup-DpyvT9Z6.js → backup-BA41EDvh.js} +47 -8
- package/dist/assets/backup-BA41EDvh.js.map +1 -0
- package/dist/assets/{backup-COX6j1_W.js → backup-xZfV-ytw.js} +1 -1
- package/dist/assets/{bitcoind-DTsrd7TF.js → bitcoind-Dh7n9amb.js} +2 -2
- package/dist/assets/{bitcoind-DTsrd7TF.js.map → bitcoind-Dh7n9amb.js.map} +1 -1
- package/dist/assets/buttons-CsGdQNnR.js +1 -0
- package/dist/assets/{buttons-BvWqHJeh.js → buttons-SH1tNRh7.js} +6 -6
- package/dist/assets/buttons-SH1tNRh7.js.map +1 -0
- package/dist/assets/{client-kGZ3ZdUW.js → client-DGS-atRu.js} +2 -2
- package/dist/assets/{client-kGZ3ZdUW.js.map → client-DGS-atRu.js.map} +1 -1
- package/dist/assets/{endpoint-B0vE5ojY.js → endpoint-Cvu-taMs.js} +42 -5
- package/dist/assets/{endpoint-B0vE5ojY.js.map → endpoint-Cvu-taMs.js.map} +1 -1
- package/dist/assets/{groupMeta-DTQAJG50.js → groupMeta-DxuJzko_.js} +49 -28
- package/dist/assets/groupMeta-DxuJzko_.js.map +1 -0
- package/dist/assets/{host-z0FAHP9Z.js → host-BxM-HMr0.js} +62 -9
- package/dist/assets/host-BxM-HMr0.js.map +1 -0
- package/dist/assets/{hyperdhtRelay-CvsAfQRQ.js → hyperdhtRelay-DLUiwfnt.js} +32 -4
- package/dist/assets/hyperdhtRelay-DLUiwfnt.js.map +1 -0
- package/dist/assets/{irohWeb-CLBx5MIv.js → irohWeb-CbnGtUo6.js} +175 -6
- package/dist/assets/irohWeb-CbnGtUo6.js.map +1 -0
- package/dist/assets/{main-CVqkvuIo.js → main-CwTaepxR.js} +48 -31
- package/dist/assets/main-CwTaepxR.js.map +1 -0
- package/dist/assets/{ownStatus-DMEhrpkd.js → ownStatus-DtzIllg2.js} +4 -3
- package/dist/assets/ownStatus-DtzIllg2.js.map +1 -0
- package/dist/assets/{profiles-BFSGqDFC.js → profiles-BOYGlmu2.js} +2 -2
- package/dist/assets/{profiles-BFSGqDFC.js.map → profiles-BOYGlmu2.js.map} +1 -1
- package/dist/assets/{registry-B15Yg_1C.js → registry-4W1LGlCF.js} +1 -1
- package/dist/assets/{registry-rXgaZeNn.js → registry-Bep4umOM.js} +36 -28
- package/dist/assets/registry-Bep4umOM.js.map +1 -0
- package/dist/assets/secretGuard-Bm6nci0I.js +1 -0
- package/dist/assets/{secretGuard-B4-LlMjv.js → secretGuard-BrATm_gl.js} +33 -9
- package/dist/assets/{secretGuard-B4-LlMjv.js.map → secretGuard-BrATm_gl.js.map} +1 -1
- package/dist/assets/{server-CQR7NLCz.js → server-D4gf-LnD.js} +257 -43
- package/dist/assets/server-D4gf-LnD.js.map +1 -0
- package/dist/assets/{waitNotice-BGM0QOS2.js → waitNotice-DQvZgz2T.js} +2 -2
- package/dist/assets/{waitNotice-BGM0QOS2.js.map → waitNotice-DQvZgz2T.js.map} +1 -1
- package/dist/ghostly.mjs +1 -1
- package/npm-shrinkwrap.json +2 -2
- package/package.json +1 -1
- package/dist/assets/api-DLzCtePC.js.map +0 -1
- package/dist/assets/backup-DpyvT9Z6.js.map +0 -1
- package/dist/assets/buttons-Bq7pTXqF.js +0 -1
- package/dist/assets/buttons-BvWqHJeh.js.map +0 -1
- package/dist/assets/groupMeta-DTQAJG50.js.map +0 -1
- package/dist/assets/host-z0FAHP9Z.js.map +0 -1
- package/dist/assets/hyperdhtRelay-CvsAfQRQ.js.map +0 -1
- package/dist/assets/irohWeb-CLBx5MIv.js.map +0 -1
- package/dist/assets/main-CVqkvuIo.js.map +0 -1
- package/dist/assets/ownStatus-DMEhrpkd.js.map +0 -1
- package/dist/assets/registry-rXgaZeNn.js.map +0 -1
- package/dist/assets/secretGuard-BmmnEbYf.js +0 -1
- package/dist/assets/server-CQR7NLCz.js.map +0 -1
|
@@ -1,9 +1,9 @@
|
|
|
1
|
-
import { $ as beaconRecords, $a as
|
|
1
|
+
import { $ as beaconRecords, $a as INVITE_HRP, $i as REQUEST_LIFETIME_MS, $n as readReaction, $r as verifyCommitSignature, $t as APP_RANGE_LIMITS, Aa as appFingerprint, Ai as parseLocalTarget, An as fileMessageText, Ar as arrivalKey, Bn as dhtEditId, Br as OWN_FRAME_LIMIT, Bt as WAKE_INTERVAL_MS, C as PAIRED_FRAME_TOO_LARGE, Ci as PRESENCE_WINDOW, Cn as sanitizeFileName, Ct as personStatus, D as GROUP_FILE_LIMITS, Da as sha256Paced, Di as GhostlyHttpError, Dr as statusCardBytes, E as pairedMessageFrame, Ea as readAppBundleAsync, Ei as presenceSeenAt, Er as sameButtonText, Fa as isAppKey, Fn as EDIT_BUFFER_MS, Fr as GROUP_ADMIN_OFF_ERROR, Ft as nextPinNumber, G as MESH_HUBS, Gi as parseCallSignal, Gn as COMMUNITY_REACTION_FRAME, Gr as parseGroupCommit, Gt as deviceWakeRequest, Hn as validRemovalNumber, Hr as commitHash, Ht as WAKE_ONLINE_DELAY_MS, In as EDIT_RATE_WINDOW_MS, Ir as GROUP_ID, It as pinIsNewer, J as meshHubs, Ja as parseImageMeta, Ji as HTTP_SERVICE_PROTO, Jn as ReactionWindow, Jr as rosterHas, Jt as relayRequest, K as NO_HUB_POLICY, Kn as GROUP_REACTION_FRAME, Kr as rememberAlone, Kt as newWakeToken, La as isAppRef, Ln as MAX_REMOVAL_NUMBER, Lr as GROUP_MEMBER_CAP, Lt as pinNumberHolds, M as groupFileFallback, Ma as appRefPublisher, Mi as LIMITS, Mr as heardTime, Mt as GROUP_PIN_FRAME, Ni as decodeControl, Nr as receivedTimestamp, Nt as PIN_LIMITS, O as GROUP_HAVE_FRAME, Or as statusCardText, Ot as TypingReceiver, P as readGroupFileMeta, Pa as isAppHash, Pi as encodeControl, Pn as parseVideoMeta, Pr as shownTime, Pt as mayPin, Q as beaconKeys, Qa as readCanonicalJson, Qi as ContactRequestError, Qn as reactionIsNewer, Qr as verifyCommit, Qt as vapidKeysMatch, R as CarriedTransport, Ra as readAppRevocation, Ri as RTC_CONFIG, Rn as REMOVED_TEXT, Rt as readPin, S as LIVENESS_PING_MS, Sn as formatFileSize, St as liveStatus, T as pairedMessageFits, Ti as WATCH_PEER_MS, Tr as readStatusCard, Tt as TYPING_FRAME, U as groupSignalFrame, Ui as contactRtcConfig, Un as forwardedAgain, Ur as commitUntaggedHash, Vn as validEditNumber, Vr as SAID_AGAIN, Vt as WAKE_ONLINE_BATCH_MS, W as readGroupSignal, Wn as readForwarded, Wr as expectedRoster, Wt as WakeLimiter, X as pickMeshHubs, Xa as canonicalJson, Xi as MAX_SHARED_APPS, Xn as queueReaction, Xr as sortRoster, Xt as wakeRequest, Y as meshRendezvous, Yi as LEGACY_SERVICES, Yn as nextReactionNumber, Yr as signCommit, Yt as wakeFrame, Z as COMMUNITY_TOPOLOGY, Za as canonicalJsonBytes, Zi as serviceIdFromName, Zn as reactionEmoji, Zr as verifyChain, Zt as checkPushEndpoint, _ as signGroupMeta, _i as ratchetSessionOf, _o as newDeviceSetSecret, _t as sentWhole, a as groupMetaChange, aa as knockSlotOf, ai as encryptText, an as BUTTONS_CAPABILITY, ao as inviteLink, ar as readReply, at as mergeBeacon, b as GhostLink, bn as DHT_FILE_CAPABILITY, c as groupMetaTag, ca as makeStampPaced, ci as newEpochSecret, cn as UPGRADE_CAPABILITY, co as pastedAgain, cr as BUTTON_ID, ct as pickHubs, d as keepPastGroupMeta, da as readKnockSlot, di as sealPair, dn as capsDescriptors, do as HANDOFF_CAPABILITY, dt as readBeaconHead, ea as contactAskerFrame, ei as GROUP_PROFILE, en as isServeId, eo as INVITE_MAX_LENGTH, er as validReactionNumber, et as doorHubs, f as nextGroupMetaRevision, fa as readLinkRecord, fi as sealSecret, fn as dialDescriptors, fo as deviceEchoFrame, ft as readLobby, g as parseGroupMetaTag, ga as APP_BUNDLE_MAGIC, gi as emptyRatchetState, go as devicePingFrame, gr as STATUS_CARD_LIMITS, h as parseGroupMetaFrame, ha as APP_BUNDLE_LIMITS, hi as RatchetBox, hn as validExternalKey, ho as deviceLinkPairing, ht as FILE_LIMITS, i as groupMetaBody, ia as knockSlotIdentity, ii as edgeParams, in as APPS_CAPABILITY, io as encodeInviteCode, ir as pairedReplyAuthor, it as lobbyRecords, ja as appRef, ji as webLocalFetch, jn as parseVoiceMeta, jr as claimedTime, jt as typingActivity, ka as APP_STATEMENT_LIMITS, ki as formatLocalTarget, kt as TypingSender, l as groupMetaToHand, la as mergeContactKnocks, li as openPair, ln as CapsExchange, lo as DEVICES_CAPABILITY, lt as rankHubs, m as parseGroupMetaBody, ma as seenEntry, mi as RATCHET_CAPABILITY, mn as emptyProofLedger, mo as deviceKeyZ32, mt as ChatFiles, na as contactDay, ni as confirmationTag, nn as chatAppId, no as createChatInvite, nr as REPLY_LIMITS, nt as hubRank, o as groupMetaNewer, oa as knockSlotRecords, oi as epochKeys, on as EDIT_CAPABILITY, oo as inviteOwnership, or as replySnippet, ot as mergeLobby, p as openGroupMeta, pa as requestRecords, pi as sha256Hex, pn as PeerProofs, po as deviceEchoNonce, pt as shouldBeHub, q as mayBeHub, qi as emptyLinkRecords, qn as REACTION_LIMITS, qr as rosterAdmin, qt as parseWakeFrame, r as groupDisplayName, ra as knockHolds, ri as decryptText, rn as isAppVersion, ro as decodeInviteCode, rr as groupReplyAuthor, rt as lobbyKeys, s as groupMetaPicture, sa as linkRecords, si as groupCallKey, sn as STATUS_CARD_CAPABILITY, sr as wireReply, st as newerHead, t as encodeGroupMetaBody, ta as contactAskerHolds, ti as confirmationMatches, to as OwnInviteError, tr as wireReaction, tt as freshHubs, u as groupName, ua as openRequest, ui as openSecret, un as DHT_TEXT_CAPABILITY, uo as ENROLL_CAPABILITY, ut as readBeacon, v as verifyGroupMetaSignature, va as appDigest, vi as DirectPathWatch, vn as DHT_MESSAGE_TTL, vt as transferEnded, w as pairedEditFits, wa as pacer, wi as RELAY_POLL_INTERVALS, wn as sanitizeMime, wr as checkStatusCard, x as INVITE_TAKEN, xi as DHT_POLL_INTERVALS, xn as dhtFileId, xr as cardEditNumber, xt as STATUS_IDLE_AFTER_MS, y as wrapGroupMeta, ya as appViewOf, yn as peekDhtMailbox, yt as transferStalled, za as readAppRevocationShape, zn as RateWindow, zr as MEMBER_KEY, zt as WAKE_CALL_INTERVAL_MS } from "./groupMeta-DxuJzko_.js";
|
|
2
2
|
import { _ as receivedIdentityStatus, d as emptyIdentityLedger, y as lastSharedWithMe } from "./identityProofs-Cksc_K7_.js";
|
|
3
3
|
import { _ as openDb, a as GROUP_LIGHT_RANGE, b as transact, c as clearProfileStores, d as deleteDatabase, f as errorLine, g as newestWalletTx, h as groupLiveKey, i as FILE_INDEX, l as committed, m as groupLightKey, n as APP_STORAGE_SCOPE_INDEX, o as GROUP_LIVE_RANGE, p as fileStore, r as CARD_INDEX, s as STORES$1, t as APP_STORAGE_CHAT_INDEX, u as databaseName, v as profileOpenFailure, x as wrap, y as store } from "./idb-ewvbqyDI.js";
|
|
4
4
|
import { c as fileSpace, f as FILE_BYTES_STEP, o as fileBytes, r as blobDigest, s as fileBytesOf, u as removeFileBytes } from "./fileBytes-CfvUXdSy.js";
|
|
5
5
|
import { a as sealSeed, c as openRow, d as sealRow, f as sealedStore, g as whenDataKeyDropped, h as sealSecret$1, i as newDeviceKey, l as openRows, m as openSecret$1, o as unsealSeed, p as hasDataKey, r as intentRepository, s as RowSeals, u as proofKey } from "./networkReason-Be-hMghr.js";
|
|
6
|
-
import { $ as lightningPaying, A as paymentNetworksOf, At as mergeKnocks, B as removeStored, Bt as validEditText, C as paymentWireId, Ct as setSingleWriterGate, D as createTiming, Dt as entryParams, E as createFailure, Et as encodeGroupEntryLink, F as copyForForward, Ft as carryMentions, G as IdentityProofs, Gt as wireMentions, H as streamStored, Ht as mentionsBytes, I as forwardError, It as communityEditFrame, J as cardsKey, K as CASHU_CARD, L as forwardKind, Lt as communityMessageAuthor, N as WALLET_TYPES, Nt as GROUP_EDIT_FRAME, O as crossNetwork, Ot as knockIdentity, P as FORWARD_MESSAGE_GONE, Pt as GROUP_EDIT_TEXT_BYTES, Q as journaledPayment, R as FileAppender, Rt as meshMessageRef, S as paymentAlias, St as setAwayWallets, T as assertConfirmedReal, Tt as decodeGroupEntryLink, Ut as mentionsMember, V as storedSize, Vt as MENTION_LIMITS, Wt as validMentions, X as breez, Y as BREEZ_SOURCE, Z as normalizePhrase, _ as groupReply, _t as WrongNetworkError, at as cashuMint, b as replyRef, bt as refuseAway, ct as loadBreezSdk, d as parsePayLink, dt as breezDatabasesFor, et as INVOICE_PACE, f as GroupFileDesk, ft as iceServerProblem, g as storedGroupFiles, gt as ModeGate, h as groupOfFile, ht as ModeChanged, i as onPublicIrohRelay, it as CASHU_MINT_SOURCE, j as walletInstances, jt as readKnocks, k as paymentNetwork, kt as knockRecords, l as groupLinkId, lt as openBreez, m as groupFileText, mt as relayOnlyProblem, n as createIrohWebEndpoint, nt as ProviderSources, o as groupPayLineId, ot as AskBackoff, p as groupFileId, pt as iceServerSetting, q as LightningCards, r as irohRelayProblem, rt as sourceKey, st as forgetBreez, t as DEFAULT_IROH_RELAYS, tt as nextInvoiceAsk, u as pairLinkId, ut as breezDatabaseInUse, v as pairedWireReply, vt as networkLabel, w as WALLET_NAMES, x as replyTo, xt as requireTurn, y as receivedPairedReply, yt as awayFrom, z as readStored$2, zt as parseCommunityEdit } from "./irohWeb-
|
|
6
|
+
import { $ as lightningPaying, A as paymentNetworksOf, At as mergeKnocks, B as removeStored, Bt as validEditText, C as paymentWireId, Ct as setSingleWriterGate, D as createTiming, Dt as entryParams, E as createFailure, Et as encodeGroupEntryLink, F as copyForForward, Ft as carryMentions, G as IdentityProofs, Gt as wireMentions, H as streamStored, Ht as mentionsBytes, I as forwardError, It as communityEditFrame, J as cardsKey, K as CASHU_CARD, L as forwardKind, Lt as communityMessageAuthor, N as WALLET_TYPES, Nt as GROUP_EDIT_FRAME, O as crossNetwork, Ot as knockIdentity, P as FORWARD_MESSAGE_GONE, Pt as GROUP_EDIT_TEXT_BYTES, Q as journaledPayment, R as FileAppender, Rt as meshMessageRef, S as paymentAlias, St as setAwayWallets, T as assertConfirmedReal, Tt as decodeGroupEntryLink, Ut as mentionsMember, V as storedSize, Vt as MENTION_LIMITS, Wt as validMentions, X as breez, Y as BREEZ_SOURCE, Z as normalizePhrase, _ as groupReply, _t as WrongNetworkError, at as cashuMint, b as replyRef, bt as refuseAway, ct as loadBreezSdk, d as parsePayLink, dt as breezDatabasesFor, et as INVOICE_PACE, f as GroupFileDesk, ft as iceServerProblem, g as storedGroupFiles, gt as ModeGate, h as groupOfFile, ht as ModeChanged, i as onPublicIrohRelay, it as CASHU_MINT_SOURCE, j as walletInstances, jt as readKnocks, k as paymentNetwork, kt as knockRecords, l as groupLinkId, lt as openBreez, m as groupFileText, mt as relayOnlyProblem, n as createIrohWebEndpoint, nt as ProviderSources, o as groupPayLineId, ot as AskBackoff, p as groupFileId, pt as iceServerSetting, q as LightningCards, r as irohRelayProblem, rt as sourceKey, st as forgetBreez, t as DEFAULT_IROH_RELAYS, tt as nextInvoiceAsk, u as pairLinkId, ut as breezDatabaseInUse, v as pairedWireReply, vt as networkLabel, w as WALLET_NAMES, x as replyTo, xt as requireTurn, y as receivedPairedReply, yt as awayFrom, z as readStored$2, zt as parseCommunityEdit } from "./irohWeb-CbnGtUo6.js";
|
|
7
7
|
import { C as cashuRequestPayload, D as parseCashuRequestPayload, E as isFederationId, O as parseFedimintRequestPayload, S as ENDPOINT, T as findEndpoint, _ as SPARK_NETWORKS, a as SEPOLIA_TEST_USDT, b as sparkInvoiceDetails, c as USDT_PUBLIC_RPC, d as assertTokenUnits, f as assertWholeSats, g as walletNetworkOf, h as validatePaymentTarget, i as PaymentPreflightError, l as WALLET_NETWORKS, n as EVM_TEST_CHAINS, p as formatPaymentAmount, r as ONCHAIN_PROVIDER, s as TEST_USDT_FAUCET_AMOUNT, t as ETHEREUM_USDT, u as arkAddressPrefix, v as SPARK_PROVIDER, w as fedimintRequestPayload, x as isBitcoinAddress, y as sparkAddressKind } from "./paymentIntent-DySU3Ajm.js";
|
|
8
8
|
import { a as decodeBolt11, t as nwc } from "./nwcProvider-pL2XqSbW.js";
|
|
9
9
|
import { i as parseEngineError, n as engineError, r as engineText, t as EngineError } from "./engineErrors--9hfgKlK.js";
|
|
@@ -18,7 +18,7 @@ import { a as fromZ32, d as utf8Decode, f as utf8Encode, i as fromBase64Url, l a
|
|
|
18
18
|
import { C as generateEncryptionKey, _ as HoldKeys, b as newMailbox, g as HOLD_LIMITS, h as HOLD_DATED_BACK_MS, i as automaticTransport, m as HOLD_CAPABILITY, r as TRANSPORTS, v as HoldRefusedError, x as readManifest, y as isHoldUrl } from "./pairedTransports-BKmvlKz1.js";
|
|
19
19
|
import { i as parseLinkPreview, o as sanitizeAvatar } from "./linkPreview-DdMf-YAc.js";
|
|
20
20
|
import { C as normalizeAtprotoHandle, S as isAtprotoDid, d as chosenResolver, m as setPkarrRelaySource, r as resolveAtprotoDid, t as assertPublicServer } from "./resolve-CIc3KZMV.js";
|
|
21
|
-
import { S as webCryptoSigner, a as besideUrl, c as isGitHubPage, d as appStoreDecision, f as appUpdateDecision, h as APP_STORE_LIMITS, i as appPasteUrl, l as addedAppPermissions, m as planAppUpdate, n as APP_FETCH_LIMITS, o as boundedAppFetch, p as checkAppBeforeRun, r as AppFetchError, s as isAppFetchUrl, u as appRevocationFor, v as readAppStoreSteps, x as seedSigner } from "./appFetch-
|
|
21
|
+
import { S as webCryptoSigner, a as besideUrl, c as isGitHubPage, d as appStoreDecision, f as appUpdateDecision, h as APP_STORE_LIMITS, i as appPasteUrl, l as addedAppPermissions, m as planAppUpdate, n as APP_FETCH_LIMITS, o as boundedAppFetch, p as checkAppBeforeRun, r as AppFetchError, s as isAppFetchUrl, u as appRevocationFor, v as readAppStoreSteps, x as seedSigner } from "./appFetch-CW9fJPHh.js";
|
|
22
22
|
import { n as traceJoin } from "./joinTrace-xKBe73j9.js";
|
|
23
23
|
import { n as MAX_BACKUP_BYTES, t as BACKUP_MEDIA_TYPE } from "./envelope-Bi2kMqbp.js";
|
|
24
24
|
import { t as hyperdhtRelayProblem } from "./hyperdhtRelay-bjNGacf5.js";
|
|
@@ -1914,6 +1914,11 @@ var ANSWER_WINDOW_MS$1 = 5e3;
|
|
|
1914
1914
|
*/
|
|
1915
1915
|
var UNNAMED_KEPT_MS = 6e4;
|
|
1916
1916
|
/**
|
|
1917
|
+
* After the admin role moved to me: how long I still take the statement of the admin I took it from (WISP 902
|
|
1918
|
+
* § Metadata), one that was on its way while the commit reached me first. Past it, only the admin's is taken, as for anyone.
|
|
1919
|
+
*/
|
|
1920
|
+
var GROUP_TAKEOVER_META_MS = 6e5;
|
|
1921
|
+
/**
|
|
1917
1922
|
* One member's messages (or edits) taken: its whole log handed back at once twice over (`AUTHOR_BURST`: an edge opening
|
|
1918
1923
|
* hears it, with what the member says live beside it, and the edits its app says again), then
|
|
1919
1924
|
* `GROUP_LIMITS.messagesPerAuthor` and `messageBytesPerAuthor` per `messageWindowMs`, as a community's `MessagePace`.
|
|
@@ -2363,6 +2368,13 @@ var GroupSession = class {
|
|
|
2363
2368
|
queue = Promise.resolve();
|
|
2364
2369
|
/** Metadata frames that name a commit or an epoch I do not have yet, one signed by the admin and one by anyone else (`waitMeta`): tried again when the chain moves. */
|
|
2365
2370
|
pendingMeta = {};
|
|
2371
|
+
/** The admin as of the last `metaFollowsChain`. In memory only. */
|
|
2372
|
+
adminSeen;
|
|
2373
|
+
/**
|
|
2374
|
+
* After the admin role moved to me (`metaFollowsChain`): whom from, until when I take their statement, and the last
|
|
2375
|
+
* one of theirs I signed again (what I held then, until one of theirs comes). In memory only.
|
|
2376
|
+
*/
|
|
2377
|
+
takeover;
|
|
2366
2378
|
/** While `handle` runs: the frames it took that a hub passes on (`handle`'s result). */
|
|
2367
2379
|
passOn = null;
|
|
2368
2380
|
/** The frames kept to hand on that the app holds with its messages, oldest first; undefined when the state holds them all. */
|
|
@@ -2440,6 +2452,7 @@ var GroupSession = class {
|
|
|
2440
2452
|
this.provisional = new Set((state.provisional ?? []).slice(-GROUP_LIMITS.provisional));
|
|
2441
2453
|
for (const [key, record] of Object.entries(state.names ?? {})) this.nickAt.set(key, record.v);
|
|
2442
2454
|
this.chainMovedAt = this.clock();
|
|
2455
|
+
this.adminSeen = this.admin;
|
|
2443
2456
|
}
|
|
2444
2457
|
clock() {
|
|
2445
2458
|
return this.hooks.clock?.() ?? Date.now();
|
|
@@ -2857,6 +2870,7 @@ var GroupSession = class {
|
|
|
2857
2870
|
this.requireAdmin();
|
|
2858
2871
|
if (!rosterHas(this.roster, memberKey) || memberKey === this.myKey) throw new Error("Not a member");
|
|
2859
2872
|
await this.commit("remove", memberKey, now, left);
|
|
2873
|
+
if (!left && memberKey === this.takeover?.from) this.takeover = void 0;
|
|
2860
2874
|
});
|
|
2861
2875
|
}
|
|
2862
2876
|
transferAdmin(memberKey, now = Date.now()) {
|
|
@@ -4451,8 +4465,10 @@ var GroupSession = class {
|
|
|
4451
4465
|
/**
|
|
4452
4466
|
* Signs a body under my current commit, keeps it and sends it to every member. Inside `serialize`. Like a commit, only
|
|
4453
4467
|
* with admin work on and a good turn read (WISP 06 § Forced takeover): refused otherwise, or, `quiet`, not made.
|
|
4468
|
+
* `taken`: a former admin's statement signed again (`signAgainTaken`): the line credits them, and the one held is not
|
|
4469
|
+
* kept to hand on when it was no change (an older statement signed again).
|
|
4454
4470
|
*/
|
|
4455
|
-
async publishMeta(body, now, quiet = false) {
|
|
4471
|
+
async publishMeta(body, now, quiet = false, taken) {
|
|
4456
4472
|
const refused = this.hooks.adminWork?.() === false ? new Error(GROUP_ADMIN_OFF_ERROR) : this.hooks.adminTurn && !await this.hooks.adminTurn() ? engineError("groupTurnUnconfirmed") : void 0;
|
|
4457
4473
|
if (refused) {
|
|
4458
4474
|
if (quiet) return;
|
|
@@ -4467,7 +4483,7 @@ var GroupSession = class {
|
|
|
4467
4483
|
ts: now
|
|
4468
4484
|
}, body, this.identity.seed, this.myKey);
|
|
4469
4485
|
this.state.meta = meta;
|
|
4470
|
-
this.state.metaPast = keepPastGroupMeta(this.state.metaPast, before, meta);
|
|
4486
|
+
if (!taken?.replaces) this.state.metaPast = keepPastGroupMeta(this.state.metaPast, before, meta);
|
|
4471
4487
|
await this.persist();
|
|
4472
4488
|
const secret = this.secret(this.epoch);
|
|
4473
4489
|
if (secret) {
|
|
@@ -4475,7 +4491,7 @@ var GroupSession = class {
|
|
|
4475
4491
|
for (const key of this.others) this.hooks.send(key, frame);
|
|
4476
4492
|
}
|
|
4477
4493
|
const change = groupMetaChange(before, meta, this.state.name);
|
|
4478
|
-
if (change) this.hooks.metaChanged?.(this.myKey, change, meta.ts);
|
|
4494
|
+
if (change) this.hooks.metaChanged?.(taken?.by ?? this.myKey, change, meta.ts);
|
|
4479
4495
|
this.hooks.changed();
|
|
4480
4496
|
}
|
|
4481
4497
|
/** My statement, to a member whose sync says it holds an older one (or none); nothing to an app that says nothing. */
|
|
@@ -4495,19 +4511,20 @@ var GroupSession = class {
|
|
|
4495
4511
|
/**
|
|
4496
4512
|
* A metadata statement: kept when it is newer than mine, its commit is on my chain, its signer was
|
|
4497
4513
|
* the admin of that commit and is the admin now, its signature holds, and it opens under the epoch
|
|
4498
|
-
* it names into metadata Ghostly shows. One naming what I do not have yet waits for the chain.
|
|
4514
|
+
* it names into metadata Ghostly shows. One naming what I do not have yet waits for the chain. Just after the admin
|
|
4515
|
+
* role moved to me, the former admin's is signed again as mine (`takesOver`).
|
|
4499
4516
|
*/
|
|
4500
4517
|
async receiveMeta(from, raw) {
|
|
4501
4518
|
const frame = parseGroupMetaFrame(raw);
|
|
4502
4519
|
if (!frame || frame.statement.g !== this.id || typeof frame.k !== "number" || !rosterHas(this.roster, from)) return;
|
|
4503
|
-
const s = frame.statement;
|
|
4504
|
-
if (!groupMetaNewer(s, this.state.meta)) return;
|
|
4520
|
+
const s = frame.statement, taking = this.takesOver(s);
|
|
4521
|
+
if (!taking && !groupMetaNewer(s, this.state.meta)) return;
|
|
4505
4522
|
if (s.e > this.epoch || frame.k > this.epoch) {
|
|
4506
4523
|
this.waitMeta(from, raw, s);
|
|
4507
4524
|
return;
|
|
4508
4525
|
}
|
|
4509
4526
|
const commit = this.state.chain[s.e];
|
|
4510
|
-
if (commitHash(commit) !== s.h || rosterAdmin(commit.m) !== s.by || this.admin !== s.by || !verifyGroupMetaSignature(s)) return;
|
|
4527
|
+
if (commitHash(commit) !== s.h || rosterAdmin(commit.m) !== s.by || !taking && this.admin !== s.by || !verifyGroupMetaSignature(s)) return;
|
|
4511
4528
|
const secret = this.secret(frame.k);
|
|
4512
4529
|
if (!secret) {
|
|
4513
4530
|
this.waitMeta(from, raw, s);
|
|
@@ -4515,6 +4532,10 @@ var GroupSession = class {
|
|
|
4515
4532
|
}
|
|
4516
4533
|
const opened = openGroupMeta(frame, epochKeys(secret, this.id, frame.k).message);
|
|
4517
4534
|
if (!opened) return;
|
|
4535
|
+
if (taking) {
|
|
4536
|
+
await this.signAgainTaken(opened.meta, opened.body);
|
|
4537
|
+
return;
|
|
4538
|
+
}
|
|
4518
4539
|
const before = this.state.meta;
|
|
4519
4540
|
this.state.meta = opened.meta;
|
|
4520
4541
|
this.state.metaPast = keepPastGroupMeta(this.state.metaPast, before, opened.meta);
|
|
@@ -4531,6 +4552,37 @@ var GroupSession = class {
|
|
|
4531
4552
|
});
|
|
4532
4553
|
}
|
|
4533
4554
|
/**
|
|
4555
|
+
* Whether I take a statement though its signer is no longer the admin (WISP 902 § Metadata): I am the admin since
|
|
4556
|
+
* moments ago, they were the admin before me, and it is later than the one of theirs I signed again. A member who had
|
|
4557
|
+
* not synced when the role moved to them signed again what they held (or nothing), and the statement on its way would
|
|
4558
|
+
* be refused for good: their next rename, picture or hubs change would then be built on the older body.
|
|
4559
|
+
*/
|
|
4560
|
+
takesOver(s) {
|
|
4561
|
+
const t = this.takeover;
|
|
4562
|
+
return !!t && this.isAdmin && s.by === t.from && this.clock() <= t.until && groupMetaNewer(s, t.base);
|
|
4563
|
+
}
|
|
4564
|
+
/**
|
|
4565
|
+
* The former admin's statement, taken (`takesOver`): signed again as mine, each field I changed since keeping my
|
|
4566
|
+
* value. Dated as theirs, and credited to them, when I changed nothing; what I held was then no change to hand on.
|
|
4567
|
+
*/
|
|
4568
|
+
async signAgainTaken(meta, theirs) {
|
|
4569
|
+
const t = this.takeover, base = groupMetaBody(t.base), mine = groupMetaBody(this.state.meta);
|
|
4570
|
+
t.base = meta;
|
|
4571
|
+
const pick = (k) => JSON.stringify(mine[k]) === JSON.stringify(base[k]) ? theirs[k] : mine[k];
|
|
4572
|
+
const body = encodeGroupMetaBody({
|
|
4573
|
+
name: pick("name"),
|
|
4574
|
+
pic: pick("pic"),
|
|
4575
|
+
hubs: pick("hubs"),
|
|
4576
|
+
call: pick("call")
|
|
4577
|
+
});
|
|
4578
|
+
if (body === this.state.meta?.body) return;
|
|
4579
|
+
const changed = encodeGroupMetaBody(mine) !== encodeGroupMetaBody(base);
|
|
4580
|
+
await this.publishMeta(body, changed ? this.clock() : meta.ts, true, {
|
|
4581
|
+
by: meta.by,
|
|
4582
|
+
replaces: !changed
|
|
4583
|
+
});
|
|
4584
|
+
}
|
|
4585
|
+
/**
|
|
4534
4586
|
* A statement that waits for the chain: only one its signer signed, so an altered copy cannot push out the one
|
|
4535
4587
|
* waiting. The admin I know has a place of their own, which another member's statement cannot take, and in each
|
|
4536
4588
|
* place only a later statement takes the one waiting.
|
|
@@ -4562,6 +4614,15 @@ var GroupSession = class {
|
|
|
4562
4614
|
}
|
|
4563
4615
|
/** After the chain or my secrets moved: the waiting statement, and, if I became the admin, the name and picture signed again as mine. */
|
|
4564
4616
|
async metaFollowsChain() {
|
|
4617
|
+
if (this.admin !== this.adminSeen) {
|
|
4618
|
+
const from = this.adminSeen;
|
|
4619
|
+
this.takeover = this.isAdmin && from && from !== this.myKey ? {
|
|
4620
|
+
from,
|
|
4621
|
+
until: this.clock() + GROUP_TAKEOVER_META_MS,
|
|
4622
|
+
base: this.state.meta
|
|
4623
|
+
} : void 0;
|
|
4624
|
+
this.adminSeen = this.admin;
|
|
4625
|
+
}
|
|
4565
4626
|
const { admin, other } = this.pendingMeta;
|
|
4566
4627
|
this.pendingMeta = {};
|
|
4567
4628
|
for (const pending of [admin, other]) if (pending) await this.receiveMeta(pending.from, pending.frame);
|
|
@@ -4735,6 +4796,8 @@ var COMMUNITY_LIMITS = {
|
|
|
4735
4796
|
chainPiece: 100,
|
|
4736
4797
|
/** Admissions members other than the admin may commit in a row while the admin is away (`memberAdmissions`). */
|
|
4737
4798
|
memberAdmissions: 32,
|
|
4799
|
+
/** Commits back in which a leave of a key a member let in counts against `memberAdmissions`, the admin there or not. */
|
|
4800
|
+
memberLeaves: 256,
|
|
4738
4801
|
pendingLeaves: 64,
|
|
4739
4802
|
/** Leaves whose mark (`group-left`) is kept, and the epochs one names. */
|
|
4740
4803
|
leftMarks: 64,
|
|
@@ -4773,6 +4836,11 @@ var COMMUNITY_LIMITS = {
|
|
|
4773
4836
|
* frame of the answer keeps it open, since it goes a slice at a time. As a private group's.
|
|
4774
4837
|
*/
|
|
4775
4838
|
var ANSWER_WINDOW_MS = 5e3;
|
|
4839
|
+
/**
|
|
4840
|
+
* After the admin role moved to me: how long I still take the statement of the admin I took it from (WISP 903
|
|
4841
|
+
* § Metadata), one that was on its way while the commit reached me first. Past it, condition 4 holds as for anyone.
|
|
4842
|
+
*/
|
|
4843
|
+
var COMMUNITY_TAKEOVER_META_MS = 6e5;
|
|
4776
4844
|
/** What every member should know about who can read what, and what the link does, in the words the apps show. */
|
|
4777
4845
|
var GROUP_READ_NOTE_COMMUNITY = `Anyone with the group's link can join, and any member can let people in. Everyone in the group can read everything sent while they are a member; someone removed cannot read what comes after, someone who joins later cannot read what came before. Members who were away get the last ${COMMUNITY_LIMITS.store} messages from whoever is there when they return.`;
|
|
4778
4846
|
/** A community group's link: `group2/<group id>/<entry key>` (web: `#/join/group2/…`). */
|
|
@@ -4845,12 +4913,21 @@ var ADMIN_ONLY = /* @__PURE__ */ new Set([
|
|
|
4845
4913
|
* the admin clears keys let in would otherwise make room for as many more each time. An admission is a member's
|
|
4846
4914
|
* right, and costs nothing: a key nobody holds is as good as anyone's, so without a bound one member could fill the
|
|
4847
4915
|
* group to its cap in seconds. `COMMUNITY_LIMITS.memberAdmissions` in a row, then the admin's turn.
|
|
4916
|
+
* A leave among the last `COMMUNITY_LIMITS.memberLeaves` commits that ends an admission a member other than the admin
|
|
4917
|
+
* signed counts as one more, whether or not the admin was there since: the key leaves the roster as it was, and a
|
|
4918
|
+
* member that lets in keys it made up and commits their own leaves would otherwise fill the history with two commits
|
|
4919
|
+
* for each one the admin lets in at the door.
|
|
4848
4920
|
*/
|
|
4849
4921
|
function memberAdmissions(admin, before) {
|
|
4850
|
-
let n = 0;
|
|
4922
|
+
let n = 0, run = true, seen = 0;
|
|
4923
|
+
const leavers = /* @__PURE__ */ new Set();
|
|
4851
4924
|
for (const c of before) {
|
|
4852
|
-
if (c.k === "create" || c.k === "role" || c.by === admin && c.k !== "remove" && c.k !== "leave")
|
|
4853
|
-
if (c.k === "add") n++;
|
|
4925
|
+
if (run && (c.k === "create" || c.k === "role" || c.by === admin && c.k !== "remove" && c.k !== "leave")) run = false;
|
|
4926
|
+
if (run && c.k === "add") n++;
|
|
4927
|
+
const recent = ++seen <= COMMUNITY_LIMITS.memberLeaves;
|
|
4928
|
+
if (c.k === "add" && c.s && leavers.delete(c.s) && c.by !== admin) n++;
|
|
4929
|
+
if (recent && c.k === "leave" && c.s) leavers.add(c.s);
|
|
4930
|
+
if (!run && !recent && !leavers.size) break;
|
|
4854
4931
|
}
|
|
4855
4932
|
return n;
|
|
4856
4933
|
}
|
|
@@ -5322,6 +5399,13 @@ var CommunitySession = class CommunitySession {
|
|
|
5322
5399
|
saveTimer;
|
|
5323
5400
|
/** Metadata frames naming a commit or a secret I do not have yet, one signed by the admin and one by anyone else (`waitMeta`): tried again when the chain or my secrets move. */
|
|
5324
5401
|
pendingMeta = {};
|
|
5402
|
+
/** The admin as of the last `metaFollowsChain`. In memory only. */
|
|
5403
|
+
adminSeen;
|
|
5404
|
+
/**
|
|
5405
|
+
* After the admin role moved to me (`metaFollowsChain`): whom from, until when I take their statement, and the last
|
|
5406
|
+
* one of theirs I signed again (what I held then, until one of theirs comes). In memory only.
|
|
5407
|
+
*/
|
|
5408
|
+
takeover;
|
|
5325
5409
|
/** The store's frames the app holds with their messages (`storeKey` → message id): in memory here, not in what is saved. */
|
|
5326
5410
|
onRows = /* @__PURE__ */ new Map();
|
|
5327
5411
|
/** The oldest epoch whose seen marks are kept, as of the last `pruneSeen`. In memory only. */
|
|
@@ -5345,6 +5429,7 @@ var CommunitySession = class CommunitySession {
|
|
|
5345
5429
|
});
|
|
5346
5430
|
this.rebuild();
|
|
5347
5431
|
this.pruneSeen();
|
|
5432
|
+
this.adminSeen = this.admin;
|
|
5348
5433
|
if ((state.status === "active" || state.status === "lost") && this.bestBranch().tip !== this.topHash) this.serialize(() => this.chooseBranch());
|
|
5349
5434
|
}
|
|
5350
5435
|
static create(name, now = Date.now()) {
|
|
@@ -6489,6 +6574,7 @@ var CommunitySession = class CommunitySession {
|
|
|
6489
6574
|
return true;
|
|
6490
6575
|
}
|
|
6491
6576
|
await this.commit("remove", { s: next }, now);
|
|
6577
|
+
if (next === this.takeover?.from) this.takeover = void 0;
|
|
6492
6578
|
return false;
|
|
6493
6579
|
})) return;
|
|
6494
6580
|
}
|
|
@@ -7857,8 +7943,10 @@ var CommunitySession = class CommunitySession {
|
|
|
7857
7943
|
* Signs a body under my current commit, keeps it and sends it to everyone (hubs relay it). Inside `serialize`. Like a
|
|
7858
7944
|
* commit, only with admin work on and a good turn read (WISP 06 § Forced takeover): refused otherwise, or, `quiet`,
|
|
7859
7945
|
* not made. Its revision is never under the floor (WISP 06 § Raised counters).
|
|
7946
|
+
* `taken`: a former admin's statement signed again (`signAgainTaken`): the line credits them, and the one held is not
|
|
7947
|
+
* kept to hand on when it was no change (an older statement signed again).
|
|
7860
7948
|
*/
|
|
7861
|
-
async publishMeta(body, now, quiet = false) {
|
|
7949
|
+
async publishMeta(body, now, quiet = false, taken) {
|
|
7862
7950
|
const refused = !this.adminWork ? new Error(GROUP_ADMIN_OFF_ERROR) : this.hooks.adminTurn && !await this.hooks.adminTurn() ? engineError("groupTurnUnconfirmed") : void 0;
|
|
7863
7951
|
if (refused) {
|
|
7864
7952
|
if (quiet) return;
|
|
@@ -7873,12 +7961,12 @@ var CommunitySession = class CommunitySession {
|
|
|
7873
7961
|
ts: now
|
|
7874
7962
|
}, body, this.identity.seed, this.myKey);
|
|
7875
7963
|
this.state.meta = meta;
|
|
7876
|
-
this.state.metaPast = keepPastGroupMeta(this.state.metaPast, before, meta);
|
|
7964
|
+
if (!taken?.replaces) this.state.metaPast = keepPastGroupMeta(this.state.metaPast, before, meta);
|
|
7877
7965
|
await this.persist();
|
|
7878
7966
|
const frame = this.metaFrame(meta);
|
|
7879
7967
|
if (frame) this.hooks.broadcast(frame);
|
|
7880
7968
|
const change = groupMetaChange(before, meta, this.state.name);
|
|
7881
|
-
if (change) this.hooks.metaChanged?.(this.myKey, change, meta.ts);
|
|
7969
|
+
if (change) this.hooks.metaChanged?.(taken?.by ?? this.myKey, change, meta.ts);
|
|
7882
7970
|
this.hooks.changed();
|
|
7883
7971
|
}
|
|
7884
7972
|
/** A statement sealed under my current epoch, when I hold its secret. */
|
|
@@ -7902,19 +7990,20 @@ var CommunitySession = class CommunitySession {
|
|
|
7902
7990
|
* A metadata statement (from its author's edge or a hub's): kept when it is newer than mine, its
|
|
7903
7991
|
* commit is on my main branch, its signer was the admin after that commit and is the admin now,
|
|
7904
7992
|
* its signature holds, and it opens under the epoch it names into metadata Ghostly shows. Returns
|
|
7905
|
-
* whether it was new, so a hub relays it. One naming what I do not have yet waits for the chain.
|
|
7993
|
+
* whether it was new, so a hub relays it. One naming what I do not have yet waits for the chain. Just after the admin
|
|
7994
|
+
* role moved to me, the former admin's is signed again as mine (`takesOver`).
|
|
7906
7995
|
*/
|
|
7907
7996
|
async receiveMeta(from, raw) {
|
|
7908
7997
|
const frame = parseGroupMetaFrame(raw);
|
|
7909
7998
|
if (!frame || frame.statement.g !== this.id || typeof frame.k !== "string" || !this.isRecentMember(from)) return false;
|
|
7910
|
-
const s = frame.statement;
|
|
7911
|
-
if (!groupMetaNewer(s, this.state.meta)) return false;
|
|
7999
|
+
const s = frame.statement, taking = this.takesOver(s);
|
|
8000
|
+
if (!taking && !groupMetaNewer(s, this.state.meta)) return false;
|
|
7912
8001
|
const at = this.mainIndex.get(s.h);
|
|
7913
8002
|
if (at === void 0) {
|
|
7914
8003
|
if (s.e >= this.epoch - COMMUNITY_LIMITS.window) this.waitMeta(from, raw, s);
|
|
7915
8004
|
return false;
|
|
7916
8005
|
}
|
|
7917
|
-
if (at !== s.e || rosterAdmin(this.rosterAt(s.h) ?? []) !== s.by || this.admin !== s.by || !verifyGroupMetaSignature(s)) return false;
|
|
8006
|
+
if (at !== s.e || rosterAdmin(this.rosterAt(s.h) ?? []) !== s.by || !taking && this.admin !== s.by || !verifyGroupMetaSignature(s)) return false;
|
|
7918
8007
|
const secret = this.state.secrets[frame.k], sealedUnder = this.known.get(frame.k);
|
|
7919
8008
|
if (!secret || !sealedUnder) {
|
|
7920
8009
|
this.waitMeta(from, raw, s);
|
|
@@ -7922,6 +8011,10 @@ var CommunitySession = class CommunitySession {
|
|
|
7922
8011
|
}
|
|
7923
8012
|
const opened = openGroupMeta(frame, epochKeys(fromBase64Url(secret), this.id, sealedUnder.e).message);
|
|
7924
8013
|
if (!opened) return false;
|
|
8014
|
+
if (taking) {
|
|
8015
|
+
await this.signAgainTaken(opened.meta, opened.body);
|
|
8016
|
+
return false;
|
|
8017
|
+
}
|
|
7925
8018
|
const before = this.state.meta;
|
|
7926
8019
|
this.state.meta = opened.meta;
|
|
7927
8020
|
this.state.metaPast = keepPastGroupMeta(this.state.metaPast, before, opened.meta);
|
|
@@ -7932,6 +8025,37 @@ var CommunitySession = class CommunitySession {
|
|
|
7932
8025
|
return true;
|
|
7933
8026
|
}
|
|
7934
8027
|
/**
|
|
8028
|
+
* Whether I take a statement though its signer is no longer the admin (WISP 903 § Metadata): I am the admin since
|
|
8029
|
+
* moments ago, they were the admin before me, and it is later than the one of theirs I signed again. A member who had
|
|
8030
|
+
* not synced when the role moved to them signed again what they held (or nothing), and the statement on its way would
|
|
8031
|
+
* be refused for good: a rename of theirs, or a member back from away, would then lose the group's call node.
|
|
8032
|
+
*/
|
|
8033
|
+
takesOver(s) {
|
|
8034
|
+
const t = this.takeover;
|
|
8035
|
+
return !!t && this.isAdmin && s.by === t.from && (this.hooks.clock?.() ?? Date.now()) <= t.until && groupMetaNewer(s, t.base);
|
|
8036
|
+
}
|
|
8037
|
+
/**
|
|
8038
|
+
* The former admin's statement, taken (`takesOver`): signed again as mine, each field I changed since keeping my
|
|
8039
|
+
* value. Dated as theirs, and credited to them, when I changed nothing; what I held was then no change to hand on.
|
|
8040
|
+
*/
|
|
8041
|
+
async signAgainTaken(meta, theirs) {
|
|
8042
|
+
const t = this.takeover, base = groupMetaBody(t.base), mine = groupMetaBody(this.state.meta);
|
|
8043
|
+
t.base = meta;
|
|
8044
|
+
const pick = (k) => JSON.stringify(mine[k]) === JSON.stringify(base[k]) ? theirs[k] : mine[k];
|
|
8045
|
+
const body = encodeGroupMetaBody({
|
|
8046
|
+
name: pick("name"),
|
|
8047
|
+
pic: pick("pic"),
|
|
8048
|
+
hubs: pick("hubs"),
|
|
8049
|
+
call: pick("call")
|
|
8050
|
+
});
|
|
8051
|
+
if (body === this.state.meta?.body) return;
|
|
8052
|
+
const changed = encodeGroupMetaBody(mine) !== encodeGroupMetaBody(base);
|
|
8053
|
+
await this.publishMeta(body, changed ? this.hooks.clock?.() ?? Date.now() : meta.ts, true, {
|
|
8054
|
+
by: meta.by,
|
|
8055
|
+
replaces: !changed
|
|
8056
|
+
});
|
|
8057
|
+
}
|
|
8058
|
+
/**
|
|
7935
8059
|
* A statement that waits for the chain: only one its signer signed, so an altered copy cannot push out the one
|
|
7936
8060
|
* waiting. The admin I know has a place of their own, which another member's statement cannot take, and in each
|
|
7937
8061
|
* place only a later statement takes the one waiting.
|
|
@@ -7971,6 +8095,15 @@ var CommunitySession = class CommunitySession {
|
|
|
7971
8095
|
* went with a branch that lost a fork, the name and picture signed again as mine under the main branch.
|
|
7972
8096
|
*/
|
|
7973
8097
|
async metaFollowsChain() {
|
|
8098
|
+
if (this.admin !== this.adminSeen) {
|
|
8099
|
+
const from = this.adminSeen;
|
|
8100
|
+
this.takeover = this.isAdmin && from && from !== this.myKey ? {
|
|
8101
|
+
from,
|
|
8102
|
+
until: (this.hooks.clock?.() ?? Date.now()) + COMMUNITY_TAKEOVER_META_MS,
|
|
8103
|
+
base: this.state.meta
|
|
8104
|
+
} : void 0;
|
|
8105
|
+
this.adminSeen = this.admin;
|
|
8106
|
+
}
|
|
7974
8107
|
const { admin, other } = this.pendingMeta;
|
|
7975
8108
|
this.pendingMeta = {};
|
|
7976
8109
|
for (const pending of [admin, other]) if (pending && await this.receiveMeta(pending.from, pending.frame)) this.hooks.relay?.(pending.frame);
|
|
@@ -8485,7 +8618,7 @@ var bitcoindRpc = {
|
|
|
8485
8618
|
if (!user || !password) throw new Error("Enter the RPC user and password, or paste the .cookie file");
|
|
8486
8619
|
},
|
|
8487
8620
|
async create(settings, host) {
|
|
8488
|
-
const { BitcoindOnchain, tauriTransport } = await import("./bitcoind-
|
|
8621
|
+
const { BitcoindOnchain, tauriTransport } = await import("./bitcoind-Dh7n9amb.js");
|
|
8489
8622
|
return BitcoindOnchain.connect({
|
|
8490
8623
|
url: settings.config.url.trim(),
|
|
8491
8624
|
wallet: settings.config.wallet?.trim() ?? "",
|
|
@@ -21001,7 +21134,12 @@ var Apps = class {
|
|
|
21001
21134
|
*/
|
|
21002
21135
|
async readStopping(version, urls) {
|
|
21003
21136
|
const read = await this.readRevocations(version.ref, urls) ?? [];
|
|
21004
|
-
|
|
21137
|
+
await this.keepStopping(version, read);
|
|
21138
|
+
return read;
|
|
21139
|
+
}
|
|
21140
|
+
/** Keeps those of these verified revocations that stop `version`, with the profile's and on the installed app. */
|
|
21141
|
+
async keepStopping(version, revocations) {
|
|
21142
|
+
const stops = stopping([version], revocations);
|
|
21005
21143
|
if (stops.length) {
|
|
21006
21144
|
const tx = (await openDb()).transaction(STORES$1.settings, "readwrite");
|
|
21007
21145
|
keepRevocations(tx.objectStore(STORES$1.settings), version.ref, stops);
|
|
@@ -21009,7 +21147,6 @@ var Apps = class {
|
|
|
21009
21147
|
const installed = await this.app(version.ref);
|
|
21010
21148
|
if (installed) await this.keepOnRecord(installed, stops);
|
|
21011
21149
|
}
|
|
21012
|
-
return read;
|
|
21013
21150
|
}
|
|
21014
21151
|
async stage(bundle, bytes, from, fromStore, carried = false) {
|
|
21015
21152
|
const { manifest, digest } = bundle;
|
|
@@ -21017,6 +21154,7 @@ var Apps = class {
|
|
|
21017
21154
|
const read = carried ? [] : await this.readStopping(version, [from, ...manifest.sources ?? []]);
|
|
21018
21155
|
const revocations = [...await this.keptRevocationsOf(version.ref), ...read];
|
|
21019
21156
|
const [installed, stores] = await Promise.all([this.app(version.ref), this.stores()]);
|
|
21157
|
+
await this.keepStopping(version, stores.flatMap((s) => s.index?.revoked ?? []));
|
|
21020
21158
|
const decision = installDecision(installed, version);
|
|
21021
21159
|
const install = decision === "other-app" ? "new" : decision;
|
|
21022
21160
|
const asks = install === "new" ? [...manifest.permissions] : install === "update" ? manifest.permissions.filter((p) => !installed.permissions.includes(p)) : [];
|
|
@@ -23627,6 +23765,27 @@ function deviceSetOf(record) {
|
|
|
23627
23765
|
});
|
|
23628
23766
|
}
|
|
23629
23767
|
/**
|
|
23768
|
+
* The set a device keeps from a record of its set that it read, against the set it holds (`held`) and the record it
|
|
23769
|
+
* stored (`stored`). A record written by the device the stored record names active, or under a release that device
|
|
23770
|
+
* signed, is that device's to write: its slots are taken as they are. Any other is a takeover by a holder of `D`, who
|
|
23771
|
+
* signs with the key of the slot it writes from: that slot is taken (the device that took the turn, a restored copy
|
|
23772
|
+
* with a key of its own), so it is named and can be removed; every other slot stays as held, its name aside. A key it
|
|
23773
|
+
* added or swapped in elsewhere is never listed here, so a new device secret never goes to it.
|
|
23774
|
+
*/
|
|
23775
|
+
function adoptedSet(held, stored, record) {
|
|
23776
|
+
const set = deviceSetOf(record);
|
|
23777
|
+
const believed = stored && !stored.tombstone ? stored.slots[stored.active]?.key : void 0;
|
|
23778
|
+
const from = (slot) => slot !== void 0 && !!believed && !!record.slots[slot] && bytesEqual(record.slots[slot].key, believed);
|
|
23779
|
+
if (!stored || from(record.author) || from(record.release?.from)) return set;
|
|
23780
|
+
const author = set[record.author];
|
|
23781
|
+
return Array.from({ length: Math.max(set.length, held.length) }, (_, i) => {
|
|
23782
|
+
if (i === record.author) return author;
|
|
23783
|
+
const was = held[i] ?? null;
|
|
23784
|
+
if (!was || was.key === author.key) return null;
|
|
23785
|
+
return set[i]?.key === was.key ? set[i] : was;
|
|
23786
|
+
});
|
|
23787
|
+
}
|
|
23788
|
+
/**
|
|
23630
23789
|
* The slots of the first record of a turn this device raises (WISP 06 § Who may raise the turn): those of the newest
|
|
23631
23790
|
* record of the set it knows. The read the raise acts on may return a record above the one it stored (a device added or
|
|
23632
23791
|
* renamed since its last read); when that record still lists this device in its own slot, its slots are written, with
|
|
@@ -23640,7 +23799,7 @@ function newestSlots(held, read) {
|
|
|
23640
23799
|
if (held.storedRecord && news.sequence <= held.storedRecord.sequence) return void 0;
|
|
23641
23800
|
const listed = news.slots[held.ownSlot];
|
|
23642
23801
|
if (!listed || !bytesEqual(listed.key, held.ownKey)) return void 0;
|
|
23643
|
-
const set =
|
|
23802
|
+
const set = adoptedSet(held.record.deviceSet, held.storedRecord, news);
|
|
23644
23803
|
return set.map((slot, i) => slot ?? (held.record.deviceSet[i] && !set.some((s) => s?.key === held.record.deviceSet[i].key) ? held.record.deviceSet[i] : null));
|
|
23645
23804
|
}
|
|
23646
23805
|
var TurnKeeper = class {
|
|
@@ -24117,7 +24276,7 @@ var TurnKeeper = class {
|
|
|
24117
24276
|
const listed = read.record?.slots[held.ownSlot];
|
|
24118
24277
|
const replacedBy = state === "superseded" && read.result === "other" && read.record && !!listed && toBase64Url(listed.key) === toBase64Url(held.ownKey) ? {
|
|
24119
24278
|
activeSlot: read.record.active,
|
|
24120
|
-
deviceSet:
|
|
24279
|
+
deviceSet: adoptedSet(held.record.deviceSet, held.storedRecord, read.record)
|
|
24121
24280
|
} : {};
|
|
24122
24281
|
const tombstoned = state === "moving" && read.result === "tombstone" && read.record && read.payload ? {
|
|
24123
24282
|
tombstone: toBase64Url(read.payload),
|
|
@@ -24172,7 +24331,7 @@ var TurnKeeper = class {
|
|
|
24172
24331
|
rev: read.record.rev,
|
|
24173
24332
|
turnPacket: toBase64Url(read.payload),
|
|
24174
24333
|
activeSlot: read.record.active,
|
|
24175
|
-
deviceSet:
|
|
24334
|
+
deviceSet: adoptedSet(held.record.deviceSet, held.storedRecord, read.record)
|
|
24176
24335
|
});
|
|
24177
24336
|
const active = held.record.activeSlot === void 0 ? void 0 : held.record.deviceSet[held.record.activeSlot]?.name;
|
|
24178
24337
|
const taker = held.record.handoff?.release?.to;
|
|
@@ -33792,14 +33951,10 @@ function admissionsHeld(s) {
|
|
|
33792
33951
|
return !s.isAdmin && membersAtBound(s);
|
|
33793
33952
|
}
|
|
33794
33953
|
function membersAtBound(s) {
|
|
33795
|
-
const
|
|
33796
|
-
|
|
33797
|
-
|
|
33798
|
-
|
|
33799
|
-
if (c.k === "create" || c.k === "role" || c.by === admin && c.k !== "remove" && c.k !== "leave") break;
|
|
33800
|
-
if (c.k === "add") n++;
|
|
33801
|
-
}
|
|
33802
|
-
return n >= COMMUNITY_LIMITS.memberAdmissions;
|
|
33954
|
+
const chain = s.state.chain;
|
|
33955
|
+
return memberAdmissions(s.admin, (function* () {
|
|
33956
|
+
for (let i = chain.length - 1; i >= 0; i--) yield chain[i];
|
|
33957
|
+
})()) >= COMMUNITY_LIMITS.memberAdmissions;
|
|
33803
33958
|
}
|
|
33804
33959
|
/**
|
|
33805
33960
|
* Whether the admin's app is wanted at the door: the members signed all the admissions in a row they may, and only the
|
|
@@ -41200,8 +41355,13 @@ var fieldsOf = (frame) => ({
|
|
|
41200
41355
|
...frame.a ? { ask: true } : {},
|
|
41201
41356
|
createdAt: frame.ts
|
|
41202
41357
|
});
|
|
41203
|
-
/**
|
|
41204
|
-
|
|
41358
|
+
/**
|
|
41359
|
+
* Whether `author`'s `frame` may count for the note kept so far: one about another payment under the same id never
|
|
41360
|
+
* does. Who pays is the note's too: a request made to one member is claimed by that member alone, and a member who did
|
|
41361
|
+
* not know a request was made to the group claims it as itself. A request nobody described yet takes any claim: the
|
|
41362
|
+
* payee's description keeps only those that fit (mergeGroupPay).
|
|
41363
|
+
*/
|
|
41364
|
+
var believed = (current, frame, author, members) => mayAuthor(frame, author, members, current) && (!current || current.kind === (frame.k === "req" ? "request" : "payment") && current.to === frame.to && (current.from === frame.f || frame.k === "req" && (!!current.undescribed || current.from === "*" && author !== frame.to)));
|
|
41205
41365
|
/**
|
|
41206
41366
|
* The note after `author` said `frame`, or undefined when that changes nothing (or may not be believed). What a
|
|
41207
41367
|
* payment is (who, how much, over what) is its initiator's to say: the payee's for a request, the payer's for a
|
|
@@ -41220,6 +41380,13 @@ function mergeGroupPay(current, frame, author, members) {
|
|
|
41220
41380
|
...next,
|
|
41221
41381
|
...fields
|
|
41222
41382
|
});
|
|
41383
|
+
if (author === initiator && next.from !== "*" && next.claims?.some((k) => k !== next.from)) {
|
|
41384
|
+
const claims = next.claims.filter((k) => k === next.from);
|
|
41385
|
+
next = claims.length ? {
|
|
41386
|
+
...next,
|
|
41387
|
+
claims
|
|
41388
|
+
} : (({ claims: _, ...rest }) => rest)(next);
|
|
41389
|
+
}
|
|
41223
41390
|
if (frame.k === "req" && author !== frame.to) {
|
|
41224
41391
|
const claims = frame.st === "sent" ? [.../* @__PURE__ */ new Set([...next.claims ?? [], author])].sort() : (next.claims ?? []).filter((k) => k !== author);
|
|
41225
41392
|
next = claims.length ? {
|
|
@@ -41277,7 +41444,7 @@ function authoredNote(p, at, all, current, memberOf = () => void 0, federationNe
|
|
|
41277
41444
|
if (p.kind === "request" && p.direction === "out") {
|
|
41278
41445
|
const from = p.group ? "*" : at.peer;
|
|
41279
41446
|
if (!from) return null;
|
|
41280
|
-
const payment = all.find((x) => x.kind === "payment" && x.direction === "in" && x.requestId === p.id && x.state === "settled");
|
|
41447
|
+
const payment = all.find((x) => x.kind === "payment" && x.direction === "in" && x.requestId === p.id && x.state === "settled" && !x.federation && x.amount >= p.amount && (!p.mint || x.mint === p.mint));
|
|
41281
41448
|
const by = !p.group ? from : payment ? memberOf(payment.linkId) : void 0;
|
|
41282
41449
|
const st = p.state === "settled" ? "paid" : p.state === "failed" || p.state === "reclaimed" ? "closed" : "open";
|
|
41283
41450
|
return {
|
|
@@ -49222,6 +49389,8 @@ var PaymentDesk = class {
|
|
|
49222
49389
|
});
|
|
49223
49390
|
return;
|
|
49224
49391
|
}
|
|
49392
|
+
const requestId = this.paysRequest(payment.requestId, linkId);
|
|
49393
|
+
const paysGroup = !!requestId && !!this.payments.get(requestId)?.group;
|
|
49225
49394
|
await this.save({
|
|
49226
49395
|
id: payment.id,
|
|
49227
49396
|
linkId,
|
|
@@ -49232,7 +49401,7 @@ var PaymentDesk = class {
|
|
|
49232
49401
|
memo: payment.memo,
|
|
49233
49402
|
state: "pending",
|
|
49234
49403
|
createdAt: payment.timestamp,
|
|
49235
|
-
requestId:
|
|
49404
|
+
requestId: paysGroup ? void 0 : requestId,
|
|
49236
49405
|
federation: found.federation,
|
|
49237
49406
|
token: notes,
|
|
49238
49407
|
notesDigest: digest,
|
|
@@ -51271,6 +51440,7 @@ var GhostlyNode = class GhostlyNode {
|
|
|
51271
51440
|
},
|
|
51272
51441
|
linkIds: () => [...this.links.keys()],
|
|
51273
51442
|
online: () => this.networkOn,
|
|
51443
|
+
fetcher: (...request) => (this.options.identityFetch ?? globalThis.fetch)(...request),
|
|
51274
51444
|
relayOnly: () => this.settings.relayOnly === true,
|
|
51275
51445
|
emit: () => {
|
|
51276
51446
|
this.emitState();
|
|
@@ -51463,6 +51633,10 @@ var GhostlyNode = class GhostlyNode {
|
|
|
51463
51633
|
publicProfiles = new PublicProfiles({
|
|
51464
51634
|
enabled: () => this.settings.publicProfiles !== false,
|
|
51465
51635
|
online: () => this.networkOn,
|
|
51636
|
+
fetch: boundedIdentityFetch({
|
|
51637
|
+
online: () => this.networkOn,
|
|
51638
|
+
fetcher: (...request) => (this.options.identityFetch ?? globalThis.fetch)(...request)
|
|
51639
|
+
}),
|
|
51466
51640
|
emit: () => this.emitState(),
|
|
51467
51641
|
eligible: () => this.profileSubjects(),
|
|
51468
51642
|
nostrRelays: () => effectiveNostrSettings(this.settings.nostr).relays,
|
|
@@ -51473,6 +51647,10 @@ var GhostlyNode = class GhostlyNode {
|
|
|
51473
51647
|
publicActivity = new PublicActivity({
|
|
51474
51648
|
enabled: () => this.settings.publicProfiles !== false,
|
|
51475
51649
|
online: () => this.networkOn,
|
|
51650
|
+
fetch: boundedIdentityFetch({
|
|
51651
|
+
online: () => this.networkOn,
|
|
51652
|
+
fetcher: (...request) => (this.options.identityFetch ?? globalThis.fetch)(...request)
|
|
51653
|
+
}),
|
|
51476
51654
|
eligible: () => this.profileSubjects(),
|
|
51477
51655
|
nostrRelays: () => effectiveNostrSettings(this.settings.nostr).relays,
|
|
51478
51656
|
own: () => this.ownProfileSubjects(),
|
|
@@ -54149,6 +54327,7 @@ var GhostlyNode = class GhostlyNode {
|
|
|
54149
54327
|
if (filesEnded) setTimeout(() => void live.link?.stop(true), FILES_END_MS);
|
|
54150
54328
|
else live.link?.stop(true);
|
|
54151
54329
|
live.caps?.stop();
|
|
54330
|
+
this.unshareServicesOf(live.stored.peerPubKeyZ32);
|
|
54152
54331
|
this.identities.forget(linkId);
|
|
54153
54332
|
this.nostrSocial.forgetLink(linkId);
|
|
54154
54333
|
this.hold.forgetLink(linkId);
|
|
@@ -55461,7 +55640,7 @@ var GhostlyNode = class GhostlyNode {
|
|
|
55461
55640
|
}).catch(() => {});
|
|
55462
55641
|
this.hold.forget(linkId, messageId).catch(() => {});
|
|
55463
55642
|
const message = await db.getMessage(linkId, messageId);
|
|
55464
|
-
const withdrawn = message?.sender === "me" && message.wireId && live.link
|
|
55643
|
+
const withdrawn = message?.sender === "me" && message.wireId && (!live.link || live.link.dhtHolds(message.wireId)) ? this.withdrawFromFloor(live, message.wireId) : void 0;
|
|
55465
55644
|
if (message && contactJoinRow(message) && !live.stored.group && !live.stored.peerSpoke) {
|
|
55466
55645
|
this.contactSpoke.add(live);
|
|
55467
55646
|
live.stored = {
|
|
@@ -55825,13 +56004,34 @@ var GhostlyNode = class GhostlyNode {
|
|
|
55825
56004
|
/** The waiting files whose offer is being said on the DHT floor right now (`sayFileOnFloor`), by file id. */
|
|
55826
56005
|
floorSaying = /* @__PURE__ */ new Set();
|
|
55827
56006
|
/**
|
|
56007
|
+
* A text of mine, or a file's offer, deleted here leaves the DHT floor (`withdrawDht`). With no link running (the
|
|
56008
|
+
* profile offline, the chat not started yet), the floor's saved state lets go of it instead: kept there, the next
|
|
56009
|
+
* start published it again to the away contact, and `--purge` left its words in the chat's row (agents#6005). Its
|
|
56010
|
+
* envelope may still be on the relays: the chat's next link puts its first one out at once (`floorReplace`).
|
|
56011
|
+
*/
|
|
56012
|
+
async withdrawFromFloor(live, floorId) {
|
|
56013
|
+
if (live.link) {
|
|
56014
|
+
await live.link.withdrawDht(floorId).catch(() => {});
|
|
56015
|
+
return;
|
|
56016
|
+
}
|
|
56017
|
+
const state = live.stored.dhtDeliveryState, pending = state?.pending;
|
|
56018
|
+
if (!state || !pending || pending.message[0] !== floorId && pending.edit?.[0] !== floorId) return;
|
|
56019
|
+
const { pending: _withdrawn, ...kept } = state;
|
|
56020
|
+
live.stored = {
|
|
56021
|
+
...live.stored,
|
|
56022
|
+
dhtDeliveryState: kept
|
|
56023
|
+
};
|
|
56024
|
+
if (pending.attempts > 0 && pending.expires > Date.now()) live.floorReplace = true;
|
|
56025
|
+
await db.patchLink(live.stored.id, { dhtDeliveryState: kept }).catch(() => {});
|
|
56026
|
+
}
|
|
56027
|
+
/**
|
|
55828
56028
|
* A file of mine said on the floor and deleted here before it went live: the floor stops saying it (`withdrawDht`: a
|
|
55829
56029
|
* new envelope without it takes its place, as for a text; only settled, the relays kept its offer for minutes and a
|
|
55830
56030
|
* contact who read them then got its bubble), and the next session that carries files/3 tells a bubble the contact
|
|
55831
56031
|
* already has that it was cancelled (`sayWithdrawnFiles`).
|
|
55832
56032
|
*/
|
|
55833
56033
|
async withdrawFloorFile(live, wireId) {
|
|
55834
|
-
await
|
|
56034
|
+
await this.withdrawFromFloor(live, dhtFileId(wireId));
|
|
55835
56035
|
live.stored = {
|
|
55836
56036
|
...live.stored,
|
|
55837
56037
|
withdrawnFiles: [...(live.stored.withdrawnFiles ?? []).filter((id) => id !== wireId), wireId].slice(-64)
|
|
@@ -58522,6 +58722,19 @@ var GhostlyNode = class GhostlyNode {
|
|
|
58522
58722
|
db.putService(service);
|
|
58523
58723
|
this.servicesChanged();
|
|
58524
58724
|
}
|
|
58725
|
+
/**
|
|
58726
|
+
* A deleted chat's contact loses the services shared with it, unless another chat with the same key is left. Kept,
|
|
58727
|
+
* the grant had no chat to be turned off from, and the same invite joined again (the same key) was served again.
|
|
58728
|
+
*/
|
|
58729
|
+
unshareServicesOf(peerPubKeyZ32) {
|
|
58730
|
+
if (!peerPubKeyZ32 || [...this.links.values()].some(({ stored }) => !stored.group && stored.peerPubKeyZ32 === peerPubKeyZ32)) return;
|
|
58731
|
+
const granted = this.services.filter((s) => s.sharedWith?.includes(peerPubKeyZ32));
|
|
58732
|
+
for (const service of granted) {
|
|
58733
|
+
service.sharedWith = service.sharedWith.filter((k) => k !== peerPubKeyZ32);
|
|
58734
|
+
db.putService(service);
|
|
58735
|
+
}
|
|
58736
|
+
if (granted.length) this.servicesChanged();
|
|
58737
|
+
}
|
|
58525
58738
|
setServiceEnabled({ serviceId, enabled }) {
|
|
58526
58739
|
const service = this.services.find((s) => s.id === serviceId);
|
|
58527
58740
|
if (!service || service.enabled === enabled) return;
|
|
@@ -60217,7 +60430,7 @@ var GhostlyNode = class GhostlyNode {
|
|
|
60217
60430
|
dhtDeliveryState: state
|
|
60218
60431
|
};
|
|
60219
60432
|
},
|
|
60220
|
-
firstControlAfterMs: STARTUP_QUIET_MS,
|
|
60433
|
+
firstControlAfterMs: live.floorReplace ? 0 : STARTUP_QUIET_MS,
|
|
60221
60434
|
...this.options.peerDhtPollMs ? { peerDhtPollMs: this.options.peerDhtPollMs } : {},
|
|
60222
60435
|
capsRev: () => live.caps?.rev,
|
|
60223
60436
|
peerCapsRev: (rev) => live.caps?.peerRev(rev),
|
|
@@ -60590,6 +60803,7 @@ var GhostlyNode = class GhostlyNode {
|
|
|
60590
60803
|
}, () => this.links.get(linkId) === live)
|
|
60591
60804
|
});
|
|
60592
60805
|
const link = live.link;
|
|
60806
|
+
live.floorReplace = void 0;
|
|
60593
60807
|
const said = stored.profile && !stored.group ? this.statusToSay() : {};
|
|
60594
60808
|
if (said.presence || said.status) link.setStatus(said);
|
|
60595
60809
|
if (linkId === this.activeLinkId) link.setChatActive(true);
|
|
@@ -60744,7 +60958,7 @@ var GhostlyNode = class GhostlyNode {
|
|
|
60744
60958
|
nativeFactoriesFor(relayOnly) {
|
|
60745
60959
|
const relay = relayOnly || this.relaysHyperdhtNatively ? this.hyperdhtRelay : "";
|
|
60746
60960
|
return {
|
|
60747
|
-
...relay ? { "hyperdht/1": async (seedB64) => (await import("./hyperdhtRelay-
|
|
60961
|
+
...relay ? { "hyperdht/1": async (seedB64) => (await import("./hyperdhtRelay-DLUiwfnt.js")).createRelayedHyperEndpoint(seedB64, relay) } : {},
|
|
60748
60962
|
...relayOnly ? {} : this.options.nativeTransports,
|
|
60749
60963
|
...this.ownIrohRelays && !relayOnly ? { "iroh/1": (seedB64) => this.options.nativeTransports["iroh/1"](seedB64, this.settings.irohRelays?.length ? { relays: [...this.settings.irohRelays] } : {}) } : {},
|
|
60750
60964
|
...this.options.irohWeb ? { "iroh/1": (seedB64) => createIrohWebEndpoint(seedB64, {
|
|
@@ -62290,4 +62504,4 @@ function signalKind(signal) {
|
|
|
62290
62504
|
}
|
|
62291
62505
|
export { EngineServer, credentials as n, bitcoindRpc as t };
|
|
62292
62506
|
|
|
62293
|
-
//# sourceMappingURL=server-
|
|
62507
|
+
//# sourceMappingURL=server-D4gf-LnD.js.map
|