@polymarket/bindings 0.2.0 → 0.3.0-beta.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/chunk-6TO35A2S.js +2 -0
- package/dist/chunk-6TO35A2S.js.map +1 -0
- package/dist/{chunk-H6NL6UCA.js → chunk-GJX3FYFG.js} +2 -2
- package/dist/{chunk-H6NL6UCA.js.map → chunk-GJX3FYFG.js.map} +1 -1
- package/dist/{chunk-N4P2EGRL.js → chunk-JRSTEY5H.js} +2 -2
- package/dist/{chunk-N4P2EGRL.js.map → chunk-JRSTEY5H.js.map} +1 -1
- package/dist/clob/index.js +1 -1
- package/dist/clob/index.js.map +1 -1
- package/dist/combos/index.d.ts +26 -0
- package/dist/combos/index.js +1 -1
- package/dist/combos/index.js.map +1 -1
- package/dist/data/index.d.ts +24 -3
- package/dist/data/index.js +1 -1
- package/dist/data/index.js.map +1 -1
- package/dist/gamma/index.js +1 -1
- package/dist/index.d.ts +2 -1
- package/dist/index.js +1 -1
- package/dist/perps/index.js +1 -1
- package/dist/relayer/index.js +1 -1
- package/dist/subscriptions/index.d.ts +186 -1
- package/dist/subscriptions/index.js +1 -1
- package/dist/subscriptions/index.js.map +1 -1
- package/package.json +1 -1
- package/dist/chunk-QTXFNR2Y.js +0 -2
- package/dist/chunk-QTXFNR2Y.js.map +0 -1
package/dist/data/index.d.ts
CHANGED
|
@@ -13,7 +13,10 @@ declare enum ActivityType {
|
|
|
13
13
|
CONVERSION = "CONVERSION",
|
|
14
14
|
MAKER_REBATE = "MAKER_REBATE",
|
|
15
15
|
REFERRAL_REWARD = "REFERRAL_REWARD",
|
|
16
|
-
YIELD = "YIELD"
|
|
16
|
+
YIELD = "YIELD",
|
|
17
|
+
DEPOSIT = "DEPOSIT",
|
|
18
|
+
WITHDRAWAL = "WITHDRAWAL",
|
|
19
|
+
TAKER_REBATE = "TAKER_REBATE"
|
|
17
20
|
}
|
|
18
21
|
declare const ActivityTypeSchema: z.ZodEnum<typeof ActivityType>;
|
|
19
22
|
declare const SideSchema: z.ZodEnum<{
|
|
@@ -1481,7 +1484,25 @@ type YieldActivity = ActivityBase & {
|
|
|
1481
1484
|
/** The yield amount credited to the wallet in USD. */
|
|
1482
1485
|
amount: DecimalString;
|
|
1483
1486
|
};
|
|
1484
|
-
type
|
|
1487
|
+
type DepositActivity = ActivityBase & {
|
|
1488
|
+
/** An account-level deposit credit. */
|
|
1489
|
+
type: 'DEPOSIT';
|
|
1490
|
+
/** The deposit amount credited to the wallet in USD. */
|
|
1491
|
+
amount: DecimalString;
|
|
1492
|
+
};
|
|
1493
|
+
type WithdrawalActivity = ActivityBase & {
|
|
1494
|
+
/** An account-level withdrawal debit. */
|
|
1495
|
+
type: 'WITHDRAWAL';
|
|
1496
|
+
/** The withdrawal amount debited from the wallet in USD. */
|
|
1497
|
+
amount: DecimalString;
|
|
1498
|
+
};
|
|
1499
|
+
type TakerRebateActivity = ActivityBase & {
|
|
1500
|
+
/** An account-level taker rebate credit. */
|
|
1501
|
+
type: 'TAKER_REBATE';
|
|
1502
|
+
/** The taker rebate amount credited to the wallet in USD. */
|
|
1503
|
+
amount: DecimalString;
|
|
1504
|
+
};
|
|
1505
|
+
type Activity = TradeActivity | SplitActivity | MergeActivity | RedeemActivity | ConversionActivity | RewardActivity | MakerRebateActivity | ReferralRewardActivity | YieldActivity | DepositActivity | WithdrawalActivity | TakerRebateActivity;
|
|
1485
1506
|
type ComboActivityBase = {
|
|
1486
1507
|
/** Stable row id derived from the transaction hash and log index. */
|
|
1487
1508
|
id: ComboActivityId;
|
|
@@ -1972,4 +1993,4 @@ type ListBuilderLeaderboardResponse = z.infer<typeof ListBuilderLeaderboardRespo
|
|
|
1972
1993
|
type ListBuilderVolumeResponse = z.infer<typeof ListBuilderVolumeResponseSchema>;
|
|
1973
1994
|
type ListTraderLeaderboardResponse = z.infer<typeof ListTraderLeaderboardResponseSchema>;
|
|
1974
1995
|
|
|
1975
|
-
export { type Activity, type ActivityBase, ActivitySchema, ActivityType, ActivityTypeSchema, type Address, AddressSchema, type BuilderVolumeEntry, BuilderVolumeEntrySchema, type ClobTradeActivity, type ClosedPosition, ClosedPositionSchema, type ComboActivity, ComboActivitySchema, ComboActivityType, type ComboCompressActivity, type ComboConvertActivity, type ComboMergeActivity, type ComboPosition, type ComboPositionLeg, ComboPositionLegSchema, type ComboPositionMarket, type ComboPositionMarketEvent, ComboPositionMarketEventSchema, ComboPositionMarketSchema, ComboPositionOutcome, ComboPositionOutcomeSchema, ComboPositionSchema, ComboPositionStatus, ComboPositionStatusSchema, type ComboRedeemActivity, type ComboSplitActivity, type ComboTradeActivity, type ComboUnwrapActivity, type ComboWrapActivity, type ConversionActivity, type FetchEventLiveVolumeResponse, FetchEventLiveVolumeResponseSchema, type FetchPortfolioValueResponse, FetchPortfolioValueResponseSchema, type Hash64, Hash64Schema, type Holder, HolderSchema, type LeaderboardCategory, LeaderboardCategorySchema, type LeaderboardEntry, LeaderboardEntrySchema, type LeaderboardOrderBy, LeaderboardOrderBySchema, type ListActivityResponse, ListActivityResponseSchema, type ListBuilderLeaderboardResponse, ListBuilderLeaderboardResponseSchema, type ListBuilderVolumeResponse, ListBuilderVolumeResponseSchema, type ListClosedPositionsResponse, ListClosedPositionsResponseSchema, type ListComboActivityResponse, ListComboActivityResponseSchema, type ListComboPositionsResponse, ListComboPositionsResponseSchema, type ListMarketHoldersResponse, ListMarketHoldersResponseSchema, type ListMarketPositionsResponse, ListMarketPositionsResponseSchema, type ListOpenInterestResponse, ListOpenInterestResponseSchema, type ListPositionsResponse, ListPositionsResponseSchema, type ListTraderLeaderboardResponse, ListTraderLeaderboardResponseSchema, type ListTradesResponse, ListTradesResponseSchema, type LiveVolume, LiveVolumeSchema, type MakerRebateActivity, type MarketPosition, MarketPositionSchema, type MarketVolume, MarketVolumeSchema, type MergeActivity, type MetaHolder, MetaHolderSchema, type MetaMarketPosition, MetaMarketPositionSchema, type OpenInterest, OpenInterestSchema, type Position, PositionSchema, type RedeemActivity, type ReferralRewardActivity, type RewardActivity, type Side, SideSchema, type SplitActivity, type TimePeriod, TimePeriodSchema, type Trade, type TradeActivity, TradeSchema, type Traded, TradedSchema, type TraderLeaderboardEntry, TraderLeaderboardEntrySchema, type Value, ValueSchema, type YieldActivity };
|
|
1996
|
+
export { type Activity, type ActivityBase, ActivitySchema, ActivityType, ActivityTypeSchema, type Address, AddressSchema, type BuilderVolumeEntry, BuilderVolumeEntrySchema, type ClobTradeActivity, type ClosedPosition, ClosedPositionSchema, type ComboActivity, ComboActivitySchema, ComboActivityType, type ComboCompressActivity, type ComboConvertActivity, type ComboMergeActivity, type ComboPosition, type ComboPositionLeg, ComboPositionLegSchema, type ComboPositionMarket, type ComboPositionMarketEvent, ComboPositionMarketEventSchema, ComboPositionMarketSchema, ComboPositionOutcome, ComboPositionOutcomeSchema, ComboPositionSchema, ComboPositionStatus, ComboPositionStatusSchema, type ComboRedeemActivity, type ComboSplitActivity, type ComboTradeActivity, type ComboUnwrapActivity, type ComboWrapActivity, type ConversionActivity, type DepositActivity, type FetchEventLiveVolumeResponse, FetchEventLiveVolumeResponseSchema, type FetchPortfolioValueResponse, FetchPortfolioValueResponseSchema, type Hash64, Hash64Schema, type Holder, HolderSchema, type LeaderboardCategory, LeaderboardCategorySchema, type LeaderboardEntry, LeaderboardEntrySchema, type LeaderboardOrderBy, LeaderboardOrderBySchema, type ListActivityResponse, ListActivityResponseSchema, type ListBuilderLeaderboardResponse, ListBuilderLeaderboardResponseSchema, type ListBuilderVolumeResponse, ListBuilderVolumeResponseSchema, type ListClosedPositionsResponse, ListClosedPositionsResponseSchema, type ListComboActivityResponse, ListComboActivityResponseSchema, type ListComboPositionsResponse, ListComboPositionsResponseSchema, type ListMarketHoldersResponse, ListMarketHoldersResponseSchema, type ListMarketPositionsResponse, ListMarketPositionsResponseSchema, type ListOpenInterestResponse, ListOpenInterestResponseSchema, type ListPositionsResponse, ListPositionsResponseSchema, type ListTraderLeaderboardResponse, ListTraderLeaderboardResponseSchema, type ListTradesResponse, ListTradesResponseSchema, type LiveVolume, LiveVolumeSchema, type MakerRebateActivity, type MarketPosition, MarketPositionSchema, type MarketVolume, MarketVolumeSchema, type MergeActivity, type MetaHolder, MetaHolderSchema, type MetaMarketPosition, MetaMarketPositionSchema, type OpenInterest, OpenInterestSchema, type Position, PositionSchema, type RedeemActivity, type ReferralRewardActivity, type RewardActivity, type Side, SideSchema, type SplitActivity, type TakerRebateActivity, type TimePeriod, TimePeriodSchema, type Trade, type TradeActivity, TradeSchema, type Traded, TradedSchema, type TraderLeaderboardEntry, TraderLeaderboardEntrySchema, type Value, ValueSchema, type WithdrawalActivity, type YieldActivity };
|
package/dist/data/index.js
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import {_ as _$1,ma,Ha,Pa,Ma,na,ca,la,Aa,Z as Z$1,za,Ja,Y}from'../chunk-QTXFNR2Y.js';import {z as z$1}from'zod';var m=z$1.string(),T=z$1.string(),_=(u=>(u.TRADE="TRADE",u.SPLIT="SPLIT",u.MERGE="MERGE",u.REDEEM="REDEEM",u.REWARD="REWARD",u.CONVERSION="CONVERSION",u.MAKER_REBATE="MAKER_REBATE",u.REFERRAL_REWARD="REFERRAL_REWARD",u.YIELD="YIELD",u))(_||{}),O=z$1.enum(_),P=z$1.enum(["BUY","SELL"]),Re=z$1.enum(["DAY","WEEK","MONTH","ALL"]),Ie=z$1.enum(["OVERALL","POLITICS","SPORTS","CRYPTO","CULTURE","MENTIONS","WEATHER","ECONOMICS","TECH","FINANCE"]),ve=z$1.enum(["PNL","VOL"]);var w=(g=>(g.Open="OPEN",g.Partial="PARTIAL",g.ResolvedPartial="RESOLVED_PARTIAL",g.ResolvedWin="RESOLVED_WIN",g.ResolvedLoss="RESOLVED_LOSS",g))(w||{}),V=z$1.enum(w),W=(s=>(s.Yes="YES",s.No="NO",s))(W||{}),Z=z$1.enum(W),$=z$1.object({proxyWallet:m.nullish(),asset:Ha.nullish(),conditionId:_$1,size:Ma.nullish(),avgPrice:Ma.nullish(),initialValue:Ma.nullish(),currentValue:Ma.nullish(),cashPnl:Ma.nullish(),percentPnl:z$1.number().nullish(),totalBought:Ma.nullish(),realizedPnl:Ma.nullish(),percentRealizedPnl:z$1.number().nullish(),curPrice:Ma.nullish(),redeemable:z$1.boolean().nullish(),mergeable:z$1.boolean().nullish(),title:z$1.string().nullish(),slug:z$1.string().nullish(),icon:z$1.preprocess(Pa,z$1.string().nullish()),eventId:z$1.string().nullish(),eventSlug:z$1.string().nullish(),outcome:z$1.string().nullish(),outcomeIndex:z$1.number().int().nullish(),oppositeOutcome:z$1.string().nullish(),oppositeAsset:Ha.nullish(),endDate:ma.nullish(),negativeRisk:z$1.boolean().nullish()}).transform(({asset:e,oppositeAsset:i,proxyWallet:s,...p})=>({...p,wallet:s,tokenId:e,oppositeTokenId:i})),q=z$1.object({proxyWallet:m.nullish(),asset:Ha.nullish(),conditionId:_$1.nullish(),avgPrice:Ma.nullish(),totalBought:Ma.nullish(),realizedPnl:Ma.nullish(),curPrice:Ma.nullish(),timestamp:ca.nullish(),title:z$1.string().nullish(),slug:z$1.string().nullish(),icon:z$1.preprocess(Pa,z$1.string().nullish()),eventSlug:z$1.string().nullish(),outcome:z$1.string().nullish(),outcomeIndex:z$1.number().int().nullish(),oppositeOutcome:z$1.string().nullish(),oppositeAsset:Ha.nullish(),endDate:na.nullish()}).transform(({asset:e,oppositeAsset:i,proxyWallet:s,...p})=>({...p,wallet:s,tokenId:e,oppositeTokenId:i})),J=z$1.object({user:m.nullish(),value:Ma.nullish()}),Q=z$1.object({proxyWallet:m.nullish(),name:z$1.string().nullish(),profileImage:z$1.string().nullish(),verified:z$1.boolean().nullish(),asset:Ha.nullish(),conditionId:_$1.nullish(),avgPrice:Ma.nullish(),size:Ma.nullish(),currPrice:Ma.nullish(),currentValue:Ma.nullish(),cashPnl:Ma.nullish(),totalBought:Ma.nullish(),realizedPnl:Ma.nullish(),totalPnl:Ma.nullish(),outcome:z$1.string().nullish(),outcomeIndex:z$1.number().int().nullish()}).transform(({asset:e,proxyWallet:i,...s})=>({...s,wallet:i,tokenId:e})),X=z$1.object({token:z$1.string().nullish(),positions:z$1.array(Q).nullish()}),ee=z$1.object({event_id:z$1.string().nullish(),event_slug:z$1.string().nullish(),event_title:z$1.string().nullish(),event_image:z$1.string().nullish()}).transform(({event_id:e,event_slug:i,event_title:s,event_image:p})=>({eventId:e,eventSlug:i,eventTitle:s,eventImage:p})),te=z$1.object({market_id:z$1.string().nullish(),slug:z$1.string().nullish(),title:z$1.string().nullish(),outcome:z$1.string().nullish(),image_url:z$1.string().nullish(),icon_url:z$1.string().nullish(),category:z$1.string().nullish(),subcategory:z$1.string().nullish(),tags:z$1.array(z$1.string()).nullish(),end_date:la.nullish(),event:ee.nullish()}).transform(({market_id:e,image_url:i,icon_url:s,end_date:p,...x})=>({...x,marketId:e,imageUrl:i,iconUrl:s,endDate:p})),z=z$1.object({leg_index:z$1.number().int(),leg_position_id:Aa,leg_condition_id:_$1,leg_outcome_index:z$1.number().int(),leg_outcome_label:z$1.string().nullish(),leg_status:V,leg_resolved_at:la.nullish(),leg_current_price:Ma.nullish(),market:te.nullish()}).transform(({leg_index:e,leg_position_id:i,leg_condition_id:s,leg_outcome_index:p,leg_outcome_label:x,leg_status:g,leg_resolved_at:v,leg_current_price:c,...E})=>({...E,legIndex:e,legPositionId:i,legConditionId:s,legOutcomeIndex:p,legOutcomeLabel:x,legStatus:g,legResolvedAt:v,legCurrentPrice:c})),oe=z$1.object({combo_condition_id:Z$1,combo_position_id:Aa,side:Z,module_id:z$1.number().int(),user_address:m,shares_balance:Ma,entry_avg_price_usdc:Ma.nullish(),entry_cost_usdc:Ma.nullish(),realized_payout_usdc:Ma.nullish(),total_cost_usdc:Ma.nullish(),status:V,redeemable:z$1.boolean(),first_entry_at:la,resolved_at:la.nullish(),updated_at:la.optional(),legs_total:z$1.number().int(),legs_resolved:z$1.number().int(),legs_pending:z$1.number().int(),legs:z$1.array(z)}).transform(({combo_condition_id:e,combo_position_id:i,side:s,module_id:p,user_address:x,shares_balance:g,entry_avg_price_usdc:v,entry_cost_usdc:c,realized_payout_usdc:E,total_cost_usdc:u,first_entry_at:N,resolved_at:j,updated_at:U,legs_total:F,legs_resolved:Y,legs_pending:G,...K})=>({...K,conditionId:e,positionId:i,outcome:s,moduleId:p,wallet:x,shares:g,entryAvgPriceUsdc:v,entryCostUsdc:c,realizedPayoutUsdc:E,totalCostUsdc:u,firstEntryAt:N,resolvedAt:j,updatedAt:U,legsTotal:F,legsResolved:Y,legsPending:G})),Pe=z$1.object({combos:z$1.array(oe),pagination:z$1.object({limit:z$1.number().int(),offset:z$1.number().int(),has_more:z$1.boolean(),next_cursor:za.nullish()})}).transform(({pagination:e,...i})=>({...i,pagination:{limit:e.limit,offset:e.offset,hasMore:e.has_more,nextCursor:e.next_cursor}})),ze=z$1.array($),Me=z$1.array(q),De=z$1.array(J),ke=z$1.array(X);var H=(c=>(c.Split="SPLIT",c.Merge="MERGE",c.Convert="CONVERT",c.Compress="COMPRESS",c.Wrap="WRAP",c.Unwrap="UNWRAP",c.Redeem="REDEEM",c))(H||{}),ie=z$1.enum(H),ne=z$1.object({id:Y,type:ie,user_address:m,combo_condition_id:Z$1,combo_position_id:Aa,module_id:z$1.number().int(),amount_usdc:Ma.nullable(),payout_usdc:Ma.nullable(),timestamp:ca,tx_dttm:la,tx_hash:Ja,log_index:z$1.number().int(),block_number:z$1.number().int(),legs:z$1.array(z)}),se=ne.transform(me),y=z$1.preprocess(e=>e===""?void 0:e,z$1.string().optional()),re=z$1.object({proxyWallet:m.nullish(),side:P.nullish(),asset:Ha.nullish(),conditionId:_$1.nullish(),size:Ma.nullish(),price:Ma.nullish(),timestamp:ca.nullish(),title:z$1.string().nullish(),slug:z$1.string().nullish(),icon:z$1.preprocess(Pa,z$1.string().nullish()),eventSlug:z$1.string().nullish(),outcome:z$1.string().nullish(),outcomeIndex:z$1.number().int().nullish(),name:z$1.string().nullish(),pseudonym:z$1.string().nullish(),bio:z$1.string().nullish(),profileImage:z$1.string().nullish(),profileImageOptimized:z$1.string().nullish(),transactionHash:z$1.string().nullish()}).transform(({asset:e,proxyWallet:i,...s})=>({...s,wallet:i,tokenId:e})),le=z$1.object({proxyWallet:m.nullish(),timestamp:ca.nullish(),conditionId:z$1.preprocess(e=>e===""?void 0:e,z$1.string().optional()),type:O,size:Ma.nullish(),usdcSize:Ma.nullish(),transactionHash:Ja.nullish(),price:Ma.nullish(),asset:z$1.preprocess(e=>e===""?void 0:e,z$1.string().optional()),side:z$1.preprocess(e=>e===""?void 0:e,P.nullish()),isCombo:z$1.boolean().optional(),outcomeIndex:z$1.preprocess(e=>e===999?void 0:e,z$1.number().int().optional()),title:y,slug:y,icon:y,eventSlug:y,outcome:y,name:y,pseudonym:y,bio:y,profileImage:y,profileImageOptimized:y}),ae=le.transform(ce),He=z$1.object({user:m.nullish(),traded:z$1.number().int().nullish()}),Ne=z$1.array(re),je=z$1.array(ae),Ue=z$1.object({activity:z$1.array(se),pagination:z$1.object({limit:z$1.number().int(),offset:z$1.number().int(),has_more:z$1.boolean(),next_cursor:za.nullish()})}).transform(({pagination:e,...i})=>({...i,pagination:{limit:e.limit,offset:e.offset,hasMore:e.has_more,nextCursor:e.next_cursor}}));function me(e){let i=pe(e);switch(e.type){case "SPLIT":return {...i,type:"SPLIT"};case "MERGE":return {...i,type:"MERGE"};case "CONVERT":return {...i,type:"CONVERT"};case "COMPRESS":return {...i,type:"COMPRESS"};case "WRAP":return {...i,type:"WRAP"};case "UNWRAP":return {...i,type:"UNWRAP"};case "REDEEM":return {...i,type:"REDEEM",positionId:e.combo_position_id,payout:e.payout_usdc}}}function pe(e){return {id:e.id,type:e.type,wallet:e.user_address,conditionId:e.combo_condition_id,moduleId:e.module_id,amount:e.amount_usdc,timestamp:e.timestamp,transactionAt:e.tx_dttm,transactionHash:e.tx_hash,logIndex:e.log_index,blockNumber:e.block_number,legs:e.legs}}function ce(e){let i=de(e);switch(e.type){case "TRADE":return ue(e,i);case "SPLIT":case "MERGE":case "REDEEM":case "CONVERSION":return {...i,type:e.type,conditionId:_$1.parse(l(e.conditionId,"conditionId")),amount:M(e),title:l(e.title,"title"),slug:l(e.slug,"slug"),icon:e.icon??null,eventSlug:l(e.eventSlug,"eventSlug")};case "REWARD":case "MAKER_REBATE":case "REFERRAL_REWARD":case "YIELD":return {...i,type:e.type,amount:M(e)}}}function ue(e,i){let s={...i,type:"TRADE",side:l(e.side,"side"),shares:l(e.size,"size"),amount:M(e),price:l(e.price,"price"),title:l(e.title,"title"),icon:e.icon??null};return e.isCombo===true?{...s,isCombo:true,conditionId:Z$1.parse(l(e.conditionId,"conditionId")),positionId:Aa.parse(l(e.asset,"asset"))}:{...s,isCombo:false,conditionId:_$1.parse(l(e.conditionId,"conditionId")),tokenId:Ha.parse(l(e.asset,"asset")),outcome:l(e.outcome,"outcome"),outcomeIndex:l(e.outcomeIndex,"outcomeIndex"),slug:l(e.slug,"slug"),eventSlug:l(e.eventSlug,"eventSlug")}}function de(e){return {wallet:l(e.proxyWallet,"proxyWallet"),timestamp:l(e.timestamp,"timestamp"),transactionHash:l(e.transactionHash,"transactionHash"),name:e.name??null,pseudonym:e.pseudonym??null,bio:e.bio??null,profileImage:e.profileImage??null,profileImageOptimized:e.profileImageOptimized??null}}function M(e){return l(e.usdcSize??e.size,"usdcSize")}function l(e,i){if(e==null)throw new TypeError(`Expected activity.${i} to be present`);return e}var he=z$1.object({proxyWallet:m.nullish(),bio:z$1.string().nullish(),asset:Ha.nullish(),pseudonym:z$1.string().nullish(),amount:Ma.nullish(),displayUsernamePublic:z$1.boolean().nullish(),outcomeIndex:z$1.number().int().nullish(),name:z$1.string().nullish(),profileImage:z$1.string().nullish(),profileImageOptimized:z$1.string().nullish()}).transform(({asset:e,proxyWallet:i,...s})=>({...s,wallet:i,tokenId:e})),ye=z$1.object({token:z$1.string().nullish(),holders:z$1.array(he).nullish()}),ge=z$1.object({market:T.nullish(),value:Ma.nullish()}),be=z$1.object({market:T.nullish(),value:Ma.nullish()}),Se=z$1.object({total:Ma.nullish(),markets:z$1.array(be).nullish()}),Ze=z$1.array(ye),$e=z$1.array(ge),qe=z$1.array(Se);var fe=z$1.object({rank:z$1.string().nullish(),builder:z$1.string().nullish(),volume:Ma.nullish(),activeUsers:z$1.number().int().nullish(),verified:z$1.boolean().nullish(),builderLogo:z$1.string().nullish()}),Ae=z$1.object({dt:la.nullish(),builder:z$1.string().nullish(),builderLogo:z$1.string().nullish(),verified:z$1.boolean().nullish(),volume:Ma.nullish(),activeUsers:z$1.number().int().nullish(),rank:z$1.string().nullish()}).transform(({dt:e,...i})=>({...i,bucketAt:e})),xe=z$1.object({rank:z$1.string().nullish(),proxyWallet:m.nullish(),userName:z$1.string().nullish(),vol:Ma.nullish(),pnl:Ma.nullish(),profileImage:z$1.string().nullish(),xUsername:z$1.string().nullish(),verifiedBadge:z$1.boolean().nullish()}).transform(({proxyWallet:e,...i})=>({...i,wallet:e})),tt=z$1.array(fe),ot=z$1.array(Ae),it=z$1.array(xe);export{ae as ActivitySchema,_ as ActivityType,O as ActivityTypeSchema,m as AddressSchema,Ae as BuilderVolumeEntrySchema,q as ClosedPositionSchema,se as ComboActivitySchema,H as ComboActivityType,z as ComboPositionLegSchema,ee as ComboPositionMarketEventSchema,te as ComboPositionMarketSchema,W as ComboPositionOutcome,Z as ComboPositionOutcomeSchema,oe as ComboPositionSchema,w as ComboPositionStatus,V as ComboPositionStatusSchema,qe as FetchEventLiveVolumeResponseSchema,De as FetchPortfolioValueResponseSchema,T as Hash64Schema,he as HolderSchema,Ie as LeaderboardCategorySchema,fe as LeaderboardEntrySchema,ve as LeaderboardOrderBySchema,je as ListActivityResponseSchema,tt as ListBuilderLeaderboardResponseSchema,ot as ListBuilderVolumeResponseSchema,Me as ListClosedPositionsResponseSchema,Ue as ListComboActivityResponseSchema,Pe as ListComboPositionsResponseSchema,Ze as ListMarketHoldersResponseSchema,ke as ListMarketPositionsResponseSchema,$e as ListOpenInterestResponseSchema,ze as ListPositionsResponseSchema,it as ListTraderLeaderboardResponseSchema,Ne as ListTradesResponseSchema,Se as LiveVolumeSchema,Q as MarketPositionSchema,be as MarketVolumeSchema,ye as MetaHolderSchema,X as MetaMarketPositionSchema,ge as OpenInterestSchema,$ as PositionSchema,P as SideSchema,Re as TimePeriodSchema,re as TradeSchema,He as TradedSchema,xe as TraderLeaderboardEntrySchema,J as ValueSchema};//# sourceMappingURL=index.js.map
|
|
1
|
+
import {_ as _$1,na,Ia,Qa,Na,oa,ca,ma,Ba,Z as Z$1,Aa,Ka,Y}from'../chunk-6TO35A2S.js';import {z as z$1}from'zod';var m=z$1.string(),L=z$1.string(),_=(p=>(p.TRADE="TRADE",p.SPLIT="SPLIT",p.MERGE="MERGE",p.REDEEM="REDEEM",p.REWARD="REWARD",p.CONVERSION="CONVERSION",p.MAKER_REBATE="MAKER_REBATE",p.REFERRAL_REWARD="REFERRAL_REWARD",p.YIELD="YIELD",p.DEPOSIT="DEPOSIT",p.WITHDRAWAL="WITHDRAWAL",p.TAKER_REBATE="TAKER_REBATE",p))(_||{}),O=z$1.enum(_),P=z$1.enum(["BUY","SELL"]),Ce=z$1.enum(["DAY","WEEK","MONTH","ALL"]),Ie=z$1.enum(["OVERALL","POLITICS","SPORTS","CRYPTO","CULTURE","MENTIONS","WEATHER","ECONOMICS","TECH","FINANCE"]),ve=z$1.enum(["PNL","VOL"]);var w=(g=>(g.Open="OPEN",g.Partial="PARTIAL",g.ResolvedPartial="RESOLVED_PARTIAL",g.ResolvedWin="RESOLVED_WIN",g.ResolvedLoss="RESOLVED_LOSS",g))(w||{}),W=z$1.enum(w),V=(s=>(s.Yes="YES",s.No="NO",s))(V||{}),Z=z$1.enum(V),$=z$1.object({proxyWallet:m.nullish(),asset:Ia.nullish(),conditionId:_$1,size:Na.nullish(),avgPrice:Na.nullish(),initialValue:Na.nullish(),currentValue:Na.nullish(),cashPnl:Na.nullish(),percentPnl:z$1.number().nullish(),totalBought:Na.nullish(),realizedPnl:Na.nullish(),percentRealizedPnl:z$1.number().nullish(),curPrice:Na.nullish(),redeemable:z$1.boolean().nullish(),mergeable:z$1.boolean().nullish(),title:z$1.string().nullish(),slug:z$1.string().nullish(),icon:z$1.preprocess(Qa,z$1.string().nullish()),eventId:z$1.string().nullish(),eventSlug:z$1.string().nullish(),outcome:z$1.string().nullish(),outcomeIndex:z$1.number().int().nullish(),oppositeOutcome:z$1.string().nullish(),oppositeAsset:Ia.nullish(),endDate:na.nullish(),negativeRisk:z$1.boolean().nullish()}).transform(({asset:e,oppositeAsset:i,proxyWallet:s,...c})=>({...c,wallet:s,tokenId:e,oppositeTokenId:i})),q=z$1.object({proxyWallet:m.nullish(),asset:Ia.nullish(),conditionId:_$1.nullish(),avgPrice:Na.nullish(),totalBought:Na.nullish(),realizedPnl:Na.nullish(),curPrice:Na.nullish(),timestamp:ca.nullish(),title:z$1.string().nullish(),slug:z$1.string().nullish(),icon:z$1.preprocess(Qa,z$1.string().nullish()),eventSlug:z$1.string().nullish(),outcome:z$1.string().nullish(),outcomeIndex:z$1.number().int().nullish(),oppositeOutcome:z$1.string().nullish(),oppositeAsset:Ia.nullish(),endDate:oa.nullish()}).transform(({asset:e,oppositeAsset:i,proxyWallet:s,...c})=>({...c,wallet:s,tokenId:e,oppositeTokenId:i})),J=z$1.object({user:m.nullish(),value:Na.nullish()}),Q=z$1.object({proxyWallet:m.nullish(),name:z$1.string().nullish(),profileImage:z$1.string().nullish(),verified:z$1.boolean().nullish(),asset:Ia.nullish(),conditionId:_$1.nullish(),avgPrice:Na.nullish(),size:Na.nullish(),currPrice:Na.nullish(),currentValue:Na.nullish(),cashPnl:Na.nullish(),totalBought:Na.nullish(),realizedPnl:Na.nullish(),totalPnl:Na.nullish(),outcome:z$1.string().nullish(),outcomeIndex:z$1.number().int().nullish()}).transform(({asset:e,proxyWallet:i,...s})=>({...s,wallet:i,tokenId:e})),X=z$1.object({token:z$1.string().nullish(),positions:z$1.array(Q).nullish()}),ee=z$1.object({event_id:z$1.string().nullish(),event_slug:z$1.string().nullish(),event_title:z$1.string().nullish(),event_image:z$1.string().nullish()}).transform(({event_id:e,event_slug:i,event_title:s,event_image:c})=>({eventId:e,eventSlug:i,eventTitle:s,eventImage:c})),te=z$1.object({market_id:z$1.string().nullish(),slug:z$1.string().nullish(),title:z$1.string().nullish(),outcome:z$1.string().nullish(),image_url:z$1.string().nullish(),icon_url:z$1.string().nullish(),category:z$1.string().nullish(),subcategory:z$1.string().nullish(),tags:z$1.array(z$1.string()).nullish(),end_date:ma.nullish(),event:ee.nullish()}).transform(({market_id:e,image_url:i,icon_url:s,end_date:c,...x})=>({...x,marketId:e,imageUrl:i,iconUrl:s,endDate:c})),z=z$1.object({leg_index:z$1.number().int(),leg_position_id:Ba,leg_condition_id:_$1,leg_outcome_index:z$1.number().int(),leg_outcome_label:z$1.string().nullish(),leg_status:W,leg_resolved_at:ma.nullish(),leg_current_price:Na.nullish(),market:te.nullish()}).transform(({leg_index:e,leg_position_id:i,leg_condition_id:s,leg_outcome_index:c,leg_outcome_label:x,leg_status:g,leg_resolved_at:v,leg_current_price:u,...E})=>({...E,legIndex:e,legPositionId:i,legConditionId:s,legOutcomeIndex:c,legOutcomeLabel:x,legStatus:g,legResolvedAt:v,legCurrentPrice:u})),oe=z$1.object({combo_condition_id:Z$1,combo_position_id:Ba,side:Z,module_id:z$1.number().int(),user_address:m,shares_balance:Na,entry_avg_price_usdc:Na.nullish(),entry_cost_usdc:Na.nullish(),realized_payout_usdc:Na.nullish(),total_cost_usdc:Na.nullish(),status:W,redeemable:z$1.boolean(),first_entry_at:ma,resolved_at:ma.nullish(),updated_at:ma.optional(),legs_total:z$1.number().int(),legs_resolved:z$1.number().int(),legs_pending:z$1.number().int(),legs:z$1.array(z)}).transform(({combo_condition_id:e,combo_position_id:i,side:s,module_id:c,user_address:x,shares_balance:g,entry_avg_price_usdc:v,entry_cost_usdc:u,realized_payout_usdc:E,total_cost_usdc:N,first_entry_at:j,resolved_at:U,updated_at:p,legs_total:F,legs_resolved:Y,legs_pending:K,...G})=>({...G,conditionId:e,positionId:i,outcome:s,moduleId:c,wallet:x,shares:g,entryAvgPriceUsdc:v,entryCostUsdc:u,realizedPayoutUsdc:E,totalCostUsdc:N,firstEntryAt:j,resolvedAt:U,updatedAt:p,legsTotal:F,legsResolved:Y,legsPending:K})),Pe=z$1.object({combos:z$1.array(oe),pagination:z$1.object({limit:z$1.number().int(),offset:z$1.number().int(),has_more:z$1.boolean(),next_cursor:Aa.nullish()})}).transform(({pagination:e,...i})=>({...i,pagination:{limit:e.limit,offset:e.offset,hasMore:e.has_more,nextCursor:e.next_cursor}})),ze=z$1.array($),De=z$1.array(q),Me=z$1.array(J),ke=z$1.array(X);var H=(u=>(u.Split="SPLIT",u.Merge="MERGE",u.Convert="CONVERT",u.Compress="COMPRESS",u.Wrap="WRAP",u.Unwrap="UNWRAP",u.Redeem="REDEEM",u))(H||{}),ie=z$1.enum(H),ne=z$1.object({id:Y,type:ie,user_address:m,combo_condition_id:Z$1,combo_position_id:Ba,module_id:z$1.number().int(),amount_usdc:Na.nullable(),payout_usdc:Na.nullable(),timestamp:ca,tx_dttm:ma,tx_hash:Ka,log_index:z$1.number().int(),block_number:z$1.number().int(),legs:z$1.array(z)}),se=ne.transform(me),y=z$1.preprocess(e=>e===""?void 0:e,z$1.string().optional()),re=z$1.object({proxyWallet:m.nullish(),side:P.nullish(),asset:Ia.nullish(),conditionId:_$1.nullish(),size:Na.nullish(),price:Na.nullish(),timestamp:ca.nullish(),title:z$1.string().nullish(),slug:z$1.string().nullish(),icon:z$1.preprocess(Qa,z$1.string().nullish()),eventSlug:z$1.string().nullish(),outcome:z$1.string().nullish(),outcomeIndex:z$1.number().int().nullish(),name:z$1.string().nullish(),pseudonym:z$1.string().nullish(),bio:z$1.string().nullish(),profileImage:z$1.string().nullish(),profileImageOptimized:z$1.string().nullish(),transactionHash:z$1.string().nullish()}).transform(({asset:e,proxyWallet:i,...s})=>({...s,wallet:i,tokenId:e})),le=z$1.object({proxyWallet:m.nullish(),timestamp:ca.nullish(),conditionId:z$1.preprocess(e=>e===""?void 0:e,z$1.string().optional()),type:O,size:Na.nullish(),usdcSize:Na.nullish(),transactionHash:Ka.nullish(),price:Na.nullish(),asset:z$1.preprocess(e=>e===""?void 0:e,z$1.string().optional()),side:z$1.preprocess(e=>e===""?void 0:e,P.nullish()),isCombo:z$1.boolean().optional(),outcomeIndex:z$1.preprocess(e=>e===999?void 0:e,z$1.number().int().optional()),title:y,slug:y,icon:y,eventSlug:y,outcome:y,name:y,pseudonym:y,bio:y,profileImage:y,profileImageOptimized:y}),ae=le.transform(ce),He=z$1.object({user:m.nullish(),traded:z$1.number().int().nullish()}),Ne=z$1.array(re),je=z$1.array(ae),Ue=z$1.object({activity:z$1.array(se),pagination:z$1.object({limit:z$1.number().int(),offset:z$1.number().int(),has_more:z$1.boolean(),next_cursor:Aa.nullish()})}).transform(({pagination:e,...i})=>({...i,pagination:{limit:e.limit,offset:e.offset,hasMore:e.has_more,nextCursor:e.next_cursor}}));function me(e){let i=pe(e);switch(e.type){case "SPLIT":return {...i,type:"SPLIT"};case "MERGE":return {...i,type:"MERGE"};case "CONVERT":return {...i,type:"CONVERT"};case "COMPRESS":return {...i,type:"COMPRESS"};case "WRAP":return {...i,type:"WRAP"};case "UNWRAP":return {...i,type:"UNWRAP"};case "REDEEM":return {...i,type:"REDEEM",positionId:e.combo_position_id,payout:e.payout_usdc}}}function pe(e){return {id:e.id,type:e.type,wallet:e.user_address,conditionId:e.combo_condition_id,moduleId:e.module_id,amount:e.amount_usdc,timestamp:e.timestamp,transactionAt:e.tx_dttm,transactionHash:e.tx_hash,logIndex:e.log_index,blockNumber:e.block_number,legs:e.legs}}function ce(e){let i=de(e);switch(e.type){case "TRADE":return ue(e,i);case "SPLIT":case "MERGE":case "REDEEM":case "CONVERSION":return {...i,type:e.type,conditionId:_$1.parse(l(e.conditionId,"conditionId")),amount:D(e),title:l(e.title,"title"),slug:l(e.slug,"slug"),icon:e.icon??null,eventSlug:l(e.eventSlug,"eventSlug")};case "REWARD":case "MAKER_REBATE":case "REFERRAL_REWARD":case "YIELD":case "DEPOSIT":case "WITHDRAWAL":case "TAKER_REBATE":return {...i,type:e.type,amount:D(e)}}}function ue(e,i){let s={...i,type:"TRADE",side:l(e.side,"side"),shares:l(e.size,"size"),amount:D(e),price:l(e.price,"price"),title:l(e.title,"title"),icon:e.icon??null};return e.isCombo===true?{...s,isCombo:true,conditionId:Z$1.parse(l(e.conditionId,"conditionId")),positionId:Ba.parse(l(e.asset,"asset"))}:{...s,isCombo:false,conditionId:_$1.parse(l(e.conditionId,"conditionId")),tokenId:Ia.parse(l(e.asset,"asset")),outcome:l(e.outcome,"outcome"),outcomeIndex:l(e.outcomeIndex,"outcomeIndex"),slug:l(e.slug,"slug"),eventSlug:l(e.eventSlug,"eventSlug")}}function de(e){return {wallet:l(e.proxyWallet,"proxyWallet"),timestamp:l(e.timestamp,"timestamp"),transactionHash:l(e.transactionHash,"transactionHash"),name:e.name??null,pseudonym:e.pseudonym??null,bio:e.bio??null,profileImage:e.profileImage??null,profileImageOptimized:e.profileImageOptimized??null}}function D(e){return l(e.usdcSize??e.size,"usdcSize")}function l(e,i){if(e==null)throw new TypeError(`Expected activity.${i} to be present`);return e}var he=z$1.object({proxyWallet:m.nullish(),bio:z$1.string().nullish(),asset:Ia.nullish(),pseudonym:z$1.string().nullish(),amount:Na.nullish(),displayUsernamePublic:z$1.boolean().nullish(),outcomeIndex:z$1.number().int().nullish(),name:z$1.string().nullish(),profileImage:z$1.string().nullish(),profileImageOptimized:z$1.string().nullish()}).transform(({asset:e,proxyWallet:i,...s})=>({...s,wallet:i,tokenId:e})),ye=z$1.object({token:z$1.string().nullish(),holders:z$1.array(he).nullish()}),ge=z$1.object({market:L.nullish(),value:Na.nullish()}),be=z$1.object({market:L.nullish(),value:Na.nullish()}),Se=z$1.object({total:Na.nullish(),markets:z$1.array(be).nullish()}),Ze=z$1.array(ye),$e=z$1.array(ge),qe=z$1.array(Se);var Ae=z$1.object({rank:z$1.string().nullish(),builder:z$1.string().nullish(),volume:Na.nullish(),activeUsers:z$1.number().int().nullish(),verified:z$1.boolean().nullish(),builderLogo:z$1.string().nullish()}),fe=z$1.object({dt:ma.nullish(),builder:z$1.string().nullish(),builderLogo:z$1.string().nullish(),verified:z$1.boolean().nullish(),volume:Na.nullish(),activeUsers:z$1.number().int().nullish(),rank:z$1.string().nullish()}).transform(({dt:e,...i})=>({...i,bucketAt:e})),xe=z$1.object({rank:z$1.string().nullish(),proxyWallet:m.nullish(),userName:z$1.string().nullish(),vol:Na.nullish(),pnl:Na.nullish(),profileImage:z$1.string().nullish(),xUsername:z$1.string().nullish(),verifiedBadge:z$1.boolean().nullish()}).transform(({proxyWallet:e,...i})=>({...i,wallet:e})),tt=z$1.array(Ae),ot=z$1.array(fe),it=z$1.array(xe);export{ae as ActivitySchema,_ as ActivityType,O as ActivityTypeSchema,m as AddressSchema,fe as BuilderVolumeEntrySchema,q as ClosedPositionSchema,se as ComboActivitySchema,H as ComboActivityType,z as ComboPositionLegSchema,ee as ComboPositionMarketEventSchema,te as ComboPositionMarketSchema,V as ComboPositionOutcome,Z as ComboPositionOutcomeSchema,oe as ComboPositionSchema,w as ComboPositionStatus,W as ComboPositionStatusSchema,qe as FetchEventLiveVolumeResponseSchema,Me as FetchPortfolioValueResponseSchema,L as Hash64Schema,he as HolderSchema,Ie as LeaderboardCategorySchema,Ae as LeaderboardEntrySchema,ve as LeaderboardOrderBySchema,je as ListActivityResponseSchema,tt as ListBuilderLeaderboardResponseSchema,ot as ListBuilderVolumeResponseSchema,De as ListClosedPositionsResponseSchema,Ue as ListComboActivityResponseSchema,Pe as ListComboPositionsResponseSchema,Ze as ListMarketHoldersResponseSchema,ke as ListMarketPositionsResponseSchema,$e as ListOpenInterestResponseSchema,ze as ListPositionsResponseSchema,it as ListTraderLeaderboardResponseSchema,Ne as ListTradesResponseSchema,Se as LiveVolumeSchema,Q as MarketPositionSchema,be as MarketVolumeSchema,ye as MetaHolderSchema,X as MetaMarketPositionSchema,ge as OpenInterestSchema,$ as PositionSchema,P as SideSchema,Ce as TimePeriodSchema,re as TradeSchema,He as TradedSchema,xe as TraderLeaderboardEntrySchema,J as ValueSchema};//# sourceMappingURL=index.js.map
|
|
2
2
|
//# sourceMappingURL=index.js.map
|
package/dist/data/index.js.map
CHANGED
|
@@ -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,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A,EAAO,CAAE,OAAA,EACnB,CAAC,CAAA,CACA,SAAA,CAAU,CAAC,CAAE,EAAA,CAAA8G,CAAAA,CAAI,GAAGzF,CAAK,CAAA,IAAO,CAC/B,GAAGA,CAAAA,CACH,SAAUyF,CACZ,CAAA,CAAE,CAAA,CAESC,EAAAA,CAA+B/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 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
|
+
{"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,MAAQ,OAAA,CACRA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eA,GAAAA,CAAE,OAAA,EAAQ,CAAE,OAAA,EAC7B,CAAC,CAAA,CACA,UAAU,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 DEPOSIT = 'DEPOSIT',\n WITHDRAWAL = 'WITHDRAWAL',\n TAKER_REBATE = 'TAKER_REBATE',\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 DepositActivity = ActivityBase & {\n /** An account-level deposit credit. */\n type: 'DEPOSIT';\n /** The deposit amount credited to the wallet in USD. */\n amount: DecimalString;\n};\n\nexport type WithdrawalActivity = ActivityBase & {\n /** An account-level withdrawal debit. */\n type: 'WITHDRAWAL';\n /** The withdrawal amount debited from the wallet in USD. */\n amount: DecimalString;\n};\n\nexport type TakerRebateActivity = ActivityBase & {\n /** An account-level taker rebate credit. */\n type: 'TAKER_REBATE';\n /** The taker rebate 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 | DepositActivity\n | WithdrawalActivity\n | TakerRebateActivity;\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 case ActivityType.DEPOSIT:\n case ActivityType.WITHDRAWAL:\n case ActivityType.TAKER_REBATE:\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"]}
|
package/dist/gamma/index.js
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import {a,F,e,t,s,r}from'../chunk-
|
|
1
|
+
import {a,F,e,t,s,r}from'../chunk-GJX3FYFG.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-GJX3FYFG.js';import {z as z$2,ma,Ka,aa,Ca,ka,Ha}from'../chunk-6TO35A2S.js';export{Ha as TagIdSchema}from'../chunk-6TO35A2S.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:Ca.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:aa.nullish(),negRiskRequestId:z$1.string().nullish(),txHash:Ka.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:aa.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:Ha,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
|
@@ -131,6 +131,7 @@ declare const EpochMillisecondsStringSchema: z.ZodPipe<z.ZodString, z.ZodTransfo
|
|
|
131
131
|
declare const DateLikeToIsoDateTimeStringSchema: z.ZodUnion<readonly [z.ZodPipe<z.ZodUnion<readonly [z.ZodNumber, z.ZodPipe<z.ZodString, z.ZodTransform<number, string>>]>, z.ZodTransform<IsoDateTimeString, number>>, z.ZodPipe<z.ZodString, z.ZodTransform<IsoDateTimeString, string>>]>;
|
|
132
132
|
declare const EpochLikeToIsoDateTimeStringSchema: z.ZodUnion<readonly [z.ZodPipe<z.ZodUnion<readonly [z.ZodNumber, z.ZodPipe<z.ZodString, z.ZodTransform<number, string>>]>, z.ZodTransform<IsoDateTimeString, number>>, z.ZodPipe<z.ZodString, z.ZodTransform<IsoDateTimeString, string>>]>;
|
|
133
133
|
declare const OptionalDateLikeToIsoDateTimeStringSchema: z.ZodUnion<readonly [z.ZodPipe<z.ZodUnion<readonly [z.ZodNumber, z.ZodPipe<z.ZodString, z.ZodTransform<number, string>>]>, z.ZodTransform<IsoDateTimeString | undefined, number>>, z.ZodPipe<z.ZodString, z.ZodTransform<IsoDateTimeString, string>>]>;
|
|
134
|
+
declare const OptionalEpochLikeToIsoDateTimeStringSchema: z.ZodUnion<readonly [z.ZodPipe<z.ZodUnion<readonly [z.ZodNumber, z.ZodPipe<z.ZodString, z.ZodTransform<number, string>>]>, z.ZodTransform<IsoDateTimeString | undefined, number>>, z.ZodPipe<z.ZodString, z.ZodTransform<IsoDateTimeString, string>>]>;
|
|
134
135
|
declare const EpochMillisecondsToIsoDateTimeStringSchema: z.ZodUnion<readonly [z.ZodPipe<z.ZodUnion<readonly [z.ZodNumber, z.ZodPipe<z.ZodString, z.ZodTransform<number, string>>]>, z.ZodTransform<IsoDateTimeString, number>>, z.ZodPipe<z.ZodString, z.ZodTransform<IsoDateTimeString, string>>]>;
|
|
135
136
|
declare const OptionalEpochMillisecondsToIsoDateTimeStringSchema: z.ZodUnion<readonly [z.ZodPipe<z.ZodUnion<readonly [z.ZodNumber, z.ZodPipe<z.ZodString, z.ZodTransform<number, string>>]>, z.ZodTransform<IsoDateTimeString | undefined, number>>, z.ZodPipe<z.ZodString, z.ZodTransform<IsoDateTimeString, string>>]>;
|
|
136
137
|
declare const EventIdSchema: z.ZodPipe<z.ZodUnion<readonly [z.ZodString, z.ZodPipe<z.ZodNumber, z.ZodTransform<string, number>>]>, z.ZodTransform<EventId, string>>;
|
|
@@ -182,4 +183,4 @@ declare function emptyStringToNull(value: unknown): unknown;
|
|
|
182
183
|
*/
|
|
183
184
|
declare const OptionalDecimalStringSchema: z.ZodPipe<z.ZodTransform<unknown, unknown>, z.ZodOptional<z.ZodNullable<z.ZodPipe<z.ZodString, z.ZodTransform<DecimalString, string>>>>>;
|
|
184
185
|
|
|
185
|
-
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 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, OptionalCtfConditionIdSchema, OptionalDateLikeToIsoDateTimeStringSchema, OptionalDecimalStringSchema, OptionalEpochMillisecondsToIsoDateTimeStringSchema, type OrderId, OrderIdSchema, 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, TradeStatus, TradeStatusSchema, type TransactionId, TransactionIdSchema, TxHashSchema, type Uuid, emptyStringToNull, toApiKey, toBaseUnits, toBestLineId, toBuilderCode, toCategoryId, toChatId, toClobRewardId, toCollectionId, toComboActivityId, toComboConditionId, toCommentId, toCtfConditionId, toDecimalString, toEpochMilliseconds, toEventCreatorId, toEventExternalPartnerMappingId, toEventId, toImageOptimizationId, toInternalUserId, toIsoCalendarDateString, toIsoDateTimeString, toMarketId, toMixedDateTimeString, toNotificationId, toOrderId, toPaginationCursor, toPartnerId, toPositionId, toQuestionId, toResolutionRequestId, toRfqId, toRfqQuoteId, toRfqRequestorPublicId, toSeriesId, toSportId, toTagId, toTeamId, toTemplateId, toTokenId, toTransactionId, toUuid };
|
|
186
|
+
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 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, OptionalCtfConditionIdSchema, OptionalDateLikeToIsoDateTimeStringSchema, OptionalDecimalStringSchema, OptionalEpochLikeToIsoDateTimeStringSchema, OptionalEpochMillisecondsToIsoDateTimeStringSchema, type OrderId, OrderIdSchema, 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, TradeStatus, TradeStatusSchema, type TransactionId, TransactionIdSchema, TxHashSchema, type Uuid, emptyStringToNull, toApiKey, toBaseUnits, toBestLineId, toBuilderCode, toCategoryId, toChatId, toClobRewardId, toCollectionId, toComboActivityId, toComboConditionId, toCommentId, toCtfConditionId, toDecimalString, toEpochMilliseconds, toEventCreatorId, toEventExternalPartnerMappingId, toEventId, toImageOptimizationId, toInternalUserId, toIsoCalendarDateString, toIsoDateTimeString, toMarketId, toMixedDateTimeString, toNotificationId, toOrderId, 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{U as ApiKeySchema,
|
|
1
|
+
export{U as ApiKeySchema,Pa as BaseUnitsSchema,V as BuilderCodeSchema,T as CategoryIdSchema,W as ClobRewardIdSchema,Y as ComboActivityIdSchema,Z as ComboConditionIdSchema,X as CommentIdSchema,a as CommentParentEntityType,va as CommentParentEntityTypeSchema,_ as CtfConditionIdSchema,ea as DateLikeToIsoDateTimeStringSchema,La as DecimalStringSchema,Na as DecimalishSchema,Ma as E6BigIntStringToDecimalStringSchema,fa as EpochLikeToIsoDateTimeStringSchema,ba as EpochMillisecondsSchema,da as EpochMillisecondsStringSchema,ia as EpochMillisecondsToIsoDateTimeStringSchema,ca as EpochSecondsToMillisecondsSchema,ka as EventIdSchema,aa 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,$ as OptionalCtfConditionIdSchema,ga as OptionalDateLikeToIsoDateTimeStringSchema,Ra as OptionalDecimalStringSchema,ha as OptionalEpochLikeToIsoDateTimeStringSchema,ja as OptionalEpochMillisecondsToIsoDateTimeStringSchema,wa as OrderIdSchema,b as OrderSide,xa as OrderSideSchema,c as OrderType,ya as OrderTypeSchema,Aa as PaginationCursorSchema,Ba as PositionIdSchema,Oa as PositiveDecimalNumberSchema,Ca as QuestionIdSchema,Da as ResolutionRequestIdSchema,Ea as RfqIdSchema,Fa as RfqQuoteIdSchema,Ga as RfqRequestorPublicIdSchema,Ha as TagIdSchema,la as TickSizeValueSchema,Ia as TokenIdSchema,d as TradeStatus,za as TradeStatusSchema,Ja as TransactionIdSchema,Ka as TxHashSchema,Qa as emptyStringToNull,h as toApiKey,S as toBaseUnits,e as toBestLineId,f as toBuilderCode,i as toCategoryId,j as toChatId,k as toClobRewardId,p as toCollectionId,m as toComboActivityId,o as toComboConditionId,l as toCommentId,n as toCtfConditionId,R 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,B as toOrderId,D as toPaginationCursor,C as toPartnerId,E as toPositionId,F as toQuestionId,G as toResolutionRequestId,H as toRfqId,I as toRfqQuoteId,J as toRfqRequestorPublicId,K as toSeriesId,L as toSportId,M as toTagId,N as toTeamId,O as toTemplateId,Q as toTokenId,P as toTransactionId,g as toUuid}from'./chunk-6TO35A2S.js';//# sourceMappingURL=index.js.map
|
|
2
2
|
//# sourceMappingURL=index.js.map
|
package/dist/perps/index.js
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
export{X as FetchPerpsAccountConfigResponseSchema,O as FetchPerpsAccountStatsResponseSchema,M as FetchPerpsBalancesResponseSchema,Ka as FetchPerpsCandlesResponseSchema,Ja as FetchPerpsFeesResponseSchema,Fa as FetchPerpsFundingHistoryResponseSchema,oa as FetchPerpsInstrumentsResponseSchema,Wa as FetchPerpsOpenOrdersResponseSchema,Va as FetchPerpsOrdersResponseSchema,S as FetchPerpsPortfolioResponseSchema,ua as FetchPerpsStatisticsResponseSchema,qa as FetchPerpsTickersResponseSchema,Da as FetchPerpsTradesResponseSchema,fa as ListPerpsDepositsResponseSchema,Z as ListPerpsEquityHistoryResponseSchema,Za as ListPerpsFillsResponseSchema,U as ListPerpsFundingPaymentsResponseSchema,$ as ListPerpsPnlHistoryResponseSchema,ia as ListPerpsWithdrawalsResponseSchema,W as PerpsAccountConfigSchema,Ya as PerpsAccountFillSchema,_a 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,Sa as PerpsCancelAllOrdersResponseSchema,Ra as PerpsCancelOrderResultSchema,sa as PerpsCandleSchema,c as PerpsClientOrderIdSchema,Pa as PerpsCommandAckSchema,Oa 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,Ha as PerpsFeeScheduleEntrySchema,Ga as PerpsFeeTierSchema,Ia 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 PerpsKnownWithdrawalStatus,Q as PerpsMarginSummarySchema,b as PerpsOrderIdSchema,Ua as PerpsOrderSchema,La as PerpsOrderStatus,Na as PerpsOrderStatusSchema,Xa as PerpsOrderUpdateSchema,t as PerpsPnlInterval,E as PerpsPnlIntervalSchema,_ as PerpsPnlPointSchema,P as PerpsPortfolioPositionSchema,R as PerpsPortfolioSchema,Qa 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,Ma as PerpsTpSlOrderFieldsSchema,o as PerpsTpSlScope,z as PerpsTpSlScopeSchema,d as PerpsTradeIdSchema,G as PerpsTxHashSchema,Ta as PerpsUpdateLeverageResultSchema,ja as PerpsWithdrawResponseSchema,e as PerpsWithdrawalIdSchema,ha as PerpsWithdrawalSchema,B as PerpsWithdrawalStatusSchema,ka as PerpsWithdrawalUpdateSchema,K as decimalString,J as perpsBaseUnits,I as perpsDecimal}from'../chunk-
|
|
1
|
+
export{X as FetchPerpsAccountConfigResponseSchema,O as FetchPerpsAccountStatsResponseSchema,M as FetchPerpsBalancesResponseSchema,Ka as FetchPerpsCandlesResponseSchema,Ja as FetchPerpsFeesResponseSchema,Fa as FetchPerpsFundingHistoryResponseSchema,oa as FetchPerpsInstrumentsResponseSchema,Wa as FetchPerpsOpenOrdersResponseSchema,Va as FetchPerpsOrdersResponseSchema,S as FetchPerpsPortfolioResponseSchema,ua as FetchPerpsStatisticsResponseSchema,qa as FetchPerpsTickersResponseSchema,Da as FetchPerpsTradesResponseSchema,fa as ListPerpsDepositsResponseSchema,Z as ListPerpsEquityHistoryResponseSchema,Za as ListPerpsFillsResponseSchema,U as ListPerpsFundingPaymentsResponseSchema,$ as ListPerpsPnlHistoryResponseSchema,ia as ListPerpsWithdrawalsResponseSchema,W as PerpsAccountConfigSchema,Ya as PerpsAccountFillSchema,_a 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,Sa as PerpsCancelAllOrdersResponseSchema,Ra as PerpsCancelOrderResultSchema,sa as PerpsCandleSchema,c as PerpsClientOrderIdSchema,Pa as PerpsCommandAckSchema,Oa 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,Ha as PerpsFeeScheduleEntrySchema,Ga as PerpsFeeTierSchema,Ia 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 PerpsKnownWithdrawalStatus,Q as PerpsMarginSummarySchema,b as PerpsOrderIdSchema,Ua as PerpsOrderSchema,La as PerpsOrderStatus,Na as PerpsOrderStatusSchema,Xa as PerpsOrderUpdateSchema,t as PerpsPnlInterval,E as PerpsPnlIntervalSchema,_ as PerpsPnlPointSchema,P as PerpsPortfolioPositionSchema,R as PerpsPortfolioSchema,Qa 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,Ma as PerpsTpSlOrderFieldsSchema,o as PerpsTpSlScope,z as PerpsTpSlScopeSchema,d as PerpsTradeIdSchema,G as PerpsTxHashSchema,Ta as PerpsUpdateLeverageResultSchema,ja as PerpsWithdrawResponseSchema,e as PerpsWithdrawalIdSchema,ha as PerpsWithdrawalSchema,B as PerpsWithdrawalStatusSchema,ka as PerpsWithdrawalUpdateSchema,K as decimalString,J as perpsBaseUnits,I as perpsDecimal}from'../chunk-JRSTEY5H.js';import'../chunk-6TO35A2S.js';//# sourceMappingURL=index.js.map
|
|
2
2
|
//# sourceMappingURL=index.js.map
|
package/dist/relayer/index.js
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import {aa,
|
|
1
|
+
import {aa,Ja,Ka}from'../chunk-6TO35A2S.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:aa.optional(),operation:z.string().optional(),payment:z.string().optional(),paymentReceiver:aa.optional(),paymentToken:aa.optional(),refundReceiver:aa.optional(),relay:aa.optional(),relayHub:aa.optional(),relayerFee:z.string().optional(),safeTxnGas:z.string().optional()}),d=z.object({address:aa,nonce:z.string().min(1)}),R=z.object({data:z.string().min(1),from:aa,metadata:z.string().optional(),nonce:z.string().min(1).optional(),proxyWallet:aa,signature:z.string().min(1),signatureParams:y,to:aa,type:u,value:z.string().optional()}),T=z.object({data:z.string().min(1),target:aa,value:z.string().min(1)}),x=z.object({calls:z.array(T).min(1),deadline:z.string().min(1),depositWallet:aa}),S=z.object({depositWalletParams:x,from:aa,metadata:z.string().optional(),nonce:z.string().min(1),signature:z.string().min(1),to:aa,type:z.literal("WALLET")}),g=z.object({from:aa,metadata:z.string().optional(),to:aa,type:z.literal("WALLET-CREATE")}),W=z.union([R,S,g]),f=z.object({state:m,transactionHash:Ka.nullish().transform(a=>a??null),transactionID:Ja}).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(""),Ka]).transform(a=>a===""?null:a),transaction_id:Ja}).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
|