@domino-sdk/relay 1.11.1 → 1.15.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 (53) hide show
  1. package/README.md +1 -0
  2. package/build.mjs +15 -0
  3. package/dist/accounts-5ciAkCMP.d.ts +147 -0
  4. package/dist/{request-error-D_dUPLwo.d.ts → action-DBzILFx9.d.ts} +31 -1
  5. package/dist/attempt-captures-DHwIVoRP.d.ts +285 -0
  6. package/dist/authoring.d.ts +12 -10
  7. package/dist/authoring.js +6 -4
  8. package/dist/{automatic-outcomes-kPIDv6X_.d.ts → automatic-outcomes-BcEn_L46.d.ts} +1 -1
  9. package/dist/browser.d.ts +9 -9
  10. package/dist/browser.js +7 -6
  11. package/dist/capability-error-oTd3eYFH.d.ts +151 -0
  12. package/dist/chunk-2UAVZCMH.js +314 -0
  13. package/dist/{chunk-AGFUDCNM.js → chunk-3PPEXDWR.js} +1 -1
  14. package/dist/chunk-CHD6HHWG.js +485 -0
  15. package/dist/{chunk-T657WO56.js → chunk-LLMJ2SUT.js} +6 -2
  16. package/dist/chunk-NIYCAW2I.js +79 -0
  17. package/dist/{chunk-XK5E4HAS.js → chunk-PJXBW754.js} +80 -28
  18. package/dist/{chunk-PUDL4JBY.js → chunk-PUY35TH3.js} +2 -2
  19. package/dist/chunk-UJACD6K2.js +987 -0
  20. package/dist/chunk-W335CWYJ.js +53 -0
  21. package/dist/{chunk-X7ECZ3AK.js → chunk-XMBM2XD5.js} +1 -1
  22. package/dist/{chunk-2K2QBPAD.js → chunk-ZLYBUM7K.js} +6 -4
  23. package/dist/{client-fUSERMAC.d.ts → client-DFSCmf3H.d.ts} +27 -8
  24. package/dist/{activity-CNiPDPK6.d.ts → deployments-Ci6GyANg.d.ts} +15 -15
  25. package/dist/{groups-BK8ts2yK.d.ts → groups-Bi7lc54m.d.ts} +1 -1
  26. package/dist/{images-aw6W7vFZ.d.ts → images-Cb8QHGjn.d.ts} +1 -1
  27. package/dist/index.d.ts +10 -10
  28. package/dist/index.js +8 -6
  29. package/dist/{capability-error-ty3SqD_b.d.ts → integrations-Cr9EhGI_.d.ts} +1 -149
  30. package/dist/internal.d.ts +11 -4
  31. package/dist/internal.js +8 -3
  32. package/dist/{offers-C2FANzrG.d.ts → offers-Catj06u7.d.ts} +2 -2
  33. package/dist/{pages-Chb6OZSB.d.ts → pages-CpYt56Km.d.ts} +1 -1
  34. package/dist/{participant-activity-DkL3nY5a.d.ts → participant-activity-DYdUUhw2.d.ts} +1 -0
  35. package/dist/portal-proxy.js +1 -1
  36. package/dist/react/index.d.ts +247 -179
  37. package/dist/react/index.js +954 -383
  38. package/dist/{schema-DEM8y8Fm.d.ts → schema-BaVl2VBS.d.ts} +1 -1
  39. package/dist/schema.d.ts +15 -13
  40. package/dist/schema.js +16 -14
  41. package/dist/server/index.d.ts +12 -70916
  42. package/dist/server/index.js +594 -841
  43. package/dist/{sign-in-options-iWOp9puZ.d.ts → sign-in-options-CU1ND6-y.d.ts} +2 -2
  44. package/dist/submission-input-Bi4HipqI.d.ts +146 -0
  45. package/dist/testing.d.ts +641 -0
  46. package/dist/testing.js +1282 -0
  47. package/dist/transport-0ttRwUat.d.ts +73361 -0
  48. package/package.json +6 -2
  49. package/dist/action-9Xl0StBg.d.ts +0 -33
  50. package/dist/chunk-OCXGG75K.js +0 -171
  51. package/dist/chunk-ZFABFKIY.js +0 -1295
  52. package/dist/referral-reward-kinds-M3f0PdiR.d.ts +0 -171
  53. package/dist/submission-input-BbBJTVlT.d.ts +0 -290
@@ -1,5 +1,5 @@
1
- import { a as AuthProvider } from './submission-input-BbBJTVlT.js';
2
- import { o as createRelayClient, g as RelayError } from './client-fUSERMAC.js';
1
+ import { a as AuthProvider } from './accounts-5ciAkCMP.js';
2
+ import { o as createRelayClient, g as RelayError } from './client-DFSCmf3H.js';
3
3
  import { C as CosmosChain, a as CosmosNetwork, f as WalletSigner, d as WalletSignInNetwork } from './wallet-CDyo-U4n.js';
4
4
 
5
5
  /** An EIP-1193 provider, such as `window.ethereum` or an EIP-6963 announcement's provider. */
@@ -0,0 +1,146 @@
1
+ import { z } from 'zod';
2
+ import { L as LedgerReference, r as QuestHandle } from './schema-BaVl2VBS.js';
3
+ import { p as ProjectGroupReference } from './groups-Bi7lc54m.js';
4
+
5
+ declare const completionPrerequisiteSchema: z.ZodDiscriminatedUnion<[z.ZodObject<{
6
+ kind: z.ZodLiteral<"completion">;
7
+ quest: z.ZodString;
8
+ scope: z.ZodLiteral<"ever">;
9
+ }, z.core.$strict>, z.ZodObject<{
10
+ kind: z.ZodLiteral<"completion">;
11
+ quest: z.ZodString;
12
+ scope: z.ZodLiteral<"period">;
13
+ period: z.ZodEnum<{
14
+ day: "day";
15
+ week: "week";
16
+ month: "month";
17
+ }>;
18
+ }, z.core.$strict>], "scope">;
19
+ declare const balancePrerequisiteSchema: z.ZodObject<{
20
+ kind: z.ZodLiteral<"balance">;
21
+ balance: z.ZodString;
22
+ minimum: z.ZodNumber;
23
+ }, z.core.$strict>;
24
+ declare const groupPrerequisiteSchema: z.ZodObject<{
25
+ kind: z.ZodLiteral<"group">;
26
+ group: z.ZodString;
27
+ title: z.ZodString;
28
+ }, z.core.$strict>;
29
+ declare const prerequisiteSchema: z.ZodDiscriminatedUnion<[z.ZodDiscriminatedUnion<[z.ZodObject<{
30
+ kind: z.ZodLiteral<"completion">;
31
+ quest: z.ZodString;
32
+ scope: z.ZodLiteral<"ever">;
33
+ }, z.core.$strict>, z.ZodObject<{
34
+ kind: z.ZodLiteral<"completion">;
35
+ quest: z.ZodString;
36
+ scope: z.ZodLiteral<"period">;
37
+ period: z.ZodEnum<{
38
+ day: "day";
39
+ week: "week";
40
+ month: "month";
41
+ }>;
42
+ }, z.core.$strict>], "scope">, z.ZodObject<{
43
+ kind: z.ZodLiteral<"balance">;
44
+ balance: z.ZodString;
45
+ minimum: z.ZodNumber;
46
+ }, z.core.$strict>, z.ZodObject<{
47
+ kind: z.ZodLiteral<"group">;
48
+ group: z.ZodString;
49
+ title: z.ZodString;
50
+ }, z.core.$strict>], "kind">;
51
+ type Prerequisite = z.infer<typeof prerequisiteSchema>;
52
+ declare const missingPrerequisiteSchema: z.ZodUnion<readonly [z.ZodObject<{
53
+ kind: z.ZodLiteral<"completion">;
54
+ quest: z.ZodString;
55
+ title: z.ZodString;
56
+ scope: z.ZodLiteral<"ever">;
57
+ }, z.core.$strip>, z.ZodObject<{
58
+ kind: z.ZodLiteral<"completion">;
59
+ quest: z.ZodString;
60
+ title: z.ZodString;
61
+ scope: z.ZodLiteral<"period">;
62
+ period: z.ZodEnum<{
63
+ day: "day";
64
+ week: "week";
65
+ month: "month";
66
+ }>;
67
+ resetsAt: z.ZodNumber;
68
+ }, z.core.$strip>, z.ZodObject<{
69
+ kind: z.ZodLiteral<"balance">;
70
+ balance: z.ZodString;
71
+ title: z.ZodString;
72
+ minimum: z.ZodNumber;
73
+ current: z.ZodNumber;
74
+ }, z.core.$strip>, z.ZodObject<{
75
+ kind: z.ZodLiteral<"group">;
76
+ group: z.ZodString;
77
+ title: z.ZodString;
78
+ }, z.core.$strip>]>;
79
+ type MissingPrerequisite = z.infer<typeof missingPrerequisiteSchema>;
80
+ declare function completed(quest: QuestHandle, options?: {
81
+ scope?: "ever";
82
+ } | {
83
+ scope: "period";
84
+ period: "day" | "week" | "month";
85
+ }): {
86
+ kind: "completion";
87
+ quest: string;
88
+ scope: "ever";
89
+ } | {
90
+ kind: "completion";
91
+ quest: string;
92
+ scope: "period";
93
+ period: "day" | "week" | "month";
94
+ };
95
+ declare function balanceAtLeast(balance: LedgerReference, minimum: number): {
96
+ kind: "balance";
97
+ balance: string;
98
+ minimum: number;
99
+ };
100
+ declare function inGroup(group: ProjectGroupReference): {
101
+ kind: "group";
102
+ group: string;
103
+ title: string;
104
+ };
105
+
106
+ declare const textOptionsSchema: z.ZodObject<{
107
+ required: z.ZodDefault<z.ZodBoolean>;
108
+ minLength: z.ZodDefault<z.ZodNumber>;
109
+ maxLength: z.ZodDefault<z.ZodNumber>;
110
+ }, z.core.$strict>;
111
+ declare const urlOptionsSchema: z.ZodObject<{
112
+ required: z.ZodDefault<z.ZodBoolean>;
113
+ allowedHosts: z.ZodOptional<z.ZodArray<z.ZodString>>;
114
+ }, z.core.$strict>;
115
+ type TextOptions = z.input<typeof textOptionsSchema>;
116
+ type UrlOptions = z.input<typeof urlOptionsSchema>;
117
+ declare const textEvidenceSchema: z.ZodObject<{
118
+ kind: z.ZodLiteral<"text">;
119
+ value: z.ZodString;
120
+ }, z.core.$strict>;
121
+ declare const urlEvidenceSchema: z.ZodObject<{
122
+ kind: z.ZodLiteral<"url">;
123
+ value: z.ZodString;
124
+ }, z.core.$strict>;
125
+ declare const valueEvidenceSchema: z.ZodDiscriminatedUnion<[z.ZodObject<{
126
+ kind: z.ZodLiteral<"text">;
127
+ value: z.ZodString;
128
+ }, z.core.$strict>, z.ZodObject<{
129
+ kind: z.ZodLiteral<"url">;
130
+ value: z.ZodString;
131
+ }, z.core.$strict>], "kind">;
132
+ type TextEvidence = z.infer<typeof textEvidenceSchema>;
133
+ type UrlEvidence = z.infer<typeof urlEvidenceSchema>;
134
+ type ValueEvidence = z.infer<typeof valueEvidenceSchema>;
135
+ /** Validates a claim without fetching it or changing the captured value. */
136
+ declare function validateSubmissionValue(input: ValueEvidence, contract: {
137
+ input: "text";
138
+ constraints: z.output<typeof textOptionsSchema>;
139
+ } | {
140
+ input: "url";
141
+ constraints: z.output<typeof urlOptionsSchema>;
142
+ }): string | null;
143
+ /** Extract an ID only. The URL and its author name are untrusted claims. */
144
+ declare function xPostId(value: string): string | null;
145
+
146
+ export { type MissingPrerequisite as M, type Prerequisite as P, type TextEvidence as T, type UrlEvidence as U, type ValueEvidence as V, type TextOptions as a, type UrlOptions as b, balanceAtLeast as c, completed as d, balancePrerequisiteSchema as e, completionPrerequisiteSchema as f, groupPrerequisiteSchema as g, textOptionsSchema as h, inGroup as i, urlOptionsSchema as j, valueEvidenceSchema as k, missingPrerequisiteSchema as m, prerequisiteSchema as p, textEvidenceSchema as t, urlEvidenceSchema as u, validateSubmissionValue as v, xPostId as x };