@metatrongg/sdk 0.8.0-dev.42c667f → 0.8.0-dev.46fc1a5
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/browser/index.d.ts +198 -7
- package/dist/browser/index.js +1 -1
- package/dist/contracts/index.d.ts +1549 -62
- package/dist/contracts/index.js +1 -1
- package/dist/index.js +1 -1
- package/dist/node/index.d.ts +199 -8
- package/dist/node/index.js +1 -1
- package/dist/webhook/express.js +1 -1
- package/dist/webhook/fastify.js +1 -1
- package/dist/webhook/hono.js +1 -1
- package/dist/webhook/index.js +1 -1
- package/package.json +3 -3
package/dist/browser/index.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
import*as e from"zod";var t=class extends Error{status;code;body;constructor(e,t,n,r){super(n),this.name=`TronError`,this.status=e,this.code=t,this.body=r}},n=class extends t{error;errorDescription;errorUri;constructor(e,t,n,r,i){super(e,t,`oauth ${e} ${t}${r===void 0?``:`: ${r}`}`,n),this.name=`TronOauthError`,this.error=t,this.errorDescription=r,this.errorUri=i}};const r={BAD_REQUEST:4400,UNAUTHORIZED:4401,FORBIDDEN:4403,NOT_FOUND:4404,UNAVAILABLE:4503};var i=class extends Error{code;reason;constructor(e,t){super(`tron ws closed: ${e}${t===``?``:` ${t}`}`),this.name=`TronWsCloseError`,this.code=e,this.reason=t}get isApplicationError(){return this.code>=4e3&&this.code<5e3}get isPermanent(){return[r.BAD_REQUEST,r.UNAUTHORIZED,r.FORBIDDEN,r.NOT_FOUND].includes(this.code)}};async function a(e,t){if(t.raw===!0)throw Error("sendJson does not support `raw: true`; call send() directly");let n=t.method??`GET`;return e.dedupe!==void 0&&n===`GET`?await e.dedupe.run(o(t),async()=>await c(await s(e,t))):await c(await s(e,t))}function o(e){let t=e.query===void 0?``:JSON.stringify(e.query);return`GET ${e.path}?${t}|${e.bearer??``}`}async function s(e,t){let n=ee(e.issuer,t.path,t.query),r=new Headers(t.headers);t.bearer===void 0?t.basicAuth!==void 0&&r.set(`authorization`,`Basic ${ne(`${t.basicAuth.username}:${t.basicAuth.password}`)}`):r.set(`authorization`,`Bearer ${t.bearer}`),t.idempotencyKey!==void 0&&r.set(`idempotency-key`,t.idempotencyKey);let i=null;t.form===void 0?t.body!==void 0&&(r.set(`content-type`,`application/json`),i=JSON.stringify(t.body)):(r.set(`content-type`,`application/x-www-form-urlencoded`),i=new URLSearchParams(t.form).toString());let a=t.method??`GET`;e.rateLimiter!==void 0&&await e.rateLimiter.acquire(a);let o={method:a,headers:r};i!==null&&(o.body=i);let s=await e.fetch(n,o);if(t.raw===!0)return s;if(!s.ok){let e=await s.text();throw te(s.status,e)}return s}async function c(e){let n=await e.text();if(n!==``)try{return JSON.parse(n)}catch{throw new t(e.status,`non_json`,`response was not json`,n)}}function ee(e,t,n){let r=new URL(t,e.endsWith(`/`)?e:`${e}/`);if(n!==void 0){for(let[e,t]of Object.entries(n))if(t!==void 0)if(typeof t==`string`||typeof t==`number`)r.searchParams.set(e,String(t));else for(let n of t)r.searchParams.append(e,n)}return r.href}function te(e,r){let i;try{i=JSON.parse(r)}catch{return new t(e,`non_json`,`tron ${e}: non-json response`,r)}if(typeof i==`object`&&i){let a=i;if(typeof a.error==`string`&&(a.error_description!==void 0||a.error_uri!==void 0))return new n(e,a.error,r,typeof a.error_description==`string`?a.error_description:void 0,typeof a.error_uri==`string`?a.error_uri:void 0);if(typeof a.error==`string`)return new t(e,a.error,`tron ${e} ${a.error}`,r);if(Array.isArray(a.issues))return new t(e,`validation_failed`,`tron ${e} validation_failed`,r)}return new t(e,`unknown`,`tron ${e}: unknown error shape`,r)}function ne(e){return typeof Buffer<`u`?Buffer.from(e,`utf8`).toString(`base64`):btoa(e)}const l=e.string().min(3).max(18).regex(/^[a-z][a-z0-9_]*$/),re=e.string().nullable(),ie=e.string().max(256).nullable(),ae=e.url().max(2048).nullable(),oe=e.enum([`yellow`,`green`,`blue`,`white`,`black`,`red`]),u=e.enum([`super-admin`,`admin`,`read-only`]).nullable(),se=e.enum([`auto`,`online`,`offline`]),ce=e.enum([`development`,`production`]),d=e.object({id:e.string().min(1),email:e.email().nullable(),emailVerified:e.boolean(),name:l,displayName:re,bio:ie,websiteUrl:ae,image:e.string().nullish(),banner:oe,role:u,presenceStatusMode:se,environmentViewMode:ce,createdAt:e.iso.datetime(),updatedAt:e.iso.datetime()}),le=e.string().min(1);e.object({user:d,token:le.optional()}),e.object({error:e.string().min(1),traceId:e.string().min(1).optional()}),e.object({name:l,email:e.email(),password:e.string().min(8),image:e.url().optional(),callbackURL:e.url().optional()}),e.object({redirect:e.boolean(),token:le.optional(),url:e.url().optional(),user:d.optional()}),e.object({email:e.email(),password:e.string().min(1),callbackURL:e.url().optional(),rememberMe:e.boolean().optional()}),e.object({success:e.boolean()});const ue=e.object({id:e.string().min(1),token:e.string().min(1),userId:e.string().min(1),expiresAt:e.iso.datetime(),ipAddress:e.string().nullish(),userAgent:e.string().nullish(),createdAt:e.iso.datetime(),updatedAt:e.iso.datetime()});e.object({session:ue,user:d}).nullable(),e.object({status:e.boolean()}),e.object({status:e.boolean()}),e.object({email:e.email(),callbackURL:e.url().optional()}),e.object({status:e.boolean()}),e.object({email:e.email(),redirectTo:e.url().optional()}),e.object({status:e.boolean()}),e.object({newPassword:e.string().min(8),token:e.string().min(1)});const de=e.object({issuer:e.url(),authorization_endpoint:e.url(),token_endpoint:e.url(),userinfo_endpoint:e.url(),revocation_endpoint:e.url(),registration_endpoint:e.url(),response_types_supported:e.array(e.enum([`code`])),grant_types_supported:e.array(e.enum([`authorization_code`,`refresh_token`,`client_credentials`])),code_challenge_methods_supported:e.array(e.enum([`S256`])),token_endpoint_auth_methods_supported:e.array(e.enum([`client_secret_basic`,`client_secret_post`,`none`])),scopes_supported:e.array(e.enum([`openid`,`profile`,`payments:charge`,`inventory:read`,`social:read`,`developer:read`,`developer:apps`,`developer:pages`]))}),f=e.url().max(2048),p=e.string().min(1).regex(/^[A-Za-z0-9_:.-]+(?: [A-Za-z0-9_:.-]+)*$/);e.object({client_id:e.string().regex(/^tg_dc_[a-f0-9]{32}$/),client_id_issued_at:e.int().gte(0),client_name:e.string().min(1),redirect_uris:e.array(f),token_endpoint_auth_method:e.enum([`none`]),grant_types:e.array(e.enum([`authorization_code`,`refresh_token`])),response_types:e.array(e.enum([`code`])),scope:p}),e.object({error:e.enum([`invalid_redirect_uri`,`invalid_client_metadata`]),error_description:e.string().optional()}),e.object({redirect_uris:e.array(f).min(1).max(10),client_name:e.string().min(1).max(128).optional(),token_endpoint_auth_method:e.enum([`none`]).optional(),grant_types:e.array(e.enum([`authorization_code`,`refresh_token`])).optional(),response_types:e.array(e.enum([`code`])).optional(),scope:p.optional()});const m=e.string().regex(/^tg_(?:dev|prod|dc)_[A-Za-z0-9]{16,64}$/),fe=e.string().min(1).max(2048),pe=e.string().regex(/^[A-Za-z0-9_~.-]{43,128}$/),h=e.string().regex(/^[a-f0-9]{32}$/);e.object({request:h,app:e.object({id:e.string().min(1),name:e.string().min(1),logoUrl:e.url().nullable()}),clientKind:e.enum([`app`,`connector`]),scopes:e.array(e.enum([`openid`,`profile`,`payments:charge`,`inventory:read`,`social:read`,`developer:read`,`developer:apps`,`developer:pages`])).min(1),developerRole:e.object({approved:e.boolean(),policyVersion:e.string().min(1)}).nullable(),alreadyGranted:e.array(e.enum([`openid`,`profile`,`payments:charge`,`inventory:read`,`social:read`,`developer:read`,`developer:apps`,`developer:pages`])),redirectUriHost:e.string().min(1),payment:e.object({tiersCents:e.array(e.int().gt(0)).min(1),currentLimitCents:e.int().gte(0).nullable(),currentMonthSpentCents:e.int().gte(0).nullable(),payoutChains:e.array(e.string().min(1)),tron:e.object({currentMonthlyLimitTronCents:e.int().gte(0).nullable(),currentMonthSpentTronCents:e.int().gte(0).nullable(),currentAutoApproveEnabled:e.boolean()}).nullable()}).nullable()}),e.object({consentId:e.string().min(1),app:e.object({id:e.string().min(1),name:e.string().min(1),logoUrl:e.url().nullable()}),monthlyLimitCents:e.int().gte(0).nullable(),monthSpentCents:e.int().gte(0),tiersCents:e.array(e.int().gt(0)).min(1)}),e.object({app:e.object({id:e.string().min(1),name:e.string().min(1),logoUrl:e.url().nullable()}),developer:e.object({studioName:e.string().nullable(),logoUrl:e.url().nullable(),studioUrl:e.url().nullable(),studioXHandle:e.string().nullable()})}),e.object({redirect:e.url()});const me=e.int().gte(100).lte(5e6).nullable(),he=e.int().gt(0).lte(1e8).nullable();e.object({request:h,decision:e.enum([`allow`,`deny`]),acceptDeveloperPolicy:e.boolean().optional(),payment:e.object({monthlyLimitCents:me,tron:e.object({autoApproveEnabled:e.boolean(),monthlyLimitTronCents:he}).optional()}).optional()});const ge=e.object({access_token:e.string().min(1),token_type:e.enum([`Bearer`]),expires_in:e.int().gt(0),refresh_token:e.string().min(1).optional(),scope:p.optional()});e.object({error:e.enum([`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`]),error_description:e.string().optional(),error_uri:e.url().optional(),state:fe.optional()});const _e=e.string().regex(/^[A-Za-z0-9_~.-]{43,128}$/),g=e.string().regex(/^[a-f0-9]{64}$/),ve=e.object({grant_type:e.enum([`authorization_code`]),code:e.string().min(1),redirect_uri:f,code_verifier:_e,client_id:m.optional(),client_secret:g.optional()}),ye=e.object({grant_type:e.enum([`refresh_token`]),refresh_token:e.string().min(1),scope:p.optional(),client_id:m.optional(),client_secret:g.optional()}),be=e.object({grant_type:e.enum([`client_credentials`]),scope:p.optional(),client_id:m.optional(),client_secret:g.optional()});e.discriminatedUnion(`grant_type`,[ve.extend({grant_type:e.literal(`authorization_code`)}),ye.extend({grant_type:e.literal(`refresh_token`)}),be.extend({grant_type:e.literal(`client_credentials`)})]);const xe=e.object({sub:e.string().min(1),name:e.string().min(1).nullable(),preferred_username:e.string().min(1).nullable(),picture:e.url().nullable(),wallet_address:e.string().min(1).nullable()});e.object({token:e.string().min(1),token_type_hint:e.enum([`access_token`,`refresh_token`]).optional(),client_id:m.optional(),client_secret:g.optional()});const Se=e.object({status:e.enum([`completed`]),intentId:e.string().min(1),paymentId:e.string().min(1),usdCents:e.int().gte(0),txHash:e.string().nullable()}),Ce=e.object({status:e.enum([`redirect`]),intentId:e.string().min(1),redirectUrl:e.url(),usdCents:e.int().gte(0)}),we=e.discriminatedUnion(`status`,[Se.extend({status:e.literal(`completed`)}),Ce.extend({status:e.literal(`redirect`)})]),Te=e.object({error:e.enum([`monthly_limit_exceeded`]),currentLimitCents:e.int().gte(0),monthSpentCents:e.int().gte(0),attemptedUsdCents:e.int().gte(0),redirectUrl:e.url()});e.object({error:e.enum([`idempotency_key_reused`]),intentId:e.string().min(1)});const _=e.object({purpose:e.string().min(1).max(64).optional(),title:e.string().min(1).max(120).optional(),note:e.string().min(1).max(280).optional(),quantity:e.int().gte(1).lte(1e6).optional(),category:e.string().min(1).max(64).optional(),sessionId:e.string().min(1).max(128).optional(),groupId:e.string().min(1).max(128).optional(),image:e.url().max(2048).optional(),extra:e.record(e.string(),e.union([e.string().max(512),e.number(),e.boolean()])).optional()});e.object({chain:e.string().min(1),amount:e.string().regex(/^\d+$/),token:e.string().regex(/^0x[0-9a-fA-F]{40}$/),returnUri:e.url().max(2048),potId:e.string().regex(/^0x[0-9a-fA-F]{32}$/).optional(),rakeBps:e.int().gte(0).lte(3e3).optional(),metadata:_.optional()});const Ee=e.object({monthlyLimitCents:e.int().gte(0).nullable(),monthSpentCents:e.int().gte(0),periodStart:e.iso.datetime(),offlineAutoChargeEnabled:e.boolean(),perTxOfflineCapCents:e.int().gte(0).nullable(),walletDelegated:e.boolean()}),De=e.object({chain:e.string().min(1),token:e.string().regex(/^0x[0-9a-fA-F]{40}$/),tokenDecimals:e.int().gte(0),usdRate:e.string().min(1),feed:e.object({aggregatorAddress:e.string().regex(/^0x[0-9a-fA-F]{40}$/),decimals:e.int().gte(0),answer:e.string().regex(/^\d+$/),updatedAt:e.iso.datetime()}),usdCents:e.int().gte(0).optional(),amount:e.string().regex(/^\d+$/).optional()}),Oe=e.object({intentId:e.string().min(1),appId:e.string().min(1),status:e.enum([`pending`,`awaiting_funding`,`completed`,`denied`,`expired`]),paymentId:e.string().nullable(),txHash:e.string().nullable(),usdCents:e.int().gte(0),chain:e.string().min(1),token:e.string().regex(/^0x[0-9a-fA-F]{40}$/).nullable(),grossAmount:e.string().regex(/^\d+$/).nullable(),creditedAmount:e.string().regex(/^\d+$/).nullable(),settlement:e.enum([`instant`,`locked`]).nullable(),resolvedAt:e.iso.datetime().nullable(),expiresAt:e.iso.datetime()}),ke=e.object({intentId:e.string().min(1),consentId:e.string().min(1),app:e.object({id:e.string().min(1),name:e.string().min(1),logoUrl:e.url().nullable()}),chain:e.string().min(1),token:e.string(),amount:e.string(),vault:e.string().regex(/^0x[0-9a-fA-F]{40}$/),appealable:e.boolean(),usdCents:e.int().gte(0),monthlyLimitCents:e.int().gte(0).nullable(),monthSpentCents:e.int().gte(0),offlineAutoChargeEnabled:e.boolean(),perTxOfflineCapCents:e.int().gte(0).nullable(),walletDelegated:e.boolean(),canonicalWalletAddress:e.string().nullable(),offlineDenialReason:e.enum([`no_active_play_session`,`driver_unavailable`,`wallet_not_delegated`,`deposit_cap_exceeded`,`insufficient_balance`,`fire_failed`]).nullable(),returnUriHost:e.string().min(1),status:e.enum([`pending`,`awaiting_funding`]),expiresAt:e.iso.datetime(),accessDenied:e.object({reason:e.enum([`not_invited`]),developer:e.object({studioName:e.string().nullable(),logoUrl:e.url().nullable(),studioUrl:e.url().nullable(),studioXHandle:e.string().nullable()})}).nullish(),environment:e.enum([`development`,`production`])}),Ae=e.object({chain:e.string().min(1),chainId:e.int().gte(0),id:e.string().regex(/^0x[0-9a-fA-F]{32}$/),amount:e.string().regex(/^\d+$/),token:e.string().regex(/^0x[0-9a-fA-F]{40}$/),vault:e.string().regex(/^0x[0-9a-fA-F]{40}$/),data:e.string().regex(/^0x[0-9a-fA-F]*$/),appealable:e.boolean(),payer:e.string().regex(/^0x[0-9a-fA-F]{40}$/),deadline:e.int().gte(0),routerAddress:e.string().regex(/^0x[0-9a-fA-F]{40}$/),signature:e.string().regex(/^0x[0-9a-fA-F]+$/)}),je=e.object({redirect:e.url()}),Me=e.object({method:e.enum([`signed`]),paymentId:e.string().min(1)}),Ne=e.object({method:e.enum([`offline`])});e.discriminatedUnion(`method`,[Me.extend({method:e.literal(`signed`)}),Ne.extend({method:e.literal(`offline`)})]);const Pe=e.object({consentId:e.string().min(1),app:e.object({id:e.string().min(1),name:e.string().min(1),logoUrl:e.url().nullable()}),monthlyLimitCents:e.int().gte(0).nullable(),monthSpentCents:e.int().gte(0),periodStart:e.iso.datetime(),offlineAutoChargeEnabled:e.boolean(),perTxOfflineCapCents:e.int().gte(0).nullable()}),Fe=e.object({authorizations:e.array(Pe)}),Ie=e.int().gte(100).lte(1e5).nullable();e.object({offlineAutoChargeEnabled:e.boolean().optional(),perTxOfflineCapCents:Ie.optional(),monthlyLimitCents:me.optional()});const Le=e.object({clientName:e.string().min(1),connectedAt:e.iso.datetime()});e.object({connections:e.array(Le)});const Re=e.object({consentId:e.string().min(1),app:e.object({id:e.string().min(1),name:e.string().min(1),logoUrl:e.url().nullable()}),monthlyLimitTronCents:e.int().gte(0).nullable(),monthSpentTronCents:e.int().gte(0),autoApproveEnabled:e.boolean()});e.object({authorizations:e.array(Re).max(200)}),e.object({monthlyTronLimitCents:he.optional(),autoApproveEnabled:e.boolean().optional()});const v=e.string().min(3).max(40).regex(/^[a-z0-9-]+$/),ze=e.object({appId:e.uuid(),name:e.string().min(1).max(80),slug:v,bannerUrl:e.url().nullable(),thumbnailUrl:e.url().nullable(),thumbnailVideoUrl:e.url().nullable(),categories:e.array(e.enum(`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`.split(`.`))),studio:e.object({name:e.string().min(1).max(80).nullable(),logoUrl:e.url().nullable()}).nullable(),firstPublishedAt:e.iso.datetime()}),Be=e.object({items:e.array(ze),nextBefore:e.iso.datetime().nullable()}),y=e.array(e.enum(`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`.split(`.`))).max(4),b=e.string().min(1).max(80),Ve=e.object({url:e.url().max(2048),caption:e.string().max(200).optional(),order:e.int().gte(0)}),x=e.array(Ve).max(6),He=e.object({heading:e.string().min(1).max(80),body:e.string().min(1).max(2e3),order:e.int().gte(0)}),S=e.array(He).max(8),Ue=e.object({label:e.string().min(1).max(40),url:e.url().max(2048),order:e.int().gte(0)}),C=e.array(Ue).max(10),We=e.object({ownerUserId:e.uuid().nullable(),name:e.string().nullable(),logoUrl:e.url().nullable(),websiteUrl:e.url().nullable(),xHandle:e.string().nullable(),githubUrl:e.url().nullable()}),w=e.array(e.enum([`web`,`ios`,`android`,`pc`,`playstation`,`xbox`,`switch`])).max(7),T=e.enum([`single_player`,`multiplayer`,`both`]).nullable(),E=e.enum([`everyone`,`13_plus`,`16_plus`,`18_plus`]).nullable(),D=e.array(e.enum([`en`,`es`,`fr`,`de`,`pt`,`it`,`ru`,`ja`,`ko`,`zh`,`hi`,`ar`,`tr`,`vi`,`id`,`th`,`pl`,`nl`])).max(18),O=e.enum([`live`,`open_beta`,`coming_soon`]),Ge=e.enum([`tron`,`onchain`,`both`]).nullable(),Ke=e.object({appId:e.uuid(),slug:v,appName:e.string(),appLogoUrl:e.url().nullable(),categories:y,tagline:b,bannerUrl:e.url().nullable(),playUrl:e.url().nullable(),discordUrl:e.url().nullable(),twitterUrl:e.url().nullable(),redditUrl:e.url().nullable(),telegramUrl:e.url().nullable(),gallery:x,chapters:S,links:C,studio:We,platforms:w,gameType:T,ageRating:E,languages:D,releaseStatus:O,paymentsMode:Ge,oauthScopes:e.array(e.string()),chains:e.array(e.string()),publishedAt:e.iso.datetime(),updatedAt:e.iso.datetime()}),qe=e.object({appId:e.uuid(),slug:v,appName:e.string(),appLogoUrl:e.url().nullable(),categories:y,tagline:b,bannerUrl:e.url().nullable(),discordUrl:e.url().nullable(),twitterUrl:e.url().nullable(),redditUrl:e.url().nullable(),telegramUrl:e.url().nullable(),gallery:x,chapters:S,links:C,studio:We,platforms:w,gameType:T,ageRating:E,languages:D,releaseStatus:O,publishedAt:e.iso.datetime(),updatedAt:e.iso.datetime()}),k=e.string().min(1).max(4e3),Je=e.object({url:e.url().max(2048),kind:e.enum([`image`,`video`]),order:e.int().gte(0)}),A=e.array(Je).max(6),Ye=e.object({up:e.int().gte(0),down:e.int().gte(0)}),j=e.object({id:e.uuid(),appId:e.uuid(),body:k,attachments:A,reactions:Ye,commentCount:e.int().gte(0),createdAt:e.iso.datetime(),updatedAt:e.iso.datetime()}),Xe=e.object({updates:e.array(j),total:e.int().gte(0),hasMore:e.boolean()}),Ze=e.string().min(1).max(1e3),M=e.object({userId:e.uuid(),handle:e.string().nullable(),name:e.string().min(1).max(80).nullable(),avatarUrl:e.url().nullable()}),Qe=e.object({id:e.uuid(),body:Ze,author:M,createdAt:e.iso.datetime()}),$e=e.object({comments:e.array(Qe),total:e.int().gte(0),hasMore:e.boolean()}),et=e.object({updateId:e.uuid(),vote:e.enum([`up`,`down`])}),tt=e.object({reactions:e.array(et)}),nt=e.enum([`up`,`down`]).nullable(),rt=e.object({reactions:Ye,vote:nt});e.object({vote:nt});const it=e.object({comment:Qe,commentCount:e.int().gte(0)});e.object({body:Ze});const at=e.object({commentCount:e.int().gte(0)});e.object({body:k,attachments:A.optional()}),e.object({body:k.optional(),attachments:A.optional()});const ot=e.object({deleted:e.literal(!0)}),st=e.object({url:e.url().max(2048),kind:e.enum([`image`,`video`])}),ct=e.enum([`overwhelmingly_positive`,`very_positive`,`positive`,`mostly_positive`,`mixed`,`mostly_negative`,`negative`,`overwhelmingly_negative`]).nullable(),lt=e.object({count:e.int().gte(0),recommendedCount:e.int().gte(0),recommendedPct:e.number().gte(0).lte(100).nullable(),summaryLabel:ct}),ut=e.boolean(),dt=e.string().min(1).max(2e3),ft=e.object({helpful:e.int().gte(0),unhelpful:e.int().gte(0),funny:e.int().gte(0)}),pt=e.object({playtimeSecondsThisGame:e.int().gte(0),gamesPlayed:e.int().gte(0),reviewsWritten:e.int().gte(0)}),mt=e.string().min(1).max(2e3),ht=e.object({body:mt,repliedAt:e.iso.datetime()}).nullable(),gt=e.object({id:e.uuid(),recommended:ut,body:dt,reactions:ft,tippedCents:e.int().gte(0),commentCount:e.int().gte(0),author:M,authorStats:pt,developerReply:ht,createdAt:e.iso.datetime(),updatedAt:e.iso.datetime()}),_t=e.object({aggregate:lt,reviews:e.array(gt),total:e.int().gte(0),hasMore:e.boolean()}),vt=e.enum([`newest`,`oldest`,`helpful`]).default(`newest`),yt=e.enum([`payment`,`reward`]).nullable(),bt=e.object({id:e.uuid(),recommended:ut,body:dt,createdAt:e.iso.datetime(),updatedAt:e.iso.datetime()}).nullable(),xt=e.object({eligible:e.boolean(),eligibleVia:yt,review:bt,isAppOwner:e.boolean()});e.object({recommended:ut,body:dt});const St=e.enum([`helpful`,`unhelpful`]).nullable(),Ct=e.object({reviewId:e.uuid(),vote:St,funny:e.boolean()}),wt=e.object({reactions:e.array(Ct)}),Tt=e.object({reactions:ft,vote:St,funny:e.boolean()});e.object({vote:St,funny:e.boolean()});const Et=e.object({status:e.enum([`completed`]),amountCents:e.int().gt(0),balanceCents:e.int().gte(0),tippedCents:e.int().gte(0)});e.object({amountCents:e.int().gt(0).lte(1e6),note:e.string().min(1).max(280).optional(),challengeId:e.uuid().optional(),signature:e.string().max(2e3).regex(/^0x[0-9a-fA-F]+$/).optional()});const Dt=e.string().min(1).max(1e3),Ot=e.object({id:e.uuid(),body:Dt,author:M,createdAt:e.iso.datetime()}),kt=e.object({comments:e.array(Ot),total:e.int().gte(0),hasMore:e.boolean()}),At=e.object({comment:Ot,commentCount:e.int().gte(0)});e.object({body:Dt});const jt=e.object({commentCount:e.int().gte(0)}),Mt=e.object({developerReply:ht});e.object({body:mt});const Nt=e.object({created:e.boolean()}),Pt=e.enum([`abuse`,`inappropriate_content`,`cheating`,`spam`,`other`]);e.object({category:Pt,details:e.string().max(2e3).optional()});const Ft=e.enum([`open`,`acknowledged`,`dismissed`]),It=e.object({id:e.uuid(),category:Pt,details:e.string().nullable(),status:Ft,acknowledgedAt:e.iso.datetime().nullable(),createdAt:e.iso.datetime()}),Lt=e.object({reports:e.array(It),total:e.int().gte(0),hasMore:e.boolean()});e.object({status:e.enum([`acknowledged`,`dismissed`])});const Rt=e.object({id:e.string().min(1),family:e.enum([`evm`,`solana`]),displayName:e.string().min(1),chainId:e.int().optional(),paymentRouter:e.string().optional(),paymentProgram:e.string().optional()}),zt=e.object({chains:e.array(Rt)}),Bt=e.object({id:e.string().regex(/^0x[0-9a-f]{32}$/),chain:e.string().min(1),chainId:e.int().gt(0),payer:e.string().regex(/^0x[0-9a-fA-F]{40}$/),amount:e.string().regex(/^\d+$/),token:e.string().regex(/^0x[0-9a-fA-F]{40}$/),vault:e.string().regex(/^0x[0-9a-fA-F]{40}$/),vaultKind:e.enum([`credit`,`platform`]),processorAddress:e.string().regex(/^0x[0-9a-fA-F]{40}$/).nullable(),grossAmount:e.string().regex(/^\d+$/),creditedAmount:e.string().regex(/^\d+$/),settlement:e.enum([`instant`,`locked`]).nullable(),appealable:e.boolean(),vaultReleaseAt:e.iso.datetime().nullable(),consolidatedAt:e.iso.datetime().nullable(),status:e.enum([`pending`,`completed`,`expired`]),txHash:e.string().regex(/^0x[0-9a-fA-F]{64}$/).nullable(),blockNumber:e.string().regex(/^\d+$/).nullable(),deadline:e.iso.datetime(),signedAt:e.iso.datetime(),completedAt:e.iso.datetime().nullable(),recipientApp:e.object({id:e.string().min(1),name:e.string().min(1),logoUrl:e.url().nullable()}).nullable()}),Vt=e.object({payments:e.array(Bt),nextBefore:e.iso.datetime().nullable()}),Ht=e.object({kind:e.enum([`payment`]),groupId:e.string().min(1).nullable(),id:e.string().regex(/^0x[0-9a-f]{32}$/),chain:e.string().min(1),chainId:e.int().gt(0),occurredAt:e.iso.datetime(),role:e.enum([`outgoing`,`incoming`]),payer:e.string().regex(/^0x[0-9a-fA-F]{40}$/),beneficiary:e.string().regex(/^0x[0-9a-fA-F]{40}$/).nullable(),counterparty:e.string().regex(/^0x[0-9a-fA-F]{40}$/).nullable(),app:e.object({id:e.string().min(1),name:e.string().min(1),logoUrl:e.url().nullable(),slug:e.string().nullable(),bannerUrl:e.url().nullable()}).nullable(),beneficiaryApp:e.object({id:e.string().min(1),name:e.string().min(1),logoUrl:e.url().nullable(),slug:e.string().nullable(),bannerUrl:e.url().nullable()}).nullable(),amount:e.string().regex(/^\d+$/),token:e.string().regex(/^0x[0-9a-fA-F]{40}$/),vault:e.string().regex(/^0x[0-9a-fA-F]{40}$/),vaultKind:e.enum([`credit`,`platform`]),targetKind:e.enum([`credit`,`pot`]),processorAddress:e.string().regex(/^0x[0-9a-fA-F]{40}$/).nullable(),grossAmount:e.string().regex(/^\d+$/),creditedAmount:e.string().regex(/^\d+$/),settlement:e.enum([`instant`,`locked`]).nullable(),appealable:e.boolean(),disputableLegId:e.string().regex(/^0x[0-9a-f]{32}$/).nullable(),vaultReleaseAt:e.iso.datetime().nullable(),consolidatedAt:e.iso.datetime().nullable(),status:e.enum([`pending`,`completed`,`expired`]),txHash:e.string().regex(/^0x[0-9a-fA-F]{64}$/).nullable(),blockNumber:e.string().regex(/^\d+$/).nullable(),logIndex:e.int().gte(0).nullable(),metadata:_.nullish(),usdCents:e.int().gte(0).nullable()}),Ut=e.object({kind:e.enum([`payment_withdrawal`]),groupId:e.string().min(1).nullable(),id:e.string().regex(/^[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}$/),chain:e.string().min(1),occurredAt:e.iso.datetime(),role:e.enum([`incoming`]),beneficiary:e.string().regex(/^0x[0-9a-fA-F]{40}$/),counterparty:e.string().regex(/^0x[0-9a-fA-F]{40}$/),paymentId:e.string().regex(/^0x[0-9a-f]{32}$/).nullable(),vault:e.string().regex(/^0x[0-9a-fA-F]{40}$/),amount:e.string().regex(/^\d+$/),token:e.string().regex(/^0x[0-9a-fA-F]{40}$/),txHash:e.string().regex(/^0x[0-9a-fA-F]{64}$/),blockNumber:e.string().regex(/^\d+$/),logIndex:e.int().gte(0),usdCents:e.int().gte(0).nullable()}),Wt=e.object({kind:e.enum([`matured_withdrawal`]),groupId:e.string().min(1).nullable(),id:e.string().regex(/^[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}$/),chain:e.string().min(1),occurredAt:e.iso.datetime(),role:e.enum([`incoming`]),beneficiary:e.string().regex(/^0x[0-9a-fA-F]{40}$/),counterparty:e.string().regex(/^0x[0-9a-fA-F]{40}$/),vault:e.string().regex(/^0x[0-9a-fA-F]{40}$/),amount:e.string().regex(/^\d+$/),token:e.string().regex(/^0x[0-9a-fA-F]{40}$/),txHash:e.string().regex(/^0x[0-9a-fA-F]{64}$/),blockNumber:e.string().regex(/^\d+$/),logIndex:e.int().gte(0),usdCents:e.int().gte(0).nullable()}),Gt=e.object({kind:e.enum([`payout_sent`]),groupId:e.string().min(1).nullable(),id:e.string().regex(/^[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}$/),chain:e.string().min(1),occurredAt:e.iso.datetime(),role:e.enum([`incoming`]),recipient:e.string().regex(/^0x[0-9a-fA-F]{40}$/),counterparty:e.string().regex(/^0x[0-9a-fA-F]{40}$/),app:e.object({id:e.string().min(1),name:e.string().min(1),logoUrl:e.url().nullable(),slug:e.string().nullable(),bannerUrl:e.url().nullable()}).nullable(),vault:e.string().regex(/^0x[0-9a-fA-F]{40}$/),amount:e.string().regex(/^\d+$/),token:e.string().regex(/^0x[0-9a-fA-F]{40}$/),txHash:e.string().regex(/^0x[0-9a-fA-F]{64}$/),blockNumber:e.string().regex(/^\d+$/),logIndex:e.int().gte(0),metadata:_.nullish(),usdCents:e.int().gte(0).nullable()}),Kt=e.object({kind:e.enum([`credit_transferred`]),groupId:e.string().min(1).nullable(),id:e.string().regex(/^[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}$/),chain:e.string().min(1),occurredAt:e.iso.datetime(),role:e.enum([`incoming`]),recipient:e.string().regex(/^0x[0-9a-fA-F]{40}$/),counterparty:e.string().regex(/^0x[0-9a-fA-F]{40}$/),app:e.object({id:e.string().min(1),name:e.string().min(1),logoUrl:e.url().nullable(),slug:e.string().nullable(),bannerUrl:e.url().nullable()}).nullable(),vault:e.string().regex(/^0x[0-9a-fA-F]{40}$/),amount:e.string().regex(/^\d+$/),token:e.string().regex(/^0x[0-9a-fA-F]{40}$/),txHash:e.string().regex(/^0x[0-9a-fA-F]{64}$/),blockNumber:e.string().regex(/^\d+$/),logIndex:e.int().gte(0),usdCents:e.int().gte(0).nullable()}),qt=e.object({kind:e.enum([`pot_leg`]),groupId:e.string().min(1).nullable(),id:e.string().regex(/^0x[0-9a-f]{32}$/),chain:e.string().min(1),occurredAt:e.iso.datetime(),role:e.enum([`incoming`]),beneficiary:e.string().regex(/^0x[0-9a-fA-F]{40}$/),distributionId:e.string().regex(/^[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}$/).nullable(),vault:e.string().regex(/^0x[0-9a-fA-F]{40}$/).nullable(),amount:e.string().regex(/^\d+$/),token:e.string().regex(/^0x[0-9a-fA-F]{40}$/),settlement:e.enum([`instant`,`locked`]),releaseAt:e.iso.datetime().nullable(),claimedAt:e.iso.datetime().nullable(),txHash:e.string().regex(/^0x[0-9a-fA-F]{64}$/).nullable(),blockNumber:e.string().regex(/^\d+$/).nullable(),logIndex:e.int().gte(0).nullable(),metadata:_.nullish(),usdCents:e.int().gte(0).nullable()}),Jt=e.object({kind:e.enum([`payment_autoclaim`]),groupId:e.string().min(1).nullable(),id:e.string().regex(/^[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}$/),chain:e.string().min(1),occurredAt:e.iso.datetime(),role:e.enum([`incoming`]),beneficiary:e.string().regex(/^0x[0-9a-fA-F]{40}$/),paymentId:e.string().regex(/^0x[0-9a-f]{32}$/).nullable(),vault:e.string().regex(/^0x[0-9a-fA-F]{40}$/),token:e.string().regex(/^0x[0-9a-fA-F]{40}$/),autoclaimKind:e.enum([`withdraw_matured`,`withdraw_escrow`,`claim_refund`]),status:e.enum([`pending`,`in_flight`,`succeeded`,`skipped`,`failed`]),attempts:e.int().gte(0),lastError:e.string().nullable(),txHash:e.string().regex(/^0x[0-9a-fA-F]{64}$/).nullable(),settledAt:e.iso.datetime().nullable()}),Yt=e.object({kind:e.enum([`appeal`]),groupId:e.string().min(1).nullable(),id:e.string().regex(/^0x[0-9a-f]{32}$/),chain:e.string().min(1),occurredAt:e.iso.datetime(),role:e.enum([`outgoing`]),appellant:e.string().regex(/^0x[0-9a-fA-F]{40}$/),counterparty:e.string().regex(/^0x[0-9a-fA-F]{40}$/),paymentId:e.string().regex(/^0x[0-9a-f]{32}$/).nullable(),vault:e.string().regex(/^0x[0-9a-fA-F]{40}$/),amount:e.string().regex(/^\d+$/),token:e.string().regex(/^0x[0-9a-fA-F]{40}$/),status:e.enum([`pending_onchain`,`open`,`resolved_refund`,`resolved_dismiss`,`cancelled`,`force_cancelled`]),txHash:e.string().regex(/^0x[0-9a-fA-F]{64}$/).nullable(),blockNumber:e.string().regex(/^\d+$/).nullable(),logIndex:e.int().gte(0).nullable(),resolvedAt:e.iso.datetime().nullable(),refundClaimedAt:e.iso.datetime().nullable(),hasRoom:e.boolean(),resolution:e.object({resolutionId:e.string().regex(/^0x[0-9a-f]{32}$/),outcome:e.int().gte(0).lte(1),deadline:e.int().gte(0),signature:e.string().regex(/^0x[0-9a-fA-F]{130}$/)}).nullable(),usdCents:e.int().gte(0).nullable()}),Xt=e.object({kind:e.enum([`moonpay_buy`]),groupId:e.string().min(1).nullable(),id:e.string().regex(/^[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}$/),occurredAt:e.iso.datetime(),role:e.enum([`incoming`]),walletAddress:e.string().regex(/^0x[0-9a-fA-F]{40}$/),externalId:e.string().min(1),fiatAmountCents:e.int().gte(0),fiatCurrency:e.string().min(1),cryptoAmount:e.string().regex(/^\d+$/),cryptoToken:e.string().regex(/^0x[0-9a-fA-F]{40}$/),cryptoTxHash:e.string().regex(/^0x[0-9a-fA-F]{64}$/).nullable(),status:e.enum([`pending`,`completed`,`failed`])}),Zt=e.object({kind:e.enum([`moonpay_sell`]),groupId:e.string().min(1).nullable(),id:e.string().regex(/^[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}$/),occurredAt:e.iso.datetime(),role:e.enum([`outgoing`]),walletAddress:e.string().regex(/^0x[0-9a-fA-F]{40}$/),externalId:e.string().min(1),fiatAmountCents:e.int().gte(0),fiatCurrency:e.string().min(1),cryptoAmount:e.string().regex(/^\d+$/),cryptoToken:e.string().regex(/^0x[0-9a-fA-F]{40}$/),cryptoTxHash:e.string().regex(/^0x[0-9a-fA-F]{64}$/).nullable(),status:e.enum([`pending`,`completed`,`failed`])}),Qt=e.object({kind:e.enum([`tron_deposit`]),groupId:e.string().min(1).nullable(),id:e.string().regex(/^[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}$/),occurredAt:e.iso.datetime(),role:e.enum([`incoming`]),amountCents:e.int().gt(0),status:e.enum([`completed`,`disputed`,`clawed_back`]),receiptUrl:e.url().nullable(),paymentIntentId:e.string().min(1).nullable()}),$t=e.object({userId:e.string().regex(/^[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}$/),handle:e.string().nullable(),displayName:e.string().nullable(),role:e.enum([`stake`,`payout`,`dev_cut`,`purchase`,`referral`]),amountCents:e.int()}),en=e.object({kind:e.enum([`tron_pot`]),groupId:e.string().min(1).nullable(),id:e.string().regex(/^[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}$/),occurredAt:e.iso.datetime(),role:e.enum([`incoming`,`outgoing`]),leg:e.enum([`stake`,`payout`,`dev_cut`,`purchase`,`referral`]),amountCents:e.int().gt(0),usdCents:e.int(),status:e.enum([`settled`]),app:e.object({id:e.string().min(1),name:e.string().min(1),logoUrl:e.url().nullable(),slug:e.string().nullable(),bannerUrl:e.url().nullable()}).nullable(),involvedUsers:e.array($t).nullish(),metadata:_.nullish()}),tn=e.object({kind:e.enum([`tron_cashout`]),groupId:e.string().min(1).nullable(),id:e.string().regex(/^[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}$/),occurredAt:e.iso.datetime(),role:e.enum([`outgoing`]),method:e.enum([`stripe`,`usdc`]),amountCents:e.int().gt(0),feeCents:e.int().gte(0),destinationAddress:e.string().regex(/^0x[0-9a-fA-F]{40}$/).nullable(),chain:e.string().min(1).nullable(),txHash:e.string().regex(/^0x[0-9a-fA-F]{64}$/).nullable(),status:e.enum([`pending`,`approved`,`rejected`,`settled`,`failed`]),stripeTransferId:e.string().min(1).nullable(),rejectionReason:e.string().min(1).nullable(),settledAt:e.iso.datetime().nullable()}),nn=e.object({kind:e.enum([`tron_transfer`]),groupId:e.string().min(1).nullable(),id:e.string().regex(/^[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}$/),occurredAt:e.iso.datetime(),role:e.enum([`incoming`,`outgoing`]),amountCents:e.int().gt(0),usdCents:e.int(),status:e.enum([`settled`]),counterpartyUserId:e.string().regex(/^[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}$/).nullable(),counterpartyHandle:e.string().nullable(),counterpartyDisplayName:e.string().nullable(),note:e.string().nullable()}),rn=e.object({kind:e.enum([`referral_earning`]),groupId:e.string().min(1).nullable(),id:e.string().regex(/^[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}$/),chain:e.string().min(1),occurredAt:e.iso.datetime(),role:e.enum([`incoming`]),referralAddress:e.string().regex(/^0x[0-9a-fA-F]{40}$/),paymentId:e.string().regex(/^0x[0-9a-f]{32}$/).nullable(),token:e.string().regex(/^0x[0-9a-fA-F]{40}$/),amount:e.string().regex(/^\d+$/),reversed:e.boolean(),txHash:e.string().regex(/^0x[0-9a-fA-F]{64}$/),logIndex:e.int().gte(0),usdCents:e.int().gte(0).nullable()}),an=e.object({kind:e.enum([`nft_charge`]),groupId:e.string().min(1).nullable(),id:e.string().regex(/^[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}$/),occurredAt:e.iso.datetime(),role:e.enum([`outgoing`]),chargeKind:e.enum([`registration`,`mint`,`transfer_gas`]),amountCents:e.int().gt(0),usdCents:e.int(),status:e.enum([`settled`]),collectionAddress:e.string().regex(/^0x[0-9a-fA-F]{40}$/).nullable(),tokenId:e.string().nullable(),counterpartyUserId:e.string().regex(/^[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}$/).nullable(),counterpartyHandle:e.string().nullable(),counterpartyDisplayName:e.string().nullable()}),on=e.discriminatedUnion(`kind`,[Ht.extend({kind:e.literal(`payment`)}),Ut.extend({kind:e.literal(`payment_withdrawal`)}),Wt.extend({kind:e.literal(`matured_withdrawal`)}),Gt.extend({kind:e.literal(`payout_sent`)}),Kt.extend({kind:e.literal(`credit_transferred`)}),qt.extend({kind:e.literal(`pot_leg`)}),Jt.extend({kind:e.literal(`payment_autoclaim`)}),Yt.extend({kind:e.literal(`appeal`)}),Xt.extend({kind:e.literal(`moonpay_buy`)}),Zt.extend({kind:e.literal(`moonpay_sell`)}),Qt.extend({kind:e.literal(`tron_deposit`)}),en.extend({kind:e.literal(`tron_pot`)}),tn.extend({kind:e.literal(`tron_cashout`)}),nn.extend({kind:e.literal(`tron_transfer`)}),rn.extend({kind:e.literal(`referral_earning`)}),an.extend({kind:e.literal(`nft_charge`)})]),sn=e.object({rows:e.array(on),nextBefore:e.iso.datetime().nullable(),nextCursor:e.string().nullable(),hasHidden:e.boolean()}),cn=e.object({chain:e.string().min(1),token:e.string().regex(/^0x[0-9a-fA-F]{40}$/),creditedWei:e.string().regex(/^\d+$/),drainedWei:e.string().regex(/^\d+$/),outstandingWei:e.string().regex(/^\d+$/)}),ln=e.object({rows:e.array(cn)}),un=e.object({enabled:e.boolean(),direction:e.enum([`buy`,`sell`,`both`]).nullable(),countryCode:e.string().regex(/^[A-Z]{2}$/).nullable(),regionSupported:e.boolean()}),dn=e.object({url:e.url(),intentId:e.string().min(1),expiresAt:e.iso.datetime(),walletAddress:e.string().regex(/^0x[0-9a-fA-F]{40}$/)});e.object({intentId:e.string().min(1)});const fn=e.object({url:e.url(),transactionId:e.uuid(),walletAddress:e.string().regex(/^0x[0-9a-fA-F]{40}$/)});e.object({usdcAmount:e.string().regex(/^\d+$/),chain:e.string().min(1).optional()});const pn=e.object({enabled:e.boolean(),balanceCents:e.int().gte(0),frozenCents:e.int().gte(0),currency:e.enum([`tron`]),flagged:e.boolean(),minDepositCents:e.int().gt(0),maxDepositCents:e.int().gt(0)}),mn=e.object({id:e.uuid(),kind:e.enum([`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`]),amountCents:e.int(),currency:e.string().min(1),createdAt:e.iso.datetime()}),hn=e.object({entries:e.array(mn).max(100),nextBefore:e.iso.datetime().nullable()}),gn=e.object({clientSecret:e.string().min(1),publishableKey:e.string().min(1),amountCents:e.int().gt(0),currency:e.string().min(1),depositId:e.uuid()});e.object({amountCents:e.int().gt(0).lte(1e6)});const _n=e.object({status:e.enum([`completed`]),amountCents:e.int().gt(0),balanceCents:e.int().gte(0),recipient:e.object({userId:e.uuid(),handle:e.string().nullable(),displayName:e.string().nullable()})});e.object({recipientUserId:e.uuid(),amountCents:e.int().gt(0).lte(1e6),note:e.string().min(1).max(280).optional(),challengeId:e.uuid().optional(),signature:e.string().max(2e3).regex(/^0x[0-9a-fA-F]+$/).optional(),threadId:e.uuid().optional()});const vn=e.object({requireSignature:e.boolean()}),yn=e.object({required:e.literal(!1)}),bn=e.object({required:e.literal(!0),challengeId:e.uuid(),message:e.string(),expiresAt:e.iso.datetime()}),xn=e.discriminatedUnion(`required`,[yn.extend({required:e.literal(!1)}),bn.extend({required:e.literal(!0)})]);e.object({recipientUserId:e.uuid(),amountCents:e.int().gt(0).lte(1e6)}),e.object({balanceCents:e.int().gte(0),rakeBps:e.int().gte(0).lte(3e3)});const Sn=e.object({status:e.enum([`completed`]),potId:e.string().regex(/^0x[0-9a-f]{32}$/),balanceCents:e.int().gte(0)}),Cn=e.object({status:e.enum([`insufficient_balance`]),potId:e.string().regex(/^0x[0-9a-f]{32}$/),balanceCents:e.int().gte(0)}),wn=e.object({status:e.enum([`redirect`]),intentId:e.string().min(1),redirectUrl:e.url(),amountCents:e.int().gt(0),potId:e.string().regex(/^0x[0-9a-f]{32}$/)});e.discriminatedUnion(`status`,[Sn.extend({status:e.literal(`completed`)}),Cn.extend({status:e.literal(`insufficient_balance`)}),wn.extend({status:e.literal(`redirect`)})]),e.object({potId:e.string().regex(/^0x[0-9a-f]{32}$/),amountCents:e.int().gt(0),returnUri:e.url(),metadata:_.optional()});const Tn=e.object({status:e.enum([`completed`]),balanceCents:e.int().gte(0)}),En=e.object({status:e.enum([`insufficient_balance`]),balanceCents:e.int().gte(0)}),Dn=e.object({status:e.enum([`redirect`]),intentId:e.string().min(1),redirectUrl:e.url(),amountCents:e.int().gt(0)});e.discriminatedUnion(`status`,[Tn.extend({status:e.literal(`completed`)}),En.extend({status:e.literal(`insufficient_balance`)}),Dn.extend({status:e.literal(`redirect`)})]),e.object({amountCents:e.int().gt(0),returnUri:e.url(),metadata:_.optional()}),e.object({intentId:e.string().min(1),consentId:e.string().min(1),app:e.object({id:e.string().min(1),name:e.string().min(1),logoUrl:e.url().nullable()}),amountCents:e.int().gt(0),kind:e.enum([`pot_stake`,`store_purchase`]),potId:e.string().nullable(),monthlyLimitTronCents:e.int().gte(0).nullable(),monthSpentTronCents:e.int().gte(0),autoApproveEnabled:e.boolean(),balanceCents:e.int().gte(0),returnUriHost:e.string().min(1),status:e.enum([`pending`]),expiresAt:e.iso.datetime(),environment:e.enum([`development`,`production`])});const On=e.object({status:e.enum([`redirect`]),redirect:e.url()}),kn=e.object({status:e.enum([`insufficient_balance`]),balanceCents:e.int().gte(0)});e.discriminatedUnion(`status`,[On.extend({status:e.literal(`redirect`)}),kn.extend({status:e.literal(`insufficient_balance`)})]),e.object({status:e.enum([`distributed`,`replayed`]),potId:e.string().regex(/^0x[0-9a-f]{32}$/),potBalanceCents:e.int().gte(0)}),e.object({potId:e.string().regex(/^0x[0-9a-f]{32}$/),legs:e.array(e.object({recipientUserId:e.uuid(),amountCents:e.int().gt(0)})).max(64),rakeBps:e.int().gte(0).lte(1e4).optional(),devCutCents:e.int().gte(0).optional().default(0),closePot:e.boolean().optional().default(!0),metadata:_.optional()});const An=e.object({url:e.url()}),jn=e.object({id:e.uuid(),method:e.enum([`stripe`,`usdc`]),status:e.enum([`pending`,`approved`,`rejected`,`settled`,`failed`]),amountCents:e.int().gt(0),feeCents:e.int().gte(0),currency:e.string().min(1),destinationAddress:e.string().regex(/^0x[0-9a-fA-F]{40}$/).nullable(),chain:e.string().min(1).nullable(),txHash:e.string().min(1).nullable(),rejectionReason:e.string().min(1).nullable(),createdAt:e.iso.datetime(),settledAt:e.iso.datetime().nullable()});e.object({method:e.enum([`stripe`,`usdc`]),amountCents:e.int().gt(0),chain:e.string().min(1).optional()});const Mn=e.object({requests:e.array(jn).max(100)}),Nn=e.object({id:e.uuid(),method:e.enum([`stripe`,`usdc`]),status:e.enum([`pending`,`approved`,`rejected`,`settled`,`failed`]),amountCents:e.int().gt(0),feeCents:e.int().gte(0),currency:e.string().min(1),destinationAddress:e.string().regex(/^0x[0-9a-fA-F]{40}$/).nullable(),chain:e.string().min(1).nullable(),txHash:e.string().min(1).nullable(),rejectionReason:e.string().min(1).nullable(),createdAt:e.iso.datetime(),settledAt:e.iso.datetime().nullable(),userId:e.uuid(),requestIdHex:e.string().regex(/^0x[0-9a-f]{32}$/).nullable(),usdcAmount:e.string().regex(/^\d+$/).nullable(),backendSignature:e.string().regex(/^0x[0-9a-f]+$/).nullable(),signatureDeadline:e.iso.datetime().nullable(),poolAddress:e.string().regex(/^0x[0-9a-fA-F]{40}$/).nullable()}),Pn=e.object({requests:e.array(Nn).max(100)});e.object({reason:e.string().min(1).max(500)});const Fn=e.array(e.object({id:e.enum([`ethereum-mainnet`,`base-mainnet`,`ethereum-sepolia`]),displayName:e.string().min(1),chainId:e.int().gt(0)})),In=e.string().min(1).max(24).regex(/^[a-z0-9]+$/).nullable(),Ln=e.object({id:e.string().min(1),name:e.string().min(1),deletedAt:e.iso.datetime().nullable()}).nullable(),Rn=e.object({native:e.string().regex(/^\d+(?:\.\d+)?$/),usdc:e.string().regex(/^\d+(?:\.\d+)?$/).optional()}),zn=e.object({"ethereum-mainnet":Rn.optional(),"base-mainnet":Rn.optional(),"ethereum-sepolia":Rn.optional()}),Bn=e.enum([`infinite`,`custom`,`scoped`]).nullable(),Vn=e.object({native:e.string().regex(/^\d+$/),usdc:e.string().regex(/^\d+$/)}).nullable(),Hn=e.object({mode:Bn,caps:Vn,policyId:e.string().min(1).nullable()}),Un=e.object({address:e.string().regex(/^0x[0-9a-fA-F]{40}$/),label:In,kind:e.enum([`personal`,`app`]),app:Ln,balances:zn,delegation:Hn}),Wn=e.object({chains:Fn,wallets:e.array(Un)}),Gn=e.object({address:e.string().regex(/^0x[0-9a-fA-F]{40}$/),label:In});e.object({label:In});const Kn=e.object({policyId:e.string().min(1).nullable()});e.union([e.object({mode:e.enum([`infinite`])}),e.object({mode:e.enum([`custom`]),caps:Vn}),e.object({mode:e.enum([`scoped`])})]);const qn=e.object({ok:e.literal(!0)});e.object({name:l.optional(),displayName:re.optional(),bio:e.string().min(1).max(256).nullish(),websiteUrl:ae.optional(),banner:oe.optional(),presenceStatusMode:se.optional(),environmentViewMode:ce.optional()});const Jn=e.object({id:e.string().min(1),title:e.string().max(500),gifUrl:e.url(),previewUrl:e.url(),width:e.int().gt(0),height:e.int().gt(0)}),Yn=e.object({results:e.array(Jn)}),Xn=e.object({id:e.string().min(1),name:e.string().min(1),displayName:e.string().nullable(),image:e.url().nullable()}),N=e.object({v:e.literal(1),alg:e.enum([`x25519-ecdh-hkdf-sha256-aes256gcm`]),senderPubKey:e.string().length(43).regex(/^[A-Za-z0-9_-]+$/),senderKeyId:e.string().min(1).max(128),recipientKeyId:e.string().min(1).max(128),iv:e.string().max(64).regex(/^[A-Za-z0-9_-]+$/),ct:e.string().max(16384).regex(/^[A-Za-z0-9_-]+$/)}).nullable(),Zn=e.object({kind:e.enum([`tron_transfer`]),amountCents:e.int().gt(0),recipientUserId:e.string().min(1)}),Qn=e.object({kind:e.enum([`nft_transfer`]),recipientUserId:e.string().min(1),collectionAddress:e.string().min(1),tokenId:e.string().min(1),amount:e.string().min(1),itemName:e.string().nullable(),imageAssetId:e.string().nullish()}),$n=e.object({id:e.string().min(1),senderUserId:e.string().min(1),body:e.string().max(2e3),envelope:N.optional(),attachment:e.object({url:e.url(),count:e.int().gt(0)}).nullable(),transaction:e.union([Zn,Qn]).nullish(),sentAt:e.iso.datetime()}).nullable(),er=e.object({kind:e.enum([`direct`]),id:e.string().min(1),otherParticipant:Xn,lastMessage:$n,unreadCount:e.int().gte(0),pinnedAt:e.iso.datetime().nullable(),createdAt:e.iso.datetime()}),P=e.string().min(1).max(80).regex(/^\S(?:.*\S)?$/),F=e.string().max(500).nullable(),tr=e.url().max(2048).nullable(),I=e.enum([`admin`,`member`]),nr=e.object({id:e.string().min(1),name:e.string().min(1),displayName:e.string().nullable(),image:e.url().nullable(),role:I}),rr=e.object({kind:e.enum([`group`]),id:e.string().min(1),title:P,description:F,logoUrl:tr,participants:e.array(nr),myRole:I,lastMessage:$n,unreadCount:e.int().gte(0),pinnedAt:e.iso.datetime().nullable(),createdAt:e.iso.datetime()}),L=e.discriminatedUnion(`kind`,[er.extend({kind:e.literal(`direct`)}),rr.extend({kind:e.literal(`group`)})]),ir=e.object({threads:e.array(L)});e.object({thread:L,created:e.boolean()});const ar=e.object({kind:e.enum([`direct`]).optional().default(`direct`),recipientUserId:e.string().min(1)}),or=e.object({kind:e.enum([`group`]),title:P,description:F.optional(),invitedUserIds:e.array(e.string().min(1)).min(1).max(100)}),R=e.object({ok:e.literal(!0)}),z=e.object({thread:rr});e.object({title:P.optional(),description:F.optional()});const sr=e.object({id:e.string().min(1),senderUserId:e.string().min(1),body:e.string().max(2e3).nullable(),envelope:N.optional()}).nullable(),B=e.enum([`👍`,`👎`,`❤️`,`😂`,`😮`,`😢`,`🔥`,`🎉`,`🙏`,`👀`,`✅`,`🎮`]),cr=e.object({emoji:B,count:e.int().gt(0),userIds:e.array(e.string().min(1))}),lr=e.enum([`image`]),V=e.object({id:e.string().min(1),kind:lr,url:e.url(),contentType:e.string().min(1),fileName:e.string().min(1),byteSize:e.int().gte(0),width:e.int().gt(0).nullable(),height:e.int().gt(0).nullable()}),ur=e.object({url:e.url(),title:e.string().max(500).nullable(),description:e.string().max(1e3).nullable(),imageUrl:e.url().nullable(),siteName:e.string().max(200).nullable()}),dr=e.object({id:e.string().min(1),threadId:e.string().min(1),senderUserId:e.string().min(1),transaction:e.union([Zn,Qn]).nullish(),body:e.string().max(2e3),envelope:N.optional(),sentAt:e.iso.datetime(),editedAt:e.iso.datetime().nullable(),deletedAt:e.iso.datetime().nullable(),replyTo:sr,reactions:e.array(cr),attachments:e.array(V),linkPreviews:e.array(ur)}),fr=e.object({messages:e.array(dr),nextBefore:e.iso.datetime().nullable()}),pr=e.string().max(2e3);e.object({body:pr.optional(),envelope:N.optional(),replyToMessageId:e.string().min(1).optional(),attachmentIds:e.array(e.string().min(1)).max(3).optional()});const mr=e.string().min(1).max(2e3);e.object({body:mr.optional(),envelope:N.optional()});const hr=e.object({aggregate:cr.nullable()}),H=e.object({attachment:V});e.object({userIds:e.array(e.string().min(1)).min(1).max(100)});const gr=e.object({pinnedAt:e.iso.datetime()}),_r=e.enum([`x25519`]),vr=e.object({userId:e.string().min(1),keyId:e.string().min(1).max(128),publicKey:e.string().length(43).regex(/^[A-Za-z0-9_-]+$/),algorithm:_r}),U=e.object({key:vr});e.object({publicKey:e.string().length(43).regex(/^[A-Za-z0-9_-]+$/),keyId:e.string().min(1).max(128),algorithm:_r});const yr=e.object({threadId:e.string().min(1),key:vr.nullable()}),br=e.object({keys:e.array(yr)});e.object({threadIds:e.array(e.string().min(1)).min(1).max(200)});const xr=e.object({exists:e.boolean(),attemptsRemaining:e.int().gte(0),kdfSalt:e.string().length(22).regex(/^[A-Za-z0-9_-]+$/).nullable(),kdfIterations:e.int().gte(1e5).lte(5e6).nullable()}),Sr=e.object({ok:e.literal(!0)});e.object({scalar:e.string().length(43).regex(/^[A-Za-z0-9_-]+$/),secret:e.string().length(43).regex(/^[A-Za-z0-9_-]+$/),pinKey:e.string().length(43).regex(/^[A-Za-z0-9_-]+$/),kdfSalt:e.string().length(22).regex(/^[A-Za-z0-9_-]+$/),kdfIterations:e.int().gte(1e5).lte(5e6)});const Cr=e.union([e.object({result:e.enum([`ok`]),scalar:e.string().length(43).regex(/^[A-Za-z0-9_-]+$/)}),e.object({result:e.enum([`wrong-pin`]),attemptsRemaining:e.int().gte(0)})]);e.object({pinKey:e.string().length(43).regex(/^[A-Za-z0-9_-]+$/)}),e.object({role:I});const W=e.object({name:e.string().nullable(),handle:e.string().nullable()}).nullable(),wr=e.object({chain:e.string().min(1),token:e.string().regex(/^0x[0-9a-fA-F]{40}$/),amount:e.string().regex(/^\d+$/),usdCents:e.int().nullable()}),Tr=e.object({code:e.string().nullable(),xLinked:e.boolean(),referrer:W,refereeCount:e.int().gte(0),lifetimeEarnings:e.array(wr),lifetimeUsdCents:e.int().nullable(),last30dEarnings:e.array(wr),last30dUsdCents:e.int().nullable()}),Er=e.object({code:e.string().min(1),generatedAt:e.iso.datetime()}),Dr=e.object({status:e.enum([`eligible`,`already-referred`,`self-referral`,`unknown-code`,`revoked-code`,`window-expired`]),referrer:W}),Or=e.object({status:e.enum([`bound`,`already-referred`,`self-referral`,`unknown-code`,`revoked-code`,`window-expired`]),referrer:W});e.object({code:e.string().min(1).max(64),source:e.enum([`signup-url`,`manual-claim`,`cookie-restore`]).optional().default(`manual-claim`)});const G=e.string().regex(/^[a-f0-9]{64}$/);e.object({playSessionId:G,expiresAt:e.iso.datetime()});const K=e.uuid();e.object({appId:K});const kr=e.object({ok:e.literal(!0),ttlSeconds:e.int().gt(0)});e.object({playSessionId:G,status:e.enum([`pending`,`active`,`ended`])});const Ar=e.uuid();e.object({playSessionId:G,userId:Ar}),e.object({status:e.enum([`pending`,`active`,`ended`])}),e.object({playSessionId:G}),e.object({status:e.enum([`ended`])}),e.object({playSessionId:G});const jr=e.object({appId:K,name:e.string(),logoUrl:e.string().nullable(),sessionCount:e.int().gte(0),totalDurationSeconds:e.int().gte(0)}),Mr=e.object({apps:e.array(jr),totalSessionCount:e.int().gte(0),totalDurationSeconds:e.int().gte(0)}),Nr=e.object({date:e.string().regex(/^\d{4}-\d{2}-\d{2}$/),appId:K,sessionCount:e.int().gte(0),totalDurationSeconds:e.int().gte(0)}),Pr=e.object({from:e.string().regex(/^\d{4}-\d{2}-\d{2}$/),to:e.string().regex(/^\d{4}-\d{2}-\d{2}$/),buckets:e.array(Nr)});e.object({appId:K,sessionCount:e.int().gte(0),uniquePlayerCount:e.int().gte(0),totalDurationSeconds:e.int().gte(0)});const Fr=e.object({followers:e.int().gte(0),following:e.int().gte(0),gamesPlayed:e.int().gte(0),totalPlaytimeSeconds:e.int().gte(0),reviewsLeft:e.int().gte(0),rewardsWon:e.int().gte(0),rewardsValueUsdCents:e.int().gte(0)}),Ir=e.object({date:e.string().regex(/^\d{4}-\d{2}-\d{2}$/),rewardsWon:e.int().gte(0),valueUsdCents:e.int().gte(0)}),Lr=e.object({from:e.string().regex(/^\d{4}-\d{2}-\d{2}$/),to:e.string().regex(/^\d{4}-\d{2}-\d{2}$/),totalRewardsWon:e.int().gte(0),totalValueUsdCents:e.int().gte(0),buckets:e.array(Ir)}),Rr=e.object({collectionId:e.string(),collectionAddress:e.string(),chain:e.string(),kind:e.enum([`erc721`,`erc1155`]),tokenId:e.string(),amount:e.string(),name:e.string().nullable(),description:e.string().nullable(),imageAssetId:e.string().nullable(),bannerAssetId:e.string().nullable(),devMetadata:e.record(e.string(),e.unknown()),appId:e.string().nullable(),appName:e.string().nullable(),appLogoUrl:e.string().nullable()}),zr=e.object({items:e.array(Rr)}),Br=e.object({id:e.string(),appId:e.string(),itemId:e.string(),amount:e.string(),priceCents:e.int().gte(0).nullable(),gasSponsored:e.boolean(),environment:e.enum([`development`,`production`]),createdAt:e.iso.datetime(),tokenId:e.string(),name:e.string().nullable(),description:e.string().nullable(),imageAssetId:e.string().nullable(),chain:e.string(),collectionAddress:e.string(),kind:e.enum([`erc721`,`erc1155`])}),Vr=e.object({permits:e.array(Br)}),Hr=e.object({mintRequestId:e.string(),txHash:e.string(),status:e.enum([`submitted`,`completed`]),mintedTokenId:e.string().nullable()}),Ur=e.object({mint:Hr,charge:e.object({currency:e.enum([`tron`]),gasCents:e.int().gte(0),priceCents:e.int().gte(0),totalCents:e.int().gte(0),gasPaidBy:e.enum([`user`,`developer`])})});e.object({name:e.string(),description:e.string().optional(),image:e.string().optional(),banner_image:e.string().optional(),external_link:e.string().optional()});const Wr=e.object({trait_type:e.string(),value:e.union([e.string(),e.number(),e.boolean()])});e.object({name:e.string(),description:e.string().optional(),image:e.string().optional(),attributes:e.array(Wr),extra:e.record(e.string(),e.record(e.string(),e.unknown()))}),e.object({collectionAddress:e.string().regex(/^0x[0-9a-fA-F]{40}$/),chain:e.string().min(1),toWallet:e.string().regex(/^0x[0-9a-fA-F]{40}$/).optional(),toUserId:e.string().optional(),tokenId:e.string().regex(/^\d+$/).optional(),amount:e.string().regex(/^\d+$/).optional()});const Gr=e.object({id:e.string(),chain:e.string(),collectionAddress:e.string(),kind:e.enum([`erc721`,`erc1155`]),name:e.string().nullable(),environment:e.enum([`development`,`production`])}),Kr=e.object({collections:e.array(Gr)}),qr=e.object({itemCount:e.int().gt(0),baselineUsdCents:e.int().gte(0),gasUsdCents:e.int().gte(0),tron:e.object({baselineCents:e.int().gte(0),gasCents:e.int().gte(0),totalCents:e.int().gte(0)}),eth:e.object({baselineWei:e.string().regex(/^\d+$/),gasWei:e.string().regex(/^\d+$/),totalWei:e.string().regex(/^\d+$/)})}),Jr=e.enum([`capped`,`flexible`,`unlimited`]),Yr=e.object({name:e.string().min(1).max(120).nullish(),description:e.string().max(2e3).nullish(),devMetadata:e.record(e.string(),e.unknown()).optional(),supplyType:Jr.optional(),maxSupply:e.string().regex(/^\d+$/).nullish(),active:e.boolean().optional()});e.object({collectionAddress:e.string().regex(/^0x[0-9a-fA-F]{40}$/),chain:e.string().min(1),items:e.array(Yr).min(1).max(50)});const q=e.object({id:e.string(),collectionId:e.string(),collectionAddress:e.string(),chain:e.string(),kind:e.enum([`erc721`,`erc1155`]),tokenId:e.string(),name:e.string().nullable(),description:e.string().nullable(),imageAssetId:e.string().nullable(),bannerAssetId:e.string().nullable(),devMetadata:e.record(e.string(),e.unknown()),supplyType:Jr.nullable(),maxSupply:e.string().nullable(),active:e.boolean()}),Xr=e.object({items:e.array(q),charge:e.object({currency:e.enum([`tron`]),amountCents:e.int().gte(0),baselineCents:e.int().gte(0),gasCents:e.int().gte(0),addItemTxHash:e.string()})}),Zr=e.object({items:e.array(q)}),Qr=e.object({id:e.string(),appId:e.string(),itemId:e.string(),userId:e.string(),amount:e.string(),priceCents:e.int().gte(0).nullable(),gasSponsored:e.boolean(),status:e.enum([`pending`,`redeemed`,`revoked`]),createdAt:e.iso.datetime()});e.object({toUserId:e.string().min(1),amount:e.string().regex(/^\d+$/).optional(),priceCents:e.int().gte(0).nullish(),gasSponsored:e.boolean().optional()});const $r=e.object({holderCount:e.int().gte(0),walletCount:e.int().gte(0),totalHeld:e.string().regex(/^\d+$/)}),ei=e.object({walletAddress:e.string(),userId:e.string().nullable(),amount:e.string().regex(/^\d+$/)}),ti=e.object({stats:$r,holders:e.array(ei)}),ni=e.object({id:e.string(),appId:e.string(),itemId:e.string(),userId:e.string(),direction:e.enum([`vault_in`,`withdraw`]),lockKind:e.enum([`vault`,`burn`]).nullable(),amount:e.string(),gasSponsored:e.boolean(),status:e.enum([`pending`,`redeemed`,`revoked`]),custodyId:e.string().nullable(),createdAt:e.iso.datetime()});e.object({toUserId:e.string().min(1),lockKind:e.enum([`vault`,`burn`]),amount:e.string().regex(/^\d+$/).optional(),gasSponsored:e.boolean().optional()}),e.object({custodyId:e.string().min(1)});const ri=e.object({id:e.string(),appId:e.string(),itemId:e.string(),direction:e.enum([`vault_in`,`withdraw`]),lockKind:e.enum([`vault`,`burn`]).nullable(),amount:e.string(),gasSponsored:e.boolean(),environment:e.enum([`development`,`production`]),custodyId:e.string().nullable(),createdAt:e.iso.datetime(),tokenId:e.string(),name:e.string().nullable(),description:e.string().nullable(),imageAssetId:e.string().nullable(),chain:e.string(),collectionAddress:e.string(),kind:e.enum([`erc721`,`erc1155`])}),ii=e.object({permits:e.array(ri)}),ai=e.object({permitId:e.string(),direction:e.enum([`vault_in`,`withdraw`]),vault:e.string(),collection:e.string(),user:e.string(),tokenId:e.string().regex(/^\d+$/),amount:e.string().regex(/^\d+$/),lockKind:e.enum([`vault`,`burn`]).nullable(),destination:e.string().nullable(),deadline:e.int().gt(0),signature:e.string()}),oi=e.object({direction:e.enum([`vault_in`,`withdraw`]),collection:e.string(),vault:e.string(),chainId:e.int().gt(0),user:e.string(),tokenId:e.string().regex(/^\d+$/),amount:e.string().regex(/^\d+$/),nonce:e.string().regex(/^\d+$/).nullable(),deadline:e.int().gt(0),feeCents:e.int().gte(0),gasWei:e.string().regex(/^\d+$/),gasPaidBy:e.enum([`developer`,`user`]),requiresUserSignature:e.boolean()}),si=e.object({ok:e.boolean(),txHash:e.string(),chargedCents:e.int().gte(0),gasPaidBy:e.enum([`developer`,`user`])});e.object({userSignature:e.string().min(1).optional(),deadline:e.int().gt(0).optional()});const ci=e.object({collection:e.string(),chainId:e.int().gt(0),from:e.string(),to:e.string(),tokenId:e.string().regex(/^\d+$/),amount:e.string().regex(/^\d+$/),nonce:e.string().regex(/^\d+$/),deadline:e.int().gt(0),feeCents:e.int().gte(0),gasWei:e.string().regex(/^\d+$/),selfPayAvailable:e.boolean()});e.object({toUserId:e.string().min(1),collection:e.string().min(1),tokenId:e.string().regex(/^\d+$/),amount:e.string().regex(/^\d+$/).optional()});const li=e.object({ok:e.boolean(),txHash:e.string(),chargedCents:e.int().gte(0)});e.object({toUserId:e.string().min(1),collection:e.string().min(1),tokenId:e.string().regex(/^\d+$/),amount:e.string().regex(/^\d+$/).optional(),deadline:e.int().gt(0),userSignature:e.string().min(1),threadId:e.string().min(1).optional()});const ui=e.object({id:e.string(),collectionId:e.string(),collectionAddress:e.string(),chain:e.string(),kind:e.enum([`erc721`,`erc1155`]),tokenId:e.string(),amount:e.string(),lockKind:e.enum([`vault`,`burn`]),vaultAddress:e.string(),createdAt:e.iso.datetime(),name:e.string().nullable(),description:e.string().nullable(),imageAssetId:e.string().nullable()}),di=e.object({custody:e.array(ui)}),fi=e.object({ok:e.boolean(),txHash:e.string()}),pi=e.object({requesterId:e.string().min(1),requesterName:e.string().min(1),requesterDisplayName:e.string().nullable(),requesterImage:e.url().nullable(),friendshipId:e.string().min(1)}),mi=e.object({accepterId:e.string().min(1),accepterName:e.string().min(1),accepterDisplayName:e.string().nullable(),accepterImage:e.url().nullable(),friendshipId:e.string().min(1)}),hi=e.object({appId:e.uuid(),appName:e.string().min(1),scope:e.enum([`publish`,`changes`,`bip_publish`])}),gi=e.object({appId:e.uuid(),appName:e.string().min(1),scope:e.enum([`publish`,`changes`,`bip_publish`]),notes:e.string().min(1).max(1e3)}),_i=e.object({appId:e.uuid(),appName:e.string().min(1),appLogoUrl:e.url().nullable(),inviterId:e.string().min(1),inviterName:e.string().min(1),inviterDisplayName:e.string().nullable()}),vi=e.object({appId:e.uuid(),appName:e.string().min(1),accepterId:e.string().min(1),accepterName:e.string().min(1),accepterDisplayName:e.string().nullable(),accepterImage:e.url().nullable()}),yi=e.union([e.object({id:e.string().min(1),kind:e.enum([`friend_request`]),payload:pi,read:e.boolean(),createdAt:e.iso.datetime()}),e.object({id:e.string().min(1),kind:e.enum([`friend_accepted`]),payload:mi,read:e.boolean(),createdAt:e.iso.datetime()}),e.object({id:e.string().min(1),kind:e.enum([`app_page_approved`]),payload:hi,read:e.boolean(),createdAt:e.iso.datetime()}),e.object({id:e.string().min(1),kind:e.enum([`app_page_rejected`]),payload:gi,read:e.boolean(),createdAt:e.iso.datetime()}),e.object({id:e.string().min(1),kind:e.enum([`app_participant_invite`]),payload:_i,read:e.boolean(),createdAt:e.iso.datetime()}),e.object({id:e.string().min(1),kind:e.enum([`app_participant_accepted`]),payload:vi,read:e.boolean(),createdAt:e.iso.datetime()})]),bi=e.object({notifications:e.array(yi),unreadCount:e.int().gte(0)});e.object({ok:e.literal(!0)}),e.object({read:e.boolean()});const xi=e.enum([`online`,`offline`]),Si=e.object({user:Xn,friendshipId:e.string().min(1),acceptedAt:e.iso.datetime(),onlineStatus:xi}),Ci=e.object({friends:e.array(Si)}),wi=e.object({friends:e.array(Xn)});e.object({decision:e.enum([`accept`,`reject`])});const Ti=e.object({provider:e.enum([`twitter`,`discord`,`github`]),subject:e.string().min(1),username:e.string().nullable(),name:e.string().nullable(),profilePictureUrl:e.url().nullable(),verifiedAt:e.iso.datetime().nullable()}),Ei=e.object({accounts:e.array(Ti)}),Di=e.string().nullable(),Oi=e.url().max(2048).nullable(),ki=e.object({studioName:e.string().min(1).max(80).nullable(),studioUrl:e.url().max(2048).nullable(),studioXHandle:Di,githubUrl:Oi,logoUrl:e.url().max(2048).nullable()}),Ai=e.object({id:e.string().min(1),name:e.string().min(1),logoUrl:e.url().max(2048).nullable(),environment:e.enum([`development`,`production`])}),ji=e.object({profile:ki,apps:e.array(Ai)}).nullable(),Mi=e.object({followers:e.int().gte(0),following:e.int().gte(0)}),Ni=e.object({gamesPlayed:e.int().gte(0),totalPlaytimeSeconds:e.int().gte(0),reviewsLeft:e.int().gte(0),rewardsWon:e.int().gte(0),rewardsValueUsdCents:e.int().gte(0)}),Pi=e.object({appId:e.string().min(1),name:e.string().min(1),logoUrl:e.url().max(2048).nullable(),sessionCount:e.int().gte(0),totalPlaytimeSeconds:e.int().gte(0)}),Fi=e.object({appId:e.string().min(1),appName:e.string().min(1),appLogoUrl:e.url().max(2048).nullable(),recommended:e.boolean(),body:e.string(),createdAt:e.iso.datetime()}),Ii=e.object({isFollowing:e.boolean(),isFollowedBy:e.boolean(),friendship:e.enum([`none`,`pending_out`,`pending_in`,`accepted`]),friendshipId:e.string().min(1).nullable()}).nullable(),Li=e.object({id:e.string().min(1),name:e.string().min(1),displayName:e.string().nullable(),bio:e.string().nullable(),websiteUrl:e.url().max(2048).nullable(),image:e.url().nullable(),banner:oe,createdAt:e.iso.datetime(),socials:e.array(Ti),developer:ji,counts:Mi,stats:Ni,topGames:e.array(Pi),recentReviews:e.array(Fi),relationship:Ii}),Ri=e.object({id:e.string().min(1),name:e.string().min(1),displayName:e.string().nullable(),image:e.url().nullable(),socials:e.array(Ti)}),zi=e.object({results:e.array(Ri)});e.object({ok:e.literal(!0),friendshipId:e.string().min(1)});const Bi=e.object({id:e.string().min(1),keyPrefix:e.string().min(1),scopes:e.array(e.enum([`developer:read`,`developer:apps`,`developer:pages`])),createdAt:e.iso.datetime(),expiresAt:e.iso.datetime().nullable(),lastUsedAt:e.iso.datetime().nullable(),revokedAt:e.iso.datetime().nullable()}),Vi=e.object({key:Bi,secret:e.string().min(1)});e.object({scopes:e.array(e.enum([`developer:read`,`developer:apps`,`developer:pages`])).min(1),expiresAt:e.iso.datetime().nullish()});const Hi=e.object({keys:e.array(Bi)}),J=e.object({ok:e.literal(!0)}),Ui=e.object({id:e.string().min(1)}),Wi=e.string().regex(/^[A-Za-z0-9 ._-]{1,40}$/),Gi=e.object({chain:e.string().min(1),custody:e.enum([`server`])});e.object({name:Wi,chains:e.array(Gi).optional()});const Ki=e.string().min(1).max(2048),qi=e.enum([`eth`,`tron`]),Ji=e.array(qi).min(1).max(2);e.object({name:Wi.optional(),slug:v.nullish(),logoUrl:e.url().max(2048).nullish(),testAccess:e.enum([`private`,`public`]).optional(),redirectUris:e.array(e.url().max(2048)).max(20).optional(),embedOrigins:e.array(Ki).max(20).optional(),acceptedCurrencies:Ji.optional(),paymentStatusWebhookUrl:e.url().max(2048).nullish(),paymentStatusWebhookUrlTest:e.url().max(2048).nullish()});const Y=e.object({logoUrl:e.url().nullable()}),Yi=e.object({chain:e.string().min(1),token:e.string().min(1),tokenDecimals:e.int(),lockedWei:e.string(),unlockedWei:e.string(),walletBalanceWei:e.string().nullable()}),Xi=e.object({appId:e.string().min(1),balances:e.array(Yi)}),Zi=e.object({appId:e.string().min(1),availableCents:e.int().gte(0),lockedCents:e.int().gte(0),totalCents:e.int().gte(0)}),Qi=e.object({ts:e.iso.datetime(),sumCents:e.number(),paymentCount:e.int()}),$i=e.object({appId:e.string().min(1),range:e.string().min(1),bucketSecs:e.int(),windowSecs:e.int(),chain:e.string().nullable(),buckets:e.array(Qi)}),ea=e.object({ts:e.iso.datetime(),sessionCount:e.int(),uniquePlayerCount:e.int(),totalDurationSeconds:e.int()}),ta=e.object({appId:e.string().min(1),range:e.string().min(1),bucketSecs:e.int(),windowSecs:e.int(),buckets:e.array(ea)}),na=e.object({appId:e.string().min(1),earnedCents:e.int(),earningEventCount:e.int(),distinctPayers:e.int(),sessionCount:e.int(),uniquePlayerCount:e.int(),totalPlaytimeSeconds:e.int()}),ra=e.object({chain:e.string().min(1),address:e.string().regex(/^0x[0-9a-fA-F]{40}$/),custody:e.enum([`server`]).nullable(),walletId:e.string().nullable(),autoSweepEnabled:e.boolean(),sweepThresholdCents:e.int().nullable()}),ia=e.object({appId:e.string().min(1),wallets:e.array(ra)}),aa=e.object({appId:e.string().min(1),chain:e.string().min(1),autoSweepEnabled:e.boolean(),sweepThresholdCents:e.int().nullable()});e.object({enabled:e.boolean(),thresholdCents:e.int().gt(0).nullish()});const oa=e.object({appId:e.string().min(1),chain:e.string().min(1),custody:e.enum([`server`]),walletId:e.string().min(1),address:e.string().regex(/^0x[0-9a-fA-F]{40}$/)}),sa=e.object({appId:e.string().min(1),chain:e.string().min(1),token:e.string().min(1),txHash:e.string().min(1),amountWei:e.string().min(1),recipient:e.string().regex(/^0x[0-9a-fA-F]{40}$/)}),ca=e.object({appId:e.string().min(1),chain:e.string().min(1),recipient:e.string().regex(/^0x[0-9a-fA-F]{40}$/),transfers:e.array(e.object({token:e.string().min(1),txHash:e.string().min(1),amountWei:e.string().min(1)}))}),la=e.object({id:e.string().min(1),clientId:e.string().min(1),environment:e.enum([`development`,`production`]),secretLast4:e.string().min(1),createdAt:e.iso.datetime(),lastUsedAt:e.iso.datetime().nullable()}),ua=e.object({key:la,clientSecret:e.string().min(1)}),da=e.object({ok:e.literal(!0),status:e.enum([`pending`,`approved`])});e.object({reason:e.string().min(1).max(500).optional()});const fa=e.object({secret:e.string().regex(/^[a-f0-9]{64}$/),secretLast4:e.string().length(4)}),pa=e.object({appealId:e.string().regex(/^0x[0-9a-f]{32}$/),paymentId:e.string().regex(/^0x[0-9a-f]{32}$/),chain:e.string().min(1),vault:e.string().regex(/^0x[0-9a-fA-F]{40}$/),appellant:e.string().regex(/^0x[0-9a-fA-F]{40}$/),amount:e.string().regex(/^\d+$/),token:e.string().regex(/^0x[0-9a-fA-F]{40}$/),status:e.enum([`open`,`resolved_refund`,`resolved_dismiss`,`cancelled`,`force_cancelled`]),reason:e.string().nullable(),filedAt:e.iso.datetime(),resolvedAt:e.iso.datetime().nullable()}),ma=e.object({appeals:e.array(pa)}),ha=e.object({paymentId:e.string().regex(/^0x[0-9a-f]{32}$/),chain:e.string().min(1),vault:e.string().regex(/^0x[0-9a-fA-F]{40}$/),beneficiary:e.string().regex(/^0x[0-9a-fA-F]{40}$/),token:e.string().regex(/^0x[0-9a-fA-F]{40}$/),grossAmount:e.string().regex(/^\d+$/),creditedAmount:e.string().regex(/^\d+$/),vaultReleaseAt:e.iso.datetime(),signedAt:e.iso.datetime(),matured:e.boolean(),hasActiveAppeal:e.boolean()}),ga=e.object({deposits:e.array(ha)}),_a=e.object({appCount:e.int().gte(0),availableCents:e.int().gte(0),lockedCents:e.int().gte(0),totalCents:e.int().gte(0)}),va=e.object({userId:e.string().min(1),status:e.enum([`invited`,`accepted`,`revoked`]),name:e.string().nullable(),email:e.string().nullable(),image:e.url().nullable(),invitedAt:e.iso.datetime(),respondedAt:e.iso.datetime().nullable()}),ya=e.object({participants:e.array(va)});e.object({identifier:e.string().min(1).max(80)});const ba=e.object({appId:e.string().min(1),appName:e.string().min(1),appLogoUrl:e.url().nullable(),status:e.enum([`invited`,`accepted`,`revoked`]),invitedAt:e.iso.datetime()}),xa=e.object({invites:e.array(ba)}),Sa=e.object({id:e.string().min(1),displayName:e.string().nullable(),email:e.string().nullable()}).nullable(),Ca=e.string().min(1).max(80).nullable(),wa=e.string().min(10).max(1e3).nullable(),Ta=e.object({policyVersion:e.string().min(1),policyAcceptedAt:e.iso.datetime(),logoUrl:e.url().max(2048).nullable(),email:e.email().nullable(),xHandle:Di,teamName:Ca,projectDescription:wa}),Ea=e.object({reason:e.string().min(1).max(500).optional()}),Da=e.object({id:e.string().min(1),userId:e.string().min(1),user:Sa,kind:e.enum([`role`,`production`]),status:e.enum([`pending`,`approved`,`rejected`,`cancelled`]),appId:e.string().min(1).nullable(),payload:e.union([e.object({kind:e.enum([`role`]),data:Ta}),e.object({kind:e.enum([`production`]),data:Ea})]),reviewedBy:e.string().min(1).nullable(),reviewedAt:e.iso.datetime().nullable(),reviewNotes:e.string().nullable(),createdAt:e.iso.datetime(),updatedAt:e.iso.datetime()}).nullable(),Oa=e.object({chain:e.string().min(1),address:e.string().regex(/^0x[0-9a-fA-F]{40}$/)}),ka=e.object({id:e.string().min(1),name:Wi,slug:v.nullable(),logoUrl:e.url().max(2048).nullable(),environment:e.enum([`development`,`production`]),productionApprovedAt:e.iso.datetime().nullable(),testAccess:e.enum([`private`,`public`]),createdAt:e.iso.datetime(),redirectUris:e.array(e.url().max(2048)),embedOrigins:e.array(Ki),acceptedCurrencies:Ji,payoutAddresses:e.array(Oa),keys:e.array(la),pendingProductionRequestId:e.string().min(1).nullable(),paymentStatusWebhookUrl:e.url().max(2048).nullable(),paymentStatusWebhookSecretLast4:e.string().length(4).nullable(),paymentStatusWebhookUrlTest:e.url().max(2048).nullable(),paymentStatusWebhookSecretLast4Test:e.string().length(4).nullable()}),Aa=e.object({roleStatus:e.enum([`none`,`pending`,`approved`,`rejected`,`cancelled`]),latestRequest:Da,profile:ki.nullable(),apps:e.array(ka)});e.object({studioName:e.string().min(1).max(80).nullish(),studioUrl:e.url().max(2048).nullish(),studioXHandle:Di.optional(),githubUrl:Oi.optional(),logoUrl:e.url().max(2048).nullish()}),e.object({acceptPolicy:e.literal(!0),logoUrl:e.url().max(2048).optional(),email:e.email().optional(),teamName:Ca.optional(),projectDescription:wa.optional()});const ja=e.object({enabled:e.boolean(),status:e.enum([`draft`,`pending_review`,`published`,`hidden`]),firstPublishedAt:e.iso.datetime().nullable(),reviewedAt:e.iso.datetime().nullable(),reviewNotes:e.string().nullable(),hiddenAt:e.iso.datetime().nullable(),hiddenReasonPublic:e.string().nullable()}),X=e.object({appId:e.uuid(),slug:v.nullable(),status:e.enum([`draft`,`pending_review`,`published`,`hidden`]),categories:y,tagline:b.nullable(),bannerUrl:e.url().max(2048).nullable(),thumbnailUrl:e.url().max(2048).nullable(),thumbnailVideoUrl:e.url().max(2048).nullable(),playUrl:e.url().max(2048).nullable(),discordUrl:e.url().max(2048).nullable(),twitterUrl:e.url().max(2048).nullable(),redditUrl:e.url().max(2048).nullable(),telegramUrl:e.url().max(2048).nullable(),gallery:x,chapters:S,links:C,platforms:w,gameType:T,ageRating:E,languages:D,releaseStatus:O,firstPublishedAt:e.iso.datetime().nullable(),reviewedAt:e.iso.datetime().nullable(),reviewNotes:e.string().nullable(),hiddenAt:e.iso.datetime().nullable(),hiddenReasonPublic:e.string().nullable(),pendingReview:e.boolean(),bip:ja});e.object({categories:y.optional(),tagline:b.nullish(),bannerUrl:e.url().max(2048).nullish(),thumbnailUrl:e.url().max(2048).nullish(),thumbnailVideoUrl:e.url().max(2048).nullish(),playUrl:e.url().max(2048).nullish(),discordUrl:e.url().max(2048).nullish(),twitterUrl:e.url().max(2048).nullish(),redditUrl:e.url().max(2048).nullish(),telegramUrl:e.url().max(2048).nullish(),gallery:x.optional(),chapters:S.optional(),links:C.optional(),platforms:w.optional(),gameType:T.optional(),ageRating:E.optional(),languages:D.optional(),releaseStatus:O.optional()});const Ma=e.object({url:e.url().max(2048)});e.object({enabled:e.boolean()});const Na=e.object({playSessionId:e.string().min(1),userId:e.uuid(),appId:e.uuid(),status:e.enum([`pending`,`active`]),userHalfFresh:e.boolean(),gameHalfFresh:e.boolean(),active:e.boolean(),startedAt:e.iso.datetime(),activatedAt:e.iso.datetime().nullable(),lastSeenAt:e.iso.datetime().nullable()}),Pa=e.object({players:e.array(Na),total:e.int().gte(0),liveCount:e.int().gte(0),generatedAt:e.iso.datetime()}),Fa=e.object({id:e.string().min(1),email:e.email().nullable(),role:u,addedBy:e.string().min(1).nullable(),addedAt:e.iso.datetime(),lastAccessedAt:e.iso.datetime().nullable()}),Ia=e.object({admins:e.array(Fa)}),La=e.object({id:e.string()});e.object({email:e.email(),role:u.optional()});const Ra=e.object({id:e.string(),role:u});e.object({role:u});const za=e.object({id:e.string().min(1),name:e.string().min(1),displayName:e.string().nullable(),email:e.email().nullable(),createdAt:e.iso.datetime(),bannedAt:e.iso.datetime().nullable(),deletedAt:e.iso.datetime().nullable()}),Ba=e.object({users:e.array(za),total:e.int().gte(0),offset:e.int().gte(0),limit:e.int().gt(0)}),Va=e.object({id:e.string(),banned:e.boolean()});e.object({banned:e.boolean(),reason:e.string().min(1).max(280).optional()});const Ha=e.object({id:e.string().min(1),actorId:e.string().min(1).nullable(),actorKind:e.enum([`user`,`system`,`service`]),action:e.string().min(1),targetType:e.string().min(1),targetId:e.string().min(1),purpose:e.string().min(1),legalBasis:e.enum([`consent`,`contract`,`legitimate-interest`,`legal-obligation`,`vital-interest`,`public-task`]),occurredAt:e.iso.datetime(),attributes:e.record(e.string(),e.unknown()),traceId:e.string().min(1).nullable()}),Ua=e.object({rows:e.array(Ha),total:e.int().gte(0),offset:e.int().gte(0),limit:e.int().gt(0)}),Wa=e.object({requests:e.array(Da)}),Ga=e.object({id:e.string().min(1),status:e.enum([`pending`,`approved`,`rejected`,`cancelled`])});e.object({decision:e.enum([`approve`,`reject`]),notes:e.string().min(1).max(1e3).optional()});const Ka=e.object({id:e.string().min(1),name:e.string(),environment:e.enum([`development`,`production`]),logoUrl:e.url().nullable(),productionApprovedAt:e.iso.datetime().nullable(),createdAt:e.iso.datetime()}),qa=e.object({userId:e.string().min(1),email:e.email(),displayName:e.string().nullable(),image:e.url().nullable(),studio:ki.nullable(),apps:e.array(Ka),grantedAt:e.iso.datetime().nullable()}),Ja=e.object({developers:e.array(qa)}),Ya=e.object({appId:e.uuid(),appName:e.string(),ownerDisplayName:e.string().nullable(),ownerImage:e.string().nullable(),ownerUserId:e.uuid(),ownerEmail:e.string().nullable(),appLogoUrl:e.string().nullable(),slug:e.string().nullable(),status:e.enum([`draft`,`pending_review`,`published`,`hidden`]),categories:y,tagline:e.string().nullable(),submittedAt:e.iso.datetime().nullable(),firstPublishedAt:e.iso.datetime().nullable(),hiddenAt:e.iso.datetime().nullable(),hiddenReasonInternal:e.string().nullable(),pendingChangesSubmittedAt:e.iso.datetime().nullable(),bipEnabled:e.boolean(),bipStatus:e.enum([`draft`,`pending_review`,`published`,`hidden`]),bipFirstPublishedAt:e.iso.datetime().nullable(),bipHiddenAt:e.iso.datetime().nullable()}),Xa=e.object({items:e.array(Ya)}),Z=e.object({status:e.enum([`draft`,`pending_review`,`published`,`hidden`])});e.object({reasonPublic:e.string().min(1).max(500),reasonInternal:e.string().max(2e3).optional()}),e.union([e.object({decision:e.enum([`approve`])}),e.object({decision:e.enum([`reject`]),notes:e.string().min(1).max(1e3)})]);const Za=e.object({field:e.string(),label:e.string(),from:e.string(),to:e.string()}),Qa=e.object({appId:e.uuid(),submittedAt:e.iso.datetime().nullable(),changes:e.array(Za)}),$a=e.object({bipStatus:e.enum([`draft`,`pending_review`,`published`,`hidden`])}),eo=e.object({purchaseFeeBps:e.int().gte(0).lte(1e4),stakeFeeBps:e.int().gte(0).lte(1e4),updatedAt:e.iso.datetime(),updatedBy:e.string().min(1).nullable()}),Q=e.object({chain:e.string().min(1),chainId:e.int().gte(0),to:e.string().regex(/^0x[0-9a-fA-F]{40}$/),calldataHex:e.string().regex(/^0x[0-9a-fA-F]*$/)}),to=e.object({target:e.enum([`purchase`]),envelope:Q}),no=e.object({purchaseFeeBps:e.int().gte(0).lte(1e4),stakeFeeBps:e.int().gte(0).lte(1e4),updatedAt:e.iso.datetime(),updatedBy:e.string().min(1).nullable(),envelopes:e.array(to)});e.object({purchaseFeeBps:e.int().gte(0).lte(1e4).optional(),stakeFeeBps:e.int().gte(0).lte(1e4).optional()});const ro=e.object({appId:e.string().min(1),platformFeeBps:e.int().gte(0).lte(1e4).nullable(),rakeCapBps:e.int().gte(0).lte(3e3).nullable(),effectivePlatformFeeBps:e.int().gte(0).lte(1e4),effectiveRakeCapBps:e.int().gte(0).lte(3e3),updatedAt:e.iso.datetime().nullable(),updatedBy:e.string().min(1).nullable()});e.object({platformFeeBps:e.int().gte(0).lte(1e4).nullish(),rakeCapBps:e.int().gte(0).lte(3e3).nullish()}),e.object({chain:e.string().min(1),vaultAddress:e.string().regex(/^0x[0-9a-fA-F]{40}$/),processorAddress:e.string().regex(/^0x[0-9a-fA-F]{40}$/),action:e.enum([`add`,`remove`])}),e.object({chain:e.string().min(1),processorAddress:e.string().regex(/^0x[0-9a-fA-F]{40}$/),newTreasury:e.string().regex(/^0x[0-9a-fA-F]{40}$/)});const io=e.object({chain:e.string().min(1),walletAddress:e.string().regex(/^0x[0-9a-fA-F]{40}$/),reason:e.string().min(1),flaggedBy:e.string().min(1),createdAt:e.iso.datetime(),updatedAt:e.iso.datetime()});e.object({chain:e.string().min(1),walletAddress:e.string().regex(/^0x[0-9a-fA-F]{40}$/),reason:e.string().min(1).max(2e3)});const ao=e.object({chain:e.string().min(1),walletAddress:e.string().regex(/^0x[0-9a-fA-F]{40}$/),removed:e.literal(!0)});e.object({chain:e.string().min(1),walletAddress:e.string().regex(/^0x[0-9a-fA-F]{40}$/)});const oo=e.object({entries:e.array(io)});e.object({chain:e.string().min(1),target:e.enum([`router`,`credit_vault`,`platform_vault`]),newOperator:e.string().regex(/^0x[0-9a-fA-F]{40}$/)}),e.object({chain:e.string().min(1),target:e.enum([`router`,`credit_vault`,`platform_vault`]),action:e.enum([`pause`,`unpause`])}),e.object({chain:e.string().min(1),vaultAddress:e.string().regex(/^0x[0-9a-fA-F]{40}$/),lockSeconds:e.int().gte(0)}),e.object({chain:e.string().min(1),account:e.string().regex(/^0x[0-9a-fA-F]{40}$/),lockSeconds:e.int().gte(0)});const so=e.object({appealId:e.string().regex(/^0x[0-9a-f]{32}$/),paymentId:e.string().regex(/^0x[0-9a-f]{32}$/),chain:e.string().min(1),vault:e.string().regex(/^0x[0-9a-fA-F]{40}$/),appellant:e.string().regex(/^0x[0-9a-fA-F]{40}$/),amount:e.string().regex(/^\d+$/),token:e.string().regex(/^0x[0-9a-fA-F]{40}$/),status:e.enum([`open`,`resolved_refund`,`resolved_dismiss`,`cancelled`,`force_cancelled`]),reason:e.string().nullable(),filedAt:e.iso.datetime(),resolvedAt:e.iso.datetime().nullable(),resolvedBy:e.string().nullable(),resolutionNotes:e.string().nullable()}),co=e.object({appeals:e.array(so),nextCursorFiledAt:e.iso.datetime().nullable()}),lo=e.enum([`pending_onchain`,`open`,`resolved_refund`,`resolved_dismiss`,`cancelled`,`force_cancelled`]),uo=e.enum([`purchase`,`pot`,`matured`]),fo=e.object({source:uo,chain:e.string(),amount:e.string().regex(/^\d+$/),token:e.string().regex(/^0x[0-9a-fA-F]{40}$/),vault:e.string().regex(/^0x[0-9a-fA-F]{40}$/),depositId:e.string().regex(/^0x[0-9a-f]{32}$/).nullable(),paymentId:e.string().regex(/^0x[0-9a-f]{32}$/).nullable(),appellant:e.string().regex(/^0x[0-9a-fA-F]{40}$/),appellantUserId:e.string().nullable(),respondent:e.string().regex(/^0x[0-9a-fA-F]{40}$/).nullable(),respondentUserId:e.string().nullable(),reason:e.string().nullable(),filedAt:e.iso.datetime(),resolvedAt:e.iso.datetime().nullable(),resolution:e.object({resolutionId:e.string().regex(/^0x[0-9a-f]{32}$/),outcome:e.int().gte(0).lte(1),deadline:e.int().gte(0),signature:e.string().regex(/^0x[0-9a-fA-F]+$/)}).nullable(),refundClaimedAt:e.iso.datetime().nullable()}),po=e.enum([`party`,`admin`,`system`]),mo=e.object({id:e.string().min(1),senderUserId:e.string().nullable(),senderRole:po,body:e.string().nullable(),attachments:e.array(V),sentAt:e.iso.datetime()}),ho=e.object({appealId:e.string().regex(/^0x[0-9a-f]{32}$/),threadId:e.string().nullable(),status:lo,readOnly:e.boolean(),canResolve:e.boolean(),detail:fo,messages:e.array(mo)}),go=e.object({message:mo});e.object({body:e.string().min(1).max(4e3).optional(),attachmentIds:e.array(e.string().min(1)).max(3).optional()});const _o=e.object({appealId:e.string().regex(/^0x[0-9a-f]{32}$/),resolutionId:e.string().regex(/^0x[0-9a-f]{32}$/),chain:e.string().min(1),chainId:e.int().gt(0),vault:e.string().regex(/^0x[0-9a-fA-F]{40}$/),outcome:e.int().gte(0).lte(1),deadline:e.int().gte(0),signature:e.string().regex(/^0x[0-9a-fA-F]+$/),status:e.enum([`resolved_refund`,`resolved_dismiss`])});e.object({decision:e.enum([`refund`,`dismiss`]),notes:e.string().min(1).max(2e3).optional()});const vo=e.object({appealId:e.string().regex(/^0x[0-9a-f]{32}$/),paymentId:e.string().regex(/^0x[0-9a-f]{32}$/),chain:e.string().min(1),chainId:e.int().gt(0),vault:e.string().regex(/^0x[0-9a-fA-F]{40}$/),appellant:e.string().regex(/^0x[0-9a-fA-F]{40}$/),amount:e.string().regex(/^\d+$/),deadline:e.int().gte(0),signature:e.string().regex(/^0x[0-9a-fA-F]+$/)});e.object({paymentId:e.string().regex(/^0x[0-9a-f]{32}$/),amount:e.string().regex(/^\d+$/),reason:e.string().min(1).max(2e3)}),e.object({legId:e.string().regex(/^0x[0-9a-f]{32}$/),reason:e.string().min(1).max(2e3)});const yo=e.object({kind:e.enum([`direct`]),txHash:e.string().regex(/^0x[0-9a-fA-F]{64}$/),blockNumber:e.string().regex(/^\d+$/),recipient:e.string().regex(/^0x[0-9a-fA-F]{40}$/),amount:e.string().regex(/^\d+$/)}),bo=e.object({kind:e.enum([`pull`]),txHash:e.string().regex(/^0x[0-9a-fA-F]{64}$/),blockNumber:e.string().regex(/^\d+$/),recipient:e.string().regex(/^0x[0-9a-fA-F]{40}$/),amount:e.string().regex(/^\d+$/)});e.discriminatedUnion(`kind`,[yo.extend({kind:e.literal(`direct`)}),bo.extend({kind:e.literal(`pull`)})]),e.object({chain:e.string().min(1),token:e.string().regex(/^0x[0-9a-fA-F]{40}$/),amount:e.string().regex(/^\d+$/),recipient:e.string().regex(/^0x[0-9a-fA-F]{40}$/).optional(),recipientUserId:e.string().min(1).optional(),metadata:_.optional()}),e.object({distributionId:e.string().regex(/^0x[0-9a-fA-F]{32}$/),txHash:e.string().regex(/^0x[0-9a-fA-F]{64}$/),blockNumber:e.string().regex(/^\d+$/),potId:e.string().regex(/^0x[0-9a-fA-F]{32}$/),closePot:e.boolean(),legs:e.array(e.object({recipient:e.string().regex(/^0x[0-9a-fA-F]{40}$/),amount:e.string().regex(/^\d+$/),settlement:e.enum([`instant`,`locked`])}))}),e.object({chain:e.string().min(1),token:e.string().regex(/^0x[0-9a-fA-F]{40}$/),potId:e.string().regex(/^0x[0-9a-fA-F]{32}$/),closePot:e.boolean().optional().default(!0),legs:e.array(e.object({recipient:e.string().regex(/^0x[0-9a-fA-F]{40}$/).optional(),recipientUserId:e.string().min(1).optional(),amount:e.string().regex(/^\d+$/),settlement:e.enum([`instant`,`locked`]).optional().default(`locked`)})).min(1).max(50),metadata:_.optional()}),e.object({potId:e.string().regex(/^0x[0-9a-fA-F]{32}$/),txHash:e.string().regex(/^0x[0-9a-fA-F]{64}$/),blockNumber:e.string().regex(/^\d+$/)}),e.object({chain:e.string().min(1),token:e.string().regex(/^0x[0-9a-fA-F]{40}$/),potId:e.string().regex(/^0x[0-9a-fA-F]{32}$/)}),e.object({status:e.enum([`ok`])});const xo=e.object({id:e.string(),purpose:e.string(),version:e.string(),grantedAt:e.iso.datetime(),withdrawnAt:e.iso.datetime().nullable()}),So=e.object({accountId:e.string(),providerId:e.string(),hasPassword:e.boolean(),scope:e.string().nullable(),createdAt:e.iso.datetime(),updatedAt:e.iso.datetime()}),Co=e.object({id:e.string(),action:e.string(),targetType:e.string(),targetId:e.string(),purpose:e.string(),legalBasis:e.string(),occurredAt:e.iso.datetime(),traceId:e.string().nullable(),attributes:e.record(e.string(),e.unknown())}),wo=e.object({id:e.string(),threadId:e.string(),contentMode:e.enum([`plaintext`,`e2e-encrypted`]),body:e.string().nullable(),envelope:e.unknown().optional(),note:e.string().nullable(),sentAt:e.iso.datetime(),editedAt:e.iso.datetime().nullable(),deletedAt:e.iso.datetime().nullable()});e.object({user:d,sessions:e.array(ue),consents:e.array(xo),accounts:e.array(So),auditEvents:e.array(Co),messages:e.array(wo),exportedAt:e.iso.datetime()}),e.object({name:l.optional(),image:e.string().min(1).max(2048).nullish()});const To=e.object({purpose:e.string(),version:e.string(),grantedAt:e.iso.datetime(),withdrawnAt:e.iso.datetime().nullable()});e.object({consents:e.array(To)});const Eo=e.string().regex(/^[a-z][a-z0-9-]{2,63}$/);e.object({purpose:Eo,version:e.string().min(1).max(64),granted:e.boolean()}),e.object({token:e.string().min(1),callbackURL:e.url().optional()}),e.object({response_type:e.enum([`code`]),client_id:m,redirect_uri:f,scope:p,state:fe,code_challenge:pe,code_challenge_method:e.enum([`S256`]),prompt:e.enum([`consent`]).optional()}),e.object({request:h}),e.object({client_id:e.string().min(1),return_uri:e.url()}),e.object({clientId:e.string().min(1)}),e.object({chain:e.string().min(1),token:e.string().regex(/^0x[0-9a-fA-F]{40}$/),amount:e.string().regex(/^\d+$/).optional(),usdCents:e.int().gte(0).nullish()});const Do=Fe;e.void(),e.void(),e.void(),e.object({genre:e.enum(`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`.split(`.`)).optional(),q:e.string().min(1).max(200).optional(),before:e.iso.datetime().optional(),limit:e.int().gte(1).lte(48).optional().default(24)}),e.object({slug:e.string().regex(/^[a-z0-9-]{3,40}$/)}),e.object({genre:e.enum(`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`.split(`.`)).optional(),q:e.string().min(1).max(200).optional(),before:e.iso.datetime().optional(),limit:e.int().gte(1).lte(48).optional().default(24)}),e.object({slug:e.string().regex(/^[a-z0-9-]{3,40}$/)}),e.object({slug:e.string().regex(/^[a-z0-9-]{3,40}$/)}),e.object({limit:e.int().gte(1).lte(20).optional().default(10),offset:e.int().gte(0).nullish().default(0)}),e.object({slug:e.string().regex(/^[a-z0-9-]{3,40}$/),updateId:e.uuid()}),e.object({limit:e.int().gte(1).lte(50).optional().default(20),offset:e.int().gte(0).nullish().default(0)}),e.object({slug:e.string().regex(/^[a-z0-9-]{3,40}$/)}),e.object({slug:e.string().regex(/^[a-z0-9-]{3,40}$/),updateId:e.uuid()}),e.object({slug:e.string().regex(/^[a-z0-9-]{3,40}$/),updateId:e.uuid()}),e.object({slug:e.string().regex(/^[a-z0-9-]{3,40}$/),commentId:e.uuid()}),e.object({appId:e.string().min(1)}),e.object({limit:e.int().gte(1).lte(20).optional().default(10),offset:e.int().gte(0).nullish().default(0)}),e.object({appId:e.string().min(1)}),e.object({appId:e.string().min(1),updateId:e.uuid()}),e.object({appId:e.string().min(1),updateId:e.uuid()}),e.object({file:e.string()}),e.object({appId:e.string().min(1)}),e.object({slug:e.string().regex(/^[a-z0-9-]{3,40}$/)}),e.object({sort:vt.optional(),limit:e.int().gte(1).lte(50).optional().default(10),offset:e.int().gte(0).nullish().default(0)}),e.object({slug:e.string().regex(/^[a-z0-9-]{3,40}$/)}),e.object({slug:e.string().regex(/^[a-z0-9-]{3,40}$/)}),e.object({slug:e.string().regex(/^[a-z0-9-]{3,40}$/)}),e.object({slug:e.string().regex(/^[a-z0-9-]{3,40}$/)}),e.object({slug:e.string().regex(/^[a-z0-9-]{3,40}$/),reviewId:e.uuid()}),e.object({slug:e.string().regex(/^[a-z0-9-]{3,40}$/),reviewId:e.uuid()}),e.object({slug:e.string().regex(/^[a-z0-9-]{3,40}$/),reviewId:e.uuid()}),e.object({limit:e.int().gte(1).lte(50).optional().default(20),offset:e.int().gte(0).nullish().default(0)}),e.object({slug:e.string().regex(/^[a-z0-9-]{3,40}$/),reviewId:e.uuid()}),e.object({slug:e.string().regex(/^[a-z0-9-]{3,40}$/),commentId:e.uuid()}),e.object({appId:e.uuid()}),e.object({sort:vt.optional(),limit:e.int().gte(1).lte(50).optional().default(10),offset:e.int().gte(0).nullish().default(0)}),e.object({appId:e.uuid(),reviewId:e.uuid()}),e.object({appId:e.uuid(),reviewId:e.uuid()}),e.object({appId:e.uuid()});const Oo=Nt;e.object({id:e.uuid()}),e.object({status:Ft.optional(),limit:e.int().gte(1).lte(50).optional().default(20),offset:e.int().gte(0).nullish().default(0)});const ko=Lt;e.object({id:e.uuid(),reportId:e.uuid()});const Ao=It;e.object({status:e.enum([`pending`,`completed`,`expired`,`all`]).optional().default(`completed`),limit:e.int().gte(1).lte(100).optional().default(20),before:e.iso.datetime().optional()}),e.object({kind:e.string().optional(),direction:e.enum([`outgoing`,`incoming`]).optional(),sort:e.enum([`newest`,`oldest`,`value_desc`,`value_asc`]).optional().default(`newest`),chain:e.string().min(1).optional(),limit:e.int().gte(1).lte(100).optional().default(20),cursor:e.string().min(1).optional(),before:e.iso.datetime().optional(),includeInactive:e.enum([`true`,`false`]).optional().default(`false`)}),e.object({groupId:e.string().min(1).max(128)}),e.object({chain:e.string().min(1).optional()}),e.object({before:e.iso.datetime().optional()}),e.object({address:e.string().regex(/^0x[0-9a-fA-F]{40}$/)}),e.object({address:e.string().regex(/^0x[0-9a-fA-F]{40}$/)}),e.object({address:e.string().regex(/^0x[0-9a-fA-F]{40}$/)}),e.object({address:e.string().regex(/^0x[0-9a-fA-F]{40}$/)});const jo=d,Mo=d;e.object({file:e.string()});const No=d;e.object({q:e.string().max(200).optional()});const Po=Yn;e.union([ar,or]),e.object({id:e.string().min(1)}),e.object({id:e.string().min(1)}),e.object({id:e.string().min(1)}),e.object({limit:e.int().gt(0).lte(100).optional(),before:e.iso.datetime().optional()}),e.object({id:e.string().min(1)}),e.object({id:e.string().min(1),msgId:e.string().min(1)}),e.object({id:e.string().min(1),msgId:e.string().min(1)}),e.object({id:e.string().min(1),msgId:e.string().min(1),emoji:B}),e.object({id:e.string().min(1),msgId:e.string().min(1),emoji:B}),e.object({id:e.string().min(1)}),e.object({file:e.string()}),e.object({id:e.string().min(1)}),e.object({id:e.string().min(1)}),e.object({id:e.string().min(1)}),e.object({id:e.string().min(1)}),e.object({id:e.string().min(1)}),e.object({id:e.string().min(1)}),e.object({id:e.string().min(1)}),e.object({file:e.string()}),e.object({id:e.string().min(1)}),e.object({id:e.string().min(1),userId:e.string().min(1)}),e.object({id:e.string().min(1)}),e.object({id:e.string().min(1),userId:e.string().min(1)}),e.object({regenerate:e.boolean().optional()}),e.object({code:e.string().min(1).max(64)});const Fo=kr;e.object({days:e.int().gt(0).lte(366).optional().default(30)}),e.object({appId:e.uuid()}),e.object({days:e.int().gt(0).lte(366).optional().default(30)});const Io=Vr;e.object({permitId:e.string().min(1)});const Lo=Ur;e.object({file:e.string()}),e.object({tokenId:e.string()}),e.object({appId:e.string().min(1)});const Ro=Kr;e.object({appId:e.string().min(1)});const zo=qr;e.object({appId:e.string().min(1)});const Bo=Zr;e.object({appId:e.string().min(1)});const Vo=Xr;e.object({appId:e.string().min(1),itemId:e.string().min(1)});const Ho=Qr;e.object({appId:e.string().min(1),itemId:e.string().min(1)});const Uo=ti;e.object({file:e.string()}),e.object({appId:e.string().min(1),itemId:e.string().min(1)});const Wo=q;e.object({file:e.string()}),e.object({appId:e.string().min(1),itemId:e.string().min(1)});const Go=q;e.object({appId:e.string().min(1),itemId:e.string().min(1)});const Ko=ni;e.object({appId:e.string().min(1),itemId:e.string().min(1)});const qo=ni,Jo=ii;e.object({permitId:e.string().min(1)});const Yo=ai;e.object({permitId:e.string().min(1)});const Xo=oi;e.object({permitId:e.string().min(1)});const Zo=si,Qo=ci,$o=li,es=di,ts=di;e.object({custodyId:e.string().min(1)});const ns=fi;e.object({id:e.string().min(1)}),e.object({id:e.string().min(1)}),e.object({id:e.string().min(1)}),e.object({handle:e.string().min(1)}),e.object({q:e.string().min(1).max(64),limit:e.int().gte(1).lte(50).optional().default(20)}),e.object({id:e.string().min(1)}),e.object({id:e.string().min(1)}),e.object({id:e.string().min(1)}),e.object({id:e.string().min(1)});const rs=Hi,is=Vi;e.object({id:e.string().min(1)});const as=J,os=Ui;e.object({id:e.string().min(1)});const ss=Ui;e.object({id:e.string().min(1)});const cs=Ui;e.object({id:e.string().min(1)});const ls=Y;e.object({file:e.string()}),e.object({id:e.string().min(1)});const us=Y;e.object({id:e.string().min(1)});const ds=Xi;e.object({id:e.string().min(1)});const fs=Zi;e.object({id:e.string().min(1)}),e.object({range:e.string().optional(),chain:e.string().optional()});const ps=$i;e.object({id:e.string().min(1)}),e.object({range:e.string().optional()});const ms=ta;e.object({id:e.string().min(1)});const hs=na;e.object({id:e.string().min(1)}),e.object({kind:e.string().optional(),direction:e.enum([`outgoing`,`incoming`]).optional(),sort:e.enum([`newest`,`oldest`,`value_desc`,`value_asc`]).optional().default(`newest`),chain:e.string().min(1).optional(),limit:e.int().gte(1).lte(100).optional().default(20),cursor:e.string().min(1).optional(),before:e.iso.datetime().optional(),includeInactive:e.enum([`true`,`false`]).optional().default(`false`)});const gs=sn;e.object({id:e.string().min(1)});const _s=ia;e.object({id:e.string().min(1),chain:e.string().min(1)});const vs=aa;e.object({id:e.string().min(1),chain:e.string().min(1)});const ys=oa;e.object({id:e.string().min(1),chain:e.string().min(1)}),e.object({token:e.string().regex(/^0x[0-9a-fA-F]{40}$/).optional()});const bs=sa;e.object({id:e.string().min(1),chain:e.string().min(1)});const xs=ca;e.object({id:e.string().min(1),env:e.enum([`development`,`production`])});const Ss=ua;e.object({id:e.string().min(1)});const Cs=da;e.object({id:e.string().min(1)});const ws=fa;e.object({chain:e.string().optional()});const Ts=ma;e.object({chain:e.string().optional()});const Es=ga,Ds=_a;e.object({id:e.string().min(1)});const Os=ya;e.object({id:e.string().min(1)});const ks=ya;e.object({id:e.string().min(1),userId:e.string().min(1)});const As=J,js=xa;e.object({appId:e.string().min(1)});const Ms=J;e.object({appId:e.string().min(1)});const Ns=J,Ps=Aa,Fs=J,Is=Y;e.object({file:e.string()});const Ls=Y,Rs=J,zs=Y;e.object({file:e.string()});const Bs=Y;e.object({appId:e.string().min(1)});const Vs=X;e.object({appId:e.string().min(1)});const Hs=X;e.object({appId:e.string().min(1)}),e.void(),e.object({file:e.string()}),e.object({appId:e.string().min(1)});const Us=e.object({bannerUrl:e.url()});e.object({appId:e.string().min(1)}),e.void(),e.object({file:e.string()}),e.object({appId:e.string().min(1)});const Ws=e.object({thumbnailUrl:e.url()});e.object({appId:e.string().min(1)}),e.void(),e.object({file:e.string()}),e.object({appId:e.string().min(1)});const Gs=e.object({thumbnailVideoUrl:e.url()});e.object({file:e.string()}),e.object({appId:e.string().min(1)});const Ks=Ma;e.object({appId:e.string().min(1)});const qs=X;e.object({appId:e.string().min(1)});const Js=X;e.object({appId:e.string().min(1)});const Ys=X;e.object({appId:e.string().min(1)});const Xs=X;e.object({appId:e.string().min(1)});const Zs=X;e.object({id:e.string().min(1)}),e.object({id:e.string().min(1)}),e.object({search:e.string().optional(),offset:e.int().gte(0).nullish(),limit:e.int().gt(0).lte(100).optional()}),e.object({id:e.string().min(1)}),e.object({action:e.string().optional(),actorId:e.string().optional(),targetType:e.string().optional(),targetId:e.string().optional(),offset:e.int().gte(0).nullish(),limit:e.int().gt(0).lte(100).optional()}),e.object({status:e.enum([`pending`,`approved`,`rejected`,`cancelled`]).optional(),kind:e.enum([`role`,`production`]).optional()}),e.object({id:e.string().min(1)}),e.object({status:e.union([e.enum([`draft`,`pending_review`,`published`,`hidden`]),e.enum([`all`]),e.enum([`pending_changes`]),e.enum([`bip_pending_review`])]).optional()}),e.object({appId:e.string().min(1)}),e.object({appId:e.string().min(1)}),e.object({appId:e.string().min(1)}),e.object({appId:e.string().min(1)}),e.object({appId:e.string().min(1)}),e.object({appId:e.string().min(1)}),e.object({appId:e.string().min(1)}),e.object({appId:e.string().min(1)}),e.object({appId:e.string().min(1)}),e.object({appId:e.string().min(1)}),e.object({processorId:e.string().min(1)}),e.object({chain:e.string().min(1).optional()}),e.object({vaultAddress:e.string().min(1)}),e.object({vaultAddress:e.string().min(1)}),e.object({vaultAddress:e.string().min(1)}),e.object({vaultAddress:e.string().min(1)}),e.object({status:e.array(e.enum([`open`,`resolved_refund`,`resolved_dismiss`,`cancelled`,`force_cancelled`])).optional(),chain:e.string().min(1).optional(),cursorFiledAt:e.iso.datetime().optional(),limit:e.int().gte(1).lte(100).optional()}),e.object({appealId:e.string().min(1)}),e.object({appealId:e.string().min(1)}),e.object({file:e.string()}),e.object({appealId:e.string().min(1)}),e.object({appealId:e.string().min(1)}),e.object({appealId:e.string().min(1)}),e.object({appealId:e.string().min(1)}),e.object({file:e.string()}),e.object({appealId:e.string().min(1)}),e.void(),e.void();async function Qs(e,t){let n=new FormData,r=t.file instanceof Blob?t.file:new Blob([t.file],{type:t.contentType});n.append(`file`,r,t.filename);let i=await e.fetch(`${ec(e.issuer)}/me/avatar`,{method:`POST`,headers:{authorization:`Bearer ${t.bearer}`},body:n});if(!i.ok){let e=await i.text();throw Error(`tron ${i.status}: ${e}`)}let a=await i.json();return No.parse(a)}async function $s(e,t){let n=await a(e,{path:`/me/avatar`,method:`DELETE`,bearer:t.bearer});return Mo.parse(n)}function ec(e){return e.endsWith(`/`)?e.slice(0,-1):e}async function tc(e,t){let n=await a(e,{path:`/me/giphy/search`,bearer:t.bearer,query:{q:t.q}});return Po.parse(n)}async function nc(e,t){let n=await a(e,{path:`/me/oauth/payment-authorizations`,bearer:t.bearer});return Do.parse(n)}async function rc(e,t){await s(e,{path:`/me/oauth/payment-authorizations/${encodeURIComponent(t.consentId)}`,method:`PATCH`,bearer:t.bearer,body:t.body})}async function ic(e,t){await s(e,{path:`/me/oauth/payment-authorizations/${encodeURIComponent(t.consentId)}`,method:`DELETE`,bearer:t.bearer})}async function ac(e,t){let n=await a(e,{path:`/me/presence/heartbeat`,method:`POST`,bearer:t.bearer});return Fo.parse(n)}async function oc(e,t){let n=await a(e,{path:`/me/profile`,method:`PATCH`,bearer:t.bearer,body:t.body});return jo.parse(n)}async function sc(e,t){let n=await a(e,{path:`/admin/active-players`,bearer:t.bearer});return Pa.parse(n)}async function cc(e,t){let n=await a(e,{path:`/admin/app-pages`,bearer:t.bearer,query:{status:t.status}});return Xa.parse(n)}async function lc(e,t){let n=await a(e,{path:`/admin/app-pages/${encodeURIComponent(t.appId)}/changes`,bearer:t.bearer});return Qa.parse(n)}async function uc(e,t){let n=await a(e,{path:`/admin/app-pages/${encodeURIComponent(t.appId)}/review-changes`,method:`POST`,bearer:t.bearer,body:t.body});return Z.parse(n)}async function dc(e,t){let n=await a(e,{path:`/admin/app-pages/${encodeURIComponent(t.appId)}/hide`,method:`POST`,bearer:t.bearer,body:t.body});return Z.parse(n)}async function fc(e,t){let n=await a(e,{path:`/admin/app-pages/${encodeURIComponent(t.appId)}/unhide`,method:`POST`,bearer:t.bearer});return Z.parse(n)}async function pc(e,t){let n=await a(e,{path:`/admin/app-pages/${encodeURIComponent(t.appId)}/review`,method:`POST`,bearer:t.bearer,body:t.body});return Z.parse(n)}async function mc(e,t){let n=await a(e,{path:`/admin/app-pages/${encodeURIComponent(t.appId)}/review-bip`,method:`POST`,bearer:t.bearer,body:t.body});return $a.parse(n)}async function hc(e,t){let n=await a(e,{path:`/admin/app-pages/${encodeURIComponent(t.appId)}/hide-bip`,method:`POST`,bearer:t.bearer,body:t.body});return $a.parse(n)}async function gc(e,t){let n=await a(e,{path:`/admin/app-pages/${encodeURIComponent(t.appId)}/unhide-bip`,method:`POST`,bearer:t.bearer});return $a.parse(n)}async function _c(e,t){let n=await a(e,{path:`/admin/payments/appeals`,bearer:t.bearer,query:{status:t.statuses===void 0?void 0:[...t.statuses],chain:t.chain,cursorFiledAt:t.cursorFiledAt,limit:t.limit}});return co.parse(n)}async function vc(e,t){let n=await a(e,{path:`/admin/payments/appeals/${encodeURIComponent(t.appealId)}/room`,bearer:t.bearer});return ho.parse(n)}async function yc(e,t){let n=await a(e,{path:`/admin/payments/appeals/${encodeURIComponent(t.appealId)}/room/messages`,method:`POST`,bearer:t.bearer,body:t.body});return go.parse(n)}async function bc(e,t){let n=new FormData,r=t.file instanceof Blob?t.file:new Blob([t.file],{type:t.contentType});n.append(`file`,r,t.filename);let i=await e.fetch(`${Sc(e.issuer)}/admin/payments/appeals/${encodeURIComponent(t.appealId)}/room/attachments`,{method:`POST`,headers:{authorization:`Bearer ${t.bearer}`},body:n});if(!i.ok){let e=await i.text();throw Error(`tron ${i.status}: ${e}`)}let a=await i.json();return H.parse(a)}async function xc(e,t){let n=await a(e,{path:`/admin/payments/appeals/${encodeURIComponent(t.appealId)}/resolve`,method:`POST`,bearer:t.bearer,body:t.body});return _o.parse(n)}function Sc(e){return e.endsWith(`/`)?e.slice(0,-1):e}async function Cc(e,t){let n=await a(e,{path:`/admin/developer-requests`,bearer:t.bearer,query:{status:t.status,kind:t.kind}});return Wa.parse(n)}async function wc(e,t){let n=await a(e,{path:`/admin/developer-requests/${encodeURIComponent(t.id)}`,method:`PATCH`,bearer:t.bearer,body:t.body});return Ga.parse(n)}async function Tc(e,t){let n=await a(e,{path:`/admin/developers`,bearer:t.bearer});return Ja.parse(n)}async function Ec(e,t){let n=await a(e,{path:`/admin/inventory/vault-custody/${encodeURIComponent(t.custodyId)}/force-withdraw`,method:`POST`,bearer:t.bearer});return ns.parse(n)}async function Dc(e,t){let n=await a(e,{path:`/admin/platform-fees`,bearer:t.bearer});return eo.parse(n)}async function Oc(e,t){let n=await a(e,{path:`/admin/platform-fees`,method:`PATCH`,bearer:t.bearer,body:t.body});return no.parse(n)}async function kc(e,t){let n=await a(e,{path:`/admin/apps/${encodeURIComponent(t.appId)}/fee-config`,bearer:t.bearer});return ro.parse(n)}async function Ac(e,t){let n=await a(e,{path:`/admin/apps/${encodeURIComponent(t.appId)}/fee-config`,method:`PATCH`,bearer:t.bearer,body:t.body});return ro.parse(n)}async function jc(e,t){let n=await a(e,{path:`/admin/payments/processors/whitelist`,method:`POST`,bearer:t.bearer,body:t.body});return Q.parse(n)}async function Mc(e,t){let n=await a(e,{path:`/admin/payments/processors/${encodeURIComponent(t.processorId)}/treasury`,method:`POST`,bearer:t.bearer,body:t.body});return Q.parse(n)}async function Nc(e,t){let n=await a(e,{path:`/admin/payments/vaults/${encodeURIComponent(t.vaultAddress)}/operator`,method:`POST`,bearer:t.bearer,body:t.body});return Q.parse(n)}async function Pc(e,t){let n=await a(e,{path:`/admin/payments/vaults/${encodeURIComponent(t.vaultAddress)}/pause`,method:`POST`,bearer:t.bearer,body:t.body});return Q.parse(n)}async function Fc(e,t){let n=await a(e,{path:`/admin/payments/vaults/${encodeURIComponent(t.vaultAddress)}/withdraw-lock-default`,method:`POST`,bearer:t.bearer,body:t.body});return Q.parse(n)}async function Ic(e,t){let n=await a(e,{path:`/admin/payments/vaults/${encodeURIComponent(t.vaultAddress)}/withdraw-lock-override`,method:`POST`,bearer:t.bearer,body:t.body});return Q.parse(n)}async function Lc(e,t){let n=await a(e,{path:`/admin/payments/appeal-blacklist`,method:`POST`,bearer:t.bearer,body:t.body});return io.parse(n)}async function Rc(e,t){let n=await a(e,{path:`/admin/payments/appeal-blacklist`,method:`DELETE`,bearer:t.bearer,body:t.body});return ao.parse(n)}async function zc(e,t){let n=await a(e,{path:`/admin/payments/appeal-blacklist`,bearer:t.bearer,query:{chain:t.chain}});return oo.parse(n)}async function Bc(e,t){let n=await a(e,{path:`/admin/tron/cashouts${t.status===void 0?``:`?status=${encodeURIComponent(t.status)}`}`,bearer:t.bearer});return Pn.parse(n)}async function Vc(e,t){let n=await a(e,{path:`/admin/tron/cashouts/${encodeURIComponent(t.id)}/approve`,method:`POST`,bearer:t.bearer});return Nn.parse(n)}async function Hc(e,t){let n=await a(e,{path:`/admin/tron/cashouts/${encodeURIComponent(t.id)}/reject`,method:`POST`,bearer:t.bearer,body:t.body});return Nn.parse(n)}async function Uc(e,t){let n=await a(e,{path:`/admin/admins`,bearer:t.bearer});return Ia.parse(n)}async function Wc(e,t){let n=await a(e,{path:`/admin/admins`,method:`POST`,bearer:t.bearer,body:t.body});return La.parse(n)}async function Gc(e,t){let n=await a(e,{path:`/admin/admins/${encodeURIComponent(t.id)}`,method:`PATCH`,bearer:t.bearer,body:t.body});return Ra.parse(n)}async function Kc(e,t){let n=await a(e,{path:`/admin/admins/${encodeURIComponent(t.id)}`,method:`DELETE`,bearer:t.bearer});return La.parse(n)}async function qc(e,t){let n=await a(e,{path:`/admin/users`,bearer:t.bearer,query:{search:t.search,offset:t.offset,limit:t.limit}});return Ba.parse(n)}async function Jc(e,t){let n=await a(e,{path:`/admin/users/${encodeURIComponent(t.id)}`,method:`PATCH`,bearer:t.bearer,body:t.body});return Va.parse(n)}async function Yc(e,t){let n=await a(e,{path:`/admin/audit`,bearer:t.bearer,query:{action:t.action,actorId:t.actorId,targetType:t.targetType,targetId:t.targetId,offset:t.offset,limit:t.limit}});return Ua.parse(n)}async function Xc(e,t){let n=await a(e,{path:`/public/apps/${encodeURIComponent(t.slug)}`,bearer:t.bearer});return Ke.parse(n)}async function Zc(e,t){let n=await a(e,{path:`/me/developer`,bearer:t.bearer});return Ps.parse(n)}async function Qc(e,t){let n=await a(e,{path:`/me/developer/profile`,method:`PATCH`,bearer:t.bearer,body:t.body});return Fs.parse(n)}async function $c(e,t){let n=await $(e,{path:`/me/developer/profile/logo`,bearer:t.bearer,file:t.file,filename:t.filename,contentType:t.contentType});return Ls.parse(n)}async function el(e,t){let n=await a(e,{path:`/me/developer/profile/logo`,method:`DELETE`,bearer:t.bearer});return Is.parse(n)}async function tl(e,t){let n=await a(e,{path:`/me/developer/request`,method:`POST`,bearer:t.bearer,body:t.body});return Rs.parse(n)}async function nl(e,t){let n=await $(e,{path:`/me/developer/request/logo`,bearer:t.bearer,file:t.file,filename:t.filename,contentType:t.contentType});return Bs.parse(n)}async function rl(e,t){let n=await a(e,{path:`/me/developer/request/logo`,method:`DELETE`,bearer:t.bearer});return zs.parse(n)}async function $(e,t){let n=new FormData,r=t.file instanceof Blob?t.file:new Blob([t.file],{type:t.contentType});n.append(`file`,r,t.filename);let i=await e.fetch(`${il(e.issuer)}${t.path}`,{method:`POST`,headers:{authorization:`Bearer ${t.bearer}`},body:n});if(!i.ok){let e=await i.text();throw Error(`tron ${i.status}: ${e}`)}return await i.json()}function il(e){return e.endsWith(`/`)?e.slice(0,-1):e}async function al(e,t){let n=await a(e,{path:`/public/build-in-public/${encodeURIComponent(t.slug)}/updates`,bearer:t.bearer,query:{limit:t.limit,offset:t.offset}});return Xe.parse(n)}async function ol(e,t){let n=await a(e,{path:`/public/build-in-public/${encodeURIComponent(t.slug)}/updates/${encodeURIComponent(t.updateId)}/comments`,bearer:t.bearer,query:{limit:t.limit,offset:t.offset}});return $e.parse(n)}async function sl(e,t){let n=await a(e,{path:`/me/build-in-public/${encodeURIComponent(t.slug)}/reactions`,bearer:t.bearer});return tt.parse(n)}async function cl(e,t){let n=await a(e,{path:`/me/build-in-public/${encodeURIComponent(t.slug)}/reactions/${encodeURIComponent(t.updateId)}`,method:`POST`,bearer:t.bearer,body:t.body});return rt.parse(n)}async function ll(e,t){let n=await a(e,{path:`/me/build-in-public/${encodeURIComponent(t.slug)}/comments/${encodeURIComponent(t.updateId)}`,method:`POST`,bearer:t.bearer,body:{body:t.body}});return it.parse(n)}async function ul(e,t){let n=await a(e,{path:`/me/build-in-public/${encodeURIComponent(t.slug)}/comments/${encodeURIComponent(t.commentId)}`,method:`DELETE`,bearer:t.bearer});return at.parse(n)}async function dl(e,t){let n=await a(e,{path:`/me/developer/apps/${encodeURIComponent(t.appId)}/bip-updates`,bearer:t.bearer,query:{limit:t.limit,offset:t.offset}});return Xe.parse(n)}async function fl(e,t){let n=await a(e,{path:`/me/developer/apps/${encodeURIComponent(t.appId)}/bip-updates`,method:`POST`,bearer:t.bearer,body:t.body});return j.parse(n)}async function pl(e,t){let n=await a(e,{path:`/me/developer/apps/${encodeURIComponent(t.appId)}/bip-updates/${encodeURIComponent(t.updateId)}`,method:`PATCH`,bearer:t.bearer,body:t.body});return j.parse(n)}async function ml(e,t){let n=await a(e,{path:`/me/developer/apps/${encodeURIComponent(t.appId)}/bip-updates/${encodeURIComponent(t.updateId)}`,method:`DELETE`,bearer:t.bearer});return ot.parse(n)}async function hl(e,t){let n=await $(e,{path:`/me/developer/apps/${encodeURIComponent(t.appId)}/bip-updates/media`,bearer:t.bearer,file:t.file,filename:t.filename,contentType:t.contentType});return st.parse(n)}async function gl(e,t){let n=await a(e,{path:`/public/build-in-public`,bearer:t.bearer,query:{genre:t.genre,q:t.q,before:t.before,limit:t.limit}});return Be.parse(n)}async function _l(e,t){let n=await a(e,{path:`/public/build-in-public/${encodeURIComponent(t.slug)}`,bearer:t.bearer});return qe.parse(n)}async function vl(e,t){let n=await a(e,{path:`/me/apps/${encodeURIComponent(t.appId)}/report`,method:`POST`,bearer:t.bearer,body:t.report});return Oo.parse(n)}async function yl(e,t){let n=await a(e,{path:`/public/library`,bearer:t.bearer,query:{genre:t.genre,q:t.q,before:t.before,limit:t.limit}});return Be.parse(n)}async function bl(e,t){let n=await a(e,{path:`/public/apps/${encodeURIComponent(t.slug)}/reviews`,bearer:t.bearer,query:{sort:t.sort,limit:t.limit,offset:t.offset}});return _t.parse(n)}async function xl(e,t){let n=await a(e,{path:`/me/developer/apps/${encodeURIComponent(t.appId)}/reviews`,bearer:t.bearer,query:{sort:t.sort,limit:t.limit,offset:t.offset}});return _t.parse(n)}async function Sl(e,t){let n=await a(e,{path:`/me/reviews/${encodeURIComponent(t.slug)}`,bearer:t.bearer});return xt.parse(n)}async function Cl(e,t){let n=await a(e,{path:`/me/reviews/${encodeURIComponent(t.slug)}`,method:`PUT`,bearer:t.bearer,body:t.review});return xt.parse(n)}async function wl(e,t){let n=await a(e,{path:`/me/reviews/${encodeURIComponent(t.slug)}`,method:`DELETE`,bearer:t.bearer});return xt.parse(n)}async function Tl(e,t){let n=await a(e,{path:`/me/reviews/${encodeURIComponent(t.slug)}/reactions`,bearer:t.bearer});return wt.parse(n)}async function El(e,t){let n=await a(e,{path:`/me/reviews/${encodeURIComponent(t.slug)}/reactions/${encodeURIComponent(t.reviewId)}`,method:`POST`,bearer:t.bearer,body:t.reaction});return Tt.parse(n)}async function Dl(e,t){let n=await a(e,{path:`/me/reviews/${encodeURIComponent(t.slug)}/tips/${encodeURIComponent(t.reviewId)}`,method:`POST`,bearer:t.bearer,idempotencyKey:t.idempotencyKey??crypto.randomUUID(),body:t.tip});return Et.parse(n)}async function Ol(e,t){let n=await a(e,{path:`/public/apps/${encodeURIComponent(t.slug)}/reviews/${encodeURIComponent(t.reviewId)}/comments`,bearer:t.bearer,query:{limit:t.limit,offset:t.offset}});return kt.parse(n)}async function kl(e,t){let n=await a(e,{path:`/me/reviews/${encodeURIComponent(t.slug)}/comments/${encodeURIComponent(t.reviewId)}`,method:`POST`,bearer:t.bearer,body:t.comment});return At.parse(n)}async function Al(e,t){let n=await a(e,{path:`/me/reviews/${encodeURIComponent(t.slug)}/comments/${encodeURIComponent(t.commentId)}`,method:`DELETE`,bearer:t.bearer});return jt.parse(n)}async function jl(e,t){let n=await a(e,{path:`/me/developer/apps/${encodeURIComponent(t.appId)}/reviews/${encodeURIComponent(t.reviewId)}/reply`,method:`PUT`,bearer:t.bearer,body:t.reply});return Mt.parse(n)}async function Ml(e,t){let n=await a(e,{path:`/me/developer/apps/${encodeURIComponent(t.appId)}/reviews/${encodeURIComponent(t.reviewId)}/reply`,method:`DELETE`,bearer:t.bearer});return Mt.parse(n)}function Nl(){let e=new Map;return{run:async(t,n)=>{let r=e.get(t);if(r!==void 0)return await r;let i=(async()=>{try{return await n()}finally{e.delete(t)}})();return e.set(t,i),await i}}}function Pl(){return{debug:()=>{},info:()=>{},warn:()=>{},error:()=>{}}}function Fl(e=`[tron-sdk]`){return{debug:(t,n)=>{console.log(e,t,n??``)},info:(t,n)=>{console.info(e,t,n??``)},warn:(t,n)=>{console.warn(e,t,n??``)},error:(t,n)=>{console.error(e,t,n??``)}}}const Il=6e4,Ll=60,Rl=5,zl={acquire:async()=>{await Promise.resolve()}};function Bl(e,t){let n=Math.max(1,t),r=e/1e3,i=n,a=Date.now(),o=[],s=null;function c(){let e=Date.now();for(i=Math.min(n,i+(e-a)*r),a=e;o.length>0&&i>=1;)--i,o.shift()?.();if(o.length>0&&s===null){let e=Math.max(5,Math.ceil((1-i)/r));s=setTimeout(()=>{s=null,c()},e)}}return{acquire:async()=>{await new Promise(e=>{o.push(e),c()})}}}const Vl=e=>e===`GET`||e===`HEAD`,Hl=e=>e/Il*1e3;function Ul(e={}){let t=Bl(e.read?.requestsPerSecond??Hl(60),e.read?.burst??60),n=Bl(e.write?.requestsPerSecond??Hl(5),e.write?.burst??5);return{acquire:async e=>{await(Vl(e)?t:n).acquire()}}}function Wl(){let e=new Map;return{async get(t){return e.get(t)??null},async set(t,n){e.set(t,n)},async clear(t){e.delete(t)}}}async function Gl(e,t){let n=await a(e,{path:`/payments/me/activity`,bearer:t.bearer,query:{kind:t.kind,direction:t.direction,sort:t.sort,chain:t.chain,limit:t.limit,cursor:t.cursor,before:t.before,includeInactive:t.includeInactive===!0?`true`:void 0}});return sn.parse(n)}async function Kl(e,t){let n=await a(e,{path:`/payments/me/activity/group/${encodeURIComponent(t.groupId)}`,bearer:t.bearer});return sn.parse(n)}async function ql(e,t){let n=await a(e,{path:`/payments/chains`,bearer:t.bearer});return zt.parse(n)}async function Jl(e,t){let n=await a(e,{path:`/payments/me/outstanding`,bearer:t.bearer,query:{chain:t.chain}});return ln.parse(n)}async function Yl(e,t){let n=await a(e,{path:`/payments/me`,bearer:t.bearer,query:{status:t.status,limit:t.limit,before:t.before}});return Vt.parse(n)}async function Xl(e,t){let n=await a(e,{path:`/me/developer/keys`,method:`POST`,bearer:t.bearer,body:t.body});return is.parse(n)}async function Zl(e,t){let n=await a(e,{path:`/me/developer/keys`,method:`GET`,bearer:t.bearer});return rs.parse(n)}async function Ql(e,t){let n=await a(e,{path:`/me/developer/keys/${encodeURIComponent(t.id)}`,method:`DELETE`,bearer:t.bearer});return as.parse(n)}async function $l(e,t){let n=await a(e,{path:`/me/developer/apps`,method:`POST`,bearer:t.bearer,body:t.body});return os.parse(n)}async function eu(e,t){let n=await a(e,{path:`/me/developer/apps/${encodeURIComponent(t.id)}`,method:`PATCH`,bearer:t.bearer,body:t.body});return cs.parse(n)}async function tu(e,t){let n=await a(e,{path:`/me/developer/apps/${encodeURIComponent(t.id)}`,method:`DELETE`,bearer:t.bearer});return ss.parse(n)}async function nu(e,t){let n=await $(e,{path:`/me/developer/apps/${encodeURIComponent(t.id)}/logo`,bearer:t.bearer,file:t.file,filename:t.filename,contentType:t.contentType});return us.parse(n)}async function ru(e,t){let n=await a(e,{path:`/me/developer/apps/${encodeURIComponent(t.id)}/logo`,method:`DELETE`,bearer:t.bearer});return ls.parse(n)}async function iu(e,t){let n=await a(e,{path:`/me/developer/apps/${encodeURIComponent(t.id)}/balances`,bearer:t.bearer});return ds.parse(n)}async function au(e,t){let n=await a(e,{path:`/me/developer/apps/${encodeURIComponent(t.id)}/tron-balance`,bearer:t.bearer});return fs.parse(n)}async function ou(e,t){let n=await a(e,{path:`/me/developer/apps/${encodeURIComponent(t.id)}/activity`,bearer:t.bearer,query:{kind:t.kind,direction:t.direction,sort:t.sort,chain:t.chain,limit:t.limit,cursor:t.cursor,before:t.before}});return gs.parse(n)}async function su(e,t){let n=await a(e,{path:`/me/developer/apps/${encodeURIComponent(t.id)}/earnings`,bearer:t.bearer,query:{range:t.range,chain:t.chain}});return ps.parse(n)}async function cu(e,t){let n=await a(e,{path:`/me/developer/apps/${encodeURIComponent(t.id)}/playtime`,bearer:t.bearer,query:{range:t.range}});return ms.parse(n)}async function lu(e,t){let n=await a(e,{path:`/me/developer/apps/${encodeURIComponent(t.id)}/overview`,bearer:t.bearer});return hs.parse(n)}async function uu(e,t){let n=await a(e,{path:`/me/developer/apps/${encodeURIComponent(t.id)}/wallets`,bearer:t.bearer});return _s.parse(n)}async function du(e,t){let n=await a(e,{path:`/me/developer/apps/${encodeURIComponent(t.id)}/wallets/${encodeURIComponent(t.chain)}/auto-sweep`,method:`PATCH`,bearer:t.bearer,body:t.body});return vs.parse(n)}async function fu(e,t){let n=await a(e,{path:`/me/developer/apps/${encodeURIComponent(t.id)}/wallets/${encodeURIComponent(t.chain)}/provision`,method:`POST`,bearer:t.bearer});return ys.parse(n)}async function pu(e,t){let n=await a(e,{path:`/me/developer/apps/${encodeURIComponent(t.id)}/wallets/${encodeURIComponent(t.chain)}/withdraw`,method:`POST`,bearer:t.bearer,query:{token:t.token}});return bs.parse(n)}async function mu(e,t){let n=await a(e,{path:`/me/developer/apps/${encodeURIComponent(t.id)}/wallets/${encodeURIComponent(t.chain)}/consolidate`,method:`POST`,bearer:t.bearer});return xs.parse(n)}async function hu(e,t){let n=await a(e,{path:`/me/developer/apps/${encodeURIComponent(t.id)}/keys/${encodeURIComponent(t.env)}`,method:`PUT`,bearer:t.bearer});return Ss.parse(n)}async function gu(e,t){let n=await a(e,{path:`/me/developer/apps/${encodeURIComponent(t.id)}/production-request`,method:`POST`,bearer:t.bearer,body:t.body});return Cs.parse(n)}async function _u(e,t){let n=await a(e,{path:`/me/developer/apps/${encodeURIComponent(t.id)}/payment-status-webhook/secret`,method:`POST`,bearer:t.bearer});return ws.parse(n)}async function vu(e,t){let n=await a(e,{path:`/me/developer/payments/appeals`,bearer:t.bearer,query:{chain:t.chain}});return Ts.parse(n)}async function yu(e,t){let n=await a(e,{path:`/me/developer/payments/pending-deposits`,bearer:t.bearer,query:{chain:t.chain}});return Es.parse(n)}async function bu(e,t){let n=await a(e,{path:`/me/developer/payments/tron-balance`,bearer:t.bearer});return Ds.parse(n)}async function xu(e,t){let n=await a(e,{path:`/me/developer/apps/${encodeURIComponent(t.id)}/reports`,bearer:t.bearer,query:{status:t.status,limit:t.limit,offset:t.offset}});return ko.parse(n)}async function Su(e,t){let n=await a(e,{path:`/me/developer/apps/${encodeURIComponent(t.id)}/reports/${encodeURIComponent(t.reportId)}`,method:`PATCH`,bearer:t.bearer,body:{status:t.status}});return Ao.parse(n)}async function Cu(e,t){let n=await a(e,{path:`/me/developer/apps/${encodeURIComponent(t.appId)}/inventory/items/quote`,method:`POST`,bearer:t.bearer,body:t.registration});return zo.parse(n)}async function wu(e,t){let n=await a(e,{path:`/me/developer/apps/${encodeURIComponent(t.appId)}/inventory/items`,method:`POST`,bearer:t.bearer,body:t.registration});return Vo.parse(n)}async function Tu(e,t){let n=await a(e,{path:`/me/developer/apps/${encodeURIComponent(t.appId)}/inventory/collections`,bearer:t.bearer});return Ro.parse(n)}async function Eu(e,t){let n=await a(e,{path:`/me/developer/apps/${encodeURIComponent(t.appId)}/inventory/items`,bearer:t.bearer});return Bo.parse(n)}async function Du(e,t){let n=await a(e,{path:`/me/developer/apps/${encodeURIComponent(t.appId)}/inventory/items/${encodeURIComponent(t.itemId)}/permits`,method:`POST`,bearer:t.bearer,body:t.grant});return Ho.parse(n)}async function Ou(e,t){let n=await a(e,{path:`/me/developer/apps/${encodeURIComponent(t.appId)}/inventory/items/${encodeURIComponent(t.itemId)}/holders`,bearer:t.bearer});return Uo.parse(n)}async function ku(e,t){let n=await $(e,{path:`/me/developer/apps/${encodeURIComponent(t.appId)}/inventory/items/${encodeURIComponent(t.itemId)}/image`,bearer:t.bearer,file:t.file,filename:t.filename,contentType:t.contentType});return Wo.parse(n)}async function Au(e,t){let n=await $(e,{path:`/me/developer/apps/${encodeURIComponent(t.appId)}/inventory/items/${encodeURIComponent(t.itemId)}/banner`,bearer:t.bearer,file:t.file,filename:t.filename,contentType:t.contentType});return Go.parse(n)}async function ju(e,t){let n=await a(e,{path:`/me/developer/apps/${encodeURIComponent(t.appId)}/page`,bearer:t.bearer});return Vs.parse(n)}async function Mu(e,t){let n=await a(e,{path:`/me/developer/apps/${encodeURIComponent(t.appId)}/page`,method:`PATCH`,bearer:t.bearer,body:t.body});return Hs.parse(n)}async function Nu(e,t){let n=await $(e,{path:`/me/developer/apps/${encodeURIComponent(t.appId)}/page/banner`,bearer:t.bearer,file:t.file,filename:t.filename,contentType:t.contentType});return Us.parse(n)}async function Pu(e,t){await s(e,{path:`/me/developer/apps/${encodeURIComponent(t.appId)}/page/banner`,method:`DELETE`,bearer:t.bearer})}async function Fu(e,t){let n=await $(e,{path:`/me/developer/apps/${encodeURIComponent(t.appId)}/page/thumbnail`,bearer:t.bearer,file:t.file,filename:t.filename,contentType:t.contentType});return Ws.parse(n)}async function Iu(e,t){await s(e,{path:`/me/developer/apps/${encodeURIComponent(t.appId)}/page/thumbnail`,method:`DELETE`,bearer:t.bearer})}async function Lu(e,t){let n=await $(e,{path:`/me/developer/apps/${encodeURIComponent(t.appId)}/page/thumbnail-video`,bearer:t.bearer,file:t.file,filename:t.filename,contentType:t.contentType});return Gs.parse(n)}async function Ru(e,t){await s(e,{path:`/me/developer/apps/${encodeURIComponent(t.appId)}/page/thumbnail-video`,method:`DELETE`,bearer:t.bearer})}async function zu(e,t){let n=await $(e,{path:`/me/developer/apps/${encodeURIComponent(t.appId)}/page/gallery`,bearer:t.bearer,file:t.file,filename:t.filename,contentType:t.contentType});return Ks.parse(n)}async function Bu(e,t){let n=await a(e,{path:`/me/developer/apps/${encodeURIComponent(t.appId)}/page/submit-for-review`,method:`POST`,bearer:t.bearer});return qs.parse(n)}async function Vu(e,t){let n=await a(e,{path:`/me/developer/apps/${encodeURIComponent(t.appId)}/page/unpublish`,method:`POST`,bearer:t.bearer});return Js.parse(n)}async function Hu(e,t){let n=await a(e,{path:`/me/developer/apps/${encodeURIComponent(t.appId)}/page/bip`,method:`PATCH`,bearer:t.bearer,body:t.body});return Ys.parse(n)}async function Uu(e,t){let n=await a(e,{path:`/me/developer/apps/${encodeURIComponent(t.appId)}/page/bip/submit-for-review`,method:`POST`,bearer:t.bearer});return Xs.parse(n)}async function Wu(e,t){let n=await a(e,{path:`/me/developer/apps/${encodeURIComponent(t.appId)}/page/bip/unpublish`,method:`POST`,bearer:t.bearer});return Zs.parse(n)}async function Gu(e,t){let n=await a(e,{path:`/me/developer/apps/${encodeURIComponent(t.id)}/participants`,method:`GET`,bearer:t.bearer});return Os.parse(n)}async function Ku(e,t){let n=await a(e,{path:`/me/developer/apps/${encodeURIComponent(t.id)}/participants`,method:`POST`,bearer:t.bearer,body:t.body});return ks.parse(n)}async function qu(e,t){let n=await a(e,{path:`/me/developer/apps/${encodeURIComponent(t.id)}/participants/${encodeURIComponent(t.userId)}`,method:`DELETE`,bearer:t.bearer});return As.parse(n)}async function Ju(e,t){let n=await a(e,{path:`/me/developer/invites`,method:`GET`,bearer:t.bearer});return js.parse(n)}async function Yu(e,t){let n=await a(e,{path:`/me/developer/invites/${encodeURIComponent(t.appId)}/accept`,method:`POST`,bearer:t.bearer});return Ms.parse(n)}async function Xu(e,t){let n=await a(e,{path:`/me/developer/invites/${encodeURIComponent(t.appId)}/decline`,method:`POST`,bearer:t.bearer});return Ns.parse(n)}async function Zu(e,t){let n=await a(e,{path:`/me/developer/apps/${encodeURIComponent(t.appId)}/inventory/items/${encodeURIComponent(t.itemId)}/vault-permits`,method:`POST`,bearer:t.bearer,body:t.grant});return Ko.parse(n)}async function Qu(e,t){let n=await a(e,{path:`/me/developer/apps/${encodeURIComponent(t.appId)}/inventory/items/${encodeURIComponent(t.itemId)}/withdraw-permits`,method:`POST`,bearer:t.bearer,body:t.grant});return qo.parse(n)}async function $u(e,t){let n=await a(e,{path:`/me/inventory`,bearer:t.bearer});return zr.parse(n)}async function ed(e,t){let n=await a(e,{path:`/oauth/inventory`,bearer:t.bearer});return zr.parse(n)}async function td(e,t){let n=await a(e,{path:`/me/inventory/nft-transfers/quote`,method:`POST`,bearer:t.bearer,body:t.body});return Qo.parse(n)}async function nd(e,t){let n=await a(e,{path:`/me/inventory/nft-transfers`,method:`POST`,bearer:t.bearer,body:t.body});return $o.parse(n)}async function rd(e,t){let n=await a(e,{path:`/me/inventory/permits`,bearer:t.bearer});return Io.parse(n)}async function id(e,t){let n=await a(e,{path:`/me/inventory/permits/${encodeURIComponent(t.permitId)}/redeem`,method:`POST`,bearer:t.bearer});return Lo.parse(n)}async function ad(e,t){let n=await a(e,{path:`/oauth/inventory/mint`,method:`POST`,bearer:t.appBearer,body:t.body});return Hr.parse(n)}async function od(e,t){let n=await a(e,{path:`/me/inventory/vault-permits`,bearer:t.bearer});return Jo.parse(n)}async function sd(e,t){let n=await a(e,{path:`/me/inventory/vault-permits/${encodeURIComponent(t.permitId)}/sign`,method:`POST`,bearer:t.bearer});return Yo.parse(n)}async function cd(e,t){let n=await a(e,{path:`/me/inventory/vault-permits/${encodeURIComponent(t.permitId)}/relayed/quote`,method:`POST`,bearer:t.bearer});return Xo.parse(n)}async function ld(e,t){let n=await a(e,{path:`/me/inventory/vault-permits/${encodeURIComponent(t.permitId)}/relayed/submit`,method:`POST`,bearer:t.bearer,body:t.body});return Zo.parse(n)}async function ud(e,t){let n=await a(e,{path:`/me/inventory/vaulted`,bearer:t.bearer});return es.parse(n)}async function dd(e,t){let n=await a(e,{path:`/oauth/inventory/vaulted`,bearer:t.bearer});return ts.parse(n)}async function fd(e,t){let n=await a(e,{path:`/me/dm-key-backup`,bearer:t.bearer});return xr.parse(n)}async function pd(e,t){let n=await a(e,{path:`/me/dm-key-backup`,method:`POST`,bearer:t.bearer,body:t.body});return Sr.parse(n)}async function md(e,t){let n=await a(e,{path:`/me/dm-key-backup/unlock`,method:`POST`,bearer:t.bearer,body:t.body});return Cr.parse(n)}async function hd(e,t){let n=await a(e,{path:`/me/dm-key`,method:`PUT`,bearer:t.bearer,body:t.body});return U.parse(n)}async function gd(e,n){try{let t=await a(e,{path:`/me/dm-key`,bearer:n.bearer});return U.parse(t)}catch(e){if(e instanceof t&&e.status===404)return null;throw e}}async function _d(e,t){let n=await a(e,{path:`/me/threads/${encodeURIComponent(t.threadId)}/dm-key`,bearer:t.bearer});return U.parse(n)}async function vd(e,t){let n=await a(e,{path:`/me/threads/dm-keys`,method:`POST`,bearer:t.bearer,body:{threadIds:[...t.threadIds]}});return br.parse(n)}async function yd(e,t){let n=new FormData,r=t.file instanceof Blob?t.file:new Blob([t.file],{type:t.contentType});n.append(`file`,r,t.filename);let i=await e.fetch(`${xd(e.issuer)}/me/threads/${encodeURIComponent(t.threadId)}/logo`,{method:`POST`,headers:{authorization:`Bearer ${t.bearer}`},body:n});if(!i.ok){let e=await i.text();throw Error(`tron ${i.status}: ${e}`)}let a=await i.json();return z.parse(a)}async function bd(e,t){let n=await a(e,{path:`/me/threads/${encodeURIComponent(t.threadId)}/logo`,method:`DELETE`,bearer:t.bearer});return z.parse(n)}function xd(e){return e.endsWith(`/`)?e.slice(0,-1):e}async function Sd(e,t){let n=await a(e,{path:`/me/threads/${encodeURIComponent(t.threadId)}/messages/${encodeURIComponent(t.messageId)}`,method:`DELETE`,bearer:t.bearer});return R.parse(n)}async function Cd(e,t){let n=await a(e,{path:`/me/threads/${encodeURIComponent(t.threadId)}/messages/${encodeURIComponent(t.messageId)}`,method:`PATCH`,bearer:t.bearer,body:t.body});return dr.parse(n)}async function wd(e,t){let n=await a(e,{path:`/me/threads/${encodeURIComponent(t.threadId)}/messages/${encodeURIComponent(t.messageId)}/reactions/${encodeURIComponent(t.emoji)}`,method:`PUT`,bearer:t.bearer});return hr.parse(n)}async function Td(e,t){let n=await a(e,{path:`/me/threads/${encodeURIComponent(t.threadId)}/messages/${encodeURIComponent(t.messageId)}/reactions/${encodeURIComponent(t.emoji)}`,method:`DELETE`,bearer:t.bearer});return hr.parse(n)}async function Ed(e,t){let n=await a(e,{path:`/me/threads/${encodeURIComponent(t.threadId)}/participants/${encodeURIComponent(t.userId)}`,method:`DELETE`,bearer:t.bearer});return z.parse(n)}async function Dd(e,t){let n=await a(e,{path:`/me/threads/${encodeURIComponent(t.threadId)}/participants/${encodeURIComponent(t.userId)}/role`,method:`PATCH`,bearer:t.bearer,body:t.body});return z.parse(n)}async function Od(e,t){let n=await a(e,{path:`/me/threads/${encodeURIComponent(t.threadId)}`,method:`DELETE`,bearer:t.bearer});return R.parse(n)}async function kd(e,t){let n=await a(e,{path:`/me/threads/${encodeURIComponent(t.threadId)}`,method:`PATCH`,bearer:t.bearer,body:t.body});return z.parse(n)}async function Ad(e,t){let n=await a(e,{path:`/me/threads/${encodeURIComponent(t.threadId)}/hide`,method:`POST`,bearer:t.bearer});return R.parse(n)}async function jd(e,t){let n=await a(e,{path:`/me/threads/${encodeURIComponent(t.threadId)}/invite`,method:`POST`,bearer:t.bearer,body:t.body});return z.parse(n)}async function Md(e,t){let n=await a(e,{path:`/me/threads/${encodeURIComponent(t.threadId)}/leave`,method:`POST`,bearer:t.bearer});return R.parse(n)}async function Nd(e,t){let n=await a(e,{path:`/me/threads/${encodeURIComponent(t.threadId)}/pin`,method:`POST`,bearer:t.bearer});return gr.parse(n)}async function Pd(e,t){let n=await a(e,{path:`/me/threads/${encodeURIComponent(t.threadId)}/pin`,method:`DELETE`,bearer:t.bearer});return R.parse(n)}async function Fd(e){let t=await a(e,{path:`/.well-known/oauth-authorization-server`});return de.parse(t)}function Id(e){let t=e.endsWith(`/`)?e.slice(0,-1):e;return{authorize:`${t}/oauth/authorize`,token:`${t}/oauth/token`,userinfo:`${t}/userinfo`,revoke:`${t}/oauth/revoke`}}async function Ld(){let e=Vd(Bd(32));return{codeVerifier:e,codeChallenge:await Rd(e)}}async function Rd(e){let t=new TextEncoder().encode(e),n=await crypto.subtle.digest(`SHA-256`,t);return Vd(new Uint8Array(n))}function zd(e=32){return Vd(Bd(e))}function Bd(e){let t=new Uint8Array(e);return crypto.getRandomValues(t),t}function Vd(e){let t=``;for(let n of e)t+=String.fromCodePoint(n);return(typeof btoa==`function`?btoa(t):Buffer.from(t,`binary`).toString(`base64`)).replaceAll(`+`,`-`).replaceAll(`/`,`_`).replaceAll(/=+$/g,``)}async function Hd(e){let t=e.pkce??await Ld(),n=e.state??zd(),r=new URLSearchParams({response_type:`code`,client_id:e.clientId,redirect_uri:e.redirectUri,scope:e.scopes.join(` `),state:n,code_challenge:t.codeChallenge,code_challenge_method:`S256`});e.forceConsent===!0&&r.set(`prompt`,`consent`);let{authorize:i}=Id(e.issuer);return{url:`${i}?${r.toString()}`,state:n,codeVerifier:t.codeVerifier,codeChallenge:t.codeChallenge}}async function Ud(e,t){let n={token:t.token,client_id:t.clientId};t.tokenTypeHint!==void 0&&(n.token_type_hint=t.tokenTypeHint),t.clientSecret!==void 0&&(n.client_secret=t.clientSecret),await s(e,{path:`/oauth/revoke`,method:`POST`,form:n})}async function Wd(e,t){let n={grant_type:`authorization_code`,code:t.code,redirect_uri:t.redirectUri,code_verifier:t.codeVerifier,client_id:t.clientId};t.clientSecret!==void 0&&(n.client_secret=t.clientSecret);let r=await a(e,{path:`/oauth/token`,method:`POST`,form:n});return ge.parse(r)}async function Gd(e,t){let n={grant_type:`refresh_token`,refresh_token:t.refreshToken,client_id:t.clientId};t.clientSecret!==void 0&&(n.client_secret=t.clientSecret),t.scope!==void 0&&(n.scope=t.scope.join(` `));let r=await a(e,{path:`/oauth/token`,method:`POST`,form:n});return ge.parse(r)}function Kd(e,t){return{accessToken:t.access_token,refreshToken:t.refresh_token??null,expiresAt:e+t.expires_in*1e3,scope:t.scope??null,tokenType:t.token_type}}async function qd(e,t){let n=await a(e,{path:`/userinfo`,bearer:t.bearer});return xe.parse(n)}async function Jd(e,t){let n=await a(e,{path:`/payments/appeals`,method:`POST`,bearer:t.bearer,body:t.body});return vo.parse(n)}async function Yd(e,t){let n=await a(e,{path:`/payments/appeals/pot-leg`,method:`POST`,bearer:t.bearer,body:t.body});return vo.parse(n)}async function Xd(e,t){let n=await a(e,{path:`/payments/appeals/${encodeURIComponent(t.appealId)}/room`,bearer:t.bearer});return ho.parse(n)}async function Zd(e,t){let n=await a(e,{path:`/payments/appeals/${encodeURIComponent(t.appealId)}/room/messages`,method:`POST`,bearer:t.bearer,body:t.body});return go.parse(n)}async function Qd(e,t){let n=new FormData,r=t.file instanceof Blob?t.file:new Blob([t.file],{type:t.contentType});n.append(`file`,r,t.filename);let i=await e.fetch(`${$d(e.issuer)}/payments/appeals/${encodeURIComponent(t.appealId)}/room/attachments`,{method:`POST`,headers:{authorization:`Bearer ${t.bearer}`},body:n});if(!i.ok){let e=await i.text();throw Error(`tron ${i.status}: ${e}`)}let a=await i.json();return H.parse(a)}function $d(e){return e.endsWith(`/`)?e.slice(0,-1):e}async function ef(e,t){let n=t.idempotencyKey??crypto.randomUUID(),r=await s(e,{path:`/oauth/payments/charge`,method:`POST`,bearer:t.bearer,body:t.body,idempotencyKey:n,raw:!0});if(r.status===402){let e=await c(r),t=Te.parse(e);return{status:`monthly_limit_exceeded`,currentLimitCents:t.currentLimitCents,monthSpentCents:t.monthSpentCents,attemptedUsdCents:t.attemptedUsdCents,redirectUrl:t.redirectUrl}}if(!r.ok){let e=await r.text();throw Error(`tron ${r.status}: ${e}`)}let i=await c(r);return we.parse(i)}async function tf(e,t){let n=await a(e,{path:`/oauth/payments/intent/${encodeURIComponent(t.intentId)}`,bearer:t.bearer});return ke.parse(n)}async function nf(e,t){let n=await a(e,{path:`/oauth/payments/intent/${encodeURIComponent(t.intentId)}/sign`,method:`POST`,bearer:t.bearer});return Ae.parse(n)}async function rf(e,t){let n=await a(e,{path:`/oauth/payments/intent/${encodeURIComponent(t.intentId)}/complete`,method:`POST`,bearer:t.bearer,body:t.body});return je.parse(n)}async function af(e,t){let n=await a(e,{path:`/oauth/payments/intent/${encodeURIComponent(t.intentId)}/deny`,method:`POST`,bearer:t.bearer});return je.parse(n)}async function of(e,t){let n=await a(e,{path:`/oauth/payments/limits`,bearer:t.bearer});return Ee.parse(n)}async function sf(e,t){let n=await a(e,{path:`/payments/me/moonpay/availability`,bearer:t.bearer});return un.parse(n)}async function cf(e,t){let n=await a(e,{path:`/payments/me/moonpay/buy-url`,method:`POST`,bearer:t.bearer,body:t.body});return dn.parse(n)}async function lf(e,t){let n=await a(e,{path:`/payments/me/moonpay/sell-url`,method:`POST`,bearer:t.bearer,body:t.body});return fn.parse(n)}async function uf(e,t){let{bearer:n,chain:r,token:i,amount:o,usdCents:s}=t,c=await a(e,{path:`/oauth/payments/price`,bearer:n,query:{chain:r,token:i,amount:o,usdCents:s===void 0?void 0:String(s)}});return De.parse(c)}async function df(e,t){let n=await a(e,{path:`/oauth/payments/status/${encodeURIComponent(t.intentId)}`,bearer:t.bearer});return Oe.parse(n)}async function ff(e,t){let n=await a(e,{path:`/payments/me/tron`,bearer:t.bearer});return pn.parse(n)}async function pf(e,t){let n=await a(e,{path:`/payments/me/tron/ledger${t.before===void 0?``:`?before=${encodeURIComponent(t.before)}`}`,bearer:t.bearer});return hn.parse(n)}async function mf(e,t){let n=await a(e,{path:`/payments/me/tron/deposit`,method:`POST`,bearer:t.bearer,body:t.body});return gn.parse(n)}async function hf(e,t){let n=await a(e,{path:`/payments/me/tron/transfer`,method:`POST`,bearer:t.bearer,idempotencyKey:t.idempotencyKey??crypto.randomUUID(),body:t.body});return _n.parse(n)}async function gf(e,t){let n=await a(e,{path:`/payments/me/tron/security`,bearer:t.bearer});return vn.parse(n)}async function _f(e,t){let n=await a(e,{path:`/payments/me/tron/security`,method:`PUT`,bearer:t.bearer,body:t.setting});return vn.parse(n)}async function vf(e,t){let n=await a(e,{path:`/payments/me/tron/transfer/challenge`,method:`POST`,bearer:t.bearer,body:t.body});return xn.parse(n)}async function yf(e,t){let n=await a(e,{path:`/payments/me/tron/connect`,method:`POST`,bearer:t.bearer});return An.parse(n)}async function bf(e,t){let n=await a(e,{path:`/payments/me/tron/cashouts`,method:`POST`,bearer:t.bearer,body:t.body});return jn.parse(n)}async function xf(e,t){let n=await a(e,{path:`/payments/me/tron/cashouts`,bearer:t.bearer});return Mn.parse(n)}function Sf(e){let t=new URL(e.apiOrigin).origin,n=e.gameOrigin??globalThis.location.origin,r=e.container??document.body,i=e.background??``,a=document.createElement(`iframe`),o=i===``?``:`&bg=${encodeURIComponent(i)}`;a.src=`${t}/presence/embed?client_id=${encodeURIComponent(e.clientId)}&origin=${encodeURIComponent(n)}${o}`,a.title=`Metatron presence`,e.styleIframe?e.styleIframe(a):(a.style.border=`0`,a.style.display=`block`,a.style.width=`190px`,a.style.height=`44px`),i!==``&&(a.style.background=i);let s=null,c=t=>{t===`overlay`?(s??=a.style.cssText,a.style.cssText=`position:fixed;inset:0;width:100%;height:100%;border:0;z-index:2147483646;opacity:1;transition:opacity 160ms ease`):s!==null&&(a.style.cssText=s,s=null),e.onPresentationChange?.(t)},ee=n=>{if(n.origin!==t||n.source!==a.contentWindow)return;let r=n.data;if(r?.source===`tg-presence`)switch(r.kind){case`play-session`:e.onPlaySessionId?.(typeof r.playSessionId==`string`?r.playSessionId:null);break;case`status`:typeof r.status==`string`&&e.onStatus?.(r.status);break;case`auth`:e.onAuthChange?.(r.authenticated===!0);break;case`expand`:c(`overlay`);break;case`collapse`:c(`chip`);break;default:break}};return window.addEventListener(`message`,ee),r.append(a),{destroy(){window.removeEventListener(`message`,ee),a.remove()}}}async function Cf(e,t){let n=await a(e,{path:`/me/stats`,bearer:t.bearer});return Fr.parse(n)}async function wf(e,t){let n=await a(e,{path:`/me/earnings/timeseries`,bearer:t.bearer,query:{days:t.days}});return Lr.parse(n)}async function Tf(e,t){let n=await a(e,{path:`/me/threads`,bearer:t.bearer,query:{limit:t.limit,cursor:t.cursor}});return ir.parse(n)}async function Ef(e,t){let n=await a(e,{path:`/me/threads`,method:`POST`,bearer:t.bearer,body:t.body});return L.parse(n)}async function Df(e,t){let n=await a(e,{path:`/me/threads/${encodeURIComponent(t.threadId)}/messages`,bearer:t.bearer,query:{limit:t.limit,cursor:t.cursor}});return fr.parse(n)}async function Of(e,t){await s(e,{path:`/me/threads/${encodeURIComponent(t.threadId)}/messages`,method:`POST`,bearer:t.bearer,body:t.body})}async function kf(e,t){await s(e,{path:`/me/threads/${encodeURIComponent(t.threadId)}/read`,method:`POST`,bearer:t.bearer})}async function Af(e,t){let n=new FormData,r=t.file instanceof Blob?t.file:new Blob([t.file],{type:t.contentType});n.append(`file`,r,t.filename);let i=await e.fetch(`${jf(e.issuer)}/me/threads/${encodeURIComponent(t.threadId)}/attachments`,{method:`POST`,headers:{authorization:`Bearer ${t.bearer}`},body:n});if(!i.ok){let e=await i.text();throw Error(`tron ${i.status}: ${e}`)}let a=await i.json();return H.parse(a)}function jf(e){return e.endsWith(`/`)?e.slice(0,-1):e}async function Mf(e,t){let n=await a(e,{path:`/me/notifications`,bearer:t.bearer,query:{limit:t.limit,cursor:t.cursor}});return bi.parse(n)}async function Nf(e,t){await s(e,{path:`/me/notifications/${encodeURIComponent(t.notificationId)}`,method:`PATCH`,bearer:t.bearer,body:t.body})}async function Pf(e,t){await s(e,{path:`/me/notifications/mark-all-read`,method:`POST`,bearer:t.bearer})}async function Ff(e,t){let n=await a(e,{path:`/me/playtime`,bearer:t.bearer});return Mr.parse(n)}async function If(e,t){let n=await a(e,{path:`/me/playtime/timeseries`,bearer:t.bearer,query:{days:t.days}});return Pr.parse(n)}async function Lf(e,t){let n=await a(e,{path:`/users/${encodeURIComponent(t.handle)}`,bearer:t.bearer});return Li.parse(n)}async function Rf(e,t){let n=await a(e,{path:`/users/search`,bearer:t.bearer,query:{q:t.q,limit:t.limit}});return zi.parse(n)}async function zf(e,t){let n=await a(e,{path:`/me/referral`,bearer:t.bearer});return Tr.parse(n)}async function Bf(e,t){let n=await a(e,{path:`/me/referral/code`,method:`POST`,bearer:t.bearer,body:{regenerate:t.regenerate??!1}});return Er.parse(n)}async function Vf(e,t){let n=await a(e,{path:`/me/referral/preview`,query:{code:t.code},bearer:t.bearer});return Dr.parse(n)}async function Hf(e,t){let n={code:t.code,source:t.source},r=await a(e,{path:`/me/referral/bind`,method:`POST`,bearer:t.bearer,body:n});return Or.parse(r)}async function Uf(e,t){await s(e,{path:`/users/${encodeURIComponent(t.userId)}/follow`,method:`POST`,bearer:t.bearer})}async function Wf(e,t){await s(e,{path:`/users/${encodeURIComponent(t.userId)}/follow`,method:`DELETE`,bearer:t.bearer})}async function Gf(e,t){await s(e,{path:`/users/${encodeURIComponent(t.userId)}/friend`,method:`POST`,bearer:t.bearer})}async function Kf(e,t){await s(e,{path:`/users/${encodeURIComponent(t.userId)}/friend`,method:`DELETE`,bearer:t.bearer})}async function qf(e,t){await s(e,{path:`/me/friend-requests/${encodeURIComponent(t.requestId)}`,method:`PATCH`,bearer:t.bearer,body:{decision:t.decision}})}async function Jf(e,t){await s(e,{path:`/me/friend-requests/${encodeURIComponent(t.requestId)}`,method:`DELETE`,bearer:t.bearer})}async function Yf(e,t){let n=await a(e,{path:`/me/friends`,bearer:t.bearer});return Ci.parse(n)}async function Xf(e,t){let n=await a(e,{path:`/oauth/friends`,bearer:t.bearer});return wi.parse(n)}async function Zf(e,t){let n=await a(e,{path:`/me/socials`,bearer:t.bearer});return Ei.parse(n)}async function Qf(e,t){let n=await a(e,{path:`/me/wallets`,bearer:t.bearer});return Wn.parse(n)}async function $f(e,t){let n=await a(e,{path:`/me/wallets/${encodeURIComponent(t.address)}/delegate`,bearer:t.bearer});return Hn.parse(n)}async function ep(e,t){let n=await a(e,{path:`/me/wallets/${encodeURIComponent(t.address)}/delegate`,method:`POST`,bearer:t.bearer,body:t.body});return Kn.parse(n)}async function tp(e,t){let n=await a(e,{path:`/me/wallets/${encodeURIComponent(t.address)}/delegate`,method:`DELETE`,bearer:t.bearer});return qn.parse(n)}async function np(e,t){let n=await a(e,{path:`/me/wallets/${encodeURIComponent(t.address)}`,method:`PATCH`,bearer:t.bearer,body:t.body});return Gn.parse(n)}async function rp(e,t){let n=await a(e,{path:`/me/wallets`,bearer:t.bearer});return Wn.parse(n)}const ip=e.object({event:e.enum([`intent.completed`,`intent.denied`,`intent.expired`,`intent.txhash_indexed`]),deliveredAt:e.iso.datetime(),intent:Oe});async function ap(e){let t=e.signatureHeader;if(typeof t!=`string`||t===``)return{ok:!1,reason:`missing_signature`};let n=e.timestampHeader;if(typeof n!=`string`||n===``)return{ok:!1,reason:`missing_timestamp`};let r=Number(n);if(!Number.isFinite(r)||r<=0)return{ok:!1,reason:`invalid_timestamp`};let i=e.toleranceSeconds??300,a=Math.floor((e.now??Date.now())/1e3);if(Math.abs(a-r)>i)return{ok:!1,reason:`stale_timestamp`};if(!sp(await op(e.secret,`${n}.${e.rawBody}`),t))return{ok:!1,reason:`signature_mismatch`};let o;try{o=JSON.parse(e.rawBody)}catch{return{ok:!1,reason:`schema_mismatch`}}let s=ip.safeParse(o);return s.success?{ok:!0,body:s.data}:{ok:!1,reason:`schema_mismatch`}}async function op(e,t){let n=new TextEncoder,r=await crypto.subtle.importKey(`raw`,n.encode(e),{name:`HMAC`,hash:`SHA-256`},!1,[`sign`]),i=await crypto.subtle.sign(`HMAC`,r,n.encode(t)),a=new Uint8Array(i),o=``;for(let e of a)o+=e.toString(16).padStart(2,`0`);return o}function sp(e,t){let n=e.toLowerCase(),r=t.toLowerCase();if(n.length!==r.length)return!1;let i=0;for(let e=0;e<n.length;e++)i|=n.charCodeAt(e)^r.charCodeAt(e);return i===0}const cp=`x-metatron-signature`,lp=`x-metatron-timestamp`,up=new Set([`localhost`,`127.0.0.1`,`::1`]);function dp(e,t={}){if(!(t.isProduction??fp()))return;let n;try{n=new URL(e)}catch{throw Error(`@metatrongg/sdk: invalid issuer URL: ${e}`)}if(n.protocol!==`https:`&&!(n.protocol===`http:`&&up.has(n.hostname)))throw Error(`@metatrongg/sdk: issuer must be https:// in production (got ${n.protocol}//${n.host})`)}function fp(){return typeof process<`u`&&typeof process.env==`object`?process.env.NODE_ENV===`production`:!1}var pp=class{ctx;clientId;redirectUri;scopes;tokenStore;constructor(e){dp(e.issuer),this.ctx={issuer:e.issuer,fetch:e.fetch??fetch.bind(globalThis),logger:e.logger??Pl(),rateLimiter:e.rateLimit===!1?void 0:Ul(e.rateLimit??{}),dedupe:e.dedupe===!1?void 0:Nl()},this.clientId=e.clientId,this.redirectUri=e.redirectUri,this.scopes=e.scopes,this.tokenStore=e.tokenStore}get transport(){return this.ctx}get oauth(){return{discover:async()=>await Fd(this.ctx),buildAuthorizeUrl:async e=>await Hd({issuer:this.ctx.issuer,clientId:this.clientId,redirectUri:this.redirectUri,scopes:this.scopes,state:e?.state,forceConsent:e?.forceConsent}),exchangeCode:async e=>{let t=await Wd(this.ctx,{code:e.code,redirectUri:this.redirectUri,codeVerifier:e.codeVerifier,clientId:this.clientId}),n=Kd(Date.now(),t);return await this.tokenStore?.set(this.clientId,n),n},refresh:async e=>{let t=await Gd(this.ctx,{refreshToken:e.refreshToken,clientId:this.clientId,scope:e.scope}),n=Kd(Date.now(),t);return await this.tokenStore?.set(this.clientId,n),n},revoke:async e=>{await Ud(this.ctx,{token:e.token,tokenTypeHint:e.tokenTypeHint,clientId:this.clientId})},signOut:async e=>{await Ud(this.ctx,{token:e.refreshToken,tokenTypeHint:`refresh_token`,clientId:this.clientId}),await this.tokenStore?.clear(this.clientId)},userInfo:async e=>await qd(this.ctx,e),getStoredTokens:async()=>await(this.tokenStore?.get(this.clientId)??Promise.resolve(null))}}get payments(){return{charge:async e=>await ef(this.ctx,e),limits:async e=>await of(this.ctx,e),price:async e=>await uf(this.ctx,e),status:async e=>await df(this.ctx,e),intent:{get:async e=>await tf(this.ctx,e),sign:async e=>await nf(this.ctx,e),complete:async e=>await rf(this.ctx,e),deny:async e=>await af(this.ctx,e)}}}get users(){return{get:async e=>await Lf(this.ctx,e),search:async e=>await Rf(this.ctx,e),follow:async e=>{await Uf(this.ctx,e)},unfollow:async e=>{await Wf(this.ctx,e)},friendRequest:async e=>{await Gf(this.ctx,e)},decideFriendRequest:async e=>{await qf(this.ctx,e)},cancelFriendRequest:async e=>{await Jf(this.ctx,e)},friends:async e=>await Yf(this.ctx,e),me:async e=>await a(this.ctx,{path:`/me`,bearer:e.bearer})}}get messaging(){return{listThreads:async e=>await Tf(this.ctx,e),createDirect:async e=>await Ef(this.ctx,e),listMessages:async e=>await Df(this.ctx,e),send:async e=>{await Of(this.ctx,e)},markRead:async e=>{await kf(this.ctx,e)},uploadAttachment:async e=>await Af(this.ctx,e)}}get notifications(){return{list:async e=>await Mf(this.ctx,e),markAllRead:async e=>{await Pf(this.ctx,e)}}}get wallets(){return{list:async e=>await Qf(this.ctx,e)}}get inventory(){return{list:async e=>await $u(this.ctx,e)}}get socials(){return{list:async e=>await Zf(this.ctx,e)}}get referral(){return{get:async e=>await zf(this.ctx,e),createCode:async e=>await Bf(this.ctx,e),preview:async e=>await Vf(this.ctx,e),bind:async e=>await Hf(this.ctx,e)}}};function mp(e={}){if(typeof document>`u`)throw TypeError(`@metatrongg/sdk: cookie token store requires a browser environment`);let t=e.cookieName??`tg_sdk_tokens`,n=e.path??`/`,r=e.secure??!0,i=e.sameSite??`Lax`,a=e.maxAgeSeconds??3600*24*30;function o(e){return`${t}:${e}`}return{async get(e){let t=hp(o(e));if(t===null)return null;try{return JSON.parse(t)}catch{return null}},async set(e,t){gp(o(e),JSON.stringify(t),{path:n,secure:r,sameSite:i,maxAgeSeconds:a})},async clear(e){gp(o(e),``,{path:n,secure:r,sameSite:i,maxAgeSeconds:0})}}}function hp(e){let t=`${encodeURIComponent(e)}=`;for(let e of document.cookie.split(`; `))if(e.startsWith(t))return decodeURIComponent(e.slice(t.length));return null}function gp(e,t,n){let r=[`${encodeURIComponent(e)}=${encodeURIComponent(t)}`,`Path=${n.path}`,`SameSite=${n.sameSite}`,`Max-Age=${n.maxAgeSeconds}`];n.secure&&r.push(`Secure`),document.cookie=r.join(`; `)}export{zl as NOOP_RATE_LIMITER,Rl as SERVER_RATE_LIMIT_MAX_MUTATING,Ll as SERVER_RATE_LIMIT_MAX_READ,Il as SERVER_RATE_LIMIT_WINDOW_MS,r as TRON_WS_CLOSE_CODES,pp as TronBrowserClient,t as TronError,n as TronOauthError,i as TronWsCloseError,cp as WEBHOOK_SIGNATURE_HEADER,lp as WEBHOOK_TIMESTAMP_HEADER,Yu as acceptDeveloperInvite,Wc as addAdmin,Lc as addAppealBlacklist,wd as addReaction,Vc as approveTronCashout,vd as batchThreadDmKeys,Hf as bindReferral,Hd as buildAuthorizeUrl,Jf as cancelFriendRequest,ef as charge,ll as commentOnBipUpdate,kl as commentOnGameReview,rf as completePaymentIntent,mu as consolidateDeveloperAppWallet,fl as createBipUpdate,Fl as createConsoleLogger,mp as createCookieTokenStore,ep as createDelegation,Xl as createDeveloperApiKey,$l as createDeveloperApp,Du as createDeveloperAppMintPermit,Zu as createDeveloperVaultPermit,Qu as createDeveloperWithdrawPermit,Ef as createDirectThread,Wl as createInMemoryTokenStore,Nl as createInflightDedup,Pl as createNoopLogger,Ul as createRateLimiter,Bf as createReferralCode,bf as createTronCashout,yf as createTronConnectOnboarding,mf as createTronDeposit,hf as createTronTransfer,vf as createTronTransferChallenge,qf as decideFriendRequest,Xu as declineDeveloperInvite,Id as defaultEndpoints,Pu as deleteAppPageBanner,Iu as deleteAppPageThumbnail,Ru as deleteAppPageThumbnailVideo,$s as deleteAvatar,ml as deleteBipUpdate,ul as deleteBipUpdateComment,tp as deleteDelegation,tu as deleteDeveloperApp,ru as deleteDeveloperAppLogo,el as deleteDeveloperProfileLogo,rl as deleteDeveloperRequestLogo,Al as deleteGameReviewComment,Ml as deleteGameReviewReply,Sd as deleteMessage,wl as deleteMyGameReview,Od as deleteThread,bd as deleteThreadLogo,af as denyPaymentIntent,Cd as editMessage,Wd as exchangeAuthorizationCode,nd as executeNftTransfer,Fd as fetchAuthorizationServerMetadata,qd as fetchUserInfo,Jd as fileAppeal,Yd as fileAppealPotLeg,Uf as followUser,Ec as forceWithdrawVaultCustody,Ld as generatePkce,zd as generateState,Gl as getActivity,Kl as getActivityGroup,vc as getAdminAppealRoom,kc as getAppFeeConfig,Xc as getAppPage,lc as getAppPageChanges,Xd as getAppealRoom,gl as getBipDirectory,_l as getBipPage,$f as getDelegation,ou as getDeveloperAppActivity,iu as getDeveloperAppBalances,su as getDeveloperAppEarnings,Ou as getDeveloperAppInventoryItemHolders,lu as getDeveloperAppOverview,ju as getDeveloperAppPage,cu as getDeveloperAppPlaytime,au as getDeveloperAppTronBalance,uu as getDeveloperAppWallets,vu as getDeveloperPaymentAppeals,yu as getDeveloperPaymentPendingDeposits,Zc as getDeveloperStatus,bu as getDeveloperTronBalanceSummary,fd as getDmKeyBackupStatus,wf as getEarningsTimeseries,df as getIntentStatus,yl as getLibrary,Cf as getMeStats,sf as getMoonpayAvailability,sl as getMyBipUpdateReactions,gd as getMyDmKey,Sl as getMyGameReview,Tl as getMyGameReviewReactions,Jl as getOutstanding,ql as getPaymentChains,Yl as getPaymentHistory,tf as getPaymentIntent,of as getPaymentLimits,uf as getPaymentPrice,Dc as getPlatformFees,Ff as getPlaytime,If as getPlaytimeTimeseries,Lf as getPublicProfile,zf as getReferral,_d as getThreadDmKey,ff as getTronBalance,gf as getTronSecurity,dc as hideAppPage,hc as hideAppPageBip,Ad as hideThread,Ku as inviteDeveloperAppParticipant,jd as inviteParticipants,Md as leaveThread,sc as listActivePlayers,Uc as listAdmins,cc as listAppPages,zc as listAppealBlacklist,_c as listAppealQueue,Yc as listAudit,ol as listBipUpdateComments,al as listBipUpdates,Zl as listDeveloperApiKeys,xu as listDeveloperAppContentReports,Tu as listDeveloperAppInventoryCollections,Eu as listDeveloperAppInventoryItems,Gu as listDeveloperAppParticipants,xl as listDeveloperAppReviews,dl as listDeveloperBipUpdates,Ju as listDeveloperInvites,Cc as listDeveloperRequests,Tc as listDevelopers,Yf as listFriends,Xf as listFriendsForApp,Ol as listGameReviewComments,bl as listGameReviews,$u as listInventory,ed as listInventoryForApp,rd as listInventoryMintPermits,od as listInventoryVaultPermits,ud as listInventoryVaulted,Mf as listNotifications,dd as listOauthInventoryVaulted,nc as listPaymentAuthorizations,Zf as listSocials,Df as listThreadMessages,Tf as listThreads,Bc as listTronCashoutQueue,xf as listTronCashouts,pf as listTronLedger,qc as listUsers,rp as listWalletManager,Qf as listWallets,Pf as markAllNotificationsRead,kf as markThreadRead,cf as mintMoonpayBuyUrl,lf as mintMoonpaySellUrl,Sf as mountPresenceWidget,ip as oauthPaymentWebhookBodySchema,Nd as pinThread,yc as postAdminAppealRoomMessage,Zd as postAppealRoomMessage,Vf as previewReferral,fu as provisionDeveloperAppWallet,hd as publishDmKey,Cu as quoteDeveloperAppInventoryRegistration,td as quoteNftTransfer,cd as quoteRelayedVaultPermit,id as redeemInventoryMintPermit,Gd as refreshAccessToken,wu as registerDeveloperAppInventoryItem,Hc as rejectTronCashout,Kc as removeAdmin,Rc as removeAppealBlacklist,Kf as removeFriend,Ed as removeParticipant,Td as removeReaction,jl as replyToGameReview,gu as requestDeveloperAppProduction,ad as requestMint,xc as resolveAppeal,pc as reviewAppPage,mc as reviewAppPageBip,uc as reviewAppPageChanges,wc as reviewDeveloperRequest,Ql as revokeDeveloperApiKey,qu as revokeDeveloperAppParticipant,ic as revokePaymentAuthorization,Ud as revokeToken,hu as rotateDeveloperAppKey,_u as rotateDeveloperAppPaymentWebhookSecret,Mc as rotateProcessorTreasury,tc as searchGiphy,Rf as searchUsers,Gf as sendFriendRequest,Of as sendMessage,ac as sendPresenceHeartbeat,Hu as setAppPageBip,cl as setBipUpdateReaction,El as setMyGameReviewReaction,jc as setProcessorWhitelist,_f as setTronSecurity,Nc as setVaultOperator,Pc as setVaultPause,Fc as setVaultWithdrawLockDefault,Ic as setVaultWithdrawLockOverride,pd as setupDmKeyBackup,Rd as sha256Base64Url,sd as signInventoryVaultPermit,nf as signPaymentIntent,vl as submitAppContentReport,Uu as submitAppPageBipForReview,Bu as submitAppPageForReview,tl as submitDeveloperRequest,ld as submitRelayedVaultPermit,Dl as tipGameReview,Kd as toTokenSet,Wf as unfollowUser,fc as unhideAppPage,gc as unhideAppPageBip,md as unlockDmKeyBackup,Pd as unpinThread,Vu as unpublishAppPage,Wu as unpublishAppPageBip,Gc as updateAdminRole,Ac as updateAppFeeConfig,Mu as updateAppPage,pl as updateBipUpdate,eu as updateDeveloperApp,du as updateDeveloperAppAutoSweep,Su as updateDeveloperAppContentReportStatus,Qc as updateDeveloperProfile,Nf as updateNotification,Dd as updateParticipantRole,rc as updatePaymentAuthorization,Oc as updatePlatformFees,oc as updateProfile,kd as updateThreadSettings,Jc as updateUserBan,np as updateWalletLabel,bc as uploadAdminAppealRoomAttachment,Nu as uploadAppPageBanner,zu as uploadAppPageGallery,Fu as uploadAppPageThumbnail,Lu as uploadAppPageThumbnailVideo,Qd as uploadAppealRoomAttachment,Af as uploadAttachment,Qs as uploadAvatar,hl as uploadBipUpdateMedia,Au as uploadDeveloperAppInventoryItemBanner,ku as uploadDeveloperAppInventoryItemImage,nu as uploadDeveloperAppLogo,$c as uploadDeveloperProfileLogo,nl as uploadDeveloperRequestLogo,$ as uploadMultipart,yd as uploadThreadLogo,Cl as upsertMyGameReview,ap as verifyWebhook,pu as withdrawDeveloperAppWallet};
|
|
1
|
+
import*as e from"zod";var t=class extends Error{status;code;body;constructor(e,t,n,r){super(n),this.name=`TronError`,this.status=e,this.code=t,this.body=r}},n=class extends t{error;errorDescription;errorUri;constructor(e,t,n,r,i){super(e,t,`oauth ${e} ${t}${r===void 0?``:`: ${r}`}`,n),this.name=`TronOauthError`,this.error=t,this.errorDescription=r,this.errorUri=i}};const r={BAD_REQUEST:4400,UNAUTHORIZED:4401,FORBIDDEN:4403,NOT_FOUND:4404,UNAVAILABLE:4503};var i=class extends Error{code;reason;constructor(e,t){super(`tron ws closed: ${e}${t===``?``:` ${t}`}`),this.name=`TronWsCloseError`,this.code=e,this.reason=t}get isApplicationError(){return this.code>=4e3&&this.code<5e3}get isPermanent(){return[r.BAD_REQUEST,r.UNAUTHORIZED,r.FORBIDDEN,r.NOT_FOUND].includes(this.code)}};async function a(e,t){if(t.raw===!0)throw Error("sendJson does not support `raw: true`; call send() directly");let n=t.method??`GET`;return e.dedupe!==void 0&&n===`GET`?await e.dedupe.run(o(t),async()=>await c(await s(e,t))):await c(await s(e,t))}function o(e){let t=e.query===void 0?``:JSON.stringify(e.query);return`GET ${e.path}?${t}|${e.bearer??``}`}async function s(e,t){let n=ee(e.issuer,t.path,t.query),r=new Headers(t.headers);t.bearer===void 0?t.basicAuth!==void 0&&r.set(`authorization`,`Basic ${ne(`${t.basicAuth.username}:${t.basicAuth.password}`)}`):r.set(`authorization`,`Bearer ${t.bearer}`),t.idempotencyKey!==void 0&&r.set(`idempotency-key`,t.idempotencyKey);let i=null;t.form===void 0?t.body!==void 0&&(r.set(`content-type`,`application/json`),i=JSON.stringify(t.body)):(r.set(`content-type`,`application/x-www-form-urlencoded`),i=new URLSearchParams(t.form).toString());let a=t.method??`GET`;e.rateLimiter!==void 0&&await e.rateLimiter.acquire(a);let o={method:a,headers:r};i!==null&&(o.body=i);let s=await e.fetch(n,o);if(t.raw===!0)return s;if(!s.ok){let e=await s.text();throw te(s.status,e)}return s}async function c(e){let n=await e.text();if(n!==``)try{return JSON.parse(n)}catch{throw new t(e.status,`non_json`,`response was not json`,n)}}function ee(e,t,n){let r=new URL(t,e.endsWith(`/`)?e:`${e}/`);if(n!==void 0){for(let[e,t]of Object.entries(n))if(t!==void 0)if(typeof t==`string`||typeof t==`number`)r.searchParams.set(e,String(t));else for(let n of t)r.searchParams.append(e,n)}return r.href}function te(e,r){let i;try{i=JSON.parse(r)}catch{return new t(e,`non_json`,`tron ${e}: non-json response`,r)}if(typeof i==`object`&&i){let a=i;if(typeof a.error==`string`&&(a.error_description!==void 0||a.error_uri!==void 0))return new n(e,a.error,r,typeof a.error_description==`string`?a.error_description:void 0,typeof a.error_uri==`string`?a.error_uri:void 0);if(typeof a.error==`string`)return new t(e,a.error,`tron ${e} ${a.error}`,r);if(Array.isArray(a.issues))return new t(e,`validation_failed`,`tron ${e} validation_failed`,r)}return new t(e,`unknown`,`tron ${e}: unknown error shape`,r)}function ne(e){return typeof Buffer<`u`?Buffer.from(e,`utf8`).toString(`base64`):btoa(e)}const l=e.string().min(3).max(18).regex(/^[a-z][a-z0-9_]*$/),re=e.string().nullable(),ie=e.string().max(256).nullable(),ae=e.url().max(2048).nullable(),oe=e.enum([`yellow`,`green`,`blue`,`white`,`black`,`red`]),u=e.enum([`super-admin`,`admin`,`read-only`]).nullable(),se=e.enum([`auto`,`online`,`offline`]),ce=e.enum([`development`,`production`]),d=e.object({id:e.string().min(1),email:e.email().nullable(),emailVerified:e.boolean(),name:l,displayName:re,bio:ie,websiteUrl:ae,image:e.string().nullish(),banner:oe,role:u,presenceStatusMode:se,environmentViewMode:ce,createdAt:e.iso.datetime(),updatedAt:e.iso.datetime()}),le=e.string().min(1);e.object({user:d,token:le.optional()}),e.object({error:e.string().min(1),traceId:e.string().min(1).optional()}),e.object({name:l,email:e.email(),password:e.string().min(8),image:e.url().optional(),callbackURL:e.url().optional()}),e.object({redirect:e.boolean(),token:le.optional(),url:e.url().optional(),user:d.optional()}),e.object({email:e.email(),password:e.string().min(1),callbackURL:e.url().optional(),rememberMe:e.boolean().optional()}),e.object({success:e.boolean()});const ue=e.object({id:e.string().min(1),token:e.string().min(1),userId:e.string().min(1),expiresAt:e.iso.datetime(),ipAddress:e.string().nullish(),userAgent:e.string().nullish(),createdAt:e.iso.datetime(),updatedAt:e.iso.datetime()});e.object({session:ue,user:d}).nullable(),e.object({status:e.boolean()}),e.object({status:e.boolean()}),e.object({email:e.email(),callbackURL:e.url().optional()}),e.object({status:e.boolean()}),e.object({email:e.email(),redirectTo:e.url().optional()}),e.object({status:e.boolean()}),e.object({newPassword:e.string().min(8),token:e.string().min(1)});const de=e.object({issuer:e.url(),authorization_endpoint:e.url(),token_endpoint:e.url(),userinfo_endpoint:e.url(),revocation_endpoint:e.url(),registration_endpoint:e.url(),response_types_supported:e.array(e.enum([`code`])),grant_types_supported:e.array(e.enum([`authorization_code`,`refresh_token`,`client_credentials`])),code_challenge_methods_supported:e.array(e.enum([`S256`])),token_endpoint_auth_methods_supported:e.array(e.enum([`client_secret_basic`,`client_secret_post`,`none`])),scopes_supported:e.array(e.enum([`openid`,`profile`,`payments:charge`,`inventory:read`,`social:read`,`developer:read`,`developer:apps`,`developer:pages`]))}),f=e.url().max(2048),p=e.string().min(1).regex(/^[A-Za-z0-9_:.-]+(?: [A-Za-z0-9_:.-]+)*$/);e.object({client_id:e.string().regex(/^tg_dc_[a-f0-9]{32}$/),client_id_issued_at:e.int().gte(0),client_name:e.string().min(1),redirect_uris:e.array(f),token_endpoint_auth_method:e.enum([`none`]),grant_types:e.array(e.enum([`authorization_code`,`refresh_token`])),response_types:e.array(e.enum([`code`])),scope:p}),e.object({error:e.enum([`invalid_redirect_uri`,`invalid_client_metadata`]),error_description:e.string().optional()}),e.object({redirect_uris:e.array(f).min(1).max(10),client_name:e.string().min(1).max(128).optional(),token_endpoint_auth_method:e.enum([`none`]).optional(),grant_types:e.array(e.enum([`authorization_code`,`refresh_token`])).optional(),response_types:e.array(e.enum([`code`])).optional(),scope:p.optional()});const m=e.string().regex(/^tg_(?:dev|prod|dc)_[A-Za-z0-9]{16,64}$/),fe=e.string().min(1).max(2048),pe=e.string().regex(/^[A-Za-z0-9_~.-]{43,128}$/),me=e.string().regex(/^[a-f0-9]{32}$/);e.object({request:me,app:e.object({id:e.string().min(1),name:e.string().min(1),logoUrl:e.url().nullable()}),clientKind:e.enum([`app`,`connector`]),scopes:e.array(e.enum([`openid`,`profile`,`payments:charge`,`inventory:read`,`social:read`,`developer:read`,`developer:apps`,`developer:pages`])).min(1),developerRole:e.object({approved:e.boolean(),policyVersion:e.string().min(1)}).nullable(),alreadyGranted:e.array(e.enum([`openid`,`profile`,`payments:charge`,`inventory:read`,`social:read`,`developer:read`,`developer:apps`,`developer:pages`])),redirectUriHost:e.string().min(1),payment:e.object({tiersCents:e.array(e.int().gt(0)).min(1),currentLimitCents:e.int().gte(0).nullable(),currentMonthSpentCents:e.int().gte(0).nullable(),payoutChains:e.array(e.string().min(1)),tron:e.object({currentMonthlyLimitTronCents:e.int().gte(0).nullable(),currentMonthSpentTronCents:e.int().gte(0).nullable(),currentAutoApproveEnabled:e.boolean()}).nullable()}).nullable()}),e.object({consentId:e.string().min(1),app:e.object({id:e.string().min(1),name:e.string().min(1),logoUrl:e.url().nullable()}),monthlyLimitCents:e.int().gte(0).nullable(),monthSpentCents:e.int().gte(0),tiersCents:e.array(e.int().gt(0)).min(1)}),e.object({app:e.object({id:e.string().min(1),name:e.string().min(1),logoUrl:e.url().nullable()}),developer:e.object({studioName:e.string().nullable(),logoUrl:e.url().nullable(),studioUrl:e.url().nullable(),studioXHandle:e.string().nullable()})}),e.object({redirect:e.url()});const he=e.int().gte(100).lte(5e6).nullable(),ge=e.int().gt(0).lte(1e8).nullable();e.object({request:me,decision:e.enum([`allow`,`deny`]),acceptDeveloperPolicy:e.boolean().optional(),payment:e.object({monthlyLimitCents:he,tron:e.object({autoApproveEnabled:e.boolean(),monthlyLimitTronCents:ge}).optional()}).optional()});const _e=e.object({access_token:e.string().min(1),token_type:e.enum([`Bearer`]),expires_in:e.int().gt(0),refresh_token:e.string().min(1).optional(),scope:p.optional()});e.object({error:e.enum([`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`]),error_description:e.string().optional(),error_uri:e.url().optional(),state:fe.optional()});const ve=e.string().regex(/^[A-Za-z0-9_~.-]{43,128}$/),h=e.string().regex(/^[a-f0-9]{64}$/),ye=e.object({grant_type:e.enum([`authorization_code`]),code:e.string().min(1),redirect_uri:f,code_verifier:ve,client_id:m.optional(),client_secret:h.optional()}),be=e.object({grant_type:e.enum([`refresh_token`]),refresh_token:e.string().min(1),scope:p.optional(),client_id:m.optional(),client_secret:h.optional()}),xe=e.object({grant_type:e.enum([`client_credentials`]),scope:p.optional(),client_id:m.optional(),client_secret:h.optional()});e.discriminatedUnion(`grant_type`,[ye.extend({grant_type:e.literal(`authorization_code`)}),be.extend({grant_type:e.literal(`refresh_token`)}),xe.extend({grant_type:e.literal(`client_credentials`)})]);const Se=e.object({sub:e.string().min(1),name:e.string().min(1).nullable(),preferred_username:e.string().min(1).nullable(),picture:e.url().nullable(),wallet_address:e.string().min(1).nullable()});e.object({token:e.string().min(1),token_type_hint:e.enum([`access_token`,`refresh_token`]).optional(),client_id:m.optional(),client_secret:h.optional()});const Ce=e.object({status:e.enum([`completed`]),intentId:e.string().min(1),paymentId:e.string().min(1),usdCents:e.int().gte(0),txHash:e.string().nullable()}),we=e.object({status:e.enum([`redirect`]),intentId:e.string().min(1),redirectUrl:e.url(),usdCents:e.int().gte(0)}),Te=e.discriminatedUnion(`status`,[Ce.extend({status:e.literal(`completed`)}),we.extend({status:e.literal(`redirect`)})]),Ee=e.object({error:e.enum([`monthly_limit_exceeded`]),currentLimitCents:e.int().gte(0),monthSpentCents:e.int().gte(0),attemptedUsdCents:e.int().gte(0),redirectUrl:e.url()});e.object({error:e.enum([`idempotency_key_reused`]),intentId:e.string().min(1)});const g=e.object({purpose:e.string().min(1).max(64).optional(),title:e.string().min(1).max(120).optional(),note:e.string().min(1).max(280).optional(),quantity:e.int().gte(1).lte(1e6).optional(),category:e.string().min(1).max(64).optional(),sessionId:e.string().min(1).max(128).optional(),groupId:e.string().min(1).max(128).optional(),image:e.url().max(2048).optional(),extra:e.record(e.string(),e.union([e.string().max(512),e.number(),e.boolean()])).optional()});e.object({chain:e.string().min(1),amount:e.string().regex(/^\d+$/),token:e.string().regex(/^(?:0x[0-9a-fA-F]{40}|[1-9A-HJ-NP-Za-km-z]{32,44})$/),returnUri:e.url().max(2048),potId:e.string().regex(/^0x[0-9a-fA-F]{32}$/).optional(),rakeBps:e.int().gte(0).lte(3e3).optional(),metadata:g.optional()});const De=e.object({monthlyLimitCents:e.int().gte(0).nullable(),monthSpentCents:e.int().gte(0),periodStart:e.iso.datetime(),offlineAutoChargeEnabled:e.boolean(),perTxOfflineCapCents:e.int().gte(0).nullable(),walletDelegated:e.boolean()}),Oe=e.object({chain:e.string().min(1),token:e.string().regex(/^0x[0-9a-fA-F]{40}$/),tokenDecimals:e.int().gte(0),usdRate:e.string().min(1),feed:e.object({aggregatorAddress:e.string().regex(/^0x[0-9a-fA-F]{40}$/),decimals:e.int().gte(0),answer:e.string().regex(/^\d+$/),updatedAt:e.iso.datetime()}),usdCents:e.int().gte(0).optional(),amount:e.string().regex(/^\d+$/).optional()}),ke=e.object({intentId:e.string().min(1),appId:e.string().min(1),status:e.enum([`pending`,`awaiting_funding`,`completed`,`denied`,`expired`]),paymentId:e.string().nullable(),txHash:e.string().nullable(),usdCents:e.int().gte(0),chain:e.string().min(1),token:e.string().regex(/^(?:0x[0-9a-fA-F]{40}|[1-9A-HJ-NP-Za-km-z]{32,44})$/).nullable(),grossAmount:e.string().regex(/^\d+$/).nullable(),creditedAmount:e.string().regex(/^\d+$/).nullable(),settlement:e.enum([`instant`,`locked`]).nullable(),resolvedAt:e.iso.datetime().nullable(),expiresAt:e.iso.datetime()}),Ae=e.enum([`ethereum`,`base`,`solana`]),je=e.object({intentId:e.string().min(1),consentId:e.string().min(1),app:e.object({id:e.string().min(1),name:e.string().min(1),logoUrl:e.url().nullable()}),chain:e.string().min(1),token:e.string(),amount:e.string(),vault:e.string().regex(/^(?:0x[0-9a-fA-F]{40}|[1-9A-HJ-NP-Za-km-z]{32,44})$/),appealable:e.boolean(),usdCents:e.int().gte(0),monthlyLimitCents:e.int().gte(0).nullable(),monthSpentCents:e.int().gte(0),offlineAutoChargeEnabled:e.boolean(),perTxOfflineCapCents:e.int().gte(0).nullable(),walletDelegated:e.boolean(),canonicalWalletAddress:e.string().nullable(),offlineDenialReason:e.enum([`no_active_play_session`,`driver_unavailable`,`wallet_not_delegated`,`deposit_cap_exceeded`,`insufficient_balance`,`fire_failed`]).nullable(),returnUriHost:e.string().min(1),status:e.enum([`pending`,`awaiting_funding`]),expiresAt:e.iso.datetime(),accessDenied:e.object({reason:e.enum([`not_invited`]),developer:e.object({studioName:e.string().nullable(),logoUrl:e.url().nullable(),studioUrl:e.url().nullable(),studioXHandle:e.string().nullable()})}).nullish(),environment:e.enum([`development`,`production`]),onramp:e.union([e.object({kind:e.enum([`bridge`]),from:Ae,to:Ae}),e.object({kind:e.enum([`insufficient`])})]).optional()}),Me=e.object({chain:e.string().min(1),chainId:e.int().gte(0),id:e.string().regex(/^0x[0-9a-fA-F]{32}$/),amount:e.string().regex(/^\d+$/),token:e.string().regex(/^0x[0-9a-fA-F]{40}$/),vault:e.string().regex(/^0x[0-9a-fA-F]{40}$/),data:e.string().regex(/^0x[0-9a-fA-F]*$/),appealable:e.boolean(),payer:e.string().regex(/^0x[0-9a-fA-F]{40}$/),deadline:e.int().gte(0),routerAddress:e.string().regex(/^0x[0-9a-fA-F]{40}$/),signature:e.string().regex(/^0x[0-9a-fA-F]+$/)}),Ne=e.object({redirect:e.url()}),Pe=e.object({method:e.enum([`signed`]),paymentId:e.string().min(1)}),Fe=e.object({method:e.enum([`offline`])});e.discriminatedUnion(`method`,[Pe.extend({method:e.literal(`signed`)}),Fe.extend({method:e.literal(`offline`)})]);const Ie=e.object({transaction:e.string().min(1),payer:e.string().regex(/^[1-9A-HJ-NP-Za-km-z]{32,44}$/)});e.object({signedTransaction:e.string().min(1)});const Le=e.object({consentId:e.string().min(1),app:e.object({id:e.string().min(1),name:e.string().min(1),logoUrl:e.url().nullable()}),monthlyLimitCents:e.int().gte(0).nullable(),monthSpentCents:e.int().gte(0),periodStart:e.iso.datetime(),offlineAutoChargeEnabled:e.boolean(),perTxOfflineCapCents:e.int().gte(0).nullable()}),Re=e.object({authorizations:e.array(Le)}),ze=e.int().gte(100).lte(1e5).nullable();e.object({offlineAutoChargeEnabled:e.boolean().optional(),perTxOfflineCapCents:ze.optional(),monthlyLimitCents:he.optional()});const Be=e.object({clientName:e.string().min(1),connectedAt:e.iso.datetime()});e.object({connections:e.array(Be)});const Ve=e.object({consentId:e.string().min(1),app:e.object({id:e.string().min(1),name:e.string().min(1),logoUrl:e.url().nullable()}),monthlyLimitTronCents:e.int().gte(0).nullable(),monthSpentTronCents:e.int().gte(0),autoApproveEnabled:e.boolean()});e.object({authorizations:e.array(Ve).max(200)}),e.object({monthlyTronLimitCents:ge.optional(),autoApproveEnabled:e.boolean().optional()});const _=e.string().min(3).max(40).regex(/^[a-z0-9-]+$/),He=e.object({appId:e.uuid(),name:e.string().min(1).max(80),slug:_,bannerUrl:e.url().nullable(),thumbnailUrl:e.url().nullable(),thumbnailVideoUrl:e.url().nullable(),categories:e.array(e.enum(`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`.split(`.`))),studio:e.object({name:e.string().min(1).max(80).nullable(),logoUrl:e.url().nullable()}).nullable(),firstPublishedAt:e.iso.datetime()}),Ue=e.object({items:e.array(He),nextBefore:e.iso.datetime().nullable()}),v=e.array(e.enum(`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`.split(`.`))).max(4),y=e.string().min(1).max(80),We=e.object({url:e.url().max(2048),caption:e.string().max(200).optional(),order:e.int().gte(0)}),b=e.array(We).max(6),Ge=e.object({heading:e.string().min(1).max(80),body:e.string().min(1).max(2e3),order:e.int().gte(0)}),x=e.array(Ge).max(8),Ke=e.object({label:e.string().min(1).max(40),url:e.url().max(2048),order:e.int().gte(0)}),S=e.array(Ke).max(10),qe=e.object({ownerUserId:e.uuid().nullable(),name:e.string().nullable(),logoUrl:e.url().nullable(),websiteUrl:e.url().nullable(),xHandle:e.string().nullable(),githubUrl:e.url().nullable()}),C=e.array(e.enum([`web`,`ios`,`android`,`pc`,`playstation`,`xbox`,`switch`])).max(7),w=e.enum([`single_player`,`multiplayer`,`both`]).nullable(),T=e.enum([`everyone`,`13_plus`,`16_plus`,`18_plus`]).nullable(),E=e.array(e.enum([`en`,`es`,`fr`,`de`,`pt`,`it`,`ru`,`ja`,`ko`,`zh`,`hi`,`ar`,`tr`,`vi`,`id`,`th`,`pl`,`nl`])).max(18),D=e.enum([`live`,`open_beta`,`coming_soon`]),Je=e.enum([`tron`,`onchain`,`both`]).nullable(),Ye=e.object({appId:e.uuid(),slug:_,appName:e.string(),appLogoUrl:e.url().nullable(),categories:v,tagline:y,bannerUrl:e.url().nullable(),playUrl:e.url().nullable(),discordUrl:e.url().nullable(),twitterUrl:e.url().nullable(),redditUrl:e.url().nullable(),telegramUrl:e.url().nullable(),gallery:b,chapters:x,links:S,studio:qe,platforms:C,gameType:w,ageRating:T,languages:E,releaseStatus:D,paymentsMode:Je,oauthScopes:e.array(e.string()),chains:e.array(e.string()),devlog:e.boolean(),publishedAt:e.iso.datetime(),updatedAt:e.iso.datetime()}),Xe=e.object({appId:e.uuid(),slug:_,appName:e.string(),appLogoUrl:e.url().nullable(),categories:v,tagline:y,bannerUrl:e.url().nullable(),discordUrl:e.url().nullable(),twitterUrl:e.url().nullable(),redditUrl:e.url().nullable(),telegramUrl:e.url().nullable(),gallery:b,chapters:x,links:S,studio:qe,platforms:C,gameType:w,ageRating:T,languages:E,releaseStatus:D,publishedAt:e.iso.datetime(),updatedAt:e.iso.datetime()}),Ze=e.string().min(1).max(4e3),Qe=e.object({url:e.url().max(2048),kind:e.enum([`image`,`video`]),order:e.int().gte(0)}),O=e.array(Qe).max(6),$e=e.object({up:e.int().gte(0),down:e.int().gte(0)}),k=e.object({id:e.uuid(),appId:e.uuid(),body:Ze,attachments:O,reactions:$e,commentCount:e.int().gte(0),createdAt:e.iso.datetime(),updatedAt:e.iso.datetime(),pinnedAt:e.iso.datetime().nullable()}),et=e.object({updates:e.array(k),total:e.int().gte(0),hasMore:e.boolean(),pinned:k.nullable()}),tt=e.string().min(1).max(1e3),A=e.object({userId:e.uuid(),handle:e.string().nullable(),name:e.string().min(1).max(80).nullable(),avatarUrl:e.url().nullable()}),nt=e.object({id:e.uuid(),body:tt,author:A,createdAt:e.iso.datetime()}),rt=e.object({comments:e.array(nt),total:e.int().gte(0),hasMore:e.boolean()}),it=e.object({interestCount:e.int().gte(0)}),j=e.object({interested:e.boolean(),subscribed:e.boolean(),interestCount:e.int().gte(0)});e.object({interested:e.boolean()}),e.object({subscribed:e.boolean()});const at=e.object({updateId:e.uuid(),vote:e.enum([`up`,`down`])}),ot=e.object({reactions:e.array(at)}),st=e.enum([`up`,`down`]).nullable(),ct=e.object({reactions:$e,vote:st});e.object({vote:st});const lt=e.object({comment:nt,commentCount:e.int().gte(0)});e.object({body:tt});const ut=e.object({commentCount:e.int().gte(0)});e.object({body:Ze,attachments:O.optional()}),e.object({body:Ze.optional(),attachments:O.optional()});const dt=e.object({deleted:e.literal(!0)}),ft=e.object({url:e.url().max(2048),kind:e.enum([`image`,`video`])}),pt=e.enum([`overwhelmingly_positive`,`very_positive`,`positive`,`mostly_positive`,`mixed`,`mostly_negative`,`negative`,`overwhelmingly_negative`]).nullable(),mt=e.object({count:e.int().gte(0),recommendedCount:e.int().gte(0),recommendedPct:e.number().gte(0).lte(100).nullable(),summaryLabel:pt}),M=e.boolean(),N=e.string().min(1).max(2e3),ht=e.object({helpful:e.int().gte(0),unhelpful:e.int().gte(0),funny:e.int().gte(0)}),gt=e.object({playtimeSecondsThisGame:e.int().gte(0),gamesPlayed:e.int().gte(0),reviewsWritten:e.int().gte(0)}),_t=e.string().min(1).max(2e3),vt=e.object({body:_t,repliedAt:e.iso.datetime()}).nullable(),yt=e.object({id:e.uuid(),recommended:M,body:N,reactions:ht,tippedCents:e.int().gte(0),commentCount:e.int().gte(0),author:A,authorStats:gt,developerReply:vt,createdAt:e.iso.datetime(),updatedAt:e.iso.datetime()}),bt=e.object({aggregate:mt,reviews:e.array(yt),total:e.int().gte(0),hasMore:e.boolean()}),xt=e.enum([`newest`,`oldest`,`helpful`]).default(`newest`),St=e.enum([`payment`,`reward`]).nullable(),Ct=e.object({id:e.uuid(),recommended:M,body:N,createdAt:e.iso.datetime(),updatedAt:e.iso.datetime()}).nullable(),P=e.object({eligible:e.boolean(),eligibleVia:St,review:Ct,isAppOwner:e.boolean()});e.object({recommended:M,body:N});const F=e.enum([`helpful`,`unhelpful`]).nullable(),wt=e.object({reviewId:e.uuid(),vote:F,funny:e.boolean()}),Tt=e.object({reactions:e.array(wt)}),Et=e.object({reactions:ht,vote:F,funny:e.boolean()});e.object({vote:F,funny:e.boolean()});const Dt=e.object({status:e.enum([`completed`]),amountCents:e.int().gt(0),balanceCents:e.int().gte(0),tippedCents:e.int().gte(0)});e.object({amountCents:e.int().gt(0).lte(1e6),note:e.string().min(1).max(280).optional(),challengeId:e.uuid().optional(),signature:e.string().max(2e3).regex(/^0x[0-9a-fA-F]+$/).optional()});const Ot=e.string().min(1).max(1e3),kt=e.object({id:e.uuid(),body:Ot,author:A,createdAt:e.iso.datetime()}),At=e.object({comments:e.array(kt),total:e.int().gte(0),hasMore:e.boolean()}),jt=e.object({comment:kt,commentCount:e.int().gte(0)});e.object({body:Ot});const Mt=e.object({commentCount:e.int().gte(0)}),Nt=e.object({developerReply:vt});e.object({body:_t});const Pt=e.object({created:e.boolean()}),I=e.enum([`abuse`,`inappropriate_content`,`cheating`,`spam`,`other`]);e.object({category:I,details:e.string().max(2e3).optional()});const L=e.enum([`open`,`acknowledged`,`dismissed`]),R=e.object({id:e.uuid(),category:I,details:e.string().nullable(),status:L,acknowledgedAt:e.iso.datetime().nullable(),createdAt:e.iso.datetime()}),Ft=e.object({reports:e.array(R),total:e.int().gte(0),hasMore:e.boolean()});e.object({status:e.enum([`acknowledged`,`dismissed`])});const It=e.object({id:e.string().min(1),family:e.enum([`evm`,`solana`]),displayName:e.string().min(1),chainId:e.int().optional(),paymentRouter:e.string().optional(),paymentProgram:e.string().optional()}),Lt=e.object({chains:e.array(It)}),Rt=e.object({id:e.string().regex(/^0x[0-9a-f]{32}$/),chain:e.string().min(1),chainId:e.int().gt(0),payer:e.string().regex(/^0x[0-9a-fA-F]{40}$/),amount:e.string().regex(/^\d+$/),token:e.string().regex(/^0x[0-9a-fA-F]{40}$/),vault:e.string().regex(/^0x[0-9a-fA-F]{40}$/),vaultKind:e.enum([`credit`,`platform`]),processorAddress:e.string().regex(/^0x[0-9a-fA-F]{40}$/).nullable(),grossAmount:e.string().regex(/^\d+$/),creditedAmount:e.string().regex(/^\d+$/),settlement:e.enum([`instant`,`locked`]).nullable(),appealable:e.boolean(),vaultReleaseAt:e.iso.datetime().nullable(),consolidatedAt:e.iso.datetime().nullable(),status:e.enum([`pending`,`completed`,`expired`]),txHash:e.string().regex(/^0x[0-9a-fA-F]{64}$/).nullable(),blockNumber:e.string().regex(/^\d+$/).nullable(),deadline:e.iso.datetime(),signedAt:e.iso.datetime(),completedAt:e.iso.datetime().nullable(),recipientApp:e.object({id:e.string().min(1),name:e.string().min(1),logoUrl:e.url().nullable()}).nullable()}),zt=e.object({payments:e.array(Rt),nextBefore:e.iso.datetime().nullable()}),Bt=e.object({kind:e.enum([`payment`]),groupId:e.string().min(1).nullable(),id:e.string().regex(/^0x[0-9a-f]{32}$/),chain:e.string().min(1),chainId:e.int().gt(0),occurredAt:e.iso.datetime(),role:e.enum([`outgoing`,`incoming`]),payer:e.string().regex(/^0x[0-9a-fA-F]{40}$/),beneficiary:e.string().regex(/^0x[0-9a-fA-F]{40}$/).nullable(),counterparty:e.string().regex(/^0x[0-9a-fA-F]{40}$/).nullable(),app:e.object({id:e.string().min(1),name:e.string().min(1),logoUrl:e.url().nullable(),slug:e.string().nullable(),bannerUrl:e.url().nullable()}).nullable(),beneficiaryApp:e.object({id:e.string().min(1),name:e.string().min(1),logoUrl:e.url().nullable(),slug:e.string().nullable(),bannerUrl:e.url().nullable()}).nullable(),amount:e.string().regex(/^\d+$/),token:e.string().regex(/^0x[0-9a-fA-F]{40}$/),vault:e.string().regex(/^0x[0-9a-fA-F]{40}$/),vaultKind:e.enum([`credit`,`platform`]),targetKind:e.enum([`credit`,`pot`]),processorAddress:e.string().regex(/^0x[0-9a-fA-F]{40}$/).nullable(),grossAmount:e.string().regex(/^\d+$/),creditedAmount:e.string().regex(/^\d+$/),settlement:e.enum([`instant`,`locked`]).nullable(),appealable:e.boolean(),disputableLegId:e.string().regex(/^0x[0-9a-f]{32}$/).nullable(),vaultReleaseAt:e.iso.datetime().nullable(),consolidatedAt:e.iso.datetime().nullable(),status:e.enum([`pending`,`completed`,`expired`]),txHash:e.string().regex(/^0x[0-9a-fA-F]{64}$/).nullable(),blockNumber:e.string().regex(/^\d+$/).nullable(),logIndex:e.int().gte(0).nullable(),metadata:g.nullish(),usdCents:e.int().gte(0).nullable()}),Vt=e.object({kind:e.enum([`payment_withdrawal`]),groupId:e.string().min(1).nullable(),id:e.string().regex(/^[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}$/),chain:e.string().min(1),occurredAt:e.iso.datetime(),role:e.enum([`incoming`]),beneficiary:e.string().regex(/^0x[0-9a-fA-F]{40}$/),counterparty:e.string().regex(/^0x[0-9a-fA-F]{40}$/),paymentId:e.string().regex(/^0x[0-9a-f]{32}$/).nullable(),vault:e.string().regex(/^0x[0-9a-fA-F]{40}$/),amount:e.string().regex(/^\d+$/),token:e.string().regex(/^0x[0-9a-fA-F]{40}$/),txHash:e.string().regex(/^0x[0-9a-fA-F]{64}$/),blockNumber:e.string().regex(/^\d+$/),logIndex:e.int().gte(0),usdCents:e.int().gte(0).nullable()}),Ht=e.object({kind:e.enum([`matured_withdrawal`]),groupId:e.string().min(1).nullable(),id:e.string().regex(/^[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}$/),chain:e.string().min(1),occurredAt:e.iso.datetime(),role:e.enum([`incoming`]),beneficiary:e.string().regex(/^0x[0-9a-fA-F]{40}$/),counterparty:e.string().regex(/^0x[0-9a-fA-F]{40}$/),vault:e.string().regex(/^0x[0-9a-fA-F]{40}$/),amount:e.string().regex(/^\d+$/),token:e.string().regex(/^0x[0-9a-fA-F]{40}$/),txHash:e.string().regex(/^0x[0-9a-fA-F]{64}$/),blockNumber:e.string().regex(/^\d+$/),logIndex:e.int().gte(0),usdCents:e.int().gte(0).nullable()}),Ut=e.object({kind:e.enum([`payout_sent`]),groupId:e.string().min(1).nullable(),id:e.string().regex(/^[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}$/),chain:e.string().min(1),occurredAt:e.iso.datetime(),role:e.enum([`incoming`]),recipient:e.string().regex(/^0x[0-9a-fA-F]{40}$/),counterparty:e.string().regex(/^0x[0-9a-fA-F]{40}$/),app:e.object({id:e.string().min(1),name:e.string().min(1),logoUrl:e.url().nullable(),slug:e.string().nullable(),bannerUrl:e.url().nullable()}).nullable(),vault:e.string().regex(/^0x[0-9a-fA-F]{40}$/),amount:e.string().regex(/^\d+$/),token:e.string().regex(/^0x[0-9a-fA-F]{40}$/),txHash:e.string().regex(/^0x[0-9a-fA-F]{64}$/),blockNumber:e.string().regex(/^\d+$/),logIndex:e.int().gte(0),metadata:g.nullish(),usdCents:e.int().gte(0).nullable()}),Wt=e.object({kind:e.enum([`credit_transferred`]),groupId:e.string().min(1).nullable(),id:e.string().regex(/^[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}$/),chain:e.string().min(1),occurredAt:e.iso.datetime(),role:e.enum([`incoming`]),recipient:e.string().regex(/^0x[0-9a-fA-F]{40}$/),counterparty:e.string().regex(/^0x[0-9a-fA-F]{40}$/),app:e.object({id:e.string().min(1),name:e.string().min(1),logoUrl:e.url().nullable(),slug:e.string().nullable(),bannerUrl:e.url().nullable()}).nullable(),vault:e.string().regex(/^0x[0-9a-fA-F]{40}$/),amount:e.string().regex(/^\d+$/),token:e.string().regex(/^0x[0-9a-fA-F]{40}$/),txHash:e.string().regex(/^0x[0-9a-fA-F]{64}$/),blockNumber:e.string().regex(/^\d+$/),logIndex:e.int().gte(0),usdCents:e.int().gte(0).nullable()}),Gt=e.object({kind:e.enum([`pot_leg`]),groupId:e.string().min(1).nullable(),id:e.string().regex(/^0x[0-9a-f]{32}$/),chain:e.string().min(1),occurredAt:e.iso.datetime(),role:e.enum([`incoming`]),beneficiary:e.string().regex(/^0x[0-9a-fA-F]{40}$/),distributionId:e.string().regex(/^[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}$/).nullable(),vault:e.string().regex(/^0x[0-9a-fA-F]{40}$/).nullable(),amount:e.string().regex(/^\d+$/),token:e.string().regex(/^0x[0-9a-fA-F]{40}$/),settlement:e.enum([`instant`,`locked`]),releaseAt:e.iso.datetime().nullable(),claimedAt:e.iso.datetime().nullable(),txHash:e.string().regex(/^0x[0-9a-fA-F]{64}$/).nullable(),blockNumber:e.string().regex(/^\d+$/).nullable(),logIndex:e.int().gte(0).nullable(),metadata:g.nullish(),usdCents:e.int().gte(0).nullable()}),Kt=e.object({kind:e.enum([`payment_autoclaim`]),groupId:e.string().min(1).nullable(),id:e.string().regex(/^[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}$/),chain:e.string().min(1),occurredAt:e.iso.datetime(),role:e.enum([`incoming`]),beneficiary:e.string().regex(/^0x[0-9a-fA-F]{40}$/),paymentId:e.string().regex(/^0x[0-9a-f]{32}$/).nullable(),vault:e.string().regex(/^0x[0-9a-fA-F]{40}$/),token:e.string().regex(/^0x[0-9a-fA-F]{40}$/),autoclaimKind:e.enum([`withdraw_matured`,`withdraw_escrow`,`claim_refund`]),status:e.enum([`pending`,`in_flight`,`succeeded`,`skipped`,`failed`]),attempts:e.int().gte(0),lastError:e.string().nullable(),txHash:e.string().regex(/^0x[0-9a-fA-F]{64}$/).nullable(),settledAt:e.iso.datetime().nullable()}),qt=e.object({kind:e.enum([`appeal`]),groupId:e.string().min(1).nullable(),id:e.string().regex(/^0x[0-9a-f]{32}$/),chain:e.string().min(1),occurredAt:e.iso.datetime(),role:e.enum([`outgoing`]),appellant:e.string().regex(/^0x[0-9a-fA-F]{40}$/),counterparty:e.string().regex(/^0x[0-9a-fA-F]{40}$/),paymentId:e.string().regex(/^0x[0-9a-f]{32}$/).nullable(),vault:e.string().regex(/^0x[0-9a-fA-F]{40}$/),amount:e.string().regex(/^\d+$/),token:e.string().regex(/^0x[0-9a-fA-F]{40}$/),status:e.enum([`pending_onchain`,`open`,`resolved_refund`,`resolved_dismiss`,`cancelled`,`force_cancelled`]),txHash:e.string().regex(/^0x[0-9a-fA-F]{64}$/).nullable(),blockNumber:e.string().regex(/^\d+$/).nullable(),logIndex:e.int().gte(0).nullable(),resolvedAt:e.iso.datetime().nullable(),refundClaimedAt:e.iso.datetime().nullable(),hasRoom:e.boolean(),resolution:e.object({resolutionId:e.string().regex(/^0x[0-9a-f]{32}$/),outcome:e.int().gte(0).lte(1),deadline:e.int().gte(0),signature:e.string().regex(/^0x[0-9a-fA-F]{130}$/)}).nullable(),usdCents:e.int().gte(0).nullable()}),Jt=e.object({kind:e.enum([`moonpay_buy`]),groupId:e.string().min(1).nullable(),id:e.string().regex(/^[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}$/),occurredAt:e.iso.datetime(),role:e.enum([`incoming`]),walletAddress:e.string().regex(/^0x[0-9a-fA-F]{40}$/),externalId:e.string().min(1),fiatAmountCents:e.int().gte(0),fiatCurrency:e.string().min(1),cryptoAmount:e.string().regex(/^\d+$/),cryptoToken:e.string().regex(/^0x[0-9a-fA-F]{40}$/),cryptoTxHash:e.string().regex(/^0x[0-9a-fA-F]{64}$/).nullable(),status:e.enum([`pending`,`completed`,`failed`])}),Yt=e.object({kind:e.enum([`moonpay_sell`]),groupId:e.string().min(1).nullable(),id:e.string().regex(/^[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}$/),occurredAt:e.iso.datetime(),role:e.enum([`outgoing`]),walletAddress:e.string().regex(/^0x[0-9a-fA-F]{40}$/),externalId:e.string().min(1),fiatAmountCents:e.int().gte(0),fiatCurrency:e.string().min(1),cryptoAmount:e.string().regex(/^\d+$/),cryptoToken:e.string().regex(/^0x[0-9a-fA-F]{40}$/),cryptoTxHash:e.string().regex(/^0x[0-9a-fA-F]{64}$/).nullable(),status:e.enum([`pending`,`completed`,`failed`])}),Xt=e.object({kind:e.enum([`tron_deposit`]),groupId:e.string().min(1).nullable(),id:e.string().regex(/^[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}$/),occurredAt:e.iso.datetime(),role:e.enum([`incoming`]),amountCents:e.int().gt(0),status:e.enum([`completed`,`disputed`,`clawed_back`]),receiptUrl:e.url().nullable(),paymentIntentId:e.string().min(1).nullable()}),Zt=e.object({userId:e.string().regex(/^[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}$/),handle:e.string().nullable(),displayName:e.string().nullable(),role:e.enum([`stake`,`payout`,`dev_cut`,`purchase`,`referral`]),amountCents:e.int()}),Qt=e.object({kind:e.enum([`tron_pot`]),groupId:e.string().min(1).nullable(),id:e.string().regex(/^[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}$/),occurredAt:e.iso.datetime(),role:e.enum([`incoming`,`outgoing`]),leg:e.enum([`stake`,`payout`,`dev_cut`,`purchase`,`referral`]),amountCents:e.int().gt(0),usdCents:e.int(),status:e.enum([`settled`]),app:e.object({id:e.string().min(1),name:e.string().min(1),logoUrl:e.url().nullable(),slug:e.string().nullable(),bannerUrl:e.url().nullable()}).nullable(),involvedUsers:e.array(Zt).nullish(),metadata:g.nullish()}),$t=e.object({kind:e.enum([`tron_cashout`]),groupId:e.string().min(1).nullable(),id:e.string().regex(/^[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}$/),occurredAt:e.iso.datetime(),role:e.enum([`outgoing`]),method:e.enum([`stripe`,`usdc`]),amountCents:e.int().gt(0),feeCents:e.int().gte(0),destinationAddress:e.string().regex(/^0x[0-9a-fA-F]{40}$/).nullable(),chain:e.string().min(1).nullable(),txHash:e.string().regex(/^0x[0-9a-fA-F]{64}$/).nullable(),status:e.enum([`pending`,`approved`,`rejected`,`settled`,`failed`]),stripeTransferId:e.string().min(1).nullable(),rejectionReason:e.string().min(1).nullable(),settledAt:e.iso.datetime().nullable()}),en=e.object({kind:e.enum([`tron_transfer`]),groupId:e.string().min(1).nullable(),id:e.string().regex(/^[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}$/),occurredAt:e.iso.datetime(),role:e.enum([`incoming`,`outgoing`]),amountCents:e.int().gt(0),usdCents:e.int(),status:e.enum([`settled`]),counterpartyUserId:e.string().regex(/^[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}$/).nullable(),counterpartyHandle:e.string().nullable(),counterpartyDisplayName:e.string().nullable(),note:e.string().nullable()}),tn=e.object({kind:e.enum([`referral_earning`]),groupId:e.string().min(1).nullable(),id:e.string().regex(/^[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}$/),chain:e.string().min(1),occurredAt:e.iso.datetime(),role:e.enum([`incoming`]),referralAddress:e.string().regex(/^0x[0-9a-fA-F]{40}$/),paymentId:e.string().regex(/^0x[0-9a-f]{32}$/).nullable(),token:e.string().regex(/^0x[0-9a-fA-F]{40}$/),amount:e.string().regex(/^\d+$/),reversed:e.boolean(),txHash:e.string().regex(/^0x[0-9a-fA-F]{64}$/),logIndex:e.int().gte(0),usdCents:e.int().gte(0).nullable()}),nn=e.object({kind:e.enum([`nft_charge`]),groupId:e.string().min(1).nullable(),id:e.string().regex(/^[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}$/),occurredAt:e.iso.datetime(),role:e.enum([`outgoing`]),chargeKind:e.enum([`registration`,`mint`,`transfer_gas`]),amountCents:e.int().gt(0),usdCents:e.int(),status:e.enum([`settled`]),collectionAddress:e.string().regex(/^0x[0-9a-fA-F]{40}$/).nullable(),tokenId:e.string().nullable(),counterpartyUserId:e.string().regex(/^[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}$/).nullable(),counterpartyHandle:e.string().nullable(),counterpartyDisplayName:e.string().nullable()}),rn=e.object({kind:e.enum([`solana_stake`]),groupId:e.string().min(1).nullable(),id:e.string().regex(/^[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}$/),chain:e.string().min(1),occurredAt:e.iso.datetime(),role:e.enum([`outgoing`,`incoming`]),amount:e.string().regex(/^\d+$/),token:e.string().regex(/^[1-9A-HJ-NP-Za-km-z]{32,120}$/),potId:e.string().regex(/^0x[0-9a-f]{32}$/).nullable(),usdCents:e.int().gte(0),status:e.enum([`completed`]),txHash:e.string().regex(/^[1-9A-HJ-NP-Za-km-z]{32,120}$/).nullable(),app:e.object({id:e.string().min(1),name:e.string().min(1),logoUrl:e.url().nullable(),slug:e.string().nullable(),bannerUrl:e.url().nullable()}).nullable(),stakerUserId:e.string().regex(/^[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}$/).nullish(),stakerHandle:e.string().nullish(),stakerDisplayName:e.string().nullish(),metadata:g.nullish()}),an=e.object({kind:e.enum([`solana_pot_leg`]),groupId:e.string().min(1).nullable(),id:e.string().regex(/^[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}$/),chain:e.string().min(1),occurredAt:e.iso.datetime(),role:e.enum([`outgoing`,`incoming`]),beneficiary:e.string().regex(/^[1-9A-HJ-NP-Za-km-z]{32,120}$/),potId:e.string().regex(/^0x[0-9a-f]{32}$/).nullable(),amount:e.string().regex(/^\d+$/),token:e.string().regex(/^[1-9A-HJ-NP-Za-km-z]{32,120}$/),usdCents:e.int().gte(0).nullable(),status:e.enum([`settled`]),app:e.object({id:e.string().min(1),name:e.string().min(1),logoUrl:e.url().nullable(),slug:e.string().nullable(),bannerUrl:e.url().nullable()}).nullable(),txHash:e.string().regex(/^[1-9A-HJ-NP-Za-km-z]{32,120}$/).nullable(),recipientUserId:e.string().regex(/^[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}$/).nullish(),recipientHandle:e.string().nullish(),recipientDisplayName:e.string().nullish()}),on=e.discriminatedUnion(`kind`,[Bt.extend({kind:e.literal(`payment`)}),Vt.extend({kind:e.literal(`payment_withdrawal`)}),Ht.extend({kind:e.literal(`matured_withdrawal`)}),Ut.extend({kind:e.literal(`payout_sent`)}),Wt.extend({kind:e.literal(`credit_transferred`)}),Gt.extend({kind:e.literal(`pot_leg`)}),Kt.extend({kind:e.literal(`payment_autoclaim`)}),qt.extend({kind:e.literal(`appeal`)}),Jt.extend({kind:e.literal(`moonpay_buy`)}),Yt.extend({kind:e.literal(`moonpay_sell`)}),Xt.extend({kind:e.literal(`tron_deposit`)}),Qt.extend({kind:e.literal(`tron_pot`)}),$t.extend({kind:e.literal(`tron_cashout`)}),en.extend({kind:e.literal(`tron_transfer`)}),tn.extend({kind:e.literal(`referral_earning`)}),nn.extend({kind:e.literal(`nft_charge`)}),rn.extend({kind:e.literal(`solana_stake`)}),an.extend({kind:e.literal(`solana_pot_leg`)})]),z=e.object({rows:e.array(on),nextBefore:e.iso.datetime().nullable(),nextCursor:e.string().nullable(),hasHidden:e.boolean()}),sn=e.object({chain:e.string().min(1),token:e.string().regex(/^0x[0-9a-fA-F]{40}$/),creditedWei:e.string().regex(/^\d+$/),drainedWei:e.string().regex(/^\d+$/),outstandingWei:e.string().regex(/^\d+$/)}),cn=e.object({rows:e.array(sn)}),ln=e.object({enabled:e.boolean(),direction:e.enum([`buy`,`sell`,`both`]).nullable(),countryCode:e.string().regex(/^[A-Z]{2}$/).nullable(),regionSupported:e.boolean()}),un=e.object({url:e.url(),intentId:e.string().min(1),expiresAt:e.iso.datetime(),walletAddress:e.string().regex(/^0x[0-9a-fA-F]{40}$/)});e.object({intentId:e.string().min(1)});const dn=e.object({url:e.url(),transactionId:e.uuid(),walletAddress:e.string().regex(/^0x[0-9a-fA-F]{40}$/)});e.object({usdcAmount:e.string().regex(/^\d+$/),chain:e.string().min(1).optional()});const fn=e.object({enabled:e.boolean(),balanceCents:e.int().gte(0),frozenCents:e.int().gte(0),currency:e.enum([`tron`]),flagged:e.boolean(),minDepositCents:e.int().gt(0),maxDepositCents:e.int().gt(0)}),pn=e.object({id:e.uuid(),kind:e.enum([`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`]),amountCents:e.int(),currency:e.string().min(1),createdAt:e.iso.datetime()}),mn=e.object({entries:e.array(pn).max(100),nextBefore:e.iso.datetime().nullable()}),hn=e.object({clientSecret:e.string().min(1),publishableKey:e.string().min(1),amountCents:e.int().gt(0),currency:e.string().min(1),depositId:e.uuid()});e.object({amountCents:e.int().gt(0).lte(1e6)});const gn=e.object({status:e.enum([`completed`]),amountCents:e.int().gt(0),balanceCents:e.int().gte(0),recipient:e.object({userId:e.uuid(),handle:e.string().nullable(),displayName:e.string().nullable()})});e.object({recipientUserId:e.uuid(),amountCents:e.int().gt(0).lte(1e6),note:e.string().min(1).max(280).optional(),challengeId:e.uuid().optional(),signature:e.string().max(2e3).regex(/^0x[0-9a-fA-F]+$/).optional(),threadId:e.uuid().optional()});const _n=e.object({requireSignature:e.boolean()}),vn=e.object({required:e.literal(!1)}),yn=e.object({required:e.literal(!0),challengeId:e.uuid(),message:e.string(),expiresAt:e.iso.datetime()}),bn=e.discriminatedUnion(`required`,[vn.extend({required:e.literal(!1)}),yn.extend({required:e.literal(!0)})]);e.object({recipientUserId:e.uuid(),amountCents:e.int().gt(0).lte(1e6)}),e.object({balanceCents:e.int().gte(0),rakeBps:e.int().gte(0).lte(3e3)});const xn=e.object({status:e.enum([`completed`]),potId:e.string().regex(/^0x[0-9a-f]{32}$/),balanceCents:e.int().gte(0)}),Sn=e.object({status:e.enum([`insufficient_balance`]),potId:e.string().regex(/^0x[0-9a-f]{32}$/),balanceCents:e.int().gte(0)}),Cn=e.object({status:e.enum([`redirect`]),intentId:e.string().min(1),redirectUrl:e.url(),amountCents:e.int().gt(0),potId:e.string().regex(/^0x[0-9a-f]{32}$/)});e.discriminatedUnion(`status`,[xn.extend({status:e.literal(`completed`)}),Sn.extend({status:e.literal(`insufficient_balance`)}),Cn.extend({status:e.literal(`redirect`)})]),e.object({potId:e.string().regex(/^0x[0-9a-f]{32}$/),amountCents:e.int().gt(0),returnUri:e.url(),metadata:g.optional()});const wn=e.object({status:e.enum([`completed`]),balanceCents:e.int().gte(0)}),Tn=e.object({status:e.enum([`insufficient_balance`]),balanceCents:e.int().gte(0)}),En=e.object({status:e.enum([`redirect`]),intentId:e.string().min(1),redirectUrl:e.url(),amountCents:e.int().gt(0)});e.discriminatedUnion(`status`,[wn.extend({status:e.literal(`completed`)}),Tn.extend({status:e.literal(`insufficient_balance`)}),En.extend({status:e.literal(`redirect`)})]),e.object({amountCents:e.int().gt(0),returnUri:e.url(),metadata:g.optional()}),e.object({intentId:e.string().min(1),consentId:e.string().min(1),app:e.object({id:e.string().min(1),name:e.string().min(1),logoUrl:e.url().nullable()}),amountCents:e.int().gt(0),kind:e.enum([`pot_stake`,`store_purchase`]),potId:e.string().nullable(),monthlyLimitTronCents:e.int().gte(0).nullable(),monthSpentTronCents:e.int().gte(0),autoApproveEnabled:e.boolean(),balanceCents:e.int().gte(0),returnUriHost:e.string().min(1),status:e.enum([`pending`]),expiresAt:e.iso.datetime(),environment:e.enum([`development`,`production`])});const Dn=e.object({status:e.enum([`redirect`]),redirect:e.url()}),On=e.object({status:e.enum([`insufficient_balance`]),balanceCents:e.int().gte(0)});e.discriminatedUnion(`status`,[Dn.extend({status:e.literal(`redirect`)}),On.extend({status:e.literal(`insufficient_balance`)})]),e.object({status:e.enum([`distributed`,`replayed`]),potId:e.string().regex(/^0x[0-9a-f]{32}$/),potBalanceCents:e.int().gte(0)}),e.object({potId:e.string().regex(/^0x[0-9a-f]{32}$/),legs:e.array(e.object({recipientUserId:e.uuid(),amountCents:e.int().gt(0)})).max(64),rakeBps:e.int().gte(0).lte(1e4).optional(),devCutCents:e.int().gte(0).optional().default(0),closePot:e.boolean().optional().default(!0),metadata:g.optional()});const kn=e.object({url:e.url()}),An=e.object({id:e.uuid(),method:e.enum([`stripe`,`usdc`]),status:e.enum([`pending`,`approved`,`rejected`,`settled`,`failed`]),amountCents:e.int().gt(0),feeCents:e.int().gte(0),currency:e.string().min(1),destinationAddress:e.string().regex(/^0x[0-9a-fA-F]{40}$/).nullable(),chain:e.string().min(1).nullable(),txHash:e.string().min(1).nullable(),rejectionReason:e.string().min(1).nullable(),createdAt:e.iso.datetime(),settledAt:e.iso.datetime().nullable()});e.object({method:e.enum([`stripe`,`usdc`]),amountCents:e.int().gt(0),chain:e.string().min(1).optional()});const jn=e.object({requests:e.array(An).max(100)}),Mn=e.object({id:e.uuid(),method:e.enum([`stripe`,`usdc`]),status:e.enum([`pending`,`approved`,`rejected`,`settled`,`failed`]),amountCents:e.int().gt(0),feeCents:e.int().gte(0),currency:e.string().min(1),destinationAddress:e.string().regex(/^0x[0-9a-fA-F]{40}$/).nullable(),chain:e.string().min(1).nullable(),txHash:e.string().min(1).nullable(),rejectionReason:e.string().min(1).nullable(),createdAt:e.iso.datetime(),settledAt:e.iso.datetime().nullable(),userId:e.uuid(),requestIdHex:e.string().regex(/^0x[0-9a-f]{32}$/).nullable(),usdcAmount:e.string().regex(/^\d+$/).nullable(),backendSignature:e.string().regex(/^0x[0-9a-f]+$/).nullable(),signatureDeadline:e.iso.datetime().nullable(),poolAddress:e.string().regex(/^0x[0-9a-fA-F]{40}$/).nullable()}),Nn=e.object({requests:e.array(Mn).max(100)});e.object({reason:e.string().min(1).max(500)});const Pn=e.array(e.object({id:e.enum([`ethereum-mainnet`,`base-mainnet`,`ethereum-sepolia`,`base-sepolia`,`solana-mainnet`,`solana-devnet`]),displayName:e.string().min(1),family:e.enum([`evm`,`solana`]),nativeSymbol:e.string().min(1),chainId:e.int().gt(0).optional()})),Fn=e.string().min(1).max(24).regex(/^[a-z0-9]+$/).nullable(),In=e.object({id:e.string().min(1),name:e.string().min(1),deletedAt:e.iso.datetime().nullable()}).nullable(),B=e.object({native:e.string().regex(/^\d+(?:\.\d+)?$/),usdc:e.string().regex(/^\d+(?:\.\d+)?$/).optional()}),Ln=e.object({"ethereum-mainnet":B.optional(),"base-mainnet":B.optional(),"ethereum-sepolia":B.optional(),"base-sepolia":B.optional(),"solana-mainnet":B.optional(),"solana-devnet":B.optional()}),Rn=e.enum([`infinite`,`custom`,`scoped`]).nullable(),zn=e.object({native:e.string().regex(/^\d+$/),usdc:e.string().regex(/^\d+$/)}).nullable(),Bn=e.int().gte(0).lte(1e3).nullable(),Vn=e.object({mode:Rn,caps:zn,policyId:e.string().min(1).nullable(),slippageBps:Bn}),Hn=e.object({address:e.union([e.string().regex(/^0x[0-9a-fA-F]{40}$/),e.string().regex(/^[1-9A-HJ-NP-Za-km-z]{32,44}$/)]),family:e.enum([`evm`,`solana`]),label:Fn,kind:e.enum([`personal`,`app`]),app:In,balances:Ln,delegation:Vn}),Un=e.object({chains:Pn,wallets:e.array(Hn)}),Wn=e.object({address:e.string().regex(/^0x[0-9a-fA-F]{40}$/),label:Fn});e.object({label:Fn});const Gn=e.object({policyId:e.string().min(1).nullable()});e.union([e.object({mode:e.enum([`infinite`])}),e.object({mode:e.enum([`custom`]),caps:zn}),e.object({mode:e.enum([`scoped`])})]);const Kn=e.object({ok:e.literal(!0)});e.object({name:l.optional(),displayName:re.optional(),bio:e.string().min(1).max(256).nullish(),websiteUrl:ae.optional(),banner:oe.optional(),presenceStatusMode:se.optional(),environmentViewMode:ce.optional()});const qn=e.object({id:e.string().min(1),title:e.string().max(500),gifUrl:e.url(),previewUrl:e.url(),width:e.int().gt(0),height:e.int().gt(0)}),Jn=e.object({results:e.array(qn)}),Yn=e.object({id:e.string().min(1),name:e.string().min(1),displayName:e.string().nullable(),image:e.url().nullable()}),V=e.object({v:e.literal(1),alg:e.enum([`x25519-ecdh-hkdf-sha256-aes256gcm`]),senderPubKey:e.string().length(43).regex(/^[A-Za-z0-9_-]+$/),senderKeyId:e.string().min(1).max(128),recipientKeyId:e.string().min(1).max(128),iv:e.string().max(64).regex(/^[A-Za-z0-9_-]+$/),ct:e.string().max(16384).regex(/^[A-Za-z0-9_-]+$/)}).nullable(),Xn=e.object({kind:e.enum([`tron_transfer`]),amountCents:e.int().gt(0),recipientUserId:e.string().min(1)}),Zn=e.object({kind:e.enum([`nft_transfer`]),recipientUserId:e.string().min(1),collectionAddress:e.string().min(1),tokenId:e.string().min(1),amount:e.string().min(1),itemName:e.string().nullable(),imageAssetId:e.string().nullish()}),Qn=e.object({id:e.string().min(1),senderUserId:e.string().min(1),body:e.string().max(2e3),envelope:V.optional(),attachment:e.object({url:e.url(),count:e.int().gt(0)}).nullable(),transaction:e.union([Xn,Zn]).nullish(),sentAt:e.iso.datetime()}).nullable(),$n=e.object({kind:e.enum([`direct`]),id:e.string().min(1),otherParticipant:Yn,lastMessage:Qn,unreadCount:e.int().gte(0),pinnedAt:e.iso.datetime().nullable(),createdAt:e.iso.datetime()}),er=e.string().min(1).max(80).regex(/^\S(?:.*\S)?$/),tr=e.string().max(500).nullable(),nr=e.url().max(2048).nullable(),rr=e.enum([`admin`,`member`]),ir=e.object({id:e.string().min(1),name:e.string().min(1),displayName:e.string().nullable(),image:e.url().nullable(),role:rr}),ar=e.object({kind:e.enum([`group`]),id:e.string().min(1),title:er,description:tr,logoUrl:nr,participants:e.array(ir),myRole:rr,lastMessage:Qn,unreadCount:e.int().gte(0),pinnedAt:e.iso.datetime().nullable(),createdAt:e.iso.datetime()}),or=e.discriminatedUnion(`kind`,[$n.extend({kind:e.literal(`direct`)}),ar.extend({kind:e.literal(`group`)})]),sr=e.object({threads:e.array(or)});e.object({thread:or,created:e.boolean()});const cr=e.object({kind:e.enum([`direct`]).optional().default(`direct`),recipientUserId:e.string().min(1)}),lr=e.object({kind:e.enum([`group`]),title:er,description:tr.optional(),invitedUserIds:e.array(e.string().min(1)).min(1).max(100)}),H=e.object({ok:e.literal(!0)}),U=e.object({thread:ar});e.object({title:er.optional(),description:tr.optional()});const ur=e.object({id:e.string().min(1),senderUserId:e.string().min(1),body:e.string().max(2e3).nullable(),envelope:V.optional()}).nullable(),dr=e.enum([`👍`,`👎`,`❤️`,`😂`,`😮`,`😢`,`🔥`,`🎉`,`🙏`,`👀`,`✅`,`🎮`]),fr=e.object({emoji:dr,count:e.int().gt(0),userIds:e.array(e.string().min(1))}),pr=e.enum([`image`]),mr=e.object({id:e.string().min(1),kind:pr,url:e.url(),contentType:e.string().min(1),fileName:e.string().min(1),byteSize:e.int().gte(0),width:e.int().gt(0).nullable(),height:e.int().gt(0).nullable()}),hr=e.object({url:e.url(),title:e.string().max(500).nullable(),description:e.string().max(1e3).nullable(),imageUrl:e.url().nullable(),siteName:e.string().max(200).nullable()}),gr=e.object({id:e.string().min(1),threadId:e.string().min(1),senderUserId:e.string().min(1),transaction:e.union([Xn,Zn]).nullish(),body:e.string().max(2e3),envelope:V.optional(),sentAt:e.iso.datetime(),editedAt:e.iso.datetime().nullable(),deletedAt:e.iso.datetime().nullable(),replyTo:ur,reactions:e.array(fr),attachments:e.array(mr),linkPreviews:e.array(hr)}),_r=e.object({messages:e.array(gr),nextBefore:e.iso.datetime().nullable()}),vr=e.string().max(2e3);e.object({body:vr.optional(),envelope:V.optional(),replyToMessageId:e.string().min(1).optional(),attachmentIds:e.array(e.string().min(1)).max(3).optional()});const yr=e.string().min(1).max(2e3);e.object({body:yr.optional(),envelope:V.optional()});const br=e.object({aggregate:fr.nullable()}),W=e.object({attachment:mr});e.object({userIds:e.array(e.string().min(1)).min(1).max(100)});const xr=e.object({pinnedAt:e.iso.datetime()}),Sr=e.enum([`x25519`]),Cr=e.object({userId:e.string().min(1),keyId:e.string().min(1).max(128),publicKey:e.string().length(43).regex(/^[A-Za-z0-9_-]+$/),algorithm:Sr}),wr=e.object({key:Cr});e.object({publicKey:e.string().length(43).regex(/^[A-Za-z0-9_-]+$/),keyId:e.string().min(1).max(128),algorithm:Sr});const Tr=e.object({threadId:e.string().min(1),key:Cr.nullable()}),Er=e.object({keys:e.array(Tr)});e.object({threadIds:e.array(e.string().min(1)).min(1).max(200)});const Dr=e.object({exists:e.boolean(),attemptsRemaining:e.int().gte(0),kdfSalt:e.string().length(22).regex(/^[A-Za-z0-9_-]+$/).nullable(),kdfIterations:e.int().gte(1e5).lte(5e6).nullable()}),Or=e.object({ok:e.literal(!0)});e.object({scalar:e.string().length(43).regex(/^[A-Za-z0-9_-]+$/),secret:e.string().length(43).regex(/^[A-Za-z0-9_-]+$/),pinKey:e.string().length(43).regex(/^[A-Za-z0-9_-]+$/),kdfSalt:e.string().length(22).regex(/^[A-Za-z0-9_-]+$/),kdfIterations:e.int().gte(1e5).lte(5e6)});const kr=e.union([e.object({result:e.enum([`ok`]),scalar:e.string().length(43).regex(/^[A-Za-z0-9_-]+$/)}),e.object({result:e.enum([`wrong-pin`]),attemptsRemaining:e.int().gte(0)})]);e.object({pinKey:e.string().length(43).regex(/^[A-Za-z0-9_-]+$/)}),e.object({role:rr});const Ar=e.object({name:e.string().nullable(),handle:e.string().nullable()}).nullable(),jr=e.object({chain:e.string().min(1),token:e.string().regex(/^0x[0-9a-fA-F]{40}$/),amount:e.string().regex(/^\d+$/),usdCents:e.int().nullable()}),Mr=e.object({code:e.string().nullable(),xLinked:e.boolean(),referrer:Ar,refereeCount:e.int().gte(0),lifetimeEarnings:e.array(jr),lifetimeUsdCents:e.int().nullable(),last30dEarnings:e.array(jr),last30dUsdCents:e.int().nullable()}),Nr=e.object({code:e.string().min(1),generatedAt:e.iso.datetime()}),Pr=e.object({status:e.enum([`eligible`,`already-referred`,`self-referral`,`unknown-code`,`revoked-code`,`window-expired`]),referrer:Ar}),Fr=e.object({status:e.enum([`bound`,`already-referred`,`self-referral`,`unknown-code`,`revoked-code`,`window-expired`]),referrer:Ar});e.object({code:e.string().min(1).max(64),source:e.enum([`signup-url`,`manual-claim`,`cookie-restore`]).optional().default(`manual-claim`)});const G=e.string().regex(/^[a-f0-9]{64}$/);e.object({playSessionId:G,expiresAt:e.iso.datetime()});const K=e.uuid();e.object({appId:K});const Ir=e.object({ok:e.literal(!0),ttlSeconds:e.int().gt(0)});e.object({playSessionId:G,status:e.enum([`pending`,`active`,`ended`])});const Lr=e.uuid();e.object({playSessionId:G,userId:Lr}),e.object({status:e.enum([`pending`,`active`,`ended`])}),e.object({playSessionId:G}),e.object({status:e.enum([`ended`])}),e.object({playSessionId:G});const Rr=e.object({appId:K,name:e.string(),logoUrl:e.string().nullable(),sessionCount:e.int().gte(0),totalDurationSeconds:e.int().gte(0)}),zr=e.object({apps:e.array(Rr),totalSessionCount:e.int().gte(0),totalDurationSeconds:e.int().gte(0)}),Br=e.object({date:e.string().regex(/^\d{4}-\d{2}-\d{2}$/),appId:K,sessionCount:e.int().gte(0),totalDurationSeconds:e.int().gte(0)}),Vr=e.object({from:e.string().regex(/^\d{4}-\d{2}-\d{2}$/),to:e.string().regex(/^\d{4}-\d{2}-\d{2}$/),buckets:e.array(Br)});e.object({appId:K,sessionCount:e.int().gte(0),uniquePlayerCount:e.int().gte(0),totalDurationSeconds:e.int().gte(0)});const Hr=e.object({followers:e.int().gte(0),following:e.int().gte(0),gamesPlayed:e.int().gte(0),totalPlaytimeSeconds:e.int().gte(0),reviewsLeft:e.int().gte(0),rewardsWon:e.int().gte(0),rewardsValueUsdCents:e.int().gte(0)}),Ur=e.object({date:e.string().regex(/^\d{4}-\d{2}-\d{2}$/),rewardsWon:e.int().gte(0),valueUsdCents:e.int().gte(0)}),Wr=e.object({from:e.string().regex(/^\d{4}-\d{2}-\d{2}$/),to:e.string().regex(/^\d{4}-\d{2}-\d{2}$/),totalRewardsWon:e.int().gte(0),totalValueUsdCents:e.int().gte(0),buckets:e.array(Ur)}),Gr=e.object({collectionId:e.string(),collectionAddress:e.string(),chain:e.string(),kind:e.enum([`erc721`,`erc1155`]),tokenId:e.string(),amount:e.string(),name:e.string().nullable(),description:e.string().nullable(),imageAssetId:e.string().nullable(),bannerAssetId:e.string().nullable(),devMetadata:e.record(e.string(),e.unknown()),appId:e.string().nullable(),appName:e.string().nullable(),appLogoUrl:e.string().nullable()}),Kr=e.object({items:e.array(Gr)}),qr=e.object({id:e.string(),appId:e.string(),itemId:e.string(),amount:e.string(),priceCents:e.int().gte(0).nullable(),gasSponsored:e.boolean(),environment:e.enum([`development`,`production`]),createdAt:e.iso.datetime(),tokenId:e.string(),name:e.string().nullable(),description:e.string().nullable(),imageAssetId:e.string().nullable(),chain:e.string(),collectionAddress:e.string(),kind:e.enum([`erc721`,`erc1155`])}),Jr=e.object({permits:e.array(qr)}),Yr=e.object({mintRequestId:e.string(),txHash:e.string(),status:e.enum([`submitted`,`completed`]),mintedTokenId:e.string().nullable()}),Xr=e.object({mint:Yr,charge:e.object({currency:e.enum([`tron`]),gasCents:e.int().gte(0),priceCents:e.int().gte(0),totalCents:e.int().gte(0),gasPaidBy:e.enum([`user`,`developer`])})});e.object({name:e.string(),description:e.string().optional(),image:e.string().optional(),banner_image:e.string().optional(),external_link:e.string().optional()});const Zr=e.object({trait_type:e.string(),value:e.union([e.string(),e.number(),e.boolean()])});e.object({name:e.string(),description:e.string().optional(),image:e.string().optional(),attributes:e.array(Zr),extra:e.record(e.string(),e.record(e.string(),e.unknown()))}),e.object({collectionAddress:e.string().regex(/^0x[0-9a-fA-F]{40}$/),chain:e.string().min(1),toWallet:e.string().regex(/^0x[0-9a-fA-F]{40}$/).optional(),toUserId:e.string().optional(),tokenId:e.string().regex(/^\d+$/).optional(),amount:e.string().regex(/^\d+$/).optional()});const Qr=e.object({id:e.string(),chain:e.string(),collectionAddress:e.string(),kind:e.enum([`erc721`,`erc1155`]),name:e.string().nullable(),environment:e.enum([`development`,`production`])}),$r=e.object({collections:e.array(Qr)}),ei=e.object({itemCount:e.int().gt(0),baselineUsdCents:e.int().gte(0),gasUsdCents:e.int().gte(0),tron:e.object({baselineCents:e.int().gte(0),gasCents:e.int().gte(0),totalCents:e.int().gte(0)}),eth:e.object({baselineWei:e.string().regex(/^\d+$/),gasWei:e.string().regex(/^\d+$/),totalWei:e.string().regex(/^\d+$/)})}),ti=e.enum([`capped`,`flexible`,`unlimited`]),ni=e.object({name:e.string().min(1).max(120).nullish(),description:e.string().max(2e3).nullish(),devMetadata:e.record(e.string(),e.unknown()).optional(),supplyType:ti.optional(),maxSupply:e.string().regex(/^\d+$/).nullish(),active:e.boolean().optional()});e.object({collectionAddress:e.string().regex(/^0x[0-9a-fA-F]{40}$/),chain:e.string().min(1),items:e.array(ni).min(1).max(50)});const q=e.object({id:e.string(),collectionId:e.string(),collectionAddress:e.string(),chain:e.string(),kind:e.enum([`erc721`,`erc1155`]),tokenId:e.string(),name:e.string().nullable(),description:e.string().nullable(),imageAssetId:e.string().nullable(),bannerAssetId:e.string().nullable(),devMetadata:e.record(e.string(),e.unknown()),supplyType:ti.nullable(),maxSupply:e.string().nullable(),active:e.boolean()}),ri=e.object({items:e.array(q),charge:e.object({currency:e.enum([`tron`]),amountCents:e.int().gte(0),baselineCents:e.int().gte(0),gasCents:e.int().gte(0),addItemTxHash:e.string()})}),ii=e.object({items:e.array(q)}),ai=e.object({id:e.string(),appId:e.string(),itemId:e.string(),userId:e.string(),amount:e.string(),priceCents:e.int().gte(0).nullable(),gasSponsored:e.boolean(),status:e.enum([`pending`,`redeemed`,`revoked`]),createdAt:e.iso.datetime()});e.object({toUserId:e.string().min(1),amount:e.string().regex(/^\d+$/).optional(),priceCents:e.int().gte(0).nullish(),gasSponsored:e.boolean().optional()});const oi=e.object({holderCount:e.int().gte(0),walletCount:e.int().gte(0),totalHeld:e.string().regex(/^\d+$/)}),si=e.object({walletAddress:e.string(),userId:e.string().nullable(),amount:e.string().regex(/^\d+$/)}),ci=e.object({stats:oi,holders:e.array(si)}),li=e.object({id:e.string(),appId:e.string(),itemId:e.string(),userId:e.string(),direction:e.enum([`vault_in`,`withdraw`]),lockKind:e.enum([`vault`,`burn`]).nullable(),amount:e.string(),gasSponsored:e.boolean(),status:e.enum([`pending`,`redeemed`,`revoked`]),custodyId:e.string().nullable(),createdAt:e.iso.datetime()});e.object({toUserId:e.string().min(1),lockKind:e.enum([`vault`,`burn`]),amount:e.string().regex(/^\d+$/).optional(),gasSponsored:e.boolean().optional()}),e.object({custodyId:e.string().min(1)});const ui=e.object({id:e.string(),appId:e.string(),itemId:e.string(),direction:e.enum([`vault_in`,`withdraw`]),lockKind:e.enum([`vault`,`burn`]).nullable(),amount:e.string(),gasSponsored:e.boolean(),environment:e.enum([`development`,`production`]),custodyId:e.string().nullable(),createdAt:e.iso.datetime(),tokenId:e.string(),name:e.string().nullable(),description:e.string().nullable(),imageAssetId:e.string().nullable(),chain:e.string(),collectionAddress:e.string(),kind:e.enum([`erc721`,`erc1155`])}),di=e.object({permits:e.array(ui)}),fi=e.object({permitId:e.string(),direction:e.enum([`vault_in`,`withdraw`]),vault:e.string(),collection:e.string(),user:e.string(),tokenId:e.string().regex(/^\d+$/),amount:e.string().regex(/^\d+$/),lockKind:e.enum([`vault`,`burn`]).nullable(),destination:e.string().nullable(),deadline:e.int().gt(0),signature:e.string()}),pi=e.object({direction:e.enum([`vault_in`,`withdraw`]),collection:e.string(),vault:e.string(),chainId:e.int().gt(0),user:e.string(),tokenId:e.string().regex(/^\d+$/),amount:e.string().regex(/^\d+$/),nonce:e.string().regex(/^\d+$/).nullable(),deadline:e.int().gt(0),feeCents:e.int().gte(0),gasWei:e.string().regex(/^\d+$/),gasPaidBy:e.enum([`developer`,`user`]),requiresUserSignature:e.boolean()}),mi=e.object({ok:e.boolean(),txHash:e.string(),chargedCents:e.int().gte(0),gasPaidBy:e.enum([`developer`,`user`])});e.object({userSignature:e.string().min(1).optional(),deadline:e.int().gt(0).optional()});const hi=e.object({collection:e.string(),chainId:e.int().gt(0),from:e.string(),to:e.string(),tokenId:e.string().regex(/^\d+$/),amount:e.string().regex(/^\d+$/),nonce:e.string().regex(/^\d+$/),deadline:e.int().gt(0),feeCents:e.int().gte(0),gasWei:e.string().regex(/^\d+$/),selfPayAvailable:e.boolean()});e.object({toUserId:e.string().min(1),collection:e.string().min(1),tokenId:e.string().regex(/^\d+$/),amount:e.string().regex(/^\d+$/).optional()});const gi=e.object({ok:e.boolean(),txHash:e.string(),chargedCents:e.int().gte(0)});e.object({toUserId:e.string().min(1),collection:e.string().min(1),tokenId:e.string().regex(/^\d+$/),amount:e.string().regex(/^\d+$/).optional(),deadline:e.int().gt(0),userSignature:e.string().min(1),threadId:e.string().min(1).optional()});const _i=e.object({id:e.string(),collectionId:e.string(),collectionAddress:e.string(),chain:e.string(),kind:e.enum([`erc721`,`erc1155`]),tokenId:e.string(),amount:e.string(),lockKind:e.enum([`vault`,`burn`]),vaultAddress:e.string(),createdAt:e.iso.datetime(),name:e.string().nullable(),description:e.string().nullable(),imageAssetId:e.string().nullable()}),vi=e.object({custody:e.array(_i)}),yi=e.object({ok:e.boolean(),txHash:e.string()}),bi=e.object({requesterId:e.string().min(1),requesterName:e.string().min(1),requesterDisplayName:e.string().nullable(),requesterImage:e.url().nullable(),friendshipId:e.string().min(1)}),xi=e.object({accepterId:e.string().min(1),accepterName:e.string().min(1),accepterDisplayName:e.string().nullable(),accepterImage:e.url().nullable(),friendshipId:e.string().min(1)}),Si=e.object({appId:e.uuid(),appName:e.string().min(1),scope:e.enum([`publish`,`changes`,`bip_publish`])}),Ci=e.object({appId:e.uuid(),appName:e.string().min(1),scope:e.enum([`publish`,`changes`,`bip_publish`]),notes:e.string().min(1).max(1e3)}),wi=e.object({appId:e.uuid(),appName:e.string().min(1),appSlug:e.string().nullable(),updateId:e.uuid()}),Ti=e.object({appId:e.uuid(),appName:e.string().min(1),appSlug:e.string().nullable()}),Ei=e.object({appId:e.uuid(),appName:e.string().min(1),appLogoUrl:e.url().nullable(),inviterId:e.string().min(1),inviterName:e.string().min(1),inviterDisplayName:e.string().nullable()}),Di=e.object({appId:e.uuid(),appName:e.string().min(1),accepterId:e.string().min(1),accepterName:e.string().min(1),accepterDisplayName:e.string().nullable(),accepterImage:e.url().nullable()}),Oi=e.union([e.object({id:e.string().min(1),kind:e.enum([`friend_request`]),payload:bi,read:e.boolean(),createdAt:e.iso.datetime()}),e.object({id:e.string().min(1),kind:e.enum([`friend_accepted`]),payload:xi,read:e.boolean(),createdAt:e.iso.datetime()}),e.object({id:e.string().min(1),kind:e.enum([`app_page_approved`]),payload:Si,read:e.boolean(),createdAt:e.iso.datetime()}),e.object({id:e.string().min(1),kind:e.enum([`app_page_rejected`]),payload:Ci,read:e.boolean(),createdAt:e.iso.datetime()}),e.object({id:e.string().min(1),kind:e.enum([`bip_update_published`]),payload:wi,read:e.boolean(),createdAt:e.iso.datetime()}),e.object({id:e.string().min(1),kind:e.enum([`bip_now_playable`]),payload:Ti,read:e.boolean(),createdAt:e.iso.datetime()}),e.object({id:e.string().min(1),kind:e.enum([`app_participant_invite`]),payload:Ei,read:e.boolean(),createdAt:e.iso.datetime()}),e.object({id:e.string().min(1),kind:e.enum([`app_participant_accepted`]),payload:Di,read:e.boolean(),createdAt:e.iso.datetime()})]),ki=e.object({notifications:e.array(Oi),unreadCount:e.int().gte(0)});e.object({ok:e.literal(!0)}),e.object({read:e.boolean()});const Ai=e.enum([`online`,`offline`]),ji=e.object({user:Yn,friendshipId:e.string().min(1),acceptedAt:e.iso.datetime(),onlineStatus:Ai}),Mi=e.object({friends:e.array(ji)}),Ni=e.object({friends:e.array(Yn)});e.object({decision:e.enum([`accept`,`reject`])});const Pi=e.object({provider:e.enum([`twitter`,`discord`,`github`]),subject:e.string().min(1),username:e.string().nullable(),name:e.string().nullable(),profilePictureUrl:e.url().nullable(),verifiedAt:e.iso.datetime().nullable()}),Fi=e.object({accounts:e.array(Pi)}),Ii=e.string().nullable(),Li=e.url().max(2048).nullable(),Ri=e.object({studioName:e.string().min(1).max(80).nullable(),studioUrl:e.url().max(2048).nullable(),studioXHandle:Ii,githubUrl:Li,logoUrl:e.url().max(2048).nullable()}),zi=e.object({id:e.string().min(1),name:e.string().min(1),logoUrl:e.url().max(2048).nullable(),environment:e.enum([`development`,`production`])}),Bi=e.object({profile:Ri,apps:e.array(zi)}).nullable(),Vi=e.object({followers:e.int().gte(0),following:e.int().gte(0)}),Hi=e.object({gamesPlayed:e.int().gte(0),totalPlaytimeSeconds:e.int().gte(0),reviewsLeft:e.int().gte(0),rewardsWon:e.int().gte(0),rewardsValueUsdCents:e.int().gte(0)}),Ui=e.object({appId:e.string().min(1),name:e.string().min(1),logoUrl:e.url().max(2048).nullable(),sessionCount:e.int().gte(0),totalPlaytimeSeconds:e.int().gte(0)}),Wi=e.object({appId:e.string().min(1),appName:e.string().min(1),appLogoUrl:e.url().max(2048).nullable(),recommended:e.boolean(),body:e.string(),createdAt:e.iso.datetime()}),Gi=e.object({isFollowing:e.boolean(),isFollowedBy:e.boolean(),friendship:e.enum([`none`,`pending_out`,`pending_in`,`accepted`]),friendshipId:e.string().min(1).nullable()}).nullable(),Ki=e.object({id:e.string().min(1),name:e.string().min(1),displayName:e.string().nullable(),bio:e.string().nullable(),websiteUrl:e.url().max(2048).nullable(),image:e.url().nullable(),banner:oe,createdAt:e.iso.datetime(),socials:e.array(Pi),developer:Bi,counts:Vi,stats:Hi,topGames:e.array(Ui),recentReviews:e.array(Wi),relationship:Gi}),qi=e.object({id:e.string().min(1),name:e.string().min(1),displayName:e.string().nullable(),image:e.url().nullable(),socials:e.array(Pi)}),Ji=e.object({results:e.array(qi)});e.object({ok:e.literal(!0),friendshipId:e.string().min(1)});const Yi=e.object({id:e.string().min(1),keyPrefix:e.string().min(1),scopes:e.array(e.enum([`developer:read`,`developer:apps`,`developer:pages`])),createdAt:e.iso.datetime(),expiresAt:e.iso.datetime().nullable(),lastUsedAt:e.iso.datetime().nullable(),revokedAt:e.iso.datetime().nullable()}),Xi=e.object({key:Yi,secret:e.string().min(1)});e.object({scopes:e.array(e.enum([`developer:read`,`developer:apps`,`developer:pages`])).min(1),expiresAt:e.iso.datetime().nullish()});const Zi=e.object({keys:e.array(Yi)}),J=e.object({ok:e.literal(!0)}),Qi=e.object({id:e.string().min(1)}),$i=e.string().regex(/^[A-Za-z0-9 ._-]{1,40}$/),ea=e.object({chain:e.string().min(1),custody:e.enum([`server`])});e.object({name:$i,chains:e.array(ea).optional()});const ta=e.string().min(1).max(2048),na=e.enum([`eth`,`tron`]),ra=e.array(na).min(1).max(2),ia=e.array(Ae).min(1).max(3).nullable();e.object({name:$i.optional(),slug:_.nullish(),logoUrl:e.url().max(2048).nullish(),testAccess:e.enum([`private`,`public`]).optional(),redirectUris:e.array(e.url().max(2048)).max(20).optional(),embedOrigins:e.array(ta).max(20).optional(),acceptedCurrencies:ra.optional(),acceptedNetworks:ia.optional(),paymentStatusWebhookUrl:e.url().max(2048).nullish(),paymentStatusWebhookUrlTest:e.url().max(2048).nullish()});const Y=e.object({logoUrl:e.url().nullable()}),aa=e.object({chain:e.string().min(1),token:e.string().min(1),tokenDecimals:e.int(),lockedWei:e.string(),unlockedWei:e.string(),walletBalanceWei:e.string().nullable()}),oa=e.object({appId:e.string().min(1),balances:e.array(aa)}),sa=e.object({appId:e.string().min(1),availableCents:e.int().gte(0),lockedCents:e.int().gte(0),totalCents:e.int().gte(0)}),ca=e.object({ts:e.iso.datetime(),sumCents:e.number(),paymentCount:e.int()}),la=e.object({appId:e.string().min(1),range:e.string().min(1),bucketSecs:e.int(),windowSecs:e.int(),chain:e.string().nullable(),buckets:e.array(ca)}),ua=e.object({ts:e.iso.datetime(),sessionCount:e.int(),uniquePlayerCount:e.int(),totalDurationSeconds:e.int()}),da=e.object({appId:e.string().min(1),range:e.string().min(1),bucketSecs:e.int(),windowSecs:e.int(),buckets:e.array(ua)}),fa=e.object({appId:e.string().min(1),earnedCents:e.int(),earningEventCount:e.int(),distinctPayers:e.int(),sessionCount:e.int(),uniquePlayerCount:e.int(),totalPlaytimeSeconds:e.int()}),pa=e.object({chain:e.string().min(1),address:e.union([e.string().regex(/^0x[0-9a-fA-F]{40}$/),e.string().regex(/^[1-9A-HJ-NP-Za-km-z]{32,44}$/)]),custody:e.enum([`server`]).nullable(),walletId:e.string().nullable(),autoSweepEnabled:e.boolean(),sweepThresholdCents:e.int().nullable()}),ma=e.object({appId:e.string().min(1),wallets:e.array(pa)}),ha=e.object({appId:e.string().min(1),chain:e.string().min(1),autoSweepEnabled:e.boolean(),sweepThresholdCents:e.int().nullable()});e.object({enabled:e.boolean(),thresholdCents:e.int().gt(0).nullish()});const ga=e.object({appId:e.string().min(1),chain:e.string().min(1),custody:e.enum([`server`]),walletId:e.string().min(1),address:e.union([e.string().regex(/^0x[0-9a-fA-F]{40}$/),e.string().regex(/^[1-9A-HJ-NP-Za-km-z]{32,44}$/)])}),_a=e.object({appId:e.string().min(1),chain:e.string().min(1),token:e.string().min(1),txHash:e.string().min(1),amountWei:e.string().min(1),recipient:e.string().regex(/^0x[0-9a-fA-F]{40}$/)}),va=e.object({appId:e.string().min(1),chain:e.string().min(1),recipient:e.string().regex(/^0x[0-9a-fA-F]{40}$/),transfers:e.array(e.object({token:e.string().min(1),txHash:e.string().min(1),amountWei:e.string().min(1)}))}),ya=e.object({id:e.string().min(1),clientId:e.string().min(1),environment:e.enum([`development`,`production`]),secretLast4:e.string().min(1),createdAt:e.iso.datetime(),lastUsedAt:e.iso.datetime().nullable()}),ba=e.object({key:ya,clientSecret:e.string().min(1)}),xa=e.object({ok:e.literal(!0),status:e.enum([`pending`,`approved`])});e.object({reason:e.string().min(1).max(500).optional()});const Sa=e.object({secret:e.string().regex(/^[a-f0-9]{64}$/),secretLast4:e.string().length(4)}),Ca=e.object({appealId:e.string().regex(/^0x[0-9a-f]{32}$/),paymentId:e.string().regex(/^0x[0-9a-f]{32}$/),chain:e.string().min(1),vault:e.string().regex(/^0x[0-9a-fA-F]{40}$/),appellant:e.string().regex(/^0x[0-9a-fA-F]{40}$/),amount:e.string().regex(/^\d+$/),token:e.string().regex(/^0x[0-9a-fA-F]{40}$/),status:e.enum([`open`,`resolved_refund`,`resolved_dismiss`,`cancelled`,`force_cancelled`]),reason:e.string().nullable(),filedAt:e.iso.datetime(),resolvedAt:e.iso.datetime().nullable()}),wa=e.object({appeals:e.array(Ca)}),Ta=e.object({paymentId:e.string().regex(/^0x[0-9a-f]{32}$/),chain:e.string().min(1),vault:e.string().regex(/^0x[0-9a-fA-F]{40}$/),beneficiary:e.string().regex(/^0x[0-9a-fA-F]{40}$/),token:e.string().regex(/^0x[0-9a-fA-F]{40}$/),grossAmount:e.string().regex(/^\d+$/),creditedAmount:e.string().regex(/^\d+$/),vaultReleaseAt:e.iso.datetime(),signedAt:e.iso.datetime(),matured:e.boolean(),hasActiveAppeal:e.boolean()}),Ea=e.object({deposits:e.array(Ta)}),Da=e.object({appCount:e.int().gte(0),availableCents:e.int().gte(0),lockedCents:e.int().gte(0),totalCents:e.int().gte(0)}),Oa=e.object({userId:e.string().min(1),status:e.enum([`invited`,`accepted`,`revoked`]),name:e.string().nullable(),email:e.string().nullable(),image:e.url().nullable(),invitedAt:e.iso.datetime(),respondedAt:e.iso.datetime().nullable()}),ka=e.object({participants:e.array(Oa)});e.object({identifier:e.string().min(1).max(80)});const Aa=e.object({appId:e.string().min(1),appName:e.string().min(1),appLogoUrl:e.url().nullable(),status:e.enum([`invited`,`accepted`,`revoked`]),invitedAt:e.iso.datetime()}),ja=e.object({invites:e.array(Aa)}),Ma=e.object({id:e.string().min(1),displayName:e.string().nullable(),email:e.string().nullable()}).nullable(),Na=e.string().min(1).max(80).nullable(),Pa=e.string().min(10).max(1e3).nullable(),Fa=e.object({policyVersion:e.string().min(1),policyAcceptedAt:e.iso.datetime(),logoUrl:e.url().max(2048).nullable(),email:e.email().nullable(),xHandle:Ii,teamName:Na,projectDescription:Pa}),Ia=e.object({reason:e.string().min(1).max(500).optional()}),La=e.object({id:e.string().min(1),userId:e.string().min(1),user:Ma,kind:e.enum([`role`,`production`]),status:e.enum([`pending`,`approved`,`rejected`,`cancelled`]),appId:e.string().min(1).nullable(),payload:e.union([e.object({kind:e.enum([`role`]),data:Fa}),e.object({kind:e.enum([`production`]),data:Ia})]),reviewedBy:e.string().min(1).nullable(),reviewedAt:e.iso.datetime().nullable(),reviewNotes:e.string().nullable(),createdAt:e.iso.datetime(),updatedAt:e.iso.datetime()}).nullable(),Ra=e.object({chain:e.string().min(1),address:e.string().regex(/^0x[0-9a-fA-F]{40}$/)}),za=e.object({id:e.string().min(1),name:$i,slug:_.nullable(),logoUrl:e.url().max(2048).nullable(),environment:e.enum([`development`,`production`]),productionApprovedAt:e.iso.datetime().nullable(),testAccess:e.enum([`private`,`public`]),createdAt:e.iso.datetime(),redirectUris:e.array(e.url().max(2048)),embedOrigins:e.array(ta),acceptedCurrencies:ra,acceptedNetworks:ia,payoutAddresses:e.array(Ra),keys:e.array(ya),pendingProductionRequestId:e.string().min(1).nullable(),paymentStatusWebhookUrl:e.url().max(2048).nullable(),paymentStatusWebhookSecretLast4:e.string().length(4).nullable(),paymentStatusWebhookUrlTest:e.url().max(2048).nullable(),paymentStatusWebhookSecretLast4Test:e.string().length(4).nullable()}),Ba=e.object({roleStatus:e.enum([`none`,`pending`,`approved`,`rejected`,`cancelled`]),latestRequest:La,profile:Ri.nullable(),apps:e.array(za)});e.object({studioName:e.string().min(1).max(80).nullish(),studioUrl:e.url().max(2048).nullish(),studioXHandle:Ii.optional(),githubUrl:Li.optional(),logoUrl:e.url().max(2048).nullish()}),e.object({acceptPolicy:e.literal(!0),logoUrl:e.url().max(2048).optional(),email:e.email().optional(),teamName:Na.optional(),projectDescription:Pa.optional()});const Va=e.object({enabled:e.boolean(),status:e.enum([`draft`,`pending_review`,`published`,`hidden`]),firstPublishedAt:e.iso.datetime().nullable(),reviewedAt:e.iso.datetime().nullable(),reviewNotes:e.string().nullable(),hiddenAt:e.iso.datetime().nullable(),hiddenReasonPublic:e.string().nullable()}),X=e.object({appId:e.uuid(),slug:_.nullable(),status:e.enum([`draft`,`pending_review`,`published`,`hidden`]),categories:v,tagline:y.nullable(),bannerUrl:e.url().max(2048).nullable(),thumbnailUrl:e.url().max(2048).nullable(),thumbnailVideoUrl:e.url().max(2048).nullable(),playUrl:e.url().max(2048).nullable(),discordUrl:e.url().max(2048).nullable(),twitterUrl:e.url().max(2048).nullable(),redditUrl:e.url().max(2048).nullable(),telegramUrl:e.url().max(2048).nullable(),gallery:b,chapters:x,links:S,platforms:C,gameType:w,ageRating:T,languages:E,releaseStatus:D,firstPublishedAt:e.iso.datetime().nullable(),reviewedAt:e.iso.datetime().nullable(),reviewNotes:e.string().nullable(),hiddenAt:e.iso.datetime().nullable(),hiddenReasonPublic:e.string().nullable(),pendingReview:e.boolean(),bip:Va});e.object({categories:v.optional(),tagline:y.nullish(),bannerUrl:e.url().max(2048).nullish(),thumbnailUrl:e.url().max(2048).nullish(),thumbnailVideoUrl:e.url().max(2048).nullish(),playUrl:e.url().max(2048).nullish(),discordUrl:e.url().max(2048).nullish(),twitterUrl:e.url().max(2048).nullish(),redditUrl:e.url().max(2048).nullish(),telegramUrl:e.url().max(2048).nullish(),gallery:b.optional(),chapters:x.optional(),links:S.optional(),platforms:C.optional(),gameType:w.optional(),ageRating:T.optional(),languages:E.optional(),releaseStatus:D.optional()});const Ha=e.object({url:e.url().max(2048)});e.object({enabled:e.boolean()});const Ua=e.object({playSessionId:e.string().min(1),userId:e.uuid(),appId:e.uuid(),status:e.enum([`pending`,`active`]),userHalfFresh:e.boolean(),gameHalfFresh:e.boolean(),active:e.boolean(),startedAt:e.iso.datetime(),activatedAt:e.iso.datetime().nullable(),lastSeenAt:e.iso.datetime().nullable()}),Wa=e.object({players:e.array(Ua),total:e.int().gte(0),liveCount:e.int().gte(0),generatedAt:e.iso.datetime()}),Ga=e.object({id:e.string().min(1),email:e.email().nullable(),role:u,addedBy:e.string().min(1).nullable(),addedAt:e.iso.datetime(),lastAccessedAt:e.iso.datetime().nullable()}),Ka=e.object({admins:e.array(Ga)}),qa=e.object({id:e.string()});e.object({email:e.email(),role:u.optional()});const Ja=e.object({id:e.string(),role:u});e.object({role:u});const Ya=e.object({id:e.string().min(1),name:e.string().min(1),displayName:e.string().nullable(),email:e.email().nullable(),createdAt:e.iso.datetime(),bannedAt:e.iso.datetime().nullable(),deletedAt:e.iso.datetime().nullable()}),Xa=e.object({users:e.array(Ya),total:e.int().gte(0),offset:e.int().gte(0),limit:e.int().gt(0)}),Za=e.object({id:e.string(),banned:e.boolean()});e.object({banned:e.boolean(),reason:e.string().min(1).max(280).optional()});const Qa=e.object({id:e.string().min(1),actorId:e.string().min(1).nullable(),actorKind:e.enum([`user`,`system`,`service`]),action:e.string().min(1),targetType:e.string().min(1),targetId:e.string().min(1),purpose:e.string().min(1),legalBasis:e.enum([`consent`,`contract`,`legitimate-interest`,`legal-obligation`,`vital-interest`,`public-task`]),occurredAt:e.iso.datetime(),attributes:e.record(e.string(),e.unknown()),traceId:e.string().min(1).nullable()}),$a=e.object({rows:e.array(Qa),total:e.int().gte(0),offset:e.int().gte(0),limit:e.int().gt(0)}),eo=e.object({requests:e.array(La)}),to=e.object({id:e.string().min(1),status:e.enum([`pending`,`approved`,`rejected`,`cancelled`])});e.object({decision:e.enum([`approve`,`reject`]),notes:e.string().min(1).max(1e3).optional()});const no=e.object({id:e.string().min(1),name:e.string(),environment:e.enum([`development`,`production`]),logoUrl:e.url().nullable(),productionApprovedAt:e.iso.datetime().nullable(),createdAt:e.iso.datetime()}),ro=e.object({userId:e.string().min(1),email:e.email(),displayName:e.string().nullable(),image:e.url().nullable(),studio:Ri.nullable(),apps:e.array(no),grantedAt:e.iso.datetime().nullable()}),io=e.object({developers:e.array(ro)}),ao=e.object({appId:e.uuid(),appName:e.string(),ownerDisplayName:e.string().nullable(),ownerImage:e.string().nullable(),ownerUserId:e.uuid(),ownerEmail:e.string().nullable(),appLogoUrl:e.string().nullable(),slug:e.string().nullable(),status:e.enum([`draft`,`pending_review`,`published`,`hidden`]),categories:v,tagline:e.string().nullable(),submittedAt:e.iso.datetime().nullable(),firstPublishedAt:e.iso.datetime().nullable(),hiddenAt:e.iso.datetime().nullable(),hiddenReasonInternal:e.string().nullable(),pendingChangesSubmittedAt:e.iso.datetime().nullable(),bipEnabled:e.boolean(),bipStatus:e.enum([`draft`,`pending_review`,`published`,`hidden`]),bipFirstPublishedAt:e.iso.datetime().nullable(),bipHiddenAt:e.iso.datetime().nullable(),openReportCount:e.int().gte(0)}),oo=e.object({items:e.array(ao)}),Z=e.object({status:e.enum([`draft`,`pending_review`,`published`,`hidden`])});e.object({reasonPublic:e.string().min(1).max(500),reasonInternal:e.string().max(2e3).optional()}),e.union([e.object({decision:e.enum([`approve`])}),e.object({decision:e.enum([`reject`]),notes:e.string().min(1).max(1e3)})]);const so=e.object({field:e.string(),label:e.string(),from:e.string(),to:e.string()}),co=e.object({appId:e.uuid(),submittedAt:e.iso.datetime().nullable(),changes:e.array(so)}),lo=e.object({bipStatus:e.enum([`draft`,`pending_review`,`published`,`hidden`])}),uo=e.object({id:e.uuid(),category:I,details:e.string().nullable(),status:L,acknowledgedAt:e.iso.datetime().nullable(),createdAt:e.iso.datetime(),appId:e.uuid(),appName:e.string(),appSlug:e.string().nullable()}),fo=e.object({reports:e.array(uo),total:e.int().gte(0),hasMore:e.boolean()}),po=e.object({purchaseFeeBps:e.int().gte(0).lte(1e4),stakeFeeBps:e.int().gte(0).lte(1e4),updatedAt:e.iso.datetime(),updatedBy:e.string().min(1).nullable()}),Q=e.object({chain:e.string().min(1),chainId:e.int().gte(0),to:e.string().regex(/^0x[0-9a-fA-F]{40}$/),calldataHex:e.string().regex(/^0x[0-9a-fA-F]*$/)}),mo=e.object({target:e.enum([`purchase`]),envelope:Q}),ho=e.object({purchaseFeeBps:e.int().gte(0).lte(1e4),stakeFeeBps:e.int().gte(0).lte(1e4),updatedAt:e.iso.datetime(),updatedBy:e.string().min(1).nullable(),envelopes:e.array(mo)});e.object({purchaseFeeBps:e.int().gte(0).lte(1e4).optional(),stakeFeeBps:e.int().gte(0).lte(1e4).optional()});const go=e.object({appId:e.string().min(1),platformFeeBps:e.int().gte(0).lte(1e4).nullable(),rakeCapBps:e.int().gte(0).lte(3e3).nullable(),effectivePlatformFeeBps:e.int().gte(0).lte(1e4),effectiveRakeCapBps:e.int().gte(0).lte(3e3),updatedAt:e.iso.datetime().nullable(),updatedBy:e.string().min(1).nullable()});e.object({platformFeeBps:e.int().gte(0).lte(1e4).nullish(),rakeCapBps:e.int().gte(0).lte(3e3).nullish()}),e.object({chain:e.string().min(1),vaultAddress:e.string().regex(/^0x[0-9a-fA-F]{40}$/),processorAddress:e.string().regex(/^0x[0-9a-fA-F]{40}$/),action:e.enum([`add`,`remove`])}),e.object({chain:e.string().min(1),processorAddress:e.string().regex(/^0x[0-9a-fA-F]{40}$/),newTreasury:e.string().regex(/^0x[0-9a-fA-F]{40}$/)});const _o=e.object({chain:e.string().min(1),walletAddress:e.string().regex(/^0x[0-9a-fA-F]{40}$/),reason:e.string().min(1),flaggedBy:e.string().min(1),createdAt:e.iso.datetime(),updatedAt:e.iso.datetime()});e.object({chain:e.string().min(1),walletAddress:e.string().regex(/^0x[0-9a-fA-F]{40}$/),reason:e.string().min(1).max(2e3)});const vo=e.object({chain:e.string().min(1),walletAddress:e.string().regex(/^0x[0-9a-fA-F]{40}$/),removed:e.literal(!0)});e.object({chain:e.string().min(1),walletAddress:e.string().regex(/^0x[0-9a-fA-F]{40}$/)});const yo=e.object({entries:e.array(_o)});e.object({chain:e.string().min(1),target:e.enum([`router`,`credit_vault`,`platform_vault`]),newOperator:e.string().regex(/^0x[0-9a-fA-F]{40}$/)}),e.object({chain:e.string().min(1),target:e.enum([`router`,`credit_vault`,`platform_vault`]),action:e.enum([`pause`,`unpause`])}),e.object({chain:e.string().min(1),vaultAddress:e.string().regex(/^0x[0-9a-fA-F]{40}$/),lockSeconds:e.int().gte(0)}),e.object({chain:e.string().min(1),account:e.string().regex(/^0x[0-9a-fA-F]{40}$/),lockSeconds:e.int().gte(0)});const bo=e.object({appealId:e.string().regex(/^0x[0-9a-f]{32}$/),paymentId:e.string().regex(/^0x[0-9a-f]{32}$/),chain:e.string().min(1),vault:e.string().regex(/^0x[0-9a-fA-F]{40}$/),appellant:e.string().regex(/^0x[0-9a-fA-F]{40}$/),amount:e.string().regex(/^\d+$/),token:e.string().regex(/^0x[0-9a-fA-F]{40}$/),status:e.enum([`open`,`resolved_refund`,`resolved_dismiss`,`cancelled`,`force_cancelled`]),reason:e.string().nullable(),filedAt:e.iso.datetime(),resolvedAt:e.iso.datetime().nullable(),resolvedBy:e.string().nullable(),resolutionNotes:e.string().nullable()}),xo=e.object({appeals:e.array(bo),nextCursorFiledAt:e.iso.datetime().nullable()}),So=e.enum([`pending_onchain`,`open`,`resolved_refund`,`resolved_dismiss`,`cancelled`,`force_cancelled`]),Co=e.enum([`purchase`,`pot`,`matured`]),wo=e.object({source:Co,chain:e.string(),amount:e.string().regex(/^\d+$/),token:e.string().regex(/^0x[0-9a-fA-F]{40}$/),vault:e.string().regex(/^0x[0-9a-fA-F]{40}$/),depositId:e.string().regex(/^0x[0-9a-f]{32}$/).nullable(),paymentId:e.string().regex(/^0x[0-9a-f]{32}$/).nullable(),appellant:e.string().regex(/^0x[0-9a-fA-F]{40}$/),appellantUserId:e.string().nullable(),respondent:e.string().regex(/^0x[0-9a-fA-F]{40}$/).nullable(),respondentUserId:e.string().nullable(),reason:e.string().nullable(),filedAt:e.iso.datetime(),resolvedAt:e.iso.datetime().nullable(),resolution:e.object({resolutionId:e.string().regex(/^0x[0-9a-f]{32}$/),outcome:e.int().gte(0).lte(1),deadline:e.int().gte(0),signature:e.string().regex(/^0x[0-9a-fA-F]+$/)}).nullable(),refundClaimedAt:e.iso.datetime().nullable()}),To=e.enum([`party`,`admin`,`system`]),Eo=e.object({id:e.string().min(1),senderUserId:e.string().nullable(),senderRole:To,body:e.string().nullable(),attachments:e.array(mr),sentAt:e.iso.datetime()}),Do=e.object({appealId:e.string().regex(/^0x[0-9a-f]{32}$/),threadId:e.string().nullable(),status:So,readOnly:e.boolean(),canResolve:e.boolean(),detail:wo,messages:e.array(Eo)}),Oo=e.object({message:Eo});e.object({body:e.string().min(1).max(4e3).optional(),attachmentIds:e.array(e.string().min(1)).max(3).optional()});const ko=e.object({appealId:e.string().regex(/^0x[0-9a-f]{32}$/),resolutionId:e.string().regex(/^0x[0-9a-f]{32}$/),chain:e.string().min(1),chainId:e.int().gt(0),vault:e.string().regex(/^0x[0-9a-fA-F]{40}$/),outcome:e.int().gte(0).lte(1),deadline:e.int().gte(0),signature:e.string().regex(/^0x[0-9a-fA-F]+$/),status:e.enum([`resolved_refund`,`resolved_dismiss`])});e.object({decision:e.enum([`refund`,`dismiss`]),notes:e.string().min(1).max(2e3).optional()});const Ao=e.object({asOf:e.string(),ethUsd:e.number().nullable(),solUsd:e.number().nullable(),solLamportsPerCent:e.int().nullable(),tronUsdPerToken:e.number()}),jo=e.object({appealId:e.string().regex(/^0x[0-9a-f]{32}$/),paymentId:e.string().regex(/^0x[0-9a-f]{32}$/),chain:e.string().min(1),chainId:e.int().gt(0),vault:e.string().regex(/^0x[0-9a-fA-F]{40}$/),appellant:e.string().regex(/^0x[0-9a-fA-F]{40}$/),amount:e.string().regex(/^\d+$/),deadline:e.int().gte(0),signature:e.string().regex(/^0x[0-9a-fA-F]+$/)});e.object({paymentId:e.string().regex(/^0x[0-9a-f]{32}$/),amount:e.string().regex(/^\d+$/),reason:e.string().min(1).max(2e3)}),e.object({legId:e.string().regex(/^0x[0-9a-f]{32}$/),reason:e.string().min(1).max(2e3)});const Mo=e.object({kind:e.enum([`direct`]),txHash:e.string().regex(/^0x[0-9a-fA-F]{64}$/),blockNumber:e.string().regex(/^\d+$/),recipient:e.string().regex(/^0x[0-9a-fA-F]{40}$/),amount:e.string().regex(/^\d+$/)}),No=e.object({kind:e.enum([`pull`]),txHash:e.string().regex(/^0x[0-9a-fA-F]{64}$/),blockNumber:e.string().regex(/^\d+$/),recipient:e.string().regex(/^0x[0-9a-fA-F]{40}$/),amount:e.string().regex(/^\d+$/)});e.discriminatedUnion(`kind`,[Mo.extend({kind:e.literal(`direct`)}),No.extend({kind:e.literal(`pull`)})]),e.object({chain:e.string().min(1),token:e.string().regex(/^0x[0-9a-fA-F]{40}$/),amount:e.string().regex(/^\d+$/),recipient:e.string().regex(/^0x[0-9a-fA-F]{40}$/).optional(),recipientUserId:e.string().min(1).optional(),metadata:g.optional()}),e.object({distributionId:e.string().regex(/^0x[0-9a-fA-F]{32}$/).optional(),txHash:e.string().regex(/^(?:0x[0-9a-fA-F]{64}|[1-9A-HJ-NP-Za-km-z]{43,88})$/),blockNumber:e.string().regex(/^\d+$/),potId:e.string().regex(/^0x[0-9a-fA-F]{32}$/),closePot:e.boolean(),legs:e.array(e.object({recipient:e.string().regex(/^(?:0x[0-9a-fA-F]{40}|[1-9A-HJ-NP-Za-km-z]{32,44})$/),amount:e.string().regex(/^\d+$/),settlement:e.enum([`instant`,`locked`])}))}),e.object({chain:e.string().min(1),token:e.string().regex(/^(?:0x[0-9a-fA-F]{40}|[1-9A-HJ-NP-Za-km-z]{32,44})$/),potId:e.string().regex(/^0x[0-9a-fA-F]{32}$/),closePot:e.boolean().optional().default(!0),legs:e.array(e.object({recipient:e.string().regex(/^(?:0x[0-9a-fA-F]{40}|[1-9A-HJ-NP-Za-km-z]{32,44})$/).optional(),recipientUserId:e.string().min(1).optional(),amount:e.string().regex(/^\d+$/),settlement:e.enum([`instant`,`locked`]).optional().default(`locked`)})).min(1).max(50),metadata:g.optional()}),e.object({potId:e.string().regex(/^0x[0-9a-fA-F]{32}$/),txHash:e.string().regex(/^0x[0-9a-fA-F]{64}$/),blockNumber:e.string().regex(/^\d+$/)}),e.object({chain:e.string().min(1),token:e.string().regex(/^0x[0-9a-fA-F]{40}$/),potId:e.string().regex(/^0x[0-9a-fA-F]{32}$/)}),e.object({status:e.enum([`ok`])});const Po=e.object({id:e.string(),purpose:e.string(),version:e.string(),grantedAt:e.iso.datetime(),withdrawnAt:e.iso.datetime().nullable()}),Fo=e.object({accountId:e.string(),providerId:e.string(),hasPassword:e.boolean(),scope:e.string().nullable(),createdAt:e.iso.datetime(),updatedAt:e.iso.datetime()}),Io=e.object({id:e.string(),action:e.string(),targetType:e.string(),targetId:e.string(),purpose:e.string(),legalBasis:e.string(),occurredAt:e.iso.datetime(),traceId:e.string().nullable(),attributes:e.record(e.string(),e.unknown())}),Lo=e.object({id:e.string(),threadId:e.string(),contentMode:e.enum([`plaintext`,`e2e-encrypted`]),body:e.string().nullable(),envelope:e.unknown().optional(),note:e.string().nullable(),sentAt:e.iso.datetime(),editedAt:e.iso.datetime().nullable(),deletedAt:e.iso.datetime().nullable()});e.object({user:d,sessions:e.array(ue),consents:e.array(Po),accounts:e.array(Fo),auditEvents:e.array(Io),messages:e.array(Lo),exportedAt:e.iso.datetime()}),e.object({name:l.optional(),image:e.string().min(1).max(2048).nullish()});const Ro=e.object({purpose:e.string(),version:e.string(),grantedAt:e.iso.datetime(),withdrawnAt:e.iso.datetime().nullable()});e.object({consents:e.array(Ro)});const zo=e.string().regex(/^[a-z][a-z0-9-]{2,63}$/);e.object({purpose:zo,version:e.string().min(1).max(64),granted:e.boolean()}),e.object({token:e.string().min(1),callbackURL:e.url().optional()}),e.object({response_type:e.enum([`code`]),client_id:m,redirect_uri:f,scope:p,state:fe,code_challenge:pe,code_challenge_method:e.enum([`S256`]),prompt:e.enum([`consent`]).optional()}),e.object({request:me}),e.object({client_id:e.string().min(1),return_uri:e.url()}),e.object({clientId:e.string().min(1)}),e.object({chain:e.string().min(1),token:e.string().regex(/^0x[0-9a-fA-F]{40}$/),amount:e.string().regex(/^\d+$/).optional(),usdCents:e.int().gte(0).nullish()});const Bo=Re;e.void(),e.void(),e.void(),e.object({genre:e.enum(`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`.split(`.`)).optional(),q:e.string().min(1).max(200).optional(),before:e.iso.datetime().optional(),limit:e.int().gte(1).lte(48).optional().default(24)}),e.object({slug:e.string().regex(/^[a-z0-9-]{3,40}$/)}),e.object({genre:e.enum(`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`.split(`.`)).optional(),q:e.string().min(1).max(200).optional(),before:e.iso.datetime().optional(),limit:e.int().gte(1).lte(48).optional().default(24)}),e.object({slug:e.string().regex(/^[a-z0-9-]{3,40}$/)}),e.object({slug:e.string().regex(/^[a-z0-9-]{3,40}$/)}),e.object({limit:e.int().gte(1).lte(20).optional().default(10),offset:e.int().gte(0).nullish().default(0)}),e.object({slug:e.string().regex(/^[a-z0-9-]{3,40}$/),updateId:e.uuid()}),e.object({limit:e.int().gte(1).lte(50).optional().default(20),offset:e.int().gte(0).nullish().default(0)}),e.object({slug:e.string().regex(/^[a-z0-9-]{3,40}$/)}),e.object({slug:e.string().regex(/^[a-z0-9-]{3,40}$/)}),e.object({slug:e.string().regex(/^[a-z0-9-]{3,40}$/)}),e.object({slug:e.string().regex(/^[a-z0-9-]{3,40}$/)}),e.object({slug:e.string().regex(/^[a-z0-9-]{3,40}$/)}),e.object({slug:e.string().regex(/^[a-z0-9-]{3,40}$/),updateId:e.uuid()}),e.object({slug:e.string().regex(/^[a-z0-9-]{3,40}$/),updateId:e.uuid()}),e.object({slug:e.string().regex(/^[a-z0-9-]{3,40}$/),commentId:e.uuid()}),e.object({appId:e.string().min(1)}),e.object({limit:e.int().gte(1).lte(20).optional().default(10),offset:e.int().gte(0).nullish().default(0)}),e.object({appId:e.string().min(1)}),e.object({appId:e.string().min(1),updateId:e.uuid()}),e.object({appId:e.string().min(1),updateId:e.uuid()}),e.object({appId:e.string().min(1),updateId:e.uuid()}),e.object({appId:e.string().min(1),updateId:e.uuid()}),e.object({file:e.string()}),e.object({appId:e.string().min(1)}),e.object({slug:e.string().regex(/^[a-z0-9-]{3,40}$/)}),e.object({sort:xt.optional(),limit:e.int().gte(1).lte(50).optional().default(10),offset:e.int().gte(0).nullish().default(0)}),e.object({slug:e.string().regex(/^[a-z0-9-]{3,40}$/)}),e.object({slug:e.string().regex(/^[a-z0-9-]{3,40}$/)}),e.object({slug:e.string().regex(/^[a-z0-9-]{3,40}$/)}),e.object({slug:e.string().regex(/^[a-z0-9-]{3,40}$/)}),e.object({slug:e.string().regex(/^[a-z0-9-]{3,40}$/),reviewId:e.uuid()}),e.object({slug:e.string().regex(/^[a-z0-9-]{3,40}$/),reviewId:e.uuid()}),e.object({slug:e.string().regex(/^[a-z0-9-]{3,40}$/),reviewId:e.uuid()}),e.object({limit:e.int().gte(1).lte(50).optional().default(20),offset:e.int().gte(0).nullish().default(0)}),e.object({slug:e.string().regex(/^[a-z0-9-]{3,40}$/),reviewId:e.uuid()}),e.object({slug:e.string().regex(/^[a-z0-9-]{3,40}$/),commentId:e.uuid()}),e.object({appId:e.uuid()}),e.object({sort:xt.optional(),limit:e.int().gte(1).lte(50).optional().default(10),offset:e.int().gte(0).nullish().default(0)}),e.object({appId:e.uuid(),reviewId:e.uuid()}),e.object({appId:e.uuid(),reviewId:e.uuid()}),e.object({appId:e.uuid()});const Vo=Pt;e.object({id:e.uuid()}),e.object({status:L.optional(),limit:e.int().gte(1).lte(50).optional().default(20),offset:e.int().gte(0).nullish().default(0)});const Ho=Ft;e.object({id:e.uuid(),reportId:e.uuid()});const Uo=R;e.object({status:e.enum([`pending`,`completed`,`expired`,`all`]).optional().default(`completed`),limit:e.int().gte(1).lte(100).optional().default(20),before:e.iso.datetime().optional()}),e.object({kind:e.string().optional(),direction:e.enum([`outgoing`,`incoming`]).optional(),sort:e.enum([`newest`,`oldest`,`value_desc`,`value_asc`]).optional().default(`newest`),chain:e.string().min(1).optional(),limit:e.int().gte(1).lte(100).optional().default(20),cursor:e.string().min(1).optional(),before:e.iso.datetime().optional(),includeInactive:e.enum([`true`,`false`]).optional().default(`false`)}),e.object({groupId:e.string().min(1).max(128)}),e.object({chain:e.string().min(1).optional()}),e.object({before:e.iso.datetime().optional()}),e.object({address:e.string().regex(/^0x[0-9a-fA-F]{40}$/)}),e.object({address:e.string().regex(/^0x[0-9a-fA-F]{40}$/)}),e.object({address:e.string().regex(/^0x[0-9a-fA-F]{40}$/)}),e.object({address:e.string().regex(/^0x[0-9a-fA-F]{40}$/)});const Wo=d,Go=d;e.object({file:e.string()});const Ko=d;e.object({q:e.string().max(200).optional()});const qo=Jn;e.union([cr,lr]),e.object({id:e.string().min(1)}),e.object({id:e.string().min(1)}),e.object({id:e.string().min(1)}),e.object({limit:e.int().gt(0).lte(100).optional(),before:e.iso.datetime().optional()}),e.object({id:e.string().min(1)}),e.object({id:e.string().min(1),msgId:e.string().min(1)}),e.object({id:e.string().min(1),msgId:e.string().min(1)}),e.object({id:e.string().min(1),msgId:e.string().min(1),emoji:dr}),e.object({id:e.string().min(1),msgId:e.string().min(1),emoji:dr}),e.object({id:e.string().min(1)}),e.object({file:e.string()}),e.object({id:e.string().min(1)}),e.object({id:e.string().min(1)}),e.object({id:e.string().min(1)}),e.object({id:e.string().min(1)}),e.object({id:e.string().min(1)}),e.object({id:e.string().min(1)}),e.object({id:e.string().min(1)}),e.object({file:e.string()}),e.object({id:e.string().min(1)}),e.object({id:e.string().min(1),userId:e.string().min(1)}),e.object({id:e.string().min(1)}),e.object({id:e.string().min(1),userId:e.string().min(1)}),e.object({regenerate:e.boolean().optional()}),e.object({code:e.string().min(1).max(64)});const Jo=Ir;e.object({days:e.int().gt(0).lte(366).optional().default(30)}),e.object({appId:e.uuid()}),e.object({days:e.int().gt(0).lte(366).optional().default(30)});const Yo=Jr;e.object({permitId:e.string().min(1)});const Xo=Xr;e.object({file:e.string()}),e.object({tokenId:e.string()}),e.object({appId:e.string().min(1)});const Zo=$r;e.object({appId:e.string().min(1)});const Qo=ei;e.object({appId:e.string().min(1)});const $o=ii;e.object({appId:e.string().min(1)});const es=ri;e.object({appId:e.string().min(1),itemId:e.string().min(1)});const ts=ai;e.object({appId:e.string().min(1),itemId:e.string().min(1)});const ns=ci;e.object({file:e.string()}),e.object({appId:e.string().min(1),itemId:e.string().min(1)});const rs=q;e.object({file:e.string()}),e.object({appId:e.string().min(1),itemId:e.string().min(1)});const is=q;e.object({appId:e.string().min(1),itemId:e.string().min(1)});const as=li;e.object({appId:e.string().min(1),itemId:e.string().min(1)});const os=li,ss=di;e.object({permitId:e.string().min(1)});const cs=fi;e.object({permitId:e.string().min(1)});const ls=pi;e.object({permitId:e.string().min(1)});const us=mi,ds=hi,fs=gi,ps=vi,ms=vi;e.object({custodyId:e.string().min(1)});const hs=yi;e.object({id:e.string().min(1)}),e.object({id:e.string().min(1)}),e.object({id:e.string().min(1)}),e.object({handle:e.string().min(1)}),e.object({q:e.string().min(1).max(64),limit:e.int().gte(1).lte(50).optional().default(20)}),e.object({id:e.string().min(1)}),e.object({id:e.string().min(1)}),e.object({id:e.string().min(1)}),e.object({id:e.string().min(1)});const gs=Zi,_s=Xi;e.object({id:e.string().min(1)});const vs=J,ys=Qi;e.object({id:e.string().min(1)});const bs=Qi;e.object({id:e.string().min(1)});const xs=Qi;e.object({id:e.string().min(1)});const Ss=Y;e.object({file:e.string()}),e.object({id:e.string().min(1)});const Cs=Y;e.object({id:e.string().min(1)});const ws=oa;e.object({id:e.string().min(1)});const Ts=sa;e.object({id:e.string().min(1)}),e.object({range:e.string().optional(),chain:e.string().optional()});const Es=la;e.object({id:e.string().min(1)}),e.object({range:e.string().optional()});const Ds=da;e.object({id:e.string().min(1)});const Os=fa;e.object({id:e.string().min(1)}),e.object({kind:e.string().optional(),direction:e.enum([`outgoing`,`incoming`]).optional(),sort:e.enum([`newest`,`oldest`,`value_desc`,`value_asc`]).optional().default(`newest`),chain:e.string().min(1).optional(),limit:e.int().gte(1).lte(100).optional().default(20),cursor:e.string().min(1).optional(),before:e.iso.datetime().optional(),includeInactive:e.enum([`true`,`false`]).optional().default(`false`)});const ks=z;e.object({id:e.string().min(1)});const As=ma;e.object({id:e.string().min(1),chain:e.string().min(1)});const js=ha;e.object({id:e.string().min(1),chain:e.string().min(1)});const Ms=ga;e.object({id:e.string().min(1),chain:e.string().min(1)}),e.object({token:e.string().regex(/^0x[0-9a-fA-F]{40}$/).optional()});const Ns=_a;e.object({id:e.string().min(1),chain:e.string().min(1)});const Ps=va;e.object({id:e.string().min(1),env:e.enum([`development`,`production`])});const Fs=ba;e.object({id:e.string().min(1)});const Is=xa;e.object({id:e.string().min(1)});const Ls=Sa;e.object({chain:e.string().optional()});const Rs=wa;e.object({chain:e.string().optional()});const zs=Ea,Bs=Da;e.object({id:e.string().min(1)});const Vs=ka;e.object({id:e.string().min(1)});const Hs=ka;e.object({id:e.string().min(1),userId:e.string().min(1)});const Us=J,Ws=ja;e.object({appId:e.string().min(1)});const Gs=J;e.object({appId:e.string().min(1)});const Ks=J,qs=Ba,Js=J,Ys=Y;e.object({file:e.string()});const Xs=Y,Zs=J,Qs=Y;e.object({file:e.string()});const $s=Y;e.object({appId:e.string().min(1)});const ec=X;e.object({appId:e.string().min(1)});const tc=X;e.object({appId:e.string().min(1)}),e.void(),e.object({file:e.string()}),e.object({appId:e.string().min(1)});const nc=e.object({bannerUrl:e.url()});e.object({appId:e.string().min(1)}),e.void(),e.object({file:e.string()}),e.object({appId:e.string().min(1)});const rc=e.object({thumbnailUrl:e.url()});e.object({appId:e.string().min(1)}),e.void(),e.object({file:e.string()}),e.object({appId:e.string().min(1)});const ic=e.object({thumbnailVideoUrl:e.url()});e.object({file:e.string()}),e.object({appId:e.string().min(1)});const ac=Ha;e.object({appId:e.string().min(1)});const oc=X;e.object({appId:e.string().min(1)});const sc=X;e.object({appId:e.string().min(1)});const cc=X;e.object({appId:e.string().min(1)});const lc=X;e.object({appId:e.string().min(1)});const uc=X;e.object({id:e.string().min(1)}),e.object({id:e.string().min(1)}),e.object({search:e.string().optional(),offset:e.int().gte(0).nullish(),limit:e.int().gt(0).lte(100).optional()}),e.object({id:e.string().min(1)}),e.object({action:e.string().optional(),actorId:e.string().optional(),targetType:e.string().optional(),targetId:e.string().optional(),offset:e.int().gte(0).nullish(),limit:e.int().gt(0).lte(100).optional()}),e.object({status:e.enum([`pending`,`approved`,`rejected`,`cancelled`]).optional(),kind:e.enum([`role`,`production`]).optional()}),e.object({id:e.string().min(1)}),e.object({status:e.union([e.enum([`draft`,`pending_review`,`published`,`hidden`]),e.enum([`all`]),e.enum([`pending_changes`]),e.enum([`bip_pending_review`])]).optional()}),e.object({appId:e.string().min(1)}),e.object({appId:e.string().min(1)}),e.object({appId:e.string().min(1)}),e.object({appId:e.string().min(1)}),e.object({appId:e.string().min(1)}),e.object({appId:e.string().min(1)}),e.object({appId:e.string().min(1)}),e.object({status:e.union([L,e.enum([`all`])]).optional(),limit:e.int().gte(1).lte(50).optional().default(20),offset:e.int().gte(0).nullish().default(0)}),e.object({reportId:e.uuid()}),e.object({appId:e.string().min(1)}),e.object({appId:e.string().min(1)}),e.object({appId:e.string().min(1)}),e.object({processorId:e.string().min(1)}),e.object({chain:e.string().min(1).optional()}),e.object({vaultAddress:e.string().min(1)}),e.object({vaultAddress:e.string().min(1)}),e.object({vaultAddress:e.string().min(1)}),e.object({vaultAddress:e.string().min(1)}),e.object({status:e.array(e.enum([`open`,`resolved_refund`,`resolved_dismiss`,`cancelled`,`force_cancelled`])).optional(),chain:e.string().min(1).optional(),cursorFiledAt:e.iso.datetime().optional(),limit:e.int().gte(1).lte(100).optional()}),e.object({appealId:e.string().min(1)}),e.object({appealId:e.string().min(1)}),e.object({file:e.string()}),e.object({appealId:e.string().min(1)}),e.object({appealId:e.string().min(1)}),e.object({appealId:e.string().min(1)}),e.object({appealId:e.string().min(1)}),e.object({file:e.string()}),e.object({appealId:e.string().min(1)}),e.void(),e.void();async function dc(e,t){let n=new FormData,r=t.file instanceof Blob?t.file:new Blob([t.file],{type:t.contentType});n.append(`file`,r,t.filename);let i=await e.fetch(`${pc(e.issuer)}/me/avatar`,{method:`POST`,headers:{authorization:`Bearer ${t.bearer}`},body:n});if(!i.ok){let e=await i.text();throw Error(`tron ${i.status}: ${e}`)}let a=await i.json();return Ko.parse(a)}async function fc(e,t){let n=await a(e,{path:`/me/avatar`,method:`DELETE`,bearer:t.bearer});return Go.parse(n)}function pc(e){return e.endsWith(`/`)?e.slice(0,-1):e}async function mc(e,t){let n=await a(e,{path:`/me/giphy/search`,bearer:t.bearer,query:{q:t.q}});return qo.parse(n)}async function hc(e,t){let n=await a(e,{path:`/me/oauth/payment-authorizations`,bearer:t.bearer});return Bo.parse(n)}async function gc(e,t){await s(e,{path:`/me/oauth/payment-authorizations/${encodeURIComponent(t.consentId)}`,method:`PATCH`,bearer:t.bearer,body:t.body})}async function _c(e,t){await s(e,{path:`/me/oauth/payment-authorizations/${encodeURIComponent(t.consentId)}`,method:`DELETE`,bearer:t.bearer})}async function vc(e,t){let n=await a(e,{path:`/me/presence/heartbeat`,method:`POST`,bearer:t.bearer});return Jo.parse(n)}async function yc(e,t){let n=await a(e,{path:`/me/profile`,method:`PATCH`,bearer:t.bearer,body:t.body});return Wo.parse(n)}async function bc(e,t){let n=await a(e,{path:`/admin/active-players`,bearer:t.bearer});return Wa.parse(n)}async function xc(e,t){let n=await a(e,{path:`/admin/app-pages`,bearer:t.bearer,query:{status:t.status}});return oo.parse(n)}async function Sc(e,t){let n=await a(e,{path:`/admin/app-pages/${encodeURIComponent(t.appId)}/changes`,bearer:t.bearer});return co.parse(n)}async function Cc(e,t){let n=await a(e,{path:`/admin/app-pages/${encodeURIComponent(t.appId)}/review-changes`,method:`POST`,bearer:t.bearer,body:t.body});return Z.parse(n)}async function wc(e,t){let n=await a(e,{path:`/admin/app-pages/${encodeURIComponent(t.appId)}/hide`,method:`POST`,bearer:t.bearer,body:t.body});return Z.parse(n)}async function Tc(e,t){let n=await a(e,{path:`/admin/app-pages/${encodeURIComponent(t.appId)}/unhide`,method:`POST`,bearer:t.bearer});return Z.parse(n)}async function Ec(e,t){let n=await a(e,{path:`/admin/app-pages/${encodeURIComponent(t.appId)}/review`,method:`POST`,bearer:t.bearer,body:t.body});return Z.parse(n)}async function Dc(e,t){let n=await a(e,{path:`/admin/app-pages/${encodeURIComponent(t.appId)}/review-bip`,method:`POST`,bearer:t.bearer,body:t.body});return lo.parse(n)}async function Oc(e,t){let n=await a(e,{path:`/admin/app-pages/${encodeURIComponent(t.appId)}/hide-bip`,method:`POST`,bearer:t.bearer,body:t.body});return lo.parse(n)}async function kc(e,t){let n=await a(e,{path:`/admin/app-pages/${encodeURIComponent(t.appId)}/unhide-bip`,method:`POST`,bearer:t.bearer});return lo.parse(n)}async function Ac(e,t){let n=await a(e,{path:`/admin/payments/appeals`,bearer:t.bearer,query:{status:t.statuses===void 0?void 0:[...t.statuses],chain:t.chain,cursorFiledAt:t.cursorFiledAt,limit:t.limit}});return xo.parse(n)}async function jc(e,t){let n=await a(e,{path:`/admin/payments/appeals/${encodeURIComponent(t.appealId)}/room`,bearer:t.bearer});return Do.parse(n)}async function Mc(e,t){let n=await a(e,{path:`/admin/payments/appeals/${encodeURIComponent(t.appealId)}/room/messages`,method:`POST`,bearer:t.bearer,body:t.body});return Oo.parse(n)}async function Nc(e,t){let n=new FormData,r=t.file instanceof Blob?t.file:new Blob([t.file],{type:t.contentType});n.append(`file`,r,t.filename);let i=await e.fetch(`${Fc(e.issuer)}/admin/payments/appeals/${encodeURIComponent(t.appealId)}/room/attachments`,{method:`POST`,headers:{authorization:`Bearer ${t.bearer}`},body:n});if(!i.ok){let e=await i.text();throw Error(`tron ${i.status}: ${e}`)}let a=await i.json();return W.parse(a)}async function Pc(e,t){let n=await a(e,{path:`/admin/payments/appeals/${encodeURIComponent(t.appealId)}/resolve`,method:`POST`,bearer:t.bearer,body:t.body});return ko.parse(n)}function Fc(e){return e.endsWith(`/`)?e.slice(0,-1):e}async function Ic(e,t){let n=await a(e,{path:`/admin/content-reports`,bearer:t.bearer,query:{status:t.status,limit:t.limit,offset:t.offset}});return fo.parse(n)}async function Lc(e,t){let n=await a(e,{path:`/admin/content-reports/${encodeURIComponent(t.reportId)}`,method:`PATCH`,bearer:t.bearer,body:{status:t.status}});return R.parse(n)}async function Rc(e,t){let n=await a(e,{path:`/admin/developer-requests`,bearer:t.bearer,query:{status:t.status,kind:t.kind}});return eo.parse(n)}async function zc(e,t){let n=await a(e,{path:`/admin/developer-requests/${encodeURIComponent(t.id)}`,method:`PATCH`,bearer:t.bearer,body:t.body});return to.parse(n)}async function Bc(e,t){let n=await a(e,{path:`/admin/developers`,bearer:t.bearer});return io.parse(n)}async function Vc(e,t){let n=await a(e,{path:`/admin/inventory/vault-custody/${encodeURIComponent(t.custodyId)}/force-withdraw`,method:`POST`,bearer:t.bearer});return hs.parse(n)}async function Hc(e,t){let n=await a(e,{path:`/admin/platform-fees`,bearer:t.bearer});return po.parse(n)}async function Uc(e,t){let n=await a(e,{path:`/admin/platform-fees`,method:`PATCH`,bearer:t.bearer,body:t.body});return ho.parse(n)}async function Wc(e,t){let n=await a(e,{path:`/admin/apps/${encodeURIComponent(t.appId)}/fee-config`,bearer:t.bearer});return go.parse(n)}async function Gc(e,t){let n=await a(e,{path:`/admin/apps/${encodeURIComponent(t.appId)}/fee-config`,method:`PATCH`,bearer:t.bearer,body:t.body});return go.parse(n)}async function Kc(e,t){let n=await a(e,{path:`/admin/payments/processors/whitelist`,method:`POST`,bearer:t.bearer,body:t.body});return Q.parse(n)}async function qc(e,t){let n=await a(e,{path:`/admin/payments/processors/${encodeURIComponent(t.processorId)}/treasury`,method:`POST`,bearer:t.bearer,body:t.body});return Q.parse(n)}async function Jc(e,t){let n=await a(e,{path:`/admin/payments/vaults/${encodeURIComponent(t.vaultAddress)}/operator`,method:`POST`,bearer:t.bearer,body:t.body});return Q.parse(n)}async function Yc(e,t){let n=await a(e,{path:`/admin/payments/vaults/${encodeURIComponent(t.vaultAddress)}/pause`,method:`POST`,bearer:t.bearer,body:t.body});return Q.parse(n)}async function Xc(e,t){let n=await a(e,{path:`/admin/payments/vaults/${encodeURIComponent(t.vaultAddress)}/withdraw-lock-default`,method:`POST`,bearer:t.bearer,body:t.body});return Q.parse(n)}async function Zc(e,t){let n=await a(e,{path:`/admin/payments/vaults/${encodeURIComponent(t.vaultAddress)}/withdraw-lock-override`,method:`POST`,bearer:t.bearer,body:t.body});return Q.parse(n)}async function Qc(e,t){let n=await a(e,{path:`/admin/payments/appeal-blacklist`,method:`POST`,bearer:t.bearer,body:t.body});return _o.parse(n)}async function $c(e,t){let n=await a(e,{path:`/admin/payments/appeal-blacklist`,method:`DELETE`,bearer:t.bearer,body:t.body});return vo.parse(n)}async function el(e,t){let n=await a(e,{path:`/admin/payments/appeal-blacklist`,bearer:t.bearer,query:{chain:t.chain}});return yo.parse(n)}async function tl(e,t){let n=await a(e,{path:`/admin/tron/cashouts${t.status===void 0?``:`?status=${encodeURIComponent(t.status)}`}`,bearer:t.bearer});return Nn.parse(n)}async function nl(e,t){let n=await a(e,{path:`/admin/tron/cashouts/${encodeURIComponent(t.id)}/approve`,method:`POST`,bearer:t.bearer});return Mn.parse(n)}async function rl(e,t){let n=await a(e,{path:`/admin/tron/cashouts/${encodeURIComponent(t.id)}/reject`,method:`POST`,bearer:t.bearer,body:t.body});return Mn.parse(n)}async function il(e,t){let n=await a(e,{path:`/admin/admins`,bearer:t.bearer});return Ka.parse(n)}async function al(e,t){let n=await a(e,{path:`/admin/admins`,method:`POST`,bearer:t.bearer,body:t.body});return qa.parse(n)}async function ol(e,t){let n=await a(e,{path:`/admin/admins/${encodeURIComponent(t.id)}`,method:`PATCH`,bearer:t.bearer,body:t.body});return Ja.parse(n)}async function sl(e,t){let n=await a(e,{path:`/admin/admins/${encodeURIComponent(t.id)}`,method:`DELETE`,bearer:t.bearer});return qa.parse(n)}async function cl(e,t){let n=await a(e,{path:`/admin/users`,bearer:t.bearer,query:{search:t.search,offset:t.offset,limit:t.limit}});return Xa.parse(n)}async function ll(e,t){let n=await a(e,{path:`/admin/users/${encodeURIComponent(t.id)}`,method:`PATCH`,bearer:t.bearer,body:t.body});return Za.parse(n)}async function ul(e,t){let n=await a(e,{path:`/admin/audit`,bearer:t.bearer,query:{action:t.action,actorId:t.actorId,targetType:t.targetType,targetId:t.targetId,offset:t.offset,limit:t.limit}});return $a.parse(n)}async function dl(e,t){let n=await a(e,{path:`/public/apps/${encodeURIComponent(t.slug)}`,bearer:t.bearer});return Ye.parse(n)}async function fl(e,t){let n=await a(e,{path:`/me/developer`,bearer:t.bearer});return qs.parse(n)}async function pl(e,t){let n=await a(e,{path:`/me/developer/profile`,method:`PATCH`,bearer:t.bearer,body:t.body});return Js.parse(n)}async function ml(e,t){let n=await $(e,{path:`/me/developer/profile/logo`,bearer:t.bearer,file:t.file,filename:t.filename,contentType:t.contentType});return Xs.parse(n)}async function hl(e,t){let n=await a(e,{path:`/me/developer/profile/logo`,method:`DELETE`,bearer:t.bearer});return Ys.parse(n)}async function gl(e,t){let n=await a(e,{path:`/me/developer/request`,method:`POST`,bearer:t.bearer,body:t.body});return Zs.parse(n)}async function _l(e,t){let n=await $(e,{path:`/me/developer/request/logo`,bearer:t.bearer,file:t.file,filename:t.filename,contentType:t.contentType});return $s.parse(n)}async function vl(e,t){let n=await a(e,{path:`/me/developer/request/logo`,method:`DELETE`,bearer:t.bearer});return Qs.parse(n)}async function $(e,t){let n=new FormData,r=t.file instanceof Blob?t.file:new Blob([t.file],{type:t.contentType});n.append(`file`,r,t.filename);let i=await e.fetch(`${yl(e.issuer)}${t.path}`,{method:`POST`,headers:{authorization:`Bearer ${t.bearer}`},body:n});if(!i.ok){let e=await i.text();throw Error(`tron ${i.status}: ${e}`)}return await i.json()}function yl(e){return e.endsWith(`/`)?e.slice(0,-1):e}async function bl(e,t){let n=await a(e,{path:`/public/build-in-public/${encodeURIComponent(t.slug)}/updates`,bearer:t.bearer,query:{limit:t.limit,offset:t.offset}});return et.parse(n)}async function xl(e,t){let n=await a(e,{path:`/public/build-in-public/${encodeURIComponent(t.slug)}/updates/${encodeURIComponent(t.updateId)}/comments`,bearer:t.bearer,query:{limit:t.limit,offset:t.offset}});return rt.parse(n)}async function Sl(e,t){let n=await a(e,{path:`/me/build-in-public/${encodeURIComponent(t.slug)}/reactions`,bearer:t.bearer});return ot.parse(n)}async function Cl(e,t){let n=await a(e,{path:`/me/build-in-public/${encodeURIComponent(t.slug)}/reactions/${encodeURIComponent(t.updateId)}`,method:`POST`,bearer:t.bearer,body:t.body});return ct.parse(n)}async function wl(e,t){let n=await a(e,{path:`/me/build-in-public/${encodeURIComponent(t.slug)}/comments/${encodeURIComponent(t.updateId)}`,method:`POST`,bearer:t.bearer,body:{body:t.body}});return lt.parse(n)}async function Tl(e,t){let n=await a(e,{path:`/me/build-in-public/${encodeURIComponent(t.slug)}/comments/${encodeURIComponent(t.commentId)}`,method:`DELETE`,bearer:t.bearer});return ut.parse(n)}async function El(e,t){let n=await a(e,{path:`/me/developer/apps/${encodeURIComponent(t.appId)}/bip-updates`,bearer:t.bearer,query:{limit:t.limit,offset:t.offset}});return et.parse(n)}async function Dl(e,t){let n=await a(e,{path:`/me/developer/apps/${encodeURIComponent(t.appId)}/bip-updates`,method:`POST`,bearer:t.bearer,body:t.body});return k.parse(n)}async function Ol(e,t){let n=await a(e,{path:`/me/developer/apps/${encodeURIComponent(t.appId)}/bip-updates/${encodeURIComponent(t.updateId)}`,method:`PATCH`,bearer:t.bearer,body:t.body});return k.parse(n)}async function kl(e,t){let n=await a(e,{path:`/me/developer/apps/${encodeURIComponent(t.appId)}/bip-updates/${encodeURIComponent(t.updateId)}`,method:`DELETE`,bearer:t.bearer});return dt.parse(n)}async function Al(e,t){let n=await a(e,{path:`/me/developer/apps/${encodeURIComponent(t.appId)}/bip-updates/${encodeURIComponent(t.updateId)}/pin`,method:`POST`,bearer:t.bearer});return k.parse(n)}async function jl(e,t){let n=await a(e,{path:`/me/developer/apps/${encodeURIComponent(t.appId)}/bip-updates/${encodeURIComponent(t.updateId)}/pin`,method:`DELETE`,bearer:t.bearer});return k.parse(n)}async function Ml(e,t){let n=await $(e,{path:`/me/developer/apps/${encodeURIComponent(t.appId)}/bip-updates/media`,bearer:t.bearer,file:t.file,filename:t.filename,contentType:t.contentType});return ft.parse(n)}async function Nl(e,t){let n=await a(e,{path:`/public/build-in-public/${encodeURIComponent(t.slug)}/interest`,bearer:t.bearer});return it.parse(n)}async function Pl(e,t){let n=await a(e,{path:`/me/build-in-public/${encodeURIComponent(t.slug)}/engagement`,bearer:t.bearer});return j.parse(n)}async function Fl(e,t){let n=await a(e,{path:`/me/build-in-public/${encodeURIComponent(t.slug)}/interest`,method:`POST`,bearer:t.bearer,body:{interested:t.interested}});return j.parse(n)}async function Il(e,t){let n=await a(e,{path:`/me/build-in-public/${encodeURIComponent(t.slug)}/subscription`,method:`POST`,bearer:t.bearer,body:{subscribed:t.subscribed}});return j.parse(n)}async function Ll(e,t){let n=await a(e,{path:`/public/build-in-public`,bearer:t.bearer,query:{genre:t.genre,q:t.q,before:t.before,limit:t.limit}});return Ue.parse(n)}async function Rl(e,t){let n=await a(e,{path:`/public/build-in-public/${encodeURIComponent(t.slug)}`,bearer:t.bearer});return Xe.parse(n)}async function zl(e,t){let n=await a(e,{path:`/me/apps/${encodeURIComponent(t.appId)}/report`,method:`POST`,bearer:t.bearer,body:t.report});return Vo.parse(n)}async function Bl(e,t){let n=await a(e,{path:`/public/library`,bearer:t.bearer,query:{genre:t.genre,q:t.q,before:t.before,limit:t.limit}});return Ue.parse(n)}async function Vl(e,t){let n=await a(e,{path:`/public/apps/${encodeURIComponent(t.slug)}/reviews`,bearer:t.bearer,query:{sort:t.sort,limit:t.limit,offset:t.offset}});return bt.parse(n)}async function Hl(e,t){let n=await a(e,{path:`/me/developer/apps/${encodeURIComponent(t.appId)}/reviews`,bearer:t.bearer,query:{sort:t.sort,limit:t.limit,offset:t.offset}});return bt.parse(n)}async function Ul(e,t){let n=await a(e,{path:`/me/reviews/${encodeURIComponent(t.slug)}`,bearer:t.bearer});return P.parse(n)}async function Wl(e,t){let n=await a(e,{path:`/me/reviews/${encodeURIComponent(t.slug)}`,method:`PUT`,bearer:t.bearer,body:t.review});return P.parse(n)}async function Gl(e,t){let n=await a(e,{path:`/me/reviews/${encodeURIComponent(t.slug)}`,method:`DELETE`,bearer:t.bearer});return P.parse(n)}async function Kl(e,t){let n=await a(e,{path:`/me/reviews/${encodeURIComponent(t.slug)}/reactions`,bearer:t.bearer});return Tt.parse(n)}async function ql(e,t){let n=await a(e,{path:`/me/reviews/${encodeURIComponent(t.slug)}/reactions/${encodeURIComponent(t.reviewId)}`,method:`POST`,bearer:t.bearer,body:t.reaction});return Et.parse(n)}async function Jl(e,t){let n=await a(e,{path:`/me/reviews/${encodeURIComponent(t.slug)}/tips/${encodeURIComponent(t.reviewId)}`,method:`POST`,bearer:t.bearer,idempotencyKey:t.idempotencyKey??crypto.randomUUID(),body:t.tip});return Dt.parse(n)}async function Yl(e,t){let n=await a(e,{path:`/public/apps/${encodeURIComponent(t.slug)}/reviews/${encodeURIComponent(t.reviewId)}/comments`,bearer:t.bearer,query:{limit:t.limit,offset:t.offset}});return At.parse(n)}async function Xl(e,t){let n=await a(e,{path:`/me/reviews/${encodeURIComponent(t.slug)}/comments/${encodeURIComponent(t.reviewId)}`,method:`POST`,bearer:t.bearer,body:t.comment});return jt.parse(n)}async function Zl(e,t){let n=await a(e,{path:`/me/reviews/${encodeURIComponent(t.slug)}/comments/${encodeURIComponent(t.commentId)}`,method:`DELETE`,bearer:t.bearer});return Mt.parse(n)}async function Ql(e,t){let n=await a(e,{path:`/me/developer/apps/${encodeURIComponent(t.appId)}/reviews/${encodeURIComponent(t.reviewId)}/reply`,method:`PUT`,bearer:t.bearer,body:t.reply});return Nt.parse(n)}async function $l(e,t){let n=await a(e,{path:`/me/developer/apps/${encodeURIComponent(t.appId)}/reviews/${encodeURIComponent(t.reviewId)}/reply`,method:`DELETE`,bearer:t.bearer});return Nt.parse(n)}function eu(){let e=new Map;return{run:async(t,n)=>{let r=e.get(t);if(r!==void 0)return await r;let i=(async()=>{try{return await n()}finally{e.delete(t)}})();return e.set(t,i),await i}}}function tu(){return{debug:()=>{},info:()=>{},warn:()=>{},error:()=>{}}}function nu(e=`[tron-sdk]`){return{debug:(t,n)=>{console.log(e,t,n??``)},info:(t,n)=>{console.info(e,t,n??``)},warn:(t,n)=>{console.warn(e,t,n??``)},error:(t,n)=>{console.error(e,t,n??``)}}}const ru=6e4,iu=60,au=5,ou={acquire:async()=>{await Promise.resolve()}};function su(e,t){let n=Math.max(1,t),r=e/1e3,i=n,a=Date.now(),o=[],s=null;function c(){let e=Date.now();for(i=Math.min(n,i+(e-a)*r),a=e;o.length>0&&i>=1;)--i,o.shift()?.();if(o.length>0&&s===null){let e=Math.max(5,Math.ceil((1-i)/r));s=setTimeout(()=>{s=null,c()},e)}}return{acquire:async()=>{await new Promise(e=>{o.push(e),c()})}}}const cu=e=>e===`GET`||e===`HEAD`,lu=e=>e/ru*1e3;function uu(e={}){let t=su(e.read?.requestsPerSecond??lu(60),e.read?.burst??60),n=su(e.write?.requestsPerSecond??lu(5),e.write?.burst??5);return{acquire:async e=>{await(cu(e)?t:n).acquire()}}}function du(){let e=new Map;return{async get(t){return e.get(t)??null},async set(t,n){e.set(t,n)},async clear(t){e.delete(t)}}}async function fu(e,t){let n=await a(e,{path:`/payments/me/activity`,bearer:t.bearer,query:{kind:t.kind,direction:t.direction,sort:t.sort,chain:t.chain,limit:t.limit,cursor:t.cursor,before:t.before,includeInactive:t.includeInactive===!0?`true`:void 0}});return z.parse(n)}async function pu(e,t){let n=await a(e,{path:`/payments/me/activity/group/${encodeURIComponent(t.groupId)}`,bearer:t.bearer});return z.parse(n)}async function mu(e,t){let n=await a(e,{path:`/payments/chains`,bearer:t.bearer});return Lt.parse(n)}async function hu(e,t){let n=await a(e,{path:`/payments/me/outstanding`,bearer:t.bearer,query:{chain:t.chain}});return cn.parse(n)}async function gu(e,t){let n=await a(e,{path:`/payments/me`,bearer:t.bearer,query:{status:t.status,limit:t.limit,before:t.before}});return zt.parse(n)}async function _u(e){let t=await a(e,{path:`/payments/rates`});return Ao.parse(t)}async function vu(e,t){let n=await a(e,{path:`/me/developer/keys`,method:`POST`,bearer:t.bearer,body:t.body});return _s.parse(n)}async function yu(e,t){let n=await a(e,{path:`/me/developer/keys`,method:`GET`,bearer:t.bearer});return gs.parse(n)}async function bu(e,t){let n=await a(e,{path:`/me/developer/keys/${encodeURIComponent(t.id)}`,method:`DELETE`,bearer:t.bearer});return vs.parse(n)}async function xu(e,t){let n=await a(e,{path:`/me/developer/apps`,method:`POST`,bearer:t.bearer,body:t.body});return ys.parse(n)}async function Su(e,t){let n=await a(e,{path:`/me/developer/apps/${encodeURIComponent(t.id)}`,method:`PATCH`,bearer:t.bearer,body:t.body});return xs.parse(n)}async function Cu(e,t){let n=await a(e,{path:`/me/developer/apps/${encodeURIComponent(t.id)}`,method:`DELETE`,bearer:t.bearer});return bs.parse(n)}async function wu(e,t){let n=await $(e,{path:`/me/developer/apps/${encodeURIComponent(t.id)}/logo`,bearer:t.bearer,file:t.file,filename:t.filename,contentType:t.contentType});return Cs.parse(n)}async function Tu(e,t){let n=await a(e,{path:`/me/developer/apps/${encodeURIComponent(t.id)}/logo`,method:`DELETE`,bearer:t.bearer});return Ss.parse(n)}async function Eu(e,t){let n=await a(e,{path:`/me/developer/apps/${encodeURIComponent(t.id)}/balances`,bearer:t.bearer});return ws.parse(n)}async function Du(e,t){let n=await a(e,{path:`/me/developer/apps/${encodeURIComponent(t.id)}/tron-balance`,bearer:t.bearer});return Ts.parse(n)}async function Ou(e,t){let n=await a(e,{path:`/me/developer/apps/${encodeURIComponent(t.id)}/activity`,bearer:t.bearer,query:{kind:t.kind,direction:t.direction,sort:t.sort,chain:t.chain,limit:t.limit,cursor:t.cursor,before:t.before}});return ks.parse(n)}async function ku(e,t){let n=await a(e,{path:`/me/developer/apps/${encodeURIComponent(t.id)}/earnings`,bearer:t.bearer,query:{range:t.range,chain:t.chain}});return Es.parse(n)}async function Au(e,t){let n=await a(e,{path:`/me/developer/apps/${encodeURIComponent(t.id)}/playtime`,bearer:t.bearer,query:{range:t.range}});return Ds.parse(n)}async function ju(e,t){let n=await a(e,{path:`/me/developer/apps/${encodeURIComponent(t.id)}/overview`,bearer:t.bearer});return Os.parse(n)}async function Mu(e,t){let n=await a(e,{path:`/me/developer/apps/${encodeURIComponent(t.id)}/wallets`,bearer:t.bearer});return As.parse(n)}async function Nu(e,t){let n=await a(e,{path:`/me/developer/apps/${encodeURIComponent(t.id)}/wallets/${encodeURIComponent(t.chain)}/auto-sweep`,method:`PATCH`,bearer:t.bearer,body:t.body});return js.parse(n)}async function Pu(e,t){let n=await a(e,{path:`/me/developer/apps/${encodeURIComponent(t.id)}/wallets/${encodeURIComponent(t.chain)}/provision`,method:`POST`,bearer:t.bearer});return Ms.parse(n)}async function Fu(e,t){let n=await a(e,{path:`/me/developer/apps/${encodeURIComponent(t.id)}/wallets/${encodeURIComponent(t.chain)}/withdraw`,method:`POST`,bearer:t.bearer,query:{token:t.token}});return Ns.parse(n)}async function Iu(e,t){let n=await a(e,{path:`/me/developer/apps/${encodeURIComponent(t.id)}/wallets/${encodeURIComponent(t.chain)}/consolidate`,method:`POST`,bearer:t.bearer});return Ps.parse(n)}async function Lu(e,t){let n=await a(e,{path:`/me/developer/apps/${encodeURIComponent(t.id)}/keys/${encodeURIComponent(t.env)}`,method:`PUT`,bearer:t.bearer});return Fs.parse(n)}async function Ru(e,t){let n=await a(e,{path:`/me/developer/apps/${encodeURIComponent(t.id)}/production-request`,method:`POST`,bearer:t.bearer,body:t.body});return Is.parse(n)}async function zu(e,t){let n=await a(e,{path:`/me/developer/apps/${encodeURIComponent(t.id)}/payment-status-webhook/secret`,method:`POST`,bearer:t.bearer});return Ls.parse(n)}async function Bu(e,t){let n=await a(e,{path:`/me/developer/payments/appeals`,bearer:t.bearer,query:{chain:t.chain}});return Rs.parse(n)}async function Vu(e,t){let n=await a(e,{path:`/me/developer/payments/pending-deposits`,bearer:t.bearer,query:{chain:t.chain}});return zs.parse(n)}async function Hu(e,t){let n=await a(e,{path:`/me/developer/payments/tron-balance`,bearer:t.bearer});return Bs.parse(n)}async function Uu(e,t){let n=await a(e,{path:`/me/developer/apps/${encodeURIComponent(t.id)}/reports`,bearer:t.bearer,query:{status:t.status,limit:t.limit,offset:t.offset}});return Ho.parse(n)}async function Wu(e,t){let n=await a(e,{path:`/me/developer/apps/${encodeURIComponent(t.id)}/reports/${encodeURIComponent(t.reportId)}`,method:`PATCH`,bearer:t.bearer,body:{status:t.status}});return Uo.parse(n)}async function Gu(e,t){let n=await a(e,{path:`/me/developer/apps/${encodeURIComponent(t.appId)}/inventory/items/quote`,method:`POST`,bearer:t.bearer,body:t.registration});return Qo.parse(n)}async function Ku(e,t){let n=await a(e,{path:`/me/developer/apps/${encodeURIComponent(t.appId)}/inventory/items`,method:`POST`,bearer:t.bearer,body:t.registration});return es.parse(n)}async function qu(e,t){let n=await a(e,{path:`/me/developer/apps/${encodeURIComponent(t.appId)}/inventory/collections`,bearer:t.bearer});return Zo.parse(n)}async function Ju(e,t){let n=await a(e,{path:`/me/developer/apps/${encodeURIComponent(t.appId)}/inventory/items`,bearer:t.bearer});return $o.parse(n)}async function Yu(e,t){let n=await a(e,{path:`/me/developer/apps/${encodeURIComponent(t.appId)}/inventory/items/${encodeURIComponent(t.itemId)}/permits`,method:`POST`,bearer:t.bearer,body:t.grant});return ts.parse(n)}async function Xu(e,t){let n=await a(e,{path:`/me/developer/apps/${encodeURIComponent(t.appId)}/inventory/items/${encodeURIComponent(t.itemId)}/holders`,bearer:t.bearer});return ns.parse(n)}async function Zu(e,t){let n=await $(e,{path:`/me/developer/apps/${encodeURIComponent(t.appId)}/inventory/items/${encodeURIComponent(t.itemId)}/image`,bearer:t.bearer,file:t.file,filename:t.filename,contentType:t.contentType});return rs.parse(n)}async function Qu(e,t){let n=await $(e,{path:`/me/developer/apps/${encodeURIComponent(t.appId)}/inventory/items/${encodeURIComponent(t.itemId)}/banner`,bearer:t.bearer,file:t.file,filename:t.filename,contentType:t.contentType});return is.parse(n)}async function $u(e,t){let n=await a(e,{path:`/me/developer/apps/${encodeURIComponent(t.appId)}/page`,bearer:t.bearer});return ec.parse(n)}async function ed(e,t){let n=await a(e,{path:`/me/developer/apps/${encodeURIComponent(t.appId)}/page`,method:`PATCH`,bearer:t.bearer,body:t.body});return tc.parse(n)}async function td(e,t){let n=await $(e,{path:`/me/developer/apps/${encodeURIComponent(t.appId)}/page/banner`,bearer:t.bearer,file:t.file,filename:t.filename,contentType:t.contentType});return nc.parse(n)}async function nd(e,t){await s(e,{path:`/me/developer/apps/${encodeURIComponent(t.appId)}/page/banner`,method:`DELETE`,bearer:t.bearer})}async function rd(e,t){let n=await $(e,{path:`/me/developer/apps/${encodeURIComponent(t.appId)}/page/thumbnail`,bearer:t.bearer,file:t.file,filename:t.filename,contentType:t.contentType});return rc.parse(n)}async function id(e,t){await s(e,{path:`/me/developer/apps/${encodeURIComponent(t.appId)}/page/thumbnail`,method:`DELETE`,bearer:t.bearer})}async function ad(e,t){let n=await $(e,{path:`/me/developer/apps/${encodeURIComponent(t.appId)}/page/thumbnail-video`,bearer:t.bearer,file:t.file,filename:t.filename,contentType:t.contentType});return ic.parse(n)}async function od(e,t){await s(e,{path:`/me/developer/apps/${encodeURIComponent(t.appId)}/page/thumbnail-video`,method:`DELETE`,bearer:t.bearer})}async function sd(e,t){let n=await $(e,{path:`/me/developer/apps/${encodeURIComponent(t.appId)}/page/gallery`,bearer:t.bearer,file:t.file,filename:t.filename,contentType:t.contentType});return ac.parse(n)}async function cd(e,t){let n=await a(e,{path:`/me/developer/apps/${encodeURIComponent(t.appId)}/page/submit-for-review`,method:`POST`,bearer:t.bearer});return oc.parse(n)}async function ld(e,t){let n=await a(e,{path:`/me/developer/apps/${encodeURIComponent(t.appId)}/page/unpublish`,method:`POST`,bearer:t.bearer});return sc.parse(n)}async function ud(e,t){let n=await a(e,{path:`/me/developer/apps/${encodeURIComponent(t.appId)}/page/bip`,method:`PATCH`,bearer:t.bearer,body:t.body});return cc.parse(n)}async function dd(e,t){let n=await a(e,{path:`/me/developer/apps/${encodeURIComponent(t.appId)}/page/bip/submit-for-review`,method:`POST`,bearer:t.bearer});return lc.parse(n)}async function fd(e,t){let n=await a(e,{path:`/me/developer/apps/${encodeURIComponent(t.appId)}/page/bip/unpublish`,method:`POST`,bearer:t.bearer});return uc.parse(n)}async function pd(e,t){let n=await a(e,{path:`/me/developer/apps/${encodeURIComponent(t.id)}/participants`,method:`GET`,bearer:t.bearer});return Vs.parse(n)}async function md(e,t){let n=await a(e,{path:`/me/developer/apps/${encodeURIComponent(t.id)}/participants`,method:`POST`,bearer:t.bearer,body:t.body});return Hs.parse(n)}async function hd(e,t){let n=await a(e,{path:`/me/developer/apps/${encodeURIComponent(t.id)}/participants/${encodeURIComponent(t.userId)}`,method:`DELETE`,bearer:t.bearer});return Us.parse(n)}async function gd(e,t){let n=await a(e,{path:`/me/developer/invites`,method:`GET`,bearer:t.bearer});return Ws.parse(n)}async function _d(e,t){let n=await a(e,{path:`/me/developer/invites/${encodeURIComponent(t.appId)}/accept`,method:`POST`,bearer:t.bearer});return Gs.parse(n)}async function vd(e,t){let n=await a(e,{path:`/me/developer/invites/${encodeURIComponent(t.appId)}/decline`,method:`POST`,bearer:t.bearer});return Ks.parse(n)}async function yd(e,t){let n=await a(e,{path:`/me/developer/apps/${encodeURIComponent(t.appId)}/inventory/items/${encodeURIComponent(t.itemId)}/vault-permits`,method:`POST`,bearer:t.bearer,body:t.grant});return as.parse(n)}async function bd(e,t){let n=await a(e,{path:`/me/developer/apps/${encodeURIComponent(t.appId)}/inventory/items/${encodeURIComponent(t.itemId)}/withdraw-permits`,method:`POST`,bearer:t.bearer,body:t.grant});return os.parse(n)}async function xd(e,t){let n=await a(e,{path:`/me/inventory`,bearer:t.bearer});return Kr.parse(n)}async function Sd(e,t){let n=await a(e,{path:`/oauth/inventory`,bearer:t.bearer});return Kr.parse(n)}async function Cd(e,t){let n=await a(e,{path:`/me/inventory/nft-transfers/quote`,method:`POST`,bearer:t.bearer,body:t.body});return ds.parse(n)}async function wd(e,t){let n=await a(e,{path:`/me/inventory/nft-transfers`,method:`POST`,bearer:t.bearer,body:t.body});return fs.parse(n)}async function Td(e,t){let n=await a(e,{path:`/me/inventory/permits`,bearer:t.bearer});return Yo.parse(n)}async function Ed(e,t){let n=await a(e,{path:`/me/inventory/permits/${encodeURIComponent(t.permitId)}/redeem`,method:`POST`,bearer:t.bearer});return Xo.parse(n)}async function Dd(e,t){let n=await a(e,{path:`/oauth/inventory/mint`,method:`POST`,bearer:t.appBearer,body:t.body});return Yr.parse(n)}async function Od(e,t){let n=await a(e,{path:`/me/inventory/vault-permits`,bearer:t.bearer});return ss.parse(n)}async function kd(e,t){let n=await a(e,{path:`/me/inventory/vault-permits/${encodeURIComponent(t.permitId)}/sign`,method:`POST`,bearer:t.bearer});return cs.parse(n)}async function Ad(e,t){let n=await a(e,{path:`/me/inventory/vault-permits/${encodeURIComponent(t.permitId)}/relayed/quote`,method:`POST`,bearer:t.bearer});return ls.parse(n)}async function jd(e,t){let n=await a(e,{path:`/me/inventory/vault-permits/${encodeURIComponent(t.permitId)}/relayed/submit`,method:`POST`,bearer:t.bearer,body:t.body});return us.parse(n)}async function Md(e,t){let n=await a(e,{path:`/me/inventory/vaulted`,bearer:t.bearer});return ps.parse(n)}async function Nd(e,t){let n=await a(e,{path:`/oauth/inventory/vaulted`,bearer:t.bearer});return ms.parse(n)}async function Pd(e,t){let n=await a(e,{path:`/me/dm-key-backup`,bearer:t.bearer});return Dr.parse(n)}async function Fd(e,t){let n=await a(e,{path:`/me/dm-key-backup`,method:`POST`,bearer:t.bearer,body:t.body});return Or.parse(n)}async function Id(e,t){let n=await a(e,{path:`/me/dm-key-backup/unlock`,method:`POST`,bearer:t.bearer,body:t.body});return kr.parse(n)}async function Ld(e,t){let n=await a(e,{path:`/me/dm-key`,method:`PUT`,bearer:t.bearer,body:t.body});return wr.parse(n)}async function Rd(e,n){try{let t=await a(e,{path:`/me/dm-key`,bearer:n.bearer});return wr.parse(t)}catch(e){if(e instanceof t&&e.status===404)return null;throw e}}async function zd(e,t){let n=await a(e,{path:`/me/threads/${encodeURIComponent(t.threadId)}/dm-key`,bearer:t.bearer});return wr.parse(n)}async function Bd(e,t){let n=await a(e,{path:`/me/threads/dm-keys`,method:`POST`,bearer:t.bearer,body:{threadIds:[...t.threadIds]}});return Er.parse(n)}async function Vd(e,t){let n=new FormData,r=t.file instanceof Blob?t.file:new Blob([t.file],{type:t.contentType});n.append(`file`,r,t.filename);let i=await e.fetch(`${Ud(e.issuer)}/me/threads/${encodeURIComponent(t.threadId)}/logo`,{method:`POST`,headers:{authorization:`Bearer ${t.bearer}`},body:n});if(!i.ok){let e=await i.text();throw Error(`tron ${i.status}: ${e}`)}let a=await i.json();return U.parse(a)}async function Hd(e,t){let n=await a(e,{path:`/me/threads/${encodeURIComponent(t.threadId)}/logo`,method:`DELETE`,bearer:t.bearer});return U.parse(n)}function Ud(e){return e.endsWith(`/`)?e.slice(0,-1):e}async function Wd(e,t){let n=await a(e,{path:`/me/threads/${encodeURIComponent(t.threadId)}/messages/${encodeURIComponent(t.messageId)}`,method:`DELETE`,bearer:t.bearer});return H.parse(n)}async function Gd(e,t){let n=await a(e,{path:`/me/threads/${encodeURIComponent(t.threadId)}/messages/${encodeURIComponent(t.messageId)}`,method:`PATCH`,bearer:t.bearer,body:t.body});return gr.parse(n)}async function Kd(e,t){let n=await a(e,{path:`/me/threads/${encodeURIComponent(t.threadId)}/messages/${encodeURIComponent(t.messageId)}/reactions/${encodeURIComponent(t.emoji)}`,method:`PUT`,bearer:t.bearer});return br.parse(n)}async function qd(e,t){let n=await a(e,{path:`/me/threads/${encodeURIComponent(t.threadId)}/messages/${encodeURIComponent(t.messageId)}/reactions/${encodeURIComponent(t.emoji)}`,method:`DELETE`,bearer:t.bearer});return br.parse(n)}async function Jd(e,t){let n=await a(e,{path:`/me/threads/${encodeURIComponent(t.threadId)}/participants/${encodeURIComponent(t.userId)}`,method:`DELETE`,bearer:t.bearer});return U.parse(n)}async function Yd(e,t){let n=await a(e,{path:`/me/threads/${encodeURIComponent(t.threadId)}/participants/${encodeURIComponent(t.userId)}/role`,method:`PATCH`,bearer:t.bearer,body:t.body});return U.parse(n)}async function Xd(e,t){let n=await a(e,{path:`/me/threads/${encodeURIComponent(t.threadId)}`,method:`DELETE`,bearer:t.bearer});return H.parse(n)}async function Zd(e,t){let n=await a(e,{path:`/me/threads/${encodeURIComponent(t.threadId)}`,method:`PATCH`,bearer:t.bearer,body:t.body});return U.parse(n)}async function Qd(e,t){let n=await a(e,{path:`/me/threads/${encodeURIComponent(t.threadId)}/hide`,method:`POST`,bearer:t.bearer});return H.parse(n)}async function $d(e,t){let n=await a(e,{path:`/me/threads/${encodeURIComponent(t.threadId)}/invite`,method:`POST`,bearer:t.bearer,body:t.body});return U.parse(n)}async function ef(e,t){let n=await a(e,{path:`/me/threads/${encodeURIComponent(t.threadId)}/leave`,method:`POST`,bearer:t.bearer});return H.parse(n)}async function tf(e,t){let n=await a(e,{path:`/me/threads/${encodeURIComponent(t.threadId)}/pin`,method:`POST`,bearer:t.bearer});return xr.parse(n)}async function nf(e,t){let n=await a(e,{path:`/me/threads/${encodeURIComponent(t.threadId)}/pin`,method:`DELETE`,bearer:t.bearer});return H.parse(n)}async function rf(e){let t=await a(e,{path:`/.well-known/oauth-authorization-server`});return de.parse(t)}function af(e){let t=e.endsWith(`/`)?e.slice(0,-1):e;return{authorize:`${t}/oauth/authorize`,token:`${t}/oauth/token`,userinfo:`${t}/userinfo`,revoke:`${t}/oauth/revoke`}}async function of(){let e=uf(lf(32));return{codeVerifier:e,codeChallenge:await sf(e)}}async function sf(e){let t=new TextEncoder().encode(e),n=await crypto.subtle.digest(`SHA-256`,t);return uf(new Uint8Array(n))}function cf(e=32){return uf(lf(e))}function lf(e){let t=new Uint8Array(e);return crypto.getRandomValues(t),t}function uf(e){let t=``;for(let n of e)t+=String.fromCodePoint(n);return(typeof btoa==`function`?btoa(t):Buffer.from(t,`binary`).toString(`base64`)).replaceAll(`+`,`-`).replaceAll(`/`,`_`).replaceAll(/=+$/g,``)}async function df(e){let t=e.pkce??await of(),n=e.state??cf(),r=new URLSearchParams({response_type:`code`,client_id:e.clientId,redirect_uri:e.redirectUri,scope:e.scopes.join(` `),state:n,code_challenge:t.codeChallenge,code_challenge_method:`S256`});e.forceConsent===!0&&r.set(`prompt`,`consent`);let{authorize:i}=af(e.issuer);return{url:`${i}?${r.toString()}`,state:n,codeVerifier:t.codeVerifier,codeChallenge:t.codeChallenge}}async function ff(e,t){let n={token:t.token,client_id:t.clientId};t.tokenTypeHint!==void 0&&(n.token_type_hint=t.tokenTypeHint),t.clientSecret!==void 0&&(n.client_secret=t.clientSecret),await s(e,{path:`/oauth/revoke`,method:`POST`,form:n})}async function pf(e,t){let n={grant_type:`authorization_code`,code:t.code,redirect_uri:t.redirectUri,code_verifier:t.codeVerifier,client_id:t.clientId};t.clientSecret!==void 0&&(n.client_secret=t.clientSecret);let r=await a(e,{path:`/oauth/token`,method:`POST`,form:n});return _e.parse(r)}async function mf(e,t){let n={grant_type:`refresh_token`,refresh_token:t.refreshToken,client_id:t.clientId};t.clientSecret!==void 0&&(n.client_secret=t.clientSecret),t.scope!==void 0&&(n.scope=t.scope.join(` `));let r=await a(e,{path:`/oauth/token`,method:`POST`,form:n});return _e.parse(r)}function hf(e,t){return{accessToken:t.access_token,refreshToken:t.refresh_token??null,expiresAt:e+t.expires_in*1e3,scope:t.scope??null,tokenType:t.token_type}}async function gf(e,t){let n=await a(e,{path:`/userinfo`,bearer:t.bearer});return Se.parse(n)}async function _f(e,t){let n=await a(e,{path:`/payments/appeals`,method:`POST`,bearer:t.bearer,body:t.body});return jo.parse(n)}async function vf(e,t){let n=await a(e,{path:`/payments/appeals/pot-leg`,method:`POST`,bearer:t.bearer,body:t.body});return jo.parse(n)}async function yf(e,t){let n=await a(e,{path:`/payments/appeals/${encodeURIComponent(t.appealId)}/room`,bearer:t.bearer});return Do.parse(n)}async function bf(e,t){let n=await a(e,{path:`/payments/appeals/${encodeURIComponent(t.appealId)}/room/messages`,method:`POST`,bearer:t.bearer,body:t.body});return Oo.parse(n)}async function xf(e,t){let n=new FormData,r=t.file instanceof Blob?t.file:new Blob([t.file],{type:t.contentType});n.append(`file`,r,t.filename);let i=await e.fetch(`${Sf(e.issuer)}/payments/appeals/${encodeURIComponent(t.appealId)}/room/attachments`,{method:`POST`,headers:{authorization:`Bearer ${t.bearer}`},body:n});if(!i.ok){let e=await i.text();throw Error(`tron ${i.status}: ${e}`)}let a=await i.json();return W.parse(a)}function Sf(e){return e.endsWith(`/`)?e.slice(0,-1):e}async function Cf(e,t){let n=t.idempotencyKey??crypto.randomUUID(),r=await s(e,{path:`/oauth/payments/charge`,method:`POST`,bearer:t.bearer,body:t.body,idempotencyKey:n,raw:!0});if(r.status===402){let e=await c(r),t=Ee.parse(e);return{status:`monthly_limit_exceeded`,currentLimitCents:t.currentLimitCents,monthSpentCents:t.monthSpentCents,attemptedUsdCents:t.attemptedUsdCents,redirectUrl:t.redirectUrl}}if(!r.ok){let e=await r.text();throw Error(`tron ${r.status}: ${e}`)}let i=await c(r);return Te.parse(i)}async function wf(e,t){let n=await a(e,{path:`/oauth/payments/intent/${encodeURIComponent(t.intentId)}`,bearer:t.bearer});return je.parse(n)}async function Tf(e,t){let n=await a(e,{path:`/oauth/payments/intent/${encodeURIComponent(t.intentId)}/sign`,method:`POST`,bearer:t.bearer});return Me.parse(n)}async function Ef(e,t){let n=await a(e,{path:`/oauth/payments/intent/${encodeURIComponent(t.intentId)}/complete`,method:`POST`,bearer:t.bearer,body:t.body});return Ne.parse(n)}async function Df(e,t){let n=await a(e,{path:`/oauth/payments/intent/${encodeURIComponent(t.intentId)}/deny`,method:`POST`,bearer:t.bearer});return Ne.parse(n)}async function Of(e,t){let n=await a(e,{path:`/oauth/payments/intent/${encodeURIComponent(t.intentId)}/solana-prepare`,method:`POST`,bearer:t.bearer});return Ie.parse(n)}async function kf(e,t){let n=await a(e,{path:`/oauth/payments/intent/${encodeURIComponent(t.intentId)}/solana-complete`,method:`POST`,bearer:t.bearer,body:t.body});return Ne.parse(n)}async function Af(e,t){let n=await a(e,{path:`/oauth/payments/limits`,bearer:t.bearer});return De.parse(n)}async function jf(e,t){let n=await a(e,{path:`/payments/me/moonpay/availability`,bearer:t.bearer});return ln.parse(n)}async function Mf(e,t){let n=await a(e,{path:`/payments/me/moonpay/buy-url`,method:`POST`,bearer:t.bearer,body:t.body});return un.parse(n)}async function Nf(e,t){let n=await a(e,{path:`/payments/me/moonpay/sell-url`,method:`POST`,bearer:t.bearer,body:t.body});return dn.parse(n)}async function Pf(e,t){let{bearer:n,chain:r,token:i,amount:o,usdCents:s}=t,c=await a(e,{path:`/oauth/payments/price`,bearer:n,query:{chain:r,token:i,amount:o,usdCents:s===void 0?void 0:String(s)}});return Oe.parse(c)}async function Ff(e,t){let n=await a(e,{path:`/oauth/payments/status/${encodeURIComponent(t.intentId)}`,bearer:t.bearer});return ke.parse(n)}async function If(e,t){let n=await a(e,{path:`/payments/me/tron`,bearer:t.bearer});return fn.parse(n)}async function Lf(e,t){let n=await a(e,{path:`/payments/me/tron/ledger${t.before===void 0?``:`?before=${encodeURIComponent(t.before)}`}`,bearer:t.bearer});return mn.parse(n)}async function Rf(e,t){let n=await a(e,{path:`/payments/me/tron/deposit`,method:`POST`,bearer:t.bearer,body:t.body});return hn.parse(n)}async function zf(e,t){let n=await a(e,{path:`/payments/me/tron/transfer`,method:`POST`,bearer:t.bearer,idempotencyKey:t.idempotencyKey??crypto.randomUUID(),body:t.body});return gn.parse(n)}async function Bf(e,t){let n=await a(e,{path:`/payments/me/tron/security`,bearer:t.bearer});return _n.parse(n)}async function Vf(e,t){let n=await a(e,{path:`/payments/me/tron/security`,method:`PUT`,bearer:t.bearer,body:t.setting});return _n.parse(n)}async function Hf(e,t){let n=await a(e,{path:`/payments/me/tron/transfer/challenge`,method:`POST`,bearer:t.bearer,body:t.body});return bn.parse(n)}async function Uf(e,t){let n=await a(e,{path:`/payments/me/tron/connect`,method:`POST`,bearer:t.bearer});return kn.parse(n)}async function Wf(e,t){let n=await a(e,{path:`/payments/me/tron/cashouts`,method:`POST`,bearer:t.bearer,body:t.body});return An.parse(n)}async function Gf(e,t){let n=await a(e,{path:`/payments/me/tron/cashouts`,bearer:t.bearer});return jn.parse(n)}function Kf(e){let t=new URL(e.apiOrigin).origin,n=e.gameOrigin??globalThis.location.origin,r=e.container??document.body,i=e.background??``,a=document.createElement(`iframe`),o=i===``?``:`&bg=${encodeURIComponent(i)}`;a.src=`${t}/presence/embed?client_id=${encodeURIComponent(e.clientId)}&origin=${encodeURIComponent(n)}${o}`,a.title=`Metatron presence`,e.styleIframe?e.styleIframe(a):(a.style.border=`0`,a.style.display=`block`,a.style.width=`190px`,a.style.height=`44px`),i!==``&&(a.style.background=i);let s=null,c=t=>{t===`overlay`?(s??=a.style.cssText,a.style.cssText=`position:fixed;inset:0;width:100%;height:100%;border:0;z-index:2147483646;opacity:1;transition:opacity 160ms ease`):s!==null&&(a.style.cssText=s,s=null),e.onPresentationChange?.(t)},ee=n=>{if(n.origin!==t||n.source!==a.contentWindow)return;let r=n.data;if(r?.source===`tg-presence`)switch(r.kind){case`play-session`:e.onPlaySessionId?.(typeof r.playSessionId==`string`?r.playSessionId:null);break;case`status`:typeof r.status==`string`&&e.onStatus?.(r.status);break;case`auth`:e.onAuthChange?.(r.authenticated===!0);break;case`expand`:c(`overlay`);break;case`collapse`:c(`chip`);break;default:break}};return window.addEventListener(`message`,ee),r.append(a),{destroy(){window.removeEventListener(`message`,ee),a.remove()}}}async function qf(e,t){let n=await a(e,{path:`/me/stats`,bearer:t.bearer});return Hr.parse(n)}async function Jf(e,t){let n=await a(e,{path:`/me/earnings/timeseries`,bearer:t.bearer,query:{days:t.days}});return Wr.parse(n)}async function Yf(e,t){let n=await a(e,{path:`/me/threads`,bearer:t.bearer,query:{limit:t.limit,cursor:t.cursor}});return sr.parse(n)}async function Xf(e,t){let n=await a(e,{path:`/me/threads`,method:`POST`,bearer:t.bearer,body:t.body});return or.parse(n)}async function Zf(e,t){let n=await a(e,{path:`/me/threads/${encodeURIComponent(t.threadId)}/messages`,bearer:t.bearer,query:{limit:t.limit,cursor:t.cursor}});return _r.parse(n)}async function Qf(e,t){await s(e,{path:`/me/threads/${encodeURIComponent(t.threadId)}/messages`,method:`POST`,bearer:t.bearer,body:t.body})}async function $f(e,t){await s(e,{path:`/me/threads/${encodeURIComponent(t.threadId)}/read`,method:`POST`,bearer:t.bearer})}async function ep(e,t){let n=new FormData,r=t.file instanceof Blob?t.file:new Blob([t.file],{type:t.contentType});n.append(`file`,r,t.filename);let i=await e.fetch(`${tp(e.issuer)}/me/threads/${encodeURIComponent(t.threadId)}/attachments`,{method:`POST`,headers:{authorization:`Bearer ${t.bearer}`},body:n});if(!i.ok){let e=await i.text();throw Error(`tron ${i.status}: ${e}`)}let a=await i.json();return W.parse(a)}function tp(e){return e.endsWith(`/`)?e.slice(0,-1):e}async function np(e,t){let n=await a(e,{path:`/me/notifications`,bearer:t.bearer,query:{limit:t.limit,cursor:t.cursor}});return ki.parse(n)}async function rp(e,t){await s(e,{path:`/me/notifications/${encodeURIComponent(t.notificationId)}`,method:`PATCH`,bearer:t.bearer,body:t.body})}async function ip(e,t){await s(e,{path:`/me/notifications/mark-all-read`,method:`POST`,bearer:t.bearer})}async function ap(e,t){let n=await a(e,{path:`/me/playtime`,bearer:t.bearer});return zr.parse(n)}async function op(e,t){let n=await a(e,{path:`/me/playtime/timeseries`,bearer:t.bearer,query:{days:t.days}});return Vr.parse(n)}async function sp(e,t){let n=await a(e,{path:`/users/${encodeURIComponent(t.handle)}`,bearer:t.bearer});return Ki.parse(n)}async function cp(e,t){let n=await a(e,{path:`/users/search`,bearer:t.bearer,query:{q:t.q,limit:t.limit}});return Ji.parse(n)}async function lp(e,t){let n=await a(e,{path:`/me/referral`,bearer:t.bearer});return Mr.parse(n)}async function up(e,t){let n=await a(e,{path:`/me/referral/code`,method:`POST`,bearer:t.bearer,body:{regenerate:t.regenerate??!1}});return Nr.parse(n)}async function dp(e,t){let n=await a(e,{path:`/me/referral/preview`,query:{code:t.code},bearer:t.bearer});return Pr.parse(n)}async function fp(e,t){let n={code:t.code,source:t.source},r=await a(e,{path:`/me/referral/bind`,method:`POST`,bearer:t.bearer,body:n});return Fr.parse(r)}async function pp(e,t){await s(e,{path:`/users/${encodeURIComponent(t.userId)}/follow`,method:`POST`,bearer:t.bearer})}async function mp(e,t){await s(e,{path:`/users/${encodeURIComponent(t.userId)}/follow`,method:`DELETE`,bearer:t.bearer})}async function hp(e,t){await s(e,{path:`/users/${encodeURIComponent(t.userId)}/friend`,method:`POST`,bearer:t.bearer})}async function gp(e,t){await s(e,{path:`/users/${encodeURIComponent(t.userId)}/friend`,method:`DELETE`,bearer:t.bearer})}async function _p(e,t){await s(e,{path:`/me/friend-requests/${encodeURIComponent(t.requestId)}`,method:`PATCH`,bearer:t.bearer,body:{decision:t.decision}})}async function vp(e,t){await s(e,{path:`/me/friend-requests/${encodeURIComponent(t.requestId)}`,method:`DELETE`,bearer:t.bearer})}async function yp(e,t){let n=await a(e,{path:`/me/friends`,bearer:t.bearer});return Mi.parse(n)}async function bp(e,t){let n=await a(e,{path:`/oauth/friends`,bearer:t.bearer});return Ni.parse(n)}async function xp(e,t){let n=await a(e,{path:`/me/socials`,bearer:t.bearer});return Fi.parse(n)}async function Sp(e,t){let n=await a(e,{path:`/me/wallets`,bearer:t.bearer});return Un.parse(n)}async function Cp(e,t){let n=await a(e,{path:`/me/wallets/${encodeURIComponent(t.address)}/delegate`,bearer:t.bearer});return Vn.parse(n)}async function wp(e,t){let n=await a(e,{path:`/me/wallets/${encodeURIComponent(t.address)}/delegate`,method:`POST`,bearer:t.bearer,body:t.body});return Gn.parse(n)}async function Tp(e,t){let n=await a(e,{path:`/me/wallets/${encodeURIComponent(t.address)}/delegate`,method:`DELETE`,bearer:t.bearer});return Kn.parse(n)}async function Ep(e,t){let n=await a(e,{path:`/me/wallets/${encodeURIComponent(t.address)}`,method:`PATCH`,bearer:t.bearer,body:t.body});return Wn.parse(n)}async function Dp(e,t){let n=await a(e,{path:`/me/wallets`,bearer:t.bearer});return Un.parse(n)}const Op=e.object({event:e.enum([`intent.completed`,`intent.denied`,`intent.expired`,`intent.txhash_indexed`]),deliveredAt:e.iso.datetime(),intent:ke});async function kp(e){let t=e.signatureHeader;if(typeof t!=`string`||t===``)return{ok:!1,reason:`missing_signature`};let n=e.timestampHeader;if(typeof n!=`string`||n===``)return{ok:!1,reason:`missing_timestamp`};let r=Number(n);if(!Number.isFinite(r)||r<=0)return{ok:!1,reason:`invalid_timestamp`};let i=e.toleranceSeconds??300,a=Math.floor((e.now??Date.now())/1e3);if(Math.abs(a-r)>i)return{ok:!1,reason:`stale_timestamp`};if(!jp(await Ap(e.secret,`${n}.${e.rawBody}`),t))return{ok:!1,reason:`signature_mismatch`};let o;try{o=JSON.parse(e.rawBody)}catch{return{ok:!1,reason:`schema_mismatch`}}let s=Op.safeParse(o);return s.success?{ok:!0,body:s.data}:{ok:!1,reason:`schema_mismatch`}}async function Ap(e,t){let n=new TextEncoder,r=await crypto.subtle.importKey(`raw`,n.encode(e),{name:`HMAC`,hash:`SHA-256`},!1,[`sign`]),i=await crypto.subtle.sign(`HMAC`,r,n.encode(t)),a=new Uint8Array(i),o=``;for(let e of a)o+=e.toString(16).padStart(2,`0`);return o}function jp(e,t){let n=e.toLowerCase(),r=t.toLowerCase();if(n.length!==r.length)return!1;let i=0;for(let e=0;e<n.length;e++)i|=n.charCodeAt(e)^r.charCodeAt(e);return i===0}const Mp=`x-metatron-signature`,Np=`x-metatron-timestamp`,Pp=new Set([`localhost`,`127.0.0.1`,`::1`]);function Fp(e,t={}){if(!(t.isProduction??Ip()))return;let n;try{n=new URL(e)}catch{throw Error(`@metatrongg/sdk: invalid issuer URL: ${e}`)}if(n.protocol!==`https:`&&!(n.protocol===`http:`&&Pp.has(n.hostname)))throw Error(`@metatrongg/sdk: issuer must be https:// in production (got ${n.protocol}//${n.host})`)}function Ip(){return typeof process<`u`&&typeof process.env==`object`?process.env.NODE_ENV===`production`:!1}var Lp=class{ctx;clientId;redirectUri;scopes;tokenStore;constructor(e){Fp(e.issuer),this.ctx={issuer:e.issuer,fetch:e.fetch??fetch.bind(globalThis),logger:e.logger??tu(),rateLimiter:e.rateLimit===!1?void 0:uu(e.rateLimit??{}),dedupe:e.dedupe===!1?void 0:eu()},this.clientId=e.clientId,this.redirectUri=e.redirectUri,this.scopes=e.scopes,this.tokenStore=e.tokenStore}get transport(){return this.ctx}get oauth(){return{discover:async()=>await rf(this.ctx),buildAuthorizeUrl:async e=>await df({issuer:this.ctx.issuer,clientId:this.clientId,redirectUri:this.redirectUri,scopes:this.scopes,state:e?.state,forceConsent:e?.forceConsent}),exchangeCode:async e=>{let t=await pf(this.ctx,{code:e.code,redirectUri:this.redirectUri,codeVerifier:e.codeVerifier,clientId:this.clientId}),n=hf(Date.now(),t);return await this.tokenStore?.set(this.clientId,n),n},refresh:async e=>{let t=await mf(this.ctx,{refreshToken:e.refreshToken,clientId:this.clientId,scope:e.scope}),n=hf(Date.now(),t);return await this.tokenStore?.set(this.clientId,n),n},revoke:async e=>{await ff(this.ctx,{token:e.token,tokenTypeHint:e.tokenTypeHint,clientId:this.clientId})},signOut:async e=>{await ff(this.ctx,{token:e.refreshToken,tokenTypeHint:`refresh_token`,clientId:this.clientId}),await this.tokenStore?.clear(this.clientId)},userInfo:async e=>await gf(this.ctx,e),getStoredTokens:async()=>await(this.tokenStore?.get(this.clientId)??Promise.resolve(null))}}get payments(){return{charge:async e=>await Cf(this.ctx,e),limits:async e=>await Af(this.ctx,e),price:async e=>await Pf(this.ctx,e),status:async e=>await Ff(this.ctx,e),intent:{get:async e=>await wf(this.ctx,e),sign:async e=>await Tf(this.ctx,e),complete:async e=>await Ef(this.ctx,e),deny:async e=>await Df(this.ctx,e)}}}get users(){return{get:async e=>await sp(this.ctx,e),search:async e=>await cp(this.ctx,e),follow:async e=>{await pp(this.ctx,e)},unfollow:async e=>{await mp(this.ctx,e)},friendRequest:async e=>{await hp(this.ctx,e)},decideFriendRequest:async e=>{await _p(this.ctx,e)},cancelFriendRequest:async e=>{await vp(this.ctx,e)},friends:async e=>await yp(this.ctx,e),me:async e=>await a(this.ctx,{path:`/me`,bearer:e.bearer})}}get messaging(){return{listThreads:async e=>await Yf(this.ctx,e),createDirect:async e=>await Xf(this.ctx,e),listMessages:async e=>await Zf(this.ctx,e),send:async e=>{await Qf(this.ctx,e)},markRead:async e=>{await $f(this.ctx,e)},uploadAttachment:async e=>await ep(this.ctx,e)}}get notifications(){return{list:async e=>await np(this.ctx,e),markAllRead:async e=>{await ip(this.ctx,e)}}}get wallets(){return{list:async e=>await Sp(this.ctx,e)}}get inventory(){return{list:async e=>await xd(this.ctx,e)}}get socials(){return{list:async e=>await xp(this.ctx,e)}}get referral(){return{get:async e=>await lp(this.ctx,e),createCode:async e=>await up(this.ctx,e),preview:async e=>await dp(this.ctx,e),bind:async e=>await fp(this.ctx,e)}}};function Rp(e={}){if(typeof document>`u`)throw TypeError(`@metatrongg/sdk: cookie token store requires a browser environment`);let t=e.cookieName??`tg_sdk_tokens`,n=e.path??`/`,r=e.secure??!0,i=e.sameSite??`Lax`,a=e.maxAgeSeconds??3600*24*30;function o(e){return`${t}:${e}`}return{async get(e){let t=zp(o(e));if(t===null)return null;try{return JSON.parse(t)}catch{return null}},async set(e,t){Bp(o(e),JSON.stringify(t),{path:n,secure:r,sameSite:i,maxAgeSeconds:a})},async clear(e){Bp(o(e),``,{path:n,secure:r,sameSite:i,maxAgeSeconds:0})}}}function zp(e){let t=`${encodeURIComponent(e)}=`;for(let e of document.cookie.split(`; `))if(e.startsWith(t))return decodeURIComponent(e.slice(t.length));return null}function Bp(e,t,n){let r=[`${encodeURIComponent(e)}=${encodeURIComponent(t)}`,`Path=${n.path}`,`SameSite=${n.sameSite}`,`Max-Age=${n.maxAgeSeconds}`];n.secure&&r.push(`Secure`),document.cookie=r.join(`; `)}export{ou as NOOP_RATE_LIMITER,au as SERVER_RATE_LIMIT_MAX_MUTATING,iu as SERVER_RATE_LIMIT_MAX_READ,ru as SERVER_RATE_LIMIT_WINDOW_MS,r as TRON_WS_CLOSE_CODES,Lp as TronBrowserClient,t as TronError,n as TronOauthError,i as TronWsCloseError,Mp as WEBHOOK_SIGNATURE_HEADER,Np as WEBHOOK_TIMESTAMP_HEADER,_d as acceptDeveloperInvite,al as addAdmin,Qc as addAppealBlacklist,Kd as addReaction,nl as approveTronCashout,Bd as batchThreadDmKeys,fp as bindReferral,df as buildAuthorizeUrl,vp as cancelFriendRequest,Cf as charge,wl as commentOnBipUpdate,Xl as commentOnGameReview,Ef as completePaymentIntent,kf as completePaymentIntentSolana,Iu as consolidateDeveloperAppWallet,Dl as createBipUpdate,nu as createConsoleLogger,Rp as createCookieTokenStore,wp as createDelegation,vu as createDeveloperApiKey,xu as createDeveloperApp,Yu as createDeveloperAppMintPermit,yd as createDeveloperVaultPermit,bd as createDeveloperWithdrawPermit,Xf as createDirectThread,du as createInMemoryTokenStore,eu as createInflightDedup,tu as createNoopLogger,uu as createRateLimiter,up as createReferralCode,Wf as createTronCashout,Uf as createTronConnectOnboarding,Rf as createTronDeposit,zf as createTronTransfer,Hf as createTronTransferChallenge,_p as decideFriendRequest,vd as declineDeveloperInvite,af as defaultEndpoints,nd as deleteAppPageBanner,id as deleteAppPageThumbnail,od as deleteAppPageThumbnailVideo,fc as deleteAvatar,kl as deleteBipUpdate,Tl as deleteBipUpdateComment,Tp as deleteDelegation,Cu as deleteDeveloperApp,Tu as deleteDeveloperAppLogo,hl as deleteDeveloperProfileLogo,vl as deleteDeveloperRequestLogo,Zl as deleteGameReviewComment,$l as deleteGameReviewReply,Wd as deleteMessage,Gl as deleteMyGameReview,Xd as deleteThread,Hd as deleteThreadLogo,Df as denyPaymentIntent,Gd as editMessage,pf as exchangeAuthorizationCode,wd as executeNftTransfer,rf as fetchAuthorizationServerMetadata,gf as fetchUserInfo,_f as fileAppeal,vf as fileAppealPotLeg,pp as followUser,Vc as forceWithdrawVaultCustody,of as generatePkce,cf as generateState,fu as getActivity,pu as getActivityGroup,jc as getAdminAppealRoom,Wc as getAppFeeConfig,dl as getAppPage,Sc as getAppPageChanges,yf as getAppealRoom,Ll as getBipDirectory,Nl as getBipInterestCount,Rl as getBipPage,Cp as getDelegation,Ou as getDeveloperAppActivity,Eu as getDeveloperAppBalances,ku as getDeveloperAppEarnings,Xu as getDeveloperAppInventoryItemHolders,ju as getDeveloperAppOverview,$u as getDeveloperAppPage,Au as getDeveloperAppPlaytime,Du as getDeveloperAppTronBalance,Mu as getDeveloperAppWallets,Bu as getDeveloperPaymentAppeals,Vu as getDeveloperPaymentPendingDeposits,fl as getDeveloperStatus,Hu as getDeveloperTronBalanceSummary,Pd as getDmKeyBackupStatus,Jf as getEarningsTimeseries,Ff as getIntentStatus,Bl as getLibrary,qf as getMeStats,jf as getMoonpayAvailability,Pl as getMyBipEngagement,Sl as getMyBipUpdateReactions,Rd as getMyDmKey,Ul as getMyGameReview,Kl as getMyGameReviewReactions,hu as getOutstanding,mu as getPaymentChains,gu as getPaymentHistory,wf as getPaymentIntent,Af as getPaymentLimits,Pf as getPaymentPrice,_u as getPaymentRates,Hc as getPlatformFees,ap as getPlaytime,op as getPlaytimeTimeseries,sp as getPublicProfile,lp as getReferral,zd as getThreadDmKey,If as getTronBalance,Bf as getTronSecurity,wc as hideAppPage,Oc as hideAppPageBip,Qd as hideThread,md as inviteDeveloperAppParticipant,$d as inviteParticipants,ef as leaveThread,bc as listActivePlayers,Ic as listAdminContentReports,il as listAdmins,xc as listAppPages,el as listAppealBlacklist,Ac as listAppealQueue,ul as listAudit,xl as listBipUpdateComments,bl as listBipUpdates,yu as listDeveloperApiKeys,Uu as listDeveloperAppContentReports,qu as listDeveloperAppInventoryCollections,Ju as listDeveloperAppInventoryItems,pd as listDeveloperAppParticipants,Hl as listDeveloperAppReviews,El as listDeveloperBipUpdates,gd as listDeveloperInvites,Rc as listDeveloperRequests,Bc as listDevelopers,yp as listFriends,bp as listFriendsForApp,Yl as listGameReviewComments,Vl as listGameReviews,xd as listInventory,Sd as listInventoryForApp,Td as listInventoryMintPermits,Od as listInventoryVaultPermits,Md as listInventoryVaulted,np as listNotifications,Nd as listOauthInventoryVaulted,hc as listPaymentAuthorizations,xp as listSocials,Zf as listThreadMessages,Yf as listThreads,tl as listTronCashoutQueue,Gf as listTronCashouts,Lf as listTronLedger,cl as listUsers,Dp as listWalletManager,Sp as listWallets,ip as markAllNotificationsRead,$f as markThreadRead,Mf as mintMoonpayBuyUrl,Nf as mintMoonpaySellUrl,Kf as mountPresenceWidget,Op as oauthPaymentWebhookBodySchema,Al as pinBipUpdate,tf as pinThread,Mc as postAdminAppealRoomMessage,bf as postAppealRoomMessage,Of as preparePaymentIntentSolana,dp as previewReferral,Pu as provisionDeveloperAppWallet,Ld as publishDmKey,Gu as quoteDeveloperAppInventoryRegistration,Cd as quoteNftTransfer,Ad as quoteRelayedVaultPermit,Ed as redeemInventoryMintPermit,mf as refreshAccessToken,Fl as registerBipInterest,Ku as registerDeveloperAppInventoryItem,rl as rejectTronCashout,sl as removeAdmin,$c as removeAppealBlacklist,gp as removeFriend,Jd as removeParticipant,qd as removeReaction,Ql as replyToGameReview,Ru as requestDeveloperAppProduction,Dd as requestMint,Pc as resolveAppeal,Ec as reviewAppPage,Dc as reviewAppPageBip,Cc as reviewAppPageChanges,zc as reviewDeveloperRequest,bu as revokeDeveloperApiKey,hd as revokeDeveloperAppParticipant,_c as revokePaymentAuthorization,ff as revokeToken,Lu as rotateDeveloperAppKey,zu as rotateDeveloperAppPaymentWebhookSecret,qc as rotateProcessorTreasury,mc as searchGiphy,cp as searchUsers,hp as sendFriendRequest,Qf as sendMessage,vc as sendPresenceHeartbeat,ud as setAppPageBip,Cl as setBipUpdateReaction,ql as setMyGameReviewReaction,Kc as setProcessorWhitelist,Vf as setTronSecurity,Jc as setVaultOperator,Yc as setVaultPause,Xc as setVaultWithdrawLockDefault,Zc as setVaultWithdrawLockOverride,Fd as setupDmKeyBackup,sf as sha256Base64Url,kd as signInventoryVaultPermit,Tf as signPaymentIntent,zl as submitAppContentReport,dd as submitAppPageBipForReview,cd as submitAppPageForReview,gl as submitDeveloperRequest,jd as submitRelayedVaultPermit,Il as subscribeBipUpdates,Jl as tipGameReview,hf as toTokenSet,Lc as triageAdminContentReport,mp as unfollowUser,Tc as unhideAppPage,kc as unhideAppPageBip,Id as unlockDmKeyBackup,jl as unpinBipUpdate,nf as unpinThread,ld as unpublishAppPage,fd as unpublishAppPageBip,ol as updateAdminRole,Gc as updateAppFeeConfig,ed as updateAppPage,Ol as updateBipUpdate,Su as updateDeveloperApp,Nu as updateDeveloperAppAutoSweep,Wu as updateDeveloperAppContentReportStatus,pl as updateDeveloperProfile,rp as updateNotification,Yd as updateParticipantRole,gc as updatePaymentAuthorization,Uc as updatePlatformFees,yc as updateProfile,Zd as updateThreadSettings,ll as updateUserBan,Ep as updateWalletLabel,Nc as uploadAdminAppealRoomAttachment,td as uploadAppPageBanner,sd as uploadAppPageGallery,rd as uploadAppPageThumbnail,ad as uploadAppPageThumbnailVideo,xf as uploadAppealRoomAttachment,ep as uploadAttachment,dc as uploadAvatar,Ml as uploadBipUpdateMedia,Qu as uploadDeveloperAppInventoryItemBanner,Zu as uploadDeveloperAppInventoryItemImage,wu as uploadDeveloperAppLogo,ml as uploadDeveloperProfileLogo,_l as uploadDeveloperRequestLogo,$ as uploadMultipart,Vd as uploadThreadLogo,Wl as upsertMyGameReview,kp as verifyWebhook,Fu as withdrawDeveloperAppWallet};
|