@domino-sdk/relay 0.27.0 → 0.28.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.
@@ -1,5 +1,5 @@
1
- import { A as AdmittedContent, O as Observation, T as TrackerTriggerContext, a as TrackerReader, X as XReader, I as ImageReader, D as DiscordMember, b as DiscordMessage, W as WalletConnection, S as SolanaBalance, L as LinkedWallet, c as WalletBalanceQuery, d as WalletBalance, o as observationTriggerSchema, e as TrackerDefinition, f as TrackerBeneficiary, g as TrackerTriggerPolicy, B as Budget, h as AuthoringIdentity, C as ContentMetric, i as IntegrationProvider, j as StreakPolicy, k as TextEvidence, U as UrlEvidence, l as TextOptions, m as UrlOptions } from './submission-input-CYyH_25w.js';
2
- export { n as content, p as customSource, q as defineEngagementReward, r as defineLeaderboard, s as defineReferral, t as defineTracker, u as discord, v as formatUnits, w as parseUnits, x as perContent, y as pointLedgers, z as settings, E as streak, F as trackerTriggerContextSchema, G as x } from './submission-input-CYyH_25w.js';
1
+ import { A as AdmittedContent, O as Observation, T as TrackerTriggerContext, a as TrackerReader, X as XReader, I as ImageReader, D as DiscordMember, b as DiscordMessage, W as WalletConnection, S as SolanaBalance, L as LinkedWallet, c as WalletBalanceQuery, d as WalletBalance, o as observationTriggerSchema, e as TrackerDefinition, f as TrackerBeneficiary, g as TrackerTriggerPolicy, B as Budget, h as AuthoringIdentity, C as ContentMetric, i as IntegrationProvider, j as StreakPolicy, k as TextEvidence, U as UrlEvidence, l as TextOptions, m as UrlOptions } from './submission-input-D3t8WKOk.js';
2
+ export { n as content, p as customSource, q as defineEngagementReward, r as defineLeaderboard, s as defineReferral, t as defineTracker, u as discord, v as formatUnits, w as parseUnits, x as perContent, y as pointLedgers, z as settings, E as streak, F as trackerTriggerContextSchema, G as x } from './submission-input-D3t8WKOk.js';
3
3
  import { z } from 'zod';
4
4
  import { TextReviewInput, TextResult, PhotoResult, rewardSchema, triggerSchema, QuestPresentation, QuizEvidence, Decision, TieredRewardDefinition } from './schema.js';
5
5
 
package/dist/browser.d.ts CHANGED
@@ -1,6 +1,6 @@
1
- import { N as WalletSigner, a3 as CosmosChain, a4 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-CYyH_25w.js';
1
+ import { a5 as CosmosChain, a6 as CosmosNetwork, N as WalletSigner, a2 as WalletSignInNetwork, R as AuthProvider, H as referralAcceptSchema, J as LeaderboardQuery, K as WalletAddressInput, M as walletSignatureSchema, L as LinkedWallet, P as walletChallengeInputSchema, Q as walletProofSchema, V as WalletSignature, Y as engagementPageQuerySchema, Z as contentQualificationQuerySchema, _ as contentAdmissionQuerySchema, $ as contentEnrollmentInputSchema, a0 as contentReleaseInputSchema } from './submission-input-D3t8WKOk.js';
2
2
  import { SubmitInput, ReleaseInput, beginHandoverSchema, contentPerformanceQuerySchema } from './schema.js';
3
- import { SubmissionStore, createRelayClient, ProfileUpdate, QuestView, QuestController, ProgressObservation, questExperienceSchema, ProgressObserver, ExchangeInput, PhotoSubmission, QuizSubmission, ClaimSubmission, ValueSubmission } from './index.js';
3
+ import { createRelayClient, SubmissionStore, ProfileUpdate, QuestView, QuestController, ProgressObservation, questExperienceSchema, ProgressObserver, ExchangeInput, PhotoSubmission, QuizSubmission, ClaimSubmission, ValueSubmission } from './index.js';
4
4
  import * as zod from 'zod';
5
5
 
6
6
  /** An EIP-1193 provider, such as `window.ethereum` or an EIP-6963 announcement's provider. */
@@ -85,6 +85,120 @@ declare function discoverSolanaWallets(): DiscoveredWallet[];
85
85
  * the chain ID.
86
86
  */
87
87
  declare function discoverCosmosWallets(chain: CosmosChain | CosmosNetwork): DiscoveredWallet[];
88
+ /**
89
+ * The Cosmos SDK chains an app offers wallets on: one chain or several, each as
90
+ * `{ chainId, chainInfo? }` or `"cosmos:<chain ID>"`. Relay has no chain list of its own.
91
+ */
92
+ type CosmosChains = CosmosChain | CosmosNetwork | readonly (CosmosChain | CosmosNetwork)[];
93
+ /** The chains in `CosmosChains`, as a list. */
94
+ declare function cosmosChainList(chains: CosmosChains | undefined): (CosmosChain | CosmosNetwork)[];
95
+ /** An installed wallet that can sign in on one of the project's enabled wallet families. */
96
+ type SignInWallet = DiscoveredWallet & {
97
+ network: WalletSignInNetwork;
98
+ };
99
+ /**
100
+ * The wallets installed in this browser that can sign in with `families`: EVM wallets first, then
101
+ * Solana wallets, then Cosmos wallets once per chain in `cosmos`. Without `cosmos` there are no
102
+ * Cosmos wallets. Empty during SSR.
103
+ */
104
+ declare function discoverSignInWallets(families: readonly WalletSignInNetwork[], cosmos?: CosmosChains): Promise<SignInWallet[]>;
105
+
106
+ type Auth = ReturnType<typeof createRelayClient>["auth"];
107
+ /** The part of a Relay client sign-in options use. */
108
+ type SignInClient = {
109
+ auth: Pick<Auth, "providers" | "start" | "emailStart" | "emailVerify"> & {
110
+ wallet: Pick<Auth["wallet"], "signIn">;
111
+ };
112
+ };
113
+ /** The sign-in methods a project takes: the platform's OAuth providers and email, and its wallet families. */
114
+ type SignInMethods = {
115
+ providers: AuthProvider[];
116
+ email: boolean;
117
+ /** The wallet families this project enabled for sign-in in Console. */
118
+ wallets: WalletSignInNetwork[];
119
+ /**
120
+ * Set when the methods could not be read, such as when the network failed: they are then email
121
+ * alone, and the server has the final say when the participant uses it.
122
+ */
123
+ error?: string;
124
+ };
125
+ /** Which icon to draw: an OAuth provider's logo, a mail icon, or a generic wallet icon. */
126
+ type SignInIcon = AuthProvider | "email" | "wallet";
127
+ type OAuthSignInOption = {
128
+ kind: "oauth";
129
+ /** The provider, such as `"google"`. */
130
+ id: AuthProvider;
131
+ /** The provider's name, such as "Google". */
132
+ label: string;
133
+ icon: AuthProvider;
134
+ /** Leaves the page for the provider's consent screen. See `SignInOption` for failures. */
135
+ start(): Promise<void>;
136
+ };
137
+ type EmailSignInOption = {
138
+ kind: "email";
139
+ id: "email";
140
+ label: string;
141
+ icon: "email";
142
+ /** Emails a one-time code to the address. */
143
+ sendCode(email: string): Promise<void>;
144
+ /** Signs in with the code sent last. */
145
+ verifyCode(code: string): Promise<void>;
146
+ };
147
+ type WalletSignInOption = {
148
+ kind: "wallet";
149
+ /** Unique among the options, such as `"wallet:eip155:io.metamask"`. */
150
+ id: string;
151
+ /** The wallet's name, with its family or chain when another installed wallet has the same name. */
152
+ label: string;
153
+ icon: "wallet";
154
+ /** The wallet's own icon, a data or HTTPS URL, when it announces one. */
155
+ iconUrl?: string;
156
+ /** The wallet family it signs in with. */
157
+ family: WalletSignInNetwork;
158
+ /** The signer, for `useWallets().link` or `relay.wallets.link`. */
159
+ signer: WalletSigner;
160
+ /** Asks the wallet to sign a message, then signs in, or signs up. See `SignInOption` for failures. */
161
+ start(): Promise<void>;
162
+ };
163
+ /**
164
+ * One way to sign in that this project takes and this browser can use. From `useSignInOptions()`
165
+ * its actions never reject: a failure lands in the hook's `error`. From `signInOptions()` they
166
+ * reject with the failure.
167
+ */
168
+ type SignInOption = OAuthSignInOption | EmailSignInOption | WalletSignInOption;
169
+ /**
170
+ * A sign-in method the project enabled that is not offered, and why:
171
+ * - `cosmos-chains-missing`: the project takes Cosmos wallets but the app named no Cosmos chains.
172
+ * For the app's developer; pass `cosmos` to offer them.
173
+ * - `cosmos-chains-invalid`: the project takes Cosmos wallets but a chain in `cosmos` is not one,
174
+ * such as `"cosmoshub-4"` without the `cosmos:` prefix. For the app's developer; `message` says
175
+ * what is wrong.
176
+ * - `no-wallet-installed`: the project takes wallets but this browser has none for its families.
177
+ * For the participant; `message` says which to install.
178
+ */
179
+ type SignInUnavailable = {
180
+ reason: "cosmos-chains-missing" | "cosmos-chains-invalid" | "no-wallet-installed";
181
+ families: WalletSignInNetwork[];
182
+ message: string;
183
+ };
184
+ type SignInOptions = {
185
+ /** OAuth providers first, then installed wallets, then email. */
186
+ options: SignInOption[];
187
+ unavailable: SignInUnavailable[];
188
+ /** Why the project's methods could not be read; the options are then email alone. */
189
+ methodsError?: string;
190
+ };
191
+ /**
192
+ * Every way a participant can sign in to this project from this browser, for apps without React:
193
+ * the OAuth providers and email the platform configured, and the installed wallets of the families
194
+ * the project enabled. Cosmos wallets need the app's chains in `cosmos`; without them, or when one
195
+ * is invalid, they are not offered and `unavailable` says so. Each option signs in with this
196
+ * client: OAuth leaves the page, email sends a code and then verifies it, a wallet signs a
197
+ * message. The actions reject when they fail.
198
+ */
199
+ declare function signInOptions(relay: SignInClient, input?: {
200
+ cosmos?: CosmosChains;
201
+ }): Promise<SignInOptions>;
88
202
 
89
203
  /** Browser client with durable submission recovery; safe to construct during SSR. */
90
204
  declare function createBrowserRelayClient(options: Parameters<typeof createRelayClient>[0]): {
@@ -4243,4 +4357,4 @@ declare function createBrowserRelayClient(options: Parameters<typeof createRelay
4243
4357
  };
4244
4358
  declare function browserSubmissionStore(): SubmissionStore;
4245
4359
 
4246
- export { type DiscoveredWallet, type Eip1193Provider, type KeplrLike, type SolanaInjectedProvider, type StandardWallet, type StandardWalletAccount, browserSubmissionStore, cosmosSigner, createBrowserRelayClient, discoverCosmosWallets, discoverEvmWallets, discoverSolanaWallets, evmSigner, solanaSigner, walletStandardSolanaSigner };
4360
+ export { type CosmosChains, type DiscoveredWallet, type Eip1193Provider, type EmailSignInOption, type KeplrLike, type OAuthSignInOption, type SignInClient, type SignInIcon, type SignInMethods, type SignInOption, type SignInOptions, type SignInUnavailable, type SignInWallet, type SolanaInjectedProvider, type StandardWallet, type StandardWalletAccount, type WalletSignInOption, browserSubmissionStore, cosmosChainList, cosmosSigner, createBrowserRelayClient, discoverCosmosWallets, discoverEvmWallets, discoverSignInWallets, discoverSolanaWallets, evmSigner, signInOptions, solanaSigner, walletStandardSolanaSigner };
package/dist/browser.js CHANGED
@@ -1,27 +1,33 @@
1
1
  import {
2
2
  browserSubmissionStore,
3
+ cosmosChainList,
3
4
  cosmosSigner,
4
5
  createBrowserRelayClient,
5
6
  discoverCosmosWallets,
6
7
  discoverEvmWallets,
8
+ discoverSignInWallets,
7
9
  discoverSolanaWallets,
8
10
  evmSigner,
11
+ signInOptions,
9
12
  solanaSigner,
10
13
  walletStandardSolanaSigner
11
- } from "./chunk-RVGO2CRA.js";
12
- import "./chunk-D6AIUNSM.js";
14
+ } from "./chunk-NHSA6ATH.js";
15
+ import "./chunk-ZP43MHO3.js";
13
16
  import "./chunk-AKB266O5.js";
14
- import "./chunk-M3R5V5WC.js";
17
+ import "./chunk-AL5GXMKI.js";
15
18
  import "./chunk-D6BX627V.js";
16
19
  import "./chunk-IXLY3A7B.js";
17
20
  export {
18
21
  browserSubmissionStore,
22
+ cosmosChainList,
19
23
  cosmosSigner,
20
24
  createBrowserRelayClient,
21
25
  discoverCosmosWallets,
22
26
  discoverEvmWallets,
27
+ discoverSignInWallets,
23
28
  discoverSolanaWallets,
24
29
  evmSigner,
30
+ signInOptions,
25
31
  solanaSigner,
26
32
  walletStandardSolanaSigner
27
33
  };
@@ -72,6 +72,11 @@ function cosmosChain(chain) {
72
72
  throw new Error('Use a Cosmos network such as "cosmos:cosmoshub-4"');
73
73
  }
74
74
  const value = typeof chain === "string" ? { chainId: chain.slice("cosmos:".length) } : chain;
75
+ if (typeof value?.chainId !== "string") {
76
+ throw new Error(
77
+ 'Pass a Cosmos chain as { chainId } or a network such as "cosmos:cosmoshub-4"'
78
+ );
79
+ }
75
80
  const network = `cosmos:${value.chainId}`;
76
81
  if (!cosmosNetworkPattern.test(network)) {
77
82
  throw new Error(
@@ -1,9 +1,9 @@
1
1
  import {
2
2
  createRelayClient
3
- } from "./chunk-D6AIUNSM.js";
3
+ } from "./chunk-ZP43MHO3.js";
4
4
  import {
5
5
  cosmosChain
6
- } from "./chunk-M3R5V5WC.js";
6
+ } from "./chunk-AL5GXMKI.js";
7
7
 
8
8
  // src/base58.ts
9
9
  var alphabet = "123456789ABCDEFGHJKLMNPQRSTUVWXYZabcdefghijkmnopqrstuvwxyz";
@@ -315,6 +315,173 @@ function discoverCosmosWallets(chain) {
315
315
  }
316
316
  return wallets;
317
317
  }
318
+ function cosmosChainList(chains) {
319
+ return chains === void 0 ? [] : Array.isArray(chains) ? [...chains] : [chains];
320
+ }
321
+ async function discoverSignInWallets(families, cosmos) {
322
+ const tagged = (network, wallets) => wallets.map((wallet) => ({ ...wallet, network }));
323
+ const solana = families.includes("solana") ? tagged("solana", discoverSolanaWallets()) : [];
324
+ const chains = families.includes("cosmos") ? tagged(
325
+ "cosmos",
326
+ cosmosChainList(cosmos).flatMap((chain) => discoverCosmosWallets(chain))
327
+ ) : [];
328
+ const evm = families.includes("eip155") ? tagged("eip155", await discoverEvmWallets()) : [];
329
+ return [...evm, ...solana, ...chains];
330
+ }
331
+
332
+ // src/sign-in-options.ts
333
+ var providerLabels = {
334
+ google: "Google",
335
+ apple: "Apple",
336
+ x: "X",
337
+ discord: "Discord"
338
+ };
339
+ var familyLabels = {
340
+ solana: "Solana",
341
+ eip155: "EVM",
342
+ cosmos: "Cosmos"
343
+ };
344
+ function walletLabels(wallets) {
345
+ const named = wallets.map(
346
+ (wallet) => wallets.some((other) => other !== wallet && other.name === wallet.name) ? `${wallet.name} (${wallet.signer.network?.slice("cosmos:".length) ?? familyLabels[wallet.network]})` : wallet.name
347
+ );
348
+ const seen = /* @__PURE__ */ new Map();
349
+ return named.map((label) => {
350
+ if (named.indexOf(label) === named.lastIndexOf(label)) {
351
+ return label;
352
+ }
353
+ const count = (seen.get(label) ?? 0) + 1;
354
+ seen.set(label, count);
355
+ return `${label} ${count}`;
356
+ });
357
+ }
358
+ function cosmosChainsError(chains) {
359
+ try {
360
+ for (const chain of cosmosChainList(chains)) {
361
+ cosmosChain(chain);
362
+ }
363
+ return null;
364
+ } catch (cause) {
365
+ return cause instanceof Error ? cause.message : String(cause);
366
+ }
367
+ }
368
+ function signInOptionsFrom(methods, wallets, input) {
369
+ const { actions } = input;
370
+ const invalid = cosmosChainsError(input.cosmos);
371
+ const chains = !invalid && cosmosChainList(input.cosmos).length > 0;
372
+ const offered = methods.wallets.filter(
373
+ (family) => family !== "cosmos" || chains
374
+ );
375
+ const found = wallets.filter((wallet) => offered.includes(wallet.network));
376
+ const labels = walletLabels(found);
377
+ const options = [
378
+ ...methods.providers.map((provider) => ({
379
+ kind: "oauth",
380
+ id: provider,
381
+ label: providerLabels[provider],
382
+ icon: provider,
383
+ start: () => actions.oauth(provider)
384
+ })),
385
+ ...found.map((wallet, index) => ({
386
+ kind: "wallet",
387
+ id: `wallet:${wallet.network}:${wallet.id}`,
388
+ label: labels[index] ?? wallet.name,
389
+ icon: "wallet",
390
+ ...wallet.icon ? { iconUrl: wallet.icon } : {},
391
+ family: wallet.network,
392
+ signer: wallet.signer,
393
+ start: () => actions.wallet(wallet.signer)
394
+ })),
395
+ ...methods.email ? [
396
+ {
397
+ kind: "email",
398
+ id: "email",
399
+ label: "Email",
400
+ icon: "email",
401
+ sendCode: actions.sendCode,
402
+ verifyCode: actions.verifyCode
403
+ }
404
+ ] : []
405
+ ];
406
+ const unavailable = [];
407
+ if (methods.wallets.includes("cosmos") && invalid) {
408
+ unavailable.push({
409
+ reason: "cosmos-chains-invalid",
410
+ families: ["cosmos"],
411
+ message: `This project takes Cosmos wallets, but this app's Cosmos chains are invalid, so none are offered: ${invalid}.`
412
+ });
413
+ } else if (methods.wallets.includes("cosmos") && !chains) {
414
+ unavailable.push({
415
+ reason: "cosmos-chains-missing",
416
+ families: ["cosmos"],
417
+ message: "This project takes Cosmos wallets, but this app names no Cosmos chains, so none are offered. Pass the chains as the cosmos option."
418
+ });
419
+ }
420
+ if (!input.walletsPending && offered.length > 0 && found.length === 0) {
421
+ const names = new Intl.ListFormat("en", { type: "disjunction" }).format(
422
+ offered.map((family) => familyLabels[family])
423
+ );
424
+ unavailable.push({
425
+ reason: "no-wallet-installed",
426
+ families: offered,
427
+ message: `Wallet sign-in accepts ${names} wallets. Install one in this browser, then reload this page.`
428
+ });
429
+ }
430
+ return {
431
+ options,
432
+ unavailable,
433
+ ...methods.error ? { methodsError: methods.error } : {}
434
+ };
435
+ }
436
+ async function readSignInMethods(relay) {
437
+ try {
438
+ const result = await relay.auth.providers();
439
+ return {
440
+ providers: result.providers.filter((entry) => entry.configured).map((entry) => entry.provider),
441
+ email: result.email,
442
+ wallets: result.wallets
443
+ };
444
+ } catch (cause) {
445
+ return {
446
+ providers: [],
447
+ email: true,
448
+ wallets: [],
449
+ error: cause instanceof Error && cause.message ? cause.message : "Couldn't read the project's sign-in methods."
450
+ };
451
+ }
452
+ }
453
+ async function signInOptions(relay, input = {}) {
454
+ const methods = await readSignInMethods(relay);
455
+ const wallets = await discoverSignInWallets(
456
+ methods.wallets,
457
+ cosmosChainsError(input.cosmos) ? void 0 : input.cosmos
458
+ );
459
+ let challenge = null;
460
+ return signInOptionsFrom(methods, wallets, {
461
+ cosmos: input.cosmos,
462
+ actions: {
463
+ async oauth(provider) {
464
+ const { url } = await relay.auth.start(provider, "sign-in");
465
+ window.location.assign(url);
466
+ },
467
+ async sendCode(email) {
468
+ challenge = null;
469
+ challenge = (await relay.auth.emailStart(email)).challenge;
470
+ },
471
+ async verifyCode(code) {
472
+ if (!challenge) {
473
+ throw new Error("Request a new code first.");
474
+ }
475
+ await relay.auth.emailVerify(challenge, code.trim());
476
+ challenge = null;
477
+ },
478
+ async wallet(signer) {
479
+ await relay.auth.wallet.signIn(signer);
480
+ challenge = null;
481
+ }
482
+ }
483
+ });
484
+ }
318
485
 
319
486
  // src/browser.ts
320
487
  function createBrowserRelayClient(options) {
@@ -377,6 +544,12 @@ export {
377
544
  discoverEvmWallets,
378
545
  discoverSolanaWallets,
379
546
  discoverCosmosWallets,
547
+ cosmosChainList,
548
+ discoverSignInWallets,
549
+ cosmosChainsError,
550
+ signInOptionsFrom,
551
+ readSignInMethods,
552
+ signInOptions,
380
553
  createBrowserRelayClient,
381
554
  browserSubmissionStore
382
555
  };
@@ -35,7 +35,7 @@ import {
35
35
  walletSignInNetworksSchema,
36
36
  walletSignatureSchema,
37
37
  walletUnlinkInputSchema
38
- } from "./chunk-M3R5V5WC.js";
38
+ } from "./chunk-AL5GXMKI.js";
39
39
  import {
40
40
  AVATAR_UPLOAD_LIMIT,
41
41
  avatarUploadTypes,
package/dist/index.d.ts CHANGED
@@ -1,5 +1,5 @@
1
- import { a7 as ValueEvidence, L as LinkedWallet, H as referralAcceptSchema, J as LeaderboardQuery, K as WalletAddressInput, M as walletSignatureSchema, N as WalletSigner, 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-CYyH_25w.js';
2
- export { a2 as AccountConnection, A as AdmittedContent, B as Budget, C as ContentMetric, a8 as ContentPerformancePolicy, a9 as ContentPolicy, a3 as CosmosChain, a4 as CosmosNetwork, D as DiscordMember, b as DiscordMessage, aa as EngagementDefinition, ab as EvmChain, ac as EvmChainInfo, ad as ImageAssetArtifact, ae as ImageComparison, af as ImageExtraction, ag as ImageFields, ah as ImageInspection, I as ImageReader, ai as ImageReference, aj as ImageRequest, ak as ImageSightings, i as IntegrationProvider, al as LeaderboardDefinition, a6 as LeaderboardPage, O as Observation, am as ProjectIntegration, an as PublishedImage, ao as QuizContent, ap as ReferralDefinition, aq as ResourceOption, ar as ResourceSource, as as SettingField, at as SettingsValues, S as SolanaBalance, j as StreakPolicy, au as StreakProgress, k as TextEvidence, l as TextOptions, av as TrackerAttribution, f as TrackerBeneficiary, aw as TrackerContent, ax as TrackerContentQuery, e as TrackerDefinition, ay as TrackerOutcome, az as TrackerOutcomeQuery, aA as TrackerPreview, aB as TrackerPreviewInput, aC as TrackerQuery, a as TrackerReader, aD as TrackerRecord, aE as TrackerStatus, T as TrackerTriggerContext, g as TrackerTriggerPolicy, U as UrlEvidence, m as UrlOptions, aF as WALLETS_PER_CHAIN, d as WalletBalance, c as WalletBalanceQuery, aG as WalletChain, W as WalletConnection, aH as WalletMessageChallenge, a1 as WalletSignInNetwork, aI as WalletUnlinkInput, aJ as XConnection, aK as XPost, aL as XProfile, X as XReader, aM as XTweet, aN as accountConnectionSchema, aO as admittedContentSchema, aP as authProviderSchema, aQ as budgetSchema, aR as caip10, aS as communityTimeZoneSchema, aT as compatibleSettingKinds, aU as completionKeySchema, aV as completionPolicySchema, n as content, aW as contentAdmissionPageSchema, aX as contentAdmissionSchema, aY as contentEnrollmentSchema, aZ as contentMetricSchema, a_ as contentMetricsSchema, a$ as contentPerformancePolicySchema, b0 as contentPolicySchema, b1 as contentQualificationDecisionSchema, b2 as contentQualificationPageSchema, b3 as contentQualificationSchema, b4 as cosmosAddressSchema, b5 as cosmosChain, b6 as cosmosNetworkSchema, p as customSource, q as defineEngagementReward, r as defineLeaderboard, s as defineReferral, t as defineTracker, u as discord, b7 as discordMemberInputSchema, b8 as discordMemberSchema, b9 as discordMessageInputSchema, ba as discordMessageSchema, bb as discordReactionSchema, bc as discordServerSchema, bd as engagementArtifactSchema, be as engagementBoundaryPageSchema, bf as engagementChangePreviewInputSchema, bg as engagementChangePreviewSchema, bh as engagementChangeSchema, bi as engagementDefinitionSchema, bj as engagementDeploymentEntrySchema, bk as engagementPageSchema, bl as engagementPublishSchema, bm as engagementRuleSchema, bn as engagementScoreInputSchema, bo as engagementScoreSchema, bp as engagementSettlementSchema, bq as engagementVersionPageSchema, br as engagementVersionQuerySchema, bs as evmAddressSchema, bt as evmChainSchema, bu as evmChains, v as formatUnits, bv as imageAssetArtifactSchema, bw as imageComparisonSchema, bx as imageExtractionSchema, by as imageFieldSchema, bz as imageFieldsSchema, bA as imageInspectionSchema, bB as imageReferenceSchema, bC as imageRequestSchema, bD as imageSightingsSchema, bE as imageUploadRequestSchema, bF as imageUploadsSchema, bG as integrationProviderSchema, bH as isContentParticipantRoute, bI as isWalletParticipantRoute, bJ as isWalletSignInRoute, bK as leaderboardArtifactSchema, bL as leaderboardAuthoringSchema, bM as leaderboardDefinitionSchema, bN as leaderboardExclusionSchema, bO as leaderboardGroupSchema, bP as leaderboardPageSchema, bQ as leaderboardPreviewSchema, bR as leaderboardQuerySchema, bS as leaderboardRowSchema, bT as leaderboardWindowSchema, bU as linkedWalletSchema, bV as missingResourceSettings, bW as observationInputSchema, bX as observationReceiptSchema, bY as observationSchema, o as observationTriggerSchema, bZ as parseImageExtraction, b_ as parseImageResult, b$ as parseSettings, w as parseUnits, x as perContent, y as pointLedgers, c0 as pointsAccountSchema, c1 as pointsEntrySchema, c2 as pointsMutationSchema, c3 as pointsResultSchema, c4 as projectIntegrationSchema, c5 as publishedImageSchema, c6 as publishedLeaderboardSchema, c7 as publishedReferralSchema, c8 as publishedTrackerSchema, c9 as quizChoiceSchema, ca as quizContentSchema, cb as quizQuestionSchema, cc as quizQuestionsSchema, cd as referralAccountSchema, ce as referralArtifactSchema, cf as referralAuthoringSchema, cg as referralControlSchema, ch as referralDefinitionSchema, ci as referralHistorySchema, cj as referralManagementSchema, ck as referralRelationshipSchema, a5 as referralSummarySchema, cl as resourceOptionsSchema, cm as resourceRequestSchema, cn as resourceSourceSchema, co as settingFieldSchema, z as settings, cp as settingsFieldsSchema, cq as settingsValuesSchema, cr as solanaAddressSchema, cs as solanaBalanceSchema, ct as solanaMainnet, E as streak, cu as streakPolicySchema, cv as streakProgressSchema, cw as textEvidenceSchema, cx as textOptionsSchema, cy as trackerArtifactSchema, cz as trackerAttributionSchema, cA as trackerBeneficiarySchema, cB as trackerContentQuerySchema, cC as trackerContentReadSchema, cD as trackerContentSchema, cE as trackerControlSchema, cF as trackerDefinitionSchema, cG as trackerEvidenceSchema, cH as trackerIngestResultSchema, cI as trackerIngestSchema, cJ as trackerOutcomePageSchema, cK as trackerOutcomeQuerySchema, cL as trackerOutcomeRetrySchema, cM as trackerOutcomeSchema, cN as trackerPageSchema, cO as trackerPreviewInputSchema, cP as trackerPreviewLimits, cQ as trackerPreviewSchema, cR as trackerQuerySchema, cS as trackerRecordInputSchema, cT as trackerRecordSchema, cU as trackerSourceSchema, cV as trackerStatusSchema, cW as trackerSummarySchema, F as trackerTriggerContextSchema, cX as trackerTriggerPolicySchema, cY as trackerTriggerRecordSchema, cZ as urlEvidenceSchema, c_ as urlOptionsSchema, c$ as validateSubmissionValue, d0 as valueEvidenceSchema, d1 as walletAddressInput, d2 as walletAddressInputSchema, d3 as walletBalanceSchema, d4 as walletChainSchema, d5 as walletChallengeSchema, d6 as walletConnectionSchema, d7 as walletMessageChallengeSchema, d8 as walletSignInFamilies, d9 as walletSignInNetwork, da as walletSignInNetworkSchema, db as walletSignInNetworksSchema, dc as walletUnlinkInputSchema, G as x, dd as xConnectionSchema, de as xContentBodySchema, df as xIdSchema, dg as xPostId, dh as xPostSchema, di as xProfileSchema, dj as xRequestSchema, dk as xTweetSchema } from './submission-input-CYyH_25w.js';
1
+ import { a7 as ValueEvidence, L as LinkedWallet, H as referralAcceptSchema, J as LeaderboardQuery, K as WalletAddressInput, M as walletSignatureSchema, N as WalletSigner, 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-D3t8WKOk.js';
2
+ export { a1 as AccountConnection, A as AdmittedContent, B as Budget, C as ContentMetric, a8 as ContentPerformancePolicy, a9 as ContentPolicy, a5 as CosmosChain, a6 as CosmosNetwork, D as DiscordMember, b as DiscordMessage, aa as EngagementDefinition, ab as EvmChain, ac as EvmChainInfo, ad as ImageAssetArtifact, ae as ImageComparison, af as ImageExtraction, ag as ImageFields, ah as ImageInspection, I as ImageReader, ai as ImageReference, aj as ImageRequest, ak as ImageSightings, i as IntegrationProvider, al as LeaderboardDefinition, a4 as LeaderboardPage, O as Observation, am as ProjectIntegration, an as PublishedImage, ao as QuizContent, ap as ReferralDefinition, aq as ResourceOption, ar as ResourceSource, as as SettingField, at as SettingsValues, S as SolanaBalance, j as StreakPolicy, au as StreakProgress, k as TextEvidence, l as TextOptions, av as TrackerAttribution, f as TrackerBeneficiary, aw as TrackerContent, ax as TrackerContentQuery, e as TrackerDefinition, ay as TrackerOutcome, az as TrackerOutcomeQuery, aA as TrackerPreview, aB as TrackerPreviewInput, aC as TrackerQuery, a as TrackerReader, aD as TrackerRecord, aE as TrackerStatus, T as TrackerTriggerContext, g as TrackerTriggerPolicy, U as UrlEvidence, m as UrlOptions, aF as WALLETS_PER_CHAIN, d as WalletBalance, c as WalletBalanceQuery, aG as WalletChain, W as WalletConnection, aH as WalletMessageChallenge, a2 as WalletSignInNetwork, aI as WalletUnlinkInput, aJ as XConnection, aK as XPost, aL as XProfile, X as XReader, aM as XTweet, aN as accountConnectionSchema, aO as admittedContentSchema, aP as authProviderSchema, aQ as budgetSchema, aR as caip10, aS as communityTimeZoneSchema, aT as compatibleSettingKinds, aU as completionKeySchema, aV as completionPolicySchema, n as content, aW as contentAdmissionPageSchema, aX as contentAdmissionSchema, aY as contentEnrollmentSchema, aZ as contentMetricSchema, a_ as contentMetricsSchema, a$ as contentPerformancePolicySchema, b0 as contentPolicySchema, b1 as contentQualificationDecisionSchema, b2 as contentQualificationPageSchema, b3 as contentQualificationSchema, b4 as cosmosAddressSchema, b5 as cosmosChain, b6 as cosmosNetworkSchema, p as customSource, q as defineEngagementReward, r as defineLeaderboard, s as defineReferral, t as defineTracker, u as discord, b7 as discordMemberInputSchema, b8 as discordMemberSchema, b9 as discordMessageInputSchema, ba as discordMessageSchema, bb as discordReactionSchema, bc as discordServerSchema, bd as engagementArtifactSchema, be as engagementBoundaryPageSchema, bf as engagementChangePreviewInputSchema, bg as engagementChangePreviewSchema, bh as engagementChangeSchema, bi as engagementDefinitionSchema, bj as engagementDeploymentEntrySchema, bk as engagementPageSchema, bl as engagementPublishSchema, bm as engagementRuleSchema, bn as engagementScoreInputSchema, bo as engagementScoreSchema, bp as engagementSettlementSchema, bq as engagementVersionPageSchema, br as engagementVersionQuerySchema, bs as evmAddressSchema, bt as evmChainSchema, bu as evmChains, v as formatUnits, bv as imageAssetArtifactSchema, bw as imageComparisonSchema, bx as imageExtractionSchema, by as imageFieldSchema, bz as imageFieldsSchema, bA as imageInspectionSchema, bB as imageReferenceSchema, bC as imageRequestSchema, bD as imageSightingsSchema, bE as imageUploadRequestSchema, bF as imageUploadsSchema, bG as integrationProviderSchema, bH as isContentParticipantRoute, bI as isWalletParticipantRoute, bJ as isWalletSignInRoute, bK as leaderboardArtifactSchema, bL as leaderboardAuthoringSchema, bM as leaderboardDefinitionSchema, bN as leaderboardExclusionSchema, bO as leaderboardGroupSchema, bP as leaderboardPageSchema, bQ as leaderboardPreviewSchema, bR as leaderboardQuerySchema, bS as leaderboardRowSchema, bT as leaderboardWindowSchema, bU as linkedWalletSchema, bV as missingResourceSettings, bW as observationInputSchema, bX as observationReceiptSchema, bY as observationSchema, o as observationTriggerSchema, bZ as parseImageExtraction, b_ as parseImageResult, b$ as parseSettings, w as parseUnits, x as perContent, y as pointLedgers, c0 as pointsAccountSchema, c1 as pointsEntrySchema, c2 as pointsMutationSchema, c3 as pointsResultSchema, c4 as projectIntegrationSchema, c5 as publishedImageSchema, c6 as publishedLeaderboardSchema, c7 as publishedReferralSchema, c8 as publishedTrackerSchema, c9 as quizChoiceSchema, ca as quizContentSchema, cb as quizQuestionSchema, cc as quizQuestionsSchema, cd as referralAccountSchema, ce as referralArtifactSchema, cf as referralAuthoringSchema, cg as referralControlSchema, ch as referralDefinitionSchema, ci as referralHistorySchema, cj as referralManagementSchema, ck as referralRelationshipSchema, a3 as referralSummarySchema, cl as resourceOptionsSchema, cm as resourceRequestSchema, cn as resourceSourceSchema, co as settingFieldSchema, z as settings, cp as settingsFieldsSchema, cq as settingsValuesSchema, cr as solanaAddressSchema, cs as solanaBalanceSchema, ct as solanaMainnet, E as streak, cu as streakPolicySchema, cv as streakProgressSchema, cw as textEvidenceSchema, cx as textOptionsSchema, cy as trackerArtifactSchema, cz as trackerAttributionSchema, cA as trackerBeneficiarySchema, cB as trackerContentQuerySchema, cC as trackerContentReadSchema, cD as trackerContentSchema, cE as trackerControlSchema, cF as trackerDefinitionSchema, cG as trackerEvidenceSchema, cH as trackerIngestResultSchema, cI as trackerIngestSchema, cJ as trackerOutcomePageSchema, cK as trackerOutcomeQuerySchema, cL as trackerOutcomeRetrySchema, cM as trackerOutcomeSchema, cN as trackerPageSchema, cO as trackerPreviewInputSchema, cP as trackerPreviewLimits, cQ as trackerPreviewSchema, cR as trackerQuerySchema, cS as trackerRecordInputSchema, cT as trackerRecordSchema, cU as trackerSourceSchema, cV as trackerStatusSchema, cW as trackerSummarySchema, F as trackerTriggerContextSchema, cX as trackerTriggerPolicySchema, cY as trackerTriggerRecordSchema, cZ as urlEvidenceSchema, c_ as urlOptionsSchema, c$ as validateSubmissionValue, d0 as valueEvidenceSchema, d1 as walletAddressInput, d2 as walletAddressInputSchema, d3 as walletBalanceSchema, d4 as walletChainSchema, d5 as walletChallengeSchema, d6 as walletConnectionSchema, d7 as walletMessageChallengeSchema, d8 as walletSignInFamilies, d9 as walletSignInNetwork, da as walletSignInNetworkSchema, db as walletSignInNetworksSchema, dc as walletUnlinkInputSchema, G as x, dd as xConnectionSchema, de as xContentBodySchema, df as xIdSchema, dg as xPostId, dh as xPostSchema, di as xProfileSchema, dj as xRequestSchema, dk as xTweetSchema } from './submission-input-D3t8WKOk.js';
3
3
  import { z } from 'zod';
4
4
  import { errorSchema, QuizEvidence, Attempt, SubmitInput, MemberProgress, questDescriptionSchema, PublishedRelease, ReleaseInput, beginHandoverSchema, contentPerformanceQuerySchema } from './schema.js';
5
5
  export { ContentPerformanceSnapshot, Decision, Entitlement, MemberPage, PhotoResult, PickupAvailability, QuestAvailability, QuestDescription, QuestPresentation, QuestSettingsInput, ReviewPage, Reward, Snapshot, SubmissionEvidence, TextResult, TextReviewInput, TieredRewardDefinition, TieredRewardReference, artifactSchema, attemptSchema, batchReleaseSchema, completionRecordSchema, configurePickupSchema, confirmHandoverSchema, contentPerformancePageSchema, contentPerformanceSnapshotSchema, createStockItemSchema, decisionSchema, entitlementSchema, eventSchema, evidenceSchema, identifier, integrationRewardSchema, mediaUrlSchema, memberListSchema, memberPageSchema, memberProgressSchema, photoResultSchema, pickupAllocationSchema, pickupAvailabilitySchema, pickupCatalogSchema, pickupPolicySchema, pickupSelectionSchema, pointsRewardSchema, prerequisiteSchema, publishedReleaseSchema, questAvailabilitySchema, questPresentationSchema, questSettingsInputSchema, quizAnswersSchema, quizEvidenceSchema, releaseSchema, reservationSchema, reviewItemSchema, reviewListSchema, reviewModeSchema, reviewPageSchema, rewardBundleSchema, rewardKey, rewardSchema, snapshotSchema, staffDecisionSchema, stockItemSchema, stockSchema, storedReviewModeSchema, submissionEvidenceSchema, submitSchema, templateSchema, textResultSchema, textReviewInputSchema, tierRewardSchema, tieredRewardDefinitionSchema, tieredRewardReferenceSchema, triggerSchema } from './schema.js';
package/dist/index.js CHANGED
@@ -72,7 +72,7 @@ import {
72
72
  xPostSchema,
73
73
  xProfileSchema,
74
74
  xRequestSchema
75
- } from "./chunk-D6AIUNSM.js";
75
+ } from "./chunk-ZP43MHO3.js";
76
76
  import {
77
77
  defineEngagementReward,
78
78
  defineLeaderboard,
@@ -156,7 +156,7 @@ import {
156
156
  walletSignInNetworksSchema,
157
157
  walletSignatureSchema,
158
158
  walletUnlinkInputSchema
159
- } from "./chunk-M3R5V5WC.js";
159
+ } from "./chunk-AL5GXMKI.js";
160
160
  import {
161
161
  AVATAR_UPLOAD_LIMIT,
162
162
  avatarProviderSchema,
@@ -2,7 +2,7 @@ import {
2
2
  exchangeResultSchema,
3
3
  isWalletParticipantRoute,
4
4
  isWalletSignInRoute
5
- } from "./chunk-M3R5V5WC.js";
5
+ } from "./chunk-AL5GXMKI.js";
6
6
  import {
7
7
  isProfileParticipantRoute
8
8
  } from "./chunk-D6BX627V.js";
@@ -4,9 +4,10 @@ import * as zod from 'zod';
4
4
  import { z } from 'zod';
5
5
  import { ProfileUpdate, QuestView, QuestController, ProgressObservation, questExperienceSchema, ProgressObserver, ExchangeInput, PhotoSubmission, QuizSubmission, ClaimSubmission, ValueSubmission, SubmissionDraft, PublicProfile, PointLedgerReference } from '../index.js';
6
6
  export { avatarSrc, defaultAvatar, walletAvatarSeed } from '../index.js';
7
- import { H as referralAcceptSchema, J as LeaderboardQuery, K as WalletAddressInput, M as walletSignatureSchema, L as LinkedWallet, N as WalletSigner, 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, a1 as WalletSignInNetwork, a2 as AccountConnection, a3 as CosmosChain, a4 as CosmosNetwork, a5 as referralSummarySchema, a6 as LeaderboardPage } from '../submission-input-CYyH_25w.js';
7
+ import { H as referralAcceptSchema, J as LeaderboardQuery, K as WalletAddressInput, M as walletSignatureSchema, L as LinkedWallet, N as WalletSigner, 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, a1 as AccountConnection, a2 as WalletSignInNetwork, a3 as referralSummarySchema, a4 as LeaderboardPage } from '../submission-input-D3t8WKOk.js';
8
8
  import { SubmitInput, ReleaseInput, beginHandoverSchema, contentPerformanceQuerySchema, TieredRewardReference } from '../schema.js';
9
- import { createBrowserRelayClient, DiscoveredWallet } from '../browser.js';
9
+ import { createBrowserRelayClient, SignInMethods, CosmosChains, SignInOption, SignInUnavailable, SignInWallet, DiscoveredWallet } from '../browser.js';
10
+ export { EmailSignInOption, OAuthSignInOption, SignInIcon, WalletSignInOption } from '../browser.js';
10
11
 
11
12
  type RelayClient = ReturnType<typeof createBrowserRelayClient>;
12
13
  /** The participant client, for calls no hook covers. */
@@ -4573,12 +4574,6 @@ declare function progressOf(quests: QuestView[]): {
4573
4574
  };
4574
4575
 
4575
4576
  type OAuthProvider = AuthProvider;
4576
- type SignInMethods = {
4577
- providers: OAuthProvider[];
4578
- email: boolean;
4579
- /** The wallet networks this project enabled for sign-in in Console. */
4580
- wallets: WalletSignInNetwork[];
4581
- };
4582
4577
  /**
4583
4578
  * The sign-in methods participants can use here: the OAuth providers and email Domino configured
4584
4579
  * for the platform, and the wallet sign-in this project enabled in Console.
@@ -4593,7 +4588,10 @@ declare function useMe(): {
4593
4588
  member: string;
4594
4589
  avatarSeed: string;
4595
4590
  } | null;
4596
- /** Email codes, OAuth consent and wallet signatures always happen in the participant's browser. */
4591
+ /**
4592
+ * Email codes, OAuth consent and wallet signatures always happen in the participant's browser.
4593
+ * The actions keep their identity across renders, and never reject: a failure lands in `error`.
4594
+ */
4597
4595
  declare function useSignIn(): {
4598
4596
  busy: boolean;
4599
4597
  error: string | null;
@@ -4610,6 +4608,37 @@ declare function useSignOut(): {
4610
4608
  busy: boolean;
4611
4609
  signOut: () => Promise<void>;
4612
4610
  };
4611
+ /**
4612
+ * Every way a participant can sign in here, as one flat list: the OAuth providers and email Domino
4613
+ * configured for the platform, and the installed wallets of the families this project enabled.
4614
+ * Each option has an `id`, a `label` ("Google", "Email", "Phantom"), a `kind` and an `icon` hint;
4615
+ * OAuth and wallet options sign in with `start()`, the email option with `sendCode(email)` then
4616
+ * `verifyCode(code)`. The options keep their identity across renders until the methods, the
4617
+ * installed wallets or the chains change, and their actions never reject: a failure lands in
4618
+ * `error`.
4619
+ *
4620
+ * Cosmos wallets sign in on the app's chains, so pass them in `cosmos`. Without them Cosmos wallets
4621
+ * are not offered, and `unavailable` holds `cosmos-chains-missing`; with an invalid one, such as
4622
+ * `"cosmoshub-4"` without `cosmos:`, it holds `cosmos-chains-invalid`. When the project takes
4623
+ * wallets but none is installed, `unavailable` holds `no-wallet-installed` with a message for the
4624
+ * participant. `options` is null until the methods are read. OAuth and email are offered at once;
4625
+ * installed wallets join them when discovery finishes, and a project that takes only wallets stays
4626
+ * null until then.
4627
+ */
4628
+ declare function useSignInOptions(input?: {
4629
+ cosmos?: CosmosChains;
4630
+ }): {
4631
+ options: SignInOption[] | null;
4632
+ unavailable: SignInUnavailable[];
4633
+ /** Why the project's methods could not be read; the options are then email alone. */
4634
+ methodsError: string | null;
4635
+ busy: boolean;
4636
+ error: string | null;
4637
+ /** True once an email code was sent and the form should ask for it. */
4638
+ codeSent: boolean;
4639
+ /** Forgets the email code sent, to use another address. */
4640
+ startOver(): void;
4641
+ };
4613
4642
 
4614
4643
  /** True when the account can be used to verify quests right now. */
4615
4644
  declare function isConnected(accounts: AccountConnection[] | null, provider: AuthProvider): boolean;
@@ -4660,11 +4689,6 @@ declare function useWallets(): {
4660
4689
  link: (signer: WalletSigner) => Promise<void>;
4661
4690
  unlink: (wallet: Pick<LinkedWallet, "chain" | "address">) => Promise<void>;
4662
4691
  };
4663
- /**
4664
- * The Cosmos SDK chains an app offers wallets on: one chain or several, each as
4665
- * `{ chainId, chainInfo? }` or `"cosmos:<chain ID>"`. Relay has no chain list of its own.
4666
- */
4667
- type CosmosChains = CosmosChain | CosmosNetwork | readonly (CosmosChain | CosmosNetwork)[];
4668
4692
  /**
4669
4693
  * The EVM, Solana and Cosmos wallets installed in this browser. Empty during
4670
4694
  * SSR and until discovery finishes. Cosmos wallets are listed once per chain
@@ -4677,17 +4701,15 @@ declare function useWalletDiscovery(options?: {
4677
4701
  solana: DiscoveredWallet[];
4678
4702
  cosmos: DiscoveredWallet[];
4679
4703
  };
4680
- /** An installed wallet that can sign in on one of the project's enabled wallet families. */
4681
- type SignInWallet = DiscoveredWallet & {
4682
- network: WalletSignInNetwork;
4683
- };
4684
4704
  /**
4685
4705
  * The wallets installed in this browser that can sign in with the families in
4686
4706
  * `networks`, the list `useSignInMethods().wallets` returns: pass each one's
4687
4707
  * `signer` to `useSignIn().withWallet`. Cosmos wallets need the app's chains in
4688
- * `options.cosmos`; each is listed once per chain. Null during SSR and until
4689
- * discovery finishes, so a page can tell "still looking" from "no wallet
4690
- * installed".
4708
+ * `options.cosmos`; each is listed once per chain, and none when a chain is
4709
+ * invalid (`useSignInOptions()` reports it as `cosmos-chains-invalid`). Null
4710
+ * during SSR and until discovery finishes, so a page can tell "still looking"
4711
+ * from "no wallet installed". `useSignInOptions()` combines this with the other
4712
+ * methods.
4691
4713
  */
4692
4714
  declare function useSignInWallets(networks: readonly WalletSignInNetwork[] | null | undefined, options?: {
4693
4715
  cosmos?: CosmosChains;
@@ -5038,4 +5060,4 @@ declare function useTieredRewards(): {
5038
5060
  }[];
5039
5061
  };
5040
5062
 
5041
- export { type Collection, type CosmosChains, DiscoveredWallet, type Experience, type Invitation, type LeaderboardState, type OAuthProvider, PENDING_POLL_MS, PROFILE_CHANGED, type PointLedgersState, type ProfileState, type QuestInput, type QuestNotice, type QuestStatus, type QuestTone, RETRY_DELAYS_MS, type ReferencesState, type ReferralSummary, type RelayClient, RelayProvider, type RoleDelivery, type SavedSubmission, type SignInWallet, type TieredRewardsState, canRepeat, canSubmit, captureReferralCode, completionCountLabel, completionMark, hasPending, isAutomatic, isConnected, isFinished, progressOf, questGroups, questStatus, roleDeliveryLabel, runsSilently, sanitizeDeliveries, useAccounts, useExperience, useInvitation, useLeaderboard, useMe, useMyProfile, usePointLedgers, useProfile, useQuest, useReferralSummary, useRelay, useSignIn, useSignInMethods, useSignInWallets, useSignOut, useTieredRewards, useWalletDiscovery, useWallets, visibleQuests, watchRoleDeliveries };
5063
+ export { type Collection, CosmosChains, DiscoveredWallet, type Experience, type Invitation, type LeaderboardState, type OAuthProvider, PENDING_POLL_MS, PROFILE_CHANGED, type PointLedgersState, type ProfileState, type QuestInput, type QuestNotice, type QuestStatus, type QuestTone, RETRY_DELAYS_MS, type ReferencesState, type ReferralSummary, type RelayClient, RelayProvider, type RoleDelivery, type SavedSubmission, SignInMethods, SignInOption, SignInUnavailable, SignInWallet, type TieredRewardsState, canRepeat, canSubmit, captureReferralCode, completionCountLabel, completionMark, hasPending, isAutomatic, isConnected, isFinished, progressOf, questGroups, questStatus, roleDeliveryLabel, runsSilently, sanitizeDeliveries, useAccounts, useExperience, useInvitation, useLeaderboard, useMe, useMyProfile, usePointLedgers, useProfile, useQuest, useReferralSummary, useRelay, useSignIn, useSignInMethods, useSignInOptions, useSignInWallets, useSignOut, useTieredRewards, useWalletDiscovery, useWallets, visibleQuests, watchRoleDeliveries };
@@ -1,17 +1,22 @@
1
1
  import {
2
+ cosmosChainList,
3
+ cosmosChainsError,
2
4
  createBrowserRelayClient,
3
5
  discoverCosmosWallets,
4
6
  discoverEvmWallets,
5
- discoverSolanaWallets
6
- } from "../chunk-RVGO2CRA.js";
7
+ discoverSignInWallets,
8
+ discoverSolanaWallets,
9
+ readSignInMethods,
10
+ signInOptionsFrom
11
+ } from "../chunk-NHSA6ATH.js";
7
12
  import {
8
13
  RelayError,
9
14
  avatarSrc,
10
15
  defaultAvatar,
11
16
  walletAvatarSeed
12
- } from "../chunk-D6AIUNSM.js";
17
+ } from "../chunk-ZP43MHO3.js";
13
18
  import "../chunk-AKB266O5.js";
14
- import "../chunk-M3R5V5WC.js";
19
+ import "../chunk-AL5GXMKI.js";
15
20
  import "../chunk-D6BX627V.js";
16
21
  import "../chunk-IXLY3A7B.js";
17
22
 
@@ -538,7 +543,7 @@ function useQuest(observed) {
538
543
  }
539
544
 
540
545
  // src/react/auth.ts
541
- import { useEffect as useEffect5, useState as useState6 } from "react";
546
+ import { useCallback as useCallback3, useEffect as useEffect5, useMemo as useMemo2, useRef as useRef2, useState as useState6 } from "react";
542
547
 
543
548
  // src/react/wallets.ts
544
549
  import { useCallback as useCallback2, useEffect as useEffect4, useState as useState5 } from "react";
@@ -605,16 +610,13 @@ function useWallets() {
605
610
  }, "Couldn't unlink this wallet. Try again.")
606
611
  };
607
612
  }
608
- function chainList(chains) {
609
- return chains === void 0 ? [] : Array.isArray(chains) ? chains : [chains];
610
- }
611
613
  function discoverChains(key) {
612
614
  return JSON.parse(key).flatMap(
613
615
  (chain) => discoverCosmosWallets(chain)
614
616
  );
615
617
  }
616
618
  function useWalletDiscovery(options = {}) {
617
- const chains = JSON.stringify(chainList(options.cosmos));
619
+ const chains = JSON.stringify(cosmosChainList(options.cosmos));
618
620
  const [found, setFound] = useState5({ evm: [], solana: [], cosmos: [] });
619
621
  useEffect4(() => {
620
622
  let active = true;
@@ -633,7 +635,9 @@ function useWalletDiscovery(options = {}) {
633
635
  return found;
634
636
  }
635
637
  function useSignInWallets(networks, options = {}) {
636
- const chains = JSON.stringify(chainList(options.cosmos));
638
+ const chains = JSON.stringify(
639
+ cosmosChainsError(options.cosmos) ? [] : cosmosChainList(options.cosmos)
640
+ );
637
641
  const key = networks ? `${networks.join(" ")}
638
642
  ${chains}` : null;
639
643
  const [found, setFound] = useState5(null);
@@ -643,16 +647,12 @@ ${chains}` : null;
643
647
  }
644
648
  let active = true;
645
649
  const [families = "", cosmos = "[]"] = key.split("\n");
646
- const enabled = families.split(" ").filter(Boolean);
647
- const tagged = (network, wallets) => wallets.map((wallet) => ({ ...wallet, network }));
648
- const immediate = [
649
- ...enabled.includes("solana") ? tagged("solana", discoverSolanaWallets()) : [],
650
- ...enabled.includes("cosmos") ? tagged("cosmos", discoverChains(cosmos)) : []
651
- ];
652
- const evm = enabled.includes("eip155") ? discoverEvmWallets() : Promise.resolve([]);
653
- void evm.then((wallets) => {
650
+ void discoverSignInWallets(
651
+ families.split(" ").filter(Boolean),
652
+ JSON.parse(cosmos)
653
+ ).catch(() => []).then((wallets) => {
654
654
  if (active) {
655
- setFound({ key, wallets: [...tagged("eip155", wallets), ...immediate] });
655
+ setFound({ key, wallets });
656
656
  }
657
657
  });
658
658
  return () => {
@@ -668,18 +668,11 @@ function useSignInMethods() {
668
668
  const [methods, setMethods] = useState6(null);
669
669
  useEffect5(() => {
670
670
  let active = true;
671
- relay.auth.providers().then((result) => {
672
- if (!active) {
673
- return;
671
+ void readSignInMethods(relay).then((result) => {
672
+ if (active) {
673
+ setMethods(result);
674
674
  }
675
- setMethods({
676
- providers: result.providers.filter((p) => p.configured).map((p) => p.provider),
677
- email: result.email,
678
- wallets: result.wallets
679
- });
680
- }).catch(
681
- () => active && setMethods({ providers: [], email: true, wallets: [] })
682
- );
675
+ });
683
676
  return () => {
684
677
  active = false;
685
678
  };
@@ -708,50 +701,77 @@ function useMe() {
708
701
  }
709
702
  function useSignIn() {
710
703
  const relay = useRelay();
711
- const [challenge, setChallenge] = useState6(null);
704
+ const [challenge, setChallengeState] = useState6(null);
705
+ const latest = useRef2(null);
712
706
  const [busy, setBusy] = useState6(false);
713
707
  const [error, setError] = useState6(null);
714
- async function run(task, fallback) {
715
- setBusy(true);
716
- setError(null);
717
- try {
718
- await task();
719
- } catch (cause) {
720
- setError(
721
- cause instanceof Error && cause.message ? cause.message : fallback
722
- );
723
- } finally {
724
- setBusy(false);
725
- }
726
- }
727
- return {
728
- busy,
729
- error,
730
- /** True once a code was sent and the form should ask for it. */
731
- codeSent: challenge !== null,
732
- sendCode: (email) => run(async () => {
708
+ const setChallenge = useCallback3((value) => {
709
+ latest.current = value;
710
+ setChallengeState(value);
711
+ }, []);
712
+ const run = useCallback3(
713
+ async (task, fallback) => {
714
+ setBusy(true);
715
+ setError(null);
716
+ try {
717
+ await task();
718
+ } catch (cause) {
719
+ setError(
720
+ cause instanceof Error && cause.message ? cause.message : fallback
721
+ );
722
+ } finally {
723
+ setBusy(false);
724
+ }
725
+ },
726
+ []
727
+ );
728
+ const sendCode = useCallback3(
729
+ (email) => run(async () => {
730
+ setChallenge(null);
733
731
  setChallenge((await relay.auth.emailStart(email)).challenge);
734
732
  }, "Couldn't send a code. Check the address and try again."),
735
- verifyCode: (code) => run(async () => {
736
- if (!challenge) {
733
+ [relay, run, setChallenge]
734
+ );
735
+ const verifyCode = useCallback3(
736
+ (code) => run(async () => {
737
+ const sent = latest.current;
738
+ if (!sent) {
737
739
  throw new Error("Request a new code first.");
738
740
  }
739
- await relay.auth.emailVerify(challenge, code.trim());
741
+ await relay.auth.emailVerify(sent, code.trim());
740
742
  setChallenge(null);
741
743
  }, "That code didn't work. Check it, or request a new one."),
742
- startOver: () => {
743
- setChallenge(null);
744
- setError(null);
745
- },
746
- withProvider: (provider) => run(async () => {
744
+ [relay, run, setChallenge]
745
+ );
746
+ const startOver = useCallback3(() => {
747
+ setChallenge(null);
748
+ setError(null);
749
+ }, [setChallenge]);
750
+ const withProvider = useCallback3(
751
+ (provider) => run(async () => {
747
752
  const { url } = await relay.auth.start(provider, "sign-in");
748
753
  window.location.assign(url);
749
754
  }, "Couldn't start sign-in. Try again."),
750
- /** Signs in, or signs up, with a wallet; the wallet asks the participant to sign a message. */
751
- withWallet: (signer) => run(async () => {
755
+ [relay, run]
756
+ );
757
+ const withWallet = useCallback3(
758
+ (signer) => run(async () => {
752
759
  await relay.auth.wallet.signIn(signer);
753
760
  setChallenge(null);
754
- }, "Couldn't sign in with this wallet. Try again.")
761
+ }, "Couldn't sign in with this wallet. Try again."),
762
+ [relay, run, setChallenge]
763
+ );
764
+ return {
765
+ busy,
766
+ error,
767
+ /** True once a code was sent and the form should ask for it. */
768
+ codeSent: challenge !== null,
769
+ sendCode,
770
+ verifyCode,
771
+ startOver,
772
+ withProvider,
773
+ /** Signs in, or signs up, with a wallet; the wallet asks the participant to sign a message. */
774
+ withWallet
755
775
  };
756
776
  }
757
777
  function useSignOut() {
@@ -769,9 +789,55 @@ function useSignOut() {
769
789
  }
770
790
  };
771
791
  }
792
+ function useSignInOptions(input = {}) {
793
+ const chains = JSON.stringify(cosmosChainList(input.cosmos));
794
+ const cosmos = useMemo2(
795
+ () => JSON.parse(chains),
796
+ [chains]
797
+ );
798
+ const methods = useSignInMethods();
799
+ const wallets = useSignInWallets(methods?.wallets, { cosmos });
800
+ const {
801
+ busy,
802
+ error,
803
+ codeSent,
804
+ startOver,
805
+ sendCode,
806
+ verifyCode,
807
+ withProvider,
808
+ withWallet
809
+ } = useSignIn();
810
+ const built = useMemo2(() => {
811
+ if (!methods) {
812
+ return null;
813
+ }
814
+ if (!wallets && methods.providers.length === 0 && !methods.email) {
815
+ return null;
816
+ }
817
+ return signInOptionsFrom(methods, wallets ?? [], {
818
+ cosmos,
819
+ walletsPending: !wallets,
820
+ actions: {
821
+ oauth: withProvider,
822
+ sendCode,
823
+ verifyCode,
824
+ wallet: withWallet
825
+ }
826
+ });
827
+ }, [methods, wallets, cosmos, withProvider, sendCode, verifyCode, withWallet]);
828
+ return {
829
+ options: built?.options ?? null,
830
+ unavailable: built?.unavailable ?? [],
831
+ methodsError: methods?.error ?? null,
832
+ busy,
833
+ error,
834
+ codeSent,
835
+ startOver
836
+ };
837
+ }
772
838
 
773
839
  // src/react/accounts.ts
774
- import { useCallback as useCallback3, useEffect as useEffect6, useState as useState7 } from "react";
840
+ import { useCallback as useCallback4, useEffect as useEffect6, useState as useState7 } from "react";
775
841
  var CHANGED = "relay-accounts-changed";
776
842
  function isConnected(accounts, provider) {
777
843
  return Boolean(
@@ -786,7 +852,7 @@ function useAccounts() {
786
852
  const [accounts, setAccounts] = useState7(null);
787
853
  const [error, setError] = useState7(null);
788
854
  const [busy, setBusy] = useState7(false);
789
- const refresh = useCallback3(async () => {
855
+ const refresh = useCallback4(async () => {
790
856
  try {
791
857
  setAccounts(await relay.auth.accounts());
792
858
  setError(null);
@@ -842,7 +908,7 @@ function useAccounts() {
842
908
  }
843
909
 
844
910
  // src/react/profiles.ts
845
- import { useCallback as useCallback4, useEffect as useEffect7, useRef as useRef2, useState as useState8 } from "react";
911
+ import { useCallback as useCallback5, useEffect as useEffect7, useRef as useRef3, useState as useState8 } from "react";
846
912
  var PROFILE_CHANGED = "relay-profile-changed";
847
913
  function useMyProfile() {
848
914
  const relay = useRelay();
@@ -850,8 +916,8 @@ function useMyProfile() {
850
916
  const [profile, setProfile] = useState8(null);
851
917
  const [error, setError] = useState8(null);
852
918
  const [busy, setBusy] = useState8(false);
853
- const session = useRef2(null);
854
- const refresh = useCallback4(async () => {
919
+ const session = useRef3(null);
920
+ const refresh = useCallback5(async () => {
855
921
  try {
856
922
  const [current, value] = await Promise.all([
857
923
  relay.auth.session(),
@@ -924,7 +990,7 @@ function useProfile(id, options = {}) {
924
990
  const { member } = useExperience();
925
991
  const { intervalMs = 6e4 } = options;
926
992
  const [state, setState] = useState8({ status: "loading" });
927
- const refresh = useCallback4(async () => {
993
+ const refresh = useCallback5(async () => {
928
994
  try {
929
995
  const profile = await relay.profiles.get(id);
930
996
  setState({ status: "ready", profile, stale: null });
@@ -958,7 +1024,7 @@ function useProfile(id, options = {}) {
958
1024
  }
959
1025
 
960
1026
  // src/react/referrals.ts
961
- import { useCallback as useCallback5, useEffect as useEffect8, useRef as useRef3, useState as useState9 } from "react";
1027
+ import { useCallback as useCallback6, useEffect as useEffect8, useRef as useRef4, useState as useState9 } from "react";
962
1028
  var PENDING = "domino:pending-referral";
963
1029
  var CODE = /^[a-zA-Z0-9_-]{1,100}$/;
964
1030
  function captureReferralCode(param = "ref") {
@@ -988,8 +1054,8 @@ function useInvitation(param = "ref") {
988
1054
  const code = captureReferralCode(param);
989
1055
  return code ? { status: "pending", code } : { status: "none" };
990
1056
  });
991
- const started = useRef3(null);
992
- const accept = useCallback5(
1057
+ const started = useRef4(null);
1058
+ const accept = useCallback6(
993
1059
  async (code) => {
994
1060
  setState({ status: "accepting", code });
995
1061
  try {
@@ -1023,7 +1089,7 @@ function useReferralSummary(options = {}) {
1023
1089
  const { member } = useExperience();
1024
1090
  const [summary, setSummary] = useState9(null);
1025
1091
  const [error, setError] = useState9(null);
1026
- const refresh = useCallback5(async () => {
1092
+ const refresh = useCallback6(async () => {
1027
1093
  try {
1028
1094
  setSummary(await relay.referrals.summary());
1029
1095
  setError(null);
@@ -1049,13 +1115,13 @@ function useReferralSummary(options = {}) {
1049
1115
  }
1050
1116
 
1051
1117
  // src/react/leaderboards.ts
1052
- import { useCallback as useCallback6, useEffect as useEffect9, useState as useState10 } from "react";
1118
+ import { useCallback as useCallback7, useEffect as useEffect9, useState as useState10 } from "react";
1053
1119
  function useLeaderboard(board, options = {}) {
1054
1120
  const relay = useRelay();
1055
1121
  const { member } = useExperience();
1056
1122
  const { limit = 25, intervalMs = 3e4 } = options;
1057
1123
  const [state, setState] = useState10({ status: "loading" });
1058
- const refresh = useCallback6(async () => {
1124
+ const refresh = useCallback7(async () => {
1059
1125
  try {
1060
1126
  const page = await relay.leaderboards.standings(board, { limit });
1061
1127
  setState({ status: "ready", page, stale: null });
@@ -1079,11 +1145,11 @@ function useLeaderboard(board, options = {}) {
1079
1145
  }
1080
1146
 
1081
1147
  // src/react/references.ts
1082
- import { useCallback as useCallback7, useEffect as useEffect10, useState as useState11 } from "react";
1148
+ import { useCallback as useCallback8, useEffect as useEffect10, useState as useState11 } from "react";
1083
1149
  function useReferences(read, failure) {
1084
1150
  const relay = useRelay();
1085
1151
  const [state, setState] = useState11({ status: "loading" });
1086
- const refresh = useCallback7(async () => {
1152
+ const refresh = useCallback8(async () => {
1087
1153
  try {
1088
1154
  setState({ status: "ready", items: await read(relay) });
1089
1155
  } catch (cause) {
@@ -1141,6 +1207,7 @@ export {
1141
1207
  useRelay,
1142
1208
  useSignIn,
1143
1209
  useSignInMethods,
1210
+ useSignInOptions,
1144
1211
  useSignInWallets,
1145
1212
  useSignOut,
1146
1213
  useTieredRewards,
@@ -5849,4 +5849,4 @@ declare function validateSubmissionValue(input: ValueEvidence, contract: {
5849
5849
  /** Extract an ID only. The URL and its author name are untrusted claims. */
5850
5850
  declare function xPostId(value: string): string | null;
5851
5851
 
5852
- export { contentEnrollmentInputSchema as $, type AdmittedContent as A, type Budget as B, type ContentMetric as C, type DiscordMember as D, streak as E, trackerTriggerContextSchema as F, x as G, referralAcceptSchema as H, type ImageReader as I, type LeaderboardQuery as J, type WalletAddressInput as K, type LinkedWallet as L, walletSignatureSchema as M, type WalletSigner as N, type Observation as O, walletChallengeInputSchema as P, walletProofSchema as Q, type AuthProvider as R, type SolanaBalance as S, type TrackerTriggerContext as T, type UrlEvidence as U, type WalletSignature as V, type WalletConnection as W, type XReader as X, engagementPageQuerySchema as Y, contentQualificationQuerySchema as Z, contentAdmissionQuerySchema as _, type TrackerReader as a, contentPerformancePolicySchema as a$, contentReleaseInputSchema as a0, type WalletSignInNetwork as a1, type AccountConnection as a2, type CosmosChain as a3, type CosmosNetwork as a4, referralSummarySchema as a5, type LeaderboardPage as a6, type ValueEvidence as a7, type ContentPerformancePolicy as a8, type ContentPolicy as a9, type TrackerPreview as aA, type TrackerPreviewInput as aB, type TrackerQuery as aC, type TrackerRecord as aD, type TrackerStatus as aE, WALLETS_PER_CHAIN as aF, type WalletChain as aG, type WalletMessageChallenge as aH, type WalletUnlinkInput as aI, type XConnection as aJ, type XPost as aK, type XProfile as aL, type XTweet as aM, accountConnectionSchema as aN, admittedContentSchema as aO, authProviderSchema as aP, budgetSchema as aQ, caip10 as aR, communityTimeZoneSchema as aS, compatibleSettingKinds as aT, completionKeySchema as aU, completionPolicySchema as aV, contentAdmissionPageSchema as aW, contentAdmissionSchema as aX, contentEnrollmentSchema as aY, contentMetricSchema as aZ, contentMetricsSchema as a_, type EngagementDefinition as aa, type EvmChain as ab, type EvmChainInfo as ac, type ImageAssetArtifact as ad, type ImageComparison as ae, type ImageExtraction as af, type ImageFields as ag, type ImageInspection as ah, type ImageReference as ai, type ImageRequest as aj, type ImageSightings as ak, type LeaderboardDefinition as al, type ProjectIntegration as am, type PublishedImage as an, type QuizContent as ao, type ReferralDefinition as ap, type ResourceOption as aq, type ResourceSource as ar, type SettingField as as, type SettingsValues as at, type StreakProgress as au, type TrackerAttribution as av, type TrackerContent as aw, type TrackerContentQuery as ax, type TrackerOutcome as ay, type TrackerOutcomeQuery as az, type DiscordMessage as b, parseSettings as b$, contentPolicySchema as b0, contentQualificationDecisionSchema as b1, contentQualificationPageSchema as b2, contentQualificationSchema as b3, cosmosAddressSchema as b4, cosmosChain as b5, cosmosNetworkSchema as b6, discordMemberInputSchema as b7, discordMemberSchema as b8, discordMessageInputSchema as b9, imageInspectionSchema as bA, imageReferenceSchema as bB, imageRequestSchema as bC, imageSightingsSchema as bD, imageUploadRequestSchema as bE, imageUploadsSchema as bF, integrationProviderSchema as bG, isContentParticipantRoute as bH, isWalletParticipantRoute as bI, isWalletSignInRoute as bJ, leaderboardArtifactSchema as bK, leaderboardAuthoringSchema as bL, leaderboardDefinitionSchema as bM, leaderboardExclusionSchema as bN, leaderboardGroupSchema as bO, leaderboardPageSchema as bP, leaderboardPreviewSchema as bQ, leaderboardQuerySchema as bR, leaderboardRowSchema as bS, leaderboardWindowSchema as bT, linkedWalletSchema as bU, missingResourceSettings as bV, observationInputSchema as bW, observationReceiptSchema as bX, observationSchema as bY, parseImageExtraction as bZ, parseImageResult as b_, discordMessageSchema as ba, discordReactionSchema as bb, discordServerSchema as bc, engagementArtifactSchema as bd, engagementBoundaryPageSchema as be, engagementChangePreviewInputSchema as bf, engagementChangePreviewSchema as bg, engagementChangeSchema as bh, engagementDefinitionSchema as bi, engagementDeploymentEntrySchema as bj, engagementPageSchema as bk, engagementPublishSchema as bl, engagementRuleSchema as bm, engagementScoreInputSchema as bn, engagementScoreSchema as bo, engagementSettlementSchema as bp, engagementVersionPageSchema as bq, engagementVersionQuerySchema as br, evmAddressSchema as bs, evmChainSchema as bt, evmChains as bu, imageAssetArtifactSchema as bv, imageComparisonSchema as bw, imageExtractionSchema as bx, imageFieldSchema as by, imageFieldsSchema as bz, type WalletBalanceQuery as c, validateSubmissionValue as c$, pointsAccountSchema as c0, pointsEntrySchema as c1, pointsMutationSchema as c2, pointsResultSchema as c3, projectIntegrationSchema as c4, publishedImageSchema as c5, publishedLeaderboardSchema as c6, publishedReferralSchema as c7, publishedTrackerSchema as c8, quizChoiceSchema as c9, trackerBeneficiarySchema as cA, trackerContentQuerySchema as cB, trackerContentReadSchema as cC, trackerContentSchema as cD, trackerControlSchema as cE, trackerDefinitionSchema as cF, trackerEvidenceSchema as cG, trackerIngestResultSchema as cH, trackerIngestSchema as cI, trackerOutcomePageSchema as cJ, trackerOutcomeQuerySchema as cK, trackerOutcomeRetrySchema as cL, trackerOutcomeSchema as cM, trackerPageSchema as cN, trackerPreviewInputSchema as cO, trackerPreviewLimits as cP, trackerPreviewSchema as cQ, trackerQuerySchema as cR, trackerRecordInputSchema as cS, trackerRecordSchema as cT, trackerSourceSchema as cU, trackerStatusSchema as cV, trackerSummarySchema as cW, trackerTriggerPolicySchema as cX, trackerTriggerRecordSchema as cY, urlEvidenceSchema as cZ, urlOptionsSchema as c_, quizContentSchema as ca, quizQuestionSchema as cb, quizQuestionsSchema as cc, referralAccountSchema as cd, referralArtifactSchema as ce, referralAuthoringSchema as cf, referralControlSchema as cg, referralDefinitionSchema as ch, referralHistorySchema as ci, referralManagementSchema as cj, referralRelationshipSchema as ck, resourceOptionsSchema as cl, resourceRequestSchema as cm, resourceSourceSchema as cn, settingFieldSchema as co, settingsFieldsSchema as cp, settingsValuesSchema as cq, solanaAddressSchema as cr, solanaBalanceSchema as cs, solanaMainnet as ct, streakPolicySchema as cu, streakProgressSchema as cv, textEvidenceSchema as cw, textOptionsSchema as cx, trackerArtifactSchema as cy, trackerAttributionSchema as cz, type WalletBalance as d, valueEvidenceSchema as d0, walletAddressInput as d1, walletAddressInputSchema as d2, walletBalanceSchema as d3, walletChainSchema as d4, walletChallengeSchema as d5, walletConnectionSchema as d6, walletMessageChallengeSchema as d7, walletSignInFamilies as d8, walletSignInNetwork as d9, walletSignInNetworkSchema as da, walletSignInNetworksSchema as db, walletUnlinkInputSchema as dc, xConnectionSchema as dd, xContentBodySchema as de, xIdSchema as df, xPostId as dg, xPostSchema as dh, xProfileSchema as di, xRequestSchema as dj, xTweetSchema as dk, type TrackerDefinition as e, type TrackerBeneficiary as f, type TrackerTriggerPolicy as g, type AuthoringIdentity as h, type IntegrationProvider as i, type StreakPolicy as j, type TextEvidence as k, type TextOptions as l, type UrlOptions as m, content as n, observationTriggerSchema as o, customSource as p, defineEngagementReward as q, defineLeaderboard as r, defineReferral as s, defineTracker as t, discord as u, formatUnits as v, parseUnits as w, perContent as x, pointLedgers as y, settings as z };
5852
+ export { contentEnrollmentInputSchema as $, type AdmittedContent as A, type Budget as B, type ContentMetric as C, type DiscordMember as D, streak as E, trackerTriggerContextSchema as F, x as G, referralAcceptSchema as H, type ImageReader as I, type LeaderboardQuery as J, type WalletAddressInput as K, type LinkedWallet as L, walletSignatureSchema as M, type WalletSigner as N, type Observation as O, walletChallengeInputSchema as P, walletProofSchema as Q, type AuthProvider as R, type SolanaBalance as S, type TrackerTriggerContext as T, type UrlEvidence as U, type WalletSignature as V, type WalletConnection as W, type XReader as X, engagementPageQuerySchema as Y, contentQualificationQuerySchema as Z, contentAdmissionQuerySchema as _, type TrackerReader as a, contentPerformancePolicySchema as a$, contentReleaseInputSchema as a0, type AccountConnection as a1, type WalletSignInNetwork as a2, referralSummarySchema as a3, type LeaderboardPage as a4, type CosmosChain as a5, type CosmosNetwork as a6, type ValueEvidence as a7, type ContentPerformancePolicy as a8, type ContentPolicy as a9, type TrackerPreview as aA, type TrackerPreviewInput as aB, type TrackerQuery as aC, type TrackerRecord as aD, type TrackerStatus as aE, WALLETS_PER_CHAIN as aF, type WalletChain as aG, type WalletMessageChallenge as aH, type WalletUnlinkInput as aI, type XConnection as aJ, type XPost as aK, type XProfile as aL, type XTweet as aM, accountConnectionSchema as aN, admittedContentSchema as aO, authProviderSchema as aP, budgetSchema as aQ, caip10 as aR, communityTimeZoneSchema as aS, compatibleSettingKinds as aT, completionKeySchema as aU, completionPolicySchema as aV, contentAdmissionPageSchema as aW, contentAdmissionSchema as aX, contentEnrollmentSchema as aY, contentMetricSchema as aZ, contentMetricsSchema as a_, type EngagementDefinition as aa, type EvmChain as ab, type EvmChainInfo as ac, type ImageAssetArtifact as ad, type ImageComparison as ae, type ImageExtraction as af, type ImageFields as ag, type ImageInspection as ah, type ImageReference as ai, type ImageRequest as aj, type ImageSightings as ak, type LeaderboardDefinition as al, type ProjectIntegration as am, type PublishedImage as an, type QuizContent as ao, type ReferralDefinition as ap, type ResourceOption as aq, type ResourceSource as ar, type SettingField as as, type SettingsValues as at, type StreakProgress as au, type TrackerAttribution as av, type TrackerContent as aw, type TrackerContentQuery as ax, type TrackerOutcome as ay, type TrackerOutcomeQuery as az, type DiscordMessage as b, parseSettings as b$, contentPolicySchema as b0, contentQualificationDecisionSchema as b1, contentQualificationPageSchema as b2, contentQualificationSchema as b3, cosmosAddressSchema as b4, cosmosChain as b5, cosmosNetworkSchema as b6, discordMemberInputSchema as b7, discordMemberSchema as b8, discordMessageInputSchema as b9, imageInspectionSchema as bA, imageReferenceSchema as bB, imageRequestSchema as bC, imageSightingsSchema as bD, imageUploadRequestSchema as bE, imageUploadsSchema as bF, integrationProviderSchema as bG, isContentParticipantRoute as bH, isWalletParticipantRoute as bI, isWalletSignInRoute as bJ, leaderboardArtifactSchema as bK, leaderboardAuthoringSchema as bL, leaderboardDefinitionSchema as bM, leaderboardExclusionSchema as bN, leaderboardGroupSchema as bO, leaderboardPageSchema as bP, leaderboardPreviewSchema as bQ, leaderboardQuerySchema as bR, leaderboardRowSchema as bS, leaderboardWindowSchema as bT, linkedWalletSchema as bU, missingResourceSettings as bV, observationInputSchema as bW, observationReceiptSchema as bX, observationSchema as bY, parseImageExtraction as bZ, parseImageResult as b_, discordMessageSchema as ba, discordReactionSchema as bb, discordServerSchema as bc, engagementArtifactSchema as bd, engagementBoundaryPageSchema as be, engagementChangePreviewInputSchema as bf, engagementChangePreviewSchema as bg, engagementChangeSchema as bh, engagementDefinitionSchema as bi, engagementDeploymentEntrySchema as bj, engagementPageSchema as bk, engagementPublishSchema as bl, engagementRuleSchema as bm, engagementScoreInputSchema as bn, engagementScoreSchema as bo, engagementSettlementSchema as bp, engagementVersionPageSchema as bq, engagementVersionQuerySchema as br, evmAddressSchema as bs, evmChainSchema as bt, evmChains as bu, imageAssetArtifactSchema as bv, imageComparisonSchema as bw, imageExtractionSchema as bx, imageFieldSchema as by, imageFieldsSchema as bz, type WalletBalanceQuery as c, validateSubmissionValue as c$, pointsAccountSchema as c0, pointsEntrySchema as c1, pointsMutationSchema as c2, pointsResultSchema as c3, projectIntegrationSchema as c4, publishedImageSchema as c5, publishedLeaderboardSchema as c6, publishedReferralSchema as c7, publishedTrackerSchema as c8, quizChoiceSchema as c9, trackerBeneficiarySchema as cA, trackerContentQuerySchema as cB, trackerContentReadSchema as cC, trackerContentSchema as cD, trackerControlSchema as cE, trackerDefinitionSchema as cF, trackerEvidenceSchema as cG, trackerIngestResultSchema as cH, trackerIngestSchema as cI, trackerOutcomePageSchema as cJ, trackerOutcomeQuerySchema as cK, trackerOutcomeRetrySchema as cL, trackerOutcomeSchema as cM, trackerPageSchema as cN, trackerPreviewInputSchema as cO, trackerPreviewLimits as cP, trackerPreviewSchema as cQ, trackerQuerySchema as cR, trackerRecordInputSchema as cS, trackerRecordSchema as cT, trackerSourceSchema as cU, trackerStatusSchema as cV, trackerSummarySchema as cW, trackerTriggerPolicySchema as cX, trackerTriggerRecordSchema as cY, urlEvidenceSchema as cZ, urlOptionsSchema as c_, quizContentSchema as ca, quizQuestionSchema as cb, quizQuestionsSchema as cc, referralAccountSchema as cd, referralArtifactSchema as ce, referralAuthoringSchema as cf, referralControlSchema as cg, referralDefinitionSchema as ch, referralHistorySchema as ci, referralManagementSchema as cj, referralRelationshipSchema as ck, resourceOptionsSchema as cl, resourceRequestSchema as cm, resourceSourceSchema as cn, settingFieldSchema as co, settingsFieldsSchema as cp, settingsValuesSchema as cq, solanaAddressSchema as cr, solanaBalanceSchema as cs, solanaMainnet as ct, streakPolicySchema as cu, streakProgressSchema as cv, textEvidenceSchema as cw, textOptionsSchema as cx, trackerArtifactSchema as cy, trackerAttributionSchema as cz, type WalletBalance as d, valueEvidenceSchema as d0, walletAddressInput as d1, walletAddressInputSchema as d2, walletBalanceSchema as d3, walletChainSchema as d4, walletChallengeSchema as d5, walletConnectionSchema as d6, walletMessageChallengeSchema as d7, walletSignInFamilies as d8, walletSignInNetwork as d9, walletSignInNetworkSchema as da, walletSignInNetworksSchema as db, walletUnlinkInputSchema as dc, xConnectionSchema as dd, xContentBodySchema as de, xIdSchema as df, xPostId as dg, xPostSchema as dh, xProfileSchema as di, xRequestSchema as dj, xTweetSchema as dk, type TrackerDefinition as e, type TrackerBeneficiary as f, type TrackerTriggerPolicy as g, type AuthoringIdentity as h, type IntegrationProvider as i, type StreakPolicy as j, type TextEvidence as k, type TextOptions as l, type UrlOptions as m, content as n, observationTriggerSchema as o, customSource as p, defineEngagementReward as q, defineLeaderboard as r, defineReferral as s, defineTracker as t, discord as u, formatUnits as v, parseUnits as w, perContent as x, pointLedgers as y, settings as z };
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@domino-sdk/relay",
3
- "version": "0.27.0",
3
+ "version": "0.28.0",
4
4
  "type": "module",
5
5
  "exports": {
6
6
  ".": {