@domino-sdk/relay 0.24.0 → 0.25.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/authoring.d.ts +52 -10
- package/dist/authoring.js +48 -8
- package/dist/browser.d.ts +431 -27
- package/dist/browser.js +22 -7
- package/dist/chunk-7QICEKC2.js +229 -0
- package/dist/{chunk-ZOL7RYHW.js → chunk-AKB266O5.js} +46 -3
- package/dist/chunk-D6BX627V.js +175 -0
- package/dist/{chunk-UYS522ER.js → chunk-IXLY3A7B.js} +550 -396
- package/dist/chunk-MZFUQQDP.js +355 -0
- package/dist/{chunk-RTBIXGMH.js → chunk-S44XSDW2.js} +779 -46
- package/dist/index.d.ts +1186 -56
- package/dist/index.js +123 -11
- package/dist/portal-proxy.js +10 -5
- package/dist/react/index.d.ts +498 -13
- package/dist/react/index.js +316 -40
- package/dist/schema.d.ts +82 -2
- package/dist/schema.js +1 -1
- package/dist/{submission-input-CK4Dy19H.d.ts → submission-input-Ckpb4sBv.d.ts} +1899 -2
- package/package.json +5 -3
- package/dist/chunk-57TGYC5Y.js +0 -37
- package/dist/chunk-ND3CVNIW.js +0 -61
package/dist/browser.d.ts
CHANGED
|
@@ -1,8 +1,80 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { N as WalletSigner, a3 as CosmosNetwork, H as referralAcceptSchema, J as LeaderboardQuery, K as WalletAddressInput, M as walletSignatureSchema, L as LinkedWallet, P as walletChallengeInputSchema, Q as walletProofSchema, R as AuthProvider, V as WalletSignature, Y as engagementPageQuerySchema, Z as contentQualificationQuerySchema, _ as contentAdmissionQuerySchema, $ as contentEnrollmentInputSchema, a0 as contentReleaseInputSchema } from './submission-input-Ckpb4sBv.js';
|
|
2
2
|
import { SubmitInput, ReleaseInput, beginHandoverSchema, contentPerformanceQuerySchema } from './schema.js';
|
|
3
|
-
import { SubmissionStore, createRelayClient, QuestView, QuestController, ProgressObservation, questExperienceSchema, ProgressObserver, ExchangeInput, PhotoSubmission, QuizSubmission, ClaimSubmission, ValueSubmission } from './index.js';
|
|
3
|
+
import { SubmissionStore, createRelayClient, ProfileUpdate, QuestView, QuestController, ProgressObservation, questExperienceSchema, ProgressObserver, ExchangeInput, PhotoSubmission, QuizSubmission, ClaimSubmission, ValueSubmission } from './index.js';
|
|
4
4
|
import * as zod from 'zod';
|
|
5
5
|
|
|
6
|
+
/** An EIP-1193 provider, such as `window.ethereum` or an EIP-6963 announcement's provider. */
|
|
7
|
+
type Eip1193Provider = {
|
|
8
|
+
request(args: {
|
|
9
|
+
method: string;
|
|
10
|
+
params?: unknown[] | object;
|
|
11
|
+
}): Promise<unknown>;
|
|
12
|
+
};
|
|
13
|
+
/** The legacy injected Solana shape Phantom, Solflare and Backpack expose. */
|
|
14
|
+
type SolanaInjectedProvider = {
|
|
15
|
+
connect(): Promise<unknown>;
|
|
16
|
+
publicKey?: {
|
|
17
|
+
toBase58(): string;
|
|
18
|
+
} | null;
|
|
19
|
+
signMessage(message: Uint8Array, display?: "utf8"): Promise<{
|
|
20
|
+
signature: Uint8Array;
|
|
21
|
+
} | Uint8Array>;
|
|
22
|
+
};
|
|
23
|
+
/** The part of a Wallet Standard account Relay uses. */
|
|
24
|
+
type StandardWalletAccount = {
|
|
25
|
+
readonly address: string;
|
|
26
|
+
readonly chains: readonly string[];
|
|
27
|
+
};
|
|
28
|
+
/** The part of a Wallet Standard wallet Relay uses; any conforming wallet object fits. */
|
|
29
|
+
type StandardWallet = {
|
|
30
|
+
readonly name: string;
|
|
31
|
+
readonly icon?: string;
|
|
32
|
+
readonly chains: readonly string[];
|
|
33
|
+
readonly accounts: readonly StandardWalletAccount[];
|
|
34
|
+
readonly features: Readonly<Record<string, unknown>>;
|
|
35
|
+
};
|
|
36
|
+
/** Keplr's API, which Leap and Cosmostation also implement. */
|
|
37
|
+
type KeplrLike = {
|
|
38
|
+
enable(chainId: string | string[]): Promise<void>;
|
|
39
|
+
getKey(chainId: string): Promise<{
|
|
40
|
+
bech32Address: string;
|
|
41
|
+
}>;
|
|
42
|
+
signArbitrary(chainId: string, signer: string, data: string): Promise<{
|
|
43
|
+
signature: string;
|
|
44
|
+
pub_key: {
|
|
45
|
+
type: string;
|
|
46
|
+
value: string;
|
|
47
|
+
};
|
|
48
|
+
}>;
|
|
49
|
+
};
|
|
50
|
+
/** A wallet found in the page, ready to pass to `relay.wallets.link`. */
|
|
51
|
+
type DiscoveredWallet = {
|
|
52
|
+
id: string;
|
|
53
|
+
name: string;
|
|
54
|
+
icon?: string;
|
|
55
|
+
signer: WalletSigner;
|
|
56
|
+
};
|
|
57
|
+
/** Signs with an EIP-1193 provider through `personal_sign`. */
|
|
58
|
+
declare function evmSigner(provider: Eip1193Provider, info?: {
|
|
59
|
+
name?: string;
|
|
60
|
+
}): WalletSigner;
|
|
61
|
+
/** Signs with a legacy injected Solana provider, such as `window.phantom.solana`. */
|
|
62
|
+
declare function solanaSigner(provider: SolanaInjectedProvider, info?: {
|
|
63
|
+
name?: string;
|
|
64
|
+
}): WalletSigner;
|
|
65
|
+
/** Signs with a Wallet Standard wallet's `solana:signMessage` feature. */
|
|
66
|
+
declare function walletStandardSolanaSigner(wallet: StandardWallet): WalletSigner;
|
|
67
|
+
/** Signs an ADR-36 message with Keplr or a wallet that implements its API. */
|
|
68
|
+
declare function cosmosSigner(provider: KeplrLike, network: CosmosNetwork, info?: {
|
|
69
|
+
name?: string;
|
|
70
|
+
}): WalletSigner;
|
|
71
|
+
/** EIP-6963 wallets, or `window.ethereum` when none announce themselves within `timeoutMs`. */
|
|
72
|
+
declare function discoverEvmWallets(timeoutMs?: number): Promise<DiscoveredWallet[]>;
|
|
73
|
+
/** Wallet Standard wallets that can sign Solana messages, then legacy injected providers. */
|
|
74
|
+
declare function discoverSolanaWallets(): DiscoveredWallet[];
|
|
75
|
+
/** Keplr, Leap and Cosmostation, each signing on `network`. IDs end with the network's chain ID. */
|
|
76
|
+
declare function discoverCosmosWallets(network: CosmosNetwork): DiscoveredWallet[];
|
|
77
|
+
|
|
6
78
|
/** Browser client with durable submission recovery; safe to construct during SSR. */
|
|
7
79
|
declare function createBrowserRelayClient(options: Parameters<typeof createRelayClient>[0]): {
|
|
8
80
|
referrals: {
|
|
@@ -309,6 +381,23 @@ declare function createBrowserRelayClient(options: Parameters<typeof createRelay
|
|
|
309
381
|
name: string;
|
|
310
382
|
score: number;
|
|
311
383
|
rank: number;
|
|
384
|
+
profile: {
|
|
385
|
+
id: string;
|
|
386
|
+
name: string;
|
|
387
|
+
avatar: {
|
|
388
|
+
source: "upload";
|
|
389
|
+
url: string;
|
|
390
|
+
seed: string;
|
|
391
|
+
} | {
|
|
392
|
+
source: "account";
|
|
393
|
+
provider: "x" | "discord" | "google";
|
|
394
|
+
url: string;
|
|
395
|
+
seed: string;
|
|
396
|
+
} | {
|
|
397
|
+
source: "generated";
|
|
398
|
+
seed: string;
|
|
399
|
+
};
|
|
400
|
+
} | null;
|
|
312
401
|
member?: string | undefined;
|
|
313
402
|
}[];
|
|
314
403
|
me: {
|
|
@@ -316,6 +405,23 @@ declare function createBrowserRelayClient(options: Parameters<typeof createRelay
|
|
|
316
405
|
name: string;
|
|
317
406
|
score: number;
|
|
318
407
|
rank: number;
|
|
408
|
+
profile: {
|
|
409
|
+
id: string;
|
|
410
|
+
name: string;
|
|
411
|
+
avatar: {
|
|
412
|
+
source: "upload";
|
|
413
|
+
url: string;
|
|
414
|
+
seed: string;
|
|
415
|
+
} | {
|
|
416
|
+
source: "account";
|
|
417
|
+
provider: "x" | "discord" | "google";
|
|
418
|
+
url: string;
|
|
419
|
+
seed: string;
|
|
420
|
+
} | {
|
|
421
|
+
source: "generated";
|
|
422
|
+
seed: string;
|
|
423
|
+
};
|
|
424
|
+
} | null;
|
|
319
425
|
member?: string | undefined;
|
|
320
426
|
} | null;
|
|
321
427
|
nearby: {
|
|
@@ -323,11 +429,166 @@ declare function createBrowserRelayClient(options: Parameters<typeof createRelay
|
|
|
323
429
|
name: string;
|
|
324
430
|
score: number;
|
|
325
431
|
rank: number;
|
|
432
|
+
profile: {
|
|
433
|
+
id: string;
|
|
434
|
+
name: string;
|
|
435
|
+
avatar: {
|
|
436
|
+
source: "upload";
|
|
437
|
+
url: string;
|
|
438
|
+
seed: string;
|
|
439
|
+
} | {
|
|
440
|
+
source: "account";
|
|
441
|
+
provider: "x" | "discord" | "google";
|
|
442
|
+
url: string;
|
|
443
|
+
seed: string;
|
|
444
|
+
} | {
|
|
445
|
+
source: "generated";
|
|
446
|
+
seed: string;
|
|
447
|
+
};
|
|
448
|
+
} | null;
|
|
326
449
|
member?: string | undefined;
|
|
327
450
|
}[];
|
|
328
451
|
nextCursor: string | null;
|
|
329
452
|
}>;
|
|
330
453
|
};
|
|
454
|
+
profiles: {
|
|
455
|
+
mine: () => Promise<{
|
|
456
|
+
id: string;
|
|
457
|
+
name: string;
|
|
458
|
+
avatar: {
|
|
459
|
+
source: "upload";
|
|
460
|
+
url: string;
|
|
461
|
+
seed: string;
|
|
462
|
+
} | {
|
|
463
|
+
source: "account";
|
|
464
|
+
provider: "x" | "discord" | "google";
|
|
465
|
+
url: string;
|
|
466
|
+
seed: string;
|
|
467
|
+
} | {
|
|
468
|
+
source: "generated";
|
|
469
|
+
seed: string;
|
|
470
|
+
};
|
|
471
|
+
displayName: string | null;
|
|
472
|
+
avatarChoice: "default" | "account" | "generated" | "upload";
|
|
473
|
+
avatarProvider: "x" | "discord" | "google" | null;
|
|
474
|
+
hidden: boolean;
|
|
475
|
+
locked: boolean;
|
|
476
|
+
visibility: "private" | "participants" | "public";
|
|
477
|
+
options: {
|
|
478
|
+
provider: "x" | "discord" | "google";
|
|
479
|
+
name: string | null;
|
|
480
|
+
imageUrl: string | null;
|
|
481
|
+
}[];
|
|
482
|
+
}>;
|
|
483
|
+
update: (input: ProfileUpdate, options?: {
|
|
484
|
+
session?: string;
|
|
485
|
+
}) => Promise<{
|
|
486
|
+
id: string;
|
|
487
|
+
name: string;
|
|
488
|
+
avatar: {
|
|
489
|
+
source: "upload";
|
|
490
|
+
url: string;
|
|
491
|
+
seed: string;
|
|
492
|
+
} | {
|
|
493
|
+
source: "account";
|
|
494
|
+
provider: "x" | "discord" | "google";
|
|
495
|
+
url: string;
|
|
496
|
+
seed: string;
|
|
497
|
+
} | {
|
|
498
|
+
source: "generated";
|
|
499
|
+
seed: string;
|
|
500
|
+
};
|
|
501
|
+
displayName: string | null;
|
|
502
|
+
avatarChoice: "default" | "account" | "generated" | "upload";
|
|
503
|
+
avatarProvider: "x" | "discord" | "google" | null;
|
|
504
|
+
hidden: boolean;
|
|
505
|
+
locked: boolean;
|
|
506
|
+
visibility: "private" | "participants" | "public";
|
|
507
|
+
options: {
|
|
508
|
+
provider: "x" | "discord" | "google";
|
|
509
|
+
name: string | null;
|
|
510
|
+
imageUrl: string | null;
|
|
511
|
+
}[];
|
|
512
|
+
}>;
|
|
513
|
+
uploadAvatar: (file: Blob, options?: {
|
|
514
|
+
uploadId?: string;
|
|
515
|
+
session?: string;
|
|
516
|
+
}) => Promise<{
|
|
517
|
+
id: string;
|
|
518
|
+
name: string;
|
|
519
|
+
avatar: {
|
|
520
|
+
source: "upload";
|
|
521
|
+
url: string;
|
|
522
|
+
seed: string;
|
|
523
|
+
} | {
|
|
524
|
+
source: "account";
|
|
525
|
+
provider: "x" | "discord" | "google";
|
|
526
|
+
url: string;
|
|
527
|
+
seed: string;
|
|
528
|
+
} | {
|
|
529
|
+
source: "generated";
|
|
530
|
+
seed: string;
|
|
531
|
+
};
|
|
532
|
+
displayName: string | null;
|
|
533
|
+
avatarChoice: "default" | "account" | "generated" | "upload";
|
|
534
|
+
avatarProvider: "x" | "discord" | "google" | null;
|
|
535
|
+
hidden: boolean;
|
|
536
|
+
locked: boolean;
|
|
537
|
+
visibility: "private" | "participants" | "public";
|
|
538
|
+
options: {
|
|
539
|
+
provider: "x" | "discord" | "google";
|
|
540
|
+
name: string | null;
|
|
541
|
+
imageUrl: string | null;
|
|
542
|
+
}[];
|
|
543
|
+
}>;
|
|
544
|
+
get: (profile: string) => Promise<{
|
|
545
|
+
id: string;
|
|
546
|
+
name: string;
|
|
547
|
+
avatar: {
|
|
548
|
+
source: "upload";
|
|
549
|
+
url: string;
|
|
550
|
+
seed: string;
|
|
551
|
+
} | {
|
|
552
|
+
source: "account";
|
|
553
|
+
provider: "x" | "discord" | "google";
|
|
554
|
+
url: string;
|
|
555
|
+
seed: string;
|
|
556
|
+
} | {
|
|
557
|
+
source: "generated";
|
|
558
|
+
seed: string;
|
|
559
|
+
};
|
|
560
|
+
self: boolean;
|
|
561
|
+
leaderboards: {
|
|
562
|
+
leaderboard: string;
|
|
563
|
+
title: string;
|
|
564
|
+
rank: number;
|
|
565
|
+
score: number;
|
|
566
|
+
total: number;
|
|
567
|
+
key?: string | undefined;
|
|
568
|
+
}[] | null;
|
|
569
|
+
quests: {
|
|
570
|
+
quest: string;
|
|
571
|
+
title: string;
|
|
572
|
+
completions: number;
|
|
573
|
+
lastCompletedAt: number | null;
|
|
574
|
+
key?: string | undefined;
|
|
575
|
+
}[] | null;
|
|
576
|
+
referrals: {
|
|
577
|
+
attributed: number;
|
|
578
|
+
programs: {
|
|
579
|
+
program: string;
|
|
580
|
+
title: string;
|
|
581
|
+
qualified: number;
|
|
582
|
+
milestones: {
|
|
583
|
+
id: string;
|
|
584
|
+
count: number;
|
|
585
|
+
reached: boolean;
|
|
586
|
+
}[];
|
|
587
|
+
key?: string | undefined;
|
|
588
|
+
}[];
|
|
589
|
+
} | null;
|
|
590
|
+
}>;
|
|
591
|
+
};
|
|
331
592
|
quests: {
|
|
332
593
|
get: (id: string) => Promise<{
|
|
333
594
|
quest: string;
|
|
@@ -352,7 +613,7 @@ declare function createBrowserRelayClient(options: Parameters<typeof createRelay
|
|
|
352
613
|
} | undefined;
|
|
353
614
|
} | undefined;
|
|
354
615
|
};
|
|
355
|
-
connections: ("
|
|
616
|
+
connections: ("x" | "discord" | "google" | "apple")[];
|
|
356
617
|
trigger: {
|
|
357
618
|
kind: "automatic";
|
|
358
619
|
observation?: {
|
|
@@ -369,6 +630,11 @@ declare function createBrowserRelayClient(options: Parameters<typeof createRelay
|
|
|
369
630
|
posts: "after-enrollment" | "since-start";
|
|
370
631
|
historical: "staff" | "automatic" | "claim";
|
|
371
632
|
} | undefined;
|
|
633
|
+
tracker?: {
|
|
634
|
+
tracker: string;
|
|
635
|
+
source: "custom" | "x-search";
|
|
636
|
+
beneficiary: "author" | "replied-to";
|
|
637
|
+
} | undefined;
|
|
372
638
|
} | {
|
|
373
639
|
kind: "manual";
|
|
374
640
|
input: "text";
|
|
@@ -431,7 +697,7 @@ declare function createBrowserRelayClient(options: Parameters<typeof createRelay
|
|
|
431
697
|
kind: "keyed";
|
|
432
698
|
};
|
|
433
699
|
completionCount: number;
|
|
434
|
-
visibility: "
|
|
700
|
+
visibility: "hidden" | "visible";
|
|
435
701
|
missing: {
|
|
436
702
|
quest: string;
|
|
437
703
|
title: string;
|
|
@@ -624,7 +890,7 @@ declare function createBrowserRelayClient(options: Parameters<typeof createRelay
|
|
|
624
890
|
} | undefined;
|
|
625
891
|
} | undefined;
|
|
626
892
|
};
|
|
627
|
-
connections: ("
|
|
893
|
+
connections: ("x" | "discord" | "google" | "apple")[];
|
|
628
894
|
trigger: {
|
|
629
895
|
kind: "automatic";
|
|
630
896
|
observation?: {
|
|
@@ -641,6 +907,11 @@ declare function createBrowserRelayClient(options: Parameters<typeof createRelay
|
|
|
641
907
|
posts: "after-enrollment" | "since-start";
|
|
642
908
|
historical: "staff" | "automatic" | "claim";
|
|
643
909
|
} | undefined;
|
|
910
|
+
tracker?: {
|
|
911
|
+
tracker: string;
|
|
912
|
+
source: "custom" | "x-search";
|
|
913
|
+
beneficiary: "author" | "replied-to";
|
|
914
|
+
} | undefined;
|
|
644
915
|
} | {
|
|
645
916
|
kind: "manual";
|
|
646
917
|
input: "text";
|
|
@@ -703,7 +974,7 @@ declare function createBrowserRelayClient(options: Parameters<typeof createRelay
|
|
|
703
974
|
kind: "keyed";
|
|
704
975
|
};
|
|
705
976
|
completionCount: number;
|
|
706
|
-
visibility: "
|
|
977
|
+
visibility: "hidden" | "visible";
|
|
707
978
|
missing: {
|
|
708
979
|
quest: string;
|
|
709
980
|
title: string;
|
|
@@ -844,7 +1115,7 @@ declare function createBrowserRelayClient(options: Parameters<typeof createRelay
|
|
|
844
1115
|
} | undefined;
|
|
845
1116
|
} | undefined;
|
|
846
1117
|
};
|
|
847
|
-
connections: ("
|
|
1118
|
+
connections: ("x" | "discord" | "google" | "apple")[];
|
|
848
1119
|
trigger: {
|
|
849
1120
|
kind: "automatic";
|
|
850
1121
|
observation?: {
|
|
@@ -861,6 +1132,11 @@ declare function createBrowserRelayClient(options: Parameters<typeof createRelay
|
|
|
861
1132
|
posts: "after-enrollment" | "since-start";
|
|
862
1133
|
historical: "staff" | "automatic" | "claim";
|
|
863
1134
|
} | undefined;
|
|
1135
|
+
tracker?: {
|
|
1136
|
+
tracker: string;
|
|
1137
|
+
source: "custom" | "x-search";
|
|
1138
|
+
beneficiary: "author" | "replied-to";
|
|
1139
|
+
} | undefined;
|
|
864
1140
|
} | {
|
|
865
1141
|
kind: "manual";
|
|
866
1142
|
input: "text";
|
|
@@ -923,7 +1199,7 @@ declare function createBrowserRelayClient(options: Parameters<typeof createRelay
|
|
|
923
1199
|
kind: "keyed";
|
|
924
1200
|
};
|
|
925
1201
|
completionCount: number;
|
|
926
|
-
visibility: "
|
|
1202
|
+
visibility: "hidden" | "visible";
|
|
927
1203
|
missing: {
|
|
928
1204
|
quest: string;
|
|
929
1205
|
title: string;
|
|
@@ -1067,7 +1343,7 @@ declare function createBrowserRelayClient(options: Parameters<typeof createRelay
|
|
|
1067
1343
|
} | undefined;
|
|
1068
1344
|
} | undefined;
|
|
1069
1345
|
};
|
|
1070
|
-
connections: ("
|
|
1346
|
+
connections: ("x" | "discord" | "google" | "apple")[];
|
|
1071
1347
|
trigger: {
|
|
1072
1348
|
kind: "automatic";
|
|
1073
1349
|
observation?: {
|
|
@@ -1084,6 +1360,11 @@ declare function createBrowserRelayClient(options: Parameters<typeof createRelay
|
|
|
1084
1360
|
posts: "after-enrollment" | "since-start";
|
|
1085
1361
|
historical: "staff" | "automatic" | "claim";
|
|
1086
1362
|
} | undefined;
|
|
1363
|
+
tracker?: {
|
|
1364
|
+
tracker: string;
|
|
1365
|
+
source: "custom" | "x-search";
|
|
1366
|
+
beneficiary: "author" | "replied-to";
|
|
1367
|
+
} | undefined;
|
|
1087
1368
|
} | {
|
|
1088
1369
|
kind: "manual";
|
|
1089
1370
|
input: "text";
|
|
@@ -1146,7 +1427,7 @@ declare function createBrowserRelayClient(options: Parameters<typeof createRelay
|
|
|
1146
1427
|
kind: "keyed";
|
|
1147
1428
|
};
|
|
1148
1429
|
completionCount: number;
|
|
1149
|
-
visibility: "
|
|
1430
|
+
visibility: "hidden" | "visible";
|
|
1150
1431
|
missing: {
|
|
1151
1432
|
quest: string;
|
|
1152
1433
|
title: string;
|
|
@@ -1269,6 +1550,44 @@ declare function createBrowserRelayClient(options: Parameters<typeof createRelay
|
|
|
1269
1550
|
maxBackoffMs?: number;
|
|
1270
1551
|
}) => ProgressObserver;
|
|
1271
1552
|
};
|
|
1553
|
+
wallets: {
|
|
1554
|
+
list: () => Promise<{
|
|
1555
|
+
chain: "solana" | "eip155" | "cosmos";
|
|
1556
|
+
network: "cosmos:pio-mainnet-1" | "cosmos:pio-testnet-1" | null;
|
|
1557
|
+
address: string;
|
|
1558
|
+
verifiedAt: number;
|
|
1559
|
+
revision: number;
|
|
1560
|
+
signIn: boolean;
|
|
1561
|
+
}[]>;
|
|
1562
|
+
challenge: (input: WalletAddressInput, session: string) => Promise<{
|
|
1563
|
+
id: string;
|
|
1564
|
+
purpose: "link" | "sign-in";
|
|
1565
|
+
chain: "solana" | "eip155" | "cosmos";
|
|
1566
|
+
network: "cosmos:pio-mainnet-1" | "cosmos:pio-testnet-1" | null;
|
|
1567
|
+
address: string;
|
|
1568
|
+
message: string;
|
|
1569
|
+
expiresAt: number;
|
|
1570
|
+
}>;
|
|
1571
|
+
verify: (input: zod.input<typeof walletSignatureSchema>, session: string) => Promise<{
|
|
1572
|
+
chain: "solana" | "eip155" | "cosmos";
|
|
1573
|
+
network: "cosmos:pio-mainnet-1" | "cosmos:pio-testnet-1" | null;
|
|
1574
|
+
address: string;
|
|
1575
|
+
verifiedAt: number;
|
|
1576
|
+
revision: number;
|
|
1577
|
+
signIn: boolean;
|
|
1578
|
+
}>;
|
|
1579
|
+
unlink: (wallet: Pick<LinkedWallet, "chain" | "address">) => Promise<{
|
|
1580
|
+
ok: true;
|
|
1581
|
+
}>;
|
|
1582
|
+
link: (signer: WalletSigner) => Promise<{
|
|
1583
|
+
chain: "solana" | "eip155" | "cosmos";
|
|
1584
|
+
network: "cosmos:pio-mainnet-1" | "cosmos:pio-testnet-1" | null;
|
|
1585
|
+
address: string;
|
|
1586
|
+
verifiedAt: number;
|
|
1587
|
+
revision: number;
|
|
1588
|
+
signIn: boolean;
|
|
1589
|
+
}>;
|
|
1590
|
+
};
|
|
1272
1591
|
wallet: {
|
|
1273
1592
|
connection: () => Promise<{
|
|
1274
1593
|
chain: "solana";
|
|
@@ -1293,10 +1612,11 @@ declare function createBrowserRelayClient(options: Parameters<typeof createRelay
|
|
|
1293
1612
|
auth: {
|
|
1294
1613
|
providers: () => Promise<{
|
|
1295
1614
|
providers: {
|
|
1296
|
-
provider: "
|
|
1615
|
+
provider: "x" | "discord" | "google" | "apple";
|
|
1297
1616
|
configured: boolean;
|
|
1298
1617
|
}[];
|
|
1299
1618
|
email: boolean;
|
|
1619
|
+
wallets: ("solana" | "eip155" | "cosmos:pio-mainnet-1" | "cosmos:pio-testnet-1")[];
|
|
1300
1620
|
demo: boolean;
|
|
1301
1621
|
}>;
|
|
1302
1622
|
start: (provider: AuthProvider, mode: "sign-in" | "connect") => Promise<{
|
|
@@ -1322,8 +1642,53 @@ declare function createBrowserRelayClient(options: Parameters<typeof createRelay
|
|
|
1322
1642
|
};
|
|
1323
1643
|
expiresAt: number;
|
|
1324
1644
|
}>;
|
|
1645
|
+
wallet: {
|
|
1646
|
+
start: (input: WalletAddressInput) => Promise<{
|
|
1647
|
+
id: string;
|
|
1648
|
+
purpose: "link" | "sign-in";
|
|
1649
|
+
chain: "solana" | "eip155" | "cosmos";
|
|
1650
|
+
network: "cosmos:pio-mainnet-1" | "cosmos:pio-testnet-1" | null;
|
|
1651
|
+
address: string;
|
|
1652
|
+
message: string;
|
|
1653
|
+
expiresAt: number;
|
|
1654
|
+
}>;
|
|
1655
|
+
verify: (proof: WalletSignature) => Promise<{
|
|
1656
|
+
organization: string;
|
|
1657
|
+
project: string;
|
|
1658
|
+
environment: "test" | "live";
|
|
1659
|
+
id: string;
|
|
1660
|
+
principal: {
|
|
1661
|
+
kind: "member";
|
|
1662
|
+
member: string;
|
|
1663
|
+
} | {
|
|
1664
|
+
kind: "staff";
|
|
1665
|
+
subject: string;
|
|
1666
|
+
} | {
|
|
1667
|
+
kind: "operator";
|
|
1668
|
+
subject: string;
|
|
1669
|
+
};
|
|
1670
|
+
expiresAt: number;
|
|
1671
|
+
}>;
|
|
1672
|
+
signIn: (signer: WalletSigner) => Promise<{
|
|
1673
|
+
organization: string;
|
|
1674
|
+
project: string;
|
|
1675
|
+
environment: "test" | "live";
|
|
1676
|
+
id: string;
|
|
1677
|
+
principal: {
|
|
1678
|
+
kind: "member";
|
|
1679
|
+
member: string;
|
|
1680
|
+
} | {
|
|
1681
|
+
kind: "staff";
|
|
1682
|
+
subject: string;
|
|
1683
|
+
} | {
|
|
1684
|
+
kind: "operator";
|
|
1685
|
+
subject: string;
|
|
1686
|
+
};
|
|
1687
|
+
expiresAt: number;
|
|
1688
|
+
}>;
|
|
1689
|
+
};
|
|
1325
1690
|
accounts: () => Promise<{
|
|
1326
|
-
provider: "
|
|
1691
|
+
provider: "x" | "discord" | "google" | "apple";
|
|
1327
1692
|
configured: boolean;
|
|
1328
1693
|
status: "disconnected" | "connected" | "reconnect";
|
|
1329
1694
|
subject: string | null;
|
|
@@ -1379,6 +1744,10 @@ declare function createBrowserRelayClient(options: Parameters<typeof createRelay
|
|
|
1379
1744
|
}>;
|
|
1380
1745
|
};
|
|
1381
1746
|
me: {
|
|
1747
|
+
get: () => Promise<{
|
|
1748
|
+
member: string;
|
|
1749
|
+
avatarSeed: string;
|
|
1750
|
+
}>;
|
|
1382
1751
|
observeProgress: (listener: (value: ProgressObservation) => void, options?: {
|
|
1383
1752
|
intervalMs?: number;
|
|
1384
1753
|
maxBackoffMs?: number;
|
|
@@ -1492,7 +1861,7 @@ declare function createBrowserRelayClient(options: Parameters<typeof createRelay
|
|
|
1492
1861
|
} | undefined;
|
|
1493
1862
|
} | undefined;
|
|
1494
1863
|
};
|
|
1495
|
-
connections: ("
|
|
1864
|
+
connections: ("x" | "discord" | "google" | "apple")[];
|
|
1496
1865
|
trigger: {
|
|
1497
1866
|
kind: "automatic";
|
|
1498
1867
|
observation?: {
|
|
@@ -1509,6 +1878,11 @@ declare function createBrowserRelayClient(options: Parameters<typeof createRelay
|
|
|
1509
1878
|
posts: "after-enrollment" | "since-start";
|
|
1510
1879
|
historical: "staff" | "automatic" | "claim";
|
|
1511
1880
|
} | undefined;
|
|
1881
|
+
tracker?: {
|
|
1882
|
+
tracker: string;
|
|
1883
|
+
source: "custom" | "x-search";
|
|
1884
|
+
beneficiary: "author" | "replied-to";
|
|
1885
|
+
} | undefined;
|
|
1512
1886
|
} | {
|
|
1513
1887
|
kind: "manual";
|
|
1514
1888
|
input: "text";
|
|
@@ -1571,7 +1945,7 @@ declare function createBrowserRelayClient(options: Parameters<typeof createRelay
|
|
|
1571
1945
|
kind: "keyed";
|
|
1572
1946
|
};
|
|
1573
1947
|
completionCount: number;
|
|
1574
|
-
visibility: "
|
|
1948
|
+
visibility: "hidden" | "visible";
|
|
1575
1949
|
missing: {
|
|
1576
1950
|
quest: string;
|
|
1577
1951
|
title: string;
|
|
@@ -1974,6 +2348,11 @@ declare function createBrowserRelayClient(options: Parameters<typeof createRelay
|
|
|
1974
2348
|
posts: "after-enrollment" | "since-start";
|
|
1975
2349
|
historical: "staff" | "automatic" | "claim";
|
|
1976
2350
|
} | undefined;
|
|
2351
|
+
tracker?: {
|
|
2352
|
+
tracker: string;
|
|
2353
|
+
source: "custom" | "x-search";
|
|
2354
|
+
beneficiary: "author" | "replied-to";
|
|
2355
|
+
} | undefined;
|
|
1977
2356
|
} | {
|
|
1978
2357
|
kind: "manual";
|
|
1979
2358
|
input: "text";
|
|
@@ -2009,11 +2388,11 @@ declare function createBrowserRelayClient(options: Parameters<typeof createRelay
|
|
|
2009
2388
|
} | {
|
|
2010
2389
|
kind: "keyed";
|
|
2011
2390
|
};
|
|
2012
|
-
visibility: "
|
|
2391
|
+
visibility: "hidden" | "visible";
|
|
2013
2392
|
budgets: {
|
|
2014
2393
|
id: string;
|
|
2015
2394
|
scope: "member" | "project";
|
|
2016
|
-
period: "day" | "lifetime";
|
|
2395
|
+
period: "day" | "lifetime" | "week";
|
|
2017
2396
|
limit: number;
|
|
2018
2397
|
cost: number | {
|
|
2019
2398
|
balance: string;
|
|
@@ -2172,6 +2551,11 @@ declare function createBrowserRelayClient(options: Parameters<typeof createRelay
|
|
|
2172
2551
|
posts: "after-enrollment" | "since-start";
|
|
2173
2552
|
historical: "staff" | "automatic" | "claim";
|
|
2174
2553
|
} | undefined;
|
|
2554
|
+
tracker?: {
|
|
2555
|
+
tracker: string;
|
|
2556
|
+
source: "custom" | "x-search";
|
|
2557
|
+
beneficiary: "author" | "replied-to";
|
|
2558
|
+
} | undefined;
|
|
2175
2559
|
} | {
|
|
2176
2560
|
kind: "manual";
|
|
2177
2561
|
input: "text";
|
|
@@ -2207,11 +2591,11 @@ declare function createBrowserRelayClient(options: Parameters<typeof createRelay
|
|
|
2207
2591
|
} | {
|
|
2208
2592
|
kind: "keyed";
|
|
2209
2593
|
};
|
|
2210
|
-
visibility: "
|
|
2594
|
+
visibility: "hidden" | "visible";
|
|
2211
2595
|
budgets: {
|
|
2212
2596
|
id: string;
|
|
2213
2597
|
scope: "member" | "project";
|
|
2214
|
-
period: "day" | "lifetime";
|
|
2598
|
+
period: "day" | "lifetime" | "week";
|
|
2215
2599
|
limit: number;
|
|
2216
2600
|
cost: number | {
|
|
2217
2601
|
balance: string;
|
|
@@ -2369,6 +2753,11 @@ declare function createBrowserRelayClient(options: Parameters<typeof createRelay
|
|
|
2369
2753
|
posts: "after-enrollment" | "since-start";
|
|
2370
2754
|
historical: "staff" | "automatic" | "claim";
|
|
2371
2755
|
} | undefined;
|
|
2756
|
+
tracker?: {
|
|
2757
|
+
tracker: string;
|
|
2758
|
+
source: "custom" | "x-search";
|
|
2759
|
+
beneficiary: "author" | "replied-to";
|
|
2760
|
+
} | undefined;
|
|
2372
2761
|
} | {
|
|
2373
2762
|
kind: "manual";
|
|
2374
2763
|
input: "text";
|
|
@@ -2404,11 +2793,11 @@ declare function createBrowserRelayClient(options: Parameters<typeof createRelay
|
|
|
2404
2793
|
} | {
|
|
2405
2794
|
kind: "keyed";
|
|
2406
2795
|
};
|
|
2407
|
-
visibility: "
|
|
2796
|
+
visibility: "hidden" | "visible";
|
|
2408
2797
|
budgets: {
|
|
2409
2798
|
id: string;
|
|
2410
2799
|
scope: "member" | "project";
|
|
2411
|
-
period: "day" | "lifetime";
|
|
2800
|
+
period: "day" | "lifetime" | "week";
|
|
2412
2801
|
limit: number;
|
|
2413
2802
|
cost: number | {
|
|
2414
2803
|
balance: string;
|
|
@@ -2747,6 +3136,11 @@ declare function createBrowserRelayClient(options: Parameters<typeof createRelay
|
|
|
2747
3136
|
posts: "after-enrollment" | "since-start";
|
|
2748
3137
|
historical: "staff" | "automatic" | "claim";
|
|
2749
3138
|
} | undefined;
|
|
3139
|
+
tracker?: {
|
|
3140
|
+
tracker: string;
|
|
3141
|
+
source: "custom" | "x-search";
|
|
3142
|
+
beneficiary: "author" | "replied-to";
|
|
3143
|
+
} | undefined;
|
|
2750
3144
|
} | {
|
|
2751
3145
|
kind: "manual";
|
|
2752
3146
|
input: "text";
|
|
@@ -2782,11 +3176,11 @@ declare function createBrowserRelayClient(options: Parameters<typeof createRelay
|
|
|
2782
3176
|
} | {
|
|
2783
3177
|
kind: "keyed";
|
|
2784
3178
|
};
|
|
2785
|
-
visibility: "
|
|
3179
|
+
visibility: "hidden" | "visible";
|
|
2786
3180
|
budgets: {
|
|
2787
3181
|
id: string;
|
|
2788
3182
|
scope: "member" | "project";
|
|
2789
|
-
period: "day" | "lifetime";
|
|
3183
|
+
period: "day" | "lifetime" | "week";
|
|
2790
3184
|
limit: number;
|
|
2791
3185
|
cost: number | {
|
|
2792
3186
|
balance: string;
|
|
@@ -2973,6 +3367,11 @@ declare function createBrowserRelayClient(options: Parameters<typeof createRelay
|
|
|
2973
3367
|
posts: "after-enrollment" | "since-start";
|
|
2974
3368
|
historical: "staff" | "automatic" | "claim";
|
|
2975
3369
|
} | undefined;
|
|
3370
|
+
tracker?: {
|
|
3371
|
+
tracker: string;
|
|
3372
|
+
source: "custom" | "x-search";
|
|
3373
|
+
beneficiary: "author" | "replied-to";
|
|
3374
|
+
} | undefined;
|
|
2976
3375
|
} | {
|
|
2977
3376
|
kind: "manual";
|
|
2978
3377
|
input: "text";
|
|
@@ -3008,11 +3407,11 @@ declare function createBrowserRelayClient(options: Parameters<typeof createRelay
|
|
|
3008
3407
|
} | {
|
|
3009
3408
|
kind: "keyed";
|
|
3010
3409
|
};
|
|
3011
|
-
visibility: "
|
|
3410
|
+
visibility: "hidden" | "visible";
|
|
3012
3411
|
budgets: {
|
|
3013
3412
|
id: string;
|
|
3014
3413
|
scope: "member" | "project";
|
|
3015
|
-
period: "day" | "lifetime";
|
|
3414
|
+
period: "day" | "lifetime" | "week";
|
|
3016
3415
|
limit: number;
|
|
3017
3416
|
cost: number | {
|
|
3018
3417
|
balance: string;
|
|
@@ -3079,7 +3478,7 @@ declare function createBrowserRelayClient(options: Parameters<typeof createRelay
|
|
|
3079
3478
|
} | undefined;
|
|
3080
3479
|
} | undefined;
|
|
3081
3480
|
};
|
|
3082
|
-
connections: ("
|
|
3481
|
+
connections: ("x" | "discord" | "google" | "apple")[];
|
|
3083
3482
|
trigger: {
|
|
3084
3483
|
kind: "automatic";
|
|
3085
3484
|
observation?: {
|
|
@@ -3096,6 +3495,11 @@ declare function createBrowserRelayClient(options: Parameters<typeof createRelay
|
|
|
3096
3495
|
posts: "after-enrollment" | "since-start";
|
|
3097
3496
|
historical: "staff" | "automatic" | "claim";
|
|
3098
3497
|
} | undefined;
|
|
3498
|
+
tracker?: {
|
|
3499
|
+
tracker: string;
|
|
3500
|
+
source: "custom" | "x-search";
|
|
3501
|
+
beneficiary: "author" | "replied-to";
|
|
3502
|
+
} | undefined;
|
|
3099
3503
|
} | {
|
|
3100
3504
|
kind: "manual";
|
|
3101
3505
|
input: "text";
|
|
@@ -3158,7 +3562,7 @@ declare function createBrowserRelayClient(options: Parameters<typeof createRelay
|
|
|
3158
3562
|
kind: "keyed";
|
|
3159
3563
|
};
|
|
3160
3564
|
completionCount: number;
|
|
3161
|
-
visibility: "
|
|
3565
|
+
visibility: "hidden" | "visible";
|
|
3162
3566
|
missing: {
|
|
3163
3567
|
quest: string;
|
|
3164
3568
|
title: string;
|
|
@@ -3828,4 +4232,4 @@ declare function createBrowserRelayClient(options: Parameters<typeof createRelay
|
|
|
3828
4232
|
};
|
|
3829
4233
|
declare function browserSubmissionStore(): SubmissionStore;
|
|
3830
4234
|
|
|
3831
|
-
export { browserSubmissionStore, createBrowserRelayClient };
|
|
4235
|
+
export { type DiscoveredWallet, type Eip1193Provider, type KeplrLike, type SolanaInjectedProvider, type StandardWallet, type StandardWalletAccount, browserSubmissionStore, cosmosSigner, createBrowserRelayClient, discoverCosmosWallets, discoverEvmWallets, discoverSolanaWallets, evmSigner, solanaSigner, walletStandardSolanaSigner };
|