@domino-sdk/relay 0.24.0 → 0.25.0

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/browser.d.ts CHANGED
@@ -1,8 +1,80 @@
1
- import { t as referralAcceptSchema, L as LeaderboardQuery, w as walletChallengeInputSchema, u as walletProofSchema, v as AuthProvider, y as engagementPageQuerySchema, z as contentQualificationQuerySchema, E as contentAdmissionQuerySchema, F as contentEnrollmentInputSchema, G as contentReleaseInputSchema } from './submission-input-CK4Dy19H.js';
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: {
@@ -212,7 +284,7 @@ declare function createBrowserRelayClient(options: Parameters<typeof createRelay
212
284
  accounts: {
213
285
  id: string;
214
286
  program: string;
215
- kind: "milestone" | "fixed" | "bonus";
287
+ kind: "fixed" | "milestone" | "bonus";
216
288
  balance: string;
217
289
  earned: number;
218
290
  settled: number;
@@ -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: "discord" | "google" | "x";
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: "discord" | "google" | "x";
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: "discord" | "google" | "x";
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: "discord" | "google" | "x";
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: "discord" | "google" | "x" | null;
474
+ hidden: boolean;
475
+ locked: boolean;
476
+ visibility: "participants" | "public" | "private";
477
+ options: {
478
+ provider: "discord" | "google" | "x";
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: "discord" | "google" | "x";
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: "discord" | "google" | "x" | null;
504
+ hidden: boolean;
505
+ locked: boolean;
506
+ visibility: "participants" | "public" | "private";
507
+ options: {
508
+ provider: "discord" | "google" | "x";
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: "discord" | "google" | "x";
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: "discord" | "google" | "x" | null;
535
+ hidden: boolean;
536
+ locked: boolean;
537
+ visibility: "participants" | "public" | "private";
538
+ options: {
539
+ provider: "discord" | "google" | "x";
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: "discord" | "google" | "x";
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: ("google" | "apple" | "x" | "discord")[];
616
+ connections: ("discord" | "google" | "apple" | "x")[];
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";
@@ -393,7 +659,7 @@ declare function createBrowserRelayClient(options: Parameters<typeof createRelay
393
659
  };
394
660
  availability: {
395
661
  kind: "available";
396
- input: "quiz" | "url" | "text" | "photo" | "none";
662
+ input: "quiz" | "text" | "url" | "photo" | "none";
397
663
  } | {
398
664
  kind: "completed";
399
665
  } | {
@@ -442,7 +708,7 @@ declare function createBrowserRelayClient(options: Parameters<typeof createRelay
442
708
  quest: string;
443
709
  member: string;
444
710
  evidence: string | null;
445
- status: "needs-review" | "queued" | "evaluating" | "accepted" | "progressed" | "rejected" | "failed";
711
+ status: "queued" | "evaluating" | "accepted" | "progressed" | "rejected" | "needs-review" | "failed";
446
712
  reason: string | null;
447
713
  retries: number;
448
714
  generation: number;
@@ -490,7 +756,7 @@ declare function createBrowserRelayClient(options: Parameters<typeof createRelay
490
756
  } | undefined;
491
757
  } | null;
492
758
  release: string;
493
- interaction: "quiz" | "url" | "text" | "staff" | "photo" | "automatic" | "claim";
759
+ interaction: "staff" | "quiz" | "text" | "url" | "photo" | "automatic" | "claim";
494
760
  lifecycle: "active" | "paused" | "archived";
495
761
  rewards: ({
496
762
  kind: "points";
@@ -552,7 +818,7 @@ declare function createBrowserRelayClient(options: Parameters<typeof createRelay
552
818
  quest: string;
553
819
  member: string;
554
820
  evidence: string | null;
555
- status: "needs-review" | "queued" | "evaluating" | "accepted" | "progressed" | "rejected" | "failed";
821
+ status: "queued" | "evaluating" | "accepted" | "progressed" | "rejected" | "needs-review" | "failed";
556
822
  reason: string | null;
557
823
  retries: number;
558
824
  generation: number;
@@ -624,7 +890,7 @@ declare function createBrowserRelayClient(options: Parameters<typeof createRelay
624
890
  } | undefined;
625
891
  } | undefined;
626
892
  };
627
- connections: ("google" | "apple" | "x" | "discord")[];
893
+ connections: ("discord" | "google" | "apple" | "x")[];
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";
@@ -665,7 +936,7 @@ declare function createBrowserRelayClient(options: Parameters<typeof createRelay
665
936
  };
666
937
  availability: {
667
938
  kind: "available";
668
- input: "quiz" | "url" | "text" | "photo" | "none";
939
+ input: "quiz" | "text" | "url" | "photo" | "none";
669
940
  } | {
670
941
  kind: "completed";
671
942
  } | {
@@ -714,7 +985,7 @@ declare function createBrowserRelayClient(options: Parameters<typeof createRelay
714
985
  quest: string;
715
986
  member: string;
716
987
  evidence: string | null;
717
- status: "needs-review" | "queued" | "evaluating" | "accepted" | "progressed" | "rejected" | "failed";
988
+ status: "queued" | "evaluating" | "accepted" | "progressed" | "rejected" | "needs-review" | "failed";
718
989
  reason: string | null;
719
990
  retries: number;
720
991
  generation: number;
@@ -762,7 +1033,7 @@ declare function createBrowserRelayClient(options: Parameters<typeof createRelay
762
1033
  } | undefined;
763
1034
  } | null;
764
1035
  release: string;
765
- interaction: "quiz" | "url" | "text" | "staff" | "photo" | "automatic" | "claim";
1036
+ interaction: "staff" | "quiz" | "text" | "url" | "photo" | "automatic" | "claim";
766
1037
  lifecycle: "active" | "paused" | "archived";
767
1038
  rewards: ({
768
1039
  kind: "points";
@@ -844,7 +1115,7 @@ declare function createBrowserRelayClient(options: Parameters<typeof createRelay
844
1115
  } | undefined;
845
1116
  } | undefined;
846
1117
  };
847
- connections: ("google" | "apple" | "x" | "discord")[];
1118
+ connections: ("discord" | "google" | "apple" | "x")[];
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";
@@ -885,7 +1161,7 @@ declare function createBrowserRelayClient(options: Parameters<typeof createRelay
885
1161
  };
886
1162
  availability: {
887
1163
  kind: "available";
888
- input: "quiz" | "url" | "text" | "photo" | "none";
1164
+ input: "quiz" | "text" | "url" | "photo" | "none";
889
1165
  } | {
890
1166
  kind: "completed";
891
1167
  } | {
@@ -934,7 +1210,7 @@ declare function createBrowserRelayClient(options: Parameters<typeof createRelay
934
1210
  quest: string;
935
1211
  member: string;
936
1212
  evidence: string | null;
937
- status: "needs-review" | "queued" | "evaluating" | "accepted" | "progressed" | "rejected" | "failed";
1213
+ status: "queued" | "evaluating" | "accepted" | "progressed" | "rejected" | "needs-review" | "failed";
938
1214
  reason: string | null;
939
1215
  retries: number;
940
1216
  generation: number;
@@ -982,7 +1258,7 @@ declare function createBrowserRelayClient(options: Parameters<typeof createRelay
982
1258
  } | undefined;
983
1259
  } | null;
984
1260
  release: string;
985
- interaction: "quiz" | "url" | "text" | "staff" | "photo" | "automatic" | "claim";
1261
+ interaction: "staff" | "quiz" | "text" | "url" | "photo" | "automatic" | "claim";
986
1262
  lifecycle: "active" | "paused" | "archived";
987
1263
  rewards: ({
988
1264
  kind: "points";
@@ -1067,7 +1343,7 @@ declare function createBrowserRelayClient(options: Parameters<typeof createRelay
1067
1343
  } | undefined;
1068
1344
  } | undefined;
1069
1345
  };
1070
- connections: ("google" | "apple" | "x" | "discord")[];
1346
+ connections: ("discord" | "google" | "apple" | "x")[];
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";
@@ -1108,7 +1389,7 @@ declare function createBrowserRelayClient(options: Parameters<typeof createRelay
1108
1389
  };
1109
1390
  availability: {
1110
1391
  kind: "available";
1111
- input: "quiz" | "url" | "text" | "photo" | "none";
1392
+ input: "quiz" | "text" | "url" | "photo" | "none";
1112
1393
  } | {
1113
1394
  kind: "completed";
1114
1395
  } | {
@@ -1157,7 +1438,7 @@ declare function createBrowserRelayClient(options: Parameters<typeof createRelay
1157
1438
  quest: string;
1158
1439
  member: string;
1159
1440
  evidence: string | null;
1160
- status: "needs-review" | "queued" | "evaluating" | "accepted" | "progressed" | "rejected" | "failed";
1441
+ status: "queued" | "evaluating" | "accepted" | "progressed" | "rejected" | "needs-review" | "failed";
1161
1442
  reason: string | null;
1162
1443
  retries: number;
1163
1444
  generation: number;
@@ -1205,7 +1486,7 @@ declare function createBrowserRelayClient(options: Parameters<typeof createRelay
1205
1486
  } | undefined;
1206
1487
  } | null;
1207
1488
  release: string;
1208
- interaction: "quiz" | "url" | "text" | "staff" | "photo" | "automatic" | "claim";
1489
+ interaction: "staff" | "quiz" | "text" | "url" | "photo" | "automatic" | "claim";
1209
1490
  lifecycle: "active" | "paused" | "archived";
1210
1491
  rewards: ({
1211
1492
  kind: "points";
@@ -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: "google" | "apple" | "x" | "discord";
1615
+ provider: "discord" | "google" | "apple" | "x";
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: "google" | "apple" | "x" | "discord";
1691
+ provider: "discord" | "google" | "apple" | "x";
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;
@@ -1420,7 +1789,7 @@ declare function createBrowserRelayClient(options: Parameters<typeof createRelay
1420
1789
  quest: string;
1421
1790
  member: string;
1422
1791
  evidence: string | null;
1423
- status: "needs-review" | "queued" | "evaluating" | "accepted" | "progressed" | "rejected" | "failed";
1792
+ status: "queued" | "evaluating" | "accepted" | "progressed" | "rejected" | "needs-review" | "failed";
1424
1793
  reason: string | null;
1425
1794
  retries: number;
1426
1795
  generation: number;
@@ -1492,7 +1861,7 @@ declare function createBrowserRelayClient(options: Parameters<typeof createRelay
1492
1861
  } | undefined;
1493
1862
  } | undefined;
1494
1863
  };
1495
- connections: ("google" | "apple" | "x" | "discord")[];
1864
+ connections: ("discord" | "google" | "apple" | "x")[];
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";
@@ -1533,7 +1907,7 @@ declare function createBrowserRelayClient(options: Parameters<typeof createRelay
1533
1907
  };
1534
1908
  availability: {
1535
1909
  kind: "available";
1536
- input: "quiz" | "url" | "text" | "photo" | "none";
1910
+ input: "quiz" | "text" | "url" | "photo" | "none";
1537
1911
  } | {
1538
1912
  kind: "completed";
1539
1913
  } | {
@@ -1582,7 +1956,7 @@ declare function createBrowserRelayClient(options: Parameters<typeof createRelay
1582
1956
  quest: string;
1583
1957
  member: string;
1584
1958
  evidence: string | null;
1585
- status: "needs-review" | "queued" | "evaluating" | "accepted" | "progressed" | "rejected" | "failed";
1959
+ status: "queued" | "evaluating" | "accepted" | "progressed" | "rejected" | "needs-review" | "failed";
1586
1960
  reason: string | null;
1587
1961
  retries: number;
1588
1962
  generation: number;
@@ -1749,7 +2123,7 @@ declare function createBrowserRelayClient(options: Parameters<typeof createRelay
1749
2123
  provider: "discord";
1750
2124
  action: "grant-role";
1751
2125
  roleId: string;
1752
- status: "pending" | "failed" | "delivered";
2126
+ status: "failed" | "pending" | "delivered";
1753
2127
  attempts: number;
1754
2128
  nextAt: number;
1755
2129
  lastError: string | null;
@@ -1765,7 +2139,7 @@ declare function createBrowserRelayClient(options: Parameters<typeof createRelay
1765
2139
  quest: string;
1766
2140
  member: string;
1767
2141
  evidence: string | null;
1768
- status: "needs-review" | "queued" | "evaluating" | "accepted" | "progressed" | "rejected" | "failed";
2142
+ status: "queued" | "evaluating" | "accepted" | "progressed" | "rejected" | "needs-review" | "failed";
1769
2143
  reason: string | null;
1770
2144
  retries: number;
1771
2145
  generation: number;
@@ -1831,7 +2205,7 @@ declare function createBrowserRelayClient(options: Parameters<typeof createRelay
1831
2205
  code: string;
1832
2206
  definition: {
1833
2207
  quest: string;
1834
- runtimeVersion: 1 | 2;
2208
+ runtimeVersion: 2 | 1;
1835
2209
  title: string;
1836
2210
  presentation: {
1837
2211
  quiz?: {
@@ -1868,12 +2242,12 @@ declare function createBrowserRelayClient(options: Parameters<typeof createRelay
1868
2242
  kind: "resource";
1869
2243
  default: string;
1870
2244
  source: {
2245
+ provider: "domino";
2246
+ resource: "point-ledger";
2247
+ } | {
1871
2248
  provider: "discord";
1872
2249
  resource: "channel";
1873
2250
  types: ("text" | "announcement")[];
1874
- } | {
1875
- provider: "domino";
1876
- resource: "point-ledger";
1877
2251
  } | {
1878
2252
  provider: "discord";
1879
2253
  resource: "role";
@@ -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";
@@ -2012,8 +2391,8 @@ declare function createBrowserRelayClient(options: Parameters<typeof createRelay
2012
2391
  visibility: "visible" | "hidden";
2013
2392
  budgets: {
2014
2393
  id: string;
2015
- scope: "member" | "project";
2016
- period: "day" | "lifetime";
2394
+ scope: "project" | "member";
2395
+ period: "day" | "week" | "lifetime";
2017
2396
  limit: number;
2018
2397
  cost: number | {
2019
2398
  balance: string;
@@ -2029,7 +2408,7 @@ declare function createBrowserRelayClient(options: Parameters<typeof createRelay
2029
2408
  code: string;
2030
2409
  definition: {
2031
2410
  quest: string;
2032
- runtimeVersion: 1 | 2;
2411
+ runtimeVersion: 2 | 1;
2033
2412
  title: string;
2034
2413
  presentation: {
2035
2414
  quiz?: {
@@ -2066,12 +2445,12 @@ declare function createBrowserRelayClient(options: Parameters<typeof createRelay
2066
2445
  kind: "resource";
2067
2446
  default: string;
2068
2447
  source: {
2448
+ provider: "domino";
2449
+ resource: "point-ledger";
2450
+ } | {
2069
2451
  provider: "discord";
2070
2452
  resource: "channel";
2071
2453
  types: ("text" | "announcement")[];
2072
- } | {
2073
- provider: "domino";
2074
- resource: "point-ledger";
2075
2454
  } | {
2076
2455
  provider: "discord";
2077
2456
  resource: "role";
@@ -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";
@@ -2210,8 +2594,8 @@ declare function createBrowserRelayClient(options: Parameters<typeof createRelay
2210
2594
  visibility: "visible" | "hidden";
2211
2595
  budgets: {
2212
2596
  id: string;
2213
- scope: "member" | "project";
2214
- period: "day" | "lifetime";
2597
+ scope: "project" | "member";
2598
+ period: "day" | "week" | "lifetime";
2215
2599
  limit: number;
2216
2600
  cost: number | {
2217
2601
  balance: string;
@@ -2226,7 +2610,7 @@ declare function createBrowserRelayClient(options: Parameters<typeof createRelay
2226
2610
  snapshot: () => Promise<{
2227
2611
  releases: {
2228
2612
  quest: string;
2229
- runtimeVersion: 1 | 2;
2613
+ runtimeVersion: 2 | 1;
2230
2614
  title: string;
2231
2615
  presentation: {
2232
2616
  quiz?: {
@@ -2263,12 +2647,12 @@ declare function createBrowserRelayClient(options: Parameters<typeof createRelay
2263
2647
  kind: "resource";
2264
2648
  default: string;
2265
2649
  source: {
2650
+ provider: "domino";
2651
+ resource: "point-ledger";
2652
+ } | {
2266
2653
  provider: "discord";
2267
2654
  resource: "channel";
2268
2655
  types: ("text" | "announcement")[];
2269
- } | {
2270
- provider: "domino";
2271
- resource: "point-ledger";
2272
2656
  } | {
2273
2657
  provider: "discord";
2274
2658
  resource: "role";
@@ -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";
@@ -2407,8 +2796,8 @@ declare function createBrowserRelayClient(options: Parameters<typeof createRelay
2407
2796
  visibility: "visible" | "hidden";
2408
2797
  budgets: {
2409
2798
  id: string;
2410
- scope: "member" | "project";
2411
- period: "day" | "lifetime";
2799
+ scope: "project" | "member";
2800
+ period: "day" | "week" | "lifetime";
2412
2801
  limit: number;
2413
2802
  cost: number | {
2414
2803
  balance: string;
@@ -2539,7 +2928,7 @@ declare function createBrowserRelayClient(options: Parameters<typeof createRelay
2539
2928
  quest: string;
2540
2929
  member: string;
2541
2930
  evidence: string | null;
2542
- status: "needs-review" | "queued" | "evaluating" | "accepted" | "progressed" | "rejected" | "failed";
2931
+ status: "queued" | "evaluating" | "accepted" | "progressed" | "rejected" | "needs-review" | "failed";
2543
2932
  reason: string | null;
2544
2933
  retries: number;
2545
2934
  generation: number;
@@ -2604,7 +2993,7 @@ declare function createBrowserRelayClient(options: Parameters<typeof createRelay
2604
2993
  }>;
2605
2994
  publish: (release: ReleaseInput) => Promise<{
2606
2995
  quest: string;
2607
- runtimeVersion: 1 | 2;
2996
+ runtimeVersion: 2 | 1;
2608
2997
  title: string;
2609
2998
  presentation: {
2610
2999
  quiz?: {
@@ -2641,12 +3030,12 @@ declare function createBrowserRelayClient(options: Parameters<typeof createRelay
2641
3030
  kind: "resource";
2642
3031
  default: string;
2643
3032
  source: {
3033
+ provider: "domino";
3034
+ resource: "point-ledger";
3035
+ } | {
2644
3036
  provider: "discord";
2645
3037
  resource: "channel";
2646
3038
  types: ("text" | "announcement")[];
2647
- } | {
2648
- provider: "domino";
2649
- resource: "point-ledger";
2650
3039
  } | {
2651
3040
  provider: "discord";
2652
3041
  resource: "role";
@@ -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";
@@ -2785,8 +3179,8 @@ declare function createBrowserRelayClient(options: Parameters<typeof createRelay
2785
3179
  visibility: "visible" | "hidden";
2786
3180
  budgets: {
2787
3181
  id: string;
2788
- scope: "member" | "project";
2789
- period: "day" | "lifetime";
3182
+ scope: "project" | "member";
3183
+ period: "day" | "week" | "lifetime";
2790
3184
  limit: number;
2791
3185
  cost: number | {
2792
3186
  balance: string;
@@ -2830,7 +3224,7 @@ declare function createBrowserRelayClient(options: Parameters<typeof createRelay
2830
3224
  }>;
2831
3225
  publishBatch: (releases: ReleaseInput[]) => Promise<{
2832
3226
  quest: string;
2833
- runtimeVersion: 1 | 2;
3227
+ runtimeVersion: 2 | 1;
2834
3228
  title: string;
2835
3229
  presentation: {
2836
3230
  quiz?: {
@@ -2867,12 +3261,12 @@ declare function createBrowserRelayClient(options: Parameters<typeof createRelay
2867
3261
  kind: "resource";
2868
3262
  default: string;
2869
3263
  source: {
3264
+ provider: "domino";
3265
+ resource: "point-ledger";
3266
+ } | {
2870
3267
  provider: "discord";
2871
3268
  resource: "channel";
2872
3269
  types: ("text" | "announcement")[];
2873
- } | {
2874
- provider: "domino";
2875
- resource: "point-ledger";
2876
3270
  } | {
2877
3271
  provider: "discord";
2878
3272
  resource: "role";
@@ -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";
@@ -3011,8 +3410,8 @@ declare function createBrowserRelayClient(options: Parameters<typeof createRelay
3011
3410
  visibility: "visible" | "hidden";
3012
3411
  budgets: {
3013
3412
  id: string;
3014
- scope: "member" | "project";
3015
- period: "day" | "lifetime";
3413
+ scope: "project" | "member";
3414
+ period: "day" | "week" | "lifetime";
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: ("google" | "apple" | "x" | "discord")[];
3481
+ connections: ("discord" | "google" | "apple" | "x")[];
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";
@@ -3120,7 +3524,7 @@ declare function createBrowserRelayClient(options: Parameters<typeof createRelay
3120
3524
  };
3121
3525
  availability: {
3122
3526
  kind: "available";
3123
- input: "quiz" | "url" | "text" | "photo" | "none";
3527
+ input: "quiz" | "text" | "url" | "photo" | "none";
3124
3528
  } | {
3125
3529
  kind: "completed";
3126
3530
  } | {
@@ -3169,7 +3573,7 @@ declare function createBrowserRelayClient(options: Parameters<typeof createRelay
3169
3573
  quest: string;
3170
3574
  member: string;
3171
3575
  evidence: string | null;
3172
- status: "needs-review" | "queued" | "evaluating" | "accepted" | "progressed" | "rejected" | "failed";
3576
+ status: "queued" | "evaluating" | "accepted" | "progressed" | "rejected" | "needs-review" | "failed";
3173
3577
  reason: string | null;
3174
3578
  retries: number;
3175
3579
  generation: number;
@@ -3595,7 +3999,7 @@ declare function createBrowserRelayClient(options: Parameters<typeof createRelay
3595
3999
  content: {
3596
4000
  performance: (input: zod.infer<typeof contentPerformanceQuerySchema>) => Promise<{
3597
4001
  current: {
3598
- state: "needs-review" | "pending" | "failed" | "superseded" | "qualified" | "unqualified" | "content-pending" | "content-unqualified" | "waiting";
4002
+ state: "needs-review" | "failed" | "pending" | "qualified" | "content-pending" | "content-unqualified" | "waiting" | "unqualified" | "superseded";
3599
4003
  reason: string | null;
3600
4004
  contentAttempt: string;
3601
4005
  attempt: string | null;
@@ -3611,7 +4015,7 @@ declare function createBrowserRelayClient(options: Parameters<typeof createRelay
3611
4015
  observation: string;
3612
4016
  observedAt: number;
3613
4017
  metrics: Partial<Record<"likes" | "replies" | "reposts" | "quotes" | "views" | "bookmarks", number>>;
3614
- state: "needs-review" | "pending" | "failed" | "superseded" | "qualified" | "unqualified";
4018
+ state: "needs-review" | "failed" | "pending" | "qualified" | "unqualified" | "superseded";
3615
4019
  reason: string | null;
3616
4020
  }[];
3617
4021
  next: number | null;
@@ -3626,7 +4030,7 @@ declare function createBrowserRelayClient(options: Parameters<typeof createRelay
3626
4030
  revision: string;
3627
4031
  observation: string;
3628
4032
  current: boolean;
3629
- state: "needs-review" | "pending" | "failed" | "superseded" | "qualified" | "unqualified" | "stale" | "blocked" | "unavailable";
4033
+ state: "needs-review" | "failed" | "pending" | "qualified" | "unqualified" | "superseded" | "stale" | "blocked" | "unavailable";
3630
4034
  reason: string | null;
3631
4035
  reward: {
3632
4036
  attempt: string | null;
@@ -3641,7 +4045,7 @@ declare function createBrowserRelayClient(options: Parameters<typeof createRelay
3641
4045
  quest: string;
3642
4046
  content: string;
3643
4047
  release: string;
3644
- state: "pending" | "admitted" | "excluded";
4048
+ state: "pending" | "excluded" | "admitted";
3645
4049
  reason: string | null;
3646
4050
  attempt: string | null;
3647
4051
  }[];
@@ -3656,7 +4060,7 @@ declare function createBrowserRelayClient(options: Parameters<typeof createRelay
3656
4060
  quest: string;
3657
4061
  content: string;
3658
4062
  release: string;
3659
- state: "pending" | "admitted" | "excluded";
4063
+ state: "pending" | "excluded" | "admitted";
3660
4064
  reason: string | null;
3661
4065
  attempt: string | null;
3662
4066
  }>;
@@ -3667,7 +4071,7 @@ declare function createBrowserRelayClient(options: Parameters<typeof createRelay
3667
4071
  quest: string;
3668
4072
  member: string;
3669
4073
  evidence: string | null;
3670
- status: "needs-review" | "queued" | "evaluating" | "accepted" | "progressed" | "rejected" | "failed";
4074
+ status: "queued" | "evaluating" | "accepted" | "progressed" | "rejected" | "needs-review" | "failed";
3671
4075
  reason: string | null;
3672
4076
  retries: number;
3673
4077
  generation: number;
@@ -3720,7 +4124,7 @@ declare function createBrowserRelayClient(options: Parameters<typeof createRelay
3720
4124
  quest: string;
3721
4125
  member: string;
3722
4126
  evidence: string | null;
3723
- status: "needs-review" | "queued" | "evaluating" | "accepted" | "progressed" | "rejected" | "failed";
4127
+ status: "queued" | "evaluating" | "accepted" | "progressed" | "rejected" | "needs-review" | "failed";
3724
4128
  reason: string | null;
3725
4129
  retries: number;
3726
4130
  generation: number;
@@ -3778,7 +4182,7 @@ declare function createBrowserRelayClient(options: Parameters<typeof createRelay
3778
4182
  quest: string;
3779
4183
  member: string;
3780
4184
  evidence: string | null;
3781
- status: "needs-review" | "queued" | "evaluating" | "accepted" | "progressed" | "rejected" | "failed";
4185
+ status: "queued" | "evaluating" | "accepted" | "progressed" | "rejected" | "needs-review" | "failed";
3782
4186
  reason: string | null;
3783
4187
  retries: number;
3784
4188
  generation: number;
@@ -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 };