@polymarket/bindings 0.1.0-beta.13 → 0.1.0-beta.15

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/portfolio.ts","../../src/data/activity.ts","../../src/data/analytics.ts","../../src/data/leaderboard.ts"],"names":["AddressSchema","z","Hash64Schema","ActivityType","ActivityTypeSchema","SideSchema","TimePeriodSchema","LeaderboardCategorySchema","LeaderboardOrderBySchema","ComboPositionStatus","ComboPositionStatusSchema","ComboPositionOutcome","ComboPositionOutcomeSchema","PositionSchema","TokenIdSchema","CtfConditionIdSchema","DecimalishSchema","emptyStringToNull","IsoCalendarDateStringSchema","asset","oppositeAsset","proxyWallet","rest","ClosedPositionSchema","EpochSecondsToMillisecondsSchema","MixedDateTimeStringSchema","ValueSchema","MarketPositionSchema","MetaMarketPositionSchema","ComboPositionMarketEventSchema","event_id","event_slug","event_title","event_image","ComboPositionMarketSchema","IsoDateTimeStringSchema","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","side","module_id","user_address","shares_balance","entry_avg_price_usdc","entry_cost_usdc","realized_payout_usdc","total_cost_usdc","first_entry_at","resolved_at","updated_at","legs_total","legs_resolved","legs_pending","ListComboPositionsResponseSchema","PaginationCursorSchema","pagination","ListPositionsResponseSchema","ListClosedPositionsResponseSchema","FetchPortfolioValueResponseSchema","ListMarketPositionsResponseSchema","ComboActivityType","ComboActivityTypeSchema","RawComboActivitySchema","ComboActivityIdSchema","TxHashSchema","ComboActivitySchema","normalizeComboActivity","OptionalTextSchema","value","TradeSchema","RawActivitySchema","ActivitySchema","normalizeActivity","TradedSchema","ListTradesResponseSchema","ListActivityResponseSchema","ListComboActivityResponseSchema","activity","base","normalizeComboActivityBase","normalizeActivityBase","normalizeTradeActivity","expectPresent","inferAmount","trade","field","HolderSchema","MetaHolderSchema","OpenInterestSchema","MarketVolumeSchema","LiveVolumeSchema","ListMarketHoldersResponseSchema","ListOpenInterestResponseSchema","FetchEventLiveVolumeResponseSchema","LeaderboardEntrySchema","BuilderVolumeEntrySchema","dt","TraderLeaderboardEntrySchema","ListBuilderLeaderboardResponseSchema","ListBuilderVolumeResponseSchema","ListTraderLeaderboardResponseSchema"],"mappings":"gHAEO,IAAMA,CAAAA,CAAgBC,GAAAA,CAAE,MAAA,EAAO,CACzBC,EAAeD,GAAAA,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,MAAA,CAAS,QAAA,CACTA,EAAA,MAAA,CAAS,QAAA,CACTA,CAAAA,CAAA,UAAA,CAAa,YAAA,CACbA,CAAAA,CAAA,YAAA,CAAe,cAAA,CACfA,CAAAA,CAAA,eAAA,CAAkB,iBAAA,CAClBA,CAAAA,CAAA,KAAA,CAAQ,OAAA,CATEA,CAAAA,CAAAA,EAAAA,CAAAA,EAAA,EAAA,CAAA,CAYCC,EAAqBH,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,OAAQ,OAAA,CAAS,KAAK,CAAC,CAAA,CAEzDM,EAAAA,CAA4BN,GAAAA,CAAE,IAAA,CAAK,CAC9C,SAAA,CACA,UAAA,CACA,QAAA,CACA,QAAA,CACA,SAAA,CACA,UAAA,CACA,SAAA,CACA,WAAA,CACA,OACA,SACF,CAAC,CAAA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/G,GAAAA,CACzC,MAAA,CAAO,CACN,IAAA,CAAMA,IAAE,MAAA,EAAO,CAAE,OAAA,EAAQ,CACzB,WAAA,CAAaD,CAAAA,CAAc,OAAA,EAAQ,CACnC,QAAA,CAAUC,GAAAA,CAAE,MAAA,EAAO,CAAE,OAAA,EAAQ,CAC7B,GAAA,CAAKe,EAAAA,CAAiB,SAAQ,CAC9B,GAAA,CAAKA,EAAAA,CAAiB,OAAA,EAAQ,CAC9B,YAAA,CAAcf,GAAAA,CAAE,MAAA,GAAS,OAAA,EAAQ,CACjC,SAAA,CAAWA,GAAAA,CAAE,MAAA,EAAO,CAAE,OAAA,EAAQ,CAC9B,cAAeA,GAAAA,CAAE,OAAA,EAAQ,CAAE,OAAA,EAC7B,CAAC,CAAA,CACA,SAAA,CAAU,CAAC,CAAE,WAAA,CAAAoB,CAAAA,CAAa,GAAGC,CAAK,CAAA,IAAO,CACxC,GAAGA,CAAAA,CACH,MAAA,CAAQD,CACV,CAAA,CAAE,CAAA,CAES4F,EAAAA,CAAuChH,GAAAA,CAAE,KAAA,CACpD4G,EACF,CAAA,CACaK,EAAAA,CAAkCjH,GAAAA,CAAE,KAAA,CAC/C6G,EACF,CAAA,CACaK,EAAAA,CAAsClH,GAAAA,CAAE,MACnD+G,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 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 enum ComboPositionOutcome {\n Yes = 'YES',\n No = 'NO',\n}\n\nexport const ComboPositionOutcomeSchema = z.enum(ComboPositionOutcome);\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 side: ComboPositionOutcomeSchema,\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 realized_payout_usdc: DecimalishSchema.nullish(),\n total_cost_usdc: DecimalishSchema.nullish(),\n status: ComboPositionStatusSchema,\n redeemable: z.boolean(),\n first_entry_at: IsoDateTimeStringSchema,\n resolved_at: IsoDateTimeStringSchema.nullish(),\n updated_at: IsoDateTimeStringSchema.optional(),\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 side,\n module_id,\n user_address,\n shares_balance,\n entry_avg_price_usdc,\n entry_cost_usdc,\n realized_payout_usdc,\n total_cost_usdc,\n first_entry_at,\n resolved_at,\n updated_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 outcome: side,\n moduleId: module_id,\n wallet: user_address,\n shares: shares_balance,\n entryAvgPriceUsdc: entry_avg_price_usdc,\n entryCostUsdc: entry_cost_usdc,\n realizedPayoutUsdc: realized_payout_usdc,\n totalCostUsdc: total_cost_usdc,\n firstEntryAt: first_entry_at,\n resolvedAt: resolved_at,\n updatedAt: updated_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","import { z } from 'zod';\nimport {\n type ComboActivityId,\n ComboActivityIdSchema,\n type ComboConditionId,\n ComboConditionIdSchema,\n type CtfConditionId,\n CtfConditionIdSchema,\n DecimalishSchema,\n type DecimalString,\n type EpochMilliseconds,\n EpochSecondsToMillisecondsSchema,\n emptyStringToNull,\n type IsoDateTimeString,\n IsoDateTimeStringSchema,\n PaginationCursorSchema,\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';\nimport { type ComboPositionLeg, ComboPositionLegSchema } from './portfolio';\n\nexport enum ComboActivityType {\n Split = 'SPLIT',\n Merge = 'MERGE',\n Convert = 'CONVERT',\n Compress = 'COMPRESS',\n Wrap = 'WRAP',\n Unwrap = 'UNWRAP',\n Redeem = 'REDEEM',\n}\n\nconst ComboActivityTypeSchema = z.enum(ComboActivityType);\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\ntype ComboActivityBase = {\n /** Stable row id derived from the transaction hash and log index. */\n id: ComboActivityId;\n /** Normalized lifecycle activity type. */\n type: ComboActivityType;\n /** Wallet address whose account history contains this activity. */\n wallet: Address;\n /** Combo condition id involved in this activity. */\n conditionId: ComboConditionId;\n /** Combo module id. */\n moduleId: number;\n /** Amount associated with the lifecycle event in USD. */\n amount: DecimalString | null;\n /** Activity time as Unix epoch milliseconds. */\n timestamp: EpochMilliseconds;\n /** Activity transaction time as an ISO date-time string. */\n transactionAt: IsoDateTimeString;\n /** Polygon transaction hash that produced this activity. */\n transactionHash: TxHash;\n /** Log index within the transaction. */\n logIndex: number;\n /** Polygon block number. */\n blockNumber: number;\n /** Combo legs enriched with market metadata at read time. */\n legs: ComboPositionLeg[];\n};\n\nexport type ComboSplitActivity = ComboActivityBase & {\n type: ComboActivityType.Split;\n};\n\nexport type ComboMergeActivity = ComboActivityBase & {\n type: ComboActivityType.Merge;\n};\n\nexport type ComboConvertActivity = ComboActivityBase & {\n type: ComboActivityType.Convert;\n};\n\nexport type ComboCompressActivity = ComboActivityBase & {\n type: ComboActivityType.Compress;\n};\n\nexport type ComboWrapActivity = ComboActivityBase & {\n type: ComboActivityType.Wrap;\n};\n\nexport type ComboUnwrapActivity = ComboActivityBase & {\n type: ComboActivityType.Unwrap;\n};\n\nexport type ComboRedeemActivity = ComboActivityBase & {\n type: ComboActivityType.Redeem;\n /** Redeemed Combo position id. Only redeem rows carry a source position id. */\n positionId: PositionId;\n /** Payout from the redemption in USD. Only redeem rows carry payout semantics. */\n payout: DecimalString | null;\n};\n\nexport type ComboActivity =\n | ComboSplitActivity\n | ComboMergeActivity\n | ComboConvertActivity\n | ComboCompressActivity\n | ComboWrapActivity\n | ComboUnwrapActivity\n | ComboRedeemActivity;\n\nconst RawComboActivitySchema = z.object({\n id: ComboActivityIdSchema,\n type: ComboActivityTypeSchema,\n user_address: AddressSchema,\n combo_condition_id: ComboConditionIdSchema,\n combo_position_id: PositionIdSchema,\n module_id: z.number().int(),\n amount_usdc: DecimalishSchema.nullable(),\n payout_usdc: DecimalishSchema.nullable(),\n timestamp: EpochSecondsToMillisecondsSchema,\n tx_dttm: IsoDateTimeStringSchema,\n tx_hash: TxHashSchema,\n log_index: z.number().int(),\n block_number: z.number().int(),\n legs: z.array(ComboPositionLegSchema),\n});\n\nexport const ComboActivitySchema: z.ZodType<ComboActivity> =\n RawComboActivitySchema.transform(normalizeComboActivity);\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);\nexport const ListComboActivityResponseSchema = z\n .object({\n activity: z.array(ComboActivitySchema),\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 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>;\nexport type ListComboActivityResponse = z.infer<\n typeof ListComboActivityResponseSchema\n>;\n\ntype RawComboActivity = z.infer<typeof RawComboActivitySchema>;\ntype RawActivity = z.infer<typeof RawActivitySchema>;\n\nfunction normalizeComboActivity(activity: RawComboActivity): ComboActivity {\n const base = normalizeComboActivityBase(activity);\n\n switch (activity.type) {\n case ComboActivityType.Split:\n return { ...base, type: ComboActivityType.Split };\n case ComboActivityType.Merge:\n return { ...base, type: ComboActivityType.Merge };\n case ComboActivityType.Convert:\n return { ...base, type: ComboActivityType.Convert };\n case ComboActivityType.Compress:\n return { ...base, type: ComboActivityType.Compress };\n case ComboActivityType.Wrap:\n return { ...base, type: ComboActivityType.Wrap };\n case ComboActivityType.Unwrap:\n return { ...base, type: ComboActivityType.Unwrap };\n case ComboActivityType.Redeem:\n return {\n ...base,\n type: ComboActivityType.Redeem,\n positionId: activity.combo_position_id,\n payout: activity.payout_usdc,\n };\n }\n}\n\nfunction normalizeComboActivityBase(\n activity: RawComboActivity,\n): ComboActivityBase {\n return {\n id: activity.id,\n type: activity.type,\n wallet: activity.user_address,\n conditionId: activity.combo_condition_id,\n moduleId: activity.module_id,\n amount: activity.amount_usdc,\n timestamp: activity.timestamp,\n transactionAt: activity.tx_dttm,\n transactionHash: activity.tx_hash,\n logIndex: activity.log_index,\n blockNumber: activity.block_number,\n legs: activity.legs,\n };\n}\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"]}
1
+ {"version":3,"sources":["../../src/data/common.ts","../../src/data/portfolio.ts","../../src/data/activity.ts","../../src/data/analytics.ts","../../src/data/leaderboard.ts"],"names":["AddressSchema","z","Hash64Schema","ActivityType","ActivityTypeSchema","SideSchema","TimePeriodSchema","LeaderboardCategorySchema","LeaderboardOrderBySchema","ComboPositionStatus","ComboPositionStatusSchema","ComboPositionOutcome","ComboPositionOutcomeSchema","PositionSchema","TokenIdSchema","CtfConditionIdSchema","DecimalishSchema","emptyStringToNull","IsoCalendarDateStringSchema","asset","oppositeAsset","proxyWallet","rest","ClosedPositionSchema","EpochSecondsToMillisecondsSchema","MixedDateTimeStringSchema","ValueSchema","MarketPositionSchema","MetaMarketPositionSchema","ComboPositionMarketEventSchema","event_id","event_slug","event_title","event_image","ComboPositionMarketSchema","IsoDateTimeStringSchema","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","side","module_id","user_address","shares_balance","entry_avg_price_usdc","entry_cost_usdc","realized_payout_usdc","total_cost_usdc","first_entry_at","resolved_at","updated_at","legs_total","legs_resolved","legs_pending","ListComboPositionsResponseSchema","PaginationCursorSchema","pagination","ListPositionsResponseSchema","ListClosedPositionsResponseSchema","FetchPortfolioValueResponseSchema","ListMarketPositionsResponseSchema","ComboActivityType","ComboActivityTypeSchema","RawComboActivitySchema","ComboActivityIdSchema","TxHashSchema","ComboActivitySchema","normalizeComboActivity","OptionalTextSchema","value","TradeSchema","RawActivitySchema","ActivitySchema","normalizeActivity","TradedSchema","ListTradesResponseSchema","ListActivityResponseSchema","ListComboActivityResponseSchema","activity","base","normalizeComboActivityBase","normalizeActivityBase","normalizeTradeActivity","expectPresent","inferAmount","trade","field","HolderSchema","MetaHolderSchema","OpenInterestSchema","MarketVolumeSchema","LiveVolumeSchema","ListMarketHoldersResponseSchema","ListOpenInterestResponseSchema","FetchEventLiveVolumeResponseSchema","LeaderboardEntrySchema","BuilderVolumeEntrySchema","dt","TraderLeaderboardEntrySchema","ListBuilderLeaderboardResponseSchema","ListBuilderVolumeResponseSchema","ListTraderLeaderboardResponseSchema"],"mappings":"gHAEO,IAAMA,CAAAA,CAAgBC,GAAAA,CAAE,MAAA,EAAO,CACzBC,EAAeD,GAAAA,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,MAAA,CAAS,QAAA,CACTA,EAAA,MAAA,CAAS,QAAA,CACTA,CAAAA,CAAA,UAAA,CAAa,YAAA,CACbA,CAAAA,CAAA,YAAA,CAAe,cAAA,CACfA,CAAAA,CAAA,eAAA,CAAkB,iBAAA,CAClBA,CAAAA,CAA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EAAAA,CAAkCjH,GAAAA,CAAE,KAAA,CAC/C6G,EACF,CAAA,CACaK,EAAAA,CAAsClH,GAAAA,CAAE,MACnD+G,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 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 ResolvedPartial = 'RESOLVED_PARTIAL',\n ResolvedWin = 'RESOLVED_WIN',\n ResolvedLoss = 'RESOLVED_LOSS',\n}\n\nexport const ComboPositionStatusSchema = z.enum(ComboPositionStatus);\n\nexport enum ComboPositionOutcome {\n Yes = 'YES',\n No = 'NO',\n}\n\nexport const ComboPositionOutcomeSchema = z.enum(ComboPositionOutcome);\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 side: ComboPositionOutcomeSchema,\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 realized_payout_usdc: DecimalishSchema.nullish(),\n total_cost_usdc: DecimalishSchema.nullish(),\n status: ComboPositionStatusSchema,\n redeemable: z.boolean(),\n first_entry_at: IsoDateTimeStringSchema,\n resolved_at: IsoDateTimeStringSchema.nullish(),\n updated_at: IsoDateTimeStringSchema.optional(),\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 side,\n module_id,\n user_address,\n shares_balance,\n entry_avg_price_usdc,\n entry_cost_usdc,\n realized_payout_usdc,\n total_cost_usdc,\n first_entry_at,\n resolved_at,\n updated_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 outcome: side,\n moduleId: module_id,\n wallet: user_address,\n shares: shares_balance,\n entryAvgPriceUsdc: entry_avg_price_usdc,\n entryCostUsdc: entry_cost_usdc,\n realizedPayoutUsdc: realized_payout_usdc,\n totalCostUsdc: total_cost_usdc,\n firstEntryAt: first_entry_at,\n resolvedAt: resolved_at,\n updatedAt: updated_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","import { z } from 'zod';\nimport {\n type ComboActivityId,\n ComboActivityIdSchema,\n type ComboConditionId,\n ComboConditionIdSchema,\n type CtfConditionId,\n CtfConditionIdSchema,\n DecimalishSchema,\n type DecimalString,\n type EpochMilliseconds,\n EpochSecondsToMillisecondsSchema,\n emptyStringToNull,\n type IsoDateTimeString,\n IsoDateTimeStringSchema,\n PaginationCursorSchema,\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';\nimport { type ComboPositionLeg, ComboPositionLegSchema } from './portfolio';\n\nexport enum ComboActivityType {\n Split = 'SPLIT',\n Merge = 'MERGE',\n Convert = 'CONVERT',\n Compress = 'COMPRESS',\n Wrap = 'WRAP',\n Unwrap = 'UNWRAP',\n Redeem = 'REDEEM',\n}\n\nconst ComboActivityTypeSchema = z.enum(ComboActivityType);\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\ntype ComboActivityBase = {\n /** Stable row id derived from the transaction hash and log index. */\n id: ComboActivityId;\n /** Normalized lifecycle activity type. */\n type: ComboActivityType;\n /** Wallet address whose account history contains this activity. */\n wallet: Address;\n /** Combo condition id involved in this activity. */\n conditionId: ComboConditionId;\n /** Combo module id. */\n moduleId: number;\n /** Amount associated with the lifecycle event in USD. */\n amount: DecimalString | null;\n /** Activity time as Unix epoch milliseconds. */\n timestamp: EpochMilliseconds;\n /** Activity transaction time as an ISO date-time string. */\n transactionAt: IsoDateTimeString;\n /** Polygon transaction hash that produced this activity. */\n transactionHash: TxHash;\n /** Log index within the transaction. */\n logIndex: number;\n /** Polygon block number. */\n blockNumber: number;\n /** Combo legs enriched with market metadata at read time. */\n legs: ComboPositionLeg[];\n};\n\nexport type ComboSplitActivity = ComboActivityBase & {\n type: ComboActivityType.Split;\n};\n\nexport type ComboMergeActivity = ComboActivityBase & {\n type: ComboActivityType.Merge;\n};\n\nexport type ComboConvertActivity = ComboActivityBase & {\n type: ComboActivityType.Convert;\n};\n\nexport type ComboCompressActivity = ComboActivityBase & {\n type: ComboActivityType.Compress;\n};\n\nexport type ComboWrapActivity = ComboActivityBase & {\n type: ComboActivityType.Wrap;\n};\n\nexport type ComboUnwrapActivity = ComboActivityBase & {\n type: ComboActivityType.Unwrap;\n};\n\nexport type ComboRedeemActivity = ComboActivityBase & {\n type: ComboActivityType.Redeem;\n /** Redeemed Combo position id. Only redeem rows carry a source position id. */\n positionId: PositionId;\n /** Payout from the redemption in USD. Only redeem rows carry payout semantics. */\n payout: DecimalString | null;\n};\n\nexport type ComboActivity =\n | ComboSplitActivity\n | ComboMergeActivity\n | ComboConvertActivity\n | ComboCompressActivity\n | ComboWrapActivity\n | ComboUnwrapActivity\n | ComboRedeemActivity;\n\nconst RawComboActivitySchema = z.object({\n id: ComboActivityIdSchema,\n type: ComboActivityTypeSchema,\n user_address: AddressSchema,\n combo_condition_id: ComboConditionIdSchema,\n combo_position_id: PositionIdSchema,\n module_id: z.number().int(),\n amount_usdc: DecimalishSchema.nullable(),\n payout_usdc: DecimalishSchema.nullable(),\n timestamp: EpochSecondsToMillisecondsSchema,\n tx_dttm: IsoDateTimeStringSchema,\n tx_hash: TxHashSchema,\n log_index: z.number().int(),\n block_number: z.number().int(),\n legs: z.array(ComboPositionLegSchema),\n});\n\nexport const ComboActivitySchema: z.ZodType<ComboActivity> =\n RawComboActivitySchema.transform(normalizeComboActivity);\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);\nexport const ListComboActivityResponseSchema = z\n .object({\n activity: z.array(ComboActivitySchema),\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 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>;\nexport type ListComboActivityResponse = z.infer<\n typeof ListComboActivityResponseSchema\n>;\n\ntype RawComboActivity = z.infer<typeof RawComboActivitySchema>;\ntype RawActivity = z.infer<typeof RawActivitySchema>;\n\nfunction normalizeComboActivity(activity: RawComboActivity): ComboActivity {\n const base = normalizeComboActivityBase(activity);\n\n switch (activity.type) {\n case ComboActivityType.Split:\n return { ...base, type: ComboActivityType.Split };\n case ComboActivityType.Merge:\n return { ...base, type: ComboActivityType.Merge };\n case ComboActivityType.Convert:\n return { ...base, type: ComboActivityType.Convert };\n case ComboActivityType.Compress:\n return { ...base, type: ComboActivityType.Compress };\n case ComboActivityType.Wrap:\n return { ...base, type: ComboActivityType.Wrap };\n case ComboActivityType.Unwrap:\n return { ...base, type: ComboActivityType.Unwrap };\n case ComboActivityType.Redeem:\n return {\n ...base,\n type: ComboActivityType.Redeem,\n positionId: activity.combo_position_id,\n payout: activity.payout_usdc,\n };\n }\n}\n\nfunction normalizeComboActivityBase(\n activity: RawComboActivity,\n): ComboActivityBase {\n return {\n id: activity.id,\n type: activity.type,\n wallet: activity.user_address,\n conditionId: activity.combo_condition_id,\n moduleId: activity.module_id,\n amount: activity.amount_usdc,\n timestamp: activity.timestamp,\n transactionAt: activity.tx_dttm,\n transactionHash: activity.tx_hash,\n logIndex: activity.log_index,\n blockNumber: activity.block_number,\n legs: activity.legs,\n };\n}\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"]}
@@ -1,2 +1,2 @@
1
- import {a,F,e,t,s,r}from'../chunk-G2DC5MZA.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-G2DC5MZA.js';import {z as z$2,ma,Ia,ba,Aa,ka,Fa}from'../chunk-GTLPG5HR.js';export{Fa as TagIdSchema}from'../chunk-GTLPG5HR.js';import {z as z$1}from'zod';var z=(a=>(a.Pending="pending",a.Queued="queued",a.Success="success",a.Failed="failed",a.Cancelled="cancelled",a))(z||{}),E=z$1.union([z$1.string(),z$1.number().int().transform(String)]).transform(z$2),O=z$1.object({id:z$1.number().int(),marketId:E.nullish(),eventId:ka.nullish(),questionId:Aa.nullish(),content:z$1.string().nullish(),state:z$1.enum(z).nullish(),clearBook:z$1.boolean().nullish(),notifyDiscord:z$1.boolean().nullish(),showInFrontend:z$1.boolean().nullish(),adapterAddress:ba.nullish(),negRiskRequestId:z$1.string().nullish(),txHash:Ia.nullish(),createdAt:ma.nullish(),queuedAt:ma.nullish(),scheduledFor:ma.nullish(),txTimestamp:ma.nullish()}),Re=z$1.array(O);var Ie=z$1.object({hasMore:z$1.boolean().nullish(),totalResults:z$1.number().int().nullish()});var j=z$1.object({id:z$1.string(),communityMod:z$1.boolean().nullish(),creator:z$1.boolean().nullish(),mod:z$1.boolean().nullish()}),L=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:ma.nullish(),updatedAt:ma.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.nullish(),isCloseOnly:z$1.boolean().nullish(),isCertReq:z$1.boolean().nullish(),certReqDate:ma.nullish(),discordUsername:z$1.string().nullish(),xUsername:z$1.string().nullish(),verifiedBadge:z$1.boolean().nullish(),dubPartnerId:z$1.string().nullish(),termsAcceptedAt:ma.nullish(),viewOnlyAcknowledgedAt:ma.nullish(),isReferralRestricted:z$1.boolean().nullish()}).transform(({proxyWallet:i,...l})=>({...l,wallet:i})),Ee=z$1.object({createdAt:ma.nullish(),proxyWallet:ba.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(j).nullish(),xUsername:z$1.string().nullish(),verifiedBadge:z$1.boolean().nullish()}).transform(({proxyWallet:i,...l})=>({...l,wallet:i}));var k=z$1.object({id:Fa,event_count:z$1.number().int().nullish(),label:z$1.string().nullish(),slug:z$1.string().nullish()}).transform(({event_count:i,...l})=>({...l,eventCount:i})),C=z$1.object({hasMore:z$1.boolean().nullish(),totalResults:z$1.number().int().nullish()}),Ue=z$1.object({events:z$1.array(F).nullish(),tags:z$1.array(k).nullish(),profiles:z$1.array(L).nullish(),pagination:C.nullish()});var u=e.extend({templates:z$1.array(t).nullish()}),D=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:i,relatedTagID:l,...v})=>({...v,tagId:i,relatedTagId:l})),Be=z$1.array(u),Ye=z$1.array(D),Ne=z$1.array(u);var U=s.extend({events:z$1.array(F).nullish(),collections:z$1.array(r).nullish(),tags:z$1.array(u).nullish()}),Je=z$1.array(U);var A=(s=>(s[s.EOA=0]="EOA",s[s.POLY_PROXY=1]="POLY_PROXY",s[s.GNOSIS_SAFE=2]="GNOSIS_SAFE",s[s.DEPOSIT_WALLET=3]="DEPOSIT_WALLET",s))(A||{}),Ze=z$1.object({type:z$1.enum(A),typeName:z$1.enum(["EOA","POLY_PROXY","GNOSIS_SAFE","DEPOSIT_WALLET"])});export{Re as ListMarketClarificationsResponseSchema,Ne as ListRelatedTagResourcesResponseSchema,Ye as ListRelatedTagsResponseSchema,Je as ListSeriesResponseSchema,Be as ListTagsResponseSchema,O as MarketClarificationSchema,z as MarketClarificationState,Ie as PaginationEnvelopeSchema,L as ProfileSchema,Ee as PublicProfileSchema,j as PublicProfileUserSchema,Ue as PublicSearchResponseSchema,D as RelatedTagSchema,C as SearchPaginationSchema,k as SearchTagSchema,U as SeriesSchema,u as TagSchema,A as WalletType,Ze as WalletTypeSchema};//# sourceMappingURL=index.js.map
1
+ import {a,F,e,t,s,r}from'../chunk-SRNC7OM5.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-SRNC7OM5.js';import {z as z$2,ma,Ia,ba,Aa,ka,Fa}from'../chunk-KMTIKS2E.js';export{Fa as TagIdSchema}from'../chunk-KMTIKS2E.js';import {z as z$1}from'zod';var z=(a=>(a.Pending="pending",a.Queued="queued",a.Success="success",a.Failed="failed",a.Cancelled="cancelled",a))(z||{}),E=z$1.union([z$1.string(),z$1.number().int().transform(String)]).transform(z$2),O=z$1.object({id:z$1.number().int(),marketId:E.nullish(),eventId:ka.nullish(),questionId:Aa.nullish(),content:z$1.string().nullish(),state:z$1.enum(z).nullish(),clearBook:z$1.boolean().nullish(),notifyDiscord:z$1.boolean().nullish(),showInFrontend:z$1.boolean().nullish(),adapterAddress:ba.nullish(),negRiskRequestId:z$1.string().nullish(),txHash:Ia.nullish(),createdAt:ma.nullish(),queuedAt:ma.nullish(),scheduledFor:ma.nullish(),txTimestamp:ma.nullish()}),Re=z$1.array(O);var Ie=z$1.object({hasMore:z$1.boolean().nullish(),totalResults:z$1.number().int().nullish()});var j=z$1.object({id:z$1.string(),communityMod:z$1.boolean().nullish(),creator:z$1.boolean().nullish(),mod:z$1.boolean().nullish()}),L=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:ma.nullish(),updatedAt:ma.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.nullish(),isCloseOnly:z$1.boolean().nullish(),isCertReq:z$1.boolean().nullish(),certReqDate:ma.nullish(),discordUsername:z$1.string().nullish(),xUsername:z$1.string().nullish(),verifiedBadge:z$1.boolean().nullish(),dubPartnerId:z$1.string().nullish(),termsAcceptedAt:ma.nullish(),viewOnlyAcknowledgedAt:ma.nullish(),isReferralRestricted:z$1.boolean().nullish()}).transform(({proxyWallet:i,...l})=>({...l,wallet:i})),Ee=z$1.object({createdAt:ma.nullish(),proxyWallet:ba.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(j).nullish(),xUsername:z$1.string().nullish(),verifiedBadge:z$1.boolean().nullish()}).transform(({proxyWallet:i,...l})=>({...l,wallet:i}));var k=z$1.object({id:Fa,event_count:z$1.number().int().nullish(),label:z$1.string().nullish(),slug:z$1.string().nullish()}).transform(({event_count:i,...l})=>({...l,eventCount:i})),C=z$1.object({hasMore:z$1.boolean().nullish(),totalResults:z$1.number().int().nullish()}),Ue=z$1.object({events:z$1.array(F).nullish(),tags:z$1.array(k).nullish(),profiles:z$1.array(L).nullish(),pagination:C.nullish()});var u=e.extend({templates:z$1.array(t).nullish()}),D=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:i,relatedTagID:l,...v})=>({...v,tagId:i,relatedTagId:l})),Be=z$1.array(u),Ye=z$1.array(D),Ne=z$1.array(u);var U=s.extend({events:z$1.array(F).nullish(),collections:z$1.array(r).nullish(),tags:z$1.array(u).nullish()}),Je=z$1.array(U);var A=(s=>(s[s.EOA=0]="EOA",s[s.POLY_PROXY=1]="POLY_PROXY",s[s.GNOSIS_SAFE=2]="GNOSIS_SAFE",s[s.DEPOSIT_WALLET=3]="DEPOSIT_WALLET",s))(A||{}),Ze=z$1.object({type:z$1.enum(A),typeName:z$1.enum(["EOA","POLY_PROXY","GNOSIS_SAFE","DEPOSIT_WALLET"])});export{Re as ListMarketClarificationsResponseSchema,Ne as ListRelatedTagResourcesResponseSchema,Ye as ListRelatedTagsResponseSchema,Je as ListSeriesResponseSchema,Be as ListTagsResponseSchema,O as MarketClarificationSchema,z as MarketClarificationState,Ie as PaginationEnvelopeSchema,L as ProfileSchema,Ee as PublicProfileSchema,j as PublicProfileUserSchema,Ue as PublicSearchResponseSchema,D as RelatedTagSchema,C as SearchPaginationSchema,k as SearchTagSchema,U as SeriesSchema,u as TagSchema,A as WalletType,Ze as WalletTypeSchema};//# sourceMappingURL=index.js.map
2
2
  //# sourceMappingURL=index.js.map
package/dist/index.d.ts CHANGED
@@ -165,5 +165,11 @@ type TickSizeValue = z.output<typeof TickSizeValueSchema>;
165
165
  * with `.nullish()` when the field can also be absent.
166
166
  */
167
167
  declare function emptyStringToNull(value: unknown): unknown;
168
+ /**
169
+ * Optional decimal field whose upstream serialization uses an empty string
170
+ * for missing values. Normalizes `''` to `null` so consumers never receive
171
+ * an empty `DecimalString`; populated values parse as `DecimalStringSchema`.
172
+ */
173
+ declare const OptionalDecimalStringSchema: z.ZodPipe<z.ZodTransform<unknown, unknown>, z.ZodOptional<z.ZodNullable<z.ZodPipe<z.ZodString, z.ZodTransform<DecimalString, string>>>>>;
168
174
 
169
- export { type ApiKey, ApiKeySchema, type BaseUnits, BaseUnitsSchema, type BestLineId, type BuilderCode, BuilderCodeSchema, type CategoryId, CategoryIdSchema, type ChatId, type ClobRewardId, ClobRewardIdSchema, type CollectionId, type ComboActivityId, ComboActivityIdSchema, 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, toComboActivityId, 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 };
175
+ export { type ApiKey, ApiKeySchema, type BaseUnits, BaseUnitsSchema, type BestLineId, type BuilderCode, BuilderCodeSchema, type CategoryId, CategoryIdSchema, type ChatId, type ClobRewardId, ClobRewardIdSchema, type CollectionId, type ComboActivityId, ComboActivityIdSchema, 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, OptionalDecimalStringSchema, 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, toComboActivityId, 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{T as ApiKeySchema,Na as BaseUnitsSchema,U as BuilderCodeSchema,S as CategoryIdSchema,V as ClobRewardIdSchema,X as ComboActivityIdSchema,Y as ComboConditionIdSchema,W as CommentIdSchema,a as CommentParentEntityType,va as CommentParentEntityTypeSchema,$ as ConditionIdSchema,Z as CtfConditionIdSchema,fa as DateLikeToIsoDateTimeStringSchema,Ja as DecimalStringSchema,La as DecimalishSchema,Ka as E6BigIntStringToDecimalStringSchema,ga as EpochLikeToIsoDateTimeStringSchema,ca as EpochMillisecondsSchema,ea as EpochMillisecondsStringSchema,ia as EpochMillisecondsToIsoDateTimeStringSchema,da as EpochSecondsToMillisecondsSchema,ka as EventIdSchema,ba as EvmAddressSchema,qa as ISOCalendarDateSchema,pa as ISODateStringSchema,ra as ImageOptimizationIdSchema,sa as InternalUserIdSchema,na as IsoCalendarDateStringSchema,ma as IsoDateTimeStringSchema,ta as MarketIdSchema,oa as MixedDateTimeStringSchema,ua as NotificationIdSchema,aa as OptionalConditionIdSchema,_ as OptionalCtfConditionIdSchema,ha as OptionalDateLikeToIsoDateTimeStringSchema,ja as OptionalEpochMillisecondsToIsoDateTimeStringSchema,b as OrderSide,wa as OrderSideSchema,c as OrderType,xa as OrderTypeSchema,ya as PaginationCursorSchema,za as PositionIdSchema,Ma as PositiveDecimalNumberSchema,Aa as QuestionIdSchema,Ba as ResolutionRequestIdSchema,Ca as RfqIdSchema,Da as RfqQuoteIdSchema,Ea as RfqRequestorPublicIdSchema,Fa as TagIdSchema,la as TickSizeValueSchema,Ga as TokenIdSchema,Ha as TransactionIdSchema,Ia as TxHashSchema,Oa as emptyStringToNull,g as toApiKey,R as toBaseUnits,d as toBestLineId,e as toBuilderCode,h as toCategoryId,i as toChatId,j as toClobRewardId,p as toCollectionId,l as toComboActivityId,o as toComboConditionId,k as toCommentId,n as toConditionId,m as toCtfConditionId,Q as toDecimalString,s as toEpochMilliseconds,q as toEventCreatorId,r as toEventExternalPartnerMappingId,t as toEventId,u as toImageOptimizationId,v as toInternalUserId,w as toIsoCalendarDateString,x as toIsoDateTimeString,z as toMarketId,y as toMixedDateTimeString,A as toNotificationId,C as toPaginationCursor,B as toPartnerId,D as toPositionId,E as toQuestionId,F as toResolutionRequestId,G as toRfqId,H as toRfqQuoteId,I as toRfqRequestorPublicId,J as toSeriesId,K as toSportId,L as toTagId,M as toTeamId,N as toTemplateId,P as toTokenId,O as toTransactionId,f as toUuid}from'./chunk-GTLPG5HR.js';//# sourceMappingURL=index.js.map
1
+ export{T as ApiKeySchema,Na as BaseUnitsSchema,U as BuilderCodeSchema,S as CategoryIdSchema,V as ClobRewardIdSchema,X as ComboActivityIdSchema,Y as ComboConditionIdSchema,W as CommentIdSchema,a as CommentParentEntityType,va as CommentParentEntityTypeSchema,$ as ConditionIdSchema,Z as CtfConditionIdSchema,fa as DateLikeToIsoDateTimeStringSchema,Ja as DecimalStringSchema,La as DecimalishSchema,Ka as E6BigIntStringToDecimalStringSchema,ga as EpochLikeToIsoDateTimeStringSchema,ca as EpochMillisecondsSchema,ea as EpochMillisecondsStringSchema,ia as EpochMillisecondsToIsoDateTimeStringSchema,da as EpochSecondsToMillisecondsSchema,ka as EventIdSchema,ba as EvmAddressSchema,qa as ISOCalendarDateSchema,pa as ISODateStringSchema,ra as ImageOptimizationIdSchema,sa as InternalUserIdSchema,na as IsoCalendarDateStringSchema,ma as IsoDateTimeStringSchema,ta as MarketIdSchema,oa as MixedDateTimeStringSchema,ua as NotificationIdSchema,aa as OptionalConditionIdSchema,_ as OptionalCtfConditionIdSchema,ha as OptionalDateLikeToIsoDateTimeStringSchema,Pa as OptionalDecimalStringSchema,ja as OptionalEpochMillisecondsToIsoDateTimeStringSchema,b as OrderSide,wa as OrderSideSchema,c as OrderType,xa as OrderTypeSchema,ya as PaginationCursorSchema,za as PositionIdSchema,Ma as PositiveDecimalNumberSchema,Aa as QuestionIdSchema,Ba as ResolutionRequestIdSchema,Ca as RfqIdSchema,Da as RfqQuoteIdSchema,Ea as RfqRequestorPublicIdSchema,Fa as TagIdSchema,la as TickSizeValueSchema,Ga as TokenIdSchema,Ha as TransactionIdSchema,Ia as TxHashSchema,Oa as emptyStringToNull,g as toApiKey,R as toBaseUnits,d as toBestLineId,e as toBuilderCode,h as toCategoryId,i as toChatId,j as toClobRewardId,p as toCollectionId,l as toComboActivityId,o as toComboConditionId,k as toCommentId,n as toConditionId,m as toCtfConditionId,Q as toDecimalString,s as toEpochMilliseconds,q as toEventCreatorId,r as toEventExternalPartnerMappingId,t as toEventId,u as toImageOptimizationId,v as toInternalUserId,w as toIsoCalendarDateString,x as toIsoDateTimeString,z as toMarketId,y as toMixedDateTimeString,A as toNotificationId,C as toPaginationCursor,B as toPartnerId,D as toPositionId,E as toQuestionId,F as toResolutionRequestId,G as toRfqId,H as toRfqQuoteId,I as toRfqRequestorPublicId,J as toSeriesId,K as toSportId,L as toTagId,M as toTeamId,N as toTemplateId,P as toTokenId,O as toTransactionId,f as toUuid}from'./chunk-KMTIKS2E.js';//# sourceMappingURL=index.js.map
2
2
  //# sourceMappingURL=index.js.map
@@ -1,2 +1,2 @@
1
- export{X as FetchPerpsAccountConfigResponseSchema,O as FetchPerpsAccountStatsResponseSchema,M as FetchPerpsBalancesResponseSchema,Ja as FetchPerpsCandlesResponseSchema,Ia as FetchPerpsFeesResponseSchema,Fa as FetchPerpsFundingHistoryResponseSchema,oa as FetchPerpsInstrumentsResponseSchema,Va as FetchPerpsOpenOrdersResponseSchema,Ua as FetchPerpsOrdersResponseSchema,S as FetchPerpsPortfolioResponseSchema,ua as FetchPerpsStatisticsResponseSchema,qa as FetchPerpsTickersResponseSchema,Da as FetchPerpsTradesResponseSchema,fa as ListPerpsDepositsResponseSchema,Z as ListPerpsEquityHistoryResponseSchema,Ya as ListPerpsFillsResponseSchema,U as ListPerpsFundingPaymentsResponseSchema,$ as ListPerpsPnlHistoryResponseSchema,ia as ListPerpsWithdrawalsResponseSchema,W as PerpsAccountConfigSchema,Xa as PerpsAccountFillSchema,Za as PerpsAccountFillUpdateSchema,V as PerpsAccountFundingPaymentEntrySchema,T as PerpsAccountFundingPaymentSchema,N as PerpsAccountStatsSchema,F as PerpsAssetSchema,L as PerpsBalanceSchema,za as PerpsBboSchema,Aa as PerpsBboUpdateSchema,wa as PerpsBookLevelSchema,xa as PerpsBookSchema,ya as PerpsBookUpdateSchema,Ra as PerpsCancelAllOrdersResponseSchema,Qa as PerpsCancelOrderResultSchema,sa as PerpsCandleSchema,c as PerpsClientOrderIdSchema,Oa as PerpsCommandAckSchema,Na as PerpsCommandStatusSchema,ca as PerpsCreateProxyResponseSchema,ba as PerpsCredentialsResponseSchema,H as PerpsDataResponseSchema,i as PerpsDecimalInputSchema,da as PerpsDeleteProxyResponseSchema,ea as PerpsDepositSchema,p as PerpsDepositStatus,A as PerpsDepositStatusSchema,ga as PerpsDepositUpdateSchema,g as PerpsEntityIdSchema,Y as PerpsEquityPointSchema,Ga as PerpsFeeScheduleEntrySchema,Ha as PerpsFeesInfoSchema,h as PerpsFundingIntervalSchema,Ea as PerpsFundingRateSchema,k as PerpsInstrumentCategory,v as PerpsInstrumentCategorySchema,a as PerpsInstrumentIdSchema,na as PerpsInstrumentSchema,j as PerpsInstrumentType,u as PerpsInstrumentTypeSchema,r as PerpsInternalTransferDirection,C as PerpsInternalTransferDirectionSchema,f as PerpsInternalTransferIdSchema,la as PerpsInternalTransferSchema,s as PerpsKlineInterval,D as PerpsKlineIntervalSchema,Q as PerpsMarginSummarySchema,b as PerpsOrderIdSchema,Ta as PerpsOrderSchema,Ka as PerpsOrderStatus,Ma as PerpsOrderStatusSchema,Wa as PerpsOrderUpdateSchema,t as PerpsPnlInterval,E as PerpsPnlIntervalSchema,_ as PerpsPnlPointSchema,P as PerpsPortfolioPositionSchema,R as PerpsPortfolioSchema,Pa as PerpsPostOrderAckSchema,aa as PerpsProxyKeySchema,Ba as PerpsPublicTradeSchema,Ca as PerpsPublicTradeUpdateSchema,ma as PerpsRiskTierSchema,l as PerpsSide,w as PerpsSideSchema,ta as PerpsStatisticSchema,va as PerpsStatisticUpdateSchema,ra as PerpsTickerEntrySchema,pa as PerpsTickerSchema,m as PerpsTimeInForce,x as PerpsTimeInForceSchema,n as PerpsTpSlKind,y as PerpsTpSlKindSchema,La as PerpsTpSlOrderFieldsSchema,o as PerpsTpSlScope,z as PerpsTpSlScopeSchema,d as PerpsTradeIdSchema,G as PerpsTxHashSchema,Sa as PerpsUpdateLeverageResultSchema,ja as PerpsWithdrawResponseSchema,e as PerpsWithdrawalIdSchema,ha as PerpsWithdrawalSchema,q as PerpsWithdrawalStatus,B as PerpsWithdrawalStatusSchema,ka as PerpsWithdrawalUpdateSchema,K as decimalString,J as perpsBaseUnits,I as perpsDecimal}from'../chunk-BI6DX3LX.js';import'../chunk-GTLPG5HR.js';//# sourceMappingURL=index.js.map
1
+ export{X as FetchPerpsAccountConfigResponseSchema,O as FetchPerpsAccountStatsResponseSchema,M as FetchPerpsBalancesResponseSchema,Ja as FetchPerpsCandlesResponseSchema,Ia as FetchPerpsFeesResponseSchema,Fa as FetchPerpsFundingHistoryResponseSchema,oa as FetchPerpsInstrumentsResponseSchema,Va as FetchPerpsOpenOrdersResponseSchema,Ua as FetchPerpsOrdersResponseSchema,S as FetchPerpsPortfolioResponseSchema,ua as FetchPerpsStatisticsResponseSchema,qa as FetchPerpsTickersResponseSchema,Da as FetchPerpsTradesResponseSchema,fa as ListPerpsDepositsResponseSchema,Z as ListPerpsEquityHistoryResponseSchema,Ya as ListPerpsFillsResponseSchema,U as ListPerpsFundingPaymentsResponseSchema,$ as ListPerpsPnlHistoryResponseSchema,ia as ListPerpsWithdrawalsResponseSchema,W as PerpsAccountConfigSchema,Xa as PerpsAccountFillSchema,Za as PerpsAccountFillUpdateSchema,V as PerpsAccountFundingPaymentEntrySchema,T as PerpsAccountFundingPaymentSchema,N as PerpsAccountStatsSchema,F as PerpsAssetSchema,L as PerpsBalanceSchema,za as PerpsBboSchema,Aa as PerpsBboUpdateSchema,wa as PerpsBookLevelSchema,xa as PerpsBookSchema,ya as PerpsBookUpdateSchema,Ra as PerpsCancelAllOrdersResponseSchema,Qa as PerpsCancelOrderResultSchema,sa as PerpsCandleSchema,c as PerpsClientOrderIdSchema,Oa as PerpsCommandAckSchema,Na as PerpsCommandStatusSchema,ca as PerpsCreateProxyResponseSchema,ba as PerpsCredentialsResponseSchema,H as PerpsDataResponseSchema,i as PerpsDecimalInputSchema,da as PerpsDeleteProxyResponseSchema,ea as PerpsDepositSchema,p as PerpsDepositStatus,A as PerpsDepositStatusSchema,ga as PerpsDepositUpdateSchema,g as PerpsEntityIdSchema,Y as PerpsEquityPointSchema,Ga as PerpsFeeScheduleEntrySchema,Ha as PerpsFeesInfoSchema,h as PerpsFundingIntervalSchema,Ea as PerpsFundingRateSchema,k as PerpsInstrumentCategory,v as PerpsInstrumentCategorySchema,a as PerpsInstrumentIdSchema,na as PerpsInstrumentSchema,j as PerpsInstrumentType,u as PerpsInstrumentTypeSchema,r as PerpsInternalTransferDirection,C as PerpsInternalTransferDirectionSchema,f as PerpsInternalTransferIdSchema,la as PerpsInternalTransferSchema,s as PerpsKlineInterval,D as PerpsKlineIntervalSchema,Q as PerpsMarginSummarySchema,b as PerpsOrderIdSchema,Ta as PerpsOrderSchema,Ka as PerpsOrderStatus,Ma as PerpsOrderStatusSchema,Wa as PerpsOrderUpdateSchema,t as PerpsPnlInterval,E as PerpsPnlIntervalSchema,_ as PerpsPnlPointSchema,P as PerpsPortfolioPositionSchema,R as PerpsPortfolioSchema,Pa as PerpsPostOrderAckSchema,aa as PerpsProxyKeySchema,Ba as PerpsPublicTradeSchema,Ca as PerpsPublicTradeUpdateSchema,ma as PerpsRiskTierSchema,l as PerpsSide,w as PerpsSideSchema,ta as PerpsStatisticSchema,va as PerpsStatisticUpdateSchema,ra as PerpsTickerEntrySchema,pa as PerpsTickerSchema,m as PerpsTimeInForce,x as PerpsTimeInForceSchema,n as PerpsTpSlKind,y as PerpsTpSlKindSchema,La as PerpsTpSlOrderFieldsSchema,o as PerpsTpSlScope,z as PerpsTpSlScopeSchema,d as PerpsTradeIdSchema,G as PerpsTxHashSchema,Sa as PerpsUpdateLeverageResultSchema,ja as PerpsWithdrawResponseSchema,e as PerpsWithdrawalIdSchema,ha as PerpsWithdrawalSchema,q as PerpsWithdrawalStatus,B as PerpsWithdrawalStatusSchema,ka as PerpsWithdrawalUpdateSchema,K as decimalString,J as perpsBaseUnits,I as perpsDecimal}from'../chunk-AG5LLIAW.js';import'../chunk-KMTIKS2E.js';//# sourceMappingURL=index.js.map
2
2
  //# sourceMappingURL=index.js.map
@@ -1,2 +1,2 @@
1
- import {ba,Ha,Ia}from'../chunk-GTLPG5HR.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:ba.optional(),operation:z.string().optional(),payment:z.string().optional(),paymentReceiver:ba.optional(),paymentToken:ba.optional(),refundReceiver:ba.optional(),relay:ba.optional(),relayHub:ba.optional(),relayerFee:z.string().optional(),safeTxnGas:z.string().optional()}),d=z.object({address:ba,nonce:z.string().min(1)}),R=z.object({data:z.string().min(1),from:ba,metadata:z.string().optional(),nonce:z.string().min(1).optional(),proxyWallet:ba,signature:z.string().min(1),signatureParams:y,to:ba,type:u,value:z.string().optional()}),T=z.object({data:z.string().min(1),target:ba,value:z.string().min(1)}),x=z.object({calls:z.array(T).min(1),deadline:z.string().min(1),depositWallet:ba}),S=z.object({depositWalletParams:x,from:ba,metadata:z.string().optional(),nonce:z.string().min(1),signature:z.string().min(1),to:ba,type:z.literal("WALLET")}),g=z.object({from:ba,metadata:z.string().optional(),to:ba,type:z.literal("WALLET-CREATE")}),W=z.union([R,S,g]),f=z.object({state:m,transactionHash:Ia.nullish().transform(a=>a??null),transactionID:Ha}).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(""),Ia]).transform(a=>a===""?null:a),transaction_id:Ha}).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 {ba,Ha,Ia}from'../chunk-KMTIKS2E.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:ba.optional(),operation:z.string().optional(),payment:z.string().optional(),paymentReceiver:ba.optional(),paymentToken:ba.optional(),refundReceiver:ba.optional(),relay:ba.optional(),relayHub:ba.optional(),relayerFee:z.string().optional(),safeTxnGas:z.string().optional()}),d=z.object({address:ba,nonce:z.string().min(1)}),R=z.object({data:z.string().min(1),from:ba,metadata:z.string().optional(),nonce:z.string().min(1).optional(),proxyWallet:ba,signature:z.string().min(1),signatureParams:y,to:ba,type:u,value:z.string().optional()}),T=z.object({data:z.string().min(1),target:ba,value:z.string().min(1)}),x=z.object({calls:z.array(T).min(1),deadline:z.string().min(1),depositWallet:ba}),S=z.object({depositWalletParams:x,from:ba,metadata:z.string().optional(),nonce:z.string().min(1),signature:z.string().min(1),to:ba,type:z.literal("WALLET")}),g=z.object({from:ba,metadata:z.string().optional(),to:ba,type:z.literal("WALLET-CREATE")}),W=z.union([R,S,g]),f=z.object({state:m,transactionHash:Ia.nullish().transform(a=>a??null),transactionID:Ha}).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(""),Ia]).transform(a=>a===""?null:a),transaction_id:Ha}).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
package/dist/rfq.d.ts CHANGED
@@ -27,7 +27,7 @@ declare enum RfqRequestedSizeUnit {
27
27
  Notional = "notional",
28
28
  Shares = "shares"
29
29
  }
30
- declare enum RfqErrorCode {
30
+ declare enum RfqKnownErrorCode {
31
31
  AddressMismatch = "ADDRESS_MISMATCH",
32
32
  AllowanceValidationFailed = "ALLOWANCE_VALIDATION_FAILED",
33
33
  BalanceValidationFailed = "BALANCE_VALIDATION_FAILED",
@@ -47,6 +47,7 @@ declare enum RfqErrorCode {
47
47
  LegMetadataUnavailable = "LEG_METADATA_UNAVAILABLE",
48
48
  MakerAlreadyResponded = "MAKER_ALREADY_RESPONDED",
49
49
  MakerNotRequired = "MAKER_NOT_REQUIRED",
50
+ MakerQuoteLimited = "MAKER_QUOTE_LIMITED",
50
51
  PreExecutionBalanceReservationFailed = "PRE_EXECUTION_BALANCE_RESERVATION_FAILED",
51
52
  QuoteMismatch = "QUOTE_MISMATCH",
52
53
  QuoteUnavailable = "QUOTE_UNAVAILABLE",
@@ -59,12 +60,17 @@ declare enum RfqErrorCode {
59
60
  UnauthorizedRole = "UNAUTHORIZED_ROLE",
60
61
  UnknownRfq = "UNKNOWN_RFQ"
61
62
  }
62
- declare const RfqDirectionSchema: z.ZodEnum<typeof RfqDirection>;
63
- declare const RfqSideSchema: z.ZodLiteral<RfqSide.Yes>;
64
- declare const RfqConfirmationDecisionSchema: z.ZodEnum<typeof RfqConfirmationDecision>;
65
- declare const RfqExecutionStatusSchema: z.ZodEnum<typeof RfqExecutionStatus>;
66
- declare const RfqRequestedSizeUnitSchema: z.ZodEnum<typeof RfqRequestedSizeUnit>;
67
- declare const RfqErrorCodeSchema: z.ZodEnum<typeof RfqErrorCode>;
63
+ /**
64
+ * An RFQ error code. Known codes are enumerated in {@link RfqKnownErrorCode};
65
+ * newly introduced codes flow through as plain strings so they can be handled
66
+ * before a client release that enumerates them.
67
+ */
68
+ type RfqErrorCode = RfqKnownErrorCode | (string & {});
69
+ /**
70
+ * @deprecated Use {@link RfqKnownErrorCode} instead. This alias will be
71
+ * removed at the end of the beta phase.
72
+ */
73
+ declare const RfqErrorCode: typeof RfqKnownErrorCode;
68
74
  type ComboMarket = {
69
75
  id: MarketId;
70
76
  conditionId: CtfConditionId;
@@ -84,29 +90,6 @@ type ComboMarketOutcomes = {
84
90
  yes: ComboMarketOutcome;
85
91
  no: ComboMarketOutcome;
86
92
  };
87
- declare const ComboMarketSchema: z.ZodPipe<z.ZodObject<{
88
- id: z.ZodPipe<z.ZodString, z.ZodTransform<MarketId, string>>;
89
- condition_id: z.ZodPipe<z.ZodString, z.ZodTransform<CtfConditionId, string>>;
90
- position_ids: z.ZodArray<z.ZodPipe<z.ZodString, z.ZodTransform<PositionId, string>>>;
91
- slug: z.ZodString;
92
- title: z.ZodString;
93
- outcomes: z.ZodArray<z.ZodString>;
94
- outcome_prices: z.ZodArray<z.ZodPipe<z.ZodString, z.ZodTransform<DecimalString, string>>>;
95
- image: z.ZodString;
96
- volume: z.ZodNumber;
97
- tags: z.ZodArray<z.ZodString>;
98
- }, z.core.$strip>, z.ZodTransform<ComboMarket, {
99
- id: MarketId;
100
- condition_id: CtfConditionId;
101
- position_ids: PositionId[];
102
- slug: string;
103
- title: string;
104
- outcomes: string[];
105
- outcome_prices: DecimalString[];
106
- image: string;
107
- volume: number;
108
- tags: string[];
109
- }>>;
110
93
  declare const ListComboMarketsResponseSchema: z.ZodPipe<z.ZodObject<{
111
94
  markets: z.ZodArray<z.ZodPipe<z.ZodObject<{
112
95
  id: z.ZodPipe<z.ZodString, z.ZodTransform<MarketId, string>>;
@@ -439,11 +422,11 @@ declare const RfqErrorMessageSchema: z.ZodPipe<z.ZodObject<{
439
422
  request_type: z.ZodOptional<z.ZodString>;
440
423
  rfq_id: z.ZodOptional<z.ZodPipe<z.ZodString, z.ZodTransform<RfqId, string>>>;
441
424
  quote_id: z.ZodOptional<z.ZodPipe<z.ZodString, z.ZodTransform<RfqQuoteId, string>>>;
442
- code: z.ZodEnum<typeof RfqErrorCode>;
425
+ code: z.ZodPipe<z.ZodString, z.ZodTransform<RfqKnownErrorCode | (string & {}), string>>;
443
426
  error: z.ZodString;
444
427
  request: z.ZodOptional<z.ZodUnknown>;
445
428
  }, z.core.$strip>, z.ZodTransform<{
446
- code: RfqErrorCode;
429
+ code: RfqKnownErrorCode | (string & {});
447
430
  errorId: string | undefined;
448
431
  message: string;
449
432
  quoteId: RfqQuoteId | undefined;
@@ -452,7 +435,7 @@ declare const RfqErrorMessageSchema: z.ZodPipe<z.ZodObject<{
452
435
  type: "rfq_error";
453
436
  }, {
454
437
  type: RfqKnownInboundType.Error;
455
- code: RfqErrorCode;
438
+ code: RfqKnownErrorCode | (string & {});
456
439
  error: string;
457
440
  error_id?: string | undefined;
458
441
  request_type?: string | undefined;
@@ -674,11 +657,11 @@ declare const RfqQuoterInboundMessageSchema: z.ZodDiscriminatedUnion<[z.ZodObjec
674
657
  request_type: z.ZodOptional<z.ZodString>;
675
658
  rfq_id: z.ZodOptional<z.ZodPipe<z.ZodString, z.ZodTransform<RfqId, string>>>;
676
659
  quote_id: z.ZodOptional<z.ZodPipe<z.ZodString, z.ZodTransform<RfqQuoteId, string>>>;
677
- code: z.ZodEnum<typeof RfqErrorCode>;
660
+ code: z.ZodPipe<z.ZodString, z.ZodTransform<RfqKnownErrorCode | (string & {}), string>>;
678
661
  error: z.ZodString;
679
662
  request: z.ZodOptional<z.ZodUnknown>;
680
663
  }, z.core.$strip>, z.ZodTransform<{
681
- code: RfqErrorCode;
664
+ code: RfqKnownErrorCode | (string & {});
682
665
  errorId: string | undefined;
683
666
  message: string;
684
667
  quoteId: RfqQuoteId | undefined;
@@ -687,7 +670,7 @@ declare const RfqQuoterInboundMessageSchema: z.ZodDiscriminatedUnion<[z.ZodObjec
687
670
  type: "rfq_error";
688
671
  }, {
689
672
  type: RfqKnownInboundType.Error;
690
- code: RfqErrorCode;
673
+ code: RfqKnownErrorCode | (string & {});
691
674
  error: string;
692
675
  error_id?: string | undefined;
693
676
  request_type?: string | undefined;
@@ -698,4 +681,4 @@ declare const RfqQuoterInboundMessageSchema: z.ZodDiscriminatedUnion<[z.ZodObjec
698
681
  type RfqQuoterInboundMessage = z.infer<typeof RfqQuoterInboundMessageSchema>;
699
682
  type RfqQuoterOutboundMessage = RfqQuoteMessage | RfqQuoteCancelMessage | RfqConfirmationResponseMessage;
700
683
 
701
- export { type ComboMarket, type ComboMarketOutcome, type ComboMarketOutcomes, ComboMarketSchema, type ListComboMarketsResponse, ListComboMarketsResponseSchema, type RfqAuthMessage, type RfqAuthResponseMessage, RfqAuthResponseMessageSchema, type RfqConfirmationAck, RfqConfirmationAckSchema, RfqConfirmationDecision, RfqConfirmationDecisionSchema, type RfqConfirmationRequest, RfqConfirmationRequestSchema, type RfqConfirmationResponseMessage, RfqDirection, RfqDirectionSchema, RfqErrorCode, RfqErrorCodeSchema, type RfqErrorMessage, RfqErrorMessageSchema, RfqExecutionStatus, RfqExecutionStatusSchema, type RfqExecutionUpdate, RfqExecutionUpdateSchema, RfqId, RfqKnownInboundMessageSchema, RfqKnownInboundType, type RfqOrderSide, type RfqQuoteAck, RfqQuoteAckSchema, type RfqQuoteCancelAck, RfqQuoteCancelAckSchema, type RfqQuoteCancelMessage, RfqQuoteId, type RfqQuoteMessage, type RfqQuoteRequest, RfqQuoteRequestSchema, type RfqQuoterInboundMessage, RfqQuoterInboundMessageSchema, type RfqQuoterOutboundMessage, type RfqRequestedSize, RfqRequestedSizeUnit, RfqRequestedSizeUnitSchema, RfqRequestorPublicId, RfqSide, RfqSideSchema, type RfqSignedOrder, type RfqTrade, RfqTradeSchema };
684
+ export { type ComboMarket, type ComboMarketOutcome, type ComboMarketOutcomes, type ListComboMarketsResponse, ListComboMarketsResponseSchema, type RfqAuthMessage, type RfqAuthResponseMessage, type RfqConfirmationAck, RfqConfirmationDecision, type RfqConfirmationRequest, type RfqConfirmationResponseMessage, RfqDirection, RfqErrorCode, type RfqErrorMessage, RfqExecutionStatus, type RfqExecutionUpdate, RfqId, RfqKnownErrorCode, RfqKnownInboundMessageSchema, RfqKnownInboundType, type RfqOrderSide, type RfqQuoteAck, type RfqQuoteCancelAck, type RfqQuoteCancelMessage, RfqQuoteId, type RfqQuoteMessage, type RfqQuoteRequest, type RfqQuoterInboundMessage, RfqQuoterInboundMessageSchema, type RfqQuoterOutboundMessage, type RfqRequestedSize, RfqRequestedSizeUnit, RfqRequestorPublicId, RfqSide, type RfqSignedOrder, type RfqTrade };
package/dist/rfq.js CHANGED
@@ -1,2 +1,2 @@
1
- import {b as b$1}from'./chunk-HOD4LKZU.js';import {Z,ta,Ja,za,ya,Ka,ba,ca,Y,Ea,Ca,Da,Ia}from'./chunk-GTLPG5HR.js';import {z as z$1}from'zod';var x=(o=>(o.Buy="BUY",o.Sell="SELL",o))(x||{}),O=(o=>(o.Yes="YES",o.No="NO",o))(O||{}),g=(o=>(o.Confirm="CONFIRM",o.Decline="DECLINE",o))(g||{}),T=(u=>(u.Matched="MATCHED",u.Mined="MINED",u.Confirmed="CONFIRMED",u.Retrying="RETRYING",u.Failed="FAILED",u))(T||{}),N=(o=>(o.Notional="notional",o.Shares="shares",o))(N||{}),M=(i=>(i.AddressMismatch="ADDRESS_MISMATCH",i.AllowanceValidationFailed="ALLOWANCE_VALIDATION_FAILED",i.BalanceValidationFailed="BALANCE_VALIDATION_FAILED",i.ContradictoryLegs="CONTRADICTORY_LEGS",i.ExpiredRfq="EXPIRED_RFQ",i.InvalidAcceptance="INVALID_ACCEPTANCE",i.InvalidConfirmation="INVALID_CONFIRMATION",i.InvalidExecutionResult="INVALID_EXECUTION_RESULT",i.InvalidIdentity="INVALID_IDENTITY",i.InvalidMessage="INVALID_MESSAGE",i.InvalidQuote="INVALID_QUOTE",i.InvalidRfq="INVALID_RFQ",i.InvalidRfqState="INVALID_RFQ_STATE",i.InvalidRole="INVALID_ROLE",i.InvalidSignature="INVALID_SIGNATURE",i.InternalError="INTERNAL_ERROR",i.LegMetadataUnavailable="LEG_METADATA_UNAVAILABLE",i.MakerAlreadyResponded="MAKER_ALREADY_RESPONDED",i.MakerNotRequired="MAKER_NOT_REQUIRED",i.PreExecutionBalanceReservationFailed="PRE_EXECUTION_BALANCE_RESERVATION_FAILED",i.QuoteMismatch="QUOTE_MISMATCH",i.QuoteUnavailable="QUOTE_UNAVAILABLE",i.RateLimited="RATE_LIMITED",i.RequestFailed="REQUEST_FAILED",i.ServiceUnavailable="SERVICE_UNAVAILABLE",i.SubmissionWindowClosed="SUBMISSION_WINDOW_CLOSED",i.TradeSubmissionFailed="TRADE_SUBMISSION_FAILED",i.Unauthenticated="UNAUTHENTICATED",i.UnauthorizedRole="UNAUTHORIZED_ROLE",i.UnknownRfq="UNKNOWN_RFQ",i))(M||{}),f=z$1.enum(x),R=z$1.literal("YES"),D=z$1.enum(g),L=z$1.enum(T),G=z$1.enum(N),C=z$1.enum(M),U=z$1.object({id:ta,condition_id:Z,position_ids:z$1.array(za),slug:z$1.string(),title:z$1.string(),outcomes:z$1.array(z$1.string()),outcome_prices:z$1.array(Ja),image:z$1.string(),volume:z$1.number(),tags:z$1.array(z$1.string())}).superRefine((e,I)=>{e.outcomes.length!==2&&I.addIssue({code:"custom",message:`Expected binary combo market outcomes, received ${e.outcomes.length}.`,path:["outcomes"]}),e.position_ids.length!==e.outcomes.length&&I.addIssue({code:"custom",message:"Expected position_ids and outcomes to have matching lengths.",path:["position_ids"]}),e.outcome_prices.length!==e.outcomes.length&&I.addIssue({code:"custom",message:"Expected outcome_prices and outcomes to have matching lengths.",path:["outcome_prices"]});}).transform(e=>({conditionId:e.condition_id,id:e.id,image:e.image,outcomes:{yes:{label:e.outcomes[0],positionId:e.position_ids[0],price:e.outcome_prices[0]},no:{label:e.outcomes[1],positionId:e.position_ids[1],price:e.outcome_prices[1]}},slug:e.slug,tags:e.tags,title:e.title,volume:e.volume})),W=z$1.object({markets:z$1.array(U),next_cursor:ya.nullish()}).transform(e=>({markets:e.markets,nextCursor:e.next_cursor??void 0})),b=z$1.discriminatedUnion("unit",[z$1.object({unit:z$1.literal("notional"),value_e6:Ka}),z$1.object({unit:z$1.literal("shares"),value_e6:Ka})]).transform(e=>({unit:e.unit,value:e.value_e6})),Q=(n=>(n.Auth="auth",n.QuoteRequest="RFQ_REQUEST",n.QuoteAck="ACK_RFQ_QUOTE",n.QuoteCancelAck="ACK_RFQ_QUOTE_CANCEL",n.ConfirmationRequest="RFQ_CONFIRMATION_REQUEST",n.ConfirmationAck="ACK_RFQ_CONFIRMATION_RESPONSE",n.ExecutionUpdate="RFQ_EXECUTION_UPDATE",n.Trade="RFQ_TRADE",n.Error="RFQ_ERROR",n))(Q||{}),d=z$1.object({type:z$1.enum(Q)}),v=d.extend({type:z$1.literal("auth"),success:z$1.boolean(),address:ba.optional(),role:z$1.string().optional(),error:z$1.string().optional()}),k=d.extend({type:z$1.literal("RFQ_REQUEST"),rfq_id:Ca,requestor_public_id:Ea,leg_position_ids:z$1.array(za),condition_id:Y,yes_position_id:za,no_position_id:za,direction:f,side:R,requested_size:b,submission_deadline:ca}).transform(e=>({conditionId:e.condition_id,direction:e.direction,legPositionIds:e.leg_position_ids,noPositionId:e.no_position_id,requestorPublicId:e.requestor_public_id,requestedSize:e.requested_size,rfqId:e.rfq_id,side:e.side,submissionDeadline:e.submission_deadline,type:"quote_request",yesPositionId:e.yes_position_id})),F=d.extend({type:z$1.literal("ACK_RFQ_QUOTE"),rfq_id:Ca,quote_id:Da}).transform(e=>({quoteId:e.quote_id,rfqId:e.rfq_id,type:"quote_ack"})),z=d.extend({type:z$1.literal("ACK_RFQ_QUOTE_CANCEL"),rfq_id:Ca,quote_id:Da}).transform(e=>({quoteId:e.quote_id,rfqId:e.rfq_id,type:"quote_cancel_ack"})),P=d.extend({type:z$1.literal("RFQ_CONFIRMATION_REQUEST"),rfq_id:Ca,quote_id:Da,signer_address:ba,maker_address:ba,signature_type:b$1,leg_position_ids:z$1.array(za),condition_id:Y,yes_position_id:za,no_position_id:za,direction:f,side:R,fill_size_e6:Ka,price_e6:Ka,confirm_by:ca}).transform(e=>({conditionId:e.condition_id,confirmBy:e.confirm_by,direction:e.direction,fillSize:e.fill_size_e6,legPositionIds:e.leg_position_ids,makerAddress:e.maker_address,noPositionId:e.no_position_id,price:e.price_e6,quoteId:e.quote_id,rfqId:e.rfq_id,side:e.side,signatureType:e.signature_type,signerAddress:e.signer_address,type:"confirmation_request",yesPositionId:e.yes_position_id})),V=d.extend({type:z$1.literal("ACK_RFQ_CONFIRMATION_RESPONSE"),rfq_id:Ca,quote_id:Da,decision:D}).transform(e=>({decision:e.decision,quoteId:e.quote_id,rfqId:e.rfq_id,type:"confirmation_ack"})),B=d.extend({type:z$1.literal("RFQ_EXECUTION_UPDATE"),rfq_id:Ca,status:L,tx_hash:Ia.optional()}).transform(e=>({rfqId:e.rfq_id,status:e.status,...e.tx_hash===void 0?{}:{txHash:e.tx_hash},type:"execution_update"})),H=d.extend({type:z$1.literal("RFQ_TRADE"),rfq_id:Ca,requester_id:Ea,condition_id:Y,leg_position_ids:z$1.array(za),direction:f,side:R,price_e6:Ka,size_e6:Ka,executed_at:ca}).transform(e=>({conditionId:e.condition_id,direction:e.direction,executedAt:e.executed_at,legPositionIds:e.leg_position_ids,price:e.price_e6,requesterId:e.requester_id,rfqId:e.rfq_id,side:e.side,size:e.size_e6,type:"trade"})),K=d.extend({type:z$1.literal("RFQ_ERROR"),error_id:z$1.string().optional(),request_type:z$1.string().optional(),rfq_id:Ca.optional(),quote_id:Da.optional(),code:C,error:z$1.string(),request:z$1.unknown().optional()}).transform(e=>({code:e.code,errorId:e.error_id,message:e.error,quoteId:e.quote_id,requestType:e.request_type,rfqId:e.rfq_id,type:"rfq_error"})),X=z$1.discriminatedUnion("type",[v,k,F,z,P,V,B,H,K]);export{U as ComboMarketSchema,W as ListComboMarketsResponseSchema,v as RfqAuthResponseMessageSchema,V as RfqConfirmationAckSchema,g as RfqConfirmationDecision,D as RfqConfirmationDecisionSchema,P as RfqConfirmationRequestSchema,x as RfqDirection,f as RfqDirectionSchema,M as RfqErrorCode,C as RfqErrorCodeSchema,K as RfqErrorMessageSchema,T as RfqExecutionStatus,L as RfqExecutionStatusSchema,B as RfqExecutionUpdateSchema,d as RfqKnownInboundMessageSchema,Q as RfqKnownInboundType,F as RfqQuoteAckSchema,z as RfqQuoteCancelAckSchema,k as RfqQuoteRequestSchema,X as RfqQuoterInboundMessageSchema,N as RfqRequestedSizeUnit,G as RfqRequestedSizeUnitSchema,O as RfqSide,R as RfqSideSchema,H as RfqTradeSchema};//# sourceMappingURL=rfq.js.map
1
+ import {b as b$1}from'./chunk-HOD4LKZU.js';import {Z as Z$1,ta,Ja,za,ya,Ka,ba,ca,Y as Y$1,Ea,Ca,Da,Ia}from'./chunk-KMTIKS2E.js';import {z as z$1}from'zod';var g=(o=>(o.Buy="BUY",o.Sell="SELL",o))(g||{}),Q=(o=>(o.Yes="YES",o.No="NO",o))(Q||{}),T=(o=>(o.Confirm="CONFIRM",o.Decline="DECLINE",o))(T||{}),x=(u=>(u.Matched="MATCHED",u.Mined="MINED",u.Confirmed="CONFIRMED",u.Retrying="RETRYING",u.Failed="FAILED",u))(x||{}),O=(o=>(o.Notional="notional",o.Shares="shares",o))(O||{}),M=(i=>(i.AddressMismatch="ADDRESS_MISMATCH",i.AllowanceValidationFailed="ALLOWANCE_VALIDATION_FAILED",i.BalanceValidationFailed="BALANCE_VALIDATION_FAILED",i.ContradictoryLegs="CONTRADICTORY_LEGS",i.ExpiredRfq="EXPIRED_RFQ",i.InvalidAcceptance="INVALID_ACCEPTANCE",i.InvalidConfirmation="INVALID_CONFIRMATION",i.InvalidExecutionResult="INVALID_EXECUTION_RESULT",i.InvalidIdentity="INVALID_IDENTITY",i.InvalidMessage="INVALID_MESSAGE",i.InvalidQuote="INVALID_QUOTE",i.InvalidRfq="INVALID_RFQ",i.InvalidRfqState="INVALID_RFQ_STATE",i.InvalidRole="INVALID_ROLE",i.InvalidSignature="INVALID_SIGNATURE",i.InternalError="INTERNAL_ERROR",i.LegMetadataUnavailable="LEG_METADATA_UNAVAILABLE",i.MakerAlreadyResponded="MAKER_ALREADY_RESPONDED",i.MakerNotRequired="MAKER_NOT_REQUIRED",i.MakerQuoteLimited="MAKER_QUOTE_LIMITED",i.PreExecutionBalanceReservationFailed="PRE_EXECUTION_BALANCE_RESERVATION_FAILED",i.QuoteMismatch="QUOTE_MISMATCH",i.QuoteUnavailable="QUOTE_UNAVAILABLE",i.RateLimited="RATE_LIMITED",i.RequestFailed="REQUEST_FAILED",i.ServiceUnavailable="SERVICE_UNAVAILABLE",i.SubmissionWindowClosed="SUBMISSION_WINDOW_CLOSED",i.TradeSubmissionFailed="TRADE_SUBMISSION_FAILED",i.Unauthenticated="UNAUTHENTICATED",i.UnauthorizedRole="UNAUTHORIZED_ROLE",i.UnknownRfq="UNKNOWN_RFQ",i))(M||{}),X=M,f=z$1.enum(g),R=z$1.literal("YES"),C=z$1.enum(T),D=z$1.enum(x),L=z$1.string().transform(e=>e),U=z$1.object({id:ta,condition_id:Z$1,position_ids:z$1.array(za),slug:z$1.string(),title:z$1.string(),outcomes:z$1.array(z$1.string()),outcome_prices:z$1.array(Ja),image:z$1.string(),volume:z$1.number(),tags:z$1.array(z$1.string())}).superRefine((e,I)=>{e.outcomes.length!==2&&I.addIssue({code:"custom",message:`Expected binary combo market outcomes, received ${e.outcomes.length}.`,path:["outcomes"]}),e.position_ids.length!==e.outcomes.length&&I.addIssue({code:"custom",message:"Expected position_ids and outcomes to have matching lengths.",path:["position_ids"]}),e.outcome_prices.length!==e.outcomes.length&&I.addIssue({code:"custom",message:"Expected outcome_prices and outcomes to have matching lengths.",path:["outcome_prices"]});}).transform(e=>({conditionId:e.condition_id,id:e.id,image:e.image,outcomes:{yes:{label:e.outcomes[0],positionId:e.position_ids[0],price:e.outcome_prices[0]},no:{label:e.outcomes[1],positionId:e.position_ids[1],price:e.outcome_prices[1]}},slug:e.slug,tags:e.tags,title:e.title,volume:e.volume})),Z=z$1.object({markets:z$1.array(U),next_cursor:ya.nullish()}).transform(e=>({markets:e.markets,nextCursor:e.next_cursor??void 0})),b=z$1.discriminatedUnion("unit",[z$1.object({unit:z$1.literal("notional"),value_e6:Ka}),z$1.object({unit:z$1.literal("shares"),value_e6:Ka})]).transform(e=>({unit:e.unit,value:e.value_e6})),N=(n=>(n.Auth="auth",n.QuoteRequest="RFQ_REQUEST",n.QuoteAck="ACK_RFQ_QUOTE",n.QuoteCancelAck="ACK_RFQ_QUOTE_CANCEL",n.ConfirmationRequest="RFQ_CONFIRMATION_REQUEST",n.ConfirmationAck="ACK_RFQ_CONFIRMATION_RESPONSE",n.ExecutionUpdate="RFQ_EXECUTION_UPDATE",n.Trade="RFQ_TRADE",n.Error="RFQ_ERROR",n))(N||{}),d=z$1.object({type:z$1.enum(N)}),v=d.extend({type:z$1.literal("auth"),success:z$1.boolean(),address:ba.optional(),role:z$1.string().optional(),error:z$1.string().optional()}),k=d.extend({type:z$1.literal("RFQ_REQUEST"),rfq_id:Ca,requestor_public_id:Ea,leg_position_ids:z$1.array(za),condition_id:Y$1,yes_position_id:za,no_position_id:za,direction:f,side:R,requested_size:b,submission_deadline:ca}).transform(e=>({conditionId:e.condition_id,direction:e.direction,legPositionIds:e.leg_position_ids,noPositionId:e.no_position_id,requestorPublicId:e.requestor_public_id,requestedSize:e.requested_size,rfqId:e.rfq_id,side:e.side,submissionDeadline:e.submission_deadline,type:"quote_request",yesPositionId:e.yes_position_id})),F=d.extend({type:z$1.literal("ACK_RFQ_QUOTE"),rfq_id:Ca,quote_id:Da}).transform(e=>({quoteId:e.quote_id,rfqId:e.rfq_id,type:"quote_ack"})),z=d.extend({type:z$1.literal("ACK_RFQ_QUOTE_CANCEL"),rfq_id:Ca,quote_id:Da}).transform(e=>({quoteId:e.quote_id,rfqId:e.rfq_id,type:"quote_cancel_ack"})),P=d.extend({type:z$1.literal("RFQ_CONFIRMATION_REQUEST"),rfq_id:Ca,quote_id:Da,signer_address:ba,maker_address:ba,signature_type:b$1,leg_position_ids:z$1.array(za),condition_id:Y$1,yes_position_id:za,no_position_id:za,direction:f,side:R,fill_size_e6:Ka,price_e6:Ka,confirm_by:ca}).transform(e=>({conditionId:e.condition_id,confirmBy:e.confirm_by,direction:e.direction,fillSize:e.fill_size_e6,legPositionIds:e.leg_position_ids,makerAddress:e.maker_address,noPositionId:e.no_position_id,price:e.price_e6,quoteId:e.quote_id,rfqId:e.rfq_id,side:e.side,signatureType:e.signature_type,signerAddress:e.signer_address,type:"confirmation_request",yesPositionId:e.yes_position_id})),V=d.extend({type:z$1.literal("ACK_RFQ_CONFIRMATION_RESPONSE"),rfq_id:Ca,quote_id:Da,decision:C}).transform(e=>({decision:e.decision,quoteId:e.quote_id,rfqId:e.rfq_id,type:"confirmation_ack"})),B=d.extend({type:z$1.literal("RFQ_EXECUTION_UPDATE"),rfq_id:Ca,status:D,tx_hash:Ia.optional()}).transform(e=>({rfqId:e.rfq_id,status:e.status,...e.tx_hash===void 0?{}:{txHash:e.tx_hash},type:"execution_update"})),H=d.extend({type:z$1.literal("RFQ_TRADE"),rfq_id:Ca,requester_id:Ea,condition_id:Y$1,leg_position_ids:z$1.array(za),direction:f,side:R,price_e6:Ka,size_e6:Ka,executed_at:ca}).transform(e=>({conditionId:e.condition_id,direction:e.direction,executedAt:e.executed_at,legPositionIds:e.leg_position_ids,price:e.price_e6,requesterId:e.requester_id,rfqId:e.rfq_id,side:e.side,size:e.size_e6,type:"trade"})),Y=d.extend({type:z$1.literal("RFQ_ERROR"),error_id:z$1.string().optional(),request_type:z$1.string().optional(),rfq_id:Ca.optional(),quote_id:Da.optional(),code:L,error:z$1.string(),request:z$1.unknown().optional()}).transform(e=>({code:e.code,errorId:e.error_id,message:e.error,quoteId:e.quote_id,requestType:e.request_type,rfqId:e.rfq_id,type:"rfq_error"})),$=z$1.discriminatedUnion("type",[v,k,F,z,P,V,B,H,Y]);export{Z as ListComboMarketsResponseSchema,T as RfqConfirmationDecision,g as RfqDirection,X as RfqErrorCode,x as RfqExecutionStatus,M as RfqKnownErrorCode,d as RfqKnownInboundMessageSchema,N as RfqKnownInboundType,$ as RfqQuoterInboundMessageSchema,O as RfqRequestedSizeUnit,Q as RfqSide};//# sourceMappingURL=rfq.js.map
2
2
  //# sourceMappingURL=rfq.js.map