@domino-sdk/relay 1.11.1 → 1.14.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +1 -0
- package/build.mjs +15 -0
- package/dist/accounts-5ciAkCMP.d.ts +147 -0
- package/dist/{activity-CNiPDPK6.d.ts → activity-D_R3J-gU.d.ts} +115 -115
- package/dist/attempt-captures-DZldPZJc.d.ts +285 -0
- package/dist/authoring.d.ts +49 -47
- package/dist/authoring.js +6 -4
- package/dist/{automatic-outcomes-kPIDv6X_.d.ts → automatic-outcomes-6lJGnSDe.d.ts} +1 -1
- package/dist/browser.d.ts +8 -7
- package/dist/browser.js +7 -6
- package/dist/capability-error-oTd3eYFH.d.ts +151 -0
- package/dist/chunk-2UAVZCMH.js +314 -0
- package/dist/chunk-5TS3OAWS.js +470 -0
- package/dist/{chunk-PUDL4JBY.js → chunk-6DD7DVNQ.js} +2 -2
- package/dist/{chunk-AGFUDCNM.js → chunk-C3CB4WIQ.js} +1 -1
- package/dist/{chunk-T657WO56.js → chunk-LLMJ2SUT.js} +6 -2
- package/dist/chunk-NIYCAW2I.js +79 -0
- package/dist/chunk-UJACD6K2.js +987 -0
- package/dist/{chunk-XK5E4HAS.js → chunk-VBHFJH3P.js} +80 -28
- package/dist/chunk-W335CWYJ.js +53 -0
- package/dist/{chunk-X7ECZ3AK.js → chunk-XMBM2XD5.js} +1 -1
- package/dist/{chunk-2K2QBPAD.js → chunk-ZLYBUM7K.js} +6 -4
- package/dist/{client-fUSERMAC.d.ts → client-BTd_CyX3.d.ts} +26 -6
- package/dist/{groups-BK8ts2yK.d.ts → groups-4Jb3uYFO.d.ts} +1 -1
- package/dist/{images-aw6W7vFZ.d.ts → images-D5kpqHxv.d.ts} +1 -1
- package/dist/index.d.ts +9 -8
- package/dist/index.js +8 -6
- package/dist/{capability-error-ty3SqD_b.d.ts → integrations-Cr9EhGI_.d.ts} +1 -149
- package/dist/internal.d.ts +32 -5
- package/dist/internal.js +8 -3
- package/dist/{offers-C2FANzrG.d.ts → offers-BFI5t-e-.d.ts} +2 -2
- package/dist/{pages-Chb6OZSB.d.ts → pages-nIoMT9J3.d.ts} +1 -1
- package/dist/{participant-activity-DkL3nY5a.d.ts → participant-activity-DYdUUhw2.d.ts} +1 -0
- package/dist/portal-proxy.js +1 -1
- package/dist/react/index.d.ts +246 -177
- package/dist/react/index.js +954 -383
- package/dist/{referral-reward-kinds-M3f0PdiR.d.ts → referral-reward-kinds-DnvQXL8L.d.ts} +100 -3
- package/dist/{schema-DEM8y8Fm.d.ts → schema-K-Pg5lPz.d.ts} +1 -1
- package/dist/schema.d.ts +316 -314
- package/dist/schema.js +16 -14
- package/dist/server/index.d.ts +2546 -377
- package/dist/server/index.js +594 -841
- package/dist/{sign-in-options-iWOp9puZ.d.ts → sign-in-options-DBjMzgnu.d.ts} +2 -2
- package/dist/submission-input-CPIsJt-_.d.ts +146 -0
- package/dist/testing.d.ts +641 -0
- package/dist/testing.js +1282 -0
- package/package.json +6 -2
- package/dist/chunk-OCXGG75K.js +0 -171
- package/dist/chunk-ZFABFKIY.js +0 -1295
- package/dist/submission-input-BbBJTVlT.d.ts +0 -290
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { a as AuthProvider } from './
|
|
2
|
-
import { o as createRelayClient, g as RelayError } from './client-
|
|
1
|
+
import { a as AuthProvider } from './accounts-5ciAkCMP.js';
|
|
2
|
+
import { o as createRelayClient, g as RelayError } from './client-BTd_CyX3.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, m as QuestHandle } from './schema-K-Pg5lPz.js';
|
|
3
|
+
import { p as ProjectGroupReference } from './groups-4Jb3uYFO.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 };
|