@polymarket/bindings 0.1.0-beta.5 → 0.1.0-beta.6

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.
@@ -1 +1 @@
1
- {"version":3,"sources":["../../src/data/common.ts","../../src/data/activity.ts","../../src/data/analytics.ts","../../src/data/leaderboard.ts","../../src/data/portfolio.ts"],"names":["AddressSchema","z","Hash64Schema","ActivityType","ActivityTypeSchema","SideSchema","TimePeriodSchema","LeaderboardCategorySchema","LeaderboardOrderBySchema","OptionalTextSchema","value","TradeSchema","TokenIdSchema","CtfConditionIdSchema","DecimalishSchema","EpochSecondsToMillisecondsSchema","asset","proxyWallet","rest","RawActivitySchema","TxHashSchema","ActivitySchema","normalizeActivity","TradedSchema","ListTradesResponseSchema","ListActivityResponseSchema","activity","base","normalizeActivityBase","expectPresent","inferAmount","field","HolderSchema","MetaHolderSchema","OpenInterestSchema","MarketVolumeSchema","LiveVolumeSchema","ListMarketHoldersResponseSchema","ListOpenInterestResponseSchema","FetchEventLiveVolumeResponseSchema","LeaderboardEntrySchema","BuilderVolumeEntrySchema","IsoDateTimeStringSchema","dt","TraderLeaderboardEntrySchema","ListBuilderLeaderboardResponseSchema","ListBuilderVolumeResponseSchema","ListTraderLeaderboardResponseSchema","ComboPositionStatus","ComboPositionStatusSchema","PositionSchema","IsoCalendarDateStringSchema","oppositeAsset","ClosedPositionSchema","MixedDateTimeStringSchema","ValueSchema","MarketPositionSchema","MetaMarketPositionSchema","ComboPositionMarketEventSchema","event_id","event_slug","event_title","event_image","ComboPositionMarketSchema","market_id","image_url","icon_url","end_date","ComboPositionLegSchema","PositionIdSchema","leg_index","leg_position_id","leg_condition_id","leg_outcome_index","leg_outcome_label","leg_status","leg_resolved_at","leg_current_price","ComboPositionSchema","ComboConditionIdSchema","combo_condition_id","combo_position_id","module_id","user_address","shares_balance","entry_avg_price_usdc","entry_cost_usdc","first_entry_at","resolved_at","legs_total","legs_resolved","legs_pending","ListComboPositionsResponseSchema","PaginationCursorSchema","pagination","ListPositionsResponseSchema","ListClosedPositionsResponseSchema","FetchPortfolioValueResponseSchema","ListMarketPositionsResponseSchema"],"mappings":"2GAEO,IAAMA,CAAAA,CAAgBC,GAAAA,CAAE,MAAA,EAAO,CACzBC,EAAeD,GAAAA,CAAE,MAAA,EAAO,CAEzBE,CAAAA,CAAAA,CAAAA,CAAAA,GACVA,CAAAA,CAAA,KAAA,CAAQ,QACRA,CAAAA,CAAA,KAAA,CAAQ,OAAA,CACRA,CAAAA,CAAA,KAAA,CAAQ,OAAA,CACRA,EAAA,MAAA,CAAS,QAAA,CACTA,CAAAA,CAAA,MAAA,CAAS,QAAA,CACTA,CAAAA,CAAA,WAAa,YAAA,CACbA,CAAAA,CAAA,YAAA,CAAe,cAAA,CACfA,CAAAA,CAAA,eAAA,CAAkB,kBAClBA,CAAAA,CAAA,KAAA,CAAQ,OAAA,CATEA,CAAAA,CAAAA,EAAAA,CAAAA,EAAA,EAAA,CAAA,CAYCC,CAAAA,CAAqBH,GAAAA,CAAE,IAAA,CAAKE,CAAY,CAAA,CAExCE,CAAAA,CAAaJ,GAAAA,CAAE,IAAA,CAAK,CAAC,MAAO,MAAM,CAAC,CAAA,CAEnCK,EAAAA,CAAmBL,GAAAA,CAAE,IAAA,CAAK,CAAC,KAAA,CAAO,MAAA,CAAQ,OAAA,CAAS,KAAK,CAAC,CAAA,CAEzDM,GAA4BN,GAAAA,CAAE,IAAA,CAAK,CAC9C,SAAA,CACA,UAAA,CACA,QAAA,CACA,SACA,SAAA,CACA,UAAA,CACA,SAAA,CACA,WAAA,CACA,MAAA,CACA,SACF,CAAC,CAAA,CAEYO,EAAAA,CAA2BP,GAAAA,CAAE,IAAA,CAAK,CAAC,KAAA,CAAO,KAAK,CAAC,EC6I7D,IAAMQ,CAAAA,CAAqBR,GAAAA,CAAE,UAAA,CAC1BS,GAAWA,CAAAA,GAAU,EAAA,CAAK,MAAA,CAAYA,CAAAA,CACvCT,GAAAA,CAA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E,MAAA,EAAO,CAAE,GAAA,EAAI,CACtB,MAAA,CAAQA,GAAAA,CAAE,MAAA,EAAO,CAAE,GAAA,EAAI,CACvB,QAAA,CAAUA,GAAAA,CAAE,OAAA,GACZ,WAAA,CAAa4F,EAAAA,CAAuB,OAAA,EACtC,CAAC,CACH,CAAC,CAAA,CACA,SAAA,CAAU,CAAC,CAAE,UAAA,CAAAC,CAAAA,CAAY,GAAG5E,CAAK,CAAA,IAAO,CACvC,GAAGA,CAAAA,CACH,UAAA,CAAY,CACV,KAAA,CAAO4E,CAAAA,CAAW,KAAA,CAClB,MAAA,CAAQA,CAAAA,CAAW,MAAA,CACnB,QAASA,CAAAA,CAAW,QAAA,CACpB,UAAA,CAAYA,CAAAA,CAAW,WACzB,CACF,EAAE,CAAA,CAESC,EAAAA,CAA8B9F,GAAAA,CAAE,KAAA,CAAMiD,CAAc,CAAA,CACpD8C,GAAoC/F,GAAAA,CAAE,KAAA,CAAMoD,CAAoB,CAAA,CAChE4C,EAAAA,CAAoChG,GAAAA,CAAE,KAAA,CAAMsD,EAAW,CAAA,CACvD2C,EAAAA,CAAoCjG,GAAAA,CAAE,KAAA,CACjDwD,EACF","file":"index.js","sourcesContent":["import { z } from 'zod';\n\nexport const AddressSchema = z.string();\nexport const Hash64Schema = z.string();\n\nexport enum ActivityType {\n TRADE = 'TRADE',\n SPLIT = 'SPLIT',\n MERGE = 'MERGE',\n REDEEM = 'REDEEM',\n REWARD = 'REWARD',\n CONVERSION = 'CONVERSION',\n MAKER_REBATE = 'MAKER_REBATE',\n REFERRAL_REWARD = 'REFERRAL_REWARD',\n YIELD = 'YIELD',\n}\n\nexport const ActivityTypeSchema = z.enum(ActivityType);\n\nexport const SideSchema = z.enum(['BUY', 'SELL']);\n\nexport const TimePeriodSchema = z.enum(['DAY', 'WEEK', 'MONTH', 'ALL']);\n\nexport const LeaderboardCategorySchema = z.enum([\n 'OVERALL',\n 'POLITICS',\n 'SPORTS',\n 'CRYPTO',\n 'CULTURE',\n 'MENTIONS',\n 'WEATHER',\n 'ECONOMICS',\n 'TECH',\n 'FINANCE',\n]);\n\nexport const LeaderboardOrderBySchema = z.enum(['PNL', 'VOL']);\n\nexport type Address = z.infer<typeof AddressSchema>;\nexport type Hash64 = z.infer<typeof Hash64Schema>;\nexport type Side = z.infer<typeof SideSchema>;\nexport type TimePeriod = z.infer<typeof TimePeriodSchema>;\nexport type LeaderboardCategory = z.infer<typeof LeaderboardCategorySchema>;\nexport type LeaderboardOrderBy = z.infer<typeof LeaderboardOrderBySchema>;\n","import { z } from 'zod';\nimport {\n type CtfConditionId,\n CtfConditionIdSchema,\n DecimalishSchema,\n type DecimalString,\n type EpochMilliseconds,\n EpochSecondsToMillisecondsSchema,\n type TokenId,\n TokenIdSchema,\n type TxHash,\n TxHashSchema,\n} from '../shared';\nimport {\n ActivityType,\n ActivityTypeSchema,\n type Address,\n AddressSchema,\n type Side,\n SideSchema,\n} from './common';\n\nexport type ActivityBase = {\n /** Wallet address whose account history contains this activity. */\n wallet: Address;\n /** Activity time as Unix epoch milliseconds. */\n timestamp: EpochMilliseconds;\n /** Polygon transaction hash that produced or records this activity. */\n transactionHash: TxHash;\n /** Display name of the wallet owner at the time returned by the API. */\n name: string | null;\n /** Public pseudonym of the wallet owner at the time returned by the API. */\n pseudonym: string | null;\n /** Profile biography of the wallet owner at the time returned by the API. */\n bio: string | null;\n /** Source profile image URL for the wallet owner. */\n profileImage: string | null;\n /** Optimized profile image URL for the wallet owner. */\n profileImageOptimized: string | null;\n};\n\nexport type TradeActivity = ActivityBase & {\n /** A directional outcome-token trade. */\n type: 'TRADE';\n /** Condition id of the market traded by the wallet. */\n conditionId: CtfConditionId;\n /** Outcome token id bought or sold by the wallet. */\n tokenId: TokenId;\n /** Direction of the wallet's trade in the outcome token. */\n side: Side;\n /** Number of outcome-token shares traded by the wallet. */\n shares: DecimalString;\n /** The notional value of the traded shares in USD. */\n amount: DecimalString;\n /** The execution price per outcome-token share in USD. */\n price: DecimalString;\n /** Display label of the outcome token traded by the wallet. */\n outcome: string;\n /** Zero-based index of the outcome token in the market's outcome list. */\n outcomeIndex: number;\n /** Human-readable title of the market traded by the wallet. */\n title: string;\n /** URL slug of the market traded by the wallet. */\n slug: string;\n /** Icon URL for the market traded by the wallet, when available. */\n icon: string | null;\n /** URL slug of the event containing the traded market. */\n eventSlug: string;\n};\n\nexport type SplitActivity = ActivityBase & {\n /** Splitting collateral into a complete market set. */\n type: 'SPLIT';\n /** Condition id of the market whose complete set was created. */\n conditionId: CtfConditionId;\n /** The collateral amount split into the complete set in USD. */\n amount: DecimalString;\n /** Human-readable title of the market whose complete set was created. */\n title: string;\n /** URL slug of the market whose complete set was created. */\n slug: string;\n /** Icon URL for the market whose complete set was created, when available. */\n icon: string | null;\n /** URL slug of the event containing the split market. */\n eventSlug: string;\n};\n\nexport type MergeActivity = ActivityBase & {\n /** Merging a complete market set into collateral. */\n type: 'MERGE';\n /** Condition id of the market whose complete set was merged. */\n conditionId: CtfConditionId;\n /** The collateral amount received from merging the complete set in USD. */\n amount: DecimalString;\n /** Human-readable title of the market whose complete set was merged. */\n title: string;\n /** URL slug of the market whose complete set was merged. */\n slug: string;\n /** Icon URL for the market whose complete set was merged, when available. */\n icon: string | null;\n /** URL slug of the event containing the merged market. */\n eventSlug: string;\n};\n\nexport type RedeemActivity = ActivityBase & {\n /** Redeeming resolved market proceeds. */\n type: 'REDEEM';\n /** Condition id of the market redeemed by the wallet. */\n conditionId: CtfConditionId;\n /** The proceeds redeemed from the resolved market in USD. */\n amount: DecimalString;\n /** Human-readable title of the market redeemed by the wallet. */\n title: string;\n /** URL slug of the market redeemed by the wallet. */\n slug: string;\n /** Icon URL for the market redeemed by the wallet, when available. */\n icon: string | null;\n /** URL slug of the event containing the redeemed market. */\n eventSlug: string;\n};\n\nexport type ConversionActivity = ActivityBase & {\n /** A market conversion or migration activity. */\n type: 'CONVERSION';\n /** Condition id of the market involved in the conversion. */\n conditionId: CtfConditionId;\n /** The amount converted or migrated for the market in USD. */\n amount: DecimalString;\n /** Human-readable title of the market involved in the conversion. */\n title: string;\n /** URL slug of the market involved in the conversion. */\n slug: string;\n /** Icon URL for the market involved in the conversion, when available. */\n icon: string | null;\n /** URL slug of the event containing the converted market. */\n eventSlug: string;\n};\n\nexport type RewardActivity = ActivityBase & {\n /** An account-level reward credit. */\n type: 'REWARD';\n /** The reward amount credited to the wallet in USD. */\n amount: DecimalString;\n};\n\nexport type MakerRebateActivity = ActivityBase & {\n /** An account-level maker rebate credit. */\n type: 'MAKER_REBATE';\n /** The maker rebate amount credited to the wallet in USD. */\n amount: DecimalString;\n};\n\nexport type ReferralRewardActivity = ActivityBase & {\n /** An account-level referral reward credit. */\n type: 'REFERRAL_REWARD';\n /** The referral reward amount credited to the wallet in USD. */\n amount: DecimalString;\n};\n\nexport type YieldActivity = ActivityBase & {\n /** An account-level yield credit. */\n type: 'YIELD';\n /** The yield amount credited to the wallet in USD. */\n amount: DecimalString;\n};\n\nexport type Activity =\n | TradeActivity\n | SplitActivity\n | MergeActivity\n | RedeemActivity\n | ConversionActivity\n | RewardActivity\n | MakerRebateActivity\n | ReferralRewardActivity\n | YieldActivity;\n\nconst OptionalTextSchema = z.preprocess(\n (value) => (value === '' ? undefined : value),\n z.string().optional(),\n);\n\nexport const TradeSchema = z\n .object({\n proxyWallet: AddressSchema.nullish(),\n side: SideSchema.nullish(),\n asset: TokenIdSchema.nullish(),\n conditionId: CtfConditionIdSchema.nullish(),\n size: DecimalishSchema.nullish(),\n price: DecimalishSchema.nullish(),\n timestamp: EpochSecondsToMillisecondsSchema.nullish(),\n title: z.string().nullish(),\n slug: z.string().nullish(),\n icon: z.string().nullish(),\n eventSlug: z.string().nullish(),\n outcome: z.string().nullish(),\n outcomeIndex: z.number().int().nullish(),\n name: z.string().nullish(),\n pseudonym: z.string().nullish(),\n bio: z.string().nullish(),\n profileImage: z.string().nullish(),\n profileImageOptimized: z.string().nullish(),\n transactionHash: z.string().nullish(),\n })\n .transform(({ asset, proxyWallet, ...rest }) => ({\n ...rest,\n wallet: proxyWallet,\n tokenId: asset,\n }));\n\nconst RawActivitySchema = z.object({\n proxyWallet: AddressSchema.nullish(),\n timestamp: EpochSecondsToMillisecondsSchema.nullish(),\n conditionId: z.preprocess(\n (value) => (value === '' ? undefined : value),\n CtfConditionIdSchema.optional(),\n ),\n type: ActivityTypeSchema,\n size: DecimalishSchema.nullish(),\n usdcSize: DecimalishSchema.nullish(),\n transactionHash: TxHashSchema.nullish(),\n price: DecimalishSchema.nullish(),\n asset: z.preprocess(\n (value) => (value === '' ? undefined : value),\n TokenIdSchema.optional(),\n ),\n side: z.preprocess(\n (value) => (value === '' ? undefined : value),\n SideSchema.nullish(),\n ),\n outcomeIndex: z.preprocess(\n (value) => (value === 999 ? undefined : value),\n z.number().int().optional(),\n ),\n title: OptionalTextSchema,\n slug: OptionalTextSchema,\n icon: OptionalTextSchema,\n eventSlug: OptionalTextSchema,\n outcome: OptionalTextSchema,\n name: OptionalTextSchema,\n pseudonym: OptionalTextSchema,\n bio: OptionalTextSchema,\n profileImage: OptionalTextSchema,\n profileImageOptimized: OptionalTextSchema,\n});\n\nexport const ActivitySchema: z.ZodType<Activity> =\n RawActivitySchema.transform(normalizeActivity);\n\nexport const TradedSchema = z.object({\n user: AddressSchema.nullish(),\n traded: z.number().int().nullish(),\n});\n\nexport const ListTradesResponseSchema = z.array(TradeSchema);\nexport const ListActivityResponseSchema = z.array(ActivitySchema);\n\nexport type Trade = z.infer<typeof TradeSchema>;\nexport type Traded = z.infer<typeof TradedSchema>;\nexport type ListTradesResponse = z.infer<typeof ListTradesResponseSchema>;\nexport type ListActivityResponse = z.infer<typeof ListActivityResponseSchema>;\n\ntype RawActivity = z.infer<typeof RawActivitySchema>;\n\nfunction normalizeActivity(activity: RawActivity): Activity {\n const base = normalizeActivityBase(activity);\n\n switch (activity.type) {\n case ActivityType.TRADE:\n return {\n ...base,\n type: activity.type,\n conditionId: expectPresent(activity.conditionId, 'conditionId'),\n tokenId: expectPresent(activity.asset, 'asset'),\n side: expectPresent(activity.side, 'side'),\n shares: expectPresent(activity.size, 'size'),\n amount: inferAmount(activity),\n price: expectPresent(activity.price, 'price'),\n outcome: expectPresent(activity.outcome, 'outcome'),\n outcomeIndex: expectPresent(activity.outcomeIndex, 'outcomeIndex'),\n title: expectPresent(activity.title, 'title'),\n slug: expectPresent(activity.slug, 'slug'),\n icon: activity.icon ?? null,\n eventSlug: expectPresent(activity.eventSlug, 'eventSlug'),\n };\n case ActivityType.SPLIT:\n case ActivityType.MERGE:\n case ActivityType.REDEEM:\n case ActivityType.CONVERSION:\n return {\n ...base,\n type: activity.type,\n conditionId: expectPresent(activity.conditionId, 'conditionId'),\n amount: inferAmount(activity),\n title: expectPresent(activity.title, 'title'),\n slug: expectPresent(activity.slug, 'slug'),\n icon: activity.icon ?? null,\n eventSlug: expectPresent(activity.eventSlug, 'eventSlug'),\n };\n case ActivityType.REWARD:\n case ActivityType.MAKER_REBATE:\n case ActivityType.REFERRAL_REWARD:\n case ActivityType.YIELD:\n return {\n ...base,\n type: activity.type,\n amount: inferAmount(activity),\n };\n }\n}\n\nfunction normalizeActivityBase(activity: RawActivity): ActivityBase {\n return {\n wallet: expectPresent(activity.proxyWallet, 'proxyWallet'),\n timestamp: expectPresent(activity.timestamp, 'timestamp'),\n transactionHash: expectPresent(activity.transactionHash, 'transactionHash'),\n name: activity.name ?? null,\n pseudonym: activity.pseudonym ?? null,\n bio: activity.bio ?? null,\n profileImage: activity.profileImage ?? null,\n profileImageOptimized: activity.profileImageOptimized ?? null,\n };\n}\n\nfunction inferAmount(activity: RawActivity): DecimalString {\n return expectPresent(activity.usdcSize ?? activity.size, 'usdcSize');\n}\n\nfunction expectPresent<T>(value: T | null | undefined, field: string): T {\n if (value === null || value === undefined) {\n throw new TypeError(`Expected activity.${field} to be present`);\n }\n\n return value;\n}\n","import { z } from 'zod';\nimport { DecimalishSchema, TokenIdSchema } from '../shared';\nimport { AddressSchema, Hash64Schema } from './common';\n\nexport const HolderSchema = z\n .object({\n proxyWallet: AddressSchema.nullish(),\n bio: z.string().nullish(),\n asset: TokenIdSchema.nullish(),\n pseudonym: z.string().nullish(),\n amount: DecimalishSchema.nullish(),\n displayUsernamePublic: z.boolean().nullish(),\n outcomeIndex: z.number().int().nullish(),\n name: z.string().nullish(),\n profileImage: z.string().nullish(),\n profileImageOptimized: z.string().nullish(),\n })\n .transform(({ asset, proxyWallet, ...rest }) => ({\n ...rest,\n wallet: proxyWallet,\n tokenId: asset,\n }));\n\nexport const MetaHolderSchema = z.object({\n token: z.string().nullish(),\n holders: z.array(HolderSchema).nullish(),\n});\n\nexport const OpenInterestSchema = z.object({\n market: Hash64Schema.nullish(),\n value: DecimalishSchema.nullish(),\n});\n\nexport const MarketVolumeSchema = z.object({\n market: Hash64Schema.nullish(),\n value: DecimalishSchema.nullish(),\n});\n\nexport const LiveVolumeSchema = z.object({\n total: DecimalishSchema.nullish(),\n markets: z.array(MarketVolumeSchema).nullish(),\n});\n\nexport const ListMarketHoldersResponseSchema = z.array(MetaHolderSchema);\nexport const ListOpenInterestResponseSchema = z.array(OpenInterestSchema);\nexport const FetchEventLiveVolumeResponseSchema = z.array(LiveVolumeSchema);\n\nexport type Holder = z.infer<typeof HolderSchema>;\nexport type MetaHolder = z.infer<typeof MetaHolderSchema>;\nexport type OpenInterest = z.infer<typeof OpenInterestSchema>;\nexport type MarketVolume = z.infer<typeof MarketVolumeSchema>;\nexport type LiveVolume = z.infer<typeof LiveVolumeSchema>;\nexport type ListMarketHoldersResponse = z.infer<\n typeof ListMarketHoldersResponseSchema\n>;\nexport type ListOpenInterestResponse = z.infer<\n typeof ListOpenInterestResponseSchema\n>;\nexport type FetchEventLiveVolumeResponse = z.infer<\n typeof FetchEventLiveVolumeResponseSchema\n>;\n","import { z } from 'zod';\nimport { DecimalishSchema, IsoDateTimeStringSchema } from '../shared';\nimport { AddressSchema } from './common';\n\nexport const LeaderboardEntrySchema = z.object({\n rank: z.string().nullish(),\n builder: z.string().nullish(),\n volume: DecimalishSchema.nullish(),\n activeUsers: z.number().int().nullish(),\n verified: z.boolean().nullish(),\n builderLogo: z.string().nullish(),\n});\n\nexport const BuilderVolumeEntrySchema = z\n .object({\n dt: IsoDateTimeStringSchema.nullish(),\n builder: z.string().nullish(),\n builderLogo: z.string().nullish(),\n verified: z.boolean().nullish(),\n volume: DecimalishSchema.nullish(),\n activeUsers: z.number().int().nullish(),\n rank: z.string().nullish(),\n })\n .transform(({ dt, ...rest }) => ({\n ...rest,\n bucketAt: dt,\n }));\n\nexport const TraderLeaderboardEntrySchema = z\n .object({\n rank: z.string().nullish(),\n proxyWallet: AddressSchema.nullish(),\n userName: z.string().nullish(),\n vol: DecimalishSchema.nullish(),\n pnl: DecimalishSchema.nullish(),\n profileImage: z.string().nullish(),\n xUsername: z.string().nullish(),\n verifiedBadge: z.boolean().nullish(),\n })\n .transform(({ proxyWallet, ...rest }) => ({\n ...rest,\n wallet: proxyWallet,\n }));\n\nexport const ListBuilderLeaderboardResponseSchema = z.array(\n LeaderboardEntrySchema,\n);\nexport const ListBuilderVolumeResponseSchema = z.array(\n BuilderVolumeEntrySchema,\n);\nexport const ListTraderLeaderboardResponseSchema = z.array(\n TraderLeaderboardEntrySchema,\n);\n\nexport type LeaderboardEntry = z.infer<typeof LeaderboardEntrySchema>;\nexport type BuilderVolumeEntry = z.infer<typeof BuilderVolumeEntrySchema>;\nexport type TraderLeaderboardEntry = z.infer<\n typeof TraderLeaderboardEntrySchema\n>;\nexport type ListBuilderLeaderboardResponse = z.infer<\n typeof ListBuilderLeaderboardResponseSchema\n>;\nexport type ListBuilderVolumeResponse = z.infer<\n typeof ListBuilderVolumeResponseSchema\n>;\nexport type ListTraderLeaderboardResponse = z.infer<\n typeof ListTraderLeaderboardResponseSchema\n>;\n","import { z } from 'zod';\nimport {\n ComboConditionIdSchema,\n CtfConditionIdSchema,\n DecimalishSchema,\n EpochSecondsToMillisecondsSchema,\n IsoCalendarDateStringSchema,\n IsoDateTimeStringSchema,\n MixedDateTimeStringSchema,\n PaginationCursorSchema,\n PositionIdSchema,\n TokenIdSchema,\n} from '../shared';\nimport { AddressSchema } from './common';\n\nexport enum ComboPositionStatus {\n Open = 'OPEN',\n Partial = 'PARTIAL',\n ResolvedWin = 'RESOLVED_WIN',\n ResolvedLoss = 'RESOLVED_LOSS',\n}\n\nexport const ComboPositionStatusSchema = z.enum(ComboPositionStatus);\n\nexport const PositionSchema = z\n .object({\n proxyWallet: AddressSchema.nullish(),\n asset: TokenIdSchema.nullish(),\n conditionId: CtfConditionIdSchema,\n size: DecimalishSchema.nullish(),\n avgPrice: DecimalishSchema.nullish(),\n initialValue: DecimalishSchema.nullish(),\n currentValue: DecimalishSchema.nullish(),\n cashPnl: DecimalishSchema.nullish(),\n percentPnl: z.number().nullish(),\n totalBought: DecimalishSchema.nullish(),\n realizedPnl: DecimalishSchema.nullish(),\n percentRealizedPnl: z.number().nullish(),\n curPrice: DecimalishSchema.nullish(),\n redeemable: z.boolean().nullish(),\n mergeable: z.boolean().nullish(),\n title: z.string().nullish(),\n slug: z.string().nullish(),\n icon: z.string().nullish(),\n eventId: z.string().nullish(),\n eventSlug: z.string().nullish(),\n outcome: z.string().nullish(),\n outcomeIndex: z.number().int().nullish(),\n oppositeOutcome: z.string().nullish(),\n oppositeAsset: TokenIdSchema.nullish(),\n endDate: IsoCalendarDateStringSchema.nullish(),\n negativeRisk: z.boolean().nullish(),\n })\n .transform(({ asset, oppositeAsset, proxyWallet, ...rest }) => ({\n ...rest,\n wallet: proxyWallet,\n tokenId: asset,\n oppositeTokenId: oppositeAsset,\n }));\n\nexport const ClosedPositionSchema = z\n .object({\n proxyWallet: AddressSchema.nullish(),\n asset: TokenIdSchema.nullish(),\n conditionId: CtfConditionIdSchema.nullish(),\n avgPrice: DecimalishSchema.nullish(),\n totalBought: DecimalishSchema.nullish(),\n realizedPnl: DecimalishSchema.nullish(),\n curPrice: DecimalishSchema.nullish(),\n timestamp: EpochSecondsToMillisecondsSchema.nullish(),\n title: z.string().nullish(),\n slug: z.string().nullish(),\n icon: z.string().nullish(),\n eventSlug: z.string().nullish(),\n outcome: z.string().nullish(),\n outcomeIndex: z.number().int().nullish(),\n oppositeOutcome: z.string().nullish(),\n oppositeAsset: TokenIdSchema.nullish(),\n endDate: MixedDateTimeStringSchema.nullish(),\n })\n .transform(({ asset, oppositeAsset, proxyWallet, ...rest }) => ({\n ...rest,\n wallet: proxyWallet,\n tokenId: asset,\n oppositeTokenId: oppositeAsset,\n }));\n\nexport const ValueSchema = z.object({\n user: AddressSchema.nullish(),\n value: DecimalishSchema.nullish(),\n});\n\nexport const MarketPositionSchema = z\n .object({\n proxyWallet: AddressSchema.nullish(),\n name: z.string().nullish(),\n profileImage: z.string().nullish(),\n verified: z.boolean().nullish(),\n asset: TokenIdSchema.nullish(),\n conditionId: CtfConditionIdSchema.nullish(),\n avgPrice: DecimalishSchema.nullish(),\n size: DecimalishSchema.nullish(),\n currPrice: DecimalishSchema.nullish(),\n currentValue: DecimalishSchema.nullish(),\n cashPnl: DecimalishSchema.nullish(),\n totalBought: DecimalishSchema.nullish(),\n realizedPnl: DecimalishSchema.nullish(),\n totalPnl: DecimalishSchema.nullish(),\n outcome: z.string().nullish(),\n outcomeIndex: z.number().int().nullish(),\n })\n .transform(({ asset, proxyWallet, ...rest }) => ({\n ...rest,\n wallet: proxyWallet,\n tokenId: asset,\n }));\n\nexport const MetaMarketPositionSchema = z.object({\n token: z.string().nullish(),\n positions: z.array(MarketPositionSchema).nullish(),\n});\n\nexport const ComboPositionMarketEventSchema = z\n .object({\n event_id: z.string().nullish(),\n event_slug: z.string().nullish(),\n event_title: z.string().nullish(),\n event_image: z.string().nullish(),\n })\n .transform(({ event_id, event_slug, event_title, event_image }) => ({\n eventId: event_id,\n eventSlug: event_slug,\n eventTitle: event_title,\n eventImage: event_image,\n }));\n\nexport const ComboPositionMarketSchema = z\n .object({\n market_id: z.string().nullish(),\n slug: z.string().nullish(),\n title: z.string().nullish(),\n outcome: z.string().nullish(),\n image_url: z.string().nullish(),\n icon_url: z.string().nullish(),\n category: z.string().nullish(),\n subcategory: z.string().nullish(),\n tags: z.array(z.string()).nullish(),\n end_date: IsoDateTimeStringSchema.nullish(),\n event: ComboPositionMarketEventSchema.nullish(),\n })\n .transform(({ market_id, image_url, icon_url, end_date, ...rest }) => ({\n ...rest,\n marketId: market_id,\n imageUrl: image_url,\n iconUrl: icon_url,\n endDate: end_date,\n }));\n\nexport const ComboPositionLegSchema = z\n .object({\n leg_index: z.number().int(),\n leg_position_id: PositionIdSchema,\n leg_condition_id: CtfConditionIdSchema,\n leg_outcome_index: z.number().int(),\n leg_outcome_label: z.string().nullish(),\n leg_status: ComboPositionStatusSchema,\n leg_resolved_at: IsoDateTimeStringSchema.nullish(),\n leg_current_price: DecimalishSchema.nullish(),\n market: ComboPositionMarketSchema.nullish(),\n })\n .transform(\n ({\n leg_index,\n leg_position_id,\n leg_condition_id,\n leg_outcome_index,\n leg_outcome_label,\n leg_status,\n leg_resolved_at,\n leg_current_price,\n ...rest\n }) => ({\n ...rest,\n legIndex: leg_index,\n legPositionId: leg_position_id,\n legConditionId: leg_condition_id,\n legOutcomeIndex: leg_outcome_index,\n legOutcomeLabel: leg_outcome_label,\n legStatus: leg_status,\n legResolvedAt: leg_resolved_at,\n legCurrentPrice: leg_current_price,\n }),\n );\n\nexport const ComboPositionSchema = z\n .object({\n combo_condition_id: ComboConditionIdSchema,\n combo_position_id: PositionIdSchema,\n module_id: z.number().int(),\n user_address: AddressSchema,\n shares_balance: DecimalishSchema,\n entry_avg_price_usdc: DecimalishSchema.nullish(),\n entry_cost_usdc: DecimalishSchema.nullish(),\n status: ComboPositionStatusSchema,\n first_entry_at: IsoDateTimeStringSchema,\n resolved_at: IsoDateTimeStringSchema.nullish(),\n legs_total: z.number().int(),\n legs_resolved: z.number().int(),\n legs_pending: z.number().int(),\n legs: z.array(ComboPositionLegSchema),\n })\n .transform(\n ({\n combo_condition_id,\n combo_position_id,\n module_id,\n user_address,\n shares_balance,\n entry_avg_price_usdc,\n entry_cost_usdc,\n first_entry_at,\n resolved_at,\n legs_total,\n legs_resolved,\n legs_pending,\n ...rest\n }) => ({\n ...rest,\n conditionId: combo_condition_id,\n positionId: combo_position_id,\n moduleId: module_id,\n userAddress: user_address,\n shares: shares_balance,\n entryAvgPriceUsdc: entry_avg_price_usdc,\n entryCostUsdc: entry_cost_usdc,\n firstEntryAt: first_entry_at,\n resolvedAt: resolved_at,\n legsTotal: legs_total,\n legsResolved: legs_resolved,\n legsPending: legs_pending,\n }),\n );\n\nexport const ListComboPositionsResponseSchema = z\n .object({\n combos: z.array(ComboPositionSchema),\n pagination: z.object({\n limit: z.number().int(),\n offset: z.number().int(),\n has_more: z.boolean(),\n next_cursor: PaginationCursorSchema.nullish(),\n }),\n })\n .transform(({ pagination, ...rest }) => ({\n ...rest,\n pagination: {\n limit: pagination.limit,\n offset: pagination.offset,\n hasMore: pagination.has_more,\n nextCursor: pagination.next_cursor,\n },\n }));\n\nexport const ListPositionsResponseSchema = z.array(PositionSchema);\nexport const ListClosedPositionsResponseSchema = z.array(ClosedPositionSchema);\nexport const FetchPortfolioValueResponseSchema = z.array(ValueSchema);\nexport const ListMarketPositionsResponseSchema = z.array(\n MetaMarketPositionSchema,\n);\n\nexport type Position = z.infer<typeof PositionSchema>;\nexport type ClosedPosition = z.infer<typeof ClosedPositionSchema>;\nexport type Value = z.infer<typeof ValueSchema>;\nexport type MarketPosition = z.infer<typeof MarketPositionSchema>;\nexport type MetaMarketPosition = z.infer<typeof MetaMarketPositionSchema>;\nexport type ComboPositionMarketEvent = z.infer<\n typeof ComboPositionMarketEventSchema\n>;\nexport type ComboPositionMarket = z.infer<typeof ComboPositionMarketSchema>;\nexport type ComboPositionLeg = z.infer<typeof ComboPositionLegSchema>;\nexport type ComboPosition = z.infer<typeof ComboPositionSchema>;\nexport type ListPositionsResponse = z.infer<typeof ListPositionsResponseSchema>;\nexport type ListClosedPositionsResponse = z.infer<\n typeof ListClosedPositionsResponseSchema\n>;\nexport type FetchPortfolioValueResponse = z.infer<\n typeof FetchPortfolioValueResponseSchema\n>;\nexport type ListMarketPositionsResponse = z.infer<\n typeof ListMarketPositionsResponseSchema\n>;\nexport type ListComboPositionsResponse = z.infer<\n typeof ListComboPositionsResponseSchema\n>;\n"]}
1
+ {"version":3,"sources":["../../src/data/common.ts","../../src/data/activity.ts","../../src/data/analytics.ts","../../src/data/leaderboard.ts","../../src/data/portfolio.ts"],"names":["AddressSchema","z","Hash64Schema","ActivityType","ActivityTypeSchema","SideSchema","TimePeriodSchema","LeaderboardCategorySchema","LeaderboardOrderBySchema","OptionalTextSchema","value","TradeSchema","TokenIdSchema","CtfConditionIdSchema","DecimalishSchema","EpochSecondsToMillisecondsSchema","emptyStringToNull","asset","proxyWallet","rest","RawActivitySchema","TxHashSchema","ActivitySchema","normalizeActivity","TradedSchema","ListTradesResponseSchema","ListActivityResponseSchema","activity","base","normalizeActivityBase","normalizeTradeActivity","expectPresent","inferAmount","trade","ComboConditionIdSchema","PositionIdSchema","field","HolderSchema","MetaHolderSchema","OpenInterestSchema","MarketVolumeSchema","LiveVolumeSchema","ListMarketHoldersResponseSchema","ListOpenInterestResponseSchema","FetchEventLiveVolumeResponseSchema","LeaderboardEntrySchema","BuilderVolumeEntrySchema","IsoDateTimeStringSchema","dt","TraderLeaderboardEntrySchema","ListBuilderLeaderboardResponseSchema","ListBuilderVolumeResponseSchema","ListTraderLeaderboardResponseSchema","ComboPositionStatus","ComboPositionStatusSchema","PositionSchema","IsoCalendarDateStringSchema","oppositeAsset","ClosedPositionSchema","MixedDateTimeStringSchema","ValueSchema","MarketPositionSchema","MetaMarketPositionSchema","ComboPositionMarketEventSchema","event_id","event_slug","event_title","event_image","ComboPositionMarketSchema","market_id","image_url","icon_url","end_date","ComboPositionLegSchema","leg_index","leg_position_id","leg_condition_id","leg_outcome_index","leg_outcome_label","leg_status","leg_resolved_at","leg_current_price","ComboPositionSchema","combo_condition_id","combo_position_id","module_id","user_address","shares_balance","entry_avg_price_usdc","entry_cost_usdc","first_entry_at","resolved_at","legs_total","legs_resolved","legs_pending","ListComboPositionsResponseSchema","PaginationCursorSchema","pagination","ListPositionsResponseSchema","ListClosedPositionsResponseSchema","FetchPortfolioValueResponseSchema","ListMarketPositionsResponseSchema"],"mappings":"uGAEO,IAAMA,CAAAA,CAAgBC,CAAAA,CAAE,MAAA,EAAO,CACzBC,EAAeD,CAAAA,CAAE,MAAA,EAAO,CAEzBE,CAAAA,CAAAA,CAAAA,CAAAA,GACVA,CAAAA,CAAA,KAAA,CAAQ,OAAA,CACRA,CAAAA,CAAA,KAAA,CAAQ,OAAA,CACRA,CAAAA,CAAA,KAAA,CAAQ,OAAA,CACRA,CAAAA,CAAA,OAAS,QAAA,CACTA,CAAAA,CAAA,MAAA,CAAS,QAAA,CACTA,CAAAA,CAAA,UAAA,CAAa,YAAA,CACbA,CAAAA,CAAA,YAAA,CAAe,cAAA,CACfA,CAAAA,CAAA,eAAA,CAAkB,iBAAA,CAClBA,CAAAA,CAAA,MAAQ,OAAA,CATEA,CAAAA,CAAAA,EAAAA,CAAAA,EAAA,EAAA,CAAA,CAYCC,CAAAA,CAAqBH,CAAAA,CAAE,IAAA,CAAKE,CAAY,CAAA,CAExCE,CAAAA,CAAaJ,CAAAA,CAAE,IAAA,CAAK,CAAC,KAAA,CAAO,MAAM,CAAC,CAAA,CAEnCK,EAAAA,CAAmBL,CAAAA,CAAE,IAAA,CAAK,CAAC,KAAA,CAAO,OAAQ,OAAA,CAAS,KAAK,CAAC,CAAA,CAEzDM,EAAAA,CAA4BN,CAAAA,CAAE,KAAK,CAC9C,SAAA,CACA,UAAA,CACA,QAAA,CACA,QAAA,CACA,SAAA,CACA,UAAA,CACA,SAAA,CACA,WAAA,CACA,MAAA,CACA,SACF,CAAC,CAAA,CAEYO,EAAAA,CAA2BP,EAAE,IAAA,CAAK,CAAC,KAAA,CAAO,KAAK,CAAC,ECoK7D,IAAMQ,CAAAA,CAAq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A,CACnC,UAAA,CAAYjF,EAAE,MAAA,CAAO,CACnB,KAAA,CAAOA,CAAAA,CAAE,MAAA,EAAO,CAAE,GAAA,EAAI,CACtB,MAAA,CAAQA,CAAAA,CAAE,MAAA,EAAO,CAAE,GAAA,EAAI,CACvB,SAAUA,CAAAA,CAAE,OAAA,EAAQ,CACpB,WAAA,CAAa+F,EAAAA,CAAuB,OAAA,EACtC,CAAC,CACH,CAAC,CAAA,CACA,SAAA,CAAU,CAAC,CAAE,WAAAC,CAAAA,CAAY,GAAG9E,CAAK,CAAA,IAAO,CACvC,GAAGA,CAAAA,CACH,UAAA,CAAY,CACV,KAAA,CAAO8E,CAAAA,CAAW,KAAA,CAClB,MAAA,CAAQA,CAAAA,CAAW,OACnB,OAAA,CAASA,CAAAA,CAAW,QAAA,CACpB,UAAA,CAAYA,CAAAA,CAAW,WACzB,CACF,CAAA,CAAE,CAAA,CAESC,EAAAA,CAA8BjG,CAAAA,CAAE,KAAA,CAAMsD,EAAc,CAAA,CACpD4C,GAAoClG,CAAAA,CAAE,KAAA,CAAMyD,EAAoB,CAAA,CAChE0C,EAAAA,CAAoCnG,CAAAA,CAAE,KAAA,CAAM2D,EAAW,CAAA,CACvDyC,EAAAA,CAAoCpG,CAAAA,CAAE,KAAA,CACjD6D,EACF","file":"index.js","sourcesContent":["import { z } from 'zod';\n\nexport const AddressSchema = z.string();\nexport const Hash64Schema = z.string();\n\nexport enum ActivityType {\n TRADE = 'TRADE',\n SPLIT = 'SPLIT',\n MERGE = 'MERGE',\n REDEEM = 'REDEEM',\n REWARD = 'REWARD',\n CONVERSION = 'CONVERSION',\n MAKER_REBATE = 'MAKER_REBATE',\n REFERRAL_REWARD = 'REFERRAL_REWARD',\n YIELD = 'YIELD',\n}\n\nexport const ActivityTypeSchema = z.enum(ActivityType);\n\nexport const SideSchema = z.enum(['BUY', 'SELL']);\n\nexport const TimePeriodSchema = z.enum(['DAY', 'WEEK', 'MONTH', 'ALL']);\n\nexport const LeaderboardCategorySchema = z.enum([\n 'OVERALL',\n 'POLITICS',\n 'SPORTS',\n 'CRYPTO',\n 'CULTURE',\n 'MENTIONS',\n 'WEATHER',\n 'ECONOMICS',\n 'TECH',\n 'FINANCE',\n]);\n\nexport const LeaderboardOrderBySchema = z.enum(['PNL', 'VOL']);\n\nexport type Address = z.infer<typeof AddressSchema>;\nexport type Hash64 = z.infer<typeof Hash64Schema>;\nexport type Side = z.infer<typeof SideSchema>;\nexport type TimePeriod = z.infer<typeof TimePeriodSchema>;\nexport type LeaderboardCategory = z.infer<typeof LeaderboardCategorySchema>;\nexport type LeaderboardOrderBy = z.infer<typeof LeaderboardOrderBySchema>;\n","import { z } from 'zod';\nimport {\n type ComboConditionId,\n ComboConditionIdSchema,\n type CtfConditionId,\n CtfConditionIdSchema,\n DecimalishSchema,\n type DecimalString,\n type EpochMilliseconds,\n EpochSecondsToMillisecondsSchema,\n emptyStringToNull,\n type PositionId,\n PositionIdSchema,\n type TokenId,\n TokenIdSchema,\n type TxHash,\n TxHashSchema,\n} from '../shared';\nimport {\n ActivityType,\n ActivityTypeSchema,\n type Address,\n AddressSchema,\n type Side,\n SideSchema,\n} from './common';\n\nexport type ActivityBase = {\n /** Wallet address whose account history contains this activity. */\n wallet: Address;\n /** Activity time as Unix epoch milliseconds. */\n timestamp: EpochMilliseconds;\n /** Polygon transaction hash that produced or records this activity. */\n transactionHash: TxHash;\n /** Display name of the wallet owner at the time returned by the API. */\n name: string | null;\n /** Public pseudonym of the wallet owner at the time returned by the API. */\n pseudonym: string | null;\n /** Profile biography of the wallet owner at the time returned by the API. */\n bio: string | null;\n /** Source profile image URL for the wallet owner. */\n profileImage: string | null;\n /** Optimized profile image URL for the wallet owner. */\n profileImageOptimized: string | null;\n};\n\ntype TradeActivityBase = ActivityBase & {\n /** A directional outcome-token trade. */\n type: ActivityType.TRADE;\n /** Whether this trade is for a Combo position instead of a binary market token. */\n isCombo: boolean;\n /** Direction of the wallet's trade. */\n side: Side;\n /** Number of shares traded by the wallet. */\n shares: DecimalString;\n /** The notional value of the traded shares in USD. */\n amount: DecimalString;\n /** The execution price per share in USD. */\n price: DecimalString;\n /** Human-readable title of the traded market or Combo. */\n title: string;\n /** Icon URL for the traded market or Combo, when available. */\n icon: string | null;\n};\n\nexport type ClobTradeActivity = TradeActivityBase & {\n /** CLOB market trades are binary market outcome-token trades. */\n isCombo: false;\n /** Condition id of the market traded by the wallet. */\n conditionId: CtfConditionId;\n /** Outcome token id bought or sold by the wallet. */\n tokenId: TokenId;\n /** Display label of the outcome token traded by the wallet. */\n outcome: string;\n /** Zero-based index of the outcome token in the market's outcome list. */\n outcomeIndex: number;\n /** URL slug of the market traded by the wallet. */\n slug: string;\n /** URL slug of the event containing the traded market. */\n eventSlug: string;\n};\n\nexport type ComboTradeActivity = TradeActivityBase & {\n /** Combo trades are protocol v2 Combo position trades. */\n isCombo: true;\n /** Combo condition id traded by the wallet. */\n conditionId: ComboConditionId;\n /** Combo position id bought or sold by the wallet. */\n positionId: PositionId;\n};\n\nexport type TradeActivity = ClobTradeActivity | ComboTradeActivity;\n\nexport type SplitActivity = ActivityBase & {\n /** Splitting collateral into a complete market set. */\n type: 'SPLIT';\n /** Condition id of the market whose complete set was created. */\n conditionId: CtfConditionId;\n /** The collateral amount split into the complete set in USD. */\n amount: DecimalString;\n /** Human-readable title of the market whose complete set was created. */\n title: string;\n /** URL slug of the market whose complete set was created. */\n slug: string;\n /** Icon URL for the market whose complete set was created, when available. */\n icon: string | null;\n /** URL slug of the event containing the split market. */\n eventSlug: string;\n};\n\nexport type MergeActivity = ActivityBase & {\n /** Merging a complete market set into collateral. */\n type: 'MERGE';\n /** Condition id of the market whose complete set was merged. */\n conditionId: CtfConditionId;\n /** The collateral amount received from merging the complete set in USD. */\n amount: DecimalString;\n /** Human-readable title of the market whose complete set was merged. */\n title: string;\n /** URL slug of the market whose complete set was merged. */\n slug: string;\n /** Icon URL for the market whose complete set was merged, when available. */\n icon: string | null;\n /** URL slug of the event containing the merged market. */\n eventSlug: string;\n};\n\nexport type RedeemActivity = ActivityBase & {\n /** Redeeming resolved market proceeds. */\n type: 'REDEEM';\n /** Condition id of the market redeemed by the wallet. */\n conditionId: CtfConditionId;\n /** The proceeds redeemed from the resolved market in USD. */\n amount: DecimalString;\n /** Human-readable title of the market redeemed by the wallet. */\n title: string;\n /** URL slug of the market redeemed by the wallet. */\n slug: string;\n /** Icon URL for the market redeemed by the wallet, when available. */\n icon: string | null;\n /** URL slug of the event containing the redeemed market. */\n eventSlug: string;\n};\n\nexport type ConversionActivity = ActivityBase & {\n /** A market conversion or migration activity. */\n type: 'CONVERSION';\n /** Condition id of the market involved in the conversion. */\n conditionId: CtfConditionId;\n /** The amount converted or migrated for the market in USD. */\n amount: DecimalString;\n /** Human-readable title of the market involved in the conversion. */\n title: string;\n /** URL slug of the market involved in the conversion. */\n slug: string;\n /** Icon URL for the market involved in the conversion, when available. */\n icon: string | null;\n /** URL slug of the event containing the converted market. */\n eventSlug: string;\n};\n\nexport type RewardActivity = ActivityBase & {\n /** An account-level reward credit. */\n type: 'REWARD';\n /** The reward amount credited to the wallet in USD. */\n amount: DecimalString;\n};\n\nexport type MakerRebateActivity = ActivityBase & {\n /** An account-level maker rebate credit. */\n type: 'MAKER_REBATE';\n /** The maker rebate amount credited to the wallet in USD. */\n amount: DecimalString;\n};\n\nexport type ReferralRewardActivity = ActivityBase & {\n /** An account-level referral reward credit. */\n type: 'REFERRAL_REWARD';\n /** The referral reward amount credited to the wallet in USD. */\n amount: DecimalString;\n};\n\nexport type YieldActivity = ActivityBase & {\n /** An account-level yield credit. */\n type: 'YIELD';\n /** The yield amount credited to the wallet in USD. */\n amount: DecimalString;\n};\n\nexport type Activity =\n | TradeActivity\n | SplitActivity\n | MergeActivity\n | RedeemActivity\n | ConversionActivity\n | RewardActivity\n | MakerRebateActivity\n | ReferralRewardActivity\n | YieldActivity;\n\nconst OptionalTextSchema = z.preprocess(\n (value) => (value === '' ? undefined : value),\n z.string().optional(),\n);\n\nexport const TradeSchema = z\n .object({\n proxyWallet: AddressSchema.nullish(),\n side: SideSchema.nullish(),\n asset: TokenIdSchema.nullish(),\n conditionId: CtfConditionIdSchema.nullish(),\n size: DecimalishSchema.nullish(),\n price: DecimalishSchema.nullish(),\n timestamp: EpochSecondsToMillisecondsSchema.nullish(),\n title: z.string().nullish(),\n slug: z.string().nullish(),\n icon: z.preprocess(emptyStringToNull, z.string().nullish()),\n eventSlug: z.string().nullish(),\n outcome: z.string().nullish(),\n outcomeIndex: z.number().int().nullish(),\n name: z.string().nullish(),\n pseudonym: z.string().nullish(),\n bio: z.string().nullish(),\n profileImage: z.string().nullish(),\n profileImageOptimized: z.string().nullish(),\n transactionHash: z.string().nullish(),\n })\n .transform(({ asset, proxyWallet, ...rest }) => ({\n ...rest,\n wallet: proxyWallet,\n tokenId: asset,\n }));\n\nconst RawActivitySchema = z.object({\n proxyWallet: AddressSchema.nullish(),\n timestamp: EpochSecondsToMillisecondsSchema.nullish(),\n conditionId: z.preprocess(\n (value) => (value === '' ? undefined : value),\n z.string().optional(),\n ),\n type: ActivityTypeSchema,\n size: DecimalishSchema.nullish(),\n usdcSize: DecimalishSchema.nullish(),\n transactionHash: TxHashSchema.nullish(),\n price: DecimalishSchema.nullish(),\n asset: z.preprocess(\n (value) => (value === '' ? undefined : value),\n z.string().optional(),\n ),\n side: z.preprocess(\n (value) => (value === '' ? undefined : value),\n SideSchema.nullish(),\n ),\n isCombo: z.boolean().optional(),\n outcomeIndex: z.preprocess(\n (value) => (value === 999 ? undefined : value),\n z.number().int().optional(),\n ),\n title: OptionalTextSchema,\n slug: OptionalTextSchema,\n icon: OptionalTextSchema,\n eventSlug: OptionalTextSchema,\n outcome: OptionalTextSchema,\n name: OptionalTextSchema,\n pseudonym: OptionalTextSchema,\n bio: OptionalTextSchema,\n profileImage: OptionalTextSchema,\n profileImageOptimized: OptionalTextSchema,\n});\n\nexport const ActivitySchema: z.ZodType<Activity> =\n RawActivitySchema.transform(normalizeActivity);\n\nexport const TradedSchema = z.object({\n user: AddressSchema.nullish(),\n traded: z.number().int().nullish(),\n});\n\nexport const ListTradesResponseSchema = z.array(TradeSchema);\nexport const ListActivityResponseSchema = z.array(ActivitySchema);\n\nexport type Trade = z.infer<typeof TradeSchema>;\nexport type Traded = z.infer<typeof TradedSchema>;\nexport type ListTradesResponse = z.infer<typeof ListTradesResponseSchema>;\nexport type ListActivityResponse = z.infer<typeof ListActivityResponseSchema>;\n\ntype RawActivity = z.infer<typeof RawActivitySchema>;\n\nfunction normalizeActivity(activity: RawActivity): Activity {\n const base = normalizeActivityBase(activity);\n\n switch (activity.type) {\n case ActivityType.TRADE:\n return normalizeTradeActivity(activity, base);\n case ActivityType.SPLIT:\n case ActivityType.MERGE:\n case ActivityType.REDEEM:\n case ActivityType.CONVERSION:\n return {\n ...base,\n type: activity.type,\n conditionId: CtfConditionIdSchema.parse(\n expectPresent(activity.conditionId, 'conditionId'),\n ),\n amount: inferAmount(activity),\n title: expectPresent(activity.title, 'title'),\n slug: expectPresent(activity.slug, 'slug'),\n icon: activity.icon ?? null,\n eventSlug: expectPresent(activity.eventSlug, 'eventSlug'),\n };\n case ActivityType.REWARD:\n case ActivityType.MAKER_REBATE:\n case ActivityType.REFERRAL_REWARD:\n case ActivityType.YIELD:\n return {\n ...base,\n type: activity.type,\n amount: inferAmount(activity),\n };\n }\n}\n\nfunction normalizeTradeActivity(\n activity: RawActivity,\n base: ActivityBase,\n): TradeActivity {\n const trade = {\n ...base,\n type: ActivityType.TRADE as ActivityType.TRADE,\n side: expectPresent(activity.side, 'side'),\n shares: expectPresent(activity.size, 'size'),\n amount: inferAmount(activity),\n price: expectPresent(activity.price, 'price'),\n title: expectPresent(activity.title, 'title'),\n icon: activity.icon ?? null,\n };\n\n if (activity.isCombo === true) {\n return {\n ...trade,\n isCombo: true,\n conditionId: ComboConditionIdSchema.parse(\n expectPresent(activity.conditionId, 'conditionId'),\n ),\n positionId: PositionIdSchema.parse(\n expectPresent(activity.asset, 'asset'),\n ),\n };\n }\n\n return {\n ...trade,\n isCombo: false,\n conditionId: CtfConditionIdSchema.parse(\n expectPresent(activity.conditionId, 'conditionId'),\n ),\n tokenId: TokenIdSchema.parse(expectPresent(activity.asset, 'asset')),\n outcome: expectPresent(activity.outcome, 'outcome'),\n outcomeIndex: expectPresent(activity.outcomeIndex, 'outcomeIndex'),\n slug: expectPresent(activity.slug, 'slug'),\n eventSlug: expectPresent(activity.eventSlug, 'eventSlug'),\n };\n}\n\nfunction normalizeActivityBase(activity: RawActivity): ActivityBase {\n return {\n wallet: expectPresent(activity.proxyWallet, 'proxyWallet'),\n timestamp: expectPresent(activity.timestamp, 'timestamp'),\n transactionHash: expectPresent(activity.transactionHash, 'transactionHash'),\n name: activity.name ?? null,\n pseudonym: activity.pseudonym ?? null,\n bio: activity.bio ?? null,\n profileImage: activity.profileImage ?? null,\n profileImageOptimized: activity.profileImageOptimized ?? null,\n };\n}\n\nfunction inferAmount(activity: RawActivity): DecimalString {\n return expectPresent(activity.usdcSize ?? activity.size, 'usdcSize');\n}\n\nfunction expectPresent<T>(value: T | null | undefined, field: string): T {\n if (value === null || value === undefined) {\n throw new TypeError(`Expected activity.${field} to be present`);\n }\n\n return value;\n}\n","import { z } from 'zod';\nimport { DecimalishSchema, TokenIdSchema } from '../shared';\nimport { AddressSchema, Hash64Schema } from './common';\n\nexport const HolderSchema = z\n .object({\n proxyWallet: AddressSchema.nullish(),\n bio: z.string().nullish(),\n asset: TokenIdSchema.nullish(),\n pseudonym: z.string().nullish(),\n amount: DecimalishSchema.nullish(),\n displayUsernamePublic: z.boolean().nullish(),\n outcomeIndex: z.number().int().nullish(),\n name: z.string().nullish(),\n profileImage: z.string().nullish(),\n profileImageOptimized: z.string().nullish(),\n })\n .transform(({ asset, proxyWallet, ...rest }) => ({\n ...rest,\n wallet: proxyWallet,\n tokenId: asset,\n }));\n\nexport const MetaHolderSchema = z.object({\n token: z.string().nullish(),\n holders: z.array(HolderSchema).nullish(),\n});\n\nexport const OpenInterestSchema = z.object({\n market: Hash64Schema.nullish(),\n value: DecimalishSchema.nullish(),\n});\n\nexport const MarketVolumeSchema = z.object({\n market: Hash64Schema.nullish(),\n value: DecimalishSchema.nullish(),\n});\n\nexport const LiveVolumeSchema = z.object({\n total: DecimalishSchema.nullish(),\n markets: z.array(MarketVolumeSchema).nullish(),\n});\n\nexport const ListMarketHoldersResponseSchema = z.array(MetaHolderSchema);\nexport const ListOpenInterestResponseSchema = z.array(OpenInterestSchema);\nexport const FetchEventLiveVolumeResponseSchema = z.array(LiveVolumeSchema);\n\nexport type Holder = z.infer<typeof HolderSchema>;\nexport type MetaHolder = z.infer<typeof MetaHolderSchema>;\nexport type OpenInterest = z.infer<typeof OpenInterestSchema>;\nexport type MarketVolume = z.infer<typeof MarketVolumeSchema>;\nexport type LiveVolume = z.infer<typeof LiveVolumeSchema>;\nexport type ListMarketHoldersResponse = z.infer<\n typeof ListMarketHoldersResponseSchema\n>;\nexport type ListOpenInterestResponse = z.infer<\n typeof ListOpenInterestResponseSchema\n>;\nexport type FetchEventLiveVolumeResponse = z.infer<\n typeof FetchEventLiveVolumeResponseSchema\n>;\n","import { z } from 'zod';\nimport { DecimalishSchema, IsoDateTimeStringSchema } from '../shared';\nimport { AddressSchema } from './common';\n\nexport const LeaderboardEntrySchema = z.object({\n rank: z.string().nullish(),\n builder: z.string().nullish(),\n volume: DecimalishSchema.nullish(),\n activeUsers: z.number().int().nullish(),\n verified: z.boolean().nullish(),\n builderLogo: z.string().nullish(),\n});\n\nexport const BuilderVolumeEntrySchema = z\n .object({\n dt: IsoDateTimeStringSchema.nullish(),\n builder: z.string().nullish(),\n builderLogo: z.string().nullish(),\n verified: z.boolean().nullish(),\n volume: DecimalishSchema.nullish(),\n activeUsers: z.number().int().nullish(),\n rank: z.string().nullish(),\n })\n .transform(({ dt, ...rest }) => ({\n ...rest,\n bucketAt: dt,\n }));\n\nexport const TraderLeaderboardEntrySchema = z\n .object({\n rank: z.string().nullish(),\n proxyWallet: AddressSchema.nullish(),\n userName: z.string().nullish(),\n vol: DecimalishSchema.nullish(),\n pnl: DecimalishSchema.nullish(),\n profileImage: z.string().nullish(),\n xUsername: z.string().nullish(),\n verifiedBadge: z.boolean().nullish(),\n })\n .transform(({ proxyWallet, ...rest }) => ({\n ...rest,\n wallet: proxyWallet,\n }));\n\nexport const ListBuilderLeaderboardResponseSchema = z.array(\n LeaderboardEntrySchema,\n);\nexport const ListBuilderVolumeResponseSchema = z.array(\n BuilderVolumeEntrySchema,\n);\nexport const ListTraderLeaderboardResponseSchema = z.array(\n TraderLeaderboardEntrySchema,\n);\n\nexport type LeaderboardEntry = z.infer<typeof LeaderboardEntrySchema>;\nexport type BuilderVolumeEntry = z.infer<typeof BuilderVolumeEntrySchema>;\nexport type TraderLeaderboardEntry = z.infer<\n typeof TraderLeaderboardEntrySchema\n>;\nexport type ListBuilderLeaderboardResponse = z.infer<\n typeof ListBuilderLeaderboardResponseSchema\n>;\nexport type ListBuilderVolumeResponse = z.infer<\n typeof ListBuilderVolumeResponseSchema\n>;\nexport type ListTraderLeaderboardResponse = z.infer<\n typeof ListTraderLeaderboardResponseSchema\n>;\n","import { z } from 'zod';\nimport {\n ComboConditionIdSchema,\n CtfConditionIdSchema,\n DecimalishSchema,\n EpochSecondsToMillisecondsSchema,\n emptyStringToNull,\n IsoCalendarDateStringSchema,\n IsoDateTimeStringSchema,\n MixedDateTimeStringSchema,\n PaginationCursorSchema,\n PositionIdSchema,\n TokenIdSchema,\n} from '../shared';\nimport { AddressSchema } from './common';\n\nexport enum ComboPositionStatus {\n Open = 'OPEN',\n Partial = 'PARTIAL',\n ResolvedWin = 'RESOLVED_WIN',\n ResolvedLoss = 'RESOLVED_LOSS',\n}\n\nexport const ComboPositionStatusSchema = z.enum(ComboPositionStatus);\n\nexport const PositionSchema = z\n .object({\n proxyWallet: AddressSchema.nullish(),\n asset: TokenIdSchema.nullish(),\n conditionId: CtfConditionIdSchema,\n size: DecimalishSchema.nullish(),\n avgPrice: DecimalishSchema.nullish(),\n initialValue: DecimalishSchema.nullish(),\n currentValue: DecimalishSchema.nullish(),\n cashPnl: DecimalishSchema.nullish(),\n percentPnl: z.number().nullish(),\n totalBought: DecimalishSchema.nullish(),\n realizedPnl: DecimalishSchema.nullish(),\n percentRealizedPnl: z.number().nullish(),\n curPrice: DecimalishSchema.nullish(),\n redeemable: z.boolean().nullish(),\n mergeable: z.boolean().nullish(),\n title: z.string().nullish(),\n slug: z.string().nullish(),\n icon: z.preprocess(emptyStringToNull, z.string().nullish()),\n eventId: z.string().nullish(),\n eventSlug: z.string().nullish(),\n outcome: z.string().nullish(),\n outcomeIndex: z.number().int().nullish(),\n oppositeOutcome: z.string().nullish(),\n oppositeAsset: TokenIdSchema.nullish(),\n endDate: IsoCalendarDateStringSchema.nullish(),\n negativeRisk: z.boolean().nullish(),\n })\n .transform(({ asset, oppositeAsset, proxyWallet, ...rest }) => ({\n ...rest,\n wallet: proxyWallet,\n tokenId: asset,\n oppositeTokenId: oppositeAsset,\n }));\n\nexport const ClosedPositionSchema = z\n .object({\n proxyWallet: AddressSchema.nullish(),\n asset: TokenIdSchema.nullish(),\n conditionId: CtfConditionIdSchema.nullish(),\n avgPrice: DecimalishSchema.nullish(),\n totalBought: DecimalishSchema.nullish(),\n realizedPnl: DecimalishSchema.nullish(),\n curPrice: DecimalishSchema.nullish(),\n timestamp: EpochSecondsToMillisecondsSchema.nullish(),\n title: z.string().nullish(),\n slug: z.string().nullish(),\n icon: z.preprocess(emptyStringToNull, z.string().nullish()),\n eventSlug: z.string().nullish(),\n outcome: z.string().nullish(),\n outcomeIndex: z.number().int().nullish(),\n oppositeOutcome: z.string().nullish(),\n oppositeAsset: TokenIdSchema.nullish(),\n endDate: MixedDateTimeStringSchema.nullish(),\n })\n .transform(({ asset, oppositeAsset, proxyWallet, ...rest }) => ({\n ...rest,\n wallet: proxyWallet,\n tokenId: asset,\n oppositeTokenId: oppositeAsset,\n }));\n\nexport const ValueSchema = z.object({\n user: AddressSchema.nullish(),\n value: DecimalishSchema.nullish(),\n});\n\nexport const MarketPositionSchema = z\n .object({\n proxyWallet: AddressSchema.nullish(),\n name: z.string().nullish(),\n profileImage: z.string().nullish(),\n verified: z.boolean().nullish(),\n asset: TokenIdSchema.nullish(),\n conditionId: CtfConditionIdSchema.nullish(),\n avgPrice: DecimalishSchema.nullish(),\n size: DecimalishSchema.nullish(),\n currPrice: DecimalishSchema.nullish(),\n currentValue: DecimalishSchema.nullish(),\n cashPnl: DecimalishSchema.nullish(),\n totalBought: DecimalishSchema.nullish(),\n realizedPnl: DecimalishSchema.nullish(),\n totalPnl: DecimalishSchema.nullish(),\n outcome: z.string().nullish(),\n outcomeIndex: z.number().int().nullish(),\n })\n .transform(({ asset, proxyWallet, ...rest }) => ({\n ...rest,\n wallet: proxyWallet,\n tokenId: asset,\n }));\n\nexport const MetaMarketPositionSchema = z.object({\n token: z.string().nullish(),\n positions: z.array(MarketPositionSchema).nullish(),\n});\n\nexport const ComboPositionMarketEventSchema = z\n .object({\n event_id: z.string().nullish(),\n event_slug: z.string().nullish(),\n event_title: z.string().nullish(),\n event_image: z.string().nullish(),\n })\n .transform(({ event_id, event_slug, event_title, event_image }) => ({\n eventId: event_id,\n eventSlug: event_slug,\n eventTitle: event_title,\n eventImage: event_image,\n }));\n\nexport const ComboPositionMarketSchema = z\n .object({\n market_id: z.string().nullish(),\n slug: z.string().nullish(),\n title: z.string().nullish(),\n outcome: z.string().nullish(),\n image_url: z.string().nullish(),\n icon_url: z.string().nullish(),\n category: z.string().nullish(),\n subcategory: z.string().nullish(),\n tags: z.array(z.string()).nullish(),\n end_date: IsoDateTimeStringSchema.nullish(),\n event: ComboPositionMarketEventSchema.nullish(),\n })\n .transform(({ market_id, image_url, icon_url, end_date, ...rest }) => ({\n ...rest,\n marketId: market_id,\n imageUrl: image_url,\n iconUrl: icon_url,\n endDate: end_date,\n }));\n\nexport const ComboPositionLegSchema = z\n .object({\n leg_index: z.number().int(),\n leg_position_id: PositionIdSchema,\n leg_condition_id: CtfConditionIdSchema,\n leg_outcome_index: z.number().int(),\n leg_outcome_label: z.string().nullish(),\n leg_status: ComboPositionStatusSchema,\n leg_resolved_at: IsoDateTimeStringSchema.nullish(),\n leg_current_price: DecimalishSchema.nullish(),\n market: ComboPositionMarketSchema.nullish(),\n })\n .transform(\n ({\n leg_index,\n leg_position_id,\n leg_condition_id,\n leg_outcome_index,\n leg_outcome_label,\n leg_status,\n leg_resolved_at,\n leg_current_price,\n ...rest\n }) => ({\n ...rest,\n legIndex: leg_index,\n legPositionId: leg_position_id,\n legConditionId: leg_condition_id,\n legOutcomeIndex: leg_outcome_index,\n legOutcomeLabel: leg_outcome_label,\n legStatus: leg_status,\n legResolvedAt: leg_resolved_at,\n legCurrentPrice: leg_current_price,\n }),\n );\n\nexport const ComboPositionSchema = z\n .object({\n combo_condition_id: ComboConditionIdSchema,\n combo_position_id: PositionIdSchema,\n module_id: z.number().int(),\n user_address: AddressSchema,\n shares_balance: DecimalishSchema,\n entry_avg_price_usdc: DecimalishSchema.nullish(),\n entry_cost_usdc: DecimalishSchema.nullish(),\n status: ComboPositionStatusSchema,\n first_entry_at: IsoDateTimeStringSchema,\n resolved_at: IsoDateTimeStringSchema.nullish(),\n legs_total: z.number().int(),\n legs_resolved: z.number().int(),\n legs_pending: z.number().int(),\n legs: z.array(ComboPositionLegSchema),\n })\n .transform(\n ({\n combo_condition_id,\n combo_position_id,\n module_id,\n user_address,\n shares_balance,\n entry_avg_price_usdc,\n entry_cost_usdc,\n first_entry_at,\n resolved_at,\n legs_total,\n legs_resolved,\n legs_pending,\n ...rest\n }) => ({\n ...rest,\n conditionId: combo_condition_id,\n positionId: combo_position_id,\n moduleId: module_id,\n userAddress: user_address,\n shares: shares_balance,\n entryAvgPriceUsdc: entry_avg_price_usdc,\n entryCostUsdc: entry_cost_usdc,\n firstEntryAt: first_entry_at,\n resolvedAt: resolved_at,\n legsTotal: legs_total,\n legsResolved: legs_resolved,\n legsPending: legs_pending,\n }),\n );\n\nexport const ListComboPositionsResponseSchema = z\n .object({\n combos: z.array(ComboPositionSchema),\n pagination: z.object({\n limit: z.number().int(),\n offset: z.number().int(),\n has_more: z.boolean(),\n next_cursor: PaginationCursorSchema.nullish(),\n }),\n })\n .transform(({ pagination, ...rest }) => ({\n ...rest,\n pagination: {\n limit: pagination.limit,\n offset: pagination.offset,\n hasMore: pagination.has_more,\n nextCursor: pagination.next_cursor,\n },\n }));\n\nexport const ListPositionsResponseSchema = z.array(PositionSchema);\nexport const ListClosedPositionsResponseSchema = z.array(ClosedPositionSchema);\nexport const FetchPortfolioValueResponseSchema = z.array(ValueSchema);\nexport const ListMarketPositionsResponseSchema = z.array(\n MetaMarketPositionSchema,\n);\n\nexport type Position = z.infer<typeof PositionSchema>;\nexport type ClosedPosition = z.infer<typeof ClosedPositionSchema>;\nexport type Value = z.infer<typeof ValueSchema>;\nexport type MarketPosition = z.infer<typeof MarketPositionSchema>;\nexport type MetaMarketPosition = z.infer<typeof MetaMarketPositionSchema>;\nexport type ComboPositionMarketEvent = z.infer<\n typeof ComboPositionMarketEventSchema\n>;\nexport type ComboPositionMarket = z.infer<typeof ComboPositionMarketSchema>;\nexport type ComboPositionLeg = z.infer<typeof ComboPositionLegSchema>;\nexport type ComboPosition = z.infer<typeof ComboPositionSchema>;\nexport type ListPositionsResponse = z.infer<typeof ListPositionsResponseSchema>;\nexport type ListClosedPositionsResponse = z.infer<\n typeof ListClosedPositionsResponseSchema\n>;\nexport type FetchPortfolioValueResponse = z.infer<\n typeof FetchPortfolioValueResponseSchema\n>;\nexport type ListMarketPositionsResponse = z.infer<\n typeof ListMarketPositionsResponseSchema\n>;\nexport type ListComboPositionsResponse = z.infer<\n typeof ListComboPositionsResponseSchema\n>;\n"]}
@@ -425,6 +425,12 @@ declare const GammaMarketSchema: z.ZodObject<{
425
425
  rebateRate: z.ZodUnion<readonly [z.ZodPipe<z.ZodString, z.ZodTransform<DecimalString, string>>, z.ZodPipe<z.ZodNumber, z.ZodTransform<DecimalString, number>>]>;
426
426
  }, z.core.$strip>>>;
427
427
  }, z.core.$strip>;
428
+ /**
429
+ * Parses a single market into the normalized binary {@link Market} model.
430
+ *
431
+ * Markets without exactly two outcomes cannot be represented by the binary
432
+ * model and fail validation instead of throwing during normalization.
433
+ */
428
434
  declare const MarketSchema: z.ZodPipe<z.ZodObject<{
429
435
  id: z.ZodPipe<z.ZodString, z.ZodTransform<MarketId, string>>;
430
436
  question: z.ZodOptional<z.ZodNullable<z.ZodString>>;
@@ -884,7 +890,7 @@ declare const MarketSchema: z.ZodPipe<z.ZodObject<{
884
890
  rebateRate: DecimalString;
885
891
  } | null | undefined;
886
892
  }>>;
887
- declare const ListMarketsResponseSchema: z.ZodArray<z.ZodPipe<z.ZodObject<{
893
+ declare const ListMarketsResponseSchema: z.ZodPipe<z.ZodArray<z.ZodPipe<z.ZodObject<{
888
894
  id: z.ZodPipe<z.ZodString, z.ZodTransform<MarketId, string>>;
889
895
  question: z.ZodOptional<z.ZodNullable<z.ZodString>>;
890
896
  conditionId: z.ZodPipe<z.ZodPipe<z.ZodTransform<unknown, unknown>, z.ZodOptional<z.ZodNullable<z.ZodPipe<z.ZodString, z.ZodTransform<CtfConditionId, string>>>>>, z.ZodTransform<CtfConditionId | null, CtfConditionId | null | undefined>>;
@@ -1113,7 +1119,7 @@ declare const ListMarketsResponseSchema: z.ZodArray<z.ZodPipe<z.ZodObject<{
1113
1119
  takerOnly: z.ZodBoolean;
1114
1120
  rebateRate: z.ZodUnion<readonly [z.ZodPipe<z.ZodString, z.ZodTransform<DecimalString, string>>, z.ZodPipe<z.ZodNumber, z.ZodTransform<DecimalString, number>>]>;
1115
1121
  }, z.core.$strip>>>;
1116
- }, z.core.$strip>, z.ZodTransform<Market, {
1122
+ }, z.core.$strip>, z.ZodTransform<Market | null, {
1117
1123
  id: MarketId;
1118
1124
  conditionId: CtfConditionId | null;
1119
1125
  outcomes: string[];
@@ -1342,7 +1348,7 @@ declare const ListMarketsResponseSchema: z.ZodArray<z.ZodPipe<z.ZodObject<{
1342
1348
  takerOnly: boolean;
1343
1349
  rebateRate: DecimalString;
1344
1350
  } | null | undefined;
1345
- }>>>;
1351
+ }>>>, z.ZodTransform<Market[], (Market | null)[]>>;
1346
1352
  declare const ListMarketsKeysetResponseSchema: z.ZodPipe<z.ZodObject<{
1347
1353
  markets: z.ZodArray<z.ZodPipe<z.ZodObject<{
1348
1354
  id: z.ZodPipe<z.ZodString, z.ZodTransform<MarketId, string>>;
@@ -1573,7 +1579,7 @@ declare const ListMarketsKeysetResponseSchema: z.ZodPipe<z.ZodObject<{
1573
1579
  takerOnly: z.ZodBoolean;
1574
1580
  rebateRate: z.ZodUnion<readonly [z.ZodPipe<z.ZodString, z.ZodTransform<DecimalString, string>>, z.ZodPipe<z.ZodNumber, z.ZodTransform<DecimalString, number>>]>;
1575
1581
  }, z.core.$strip>>>;
1576
- }, z.core.$strip>, z.ZodTransform<Market, {
1582
+ }, z.core.$strip>, z.ZodTransform<Market | null, {
1577
1583
  id: MarketId;
1578
1584
  conditionId: CtfConditionId | null;
1579
1585
  outcomes: string[];
@@ -1808,7 +1814,7 @@ declare const ListMarketsKeysetResponseSchema: z.ZodPipe<z.ZodObject<{
1808
1814
  items: Market[];
1809
1815
  nextCursor: PaginationCursor | undefined;
1810
1816
  }, {
1811
- markets: Market[];
1817
+ markets: (Market | null)[];
1812
1818
  next_cursor?: PaginationCursor | undefined;
1813
1819
  }>>;
1814
1820
  declare const FetchMarketTagsResponseSchema: z.ZodArray<z.ZodObject<{
@@ -1831,6 +1837,11 @@ type ListMarketsResponse = z.infer<typeof ListMarketsResponseSchema>;
1831
1837
  type ListMarketsKeysetResponse = z.infer<typeof ListMarketsKeysetResponseSchema>;
1832
1838
  type FetchMarketTagsResponse = z.infer<typeof FetchMarketTagsResponseSchema>;
1833
1839
  declare function normalizeMarket(market: GammaMarket): Market;
1840
+ /**
1841
+ * Whether a raw market has exactly the two outcomes required by the binary
1842
+ * {@link Market} model. Callers must check this before {@link normalizeMarket}.
1843
+ */
1844
+ declare function hasBinaryOutcomes(market: GammaMarket): boolean;
1834
1845
 
1835
1846
  declare const SeriesIdSchema: z.ZodPipe<z.ZodUnion<readonly [z.ZodString, z.ZodPipe<z.ZodNumber, z.ZodTransform<string, number>>]>, z.ZodTransform<SeriesId, string>>;
1836
1847
  declare const CollectionReferenceSchema: z.ZodObject<{
@@ -2144,6 +2155,7 @@ type EventPartner = {
2144
2155
  };
2145
2156
  type Event = {
2146
2157
  id: EventId;
2158
+ parentEventId?: EventId | null;
2147
2159
  ticker?: string | null;
2148
2160
  slug?: string | null;
2149
2161
  title?: string | null;
@@ -2212,7 +2224,7 @@ declare const GammaEventSchema: z.ZodObject<{
2212
2224
  volume1yr: z.ZodOptional<z.ZodNullable<z.ZodUnion<readonly [z.ZodPipe<z.ZodString, z.ZodTransform<DecimalString, string>>, z.ZodPipe<z.ZodNumber, z.ZodTransform<DecimalString, number>>]>>>;
2213
2225
  featuredImage: z.ZodOptional<z.ZodNullable<z.ZodString>>;
2214
2226
  disqusThread: z.ZodOptional<z.ZodNullable<z.ZodString>>;
2215
- parentEventId: z.ZodOptional<z.ZodNullable<z.ZodNumber>>;
2227
+ parentEventId: z.ZodOptional<z.ZodNullable<z.ZodPipe<z.ZodUnion<readonly [z.ZodString, z.ZodPipe<z.ZodNumber, z.ZodTransform<string, number>>]>, z.ZodTransform<EventId, string>>>>;
2216
2228
  enableOrderBook: z.ZodOptional<z.ZodNullable<z.ZodBoolean>>;
2217
2229
  liquidityAmm: z.ZodOptional<z.ZodNullable<z.ZodUnion<readonly [z.ZodPipe<z.ZodString, z.ZodTransform<DecimalString, string>>, z.ZodPipe<z.ZodNumber, z.ZodTransform<DecimalString, number>>]>>>;
2218
2230
  liquidityClob: z.ZodOptional<z.ZodNullable<z.ZodUnion<readonly [z.ZodPipe<z.ZodString, z.ZodTransform<DecimalString, string>>, z.ZodPipe<z.ZodNumber, z.ZodTransform<DecimalString, number>>]>>>;
@@ -2982,7 +2994,7 @@ declare const EventSchema: z.ZodPipe<z.ZodObject<{
2982
2994
  volume1yr: z.ZodOptional<z.ZodNullable<z.ZodUnion<readonly [z.ZodPipe<z.ZodString, z.ZodTransform<DecimalString, string>>, z.ZodPipe<z.ZodNumber, z.ZodTransform<DecimalString, number>>]>>>;
2983
2995
  featuredImage: z.ZodOptional<z.ZodNullable<z.ZodString>>;
2984
2996
  disqusThread: z.ZodOptional<z.ZodNullable<z.ZodString>>;
2985
- parentEventId: z.ZodOptional<z.ZodNullable<z.ZodNumber>>;
2997
+ parentEventId: z.ZodOptional<z.ZodNullable<z.ZodPipe<z.ZodUnion<readonly [z.ZodString, z.ZodPipe<z.ZodNumber, z.ZodTransform<string, number>>]>, z.ZodTransform<EventId, string>>>>;
2986
2998
  enableOrderBook: z.ZodOptional<z.ZodNullable<z.ZodBoolean>>;
2987
2999
  liquidityAmm: z.ZodOptional<z.ZodNullable<z.ZodUnion<readonly [z.ZodPipe<z.ZodString, z.ZodTransform<DecimalString, string>>, z.ZodPipe<z.ZodNumber, z.ZodTransform<DecimalString, number>>]>>>;
2988
3000
  liquidityClob: z.ZodOptional<z.ZodNullable<z.ZodUnion<readonly [z.ZodPipe<z.ZodString, z.ZodTransform<DecimalString, string>>, z.ZodPipe<z.ZodNumber, z.ZodTransform<DecimalString, number>>]>>>;
@@ -3751,7 +3763,7 @@ declare const EventSchema: z.ZodPipe<z.ZodObject<{
3751
3763
  volume1yr?: DecimalString | null | undefined;
3752
3764
  featuredImage?: string | null | undefined;
3753
3765
  disqusThread?: string | null | undefined;
3754
- parentEventId?: number | null | undefined;
3766
+ parentEventId?: EventId | null | undefined;
3755
3767
  enableOrderBook?: boolean | null | undefined;
3756
3768
  liquidityAmm?: DecimalString | null | undefined;
3757
3769
  liquidityClob?: DecimalString | null | undefined;
@@ -4063,7 +4075,7 @@ declare const ListEventsResponseSchema: z.ZodArray<z.ZodPipe<z.ZodObject<{
4063
4075
  volume1yr: z.ZodOptional<z.ZodNullable<z.ZodUnion<readonly [z.ZodPipe<z.ZodString, z.ZodTransform<DecimalString, string>>, z.ZodPipe<z.ZodNumber, z.ZodTransform<DecimalString, number>>]>>>;
4064
4076
  featuredImage: z.ZodOptional<z.ZodNullable<z.ZodString>>;
4065
4077
  disqusThread: z.ZodOptional<z.ZodNullable<z.ZodString>>;
4066
- parentEventId: z.ZodOptional<z.ZodNullable<z.ZodNumber>>;
4078
+ parentEventId: z.ZodOptional<z.ZodNullable<z.ZodPipe<z.ZodUnion<readonly [z.ZodString, z.ZodPipe<z.ZodNumber, z.ZodTransform<string, number>>]>, z.ZodTransform<EventId, string>>>>;
4067
4079
  enableOrderBook: z.ZodOptional<z.ZodNullable<z.ZodBoolean>>;
4068
4080
  liquidityAmm: z.ZodOptional<z.ZodNullable<z.ZodUnion<readonly [z.ZodPipe<z.ZodString, z.ZodTransform<DecimalString, string>>, z.ZodPipe<z.ZodNumber, z.ZodTransform<DecimalString, number>>]>>>;
4069
4081
  liquidityClob: z.ZodOptional<z.ZodNullable<z.ZodUnion<readonly [z.ZodPipe<z.ZodString, z.ZodTransform<DecimalString, string>>, z.ZodPipe<z.ZodNumber, z.ZodTransform<DecimalString, number>>]>>>;
@@ -4832,7 +4844,7 @@ declare const ListEventsResponseSchema: z.ZodArray<z.ZodPipe<z.ZodObject<{
4832
4844
  volume1yr?: DecimalString | null | undefined;
4833
4845
  featuredImage?: string | null | undefined;
4834
4846
  disqusThread?: string | null | undefined;
4835
- parentEventId?: number | null | undefined;
4847
+ parentEventId?: EventId | null | undefined;
4836
4848
  enableOrderBook?: boolean | null | undefined;
4837
4849
  liquidityAmm?: DecimalString | null | undefined;
4838
4850
  liquidityClob?: DecimalString | null | undefined;
@@ -5145,7 +5157,7 @@ declare const ListEventsKeysetResponseSchema: z.ZodPipe<z.ZodObject<{
5145
5157
  volume1yr: z.ZodOptional<z.ZodNullable<z.ZodUnion<readonly [z.ZodPipe<z.ZodString, z.ZodTransform<DecimalString, string>>, z.ZodPipe<z.ZodNumber, z.ZodTransform<DecimalString, number>>]>>>;
5146
5158
  featuredImage: z.ZodOptional<z.ZodNullable<z.ZodString>>;
5147
5159
  disqusThread: z.ZodOptional<z.ZodNullable<z.ZodString>>;
5148
- parentEventId: z.ZodOptional<z.ZodNullable<z.ZodNumber>>;
5160
+ parentEventId: z.ZodOptional<z.ZodNullable<z.ZodPipe<z.ZodUnion<readonly [z.ZodString, z.ZodPipe<z.ZodNumber, z.ZodTransform<string, number>>]>, z.ZodTransform<EventId, string>>>>;
5149
5161
  enableOrderBook: z.ZodOptional<z.ZodNullable<z.ZodBoolean>>;
5150
5162
  liquidityAmm: z.ZodOptional<z.ZodNullable<z.ZodUnion<readonly [z.ZodPipe<z.ZodString, z.ZodTransform<DecimalString, string>>, z.ZodPipe<z.ZodNumber, z.ZodTransform<DecimalString, number>>]>>>;
5151
5163
  liquidityClob: z.ZodOptional<z.ZodNullable<z.ZodUnion<readonly [z.ZodPipe<z.ZodString, z.ZodTransform<DecimalString, string>>, z.ZodPipe<z.ZodNumber, z.ZodTransform<DecimalString, number>>]>>>;
@@ -5914,7 +5926,7 @@ declare const ListEventsKeysetResponseSchema: z.ZodPipe<z.ZodObject<{
5914
5926
  volume1yr?: DecimalString | null | undefined;
5915
5927
  featuredImage?: string | null | undefined;
5916
5928
  disqusThread?: string | null | undefined;
5917
- parentEventId?: number | null | undefined;
5929
+ parentEventId?: EventId | null | undefined;
5918
5930
  enableOrderBook?: boolean | null | undefined;
5919
5931
  liquidityAmm?: DecimalString | null | undefined;
5920
5932
  liquidityClob?: DecimalString | null | undefined;
@@ -6479,7 +6491,7 @@ declare const PublicSearchResponseSchema: z.ZodObject<{
6479
6491
  volume1yr: z.ZodOptional<z.ZodNullable<z.ZodUnion<readonly [z.ZodPipe<z.ZodString, z.ZodTransform<DecimalString, string>>, z.ZodPipe<z.ZodNumber, z.ZodTransform<DecimalString, number>>]>>>;
6480
6492
  featuredImage: z.ZodOptional<z.ZodNullable<z.ZodString>>;
6481
6493
  disqusThread: z.ZodOptional<z.ZodNullable<z.ZodString>>;
6482
- parentEventId: z.ZodOptional<z.ZodNullable<z.ZodNumber>>;
6494
+ parentEventId: z.ZodOptional<z.ZodNullable<z.ZodPipe<z.ZodUnion<readonly [z.ZodString, z.ZodPipe<z.ZodNumber, z.ZodTransform<string, number>>]>, z.ZodTransform<EventId, string>>>>;
6483
6495
  enableOrderBook: z.ZodOptional<z.ZodNullable<z.ZodBoolean>>;
6484
6496
  liquidityAmm: z.ZodOptional<z.ZodNullable<z.ZodUnion<readonly [z.ZodPipe<z.ZodString, z.ZodTransform<DecimalString, string>>, z.ZodPipe<z.ZodNumber, z.ZodTransform<DecimalString, number>>]>>>;
6485
6497
  liquidityClob: z.ZodOptional<z.ZodNullable<z.ZodUnion<readonly [z.ZodPipe<z.ZodString, z.ZodTransform<DecimalString, string>>, z.ZodPipe<z.ZodNumber, z.ZodTransform<DecimalString, number>>]>>>;
@@ -7248,7 +7260,7 @@ declare const PublicSearchResponseSchema: z.ZodObject<{
7248
7260
  volume1yr?: DecimalString | null | undefined;
7249
7261
  featuredImage?: string | null | undefined;
7250
7262
  disqusThread?: string | null | undefined;
7251
- parentEventId?: number | null | undefined;
7263
+ parentEventId?: EventId | null | undefined;
7252
7264
  enableOrderBook?: boolean | null | undefined;
7253
7265
  liquidityAmm?: DecimalString | null | undefined;
7254
7266
  liquidityClob?: DecimalString | null | undefined;
@@ -7748,7 +7760,7 @@ declare const SeriesSchema: z.ZodObject<{
7748
7760
  volume1yr: z.ZodOptional<z.ZodNullable<z.ZodUnion<readonly [z.ZodPipe<z.ZodString, z.ZodTransform<DecimalString, string>>, z.ZodPipe<z.ZodNumber, z.ZodTransform<DecimalString, number>>]>>>;
7749
7761
  featuredImage: z.ZodOptional<z.ZodNullable<z.ZodString>>;
7750
7762
  disqusThread: z.ZodOptional<z.ZodNullable<z.ZodString>>;
7751
- parentEventId: z.ZodOptional<z.ZodNullable<z.ZodNumber>>;
7763
+ parentEventId: z.ZodOptional<z.ZodNullable<z.ZodPipe<z.ZodUnion<readonly [z.ZodString, z.ZodPipe<z.ZodNumber, z.ZodTransform<string, number>>]>, z.ZodTransform<EventId, string>>>>;
7752
7764
  enableOrderBook: z.ZodOptional<z.ZodNullable<z.ZodBoolean>>;
7753
7765
  liquidityAmm: z.ZodOptional<z.ZodNullable<z.ZodUnion<readonly [z.ZodPipe<z.ZodString, z.ZodTransform<DecimalString, string>>, z.ZodPipe<z.ZodNumber, z.ZodTransform<DecimalString, number>>]>>>;
7754
7766
  liquidityClob: z.ZodOptional<z.ZodNullable<z.ZodUnion<readonly [z.ZodPipe<z.ZodString, z.ZodTransform<DecimalString, string>>, z.ZodPipe<z.ZodNumber, z.ZodTransform<DecimalString, number>>]>>>;
@@ -8517,7 +8529,7 @@ declare const SeriesSchema: z.ZodObject<{
8517
8529
  volume1yr?: DecimalString | null | undefined;
8518
8530
  featuredImage?: string | null | undefined;
8519
8531
  disqusThread?: string | null | undefined;
8520
- parentEventId?: number | null | undefined;
8532
+ parentEventId?: EventId | null | undefined;
8521
8533
  enableOrderBook?: boolean | null | undefined;
8522
8534
  liquidityAmm?: DecimalString | null | undefined;
8523
8535
  liquidityClob?: DecimalString | null | undefined;
@@ -8927,7 +8939,7 @@ declare const ListSeriesResponseSchema: z.ZodArray<z.ZodObject<{
8927
8939
  volume1yr: z.ZodOptional<z.ZodNullable<z.ZodUnion<readonly [z.ZodPipe<z.ZodString, z.ZodTransform<DecimalString, string>>, z.ZodPipe<z.ZodNumber, z.ZodTransform<DecimalString, number>>]>>>;
8928
8940
  featuredImage: z.ZodOptional<z.ZodNullable<z.ZodString>>;
8929
8941
  disqusThread: z.ZodOptional<z.ZodNullable<z.ZodString>>;
8930
- parentEventId: z.ZodOptional<z.ZodNullable<z.ZodNumber>>;
8942
+ parentEventId: z.ZodOptional<z.ZodNullable<z.ZodPipe<z.ZodUnion<readonly [z.ZodString, z.ZodPipe<z.ZodNumber, z.ZodTransform<string, number>>]>, z.ZodTransform<EventId, string>>>>;
8931
8943
  enableOrderBook: z.ZodOptional<z.ZodNullable<z.ZodBoolean>>;
8932
8944
  liquidityAmm: z.ZodOptional<z.ZodNullable<z.ZodUnion<readonly [z.ZodPipe<z.ZodString, z.ZodTransform<DecimalString, string>>, z.ZodPipe<z.ZodNumber, z.ZodTransform<DecimalString, number>>]>>>;
8933
8945
  liquidityClob: z.ZodOptional<z.ZodNullable<z.ZodUnion<readonly [z.ZodPipe<z.ZodString, z.ZodTransform<DecimalString, string>>, z.ZodPipe<z.ZodNumber, z.ZodTransform<DecimalString, number>>]>>>;
@@ -9696,7 +9708,7 @@ declare const ListSeriesResponseSchema: z.ZodArray<z.ZodObject<{
9696
9708
  volume1yr?: DecimalString | null | undefined;
9697
9709
  featuredImage?: string | null | undefined;
9698
9710
  disqusThread?: string | null | undefined;
9699
- parentEventId?: number | null | undefined;
9711
+ parentEventId?: EventId | null | undefined;
9700
9712
  enableOrderBook?: boolean | null | undefined;
9701
9713
  liquidityAmm?: DecimalString | null | undefined;
9702
9714
  liquidityClob?: DecimalString | null | undefined;
@@ -10183,4 +10195,4 @@ declare const WalletTypeSchema: z.ZodObject<{
10183
10195
  }>;
10184
10196
  }, z.core.$strip>;
10185
10197
 
10186
- export { type BestLine, BestLineSchema, type CategoryReference, CategoryReferenceSchema, type Chat, ChatSchema, type ClobRewards, ClobRewardsSchema, type CollectionReference, CollectionReferenceSchema, type Event, type EventCreator, EventCreatorSchema, type EventDisplay, type EventEstimation, type EventExternalPartnerMapping, EventExternalPartnerMappingSchema, type EventMetrics, type EventPartner, type EventReference, EventReferenceSchema, type EventResolution, type EventSchedule, EventSchema, type EventSeries, type EventSportsMetadata, type EventState, type EventTag, type EventTrading, type FeeSchedule, FeeScheduleSchema, type FetchEventTagsResponse, FetchEventTagsResponseSchema, type FetchMarketTagsResponse, FetchMarketTagsResponseSchema, type GammaEvent, GammaEventSchema, type GammaMarket, GammaMarketSchema, type ImageOptimization, ImageOptimizationSchema, type InternalUser, InternalUserSchema, type ListEventsKeysetResponse, ListEventsKeysetResponseSchema, type ListEventsResponse, ListEventsResponseSchema, type ListMarketsKeysetResponse, ListMarketsKeysetResponseSchema, type ListMarketsResponse, ListMarketsResponseSchema, type ListRelatedTagResourcesResponse, ListRelatedTagResourcesResponseSchema, type ListRelatedTagsResponse, ListRelatedTagsResponseSchema, type ListSeriesResponse, ListSeriesResponseSchema, type ListSportsMetadataResponse, ListSportsMetadataResponseSchema, type ListTagsResponse, ListTagsResponseSchema, type ListTeamsResponse, ListTeamsResponseSchema, type Market, type MarketEvent, type MarketMetrics, type MarketOutcome, type MarketOutcomes, type MarketPrices, type MarketResolution, type MarketRewards, MarketSchema, type MarketSportsMetadata, type MarketState, type MarketTag, type MarketTrading, type PaginationEnvelope, PaginationEnvelopeSchema, type Partner, PartnerSchema, type Profile, ProfileSchema, type PublicProfile, PublicProfileSchema, type PublicProfileUser, PublicProfileUserSchema, type PublicSearchResponse, PublicSearchResponseSchema, type RelatedMarket, RelatedMarketSchema, type RelatedTag, RelatedTagSchema, type SearchPagination, SearchPaginationSchema, type SearchTag, SearchTagSchema, type Series, SeriesIdSchema, type SeriesReference, SeriesReferenceSchema, SeriesSchema, type SportsMarketTypesResponse, SportsMarketTypesResponseSchema, type SportsMetadata, SportsMetadataSchema, type Tag, type TagReference, TagReferenceSchema, TagSchema, type Team, TeamSchema, type TemplateReference, TemplateReferenceSchema, UmaResolutionStatus, WalletType, WalletTypeSchema, normalizeMarket };
10198
+ export { type BestLine, BestLineSchema, type CategoryReference, CategoryReferenceSchema, type Chat, ChatSchema, type ClobRewards, ClobRewardsSchema, type CollectionReference, CollectionReferenceSchema, type Event, type EventCreator, EventCreatorSchema, type EventDisplay, type EventEstimation, type EventExternalPartnerMapping, EventExternalPartnerMappingSchema, type EventMetrics, type EventPartner, type EventReference, EventReferenceSchema, type EventResolution, type EventSchedule, EventSchema, type EventSeries, type EventSportsMetadata, type EventState, type EventTag, type EventTrading, type FeeSchedule, FeeScheduleSchema, type FetchEventTagsResponse, FetchEventTagsResponseSchema, type FetchMarketTagsResponse, FetchMarketTagsResponseSchema, type GammaEvent, GammaEventSchema, type GammaMarket, GammaMarketSchema, type ImageOptimization, ImageOptimizationSchema, type InternalUser, InternalUserSchema, type ListEventsKeysetResponse, ListEventsKeysetResponseSchema, type ListEventsResponse, ListEventsResponseSchema, type ListMarketsKeysetResponse, ListMarketsKeysetResponseSchema, type ListMarketsResponse, ListMarketsResponseSchema, type ListRelatedTagResourcesResponse, ListRelatedTagResourcesResponseSchema, type ListRelatedTagsResponse, ListRelatedTagsResponseSchema, type ListSeriesResponse, ListSeriesResponseSchema, type ListSportsMetadataResponse, ListSportsMetadataResponseSchema, type ListTagsResponse, ListTagsResponseSchema, type ListTeamsResponse, ListTeamsResponseSchema, type Market, type MarketEvent, type MarketMetrics, type MarketOutcome, type MarketOutcomes, type MarketPrices, type MarketResolution, type MarketRewards, MarketSchema, type MarketSportsMetadata, type MarketState, type MarketTag, type MarketTrading, type PaginationEnvelope, PaginationEnvelopeSchema, type Partner, PartnerSchema, type Profile, ProfileSchema, type PublicProfile, PublicProfileSchema, type PublicProfileUser, PublicProfileUserSchema, type PublicSearchResponse, PublicSearchResponseSchema, type RelatedMarket, RelatedMarketSchema, type RelatedTag, RelatedTagSchema, type SearchPagination, SearchPaginationSchema, type SearchTag, SearchTagSchema, type Series, SeriesIdSchema, type SeriesReference, SeriesReferenceSchema, SeriesSchema, type SportsMarketTypesResponse, SportsMarketTypesResponseSchema, type SportsMetadata, SportsMetadataSchema, type Tag, type TagReference, TagReferenceSchema, TagSchema, type Team, TeamSchema, type TemplateReference, TemplateReferenceSchema, UmaResolutionStatus, WalletType, WalletTypeSchema, hasBinaryOutcomes, normalizeMarket };
@@ -1,2 +1,2 @@
1
- import {a as a$1,E,e,s,r,q}from'../chunk-YJ7M6UHS.js';export{x as BestLineSchema,d as CategoryReferenceSchema,t as ChatSchema,g as ClobRewardsSchema,q as CollectionReferenceSchema,N as CommentMediaSchema,I as CommentPositionSchema,J as CommentProfileSchema,O as CommentSchema,u as EventCreatorSchema,w as EventExternalPartnerMappingSchema,c as EventReferenceSchema,E as EventSchema,b as FeeScheduleSchema,H as FetchEventTagsResponseSchema,n as FetchMarketTagsResponseSchema,D as GammaEventSchema,j as GammaMarketSchema,a as ImageOptimizationSchema,h as InternalUserSchema,P as ListCommentsResponseSchema,G as ListEventsKeysetResponseSchema,F as ListEventsResponseSchema,m as ListMarketsKeysetResponseSchema,l as ListMarketsResponseSchema,B as ListSportsMetadataResponseSchema,A as ListTeamsResponseSchema,k as MarketSchema,v as PartnerSchema,M as ReactionSchema,K as ReactionType,L as ReactionTypeSchema,f as RelatedMarketSchema,p as SeriesIdSchema,r as SeriesReferenceSchema,C as SportsMarketTypesResponseSchema,z as SportsMetadataSchema,e as TagReferenceSchema,y as TeamSchema,s as TemplateReferenceSchema,i as UmaResolutionStatus,o as normalizeMarket}from'../chunk-YJ7M6UHS.js';import {ka,$,Da}from'../chunk-IHJYHHWK.js';export{Da as TagIdSchema}from'../chunk-IHJYHHWK.js';import {z as z$1}from'zod';var pe=z$1.object({hasMore:z$1.boolean().nullish(),totalResults:z$1.number().int().nullish()});var P=z$1.object({id:z$1.string(),communityMod:z$1.boolean().nullish(),creator:z$1.boolean().nullish(),mod:z$1.boolean().nullish()}),b=z$1.object({id:z$1.string().nullish(),name:z$1.string().nullish(),user:z$1.number().int().nullish(),referral:z$1.string().nullish(),createdBy:z$1.number().int().nullish(),updatedBy:z$1.number().int().nullish(),createdAt:ka.nullish(),updatedAt:ka.nullish(),utmSource:z$1.string().nullish(),utmMedium:z$1.string().nullish(),utmCampaign:z$1.string().nullish(),utmContent:z$1.string().nullish(),utmTerm:z$1.string().nullish(),walletActivated:z$1.boolean().nullish(),pseudonym:z$1.string().nullish(),displayUsernamePublic:z$1.boolean().nullish(),profileImage:z$1.string().nullish(),bio:z$1.string().nullish(),proxyWallet:z$1.string().nullish(),profileImageOptimized:a$1.nullish(),isCloseOnly:z$1.boolean().nullish(),isCertReq:z$1.boolean().nullish(),certReqDate:ka.nullish(),discordUsername:z$1.string().nullish(),xUsername:z$1.string().nullish(),verifiedBadge:z$1.boolean().nullish(),dubPartnerId:z$1.string().nullish(),termsAcceptedAt:ka.nullish(),viewOnlyAcknowledgedAt:ka.nullish(),isReferralRestricted:z$1.boolean().nullish()}).transform(({proxyWallet:o,...i})=>({...i,wallet:o})),ge=z$1.object({createdAt:ka.nullish(),proxyWallet:$.nullish(),profileImage:z$1.string().nullish(),displayUsernamePublic:z$1.boolean().nullish(),bio:z$1.string().nullish(),pseudonym:z$1.string().nullish(),name:z$1.string().nullish(),users:z$1.array(P).nullish(),xUsername:z$1.string().nullish(),verifiedBadge:z$1.boolean().nullish()}).transform(({proxyWallet:o,...i})=>({...i,wallet:o}));var T=z$1.object({id:Da,event_count:z$1.number().int().nullish(),label:z$1.string().nullish(),slug:z$1.string().nullish()}).transform(({event_count:o,...i})=>({...i,eventCount:o})),z=z$1.object({hasMore:z$1.boolean().nullish(),totalResults:z$1.number().int().nullish()}),Re=z$1.object({events:z$1.array(E).nullish(),tags:z$1.array(T).nullish(),profiles:z$1.array(b).nullish(),pagination:z.nullish()});var a=e.extend({templates:z$1.array(s).nullish()}),L=z$1.object({id:z$1.string(),tagID:z$1.number().int().nullish(),relatedTagID:z$1.number().int().nullish(),rank:z$1.number().int().nullish()}).transform(({tagID:o,relatedTagID:i,...R})=>({...R,tagId:o,relatedTagId:i})),Ae=z$1.array(a),ve=z$1.array(L),Ee=z$1.array(a);var I=r.extend({events:z$1.array(E).nullish(),collections:z$1.array(q).nullish(),tags:z$1.array(a).nullish()}),Ce=z$1.array(I);var y=(n=>(n[n.EOA=0]="EOA",n[n.POLY_PROXY=1]="POLY_PROXY",n[n.GNOSIS_SAFE=2]="GNOSIS_SAFE",n[n.DEPOSIT_WALLET=3]="DEPOSIT_WALLET",n))(y||{}),Be=z$1.object({type:z$1.enum(y),typeName:z$1.enum(["EOA","POLY_PROXY","GNOSIS_SAFE","DEPOSIT_WALLET"])});export{Ee as ListRelatedTagResourcesResponseSchema,ve as ListRelatedTagsResponseSchema,Ce as ListSeriesResponseSchema,Ae as ListTagsResponseSchema,pe as PaginationEnvelopeSchema,b as ProfileSchema,ge as PublicProfileSchema,P as PublicProfileUserSchema,Re as PublicSearchResponseSchema,L as RelatedTagSchema,z as SearchPaginationSchema,T as SearchTagSchema,I as SeriesSchema,a as TagSchema,y as WalletType,Be as WalletTypeSchema};//# sourceMappingURL=index.js.map
1
+ import {a as a$1,F,e,t,s,r}from'../chunk-RN5EPAZQ.js';export{y as BestLineSchema,d as CategoryReferenceSchema,u as ChatSchema,g as ClobRewardsSchema,r as CollectionReferenceSchema,O as CommentMediaSchema,J as CommentPositionSchema,K as CommentProfileSchema,P as CommentSchema,v as EventCreatorSchema,x as EventExternalPartnerMappingSchema,c as EventReferenceSchema,F as EventSchema,b as FeeScheduleSchema,I as FetchEventTagsResponseSchema,n as FetchMarketTagsResponseSchema,E as GammaEventSchema,j as GammaMarketSchema,a as ImageOptimizationSchema,h as InternalUserSchema,Q as ListCommentsResponseSchema,H as ListEventsKeysetResponseSchema,G as ListEventsResponseSchema,m as ListMarketsKeysetResponseSchema,l as ListMarketsResponseSchema,C as ListSportsMetadataResponseSchema,B as ListTeamsResponseSchema,k as MarketSchema,w as PartnerSchema,N as ReactionSchema,L as ReactionType,M as ReactionTypeSchema,f as RelatedMarketSchema,q as SeriesIdSchema,s as SeriesReferenceSchema,D as SportsMarketTypesResponseSchema,A as SportsMetadataSchema,e as TagReferenceSchema,z as TeamSchema,t as TemplateReferenceSchema,i as UmaResolutionStatus,p as hasBinaryOutcomes,o as normalizeMarket}from'../chunk-RN5EPAZQ.js';import {ka,$,Da}from'../chunk-SB2LAVJ4.js';export{Da as TagIdSchema}from'../chunk-SB2LAVJ4.js';import {z as z$1}from'zod';var he=z$1.object({hasMore:z$1.boolean().nullish(),totalResults:z$1.number().int().nullish()});var P=z$1.object({id:z$1.string(),communityMod:z$1.boolean().nullish(),creator:z$1.boolean().nullish(),mod:z$1.boolean().nullish()}),b=z$1.object({id:z$1.string().nullish(),name:z$1.string().nullish(),user:z$1.number().int().nullish(),referral:z$1.string().nullish(),createdBy:z$1.number().int().nullish(),updatedBy:z$1.number().int().nullish(),createdAt:ka.nullish(),updatedAt:ka.nullish(),utmSource:z$1.string().nullish(),utmMedium:z$1.string().nullish(),utmCampaign:z$1.string().nullish(),utmContent:z$1.string().nullish(),utmTerm:z$1.string().nullish(),walletActivated:z$1.boolean().nullish(),pseudonym:z$1.string().nullish(),displayUsernamePublic:z$1.boolean().nullish(),profileImage:z$1.string().nullish(),bio:z$1.string().nullish(),proxyWallet:z$1.string().nullish(),profileImageOptimized:a$1.nullish(),isCloseOnly:z$1.boolean().nullish(),isCertReq:z$1.boolean().nullish(),certReqDate:ka.nullish(),discordUsername:z$1.string().nullish(),xUsername:z$1.string().nullish(),verifiedBadge:z$1.boolean().nullish(),dubPartnerId:z$1.string().nullish(),termsAcceptedAt:ka.nullish(),viewOnlyAcknowledgedAt:ka.nullish(),isReferralRestricted:z$1.boolean().nullish()}).transform(({proxyWallet:o,...i})=>({...i,wallet:o})),Se=z$1.object({createdAt:ka.nullish(),proxyWallet:$.nullish(),profileImage:z$1.string().nullish(),displayUsernamePublic:z$1.boolean().nullish(),bio:z$1.string().nullish(),pseudonym:z$1.string().nullish(),name:z$1.string().nullish(),users:z$1.array(P).nullish(),xUsername:z$1.string().nullish(),verifiedBadge:z$1.boolean().nullish()}).transform(({proxyWallet:o,...i})=>({...i,wallet:o}));var T=z$1.object({id:Da,event_count:z$1.number().int().nullish(),label:z$1.string().nullish(),slug:z$1.string().nullish()}).transform(({event_count:o,...i})=>({...i,eventCount:o})),z=z$1.object({hasMore:z$1.boolean().nullish(),totalResults:z$1.number().int().nullish()}),Pe=z$1.object({events:z$1.array(F).nullish(),tags:z$1.array(T).nullish(),profiles:z$1.array(b).nullish(),pagination:z.nullish()});var a=e.extend({templates:z$1.array(t).nullish()}),L=z$1.object({id:z$1.string(),tagID:z$1.number().int().nullish(),relatedTagID:z$1.number().int().nullish(),rank:z$1.number().int().nullish()}).transform(({tagID:o,relatedTagID:i,...R})=>({...R,tagId:o,relatedTagId:i})),ve=z$1.array(a),Ee=z$1.array(L),Oe=z$1.array(a);var I=s.extend({events:z$1.array(F).nullish(),collections:z$1.array(r).nullish(),tags:z$1.array(a).nullish()}),De=z$1.array(I);var y=(n=>(n[n.EOA=0]="EOA",n[n.POLY_PROXY=1]="POLY_PROXY",n[n.GNOSIS_SAFE=2]="GNOSIS_SAFE",n[n.DEPOSIT_WALLET=3]="DEPOSIT_WALLET",n))(y||{}),Me=z$1.object({type:z$1.enum(y),typeName:z$1.enum(["EOA","POLY_PROXY","GNOSIS_SAFE","DEPOSIT_WALLET"])});export{Oe as ListRelatedTagResourcesResponseSchema,Ee as ListRelatedTagsResponseSchema,De as ListSeriesResponseSchema,ve as ListTagsResponseSchema,he as PaginationEnvelopeSchema,b as ProfileSchema,Se as PublicProfileSchema,P as PublicProfileUserSchema,Pe as PublicSearchResponseSchema,L as RelatedTagSchema,z as SearchPaginationSchema,T as SearchTagSchema,I as SeriesSchema,a as TagSchema,y as WalletType,Me as WalletTypeSchema};//# sourceMappingURL=index.js.map
2
2
  //# sourceMappingURL=index.js.map
@@ -1 +1 @@
1
- {"version":3,"sources":["../../src/gamma/pagination.ts","../../src/gamma/profile.ts","../../src/gamma/search.ts","../../src/gamma/tag.ts","../../src/gamma/series.ts","../../src/gamma/wallet.ts"],"names":["PaginationEnvelopeSchema","z","PublicProfileUserSchema","ProfileSchema","IsoDateTimeStringSchema","ImageOptimizationSchema","proxyWallet","rest","PublicProfileSchema","EvmAddressSchema","SearchTagSchema","TagIdSchema","event_count","SearchPaginationSchema","PublicSearchResponseSchema","EventSchema","TagSchema","TagReferenceSchema","TemplateReferenceSchema","RelatedTagSchema","tagID","relatedTagID","ListTagsResponseSchema","ListRelatedTagsResponseSchema","ListRelatedTagResourcesResponseSchema","SeriesSchema","Seri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,GAAAA,CAAE,KAAA,CAAMe,CAAS,MChBzDS,CAAAA,CAAeC,CAAAA,CAAsB,MAAA,CAAO,CACvD,MAAA,CAAQzB,GAAAA,CAAE,KAAA,CAAMc,CAAW,EAAE,OAAA,EAAQ,CACrC,WAAA,CAAad,GAAAA,CAAE,KAAA,CAAM0B,CAAyB,CAAA,CAAE,OAAA,GAChD,IAAA,CAAM1B,GAAAA,CAAE,KAAA,CAAMe,CAAS,CAAA,CAAE,OAAA,EAC3B,CAAC,EAEYY,EAAAA,CAA2B3B,GAAAA,CAAE,KAAA,CAAMwB,CAAY,MCZhDI,CAAAA,CAAAA,CAAAA,CAAAA,GACVA,CAAAA,CAAAA,CAAAA,CAAA,GAAA,CAAM,CAAA,CAAA,CAAN,KAAA,CACAA,CAAAA,CAAAA,CAAAA,CAAA,UAAA,CAAa,CAAA,CAAA,CAAb,aACAA,CAAAA,CAAAA,CAAAA,CAAA,WAAA,CAAc,CAAA,CAAA,CAAd,aAAA,CACAA,IAAA,cAAA,CAAiB,CAAA,CAAA,CAAjB,gBAAA,CAJUA,CAAAA,CAAAA,EAAAA,CAAAA,EAAA,IAOCC,EAAAA,CAAmB7B,GAAAA,CAAE,MAAA,CAAO,CACvC,IAAA,CAAMA,GAAAA,CAAE,IAAA,CAAK4B,CAAU,EACvB,QAAA,CAAU5B,GAAAA,CAAE,IAAA,CAAK,CAAC,MAAO,YAAA,CAAc,aAAA,CAAe,gBAAgB,CAAC,CACzE,CAAC","file":"index.js","sourcesContent":["import { z } from 'zod';\n\nexport const PaginationEnvelopeSchema = z.object({\n hasMore: z.boolean().nullish(),\n totalResults: z.number().int().nullish(),\n});\n\nexport type PaginationEnvelope = z.infer<typeof PaginationEnvelopeSchema>;\n","import { z } from 'zod';\nimport { EvmAddressSchema, IsoDateTimeStringSchema } from '../shared';\nimport { ImageOptimizationSchema } from './common';\n\nexport const PublicProfileUserSchema = z.object({\n id: z.string(),\n communityMod: z.boolean().nullish(),\n creator: z.boolean().nullish(),\n mod: z.boolean().nullish(),\n});\n\nexport const ProfileSchema = z\n .object({\n id: z.string().nullish(),\n name: z.string().nullish(),\n user: z.number().int().nullish(),\n referral: z.string().nullish(),\n createdBy: z.number().int().nullish(),\n updatedBy: z.number().int().nullish(),\n createdAt: IsoDateTimeStringSchema.nullish(),\n updatedAt: IsoDateTimeStringSchema.nullish(),\n utmSource: z.string().nullish(),\n utmMedium: z.string().nullish(),\n utmCampaign: z.string().nullish(),\n utmContent: z.string().nullish(),\n utmTerm: z.string().nullish(),\n walletActivated: z.boolean().nullish(),\n pseudonym: z.string().nullish(),\n displayUsernamePublic: z.boolean().nullish(),\n profileImage: z.string().nullish(),\n bio: z.string().nullish(),\n proxyWallet: z.string().nullish(),\n profileImageOptimized: ImageOptimizationSchema.nullish(),\n isCloseOnly: z.boolean().nullish(),\n isCertReq: z.boolean().nullish(),\n certReqDate: IsoDateTimeStringSchema.nullish(),\n discordUsername: z.string().nullish(),\n xUsername: z.string().nullish(),\n verifiedBadge: z.boolean().nullish(),\n dubPartnerId: z.string().nullish(),\n termsAcceptedAt: IsoDateTimeStringSchema.nullish(),\n viewOnlyAcknowledgedAt: IsoDateTimeStringSchema.nullish(),\n isReferralRestricted: z.boolean().nullish(),\n })\n .transform(({ proxyWallet, ...rest }) => ({\n ...rest,\n wallet: proxyWallet,\n }));\n\nexport const PublicProfileSchema = z\n .object({\n createdAt: IsoDateTimeStringSchema.nullish(),\n proxyWallet: EvmAddressSchema.nullish(),\n profileImage: z.string().nullish(),\n displayUsernamePublic: z.boolean().nullish(),\n bio: z.string().nullish(),\n pseudonym: z.string().nullish(),\n name: z.string().nullish(),\n users: z.array(PublicProfileUserSchema).nullish(),\n xUsername: z.string().nullish(),\n verifiedBadge: z.boolean().nullish(),\n })\n .transform(({ proxyWallet, ...rest }) => ({\n ...rest,\n wallet: proxyWallet,\n }));\n\nexport type PublicProfile = z.infer<typeof PublicProfileSchema>;\nexport type Profile = z.infer<typeof ProfileSchema>;\nexport type PublicProfileUser = z.infer<typeof PublicProfileUserSchema>;\n","import { z } from 'zod';\nimport { TagIdSchema } from '../shared';\nimport { EventSchema } from './event';\nimport { ProfileSchema } from './profile';\n\nexport const SearchTagSchema = z\n .object({\n id: TagIdSchema,\n event_count: z.number().int().nullish(),\n label: z.string().nullish(),\n slug: z.string().nullish(),\n })\n .transform(({ event_count, ...rest }) => ({\n ...rest,\n eventCount: event_count,\n }));\n\nexport const SearchPaginationSchema = z.object({\n hasMore: z.boolean().nullish(),\n totalResults: z.number().int().nullish(),\n});\n\nexport const PublicSearchResponseSchema = z.object({\n events: z.array(EventSchema).nullish(),\n tags: z.array(SearchTagSchema).nullish(),\n profiles: z.array(ProfileSchema).nullish(),\n pagination: SearchPaginationSchema.nullish(),\n});\n\nexport type SearchTag = z.infer<typeof SearchTagSchema>;\nexport type SearchPagination = z.infer<typeof SearchPaginationSchema>;\nexport type PublicSearchResponse = z.infer<typeof PublicSearchResponseSchema>;\n","import { z } from 'zod';\nimport { TagIdSchema } from '../shared';\nimport { TagReferenceSchema } from './common';\nimport { TemplateReferenceSchema } from './event';\n\nexport const TagSchema = TagReferenceSchema.extend({\n templates: z.array(TemplateReferenceSchema).nullish(),\n});\n\nexport const RelatedTagSchema = z\n .object({\n id: z.string(),\n tagID: z.number().int().nullish(),\n relatedTagID: z.number().int().nullish(),\n rank: z.number().int().nullish(),\n })\n .transform(({ tagID, relatedTagID, ...rest }) => ({\n ...rest,\n tagId: tagID,\n relatedTagId: relatedTagID,\n }));\n\nexport const ListTagsResponseSchema = z.array(TagSchema);\nexport const ListRelatedTagsResponseSchema = z.array(RelatedTagSchema);\nexport const ListRelatedTagResourcesResponseSchema = z.array(TagSchema);\n\nexport type Tag = z.infer<typeof TagSchema>;\nexport type RelatedTag = z.infer<typeof RelatedTagSchema>;\nexport type ListTagsResponse = z.infer<typeof ListTagsResponseSchema>;\nexport type ListRelatedTagsResponse = z.infer<\n typeof ListRelatedTagsResponseSchema\n>;\nexport type ListRelatedTagResourcesResponse = z.infer<\n typeof ListRelatedTagResourcesResponseSchema\n>;\n\nexport { TagIdSchema };\n","import { z } from 'zod';\nimport {\n CollectionReferenceSchema,\n EventSchema,\n SeriesReferenceSchema,\n} from './event';\nimport { TagSchema } from './tag';\n\nexport const SeriesSchema = SeriesReferenceSchema.extend({\n events: z.array(EventSchema).nullish(),\n collections: z.array(CollectionReferenceSchema).nullish(),\n tags: z.array(TagSchema).nullish(),\n});\n\nexport const ListSeriesResponseSchema = z.array(SeriesSchema);\n\nexport type Series = z.infer<typeof SeriesSchema>;\nexport type ListSeriesResponse = z.infer<typeof ListSeriesResponseSchema>;\n","import { z } from 'zod';\n\nexport enum WalletType {\n EOA = 0,\n POLY_PROXY = 1,\n GNOSIS_SAFE = 2,\n DEPOSIT_WALLET = 3,\n}\n\nexport const WalletTypeSchema = z.object({\n type: z.enum(WalletType),\n typeName: z.enum(['EOA', 'POLY_PROXY', 'GNOSIS_SAFE', 'DEPOSIT_WALLET']),\n});\n"]}
1
+ {"version":3,"sources":["../../src/gamma/pagination.ts","../../src/gamma/profile.ts","../../src/gamma/search.ts","../../src/gamma/tag.ts","../../src/gamma/series.ts","../../src/gamma/wallet.ts"],"names":["PaginationEnvelopeSchema","z","PublicProfileUserSchema","ProfileSchema","IsoDateTimeStringSchema","ImageOptimizationSchema","proxyWallet","rest","PublicProfileSchema","EvmAddressSchema","SearchTagSchema","TagIdSchema","event_count","SearchPaginationSchema","PublicSearchResponseSchema","EventSchema","TagSchema","TagReferenceSchema","TemplateReferenceSchema","RelatedTagSchema","tagID","relatedTagID","ListTagsResponseSchema","ListRelatedTagsResponseSchema","ListRelatedTagResourcesResponseSchema","SeriesSchema","SeriesReferenceSchema","CollectionReferenceSchema","ListSeriesResponseSchema","WalletType","WalletTypeSchema"],"mappings":"8yCAEO,IAAMA,GAA2BC,GAAAA,CAAE,MAAA,CAAO,CAC/C,OAAA,CAASA,GAAAA,CAAE,OAAA,EAAQ,CAAE,OAAA,GACrB,YAAA,CAAcA,GA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M0B,CAAyB,CAAA,CAAE,OAAA,GAChD,IAAA,CAAM1B,GAAAA,CAAE,KAAA,CAAMe,CAAS,CAAA,CAAE,OAAA,EAC3B,CAAC,EAEYY,EAAAA,CAA2B3B,GAAAA,CAAE,KAAA,CAAMwB,CAAY,MCZhDI,CAAAA,CAAAA,CAAAA,CAAAA,GACVA,CAAAA,CAAAA,CAAAA,CAAA,GAAA,CAAM,CAAA,CAAA,CAAN,KAAA,CACAA,CAAAA,CAAAA,CAAAA,CAAA,UAAA,CAAa,CAAA,CAAA,CAAb,aACAA,CAAAA,CAAAA,CAAAA,CAAA,WAAA,CAAc,CAAA,CAAA,CAAd,aAAA,CACAA,IAAA,cAAA,CAAiB,CAAA,CAAA,CAAjB,gBAAA,CAJUA,CAAAA,CAAAA,EAAAA,CAAAA,EAAA,IAOCC,EAAAA,CAAmB7B,GAAAA,CAAE,MAAA,CAAO,CACvC,IAAA,CAAMA,GAAAA,CAAE,IAAA,CAAK4B,CAAU,EACvB,QAAA,CAAU5B,GAAAA,CAAE,IAAA,CAAK,CAAC,MAAO,YAAA,CAAc,aAAA,CAAe,gBAAgB,CAAC,CACzE,CAAC","file":"index.js","sourcesContent":["import { z } from 'zod';\n\nexport const PaginationEnvelopeSchema = z.object({\n hasMore: z.boolean().nullish(),\n totalResults: z.number().int().nullish(),\n});\n\nexport type PaginationEnvelope = z.infer<typeof PaginationEnvelopeSchema>;\n","import { z } from 'zod';\nimport { EvmAddressSchema, IsoDateTimeStringSchema } from '../shared';\nimport { ImageOptimizationSchema } from './common';\n\nexport const PublicProfileUserSchema = z.object({\n id: z.string(),\n communityMod: z.boolean().nullish(),\n creator: z.boolean().nullish(),\n mod: z.boolean().nullish(),\n});\n\nexport const ProfileSchema = z\n .object({\n id: z.string().nullish(),\n name: z.string().nullish(),\n user: z.number().int().nullish(),\n referral: z.string().nullish(),\n createdBy: z.number().int().nullish(),\n updatedBy: z.number().int().nullish(),\n createdAt: IsoDateTimeStringSchema.nullish(),\n updatedAt: IsoDateTimeStringSchema.nullish(),\n utmSource: z.string().nullish(),\n utmMedium: z.string().nullish(),\n utmCampaign: z.string().nullish(),\n utmContent: z.string().nullish(),\n utmTerm: z.string().nullish(),\n walletActivated: z.boolean().nullish(),\n pseudonym: z.string().nullish(),\n displayUsernamePublic: z.boolean().nullish(),\n profileImage: z.string().nullish(),\n bio: z.string().nullish(),\n proxyWallet: z.string().nullish(),\n profileImageOptimized: ImageOptimizationSchema.nullish(),\n isCloseOnly: z.boolean().nullish(),\n isCertReq: z.boolean().nullish(),\n certReqDate: IsoDateTimeStringSchema.nullish(),\n discordUsername: z.string().nullish(),\n xUsername: z.string().nullish(),\n verifiedBadge: z.boolean().nullish(),\n dubPartnerId: z.string().nullish(),\n termsAcceptedAt: IsoDateTimeStringSchema.nullish(),\n viewOnlyAcknowledgedAt: IsoDateTimeStringSchema.nullish(),\n isReferralRestricted: z.boolean().nullish(),\n })\n .transform(({ proxyWallet, ...rest }) => ({\n ...rest,\n wallet: proxyWallet,\n }));\n\nexport const PublicProfileSchema = z\n .object({\n createdAt: IsoDateTimeStringSchema.nullish(),\n proxyWallet: EvmAddressSchema.nullish(),\n profileImage: z.string().nullish(),\n displayUsernamePublic: z.boolean().nullish(),\n bio: z.string().nullish(),\n pseudonym: z.string().nullish(),\n name: z.string().nullish(),\n users: z.array(PublicProfileUserSchema).nullish(),\n xUsername: z.string().nullish(),\n verifiedBadge: z.boolean().nullish(),\n })\n .transform(({ proxyWallet, ...rest }) => ({\n ...rest,\n wallet: proxyWallet,\n }));\n\nexport type PublicProfile = z.infer<typeof PublicProfileSchema>;\nexport type Profile = z.infer<typeof ProfileSchema>;\nexport type PublicProfileUser = z.infer<typeof PublicProfileUserSchema>;\n","import { z } from 'zod';\nimport { TagIdSchema } from '../shared';\nimport { EventSchema } from './event';\nimport { ProfileSchema } from './profile';\n\nexport const SearchTagSchema = z\n .object({\n id: TagIdSchema,\n event_count: z.number().int().nullish(),\n label: z.string().nullish(),\n slug: z.string().nullish(),\n })\n .transform(({ event_count, ...rest }) => ({\n ...rest,\n eventCount: event_count,\n }));\n\nexport const SearchPaginationSchema = z.object({\n hasMore: z.boolean().nullish(),\n totalResults: z.number().int().nullish(),\n});\n\nexport const PublicSearchResponseSchema = z.object({\n events: z.array(EventSchema).nullish(),\n tags: z.array(SearchTagSchema).nullish(),\n profiles: z.array(ProfileSchema).nullish(),\n pagination: SearchPaginationSchema.nullish(),\n});\n\nexport type SearchTag = z.infer<typeof SearchTagSchema>;\nexport type SearchPagination = z.infer<typeof SearchPaginationSchema>;\nexport type PublicSearchResponse = z.infer<typeof PublicSearchResponseSchema>;\n","import { z } from 'zod';\nimport { TagIdSchema } from '../shared';\nimport { TagReferenceSchema } from './common';\nimport { TemplateReferenceSchema } from './event';\n\nexport const TagSchema = TagReferenceSchema.extend({\n templates: z.array(TemplateReferenceSchema).nullish(),\n});\n\nexport const RelatedTagSchema = z\n .object({\n id: z.string(),\n tagID: z.number().int().nullish(),\n relatedTagID: z.number().int().nullish(),\n rank: z.number().int().nullish(),\n })\n .transform(({ tagID, relatedTagID, ...rest }) => ({\n ...rest,\n tagId: tagID,\n relatedTagId: relatedTagID,\n }));\n\nexport const ListTagsResponseSchema = z.array(TagSchema);\nexport const ListRelatedTagsResponseSchema = z.array(RelatedTagSchema);\nexport const ListRelatedTagResourcesResponseSchema = z.array(TagSchema);\n\nexport type Tag = z.infer<typeof TagSchema>;\nexport type RelatedTag = z.infer<typeof RelatedTagSchema>;\nexport type ListTagsResponse = z.infer<typeof ListTagsResponseSchema>;\nexport type ListRelatedTagsResponse = z.infer<\n typeof ListRelatedTagsResponseSchema\n>;\nexport type ListRelatedTagResourcesResponse = z.infer<\n typeof ListRelatedTagResourcesResponseSchema\n>;\n\nexport { TagIdSchema };\n","import { z } from 'zod';\nimport {\n CollectionReferenceSchema,\n EventSchema,\n SeriesReferenceSchema,\n} from './event';\nimport { TagSchema } from './tag';\n\nexport const SeriesSchema = SeriesReferenceSchema.extend({\n events: z.array(EventSchema).nullish(),\n collections: z.array(CollectionReferenceSchema).nullish(),\n tags: z.array(TagSchema).nullish(),\n});\n\nexport const ListSeriesResponseSchema = z.array(SeriesSchema);\n\nexport type Series = z.infer<typeof SeriesSchema>;\nexport type ListSeriesResponse = z.infer<typeof ListSeriesResponseSchema>;\n","import { z } from 'zod';\n\nexport enum WalletType {\n EOA = 0,\n POLY_PROXY = 1,\n GNOSIS_SAFE = 2,\n DEPOSIT_WALLET = 3,\n}\n\nexport const WalletTypeSchema = z.object({\n type: z.enum(WalletType),\n typeName: z.enum(['EOA', 'POLY_PROXY', 'GNOSIS_SAFE', 'DEPOSIT_WALLET']),\n});\n"]}
package/dist/index.d.ts CHANGED
@@ -148,6 +148,7 @@ declare const TokenIdSchema: z.ZodPipe<z.ZodString, z.ZodTransform<TokenId, stri
148
148
  declare const TransactionIdSchema: z.ZodPipe<z.ZodString, z.ZodTransform<TransactionId, string>>;
149
149
  declare const TxHashSchema: z.ZodPipe<z.ZodString, z.ZodTransform<TxHash, string>>;
150
150
  declare const DecimalStringSchema: z.ZodPipe<z.ZodString, z.ZodTransform<DecimalString, string>>;
151
+ declare const E6BigIntStringToDecimalStringSchema: z.ZodPipe<z.ZodString, z.ZodTransform<DecimalString, string>>;
151
152
  declare const DecimalishSchema: z.ZodUnion<readonly [z.ZodPipe<z.ZodString, z.ZodTransform<DecimalString, string>>, z.ZodPipe<z.ZodNumber, z.ZodTransform<DecimalString, number>>]>;
152
153
  declare const PositiveDecimalNumberSchema: z.ZodPipe<z.ZodUnion<readonly [z.ZodNumber, z.ZodPipe<z.ZodString, z.ZodTransform<number, string>>]>, z.ZodNumber>;
153
154
  declare const BaseUnitsSchema: z.ZodPipe<z.ZodString, z.ZodTransform<BaseUnits, string>>;
@@ -155,4 +156,11 @@ type ISODateString = IsoDateTimeString;
155
156
  type ISOCalendarDateString = IsoCalendarDateString;
156
157
  type TickSizeValue = z.output<typeof TickSizeValueSchema>;
157
158
 
158
- export { type ApiKey, ApiKeySchema, type BaseUnits, BaseUnitsSchema, type BestLineId, type BuilderCode, BuilderCodeSchema, type CategoryId, CategoryIdSchema, type ChatId, type ClobRewardId, ClobRewardIdSchema, type CollectionId, type ComboConditionId, ComboConditionIdSchema, type CommentId, CommentIdSchema, CommentParentEntityType, CommentParentEntityTypeSchema, type ConditionId, ConditionIdSchema, type CtfConditionId, CtfConditionIdSchema, DateLikeToIsoDateTimeStringSchema, type DecimalString, DecimalStringSchema, DecimalishSchema, EpochLikeToIsoDateTimeStringSchema, type EpochMilliseconds, EpochMillisecondsSchema, EpochMillisecondsStringSchema, EpochMillisecondsToIsoDateTimeStringSchema, EpochSecondsToMillisecondsSchema, type EventCreatorId, type EventExternalPartnerMappingId, type EventId, EventIdSchema, EvmAddressSchema, ISOCalendarDateSchema, type ISOCalendarDateString, type ISODateString, ISODateStringSchema, type ImageOptimizationId, ImageOptimizationIdSchema, type InternalUserId, InternalUserIdSchema, type IsoCalendarDateString, IsoCalendarDateStringSchema, type IsoDateTimeString, IsoDateTimeStringSchema, type MarketId, MarketIdSchema, type MixedDateTimeString, MixedDateTimeStringSchema, type NotificationId, NotificationIdSchema, OptionalConditionIdSchema, OptionalCtfConditionIdSchema, OptionalDateLikeToIsoDateTimeStringSchema, OptionalEpochMillisecondsToIsoDateTimeStringSchema, OrderSide, OrderSideSchema, OrderType, OrderTypeSchema, type PaginationCursor, PaginationCursorSchema, type PartnerId, type PositionId, PositionIdSchema, PositiveDecimalNumberSchema, type QuestionId, QuestionIdSchema, type ResolutionRequestId, ResolutionRequestIdSchema, type RfqId, RfqIdSchema, type RfqQuoteId, RfqQuoteIdSchema, type RfqRequestorPublicId, RfqRequestorPublicIdSchema, type SeriesId, type SportId, type TagId, TagIdSchema, type TeamId, type TemplateId, type TickSizeValue, TickSizeValueSchema, type TokenId, TokenIdSchema, type TransactionId, TransactionIdSchema, TxHashSchema, type Uuid, toApiKey, toBaseUnits, toBestLineId, toBuilderCode, toCategoryId, toChatId, toClobRewardId, toCollectionId, toComboConditionId, toCommentId, toConditionId, toCtfConditionId, toDecimalString, toEpochMilliseconds, toEventCreatorId, toEventExternalPartnerMappingId, toEventId, toImageOptimizationId, toInternalUserId, toIsoCalendarDateString, toIsoDateTimeString, toMarketId, toMixedDateTimeString, toNotificationId, toPaginationCursor, toPartnerId, toPositionId, toQuestionId, toResolutionRequestId, toRfqId, toRfqQuoteId, toRfqRequestorPublicId, toSeriesId, toSportId, toTagId, toTeamId, toTemplateId, toTokenId, toTransactionId, toUuid };
159
+ /**
160
+ * Preprocess helper for upstream fields that serialize missing values as empty
161
+ * strings. Use as `z.preprocess(emptyStringToNull, Schema.nullable())`, or
162
+ * with `.nullish()` when the field can also be absent.
163
+ */
164
+ declare function emptyStringToNull(value: unknown): unknown;
165
+
166
+ export { type ApiKey, ApiKeySchema, type BaseUnits, BaseUnitsSchema, type BestLineId, type BuilderCode, BuilderCodeSchema, type CategoryId, CategoryIdSchema, type ChatId, type ClobRewardId, ClobRewardIdSchema, type CollectionId, type ComboConditionId, ComboConditionIdSchema, type CommentId, CommentIdSchema, CommentParentEntityType, CommentParentEntityTypeSchema, type ConditionId, ConditionIdSchema, type CtfConditionId, CtfConditionIdSchema, DateLikeToIsoDateTimeStringSchema, type DecimalString, DecimalStringSchema, DecimalishSchema, E6BigIntStringToDecimalStringSchema, EpochLikeToIsoDateTimeStringSchema, type EpochMilliseconds, EpochMillisecondsSchema, EpochMillisecondsStringSchema, EpochMillisecondsToIsoDateTimeStringSchema, EpochSecondsToMillisecondsSchema, type EventCreatorId, type EventExternalPartnerMappingId, type EventId, EventIdSchema, EvmAddressSchema, ISOCalendarDateSchema, type ISOCalendarDateString, type ISODateString, ISODateStringSchema, type ImageOptimizationId, ImageOptimizationIdSchema, type InternalUserId, InternalUserIdSchema, type IsoCalendarDateString, IsoCalendarDateStringSchema, type IsoDateTimeString, IsoDateTimeStringSchema, type MarketId, MarketIdSchema, type MixedDateTimeString, MixedDateTimeStringSchema, type NotificationId, NotificationIdSchema, OptionalConditionIdSchema, OptionalCtfConditionIdSchema, OptionalDateLikeToIsoDateTimeStringSchema, OptionalEpochMillisecondsToIsoDateTimeStringSchema, OrderSide, OrderSideSchema, OrderType, OrderTypeSchema, type PaginationCursor, PaginationCursorSchema, type PartnerId, type PositionId, PositionIdSchema, PositiveDecimalNumberSchema, type QuestionId, QuestionIdSchema, type ResolutionRequestId, ResolutionRequestIdSchema, type RfqId, RfqIdSchema, type RfqQuoteId, RfqQuoteIdSchema, type RfqRequestorPublicId, RfqRequestorPublicIdSchema, type SeriesId, type SportId, type TagId, TagIdSchema, type TeamId, type TemplateId, type TickSizeValue, TickSizeValueSchema, type TokenId, TokenIdSchema, type TransactionId, TransactionIdSchema, TxHashSchema, type Uuid, emptyStringToNull, toApiKey, toBaseUnits, toBestLineId, toBuilderCode, toCategoryId, toChatId, toClobRewardId, toCollectionId, toComboConditionId, toCommentId, toConditionId, toCtfConditionId, toDecimalString, toEpochMilliseconds, toEventCreatorId, toEventExternalPartnerMappingId, toEventId, toImageOptimizationId, toInternalUserId, toIsoCalendarDateString, toIsoDateTimeString, toMarketId, toMixedDateTimeString, toNotificationId, toPaginationCursor, toPartnerId, toPositionId, toQuestionId, toResolutionRequestId, toRfqId, toRfqQuoteId, toRfqRequestorPublicId, toSeriesId, toSportId, toTagId, toTeamId, toTemplateId, toTokenId, toTransactionId, toUuid };
package/dist/index.js CHANGED
@@ -1,2 +1,2 @@
1
- export{S as ApiKeySchema,Ka as BaseUnitsSchema,T as BuilderCodeSchema,R as CategoryIdSchema,U as ClobRewardIdSchema,W as ComboConditionIdSchema,V as CommentIdSchema,a as CommentParentEntityType,ta as CommentParentEntityTypeSchema,Z as ConditionIdSchema,X as CtfConditionIdSchema,da as DateLikeToIsoDateTimeStringSchema,Ha as DecimalStringSchema,Ia as DecimalishSchema,ea as EpochLikeToIsoDateTimeStringSchema,aa as EpochMillisecondsSchema,ca as EpochMillisecondsStringSchema,ga as EpochMillisecondsToIsoDateTimeStringSchema,ba as EpochSecondsToMillisecondsSchema,ia as EventIdSchema,$ as EvmAddressSchema,oa as ISOCalendarDateSchema,na as ISODateStringSchema,pa as ImageOptimizationIdSchema,qa as InternalUserIdSchema,la as IsoCalendarDateStringSchema,ka as IsoDateTimeStringSchema,ra as MarketIdSchema,ma as MixedDateTimeStringSchema,sa as NotificationIdSchema,_ as OptionalConditionIdSchema,Y as OptionalCtfConditionIdSchema,fa as OptionalDateLikeToIsoDateTimeStringSchema,ha as OptionalEpochMillisecondsToIsoDateTimeStringSchema,b as OrderSide,ua as OrderSideSchema,c as OrderType,va as OrderTypeSchema,wa as PaginationCursorSchema,xa as PositionIdSchema,Ja as PositiveDecimalNumberSchema,ya as QuestionIdSchema,za as ResolutionRequestIdSchema,Aa as RfqIdSchema,Ba as RfqQuoteIdSchema,Ca as RfqRequestorPublicIdSchema,Da as TagIdSchema,ja as TickSizeValueSchema,Ea as TokenIdSchema,Fa as TransactionIdSchema,Ga as TxHashSchema,g as toApiKey,Q as toBaseUnits,d as toBestLineId,e as toBuilderCode,h as toCategoryId,i as toChatId,j as toClobRewardId,o as toCollectionId,n as toComboConditionId,k as toCommentId,m as toConditionId,l as toCtfConditionId,P as toDecimalString,r as toEpochMilliseconds,p as toEventCreatorId,q as toEventExternalPartnerMappingId,s as toEventId,t as toImageOptimizationId,u as toInternalUserId,v as toIsoCalendarDateString,w as toIsoDateTimeString,y as toMarketId,x as toMixedDateTimeString,z as toNotificationId,B as toPaginationCursor,A as toPartnerId,C as toPositionId,D as toQuestionId,E as toResolutionRequestId,F as toRfqId,G as toRfqQuoteId,H as toRfqRequestorPublicId,I as toSeriesId,J as toSportId,K as toTagId,L as toTeamId,M as toTemplateId,O as toTokenId,N as toTransactionId,f as toUuid}from'./chunk-IHJYHHWK.js';//# sourceMappingURL=index.js.map
1
+ export{S as ApiKeySchema,La as BaseUnitsSchema,T as BuilderCodeSchema,R as CategoryIdSchema,U as ClobRewardIdSchema,W as ComboConditionIdSchema,V as CommentIdSchema,a as CommentParentEntityType,ta as CommentParentEntityTypeSchema,Z as ConditionIdSchema,X as CtfConditionIdSchema,da as DateLikeToIsoDateTimeStringSchema,Ha as DecimalStringSchema,Ja as DecimalishSchema,Ia as E6BigIntStringToDecimalStringSchema,ea as EpochLikeToIsoDateTimeStringSchema,aa as EpochMillisecondsSchema,ca as EpochMillisecondsStringSchema,ga as EpochMillisecondsToIsoDateTimeStringSchema,ba as EpochSecondsToMillisecondsSchema,ia as EventIdSchema,$ as EvmAddressSchema,oa as ISOCalendarDateSchema,na as ISODateStringSchema,pa as ImageOptimizationIdSchema,qa as InternalUserIdSchema,la as IsoCalendarDateStringSchema,ka as IsoDateTimeStringSchema,ra as MarketIdSchema,ma as MixedDateTimeStringSchema,sa as NotificationIdSchema,_ as OptionalConditionIdSchema,Y as OptionalCtfConditionIdSchema,fa as OptionalDateLikeToIsoDateTimeStringSchema,ha as OptionalEpochMillisecondsToIsoDateTimeStringSchema,b as OrderSide,ua as OrderSideSchema,c as OrderType,va as OrderTypeSchema,wa as PaginationCursorSchema,xa as PositionIdSchema,Ka as PositiveDecimalNumberSchema,ya as QuestionIdSchema,za as ResolutionRequestIdSchema,Aa as RfqIdSchema,Ba as RfqQuoteIdSchema,Ca as RfqRequestorPublicIdSchema,Da as TagIdSchema,ja as TickSizeValueSchema,Ea as TokenIdSchema,Fa as TransactionIdSchema,Ga as TxHashSchema,Ma as emptyStringToNull,g as toApiKey,Q as toBaseUnits,d as toBestLineId,e as toBuilderCode,h as toCategoryId,i as toChatId,j as toClobRewardId,o as toCollectionId,n as toComboConditionId,k as toCommentId,m as toConditionId,l as toCtfConditionId,P as toDecimalString,r as toEpochMilliseconds,p as toEventCreatorId,q as toEventExternalPartnerMappingId,s as toEventId,t as toImageOptimizationId,u as toInternalUserId,v as toIsoCalendarDateString,w as toIsoDateTimeString,y as toMarketId,x as toMixedDateTimeString,z as toNotificationId,B as toPaginationCursor,A as toPartnerId,C as toPositionId,D as toQuestionId,E as toResolutionRequestId,F as toRfqId,G as toRfqQuoteId,H as toRfqRequestorPublicId,I as toSeriesId,J as toSportId,K as toTagId,L as toTeamId,M as toTemplateId,O as toTokenId,N as toTransactionId,f as toUuid}from'./chunk-SB2LAVJ4.js';//# sourceMappingURL=index.js.map
2
2
  //# sourceMappingURL=index.js.map
@@ -1,2 +1,2 @@
1
- import {$,Fa,Ga}from'../chunk-IHJYHHWK.js';import {z}from'zod';var i=(n=>(n.SAFE="SAFE",n.PROXY="PROXY",n.SAFE_CREATE="SAFE-CREATE",n.WALLET="WALLET",n.WALLET_CREATE="WALLET-CREATE",n))(i||{}),D=z.enum(i),u=z.enum(["PROXY","SAFE","SAFE-CREATE"]),c=(o=>(o.STATE_NEW="STATE_NEW",o.STATE_EXECUTED="STATE_EXECUTED",o.STATE_MINED="STATE_MINED",o.STATE_CONFIRMED="STATE_CONFIRMED",o.STATE_INVALID="STATE_INVALID",o.STATE_FAILED="STATE_FAILED",o))(c||{}),m=z.enum(c),y=z.object({baseGas:z.string().optional(),gasLimit:z.string().optional(),gasPrice:z.string().optional(),gasToken:$.optional(),operation:z.string().optional(),payment:z.string().optional(),paymentReceiver:$.optional(),paymentToken:$.optional(),refundReceiver:$.optional(),relay:$.optional(),relayHub:$.optional(),relayerFee:z.string().optional(),safeTxnGas:z.string().optional()}),d=z.object({address:$,nonce:z.string().min(1)}),R=z.object({data:z.string().min(1),from:$,metadata:z.string().optional(),nonce:z.string().min(1).optional(),proxyWallet:$,signature:z.string().min(1),signatureParams:y,to:$,type:u,value:z.string().optional()}),T=z.object({data:z.string().min(1),target:$,value:z.string().min(1)}),x=z.object({calls:z.array(T).min(1),deadline:z.string().min(1),depositWallet:$}),S=z.object({depositWalletParams:x,from:$,metadata:z.string().optional(),nonce:z.string().min(1),signature:z.string().min(1),to:$,type:z.literal("WALLET")}),g=z.object({from:$,metadata:z.string().optional(),to:$,type:z.literal("WALLET-CREATE")}),W=z.union([R,S,g]),f=z.object({state:m,transactionHash:Ga.nullish().transform(a=>a??null),transactionID:Fa}).transform(({transactionHash:a,transactionID:s,...r})=>({...r,transactionHash:a??null,transactionId:s})),L=z.object({deployed:z.boolean()}),_=z.object({error_msg:z.string().nullish(),state:m,transaction_hash:z.union([z.literal(""),Ga]).transform(a=>a===""?null:a),transaction_id:Fa}).transform(({error_msg:a,transaction_hash:s,transaction_id:r,...E})=>({...E,errorMsg:a??null,transactionHash:s??null,transactionId:r}));export{T as DepositWalletCallSchema,x as DepositWalletParamsSchema,_ as GaslessTransactionSchema,L as RelayerDeployedResponseSchema,g as RelayerDepositWalletCreateRequestSchema,S as RelayerDepositWalletExecuteRequestSchema,d as RelayerExecuteParamsSchema,W as RelayerExecuteRequestSchema,f as RelayerExecuteResponseSchema,R as RelayerLegacyExecuteRequestSchema,c as RelayerTransactionState,i as RelayerTransactionType,D as RelayerTransactionTypeSchema};//# sourceMappingURL=index.js.map
1
+ import {$,Fa,Ga}from'../chunk-SB2LAVJ4.js';import {z}from'zod';var i=(n=>(n.SAFE="SAFE",n.PROXY="PROXY",n.SAFE_CREATE="SAFE-CREATE",n.WALLET="WALLET",n.WALLET_CREATE="WALLET-CREATE",n))(i||{}),D=z.enum(i),u=z.enum(["PROXY","SAFE","SAFE-CREATE"]),c=(o=>(o.STATE_NEW="STATE_NEW",o.STATE_EXECUTED="STATE_EXECUTED",o.STATE_MINED="STATE_MINED",o.STATE_CONFIRMED="STATE_CONFIRMED",o.STATE_INVALID="STATE_INVALID",o.STATE_FAILED="STATE_FAILED",o))(c||{}),m=z.enum(c),y=z.object({baseGas:z.string().optional(),gasLimit:z.string().optional(),gasPrice:z.string().optional(),gasToken:$.optional(),operation:z.string().optional(),payment:z.string().optional(),paymentReceiver:$.optional(),paymentToken:$.optional(),refundReceiver:$.optional(),relay:$.optional(),relayHub:$.optional(),relayerFee:z.string().optional(),safeTxnGas:z.string().optional()}),d=z.object({address:$,nonce:z.string().min(1)}),R=z.object({data:z.string().min(1),from:$,metadata:z.string().optional(),nonce:z.string().min(1).optional(),proxyWallet:$,signature:z.string().min(1),signatureParams:y,to:$,type:u,value:z.string().optional()}),T=z.object({data:z.string().min(1),target:$,value:z.string().min(1)}),x=z.object({calls:z.array(T).min(1),deadline:z.string().min(1),depositWallet:$}),S=z.object({depositWalletParams:x,from:$,metadata:z.string().optional(),nonce:z.string().min(1),signature:z.string().min(1),to:$,type:z.literal("WALLET")}),g=z.object({from:$,metadata:z.string().optional(),to:$,type:z.literal("WALLET-CREATE")}),W=z.union([R,S,g]),f=z.object({state:m,transactionHash:Ga.nullish().transform(a=>a??null),transactionID:Fa}).transform(({transactionHash:a,transactionID:s,...r})=>({...r,transactionHash:a??null,transactionId:s})),L=z.object({deployed:z.boolean()}),_=z.object({error_msg:z.string().nullish(),state:m,transaction_hash:z.union([z.literal(""),Ga]).transform(a=>a===""?null:a),transaction_id:Fa}).transform(({error_msg:a,transaction_hash:s,transaction_id:r,...E})=>({...E,errorMsg:a??null,transactionHash:s??null,transactionId:r}));export{T as DepositWalletCallSchema,x as DepositWalletParamsSchema,_ as GaslessTransactionSchema,L as RelayerDeployedResponseSchema,g as RelayerDepositWalletCreateRequestSchema,S as RelayerDepositWalletExecuteRequestSchema,d as RelayerExecuteParamsSchema,W as RelayerExecuteRequestSchema,f as RelayerExecuteResponseSchema,R as RelayerLegacyExecuteRequestSchema,c as RelayerTransactionState,i as RelayerTransactionType,D as RelayerTransactionTypeSchema};//# sourceMappingURL=index.js.map
2
2
  //# sourceMappingURL=index.js.map