@domino-sdk/relay 1.67.0 → 1.69.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/CHANGELOG.md +65 -0
- package/dist/{accounts-C2O8mpB8.d.ts → accounts-DD4gAOCe.d.ts} +232 -3
- package/dist/{action-9Xl0StBg.d.ts → action-BDFKqGlH.d.ts} +3 -2
- package/dist/{attempt-captures-ClHAoo_n.d.ts → attempt-captures-CbuCmthd.d.ts} +11 -2
- package/dist/authoring.d.ts +534 -48
- package/dist/authoring.js +192 -29
- package/dist/{automatic-outcomes-BEnPn4Uh.d.ts → automatic-outcomes-DE3vfi8g.d.ts} +11 -3
- package/dist/avatar.d.ts +2 -1
- package/dist/browser.d.ts +15 -13
- package/dist/browser.js +12 -13
- package/dist/{capability-error-CuI_F7yM.d.ts → capability-error-db7kO8-P.d.ts} +2 -1
- package/dist/{catalog-CbiftcxQ.d.ts → catalog-Cf3fHDNn.d.ts} +69 -3
- package/dist/{chunk-5DZNMLDM.js → chunk-2A3BJ262.js} +2 -2
- package/dist/{chunk-BQXRCJ3N.js → chunk-5RLIPTL7.js} +1 -1
- package/dist/{chunk-MVQQDPQX.js → chunk-AZDZEQFK.js} +14 -2
- package/dist/{chunk-JK3XV2CR.js → chunk-BRROI4CH.js} +50 -8
- package/dist/{chunk-P33ZAJMS.js → chunk-CQVKOD3B.js} +1266 -677
- package/dist/{chunk-QYC3CZVD.js → chunk-CZ23KRVK.js} +2 -2
- package/dist/{chunk-X3FMVRMM.js → chunk-DIXYVGXO.js} +1 -1
- package/dist/{chunk-RDUSFUXX.js → chunk-GEVARKEV.js} +9 -1
- package/dist/{chunk-2HHZV7U3.js → chunk-LDO5GP7G.js} +1 -1
- package/dist/{chunk-Z2Z5DBNW.js → chunk-LGGD7S5T.js} +45 -9
- package/dist/{chunk-U66GUVSG.js → chunk-LZXDYSUH.js} +2 -0
- package/dist/{chunk-NRMQVK2W.js → chunk-ME2KUAVJ.js} +1 -1
- package/dist/{chunk-KUNPCDN6.js → chunk-ODJGTFPY.js} +16 -9
- package/dist/{chunk-DSJ46QLB.js → chunk-PO2ZDY27.js} +1 -1
- package/dist/{chunk-RWR2LOPA.js → chunk-RKTMSTT7.js} +2 -2
- package/dist/{chunk-5SBA6X5X.js → chunk-SWLW4VN3.js} +2 -2
- package/dist/{chunk-BMJHFWVT.js → chunk-TCREFRPK.js} +10 -43
- package/dist/{chunk-Q5QVAF7R.js → chunk-UGM6DUB2.js} +42 -25
- package/dist/chunk-VAGGGB6B.js +87 -0
- package/dist/{chunk-FGXLXENM.js → chunk-VNEJH4NT.js} +47 -3
- package/dist/chunk-WNEQEDMU.js +427 -0
- package/dist/{chunk-Q6KTTVOI.js → chunk-WVK3G2J2.js} +1 -1
- package/dist/{client-CZPewB9h.d.ts → client-6eSYOl8h.d.ts} +159 -11
- package/dist/{dashboards-jGPM3AxF.d.ts → dashboards-DCOAXL54.d.ts} +6 -5
- package/dist/{deployments-BVFd7ddA.d.ts → deployments-BIfdCMd5.d.ts} +911 -309
- package/dist/{host-environment-FN4zg3hw.d.ts → host-environment-DUw5-Cvj.d.ts} +2 -1
- package/dist/{identity-integration-W1Vo3Ql9.d.ts → identity-integration-BlfOn8rc.d.ts} +3 -2
- package/dist/index.d.ts +16 -15
- package/dist/index.js +10 -10
- package/dist/internal.d.ts +155 -17
- package/dist/internal.js +266 -19
- package/dist/{limits-C4RzrOV4.d.ts → limits-Ctaeq23J.d.ts} +8 -2
- package/dist/{offers-BpYenB9i.d.ts → offers-COqHGbHm.d.ts} +4 -3
- package/dist/{participant-activity-DXRq4s6K.d.ts → participant-activity-BznrcePT.d.ts} +2 -1
- package/dist/{participant-rewards-BcWkBRn_.d.ts → participant-rewards-s5Gn23qb.d.ts} +23 -1
- package/dist/portal-proxy.d.ts +7 -4
- package/dist/portal-proxy.js +14 -18
- package/dist/profiles-CLDKZVFx.d.ts +370 -0
- package/dist/react/index.d.ts +71 -30
- package/dist/react/index.js +12 -13
- package/dist/{request-error-D_dUPLwo.d.ts → request-error-C24SY7n9.d.ts} +2 -1
- package/dist/{reward-deliveries-BOWpMytr.d.ts → reward-deliveries-DFhYGJdx.d.ts} +3 -2
- package/dist/runtime/authoring.js +1 -1
- package/dist/runtime/chunks/HKAI5OQA.js +1 -0
- package/dist/runtime/manifest.json +3 -3
- package/dist/runtime/schema.js +1 -1
- package/dist/schema.d.ts +556 -180
- package/dist/schema.js +70 -8
- package/dist/server/index.d.ts +15 -14
- package/dist/server/index.js +2053 -893
- package/dist/{sign-in-providers-BRYVOSlG.d.ts → sign-in-providers-C97mRNbG.d.ts} +4 -3
- package/dist/solana.d.ts +287 -0
- package/dist/solana.js +699 -0
- package/dist/{streaks-0YuipsUQ.d.ts → streaks-MAqKHbHC.d.ts} +2 -1
- package/dist/{submission-input-C152xIdn.d.ts → submission-input-BD7nORuh.d.ts} +4 -3
- package/dist/{telegram-browser-657QqiQl.d.ts → telegram-browser-gRMgGs7B.d.ts} +8 -109
- package/dist/telegram.d.ts +14 -12
- package/dist/telegram.js +2 -2
- package/dist/testing.d.ts +99 -18
- package/dist/testing.js +101 -11
- package/dist/{tracker-data-BqY-9Vu-.d.ts → tracker-data-DQgX3FIc.d.ts} +493 -1
- package/dist/{transport-CthYgZXK.d.ts → transport-BLU8jrhg.d.ts} +7340 -2134
- package/dist/vite.d.ts +2 -1
- package/dist/{wallet-Btng186v.d.ts → wallet-CPAjrW4k.d.ts} +339 -308
- package/dist/wallet-browser-BzPt_Qb5.d.ts +107 -0
- package/package.json +21 -3
- package/dist/chunk-UWUS4OOV.js +0 -59
- package/dist/chunk-UYVJZR33.js +0 -34
- package/dist/runtime/chunks/C2MGLQXC.js +0 -1
|
@@ -1,301 +1,5 @@
|
|
|
1
1
|
import * as z from 'zod';
|
|
2
2
|
|
|
3
|
-
/** Who sees profiles: nobody but the member (`private`), signed-in members, or anyone. */
|
|
4
|
-
declare const profileVisibilitySchema: z.ZodEnum<{
|
|
5
|
-
public: "public";
|
|
6
|
-
private: "private";
|
|
7
|
-
participants: "participants";
|
|
8
|
-
}>;
|
|
9
|
-
type ProfileVisibility = z.infer<typeof profileVisibilitySchema>;
|
|
10
|
-
/** Connected accounts a member can take a picture from. */
|
|
11
|
-
declare const avatarProviderSchema: z.ZodEnum<{
|
|
12
|
-
discord: "discord";
|
|
13
|
-
google: "google";
|
|
14
|
-
x: "x";
|
|
15
|
-
}>;
|
|
16
|
-
type AvatarProvider = z.infer<typeof avatarProviderSchema>;
|
|
17
|
-
/**
|
|
18
|
-
* The accounts that can supply a default name and picture: public personas. Google and Apple
|
|
19
|
-
* accounts are usually a legal name and a personal photo, so they never do.
|
|
20
|
-
*/
|
|
21
|
-
declare const profileDefaultProviderSchema: z.ZodEnum<{
|
|
22
|
-
discord: "discord";
|
|
23
|
-
x: "x";
|
|
24
|
-
}>;
|
|
25
|
-
type ProfileDefaultProvider = z.infer<typeof profileDefaultProviderSchema>;
|
|
26
|
-
/**
|
|
27
|
-
* Where a profile's name and picture come from before the member chooses: the first of these
|
|
28
|
-
* accounts the member connected that has one, in order. Empty means generated values.
|
|
29
|
-
*/
|
|
30
|
-
declare const profileDefaultsSchema: z.ZodArray<z.ZodEnum<{
|
|
31
|
-
discord: "discord";
|
|
32
|
-
x: "x";
|
|
33
|
-
}>>;
|
|
34
|
-
type ProfileDefaults = z.infer<typeof profileDefaultsSchema>;
|
|
35
|
-
/**
|
|
36
|
-
* The seed of a generated avatar (`defaultAvatar`), the same one `relay.me.get()` returns: an HMAC
|
|
37
|
-
* of the member under the project's secret, so it reveals nothing about the member.
|
|
38
|
-
*/
|
|
39
|
-
declare const avatarSeedSchema: z.ZodString;
|
|
40
|
-
/**
|
|
41
|
-
* A profile's avatar: an uploaded picture, an account's picture, or a generated one. Every kind
|
|
42
|
-
* carries the generated avatar's `seed`, so a picture that fails to load falls back to the same
|
|
43
|
-
* generated avatar everywhere.
|
|
44
|
-
*/
|
|
45
|
-
declare const profileAvatarSchema: z.ZodDiscriminatedUnion<[z.ZodObject<{
|
|
46
|
-
source: z.ZodLiteral<"upload">;
|
|
47
|
-
url: z.ZodString;
|
|
48
|
-
seed: z.ZodString;
|
|
49
|
-
}, z.core.$strip>, z.ZodObject<{
|
|
50
|
-
source: z.ZodLiteral<"account">;
|
|
51
|
-
provider: z.ZodEnum<{
|
|
52
|
-
discord: "discord";
|
|
53
|
-
google: "google";
|
|
54
|
-
x: "x";
|
|
55
|
-
}>;
|
|
56
|
-
url: z.ZodString;
|
|
57
|
-
seed: z.ZodString;
|
|
58
|
-
}, z.core.$strip>, z.ZodObject<{
|
|
59
|
-
source: z.ZodLiteral<"generated">;
|
|
60
|
-
seed: z.ZodString;
|
|
61
|
-
}, z.core.$strip>], "source">;
|
|
62
|
-
type ProfileAvatar = z.infer<typeof profileAvatarSchema>;
|
|
63
|
-
/** What other participants see: the profile's public ID, its name and its avatar. */
|
|
64
|
-
declare const profileSummarySchema: z.ZodObject<{
|
|
65
|
-
id: z.ZodString;
|
|
66
|
-
name: z.ZodString;
|
|
67
|
-
avatar: z.ZodDiscriminatedUnion<[z.ZodObject<{
|
|
68
|
-
source: z.ZodLiteral<"upload">;
|
|
69
|
-
url: z.ZodString;
|
|
70
|
-
seed: z.ZodString;
|
|
71
|
-
}, z.core.$strip>, z.ZodObject<{
|
|
72
|
-
source: z.ZodLiteral<"account">;
|
|
73
|
-
provider: z.ZodEnum<{
|
|
74
|
-
discord: "discord";
|
|
75
|
-
google: "google";
|
|
76
|
-
x: "x";
|
|
77
|
-
}>;
|
|
78
|
-
url: z.ZodString;
|
|
79
|
-
seed: z.ZodString;
|
|
80
|
-
}, z.core.$strip>, z.ZodObject<{
|
|
81
|
-
source: z.ZodLiteral<"generated">;
|
|
82
|
-
seed: z.ZodString;
|
|
83
|
-
}, z.core.$strip>], "source">;
|
|
84
|
-
}, z.core.$strip>;
|
|
85
|
-
type ProfileSummary = z.infer<typeof profileSummarySchema>;
|
|
86
|
-
/**
|
|
87
|
-
* A display name: NFC-normalized, whitespace collapsed and trimmed, 1 to 40 characters, with no
|
|
88
|
-
* control, zero-width or bidirectional formatting characters.
|
|
89
|
-
*/
|
|
90
|
-
declare const displayNameSchema: z.ZodPipe<z.ZodPipe<z.ZodString, z.ZodTransform<string, string>>, z.ZodString>;
|
|
91
|
-
/**
|
|
92
|
-
* A change to the member's own profile; omitted fields stay. `displayName: null` and
|
|
93
|
-
* `avatar: null` return to the project's defaults (null also removes an uploaded picture).
|
|
94
|
-
* Upload a picture with `relay.profiles.uploadAvatar`.
|
|
95
|
-
*/
|
|
96
|
-
declare const profileUpdateSchema: z.ZodObject<{
|
|
97
|
-
displayName: z.ZodOptional<z.ZodNullable<z.ZodPipe<z.ZodPipe<z.ZodString, z.ZodTransform<string, string>>, z.ZodString>>>;
|
|
98
|
-
avatar: z.ZodOptional<z.ZodNullable<z.ZodDiscriminatedUnion<[z.ZodObject<{
|
|
99
|
-
source: z.ZodLiteral<"account">;
|
|
100
|
-
provider: z.ZodEnum<{
|
|
101
|
-
discord: "discord";
|
|
102
|
-
google: "google";
|
|
103
|
-
x: "x";
|
|
104
|
-
}>;
|
|
105
|
-
}, z.core.$strict>, z.ZodObject<{
|
|
106
|
-
source: z.ZodLiteral<"generated">;
|
|
107
|
-
}, z.core.$strict>], "source">>>;
|
|
108
|
-
hidden: z.ZodOptional<z.ZodBoolean>;
|
|
109
|
-
}, z.core.$strict>;
|
|
110
|
-
type ProfileUpdate = z.input<typeof profileUpdateSchema>;
|
|
111
|
-
/** The signed-in member's own profile, with what they chose and what they can choose from. */
|
|
112
|
-
declare const ownProfileSchema: z.ZodObject<{
|
|
113
|
-
id: z.ZodString;
|
|
114
|
-
name: z.ZodString;
|
|
115
|
-
avatar: z.ZodDiscriminatedUnion<[z.ZodObject<{
|
|
116
|
-
source: z.ZodLiteral<"upload">;
|
|
117
|
-
url: z.ZodString;
|
|
118
|
-
seed: z.ZodString;
|
|
119
|
-
}, z.core.$strip>, z.ZodObject<{
|
|
120
|
-
source: z.ZodLiteral<"account">;
|
|
121
|
-
provider: z.ZodEnum<{
|
|
122
|
-
discord: "discord";
|
|
123
|
-
google: "google";
|
|
124
|
-
x: "x";
|
|
125
|
-
}>;
|
|
126
|
-
url: z.ZodString;
|
|
127
|
-
seed: z.ZodString;
|
|
128
|
-
}, z.core.$strip>, z.ZodObject<{
|
|
129
|
-
source: z.ZodLiteral<"generated">;
|
|
130
|
-
seed: z.ZodString;
|
|
131
|
-
}, z.core.$strip>], "source">;
|
|
132
|
-
displayName: z.ZodNullable<z.ZodString>;
|
|
133
|
-
avatarChoice: z.ZodEnum<{
|
|
134
|
-
default: "default";
|
|
135
|
-
account: "account";
|
|
136
|
-
upload: "upload";
|
|
137
|
-
generated: "generated";
|
|
138
|
-
}>;
|
|
139
|
-
avatarProvider: z.ZodNullable<z.ZodEnum<{
|
|
140
|
-
discord: "discord";
|
|
141
|
-
google: "google";
|
|
142
|
-
x: "x";
|
|
143
|
-
}>>;
|
|
144
|
-
hidden: z.ZodBoolean;
|
|
145
|
-
locked: z.ZodBoolean;
|
|
146
|
-
visibility: z.ZodEnum<{
|
|
147
|
-
public: "public";
|
|
148
|
-
private: "private";
|
|
149
|
-
participants: "participants";
|
|
150
|
-
}>;
|
|
151
|
-
options: z.ZodArray<z.ZodObject<{
|
|
152
|
-
provider: z.ZodEnum<{
|
|
153
|
-
discord: "discord";
|
|
154
|
-
google: "google";
|
|
155
|
-
x: "x";
|
|
156
|
-
}>;
|
|
157
|
-
name: z.ZodNullable<z.ZodString>;
|
|
158
|
-
givenName: z.ZodDefault<z.ZodNullable<z.ZodString>>;
|
|
159
|
-
imageUrl: z.ZodNullable<z.ZodString>;
|
|
160
|
-
}, z.core.$strip>>;
|
|
161
|
-
}, z.core.$strip>;
|
|
162
|
-
/** @compat output */
|
|
163
|
-
type OwnProfile = z.infer<typeof ownProfileSchema>;
|
|
164
|
-
/** A page of a profile's quest completions: `limit` quests (default 20, at most 100) after `cursor`. */
|
|
165
|
-
declare const profileCompletionQuerySchema: z.ZodObject<{
|
|
166
|
-
limit: z.ZodDefault<z.ZodCoercedNumber<unknown>>;
|
|
167
|
-
cursor: z.ZodOptional<z.ZodString>;
|
|
168
|
-
}, z.core.$strict>;
|
|
169
|
-
type ProfileCompletionQuery = z.input<typeof profileCompletionQuerySchema>;
|
|
170
|
-
/** A quest the member completed, grouped over its completions. */
|
|
171
|
-
declare const profileCompletionSchema: z.ZodObject<{
|
|
172
|
-
quest: z.ZodString;
|
|
173
|
-
key: z.ZodOptional<z.ZodString>;
|
|
174
|
-
title: z.ZodString;
|
|
175
|
-
completions: z.ZodNumber;
|
|
176
|
-
lastCompletedAt: z.ZodNullable<z.ZodNumber>;
|
|
177
|
-
}, z.core.$strip>;
|
|
178
|
-
type ProfileCompletion = z.infer<typeof profileCompletionSchema>;
|
|
179
|
-
/**
|
|
180
|
-
* A profile's completions of the quests that show on profiles (`defineQuest({ profile: { visible:
|
|
181
|
-
* true } })`), most recently completed first. Pass `nextCursor` as `cursor` for the next page.
|
|
182
|
-
*/
|
|
183
|
-
declare const profileCompletionPageSchema: z.ZodObject<{
|
|
184
|
-
items: z.ZodArray<z.ZodObject<{
|
|
185
|
-
quest: z.ZodString;
|
|
186
|
-
key: z.ZodOptional<z.ZodString>;
|
|
187
|
-
title: z.ZodString;
|
|
188
|
-
completions: z.ZodNumber;
|
|
189
|
-
lastCompletedAt: z.ZodNullable<z.ZodNumber>;
|
|
190
|
-
}, z.core.$strip>>;
|
|
191
|
-
nextCursor: z.ZodNullable<z.ZodString>;
|
|
192
|
-
}, z.core.$strip>;
|
|
193
|
-
type ProfileCompletionPage = z.infer<typeof profileCompletionPageSchema>;
|
|
194
|
-
/** A profile's progress in one referral program: counts only, never codes or accounts. */
|
|
195
|
-
declare const profileReferralSchema: z.ZodObject<{
|
|
196
|
-
program: z.ZodString;
|
|
197
|
-
key: z.ZodOptional<z.ZodString>;
|
|
198
|
-
title: z.ZodString;
|
|
199
|
-
invited: z.ZodNumber;
|
|
200
|
-
qualified: z.ZodNumber;
|
|
201
|
-
milestones: z.ZodArray<z.ZodObject<{
|
|
202
|
-
id: z.ZodString;
|
|
203
|
-
count: z.ZodNumber;
|
|
204
|
-
reached: z.ZodBoolean;
|
|
205
|
-
}, z.core.$strip>>;
|
|
206
|
-
}, z.core.$strip>;
|
|
207
|
-
type ProfileReferral = z.infer<typeof profileReferralSchema>;
|
|
208
|
-
/** A project's profile settings in one environment. */
|
|
209
|
-
declare const profileSettingsSchema: z.ZodObject<{
|
|
210
|
-
visibility: z.ZodEnum<{
|
|
211
|
-
public: "public";
|
|
212
|
-
private: "private";
|
|
213
|
-
participants: "participants";
|
|
214
|
-
}>;
|
|
215
|
-
defaults: z.ZodArray<z.ZodEnum<{
|
|
216
|
-
discord: "discord";
|
|
217
|
-
x: "x";
|
|
218
|
-
}>>;
|
|
219
|
-
revision: z.ZodNumber;
|
|
220
|
-
actor: z.ZodNullable<z.ZodString>;
|
|
221
|
-
updatedAt: z.ZodNullable<z.ZodNumber>;
|
|
222
|
-
}, z.core.$strip>;
|
|
223
|
-
type ProfileSettings = z.infer<typeof profileSettingsSchema>;
|
|
224
|
-
declare const profileSettingsInputSchema: z.ZodObject<{
|
|
225
|
-
visibility: z.ZodEnum<{
|
|
226
|
-
public: "public";
|
|
227
|
-
private: "private";
|
|
228
|
-
participants: "participants";
|
|
229
|
-
}>;
|
|
230
|
-
defaults: z.ZodArray<z.ZodEnum<{
|
|
231
|
-
discord: "discord";
|
|
232
|
-
x: "x";
|
|
233
|
-
}>>;
|
|
234
|
-
actionId: z.ZodString;
|
|
235
|
-
expectedRevision: z.ZodNumber;
|
|
236
|
-
reason: z.ZodString;
|
|
237
|
-
}, z.core.$strict>;
|
|
238
|
-
type ProfileSettingsInput = z.input<typeof profileSettingsInputSchema>;
|
|
239
|
-
/** An operator's change to a member's profile. Every action is audited with its reason. */
|
|
240
|
-
declare const profileModerationSchema: z.ZodObject<{
|
|
241
|
-
actionId: z.ZodString;
|
|
242
|
-
resetName: z.ZodDefault<z.ZodBoolean>;
|
|
243
|
-
removeAvatar: z.ZodDefault<z.ZodBoolean>;
|
|
244
|
-
lock: z.ZodOptional<z.ZodBoolean>;
|
|
245
|
-
reason: z.ZodString;
|
|
246
|
-
}, z.core.$strict>;
|
|
247
|
-
type ProfileModeration = z.input<typeof profileModerationSchema>;
|
|
248
|
-
/** A member's profile as operators see it: always, whatever the settings. */
|
|
249
|
-
declare const managedProfileSchema: z.ZodObject<{
|
|
250
|
-
name: z.ZodString;
|
|
251
|
-
id: z.ZodString;
|
|
252
|
-
displayName: z.ZodNullable<z.ZodString>;
|
|
253
|
-
hidden: z.ZodBoolean;
|
|
254
|
-
visibility: z.ZodEnum<{
|
|
255
|
-
public: "public";
|
|
256
|
-
private: "private";
|
|
257
|
-
participants: "participants";
|
|
258
|
-
}>;
|
|
259
|
-
locked: z.ZodBoolean;
|
|
260
|
-
avatar: z.ZodDiscriminatedUnion<[z.ZodObject<{
|
|
261
|
-
source: z.ZodLiteral<"upload">;
|
|
262
|
-
url: z.ZodString;
|
|
263
|
-
seed: z.ZodString;
|
|
264
|
-
}, z.core.$strip>, z.ZodObject<{
|
|
265
|
-
source: z.ZodLiteral<"account">;
|
|
266
|
-
provider: z.ZodEnum<{
|
|
267
|
-
discord: "discord";
|
|
268
|
-
google: "google";
|
|
269
|
-
x: "x";
|
|
270
|
-
}>;
|
|
271
|
-
url: z.ZodString;
|
|
272
|
-
seed: z.ZodString;
|
|
273
|
-
}, z.core.$strip>, z.ZodObject<{
|
|
274
|
-
source: z.ZodLiteral<"generated">;
|
|
275
|
-
seed: z.ZodString;
|
|
276
|
-
}, z.core.$strip>], "source">;
|
|
277
|
-
avatarChoice: z.ZodEnum<{
|
|
278
|
-
default: "default";
|
|
279
|
-
account: "account";
|
|
280
|
-
upload: "upload";
|
|
281
|
-
generated: "generated";
|
|
282
|
-
}>;
|
|
283
|
-
avatarProvider: z.ZodNullable<z.ZodEnum<{
|
|
284
|
-
discord: "discord";
|
|
285
|
-
google: "google";
|
|
286
|
-
x: "x";
|
|
287
|
-
}>>;
|
|
288
|
-
member: z.ZodString;
|
|
289
|
-
lockedAt: z.ZodNullable<z.ZodNumber>;
|
|
290
|
-
lockedBy: z.ZodNullable<z.ZodString>;
|
|
291
|
-
lockedReason: z.ZodNullable<z.ZodString>;
|
|
292
|
-
updatedAt: z.ZodNumber;
|
|
293
|
-
}, z.core.$strip>;
|
|
294
|
-
type ManagedProfile = z.infer<typeof managedProfileSchema>;
|
|
295
|
-
/** The largest avatar upload, and the types an upload can have. */
|
|
296
|
-
declare const AVATAR_UPLOAD_LIMIT: number;
|
|
297
|
-
declare const avatarUploadTypes: string[];
|
|
298
|
-
|
|
299
3
|
declare const solanaAddressSchema: z.ZodString;
|
|
300
4
|
/** A wallet's chain family: its CAIP-2 namespace. */
|
|
301
5
|
declare const walletChainSchema: z.ZodEnum<{
|
|
@@ -390,6 +94,51 @@ type EvmChainId = `eip155:${number}`;
|
|
|
390
94
|
declare function isEvmChainId(value: string): value is EvmChainId;
|
|
391
95
|
/** {@link isEvmChainId} as a schema. */
|
|
392
96
|
declare const evmChainIdSchema: z.ZodCustom<`eip155:${number}`, `eip155:${number}`>;
|
|
97
|
+
/** The SPL Memo program (v2), whose instruction fails unless every account it lists signed. */
|
|
98
|
+
declare const solanaMemoProgram = "MemoSq4gqABAXKb96qnH8TysNcWxMyWCqXgDLGmfcHr";
|
|
99
|
+
/** A Solana transaction signature: base58, 64 bytes. */
|
|
100
|
+
declare const solanaSignatureSchema: z.ZodString;
|
|
101
|
+
/**
|
|
102
|
+
* What a Solana account that cannot sign messages, such as a Squads vault, puts on chain to prove
|
|
103
|
+
* it is the member's: a transaction it executes with an SPL Memo instruction carrying `memo` and
|
|
104
|
+
* listing the account. Not strict: newer servers may add fields.
|
|
105
|
+
*
|
|
106
|
+
* @experimental A minor release can change linking by transaction.
|
|
107
|
+
*/
|
|
108
|
+
declare const walletTransactionChallengeSchema: z.ZodObject<{
|
|
109
|
+
id: z.ZodString;
|
|
110
|
+
chain: z.ZodEnum<{
|
|
111
|
+
solana: "solana";
|
|
112
|
+
eip155: "eip155";
|
|
113
|
+
cosmos: "cosmos";
|
|
114
|
+
}>;
|
|
115
|
+
address: z.ZodString;
|
|
116
|
+
memo: z.ZodString;
|
|
117
|
+
memoProgram: z.ZodString;
|
|
118
|
+
expiresAt: z.ZodNumber;
|
|
119
|
+
}, z.core.$strip>;
|
|
120
|
+
/** @experimental */
|
|
121
|
+
type WalletTransactionChallenge = z.infer<typeof walletTransactionChallengeSchema>;
|
|
122
|
+
/**
|
|
123
|
+
* The transaction that carries a challenge's memo, for the account it proves.
|
|
124
|
+
*
|
|
125
|
+
* @experimental A minor release can change linking by transaction.
|
|
126
|
+
*/
|
|
127
|
+
declare const walletTransactionProofSchema: z.ZodObject<{
|
|
128
|
+
chain: z.ZodLiteral<"solana">;
|
|
129
|
+
address: z.ZodString;
|
|
130
|
+
signature: z.ZodString;
|
|
131
|
+
}, z.core.$strict>;
|
|
132
|
+
/** @experimental */
|
|
133
|
+
type WalletTransactionProof = z.infer<typeof walletTransactionProofSchema>;
|
|
134
|
+
/**
|
|
135
|
+
* How a wallet proved it is the member's, when not by signing a message.
|
|
136
|
+
*
|
|
137
|
+
* @compat open
|
|
138
|
+
*/
|
|
139
|
+
type KnownWalletProofKind = "transaction";
|
|
140
|
+
/** A known proof kind, or one a newer Relay sends. */
|
|
141
|
+
type WalletProofKind = KnownWalletProofKind | (string & {});
|
|
393
142
|
declare const linkedWalletSchema: z.ZodObject<{
|
|
394
143
|
chain: z.ZodEnum<{
|
|
395
144
|
solana: "solana";
|
|
@@ -399,6 +148,8 @@ declare const linkedWalletSchema: z.ZodObject<{
|
|
|
399
148
|
network: z.ZodNullable<z.ZodCustom<`cosmos:${string}`, `cosmos:${string}`>>;
|
|
400
149
|
address: z.ZodString;
|
|
401
150
|
provedOn: z.ZodOptional<z.ZodCustom<`eip155:${number}`, `eip155:${number}`>>;
|
|
151
|
+
provedBy: z.ZodOptional<z.ZodType<WalletProofKind, unknown, z.core.$ZodTypeInternals<WalletProofKind, unknown>>>;
|
|
152
|
+
proofTransaction: z.ZodOptional<z.ZodString>;
|
|
402
153
|
verifiedAt: z.ZodNumber;
|
|
403
154
|
revision: z.ZodNumber;
|
|
404
155
|
signIn: z.ZodBoolean;
|
|
@@ -551,19 +302,69 @@ declare const walletBalanceSampleSchema: z.ZodObject<{
|
|
|
551
302
|
type WalletBalanceSample = z.infer<typeof walletBalanceSampleSchema>;
|
|
552
303
|
/** What `wallet.balances()` samples: a `ctx.wallet.balance()` query without an address. */
|
|
553
304
|
type WalletBalanceSourceQuery = WalletBalanceQuery extends infer Query ? Query extends unknown ? Omit<Query, "address"> : never : never;
|
|
305
|
+
|
|
306
|
+
/**
|
|
307
|
+
* One finalized, successful Solana transaction of a member's linked wallet that called the
|
|
308
|
+
* tracker's program, as Relay recorded it for a `wallet.programActivity()` tracker: the record's
|
|
309
|
+
* `data`. The record's ID is the signature, its author the wallet's CAIP-10 account on the
|
|
310
|
+
* tracker's cluster, and its `occurredAt` the block time.
|
|
311
|
+
*
|
|
312
|
+
* @compat output
|
|
313
|
+
*/
|
|
314
|
+
declare const walletProgramActivitySchema: z.ZodObject<{
|
|
315
|
+
signature: z.ZodString;
|
|
316
|
+
slot: z.ZodString;
|
|
317
|
+
timestamp: z.ZodNumber;
|
|
318
|
+
signer: z.ZodBoolean;
|
|
319
|
+
instruction: z.ZodNullable<z.ZodString>;
|
|
320
|
+
amount: z.ZodNullable<z.ZodString>;
|
|
321
|
+
delta: z.ZodNullable<z.ZodString>;
|
|
322
|
+
}, z.core.$strip>;
|
|
323
|
+
/** One transaction a `wallet.programActivity()` tracker recorded: its records' `data`. */
|
|
324
|
+
type WalletProgramActivity = z.infer<typeof walletProgramActivitySchema>;
|
|
325
|
+
/** What `wallet.programActivity()` records. */
|
|
326
|
+
type WalletProgramActivitySourceQuery = {
|
|
327
|
+
/**
|
|
328
|
+
* The cluster: `"solana"` or {@link solanaMainnet} for mainnet (the default), {@link solanaDevnet}
|
|
329
|
+
* for devnet.
|
|
330
|
+
*/
|
|
331
|
+
chain?: "solana" | SolanaNetwork;
|
|
332
|
+
/** The program's address (base58). */
|
|
333
|
+
program: string;
|
|
334
|
+
/**
|
|
335
|
+
* Count only transactions that call this instruction of the program, by the name its IDL
|
|
336
|
+
* gives it. The program must publish an IDL Relay can read, as for `settings.solanaProgram()`.
|
|
337
|
+
*/
|
|
338
|
+
instruction?: string;
|
|
339
|
+
/** Count only transactions that change the wallet's balance of this SPL mint (base58). */
|
|
340
|
+
mint?: string;
|
|
341
|
+
/**
|
|
342
|
+
* With `mint`: count only transactions that move at least this many base units of it in or out of
|
|
343
|
+
* the wallet, as a decimal integer string.
|
|
344
|
+
*/
|
|
345
|
+
minAmount?: string;
|
|
346
|
+
/**
|
|
347
|
+
* `"wallet"` (the default) counts only transactions the wallet signed. `"any"` also counts ones
|
|
348
|
+
* someone else signed that name the wallet, such as a transfer into it.
|
|
349
|
+
*/
|
|
350
|
+
signer?: "wallet" | "any";
|
|
351
|
+
};
|
|
554
352
|
/**
|
|
555
353
|
* An NFT standard `ctx.wallet.nfts()` reads: an ERC-721 or ERC-1155 contract on an EVM chain, or a
|
|
556
|
-
*
|
|
354
|
+
* collection on Solana mainnet or devnet: a Metaplex Core collection, a Token Metadata verified
|
|
355
|
+
* collection or a Token-2022 token group, all named `metaplex`.
|
|
557
356
|
*/
|
|
558
357
|
type NftStandard = "erc721" | "erc1155" | "metaplex";
|
|
559
358
|
/**
|
|
560
359
|
* An NFT collection as a CAIP-19 asset type. On an EVM chain: the chain, the contract's standard
|
|
561
360
|
* and its address, such as `"eip155:1/erc721:0xBC4CA0EdA7647A8aB7C2061c2E118A18a936f13D"`; an
|
|
562
361
|
* ERC-1155 collection names one token ID after the contract: `"eip155:8453/erc1155:0x…/1"`. On
|
|
563
|
-
* Solana: the cluster and the Metaplex collection
|
|
564
|
-
*
|
|
565
|
-
* `"solana:
|
|
566
|
-
*
|
|
362
|
+
* Solana: the cluster and the address of a Metaplex Core collection, of a Token Metadata
|
|
363
|
+
* collection NFT's mint or of a Token-2022 token group's mint, such as
|
|
364
|
+
* `"solana:5eykt4UsFv8P8NJdTREpY1vzqKqZKvdp/nft:<address>"` on mainnet or
|
|
365
|
+
* `"solana:EtWTRABZaYq6iMfeYKouRu166VU2xqa1/nft:<address>"` on devnet, which stands for every Core
|
|
366
|
+
* asset in that collection, every NFT whose metadata names it as verified, or every supply-1 mint
|
|
367
|
+
* whose `tokenGroupMember` extension names the group.
|
|
567
368
|
*/
|
|
568
369
|
type NftCollection = `${EvmChainId}/erc721:0x${string}` | `${EvmChainId}/erc1155:0x${string}/${string}` | `${SolanaNetwork}/nft:${string}`;
|
|
569
370
|
/** The parts of an NFT collection ({@link parseNftCollection}). */
|
|
@@ -575,7 +376,7 @@ type NftCollectionParts = {
|
|
|
575
376
|
} | {
|
|
576
377
|
chain: SolanaNetwork;
|
|
577
378
|
standard: "metaplex";
|
|
578
|
-
/** The
|
|
379
|
+
/** The Core collection's address, the collection NFT's mint or the token group's mint (base58). */
|
|
579
380
|
mint: string;
|
|
580
381
|
};
|
|
581
382
|
/**
|
|
@@ -594,6 +395,10 @@ type WalletNftsQuery = {
|
|
|
594
395
|
/** One of the member's linked wallets of the collection's family; omit to read all of them. */
|
|
595
396
|
address?: string;
|
|
596
397
|
};
|
|
398
|
+
/** @compat open */
|
|
399
|
+
type KnownSolanaCollectionKind = "core" | "token-metadata" | "token-group";
|
|
400
|
+
/** Which kind of Solana collection an NFT read matched: a known kind, or one a newer Relay sends. */
|
|
401
|
+
type SolanaCollectionKind = KnownSolanaCollectionKind | (string & {});
|
|
597
402
|
/** The NFTs of one collection the member's pinned linked wallets hold. */
|
|
598
403
|
declare const walletNftsSchema: z.ZodObject<{
|
|
599
404
|
collection: z.ZodString;
|
|
@@ -603,6 +408,7 @@ declare const walletNftsSchema: z.ZodObject<{
|
|
|
603
408
|
erc1155: "erc1155";
|
|
604
409
|
metaplex: "metaplex";
|
|
605
410
|
}>;
|
|
411
|
+
kind: z.ZodOptional<z.ZodType<SolanaCollectionKind, unknown, z.core.$ZodTypeInternals<SolanaCollectionKind, unknown>>>;
|
|
606
412
|
total: z.ZodString;
|
|
607
413
|
wallets: z.ZodArray<z.ZodObject<{
|
|
608
414
|
address: z.ZodString;
|
|
@@ -618,6 +424,22 @@ declare const walletNftsSchema: z.ZodObject<{
|
|
|
618
424
|
observedAt: z.ZodNumber;
|
|
619
425
|
}, z.core.$strict>;
|
|
620
426
|
type WalletNfts = z.infer<typeof walletNftsSchema>;
|
|
427
|
+
|
|
428
|
+
/**
|
|
429
|
+
* One wallet's holding as Relay sampled it for a `wallet.nfts()` tracker, the record's `data`. The
|
|
430
|
+
* record's ID and author are the wallet's CAIP-10 account on the collection's chain, and its
|
|
431
|
+
* `occurredAt` is when Relay sampled it.
|
|
432
|
+
*
|
|
433
|
+
* @compat output
|
|
434
|
+
*/
|
|
435
|
+
declare const walletNftSampleSchema: z.ZodObject<{
|
|
436
|
+
count: z.ZodString;
|
|
437
|
+
block: z.ZodString;
|
|
438
|
+
}, z.core.$strip>;
|
|
439
|
+
/** One wallet's sampled NFT holding, the `data` of a `wallet.nfts()` tracker's record. */
|
|
440
|
+
type WalletNftSample = z.infer<typeof walletNftSampleSchema>;
|
|
441
|
+
/** What `wallet.nfts()` samples: a `ctx.wallet.nfts()` query without an address. */
|
|
442
|
+
type WalletNftSourceQuery = Omit<WalletNftsQuery, "address">;
|
|
621
443
|
/** The ABI types a contract call's single return value may have. */
|
|
622
444
|
type ContractCallReturnType = `uint${number}` | `int${number}` | "bool" | "address";
|
|
623
445
|
/** A view or pure function's signature, parsed ({@link parseContractFunction}). */
|
|
@@ -853,7 +675,7 @@ type SolanaProgram = string;
|
|
|
853
675
|
*/
|
|
854
676
|
declare function isSolanaProgram(value: string): value is SolanaProgram;
|
|
855
677
|
/**
|
|
856
|
-
* A Solana program's Anchor
|
|
678
|
+
* A Solana program's IDL as JSON: Anchor (legacy or 0.30+), Codama or Shank. Relay checks its instructions when it is
|
|
857
679
|
* pasted or fetched.
|
|
858
680
|
*/
|
|
859
681
|
declare const anchorIdlSchema: z.ZodRecord<z.ZodString, z.ZodJSONSchema>;
|
|
@@ -863,7 +685,7 @@ type KnownSolanaIdlSource = "chain" | "pasted";
|
|
|
863
685
|
/** A known IDL source, or one a newer Relay sends. */
|
|
864
686
|
type SolanaIdlSource = KnownSolanaIdlSource | (string & {});
|
|
865
687
|
/**
|
|
866
|
-
* The
|
|
688
|
+
* The IDL a `settings.solanaProgram()` setting decodes instructions with: fetched from the
|
|
867
689
|
* program's on-chain IDL when the setting was saved (`"chain"`), or pasted by an operator, which
|
|
868
690
|
* takes precedence over the on-chain one (`"pasted"`).
|
|
869
691
|
*/
|
|
@@ -950,8 +772,189 @@ declare const walletTransactionsSchema: z.ZodObject<{
|
|
|
950
772
|
type WalletTransactions = z.infer<typeof walletTransactionsSchema>;
|
|
951
773
|
/** One transaction `ctx.wallet.transactions()` returns. */
|
|
952
774
|
type WalletTransaction = WalletTransactions["transactions"][number];
|
|
953
|
-
/** One program instruction of a transaction, decoded with the program's
|
|
775
|
+
/** One program instruction of a transaction, decoded with the program's IDL. */
|
|
954
776
|
type WalletInstruction = NonNullable<WalletTransaction["instructions"]>[number];
|
|
777
|
+
/**
|
|
778
|
+
* Transactions to read as a testing-kit `facts.wallet.transactions` answer
|
|
779
|
+
* (`management.solana.transactionFixture()`).
|
|
780
|
+
*/
|
|
781
|
+
declare const solanaTransactionFixtureInputSchema: z.ZodObject<{
|
|
782
|
+
chain: z.ZodDefault<z.ZodEnum<{
|
|
783
|
+
"solana:5eykt4UsFv8P8NJdTREpY1vzqKqZKvdp": "solana:5eykt4UsFv8P8NJdTREpY1vzqKqZKvdp";
|
|
784
|
+
"solana:EtWTRABZaYq6iMfeYKouRu166VU2xqa1": "solana:EtWTRABZaYq6iMfeYKouRu166VU2xqa1";
|
|
785
|
+
}>>;
|
|
786
|
+
program: z.ZodString;
|
|
787
|
+
signatures: z.ZodArray<z.ZodString>;
|
|
788
|
+
wallet: z.ZodOptional<z.ZodString>;
|
|
789
|
+
idl: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodJSONSchema>>;
|
|
790
|
+
}, z.core.$strict>;
|
|
791
|
+
/** What `management.solana.transactionFixture()` reads. */
|
|
792
|
+
type SolanaTransactionFixtureInput = z.input<typeof solanaTransactionFixtureInputSchema>;
|
|
793
|
+
/** The integer types a program-account seed can have, written little-endian as Rust's `to_le_bytes()`. */
|
|
794
|
+
type SolanaSeedInteger = "u8" | "u16" | "u32" | "u64" | "u128" | "i8" | "i16" | "i32" | "i64" | "i128";
|
|
795
|
+
/**
|
|
796
|
+
* One seed of a program-derived address: `{ wallet: true }` for each linked wallet's address, a
|
|
797
|
+
* string for its UTF-8 bytes, `{ pubkey }` for an address's 32 bytes, or an integer as
|
|
798
|
+
* `{ u64: value }` (any {@link SolanaSeedInteger}), its value a safe integer number or a decimal
|
|
799
|
+
* string. Seeds other than the wallet come from code or settings, never from member input.
|
|
800
|
+
*/
|
|
801
|
+
type SolanaSeed = {
|
|
802
|
+
wallet: true;
|
|
803
|
+
} | string | {
|
|
804
|
+
pubkey: string;
|
|
805
|
+
} | {
|
|
806
|
+
[K in SolanaSeedInteger]: {
|
|
807
|
+
[P in K]: number | string;
|
|
808
|
+
};
|
|
809
|
+
}[SolanaSeedInteger];
|
|
810
|
+
/** A program-account seed as the sandbox sends it. Syntax only: Relay checks lengths and ranges. */
|
|
811
|
+
declare const solanaSeedSchema: z.ZodType<SolanaSeed>;
|
|
812
|
+
/** The most seeds a program-derived address takes besides its bump, as Solana allows. */
|
|
813
|
+
declare const maxSolanaSeeds = 15;
|
|
814
|
+
/** What `ctx.wallet.programAccount()` reads. */
|
|
815
|
+
type WalletProgramAccountQuery = {
|
|
816
|
+
/** The program, from a `settings.solanaProgram()` setting whose IDL Relay stored. */
|
|
817
|
+
program: SolanaProgram;
|
|
818
|
+
/** The account type, as the program's IDL names it in `accounts`, such as `"UserStake"`. */
|
|
819
|
+
account: string;
|
|
820
|
+
/**
|
|
821
|
+
* The seeds the program derives each member's account from, in order, such as
|
|
822
|
+
* `["stake", { wallet: true }]`. `{ wallet: true }` must appear at least once.
|
|
823
|
+
*/
|
|
824
|
+
seeds: SolanaSeed[];
|
|
825
|
+
/**
|
|
826
|
+
* The cluster to read: `"solana"` or {@link solanaMainnet} for mainnet (the default),
|
|
827
|
+
* {@link solanaDevnet} for devnet.
|
|
828
|
+
*/
|
|
829
|
+
chain?: "solana" | SolanaNetwork;
|
|
830
|
+
/** One of the member's linked Solana wallets; omit to read all of them. */
|
|
831
|
+
address?: string;
|
|
832
|
+
};
|
|
833
|
+
/** @compat open */
|
|
834
|
+
type KnownProgramAccountPointKind = "slot";
|
|
835
|
+
/** What a program-account read's `at` counts: a known kind, or one a newer Relay sends. */
|
|
836
|
+
type ProgramAccountPointKind = KnownProgramAccountPointKind | (string & {});
|
|
837
|
+
/**
|
|
838
|
+
* One account type of a Solana program, read at the address each of the member's pinned linked
|
|
839
|
+
* Solana wallets derives, and decoded with the program's IDL.
|
|
840
|
+
*/
|
|
841
|
+
declare const walletProgramAccountSchema: z.ZodObject<{
|
|
842
|
+
program: z.ZodString;
|
|
843
|
+
chain: z.ZodString;
|
|
844
|
+
account: z.ZodString;
|
|
845
|
+
wallets: z.ZodArray<z.ZodObject<{
|
|
846
|
+
address: z.ZodString;
|
|
847
|
+
pda: z.ZodString;
|
|
848
|
+
fields: z.ZodNullable<z.ZodRecord<z.ZodString, z.ZodJSONSchema>>;
|
|
849
|
+
}, z.core.$strip>>;
|
|
850
|
+
at: z.ZodObject<{
|
|
851
|
+
kind: z.ZodType<ProgramAccountPointKind>;
|
|
852
|
+
number: z.ZodString;
|
|
853
|
+
}, z.core.$strip>;
|
|
854
|
+
observedAt: z.ZodNumber;
|
|
855
|
+
}, z.core.$strip>;
|
|
856
|
+
/** What `ctx.wallet.programAccount()` returns: each linked wallet's account, decoded. */
|
|
857
|
+
type WalletProgramAccount = z.infer<typeof walletProgramAccountSchema>;
|
|
858
|
+
/** What `ctx.wallet.stake()` reads. */
|
|
859
|
+
type WalletStakeQuery = {
|
|
860
|
+
/**
|
|
861
|
+
* The cluster to read: `"solana"` or {@link solanaMainnet} for mainnet (the default),
|
|
862
|
+
* {@link solanaDevnet} for devnet.
|
|
863
|
+
*/
|
|
864
|
+
chain?: "solana" | SolanaNetwork;
|
|
865
|
+
/** A validator's vote account (base58); omit to count every validator. */
|
|
866
|
+
voteAccount?: string;
|
|
867
|
+
/** One of the member's linked Solana wallets; omit to read all of them. */
|
|
868
|
+
address?: string;
|
|
869
|
+
};
|
|
870
|
+
/** @compat open */
|
|
871
|
+
type KnownStakePointKind = "slot";
|
|
872
|
+
/** What a stake read's `at` counts: a known kind, or one a newer Relay sends. */
|
|
873
|
+
type StakePointKind = KnownStakePointKind | (string & {});
|
|
874
|
+
/**
|
|
875
|
+
* The SOL the member's pinned linked Solana wallets delegate through stake accounts they control,
|
|
876
|
+
* as staker or withdrawer, at one epoch. Amounts are lamports.
|
|
877
|
+
*/
|
|
878
|
+
declare const walletStakeSchema: z.ZodObject<{
|
|
879
|
+
chain: z.ZodString;
|
|
880
|
+
voteAccount: z.ZodNullable<z.ZodString>;
|
|
881
|
+
epoch: z.ZodNumber;
|
|
882
|
+
total: z.ZodString;
|
|
883
|
+
activating: z.ZodString;
|
|
884
|
+
deactivating: z.ZodString;
|
|
885
|
+
wallets: z.ZodArray<z.ZodObject<{
|
|
886
|
+
amount: z.ZodString;
|
|
887
|
+
activating: z.ZodString;
|
|
888
|
+
deactivating: z.ZodString;
|
|
889
|
+
address: z.ZodString;
|
|
890
|
+
}, z.core.$strip>>;
|
|
891
|
+
voteAccounts: z.ZodArray<z.ZodObject<{
|
|
892
|
+
amount: z.ZodString;
|
|
893
|
+
activating: z.ZodString;
|
|
894
|
+
deactivating: z.ZodString;
|
|
895
|
+
voteAccount: z.ZodString;
|
|
896
|
+
}, z.core.$strip>>;
|
|
897
|
+
at: z.ZodObject<{
|
|
898
|
+
kind: z.ZodType<StakePointKind>;
|
|
899
|
+
number: z.ZodString;
|
|
900
|
+
}, z.core.$strip>;
|
|
901
|
+
observedAt: z.ZodNumber;
|
|
902
|
+
}, z.core.$strip>;
|
|
903
|
+
/** What `ctx.wallet.stake()` returns: the SOL the member's linked wallets delegate. */
|
|
904
|
+
type WalletStake = z.infer<typeof walletStakeSchema>;
|
|
905
|
+
|
|
906
|
+
/**
|
|
907
|
+
* One wallet's stake as Relay sampled it for a `wallet.stake()` tracker, the record's `data`, in
|
|
908
|
+
* lamports, counted as `ctx.wallet.stake({ address })` counts that wallet's. The record's ID and
|
|
909
|
+
* author are the wallet's CAIP-10 account on the tracker's cluster, and its `occurredAt` is when
|
|
910
|
+
* Relay sampled it.
|
|
911
|
+
*
|
|
912
|
+
* @compat output
|
|
913
|
+
*/
|
|
914
|
+
declare const walletStakeSampleSchema: z.ZodObject<{
|
|
915
|
+
amount: z.ZodString;
|
|
916
|
+
activating: z.ZodString;
|
|
917
|
+
deactivating: z.ZodString;
|
|
918
|
+
block: z.ZodString;
|
|
919
|
+
}, z.core.$strip>;
|
|
920
|
+
/** One wallet's sampled stake, the `data` of a `wallet.stake()` tracker's record. */
|
|
921
|
+
type WalletStakeSample = z.infer<typeof walletStakeSampleSchema>;
|
|
922
|
+
/** What `wallet.stake()` samples: a `ctx.wallet.stake()` query without an address. */
|
|
923
|
+
type WalletStakeSourceQuery = Omit<WalletStakeQuery, "address">;
|
|
924
|
+
|
|
925
|
+
/**
|
|
926
|
+
* One wallet's program account as Relay sampled it for a `wallet.programAccounts()` tracker, the
|
|
927
|
+
* record's `data`: the tracker's integer field, read as `ctx.wallet.programAccount({ address })`
|
|
928
|
+
* reads that wallet's account. The record's ID and author are the wallet's CAIP-10 account on the
|
|
929
|
+
* tracker's cluster, and its `occurredAt` is when Relay sampled it.
|
|
930
|
+
*
|
|
931
|
+
* @compat output
|
|
932
|
+
*/
|
|
933
|
+
declare const walletProgramAccountSampleSchema: z.ZodObject<{
|
|
934
|
+
amount: z.ZodNullable<z.ZodString>;
|
|
935
|
+
pda: z.ZodString;
|
|
936
|
+
block: z.ZodString;
|
|
937
|
+
}, z.core.$strip>;
|
|
938
|
+
/** One wallet's sampled field, the `data` of a `wallet.programAccounts()` tracker's record. */
|
|
939
|
+
type WalletProgramAccountSample = z.infer<typeof walletProgramAccountSampleSchema>;
|
|
940
|
+
/**
|
|
941
|
+
* What `wallet.programAccounts()` samples: a `ctx.wallet.programAccount()` query without an
|
|
942
|
+
* address, with the integer field to sample and, for a program that publishes no IDL Relay can
|
|
943
|
+
* read, the IDL to decode it with.
|
|
944
|
+
*/
|
|
945
|
+
type WalletProgramAccountSourceQuery = Omit<WalletProgramAccountQuery, "address"> & {
|
|
946
|
+
/**
|
|
947
|
+
* The account's integer field to sample (`u8` to `u128`, `i8` to `i128`), as the IDL names
|
|
948
|
+
* it, such as `"amount"`.
|
|
949
|
+
*/
|
|
950
|
+
field: string;
|
|
951
|
+
/**
|
|
952
|
+
* The program's IDL (Anchor, Codama or Shank), for a program that publishes none on chain or
|
|
953
|
+
* to use another. Left out, Relay stores the IDL the program publishes when the tracker is
|
|
954
|
+
* published.
|
|
955
|
+
*/
|
|
956
|
+
idl?: AnchorIdl;
|
|
957
|
+
};
|
|
955
958
|
/**
|
|
956
959
|
* Reads the wallets the member has linked to this project. They are pinned once per attempt, at
|
|
957
960
|
* its first wallet read: later links and unlinks do not change the attempt. Every method resolves
|
|
@@ -972,8 +975,10 @@ interface WalletReader {
|
|
|
972
975
|
/**
|
|
973
976
|
* How many NFTs of one collection the member's linked wallets of its family hold: an ERC-721
|
|
974
977
|
* contract's `balanceOf(owner)`, one ERC-1155 token ID's `balanceOf(owner, id)`, or on Solana the
|
|
975
|
-
*
|
|
976
|
-
*
|
|
978
|
+
* Metaplex Core assets in the collection or the NFTs whose Metaplex metadata names it as
|
|
979
|
+
* verified, plus the compressed NFTs (Bubblegum) verified into it, or the supply-1 Token-2022
|
|
980
|
+
* mints whose `tokenGroupMember` extension names a token group, summed and per wallet. Null when the
|
|
981
|
+
* member has no linked wallet of that family. A malformed collection, a
|
|
977
982
|
* chain Relay does not read and an `address` the member never linked throw `CapabilityError`
|
|
978
983
|
* with code `"author-error"`. Relay supplies it to every evaluation; it is optional only so that
|
|
979
984
|
* test doubles written before it keep compiling.
|
|
@@ -1028,6 +1033,32 @@ interface WalletReader {
|
|
|
1028
1033
|
* evaluation; it is optional only so that test doubles written before it keep compiling.
|
|
1029
1034
|
*/
|
|
1030
1035
|
transactions?(query: WalletTransactionsQuery): Promise<WalletTransactions | null>;
|
|
1036
|
+
/**
|
|
1037
|
+
* One account type of a program, per linked Solana wallet: derives the program-derived
|
|
1038
|
+
* address from `seeds` with `{ wallet: true }` as each wallet's address, reads every account at
|
|
1039
|
+
* one slot, and decodes its fields with the program's IDL. A wallet whose account does
|
|
1040
|
+
* not exist reads `fields: null`. Use it for state a program keeps per user, such as a stake
|
|
1041
|
+
* account. Null when the member has no linked Solana wallet. A malformed program, a program
|
|
1042
|
+
* whose setting has no IDL, an account type the IDL does not name, seeds that do not fit
|
|
1043
|
+
* (no `{ wallet: true }`, a seed over 32 bytes, an integer out of range), a program that is not
|
|
1044
|
+
* executable on the cluster, an account owned by another program or holding another account
|
|
1045
|
+
* type, and an `address` the member never linked throw `CapabilityError` with code
|
|
1046
|
+
* `"author-error"`. Relay supplies it to every evaluation; it is optional only so that test
|
|
1047
|
+
* doubles written before it keep compiling.
|
|
1048
|
+
*/
|
|
1049
|
+
programAccount?(query: WalletProgramAccountQuery): Promise<WalletProgramAccount | null>;
|
|
1050
|
+
/**
|
|
1051
|
+
* The SOL the member's linked Solana wallets delegate through native stake accounts, at one
|
|
1052
|
+
* epoch: every Stake program account where a wallet is the staker or the withdrawer, counted
|
|
1053
|
+
* once. `total` is active stake; stake activating or deactivating this epoch is reported apart,
|
|
1054
|
+
* so a quest can count it or not. Summed, per wallet and per vote account, or only to
|
|
1055
|
+
* `voteAccount`, in lamports. Null when the member has no linked Solana wallet. A malformed vote
|
|
1056
|
+
* account and an `address` the member never linked throw `CapabilityError` with code
|
|
1057
|
+
* `"author-error"`. Relay supplies it to every evaluation; it is optional only so that test
|
|
1058
|
+
* doubles written before it keep compiling.
|
|
1059
|
+
*/
|
|
1060
|
+
stake?(query: WalletStakeQuery): Promise<WalletStake | null>;
|
|
1031
1061
|
}
|
|
1032
1062
|
|
|
1033
|
-
export {
|
|
1063
|
+
export { walletEventsSchema as a$, WALLETS_PER_CHAIN as aF, anchorIdlSchema as aG, caip10 as aH, cosmosAddressSchema as aI, cosmosChain as aJ, evmAddressSchema as aK, evmChainIdSchema as aL, isSolanaNetwork as aM, linkedWalletSchema as aN, maxSolanaSeeds as aO, solanaAddressSchema as aP, solanaMemoProgram as aQ, solanaProgramIdlSchema as aR, solanaSeedSchema as aS, solanaSignatureSchema as aT, solanaTransactionFixtureInputSchema as aU, walletAddressInput as aV, walletBalanceSampleSchema as aW, walletBalanceSchema as aX, walletCallSchema as aY, walletChainSchema as aZ, walletDelegationsSchema as a_, cosmosDenomSchema as ab, cosmosNetworkSchema as ac, isContractCall as ad, isContractEvent as ae, isEvmChainId as af, isNftCollection as ag, isSolanaProgram as ah, maxWalletEventLogs as ai, maxWalletEventLookback as aj, maxWalletTransactionLookback as ak, maxWalletTransactions as al, parseContractCall as am, parseContractEvent as an, parseContractFunction as ao, parseNftCollection as ap, walletAddressInputSchema as aq, walletSignatureSchema as ar, walletTransactionProofSchema as as, evmWalletOn as at, walletMessageChallengeSchema as b0, walletNftsSchema as b1, walletProgramAccountSchema as b2, walletProgramActivitySchema as b3, walletSignInFamilies as b4, walletSignInNetwork as b5, walletSignInNetworkSchema as b6, walletSignInNetworksSchema as b7, walletStakeSchema as b8, walletTransactionChallengeSchema as b9, walletTransactionsSchema as ba, walletUnlinkInputSchema as bb, solanaMainnet as m, solanaDevnet as s };
|
|
1064
|
+
export type { WalletNftSample as $, ContractCallParts as A, ContractCallReturnType as B, CosmosChain as C, ContractEventInput as D, ContractEventParts as E, ContractFunction as F, CosmosDenom as G, EvmChainId as H, NftCollectionParts as I, NftStandard as J, SolanaSeedInteger as K, LinkedWallet as L, WalletBalance as M, NftCollection as N, WalletBalanceChange as O, WalletBalanceSample as P, WalletCall as Q, WalletCallArgument as R, SolanaIdlSource as S, WalletCallQuery as T, WalletDelegations as U, WalletDelegationsQuery as V, WalletAddressInput as W, WalletEventCondition as X, WalletEventValue as Y, WalletEvents as Z, WalletEventsQuery as _, CosmosNetwork as a, WalletNfts as a0, WalletNftsQuery as a1, WalletProgramAccount as a2, WalletProgramAccountQuery as a3, WalletProgramAccountSample as a4, WalletProgramActivity as a5, WalletStake as a6, WalletStakeQuery as a7, WalletStakeSample as a8, WalletTransactions as a9, KnownSolanaIdlSource as aA, KnownStakePointKind as aB, KnownWalletProofKind as aC, SolanaProgramIdl as aD, SolanaTransactionFixtureInput as aE, WalletTransactionsQuery as aa, SolanaCollectionKind as au, ProgramAccountPointKind as av, StakePointKind as aw, AnchorIdl as ax, KnownProgramAccountPointKind as ay, KnownSolanaCollectionKind as az, WalletChain as b, WalletMessageChallenge as c, WalletProofKind as d, WalletSignInNetwork as e, WalletSignature as f, WalletSigner as g, WalletTransactionChallenge as h, WalletTransactionProof as i, WalletUnlinkInput as j, WalletBalanceQuery as k, SolanaNetwork as l, SolanaSeed as n, ContractCall as o, ContractEvent as p, SolanaProgram as q, WalletBalanceSourceQuery as r, WalletProgramActivitySourceQuery as t, WalletNftSourceQuery as u, WalletStakeSourceQuery as v, WalletProgramAccountSourceQuery as w, WalletTransaction as x, WalletInstruction as y, WalletReader as z };
|