@domino-sdk/relay 1.67.0 → 1.68.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.
Files changed (72) hide show
  1. package/CHANGELOG.md +43 -0
  2. package/dist/{accounts-C2O8mpB8.d.ts → accounts-DnpKoJCo.d.ts} +210 -3
  3. package/dist/{attempt-captures-ClHAoo_n.d.ts → attempt-captures-DMNFMYFb.d.ts} +9 -1
  4. package/dist/authoring.d.ts +349 -38
  5. package/dist/authoring.js +125 -18
  6. package/dist/{automatic-outcomes-BEnPn4Uh.d.ts → automatic-outcomes-CQ3vpiQl.d.ts} +2 -2
  7. package/dist/avatar.d.ts +1 -1
  8. package/dist/browser.d.ts +10 -9
  9. package/dist/browser.js +12 -13
  10. package/dist/{catalog-CbiftcxQ.d.ts → catalog-BLGie8Lh.d.ts} +60 -2
  11. package/dist/chunk-4JSPMFO2.js +427 -0
  12. package/dist/{chunk-5DZNMLDM.js → chunk-55WJVFWC.js} +2 -2
  13. package/dist/{chunk-Q5QVAF7R.js → chunk-5AKD4ZF3.js} +37 -25
  14. package/dist/{chunk-DSJ46QLB.js → chunk-6UBFSMCM.js} +1 -1
  15. package/dist/{chunk-P33ZAJMS.js → chunk-6YTSRWRB.js} +1199 -677
  16. package/dist/{chunk-RDUSFUXX.js → chunk-75KF633N.js} +9 -1
  17. package/dist/{chunk-Q6KTTVOI.js → chunk-7YSVZA7A.js} +1 -1
  18. package/dist/{chunk-BMJHFWVT.js → chunk-CZ7NQ7W7.js} +10 -43
  19. package/dist/{chunk-X3FMVRMM.js → chunk-DDJN2T5A.js} +1 -1
  20. package/dist/{chunk-KUNPCDN6.js → chunk-DNPDR4Z7.js} +16 -9
  21. package/dist/{chunk-RWR2LOPA.js → chunk-EXZVWQOQ.js} +2 -2
  22. package/dist/{chunk-MVQQDPQX.js → chunk-HXTKI34N.js} +14 -2
  23. package/dist/{chunk-FGXLXENM.js → chunk-IW46TW3A.js} +21 -1
  24. package/dist/{chunk-5SBA6X5X.js → chunk-KKHENO57.js} +2 -2
  25. package/dist/{chunk-U66GUVSG.js → chunk-LZXDYSUH.js} +2 -0
  26. package/dist/{chunk-QYC3CZVD.js → chunk-MEUAJIVO.js} +2 -2
  27. package/dist/{chunk-BQXRCJ3N.js → chunk-P4TPW4SY.js} +1 -1
  28. package/dist/{chunk-NRMQVK2W.js → chunk-R3MNZKNJ.js} +1 -1
  29. package/dist/{chunk-Z2Z5DBNW.js → chunk-SD74HD75.js} +45 -9
  30. package/dist/{chunk-JK3XV2CR.js → chunk-TYZFVL73.js} +50 -8
  31. package/dist/chunk-VAGGGB6B.js +87 -0
  32. package/dist/{chunk-2HHZV7U3.js → chunk-VRZZB7CQ.js} +1 -1
  33. package/dist/{client-CZPewB9h.d.ts → client-BMif22WQ.d.ts} +133 -7
  34. package/dist/{dashboards-jGPM3AxF.d.ts → dashboards-DMk-vL1q.d.ts} +4 -4
  35. package/dist/{deployments-BVFd7ddA.d.ts → deployments-BCr418BX.d.ts} +582 -173
  36. package/dist/{identity-integration-W1Vo3Ql9.d.ts → identity-integration-r76xaAax.d.ts} +1 -1
  37. package/dist/index.d.ts +10 -10
  38. package/dist/index.js +10 -10
  39. package/dist/internal.d.ts +137 -14
  40. package/dist/internal.js +240 -19
  41. package/dist/{limits-C4RzrOV4.d.ts → limits-ByVRQePO.d.ts} +6 -1
  42. package/dist/{offers-BpYenB9i.d.ts → offers-xcPbYaEv.d.ts} +2 -2
  43. package/dist/portal-proxy.d.ts +2 -2
  44. package/dist/portal-proxy.js +11 -11
  45. package/dist/react/index.d.ts +37 -15
  46. package/dist/react/index.js +12 -13
  47. package/dist/{reward-deliveries-BOWpMytr.d.ts → reward-deliveries-0VvT6LMj.d.ts} +1 -1
  48. package/dist/runtime/authoring.js +1 -1
  49. package/dist/runtime/chunks/2UDZ6TPL.js +1 -0
  50. package/dist/runtime/manifest.json +3 -3
  51. package/dist/runtime/schema.js +1 -1
  52. package/dist/schema.d.ts +398 -104
  53. package/dist/schema.js +62 -8
  54. package/dist/server/index.d.ts +12 -12
  55. package/dist/server/index.js +2046 -886
  56. package/dist/{sign-in-providers-BRYVOSlG.d.ts → sign-in-providers-C5_753DZ.d.ts} +2 -2
  57. package/dist/solana.d.ts +171 -0
  58. package/dist/solana.js +364 -0
  59. package/dist/{submission-input-C152xIdn.d.ts → submission-input-CaL8drIh.d.ts} +2 -2
  60. package/dist/{telegram-browser-657QqiQl.d.ts → telegram-browser-DLtHPRBI.d.ts} +6 -108
  61. package/dist/telegram.d.ts +8 -8
  62. package/dist/telegram.js +2 -2
  63. package/dist/testing.d.ts +85 -13
  64. package/dist/testing.js +101 -11
  65. package/dist/{tracker-data-BqY-9Vu-.d.ts → tracker-data-CAK942sx.d.ts} +298 -1
  66. package/dist/{transport-CthYgZXK.d.ts → transport-CkidqTOk.d.ts} +5250 -1226
  67. package/dist/{wallet-Btng186v.d.ts → wallet-DQtJelQQ.d.ts} +367 -13
  68. package/dist/wallet-browser-dpmr22Xv.d.ts +106 -0
  69. package/package.json +16 -1
  70. package/dist/chunk-UWUS4OOV.js +0 -59
  71. package/dist/chunk-UYVJZR33.js +0 -34
  72. package/dist/runtime/chunks/C2MGLQXC.js +0 -1
@@ -1,14 +1,14 @@
1
- import { G as QuizEvidence, a as Attempt, s as MemberProgress, ak as referralAcceptSchema, q as LeaderboardQuery, b as AttemptStatus, V as AttemptCodeSource, f as CampaignEnrollmentInput, h as CampaignWithdrawalInput, J as SignInProvider, c as AuthProvider, I as SignInAccountStatus, x as PointHistoryQuery, v as PointEntryKind, n as LeaderboardHistoryQuery, al as submitSchema, am as engagementPageQuerySchema, an as contentPerformanceQuerySchema } from './accounts-C2O8mpB8.js';
2
- import { M as MissingPrerequisite, V as ValueEvidence } from './submission-input-C152xIdn.js';
1
+ import { G as QuizEvidence, a as Attempt, s as MemberProgress, an as referralAcceptSchema, q as LeaderboardQuery, b as AttemptStatus, W as AttemptCodeSource, f as CampaignEnrollmentInput, h as CampaignWithdrawalInput, J as SignInProvider, c as AuthProvider, I as SignInAccountStatus, x as PointHistoryQuery, v as PointEntryKind, n as LeaderboardHistoryQuery, ao as submitSchema, ap as engagementPageQuerySchema, aq as contentPerformanceQuerySchema } from './accounts-DnpKoJCo.js';
2
+ import { M as MissingPrerequisite, V as ValueEvidence } from './submission-input-CaL8drIh.js';
3
3
  import { R as RequestError, a as RequestErrorDetails, b as RequestErrorKind } from './request-error-D_dUPLwo.js';
4
- import { q as ResponseSchema, i as PageQuery, k as QuestEnrollmentInput, Q as QuestClaimInput, n as QuestOutcomeQuery, M as MemberConsent, a as ConsentInput, e as CreatorAccountProvider, r as RewardDeliveryQuery, s as RewardDeliveryPage, t as contentQualificationQuerySchema } from './reward-deliveries-BOWpMytr.js';
5
- import { b as QuestView, q as questExperienceSchema } from './catalog-CbiftcxQ.js';
6
- import { T as TrackerSkipCode, S as SkipEnrollment } from './tracker-data-BqY-9Vu-.js';
4
+ import { az as profileUpdateSchema, d as ProfileCompletionQuery, l as WalletProofKind, aA as walletAddressInputSchema, aB as walletSignatureSchema, aC as walletTransactionProofSchema, L as LinkedWallet, o as WalletSigner } from './wallet-DQtJelQQ.js';
5
+ import { q as ResponseSchema, i as PageQuery, k as QuestEnrollmentInput, Q as QuestClaimInput, n as QuestOutcomeQuery, M as MemberConsent, a as ConsentInput, e as CreatorAccountProvider, r as RewardDeliveryQuery, s as RewardDeliveryPage, t as contentQualificationQuerySchema } from './reward-deliveries-0VvT6LMj.js';
6
+ import { b as QuestView, q as questExperienceSchema } from './catalog-BLGie8Lh.js';
7
+ import { T as TrackerSkipCode, S as SkipEnrollment } from './tracker-data-CAK942sx.js';
7
8
  import { b as ParticipantSession, e as exchangeSchema, R as RelayEvent, P as ParticipantActivity, M as MemberSummary } from './participant-activity-DXRq4s6K.js';
8
9
  import * as z from 'zod';
9
10
  import { c as createRelayAction, O as OptionalActionId } from './action-9Xl0StBg.js';
10
- import { A as AuthProviders } from './sign-in-providers-BRYVOSlG.js';
11
- import { ah as profileUpdateSchema, d as ProfileCompletionQuery, ai as walletAddressInputSchema, aj as walletSignatureSchema, L as LinkedWallet, m as WalletSigner } from './wallet-Btng186v.js';
11
+ import { A as AuthProviders } from './sign-in-providers-C5_753DZ.js';
12
12
 
13
13
  /** What happened, as in every Domino client error (see `RequestError`). */
14
14
  type RelayErrorKind = RequestErrorKind;
@@ -123,6 +123,26 @@ declare const RelayErrorCode: {
123
123
  readonly ChallengeExpired: "challenge-expired";
124
124
  /** Too many requests; `retryAfter` says how long to wait when Relay knows. */
125
125
  readonly RateLimited: "rate-limited";
126
+ /**
127
+ * `wallets.linkByTransaction`: the transaction is not finalized yet. Send the same signature
128
+ * again in a few seconds.
129
+ *
130
+ * @experimental A minor release can change linking by transaction.
131
+ */
132
+ readonly TransactionNotFinal: "transaction-not-final";
133
+ /** `wallets.linkByTransaction`: Solana mainnet has no transaction with this signature. @experimental */
134
+ readonly TransactionNotFound: "transaction-not-found";
135
+ /** `wallets.linkByTransaction`: the transaction failed, so it proves nothing. @experimental */
136
+ readonly TransactionFailed: "transaction-failed";
137
+ /**
138
+ * `wallets.linkByTransaction`: no memo in the transaction carries one of the member's open
139
+ * challenges for the address, with the address as signer.
140
+ *
141
+ * @experimental A minor release can change linking by transaction.
142
+ */
143
+ readonly ProofMismatch: "proof-mismatch";
144
+ /** `wallets.linkByTransaction`: another transaction already used the challenge. @experimental */
145
+ readonly ChallengeUsed: "challenge-used";
126
146
  };
127
147
  /** A known code, or one a newer Relay sends. */
128
148
  type RelayErrorCode = KnownRelayErrorCode | (string & {});
@@ -1459,6 +1479,11 @@ declare function relayClient(options: RelayClientOptions): {
1459
1479
  givenName: string | null;
1460
1480
  imageUrl: string | null;
1461
1481
  }[];
1482
+ nameSource?: string | null | undefined;
1483
+ nameOptions?: {
1484
+ source: string;
1485
+ name: string;
1486
+ }[] | undefined;
1462
1487
  }>;
1463
1488
  /**
1464
1489
  * Changes the member's own name, avatar choice or visibility; omitted fields stay, and null
@@ -1494,6 +1519,11 @@ declare function relayClient(options: RelayClientOptions): {
1494
1519
  givenName: string | null;
1495
1520
  imageUrl: string | null;
1496
1521
  }[];
1522
+ nameSource?: string | null | undefined;
1523
+ nameOptions?: {
1524
+ source: string;
1525
+ name: string;
1526
+ }[] | undefined;
1497
1527
  }>;
1498
1528
  /**
1499
1529
  * Uploads a JPEG, PNG or WebP of at most 5 MB as the member's avatar. The server crops it to
@@ -1531,6 +1561,11 @@ declare function relayClient(options: RelayClientOptions): {
1531
1561
  givenName: string | null;
1532
1562
  imageUrl: string | null;
1533
1563
  }[];
1564
+ nameSource?: string | null | undefined;
1565
+ nameOptions?: {
1566
+ source: string;
1567
+ name: string;
1568
+ }[] | undefined;
1534
1569
  }>;
1535
1570
  /**
1536
1571
  * A profile's name and avatar by its public ID (`profile.id` from a leaderboard row or
@@ -1893,6 +1928,13 @@ declare function relayClient(options: RelayClientOptions): {
1893
1928
  release?: string | undefined;
1894
1929
  } | undefined;
1895
1930
  codeSource?: AttemptCodeSource | null | undefined;
1931
+ action?: {
1932
+ kind: (string & {}) | "solana-transaction";
1933
+ chain: string;
1934
+ signature: string;
1935
+ wallet: string;
1936
+ reference: string | null;
1937
+ } | null | undefined;
1896
1938
  } | null;
1897
1939
  release: string;
1898
1940
  interaction: "url" | "text" | "staff" | "claim" | "automatic" | "quiz" | "photo";
@@ -2123,6 +2165,13 @@ declare function relayClient(options: RelayClientOptions): {
2123
2165
  release?: string | undefined;
2124
2166
  } | undefined;
2125
2167
  codeSource?: AttemptCodeSource | null | undefined;
2168
+ action?: {
2169
+ kind: (string & {}) | "solana-transaction";
2170
+ chain: string;
2171
+ signature: string;
2172
+ wallet: string;
2173
+ reference: string | null;
2174
+ } | null | undefined;
2126
2175
  }>;
2127
2176
  experience: (requestOptions?: RelayRequestOptions) => Promise<{
2128
2177
  entitlements: ({
@@ -2587,6 +2636,13 @@ declare function relayClient(options: RelayClientOptions): {
2587
2636
  release?: string | undefined;
2588
2637
  } | undefined;
2589
2638
  codeSource?: AttemptCodeSource | null | undefined;
2639
+ action?: {
2640
+ kind: (string & {}) | "solana-transaction";
2641
+ chain: string;
2642
+ signature: string;
2643
+ wallet: string;
2644
+ reference: string | null;
2645
+ } | null | undefined;
2590
2646
  } | null;
2591
2647
  release: string;
2592
2648
  interaction: "url" | "text" | "staff" | "claim" | "automatic" | "quiz" | "photo";
@@ -3003,6 +3059,13 @@ declare function relayClient(options: RelayClientOptions): {
3003
3059
  release?: string | undefined;
3004
3060
  } | undefined;
3005
3061
  codeSource?: AttemptCodeSource | null | undefined;
3062
+ action?: {
3063
+ kind: (string & {}) | "solana-transaction";
3064
+ chain: string;
3065
+ signature: string;
3066
+ wallet: string;
3067
+ reference: string | null;
3068
+ } | null | undefined;
3006
3069
  } | null;
3007
3070
  release: string;
3008
3071
  interaction: "url" | "text" | "staff" | "claim" | "automatic" | "quiz" | "photo";
@@ -3425,6 +3488,13 @@ declare function relayClient(options: RelayClientOptions): {
3425
3488
  release?: string | undefined;
3426
3489
  } | undefined;
3427
3490
  codeSource?: AttemptCodeSource | null | undefined;
3491
+ action?: {
3492
+ kind: (string & {}) | "solana-transaction";
3493
+ chain: string;
3494
+ signature: string;
3495
+ wallet: string;
3496
+ reference: string | null;
3497
+ } | null | undefined;
3428
3498
  } | null;
3429
3499
  release: string;
3430
3500
  interaction: "url" | "text" | "staff" | "claim" | "automatic" | "quiz" | "photo";
@@ -3590,6 +3660,8 @@ declare function relayClient(options: RelayClientOptions): {
3590
3660
  revision: number;
3591
3661
  signIn: boolean;
3592
3662
  provedOn?: `eip155:${number}` | undefined;
3663
+ provedBy?: WalletProofKind | undefined;
3664
+ proofTransaction?: string | undefined;
3593
3665
  }[]>;
3594
3666
  challenge: (value: z.input<typeof walletAddressInputSchema>, requestOptions?: RelayRequestOptions) => Promise<{
3595
3667
  id: string;
@@ -3608,6 +3680,44 @@ declare function relayClient(options: RelayClientOptions): {
3608
3680
  revision: number;
3609
3681
  signIn: boolean;
3610
3682
  provedOn?: `eip155:${number}` | undefined;
3683
+ provedBy?: WalletProofKind | undefined;
3684
+ proofTransaction?: string | undefined;
3685
+ }>;
3686
+ /**
3687
+ * A challenge for linking a Solana account that cannot sign messages, such as a Squads vault:
3688
+ * the account executes a transaction with an SPL Memo instruction that carries `memo` and lists
3689
+ * the account, then `linkByTransaction` submits its signature. The challenge belongs to the
3690
+ * member, not the session, and lasts 7 days, since a multisig approval can take that long. A
3691
+ * repeat for the same address answers the open challenge.
3692
+ *
3693
+ * @experimental A minor release can change linking by transaction.
3694
+ */
3695
+ transactionChallenge: (value: z.input<typeof walletAddressInputSchema>, requestOptions?: RelayRequestOptions) => Promise<{
3696
+ id: string;
3697
+ chain: "solana" | "eip155" | "cosmos";
3698
+ address: string;
3699
+ memo: string;
3700
+ memoProgram: string;
3701
+ expiresAt: number;
3702
+ }>;
3703
+ /**
3704
+ * Links the account a finalized Solana mainnet transaction proves: it succeeded, and an SPL
3705
+ * Memo instruction in it, top-level or inner, carries an open challenge's `memo` and lists
3706
+ * the account. A transaction that is not final yet is refused with `transaction-not-final`;
3707
+ * try again shortly. Retrying the same signature answers the same wallet.
3708
+ *
3709
+ * @experimental A minor release can change linking by transaction.
3710
+ */
3711
+ linkByTransaction: (value: z.input<typeof walletTransactionProofSchema>, requestOptions?: RelayRequestOptions) => Promise<{
3712
+ chain: "solana" | "eip155" | "cosmos";
3713
+ network: `cosmos:${string}` | null;
3714
+ address: string;
3715
+ verifiedAt: number;
3716
+ revision: number;
3717
+ signIn: boolean;
3718
+ provedOn?: `eip155:${number}` | undefined;
3719
+ provedBy?: WalletProofKind | undefined;
3720
+ proofTransaction?: string | undefined;
3611
3721
  }>;
3612
3722
  /** The address stays bound to this member: another member still cannot link it. */
3613
3723
  unlink: (wallet: Pick<LinkedWallet, "chain" | "address">, requestOptions?: RelayRequestOptions) => Promise<{
@@ -3626,6 +3736,8 @@ declare function relayClient(options: RelayClientOptions): {
3626
3736
  revision: number;
3627
3737
  signIn: boolean;
3628
3738
  provedOn?: `eip155:${number}` | undefined;
3739
+ provedBy?: WalletProofKind | undefined;
3740
+ proofTransaction?: string | undefined;
3629
3741
  }>;
3630
3742
  };
3631
3743
  auth: {
@@ -4346,6 +4458,13 @@ declare function relayClient(options: RelayClientOptions): {
4346
4458
  release?: string | undefined;
4347
4459
  } | undefined;
4348
4460
  codeSource?: AttemptCodeSource | null | undefined;
4461
+ action?: {
4462
+ kind: (string & {}) | "solana-transaction";
4463
+ chain: string;
4464
+ signature: string;
4465
+ wallet: string;
4466
+ reference: string | null;
4467
+ } | null | undefined;
4349
4468
  } | null;
4350
4469
  key?: string | undefined;
4351
4470
  release?: string | undefined;
@@ -4702,6 +4821,13 @@ declare function relayClient(options: RelayClientOptions): {
4702
4821
  release?: string | undefined;
4703
4822
  } | undefined;
4704
4823
  codeSource?: AttemptCodeSource | null | undefined;
4824
+ action?: {
4825
+ kind: (string & {}) | "solana-transaction";
4826
+ chain: string;
4827
+ signature: string;
4828
+ wallet: string;
4829
+ reference: string | null;
4830
+ } | null | undefined;
4705
4831
  }>;
4706
4832
  /** Uploads evidence with a generated key; reuse `actionId` and the same file to replay. */
4707
4833
  upload: (file: Blob, requestOptions?: RelayRequestOptions & {
@@ -1,7 +1,7 @@
1
1
  import * as z from 'zod';
2
- import { o as WalletBalanceQuery } from './wallet-Btng186v.js';
3
- import { R as ResourceHandle } from './tracker-data-BqY-9Vu-.js';
4
- import { A as AnalyticsMetricId, a as analyticsCatalog } from './limits-C4RzrOV4.js';
2
+ import { v as WalletBalanceQuery } from './wallet-DQtJelQQ.js';
3
+ import { R as ResourceHandle } from './tracker-data-CAK942sx.js';
4
+ import { A as AnalyticsMetricId, a as analyticsCatalog } from './limits-ByVRQePO.js';
5
5
 
6
6
  declare const settingFieldSchema: z.ZodDiscriminatedUnion<[z.ZodObject<{
7
7
  kind: z.ZodLiteral<"point-ledger">;
@@ -484,4 +484,4 @@ declare function defineDashboard(input: DashboardInput): {
484
484
  position?: number | undefined;
485
485
  } & ResourceHandle<"dashboard">;
486
486
 
487
- export { type AmountSetting as A, type BalanceChain as B, settingFieldSchema as C, type DashboardInput as D, settingsFieldsSchema as E, settingsValuesSchema as F, textSettingSchema as G, type IntegerSettings as I, type Setting as S, type BoundSettings as a, type DashboardPanelInput as b, compatibleSettingKinds as c, dashboardIssue as d, defineDashboard as e, type DashboardAuthoring as f, type DashboardDefinition as g, type DashboardIssue as h, isBoundSetting as i, type DashboardPanel as j, type DashboardPreview as k, type SettingField as l, type SettingsValues as m, normalizeDashboard as n, dashboardArtifactSchema as o, dashboardAuthoringSchema as p, dashboardDefinitionSchema as q, dashboardLimits as r, dashboardPanelAuthoringSchema as s, dashboardPanels as t, dashboardPreviewSchema as u, defaultPanelWidths as v, isAmount as w, isBalanceChain as x, missingResourceSettings as y, parseSettings as z };
487
+ export { type AmountSetting as A, type BalanceChain as B, settingFieldSchema as C, type DashboardInput as D, settingsFieldsSchema as E, settingsValuesSchema as F, textSettingSchema as G, type IntegerSettings as I, type Setting as S, type BoundSettings as a, type DashboardPanelInput as b, compatibleSettingKinds as c, defineDashboard as d, dashboardIssue as e, type DashboardAuthoring as f, type DashboardDefinition as g, type DashboardIssue as h, isBoundSetting as i, type DashboardPanel as j, type DashboardPreview as k, type SettingField as l, type SettingsValues as m, normalizeDashboard as n, dashboardArtifactSchema as o, dashboardAuthoringSchema as p, dashboardDefinitionSchema as q, dashboardLimits as r, dashboardPanelAuthoringSchema as s, dashboardPanels as t, dashboardPreviewSchema as u, defaultPanelWidths as v, isAmount as w, isBalanceChain as x, missingResourceSettings as y, parseSettings as z };