@ghostlytools/sdk 1.5.2 → 1.5.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/dist/core.js +2 -2
- package/dist/{fakes-Cv1fbTsq.js → fakes-D-JbuhQ4.js} +2 -2
- package/dist/{fakes-Cv1fbTsq.js.map → fakes-D-JbuhQ4.js.map} +1 -1
- package/dist/fakes.js +1 -1
- package/dist/index.js +2 -2
- package/dist/{keet-identity-key-BbPBaPLM.js → keet-identity-key-BD-CUVMM.js} +2 -2
- package/dist/{keet-identity-key-BbPBaPLM.js.map → keet-identity-key-BD-CUVMM.js.map} +1 -1
- package/dist/{src-CdbSH6qQ.js → src-ByyR0v69.js} +524 -116
- package/dist/src-ByyR0v69.js.map +1 -0
- package/dist/testing.js +3 -3
- package/dist/types/core/src/capsRecord.d.ts +2 -0
- package/dist/types/core/src/catchUp.d.ts +2 -2
- package/dist/types/core/src/chatFiles.d.ts +44 -17
- package/dist/types/core/src/engineErrors.d.ts +2 -0
- package/dist/types/core/src/ghostlink.d.ts +40 -3
- package/dist/types/core/src/groupCommunity.d.ts +40 -7
- package/dist/types/core/src/groupEntry.d.ts +4 -1
- package/dist/types/core/src/groupFiles.d.ts +5 -1
- package/dist/types/core/src/groupSession.d.ts +7 -0
- package/dist/types/core/src/groupSignals.d.ts +1 -0
- package/dist/types/core/src/invite.d.ts +7 -0
- package/dist/types/core/src/link.d.ts +8 -1
- package/dist/types/core/src/pairedAppRanges.d.ts +5 -0
- package/dist/types/core/src/pairedSession.d.ts +2 -0
- package/dist/types/core/src/relay.d.ts +5 -1
- package/dist/types/core/src/text.d.ts +7 -0
- package/dist/types/core/src/transport.d.ts +7 -0
- package/dist/{verify-BRGDhyk0.js → verify-D803jJ3k.js} +2 -2
- package/dist/{verify-BRGDhyk0.js.map → verify-D803jJ3k.js.map} +1 -1
- package/package.json +1 -1
- package/dist/src-CdbSH6qQ.js.map +0 -1
package/dist/testing.js
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { $u as identityStatement, EC as createIdentity, Ju as IdentityExchange, Oa as decodeBolt11, Ru as IDENTITY_MAX_EVIDENCE, Xu as emptyIdentityLedger, nd as newIdentityBinding, ra as isBitcoinAddress } from "./src-ByyR0v69.js";
|
|
2
2
|
import { l as providerDescriptorProblems, o as isNothingSpentError } from "./types-DvtCy3WB.js";
|
|
3
|
-
import { i as verifyIdentity, r as descriptorProblems } from "./verify-
|
|
4
|
-
import { _ as fakeAddress, a as fakeAccount, b as fakeOnchain, c as fakeKeySign, d as fakeRecord, f as fakeRecordText, g as TEST_PROVIDERS_FLAG, h as FakeOnchainProvider, i as TEST_IDENTITIES_FLAG, l as fakeKeySubject, m as FakeLightningProvider, n as FAKE_ISSUER, o as fakeAccountToken, p as testIdentitiesEnabled, r as FAKE_RECORD_HOST, s as fakeKey, t as FAKE_IDENTITY_PROVIDERS, u as fakeKeyring, v as fakeInvoice, x as testProvidersEnabled, y as fakeLightning } from "./fakes-
|
|
3
|
+
import { i as verifyIdentity, r as descriptorProblems } from "./verify-D803jJ3k.js";
|
|
4
|
+
import { _ as fakeAddress, a as fakeAccount, b as fakeOnchain, c as fakeKeySign, d as fakeRecord, f as fakeRecordText, g as TEST_PROVIDERS_FLAG, h as FakeOnchainProvider, i as TEST_IDENTITIES_FLAG, l as fakeKeySubject, m as FakeLightningProvider, n as FAKE_ISSUER, o as fakeAccountToken, p as testIdentitiesEnabled, r as FAKE_RECORD_HOST, s as fakeKey, t as FAKE_IDENTITY_PROVIDERS, u as fakeKeyring, v as fakeInvoice, x as testProvidersEnabled, y as fakeLightning } from "./fakes-D-JbuhQ4.js";
|
|
5
5
|
import { afterEach, describe, expect, it, vi } from "vitest";
|
|
6
6
|
//#region ../browser/src/engine/paymentAdapters/providers/contractSuite.ts
|
|
7
7
|
var WAIT = 1e4;
|
|
@@ -121,6 +121,8 @@ export declare class CapsKeys {
|
|
|
121
121
|
private readonly seed;
|
|
122
122
|
private readonly inviteKey;
|
|
123
123
|
constructor(params: LinkParams, participationSeedB64: string);
|
|
124
|
+
/** The key sealed for each pinned contact: one X25519 per contact and link, not one per seal and open (agents#1087). */
|
|
125
|
+
private readonly pinned;
|
|
124
126
|
private pinnedKey;
|
|
125
127
|
private signable;
|
|
126
128
|
/**
|
|
@@ -47,8 +47,8 @@ export declare class CatchUpAnswers<F> {
|
|
|
47
47
|
constructor(hooks: CatchUpHooks<F>);
|
|
48
48
|
/**
|
|
49
49
|
* The first two slices go now, the rest without holding the group's other frames back. A newer answer to the same
|
|
50
|
-
* member goes after what is left of the last, without the frames still queued there (the same objects: a store's
|
|
51
|
-
* nor those still on their way (`onTheirWay`); it took their place before, and left out what the member's `have`
|
|
50
|
+
* member goes after what is left of the last, without the frames still queued there (the same objects: a store's, or
|
|
51
|
+
* the same `key`) nor those still on their way (`onTheirWay`); it took their place before, and left out what the member's `have`
|
|
52
52
|
* said it held: a live frame of an author raises it above that author's frames still queued, which were lost for
|
|
53
53
|
* good. A frame the edge did not take ends the answer (the member asks again when its edge opens).
|
|
54
54
|
*/
|
|
@@ -184,6 +184,41 @@ export interface ChatFilesHost {
|
|
|
184
184
|
*/
|
|
185
185
|
resend?(record: FileTransferRecord, sent: number): boolean;
|
|
186
186
|
now?(): number;
|
|
187
|
+
/**
|
|
188
|
+
* The uplink this chat's files share with others that leave the device by it (`FileUplink`): a group's edges, each
|
|
189
|
+
* a `ChatFiles` of its own, serving one file to several members at once. Absent: the uplink is this chat's alone.
|
|
190
|
+
*/
|
|
191
|
+
uplink?: FileUplink;
|
|
192
|
+
}
|
|
193
|
+
/** What a `FileUplink` asks of the `ChatFiles` that share it. */
|
|
194
|
+
interface UplinkMember {
|
|
195
|
+
/** Its files are sending: bytes in flight, or held for the window. */
|
|
196
|
+
sending(): boolean;
|
|
197
|
+
/** The shortest round trip its files saw on its own session. */
|
|
198
|
+
baseRtt(): number;
|
|
199
|
+
}
|
|
200
|
+
/**
|
|
201
|
+
* The uplink several chats' files leave the device by. Each chat paces its files by its own path (`FilePace`), down to
|
|
202
|
+
* a floor of `FILE_LIMITS.minWindowBytes`; on one uplink, that floor is shared out among the chats sending at once.
|
|
203
|
+
* Each with a floor of its own, a member serving a file to three members on a 1 Mbit/s uplink kept 192 KiB in flight,
|
|
204
|
+
* and everything else it sent (texts, a ring, a call's voice) waited 1-2 s behind them, up to 5.8 s (agents#1569). A
|
|
205
|
+
* chat whose receiver barely confirms holds only its share, never the others' bytes. Each chat also reads the queue
|
|
206
|
+
* against the lowest round trip of the uplink's chats, not its own alone (`lowestBase`).
|
|
207
|
+
*/
|
|
208
|
+
export declare class FileUplink {
|
|
209
|
+
private readonly members;
|
|
210
|
+
join(member: UplinkMember): void;
|
|
211
|
+
leave(member: UplinkMember): void;
|
|
212
|
+
/**
|
|
213
|
+
* The floor of one chat's window: its share of `minWindowBytes` among the chats sending, in whole chunks, a chunk at
|
|
214
|
+
* least (a window sends chunks while what is in flight is under it: 21 KiB would let two go).
|
|
215
|
+
*/
|
|
216
|
+
floor(): number;
|
|
217
|
+
/**
|
|
218
|
+
* The shortest round trip any chat on the uplink saw: its path with the least queue. Each chat's own counts the
|
|
219
|
+
* others' queue on the shared uplink as its path (428-637 ms read on a 1-10 ms path), and so never sees one.
|
|
220
|
+
*/
|
|
221
|
+
lowestBase(): number;
|
|
187
222
|
}
|
|
188
223
|
/**
|
|
189
224
|
* files/4 (WISP 501 § files/4): a chunk as one binary message of the session, in place of the base64url text of a
|
|
@@ -214,15 +249,15 @@ export declare class ChatFiles {
|
|
|
214
249
|
private readonly held;
|
|
215
250
|
private attached;
|
|
216
251
|
private peerRoomValue;
|
|
217
|
-
/**
|
|
218
|
-
private
|
|
219
|
-
/** The shortest round trip of a chunk to its confirm on this session: the path without a queue. */
|
|
220
|
-
private baseRtt;
|
|
221
|
-
/** When a confirm last came close to `baseRtt`, or a probe measured it. */
|
|
222
|
-
private baseAt;
|
|
223
|
-
/** The path's own round trip is being measured: one chunk in flight from `since`, until one sent then is confirmed. */
|
|
224
|
-
private probe?;
|
|
252
|
+
/** What the chat's files may have in flight, sized by the path. */
|
|
253
|
+
private readonly pace;
|
|
225
254
|
constructor(host: ChatFilesHost);
|
|
255
|
+
/** The floor of this chat's window: all of `minWindowBytes`, or its share of an uplink it shares (`FileUplink`). */
|
|
256
|
+
private floor;
|
|
257
|
+
/** Its files are sending: bytes in flight, or held for the window (`FileUplink`). */
|
|
258
|
+
sending(): boolean;
|
|
259
|
+
/** The shortest round trip this chat's files saw on its session (`FileUplink.lowestBase`). */
|
|
260
|
+
baseRtt(): number;
|
|
226
261
|
private now;
|
|
227
262
|
/** Records kept from before a restart. Nothing is sent until `attach`. */
|
|
228
263
|
restore(records: FileTransferRecord[]): void;
|
|
@@ -256,15 +291,6 @@ export declare class ChatFiles {
|
|
|
256
291
|
/** Whether this file's own window lets it send more. */
|
|
257
292
|
private fileMayPump;
|
|
258
293
|
private shouldPump;
|
|
259
|
-
/**
|
|
260
|
-
* A confirm came for a chunk sent at `sentAt` with `flight` bytes in flight then: the window becomes what keeps the path
|
|
261
|
-
* busy with no more than `FILE_LIMITS.queueMs` of queue on it (delay-based, as LEDBAT). Throughput is about
|
|
262
|
-
* flight / rtt, so flight × (base + queueMs) / rtt: it grows while confirms come about as fast as they can, and shrinks
|
|
263
|
-
* when they slow down because the files queue on a slow uplink, ahead of everything else the sender says there.
|
|
264
|
-
* The base is measured again once no confirm has come close to it for `FILE_LIMITS.baseProbeMs`: with one chunk in
|
|
265
|
-
* flight, so the queue drains first and a slow link's own queue never passes for a longer path.
|
|
266
|
-
*/
|
|
267
|
-
private paced;
|
|
268
294
|
/** Bytes this chat's files sent and have not seen confirmed. */
|
|
269
295
|
private inFlight;
|
|
270
296
|
/** Bytes were confirmed, or a file stopped sending: the files the chat's window held go on, before the one that freed it. */
|
|
@@ -339,3 +365,4 @@ export declare class ChatFiles {
|
|
|
339
365
|
/** Forgets a transfer (its message was deleted): an unfinished one is cancelled on both sides first. */
|
|
340
366
|
forget(direction: "in" | "out", id: string): void;
|
|
341
367
|
}
|
|
368
|
+
export {};
|
|
@@ -52,6 +52,8 @@ export declare const ENGINE_ERRORS: {
|
|
|
52
52
|
readonly paymentTakenBack: "This payment was taken back. The sats are in your wallet.";
|
|
53
53
|
readonly parkedSigned: "Needs your decision: this payment was signed before this copy of your profile took over. It is never sent again from here. Check it before you pay again.";
|
|
54
54
|
readonly contactAway: "Your contact is offline. Nothing was sent: pay once the chat is live.";
|
|
55
|
+
readonly contactNoWallet: "Your contact has no wallet yet: they need one to pay or be paid";
|
|
56
|
+
readonly contactNoPayments: "Your contact has payments off in this chat, or needs an updated Ghostly";
|
|
55
57
|
readonly realMoneyUnconfirmed: "This pays with real money: confirm it with Send real money first. Nothing was sent.";
|
|
56
58
|
readonly mainnetPaymentOnTestnet: "This is a Mainnet payment (real money): a Testnet wallet never pays it. Use a Mainnet wallet.";
|
|
57
59
|
readonly testnetPaymentOnMainnet: "This is a Testnet payment (test coins): a Mainnet wallet never pays it. Use a Testnet wallet.";
|
|
@@ -125,6 +125,11 @@ export declare const ANSWERS_REFUSED_PAUSE_MS = 2000;
|
|
|
125
125
|
*/
|
|
126
126
|
export declare const PAIRING_ATTEMPT_MS = 15000;
|
|
127
127
|
export declare const PAIRING_RETRY_MS = 3000;
|
|
128
|
+
/**
|
|
129
|
+
* How long a first pairing that has not gone live keeps a first pairing's dials (`firstPairing`): both sides, at
|
|
130
|
+
* `PAIRING_RETRY_MS`. Past it, a chat that only ever ran on the DHT dials as a saved contact's does.
|
|
131
|
+
*/
|
|
132
|
+
export declare const FIRST_PAIRING_PACE_MS: number;
|
|
128
133
|
/** An inviter that sees the joiner without its offer waits this long for one before offering itself. */
|
|
129
134
|
export declare const INVITER_DIAL_GRACE_MS = 2500;
|
|
130
135
|
/**
|
|
@@ -740,6 +745,12 @@ export declare class GhostLink {
|
|
|
740
745
|
private pongsHeard;
|
|
741
746
|
/** The liveness ping whose pong measures the round trip: its number in `pingsSent`. */
|
|
742
747
|
private rttPing;
|
|
748
|
+
/**
|
|
749
|
+
* Apps' data sent on this session and not yet answered (`APP_IN_FLIGHT`): the bytes each ping that followed them
|
|
750
|
+
* covers, and those sent since the last such ping, which the next one covers.
|
|
751
|
+
*/
|
|
752
|
+
private appInFlight;
|
|
753
|
+
private appUnmarked;
|
|
743
754
|
/** `handled` callers, each waiting for the pong to its ping. */
|
|
744
755
|
private handledWaiters;
|
|
745
756
|
/** The last ping's `PONG_WAIT_MS`: running until something comes back from the contact. */
|
|
@@ -861,6 +872,8 @@ export declare class GhostLink {
|
|
|
861
872
|
private wokeUntil;
|
|
862
873
|
/** Back after a restart, the first automatic dial is still to go (`INSTANT_FAIL_MS`). */
|
|
863
874
|
private resumeDial;
|
|
875
|
+
/** The contact is back (`peerPacketArrived`), and the first automatic dial since is still to go (`BACK_INSTANT_FAIL_MS`). */
|
|
876
|
+
private backDial;
|
|
864
877
|
/** That dial failed at once: the next waits `INSTANT_FAIL_RETRY_MS`, not `dialWait`'s backoff. */
|
|
865
878
|
private instantRetry;
|
|
866
879
|
constructor(options: GhostLinkOptions);
|
|
@@ -1320,6 +1333,16 @@ export declare class GhostLink {
|
|
|
1320
1333
|
* answered again.
|
|
1321
1334
|
*/
|
|
1322
1335
|
private dialSeenNow;
|
|
1336
|
+
/**
|
|
1337
|
+
* Still a first pairing, for its dials (`dialWait`, `awaitsContactDial`): not live yet (nor stopped for good), and
|
|
1338
|
+
* not on the DHT, or on it only because a native stream dial failed, within `FIRST_PAIRING_PACE_MS`. That dial was
|
|
1339
|
+
* the first contact between two apps that just read each other's records, and one that aborts in milliseconds (a
|
|
1340
|
+
* hole punch on a lossy network) dropped the pairing to a saved contact's pace, the lower key alone dialling 20 s,
|
|
1341
|
+
* 40 s, 80 s later: two first dials failing went live after 40 s, and not in 180 s at 15% loss (agents#1657). A
|
|
1342
|
+
* WebRTC offer that connected nothing keeps the saved contact's pace: the other side answers each one, and offers at
|
|
1343
|
+
* a pairing's pace kept it answering, never shown on the DHT.
|
|
1344
|
+
*/
|
|
1345
|
+
private firstPairing;
|
|
1323
1346
|
/** How long after the last automatic dial the next one may go. A first pairing tries again sooner: the contact just read the invite and is waiting. */
|
|
1324
1347
|
private dialWait;
|
|
1325
1348
|
/** The name this side shows, told to a paired peer directly. */
|
|
@@ -1476,9 +1499,15 @@ export declare class GhostLink {
|
|
|
1476
1499
|
* behind an app's data on a link slower than it sends (WISP 1200 § In a chat). While a file goes, that quarter sits
|
|
1477
1500
|
* above what files may hold (`filesWritable`): files keep the channel at their own line for the whole transfer. While
|
|
1478
1501
|
* the file waits for room, the app gets no further than `APP_AHEAD_OF_FILES` ahead of it, so it cannot refill the
|
|
1479
|
-
* channel each time it drains to files' line and keep the file from moving.
|
|
1502
|
+
* channel each time it drains to files' line and keep the file from moving. With a contact that answers pings, it is
|
|
1503
|
+
* also refused while `APP_IN_FLIGHT` of the apps' data has not been answered for: what the transport holds in flight
|
|
1504
|
+
* under the channel counts too.
|
|
1480
1505
|
*/
|
|
1481
1506
|
sendAppData(app: string, data: unknown): AppSendError | null;
|
|
1507
|
+
/** Apps' data sent on this session that the contact has not answered for yet (`APP_IN_FLIGHT`). */
|
|
1508
|
+
private appUnanswered;
|
|
1509
|
+
/** A ping after the apps' data sent since the last one: its pong says the contact handled it. */
|
|
1510
|
+
private markAppData;
|
|
1482
1511
|
/** Both sides offer `app-ranges/1` (and `apps/1`) on the open session: an app's files can be read from the other side. */
|
|
1483
1512
|
get supportsAppRanges(): boolean;
|
|
1484
1513
|
/** Why the read lane cannot be used for `app` now, or null when it can: open on both sides, on a live session that has it. */
|
|
@@ -1512,6 +1541,8 @@ export declare class GhostLink {
|
|
|
1512
1541
|
sendAppRange(task: AppRangeTask, bytes: Uint8Array, size: number): Promise<void>;
|
|
1513
1542
|
/** `task`'s file cannot be read: `changed` or `gone` goes in place of its bytes (nothing once it is no longer live, but its place frees). */
|
|
1514
1543
|
failAppRange(task: AppRangeTask, error: "changed" | "gone"): void;
|
|
1544
|
+
/** Whether `task` still waits for an answer on this session (`AppRanges.holds`): one that does not needs none. */
|
|
1545
|
+
holdsAppRange(task: AppRangeTask): boolean;
|
|
1515
1546
|
/** An `ar-*` frame from the contact, on a session that agreed `app-ranges/1`. */
|
|
1516
1547
|
private receiveAppRange;
|
|
1517
1548
|
/** What the contact had open is gone (`apps/1` is no longer agreed, or this link stopped): each app hears it now. */
|
|
@@ -1659,6 +1690,8 @@ export declare class GhostLink {
|
|
|
1659
1690
|
* answers pings is still handling what came before (a phone with a long history), not one that cannot say.
|
|
1660
1691
|
*/
|
|
1661
1692
|
handled(): Promise<boolean | "late">;
|
|
1693
|
+
/** Frames the contact sent on this session that this app received and has not handled yet: 0 without a session. */
|
|
1694
|
+
framesWaiting(): number;
|
|
1662
1695
|
/** Something came back on the session: the ping's wait is over. */
|
|
1663
1696
|
private heardFromPeer;
|
|
1664
1697
|
/**
|
|
@@ -1710,8 +1743,12 @@ export declare class GhostLink {
|
|
|
1710
1743
|
depart(options?: {
|
|
1711
1744
|
quitting?: boolean;
|
|
1712
1745
|
}): void;
|
|
1713
|
-
/**
|
|
1714
|
-
|
|
1746
|
+
/**
|
|
1747
|
+
* A link made just now for a peer that is about to show up (a group's entry session): look fast for a while.
|
|
1748
|
+
* `awaited`: nothing reaches the peer until this link reads it (the edge to a member just let in): its reads go on the
|
|
1749
|
+
* relays' floor meanwhile (`LinkSession.expectPeer`).
|
|
1750
|
+
*/
|
|
1751
|
+
expectPeer(awaited?: boolean): void;
|
|
1715
1752
|
/** The peer's packet is at hand without a relay (a member of the group carried it, `CarriedTransport`): read it now. */
|
|
1716
1753
|
look(): void;
|
|
1717
1754
|
/**
|
|
@@ -89,7 +89,7 @@ export declare function encodeCommunityLink(link: {
|
|
|
89
89
|
g: string;
|
|
90
90
|
host: string;
|
|
91
91
|
}): string;
|
|
92
|
-
/** A pasted link, a `/join/…` path or the bare code; null when it is not a community group's link. */
|
|
92
|
+
/** A pasted link, a `/join/…` path or the bare code (or one in words: `unwrapPasted`); null when it is not a community group's link. */
|
|
93
93
|
export declare function decodeCommunityLink(input: string): {
|
|
94
94
|
g: string;
|
|
95
95
|
host: string;
|
|
@@ -431,6 +431,11 @@ export interface CommunitySessionHooks {
|
|
|
431
431
|
* the answer asks again. Absent: an answer goes all at once, as before 2026-10-07.
|
|
432
432
|
*/
|
|
433
433
|
handled?(to: string): Promise<CatchUpHandled>;
|
|
434
|
+
/**
|
|
435
|
+
* Whether message `id` was deleted for everyone (WISP 400 § Delete for everyone), by its author or here: a frame of it
|
|
436
|
+
* that comes (a catch-up, a hub passing it on) is not taken, kept or passed on. Absent: none is.
|
|
437
|
+
*/
|
|
438
|
+
removed?(id: string): boolean;
|
|
434
439
|
}
|
|
435
440
|
export declare const communityMessageId: (sender: string, epoch: number, h: string, seq: number) => string;
|
|
436
441
|
/**
|
|
@@ -455,8 +460,11 @@ export declare class CommunitySession {
|
|
|
455
460
|
private known;
|
|
456
461
|
/** Commit hash → roster after it, for the window of the main branch and the side commits. */
|
|
457
462
|
private rosters;
|
|
458
|
-
/**
|
|
459
|
-
|
|
463
|
+
/**
|
|
464
|
+
* Who was in the roster after each main-branch commit, from one replay of the branch: key → the places where it came in
|
|
465
|
+
* and went out, in turn (an open last span while it is in). `through` commits are counted, the last one `top`.
|
|
466
|
+
*/
|
|
467
|
+
private spans;
|
|
460
468
|
private mainIndex;
|
|
461
469
|
private pendingCommits;
|
|
462
470
|
private pendingSecrets;
|
|
@@ -500,7 +508,12 @@ export declare class CommunitySession {
|
|
|
500
508
|
get name(): string;
|
|
501
509
|
get myKey(): string;
|
|
502
510
|
get top(): CommunityCommit;
|
|
511
|
+
/**
|
|
512
|
+
* The top commit's hash, kept for the commit it was taken from: a view reads it for each member (its roster, what
|
|
513
|
+
* each member's lines are missing), and hashing it every time cost tens of milliseconds per state in big communities.
|
|
514
|
+
*/
|
|
503
515
|
get topHash(): string;
|
|
516
|
+
private topHashOf;
|
|
504
517
|
get epoch(): number;
|
|
505
518
|
get roster(): Roster;
|
|
506
519
|
get admin(): string | undefined;
|
|
@@ -521,8 +534,11 @@ export declare class CommunitySession {
|
|
|
521
534
|
* for, and of the roster now. A holder serves a group file only to such a member (WISP 503 § Asking).
|
|
522
535
|
*/
|
|
523
536
|
couldRead(key: string, messageId: string): boolean;
|
|
524
|
-
/**
|
|
525
|
-
|
|
537
|
+
/**
|
|
538
|
+
* Whether `key` was in the roster after the main branch's commit `i`. The branch is replayed once, as `rebuild` does (its
|
|
539
|
+
* leaves were checked when they were taken), and only further as it grows: again from the start only once it changed.
|
|
540
|
+
*/
|
|
541
|
+
private wasInAt;
|
|
526
542
|
/** Someone the chain took out (removed or left) and who is not back in. */
|
|
527
543
|
wasRemoved(key: string): boolean;
|
|
528
544
|
/** When the chain took them out (the commit's time, by its signer's clock), if it did and they are not back in. */
|
|
@@ -679,8 +695,8 @@ export declare class CommunitySession {
|
|
|
679
695
|
}>;
|
|
680
696
|
/**
|
|
681
697
|
* An application frame that says the group's state (`CommunitySessionHooks.lasting`) in place of the one of its
|
|
682
|
-
* kind kept now, unless that one is newer (by the author's time, then
|
|
683
|
-
* the same one).
|
|
698
|
+
* kind kept now, unless that one is newer (by the author's time, then its epoch, so one said again under a newer
|
|
699
|
+
* commit takes the first's place, then the frame's identity, so every member keeps the same one).
|
|
684
700
|
*/
|
|
685
701
|
private keepLasting;
|
|
686
702
|
/**
|
|
@@ -719,6 +735,14 @@ export declare class CommunitySession {
|
|
|
719
735
|
* first member I reach may be one let in since, who cannot read it but can carry it (`receiveSync`).
|
|
720
736
|
*/
|
|
721
737
|
private say;
|
|
738
|
+
/**
|
|
739
|
+
* Message `id` was deleted for everyone (WISP 400 § Delete for everyone), by its author or here: its frame goes from
|
|
740
|
+
* the store, so no catch-up hands it to a member who was away (they get the removal, which stays). A frame said again
|
|
741
|
+
* (`reseal`) carries the first one's place inside: its author's are opened to tell.
|
|
742
|
+
*/
|
|
743
|
+
forget(id: string): void;
|
|
744
|
+
/** The id of the message a stored frame is, by its first place when it was said again (and I can open it). */
|
|
745
|
+
private storedId;
|
|
722
746
|
private keep;
|
|
723
747
|
/**
|
|
724
748
|
* My frames sealed under a commit I took for the newest while I was behind (no edge was up, and others were let in
|
|
@@ -730,6 +754,15 @@ export declare class CommunitySession {
|
|
|
730
754
|
*/
|
|
731
755
|
reseal(): Promise<void>;
|
|
732
756
|
private resealBehind;
|
|
757
|
+
/**
|
|
758
|
+
* My lasting frames (`keepLasting`), said again under the current commit once theirs is half the window behind: past
|
|
759
|
+
* the window no member finds that commit or holds its secret, and a member back from away after more commits than
|
|
760
|
+
* that was never handed the group's state. With the same content and time and `o` naming the first, as
|
|
761
|
+
* `resealBehind` says one, so it stays one message, and in the place of the one kept, everywhere.
|
|
762
|
+
*/
|
|
763
|
+
private renewLasting;
|
|
764
|
+
/** Whether a lasting frame kept here is `f`'s author's, said at its time, and is the message `id` (the first's, said again). */
|
|
765
|
+
private keepsLasting;
|
|
733
766
|
/** The message a frame of mine is: the first one's id for a frame said again (`resealBehind`), else its own. */
|
|
734
767
|
messageIdOf(f: {
|
|
735
768
|
s: string;
|
|
@@ -40,7 +40,10 @@ export interface Knock {
|
|
|
40
40
|
export declare function encodeGroupEntryLink(link: GroupEntryLink): string;
|
|
41
41
|
/** Where the link opens the web app: its join route. */
|
|
42
42
|
export declare function groupEntryUrl(origin: string, link: GroupEntryLink): string;
|
|
43
|
-
/**
|
|
43
|
+
/**
|
|
44
|
+
* A pasted link, a `/join/…` path or the bare code; null when it is none of them. Copied with the words around it
|
|
45
|
+
* ("Join our group: <https://…/join/group1/…>."), it is read as the token in it (`unwrapPasted`).
|
|
46
|
+
*/
|
|
44
47
|
export declare function decodeGroupEntryLink(input: string): GroupEntryLink | null;
|
|
45
48
|
/** The Pkarr identity every holder of the link can publish knocks under. */
|
|
46
49
|
export declare function knockIdentity(link: GroupEntryLink): Identity;
|
|
@@ -87,7 +87,11 @@ export declare const GROUP_VERSION_FILES = 6;
|
|
|
87
87
|
export declare const GROUP_WANT_FRAME = "group-want";
|
|
88
88
|
export declare const GROUP_WANT_NO_FRAME = "group-want-no";
|
|
89
89
|
export declare const GROUP_HAVE_FRAME = "group-have";
|
|
90
|
-
|
|
90
|
+
/**
|
|
91
|
+
* Why a holder does not serve a file (`group-want-no`). `day`: it served its day's bytes already
|
|
92
|
+
* (`serveBytesPerDay`), so asking it again soon is no use; an app from before reads it as `busy`.
|
|
93
|
+
*/
|
|
94
|
+
export type GroupWantRefusal = "gone" | "busy" | "refused" | "day";
|
|
91
95
|
export declare const isGroupMessageId: (value: unknown) => value is string;
|
|
92
96
|
/** A `group-want` of group `groupId`: the message whose file is asked for, or null. */
|
|
93
97
|
export declare function readGroupWant(value: unknown, groupId: string): {
|
|
@@ -370,6 +370,11 @@ export interface GroupSessionHooks {
|
|
|
370
370
|
* here, and the leave is passed on as a member passes it. Absent: yes.
|
|
371
371
|
*/
|
|
372
372
|
adminTurn?(): Promise<boolean>;
|
|
373
|
+
/**
|
|
374
|
+
* Whether message `id` was deleted for everyone (WISP 400 § Delete for everyone), by its author or here: its frame is
|
|
375
|
+
* no longer handed to anyone (a catch-up, a member handing it on, a frame said again). Absent: none is.
|
|
376
|
+
*/
|
|
377
|
+
removed?(id: string): boolean;
|
|
373
378
|
}
|
|
374
379
|
export declare const groupMessageId: (sender: string, epoch: number, seq: number) => string;
|
|
375
380
|
/**
|
|
@@ -796,6 +801,8 @@ export declare class GroupSession {
|
|
|
796
801
|
/** My own messages a member's sync says it lacks, from my bounded log, for the epochs it was a member of. */
|
|
797
802
|
private handOwn;
|
|
798
803
|
private ownLacked;
|
|
804
|
+
/** A frame of a message deleted for everyone (`hooks.removed`): handed to nobody, its removal is what they get. */
|
|
805
|
+
private isRemoved;
|
|
799
806
|
/** Sets (or, with null, removes) the group's picture: only the admin, signed under the current commit. */
|
|
800
807
|
setPicture(picture: string | null, now?: number): Promise<void>;
|
|
801
808
|
/** Renames the group: only the admin, signed under the current commit, beside the picture and the hubs. */
|
|
@@ -129,6 +129,7 @@ export declare class CarriedTransport implements PkarrTransport {
|
|
|
129
129
|
readonly subscribe?: PkarrTransport["subscribe"];
|
|
130
130
|
readonly networkChanged?: PkarrTransport["networkChanged"];
|
|
131
131
|
readonly configure?: PkarrTransport["configure"];
|
|
132
|
+
readonly publishHeld?: PkarrTransport["publishHeld"];
|
|
132
133
|
constructor(inner: PkarrTransport, myKey: string, peerKey: string, hooks: CarriedHooks);
|
|
133
134
|
describe(): {
|
|
134
135
|
protocol: string;
|
|
@@ -76,6 +76,13 @@ export declare function inviteQrSegments(code: string, origin?: string): string[
|
|
|
76
76
|
* the older slash forms. A refused code is never retried as another format.
|
|
77
77
|
*/
|
|
78
78
|
export declare function readInviteCode(input: string): InviteReading;
|
|
79
|
+
/** `reading` of `input`, or the reading of the token in it (`unwrapPasted`) when that reads or says more. */
|
|
80
|
+
export declare function pastedAgain<T extends {
|
|
81
|
+
ok: true;
|
|
82
|
+
} | {
|
|
83
|
+
ok: false;
|
|
84
|
+
reason: string;
|
|
85
|
+
}>(input: string, reading: T, read: (input: string) => T): T;
|
|
79
86
|
/** The parameters of an invite, or null when it is refused (`readInviteCode` says why). */
|
|
80
87
|
export declare function decodeInviteCode(input: string): LinkParams | null;
|
|
81
88
|
/** Creates both ends of a link: keep `mine`, hand `invite` to the peer. */
|
|
@@ -255,6 +255,13 @@ export declare class LinkSession {
|
|
|
255
255
|
private fastStepsAfter;
|
|
256
256
|
/** When the last `expectPeer` window ends (or ended): the pace slows down from there step by step. */
|
|
257
257
|
private expectUntil;
|
|
258
|
+
/**
|
|
259
|
+
* Until when this link's reads go as a resume's (`PkarrRequestOptions.resume`: a group edge's on the relays' floor):
|
|
260
|
+
* the peer is due now and nothing reaches it until its packet is read (`expectPeer(true)`: the edge to a member a hub
|
|
261
|
+
* just let in). As plain fast reads, a hub's admissions in a row spent the budget and the newcomer's edge waited for it:
|
|
262
|
+
* 22-39 s before it could send, receive or leave (agents#1740). Ends once a read finds the peer's packet.
|
|
263
|
+
*/
|
|
264
|
+
private awaitedUntil;
|
|
258
265
|
private watchUntil;
|
|
259
266
|
/** The time of the peer's packet read last when it went away (`watchPeer`): a newer one that advertises says it is back. */
|
|
260
267
|
private watchFrom;
|
|
@@ -319,7 +326,7 @@ export declare class LinkSession {
|
|
|
319
326
|
* The peer, or its offer, is due any moment: poll fast for `EXPECT_PEER_MS` (never cutting a longer fast window short),
|
|
320
327
|
* then slow down step by step (`nextInterval`) rather than at once.
|
|
321
328
|
*/
|
|
322
|
-
expectPeer(): void;
|
|
329
|
+
expectPeer(awaited?: boolean): void;
|
|
323
330
|
/**
|
|
324
331
|
* The contact just left a live session, and is likely coming back (an app restarting): fast for `EXPECT_PEER_MS`,
|
|
325
332
|
* then the active pace until `WATCH_PEER_MS` passed, whatever the chat's pace would be.
|
|
@@ -173,6 +173,11 @@ export declare class AppRanges {
|
|
|
173
173
|
fail(task: AppRangeTask, error: "changed" | "gone"): void;
|
|
174
174
|
/** The session stopped working on `task` without an answer (it is no longer live, or the channel went): its place frees, nothing is sent. */
|
|
175
175
|
release(task: AppRangeTask): void;
|
|
176
|
+
/**
|
|
177
|
+
* Whether `task` is still this session's: serving, or cancelled and draining until it is settled. False once it was
|
|
178
|
+
* settled, or its app closed or the session ended, which free its place: an answer to it sends and frees nothing.
|
|
179
|
+
*/
|
|
180
|
+
holds(task: AppRangeTask): boolean;
|
|
176
181
|
/** Reads `length` bytes at `offset` of what the contact's `app` serves as `serve`: the bytes (fewer at the end) and the file's size. */
|
|
177
182
|
read(app: string, serve: string, offset: number, length: number): Promise<{
|
|
178
183
|
bytes: Uint8Array;
|
|
@@ -147,6 +147,8 @@ export declare class PairedSession {
|
|
|
147
147
|
/** The peer said in its offer that it answers pings, so its silence from the open means it stopped. */
|
|
148
148
|
get peerAnswersPings(): boolean;
|
|
149
149
|
get peerAllowsFallback(): boolean;
|
|
150
|
+
/** Frames received from the peer and not handled yet (the one being handled included). */
|
|
151
|
+
get waiting(): number;
|
|
150
152
|
start(): void;
|
|
151
153
|
private send;
|
|
152
154
|
private receive;
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import type { Identity } from "./identity.js";
|
|
2
2
|
import { type GhostRecord, type SignedPacket } from "./pkarr.js";
|
|
3
3
|
import { type DiscoveryStatus, type RelayBreakerOptions } from "./relayBreaker.js";
|
|
4
|
-
import { type DiscoveryChange, type PkarrRequestOptions, type PkarrTransport, type ServerTime } from "./transport.js";
|
|
4
|
+
import { DiscoveryBudgetError, type DiscoveryChange, type PkarrRequestOptions, type PkarrTransport, type ServerTime } from "./transport.js";
|
|
5
5
|
import type { TurnConditions, TurnSourceAnswer, TurnSourcePut } from "./turnRead.js";
|
|
6
6
|
/**
|
|
7
7
|
* Public Pkarr relays. They are generic Pkarr infrastructure (an HTTP bridge to
|
|
@@ -374,6 +374,8 @@ export declare class RelayTransport implements PkarrTransport {
|
|
|
374
374
|
* that did take it, readers still preferred the later-dated empty packet of another relay.
|
|
375
375
|
*/
|
|
376
376
|
publishDated(identity: Identity, records: GhostRecord[], put: (pubKeyZ32: string, payload: Uint8Array, timestamp: bigint, conflict: (relay: string) => void) => Promise<void>, options?: PkarrRequestOptions, again?: boolean, elsewhere?: boolean): Promise<void>;
|
|
377
|
+
/** `PkarrTransport.publishHeld`: `publishDated`'s check before signing, for a payload signed elsewhere in this process. */
|
|
378
|
+
publishHeld(pubKeyZ32: string, options?: PkarrRequestOptions): DiscoveryBudgetError | null;
|
|
377
379
|
/**
|
|
378
380
|
* How long until some relay takes a publish of this asker, and why each holds it back; null when one would now. Walks the relays as `put` does,
|
|
379
381
|
* without asking any: a relay the budget holds back gets its refused `take` (the asker's write then waits first in
|
|
@@ -456,6 +458,8 @@ export declare class RelayTransport implements PkarrTransport {
|
|
|
456
458
|
*/
|
|
457
459
|
private hedgeRoom;
|
|
458
460
|
readAnsweredAt(pubKeyZ32: string): number | undefined;
|
|
461
|
+
/** The last read of this key was answered 404 (`HEDGE_MISSING_MS`): a relay takes seconds to say so. */
|
|
462
|
+
lastReadMissing(pubKeyZ32: string): boolean;
|
|
459
463
|
readHeldBackFor(pubKeyZ32: string): number | undefined;
|
|
460
464
|
private heldBackUntil;
|
|
461
465
|
/** The relays answered a read of this key now; answers older than `FRESH_READ_MS` are dropped as the list grows. */
|
|
@@ -18,3 +18,10 @@ export declare function sanitizeNick(nick: unknown): string | undefined;
|
|
|
18
18
|
* from every character of a run that does not reach the end.
|
|
19
19
|
*/
|
|
20
20
|
export declare function trimEndOf(text: string, chars: string): string;
|
|
21
|
+
/**
|
|
22
|
+
* The token in what someone copied with the words around it: an invite, a group's link or a device code from the end
|
|
23
|
+
* of "Join us: <https://…#ghostly1…>!", "« ghostly1… »" or "code: ghostly1…". The last word, without the quotes,
|
|
24
|
+
* brackets and marks before and after it. Readers try it only once the paste itself did not read, so a bare token
|
|
25
|
+
* reads as it always did and a token with a character lost is still refused as one.
|
|
26
|
+
*/
|
|
27
|
+
export declare function unwrapPasted(text: string): string;
|
|
@@ -152,6 +152,13 @@ export interface PkarrTransport {
|
|
|
152
152
|
* copy (`readAnsweredAt` did not move): when to read again. Undefined once a read went out, or where it cannot say.
|
|
153
153
|
*/
|
|
154
154
|
readHeldBackFor?(pubKeyZ32: string): number | undefined;
|
|
155
|
+
/**
|
|
156
|
+
* A publish of this key with these options that nothing would take now, said before anything is signed: the wait
|
|
157
|
+
* (`DiscoveryBudgetError`) a put would be refused with, or null when it would go (or where the transport cannot say,
|
|
158
|
+
* or it also puts packets where no budget holds them, the CLI's DHT). As `publish` checks itself before signing; a
|
|
159
|
+
* caller that signs its own payloads (`CarriedTransport`) asks first. A wait said is a refusal noted, as a put's.
|
|
160
|
+
*/
|
|
161
|
+
publishHeld?(pubKeyZ32: string, options?: PkarrRequestOptions): DiscoveryBudgetError | null;
|
|
155
162
|
/**
|
|
156
163
|
* Called with each time a server gave (`ServerTime`), where the transport can read one: what `ClockWatch` holds this
|
|
157
164
|
* device's clock against. Returns the unsubscribe.
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { Yu as boundVerifiedIdentity } from "./src-ByyR0v69.js";
|
|
2
2
|
//#region ../browser/src/proofs/verify.ts
|
|
3
3
|
var DAY = 86400;
|
|
4
4
|
/**
|
|
@@ -103,4 +103,4 @@ function boundedIdentityFetch(options = { online: () => true }) {
|
|
|
103
103
|
//#endregion
|
|
104
104
|
export { verifyIdentity as i, boundedIdentityFetch as n, descriptorProblems as r, availableSigners as t };
|
|
105
105
|
|
|
106
|
-
//# sourceMappingURL=verify-
|
|
106
|
+
//# sourceMappingURL=verify-D803jJ3k.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"verify-
|
|
1
|
+
{"version":3,"file":"verify-D803jJ3k.js","names":[],"sources":["../../browser/src/proofs/verify.ts"],"sourcesContent":["import { boundVerifiedIdentity, IDENTITY_MAX_EVIDENCE, IDENTITY_MAX_VALIDITY, type IdentityStatement, type VerifiedIdentity } from \"@ghostly/core\";\nimport type { IdentityFetch, IdentityProofProvider, IdentitySigner, VerifyContext } from \"./contract\";\n\nconst DAY = 86_400;\n\n/**\n * The checks every proof goes through, whatever its provider: known provider, validity within the\n * provider's limit, bounded evidence, strict parsing, the provider's own check, and the category rule\n * (a self-custodied proof proves exactly the subject it names; an attested one says who attests it).\n * The engine verifies a contact's proof, and the person's own proof before saving it, only through this.\n */\nexport async function verifyIdentity(providers: readonly IdentityProofProvider[], statement: IdentityStatement, evidence: unknown, ctx: VerifyContext): Promise<VerifiedIdentity> {\n const { binding } = statement;\n const provider = providers.find(p => p.id === binding.provider);\n if (!provider) throw new Error(\"This app cannot verify this kind of identity\");\n if (binding.expiresAt - binding.issuedAt > Math.min(provider.validity.maxDays * DAY, IDENTITY_MAX_VALIDITY)) throw new Error(\"The proof lasts longer than this kind of identity allows\");\n if (JSON.stringify(evidence ?? null).length > IDENTITY_MAX_EVIDENCE) throw new Error(\"Evidence too large\");\n const parsed = provider.parseEvidence(evidence);\n const verified = boundVerifiedIdentity(await provider.verify(statement, parsed, ctx));\n if (provider.category === \"self-custodied\" && verified.subject !== binding.subject) throw new Error(\"The evidence is for another identity\");\n if (provider.category === \"provider-attested\" && !verified.attester) throw new Error(\"The evidence does not say who attests it\");\n return verified;\n}\n\n/** Problems with a provider's descriptor, empty when it is well-formed. The registry and the contract suite use it. */\nexport function descriptorProblems(p: IdentityProofProvider): string[] {\n const problems: string[] = [];\n if (!/^[a-z][a-z0-9-]{0,31}$/.test(p.id)) problems.push(\"id must match ^[a-z][a-z0-9-]{0,31}$\");\n if (!p.label?.trim()) problems.push(\"label is empty\");\n if (!p.description?.trim()) problems.push(\"description is empty\");\n if (!p.privacy?.trim()) problems.push(\"privacy is empty: say what verify contacts\");\n if (p.category !== \"self-custodied\" && p.category !== \"provider-attested\") problems.push(\"category is unknown\");\n if (!p.platforms.length) problems.push(\"no platforms\");\n const { defaultDays, maxDays } = p.validity;\n if (!(Number.isInteger(defaultDays) && Number.isInteger(maxDays) && defaultDays >= 1 && defaultDays <= maxDays && maxDays * DAY <= IDENTITY_MAX_VALIDITY)) problems.push(\"validity must be whole days, 1 ≤ default ≤ max ≤ 400\");\n if (p.recheck && !(Number.isInteger(p.recheck.afterSeconds) && p.recheck.afterSeconds >= 60)) problems.push(\"recheck.afterSeconds must be at least 60\");\n if (!p.signers.length) problems.push(\"no signers\");\n const ids = p.signers.map(s => s.id);\n if (new Set(ids).size !== ids.length) problems.push(\"signer ids are not unique\");\n for (const s of p.signers as readonly IdentitySigner<unknown>[]) {\n if (![\"in-app\", \"external-tool\", \"redirect\", \"publish\"].includes(s.kind)) problems.push(`signer ${s.id} has an unknown kind`);\n if (s.kind === \"in-app\" && typeof s.run !== \"function\") problems.push(`signer ${s.id} has no run()`);\n if (s.kind === \"external-tool\" && (typeof s.instructions !== \"function\" || typeof s.parse !== \"function\")) problems.push(`signer ${s.id} needs instructions() and parse()`);\n if (s.kind === \"redirect\" && typeof s.start !== \"function\") problems.push(`signer ${s.id} has no start()`);\n if (s.kind === \"publish\" && (typeof s.instructions !== \"function\" || typeof s.evidence !== \"function\")) problems.push(`signer ${s.id} needs instructions() and evidence()`);\n }\n return problems;\n}\n\n/** Signers of a provider that run on this platform and are available in this window. */\nexport function availableSigners<E>(p: IdentityProofProvider<E>, platform: IdentityProofProvider[\"platforms\"][number]): IdentitySigner<E>[] {\n return p.signers.filter(s => (s.platforms ?? p.platforms).includes(platform) && (s.available?.() ?? true));\n}\n\n/**\n * The engine's `ctx.fetch`: HTTPS GET only, no credentials or referrer, a time-out, a size cap,\n * redirects refused unless asked for.\n * `online` false refuses everything (the person turned the network off).\n */\nexport function boundedIdentityFetch(options: { online: () => boolean; timeoutMs?: number; fetcher?: typeof fetch } = { online: () => true }): IdentityFetch {\n return async (url, { headers, maxBytes = 64 * 1024, signal, redirect = \"error\" } = {}) => {\n if (!options.online()) throw new Error(\"Offline: this identity cannot be checked now\");\n const target = new URL(url);\n if (target.protocol !== \"https:\" || target.username || target.password) throw new Error(\"Identity checks use HTTPS only\");\n const timeout = AbortSignal.timeout(options.timeoutMs ?? 10_000);\n const response = await (options.fetcher ?? fetch)(target.href, {\n headers, signal: signal ? AbortSignal.any([signal, timeout]) : timeout,\n credentials: \"omit\", referrerPolicy: \"no-referrer\", cache: \"no-store\", redirect,\n });\n if (Number(response.headers.get(\"content-length\")) > maxBytes) throw new Error(\"Identity check response too large\");\n const reader = response.body?.getReader();\n const parts: Uint8Array[] = [];\n let length = 0;\n if (reader) {\n try {\n for (;;) {\n const { done, value } = await reader.read();\n if (done) break;\n length += value.length;\n if (length > maxBytes) throw new Error(\"Identity check response too large\");\n parts.push(value);\n }\n } finally { await reader.cancel().catch(() => {}); }\n }\n const bytes = new Uint8Array(length);\n let offset = 0;\n for (const part of parts) { bytes.set(part, offset); offset += part.length; }\n return { status: response.status, contentType: response.headers.get(\"content-type\") ?? \"\", text: new TextDecoder().decode(bytes), bytes };\n };\n}\n"],"mappings":";;AAGA,IAAM,MAAM;;;;;;;AAQZ,eAAsB,eAAe,WAA6C,WAA8B,UA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|
"name": "@ghostlytools/sdk",
|
|
3
|
-
"version": "1.5.
|
|
3
|
+
"version": "1.5.4",
|
|
4
4
|
"type": "module",
|
|
5
5
|
"description": "Build a wallet source, an identity proof, a mini-app or a client for Ghostly without reading its internals: the adapter contracts, their fakes and contract test suites, the plugin registry, and the mini-app API types (Apps run in Ghostly 1.2 and later).",
|
|
6
6
|
"license": "MIT",
|