@domino-sdk/relay 1.56.0 → 1.59.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 (64) hide show
  1. package/CHANGELOG.md +74 -0
  2. package/dist/{accounts-DRPENuZe.d.ts → accounts-CVonEkdb.d.ts} +18 -7
  3. package/dist/{attempt-captures-CxxO7DeD.d.ts → attempt-captures-DBj-rxak.d.ts} +1 -1
  4. package/dist/authoring.d.ts +180 -28
  5. package/dist/authoring.js +236 -11
  6. package/dist/{automatic-outcomes-DxW_v5Wc.d.ts → automatic-outcomes-FS9okvBP.d.ts} +1 -1
  7. package/dist/avatar.d.ts +1 -2
  8. package/dist/browser.d.ts +8 -9
  9. package/dist/browser.js +10 -10
  10. package/dist/{capability-error-DSd8EMQC.d.ts → capability-error-DDJl0LY-.d.ts} +0 -6
  11. package/dist/{chunk-OTITLABX.js → chunk-2LKGAL63.js} +2 -2
  12. package/dist/{chunk-NK6EER33.js → chunk-577DG2IT.js} +8 -8
  13. package/dist/{chunk-RBPMT53S.js → chunk-6U5WWH3W.js} +19 -4
  14. package/dist/{chunk-BHHUSBSD.js → chunk-AWWCEP7F.js} +1402 -881
  15. package/dist/{chunk-QNQNKIAA.js → chunk-EQF4ID47.js} +1 -1
  16. package/dist/{chunk-CK7HO32Z.js → chunk-IBROKMFV.js} +2 -2
  17. package/dist/{chunk-MNU6UPXY.js → chunk-KBCTII6C.js} +1 -1
  18. package/dist/{chunk-INSWI2VZ.js → chunk-KYUQEZZA.js} +1 -1
  19. package/dist/{chunk-G6XVBYH7.js → chunk-LDLOB2UZ.js} +4 -4
  20. package/dist/{chunk-CXKXPB7K.js → chunk-M2JQPDUX.js} +34 -9
  21. package/dist/{chunk-KBVH4XZC.js → chunk-R4S6BFOH.js} +1 -1
  22. package/dist/{chunk-ABJ4G47X.js → chunk-TZJT5CRF.js} +1 -1
  23. package/dist/{chunk-BJYMTCWG.js → chunk-UEMLYPKJ.js} +7 -4
  24. package/dist/{chunk-ULQU7KC4.js → chunk-W42KMMH5.js} +1 -5
  25. package/dist/{chunk-VSHV7FEA.js → chunk-XGXDINGM.js} +16 -3
  26. package/dist/{chunk-H2MD6E7Z.js → chunk-YMWRLAAP.js} +1 -1
  27. package/dist/{chunk-W5U2WXG3.js → chunk-YRSU2X2P.js} +2 -2
  28. package/dist/{client-bX3oTpRu.d.ts → client-3b9HjSzZ.d.ts} +115 -116
  29. package/dist/{deployments-D3lxfQMB.d.ts → deployments-BydFVj4Q.d.ts} +314 -175
  30. package/dist/{groups-DPE004_V.d.ts → groups-CFuTfFqG.d.ts} +11 -7
  31. package/dist/index.d.ts +9 -10
  32. package/dist/index.js +9 -9
  33. package/dist/{integrations-CcD5NPEA.d.ts → integrations-DrbKQSTD.d.ts} +3 -32
  34. package/dist/internal.d.ts +10 -10
  35. package/dist/internal.js +8 -8
  36. package/dist/{offers-CtzMeB7O.d.ts → offers-DAfe1O3_.d.ts} +6 -2
  37. package/dist/{pages-BlLqB8ZQ.d.ts → pages-ChDVLrgR.d.ts} +39 -10
  38. package/dist/portal-proxy.js +3 -3
  39. package/dist/react/index.d.ts +71 -72
  40. package/dist/react/index.js +10 -10
  41. package/dist/runtime/authoring.js +1 -1
  42. package/dist/runtime/chunks/BG43KQ2T.js +1 -0
  43. package/dist/runtime/chunks/EWU4OKSY.js +62 -0
  44. package/dist/runtime/manifest.json +5 -5
  45. package/dist/runtime/schema.js +1 -1
  46. package/dist/runtime/zod.js +1 -1
  47. package/dist/{schema-C4m9RhCR.d.ts → schema-BA0nRRlt.d.ts} +184 -35
  48. package/dist/schema.d.ts +754 -432
  49. package/dist/schema.js +77 -13
  50. package/dist/server/index.d.ts +10 -10
  51. package/dist/server/index.js +434 -55
  52. package/dist/{submission-input-wTiYGdgA.d.ts → submission-input-DxQ6RnKo.d.ts} +2 -2
  53. package/dist/{telegram-browser-Bh3i0HiH.d.ts → telegram-browser-o3OIxGrJ.d.ts} +3 -3
  54. package/dist/testing.d.ts +89 -9
  55. package/dist/testing.js +215 -10
  56. package/dist/{transport-CnKA-_RL.d.ts → transport-D_Eqf78J.d.ts} +3997 -2030
  57. package/dist/wallet-B06zvDXp.d.ts +972 -0
  58. package/dist/{x-1czZFVUW.d.ts → x-C28SNifw.d.ts} +2 -2
  59. package/package.json +2 -2
  60. package/dist/profiles-BoOK03cR.d.ts +0 -299
  61. package/dist/runtime/chunks/IDOMZWRY.js +0 -40
  62. package/dist/runtime/chunks/NDB42VFF.js +0 -1
  63. package/dist/util.d-w9f9t3ua.d.ts +0 -5
  64. package/dist/wallet-Ac7OFpOr.d.ts +0 -228
@@ -0,0 +1,972 @@
1
+ import * as z from 'zod';
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
+ declare const solanaAddressSchema: z.ZodString;
300
+ /** A wallet's chain family: its CAIP-2 namespace. */
301
+ declare const walletChainSchema: z.ZodEnum<{
302
+ solana: "solana";
303
+ eip155: "eip155";
304
+ cosmos: "cosmos";
305
+ }>;
306
+ type WalletChain = z.infer<typeof walletChainSchema>;
307
+ /**
308
+ * A Cosmos SDK chain's CAIP-2 ID: `cosmos:` and the chain ID, such as `cosmos:cosmoshub-4`. Relay
309
+ * accepts any chain ID in CAIP-2 reference syntax; the app decides which chains it works with.
310
+ */
311
+ type CosmosNetwork = `cosmos:${string}`;
312
+ declare const cosmosNetworkSchema: z.ZodCustom<`cosmos:${string}`, `cosmos:${string}`>;
313
+ /** A Cosmos SDK bank denomination: 3–128 characters in the SDK's canonical denom syntax. */
314
+ type CosmosDenom = string;
315
+ declare const cosmosDenomSchema: z.ZodString;
316
+ /**
317
+ * A Cosmos SDK chain an app works with. Pass `chainInfo` (Keplr's `ChainInfo` shape) for a chain
318
+ * wallets may not know: the adapters suggest it to the wallet (`experimentalSuggestChain`).
319
+ */
320
+ type CosmosChain = {
321
+ /** The chain ID, such as `"cosmoshub-4"`. */
322
+ chainId: string;
323
+ chainInfo?: {
324
+ chainId: string;
325
+ } & Record<string, unknown>;
326
+ };
327
+ /** Reads the chain an app passes, a `CosmosChain` or its CAIP-2 ID, and adds the CAIP-2 ID. */
328
+ declare function cosmosChain(chain: CosmosChain | CosmosNetwork): CosmosChain & {
329
+ network: CosmosNetwork;
330
+ };
331
+ /** The CAIP-2 ID of Solana mainnet (its genesis hash, truncated to 32 characters). */
332
+ declare const solanaMainnet = "solana:5eykt4UsFv8P8NJdTREpY1vzqKqZKvdp";
333
+ declare const evmAddressSchema: z.ZodString;
334
+ /** Bech32 with any prefix, in one case. The server checks the checksum and stores lowercase. */
335
+ declare const cosmosAddressSchema: z.ZodString;
336
+ /** What the wallet says its address is. The server checks the format and canonicalises it (EIP-55, lowercase bech32). */
337
+ declare const walletAddressInputSchema: z.ZodDiscriminatedUnion<[z.ZodObject<{
338
+ chain: z.ZodLiteral<"solana">;
339
+ address: z.ZodString;
340
+ }, z.core.$strict>, z.ZodObject<{
341
+ chain: z.ZodLiteral<"eip155">;
342
+ address: z.ZodString;
343
+ chainId: z.ZodOptional<z.ZodNumber>;
344
+ }, z.core.$strict>, z.ZodObject<{
345
+ chain: z.ZodLiteral<"cosmos">;
346
+ network: z.ZodCustom<`cosmos:${string}`, `cosmos:${string}`>;
347
+ address: z.ZodString;
348
+ }, z.core.$strict>], "chain">;
349
+ type WalletAddressInput = z.input<typeof walletAddressInputSchema>;
350
+ /** Not strict: newer servers may add fields. */
351
+ declare const walletMessageChallengeSchema: z.ZodObject<{
352
+ id: z.ZodString;
353
+ purpose: z.ZodEnum<{
354
+ link: "link";
355
+ "sign-in": "sign-in";
356
+ }>;
357
+ chain: z.ZodEnum<{
358
+ solana: "solana";
359
+ eip155: "eip155";
360
+ cosmos: "cosmos";
361
+ }>;
362
+ network: z.ZodNullable<z.ZodCustom<`cosmos:${string}`, `cosmos:${string}`>>;
363
+ address: z.ZodString;
364
+ message: z.ZodString;
365
+ expiresAt: z.ZodNumber;
366
+ }, z.core.$strip>;
367
+ type WalletMessageChallenge = z.infer<typeof walletMessageChallengeSchema>;
368
+ declare const walletSignatureSchema: z.ZodObject<{
369
+ challenge: z.ZodString;
370
+ signature: z.ZodString;
371
+ publicKey: z.ZodOptional<z.ZodString>;
372
+ }, z.core.$strict>;
373
+ type WalletSignature = z.infer<typeof walletSignatureSchema>;
374
+ declare const linkedWalletSchema: z.ZodObject<{
375
+ chain: z.ZodEnum<{
376
+ solana: "solana";
377
+ eip155: "eip155";
378
+ cosmos: "cosmos";
379
+ }>;
380
+ network: z.ZodNullable<z.ZodCustom<`cosmos:${string}`, `cosmos:${string}`>>;
381
+ address: z.ZodString;
382
+ verifiedAt: z.ZodNumber;
383
+ revision: z.ZodNumber;
384
+ signIn: z.ZodBoolean;
385
+ }, z.core.$strip>;
386
+ type LinkedWallet = z.infer<typeof linkedWalletSchema>;
387
+ declare const walletUnlinkInputSchema: z.ZodObject<{
388
+ chain: z.ZodEnum<{
389
+ solana: "solana";
390
+ eip155: "eip155";
391
+ cosmos: "cosmos";
392
+ }>;
393
+ address: z.ZodString;
394
+ }, z.core.$strict>;
395
+ type WalletUnlinkInput = z.infer<typeof walletUnlinkInputSchema>;
396
+ /**
397
+ * A wallet that can prove control of an address. `@domino-sdk/relay/browser` has adapters for
398
+ * injected EVM, Solana and Keplr-style wallets; tests and servers can implement it directly.
399
+ */
400
+ type WalletSigner = {
401
+ readonly chain: WalletChain;
402
+ /** Required when `chain` is `"cosmos"`: the app's chain, `cosmos:<chain ID>`. */
403
+ readonly network?: CosmosNetwork;
404
+ /** For UI, such as "Phantom". */
405
+ readonly name?: string;
406
+ /** Connect if needed and return the address to challenge. */
407
+ address(): Promise<string>;
408
+ /** EVM only: the wallet's current chain, shown in the message's Chain ID line. */
409
+ chainId?(): Promise<number>;
410
+ /** Sign the exact UTF-8 message and return the encoding `walletSignatureSchema` documents. */
411
+ sign(message: string, address: string): Promise<{
412
+ signature: string;
413
+ publicKey?: string;
414
+ }>;
415
+ };
416
+ /** Builds the challenge input for a signer's address. */
417
+ declare function walletAddressInput(signer: WalletSigner): Promise<WalletAddressInput>;
418
+ /**
419
+ * The most wallets of one chain family a member can have linked to one project at a time. Sign-in
420
+ * wallets do not count: signing in always links the wallet.
421
+ */
422
+ declare const WALLETS_PER_CHAIN = 5;
423
+ /** The wallet families a project can enable for sign-in, in their stored order. */
424
+ declare const walletSignInFamilies: readonly ["solana", "eip155", "cosmos"];
425
+ /**
426
+ * What a project enables wallet sign-in for: a chain family. A Cosmos wallet signs in on any
427
+ * Cosmos SDK chain the app offers. Off unless the project enables it.
428
+ */
429
+ declare const walletSignInNetworkSchema: z.ZodEnum<{
430
+ solana: "solana";
431
+ eip155: "eip155";
432
+ cosmos: "cosmos";
433
+ }>;
434
+ type WalletSignInNetwork = (typeof walletSignInFamilies)[number];
435
+ /** Enabled wallet families, once each, in their stored order. */
436
+ declare const walletSignInNetworksSchema: z.ZodPipe<z.ZodArray<z.ZodEnum<{
437
+ solana: "solana";
438
+ eip155: "eip155";
439
+ cosmos: "cosmos";
440
+ }>>, z.ZodTransform<("solana" | "eip155" | "cosmos")[], ("solana" | "eip155" | "cosmos")[]>>;
441
+ /** The sign-in setting a wallet account falls under: its chain family. */
442
+ declare function walletSignInNetwork(wallet: Pick<LinkedWallet, "chain" | "network">): WalletSignInNetwork;
443
+ /**
444
+ * The CAIP-10 account ID of a wallet on one network. Linked Solana and EVM wallets are
445
+ * chain-agnostic, so pass the network you mean; the defaults are Solana mainnet and Ethereum
446
+ * (`eip155:1`). A Cosmos wallet always uses the network it was linked on.
447
+ */
448
+ declare function caip10(wallet: Pick<LinkedWallet, "chain" | "network" | "address">, network?: string): string;
449
+ /** An EVM chain's CAIP-2 ID: `eip155:` and the chain ID in decimal, such as `"eip155:8453"` (Base). */
450
+ type EvmChainId = `eip155:${number}`;
451
+ /**
452
+ * Whether `value` is an EVM CAIP-2 ID in canonical form (no leading zeros, at most 16 digits).
453
+ * Syntax only: the chains Relay reads balances on are the platform's to list
454
+ * (`management.walletBalanceChains()`).
455
+ */
456
+ declare function isEvmChainId(value: string): value is EvmChainId;
457
+ /** {@link isEvmChainId} as a schema. */
458
+ declare const evmChainIdSchema: z.ZodCustom<`eip155:${number}`, `eip155:${number}`>;
459
+ /** What `ctx.wallet.balance()` reads. Omit `token` for a Solana or EVM native coin. */
460
+ type WalletBalanceQuery = {
461
+ /** Solana mainnet: `"solana"` or its CAIP-2 ID. */
462
+ chain: "solana" | typeof solanaMainnet;
463
+ /** An SPL or Token-2022 mint address (base58). */
464
+ token?: string;
465
+ /** One of the member's linked Solana wallets; omit to read all of them. */
466
+ address?: string;
467
+ } | {
468
+ /**
469
+ * An EVM chain's CAIP-2 ID, such as `"eip155:8453"` for Base. The platform reads the chains
470
+ * `management.walletBalanceChains()` lists, and fails the evaluation on any other.
471
+ */
472
+ chain: EvmChainId;
473
+ /** An ERC-20 contract address. */
474
+ token?: `0x${string}`;
475
+ /** One of the member's linked EVM wallets; omit to read all of them. */
476
+ address?: string;
477
+ } | {
478
+ /** A Cosmos SDK chain's CAIP-2 ID. Relay reads the chains its management API lists. */
479
+ chain: CosmosNetwork;
480
+ /** The bank denomination to read, such as `uatom` or `uosmo`. */
481
+ token: CosmosDenom;
482
+ /** One of the member's wallets linked on this exact Cosmos network; omit to read all. */
483
+ address?: string;
484
+ };
485
+ /** A balance read for the member's pinned linked wallets, in raw integer units. */
486
+ declare const walletBalanceSchema: z.ZodObject<{
487
+ chain: z.ZodString;
488
+ token: z.ZodNullable<z.ZodString>;
489
+ decimals: z.ZodNullable<z.ZodNumber>;
490
+ total: z.ZodString;
491
+ wallets: z.ZodArray<z.ZodObject<{
492
+ address: z.ZodString;
493
+ amount: z.ZodString;
494
+ }, z.core.$strict>>;
495
+ at: z.ZodObject<{
496
+ kind: z.ZodEnum<{
497
+ slot: "slot";
498
+ block: "block";
499
+ }>;
500
+ number: z.ZodString;
501
+ }, z.core.$strict>;
502
+ observedAt: z.ZodNumber;
503
+ }, z.core.$strict>;
504
+ type WalletBalance = z.infer<typeof walletBalanceSchema>;
505
+
506
+ /**
507
+ * One wallet's balance as Relay sampled it for a `wallet.balances()` tracker, the record's `data`.
508
+ * The record's ID and author are the wallet's CAIP-10 account on the sampled chain, and its
509
+ * `occurredAt` is when Relay sampled it.
510
+ *
511
+ * @compat output
512
+ */
513
+ declare const walletBalanceSampleSchema: z.ZodObject<{
514
+ amount: z.ZodString;
515
+ decimals: z.ZodNullable<z.ZodNumber>;
516
+ block: z.ZodString;
517
+ }, z.core.$strip>;
518
+ type WalletBalanceSample = z.infer<typeof walletBalanceSampleSchema>;
519
+ /** What `wallet.balances()` samples: a `ctx.wallet.balance()` query without an address. */
520
+ type WalletBalanceSourceQuery = WalletBalanceQuery extends infer Query ? Query extends unknown ? Omit<Query, "address"> : never : never;
521
+ /**
522
+ * An NFT standard `ctx.wallet.nfts()` reads: an ERC-721 or ERC-1155 contract on an EVM chain, or a
523
+ * Metaplex verified collection on Solana mainnet.
524
+ */
525
+ type NftStandard = "erc721" | "erc1155" | "metaplex";
526
+ /**
527
+ * An NFT collection as a CAIP-19 asset type. On an EVM chain: the chain, the contract's standard
528
+ * and its address, such as `"eip155:1/erc721:0xBC4CA0EdA7647A8aB7C2061c2E118A18a936f13D"`; an
529
+ * ERC-1155 collection names one token ID after the contract: `"eip155:8453/erc1155:0x…/1"`. On
530
+ * Solana mainnet: the Metaplex collection NFT's mint, `"solana:5eykt4UsFv8P8NJdTREpY1vzqKqZKvdp/nft:<mint>"`,
531
+ * which stands for every NFT whose metadata names that collection as verified.
532
+ */
533
+ type NftCollection = `${EvmChainId}/erc721:0x${string}` | `${EvmChainId}/erc1155:0x${string}/${string}` | `${typeof solanaMainnet}/nft:${string}`;
534
+ /** The parts of an NFT collection ({@link parseNftCollection}). */
535
+ type NftCollectionParts = {
536
+ chain: EvmChainId;
537
+ standard: "erc721" | "erc1155";
538
+ contract: `0x${string}`;
539
+ tokenId: string | null;
540
+ } | {
541
+ chain: typeof solanaMainnet;
542
+ standard: "metaplex";
543
+ /** The Metaplex collection NFT's mint (base58). */
544
+ mint: string;
545
+ };
546
+ /**
547
+ * The parts of an NFT collection, or null when `value` is not one: an ERC-721 collection has no
548
+ * token ID, an ERC-1155 one has a token ID that fits in 256 bits, and a Solana collection names a
549
+ * base58 mint. Syntax only: the chains, contracts and mints Relay reads are checked when the
550
+ * collection is set.
551
+ */
552
+ declare function parseNftCollection(value: string): NftCollectionParts | null;
553
+ /** Whether `value` is an NFT collection `ctx.wallet.nfts()` takes ({@link parseNftCollection}). */
554
+ declare function isNftCollection(value: string): value is NftCollection;
555
+ /** What `ctx.wallet.nfts()` reads. */
556
+ type WalletNftsQuery = {
557
+ /** The collection, from a `settings.nft()` setting: never from member input. */
558
+ collection: NftCollection;
559
+ /** One of the member's linked wallets of the collection's family; omit to read all of them. */
560
+ address?: string;
561
+ };
562
+ /** The NFTs of one collection the member's pinned linked wallets hold. */
563
+ declare const walletNftsSchema: z.ZodObject<{
564
+ collection: z.ZodString;
565
+ chain: z.ZodString;
566
+ standard: z.ZodEnum<{
567
+ erc721: "erc721";
568
+ erc1155: "erc1155";
569
+ metaplex: "metaplex";
570
+ }>;
571
+ total: z.ZodString;
572
+ wallets: z.ZodArray<z.ZodObject<{
573
+ address: z.ZodString;
574
+ count: z.ZodString;
575
+ }, z.core.$strict>>;
576
+ at: z.ZodObject<{
577
+ kind: z.ZodEnum<{
578
+ slot: "slot";
579
+ block: "block";
580
+ }>;
581
+ number: z.ZodString;
582
+ }, z.core.$strict>;
583
+ observedAt: z.ZodNumber;
584
+ }, z.core.$strict>;
585
+ type WalletNfts = z.infer<typeof walletNftsSchema>;
586
+ /** The ABI types a contract call's single return value may have. */
587
+ type ContractCallReturnType = `uint${number}` | `int${number}` | "bool" | "address";
588
+ /** A view or pure function's signature, parsed ({@link parseContractFunction}). */
589
+ type ContractFunction = {
590
+ name: string;
591
+ /** Each parameter's canonical ABI type, such as `"address"` or `"uint256"`. */
592
+ inputs: string[];
593
+ /** The return value's canonical ABI type. */
594
+ returns: ContractCallReturnType;
595
+ mutability: "view" | "pure";
596
+ /** The canonical signature, such as `"function stakedOf(address) view returns (uint256)"`. */
597
+ signature: string;
598
+ };
599
+ /**
600
+ * A human-readable ABI signature of a function `ctx.wallet.call()` can read, such as
601
+ * `"function stakedOf(address account) view returns (uint256)"`, or null when it is not one: the
602
+ * function must be `view` or `pure`, take elementary parameters (`address`, `bool`, `string`,
603
+ * `bytes`, `bytesN`, `uintN`, `intN`), and return exactly one `uint`, `int`, `bool` or `address`.
604
+ * Arrays, tuples, structs and several return values are refused.
605
+ */
606
+ declare function parseContractFunction(signature: string): ContractFunction | null;
607
+ /**
608
+ * A contract function on an EVM chain, as a `settings.contractCall()` setting holds it: the
609
+ * contract's CAIP-10 account ID, a space, and the function's human-readable signature, such as
610
+ * `"eip155:8453:0x… function stakedOf(address) view returns (uint256)"`.
611
+ */
612
+ type ContractCall = `${EvmChainId}:0x${string} function ${string}`;
613
+ /** The parts of a contract call ({@link parseContractCall}). */
614
+ type ContractCallParts = {
615
+ chain: EvmChainId;
616
+ contract: `0x${string}`;
617
+ function: ContractFunction;
618
+ };
619
+ /**
620
+ * The parts of a contract call, or null when `value` is not one ({@link parseContractFunction}).
621
+ * Syntax only: the chain is checked when the setting is published or edited.
622
+ */
623
+ declare function parseContractCall(value: string): ContractCallParts | null;
624
+ /** Whether `value` is a contract call `ctx.wallet.call()` takes ({@link parseContractCall}). */
625
+ declare function isContractCall(value: string): value is ContractCall;
626
+ /**
627
+ * One argument of a contract call: a literal or a setting's value, or `{ wallet: true }` for the
628
+ * member's wallet address, read once per linked wallet. Integers may be numbers or decimal strings.
629
+ */
630
+ type WalletCallArgument = {
631
+ wallet: true;
632
+ } | string | number | boolean;
633
+ /** What `ctx.wallet.call()` reads. */
634
+ type WalletCallQuery = {
635
+ /** The contract and function, from a `settings.contractCall()` setting: never from member input. */
636
+ call: ContractCall;
637
+ /**
638
+ * The function's arguments, in order. `{ wallet: true }` may fill at most one `address`
639
+ * parameter; the other values come from settings or code, never from member input.
640
+ */
641
+ args?: WalletCallArgument[];
642
+ /** One of the member's linked EVM wallets; omit to read all of them. */
643
+ address?: string;
644
+ };
645
+ /** A contract view call, once per pinned linked EVM wallet, at one block. */
646
+ declare const walletCallSchema: z.ZodObject<{
647
+ call: z.ZodString;
648
+ chain: z.ZodString;
649
+ contract: z.ZodString;
650
+ returns: z.ZodString;
651
+ total: z.ZodNullable<z.ZodString>;
652
+ wallets: z.ZodArray<z.ZodObject<{
653
+ address: z.ZodString;
654
+ value: z.ZodUnion<readonly [z.ZodString, z.ZodBoolean]>;
655
+ }, z.core.$strict>>;
656
+ at: z.ZodObject<{
657
+ kind: z.ZodEnum<{
658
+ block: "block";
659
+ }>;
660
+ number: z.ZodString;
661
+ }, z.core.$strict>;
662
+ observedAt: z.ZodNumber;
663
+ }, z.core.$strict>;
664
+ type WalletCall = z.infer<typeof walletCallSchema>;
665
+ /** What `ctx.wallet.delegations()` reads. */
666
+ type WalletDelegationsQuery = {
667
+ /** A Cosmos SDK chain's CAIP-2 ID. Relay reads the chains its management API lists. */
668
+ chain: CosmosNetwork;
669
+ /** A validator's operator address (bech32, such as `cosmosvaloper1…`); omit to count every validator. */
670
+ validator?: string;
671
+ /** One of the member's wallets linked on this exact Cosmos network; omit to read all. */
672
+ address?: string;
673
+ };
674
+ /** The member's native staking delegations on one Cosmos SDK chain, at one block. */
675
+ declare const walletDelegationsSchema: z.ZodObject<{
676
+ chain: z.ZodString;
677
+ denom: z.ZodString;
678
+ validator: z.ZodNullable<z.ZodString>;
679
+ total: z.ZodString;
680
+ wallets: z.ZodArray<z.ZodObject<{
681
+ address: z.ZodString;
682
+ amount: z.ZodString;
683
+ }, z.core.$strict>>;
684
+ validators: z.ZodArray<z.ZodObject<{
685
+ validator: z.ZodString;
686
+ amount: z.ZodString;
687
+ }, z.core.$strict>>;
688
+ at: z.ZodObject<{
689
+ kind: z.ZodEnum<{
690
+ block: "block";
691
+ }>;
692
+ number: z.ZodString;
693
+ }, z.core.$strict>;
694
+ observedAt: z.ZodNumber;
695
+ }, z.core.$strict>;
696
+ type WalletDelegations = z.infer<typeof walletDelegationsSchema>;
697
+ /**
698
+ * An EVM contract event a quest checks, as `settings.contractEvent()` holds it: the contract as a
699
+ * CAIP-10 account ID, a space, and the event's Solidity signature with argument names and
700
+ * `indexed` markers, such as
701
+ * `"eip155:8453:0x833589fCD6eDb6E08f4c7C32D4f71b54bdA02913 Transfer(address indexed from, address indexed to, uint256 value)"`.
702
+ * A leading `event` keyword is accepted.
703
+ */
704
+ type ContractEvent = `${EvmChainId}:0x${string} ${string}`;
705
+ /** One argument of a {@link ContractEvent}'s signature. */
706
+ type ContractEventInput = {
707
+ name: string;
708
+ /** The Solidity type in canonical form: `uint` reads as `uint256`, `int` as `int256`. */
709
+ type: string;
710
+ indexed: boolean;
711
+ };
712
+ /** The parts of a {@link ContractEvent} ({@link parseContractEvent}). */
713
+ type ContractEventParts = {
714
+ chain: EvmChainId;
715
+ contract: `0x${string}`;
716
+ /** The event name, such as `"Transfer"`. */
717
+ name: string;
718
+ inputs: ContractEventInput[];
719
+ /** The canonical signature the event's topic hashes: `"Transfer(address,address,uint256)"`. */
720
+ signature: string;
721
+ };
722
+ /**
723
+ * The parts of a contract event, or null when `value` is not one. Every argument is named, names
724
+ * are unique, at most three are `indexed`, and at least one indexed argument is an `address`: the
725
+ * one `ctx.wallet.events()` matches against the member's wallets. Tuples and arrays of arrays are
726
+ * not supported.
727
+ * Syntax only: the chains Relay reads are checked when the event is set.
728
+ */
729
+ declare function parseContractEvent(value: string): ContractEventParts | null;
730
+ /** Whether `value` is a contract event `ctx.wallet.events()` takes ({@link parseContractEvent}). */
731
+ declare function isContractEvent(value: string): value is ContractEvent;
732
+ /**
733
+ * A condition on one event argument: equal to a value (an address in any case, an integer in
734
+ * decimal, a `bool`, or `bytes` in hex), or `{ gte }`, an integer argument at least a decimal value.
735
+ */
736
+ type WalletEventCondition = string | boolean | {
737
+ gte: string;
738
+ };
739
+ /** The most logs one `ctx.wallet.events()` read may match before `where` filters them. */
740
+ declare const maxWalletEventLogs = 1000;
741
+ /** How far before the evaluation `ctx.wallet.events()` may look back: 30 days. */
742
+ declare const maxWalletEventLookback: number;
743
+ /** What `ctx.wallet.events()` reads. */
744
+ type WalletEventsQuery = {
745
+ /** The contract and event, from a `settings.contractEvent()` setting: never from member input. */
746
+ event: ContractEvent;
747
+ /**
748
+ * The name of the event's indexed `address` argument that must be one of the member's linked
749
+ * EVM wallets, such as `"to"` for a `Transfer` the member received.
750
+ */
751
+ account: string;
752
+ /**
753
+ * The earliest block time read, in epoch milliseconds. At most 30 days before the evaluation
754
+ * ({@link maxWalletEventLookback}); an earlier time throws `author-error`.
755
+ */
756
+ since: number;
757
+ /** Also skip events before the quest was first activated in this environment. */
758
+ afterActivation?: boolean;
759
+ /** Conditions on other arguments, by name; every one must hold. */
760
+ where?: Record<string, WalletEventCondition>;
761
+ /** One of the member's linked EVM wallets; omit to read all of them. */
762
+ address?: string;
763
+ };
764
+ /**
765
+ * A decoded event argument: integers in decimal, addresses EIP-55, bytes in lowercase hex, and an
766
+ * array argument as an array of those.
767
+ */
768
+ type WalletEventValue = string | boolean | (string | boolean)[];
769
+ /** The events of one contract the member's pinned linked EVM wallets took part in. */
770
+ declare const walletEventsSchema: z.ZodObject<{
771
+ event: z.ZodString;
772
+ chain: z.ZodString;
773
+ contract: z.ZodString;
774
+ since: z.ZodNumber;
775
+ at: z.ZodObject<{
776
+ kind: z.ZodEnum<{
777
+ block: "block";
778
+ }>;
779
+ number: z.ZodString;
780
+ }, z.core.$strict>;
781
+ finality: z.ZodEnum<{
782
+ finalized: "finalized";
783
+ safe: "safe";
784
+ }>;
785
+ logs: z.ZodArray<z.ZodObject<{
786
+ wallet: z.ZodString;
787
+ block: z.ZodString;
788
+ timestamp: z.ZodNumber;
789
+ tx: z.ZodString;
790
+ logIndex: z.ZodNumber;
791
+ args: z.ZodRecord<z.ZodString, z.ZodUnion<readonly [z.ZodUnion<readonly [z.ZodString, z.ZodBoolean]>, z.ZodArray<z.ZodUnion<readonly [z.ZodString, z.ZodBoolean]>>]>>;
792
+ }, z.core.$strict>>;
793
+ observedAt: z.ZodNumber;
794
+ }, z.core.$strict>;
795
+ type WalletEvents = z.infer<typeof walletEventsSchema>;
796
+ /**
797
+ * A Solana program address on mainnet, as `settings.solanaProgram()` holds it: base58, 32 bytes,
798
+ * such as Jupiter's `"JUP6LkbZbjS1jKKwapdHNy74zcZ3tLUZoi5QNyVTaV4"`.
799
+ */
800
+ type SolanaProgram = string;
801
+ /**
802
+ * Whether `value` is a Solana address `ctx.wallet.transactions()` takes as its program: base58 of
803
+ * 32 to 44 characters. Syntax only: Relay checks that the account is an executable program when
804
+ * the setting is saved and when it reads.
805
+ */
806
+ declare function isSolanaProgram(value: string): value is SolanaProgram;
807
+ /**
808
+ * A Solana program's Anchor IDL, legacy or 0.30+, as JSON. Relay checks its instructions when it is
809
+ * pasted or fetched.
810
+ */
811
+ declare const anchorIdlSchema: z.ZodRecord<z.ZodString, z.ZodJSONSchema>;
812
+ type AnchorIdl = z.infer<typeof anchorIdlSchema>;
813
+ /** @compat open */
814
+ type KnownSolanaIdlSource = "chain" | "pasted";
815
+ /** A known IDL source, or one a newer Relay sends. */
816
+ type SolanaIdlSource = KnownSolanaIdlSource | (string & {});
817
+ /**
818
+ * The Anchor IDL a `settings.solanaProgram()` setting decodes instructions with: fetched from the
819
+ * program's on-chain IDL account when the setting was saved (`"chain"`), or pasted by an operator
820
+ * for a program without one (`"pasted"`).
821
+ */
822
+ declare const solanaProgramIdlSchema: z.ZodObject<{
823
+ program: z.ZodString;
824
+ source: z.ZodType<SolanaIdlSource>;
825
+ idl: z.ZodRecord<z.ZodString, z.ZodJSONSchema>;
826
+ }, z.core.$strict>;
827
+ type SolanaProgramIdl = z.infer<typeof solanaProgramIdlSchema>;
828
+ /** The most transactions one `ctx.wallet.transactions()` read fetches per wallet. */
829
+ declare const maxWalletTransactions = 1000;
830
+ /** How far before the evaluation `ctx.wallet.transactions()` may look back: 30 days. */
831
+ declare const maxWalletTransactionLookback: number;
832
+ /** What `ctx.wallet.transactions()` reads. */
833
+ type WalletTransactionsQuery = {
834
+ /** The program, from a `settings.solanaProgram()` setting: never from member input. */
835
+ program: SolanaProgram;
836
+ /**
837
+ * The earliest block time read, in epoch milliseconds. At most 30 days before the evaluation
838
+ * ({@link maxWalletTransactionLookback}); an earlier time throws `author-error`.
839
+ */
840
+ since: number;
841
+ /** Also skip transactions before the quest was first activated in this environment. */
842
+ afterActivation?: boolean;
843
+ /**
844
+ * An SPL token mint: read only the transactions that touched each wallet's associated token
845
+ * account for it, usually far fewer than the wallet's whole history.
846
+ */
847
+ mint?: string;
848
+ /** One of the member's linked Solana wallets; omit to read all of them. */
849
+ address?: string;
850
+ };
851
+ /** One wallet's change of one token in a transaction ({@link WalletTransaction}). */
852
+ type WalletBalanceChange = {
853
+ /** The SPL token mint, or `"SOL"` for lamports. */
854
+ mint: string;
855
+ /** The change in base units: positive when the wallet gained, negative when it spent. */
856
+ delta: string;
857
+ };
858
+ /**
859
+ * The successful, finalized Solana transactions of the member's pinned linked wallets that invoked
860
+ * one program.
861
+ */
862
+ declare const walletTransactionsSchema: z.ZodObject<{
863
+ program: z.ZodString;
864
+ chain: z.ZodString;
865
+ mint: z.ZodNullable<z.ZodString>;
866
+ since: z.ZodNumber;
867
+ at: z.ZodObject<{
868
+ kind: z.ZodEnum<{
869
+ slot: "slot";
870
+ }>;
871
+ number: z.ZodString;
872
+ }, z.core.$strict>;
873
+ complete: z.ZodBoolean;
874
+ transactions: z.ZodArray<z.ZodObject<{
875
+ wallet: z.ZodString;
876
+ signature: z.ZodString;
877
+ slot: z.ZodString;
878
+ timestamp: z.ZodNumber;
879
+ signer: z.ZodDefault<z.ZodBoolean>;
880
+ programs: z.ZodArray<z.ZodString>;
881
+ balanceChanges: z.ZodArray<z.ZodObject<{
882
+ mint: z.ZodString;
883
+ delta: z.ZodString;
884
+ }, z.core.$strict>>;
885
+ instructions: z.ZodOptional<z.ZodArray<z.ZodObject<{
886
+ name: z.ZodString;
887
+ args: z.ZodRecord<z.ZodString, z.ZodJSONSchema>;
888
+ accounts: z.ZodRecord<z.ZodString, z.ZodString>;
889
+ }, z.core.$strict>>>;
890
+ }, z.core.$strict>>;
891
+ observedAt: z.ZodNumber;
892
+ }, z.core.$strict>;
893
+ type WalletTransactions = z.infer<typeof walletTransactionsSchema>;
894
+ /** One transaction `ctx.wallet.transactions()` returns. */
895
+ type WalletTransaction = WalletTransactions["transactions"][number];
896
+ /** One program instruction of a transaction, decoded with the program's Anchor IDL. */
897
+ type WalletInstruction = NonNullable<WalletTransaction["instructions"]>[number];
898
+ /**
899
+ * Reads the wallets the member has linked to this project. They are pinned once per attempt, at
900
+ * its first wallet read: later links and unlinks do not change the attempt. Every method resolves
901
+ * to `null` when the member has no linked wallet it can read, so a non-null list is never empty
902
+ * and a non-null balance covers at least one wallet. Provider failures throw `CapabilityError`
903
+ * with code `"provider-unavailable"`; they never read as a zero balance.
904
+ */
905
+ interface WalletReader {
906
+ /** Every wallet the member has linked to this project, newest first within each chain. */
907
+ list(): Promise<LinkedWallet[] | null>;
908
+ /**
909
+ * The native or token balance of the member's linked wallets on one chain: all wallets of that
910
+ * family (or exact Cosmos network), or `address`. Null when the member has no linked wallet it
911
+ * can read. A chain Relay does not read, a malformed token, and an `address` the member never
912
+ * linked throw `CapabilityError` with code `"author-error"`.
913
+ */
914
+ balance(query: WalletBalanceQuery): Promise<WalletBalance | null>;
915
+ /**
916
+ * How many NFTs of one collection the member's linked wallets of its family hold: an ERC-721
917
+ * contract's `balanceOf(owner)`, one ERC-1155 token ID's `balanceOf(owner, id)`, or on Solana the
918
+ * NFTs whose Metaplex metadata names the collection as verified, summed and per wallet.
919
+ * Compressed NFTs and Metaplex Core assets on Solana are not counted. Null when the member has no linked wallet of that family. A malformed collection, a
920
+ * chain Relay does not read and an `address` the member never linked throw `CapabilityError`
921
+ * with code `"author-error"`. Relay supplies it to every evaluation; it is optional only so that
922
+ * test doubles written before it keep compiling.
923
+ */
924
+ nfts?(query: WalletNftsQuery): Promise<WalletNfts | null>;
925
+ /**
926
+ * Calls one view or pure contract function once per linked EVM wallet, at one block, and decodes
927
+ * each result: an integer as a decimal string (with `total`, their sum), a bool, or an address.
928
+ * `{ wallet: true }` in `args` stands for each wallet's address. Use it for state a contract
929
+ * keeps in a mapping, such as `stakedOf(address)` or `getVotes(address)`; when staking mints a
930
+ * receipt token, read that token with `balance()`. Null when the member has no linked EVM wallet.
931
+ * A malformed call, arguments that do not fit the function, a revert (with its reason), and an
932
+ * `address` the member never linked throw `CapabilityError` with code `"author-error"`. Relay
933
+ * supplies it to every evaluation; it is optional only so that older test doubles compile.
934
+ */
935
+ call?(query: WalletCallQuery): Promise<WalletCall | null>;
936
+ /**
937
+ * The native staking delegations of the member's wallets linked on one Cosmos SDK chain, at one
938
+ * block, in base units of the chain's staking denomination: summed, per wallet and per validator,
939
+ * or only to `validator`. Null when the member has no wallet linked on that chain. A chain Relay
940
+ * does not read, a malformed validator and an `address` the member never linked throw
941
+ * `CapabilityError` with code `"author-error"`. Relay supplies it to every evaluation; it is
942
+ * optional only so that older test doubles compile.
943
+ */
944
+ delegations?(query: WalletDelegationsQuery): Promise<WalletDelegations | null>;
945
+ /**
946
+ * The events of one contract whose `account` argument is one of the member's linked EVM
947
+ * wallets, from `since` up to the chain's finalized block (its `safe` block on a chain without
948
+ * finality), oldest first. Null when the member has no linked EVM wallet. A malformed event, a
949
+ * chain Relay does not read, an `account` that is not an indexed `address` argument, a `where`
950
+ * on an unknown argument, a `since` more than 30 days before the evaluation, a read over too
951
+ * many blocks or more than 1,000 logs, and an `address` the member never linked throw
952
+ * `CapabilityError` with code `"author-error"`. Only events that name the member in an indexed
953
+ * argument can be read: a router or aggregator call where the member is only the transaction's
954
+ * sender cannot. Relay supplies it to every evaluation; it is optional only so that test
955
+ * doubles written before it keep compiling.
956
+ */
957
+ events?(query: WalletEventsQuery): Promise<WalletEvents | null>;
958
+ /**
959
+ * The successful, finalized Solana transactions of the member's linked Solana wallets since
960
+ * `since` that invoked `program`, in a top-level or inner instruction, oldest first, with each
961
+ * wallet's balance changes. With `mint`, only transactions that touched each wallet's associated
962
+ * token account for the mint are read. Each wallet's read stops at its newest 1,000
963
+ * transactions, with `complete: false`. Null when the member has no linked Solana wallet. A
964
+ * malformed program, an account that is not an executable program, a `mint` that is not a token
965
+ * mint, a `since` more than 30 days before the evaluation, and an `address` the member never
966
+ * linked throw `CapabilityError` with code `"author-error"`. Relay supplies it to every
967
+ * evaluation; it is optional only so that test doubles written before it keep compiling.
968
+ */
969
+ transactions?(query: WalletTransactionsQuery): Promise<WalletTransactions | null>;
970
+ }
971
+
972
+ export { type WalletTransactionsQuery as $, type AvatarProvider as A, type NftCollectionParts as B, type CosmosChain as C, type NftStandard as D, type EvmChainId as E, type WalletBalance as F, type WalletBalanceChange as G, type WalletBalanceQuery as H, type WalletBalanceSample as I, type WalletCall as J, type WalletCallArgument as K, type LinkedWallet as L, type WalletCallQuery as M, type NftCollection as N, type OwnProfile as O, type ProfileAvatar as P, type WalletDelegations as Q, type WalletDelegationsQuery as R, type SolanaProgram as S, type WalletEventCondition as T, type WalletEventValue as U, type WalletEvents as V, type WalletAddressInput as W, type WalletEventsQuery as X, type WalletNfts as Y, type WalletNftsQuery as Z, type WalletTransactions as _, type CosmosNetwork as a, walletDelegationsSchema as a$, cosmosDenomSchema as a0, cosmosNetworkSchema as a1, isContractCall as a2, isContractEvent as a3, isEvmChainId as a4, isNftCollection as a5, isSolanaProgram as a6, maxWalletEventLogs as a7, maxWalletEventLookback as a8, maxWalletTransactionLookback as a9, cosmosChain as aA, displayNameSchema as aB, evmAddressSchema as aC, evmChainIdSchema as aD, linkedWalletSchema as aE, managedProfileSchema as aF, ownProfileSchema as aG, profileAvatarSchema as aH, profileCompletionPageSchema as aI, profileCompletionQuerySchema as aJ, profileCompletionSchema as aK, profileDefaultProviderSchema as aL, profileDefaultsSchema as aM, profileModerationSchema as aN, profileReferralSchema as aO, profileSettingsInputSchema as aP, profileSettingsSchema as aQ, profileSummarySchema as aR, profileVisibilitySchema as aS, solanaAddressSchema as aT, solanaMainnet as aU, solanaProgramIdlSchema as aV, walletAddressInput as aW, walletBalanceSampleSchema as aX, walletBalanceSchema as aY, walletCallSchema as aZ, walletChainSchema as a_, maxWalletTransactions as aa, parseContractCall as ab, parseContractEvent as ac, parseContractFunction as ad, parseNftCollection as ae, type SolanaIdlSource as af, profileUpdateSchema as ag, walletAddressInputSchema as ah, walletSignatureSchema as ai, AVATAR_UPLOAD_LIMIT as aj, type AnchorIdl as ak, type KnownSolanaIdlSource as al, type ManagedProfile as am, type ProfileDefaultProvider as an, type ProfileDefaults as ao, type ProfileModeration as ap, type ProfileSettings as aq, type ProfileSettingsInput as ar, type SolanaProgramIdl as as, WALLETS_PER_CHAIN as at, anchorIdlSchema as au, avatarProviderSchema as av, avatarSeedSchema as aw, avatarUploadTypes as ax, caip10 as ay, cosmosAddressSchema as az, type ProfileCompletion as b, walletEventsSchema as b0, walletMessageChallengeSchema as b1, walletNftsSchema as b2, walletSignInFamilies as b3, walletSignInNetwork as b4, walletSignInNetworkSchema as b5, walletSignInNetworksSchema as b6, walletTransactionsSchema as b7, walletUnlinkInputSchema as b8, type ProfileCompletionPage as c, type ProfileCompletionQuery as d, type ProfileReferral as e, type ProfileSummary as f, type ProfileUpdate as g, type ProfileVisibility as h, type WalletChain as i, type WalletMessageChallenge as j, type WalletSignInNetwork as k, type WalletSignature as l, type WalletSigner as m, type WalletUnlinkInput as n, type ContractCall as o, type ContractEvent as p, type WalletBalanceSourceQuery as q, type WalletTransaction as r, type WalletInstruction as s, type WalletReader as t, type ContractCallParts as u, type ContractCallReturnType as v, type ContractEventInput as w, type ContractEventParts as x, type ContractFunction as y, type CosmosDenom as z };