@domino-sdk/relay 1.69.0 → 1.71.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 (66) hide show
  1. package/CHANGELOG.md +28 -0
  2. package/build.mjs +3 -0
  3. package/dist/{accounts-DD4gAOCe.d.ts → accounts-COLmXRbW.d.ts} +144 -13
  4. package/dist/{attempt-captures-CbuCmthd.d.ts → attempt-captures-CVl161qB.d.ts} +3 -2
  5. package/dist/authoring.d.ts +68 -25
  6. package/dist/authoring.js +15 -9
  7. package/dist/{automatic-outcomes-DE3vfi8g.d.ts → automatic-outcomes-5l68PGr1.d.ts} +2 -2
  8. package/dist/browser.d.ts +9 -9
  9. package/dist/browser.js +11 -9
  10. package/dist/{catalog-Cf3fHDNn.d.ts → catalog-BR3g-1H9.d.ts} +41 -2
  11. package/dist/{chunk-ME2KUAVJ.js → chunk-3KKRXN5E.js} +1 -1
  12. package/dist/{chunk-CQVKOD3B.js → chunk-74SMLZZ5.js} +723 -685
  13. package/dist/{chunk-CZ23KRVK.js → chunk-CVJTIVAP.js} +1 -1
  14. package/dist/{chunk-TCREFRPK.js → chunk-DDID5QX5.js} +153 -4
  15. package/dist/{chunk-WVK3G2J2.js → chunk-EMKYDGZ3.js} +1 -1
  16. package/dist/{chunk-2A3BJ262.js → chunk-FGZGL5PG.js} +1 -1
  17. package/dist/{chunk-GEVARKEV.js → chunk-GHBYWDEZ.js} +8 -1
  18. package/dist/{chunk-RKTMSTT7.js → chunk-HN7DE2UN.js} +2 -2
  19. package/dist/{chunk-LGGD7S5T.js → chunk-IDG2VPYG.js} +32 -6
  20. package/dist/{chunk-SWLW4VN3.js → chunk-KC4UB4ZX.js} +1 -1
  21. package/dist/{chunk-ODJGTFPY.js → chunk-KIRXE37T.js} +6 -6
  22. package/dist/{chunk-VAGGGB6B.js → chunk-MDSSIOBC.js} +58 -1
  23. package/dist/{chunk-BRROI4CH.js → chunk-OFSJYXGI.js} +12 -4
  24. package/dist/{chunk-LZXDYSUH.js → chunk-PYZSCFMJ.js} +4 -0
  25. package/dist/{chunk-UGM6DUB2.js → chunk-QMKTYPK6.js} +4 -3
  26. package/dist/{chunk-PO2ZDY27.js → chunk-TW4RABVS.js} +1 -1
  27. package/dist/{chunk-AZDZEQFK.js → chunk-UEVZ3TST.js} +29 -2
  28. package/dist/{chunk-DIXYVGXO.js → chunk-VFHLMNYV.js} +1 -1
  29. package/dist/{chunk-WNEQEDMU.js → chunk-W6DBNBMT.js} +2 -2
  30. package/dist/{client-6eSYOl8h.d.ts → client-B__hMWtK.d.ts} +104 -7
  31. package/dist/{dashboards-DCOAXL54.d.ts → dashboards-DXpjHnq-.d.ts} +3 -3
  32. package/dist/{deployments-BIfdCMd5.d.ts → deployments-CT2kQloT.d.ts} +199 -3
  33. package/dist/{identity-integration-BlfOn8rc.d.ts → identity-integration-ClX4oUAu.d.ts} +4 -4
  34. package/dist/index.d.ts +10 -10
  35. package/dist/index.js +7 -7
  36. package/dist/internal.d.ts +44 -26
  37. package/dist/internal.js +26 -50
  38. package/dist/{limits-Ctaeq23J.d.ts → limits-B7wbnWhd.d.ts} +1 -1
  39. package/dist/{offers-COqHGbHm.d.ts → offers-D4pyeY9b.d.ts} +2 -2
  40. package/dist/portal-proxy.d.ts +2 -2
  41. package/dist/portal-proxy.js +11 -10
  42. package/dist/react/index.d.ts +31 -12
  43. package/dist/react/index.js +116 -41
  44. package/dist/{reward-deliveries-DFhYGJdx.d.ts → reward-deliveries-HGpj1VFz.d.ts} +1 -1
  45. package/dist/runtime/authoring.js +1 -1
  46. package/dist/runtime/chunks/A7G5P76B.js +1 -0
  47. package/dist/runtime/manifest.json +3 -3
  48. package/dist/runtime/schema.js +1 -1
  49. package/dist/schema.d.ts +40 -16
  50. package/dist/schema.js +9 -7
  51. package/dist/server/index.d.ts +12 -12
  52. package/dist/server/index.js +944 -579
  53. package/dist/{sign-in-providers-C97mRNbG.d.ts → sign-in-providers-lbOXCF8N.d.ts} +2 -2
  54. package/dist/solana.d.ts +12 -12
  55. package/dist/solana.js +8 -8
  56. package/dist/{telegram-browser-gRMgGs7B.d.ts → station-check-in-qBiaftfE.d.ts} +89 -7
  57. package/dist/{submission-input-BD7nORuh.d.ts → submission-input-U4aIkJuT.d.ts} +2 -2
  58. package/dist/telegram.d.ts +7 -7
  59. package/dist/testing.d.ts +15 -11
  60. package/dist/testing.js +23 -12
  61. package/dist/{tracker-data-DQgX3FIc.d.ts → tracker-data-2BYXZjsN.d.ts} +3 -3
  62. package/dist/{transport-BLU8jrhg.d.ts → transport-fszraZPi.d.ts} +1736 -19
  63. package/dist/{wallet-CPAjrW4k.d.ts → wallet-BqswMAqZ.d.ts} +3 -1
  64. package/dist/{wallet-browser-BzPt_Qb5.d.ts → wallet-browser-B5r7u3xB.d.ts} +1 -1
  65. package/package.json +1 -1
  66. package/dist/runtime/chunks/HKAI5OQA.js +0 -1
package/dist/authoring.js CHANGED
@@ -6,14 +6,14 @@ import {
6
6
  sourceDataSchema,
7
7
  sourceRoles,
8
8
  validateQuestShape
9
- } from "./chunk-AZDZEQFK.js";
9
+ } from "./chunk-UEVZ3TST.js";
10
10
  import {
11
11
  defineDashboard,
12
12
  tiktokVideoBodySchema,
13
13
  tiktokVideoMetrics,
14
14
  youtubeShortBodySchema,
15
15
  youtubeShortMetrics
16
- } from "./chunk-CZ23KRVK.js";
16
+ } from "./chunk-CVJTIVAP.js";
17
17
  import {
18
18
  CapabilityError,
19
19
  capabilityErrorCodes
@@ -24,7 +24,7 @@ import {
24
24
  engagementScoreSchema,
25
25
  offerAuthoringSchema,
26
26
  referralAuthoringSchema
27
- } from "./chunk-2A3BJ262.js";
27
+ } from "./chunk-FGZGL5PG.js";
28
28
  import {
29
29
  announcementSchema,
30
30
  authorBudgetSchema,
@@ -62,6 +62,7 @@ import {
62
62
  isBoundSetting,
63
63
  isContractCall,
64
64
  isContractEvent,
65
+ isEvmAddress,
65
66
  isEvmChainId,
66
67
  isNftCollection,
67
68
  isSolanaNetwork,
@@ -83,6 +84,7 @@ import {
83
84
  pointLedgerDeclarationSchema,
84
85
  pointsRewardSchema,
85
86
  questDescriptionSchema,
87
+ questGallerySchema,
86
88
  questStationsSchema,
87
89
  quizAnswersSchema,
88
90
  quizContentSchema,
@@ -133,7 +135,7 @@ import {
133
135
  whereSettings,
134
136
  xSearchSourceSchema,
135
137
  youtubeShortsNamespace
136
- } from "./chunk-CQVKOD3B.js";
138
+ } from "./chunk-74SMLZZ5.js";
137
139
  import {
138
140
  namedSchemaFailure,
139
141
  parseDefinition,
@@ -501,7 +503,7 @@ function walletBalanceSource(query) {
501
503
  return { chain: chain === "solana" ? solanaMainnet : chain, token: given };
502
504
  }
503
505
  if (typeof chain === "string" && isEvmChainId(chain)) {
504
- if (given !== null && !/^0x[0-9a-fA-F]{40}$/.test(given)) {
506
+ if (given !== null && !isEvmAddress(given)) {
505
507
  throw new Error(
506
508
  "wallet.balances() on an EVM chain takes an ERC-20 contract address: 0x and 40 hex digits"
507
509
  );
@@ -1077,7 +1079,7 @@ var perStation = () => keyed((ctx) => {
1077
1079
  const station = ctx.action?.reference;
1078
1080
  if (!station) {
1079
1081
  throw new Error(
1080
- "perStation() completes from a signed transaction whose memo names a station"
1082
+ "perStation() completes from a check-in at a station: a signed transaction whose memo names one, or a station's code"
1081
1083
  );
1082
1084
  }
1083
1085
  return station;
@@ -1209,6 +1211,7 @@ function questBuilder(template) {
1209
1211
  }
1210
1212
  const author = authorBudgets(definition.budgets);
1211
1213
  const stations = definition.stations ? questStationsSchema.parse(definition.stations) : void 0;
1214
+ const gallery = definition.gallery ? questGallerySchema.parse(definition.gallery) : void 0;
1212
1215
  validateQuestShape(
1213
1216
  {
1214
1217
  trigger: definition.trigger,
@@ -1221,9 +1224,10 @@ function questBuilder(template) {
1221
1224
  }) : void 0,
1222
1225
  ...definition.retryCooldownMs === void 0 ? {} : { retryCooldownMs: definition.retryCooldownMs },
1223
1226
  ...definition.completionCooldownMs === void 0 ? {} : { completionCooldownMs: definition.completionCooldownMs },
1224
- ...stations ? { stations } : {}
1227
+ ...stations ? { stations } : {},
1228
+ ...gallery ? { gallery } : {}
1225
1229
  },
1226
- { template }
1230
+ { template, authoring: true }
1227
1231
  );
1228
1232
  if (definition.retryCooldownMs !== void 0 && !retryCooldownMsSchema.safeParse(definition.retryCooldownMs).success) {
1229
1233
  throw new Error(
@@ -1376,7 +1380,8 @@ function questBuilder(template) {
1376
1380
  ...definition.availability ? { availability: definition.availability } : {},
1377
1381
  ...definition.retryCooldownMs === void 0 ? {} : { retryCooldownMs: definition.retryCooldownMs },
1378
1382
  ...definition.completionCooldownMs === void 0 ? {} : { completionCooldownMs: definition.completionCooldownMs },
1379
- ...stations ? { stations } : {}
1383
+ ...stations ? { stations } : {},
1384
+ ...gallery ? { gallery } : {}
1380
1385
  });
1381
1386
  }
1382
1387
  return resourceHandle("quest", {
@@ -1542,6 +1547,7 @@ export {
1542
1547
  invoked,
1543
1548
  isContractCall,
1544
1549
  isContractEvent,
1550
+ isEvmAddress,
1545
1551
  isEvmChainId,
1546
1552
  isNftCollection,
1547
1553
  isSolanaProgram,
@@ -1,6 +1,6 @@
1
1
  import * as z from 'zod';
2
- import { b as AttemptStatus, Y as RewardType } from './accounts-DD4gAOCe.js';
3
- import { S as SkipEnrollment } from './tracker-data-DQgX3FIc.js';
2
+ import { b as AttemptStatus, _ as RewardType } from './accounts-COLmXRbW.js';
3
+ import { S as SkipEnrollment } from './tracker-data-2BYXZjsN.js';
4
4
 
5
5
  declare const collectionCodeSchema: z.ZodString;
6
6
  declare const collectionPassSchema: z.ZodObject<{
package/dist/browser.d.ts CHANGED
@@ -1,18 +1,18 @@
1
1
  import { SubmissionStore, RelayClientOptions, RelayClient } from './index.js';
2
- export { C as CosmosChains, D as DiscoveredWallet, E as Eip1193Provider, K as KeplrLike, S as SignInWallet, a as SolanaInjectedProvider, b as StandardWallet, c as StandardWalletAccount, d as cosmosChainList, e as cosmosSigner, f as discoverCosmosWallets, g as discoverEvmWallets, h as discoverSignInWallets, i as discoverSolanaWallets, j as evmSigner, s as solanaSigner, w as walletStandardSolanaSigner } from './wallet-browser-BzPt_Qb5.js';
3
- export { E as EmailSignInOption, O as OAuthSignInOption, P as ProviderSignInOption, S as SignInClient, a as SignInIcon, b as SignInMethods, c as SignInOption, d as SignInOptions, e as SignInUnavailable, T as TelegramSignInOption, W as WalletSignInOption, s as signInOptions, t as telegramMiniAppInitData } from './telegram-browser-gRMgGs7B.js';
2
+ export { C as CosmosChains, D as DiscoveredWallet, E as Eip1193Provider, K as KeplrLike, S as SignInWallet, a as SolanaInjectedProvider, b as StandardWallet, c as StandardWalletAccount, d as cosmosChainList, e as cosmosSigner, f as discoverCosmosWallets, g as discoverEvmWallets, h as discoverSignInWallets, i as discoverSolanaWallets, j as evmSigner, s as solanaSigner, w as walletStandardSolanaSigner } from './wallet-browser-B5r7u3xB.js';
3
+ export { E as EmailSignInOption, K as KnownStationCheckInRefusal, O as OAuthSignInOption, P as ProviderSignInOption, S as SignInClient, a as SignInIcon, b as SignInMethods, c as SignInOption, d as SignInOptions, e as SignInUnavailable, f as StationCheckInOptions, g as StationCheckInRefusal, h as StationCheckInState, i as StationCheckInStation, T as TelegramSignInOption, W as WalletSignInOption, j as checkInAtStation, s as signInOptions, t as telegramMiniAppInitData } from './station-check-in-qBiaftfE.js';
4
4
  export { H as HostEnvironment, g as getHostEnvironment } from './host-environment-DUw5-Cvj.js';
5
5
  import { MemberSummary } from './index.js';
6
- import './accounts-DD4gAOCe.js';
6
+ import './accounts-COLmXRbW.js';
7
7
  import 'zod';
8
- import './tracker-data-DQgX3FIc.js';
9
- import './wallet-CPAjrW4k.js';
10
- import './submission-input-BD7nORuh.js';
8
+ import './tracker-data-2BYXZjsN.js';
9
+ import './wallet-BqswMAqZ.js';
10
+ import './submission-input-U4aIkJuT.js';
11
11
  import './request-error-C24SY7n9.js';
12
- import './reward-deliveries-DFhYGJdx.js';
13
- import './catalog-Cf3fHDNn.js';
12
+ import './reward-deliveries-HGpj1VFz.js';
13
+ import './catalog-BR3g-1H9.js';
14
14
  import './action-BDFKqGlH.js';
15
- import './sign-in-providers-C97mRNbG.js';
15
+ import './sign-in-providers-lbOXCF8N.js';
16
16
  import './profiles-CLDKZVFx.js';
17
17
 
18
18
  /**
package/dist/browser.js CHANGED
@@ -1,5 +1,6 @@
1
1
  import {
2
2
  browserSubmissionStore,
3
+ checkInAtStation,
3
4
  cosmosChainList,
4
5
  cosmosSigner,
5
6
  createBrowserRelayClient,
@@ -12,25 +13,26 @@ import {
12
13
  signInOptions,
13
14
  solanaSigner,
14
15
  walletStandardSolanaSigner
15
- } from "./chunk-TCREFRPK.js";
16
+ } from "./chunk-DDID5QX5.js";
16
17
  import {
17
18
  telegramMiniAppInitData
18
19
  } from "./chunk-FWLQ5XCS.js";
19
- import "./chunk-LGGD7S5T.js";
20
+ import "./chunk-IDG2VPYG.js";
20
21
  import "./chunk-5RLIPTL7.js";
21
22
  import "./chunk-LDO5GP7G.js";
22
23
  import {
23
24
  getHostEnvironment
24
- } from "./chunk-VAGGGB6B.js";
25
- import "./chunk-WVK3G2J2.js";
26
- import "./chunk-SWLW4VN3.js";
27
- import "./chunk-ME2KUAVJ.js";
28
- import "./chunk-PO2ZDY27.js";
29
- import "./chunk-2A3BJ262.js";
30
- import "./chunk-CQVKOD3B.js";
25
+ } from "./chunk-MDSSIOBC.js";
26
+ import "./chunk-EMKYDGZ3.js";
27
+ import "./chunk-KC4UB4ZX.js";
28
+ import "./chunk-3KKRXN5E.js";
29
+ import "./chunk-TW4RABVS.js";
30
+ import "./chunk-FGZGL5PG.js";
31
+ import "./chunk-74SMLZZ5.js";
31
32
  import "./chunk-VNEJH4NT.js";
32
33
  export {
33
34
  browserSubmissionStore,
35
+ checkInAtStation,
34
36
  cosmosChainList,
35
37
  cosmosSigner,
36
38
  createBrowserRelayClient,
@@ -1,5 +1,5 @@
1
- import { b as AttemptStatus, W as AttemptCodeSource, V as KnownAttemptActionKind, X as IntegrationModuleProvider, Y as RewardType, Z as questDescriptionSchema } from './accounts-DD4gAOCe.js';
2
- import { S as SolanaIdlSource } from './wallet-CPAjrW4k.js';
1
+ import { b as AttemptStatus, X as AttemptCodeSource, W as KnownAttemptActionKind, Y as IntegrationModuleProvider, Z as GalleryKind, _ as RewardType, $ as questDescriptionSchema } from './accounts-COLmXRbW.js';
2
+ import { S as SolanaIdlSource } from './wallet-BqswMAqZ.js';
3
3
  import * as z from 'zod';
4
4
 
5
5
  /**
@@ -400,7 +400,14 @@ declare const questTypeVersionSchema: z.ZodObject<{
400
400
  label: z.ZodString;
401
401
  opensAt: z.ZodOptional<z.ZodNumber>;
402
402
  closesAt: z.ZodOptional<z.ZodNumber>;
403
+ proof: z.ZodOptional<z.ZodEnum<{
404
+ code: "code";
405
+ transaction: "transaction";
406
+ }>>;
403
407
  }, z.core.$strict>>>;
408
+ gallery: z.ZodOptional<z.ZodObject<{
409
+ kind: z.ZodType<GalleryKind>;
410
+ }, z.core.$strict>>;
404
411
  completion: z.ZodDiscriminatedUnion<[z.ZodObject<{
405
412
  kind: z.ZodLiteral<"streak">;
406
413
  days: z.ZodNumber;
@@ -1195,7 +1202,14 @@ declare const questCatalogSchema: z.ZodObject<{
1195
1202
  label: z.ZodString;
1196
1203
  opensAt: z.ZodOptional<z.ZodNumber>;
1197
1204
  closesAt: z.ZodOptional<z.ZodNumber>;
1205
+ proof: z.ZodOptional<z.ZodEnum<{
1206
+ code: "code";
1207
+ transaction: "transaction";
1208
+ }>>;
1198
1209
  }, z.core.$strict>>>;
1210
+ gallery: z.ZodOptional<z.ZodObject<{
1211
+ kind: z.ZodType<GalleryKind>;
1212
+ }, z.core.$strict>>;
1199
1213
  completion: z.ZodDiscriminatedUnion<[z.ZodObject<{
1200
1214
  kind: z.ZodLiteral<"streak">;
1201
1215
  days: z.ZodNumber;
@@ -1872,7 +1886,14 @@ declare const questCatalogSchema: z.ZodObject<{
1872
1886
  label: z.ZodString;
1873
1887
  opensAt: z.ZodOptional<z.ZodNumber>;
1874
1888
  closesAt: z.ZodOptional<z.ZodNumber>;
1889
+ proof: z.ZodOptional<z.ZodEnum<{
1890
+ code: "code";
1891
+ transaction: "transaction";
1892
+ }>>;
1875
1893
  }, z.core.$strict>>>;
1894
+ gallery: z.ZodOptional<z.ZodObject<{
1895
+ kind: z.ZodType<GalleryKind>;
1896
+ }, z.core.$strict>>;
1876
1897
  completion: z.ZodDiscriminatedUnion<[z.ZodObject<{
1877
1898
  kind: z.ZodLiteral<"streak">;
1878
1899
  days: z.ZodNumber;
@@ -2438,7 +2459,14 @@ declare const catalogDeploymentPreviewSchema: z.ZodObject<{
2438
2459
  label: z.ZodString;
2439
2460
  opensAt: z.ZodOptional<z.ZodNumber>;
2440
2461
  closesAt: z.ZodOptional<z.ZodNumber>;
2462
+ proof: z.ZodOptional<z.ZodEnum<{
2463
+ code: "code";
2464
+ transaction: "transaction";
2465
+ }>>;
2441
2466
  }, z.core.$strict>>>;
2467
+ gallery: z.ZodOptional<z.ZodObject<{
2468
+ kind: z.ZodType<GalleryKind>;
2469
+ }, z.core.$strict>>;
2442
2470
  completion: z.ZodDiscriminatedUnion<[z.ZodObject<{
2443
2471
  kind: z.ZodLiteral<"streak">;
2444
2472
  days: z.ZodNumber;
@@ -3105,6 +3133,7 @@ declare const questViewSchema: z.ZodObject<{
3105
3133
  wallet: z.ZodString;
3106
3134
  reference: z.ZodNullable<z.ZodString>;
3107
3135
  }, z.core.$strip>>>;
3136
+ station: z.ZodOptional<z.ZodString>;
3108
3137
  }, z.core.$strip>>;
3109
3138
  release: z.ZodString;
3110
3139
  interaction: z.ZodEnum<{
@@ -3634,6 +3663,7 @@ declare const collectionViewSchema: z.ZodObject<{
3634
3663
  wallet: z.ZodString;
3635
3664
  reference: z.ZodNullable<z.ZodString>;
3636
3665
  }, z.core.$strip>>>;
3666
+ station: z.ZodOptional<z.ZodString>;
3637
3667
  }, z.core.$strip>>;
3638
3668
  release: z.ZodString;
3639
3669
  interaction: z.ZodEnum<{
@@ -4344,6 +4374,7 @@ declare const questExperienceSchema: z.ZodObject<{
4344
4374
  wallet: z.ZodString;
4345
4375
  reference: z.ZodNullable<z.ZodString>;
4346
4376
  }, z.core.$strip>>>;
4377
+ station: z.ZodOptional<z.ZodString>;
4347
4378
  }, z.core.$strip>>;
4348
4379
  release: z.ZodString;
4349
4380
  interaction: z.ZodEnum<{
@@ -4873,6 +4904,7 @@ declare const questExperienceSchema: z.ZodObject<{
4873
4904
  wallet: z.ZodString;
4874
4905
  reference: z.ZodNullable<z.ZodString>;
4875
4906
  }, z.core.$strip>>>;
4907
+ station: z.ZodOptional<z.ZodString>;
4876
4908
  }, z.core.$strip>>;
4877
4909
  release: z.ZodString;
4878
4910
  interaction: z.ZodEnum<{
@@ -5482,7 +5514,14 @@ declare const questPublicationPreviewSchema: z.ZodObject<{
5482
5514
  label: z.ZodString;
5483
5515
  opensAt: z.ZodOptional<z.ZodNumber>;
5484
5516
  closesAt: z.ZodOptional<z.ZodNumber>;
5517
+ proof: z.ZodOptional<z.ZodEnum<{
5518
+ code: "code";
5519
+ transaction: "transaction";
5520
+ }>>;
5485
5521
  }, z.core.$strict>>>;
5522
+ gallery: z.ZodOptional<z.ZodObject<{
5523
+ kind: z.ZodType<GalleryKind>;
5524
+ }, z.core.$strict>>;
5486
5525
  completion: z.ZodDiscriminatedUnion<[z.ZodObject<{
5487
5526
  kind: z.ZodLiteral<"streak">;
5488
5527
  days: z.ZodNumber;
@@ -10,7 +10,7 @@ import {
10
10
  skipEnrollmentSchema,
11
11
  telegramSignInMethodsSchema,
12
12
  walletSignInNetworksSchema
13
- } from "./chunk-CQVKOD3B.js";
13
+ } from "./chunk-74SMLZZ5.js";
14
14
 
15
15
  // src/sign-in-providers.ts
16
16
  import * as z from "zod";