@metatrongg/sdk 0.8.0-dev.09aec63

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.
@@ -0,0 +1,4281 @@
1
+ import * as z from "zod";
2
+
3
+ //#region src/core/dedup.d.ts
4
+ type InflightDedup = {
5
+ readonly run: <T>(key: string, function_: () => Promise<T>) => Promise<T>;
6
+ };
7
+ declare function createInflightDedup(): InflightDedup;
8
+ //#endregion
9
+ //#region src/core/rate-limit.d.ts
10
+ declare const SERVER_RATE_LIMIT_WINDOW_MS = 60000;
11
+ declare const SERVER_RATE_LIMIT_MAX_READ = 60;
12
+ declare const SERVER_RATE_LIMIT_MAX_MUTATING = 5;
13
+ type RateLimiter = {
14
+ /** Resolves when the caller may proceed (a token for this method class was consumed). */readonly acquire: (method: string) => Promise<void>;
15
+ };
16
+ type RateLimitOptions = {
17
+ /** Override the read (GET/HEAD) bucket. Defaults mirror the server: 60 / 60s. */readonly read?: {
18
+ requestsPerSecond?: number;
19
+ burst?: number;
20
+ }; /** Override the mutating (POST/PUT/PATCH/DELETE) bucket. Defaults mirror the server: 5 / 60s. */
21
+ readonly write?: {
22
+ requestsPerSecond?: number;
23
+ burst?: number;
24
+ };
25
+ };
26
+ declare const NOOP_RATE_LIMITER: RateLimiter;
27
+ declare function createRateLimiter(options?: RateLimitOptions): RateLimiter;
28
+ //#endregion
29
+ //#region src/core/types.d.ts
30
+ type OauthScope = "openid" | "profile" | "payments:charge" | "inventory:read";
31
+ type SdkBaseConfig = {
32
+ readonly issuer: string;
33
+ readonly logger?: Logger | undefined;
34
+ readonly fetch?: FetchLike | undefined;
35
+ readonly rateLimit?: RateLimitOptions | false | undefined;
36
+ readonly dedupe?: boolean | undefined;
37
+ };
38
+ type FetchLike = (input: string | URL | Request, init?: RequestInit) => Promise<Response>;
39
+ type BrowserClientConfig = SdkBaseConfig & {
40
+ readonly clientId: string;
41
+ readonly redirectUri: string;
42
+ readonly scopes: readonly OauthScope[];
43
+ readonly tokenStore?: TokenStore | undefined;
44
+ };
45
+ type Logger = {
46
+ debug: (message: string, meta?: Record<string, unknown>) => void;
47
+ info: (message: string, meta?: Record<string, unknown>) => void;
48
+ warn: (message: string, meta?: Record<string, unknown>) => void;
49
+ error: (message: string, meta?: Record<string, unknown>) => void;
50
+ };
51
+ type TokenSet = {
52
+ readonly accessToken: string;
53
+ readonly refreshToken: string | null;
54
+ readonly expiresAt: number | null;
55
+ readonly scope: string | null;
56
+ readonly tokenType: string;
57
+ };
58
+ type TokenStore = {
59
+ get: (key: string) => Promise<TokenSet | null>;
60
+ set: (key: string, value: TokenSet) => Promise<void>;
61
+ clear: (key: string) => Promise<void>;
62
+ };
63
+ //#endregion
64
+ //#region src/core/fetch.d.ts
65
+ type TransportContext = {
66
+ readonly issuer: string;
67
+ readonly fetch: FetchLike;
68
+ readonly logger: Logger;
69
+ readonly rateLimiter?: RateLimiter | undefined;
70
+ readonly dedupe?: InflightDedup | undefined;
71
+ };
72
+ //#endregion
73
+ //#region src/generated/types.gen.d.ts
74
+ type AuthUser = {
75
+ id: string;
76
+ email: string | null;
77
+ emailVerified: boolean;
78
+ name: Username;
79
+ displayName: DisplayName;
80
+ bio: Bio;
81
+ websiteUrl: WebsiteUrl;
82
+ image?: string | null;
83
+ banner: BannerVariant;
84
+ role: AdminRole;
85
+ presenceStatusMode: PresenceStatusMode;
86
+ environmentViewMode: PlatformEnvironment;
87
+ createdAt: string;
88
+ updatedAt: string;
89
+ };
90
+ type Username = string;
91
+ type DisplayName = string | null;
92
+ type Bio = string | null;
93
+ type WebsiteUrl = string | null;
94
+ type BannerVariant = "yellow" | "green" | "blue" | "white" | "black";
95
+ type AdminRole = "super-admin" | "admin" | "read-only" | null;
96
+ type PresenceStatusMode = "auto" | "online" | "offline";
97
+ type PlatformEnvironment = "development" | "production";
98
+ type OauthAuthorizationServerMetadata = {
99
+ issuer: string;
100
+ authorization_endpoint: string;
101
+ token_endpoint: string;
102
+ userinfo_endpoint: string;
103
+ revocation_endpoint: string;
104
+ registration_endpoint: string;
105
+ response_types_supported: Array<"code">;
106
+ grant_types_supported: Array<"authorization_code" | "refresh_token" | "client_credentials">;
107
+ code_challenge_methods_supported: Array<"S256">;
108
+ token_endpoint_auth_methods_supported: Array<"client_secret_basic" | "client_secret_post" | "none">;
109
+ scopes_supported: Array<"openid" | "profile" | "payments:charge" | "inventory:read" | "social:read" | "developer:read" | "developer:apps" | "developer:pages">;
110
+ };
111
+ type OauthScopeString = string;
112
+ type OauthState = string;
113
+ type OauthPaymentMonthlyLimitCents = number | null;
114
+ type OauthTokenResponse = {
115
+ access_token: string;
116
+ token_type: "Bearer";
117
+ expires_in: number;
118
+ refresh_token?: string;
119
+ scope?: OauthScopeString;
120
+ };
121
+ type OauthErrorResponse = {
122
+ error: "invalid_request" | "invalid_client" | "invalid_grant" | "unauthorized_client" | "unsupported_grant_type" | "unsupported_response_type" | "invalid_scope" | "access_denied" | "server_error" | "temporarily_unavailable" | "invalid_token" | "insufficient_scope";
123
+ error_description?: string;
124
+ error_uri?: string;
125
+ state?: OauthState;
126
+ };
127
+ type OauthUserInfoResponse = {
128
+ sub: string;
129
+ name: string | null;
130
+ preferred_username: string | null;
131
+ picture: string | null;
132
+ wallet_address: string | null;
133
+ };
134
+ type OauthPaymentChargeResponse = ({
135
+ status: "completed";
136
+ } & OauthPaymentChargeCompleted) | ({
137
+ status: "redirect";
138
+ } & OauthPaymentChargeRedirect);
139
+ type OauthPaymentChargeCompleted = {
140
+ status: "completed";
141
+ intentId: string;
142
+ paymentId: string;
143
+ usdCents: number;
144
+ txHash: string | null;
145
+ };
146
+ type OauthPaymentChargeRedirect = {
147
+ status: "redirect";
148
+ intentId: string;
149
+ redirectUrl: string;
150
+ usdCents: number;
151
+ };
152
+ type OauthPaymentChargeLimitExceeded = {
153
+ error: "monthly_limit_exceeded";
154
+ currentLimitCents: number;
155
+ monthSpentCents: number;
156
+ attemptedUsdCents: number;
157
+ redirectUrl: string;
158
+ };
159
+ type OauthPaymentChargeRequest = {
160
+ chain: string;
161
+ amount: string;
162
+ token: string;
163
+ returnUri: string;
164
+ potId?: string;
165
+ rakeBps?: number;
166
+ metadata?: PaymentMetadata;
167
+ };
168
+ type PaymentMetadata = {
169
+ purpose?: string;
170
+ title?: string;
171
+ note?: string;
172
+ quantity?: number;
173
+ category?: string;
174
+ sessionId?: string;
175
+ groupId?: string;
176
+ image?: string;
177
+ extra?: {
178
+ [key: string]: string | number | boolean;
179
+ };
180
+ };
181
+ type OauthPaymentLimitsResponse = {
182
+ monthlyLimitCents: number | null;
183
+ monthSpentCents: number;
184
+ periodStart: string;
185
+ offlineAutoChargeEnabled: boolean;
186
+ perTxOfflineCapCents: number | null;
187
+ walletDelegated: boolean;
188
+ };
189
+ type OauthPaymentPriceResponse = {
190
+ chain: string;
191
+ token: string;
192
+ tokenDecimals: number;
193
+ usdRate: string;
194
+ feed: {
195
+ aggregatorAddress: string;
196
+ decimals: number;
197
+ answer: string;
198
+ updatedAt: string;
199
+ };
200
+ usdCents?: number;
201
+ amount?: string;
202
+ };
203
+ type OauthPaymentIntentStatus = {
204
+ intentId: string;
205
+ appId: string;
206
+ status: "pending" | "awaiting_funding" | "completed" | "denied" | "expired";
207
+ paymentId: string | null;
208
+ txHash: string | null;
209
+ usdCents: number;
210
+ chain: string;
211
+ token: string | null;
212
+ grossAmount: string | null;
213
+ creditedAmount: string | null;
214
+ settlement: "instant" | "locked" | null;
215
+ resolvedAt: string | null;
216
+ expiresAt: string;
217
+ };
218
+ type OauthPaymentIntentContext = {
219
+ intentId: string;
220
+ consentId: string;
221
+ app: {
222
+ id: string;
223
+ name: string;
224
+ logoUrl: string | null;
225
+ };
226
+ chain: string;
227
+ token: string;
228
+ amount: string;
229
+ vault: string;
230
+ appealable: boolean;
231
+ usdCents: number;
232
+ monthlyLimitCents: number | null;
233
+ monthSpentCents: number;
234
+ offlineAutoChargeEnabled: boolean;
235
+ perTxOfflineCapCents: number | null;
236
+ walletDelegated: boolean;
237
+ canonicalWalletAddress: string | null;
238
+ offlineDenialReason: "no_active_play_session" | "driver_unavailable" | "wallet_not_delegated" | "deposit_cap_exceeded" | "insufficient_balance" | "fire_failed" | null;
239
+ returnUriHost: string;
240
+ status: "pending" | "awaiting_funding";
241
+ expiresAt: string;
242
+ accessDenied?: {
243
+ reason: "not_invited";
244
+ developer: {
245
+ studioName: string | null;
246
+ logoUrl: string | null;
247
+ studioUrl: string | null;
248
+ studioXHandle: string | null;
249
+ };
250
+ } | null;
251
+ environment: "development" | "production";
252
+ };
253
+ type OauthPaymentIntentSignResponse = {
254
+ chain: string;
255
+ chainId: number;
256
+ id: string;
257
+ amount: string;
258
+ token: string;
259
+ vault: string;
260
+ data: string;
261
+ appealable: boolean;
262
+ payer: string;
263
+ deadline: number;
264
+ routerAddress: string;
265
+ signature: string;
266
+ };
267
+ type OauthPaymentIntentResolveResponse = {
268
+ redirect: string;
269
+ };
270
+ type OauthPaymentIntentComplete = ({
271
+ method: "signed";
272
+ } & OauthPaymentIntentCompleteSigned) | ({
273
+ method: "offline";
274
+ } & OauthPaymentIntentCompleteOffline);
275
+ type OauthPaymentIntentCompleteSigned = {
276
+ method: "signed";
277
+ paymentId: string;
278
+ };
279
+ type OauthPaymentIntentCompleteOffline = {
280
+ method: "offline";
281
+ };
282
+ type ListAppPaymentAuthorizationsResponse = {
283
+ authorizations: Array<AppPaymentAuthorizationItem>;
284
+ };
285
+ type AppPaymentAuthorizationItem = {
286
+ consentId: string;
287
+ app: {
288
+ id: string;
289
+ name: string;
290
+ logoUrl: string | null;
291
+ };
292
+ monthlyLimitCents: number | null;
293
+ monthSpentCents: number;
294
+ periodStart: string;
295
+ offlineAutoChargeEnabled: boolean;
296
+ perTxOfflineCapCents: number | null;
297
+ };
298
+ type UpdateAppPaymentAuthorization = {
299
+ offlineAutoChargeEnabled?: boolean;
300
+ perTxOfflineCapCents?: OauthPaymentPerTxLimitCents;
301
+ monthlyLimitCents?: OauthPaymentMonthlyLimitCents;
302
+ };
303
+ type OauthPaymentPerTxLimitCents = number | null;
304
+ type LibraryListResponse = {
305
+ items: Array<LibraryItem>;
306
+ nextBefore: string | null;
307
+ };
308
+ type LibraryItem = {
309
+ appId: string;
310
+ name: string;
311
+ slug: AppPageSlug;
312
+ bannerUrl: string | null;
313
+ thumbnailUrl: string | null;
314
+ thumbnailVideoUrl: string | null;
315
+ categories: Array<"adventure" | "battle_royale" | "board" | "cards" | "casino" | "casual" | "fighting" | "idle" | "mmo" | "moba" | "platformer" | "prediction" | "puzzle" | "racing" | "rhythm" | "roguelike" | "rpg" | "rts" | "sandbox" | "shooter" | "simulation" | "sports" | "strategy" | "survival" | "tools" | "tower_defense" | "visual_novel" | "other">;
316
+ studio: {
317
+ name: string | null;
318
+ logoUrl: string | null;
319
+ } | null;
320
+ firstPublishedAt: string;
321
+ };
322
+ type AppPageSlug = string;
323
+ type PublicAppPage = {
324
+ appId: string;
325
+ slug: AppPageSlug;
326
+ appName: string;
327
+ appLogoUrl: string | null;
328
+ categories: AppPageCategories;
329
+ tagline: AppPageTagline;
330
+ bannerUrl: string | null;
331
+ playUrl: string | null;
332
+ discordUrl: string | null;
333
+ twitterUrl: string | null;
334
+ redditUrl: string | null;
335
+ telegramUrl: string | null;
336
+ gallery: AppPageGallery;
337
+ chapters: AppPageChapters;
338
+ links: AppPageLinks;
339
+ studio: PublicAppPageStudio;
340
+ platforms: AppPagePlatforms;
341
+ gameType: AppPageGameType;
342
+ ageRating: AppPageAgeRating;
343
+ languages: AppPageLanguages;
344
+ releaseStatus: AppPageReleaseStatus;
345
+ paymentsMode: AppPagePaymentsMode;
346
+ oauthScopes: Array<string>;
347
+ chains: Array<string>;
348
+ publishedAt: string;
349
+ updatedAt: string;
350
+ };
351
+ type AppPageCategories = Array<"adventure" | "battle_royale" | "board" | "cards" | "casino" | "casual" | "fighting" | "idle" | "mmo" | "moba" | "platformer" | "prediction" | "puzzle" | "racing" | "rhythm" | "roguelike" | "rpg" | "rts" | "sandbox" | "shooter" | "simulation" | "sports" | "strategy" | "survival" | "tools" | "tower_defense" | "visual_novel" | "other">;
352
+ type AppPageTagline = string;
353
+ type AppPageGallery = Array<AppPageGalleryItem>;
354
+ type AppPageGalleryItem = {
355
+ url: string;
356
+ caption?: string;
357
+ order: number;
358
+ };
359
+ type AppPageChapters = Array<AppPageChapter>;
360
+ type AppPageChapter = {
361
+ heading: string;
362
+ body: string;
363
+ order: number;
364
+ };
365
+ type AppPageLinks = Array<AppPageLink>;
366
+ type AppPageLink = {
367
+ label: string;
368
+ url: string;
369
+ order: number;
370
+ };
371
+ type PublicAppPageStudio = {
372
+ ownerUserId: string | null;
373
+ name: string | null;
374
+ logoUrl: string | null;
375
+ websiteUrl: string | null;
376
+ xHandle: string | null;
377
+ githubUrl: string | null;
378
+ };
379
+ type AppPagePlatforms = Array<"web" | "ios" | "android" | "pc" | "playstation" | "xbox" | "switch">;
380
+ type AppPageGameType = "single_player" | "multiplayer" | "both" | null;
381
+ type AppPageAgeRating = "everyone" | "13_plus" | "16_plus" | "18_plus" | null;
382
+ type AppPageLanguages = Array<"en" | "es" | "fr" | "de" | "pt" | "it" | "ru" | "ja" | "ko" | "zh" | "hi" | "ar" | "tr" | "vi" | "id" | "th" | "pl" | "nl">;
383
+ type AppPageReleaseStatus = "live" | "open_beta" | "coming_soon";
384
+ type AppPagePaymentsMode = "tron" | "onchain" | "both" | null;
385
+ type ReviewListResponse = {
386
+ aggregate: ReviewAggregate;
387
+ reviews: Array<Review>;
388
+ total: number;
389
+ hasMore: boolean;
390
+ };
391
+ type ReviewAggregate = {
392
+ count: number;
393
+ recommendedCount: number;
394
+ recommendedPct: number | null;
395
+ summaryLabel: ReviewSummaryLabel;
396
+ };
397
+ type ReviewSummaryLabel = "overwhelmingly_positive" | "very_positive" | "positive" | "mostly_positive" | "mixed" | "mostly_negative" | "negative" | "overwhelmingly_negative" | null;
398
+ type Review = {
399
+ id: string;
400
+ recommended: ReviewRecommended;
401
+ body: ReviewBody;
402
+ reactions: ReviewReactionCounts;
403
+ tippedCents: number;
404
+ commentCount: number;
405
+ author: ReviewAuthor;
406
+ authorStats: ReviewerStats;
407
+ developerReply: ReviewReply;
408
+ createdAt: string;
409
+ updatedAt: string;
410
+ };
411
+ type ReviewRecommended = boolean;
412
+ type ReviewBody = string;
413
+ type ReviewReactionCounts = {
414
+ helpful: number;
415
+ unhelpful: number;
416
+ funny: number;
417
+ };
418
+ type ReviewAuthor = {
419
+ userId: string;
420
+ handle: string | null;
421
+ name: string | null;
422
+ avatarUrl: string | null;
423
+ };
424
+ type ReviewerStats = {
425
+ playtimeSecondsThisGame: number;
426
+ gamesPlayed: number;
427
+ reviewsWritten: number;
428
+ };
429
+ type ReviewReply = {
430
+ body: ReviewReplyBody;
431
+ repliedAt: string;
432
+ } | null;
433
+ type ReviewReplyBody = string;
434
+ type ReviewSort = "newest" | "oldest" | "helpful";
435
+ type MyReviewResponse = {
436
+ eligible: boolean;
437
+ eligibleVia: ReviewEligibilityReason;
438
+ review: OwnReview;
439
+ isAppOwner: boolean;
440
+ };
441
+ type ReviewEligibilityReason = "payment" | "reward" | null;
442
+ type OwnReview = {
443
+ id: string;
444
+ recommended: ReviewRecommended;
445
+ body: ReviewBody;
446
+ createdAt: string;
447
+ updatedAt: string;
448
+ } | null;
449
+ type UpsertReviewRequest = {
450
+ recommended: ReviewRecommended;
451
+ body: ReviewBody;
452
+ };
453
+ type MyReviewReactionsResponse = {
454
+ reactions: Array<MyReviewReaction>;
455
+ };
456
+ type MyReviewReaction = {
457
+ reviewId: string;
458
+ vote: ReviewVote;
459
+ funny: boolean;
460
+ };
461
+ type ReviewVote = "helpful" | "unhelpful" | null;
462
+ type SetReviewReactionResponse = {
463
+ reactions: ReviewReactionCounts;
464
+ vote: ReviewVote;
465
+ funny: boolean;
466
+ };
467
+ type SetReviewReactionRequest = {
468
+ vote: ReviewVote;
469
+ funny: boolean;
470
+ };
471
+ type TipReviewResponse = {
472
+ status: "completed";
473
+ amountCents: number;
474
+ balanceCents: number;
475
+ tippedCents: number;
476
+ };
477
+ type TipReviewRequest = {
478
+ amountCents: number;
479
+ note?: string;
480
+ challengeId?: string;
481
+ signature?: string;
482
+ };
483
+ type ReviewCommentListResponse = {
484
+ comments: Array<ReviewComment>;
485
+ total: number;
486
+ hasMore: boolean;
487
+ };
488
+ type ReviewComment = {
489
+ id: string;
490
+ body: ReviewCommentBody;
491
+ author: ReviewAuthor;
492
+ createdAt: string;
493
+ };
494
+ type ReviewCommentBody = string;
495
+ type CreateReviewCommentResponse = {
496
+ comment: ReviewComment;
497
+ commentCount: number;
498
+ };
499
+ type CreateReviewCommentRequest = {
500
+ body: ReviewCommentBody;
501
+ };
502
+ type DeleteReviewCommentResponse = {
503
+ commentCount: number;
504
+ };
505
+ type ReviewReplyResponse = {
506
+ developerReply: ReviewReply;
507
+ };
508
+ type UpsertReviewReplyRequest = {
509
+ body: ReviewReplyBody;
510
+ };
511
+ type SubmitAppContentReportResponse = {
512
+ created: boolean;
513
+ };
514
+ type SubmitAppContentReportRequest = {
515
+ category: AppContentReportCategory;
516
+ details?: string;
517
+ };
518
+ type AppContentReportCategory = "abuse" | "inappropriate_content" | "cheating" | "spam" | "other";
519
+ type AppContentReportListResponse = {
520
+ reports: Array<AppContentReport>;
521
+ total: number;
522
+ hasMore: boolean;
523
+ };
524
+ type AppContentReport = {
525
+ id: string;
526
+ category: AppContentReportCategory;
527
+ details: string | null;
528
+ status: AppContentReportStatus;
529
+ acknowledgedAt: string | null;
530
+ createdAt: string;
531
+ };
532
+ type AppContentReportStatus = "open" | "acknowledged" | "dismissed";
533
+ type PaymentChainsResponse = {
534
+ chains: Array<PaymentChain>;
535
+ };
536
+ type PaymentChain = {
537
+ id: string;
538
+ family: "evm" | "solana";
539
+ displayName: string;
540
+ chainId?: number;
541
+ paymentRouter?: string;
542
+ paymentProgram?: string;
543
+ };
544
+ type PaymentHistoryResponse = {
545
+ payments: Array<PaymentHistoryRow>;
546
+ nextBefore: string | null;
547
+ };
548
+ type PaymentHistoryRow = {
549
+ id: string;
550
+ chain: string;
551
+ chainId: number;
552
+ payer: string;
553
+ amount: string;
554
+ token: string;
555
+ vault: string;
556
+ vaultKind: "credit" | "platform";
557
+ processorAddress: string | null;
558
+ grossAmount: string;
559
+ creditedAmount: string;
560
+ settlement: "instant" | "locked" | null;
561
+ appealable: boolean;
562
+ vaultReleaseAt: string | null;
563
+ consolidatedAt: string | null;
564
+ status: "pending" | "completed" | "expired";
565
+ txHash: string | null;
566
+ blockNumber: string | null;
567
+ deadline: string;
568
+ signedAt: string;
569
+ completedAt: string | null;
570
+ recipientApp: {
571
+ id: string;
572
+ name: string;
573
+ logoUrl: string | null;
574
+ } | null;
575
+ };
576
+ type ActivityResponse = {
577
+ rows: Array<ActivityRow>;
578
+ nextBefore: string | null;
579
+ nextCursor: string | null;
580
+ hasHidden: boolean;
581
+ };
582
+ type ActivityRow = ({
583
+ kind: "payment";
584
+ } & ActivityRowPayment) | ({
585
+ kind: "payment_withdrawal";
586
+ } & ActivityRowPaymentWithdrawal) | ({
587
+ kind: "matured_withdrawal";
588
+ } & ActivityRowMaturedWithdrawal) | ({
589
+ kind: "payout_sent";
590
+ } & ActivityRowPayoutSent) | ({
591
+ kind: "credit_transferred";
592
+ } & ActivityRowCreditTransferred) | ({
593
+ kind: "pot_leg";
594
+ } & ActivityRowPotLeg) | ({
595
+ kind: "payment_autoclaim";
596
+ } & ActivityRowPaymentAutoclaim) | ({
597
+ kind: "appeal";
598
+ } & ActivityRowAppeal) | ({
599
+ kind: "moonpay_buy";
600
+ } & ActivityRowMoonpayBuy) | ({
601
+ kind: "moonpay_sell";
602
+ } & ActivityRowMoonpaySell) | ({
603
+ kind: "tron_deposit";
604
+ } & ActivityRowTronDeposit) | ({
605
+ kind: "tron_pot";
606
+ } & ActivityRowTronPot) | ({
607
+ kind: "tron_cashout";
608
+ } & ActivityRowTronCashout) | ({
609
+ kind: "tron_transfer";
610
+ } & ActivityRowTronTransfer) | ({
611
+ kind: "referral_earning";
612
+ } & ActivityRowReferralEarning) | ({
613
+ kind: "nft_charge";
614
+ } & ActivityRowNftCharge);
615
+ type ActivityRowPayment = {
616
+ kind: "payment";
617
+ groupId: string | null;
618
+ id: string;
619
+ chain: string;
620
+ chainId: number;
621
+ occurredAt: string;
622
+ role: "outgoing" | "incoming";
623
+ payer: string;
624
+ beneficiary: string | null;
625
+ counterparty: string | null;
626
+ app: {
627
+ id: string;
628
+ name: string;
629
+ logoUrl: string | null;
630
+ slug: string | null;
631
+ bannerUrl: string | null;
632
+ } | null;
633
+ beneficiaryApp: {
634
+ id: string;
635
+ name: string;
636
+ logoUrl: string | null;
637
+ slug: string | null;
638
+ bannerUrl: string | null;
639
+ } | null;
640
+ amount: string;
641
+ token: string;
642
+ vault: string;
643
+ vaultKind: "credit" | "platform";
644
+ targetKind: "credit" | "pot";
645
+ processorAddress: string | null;
646
+ grossAmount: string;
647
+ creditedAmount: string;
648
+ settlement: "instant" | "locked" | null;
649
+ appealable: boolean;
650
+ disputableLegId: string | null;
651
+ vaultReleaseAt: string | null;
652
+ consolidatedAt: string | null;
653
+ status: "pending" | "completed" | "expired";
654
+ txHash: string | null;
655
+ blockNumber: string | null;
656
+ logIndex: number | null;
657
+ metadata?: PaymentMetadata | null;
658
+ usdCents: number | null;
659
+ };
660
+ type ActivityRowPaymentWithdrawal = {
661
+ kind: "payment_withdrawal";
662
+ groupId: string | null;
663
+ id: string;
664
+ chain: string;
665
+ occurredAt: string;
666
+ role: "incoming";
667
+ beneficiary: string;
668
+ counterparty: string;
669
+ paymentId: string | null;
670
+ vault: string;
671
+ amount: string;
672
+ token: string;
673
+ txHash: string;
674
+ blockNumber: string;
675
+ logIndex: number;
676
+ usdCents: number | null;
677
+ };
678
+ type ActivityRowMaturedWithdrawal = {
679
+ kind: "matured_withdrawal";
680
+ groupId: string | null;
681
+ id: string;
682
+ chain: string;
683
+ occurredAt: string;
684
+ role: "incoming";
685
+ beneficiary: string;
686
+ counterparty: string;
687
+ vault: string;
688
+ amount: string;
689
+ token: string;
690
+ txHash: string;
691
+ blockNumber: string;
692
+ logIndex: number;
693
+ usdCents: number | null;
694
+ };
695
+ type ActivityRowPayoutSent = {
696
+ kind: "payout_sent";
697
+ groupId: string | null;
698
+ id: string;
699
+ chain: string;
700
+ occurredAt: string;
701
+ role: "incoming";
702
+ recipient: string;
703
+ counterparty: string;
704
+ app: {
705
+ id: string;
706
+ name: string;
707
+ logoUrl: string | null;
708
+ slug: string | null;
709
+ bannerUrl: string | null;
710
+ } | null;
711
+ vault: string;
712
+ amount: string;
713
+ token: string;
714
+ txHash: string;
715
+ blockNumber: string;
716
+ logIndex: number;
717
+ metadata?: PaymentMetadata | null;
718
+ usdCents: number | null;
719
+ };
720
+ type ActivityRowCreditTransferred = {
721
+ kind: "credit_transferred";
722
+ groupId: string | null;
723
+ id: string;
724
+ chain: string;
725
+ occurredAt: string;
726
+ role: "incoming";
727
+ recipient: string;
728
+ counterparty: string;
729
+ app: {
730
+ id: string;
731
+ name: string;
732
+ logoUrl: string | null;
733
+ slug: string | null;
734
+ bannerUrl: string | null;
735
+ } | null;
736
+ vault: string;
737
+ amount: string;
738
+ token: string;
739
+ txHash: string;
740
+ blockNumber: string;
741
+ logIndex: number;
742
+ usdCents: number | null;
743
+ };
744
+ type ActivityRowPotLeg = {
745
+ kind: "pot_leg";
746
+ groupId: string | null;
747
+ id: string;
748
+ chain: string;
749
+ occurredAt: string;
750
+ role: "incoming";
751
+ beneficiary: string;
752
+ distributionId: string | null;
753
+ vault: string | null;
754
+ amount: string;
755
+ token: string;
756
+ settlement: "instant" | "locked";
757
+ releaseAt: string | null;
758
+ claimedAt: string | null;
759
+ txHash: string | null;
760
+ blockNumber: string | null;
761
+ logIndex: number | null;
762
+ metadata?: PaymentMetadata | null;
763
+ usdCents: number | null;
764
+ };
765
+ type ActivityRowPaymentAutoclaim = {
766
+ kind: "payment_autoclaim";
767
+ groupId: string | null;
768
+ id: string;
769
+ chain: string;
770
+ occurredAt: string;
771
+ role: "incoming";
772
+ beneficiary: string;
773
+ paymentId: string | null;
774
+ vault: string;
775
+ token: string;
776
+ autoclaimKind: "withdraw_matured" | "withdraw_escrow" | "claim_refund";
777
+ status: "pending" | "in_flight" | "succeeded" | "skipped" | "failed";
778
+ attempts: number;
779
+ lastError: string | null;
780
+ txHash: string | null;
781
+ settledAt: string | null;
782
+ };
783
+ type ActivityRowAppeal = {
784
+ kind: "appeal";
785
+ groupId: string | null;
786
+ id: string;
787
+ chain: string;
788
+ occurredAt: string;
789
+ role: "outgoing";
790
+ appellant: string;
791
+ counterparty: string;
792
+ paymentId: string | null;
793
+ vault: string;
794
+ amount: string;
795
+ token: string;
796
+ status: "pending_onchain" | "open" | "resolved_refund" | "resolved_dismiss" | "cancelled" | "force_cancelled";
797
+ txHash: string | null;
798
+ blockNumber: string | null;
799
+ logIndex: number | null;
800
+ resolvedAt: string | null;
801
+ refundClaimedAt: string | null;
802
+ hasRoom: boolean;
803
+ resolution: {
804
+ resolutionId: string;
805
+ outcome: number;
806
+ deadline: number;
807
+ signature: string;
808
+ } | null;
809
+ usdCents: number | null;
810
+ };
811
+ type ActivityRowMoonpayBuy = {
812
+ kind: "moonpay_buy";
813
+ groupId: string | null;
814
+ id: string;
815
+ occurredAt: string;
816
+ role: "incoming";
817
+ walletAddress: string;
818
+ externalId: string;
819
+ fiatAmountCents: number;
820
+ fiatCurrency: string;
821
+ cryptoAmount: string;
822
+ cryptoToken: string;
823
+ cryptoTxHash: string | null;
824
+ status: "pending" | "completed" | "failed";
825
+ };
826
+ type ActivityRowMoonpaySell = {
827
+ kind: "moonpay_sell";
828
+ groupId: string | null;
829
+ id: string;
830
+ occurredAt: string;
831
+ role: "outgoing";
832
+ walletAddress: string;
833
+ externalId: string;
834
+ fiatAmountCents: number;
835
+ fiatCurrency: string;
836
+ cryptoAmount: string;
837
+ cryptoToken: string;
838
+ cryptoTxHash: string | null;
839
+ status: "pending" | "completed" | "failed";
840
+ };
841
+ type ActivityRowTronDeposit = {
842
+ kind: "tron_deposit";
843
+ groupId: string | null;
844
+ id: string;
845
+ occurredAt: string;
846
+ role: "incoming";
847
+ amountCents: number;
848
+ status: "completed" | "disputed" | "clawed_back";
849
+ receiptUrl: string | null;
850
+ paymentIntentId: string | null;
851
+ };
852
+ type ActivityRowTronPot = {
853
+ kind: "tron_pot";
854
+ groupId: string | null;
855
+ id: string;
856
+ occurredAt: string;
857
+ role: "incoming" | "outgoing";
858
+ leg: "stake" | "payout" | "dev_cut" | "purchase" | "referral";
859
+ amountCents: number;
860
+ usdCents: number;
861
+ status: "settled";
862
+ app: {
863
+ id: string;
864
+ name: string;
865
+ logoUrl: string | null;
866
+ slug: string | null;
867
+ bannerUrl: string | null;
868
+ } | null;
869
+ involvedUsers?: Array<ActivityTronInvolvedUser> | null;
870
+ metadata?: PaymentMetadata | null;
871
+ };
872
+ type ActivityTronInvolvedUser = {
873
+ userId: string;
874
+ handle: string | null;
875
+ displayName: string | null;
876
+ role: "stake" | "payout" | "dev_cut" | "purchase" | "referral";
877
+ amountCents: number;
878
+ };
879
+ type ActivityRowTronCashout = {
880
+ kind: "tron_cashout";
881
+ groupId: string | null;
882
+ id: string;
883
+ occurredAt: string;
884
+ role: "outgoing";
885
+ method: "stripe" | "usdc";
886
+ amountCents: number;
887
+ feeCents: number;
888
+ destinationAddress: string | null;
889
+ chain: string | null;
890
+ txHash: string | null;
891
+ status: "pending" | "approved" | "rejected" | "settled" | "failed";
892
+ stripeTransferId: string | null;
893
+ rejectionReason: string | null;
894
+ settledAt: string | null;
895
+ };
896
+ type ActivityRowTronTransfer = {
897
+ kind: "tron_transfer";
898
+ groupId: string | null;
899
+ id: string;
900
+ occurredAt: string;
901
+ role: "incoming" | "outgoing";
902
+ amountCents: number;
903
+ usdCents: number;
904
+ status: "settled";
905
+ counterpartyUserId: string | null;
906
+ counterpartyHandle: string | null;
907
+ counterpartyDisplayName: string | null;
908
+ note: string | null;
909
+ };
910
+ type ActivityRowReferralEarning = {
911
+ kind: "referral_earning";
912
+ groupId: string | null;
913
+ id: string;
914
+ chain: string;
915
+ occurredAt: string;
916
+ role: "incoming";
917
+ referralAddress: string;
918
+ paymentId: string | null;
919
+ token: string;
920
+ amount: string;
921
+ reversed: boolean;
922
+ txHash: string;
923
+ logIndex: number;
924
+ usdCents: number | null;
925
+ };
926
+ type ActivityRowNftCharge = {
927
+ kind: "nft_charge";
928
+ groupId: string | null;
929
+ id: string;
930
+ occurredAt: string;
931
+ role: "outgoing";
932
+ chargeKind: "registration" | "mint" | "transfer_gas";
933
+ amountCents: number;
934
+ usdCents: number;
935
+ status: "settled";
936
+ collectionAddress: string | null;
937
+ tokenId: string | null;
938
+ counterpartyUserId: string | null;
939
+ counterpartyHandle: string | null;
940
+ counterpartyDisplayName: string | null;
941
+ };
942
+ type OutstandingResponse = {
943
+ rows: Array<OutstandingByToken>;
944
+ };
945
+ type OutstandingByToken = {
946
+ chain: string;
947
+ token: string;
948
+ creditedWei: string;
949
+ drainedWei: string;
950
+ outstandingWei: string;
951
+ };
952
+ type MoonpayAvailabilityResponse = {
953
+ enabled: boolean;
954
+ direction: "buy" | "sell" | "both" | null;
955
+ countryCode: string | null;
956
+ regionSupported: boolean;
957
+ };
958
+ type MoonpayBuyUrlResponse = {
959
+ url: string;
960
+ intentId: string;
961
+ expiresAt: string;
962
+ walletAddress: string;
963
+ };
964
+ type MoonpayBuyUrlRequest = {
965
+ intentId: string;
966
+ };
967
+ type MoonpaySellUrlResponse = {
968
+ url: string;
969
+ transactionId: string;
970
+ walletAddress: string;
971
+ };
972
+ type MoonpaySellUrlRequest = {
973
+ usdcAmount: string;
974
+ chain?: string;
975
+ };
976
+ type TronBalanceResponse = {
977
+ enabled: boolean;
978
+ balanceCents: number;
979
+ frozenCents: number;
980
+ currency: "tron";
981
+ flagged: boolean;
982
+ minDepositCents: number;
983
+ maxDepositCents: number;
984
+ };
985
+ type TronLedgerResponse = {
986
+ entries: Array<TronLedgerEntry>;
987
+ nextBefore: string | null;
988
+ };
989
+ type TronLedgerEntry = {
990
+ id: string;
991
+ kind: "deposit" | "pot_stake" | "pot_payout" | "dev_earning" | "cashout_hold" | "cashout_release" | "dispute_freeze" | "dispute_unfreeze" | "hosted_billing" | "store_purchase" | "referral_earning" | "peer_transfer" | "nft_registration" | "nft_mint" | "nft_gas";
992
+ amountCents: number;
993
+ currency: string;
994
+ createdAt: string;
995
+ };
996
+ type TronDepositResponse = {
997
+ clientSecret: string;
998
+ publishableKey: string;
999
+ amountCents: number;
1000
+ currency: string;
1001
+ depositId: string;
1002
+ };
1003
+ type TronDepositRequest = {
1004
+ amountCents: number;
1005
+ };
1006
+ type TronTransferResponse = {
1007
+ status: "completed";
1008
+ amountCents: number;
1009
+ balanceCents: number;
1010
+ recipient: {
1011
+ userId: string;
1012
+ handle: string | null;
1013
+ displayName: string | null;
1014
+ };
1015
+ };
1016
+ type TronTransferRequest = {
1017
+ recipientUserId: string;
1018
+ amountCents: number;
1019
+ note?: string;
1020
+ challengeId?: string;
1021
+ signature?: string;
1022
+ threadId?: string;
1023
+ };
1024
+ type TronSecuritySetting = {
1025
+ requireSignature: boolean;
1026
+ };
1027
+ type TronTransferChallengeResponse = ({
1028
+ required: false;
1029
+ } & TronTransferChallengeNotRequired) | ({
1030
+ required: true;
1031
+ } & TronTransferChallengeRequired);
1032
+ type TronTransferChallengeNotRequired = {
1033
+ required: false;
1034
+ };
1035
+ type TronTransferChallengeRequired = {
1036
+ required: true;
1037
+ challengeId: string;
1038
+ message: string;
1039
+ expiresAt: string;
1040
+ };
1041
+ type TronTransferChallengeRequest = {
1042
+ recipientUserId: string;
1043
+ amountCents: number;
1044
+ };
1045
+ type TronConnectOnboardingResponse = {
1046
+ url: string;
1047
+ };
1048
+ type TronCashoutItem = {
1049
+ id: string;
1050
+ method: "stripe" | "usdc";
1051
+ status: "pending" | "approved" | "rejected" | "settled" | "failed";
1052
+ amountCents: number;
1053
+ feeCents: number;
1054
+ currency: string;
1055
+ destinationAddress: string | null;
1056
+ chain: string | null;
1057
+ txHash: string | null;
1058
+ rejectionReason: string | null;
1059
+ createdAt: string;
1060
+ settledAt: string | null;
1061
+ };
1062
+ type TronCashoutCreateRequest = {
1063
+ method: "stripe" | "usdc";
1064
+ amountCents: number;
1065
+ chain?: string;
1066
+ };
1067
+ type TronCashoutListResponse = {
1068
+ requests: Array<TronCashoutItem>;
1069
+ };
1070
+ type AdminTronCashoutListResponse = {
1071
+ requests: Array<AdminTronCashoutItem>;
1072
+ };
1073
+ type AdminTronCashoutItem = {
1074
+ id: string;
1075
+ method: "stripe" | "usdc";
1076
+ status: "pending" | "approved" | "rejected" | "settled" | "failed";
1077
+ amountCents: number;
1078
+ feeCents: number;
1079
+ currency: string;
1080
+ destinationAddress: string | null;
1081
+ chain: string | null;
1082
+ txHash: string | null;
1083
+ rejectionReason: string | null;
1084
+ createdAt: string;
1085
+ settledAt: string | null;
1086
+ userId: string;
1087
+ requestIdHex: string | null;
1088
+ usdcAmount: string | null;
1089
+ backendSignature: string | null;
1090
+ signatureDeadline: string | null;
1091
+ poolAddress: string | null;
1092
+ };
1093
+ type AdminTronCashoutRejectRequest = {
1094
+ reason: string;
1095
+ };
1096
+ type WalletListResponse = {
1097
+ chains: WalletChainList;
1098
+ wallets: Array<WalletItem>;
1099
+ };
1100
+ type WalletChainList = Array<{
1101
+ id: "ethereum-mainnet" | "base-mainnet" | "ethereum-sepolia";
1102
+ displayName: string;
1103
+ chainId: number;
1104
+ }>;
1105
+ type WalletItem = {
1106
+ address: string;
1107
+ label: WalletLabel;
1108
+ kind: "personal" | "app";
1109
+ app: WalletAppLink;
1110
+ balances: WalletBalances;
1111
+ delegation: WalletDelegationStatus;
1112
+ };
1113
+ type WalletLabel = string | null;
1114
+ type WalletAppLink = {
1115
+ id: string;
1116
+ name: string;
1117
+ deletedAt: string | null;
1118
+ } | null;
1119
+ type WalletBalances = {
1120
+ "ethereum-mainnet"?: WalletChainBalance;
1121
+ "base-mainnet"?: WalletChainBalance;
1122
+ "ethereum-sepolia"?: WalletChainBalance;
1123
+ };
1124
+ type WalletChainBalance = {
1125
+ native: string;
1126
+ usdc?: string;
1127
+ };
1128
+ type WalletDelegationStatus = {
1129
+ mode: WalletDelegationMode;
1130
+ caps: WalletDelegationCaps;
1131
+ policyId: string | null;
1132
+ };
1133
+ type WalletDelegationMode = "infinite" | "custom" | "scoped" | null;
1134
+ type WalletDelegationCaps = {
1135
+ native: string;
1136
+ usdc: string;
1137
+ } | null;
1138
+ type WalletLabelUpdateResponse = {
1139
+ address: string;
1140
+ label: WalletLabel;
1141
+ };
1142
+ type WalletLabelUpdate = {
1143
+ label: WalletLabel;
1144
+ };
1145
+ type CreateWalletDelegationResponse = {
1146
+ policyId: string | null;
1147
+ };
1148
+ type CreateWalletDelegation = {
1149
+ mode: "infinite";
1150
+ } | {
1151
+ mode: "custom";
1152
+ caps: WalletDelegationCaps;
1153
+ } | {
1154
+ mode: "scoped";
1155
+ };
1156
+ type DeleteWalletDelegationResponse = {
1157
+ ok: true;
1158
+ };
1159
+ type ProfileUpdate = {
1160
+ name?: Username;
1161
+ displayName?: DisplayName;
1162
+ bio?: string | null;
1163
+ websiteUrl?: WebsiteUrl;
1164
+ banner?: BannerVariant;
1165
+ presenceStatusMode?: PresenceStatusMode;
1166
+ environmentViewMode?: PlatformEnvironment;
1167
+ };
1168
+ type GiphySearchResponse = {
1169
+ results: Array<GiphySearchResult>;
1170
+ };
1171
+ type GiphySearchResult = {
1172
+ id: string;
1173
+ title: string;
1174
+ gifUrl: string;
1175
+ previewUrl: string;
1176
+ width: number;
1177
+ height: number;
1178
+ };
1179
+ type ThreadListResponse = {
1180
+ threads: Array<ThreadSummary>;
1181
+ };
1182
+ type ThreadSummary = ({
1183
+ kind: "direct";
1184
+ } & DirectThreadSummary) | ({
1185
+ kind: "group";
1186
+ } & GroupThreadSummary);
1187
+ type DirectThreadSummary = {
1188
+ kind: "direct";
1189
+ id: string;
1190
+ otherParticipant: ThreadParticipant;
1191
+ lastMessage: ThreadLastMessagePreview;
1192
+ unreadCount: number;
1193
+ pinnedAt: string | null;
1194
+ createdAt: string;
1195
+ };
1196
+ type ThreadParticipant = {
1197
+ id: string;
1198
+ name: string;
1199
+ displayName: string | null;
1200
+ image: string | null;
1201
+ };
1202
+ type ThreadLastMessagePreview = {
1203
+ id: string;
1204
+ senderUserId: string;
1205
+ body: string;
1206
+ envelope?: MessageEnvelope;
1207
+ attachment: {
1208
+ url: string;
1209
+ count: number;
1210
+ } | null;
1211
+ transaction?: MessageTransactionTronTransfer | MessageTransactionNftTransfer | null;
1212
+ sentAt: string;
1213
+ } | null;
1214
+ type MessageEnvelope = {
1215
+ v: 1;
1216
+ alg: "x25519-ecdh-hkdf-sha256-aes256gcm";
1217
+ senderPubKey: string;
1218
+ senderKeyId: string;
1219
+ recipientKeyId: string;
1220
+ iv: string;
1221
+ ct: string;
1222
+ } | null;
1223
+ type MessageTransactionTronTransfer = {
1224
+ kind: "tron_transfer";
1225
+ amountCents: number;
1226
+ recipientUserId: string;
1227
+ };
1228
+ type MessageTransactionNftTransfer = {
1229
+ kind: "nft_transfer";
1230
+ recipientUserId: string;
1231
+ collectionAddress: string;
1232
+ tokenId: string;
1233
+ amount: string;
1234
+ itemName: string | null;
1235
+ imageAssetId?: string | null;
1236
+ };
1237
+ type GroupThreadSummary = {
1238
+ kind: "group";
1239
+ id: string;
1240
+ title: ThreadTitle;
1241
+ description: ThreadDescription;
1242
+ logoUrl: ThreadLogoUrl;
1243
+ participants: Array<GroupParticipant>;
1244
+ myRole: ParticipantRole;
1245
+ lastMessage: ThreadLastMessagePreview;
1246
+ unreadCount: number;
1247
+ pinnedAt: string | null;
1248
+ createdAt: string;
1249
+ };
1250
+ type ThreadTitle = string;
1251
+ type ThreadDescription = string | null;
1252
+ type ThreadLogoUrl = string | null;
1253
+ type GroupParticipant = {
1254
+ id: string;
1255
+ name: string;
1256
+ displayName: string | null;
1257
+ image: string | null;
1258
+ role: ParticipantRole;
1259
+ };
1260
+ type ParticipantRole = "admin" | "member";
1261
+ type CreateDirectThreadBody = {
1262
+ kind?: "direct";
1263
+ recipientUserId: string;
1264
+ };
1265
+ type MessagingOkResponse = {
1266
+ ok: true;
1267
+ };
1268
+ type GroupThreadMutationResponse = {
1269
+ thread: GroupThreadSummary;
1270
+ };
1271
+ type UpdateThreadSettingsBody = {
1272
+ title?: ThreadTitle;
1273
+ description?: ThreadDescription;
1274
+ };
1275
+ type MessagesPageResponse = {
1276
+ messages: Array<MessageItem>;
1277
+ nextBefore: string | null;
1278
+ };
1279
+ type MessageItem = {
1280
+ id: string;
1281
+ threadId: string;
1282
+ senderUserId: string;
1283
+ transaction?: MessageTransactionTronTransfer | MessageTransactionNftTransfer | null;
1284
+ body: string;
1285
+ envelope?: MessageEnvelope;
1286
+ sentAt: string;
1287
+ editedAt: string | null;
1288
+ deletedAt: string | null;
1289
+ replyTo: MessageReplyPreview;
1290
+ reactions: Array<ReactionAggregate>;
1291
+ attachments: Array<MessageAttachment>;
1292
+ linkPreviews: Array<MessageLinkPreview>;
1293
+ };
1294
+ type MessageReplyPreview = {
1295
+ id: string;
1296
+ senderUserId: string;
1297
+ body: string | null;
1298
+ envelope?: MessageEnvelope;
1299
+ } | null;
1300
+ type ReactionAggregate = {
1301
+ emoji: ReactionEmoji;
1302
+ count: number;
1303
+ userIds: Array<string>;
1304
+ };
1305
+ type ReactionEmoji = "👍" | "👎" | "❤️" | "😂" | "😮" | "😢" | "🔥" | "🎉" | "🙏" | "👀" | "✅" | "🎮";
1306
+ type MessageAttachment = {
1307
+ id: string;
1308
+ kind: MessageAttachmentKind;
1309
+ url: string;
1310
+ contentType: string;
1311
+ fileName: string;
1312
+ byteSize: number;
1313
+ width: number | null;
1314
+ height: number | null;
1315
+ };
1316
+ type MessageAttachmentKind = "image";
1317
+ type MessageLinkPreview = {
1318
+ url: string;
1319
+ title: string | null;
1320
+ description: string | null;
1321
+ imageUrl: string | null;
1322
+ siteName: string | null;
1323
+ };
1324
+ type SendMessageBody = {
1325
+ body?: SendMessageText;
1326
+ envelope?: MessageEnvelope;
1327
+ replyToMessageId?: string;
1328
+ attachmentIds?: Array<string>;
1329
+ };
1330
+ type SendMessageText = string;
1331
+ type EditMessageBody = {
1332
+ body?: MessageBody;
1333
+ envelope?: MessageEnvelope;
1334
+ };
1335
+ type MessageBody = string;
1336
+ type ReactionMutationResponse = {
1337
+ aggregate: ReactionAggregate | null;
1338
+ };
1339
+ type UploadAttachmentResponse = {
1340
+ attachment: MessageAttachment;
1341
+ };
1342
+ type InviteParticipantsBody = {
1343
+ userIds: Array<string>;
1344
+ };
1345
+ type PinThreadResponse = {
1346
+ pinnedAt: string;
1347
+ };
1348
+ type DmKeyResponse = {
1349
+ key: DmPublicKeyEntry;
1350
+ };
1351
+ type DmPublicKeyEntry = {
1352
+ userId: string;
1353
+ keyId: string;
1354
+ publicKey: string;
1355
+ algorithm: DmKeyAlgorithm;
1356
+ };
1357
+ type DmKeyAlgorithm = "x25519";
1358
+ type PublishDmKeyBody = {
1359
+ publicKey: string;
1360
+ keyId: string;
1361
+ algorithm: DmKeyAlgorithm;
1362
+ };
1363
+ type BatchThreadDmKeysResponse = {
1364
+ keys: Array<ThreadDmKeyEntry>;
1365
+ };
1366
+ type ThreadDmKeyEntry = {
1367
+ threadId: string;
1368
+ key: DmPublicKeyEntry | null;
1369
+ };
1370
+ type DmKeyBackupStatusResponse = {
1371
+ exists: boolean;
1372
+ attemptsRemaining: number;
1373
+ kdfSalt: string | null;
1374
+ kdfIterations: number | null;
1375
+ };
1376
+ type DmKeyBackupOkResponse = {
1377
+ ok: true;
1378
+ };
1379
+ type DmKeyBackupSetupBody = {
1380
+ scalar: string;
1381
+ secret: string;
1382
+ pinKey: string;
1383
+ kdfSalt: string;
1384
+ kdfIterations: number;
1385
+ };
1386
+ type DmKeyBackupUnlockResponse = {
1387
+ result: "ok";
1388
+ scalar: string;
1389
+ } | {
1390
+ result: "wrong-pin";
1391
+ attemptsRemaining: number;
1392
+ };
1393
+ type DmKeyBackupUnlockBody = {
1394
+ pinKey: string;
1395
+ };
1396
+ type UpdateParticipantRoleBody = {
1397
+ role: ParticipantRole;
1398
+ };
1399
+ type ReferralOverview = {
1400
+ code: string | null;
1401
+ xLinked: boolean;
1402
+ referrer: ReferralReferrer;
1403
+ refereeCount: number;
1404
+ lifetimeEarnings: Array<ReferralEarningTotal>;
1405
+ lifetimeUsdCents: number | null;
1406
+ last30dEarnings: Array<ReferralEarningTotal>;
1407
+ last30dUsdCents: number | null;
1408
+ };
1409
+ type ReferralReferrer = {
1410
+ name: string | null;
1411
+ handle: string | null;
1412
+ } | null;
1413
+ type ReferralEarningTotal = {
1414
+ chain: string;
1415
+ token: string;
1416
+ amount: string;
1417
+ usdCents: number | null;
1418
+ };
1419
+ type ReferralCodeResponse = {
1420
+ code: string;
1421
+ generatedAt: string;
1422
+ };
1423
+ type ReferralPreviewResponse = {
1424
+ status: "eligible" | "already-referred" | "self-referral" | "unknown-code" | "revoked-code" | "window-expired";
1425
+ referrer: ReferralReferrer;
1426
+ };
1427
+ type ReferralBindResponse = {
1428
+ status: "bound" | "already-referred" | "self-referral" | "unknown-code" | "revoked-code" | "window-expired";
1429
+ referrer: ReferralReferrer;
1430
+ };
1431
+ type ReferralBindRequest = {
1432
+ code: string;
1433
+ source?: "signup-url" | "manual-claim" | "cookie-restore";
1434
+ };
1435
+ type PlaySessionAppId = string;
1436
+ type WebPresenceHeartbeatAck = {
1437
+ ok: true;
1438
+ ttlSeconds: number;
1439
+ };
1440
+ type PlaytimeOverview = {
1441
+ apps: Array<PlaytimeAppEntry>;
1442
+ totalSessionCount: number;
1443
+ totalDurationSeconds: number;
1444
+ };
1445
+ type PlaytimeAppEntry = {
1446
+ appId: PlaySessionAppId;
1447
+ name: string;
1448
+ logoUrl: string | null;
1449
+ sessionCount: number;
1450
+ totalDurationSeconds: number;
1451
+ };
1452
+ type PlaytimeTimeseries = {
1453
+ from: string;
1454
+ to: string;
1455
+ buckets: Array<PlaytimeTimeseriesBucket>;
1456
+ };
1457
+ type PlaytimeTimeseriesBucket = {
1458
+ date: string;
1459
+ appId: PlaySessionAppId;
1460
+ sessionCount: number;
1461
+ totalDurationSeconds: number;
1462
+ };
1463
+ type MeStats = {
1464
+ followers: number;
1465
+ following: number;
1466
+ gamesPlayed: number;
1467
+ totalPlaytimeSeconds: number;
1468
+ reviewsLeft: number;
1469
+ rewardsWon: number;
1470
+ rewardsValueUsdCents: number;
1471
+ };
1472
+ type EarningsTimeseries = {
1473
+ from: string;
1474
+ to: string;
1475
+ totalRewardsWon: number;
1476
+ totalValueUsdCents: number;
1477
+ buckets: Array<EarningsTimeseriesBucket>;
1478
+ };
1479
+ type EarningsTimeseriesBucket = {
1480
+ date: string;
1481
+ rewardsWon: number;
1482
+ valueUsdCents: number;
1483
+ };
1484
+ type InventoryListResponse = {
1485
+ items: Array<InventoryHolding>;
1486
+ };
1487
+ type InventoryHolding = {
1488
+ collectionId: string;
1489
+ collectionAddress: string;
1490
+ chain: string;
1491
+ kind: "erc721" | "erc1155";
1492
+ tokenId: string;
1493
+ amount: string;
1494
+ name: string | null;
1495
+ description: string | null;
1496
+ imageAssetId: string | null;
1497
+ bannerAssetId: string | null;
1498
+ devMetadata: {
1499
+ [key: string]: unknown;
1500
+ };
1501
+ appId: string | null;
1502
+ appName: string | null;
1503
+ appLogoUrl: string | null;
1504
+ };
1505
+ type InventoryPendingPermitListResponse = {
1506
+ permits: Array<InventoryPendingPermit>;
1507
+ };
1508
+ type InventoryPendingPermit = {
1509
+ id: string;
1510
+ appId: string;
1511
+ itemId: string;
1512
+ amount: string;
1513
+ priceCents: number | null;
1514
+ gasSponsored: boolean;
1515
+ environment: "development" | "production";
1516
+ createdAt: string;
1517
+ tokenId: string;
1518
+ name: string | null;
1519
+ description: string | null;
1520
+ imageAssetId: string | null;
1521
+ chain: string;
1522
+ collectionAddress: string;
1523
+ kind: "erc721" | "erc1155";
1524
+ };
1525
+ type InventoryPermitRedeemResult = {
1526
+ mint: MintRequestResult;
1527
+ charge: {
1528
+ currency: "tron";
1529
+ gasCents: number;
1530
+ priceCents: number;
1531
+ totalCents: number;
1532
+ gasPaidBy: "user" | "developer";
1533
+ };
1534
+ };
1535
+ type MintRequestResult = {
1536
+ mintRequestId: string;
1537
+ txHash: string;
1538
+ status: "submitted" | "completed";
1539
+ mintedTokenId: string | null;
1540
+ };
1541
+ type MintRequestInput = {
1542
+ collectionAddress: string;
1543
+ chain: string;
1544
+ toWallet?: string;
1545
+ toUserId?: string;
1546
+ tokenId?: string;
1547
+ amount?: string;
1548
+ };
1549
+ type InventoryCollectionListResponse = {
1550
+ collections: Array<InventoryCollectionSummary>;
1551
+ };
1552
+ type InventoryCollectionSummary = {
1553
+ id: string;
1554
+ chain: string;
1555
+ collectionAddress: string;
1556
+ kind: "erc721" | "erc1155";
1557
+ name: string | null;
1558
+ environment: "development" | "production";
1559
+ };
1560
+ type InventoryRegistrationQuote = {
1561
+ itemCount: number;
1562
+ baselineUsdCents: number;
1563
+ gasUsdCents: number;
1564
+ tron: {
1565
+ baselineCents: number;
1566
+ gasCents: number;
1567
+ totalCents: number;
1568
+ };
1569
+ eth: {
1570
+ baselineWei: string;
1571
+ gasWei: string;
1572
+ totalWei: string;
1573
+ };
1574
+ };
1575
+ type InventoryItemRegistrationInput = {
1576
+ collectionAddress: string;
1577
+ chain: string;
1578
+ items: Array<InventoryItemRegistrationSpec>;
1579
+ };
1580
+ type InventoryItemRegistrationSpec = {
1581
+ name?: string | null;
1582
+ description?: string | null;
1583
+ devMetadata?: {
1584
+ [key: string]: unknown;
1585
+ };
1586
+ supplyType?: InventorySupplyType;
1587
+ maxSupply?: string | null;
1588
+ active?: boolean;
1589
+ };
1590
+ type InventorySupplyType = "capped" | "flexible" | "unlimited";
1591
+ type InventoryItemRegistrationResult = {
1592
+ items: Array<InventoryItemRecord>;
1593
+ charge: {
1594
+ currency: "tron";
1595
+ amountCents: number;
1596
+ baselineCents: number;
1597
+ gasCents: number;
1598
+ addItemTxHash: string;
1599
+ };
1600
+ };
1601
+ type InventoryItemRecord = {
1602
+ id: string;
1603
+ collectionId: string;
1604
+ collectionAddress: string;
1605
+ chain: string;
1606
+ kind: "erc721" | "erc1155";
1607
+ tokenId: string;
1608
+ name: string | null;
1609
+ description: string | null;
1610
+ imageAssetId: string | null;
1611
+ bannerAssetId: string | null;
1612
+ devMetadata: {
1613
+ [key: string]: unknown;
1614
+ };
1615
+ supplyType: InventorySupplyType | null;
1616
+ maxSupply: string | null;
1617
+ active: boolean;
1618
+ };
1619
+ type InventoryItemListResponse = {
1620
+ items: Array<InventoryItemRecord>;
1621
+ };
1622
+ type InventoryMintPermitRecord = {
1623
+ id: string;
1624
+ appId: string;
1625
+ itemId: string;
1626
+ userId: string;
1627
+ amount: string;
1628
+ priceCents: number | null;
1629
+ gasSponsored: boolean;
1630
+ status: "pending" | "redeemed" | "revoked";
1631
+ createdAt: string;
1632
+ };
1633
+ type InventoryMintPermitCreateInput = {
1634
+ toUserId: string;
1635
+ amount?: string;
1636
+ priceCents?: number | null;
1637
+ gasSponsored?: boolean;
1638
+ };
1639
+ type InventoryItemHoldersResponse = {
1640
+ stats: InventoryItemStats;
1641
+ holders: Array<InventoryItemHolder>;
1642
+ };
1643
+ type InventoryItemStats = {
1644
+ holderCount: number;
1645
+ walletCount: number;
1646
+ totalHeld: string;
1647
+ };
1648
+ type InventoryItemHolder = {
1649
+ walletAddress: string;
1650
+ userId: string | null;
1651
+ amount: string;
1652
+ };
1653
+ type InventoryVaultPermitRecord = {
1654
+ id: string;
1655
+ appId: string;
1656
+ itemId: string;
1657
+ userId: string;
1658
+ direction: "vault_in" | "withdraw";
1659
+ lockKind: "vault" | "burn" | null;
1660
+ amount: string;
1661
+ gasSponsored: boolean;
1662
+ status: "pending" | "redeemed" | "revoked";
1663
+ custodyId: string | null;
1664
+ createdAt: string;
1665
+ };
1666
+ type InventoryVaultPermitCreateInput = {
1667
+ toUserId: string;
1668
+ lockKind: "vault" | "burn";
1669
+ amount?: string;
1670
+ gasSponsored?: boolean;
1671
+ };
1672
+ type InventoryWithdrawPermitCreateInput = {
1673
+ custodyId: string;
1674
+ };
1675
+ type InventoryPendingVaultPermitListResponse = {
1676
+ permits: Array<InventoryPendingVaultPermit>;
1677
+ };
1678
+ type InventoryPendingVaultPermit = {
1679
+ id: string;
1680
+ appId: string;
1681
+ itemId: string;
1682
+ direction: "vault_in" | "withdraw";
1683
+ lockKind: "vault" | "burn" | null;
1684
+ amount: string;
1685
+ gasSponsored: boolean;
1686
+ environment: "development" | "production";
1687
+ custodyId: string | null;
1688
+ createdAt: string;
1689
+ tokenId: string;
1690
+ name: string | null;
1691
+ description: string | null;
1692
+ imageAssetId: string | null;
1693
+ chain: string;
1694
+ collectionAddress: string;
1695
+ kind: "erc721" | "erc1155";
1696
+ };
1697
+ type InventorySignedVaultPermit = {
1698
+ permitId: string;
1699
+ direction: "vault_in" | "withdraw";
1700
+ vault: string;
1701
+ collection: string;
1702
+ user: string;
1703
+ tokenId: string;
1704
+ amount: string;
1705
+ lockKind: "vault" | "burn" | null;
1706
+ destination: string | null;
1707
+ deadline: number;
1708
+ signature: string;
1709
+ };
1710
+ type InventoryRelayedVaultQuoteResponse = {
1711
+ direction: "vault_in" | "withdraw";
1712
+ collection: string;
1713
+ vault: string;
1714
+ chainId: number;
1715
+ user: string;
1716
+ tokenId: string;
1717
+ amount: string;
1718
+ nonce: string | null;
1719
+ deadline: number;
1720
+ feeCents: number;
1721
+ gasWei: string;
1722
+ gasPaidBy: "developer" | "user";
1723
+ requiresUserSignature: boolean;
1724
+ };
1725
+ type InventoryRelayedVaultSubmitResponse = {
1726
+ ok: boolean;
1727
+ txHash: string;
1728
+ chargedCents: number;
1729
+ gasPaidBy: "developer" | "user";
1730
+ };
1731
+ type InventoryRelayedVaultSubmitRequest = {
1732
+ userSignature?: string;
1733
+ deadline?: number;
1734
+ };
1735
+ type InventoryNftTransferQuoteResponse = {
1736
+ collection: string;
1737
+ chainId: number;
1738
+ from: string;
1739
+ to: string;
1740
+ tokenId: string;
1741
+ amount: string;
1742
+ nonce: string;
1743
+ deadline: number;
1744
+ feeCents: number;
1745
+ gasWei: string;
1746
+ selfPayAvailable: boolean;
1747
+ };
1748
+ type InventoryNftTransferQuoteRequest = {
1749
+ toUserId: string;
1750
+ collection: string;
1751
+ tokenId: string;
1752
+ amount?: string;
1753
+ };
1754
+ type InventoryNftTransferResponse = {
1755
+ ok: boolean;
1756
+ txHash: string;
1757
+ chargedCents: number;
1758
+ };
1759
+ type InventoryNftTransferRequest = {
1760
+ toUserId: string;
1761
+ collection: string;
1762
+ tokenId: string;
1763
+ amount?: string;
1764
+ deadline: number;
1765
+ userSignature: string;
1766
+ threadId?: string;
1767
+ };
1768
+ type InventoryVaultCustodyListResponse = {
1769
+ custody: Array<InventoryVaultCustody>;
1770
+ };
1771
+ type InventoryVaultCustody = {
1772
+ id: string;
1773
+ collectionId: string;
1774
+ collectionAddress: string;
1775
+ chain: string;
1776
+ kind: "erc721" | "erc1155";
1777
+ tokenId: string;
1778
+ amount: string;
1779
+ lockKind: "vault" | "burn";
1780
+ vaultAddress: string;
1781
+ createdAt: string;
1782
+ name: string | null;
1783
+ description: string | null;
1784
+ imageAssetId: string | null;
1785
+ };
1786
+ type InventoryVaultForceWithdrawResponse = {
1787
+ ok: boolean;
1788
+ txHash: string;
1789
+ };
1790
+ type NotificationListResponse = {
1791
+ notifications: Array<NotificationItem>;
1792
+ unreadCount: number;
1793
+ };
1794
+ type NotificationItem = {
1795
+ id: string;
1796
+ kind: "friend_request";
1797
+ payload: FriendRequestNotificationPayload;
1798
+ read: boolean;
1799
+ createdAt: string;
1800
+ } | {
1801
+ id: string;
1802
+ kind: "friend_accepted";
1803
+ payload: FriendAcceptedNotificationPayload;
1804
+ read: boolean;
1805
+ createdAt: string;
1806
+ } | {
1807
+ id: string;
1808
+ kind: "app_page_approved";
1809
+ payload: AppPageApprovedNotificationPayload;
1810
+ read: boolean;
1811
+ createdAt: string;
1812
+ } | {
1813
+ id: string;
1814
+ kind: "app_page_rejected";
1815
+ payload: AppPageRejectedNotificationPayload;
1816
+ read: boolean;
1817
+ createdAt: string;
1818
+ } | {
1819
+ id: string;
1820
+ kind: "app_participant_invite";
1821
+ payload: AppParticipantInviteNotificationPayload;
1822
+ read: boolean;
1823
+ createdAt: string;
1824
+ } | {
1825
+ id: string;
1826
+ kind: "app_participant_accepted";
1827
+ payload: AppParticipantAcceptedNotificationPayload;
1828
+ read: boolean;
1829
+ createdAt: string;
1830
+ };
1831
+ type FriendRequestNotificationPayload = {
1832
+ requesterId: string;
1833
+ requesterName: string;
1834
+ requesterDisplayName: string | null;
1835
+ requesterImage: string | null;
1836
+ friendshipId: string;
1837
+ };
1838
+ type FriendAcceptedNotificationPayload = {
1839
+ accepterId: string;
1840
+ accepterName: string;
1841
+ accepterDisplayName: string | null;
1842
+ accepterImage: string | null;
1843
+ friendshipId: string;
1844
+ };
1845
+ type AppPageApprovedNotificationPayload = {
1846
+ appId: string;
1847
+ appName: string;
1848
+ scope: "publish" | "changes";
1849
+ };
1850
+ type AppPageRejectedNotificationPayload = {
1851
+ appId: string;
1852
+ appName: string;
1853
+ scope: "publish" | "changes";
1854
+ notes: string;
1855
+ };
1856
+ type AppParticipantInviteNotificationPayload = {
1857
+ appId: string;
1858
+ appName: string;
1859
+ appLogoUrl: string | null;
1860
+ inviterId: string;
1861
+ inviterName: string;
1862
+ inviterDisplayName: string | null;
1863
+ };
1864
+ type AppParticipantAcceptedNotificationPayload = {
1865
+ appId: string;
1866
+ appName: string;
1867
+ accepterId: string;
1868
+ accepterName: string;
1869
+ accepterDisplayName: string | null;
1870
+ accepterImage: string | null;
1871
+ };
1872
+ type NotificationUpdate = {
1873
+ read: boolean;
1874
+ };
1875
+ type FriendListResponse = {
1876
+ friends: Array<FriendListItem>;
1877
+ };
1878
+ type FriendListItem = {
1879
+ user: ThreadParticipant;
1880
+ friendshipId: string;
1881
+ acceptedAt: string;
1882
+ onlineStatus: OnlineStatus;
1883
+ };
1884
+ type OnlineStatus = "online" | "offline";
1885
+ type AppFriendListResponse = {
1886
+ friends: Array<ThreadParticipant>;
1887
+ };
1888
+ type FriendRequestDecision = {
1889
+ decision: "accept" | "reject";
1890
+ };
1891
+ type SocialListResponse = {
1892
+ accounts: Array<SocialAccount>;
1893
+ };
1894
+ type SocialAccount = {
1895
+ provider: "twitter" | "discord" | "github";
1896
+ subject: string;
1897
+ username: string | null;
1898
+ name: string | null;
1899
+ profilePictureUrl: string | null;
1900
+ verifiedAt: string | null;
1901
+ };
1902
+ type PublicProfile = {
1903
+ id: string;
1904
+ name: string;
1905
+ displayName: string | null;
1906
+ bio: string | null;
1907
+ websiteUrl: string | null;
1908
+ image: string | null;
1909
+ banner: BannerVariant;
1910
+ createdAt: string;
1911
+ socials: Array<SocialAccount>;
1912
+ developer: PublicProfileDeveloper;
1913
+ counts: ProfileCounts;
1914
+ stats: ProfileStats;
1915
+ topGames: Array<ProfileTopGame>;
1916
+ recentReviews: Array<ProfileRecentReview>;
1917
+ relationship: Relationship;
1918
+ };
1919
+ type PublicProfileDeveloper = {
1920
+ profile: DeveloperProfile;
1921
+ apps: Array<PublicDeveloperApp>;
1922
+ } | null;
1923
+ type DeveloperProfile = {
1924
+ studioName: string | null;
1925
+ studioUrl: string | null;
1926
+ studioXHandle: XHandle;
1927
+ githubUrl: GitHubUrl;
1928
+ logoUrl: string | null;
1929
+ };
1930
+ type XHandle = string | null;
1931
+ type GitHubUrl = string | null;
1932
+ type PublicDeveloperApp = {
1933
+ id: string;
1934
+ name: string;
1935
+ logoUrl: string | null;
1936
+ environment: "development" | "production";
1937
+ };
1938
+ type ProfileCounts = {
1939
+ followers: number;
1940
+ following: number;
1941
+ };
1942
+ type ProfileStats = {
1943
+ gamesPlayed: number;
1944
+ totalPlaytimeSeconds: number;
1945
+ reviewsLeft: number;
1946
+ rewardsWon: number;
1947
+ rewardsValueUsdCents: number;
1948
+ };
1949
+ type ProfileTopGame = {
1950
+ appId: string;
1951
+ name: string;
1952
+ logoUrl: string | null;
1953
+ sessionCount: number;
1954
+ totalPlaytimeSeconds: number;
1955
+ };
1956
+ type ProfileRecentReview = {
1957
+ appId: string;
1958
+ appName: string;
1959
+ appLogoUrl: string | null;
1960
+ recommended: boolean;
1961
+ body: string;
1962
+ createdAt: string;
1963
+ };
1964
+ type Relationship = {
1965
+ isFollowing: boolean;
1966
+ isFollowedBy: boolean;
1967
+ friendship: "none" | "pending_out" | "pending_in" | "accepted";
1968
+ friendshipId: string | null;
1969
+ } | null;
1970
+ type UserSearchResponse = {
1971
+ results: Array<UserSearchResult>;
1972
+ };
1973
+ type UserSearchResult = {
1974
+ id: string;
1975
+ name: string;
1976
+ displayName: string | null;
1977
+ image: string | null;
1978
+ socials: Array<SocialAccount>;
1979
+ };
1980
+ type CreateDeveloperApiKeyResponse = {
1981
+ key: DeveloperApiKeyItem;
1982
+ secret: string;
1983
+ };
1984
+ type DeveloperApiKeyItem = {
1985
+ id: string;
1986
+ keyPrefix: string;
1987
+ scopes: Array<"developer:read" | "developer:apps" | "developer:pages">;
1988
+ createdAt: string;
1989
+ expiresAt: string | null;
1990
+ lastUsedAt: string | null;
1991
+ revokedAt: string | null;
1992
+ };
1993
+ type CreateDeveloperApiKey = {
1994
+ scopes: Array<"developer:read" | "developer:apps" | "developer:pages">;
1995
+ expiresAt?: string | null;
1996
+ };
1997
+ type DeveloperApiKeysResponse = {
1998
+ keys: Array<DeveloperApiKeyItem>;
1999
+ };
2000
+ type DeveloperOkResponse = {
2001
+ ok: true;
2002
+ };
2003
+ type DeveloperAppIdResponse = {
2004
+ id: string;
2005
+ };
2006
+ type CreateDeveloperApp = {
2007
+ name: DeveloperAppName;
2008
+ chains?: Array<CreateDeveloperAppChain>;
2009
+ };
2010
+ type DeveloperAppName = string;
2011
+ type CreateDeveloperAppChain = {
2012
+ chain: string;
2013
+ custody: "server";
2014
+ };
2015
+ type UpdateDeveloperApp = {
2016
+ name?: DeveloperAppName;
2017
+ slug?: AppPageSlug | null;
2018
+ logoUrl?: string | null;
2019
+ testAccess?: "private" | "public";
2020
+ redirectUris?: Array<string>;
2021
+ embedOrigins?: Array<EmbedOrigin>;
2022
+ acceptedCurrencies?: AcceptedCurrencies;
2023
+ paymentStatusWebhookUrl?: string | null;
2024
+ paymentStatusWebhookUrlTest?: string | null;
2025
+ };
2026
+ type EmbedOrigin = string;
2027
+ type AcceptedCurrencies = Array<PlatformCurrency>;
2028
+ type PlatformCurrency = "eth" | "tron";
2029
+ type DeveloperLogoUploadResponse = {
2030
+ logoUrl: string | null;
2031
+ };
2032
+ type DeveloperAppBalancesResponse = {
2033
+ appId: string;
2034
+ balances: Array<DeveloperAppBalanceItem>;
2035
+ };
2036
+ type DeveloperAppBalanceItem = {
2037
+ chain: string;
2038
+ token: string;
2039
+ tokenDecimals: number;
2040
+ lockedWei: string;
2041
+ unlockedWei: string;
2042
+ walletBalanceWei: string | null;
2043
+ };
2044
+ type DeveloperAppTronBalanceResponse = {
2045
+ appId: string;
2046
+ availableCents: number;
2047
+ lockedCents: number;
2048
+ totalCents: number;
2049
+ };
2050
+ type DeveloperAppEarningsResponse = {
2051
+ appId: string;
2052
+ range: string;
2053
+ bucketSecs: number;
2054
+ windowSecs: number;
2055
+ chain: string | null;
2056
+ buckets: Array<DeveloperAppEarningsBucket>;
2057
+ };
2058
+ type DeveloperAppEarningsBucket = {
2059
+ ts: string;
2060
+ sumCents: number;
2061
+ paymentCount: number;
2062
+ };
2063
+ type DeveloperAppPlaytimeResponse = {
2064
+ appId: string;
2065
+ range: string;
2066
+ bucketSecs: number;
2067
+ windowSecs: number;
2068
+ buckets: Array<DeveloperAppPlaytimeBucket>;
2069
+ };
2070
+ type DeveloperAppPlaytimeBucket = {
2071
+ ts: string;
2072
+ sessionCount: number;
2073
+ uniquePlayerCount: number;
2074
+ totalDurationSeconds: number;
2075
+ };
2076
+ type DeveloperAppOverviewResponse = {
2077
+ appId: string;
2078
+ earnedCents: number;
2079
+ earningEventCount: number;
2080
+ distinctPayers: number;
2081
+ sessionCount: number;
2082
+ uniquePlayerCount: number;
2083
+ totalPlaytimeSeconds: number;
2084
+ };
2085
+ type DeveloperAppWalletsResponse = {
2086
+ appId: string;
2087
+ wallets: Array<DeveloperAppWalletItem>;
2088
+ };
2089
+ type DeveloperAppWalletItem = {
2090
+ chain: string;
2091
+ address: string;
2092
+ custody: "server" | null;
2093
+ walletId: string | null;
2094
+ autoSweepEnabled: boolean;
2095
+ sweepThresholdCents: number | null;
2096
+ };
2097
+ type DeveloperAppAutoSweepResponse = {
2098
+ appId: string;
2099
+ chain: string;
2100
+ autoSweepEnabled: boolean;
2101
+ sweepThresholdCents: number | null;
2102
+ };
2103
+ type DeveloperAppAutoSweepRequest = {
2104
+ enabled: boolean;
2105
+ thresholdCents?: number | null;
2106
+ };
2107
+ type DeveloperAppProvisionWalletResponse = {
2108
+ appId: string;
2109
+ chain: string;
2110
+ custody: "server";
2111
+ walletId: string;
2112
+ address: string;
2113
+ };
2114
+ type DeveloperAppWithdrawResponse = {
2115
+ appId: string;
2116
+ chain: string;
2117
+ token: string;
2118
+ txHash: string;
2119
+ amountWei: string;
2120
+ recipient: string;
2121
+ };
2122
+ type DeveloperAppConsolidateResponse = {
2123
+ appId: string;
2124
+ chain: string;
2125
+ recipient: string;
2126
+ transfers: Array<{
2127
+ token: string;
2128
+ txHash: string;
2129
+ amountWei: string;
2130
+ }>;
2131
+ };
2132
+ type RegenerateDeveloperAppKeyResponse = {
2133
+ key: DeveloperAppKeyItem;
2134
+ clientSecret: string;
2135
+ };
2136
+ type DeveloperAppKeyItem = {
2137
+ id: string;
2138
+ clientId: string;
2139
+ environment: "development" | "production";
2140
+ secretLast4: string;
2141
+ createdAt: string;
2142
+ lastUsedAt: string | null;
2143
+ };
2144
+ type CreateDeveloperProductionRequestResponse = {
2145
+ ok: true;
2146
+ status: "pending" | "approved";
2147
+ };
2148
+ type CreateDeveloperProductionRequest = {
2149
+ reason?: string;
2150
+ };
2151
+ type RegenerateDeveloperAppWebhookSecretResponse = {
2152
+ secret: string;
2153
+ secretLast4: string;
2154
+ };
2155
+ type DevAppealsResponse = {
2156
+ appeals: Array<DevAppealRow>;
2157
+ };
2158
+ type DevAppealRow = {
2159
+ appealId: string;
2160
+ paymentId: string;
2161
+ chain: string;
2162
+ vault: string;
2163
+ appellant: string;
2164
+ amount: string;
2165
+ token: string;
2166
+ status: "open" | "resolved_refund" | "resolved_dismiss" | "cancelled" | "force_cancelled";
2167
+ reason: string | null;
2168
+ filedAt: string;
2169
+ resolvedAt: string | null;
2170
+ };
2171
+ type DevPendingDepositsResponse = {
2172
+ deposits: Array<DevPendingDepositRow>;
2173
+ };
2174
+ type DevPendingDepositRow = {
2175
+ paymentId: string;
2176
+ chain: string;
2177
+ vault: string;
2178
+ beneficiary: string;
2179
+ token: string;
2180
+ grossAmount: string;
2181
+ creditedAmount: string;
2182
+ vaultReleaseAt: string;
2183
+ signedAt: string;
2184
+ matured: boolean;
2185
+ hasActiveAppeal: boolean;
2186
+ };
2187
+ type DeveloperTronBalanceSummaryResponse = {
2188
+ appCount: number;
2189
+ availableCents: number;
2190
+ lockedCents: number;
2191
+ totalCents: number;
2192
+ };
2193
+ type DeveloperAppParticipantsResponse = {
2194
+ participants: Array<DeveloperAppParticipant>;
2195
+ };
2196
+ type DeveloperAppParticipant = {
2197
+ userId: string;
2198
+ status: "invited" | "accepted" | "revoked";
2199
+ name: string | null;
2200
+ email: string | null;
2201
+ image: string | null;
2202
+ invitedAt: string;
2203
+ respondedAt: string | null;
2204
+ };
2205
+ type InviteDeveloperAppParticipant = {
2206
+ identifier: string;
2207
+ };
2208
+ type DeveloperInvitesResponse = {
2209
+ invites: Array<DeveloperInvite>;
2210
+ };
2211
+ type DeveloperInvite = {
2212
+ appId: string;
2213
+ appName: string;
2214
+ appLogoUrl: string | null;
2215
+ status: "invited" | "accepted" | "revoked";
2216
+ invitedAt: string;
2217
+ };
2218
+ type DeveloperMeStatus = {
2219
+ roleStatus: "none" | "pending" | "approved" | "rejected" | "cancelled";
2220
+ latestRequest: DeveloperRequestItem;
2221
+ profile: DeveloperProfile | null;
2222
+ apps: Array<DeveloperAppItem>;
2223
+ };
2224
+ type DeveloperRequestItem = {
2225
+ id: string;
2226
+ userId: string;
2227
+ user: DeveloperRequestSubject;
2228
+ kind: "role" | "production";
2229
+ status: "pending" | "approved" | "rejected" | "cancelled";
2230
+ appId: string | null;
2231
+ payload: {
2232
+ kind: "role";
2233
+ data: DeveloperRoleRequestPayload;
2234
+ } | {
2235
+ kind: "production";
2236
+ data: DeveloperProductionRequestPayload;
2237
+ };
2238
+ reviewedBy: string | null;
2239
+ reviewedAt: string | null;
2240
+ reviewNotes: string | null;
2241
+ createdAt: string;
2242
+ updatedAt: string;
2243
+ } | null;
2244
+ type DeveloperRequestSubject = {
2245
+ id: string;
2246
+ displayName: string | null;
2247
+ email: string | null;
2248
+ } | null;
2249
+ type DeveloperRoleRequestPayload = {
2250
+ policyVersion: string;
2251
+ policyAcceptedAt: string;
2252
+ logoUrl: string | null;
2253
+ email: string | null;
2254
+ xHandle: XHandle;
2255
+ teamName: TeamName;
2256
+ projectDescription: ProjectDescription;
2257
+ };
2258
+ type TeamName = string | null;
2259
+ type ProjectDescription = string | null;
2260
+ type DeveloperProductionRequestPayload = {
2261
+ reason?: string;
2262
+ };
2263
+ type DeveloperAppItem = {
2264
+ id: string;
2265
+ name: DeveloperAppName;
2266
+ slug: AppPageSlug | null;
2267
+ logoUrl: string | null;
2268
+ environment: "development" | "production";
2269
+ productionApprovedAt: string | null;
2270
+ testAccess: "private" | "public";
2271
+ createdAt: string;
2272
+ redirectUris: Array<string>;
2273
+ embedOrigins: Array<EmbedOrigin>;
2274
+ acceptedCurrencies: AcceptedCurrencies;
2275
+ payoutAddresses: Array<DeveloperAppPayoutAddressItem>;
2276
+ keys: Array<DeveloperAppKeyItem>;
2277
+ pendingProductionRequestId: string | null;
2278
+ paymentStatusWebhookUrl: string | null;
2279
+ paymentStatusWebhookSecretLast4: string | null;
2280
+ paymentStatusWebhookUrlTest: string | null;
2281
+ paymentStatusWebhookSecretLast4Test: string | null;
2282
+ };
2283
+ type DeveloperAppPayoutAddressItem = {
2284
+ chain: string;
2285
+ address: string;
2286
+ };
2287
+ type UpdateDeveloperProfile = {
2288
+ studioName?: string | null;
2289
+ studioUrl?: string | null;
2290
+ studioXHandle?: XHandle;
2291
+ githubUrl?: GitHubUrl;
2292
+ logoUrl?: string | null;
2293
+ };
2294
+ type CreateDeveloperRoleRequest = {
2295
+ acceptPolicy: true;
2296
+ logoUrl?: string;
2297
+ email?: string;
2298
+ teamName?: TeamName;
2299
+ projectDescription?: ProjectDescription;
2300
+ };
2301
+ type AppPageDraft = {
2302
+ appId: string;
2303
+ slug: AppPageSlug | null;
2304
+ status: "draft" | "pending_review" | "published" | "hidden";
2305
+ categories: AppPageCategories;
2306
+ tagline: AppPageTagline | null;
2307
+ bannerUrl: string | null;
2308
+ thumbnailUrl: string | null;
2309
+ thumbnailVideoUrl: string | null;
2310
+ playUrl: string | null;
2311
+ discordUrl: string | null;
2312
+ twitterUrl: string | null;
2313
+ redditUrl: string | null;
2314
+ telegramUrl: string | null;
2315
+ gallery: AppPageGallery;
2316
+ chapters: AppPageChapters;
2317
+ links: AppPageLinks;
2318
+ platforms: AppPagePlatforms;
2319
+ gameType: AppPageGameType;
2320
+ ageRating: AppPageAgeRating;
2321
+ languages: AppPageLanguages;
2322
+ releaseStatus: AppPageReleaseStatus;
2323
+ firstPublishedAt: string | null;
2324
+ reviewedAt: string | null;
2325
+ reviewNotes: string | null;
2326
+ hiddenAt: string | null;
2327
+ hiddenReasonPublic: string | null;
2328
+ pendingReview: boolean;
2329
+ };
2330
+ type UpdateAppPage = {
2331
+ categories?: AppPageCategories;
2332
+ tagline?: AppPageTagline | null;
2333
+ bannerUrl?: string | null;
2334
+ thumbnailUrl?: string | null;
2335
+ thumbnailVideoUrl?: string | null;
2336
+ playUrl?: string | null;
2337
+ discordUrl?: string | null;
2338
+ twitterUrl?: string | null;
2339
+ redditUrl?: string | null;
2340
+ telegramUrl?: string | null;
2341
+ gallery?: AppPageGallery;
2342
+ chapters?: AppPageChapters;
2343
+ links?: AppPageLinks;
2344
+ platforms?: AppPagePlatforms;
2345
+ gameType?: AppPageGameType;
2346
+ ageRating?: AppPageAgeRating;
2347
+ languages?: AppPageLanguages;
2348
+ releaseStatus?: AppPageReleaseStatus;
2349
+ };
2350
+ type AppPageGalleryUploadResponse = {
2351
+ url: string;
2352
+ };
2353
+ type AdminActivePlayersResponse = {
2354
+ players: Array<AdminActivePlayer>;
2355
+ total: number;
2356
+ liveCount: number;
2357
+ generatedAt: string;
2358
+ };
2359
+ type AdminActivePlayer = {
2360
+ playSessionId: string;
2361
+ userId: string;
2362
+ appId: string;
2363
+ status: "pending" | "active";
2364
+ userHalfFresh: boolean;
2365
+ gameHalfFresh: boolean;
2366
+ active: boolean;
2367
+ startedAt: string;
2368
+ activatedAt: string | null;
2369
+ lastSeenAt: string | null;
2370
+ };
2371
+ type ListAdminsResponse = {
2372
+ admins: Array<AdminUser>;
2373
+ };
2374
+ type AdminUser = {
2375
+ id: string;
2376
+ email: string | null;
2377
+ role: AdminRole;
2378
+ addedBy: string | null;
2379
+ addedAt: string;
2380
+ lastAccessedAt: string | null;
2381
+ };
2382
+ type AdminMutationResponse = {
2383
+ id: string;
2384
+ };
2385
+ type AddAdminRequest = {
2386
+ email: string;
2387
+ role?: AdminRole;
2388
+ };
2389
+ type AdminRoleChangeResponse = {
2390
+ id: string;
2391
+ role: AdminRole;
2392
+ };
2393
+ type UpdateAdminRoleRequest = {
2394
+ role: AdminRole;
2395
+ };
2396
+ type AdminUserListResponse = {
2397
+ users: Array<AdminUserListItem>;
2398
+ total: number;
2399
+ offset: number;
2400
+ limit: number;
2401
+ };
2402
+ type AdminUserListItem = {
2403
+ id: string;
2404
+ name: string;
2405
+ displayName: string | null;
2406
+ email: string | null;
2407
+ createdAt: string;
2408
+ bannedAt: string | null;
2409
+ deletedAt: string | null;
2410
+ };
2411
+ type AdminUserBanResponse = {
2412
+ id: string;
2413
+ banned: boolean;
2414
+ };
2415
+ type AdminUserBanRequest = {
2416
+ banned: boolean;
2417
+ reason?: string;
2418
+ };
2419
+ type AdminAuditListResponse = {
2420
+ rows: Array<AdminAuditListItem>;
2421
+ total: number;
2422
+ offset: number;
2423
+ limit: number;
2424
+ };
2425
+ type AdminAuditListItem = {
2426
+ id: string;
2427
+ actorId: string | null;
2428
+ actorKind: "user" | "system" | "service";
2429
+ action: string;
2430
+ targetType: string;
2431
+ targetId: string;
2432
+ purpose: string;
2433
+ legalBasis: "consent" | "contract" | "legitimate-interest" | "legal-obligation" | "vital-interest" | "public-task";
2434
+ occurredAt: string;
2435
+ attributes: {
2436
+ [key: string]: unknown;
2437
+ };
2438
+ traceId: string | null;
2439
+ };
2440
+ type ListDeveloperRequestsResponse = {
2441
+ requests: Array<DeveloperRequestItem>;
2442
+ };
2443
+ type ReviewDeveloperRequestResponse = {
2444
+ id: string;
2445
+ status: "pending" | "approved" | "rejected" | "cancelled";
2446
+ };
2447
+ type ReviewDeveloperRequest = {
2448
+ decision: "approve" | "reject";
2449
+ notes?: string;
2450
+ };
2451
+ type AdminDeveloperListResponse = {
2452
+ developers: Array<AdminDeveloperListItem>;
2453
+ };
2454
+ type AdminDeveloperListItem = {
2455
+ userId: string;
2456
+ email: string;
2457
+ displayName: string | null;
2458
+ image: string | null;
2459
+ studio: DeveloperProfile | null;
2460
+ apps: Array<AdminDeveloperAppItem>;
2461
+ grantedAt: string | null;
2462
+ };
2463
+ type AdminDeveloperAppItem = {
2464
+ id: string;
2465
+ name: string;
2466
+ environment: "development" | "production";
2467
+ logoUrl: string | null;
2468
+ productionApprovedAt: string | null;
2469
+ createdAt: string;
2470
+ };
2471
+ type AdminAppPageListResponse = {
2472
+ items: Array<AdminAppPageItem>;
2473
+ };
2474
+ type AdminAppPageItem = {
2475
+ appId: string;
2476
+ appName: string;
2477
+ ownerDisplayName: string | null;
2478
+ ownerImage: string | null;
2479
+ ownerUserId: string;
2480
+ ownerEmail: string | null;
2481
+ appLogoUrl: string | null;
2482
+ slug: string | null;
2483
+ status: "draft" | "pending_review" | "published" | "hidden";
2484
+ categories: AppPageCategories;
2485
+ tagline: string | null;
2486
+ submittedAt: string | null;
2487
+ firstPublishedAt: string | null;
2488
+ hiddenAt: string | null;
2489
+ hiddenReasonInternal: string | null;
2490
+ pendingChangesSubmittedAt: string | null;
2491
+ };
2492
+ type AdminAppPageStatusResponse = {
2493
+ status: "draft" | "pending_review" | "published" | "hidden";
2494
+ };
2495
+ type HideAppPage = {
2496
+ reasonPublic: string;
2497
+ reasonInternal?: string;
2498
+ };
2499
+ type ReviewAppPage = {
2500
+ decision: "approve";
2501
+ } | {
2502
+ decision: "reject";
2503
+ notes: string;
2504
+ };
2505
+ type AdminAppPageDiffResponse = {
2506
+ appId: string;
2507
+ submittedAt: string | null;
2508
+ changes: Array<AdminAppPageDiffField>;
2509
+ };
2510
+ type AdminAppPageDiffField = {
2511
+ field: string;
2512
+ label: string;
2513
+ from: string;
2514
+ to: string;
2515
+ };
2516
+ type PlatformFeesResponse = {
2517
+ purchaseFeeBps: number;
2518
+ stakeFeeBps: number;
2519
+ updatedAt: string;
2520
+ updatedBy: string | null;
2521
+ };
2522
+ type UpdatePlatformFeesResponse = {
2523
+ purchaseFeeBps: number;
2524
+ stakeFeeBps: number;
2525
+ updatedAt: string;
2526
+ updatedBy: string | null;
2527
+ envelopes: Array<PlatformFeeEnvelope>;
2528
+ };
2529
+ type PlatformFeeEnvelope = {
2530
+ target: "purchase";
2531
+ envelope: CalldataEnvelope;
2532
+ };
2533
+ type CalldataEnvelope = {
2534
+ chain: string;
2535
+ chainId: number;
2536
+ to: string;
2537
+ calldataHex: string;
2538
+ };
2539
+ type UpdatePlatformFeesRequest = {
2540
+ purchaseFeeBps?: number;
2541
+ stakeFeeBps?: number;
2542
+ };
2543
+ type AppFeeConfigResponse = {
2544
+ appId: string;
2545
+ platformFeeBps: number | null;
2546
+ rakeCapBps: number | null;
2547
+ effectivePlatformFeeBps: number;
2548
+ effectiveRakeCapBps: number;
2549
+ updatedAt: string | null;
2550
+ updatedBy: string | null;
2551
+ };
2552
+ type UpdateAppFeeConfigRequest = {
2553
+ platformFeeBps?: number | null;
2554
+ rakeCapBps?: number | null;
2555
+ };
2556
+ type SetProcessorWhitelistRequest = {
2557
+ chain: string;
2558
+ vaultAddress: string;
2559
+ processorAddress: string;
2560
+ action: "add" | "remove";
2561
+ };
2562
+ type RotateProcessorTreasuryRequest = {
2563
+ chain: string;
2564
+ processorAddress: string;
2565
+ newTreasury: string;
2566
+ };
2567
+ type AppealBlacklistEntry = {
2568
+ chain: string;
2569
+ walletAddress: string;
2570
+ reason: string;
2571
+ flaggedBy: string;
2572
+ createdAt: string;
2573
+ updatedAt: string;
2574
+ };
2575
+ type AppealBlacklistAddRequest = {
2576
+ chain: string;
2577
+ walletAddress: string;
2578
+ reason: string;
2579
+ };
2580
+ type AppealBlacklistRemoveResponse = {
2581
+ chain: string;
2582
+ walletAddress: string;
2583
+ removed: true;
2584
+ };
2585
+ type AppealBlacklistRemoveRequest = {
2586
+ chain: string;
2587
+ walletAddress: string;
2588
+ };
2589
+ type AppealBlacklistListResponse = {
2590
+ entries: Array<AppealBlacklistEntry>;
2591
+ };
2592
+ type SetOperatorRequest = {
2593
+ chain: string;
2594
+ target: "router" | "credit_vault" | "platform_vault";
2595
+ newOperator: string;
2596
+ };
2597
+ type PauseRequest = {
2598
+ chain: string;
2599
+ target: "router" | "credit_vault" | "platform_vault";
2600
+ action: "pause" | "unpause";
2601
+ };
2602
+ type SetDefaultWithdrawLockRequest = {
2603
+ chain: string;
2604
+ vaultAddress: string;
2605
+ lockSeconds: number;
2606
+ };
2607
+ type SetWithdrawLockOverrideRequest = {
2608
+ chain: string;
2609
+ account: string;
2610
+ lockSeconds: number;
2611
+ };
2612
+ type ListAppealsResponse = {
2613
+ appeals: Array<AppealStatusRow>;
2614
+ nextCursorFiledAt: string | null;
2615
+ };
2616
+ type AppealStatusRow = {
2617
+ appealId: string;
2618
+ paymentId: string;
2619
+ chain: string;
2620
+ vault: string;
2621
+ appellant: string;
2622
+ amount: string;
2623
+ token: string;
2624
+ status: "open" | "resolved_refund" | "resolved_dismiss" | "cancelled" | "force_cancelled";
2625
+ reason: string | null;
2626
+ filedAt: string;
2627
+ resolvedAt: string | null;
2628
+ resolvedBy: string | null;
2629
+ resolutionNotes: string | null;
2630
+ };
2631
+ type AppealRoomView = {
2632
+ appealId: string;
2633
+ threadId: string | null;
2634
+ status: AppealRoomStatus;
2635
+ readOnly: boolean;
2636
+ canResolve: boolean;
2637
+ detail: AppealRoomDetail;
2638
+ messages: Array<AppealRoomMessage>;
2639
+ };
2640
+ type AppealRoomStatus = "pending_onchain" | "open" | "resolved_refund" | "resolved_dismiss" | "cancelled" | "force_cancelled";
2641
+ type AppealRoomDetail = {
2642
+ source: AppealRoomSource;
2643
+ chain: string;
2644
+ amount: string;
2645
+ token: string;
2646
+ vault: string;
2647
+ depositId: string | null;
2648
+ paymentId: string | null;
2649
+ appellant: string;
2650
+ appellantUserId: string | null;
2651
+ respondent: string | null;
2652
+ respondentUserId: string | null;
2653
+ reason: string | null;
2654
+ filedAt: string;
2655
+ resolvedAt: string | null;
2656
+ resolution: {
2657
+ resolutionId: string;
2658
+ outcome: number;
2659
+ deadline: number;
2660
+ signature: string;
2661
+ } | null;
2662
+ refundClaimedAt: string | null;
2663
+ };
2664
+ type AppealRoomSource = "purchase" | "pot" | "matured";
2665
+ type AppealRoomMessage = {
2666
+ id: string;
2667
+ senderUserId: string | null;
2668
+ senderRole: AppealRoomSenderRole;
2669
+ body: string | null;
2670
+ attachments: Array<MessageAttachment>;
2671
+ sentAt: string;
2672
+ };
2673
+ type AppealRoomSenderRole = "party" | "admin" | "system";
2674
+ type AppealRoomPostResponse = {
2675
+ message: AppealRoomMessage;
2676
+ };
2677
+ type AppealRoomPostRequest = {
2678
+ body?: string;
2679
+ attachmentIds?: Array<string>;
2680
+ };
2681
+ type AppealResolveSignedResponse = {
2682
+ appealId: string;
2683
+ resolutionId: string;
2684
+ chain: string;
2685
+ chainId: number;
2686
+ vault: string;
2687
+ outcome: number;
2688
+ deadline: number;
2689
+ signature: string;
2690
+ status: "resolved_refund" | "resolved_dismiss";
2691
+ };
2692
+ type AppealResolveRequest = {
2693
+ decision: "refund" | "dismiss";
2694
+ notes?: string;
2695
+ };
2696
+ type AppealFileResponse = {
2697
+ appealId: string;
2698
+ paymentId: string;
2699
+ chain: string;
2700
+ chainId: number;
2701
+ vault: string;
2702
+ appellant: string;
2703
+ amount: string;
2704
+ deadline: number;
2705
+ signature: string;
2706
+ };
2707
+ type AppealFileRequest = {
2708
+ paymentId: string;
2709
+ amount: string;
2710
+ reason: string;
2711
+ };
2712
+ type AppealPotLegFileRequest = {
2713
+ legId: string;
2714
+ reason: string;
2715
+ };
2716
+ type GetOauthPaymentsPriceData = {
2717
+ body?: never;
2718
+ path?: never;
2719
+ query: {
2720
+ chain: string;
2721
+ token: string;
2722
+ amount?: string;
2723
+ usdCents?: number | null;
2724
+ };
2725
+ url: "/oauth/payments/price";
2726
+ };
2727
+ type PostMeDeveloperAppsByAppIdPageBannerResponses = {
2728
+ /**
2729
+ * Versioned public URL for the stored banner
2730
+ */
2731
+ 200: {
2732
+ bannerUrl: string;
2733
+ };
2734
+ };
2735
+ type PostMeDeveloperAppsByAppIdPageBannerResponse = PostMeDeveloperAppsByAppIdPageBannerResponses[keyof PostMeDeveloperAppsByAppIdPageBannerResponses];
2736
+ type PostMeDeveloperAppsByAppIdPageThumbnailResponses = {
2737
+ /**
2738
+ * Versioned public URL for the stored thumbnail
2739
+ */
2740
+ 200: {
2741
+ thumbnailUrl: string;
2742
+ };
2743
+ };
2744
+ type PostMeDeveloperAppsByAppIdPageThumbnailResponse = PostMeDeveloperAppsByAppIdPageThumbnailResponses[keyof PostMeDeveloperAppsByAppIdPageThumbnailResponses];
2745
+ type PostMeDeveloperAppsByAppIdPageThumbnailVideoResponses = {
2746
+ /**
2747
+ * Versioned public URL for the stored thumbnail video
2748
+ */
2749
+ 200: {
2750
+ thumbnailVideoUrl: string;
2751
+ };
2752
+ };
2753
+ type PostMeDeveloperAppsByAppIdPageThumbnailVideoResponse = PostMeDeveloperAppsByAppIdPageThumbnailVideoResponses[keyof PostMeDeveloperAppsByAppIdPageThumbnailVideoResponses];
2754
+ //#endregion
2755
+ //#region src/account/avatar.d.ts
2756
+ declare function uploadAvatar(context: TransportContext, input: {
2757
+ readonly bearer: string;
2758
+ readonly file: Blob | ArrayBufferView | ArrayBuffer;
2759
+ readonly filename: string;
2760
+ readonly contentType: string;
2761
+ }): Promise<AuthUser>;
2762
+ declare function deleteAvatar(context: TransportContext, input: {
2763
+ readonly bearer: string;
2764
+ }): Promise<AuthUser>;
2765
+ //#endregion
2766
+ //#region src/account/giphy.d.ts
2767
+ declare function searchGiphy(context: TransportContext, input: {
2768
+ readonly bearer: string;
2769
+ readonly q: string;
2770
+ }): Promise<GiphySearchResponse>;
2771
+ //#endregion
2772
+ //#region src/account/payment-authorizations.d.ts
2773
+ declare function listPaymentAuthorizations(context: TransportContext, input: {
2774
+ readonly bearer: string;
2775
+ }): Promise<ListAppPaymentAuthorizationsResponse>;
2776
+ declare function updatePaymentAuthorization(context: TransportContext, input: {
2777
+ readonly bearer: string;
2778
+ readonly consentId: string;
2779
+ readonly body: UpdateAppPaymentAuthorization;
2780
+ }): Promise<void>;
2781
+ declare function revokePaymentAuthorization(context: TransportContext, input: {
2782
+ readonly bearer: string;
2783
+ readonly consentId: string;
2784
+ }): Promise<void>;
2785
+ //#endregion
2786
+ //#region src/account/presence-heartbeat.d.ts
2787
+ declare function sendPresenceHeartbeat(context: TransportContext, input: {
2788
+ readonly bearer: string;
2789
+ }): Promise<WebPresenceHeartbeatAck>;
2790
+ //#endregion
2791
+ //#region src/account/profile.d.ts
2792
+ declare function updateProfile(context: TransportContext, input: {
2793
+ readonly bearer: string;
2794
+ readonly body: ProfileUpdate;
2795
+ }): Promise<AuthUser>;
2796
+ //#endregion
2797
+ //#region src/admin/active-players.d.ts
2798
+ declare function listActivePlayers(context: TransportContext, input: {
2799
+ readonly bearer: string;
2800
+ }): Promise<AdminActivePlayersResponse>;
2801
+ //#endregion
2802
+ //#region src/admin/app-pages.d.ts
2803
+ declare function listAppPages(context: TransportContext, input: {
2804
+ readonly bearer: string;
2805
+ readonly status?: "draft" | "pending_review" | "published" | "hidden" | "all" | "pending_changes";
2806
+ }): Promise<AdminAppPageListResponse>;
2807
+ declare function getAppPageChanges(context: TransportContext, input: {
2808
+ readonly bearer: string;
2809
+ readonly appId: string;
2810
+ }): Promise<AdminAppPageDiffResponse>;
2811
+ declare function reviewAppPageChanges(context: TransportContext, input: {
2812
+ readonly bearer: string;
2813
+ readonly appId: string;
2814
+ readonly body: ReviewAppPage;
2815
+ }): Promise<AdminAppPageStatusResponse>;
2816
+ declare function hideAppPage(context: TransportContext, input: {
2817
+ readonly bearer: string;
2818
+ readonly appId: string;
2819
+ readonly body: HideAppPage;
2820
+ }): Promise<AdminAppPageStatusResponse>;
2821
+ declare function unhideAppPage(context: TransportContext, input: {
2822
+ readonly bearer: string;
2823
+ readonly appId: string;
2824
+ }): Promise<AdminAppPageStatusResponse>;
2825
+ declare function reviewAppPage(context: TransportContext, input: {
2826
+ readonly bearer: string;
2827
+ readonly appId: string;
2828
+ readonly body: ReviewAppPage;
2829
+ }): Promise<AdminAppPageStatusResponse>;
2830
+ //#endregion
2831
+ //#region src/admin/appeals.d.ts
2832
+ declare function listAppealQueue(context: TransportContext, input: {
2833
+ readonly bearer: string;
2834
+ readonly statuses?: readonly AppealStatusRow["status"][];
2835
+ readonly chain?: string;
2836
+ readonly cursorFiledAt?: string;
2837
+ readonly limit?: number;
2838
+ }): Promise<ListAppealsResponse>;
2839
+ declare function getAdminAppealRoom(context: TransportContext, input: {
2840
+ readonly bearer: string;
2841
+ readonly appealId: string;
2842
+ }): Promise<AppealRoomView>;
2843
+ declare function postAdminAppealRoomMessage(context: TransportContext, input: {
2844
+ readonly bearer: string;
2845
+ readonly appealId: string;
2846
+ readonly body: AppealRoomPostRequest;
2847
+ }): Promise<AppealRoomPostResponse>;
2848
+ declare function uploadAdminAppealRoomAttachment(context: TransportContext, input: {
2849
+ readonly bearer: string;
2850
+ readonly appealId: string;
2851
+ readonly file: Blob | ArrayBufferView | ArrayBuffer;
2852
+ readonly filename: string;
2853
+ readonly contentType: string;
2854
+ }): Promise<UploadAttachmentResponse>;
2855
+ declare function resolveAppeal(context: TransportContext, input: {
2856
+ readonly bearer: string;
2857
+ readonly appealId: string;
2858
+ readonly body: AppealResolveRequest;
2859
+ }): Promise<AppealResolveSignedResponse>;
2860
+ //#endregion
2861
+ //#region src/admin/developers.d.ts
2862
+ declare function listDeveloperRequests(context: TransportContext, input: {
2863
+ readonly bearer: string;
2864
+ readonly status?: "pending" | "approved" | "rejected" | "cancelled";
2865
+ readonly kind?: "role" | "production";
2866
+ }): Promise<ListDeveloperRequestsResponse>;
2867
+ declare function reviewDeveloperRequest(context: TransportContext, input: {
2868
+ readonly bearer: string;
2869
+ readonly id: string;
2870
+ readonly body: ReviewDeveloperRequest;
2871
+ }): Promise<ReviewDeveloperRequestResponse>;
2872
+ declare function listDevelopers(context: TransportContext, input: {
2873
+ readonly bearer: string;
2874
+ }): Promise<AdminDeveloperListResponse>;
2875
+ //#endregion
2876
+ //#region src/admin/inventory-vault.d.ts
2877
+ declare function forceWithdrawVaultCustody(context: TransportContext, input: {
2878
+ readonly bearer: string;
2879
+ readonly custodyId: string;
2880
+ }): Promise<InventoryVaultForceWithdrawResponse>;
2881
+ //#endregion
2882
+ //#region src/admin/payments.d.ts
2883
+ declare function getPlatformFees(context: TransportContext, input: {
2884
+ readonly bearer: string;
2885
+ }): Promise<PlatformFeesResponse>;
2886
+ declare function updatePlatformFees(context: TransportContext, input: {
2887
+ readonly bearer: string;
2888
+ readonly body: UpdatePlatformFeesRequest;
2889
+ }): Promise<UpdatePlatformFeesResponse>;
2890
+ declare function getAppFeeConfig(context: TransportContext, input: {
2891
+ readonly bearer: string;
2892
+ readonly appId: string;
2893
+ }): Promise<AppFeeConfigResponse>;
2894
+ declare function updateAppFeeConfig(context: TransportContext, input: {
2895
+ readonly bearer: string;
2896
+ readonly appId: string;
2897
+ readonly body: UpdateAppFeeConfigRequest;
2898
+ }): Promise<AppFeeConfigResponse>;
2899
+ declare function setProcessorWhitelist(context: TransportContext, input: {
2900
+ readonly bearer: string;
2901
+ readonly body: SetProcessorWhitelistRequest;
2902
+ }): Promise<CalldataEnvelope>;
2903
+ declare function rotateProcessorTreasury(context: TransportContext, input: {
2904
+ readonly bearer: string;
2905
+ readonly processorId: string;
2906
+ readonly body: RotateProcessorTreasuryRequest;
2907
+ }): Promise<CalldataEnvelope>;
2908
+ declare function setVaultOperator(context: TransportContext, input: {
2909
+ readonly bearer: string;
2910
+ readonly vaultAddress: string;
2911
+ readonly body: SetOperatorRequest;
2912
+ }): Promise<CalldataEnvelope>;
2913
+ declare function setVaultPause(context: TransportContext, input: {
2914
+ readonly bearer: string;
2915
+ readonly vaultAddress: string;
2916
+ readonly body: PauseRequest;
2917
+ }): Promise<CalldataEnvelope>;
2918
+ declare function setVaultWithdrawLockDefault(context: TransportContext, input: {
2919
+ readonly bearer: string;
2920
+ readonly vaultAddress: string;
2921
+ readonly body: SetDefaultWithdrawLockRequest;
2922
+ }): Promise<CalldataEnvelope>;
2923
+ declare function setVaultWithdrawLockOverride(context: TransportContext, input: {
2924
+ readonly bearer: string;
2925
+ readonly vaultAddress: string;
2926
+ readonly body: SetWithdrawLockOverrideRequest;
2927
+ }): Promise<CalldataEnvelope>;
2928
+ declare function addAppealBlacklist(context: TransportContext, input: {
2929
+ readonly bearer: string;
2930
+ readonly body: AppealBlacklistAddRequest;
2931
+ }): Promise<AppealBlacklistEntry>;
2932
+ declare function removeAppealBlacklist(context: TransportContext, input: {
2933
+ readonly bearer: string;
2934
+ readonly body: AppealBlacklistRemoveRequest;
2935
+ }): Promise<AppealBlacklistRemoveResponse>;
2936
+ declare function listAppealBlacklist(context: TransportContext, input: {
2937
+ readonly bearer: string;
2938
+ readonly chain?: string;
2939
+ }): Promise<AppealBlacklistListResponse>;
2940
+ //#endregion
2941
+ //#region src/admin/tron-cashouts.d.ts
2942
+ declare function listTronCashoutQueue(context: TransportContext, input: {
2943
+ readonly bearer: string;
2944
+ readonly status?: AdminTronCashoutItem["status"];
2945
+ }): Promise<AdminTronCashoutListResponse>;
2946
+ declare function approveTronCashout(context: TransportContext, input: {
2947
+ readonly bearer: string;
2948
+ readonly id: string;
2949
+ }): Promise<AdminTronCashoutItem>;
2950
+ declare function rejectTronCashout(context: TransportContext, input: {
2951
+ readonly bearer: string;
2952
+ readonly id: string;
2953
+ readonly body: AdminTronCashoutRejectRequest;
2954
+ }): Promise<AdminTronCashoutItem>;
2955
+ //#endregion
2956
+ //#region src/admin/users.d.ts
2957
+ declare function listAdmins(context: TransportContext, input: {
2958
+ readonly bearer: string;
2959
+ }): Promise<ListAdminsResponse>;
2960
+ declare function addAdmin(context: TransportContext, input: {
2961
+ readonly bearer: string;
2962
+ readonly body: AddAdminRequest;
2963
+ }): Promise<AdminMutationResponse>;
2964
+ declare function updateAdminRole(context: TransportContext, input: {
2965
+ readonly bearer: string;
2966
+ readonly id: string;
2967
+ readonly body: UpdateAdminRoleRequest;
2968
+ }): Promise<AdminRoleChangeResponse>;
2969
+ declare function removeAdmin(context: TransportContext, input: {
2970
+ readonly bearer: string;
2971
+ readonly id: string;
2972
+ }): Promise<AdminMutationResponse>;
2973
+ declare function listUsers(context: TransportContext, input: {
2974
+ readonly bearer: string;
2975
+ readonly search?: string;
2976
+ readonly offset?: number;
2977
+ readonly limit?: number;
2978
+ }): Promise<AdminUserListResponse>;
2979
+ declare function updateUserBan(context: TransportContext, input: {
2980
+ readonly bearer: string;
2981
+ readonly id: string;
2982
+ readonly body: AdminUserBanRequest;
2983
+ }): Promise<AdminUserBanResponse>;
2984
+ declare function listAudit(context: TransportContext, input: {
2985
+ readonly bearer: string;
2986
+ readonly action?: string;
2987
+ readonly actorId?: string;
2988
+ readonly targetType?: string;
2989
+ readonly targetId?: string;
2990
+ readonly offset?: number;
2991
+ readonly limit?: number;
2992
+ }): Promise<AdminAuditListResponse>;
2993
+ //#endregion
2994
+ //#region src/catalog/app-page.d.ts
2995
+ declare function getAppPage(context: TransportContext, input: {
2996
+ readonly bearer?: string;
2997
+ readonly slug: string;
2998
+ }): Promise<PublicAppPage>;
2999
+ //#endregion
3000
+ //#region src/catalog/content-reports.d.ts
3001
+ declare function submitAppContentReport(context: TransportContext, input: {
3002
+ readonly appId: string;
3003
+ readonly bearer: string;
3004
+ readonly report: SubmitAppContentReportRequest;
3005
+ }): Promise<SubmitAppContentReportResponse>;
3006
+ //#endregion
3007
+ //#region src/catalog/library.d.ts
3008
+ declare function getLibrary(context: TransportContext, input: {
3009
+ readonly bearer?: string;
3010
+ readonly genre?: string;
3011
+ readonly q?: string;
3012
+ readonly before?: string;
3013
+ readonly limit?: number;
3014
+ }): Promise<LibraryListResponse>;
3015
+ //#endregion
3016
+ //#region src/catalog/reviews.d.ts
3017
+ declare function listGameReviews(context: TransportContext, input: {
3018
+ readonly slug: string;
3019
+ readonly bearer?: string;
3020
+ readonly sort?: ReviewSort;
3021
+ readonly limit?: number;
3022
+ readonly offset?: number;
3023
+ }): Promise<ReviewListResponse>;
3024
+ declare function listDeveloperAppReviews(context: TransportContext, input: {
3025
+ readonly appId: string;
3026
+ readonly bearer: string;
3027
+ readonly sort?: ReviewSort;
3028
+ readonly limit?: number;
3029
+ readonly offset?: number;
3030
+ }): Promise<ReviewListResponse>;
3031
+ declare function getMyGameReview(context: TransportContext, input: {
3032
+ readonly slug: string;
3033
+ readonly bearer: string;
3034
+ }): Promise<MyReviewResponse>;
3035
+ declare function upsertMyGameReview(context: TransportContext, input: {
3036
+ readonly slug: string;
3037
+ readonly bearer: string;
3038
+ readonly review: UpsertReviewRequest;
3039
+ }): Promise<MyReviewResponse>;
3040
+ declare function deleteMyGameReview(context: TransportContext, input: {
3041
+ readonly slug: string;
3042
+ readonly bearer: string;
3043
+ }): Promise<MyReviewResponse>;
3044
+ declare function getMyGameReviewReactions(context: TransportContext, input: {
3045
+ readonly slug: string;
3046
+ readonly bearer: string;
3047
+ }): Promise<MyReviewReactionsResponse>;
3048
+ declare function setMyGameReviewReaction(context: TransportContext, input: {
3049
+ readonly slug: string;
3050
+ readonly reviewId: string;
3051
+ readonly bearer: string;
3052
+ readonly reaction: SetReviewReactionRequest;
3053
+ }): Promise<SetReviewReactionResponse>;
3054
+ declare function tipGameReview(context: TransportContext, input: {
3055
+ readonly slug: string;
3056
+ readonly reviewId: string;
3057
+ readonly bearer: string;
3058
+ readonly tip: TipReviewRequest;
3059
+ readonly idempotencyKey?: string;
3060
+ }): Promise<TipReviewResponse>;
3061
+ declare function listGameReviewComments(context: TransportContext, input: {
3062
+ readonly slug: string;
3063
+ readonly reviewId: string;
3064
+ readonly bearer?: string;
3065
+ readonly limit?: number;
3066
+ readonly offset?: number;
3067
+ }): Promise<ReviewCommentListResponse>;
3068
+ declare function commentOnGameReview(context: TransportContext, input: {
3069
+ readonly slug: string;
3070
+ readonly reviewId: string;
3071
+ readonly bearer: string;
3072
+ readonly comment: CreateReviewCommentRequest;
3073
+ }): Promise<CreateReviewCommentResponse>;
3074
+ declare function deleteGameReviewComment(context: TransportContext, input: {
3075
+ readonly slug: string;
3076
+ readonly commentId: string;
3077
+ readonly bearer: string;
3078
+ }): Promise<DeleteReviewCommentResponse>;
3079
+ declare function replyToGameReview(context: TransportContext, input: {
3080
+ readonly appId: string;
3081
+ readonly reviewId: string;
3082
+ readonly bearer: string;
3083
+ readonly reply: UpsertReviewReplyRequest;
3084
+ }): Promise<ReviewReplyResponse>;
3085
+ declare function deleteGameReviewReply(context: TransportContext, input: {
3086
+ readonly appId: string;
3087
+ readonly reviewId: string;
3088
+ readonly bearer: string;
3089
+ }): Promise<ReviewReplyResponse>;
3090
+ //#endregion
3091
+ //#region src/core/errors.d.ts
3092
+ type OauthErrorCode = OauthErrorResponse["error"];
3093
+ declare class TronError extends Error {
3094
+ readonly status: number;
3095
+ readonly code: string;
3096
+ readonly body: string;
3097
+ constructor(status: number, code: string, message: string, body: string);
3098
+ }
3099
+ declare class TronOauthError extends TronError {
3100
+ readonly error: OauthErrorCode;
3101
+ readonly errorDescription?: string | undefined;
3102
+ readonly errorUri?: string | undefined;
3103
+ constructor(status: number, error: OauthErrorCode, body: string, errorDescription?: string, errorUri?: string);
3104
+ }
3105
+ declare const TRON_WS_CLOSE_CODES: {
3106
+ readonly BAD_REQUEST: 4400;
3107
+ readonly UNAUTHORIZED: 4401;
3108
+ readonly FORBIDDEN: 4403;
3109
+ readonly NOT_FOUND: 4404;
3110
+ readonly UNAVAILABLE: 4503;
3111
+ };
3112
+ type TronWsCloseCode = (typeof TRON_WS_CLOSE_CODES)[keyof typeof TRON_WS_CLOSE_CODES];
3113
+ declare class TronWsCloseError extends Error {
3114
+ readonly code: number;
3115
+ readonly reason: string;
3116
+ constructor(code: number, reason: string);
3117
+ get isApplicationError(): boolean;
3118
+ get isPermanent(): boolean;
3119
+ }
3120
+ //#endregion
3121
+ //#region src/core/logger.d.ts
3122
+ declare function createNoopLogger(): Logger;
3123
+ declare function createConsoleLogger(prefix?: string): Logger;
3124
+ //#endregion
3125
+ //#region src/core/token-store.d.ts
3126
+ declare function createInMemoryTokenStore(): TokenStore;
3127
+ //#endregion
3128
+ //#region src/dashboard/activity.d.ts
3129
+ declare function getActivity(context: TransportContext, input: {
3130
+ readonly bearer: string;
3131
+ readonly kind?: string;
3132
+ readonly direction?: "outgoing" | "incoming";
3133
+ readonly sort?: "newest" | "oldest" | "value_desc" | "value_asc";
3134
+ readonly chain?: string;
3135
+ readonly limit?: number;
3136
+ readonly cursor?: string;
3137
+ readonly before?: string;
3138
+ readonly includeInactive?: boolean;
3139
+ }): Promise<ActivityResponse>;
3140
+ declare function getActivityGroup(context: TransportContext, input: {
3141
+ readonly bearer: string;
3142
+ readonly groupId: string;
3143
+ }): Promise<ActivityResponse>;
3144
+ //#endregion
3145
+ //#region src/dashboard/chains.d.ts
3146
+ declare function getPaymentChains(context: TransportContext, input: {
3147
+ readonly bearer: string;
3148
+ }): Promise<PaymentChainsResponse>;
3149
+ //#endregion
3150
+ //#region src/dashboard/outstanding.d.ts
3151
+ declare function getOutstanding(context: TransportContext, input: {
3152
+ readonly bearer: string;
3153
+ readonly chain?: string;
3154
+ }): Promise<OutstandingResponse>;
3155
+ //#endregion
3156
+ //#region src/dashboard/payment-history.d.ts
3157
+ declare function getPaymentHistory(context: TransportContext, input: {
3158
+ readonly bearer: string;
3159
+ readonly status?: "pending" | "completed" | "expired" | "all";
3160
+ readonly limit?: number;
3161
+ readonly before?: string;
3162
+ }): Promise<PaymentHistoryResponse>;
3163
+ //#endregion
3164
+ //#region src/developer/api-keys.d.ts
3165
+ declare function createDeveloperApiKey(context: TransportContext, input: {
3166
+ readonly bearer: string;
3167
+ readonly body: CreateDeveloperApiKey;
3168
+ }): Promise<CreateDeveloperApiKeyResponse>;
3169
+ declare function listDeveloperApiKeys(context: TransportContext, input: {
3170
+ readonly bearer: string;
3171
+ }): Promise<DeveloperApiKeysResponse>;
3172
+ declare function revokeDeveloperApiKey(context: TransportContext, input: {
3173
+ readonly bearer: string;
3174
+ readonly id: string;
3175
+ }): Promise<DeveloperOkResponse>;
3176
+ //#endregion
3177
+ //#region src/developer/apps.d.ts
3178
+ declare function createDeveloperApp(context: TransportContext, input: {
3179
+ readonly bearer: string;
3180
+ readonly body: CreateDeveloperApp;
3181
+ }): Promise<DeveloperAppIdResponse>;
3182
+ declare function updateDeveloperApp(context: TransportContext, input: {
3183
+ readonly bearer: string;
3184
+ readonly id: string;
3185
+ readonly body: UpdateDeveloperApp;
3186
+ }): Promise<DeveloperAppIdResponse>;
3187
+ declare function deleteDeveloperApp(context: TransportContext, input: {
3188
+ readonly bearer: string;
3189
+ readonly id: string;
3190
+ }): Promise<DeveloperAppIdResponse>;
3191
+ declare function uploadDeveloperAppLogo(context: TransportContext, input: {
3192
+ readonly bearer: string;
3193
+ readonly id: string;
3194
+ readonly file: Blob | ArrayBufferView | ArrayBuffer;
3195
+ readonly filename: string;
3196
+ readonly contentType: string;
3197
+ }): Promise<DeveloperLogoUploadResponse>;
3198
+ declare function deleteDeveloperAppLogo(context: TransportContext, input: {
3199
+ readonly bearer: string;
3200
+ readonly id: string;
3201
+ }): Promise<DeveloperLogoUploadResponse>;
3202
+ declare function getDeveloperAppBalances(context: TransportContext, input: {
3203
+ readonly bearer: string;
3204
+ readonly id: string;
3205
+ }): Promise<DeveloperAppBalancesResponse>;
3206
+ declare function getDeveloperAppTronBalance(context: TransportContext, input: {
3207
+ readonly bearer: string;
3208
+ readonly id: string;
3209
+ }): Promise<DeveloperAppTronBalanceResponse>;
3210
+ declare function getDeveloperAppActivity(context: TransportContext, input: {
3211
+ readonly bearer: string;
3212
+ readonly id: string;
3213
+ readonly kind?: string;
3214
+ readonly direction?: "outgoing" | "incoming";
3215
+ readonly sort?: "newest" | "oldest" | "value_desc" | "value_asc";
3216
+ readonly chain?: string;
3217
+ readonly limit?: number;
3218
+ readonly cursor?: string;
3219
+ readonly before?: string;
3220
+ }): Promise<ActivityResponse>;
3221
+ declare function getDeveloperAppEarnings(context: TransportContext, input: {
3222
+ readonly bearer: string;
3223
+ readonly id: string;
3224
+ readonly range?: string;
3225
+ readonly chain?: string;
3226
+ }): Promise<DeveloperAppEarningsResponse>;
3227
+ declare function getDeveloperAppPlaytime(context: TransportContext, input: {
3228
+ readonly bearer: string;
3229
+ readonly id: string;
3230
+ readonly range?: string;
3231
+ }): Promise<DeveloperAppPlaytimeResponse>;
3232
+ declare function getDeveloperAppOverview(context: TransportContext, input: {
3233
+ readonly bearer: string;
3234
+ readonly id: string;
3235
+ }): Promise<DeveloperAppOverviewResponse>;
3236
+ declare function getDeveloperAppWallets(context: TransportContext, input: {
3237
+ readonly bearer: string;
3238
+ readonly id: string;
3239
+ }): Promise<DeveloperAppWalletsResponse>;
3240
+ declare function updateDeveloperAppAutoSweep(context: TransportContext, input: {
3241
+ readonly bearer: string;
3242
+ readonly id: string;
3243
+ readonly chain: string;
3244
+ readonly body: DeveloperAppAutoSweepRequest;
3245
+ }): Promise<DeveloperAppAutoSweepResponse>;
3246
+ declare function provisionDeveloperAppWallet(context: TransportContext, input: {
3247
+ readonly bearer: string;
3248
+ readonly id: string;
3249
+ readonly chain: string;
3250
+ }): Promise<DeveloperAppProvisionWalletResponse>;
3251
+ declare function withdrawDeveloperAppWallet(context: TransportContext, input: {
3252
+ readonly bearer: string;
3253
+ readonly id: string;
3254
+ readonly chain: string;
3255
+ readonly token?: string;
3256
+ }): Promise<DeveloperAppWithdrawResponse>;
3257
+ declare function consolidateDeveloperAppWallet(context: TransportContext, input: {
3258
+ readonly bearer: string;
3259
+ readonly id: string;
3260
+ readonly chain: string;
3261
+ }): Promise<DeveloperAppConsolidateResponse>;
3262
+ declare function rotateDeveloperAppKey(context: TransportContext, input: {
3263
+ readonly bearer: string;
3264
+ readonly id: string;
3265
+ readonly env: "development" | "production";
3266
+ }): Promise<RegenerateDeveloperAppKeyResponse>;
3267
+ declare function requestDeveloperAppProduction(context: TransportContext, input: {
3268
+ readonly bearer: string;
3269
+ readonly id: string;
3270
+ readonly body: CreateDeveloperProductionRequest;
3271
+ }): Promise<CreateDeveloperProductionRequestResponse>;
3272
+ declare function rotateDeveloperAppPaymentWebhookSecret(context: TransportContext, input: {
3273
+ readonly bearer: string;
3274
+ readonly id: string;
3275
+ }): Promise<RegenerateDeveloperAppWebhookSecretResponse>;
3276
+ declare function getDeveloperPaymentAppeals(context: TransportContext, input: {
3277
+ readonly bearer: string;
3278
+ readonly chain?: string;
3279
+ }): Promise<DevAppealsResponse>;
3280
+ declare function getDeveloperPaymentPendingDeposits(context: TransportContext, input: {
3281
+ readonly bearer: string;
3282
+ readonly chain?: string;
3283
+ }): Promise<DevPendingDepositsResponse>;
3284
+ declare function getDeveloperTronBalanceSummary(context: TransportContext, input: {
3285
+ readonly bearer: string;
3286
+ }): Promise<DeveloperTronBalanceSummaryResponse>;
3287
+ declare function listDeveloperAppContentReports(context: TransportContext, input: {
3288
+ readonly bearer: string;
3289
+ readonly id: string;
3290
+ readonly status?: AppContentReportStatus;
3291
+ readonly limit?: number;
3292
+ readonly offset?: number;
3293
+ }): Promise<AppContentReportListResponse>;
3294
+ declare function updateDeveloperAppContentReportStatus(context: TransportContext, input: {
3295
+ readonly bearer: string;
3296
+ readonly id: string;
3297
+ readonly reportId: string;
3298
+ readonly status: "acknowledged" | "dismissed";
3299
+ }): Promise<AppContentReport>;
3300
+ //#endregion
3301
+ //#region src/developer/inventory.d.ts
3302
+ declare function quoteDeveloperAppInventoryRegistration(context: TransportContext, input: {
3303
+ readonly bearer: string;
3304
+ readonly appId: string;
3305
+ readonly registration: InventoryItemRegistrationInput;
3306
+ }): Promise<InventoryRegistrationQuote>;
3307
+ declare function registerDeveloperAppInventoryItem(context: TransportContext, input: {
3308
+ readonly bearer: string;
3309
+ readonly appId: string;
3310
+ readonly registration: InventoryItemRegistrationInput;
3311
+ }): Promise<InventoryItemRegistrationResult>;
3312
+ declare function listDeveloperAppInventoryCollections(context: TransportContext, input: {
3313
+ readonly bearer: string;
3314
+ readonly appId: string;
3315
+ }): Promise<InventoryCollectionListResponse>;
3316
+ declare function listDeveloperAppInventoryItems(context: TransportContext, input: {
3317
+ readonly bearer: string;
3318
+ readonly appId: string;
3319
+ }): Promise<InventoryItemListResponse>;
3320
+ declare function createDeveloperAppMintPermit(context: TransportContext, input: {
3321
+ readonly bearer: string;
3322
+ readonly appId: string;
3323
+ readonly itemId: string;
3324
+ readonly grant: InventoryMintPermitCreateInput;
3325
+ }): Promise<InventoryMintPermitRecord>;
3326
+ declare function getDeveloperAppInventoryItemHolders(context: TransportContext, input: {
3327
+ readonly bearer: string;
3328
+ readonly appId: string;
3329
+ readonly itemId: string;
3330
+ }): Promise<InventoryItemHoldersResponse>;
3331
+ declare function uploadDeveloperAppInventoryItemImage(context: TransportContext, input: {
3332
+ readonly bearer: string;
3333
+ readonly appId: string;
3334
+ readonly itemId: string;
3335
+ readonly file: Blob | ArrayBufferView | ArrayBuffer;
3336
+ readonly filename: string;
3337
+ readonly contentType: string;
3338
+ }): Promise<InventoryItemRecord>;
3339
+ declare function uploadDeveloperAppInventoryItemBanner(context: TransportContext, input: {
3340
+ readonly bearer: string;
3341
+ readonly appId: string;
3342
+ readonly itemId: string;
3343
+ readonly file: Blob | ArrayBufferView | ArrayBuffer;
3344
+ readonly filename: string;
3345
+ readonly contentType: string;
3346
+ }): Promise<InventoryItemRecord>;
3347
+ //#endregion
3348
+ //#region src/developer/pages.d.ts
3349
+ declare function getDeveloperAppPage(context: TransportContext, input: {
3350
+ readonly bearer: string;
3351
+ readonly appId: string;
3352
+ }): Promise<AppPageDraft>;
3353
+ declare function updateAppPage(context: TransportContext, input: {
3354
+ readonly bearer: string;
3355
+ readonly appId: string;
3356
+ readonly body: UpdateAppPage;
3357
+ }): Promise<AppPageDraft>;
3358
+ declare function uploadAppPageBanner(context: TransportContext, input: {
3359
+ readonly bearer: string;
3360
+ readonly appId: string;
3361
+ readonly file: Blob | ArrayBufferView | ArrayBuffer;
3362
+ readonly filename: string;
3363
+ readonly contentType: string;
3364
+ }): Promise<PostMeDeveloperAppsByAppIdPageBannerResponse>;
3365
+ declare function deleteAppPageBanner(context: TransportContext, input: {
3366
+ readonly bearer: string;
3367
+ readonly appId: string;
3368
+ }): Promise<void>;
3369
+ declare function uploadAppPageThumbnail(context: TransportContext, input: {
3370
+ readonly bearer: string;
3371
+ readonly appId: string;
3372
+ readonly file: Blob | ArrayBufferView | ArrayBuffer;
3373
+ readonly filename: string;
3374
+ readonly contentType: string;
3375
+ }): Promise<PostMeDeveloperAppsByAppIdPageThumbnailResponse>;
3376
+ declare function deleteAppPageThumbnail(context: TransportContext, input: {
3377
+ readonly bearer: string;
3378
+ readonly appId: string;
3379
+ }): Promise<void>;
3380
+ declare function uploadAppPageThumbnailVideo(context: TransportContext, input: {
3381
+ readonly bearer: string;
3382
+ readonly appId: string;
3383
+ readonly file: Blob | ArrayBufferView | ArrayBuffer;
3384
+ readonly filename: string;
3385
+ readonly contentType: string;
3386
+ }): Promise<PostMeDeveloperAppsByAppIdPageThumbnailVideoResponse>;
3387
+ declare function deleteAppPageThumbnailVideo(context: TransportContext, input: {
3388
+ readonly bearer: string;
3389
+ readonly appId: string;
3390
+ }): Promise<void>;
3391
+ declare function uploadAppPageGallery(context: TransportContext, input: {
3392
+ readonly bearer: string;
3393
+ readonly appId: string;
3394
+ readonly file: Blob | ArrayBufferView | ArrayBuffer;
3395
+ readonly filename: string;
3396
+ readonly contentType: string;
3397
+ }): Promise<AppPageGalleryUploadResponse>;
3398
+ declare function submitAppPageForReview(context: TransportContext, input: {
3399
+ readonly bearer: string;
3400
+ readonly appId: string;
3401
+ }): Promise<AppPageDraft>;
3402
+ declare function unpublishAppPage(context: TransportContext, input: {
3403
+ readonly bearer: string;
3404
+ readonly appId: string;
3405
+ }): Promise<AppPageDraft>;
3406
+ //#endregion
3407
+ //#region src/developer/participants.d.ts
3408
+ declare function listDeveloperAppParticipants(context: TransportContext, input: {
3409
+ readonly bearer: string;
3410
+ readonly id: string;
3411
+ }): Promise<DeveloperAppParticipantsResponse>;
3412
+ declare function inviteDeveloperAppParticipant(context: TransportContext, input: {
3413
+ readonly bearer: string;
3414
+ readonly id: string;
3415
+ readonly body: InviteDeveloperAppParticipant;
3416
+ }): Promise<DeveloperAppParticipantsResponse>;
3417
+ declare function revokeDeveloperAppParticipant(context: TransportContext, input: {
3418
+ readonly bearer: string;
3419
+ readonly id: string;
3420
+ readonly userId: string;
3421
+ }): Promise<DeveloperOkResponse>;
3422
+ declare function listDeveloperInvites(context: TransportContext, input: {
3423
+ readonly bearer: string;
3424
+ }): Promise<DeveloperInvitesResponse>;
3425
+ declare function acceptDeveloperInvite(context: TransportContext, input: {
3426
+ readonly bearer: string;
3427
+ readonly appId: string;
3428
+ }): Promise<DeveloperOkResponse>;
3429
+ declare function declineDeveloperInvite(context: TransportContext, input: {
3430
+ readonly bearer: string;
3431
+ readonly appId: string;
3432
+ }): Promise<DeveloperOkResponse>;
3433
+ //#endregion
3434
+ //#region src/developer/profile.d.ts
3435
+ declare function getDeveloperStatus(context: TransportContext, input: {
3436
+ readonly bearer: string;
3437
+ }): Promise<DeveloperMeStatus>;
3438
+ declare function updateDeveloperProfile(context: TransportContext, input: {
3439
+ readonly bearer: string;
3440
+ readonly body: UpdateDeveloperProfile;
3441
+ }): Promise<DeveloperOkResponse>;
3442
+ declare function uploadDeveloperProfileLogo(context: TransportContext, input: {
3443
+ readonly bearer: string;
3444
+ readonly file: Blob | ArrayBufferView | ArrayBuffer;
3445
+ readonly filename: string;
3446
+ readonly contentType: string;
3447
+ }): Promise<DeveloperLogoUploadResponse>;
3448
+ declare function deleteDeveloperProfileLogo(context: TransportContext, input: {
3449
+ readonly bearer: string;
3450
+ }): Promise<DeveloperLogoUploadResponse>;
3451
+ declare function submitDeveloperRequest(context: TransportContext, input: {
3452
+ readonly bearer: string;
3453
+ readonly body: CreateDeveloperRoleRequest;
3454
+ }): Promise<DeveloperOkResponse>;
3455
+ declare function uploadDeveloperRequestLogo(context: TransportContext, input: {
3456
+ readonly bearer: string;
3457
+ readonly file: Blob | ArrayBufferView | ArrayBuffer;
3458
+ readonly filename: string;
3459
+ readonly contentType: string;
3460
+ }): Promise<DeveloperLogoUploadResponse>;
3461
+ declare function deleteDeveloperRequestLogo(context: TransportContext, input: {
3462
+ readonly bearer: string;
3463
+ }): Promise<DeveloperLogoUploadResponse>;
3464
+ declare function uploadMultipart(context: TransportContext, input: {
3465
+ readonly path: string;
3466
+ readonly bearer: string;
3467
+ readonly file: Blob | ArrayBufferView | ArrayBuffer;
3468
+ readonly filename: string;
3469
+ readonly contentType: string;
3470
+ }): Promise<unknown>;
3471
+ //#endregion
3472
+ //#region src/developer/vault.d.ts
3473
+ declare function createDeveloperVaultPermit(context: TransportContext, input: {
3474
+ readonly bearer: string;
3475
+ readonly appId: string;
3476
+ readonly itemId: string;
3477
+ readonly grant: InventoryVaultPermitCreateInput;
3478
+ }): Promise<InventoryVaultPermitRecord>;
3479
+ declare function createDeveloperWithdrawPermit(context: TransportContext, input: {
3480
+ readonly bearer: string;
3481
+ readonly appId: string;
3482
+ readonly itemId: string;
3483
+ readonly grant: InventoryWithdrawPermitCreateInput;
3484
+ }): Promise<InventoryVaultPermitRecord>;
3485
+ //#endregion
3486
+ //#region src/inventory/list.d.ts
3487
+ declare function listInventory(context: TransportContext, input: {
3488
+ readonly bearer: string;
3489
+ }): Promise<InventoryListResponse>;
3490
+ declare function listInventoryForApp(context: TransportContext, input: {
3491
+ readonly bearer: string;
3492
+ }): Promise<InventoryListResponse>;
3493
+ //#endregion
3494
+ //#region src/inventory/nft-transfer.d.ts
3495
+ declare function quoteNftTransfer(context: TransportContext, input: {
3496
+ readonly bearer: string;
3497
+ readonly body: InventoryNftTransferQuoteRequest;
3498
+ }): Promise<InventoryNftTransferQuoteResponse>;
3499
+ declare function executeNftTransfer(context: TransportContext, input: {
3500
+ readonly bearer: string;
3501
+ readonly body: InventoryNftTransferRequest;
3502
+ }): Promise<InventoryNftTransferResponse>;
3503
+ //#endregion
3504
+ //#region src/inventory/permits.d.ts
3505
+ declare function listInventoryMintPermits(context: TransportContext, input: {
3506
+ readonly bearer: string;
3507
+ }): Promise<InventoryPendingPermitListResponse>;
3508
+ declare function redeemInventoryMintPermit(context: TransportContext, input: {
3509
+ readonly bearer: string;
3510
+ readonly permitId: string;
3511
+ }): Promise<InventoryPermitRedeemResult>;
3512
+ //#endregion
3513
+ //#region src/inventory/request-mint.d.ts
3514
+ declare function requestMint(context: TransportContext, input: {
3515
+ readonly appBearer: string;
3516
+ readonly body: MintRequestInput;
3517
+ }): Promise<MintRequestResult>;
3518
+ //#endregion
3519
+ //#region src/inventory/vault.d.ts
3520
+ declare function listInventoryVaultPermits(context: TransportContext, input: {
3521
+ readonly bearer: string;
3522
+ }): Promise<InventoryPendingVaultPermitListResponse>;
3523
+ declare function signInventoryVaultPermit(context: TransportContext, input: {
3524
+ readonly bearer: string;
3525
+ readonly permitId: string;
3526
+ }): Promise<InventorySignedVaultPermit>;
3527
+ declare function quoteRelayedVaultPermit(context: TransportContext, input: {
3528
+ readonly bearer: string;
3529
+ readonly permitId: string;
3530
+ }): Promise<InventoryRelayedVaultQuoteResponse>;
3531
+ declare function submitRelayedVaultPermit(context: TransportContext, input: {
3532
+ readonly bearer: string;
3533
+ readonly permitId: string;
3534
+ readonly body: InventoryRelayedVaultSubmitRequest;
3535
+ }): Promise<InventoryRelayedVaultSubmitResponse>;
3536
+ declare function listInventoryVaulted(context: TransportContext, input: {
3537
+ readonly bearer: string;
3538
+ }): Promise<InventoryVaultCustodyListResponse>;
3539
+ declare function listOauthInventoryVaulted(context: TransportContext, input: {
3540
+ readonly bearer: string;
3541
+ }): Promise<InventoryVaultCustodyListResponse>;
3542
+ //#endregion
3543
+ //#region src/messaging/dm-key-backup.d.ts
3544
+ declare function getDmKeyBackupStatus(context: TransportContext, input: {
3545
+ readonly bearer: string;
3546
+ }): Promise<DmKeyBackupStatusResponse>;
3547
+ declare function setupDmKeyBackup(context: TransportContext, input: {
3548
+ readonly bearer: string;
3549
+ readonly body: DmKeyBackupSetupBody;
3550
+ }): Promise<DmKeyBackupOkResponse>;
3551
+ declare function unlockDmKeyBackup(context: TransportContext, input: {
3552
+ readonly bearer: string;
3553
+ readonly body: DmKeyBackupUnlockBody;
3554
+ }): Promise<DmKeyBackupUnlockResponse>;
3555
+ //#endregion
3556
+ //#region src/messaging/dm-keys.d.ts
3557
+ declare function publishDmKey(context: TransportContext, input: {
3558
+ readonly bearer: string;
3559
+ readonly body: PublishDmKeyBody;
3560
+ }): Promise<DmKeyResponse>;
3561
+ declare function getMyDmKey(context: TransportContext, input: {
3562
+ readonly bearer: string;
3563
+ }): Promise<DmKeyResponse | null>;
3564
+ declare function getThreadDmKey(context: TransportContext, input: {
3565
+ readonly bearer: string;
3566
+ readonly threadId: string;
3567
+ }): Promise<DmKeyResponse>;
3568
+ declare function batchThreadDmKeys(context: TransportContext, input: {
3569
+ readonly bearer: string;
3570
+ readonly threadIds: readonly string[];
3571
+ }): Promise<BatchThreadDmKeysResponse>;
3572
+ //#endregion
3573
+ //#region src/messaging/logo.d.ts
3574
+ declare function uploadThreadLogo(context: TransportContext, input: {
3575
+ readonly bearer: string;
3576
+ readonly threadId: string;
3577
+ readonly file: Blob | ArrayBufferView | ArrayBuffer;
3578
+ readonly filename: string;
3579
+ readonly contentType: string;
3580
+ }): Promise<GroupThreadMutationResponse>;
3581
+ declare function deleteThreadLogo(context: TransportContext, input: {
3582
+ readonly bearer: string;
3583
+ readonly threadId: string;
3584
+ }): Promise<GroupThreadMutationResponse>;
3585
+ //#endregion
3586
+ //#region src/messaging/messages.d.ts
3587
+ declare function deleteMessage(context: TransportContext, input: {
3588
+ readonly bearer: string;
3589
+ readonly threadId: string;
3590
+ readonly messageId: string;
3591
+ }): Promise<MessagingOkResponse>;
3592
+ declare function editMessage(context: TransportContext, input: {
3593
+ readonly bearer: string;
3594
+ readonly threadId: string;
3595
+ readonly messageId: string;
3596
+ readonly body: EditMessageBody;
3597
+ }): Promise<MessageItem>;
3598
+ declare function addReaction(context: TransportContext, input: {
3599
+ readonly bearer: string;
3600
+ readonly threadId: string;
3601
+ readonly messageId: string;
3602
+ readonly emoji: ReactionEmoji;
3603
+ }): Promise<ReactionMutationResponse>;
3604
+ declare function removeReaction(context: TransportContext, input: {
3605
+ readonly bearer: string;
3606
+ readonly threadId: string;
3607
+ readonly messageId: string;
3608
+ readonly emoji: ReactionEmoji;
3609
+ }): Promise<ReactionMutationResponse>;
3610
+ //#endregion
3611
+ //#region src/messaging/participants.d.ts
3612
+ declare function removeParticipant(context: TransportContext, input: {
3613
+ readonly bearer: string;
3614
+ readonly threadId: string;
3615
+ readonly userId: string;
3616
+ }): Promise<GroupThreadMutationResponse>;
3617
+ declare function updateParticipantRole(context: TransportContext, input: {
3618
+ readonly bearer: string;
3619
+ readonly threadId: string;
3620
+ readonly userId: string;
3621
+ readonly body: UpdateParticipantRoleBody;
3622
+ }): Promise<GroupThreadMutationResponse>;
3623
+ //#endregion
3624
+ //#region src/messaging/threads.d.ts
3625
+ declare function deleteThread(context: TransportContext, input: {
3626
+ readonly bearer: string;
3627
+ readonly threadId: string;
3628
+ }): Promise<MessagingOkResponse>;
3629
+ declare function updateThreadSettings(context: TransportContext, input: {
3630
+ readonly bearer: string;
3631
+ readonly threadId: string;
3632
+ readonly body: UpdateThreadSettingsBody;
3633
+ }): Promise<GroupThreadMutationResponse>;
3634
+ declare function hideThread(context: TransportContext, input: {
3635
+ readonly bearer: string;
3636
+ readonly threadId: string;
3637
+ }): Promise<MessagingOkResponse>;
3638
+ declare function inviteParticipants(context: TransportContext, input: {
3639
+ readonly bearer: string;
3640
+ readonly threadId: string;
3641
+ readonly body: InviteParticipantsBody;
3642
+ }): Promise<GroupThreadMutationResponse>;
3643
+ declare function leaveThread(context: TransportContext, input: {
3644
+ readonly bearer: string;
3645
+ readonly threadId: string;
3646
+ }): Promise<MessagingOkResponse>;
3647
+ declare function pinThread(context: TransportContext, input: {
3648
+ readonly bearer: string;
3649
+ readonly threadId: string;
3650
+ }): Promise<PinThreadResponse>;
3651
+ declare function unpinThread(context: TransportContext, input: {
3652
+ readonly bearer: string;
3653
+ readonly threadId: string;
3654
+ }): Promise<MessagingOkResponse>;
3655
+ //#endregion
3656
+ //#region src/oauth/pkce.d.ts
3657
+ type PkcePair = {
3658
+ readonly codeVerifier: string;
3659
+ readonly codeChallenge: string;
3660
+ };
3661
+ declare function generatePkce(): Promise<PkcePair>;
3662
+ declare function sha256Base64Url(input: string): Promise<string>;
3663
+ declare function generateState(byteLength?: number): string;
3664
+ //#endregion
3665
+ //#region src/oauth/authorize-url.d.ts
3666
+ type BuildAuthorizeUrlInput = {
3667
+ readonly issuer: string;
3668
+ readonly clientId: string;
3669
+ readonly redirectUri: string;
3670
+ readonly scopes: readonly OauthScope[];
3671
+ readonly state?: string | undefined;
3672
+ readonly pkce?: PkcePair | undefined;
3673
+ readonly forceConsent?: boolean | undefined;
3674
+ };
3675
+ type AuthorizeUrl = {
3676
+ readonly url: string;
3677
+ readonly state: string;
3678
+ readonly codeVerifier: string;
3679
+ readonly codeChallenge: string;
3680
+ };
3681
+ declare function buildAuthorizeUrl(input: BuildAuthorizeUrlInput): Promise<AuthorizeUrl>;
3682
+ //#endregion
3683
+ //#region src/oauth/discovery.d.ts
3684
+ declare function fetchAuthorizationServerMetadata(context: TransportContext): Promise<OauthAuthorizationServerMetadata>;
3685
+ declare function defaultEndpoints(issuer: string): {
3686
+ authorize: string;
3687
+ token: string;
3688
+ userinfo: string;
3689
+ revoke: string;
3690
+ };
3691
+ //#endregion
3692
+ //#region src/oauth/revoke.d.ts
3693
+ declare function revokeToken(context: TransportContext, input: {
3694
+ readonly token: string;
3695
+ readonly tokenTypeHint?: "access_token" | "refresh_token" | undefined;
3696
+ readonly clientId: string;
3697
+ readonly clientSecret?: string | undefined;
3698
+ }): Promise<void>;
3699
+ //#endregion
3700
+ //#region src/oauth/token.d.ts
3701
+ declare function exchangeAuthorizationCode(context: TransportContext, input: {
3702
+ readonly code: string;
3703
+ readonly redirectUri: string;
3704
+ readonly codeVerifier: string;
3705
+ readonly clientId: string;
3706
+ readonly clientSecret?: string | undefined;
3707
+ }): Promise<OauthTokenResponse>;
3708
+ declare function refreshAccessToken(context: TransportContext, input: {
3709
+ readonly refreshToken: string;
3710
+ readonly clientId: string;
3711
+ readonly clientSecret?: string | undefined;
3712
+ readonly scope?: readonly OauthScope[] | undefined;
3713
+ }): Promise<OauthTokenResponse>;
3714
+ declare function toTokenSet(now: number, response: OauthTokenResponse): TokenSet;
3715
+ //#endregion
3716
+ //#region src/oauth/userinfo.d.ts
3717
+ declare function fetchUserInfo(context: TransportContext, input: {
3718
+ readonly bearer: string;
3719
+ }): Promise<OauthUserInfoResponse>;
3720
+ //#endregion
3721
+ //#region src/payments/appeal.d.ts
3722
+ declare function fileAppeal(context: TransportContext, input: {
3723
+ readonly bearer: string;
3724
+ readonly body: AppealFileRequest;
3725
+ }): Promise<AppealFileResponse>;
3726
+ declare function fileAppealPotLeg(context: TransportContext, input: {
3727
+ readonly bearer: string;
3728
+ readonly body: AppealPotLegFileRequest;
3729
+ }): Promise<AppealFileResponse>;
3730
+ //#endregion
3731
+ //#region src/payments/appeal-room.d.ts
3732
+ declare function getAppealRoom(context: TransportContext, input: {
3733
+ readonly bearer: string;
3734
+ readonly appealId: string;
3735
+ }): Promise<AppealRoomView>;
3736
+ declare function postAppealRoomMessage(context: TransportContext, input: {
3737
+ readonly bearer: string;
3738
+ readonly appealId: string;
3739
+ readonly body: AppealRoomPostRequest;
3740
+ }): Promise<AppealRoomPostResponse>;
3741
+ declare function uploadAppealRoomAttachment(context: TransportContext, input: {
3742
+ readonly bearer: string;
3743
+ readonly appealId: string;
3744
+ readonly file: Blob | ArrayBufferView | ArrayBuffer;
3745
+ readonly filename: string;
3746
+ readonly contentType: string;
3747
+ }): Promise<UploadAttachmentResponse>;
3748
+ //#endregion
3749
+ //#region src/payments/charge.d.ts
3750
+ type ChargeResult = OauthPaymentChargeResponse | ({
3751
+ status: "monthly_limit_exceeded";
3752
+ } & Omit<OauthPaymentChargeLimitExceeded, "error">);
3753
+ declare function charge(context: TransportContext, input: {
3754
+ readonly bearer: string;
3755
+ readonly body: OauthPaymentChargeRequest;
3756
+ readonly idempotencyKey?: string;
3757
+ }): Promise<ChargeResult>;
3758
+ //#endregion
3759
+ //#region src/payments/intent.d.ts
3760
+ declare function getPaymentIntent(context: TransportContext, input: {
3761
+ readonly bearer: string;
3762
+ readonly intentId: string;
3763
+ }): Promise<OauthPaymentIntentContext>;
3764
+ declare function signPaymentIntent(context: TransportContext, input: {
3765
+ readonly bearer: string;
3766
+ readonly intentId: string;
3767
+ }): Promise<OauthPaymentIntentSignResponse>;
3768
+ declare function completePaymentIntent(context: TransportContext, input: {
3769
+ readonly bearer: string;
3770
+ readonly intentId: string;
3771
+ readonly body: OauthPaymentIntentComplete;
3772
+ }): Promise<OauthPaymentIntentResolveResponse>;
3773
+ declare function denyPaymentIntent(context: TransportContext, input: {
3774
+ readonly bearer: string;
3775
+ readonly intentId: string;
3776
+ }): Promise<OauthPaymentIntentResolveResponse>;
3777
+ //#endregion
3778
+ //#region src/payments/limits.d.ts
3779
+ declare function getPaymentLimits(context: TransportContext, input: {
3780
+ readonly bearer: string;
3781
+ }): Promise<OauthPaymentLimitsResponse>;
3782
+ //#endregion
3783
+ //#region src/payments/moonpay.d.ts
3784
+ declare function getMoonpayAvailability(context: TransportContext, input: {
3785
+ readonly bearer: string;
3786
+ }): Promise<MoonpayAvailabilityResponse>;
3787
+ declare function mintMoonpayBuyUrl(context: TransportContext, input: {
3788
+ readonly bearer: string;
3789
+ readonly body: MoonpayBuyUrlRequest;
3790
+ }): Promise<MoonpayBuyUrlResponse>;
3791
+ declare function mintMoonpaySellUrl(context: TransportContext, input: {
3792
+ readonly bearer: string;
3793
+ readonly body: MoonpaySellUrlRequest;
3794
+ }): Promise<MoonpaySellUrlResponse>;
3795
+ //#endregion
3796
+ //#region src/payments/price.d.ts
3797
+ declare function getPaymentPrice(context: TransportContext, input: {
3798
+ readonly bearer: string;
3799
+ } & GetOauthPaymentsPriceData["query"]): Promise<OauthPaymentPriceResponse>;
3800
+ //#endregion
3801
+ //#region src/payments/status.d.ts
3802
+ declare function getIntentStatus(context: TransportContext, input: {
3803
+ readonly bearer: string;
3804
+ readonly intentId: string;
3805
+ }): Promise<OauthPaymentIntentStatus>;
3806
+ //#endregion
3807
+ //#region src/payments/tron.d.ts
3808
+ declare function getTronBalance(context: TransportContext, input: {
3809
+ readonly bearer: string;
3810
+ }): Promise<TronBalanceResponse>;
3811
+ declare function listTronLedger(context: TransportContext, input: {
3812
+ readonly bearer: string;
3813
+ readonly before?: string;
3814
+ }): Promise<TronLedgerResponse>;
3815
+ declare function createTronDeposit(context: TransportContext, input: {
3816
+ readonly bearer: string;
3817
+ readonly body: TronDepositRequest;
3818
+ }): Promise<TronDepositResponse>;
3819
+ declare function createTronTransfer(context: TransportContext, input: {
3820
+ readonly bearer: string;
3821
+ readonly body: TronTransferRequest;
3822
+ readonly idempotencyKey?: string;
3823
+ }): Promise<TronTransferResponse>;
3824
+ declare function getTronSecurity(context: TransportContext, input: {
3825
+ readonly bearer: string;
3826
+ }): Promise<TronSecuritySetting>;
3827
+ declare function setTronSecurity(context: TransportContext, input: {
3828
+ readonly bearer: string;
3829
+ readonly setting: TronSecuritySetting;
3830
+ }): Promise<TronSecuritySetting>;
3831
+ declare function createTronTransferChallenge(context: TransportContext, input: {
3832
+ readonly bearer: string;
3833
+ readonly body: TronTransferChallengeRequest;
3834
+ }): Promise<TronTransferChallengeResponse>;
3835
+ declare function createTronConnectOnboarding(context: TransportContext, input: {
3836
+ readonly bearer: string;
3837
+ }): Promise<TronConnectOnboardingResponse>;
3838
+ declare function createTronCashout(context: TransportContext, input: {
3839
+ readonly bearer: string;
3840
+ readonly body: TronCashoutCreateRequest;
3841
+ }): Promise<TronCashoutItem>;
3842
+ declare function listTronCashouts(context: TransportContext, input: {
3843
+ readonly bearer: string;
3844
+ }): Promise<TronCashoutListResponse>;
3845
+ //#endregion
3846
+ //#region src/presence/embed.d.ts
3847
+ type PresenceStatus = "idle" | "connecting" | "pending" | "active" | "ended" | "error";
3848
+ type MountPresenceWidgetOptions = {
3849
+ readonly apiOrigin: string;
3850
+ readonly clientId: string;
3851
+ readonly gameOrigin?: string;
3852
+ readonly container?: HTMLElement;
3853
+ readonly onPlaySessionId?: (playSessionId: string | null) => void;
3854
+ readonly onStatus?: (status: PresenceStatus) => void;
3855
+ readonly onAuthChange?: (isAuthenticated: boolean) => void;
3856
+ readonly styleIframe?: (iframe: HTMLIFrameElement) => void;
3857
+ readonly onPresentationChange?: (mode: "chip" | "overlay") => void;
3858
+ readonly background?: string;
3859
+ };
3860
+ type PresenceWidgetHandle = {
3861
+ readonly destroy: () => void;
3862
+ };
3863
+ declare function mountPresenceWidget(options: MountPresenceWidgetOptions): PresenceWidgetHandle;
3864
+ //#endregion
3865
+ //#region src/reads/dashboard.d.ts
3866
+ declare function getMeStats(context: TransportContext, input: {
3867
+ readonly bearer: string;
3868
+ }): Promise<MeStats>;
3869
+ declare function getEarningsTimeseries(context: TransportContext, input: {
3870
+ readonly bearer: string;
3871
+ readonly days?: number;
3872
+ }): Promise<EarningsTimeseries>;
3873
+ //#endregion
3874
+ //#region src/reads/messaging.d.ts
3875
+ declare function listThreads(context: TransportContext, input: {
3876
+ readonly bearer: string;
3877
+ readonly limit?: number;
3878
+ readonly cursor?: string;
3879
+ }): Promise<ThreadListResponse>;
3880
+ declare function createDirectThread(context: TransportContext, input: {
3881
+ readonly bearer: string;
3882
+ readonly body: CreateDirectThreadBody;
3883
+ }): Promise<ThreadSummary>;
3884
+ declare function listThreadMessages(context: TransportContext, input: {
3885
+ readonly bearer: string;
3886
+ readonly threadId: string;
3887
+ readonly limit?: number;
3888
+ readonly cursor?: string;
3889
+ }): Promise<MessagesPageResponse>;
3890
+ declare function sendMessage(context: TransportContext, input: {
3891
+ readonly bearer: string;
3892
+ readonly threadId: string;
3893
+ readonly body: SendMessageBody;
3894
+ }): Promise<void>;
3895
+ declare function markThreadRead(context: TransportContext, input: {
3896
+ readonly bearer: string;
3897
+ readonly threadId: string;
3898
+ }): Promise<void>;
3899
+ declare function uploadAttachment(context: TransportContext, input: {
3900
+ readonly bearer: string;
3901
+ readonly threadId: string;
3902
+ readonly file: Blob | ArrayBufferView | ArrayBuffer;
3903
+ readonly filename: string;
3904
+ readonly contentType: string;
3905
+ }): Promise<UploadAttachmentResponse>;
3906
+ //#endregion
3907
+ //#region src/reads/notifications.d.ts
3908
+ declare function listNotifications(context: TransportContext, input: {
3909
+ readonly bearer: string;
3910
+ readonly limit?: number;
3911
+ readonly cursor?: string;
3912
+ }): Promise<NotificationListResponse>;
3913
+ declare function updateNotification(context: TransportContext, input: {
3914
+ readonly bearer: string;
3915
+ readonly notificationId: string;
3916
+ readonly body: NotificationUpdate;
3917
+ }): Promise<void>;
3918
+ declare function markAllNotificationsRead(context: TransportContext, input: {
3919
+ readonly bearer: string;
3920
+ }): Promise<void>;
3921
+ //#endregion
3922
+ //#region src/reads/playtime.d.ts
3923
+ declare function getPlaytime(context: TransportContext, input: {
3924
+ readonly bearer: string;
3925
+ }): Promise<PlaytimeOverview>;
3926
+ declare function getPlaytimeTimeseries(context: TransportContext, input: {
3927
+ readonly bearer: string;
3928
+ readonly days?: number;
3929
+ }): Promise<PlaytimeTimeseries>;
3930
+ //#endregion
3931
+ //#region src/reads/profile.d.ts
3932
+ declare function getPublicProfile(context: TransportContext, input: {
3933
+ readonly bearer?: string;
3934
+ readonly handle: string;
3935
+ }): Promise<PublicProfile>;
3936
+ declare function searchUsers(context: TransportContext, input: {
3937
+ readonly bearer: string;
3938
+ readonly q: string;
3939
+ readonly limit?: number;
3940
+ }): Promise<UserSearchResponse>;
3941
+ //#endregion
3942
+ //#region src/reads/referral.d.ts
3943
+ declare function getReferral(context: TransportContext, input: {
3944
+ readonly bearer: string;
3945
+ }): Promise<ReferralOverview>;
3946
+ declare function createReferralCode(context: TransportContext, input: {
3947
+ readonly bearer: string;
3948
+ readonly regenerate?: boolean;
3949
+ }): Promise<ReferralCodeResponse>;
3950
+ declare function previewReferral(context: TransportContext, input: {
3951
+ readonly bearer: string;
3952
+ readonly code: string;
3953
+ }): Promise<ReferralPreviewResponse>;
3954
+ declare function bindReferral(context: TransportContext, input: {
3955
+ readonly bearer: string;
3956
+ } & ReferralBindRequest): Promise<ReferralBindResponse>;
3957
+ //#endregion
3958
+ //#region src/reads/social-graph.d.ts
3959
+ declare function followUser(context: TransportContext, input: {
3960
+ readonly bearer: string;
3961
+ readonly userId: string;
3962
+ }): Promise<void>;
3963
+ declare function unfollowUser(context: TransportContext, input: {
3964
+ readonly bearer: string;
3965
+ readonly userId: string;
3966
+ }): Promise<void>;
3967
+ declare function sendFriendRequest(context: TransportContext, input: {
3968
+ readonly bearer: string;
3969
+ readonly userId: string;
3970
+ }): Promise<void>;
3971
+ declare function removeFriend(context: TransportContext, input: {
3972
+ readonly bearer: string;
3973
+ readonly userId: string;
3974
+ }): Promise<void>;
3975
+ declare function decideFriendRequest(context: TransportContext, input: {
3976
+ readonly bearer: string;
3977
+ readonly requestId: string;
3978
+ readonly decision: FriendRequestDecision["decision"];
3979
+ }): Promise<void>;
3980
+ declare function cancelFriendRequest(context: TransportContext, input: {
3981
+ readonly bearer: string;
3982
+ readonly requestId: string;
3983
+ }): Promise<void>;
3984
+ declare function listFriends(context: TransportContext, input: {
3985
+ readonly bearer: string;
3986
+ }): Promise<FriendListResponse>;
3987
+ declare function listFriendsForApp(context: TransportContext, input: {
3988
+ readonly bearer: string;
3989
+ }): Promise<AppFriendListResponse>;
3990
+ //#endregion
3991
+ //#region src/reads/socials.d.ts
3992
+ declare function listSocials(context: TransportContext, input: {
3993
+ readonly bearer: string;
3994
+ }): Promise<SocialListResponse>;
3995
+ //#endregion
3996
+ //#region src/reads/wallets.d.ts
3997
+ declare function listWallets(context: TransportContext, input: {
3998
+ readonly bearer: string;
3999
+ }): Promise<WalletListResponse>;
4000
+ //#endregion
4001
+ //#region src/wallets-mgmt/delegation.d.ts
4002
+ declare function getDelegation(context: TransportContext, input: {
4003
+ readonly bearer: string;
4004
+ readonly address: string;
4005
+ }): Promise<WalletDelegationStatus>;
4006
+ declare function createDelegation(context: TransportContext, input: {
4007
+ readonly bearer: string;
4008
+ readonly address: string;
4009
+ readonly body: CreateWalletDelegation;
4010
+ }): Promise<CreateWalletDelegationResponse>;
4011
+ declare function deleteDelegation(context: TransportContext, input: {
4012
+ readonly bearer: string;
4013
+ readonly address: string;
4014
+ }): Promise<DeleteWalletDelegationResponse>;
4015
+ //#endregion
4016
+ //#region src/wallets-mgmt/label.d.ts
4017
+ declare function updateWalletLabel(context: TransportContext, input: {
4018
+ readonly bearer: string;
4019
+ readonly address: string;
4020
+ readonly body: WalletLabelUpdate;
4021
+ }): Promise<WalletLabelUpdateResponse>;
4022
+ //#endregion
4023
+ //#region src/wallets-mgmt/list.d.ts
4024
+ declare function listWalletManager(context: TransportContext, input: {
4025
+ readonly bearer: string;
4026
+ }): Promise<WalletListResponse>;
4027
+ //#endregion
4028
+ //#region src/webhook/verify.d.ts
4029
+ declare const oauthPaymentWebhookBodySchema: z.ZodObject<{
4030
+ event: z.ZodEnum<{
4031
+ "intent.completed": "intent.completed";
4032
+ "intent.denied": "intent.denied";
4033
+ "intent.expired": "intent.expired";
4034
+ "intent.txhash_indexed": "intent.txhash_indexed";
4035
+ }>;
4036
+ deliveredAt: z.ZodISODateTime;
4037
+ intent: z.ZodObject<{
4038
+ intentId: z.ZodString;
4039
+ appId: z.ZodString;
4040
+ status: z.ZodEnum<{
4041
+ pending: "pending";
4042
+ awaiting_funding: "awaiting_funding";
4043
+ completed: "completed";
4044
+ denied: "denied";
4045
+ expired: "expired";
4046
+ }>;
4047
+ paymentId: z.ZodNullable<z.ZodString>;
4048
+ txHash: z.ZodNullable<z.ZodString>;
4049
+ usdCents: z.ZodInt;
4050
+ chain: z.ZodString;
4051
+ token: z.ZodNullable<z.ZodString>;
4052
+ grossAmount: z.ZodNullable<z.ZodString>;
4053
+ creditedAmount: z.ZodNullable<z.ZodString>;
4054
+ settlement: z.ZodNullable<z.ZodEnum<{
4055
+ instant: "instant";
4056
+ locked: "locked";
4057
+ }>>;
4058
+ resolvedAt: z.ZodNullable<z.ZodISODateTime>;
4059
+ expiresAt: z.ZodISODateTime;
4060
+ }, z.core.$strip>;
4061
+ }, z.core.$strip>;
4062
+ type OauthPaymentWebhookBody = z.infer<typeof oauthPaymentWebhookBodySchema>;
4063
+ type VerifyWebhookInput = {
4064
+ readonly secret: string;
4065
+ readonly rawBody: string;
4066
+ readonly signatureHeader: string | null | undefined;
4067
+ readonly timestampHeader: string | null | undefined;
4068
+ readonly toleranceSeconds?: number | undefined;
4069
+ readonly now?: number | undefined;
4070
+ };
4071
+ type VerifyWebhookSuccess = {
4072
+ readonly ok: true;
4073
+ readonly body: OauthPaymentWebhookBody;
4074
+ };
4075
+ type VerifyWebhookFailure = {
4076
+ readonly ok: false;
4077
+ readonly reason: "missing_signature" | "missing_timestamp" | "invalid_timestamp" | "stale_timestamp" | "signature_mismatch" | "schema_mismatch";
4078
+ };
4079
+ type VerifyWebhookResult = VerifyWebhookSuccess | VerifyWebhookFailure;
4080
+ declare function verifyWebhook(input: VerifyWebhookInput): Promise<VerifyWebhookResult>;
4081
+ declare const WEBHOOK_SIGNATURE_HEADER = "x-metatron-signature";
4082
+ declare const WEBHOOK_TIMESTAMP_HEADER = "x-metatron-timestamp";
4083
+ //#endregion
4084
+ //#region src/browser/client.d.ts
4085
+ declare class TronBrowserClient {
4086
+ private readonly ctx;
4087
+ private readonly clientId;
4088
+ private readonly redirectUri;
4089
+ private readonly scopes;
4090
+ private readonly tokenStore?;
4091
+ constructor(config: BrowserClientConfig);
4092
+ get transport(): TransportContext;
4093
+ get oauth(): {
4094
+ discover: () => Promise<OauthAuthorizationServerMetadata>;
4095
+ buildAuthorizeUrl: (options?: {
4096
+ state?: string;
4097
+ forceConsent?: boolean;
4098
+ }) => Promise<AuthorizeUrl>;
4099
+ exchangeCode: (input: {
4100
+ code: string;
4101
+ codeVerifier: string;
4102
+ }) => Promise<TokenSet>;
4103
+ refresh: (input: {
4104
+ refreshToken: string;
4105
+ scope?: readonly OauthScope[];
4106
+ }) => Promise<TokenSet>;
4107
+ revoke: (input: {
4108
+ token: string;
4109
+ tokenTypeHint?: "access_token" | "refresh_token";
4110
+ }) => Promise<void>;
4111
+ signOut: (input: {
4112
+ refreshToken: string;
4113
+ }) => Promise<void>;
4114
+ userInfo: (input: {
4115
+ bearer: string;
4116
+ }) => Promise<OauthUserInfoResponse>;
4117
+ getStoredTokens: () => Promise<TokenSet | null>;
4118
+ };
4119
+ get payments(): {
4120
+ charge: (input: {
4121
+ bearer: string;
4122
+ body: OauthPaymentChargeRequest;
4123
+ idempotencyKey?: string;
4124
+ }) => Promise<ChargeResult>;
4125
+ limits: (input: {
4126
+ bearer: string;
4127
+ }) => Promise<OauthPaymentLimitsResponse>;
4128
+ price: (input: {
4129
+ bearer: string;
4130
+ } & GetOauthPaymentsPriceData["query"]) => Promise<OauthPaymentPriceResponse>;
4131
+ status: (input: {
4132
+ bearer: string;
4133
+ intentId: string;
4134
+ }) => Promise<OauthPaymentIntentStatus>;
4135
+ intent: {
4136
+ get: (input: {
4137
+ bearer: string;
4138
+ intentId: string;
4139
+ }) => Promise<OauthPaymentIntentContext>;
4140
+ sign: (input: {
4141
+ bearer: string;
4142
+ intentId: string;
4143
+ }) => Promise<OauthPaymentIntentSignResponse>;
4144
+ complete: (input: {
4145
+ bearer: string;
4146
+ intentId: string;
4147
+ body: OauthPaymentIntentComplete;
4148
+ }) => Promise<OauthPaymentIntentResolveResponse>;
4149
+ deny: (input: {
4150
+ bearer: string;
4151
+ intentId: string;
4152
+ }) => Promise<OauthPaymentIntentResolveResponse>;
4153
+ };
4154
+ };
4155
+ get users(): {
4156
+ get: (input: {
4157
+ bearer?: string;
4158
+ handle: string;
4159
+ }) => Promise<PublicProfile>;
4160
+ search: (input: {
4161
+ bearer: string;
4162
+ q: string;
4163
+ limit?: number;
4164
+ }) => Promise<UserSearchResponse>;
4165
+ follow: (input: {
4166
+ bearer: string;
4167
+ userId: string;
4168
+ }) => Promise<void>;
4169
+ unfollow: (input: {
4170
+ bearer: string;
4171
+ userId: string;
4172
+ }) => Promise<void>;
4173
+ friendRequest: (input: {
4174
+ bearer: string;
4175
+ userId: string;
4176
+ }) => Promise<void>;
4177
+ decideFriendRequest: (input: {
4178
+ bearer: string;
4179
+ requestId: string;
4180
+ decision: FriendRequestDecision["decision"];
4181
+ }) => Promise<void>;
4182
+ cancelFriendRequest: (input: {
4183
+ bearer: string;
4184
+ requestId: string;
4185
+ }) => Promise<void>;
4186
+ friends: (input: {
4187
+ bearer: string;
4188
+ }) => Promise<FriendListResponse>;
4189
+ me: (input: {
4190
+ bearer: string;
4191
+ }) => Promise<unknown>;
4192
+ };
4193
+ get messaging(): {
4194
+ listThreads: (input: {
4195
+ bearer: string;
4196
+ limit?: number;
4197
+ cursor?: string;
4198
+ }) => Promise<ThreadListResponse>;
4199
+ createDirect: (input: {
4200
+ bearer: string;
4201
+ body: CreateDirectThreadBody;
4202
+ }) => Promise<ThreadSummary>;
4203
+ listMessages: (input: {
4204
+ bearer: string;
4205
+ threadId: string;
4206
+ limit?: number;
4207
+ cursor?: string;
4208
+ }) => Promise<MessagesPageResponse>;
4209
+ send: (input: {
4210
+ bearer: string;
4211
+ threadId: string;
4212
+ body: SendMessageBody;
4213
+ }) => Promise<void>;
4214
+ markRead: (input: {
4215
+ bearer: string;
4216
+ threadId: string;
4217
+ }) => Promise<void>;
4218
+ uploadAttachment: (input: {
4219
+ bearer: string;
4220
+ threadId: string;
4221
+ file: Blob | ArrayBufferView | ArrayBuffer;
4222
+ filename: string;
4223
+ contentType: string;
4224
+ }) => Promise<UploadAttachmentResponse>;
4225
+ };
4226
+ get notifications(): {
4227
+ list: (input: {
4228
+ bearer: string;
4229
+ limit?: number;
4230
+ cursor?: string;
4231
+ }) => Promise<NotificationListResponse>;
4232
+ markAllRead: (input: {
4233
+ bearer: string;
4234
+ }) => Promise<void>;
4235
+ };
4236
+ get wallets(): {
4237
+ list: (input: {
4238
+ bearer: string;
4239
+ }) => Promise<WalletListResponse>;
4240
+ };
4241
+ get inventory(): {
4242
+ list: (input: {
4243
+ bearer: string;
4244
+ }) => Promise<InventoryListResponse>;
4245
+ };
4246
+ get socials(): {
4247
+ list: (input: {
4248
+ bearer: string;
4249
+ }) => Promise<SocialListResponse>;
4250
+ };
4251
+ get referral(): {
4252
+ get: (input: {
4253
+ bearer: string;
4254
+ }) => Promise<ReferralOverview>;
4255
+ createCode: (input: {
4256
+ bearer: string;
4257
+ regenerate?: boolean;
4258
+ }) => Promise<ReferralCodeResponse>;
4259
+ preview: (input: {
4260
+ bearer: string;
4261
+ code: string;
4262
+ }) => Promise<ReferralPreviewResponse>;
4263
+ bind: (input: {
4264
+ bearer: string;
4265
+ code: string;
4266
+ source?: "signup-url" | "manual-claim" | "cookie-restore";
4267
+ }) => Promise<ReferralBindResponse>;
4268
+ };
4269
+ }
4270
+ //#endregion
4271
+ //#region src/browser/cookie-token-store.d.ts
4272
+ type CookieTokenStoreOptions = {
4273
+ readonly cookieName?: string;
4274
+ readonly path?: string;
4275
+ readonly maxAgeSeconds?: number;
4276
+ readonly secure?: boolean;
4277
+ readonly sameSite?: "Lax" | "Strict" | "None";
4278
+ };
4279
+ declare function createCookieTokenStore(options?: CookieTokenStoreOptions): TokenStore;
4280
+ //#endregion
4281
+ export { AuthorizeUrl, type BrowserClientConfig, BuildAuthorizeUrlInput, ChargeResult, CookieTokenStoreOptions, type FetchLike, InflightDedup, type Logger, MountPresenceWidgetOptions, NOOP_RATE_LIMITER, OauthErrorCode, OauthPaymentWebhookBody, type OauthScope, PkcePair, PresenceStatus, PresenceWidgetHandle, RateLimitOptions, RateLimiter, SERVER_RATE_LIMIT_MAX_MUTATING, SERVER_RATE_LIMIT_MAX_READ, SERVER_RATE_LIMIT_WINDOW_MS, type SdkBaseConfig, TRON_WS_CLOSE_CODES, type TokenSet, type TokenStore, TronBrowserClient, TronError, TronOauthError, TronWsCloseCode, TronWsCloseError, VerifyWebhookFailure, VerifyWebhookInput, VerifyWebhookResult, VerifyWebhookSuccess, WEBHOOK_SIGNATURE_HEADER, WEBHOOK_TIMESTAMP_HEADER, acceptDeveloperInvite, addAdmin, addAppealBlacklist, addReaction, approveTronCashout, batchThreadDmKeys, bindReferral, buildAuthorizeUrl, cancelFriendRequest, charge, commentOnGameReview, completePaymentIntent, consolidateDeveloperAppWallet, createConsoleLogger, createCookieTokenStore, createDelegation, createDeveloperApiKey, createDeveloperApp, createDeveloperAppMintPermit, createDeveloperVaultPermit, createDeveloperWithdrawPermit, createDirectThread, createInMemoryTokenStore, createInflightDedup, createNoopLogger, createRateLimiter, createReferralCode, createTronCashout, createTronConnectOnboarding, createTronDeposit, createTronTransfer, createTronTransferChallenge, decideFriendRequest, declineDeveloperInvite, defaultEndpoints, deleteAppPageBanner, deleteAppPageThumbnail, deleteAppPageThumbnailVideo, deleteAvatar, deleteDelegation, deleteDeveloperApp, deleteDeveloperAppLogo, deleteDeveloperProfileLogo, deleteDeveloperRequestLogo, deleteGameReviewComment, deleteGameReviewReply, deleteMessage, deleteMyGameReview, deleteThread, deleteThreadLogo, denyPaymentIntent, editMessage, exchangeAuthorizationCode, executeNftTransfer, fetchAuthorizationServerMetadata, fetchUserInfo, fileAppeal, fileAppealPotLeg, followUser, forceWithdrawVaultCustody, generatePkce, generateState, getActivity, getActivityGroup, getAdminAppealRoom, getAppFeeConfig, getAppPage, getAppPageChanges, getAppealRoom, getDelegation, getDeveloperAppActivity, getDeveloperAppBalances, getDeveloperAppEarnings, getDeveloperAppInventoryItemHolders, getDeveloperAppOverview, getDeveloperAppPage, getDeveloperAppPlaytime, getDeveloperAppTronBalance, getDeveloperAppWallets, getDeveloperPaymentAppeals, getDeveloperPaymentPendingDeposits, getDeveloperStatus, getDeveloperTronBalanceSummary, getDmKeyBackupStatus, getEarningsTimeseries, getIntentStatus, getLibrary, getMeStats, getMoonpayAvailability, getMyDmKey, getMyGameReview, getMyGameReviewReactions, getOutstanding, getPaymentChains, getPaymentHistory, getPaymentIntent, getPaymentLimits, getPaymentPrice, getPlatformFees, getPlaytime, getPlaytimeTimeseries, getPublicProfile, getReferral, getThreadDmKey, getTronBalance, getTronSecurity, hideAppPage, hideThread, inviteDeveloperAppParticipant, inviteParticipants, leaveThread, listActivePlayers, listAdmins, listAppPages, listAppealBlacklist, listAppealQueue, listAudit, listDeveloperApiKeys, listDeveloperAppContentReports, listDeveloperAppInventoryCollections, listDeveloperAppInventoryItems, listDeveloperAppParticipants, listDeveloperAppReviews, listDeveloperInvites, listDeveloperRequests, listDevelopers, listFriends, listFriendsForApp, listGameReviewComments, listGameReviews, listInventory, listInventoryForApp, listInventoryMintPermits, listInventoryVaultPermits, listInventoryVaulted, listNotifications, listOauthInventoryVaulted, listPaymentAuthorizations, listSocials, listThreadMessages, listThreads, listTronCashoutQueue, listTronCashouts, listTronLedger, listUsers, listWalletManager, listWallets, markAllNotificationsRead, markThreadRead, mintMoonpayBuyUrl, mintMoonpaySellUrl, mountPresenceWidget, oauthPaymentWebhookBodySchema, pinThread, postAdminAppealRoomMessage, postAppealRoomMessage, previewReferral, provisionDeveloperAppWallet, publishDmKey, quoteDeveloperAppInventoryRegistration, quoteNftTransfer, quoteRelayedVaultPermit, redeemInventoryMintPermit, refreshAccessToken, registerDeveloperAppInventoryItem, rejectTronCashout, removeAdmin, removeAppealBlacklist, removeFriend, removeParticipant, removeReaction, replyToGameReview, requestDeveloperAppProduction, requestMint, resolveAppeal, reviewAppPage, reviewAppPageChanges, reviewDeveloperRequest, revokeDeveloperApiKey, revokeDeveloperAppParticipant, revokePaymentAuthorization, revokeToken, rotateDeveloperAppKey, rotateDeveloperAppPaymentWebhookSecret, rotateProcessorTreasury, searchGiphy, searchUsers, sendFriendRequest, sendMessage, sendPresenceHeartbeat, setMyGameReviewReaction, setProcessorWhitelist, setTronSecurity, setVaultOperator, setVaultPause, setVaultWithdrawLockDefault, setVaultWithdrawLockOverride, setupDmKeyBackup, sha256Base64Url, signInventoryVaultPermit, signPaymentIntent, submitAppContentReport, submitAppPageForReview, submitDeveloperRequest, submitRelayedVaultPermit, tipGameReview, toTokenSet, unfollowUser, unhideAppPage, unlockDmKeyBackup, unpinThread, unpublishAppPage, updateAdminRole, updateAppFeeConfig, updateAppPage, updateDeveloperApp, updateDeveloperAppAutoSweep, updateDeveloperAppContentReportStatus, updateDeveloperProfile, updateNotification, updateParticipantRole, updatePaymentAuthorization, updatePlatformFees, updateProfile, updateThreadSettings, updateUserBan, updateWalletLabel, uploadAdminAppealRoomAttachment, uploadAppPageBanner, uploadAppPageGallery, uploadAppPageThumbnail, uploadAppPageThumbnailVideo, uploadAppealRoomAttachment, uploadAttachment, uploadAvatar, uploadDeveloperAppInventoryItemBanner, uploadDeveloperAppInventoryItemImage, uploadDeveloperAppLogo, uploadDeveloperProfileLogo, uploadDeveloperRequestLogo, uploadMultipart, uploadThreadLogo, upsertMyGameReview, verifyWebhook, withdrawDeveloperAppWallet };