@polymarket/bindings 0.0.0-canary-20260421120448
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/LICENSE +21 -0
- package/README.md +31 -0
- package/dist/chunk-CH54ACHI.js +2 -0
- package/dist/chunk-CH54ACHI.js.map +1 -0
- package/dist/clob/index.d.ts +835 -0
- package/dist/clob/index.js +2 -0
- package/dist/clob/index.js.map +1 -0
- package/dist/data/index.d.ts +486 -0
- package/dist/data/index.js +2 -0
- package/dist/data/index.js.map +1 -0
- package/dist/gamma/index.d.ts +4977 -0
- package/dist/gamma/index.js +2 -0
- package/dist/gamma/index.js.map +1 -0
- package/dist/index.d.ts +82 -0
- package/dist/index.js +2 -0
- package/dist/index.js.map +1 -0
- package/dist/relayer/index.d.ts +86 -0
- package/dist/relayer/index.js +2 -0
- package/dist/relayer/index.js.map +1 -0
- package/package.json +66 -0
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
import {N as N$1,F as F$1,A,I as I$1,Q as Q$1,S as S$1,H as H$1}from'../chunk-CH54ACHI.js';import {z as z$1}from'zod';import {never}from'@polymarket/types';function S(t){return z$1.object({count:z$1.number(),data:z$1.array(t),limit:z$1.number(),next_cursor:z$1.string()})}var Oe=z$1.object({closed_only:z$1.boolean()}),D=z$1.object({asset_id:z$1.string(),associate_trades:z$1.array(z$1.string()),created_at:z$1.number(),expiration:z$1.string(),id:z$1.string(),maker_address:z$1.string(),market:z$1.string(),order_type:z$1.string(),original_size:z$1.string(),outcome:z$1.string(),owner:z$1.string(),price:z$1.string(),side:z$1.string(),size_matched:z$1.string(),status:z$1.string()}),be=S(D),K=z$1.object({asset_id:z$1.string(),fee_rate_bps:z$1.string(),maker_address:z$1.string(),matched_amount:z$1.string(),order_id:z$1.string(),outcome:z$1.string(),owner:z$1.string(),price:z$1.string(),side:z$1.string()}),U=z$1.object({asset_id:z$1.string(),bucket_index:z$1.number(),fee_rate_bps:z$1.string(),id:z$1.string(),last_update:z$1.string(),maker_address:z$1.string(),maker_orders:z$1.array(K),market:z$1.string(),match_time:z$1.string(),outcome:z$1.string(),owner:z$1.string(),price:z$1.string(),side:z$1.string(),size:z$1.string(),status:z$1.string(),taker_order_id:z$1.string(),trader_side:z$1.enum(["TAKER","MAKER"]),transaction_hash:z$1.string()}),ke=S(U),M=z$1.object({id:N$1,owner:z$1.string(),payload:z$1.unknown(),timestamp:z$1.string().or(z$1.number().int()),type:z$1.number()}),ze=z$1.array(M),k=(d=>(d.COLLATERAL="COLLATERAL",d.CONDITIONAL="CONDITIONAL",d))(k||{}),Ae=z$1.enum(k),Te=z$1.object({allowances:z$1.record(F$1,z$1.string().transform(BigInt)),balance:z$1.string()}),Ee=z$1.object({scoring:z$1.boolean()}),we=z$1.record(z$1.string(),z$1.boolean()),H=z$1.object({asset_address:z$1.string(),asset_rate:z$1.number(),condition_id:z$1.string(),date:z$1.string(),earnings:z$1.number(),maker_address:z$1.string()}),Pe=S(H),v=z$1.object({asset_address:z$1.string(),asset_rate:z$1.number(),date:z$1.string(),earnings:z$1.number(),maker_address:z$1.string()}),Ce=z$1.array(v),Le=z$1.record(z$1.string(),z$1.number()),Y=z$1.object({outcome:z$1.string(),price:z$1.number(),token_id:z$1.string()}),V=z$1.object({asset_address:z$1.string(),end_date:z$1.string(),rate_per_day:z$1.number(),start_date:z$1.string(),total_rewards:z$1.number()}),G=z$1.object({asset_address:z$1.string(),asset_rate:z$1.number(),earnings:z$1.number()}),W=z$1.object({condition_id:z$1.string(),earning_percentage:z$1.number(),earnings:z$1.array(G),event_slug:z$1.string(),image:z$1.string(),maker_address:z$1.string(),market_competitiveness:z$1.number(),market_slug:z$1.string(),question:z$1.string(),rewards_config:z$1.array(V),rewards_max_spread:z$1.number(),rewards_min_size:z$1.number(),tokens:z$1.array(Y)}),Ne=S(W);var X=z$1.object({apiKey:A,secret:z$1.string(),passphrase:z$1.string()}),Be=X.transform(t=>({key:t.apiKey,passphrase:t.passphrase,secret:t.secret})),De=z$1.object({apiKeys:z$1.array(A)}),Ke=z$1.object({key:A,secret:z$1.string(),passphrase:z$1.string()}),z=z$1.object({key:A,createdAt:I$1.optional(),revokedAt:I$1.nullable().optional()}),Ue=z$1.array(z$1.union([A.transform(t=>({key:t})),z])).transform(t=>t.map(l=>z.parse(l)));var T=(d=>(d.BUY="BUY",d.SELL="SELL",d))(T||{}),E=(y=>(y.GTC="GTC",y.FOK="FOK",y.GTD="GTD",y.FAK="FAK",y))(E||{}),g=z$1.enum(T),ve=z$1.enum(E);var q=z$1.looseObject({id:z$1.string(),tradeType:z$1.string(),takerOrderHash:z$1.string(),builder:z$1.string(),market:z$1.string(),assetId:Q$1,side:g,size:z$1.string(),sizeUsdc:z$1.string(),price:z$1.string(),status:z$1.string(),outcome:z$1.string(),outcomeIndex:z$1.number().int(),owner:z$1.string(),maker:z$1.string(),transactionHash:z$1.string(),matchTime:z$1.string(),bucketIndex:z$1.number().int(),fee:z$1.string(),feeUsdc:z$1.string(),err_msg:z$1.string().nullable().optional(),createdAt:z$1.string().optional(),updatedAt:z$1.string().optional()}),Xe=z$1.object({limit:z$1.number().int(),count:z$1.number().int(),next_cursor:z$1.string(),data:z$1.array(q)});var $e=z$1.object({canceled:z$1.array(z$1.string()),not_canceled:z$1.record(z$1.string(),z$1.string())});var Z=z$1.looseObject({base_fee:z$1.number()}),er=Z;var P=(u=>(u.MAX="max",u.ONE_WEEK="1w",u.ONE_DAY="1d",u.SIX_HOURS="6h",u.ONE_HOUR="1h",u))(P||{}),nr=z$1.enum(P),ar=z$1.looseObject({mid:z$1.string()}),ir=z$1.record(z$1.string(),z$1.string()),pr=z$1.looseObject({price:z$1.string()}),$=z$1.record(g,z$1.string().optional()),cr=z$1.record(z$1.string(),$),dr=z$1.looseObject({spread:z$1.string()}),mr=z$1.record(z$1.string(),z$1.string()),gr=z$1.looseObject({price:z$1.string(),side:g}),J=z$1.object({price:z$1.string(),side:g,token_id:Q$1}).transform(({token_id:t,price:l,side:d})=>({tokenId:t,price:l,side:d}));z$1.object({tokenId:Q$1,price:z$1.string(),side:g});var hr=z$1.array(J),Q=z$1.object({t:z$1.number().int(),p:z$1.number()}),ur=z$1.looseObject({history:z$1.array(Q)});var ee=z$1.looseObject({neg_risk:z$1.boolean()}),lr=ee;var L=z$1.looseObject({price:z$1.string(),size:z$1.string()}),N=z$1.looseObject({market:z$1.string(),asset_id:z$1.string(),timestamp:z$1.string().nullish(),bids:z$1.array(L),asks:z$1.array(L),min_order_size:z$1.string(),tick_size:z$1.string(),neg_risk:z$1.boolean(),last_trade_price:z$1.string().nullish(),hash:z$1.string()}),Rr=N,Or=z$1.array(N);var j=z$1.object({errorMsg:z$1.string(),makingAmount:z$1.string(),orderID:z$1.string(),status:z$1.string(),success:z$1.boolean(),takingAmount:z$1.string(),tradeIDs:z$1.array(z$1.string()).default([]),transactionsHashes:z$1.array(z$1.string()).default([])}),Tr=z$1.array(j),I=(p=>(p.LIVE="live",p.MATCHED="matched",p.DELAYED="delayed",p))(I||{}),te=z$1.nativeEnum(I),F=(c=>(c.UNMATCHED="unmatched",c.MARKET_NOT_READY="market_not_ready",c.NOT_ENOUGH_BALANCE="not_enough_balance",c.INVALID_NONCE="invalid_nonce",c.INVALID_EXPIRATION="invalid_expiration",c.POST_ONLY_WOULD_CROSS="post_only_would_cross",c.FOK_NOT_FILLED="fok_not_filled",c.FAK_NOT_FILLED="fak_not_filled",c.UNKNOWN="unknown",c))(F||{}),oe=z$1.nativeEnum(F),se=z$1.object({ok:z$1.literal(true),orderId:z$1.string().min(1),status:te,makingAmount:z$1.string(),takingAmount:z$1.string(),tradeIds:z$1.array(z$1.string()),transactionsHashes:z$1.array(S$1)}),ne=z$1.object({ok:z$1.literal(false),code:oe,message:z$1.string().min(1)}),ae=j.transform(ce),Er=z$1.array(ae);function ie(t){return t.success&&t.errorMsg===""&&t.orderID!==""&&me(t.status)}function pe(t){switch(t){case "live":return "live";case "matched":return "matched";case "delayed":return "delayed";default:never(`Unexpected order post status: ${t}`);}}function ce(t){return ie(t)?se.parse({makingAmount:t.makingAmount,ok:true,orderId:t.orderID,status:pe(t.status),takingAmount:t.takingAmount,tradeIds:t.tradeIDs,transactionsHashes:t.transactionsHashes}):ne.parse({code:de(t),message:t.errorMsg||"Unknown order failure",ok:false})}function de(t){if(t.status==="unmatched")return "unmatched";switch(t.errorMsg){case "the market is not yet ready to process new orders":return "market_not_ready";case "invalid nonce":return "invalid_nonce";case "invalid expiration":return "invalid_expiration";case "invalid post-only order: order crosses book":return "post_only_would_cross";case "order couldn't be fully filled. FOK orders are fully filled or killed.":return "fok_not_filled";case "no orders found to match with FAK order. FAK orders are partially filled or killed if no match is found.":return "fak_not_filled"}return t.errorMsg.includes("not enough balance / allowance")?"not_enough_balance":"unknown"}function me(t){return t==="live"||t==="matched"||t==="delayed"}var Pr="LTE=";var ge=z$1.looseObject({id:z$1.number().int().optional(),asset_address:z$1.string(),start_date:z$1.string(),end_date:z$1.string().optional(),rate_per_day:z$1.number(),total_rewards:z$1.number().optional()}),fe=z$1.looseObject({condition_id:z$1.string(),rewards_max_spread:z$1.number().optional(),rewards_min_size:z$1.number().optional(),rewards_config:z$1.array(ge).optional(),sponsored_daily_rate:z$1.number().optional(),sponsors_count:z$1.number().int().optional(),native_daily_rate:z$1.number().optional(),total_daily_rate:z$1.number().optional()}),jr=z$1.object({limit:z$1.number().int(),count:z$1.number().int(),next_cursor:z$1.string(),data:z$1.array(fe)}),he=z$1.object({token_id:Q$1,outcome:z$1.string(),price:z$1.number()}),ue=z$1.looseObject({asset_address:z$1.string(),start_date:z$1.string(),end_date:z$1.string().optional(),rate_per_day:z$1.number(),total_rewards:z$1.number().optional()}),ye=z$1.looseObject({condition_id:z$1.string(),question:z$1.string(),market_slug:z$1.string().optional(),event_slug:z$1.string().optional(),image:z$1.string().optional(),rewards_max_spread:z$1.number().optional(),rewards_min_size:z$1.number().optional(),market_competitiveness:z$1.number().optional(),tokens:z$1.array(he),rewards_config:z$1.array(ue).optional()}),Ir=z$1.object({limit:z$1.number().int(),count:z$1.number().int(),next_cursor:z$1.string(),data:z$1.array(ye)});var B=(p=>(p[p.EOA=0]="EOA",p[p.POLY_PROXY=1]="POLY_PROXY",p[p.POLY_GNOSIS_SAFE=2]="POLY_GNOSIS_SAFE",p))(B||{}),Dr=z$1.enum(B);var xe=z$1.looseObject({minimum_tick_size:H$1}),Hr=xe;export{se as AcceptedOrderResponseSchema,Be as ApiKeyCredsSchema,De as ApiKeysResponseSchema,k as AssetType,Ae as AssetTypeSchema,Te as BalanceAllowanceResponseSchema,Ke as BuilderApiKeyCredsSchema,z as BuilderApiKeySchema,Ue as BuilderApiKeysResponseSchema,q as BuilderTradeSchema,$e as CancelOrdersResponseSchema,U as ClobTradeSchema,ke as ClobTradesPageSchema,Oe as ClosedOnlyModeSchema,fe as CurrentRewardSchema,Pr as END_CURSOR,G as EarningSchema,Z as FeeRateSchema,er as FetchFeeRateResponseSchema,lr as FetchNegRiskResponseSchema,Rr as FetchOrderBookResponseSchema,Hr as FetchTickSizeResponseSchema,gr as LastTradePriceSchema,hr as LastTradePricesSchema,K as MakerOrderSchema,ye as MarketRewardSchema,ar as MidpointSchema,ir as MidpointsSchema,ee as NegRiskSchema,M as NotificationSchema,ze as NotificationsResponseSchema,D as OpenOrderSchema,be as OpenOrdersPageSchema,L as OrderBookLevelSchema,N as OrderBookSchema,Or as OrderBooksSchema,I as OrderPostStatus,te as OrderPostStatusSchema,F as OrderResponseErrorCode,oe as OrderResponseErrorCodeSchema,ae as OrderResponseSchema,Er as OrderResponsesSchema,Ee as OrderScoringResponseSchema,T as OrderSide,g as OrderSideSchema,E as OrderType,ve as OrderTypeSchema,we as OrdersScoringResponseSchema,Xe as PaginatedBuilderTradesSchema,jr as PaginatedCurrentRewardsSchema,Ir as PaginatedMarketRewardsSchema,P as PriceHistoryInterval,nr as PriceHistoryIntervalSchema,ur as PriceHistorySchema,pr as PriceSchema,cr as PricesSchema,X as RawApiKeyCredsSchema,j as RawOrderResponseSchema,Tr as RawOrderResponsesSchema,ne as RejectedOrderResponseSchema,V as RewardsConfigSchema,Le as RewardsPercentagesSchema,B as SignatureType,Dr as SignatureTypeSchema,dr as SpreadSchema,mr as SpreadsSchema,xe as TickSizeSchema,Y as TokenSchema,v as TotalUserEarningSchema,Ce as TotalUserEarningsResponseSchema,H as UserEarningSchema,Pe as UserEarningsPageSchema,W as UserRewardsEarningSchema,Ne as UserRewardsEarningsPageSchema};//# sourceMappingURL=index.js.map
|
|
2
|
+
//# sourceMappingURL=index.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":["../../src/clob/account.ts","../../src/clob/api-key.ts","../../src/clob/order.ts","../../src/clob/builder.ts","../../src/clob/cancel.ts","../../src/clob/fee-rate.ts","../../src/clob/market-data.ts","../../src/clob/neg-risk.ts","../../src/clob/order-book.ts","../../src/clob/order-response.ts","../../src/clob/pagination.ts","../../src/clob/rewards.ts","../../src/clob/signature-type.ts","../../src/clob/tick-size.ts"],"names":["createCursorPageSchema","item","z","ClosedOnlyModeSchema","OpenOrderSchema","OpenOrdersPageSchema","MakerOrderSchema","ClobTradeSchema","ClobTradesPageSchema","NotificationSchema","NotificationIdSchema","NotificationsResponseSchema","AssetType","AssetTypeSchema","BalanceAllowanceResponseSchema","EvmAddressSchema","OrderScoringResponseSchema","OrdersScoringResponseSchema","UserEarningSchema","UserEarningsPageSchema","TotalUserEarningSchema","TotalUserEarningsResponseSchema","RewardsPercentagesSchema","TokenSchema","RewardsConfigSchema","EarningSchema","UserRewardsEarningSchema","UserRewardsEarningsPageSchema","RawApiKeyCredsSchema","ApiKeySchema","ApiKeyCredsSchema","creds","ApiKeysResponseSchema","BuilderApiKeyCredsSchema","BuilderApiKeySchema","ISODateStringSchema","BuilderApiKeysResponseSchema","key","apiKeys","apiKey","OrderSide","OrderType","OrderSideSchema","OrderTypeSchema","BuilderTradeSchema","TokenIdSchema","PaginatedBuilderTradesSchema","CancelOrdersResponseSchema","FeeRateSchema","FetchFeeRateResponseSchema","PriceHistoryInterval","PriceHistoryIntervalSchema","MidpointSchema","MidpointsSchema","PriceSchema","PricesBySideSchema","PricesSchema","SpreadSchema","SpreadsSchema","LastTradePriceSchema","LastTradePriceForTokenResponseSchema","token_id","price","side","LastTradePricesSchema","PriceHistoryPointSchema","PriceHistorySchema","NegRiskSchema","FetchNegRiskResponseSchema","OrderBookLevelSchema","OrderBookSchema","FetchOrderBookResponseSchema","OrderBooksSchema","RawOrderResponseSchema","RawOrderResponsesSchema","OrderPostStatus","OrderPostStatusSchema","OrderResponseErrorCode","OrderResponseErrorCodeSchema","AcceptedOrderResponseSchema","TxHashSchema","RejectedOrderResponseSchema","OrderResponseSchema","normalizeOrderResponse","OrderResponsesSchema","isAcceptedOrderResponse","response","isOrderPostStatus","parseOrderPostStatus","status","never","inferOrderResponseErrorCode","END_CURSOR","CurrentRewardConfigSchema","CurrentRewardSchema","PaginatedCurrentRewardsSchema","RewardTokenSchema","RewardConfigSchema","MarketRewardSchema","PaginatedMarketRewardsSchema","SignatureType","SignatureTypeSchema","TickSizeSchema","TickSizeValueSchema","FetchTickSizeResponseSchema"],"mappings":"4JAGA,SAASA,CAAAA,CAAmDC,EAAa,CACvE,OAAOC,GAAAA,CAAE,MAAA,CAAO,CACd,KAAA,CAAOA,IAAE,MAAA,EAAO,CAChB,IAAA,CAAMA,GAAAA,CAAE,KAAA,CAAMD,CAAI,EAClB,KAAA,CAAOC,GAAAA,CAAE,MAAA,EAAO,CAChB,WAAA,CAAaA,GAAAA,CAAE,QACjB,CAAC,CACH,CAEO,IAAMC,EAAAA,CAAuBD,IAAE,MAAA,CAAO,CAC3C,WAAA,CAAaA,GAAAA,CAAE,OAAA,EACjB,CAAC,CAAA,CAIYE,CAAAA,CAAkBF,GAAAA,CAAE,MAAA,CAAO,CACtC,QAAA,CAAUA,IAAE,MAAA,EAAO,CACnB,gBAAA,CAAkBA,GAAAA,CAAE,KAAA,CAAMA,GAAAA,CAAE,QAAQ,CAAA,CACpC,UAAA,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,CAAE,MAAA,EAAO,CAAE,GAAA,EAAI,CACtB,WAAA,CAAaA,IAAE,MAAA,EAAO,CACtB,IAAA,CAAMA,GAAAA,CAAE,KAAA,CAAMgG,EAAkB,CAClC,CAAC,MCpEWE,CAAAA,CAAAA,CAAAA,CAAAA,GAIVA,CAAAA,CAAAA,CAAAA,CAAA,GAAA,CAAM,CAAA,CAAA,CAAN,KAAA,CAKAA,CAAAA,CAAAA,CAAAA,CAAA,WAAa,CAAA,CAAA,CAAb,YAAA,CAKAA,CAAAA,CAAAA,CAAAA,CAAA,gBAAA,CAAmB,CAAA,CAAA,CAAnB,kBAAA,CAdUA,OAAA,EAAA,CAAA,CAiBCC,EAAAA,CAAsBnG,GAAAA,CAAE,IAAA,CAAKkG,CAAa,EChBhD,IAAME,EAAAA,CAAiBpG,GAAAA,CAAE,WAAA,CAAY,CAC1C,iBAAA,CAAmBqG,GACrB,CAAC,CAAA,CAEYC,EAAAA,CAA8BF","file":"index.js","sourcesContent":["import { z } from 'zod';\nimport { EvmAddressSchema, NotificationIdSchema } from '../shared';\n\nfunction createCursorPageSchema<TItem extends z.ZodTypeAny>(item: TItem) {\n return z.object({\n count: z.number(),\n data: z.array(item),\n limit: z.number(),\n next_cursor: z.string(),\n });\n}\n\nexport const ClosedOnlyModeSchema = z.object({\n closed_only: z.boolean(),\n});\n\nexport type ClosedOnlyMode = z.infer<typeof ClosedOnlyModeSchema>;\n\nexport const OpenOrderSchema = z.object({\n asset_id: z.string(),\n associate_trades: z.array(z.string()),\n created_at: z.number(),\n expiration: z.string(),\n id: z.string(),\n maker_address: z.string(),\n market: z.string(),\n order_type: z.string(),\n original_size: z.string(),\n outcome: z.string(),\n owner: z.string(),\n price: z.string(),\n side: z.string(),\n size_matched: z.string(),\n status: z.string(),\n});\n\nexport type OpenOrder = z.infer<typeof OpenOrderSchema>;\n\nexport const OpenOrdersPageSchema = createCursorPageSchema(OpenOrderSchema);\n\nexport type OpenOrdersPage = z.infer<typeof OpenOrdersPageSchema>;\n\nexport const MakerOrderSchema = z.object({\n asset_id: z.string(),\n fee_rate_bps: z.string(),\n maker_address: z.string(),\n matched_amount: z.string(),\n order_id: z.string(),\n outcome: z.string(),\n owner: z.string(),\n price: z.string(),\n side: z.string(),\n});\n\nexport const ClobTradeSchema = z.object({\n asset_id: z.string(),\n bucket_index: z.number(),\n fee_rate_bps: z.string(),\n id: z.string(),\n last_update: z.string(),\n maker_address: z.string(),\n maker_orders: z.array(MakerOrderSchema),\n market: z.string(),\n match_time: z.string(),\n outcome: z.string(),\n owner: z.string(),\n price: z.string(),\n side: z.string(),\n size: z.string(),\n status: z.string(),\n taker_order_id: z.string(),\n trader_side: z.enum(['TAKER', 'MAKER']),\n transaction_hash: z.string(),\n});\n\nexport type ClobTrade = z.infer<typeof ClobTradeSchema>;\n\nexport const ClobTradesPageSchema = createCursorPageSchema(ClobTradeSchema);\n\nexport type ClobTradesPage = z.infer<typeof ClobTradesPageSchema>;\n\nexport const NotificationSchema = z.object({\n id: NotificationIdSchema,\n owner: z.string(),\n payload: z.unknown(),\n timestamp: z.string().or(z.number().int()),\n type: z.number(),\n});\n\nexport type Notification = z.infer<typeof NotificationSchema>;\n\nexport const NotificationsResponseSchema = z.array(NotificationSchema);\n\nexport type NotificationsResponse = z.infer<typeof NotificationsResponseSchema>;\n\nexport enum AssetType {\n COLLATERAL = 'COLLATERAL',\n CONDITIONAL = 'CONDITIONAL',\n}\n\nexport const AssetTypeSchema = z.enum(AssetType);\n\nexport const BalanceAllowanceResponseSchema = z.object({\n allowances: z.record(EvmAddressSchema, z.string().transform(BigInt)),\n balance: z.string(),\n});\n\nexport type BalanceAllowanceResponse = z.infer<\n typeof BalanceAllowanceResponseSchema\n>;\n\nexport const OrderScoringResponseSchema = z.object({\n scoring: z.boolean(),\n});\n\nexport type OrderScoringResponse = z.infer<typeof OrderScoringResponseSchema>;\n\nexport const OrdersScoringResponseSchema = z.record(z.string(), z.boolean());\n\nexport type OrdersScoringResponse = z.infer<typeof OrdersScoringResponseSchema>;\n\nexport const UserEarningSchema = z.object({\n asset_address: z.string(),\n asset_rate: z.number(),\n condition_id: z.string(),\n date: z.string(),\n earnings: z.number(),\n maker_address: z.string(),\n});\n\nexport type UserEarning = z.infer<typeof UserEarningSchema>;\n\nexport const UserEarningsPageSchema = createCursorPageSchema(UserEarningSchema);\n\nexport type UserEarningsPage = z.infer<typeof UserEarningsPageSchema>;\n\nexport const TotalUserEarningSchema = z.object({\n asset_address: z.string(),\n asset_rate: z.number(),\n date: z.string(),\n earnings: z.number(),\n maker_address: z.string(),\n});\n\nexport type TotalUserEarning = z.infer<typeof TotalUserEarningSchema>;\n\nexport const TotalUserEarningsResponseSchema = z.array(TotalUserEarningSchema);\n\nexport type TotalUserEarningsResponse = z.infer<\n typeof TotalUserEarningsResponseSchema\n>;\n\nexport const RewardsPercentagesSchema = z.record(z.string(), z.number());\n\nexport type RewardsPercentages = z.infer<typeof RewardsPercentagesSchema>;\n\nexport const TokenSchema = z.object({\n outcome: z.string(),\n price: z.number(),\n token_id: z.string(),\n});\n\nexport const RewardsConfigSchema = z.object({\n asset_address: z.string(),\n end_date: z.string(),\n rate_per_day: z.number(),\n start_date: z.string(),\n total_rewards: z.number(),\n});\n\nexport const EarningSchema = z.object({\n asset_address: z.string(),\n asset_rate: z.number(),\n earnings: z.number(),\n});\n\nexport const UserRewardsEarningSchema = z.object({\n condition_id: z.string(),\n earning_percentage: z.number(),\n earnings: z.array(EarningSchema),\n event_slug: z.string(),\n image: z.string(),\n maker_address: z.string(),\n market_competitiveness: z.number(),\n market_slug: z.string(),\n question: z.string(),\n rewards_config: z.array(RewardsConfigSchema),\n rewards_max_spread: z.number(),\n rewards_min_size: z.number(),\n tokens: z.array(TokenSchema),\n});\n\nexport type UserRewardsEarning = z.infer<typeof UserRewardsEarningSchema>;\n\nexport const UserRewardsEarningsPageSchema = createCursorPageSchema(\n UserRewardsEarningSchema,\n);\n\nexport type UserRewardsEarningsPage = z.infer<\n typeof UserRewardsEarningsPageSchema\n>;\n","import { z } from 'zod';\nimport { ApiKeySchema, ISODateStringSchema } from '../shared';\n\nexport const RawApiKeyCredsSchema = z.object({\n apiKey: ApiKeySchema,\n secret: z.string(),\n passphrase: z.string(),\n});\n\nexport const ApiKeyCredsSchema = RawApiKeyCredsSchema.transform((creds) => ({\n key: creds.apiKey,\n passphrase: creds.passphrase,\n secret: creds.secret,\n}));\n\nexport type ApiKeyCreds = z.infer<typeof ApiKeyCredsSchema>;\n\nexport const ApiKeysResponseSchema = z.object({\n apiKeys: z.array(ApiKeySchema),\n});\n\nexport type ApiKeysResponse = z.infer<typeof ApiKeysResponseSchema>;\n\nexport const BuilderApiKeyCredsSchema = z.object({\n key: ApiKeySchema,\n secret: z.string(),\n passphrase: z.string(),\n});\n\nexport type BuilderApiKeyCreds = z.infer<typeof BuilderApiKeyCredsSchema>;\n\nexport const BuilderApiKeySchema = z.object({\n key: ApiKeySchema,\n createdAt: ISODateStringSchema.optional(),\n revokedAt: ISODateStringSchema.nullable().optional(),\n});\n\nexport type BuilderApiKey = z.infer<typeof BuilderApiKeySchema>;\n\nexport const BuilderApiKeysResponseSchema = z\n .array(\n z.union([ApiKeySchema.transform((key) => ({ key })), BuilderApiKeySchema]),\n )\n .transform((apiKeys) =>\n apiKeys.map((apiKey) => BuilderApiKeySchema.parse(apiKey)),\n );\n\nexport type BuilderApiKeysResponse = z.infer<\n typeof BuilderApiKeysResponseSchema\n>;\n","import { z } from 'zod';\n\nexport enum OrderSide {\n BUY = 'BUY',\n SELL = 'SELL',\n}\n\nexport enum OrderType {\n GTC = 'GTC',\n FOK = 'FOK',\n GTD = 'GTD',\n FAK = 'FAK',\n}\n\nexport const OrderSideSchema = z.enum(OrderSide);\nexport const OrderTypeSchema = z.enum(OrderType);\n","import { z } from 'zod';\nimport { TokenIdSchema } from '../shared';\nimport { OrderSideSchema } from './order';\n\nexport const BuilderTradeSchema = z.looseObject({\n id: z.string(),\n tradeType: z.string(),\n takerOrderHash: z.string(),\n builder: z.string(),\n market: z.string(),\n assetId: TokenIdSchema,\n side: OrderSideSchema,\n size: z.string(),\n sizeUsdc: z.string(),\n price: z.string(),\n status: z.string(),\n outcome: z.string(),\n outcomeIndex: z.number().int(),\n owner: z.string(),\n maker: z.string(),\n transactionHash: z.string(),\n matchTime: z.string(),\n bucketIndex: z.number().int(),\n fee: z.string(),\n feeUsdc: z.string(),\n err_msg: z.string().nullable().optional(),\n createdAt: z.string().optional(),\n updatedAt: z.string().optional(),\n});\nexport type BuilderTrade = z.infer<typeof BuilderTradeSchema>;\n\nexport const PaginatedBuilderTradesSchema = z.object({\n limit: z.number().int(),\n count: z.number().int(),\n next_cursor: z.string(),\n data: z.array(BuilderTradeSchema),\n});\nexport type PaginatedBuilderTrades = z.infer<\n typeof PaginatedBuilderTradesSchema\n>;\n","import { z } from 'zod';\n\nexport const CancelOrdersResponseSchema = z.object({\n canceled: z.array(z.string()),\n not_canceled: z.record(z.string(), z.string()),\n});\n\nexport type CancelOrdersResponse = z.infer<typeof CancelOrdersResponseSchema>;\n","import { z } from 'zod';\n\nexport const FeeRateSchema = z.looseObject({\n base_fee: z.number(),\n});\n\nexport const FetchFeeRateResponseSchema = FeeRateSchema;\n\nexport type FeeRate = z.infer<typeof FeeRateSchema>;\nexport type FetchFeeRateResponse = z.infer<typeof FetchFeeRateResponseSchema>;\n","import { z } from 'zod';\nimport { TokenIdSchema } from '../shared';\nimport { OrderSideSchema } from './order';\n\nexport enum PriceHistoryInterval {\n MAX = 'max',\n ONE_WEEK = '1w',\n ONE_DAY = '1d',\n SIX_HOURS = '6h',\n ONE_HOUR = '1h',\n}\n\nexport const PriceHistoryIntervalSchema = z.enum(PriceHistoryInterval);\n\nexport const MidpointSchema = z.looseObject({\n mid: z.string(),\n});\nexport type Midpoint = z.infer<typeof MidpointSchema>;\n\nexport const MidpointsSchema = z.record(z.string(), z.string());\nexport type Midpoints = z.infer<typeof MidpointsSchema>;\n\nexport const PriceSchema = z.looseObject({\n price: z.string(),\n});\nexport type Price = z.infer<typeof PriceSchema>;\n\nconst PricesBySideSchema = z.record(OrderSideSchema, z.string().optional());\nexport type PricesBySide = z.infer<typeof PricesBySideSchema>;\n\nexport const PricesSchema = z.record(z.string(), PricesBySideSchema);\nexport type Prices = z.infer<typeof PricesSchema>;\n\nexport const SpreadSchema = z.looseObject({\n spread: z.string(),\n});\nexport type Spread = z.infer<typeof SpreadSchema>;\n\nexport const SpreadsSchema = z.record(z.string(), z.string());\nexport type Spreads = z.infer<typeof SpreadsSchema>;\n\nexport const LastTradePriceSchema = z.looseObject({\n price: z.string(),\n side: OrderSideSchema,\n});\nexport type LastTradePrice = z.infer<typeof LastTradePriceSchema>;\n\nconst LastTradePriceForTokenResponseSchema = z\n .object({\n price: z.string(),\n side: OrderSideSchema,\n token_id: TokenIdSchema,\n })\n .transform(({ token_id, price, side }) => ({\n tokenId: token_id,\n price,\n side,\n }));\nexport type LastTradePriceForTokenResponse = z.infer<\n typeof LastTradePriceForTokenResponseSchema\n>;\n\nconst LastTradePriceForTokenSchema = z.object({\n tokenId: TokenIdSchema,\n price: z.string(),\n side: OrderSideSchema,\n});\nexport type LastTradePriceForToken = z.infer<\n typeof LastTradePriceForTokenSchema\n>;\n\nexport const LastTradePricesSchema = z.array(\n LastTradePriceForTokenResponseSchema,\n);\nexport type LastTradePrices = z.infer<typeof LastTradePricesSchema>;\n\nconst PriceHistoryPointSchema = z.object({\n t: z.number().int(),\n p: z.number(),\n});\nexport type PriceHistoryPoint = z.infer<typeof PriceHistoryPointSchema>;\n\nexport const PriceHistorySchema = z.looseObject({\n history: z.array(PriceHistoryPointSchema),\n});\nexport type PriceHistory = z.infer<typeof PriceHistorySchema>;\n","import { z } from 'zod';\n\nexport const NegRiskSchema = z.looseObject({\n neg_risk: z.boolean(),\n});\n\nexport const FetchNegRiskResponseSchema = NegRiskSchema;\n\nexport type NegRisk = z.infer<typeof NegRiskSchema>;\nexport type FetchNegRiskResponse = z.infer<typeof FetchNegRiskResponseSchema>;\n","import { z } from 'zod';\n\nexport const OrderBookLevelSchema = z.looseObject({\n price: z.string(),\n size: z.string(),\n});\n\nexport const OrderBookSchema = z.looseObject({\n market: z.string(),\n asset_id: z.string(),\n timestamp: z.string().nullish(),\n bids: z.array(OrderBookLevelSchema),\n asks: z.array(OrderBookLevelSchema),\n min_order_size: z.string(),\n tick_size: z.string(),\n neg_risk: z.boolean(),\n last_trade_price: z.string().nullish(),\n hash: z.string(),\n});\n\nexport const FetchOrderBookResponseSchema = OrderBookSchema;\nexport const OrderBooksSchema = z.array(OrderBookSchema);\n\nexport type OrderBookLevel = z.infer<typeof OrderBookLevelSchema>;\nexport type OrderBook = z.infer<typeof OrderBookSchema>;\nexport type OrderBooks = z.infer<typeof OrderBooksSchema>;\nexport type FetchOrderBookResponse = z.infer<\n typeof FetchOrderBookResponseSchema\n>;\n","import { never, type TxHash } from '@polymarket/types';\nimport { z } from 'zod';\nimport { TxHashSchema } from '../shared';\n\nexport const RawOrderResponseSchema = z.object({\n errorMsg: z.string(),\n makingAmount: z.string(),\n orderID: z.string(),\n status: z.string(),\n success: z.boolean(),\n takingAmount: z.string(),\n tradeIDs: z.array(z.string()).default([]),\n transactionsHashes: z.array(z.string()).default([]),\n});\n\nexport type RawOrderResponse = z.infer<typeof RawOrderResponseSchema>;\n\nexport const RawOrderResponsesSchema = z.array(RawOrderResponseSchema);\n\nexport type RawOrderResponses = z.infer<typeof RawOrderResponsesSchema>;\n\nexport enum OrderPostStatus {\n LIVE = 'live',\n MATCHED = 'matched',\n DELAYED = 'delayed',\n}\n\nexport const OrderPostStatusSchema = z.nativeEnum(OrderPostStatus);\n\nexport enum OrderResponseErrorCode {\n UNMATCHED = 'unmatched',\n MARKET_NOT_READY = 'market_not_ready',\n NOT_ENOUGH_BALANCE = 'not_enough_balance',\n INVALID_NONCE = 'invalid_nonce',\n INVALID_EXPIRATION = 'invalid_expiration',\n POST_ONLY_WOULD_CROSS = 'post_only_would_cross',\n FOK_NOT_FILLED = 'fok_not_filled',\n FAK_NOT_FILLED = 'fak_not_filled',\n UNKNOWN = 'unknown',\n}\n\nexport const OrderResponseErrorCodeSchema = z.nativeEnum(\n OrderResponseErrorCode,\n);\n\nexport type AcceptedOrderResponse = {\n ok: true;\n orderId: string;\n status: OrderPostStatus;\n makingAmount: string;\n takingAmount: string;\n transactionsHashes: TxHash[];\n tradeIds: string[];\n};\n\nexport type RejectedOrderResponse = {\n ok: false;\n code: OrderResponseErrorCode;\n message: string;\n};\n\nexport type OrderResponse = AcceptedOrderResponse | RejectedOrderResponse;\n\nexport type OrderResponses = OrderResponse[];\n\nexport const AcceptedOrderResponseSchema = z.object({\n ok: z.literal(true),\n orderId: z.string().min(1),\n status: OrderPostStatusSchema,\n makingAmount: z.string(),\n takingAmount: z.string(),\n tradeIds: z.array(z.string()),\n transactionsHashes: z.array(TxHashSchema),\n});\n\nexport const RejectedOrderResponseSchema = z.object({\n ok: z.literal(false),\n code: OrderResponseErrorCodeSchema,\n message: z.string().min(1),\n});\n\nexport const OrderResponseSchema = RawOrderResponseSchema.transform(\n normalizeOrderResponse,\n);\n\nexport const OrderResponsesSchema = z.array(OrderResponseSchema);\n\nfunction isAcceptedOrderResponse(response: RawOrderResponse): boolean {\n return (\n response.success &&\n response.errorMsg === '' &&\n response.orderID !== '' &&\n isOrderPostStatus(response.status)\n );\n}\n\nfunction parseOrderPostStatus(status: string): OrderPostStatus {\n switch (status) {\n case OrderPostStatus.LIVE:\n return OrderPostStatus.LIVE;\n case OrderPostStatus.MATCHED:\n return OrderPostStatus.MATCHED;\n case OrderPostStatus.DELAYED:\n return OrderPostStatus.DELAYED;\n default:\n never(`Unexpected order post status: ${status}`);\n }\n}\n\nfunction normalizeOrderResponse(response: RawOrderResponse): OrderResponse {\n if (isAcceptedOrderResponse(response)) {\n return AcceptedOrderResponseSchema.parse({\n makingAmount: response.makingAmount,\n ok: true,\n orderId: response.orderID,\n status: parseOrderPostStatus(response.status),\n takingAmount: response.takingAmount,\n tradeIds: response.tradeIDs,\n transactionsHashes: response.transactionsHashes,\n });\n }\n\n return RejectedOrderResponseSchema.parse({\n code: inferOrderResponseErrorCode(response),\n message: response.errorMsg || 'Unknown order failure',\n ok: false,\n });\n}\n\nfunction inferOrderResponseErrorCode(\n response: RawOrderResponse,\n): OrderResponseErrorCode {\n // This is a boundary heuristic over legacy mixed `success`/`status`/`errorMsg`\n // fields. It is intentionally temporary and should be removed once the API\n // exposes structured success and error variants directly.\n if (response.status === 'unmatched') {\n return OrderResponseErrorCode.UNMATCHED;\n }\n\n switch (response.errorMsg) {\n case 'the market is not yet ready to process new orders':\n return OrderResponseErrorCode.MARKET_NOT_READY;\n case 'invalid nonce':\n return OrderResponseErrorCode.INVALID_NONCE;\n case 'invalid expiration':\n return OrderResponseErrorCode.INVALID_EXPIRATION;\n case 'invalid post-only order: order crosses book':\n return OrderResponseErrorCode.POST_ONLY_WOULD_CROSS;\n case \"order couldn't be fully filled. FOK orders are fully filled or killed.\":\n return OrderResponseErrorCode.FOK_NOT_FILLED;\n case 'no orders found to match with FAK order. FAK orders are partially filled or killed if no match is found.':\n return OrderResponseErrorCode.FAK_NOT_FILLED;\n }\n\n if (response.errorMsg.includes('not enough balance / allowance')) {\n return OrderResponseErrorCode.NOT_ENOUGH_BALANCE;\n }\n\n return OrderResponseErrorCode.UNKNOWN;\n}\n\nfunction isOrderPostStatus(status: string): status is OrderPostStatus {\n return (\n status === OrderPostStatus.LIVE ||\n status === OrderPostStatus.MATCHED ||\n status === OrderPostStatus.DELAYED\n );\n}\n","export const END_CURSOR = 'LTE=';\n","import { z } from 'zod';\nimport { TokenIdSchema } from '../shared';\n\nconst CurrentRewardConfigSchema = z.looseObject({\n id: z.number().int().optional(),\n asset_address: z.string(),\n start_date: z.string(),\n end_date: z.string().optional(),\n rate_per_day: z.number(),\n total_rewards: z.number().optional(),\n});\nexport type CurrentRewardConfig = z.infer<typeof CurrentRewardConfigSchema>;\n\nexport const CurrentRewardSchema = z.looseObject({\n condition_id: z.string(),\n rewards_max_spread: z.number().optional(),\n rewards_min_size: z.number().optional(),\n rewards_config: z.array(CurrentRewardConfigSchema).optional(),\n sponsored_daily_rate: z.number().optional(),\n sponsors_count: z.number().int().optional(),\n native_daily_rate: z.number().optional(),\n total_daily_rate: z.number().optional(),\n});\nexport type CurrentReward = z.infer<typeof CurrentRewardSchema>;\n\nexport const PaginatedCurrentRewardsSchema = z.object({\n limit: z.number().int(),\n count: z.number().int(),\n next_cursor: z.string(),\n data: z.array(CurrentRewardSchema),\n});\nexport type PaginatedCurrentRewards = z.infer<\n typeof PaginatedCurrentRewardsSchema\n>;\n\nconst RewardTokenSchema = z.object({\n token_id: TokenIdSchema,\n outcome: z.string(),\n price: z.number(),\n});\nexport type RewardToken = z.infer<typeof RewardTokenSchema>;\n\nconst RewardConfigSchema = z.looseObject({\n asset_address: z.string(),\n start_date: z.string(),\n end_date: z.string().optional(),\n rate_per_day: z.number(),\n total_rewards: z.number().optional(),\n});\nexport type RewardConfig = z.infer<typeof RewardConfigSchema>;\n\nexport const MarketRewardSchema = z.looseObject({\n condition_id: z.string(),\n question: z.string(),\n market_slug: z.string().optional(),\n event_slug: z.string().optional(),\n image: z.string().optional(),\n rewards_max_spread: z.number().optional(),\n rewards_min_size: z.number().optional(),\n market_competitiveness: z.number().optional(),\n tokens: z.array(RewardTokenSchema),\n rewards_config: z.array(RewardConfigSchema).optional(),\n});\nexport type MarketReward = z.infer<typeof MarketRewardSchema>;\n\nexport const PaginatedMarketRewardsSchema = z.object({\n limit: z.number().int(),\n count: z.number().int(),\n next_cursor: z.string(),\n data: z.array(MarketRewardSchema),\n});\nexport type PaginatedMarketRewards = z.infer<\n typeof PaginatedMarketRewardsSchema\n>;\n","import { z } from 'zod';\n\nexport enum SignatureType {\n /**\n * ECDSA EIP712 signatures signed by EOAs\n */\n EOA = 0,\n\n /**\n * EIP712 signatures signed by EOAs that own Polymarket Proxy wallets\n */\n POLY_PROXY = 1,\n\n /**\n * EIP712 signatures signed by EOAs that own Polymarket Gnosis safes\n */\n POLY_GNOSIS_SAFE = 2,\n}\n\nexport const SignatureTypeSchema = z.enum(SignatureType);\n","import { z } from 'zod';\nimport { TickSizeValueSchema } from '../shared';\n\nexport const TickSizeSchema = z.looseObject({\n minimum_tick_size: TickSizeValueSchema,\n});\n\nexport const FetchTickSizeResponseSchema = TickSizeSchema;\n\nexport type TickSize = z.infer<typeof TickSizeSchema>;\nexport type FetchTickSizeResponse = z.infer<typeof FetchTickSizeResponseSchema>;\n"]}
|
|
@@ -0,0 +1,486 @@
|
|
|
1
|
+
import { ConditionId } from '../index.js';
|
|
2
|
+
import { z } from 'zod';
|
|
3
|
+
import '@polymarket/types';
|
|
4
|
+
|
|
5
|
+
declare const TradeSchema: z.ZodObject<{
|
|
6
|
+
proxyWallet: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
7
|
+
side: z.ZodOptional<z.ZodNullable<z.ZodEnum<{
|
|
8
|
+
BUY: "BUY";
|
|
9
|
+
SELL: "SELL";
|
|
10
|
+
}>>>;
|
|
11
|
+
asset: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
12
|
+
conditionId: z.ZodOptional<z.ZodNullable<z.ZodPipe<z.ZodString, z.ZodTransform<ConditionId, string>>>>;
|
|
13
|
+
size: z.ZodOptional<z.ZodNullable<z.ZodNumber>>;
|
|
14
|
+
price: z.ZodOptional<z.ZodNullable<z.ZodNumber>>;
|
|
15
|
+
timestamp: z.ZodOptional<z.ZodNullable<z.ZodNumber>>;
|
|
16
|
+
title: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
17
|
+
slug: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
18
|
+
icon: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
19
|
+
eventSlug: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
20
|
+
outcome: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
21
|
+
outcomeIndex: z.ZodOptional<z.ZodNullable<z.ZodNumber>>;
|
|
22
|
+
name: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
23
|
+
pseudonym: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
24
|
+
bio: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
25
|
+
profileImage: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
26
|
+
profileImageOptimized: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
27
|
+
transactionHash: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
28
|
+
}, z.core.$loose>;
|
|
29
|
+
declare const ActivitySchema: z.ZodObject<{
|
|
30
|
+
proxyWallet: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
31
|
+
timestamp: z.ZodOptional<z.ZodNullable<z.ZodNumber>>;
|
|
32
|
+
conditionId: z.ZodOptional<z.ZodNullable<z.ZodPipe<z.ZodString, z.ZodTransform<ConditionId, string>>>>;
|
|
33
|
+
type: z.ZodOptional<z.ZodNullable<z.ZodEnum<{
|
|
34
|
+
TRADE: "TRADE";
|
|
35
|
+
SPLIT: "SPLIT";
|
|
36
|
+
MERGE: "MERGE";
|
|
37
|
+
REDEEM: "REDEEM";
|
|
38
|
+
REWARD: "REWARD";
|
|
39
|
+
CONVERSION: "CONVERSION";
|
|
40
|
+
MAKER_REBATE: "MAKER_REBATE";
|
|
41
|
+
}>>>;
|
|
42
|
+
size: z.ZodOptional<z.ZodNullable<z.ZodNumber>>;
|
|
43
|
+
usdcSize: z.ZodOptional<z.ZodNullable<z.ZodNumber>>;
|
|
44
|
+
transactionHash: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
45
|
+
price: z.ZodOptional<z.ZodNullable<z.ZodNumber>>;
|
|
46
|
+
asset: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
47
|
+
side: z.ZodOptional<z.ZodNullable<z.ZodEnum<{
|
|
48
|
+
BUY: "BUY";
|
|
49
|
+
SELL: "SELL";
|
|
50
|
+
}>>>;
|
|
51
|
+
outcomeIndex: z.ZodOptional<z.ZodNullable<z.ZodNumber>>;
|
|
52
|
+
title: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
53
|
+
slug: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
54
|
+
icon: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
55
|
+
eventSlug: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
56
|
+
outcome: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
57
|
+
name: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
58
|
+
pseudonym: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
59
|
+
bio: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
60
|
+
profileImage: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
61
|
+
profileImageOptimized: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
62
|
+
}, z.core.$loose>;
|
|
63
|
+
declare const TradedSchema: z.ZodObject<{
|
|
64
|
+
user: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
65
|
+
traded: z.ZodOptional<z.ZodNullable<z.ZodNumber>>;
|
|
66
|
+
}, z.core.$loose>;
|
|
67
|
+
declare const ListTradesResponseSchema: z.ZodArray<z.ZodObject<{
|
|
68
|
+
proxyWallet: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
69
|
+
side: z.ZodOptional<z.ZodNullable<z.ZodEnum<{
|
|
70
|
+
BUY: "BUY";
|
|
71
|
+
SELL: "SELL";
|
|
72
|
+
}>>>;
|
|
73
|
+
asset: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
74
|
+
conditionId: z.ZodOptional<z.ZodNullable<z.ZodPipe<z.ZodString, z.ZodTransform<ConditionId, string>>>>;
|
|
75
|
+
size: z.ZodOptional<z.ZodNullable<z.ZodNumber>>;
|
|
76
|
+
price: z.ZodOptional<z.ZodNullable<z.ZodNumber>>;
|
|
77
|
+
timestamp: z.ZodOptional<z.ZodNullable<z.ZodNumber>>;
|
|
78
|
+
title: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
79
|
+
slug: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
80
|
+
icon: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
81
|
+
eventSlug: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
82
|
+
outcome: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
83
|
+
outcomeIndex: z.ZodOptional<z.ZodNullable<z.ZodNumber>>;
|
|
84
|
+
name: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
85
|
+
pseudonym: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
86
|
+
bio: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
87
|
+
profileImage: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
88
|
+
profileImageOptimized: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
89
|
+
transactionHash: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
90
|
+
}, z.core.$loose>>;
|
|
91
|
+
declare const ListActivityResponseSchema: z.ZodArray<z.ZodObject<{
|
|
92
|
+
proxyWallet: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
93
|
+
timestamp: z.ZodOptional<z.ZodNullable<z.ZodNumber>>;
|
|
94
|
+
conditionId: z.ZodOptional<z.ZodNullable<z.ZodPipe<z.ZodString, z.ZodTransform<ConditionId, string>>>>;
|
|
95
|
+
type: z.ZodOptional<z.ZodNullable<z.ZodEnum<{
|
|
96
|
+
TRADE: "TRADE";
|
|
97
|
+
SPLIT: "SPLIT";
|
|
98
|
+
MERGE: "MERGE";
|
|
99
|
+
REDEEM: "REDEEM";
|
|
100
|
+
REWARD: "REWARD";
|
|
101
|
+
CONVERSION: "CONVERSION";
|
|
102
|
+
MAKER_REBATE: "MAKER_REBATE";
|
|
103
|
+
}>>>;
|
|
104
|
+
size: z.ZodOptional<z.ZodNullable<z.ZodNumber>>;
|
|
105
|
+
usdcSize: z.ZodOptional<z.ZodNullable<z.ZodNumber>>;
|
|
106
|
+
transactionHash: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
107
|
+
price: z.ZodOptional<z.ZodNullable<z.ZodNumber>>;
|
|
108
|
+
asset: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
109
|
+
side: z.ZodOptional<z.ZodNullable<z.ZodEnum<{
|
|
110
|
+
BUY: "BUY";
|
|
111
|
+
SELL: "SELL";
|
|
112
|
+
}>>>;
|
|
113
|
+
outcomeIndex: z.ZodOptional<z.ZodNullable<z.ZodNumber>>;
|
|
114
|
+
title: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
115
|
+
slug: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
116
|
+
icon: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
117
|
+
eventSlug: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
118
|
+
outcome: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
119
|
+
name: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
120
|
+
pseudonym: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
121
|
+
bio: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
122
|
+
profileImage: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
123
|
+
profileImageOptimized: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
124
|
+
}, z.core.$loose>>;
|
|
125
|
+
type Trade = z.infer<typeof TradeSchema>;
|
|
126
|
+
type Activity = z.infer<typeof ActivitySchema>;
|
|
127
|
+
type Traded = z.infer<typeof TradedSchema>;
|
|
128
|
+
type ListTradesResponse = z.infer<typeof ListTradesResponseSchema>;
|
|
129
|
+
type ListActivityResponse = z.infer<typeof ListActivityResponseSchema>;
|
|
130
|
+
|
|
131
|
+
declare const HolderSchema: z.ZodObject<{
|
|
132
|
+
proxyWallet: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
133
|
+
bio: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
134
|
+
asset: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
135
|
+
pseudonym: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
136
|
+
amount: z.ZodOptional<z.ZodNullable<z.ZodNumber>>;
|
|
137
|
+
displayUsernamePublic: z.ZodOptional<z.ZodNullable<z.ZodBoolean>>;
|
|
138
|
+
outcomeIndex: z.ZodOptional<z.ZodNullable<z.ZodNumber>>;
|
|
139
|
+
name: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
140
|
+
profileImage: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
141
|
+
profileImageOptimized: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
142
|
+
}, z.core.$loose>;
|
|
143
|
+
declare const MetaHolderSchema: z.ZodObject<{
|
|
144
|
+
token: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
145
|
+
holders: z.ZodOptional<z.ZodNullable<z.ZodArray<z.ZodObject<{
|
|
146
|
+
proxyWallet: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
147
|
+
bio: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
148
|
+
asset: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
149
|
+
pseudonym: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
150
|
+
amount: z.ZodOptional<z.ZodNullable<z.ZodNumber>>;
|
|
151
|
+
displayUsernamePublic: z.ZodOptional<z.ZodNullable<z.ZodBoolean>>;
|
|
152
|
+
outcomeIndex: z.ZodOptional<z.ZodNullable<z.ZodNumber>>;
|
|
153
|
+
name: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
154
|
+
profileImage: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
155
|
+
profileImageOptimized: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
156
|
+
}, z.core.$loose>>>>;
|
|
157
|
+
}, z.core.$loose>;
|
|
158
|
+
declare const OpenInterestSchema: z.ZodObject<{
|
|
159
|
+
market: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
160
|
+
value: z.ZodOptional<z.ZodNullable<z.ZodNumber>>;
|
|
161
|
+
}, z.core.$loose>;
|
|
162
|
+
declare const MarketVolumeSchema: z.ZodObject<{
|
|
163
|
+
market: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
164
|
+
value: z.ZodOptional<z.ZodNullable<z.ZodNumber>>;
|
|
165
|
+
}, z.core.$loose>;
|
|
166
|
+
declare const LiveVolumeSchema: z.ZodObject<{
|
|
167
|
+
total: z.ZodOptional<z.ZodNullable<z.ZodNumber>>;
|
|
168
|
+
markets: z.ZodOptional<z.ZodNullable<z.ZodArray<z.ZodObject<{
|
|
169
|
+
market: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
170
|
+
value: z.ZodOptional<z.ZodNullable<z.ZodNumber>>;
|
|
171
|
+
}, z.core.$loose>>>>;
|
|
172
|
+
}, z.core.$loose>;
|
|
173
|
+
declare const ListMarketHoldersResponseSchema: z.ZodArray<z.ZodObject<{
|
|
174
|
+
token: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
175
|
+
holders: z.ZodOptional<z.ZodNullable<z.ZodArray<z.ZodObject<{
|
|
176
|
+
proxyWallet: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
177
|
+
bio: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
178
|
+
asset: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
179
|
+
pseudonym: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
180
|
+
amount: z.ZodOptional<z.ZodNullable<z.ZodNumber>>;
|
|
181
|
+
displayUsernamePublic: z.ZodOptional<z.ZodNullable<z.ZodBoolean>>;
|
|
182
|
+
outcomeIndex: z.ZodOptional<z.ZodNullable<z.ZodNumber>>;
|
|
183
|
+
name: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
184
|
+
profileImage: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
185
|
+
profileImageOptimized: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
186
|
+
}, z.core.$loose>>>>;
|
|
187
|
+
}, z.core.$loose>>;
|
|
188
|
+
declare const ListOpenInterestResponseSchema: z.ZodArray<z.ZodObject<{
|
|
189
|
+
market: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
190
|
+
value: z.ZodOptional<z.ZodNullable<z.ZodNumber>>;
|
|
191
|
+
}, z.core.$loose>>;
|
|
192
|
+
declare const FetchEventLiveVolumeResponseSchema: z.ZodArray<z.ZodObject<{
|
|
193
|
+
total: z.ZodOptional<z.ZodNullable<z.ZodNumber>>;
|
|
194
|
+
markets: z.ZodOptional<z.ZodNullable<z.ZodArray<z.ZodObject<{
|
|
195
|
+
market: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
196
|
+
value: z.ZodOptional<z.ZodNullable<z.ZodNumber>>;
|
|
197
|
+
}, z.core.$loose>>>>;
|
|
198
|
+
}, z.core.$loose>>;
|
|
199
|
+
type Holder = z.infer<typeof HolderSchema>;
|
|
200
|
+
type MetaHolder = z.infer<typeof MetaHolderSchema>;
|
|
201
|
+
type OpenInterest = z.infer<typeof OpenInterestSchema>;
|
|
202
|
+
type MarketVolume = z.infer<typeof MarketVolumeSchema>;
|
|
203
|
+
type LiveVolume = z.infer<typeof LiveVolumeSchema>;
|
|
204
|
+
type ListMarketHoldersResponse = z.infer<typeof ListMarketHoldersResponseSchema>;
|
|
205
|
+
type ListOpenInterestResponse = z.infer<typeof ListOpenInterestResponseSchema>;
|
|
206
|
+
type FetchEventLiveVolumeResponse = z.infer<typeof FetchEventLiveVolumeResponseSchema>;
|
|
207
|
+
|
|
208
|
+
declare const AddressSchema: z.ZodString;
|
|
209
|
+
declare const Hash64Schema: z.ZodString;
|
|
210
|
+
declare const ActivityTypeSchema: z.ZodEnum<{
|
|
211
|
+
TRADE: "TRADE";
|
|
212
|
+
SPLIT: "SPLIT";
|
|
213
|
+
MERGE: "MERGE";
|
|
214
|
+
REDEEM: "REDEEM";
|
|
215
|
+
REWARD: "REWARD";
|
|
216
|
+
CONVERSION: "CONVERSION";
|
|
217
|
+
MAKER_REBATE: "MAKER_REBATE";
|
|
218
|
+
}>;
|
|
219
|
+
declare const SideSchema: z.ZodEnum<{
|
|
220
|
+
BUY: "BUY";
|
|
221
|
+
SELL: "SELL";
|
|
222
|
+
}>;
|
|
223
|
+
declare const TimePeriodSchema: z.ZodEnum<{
|
|
224
|
+
DAY: "DAY";
|
|
225
|
+
WEEK: "WEEK";
|
|
226
|
+
MONTH: "MONTH";
|
|
227
|
+
ALL: "ALL";
|
|
228
|
+
}>;
|
|
229
|
+
declare const LeaderboardCategorySchema: z.ZodEnum<{
|
|
230
|
+
OVERALL: "OVERALL";
|
|
231
|
+
POLITICS: "POLITICS";
|
|
232
|
+
SPORTS: "SPORTS";
|
|
233
|
+
CRYPTO: "CRYPTO";
|
|
234
|
+
CULTURE: "CULTURE";
|
|
235
|
+
MENTIONS: "MENTIONS";
|
|
236
|
+
WEATHER: "WEATHER";
|
|
237
|
+
ECONOMICS: "ECONOMICS";
|
|
238
|
+
TECH: "TECH";
|
|
239
|
+
FINANCE: "FINANCE";
|
|
240
|
+
}>;
|
|
241
|
+
declare const LeaderboardOrderBySchema: z.ZodEnum<{
|
|
242
|
+
PNL: "PNL";
|
|
243
|
+
VOL: "VOL";
|
|
244
|
+
}>;
|
|
245
|
+
type Address = z.infer<typeof AddressSchema>;
|
|
246
|
+
type Hash64 = z.infer<typeof Hash64Schema>;
|
|
247
|
+
type ActivityType = z.infer<typeof ActivityTypeSchema>;
|
|
248
|
+
type Side = z.infer<typeof SideSchema>;
|
|
249
|
+
type TimePeriod = z.infer<typeof TimePeriodSchema>;
|
|
250
|
+
type LeaderboardCategory = z.infer<typeof LeaderboardCategorySchema>;
|
|
251
|
+
type LeaderboardOrderBy = z.infer<typeof LeaderboardOrderBySchema>;
|
|
252
|
+
|
|
253
|
+
declare const LeaderboardEntrySchema: z.ZodObject<{
|
|
254
|
+
rank: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
255
|
+
builder: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
256
|
+
volume: z.ZodOptional<z.ZodNullable<z.ZodNumber>>;
|
|
257
|
+
activeUsers: z.ZodOptional<z.ZodNullable<z.ZodNumber>>;
|
|
258
|
+
verified: z.ZodOptional<z.ZodNullable<z.ZodBoolean>>;
|
|
259
|
+
builderLogo: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
260
|
+
}, z.core.$loose>;
|
|
261
|
+
declare const BuilderVolumeEntrySchema: z.ZodObject<{
|
|
262
|
+
dt: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
263
|
+
builder: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
264
|
+
builderLogo: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
265
|
+
verified: z.ZodOptional<z.ZodNullable<z.ZodBoolean>>;
|
|
266
|
+
volume: z.ZodOptional<z.ZodNullable<z.ZodNumber>>;
|
|
267
|
+
activeUsers: z.ZodOptional<z.ZodNullable<z.ZodNumber>>;
|
|
268
|
+
rank: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
269
|
+
}, z.core.$loose>;
|
|
270
|
+
declare const TraderLeaderboardEntrySchema: z.ZodObject<{
|
|
271
|
+
rank: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
272
|
+
proxyWallet: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
273
|
+
userName: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
274
|
+
vol: z.ZodOptional<z.ZodNullable<z.ZodNumber>>;
|
|
275
|
+
pnl: z.ZodOptional<z.ZodNullable<z.ZodNumber>>;
|
|
276
|
+
profileImage: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
277
|
+
xUsername: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
278
|
+
verifiedBadge: z.ZodOptional<z.ZodNullable<z.ZodBoolean>>;
|
|
279
|
+
}, z.core.$loose>;
|
|
280
|
+
declare const ListBuilderLeaderboardResponseSchema: z.ZodArray<z.ZodObject<{
|
|
281
|
+
rank: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
282
|
+
builder: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
283
|
+
volume: z.ZodOptional<z.ZodNullable<z.ZodNumber>>;
|
|
284
|
+
activeUsers: z.ZodOptional<z.ZodNullable<z.ZodNumber>>;
|
|
285
|
+
verified: z.ZodOptional<z.ZodNullable<z.ZodBoolean>>;
|
|
286
|
+
builderLogo: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
287
|
+
}, z.core.$loose>>;
|
|
288
|
+
declare const ListBuilderVolumeResponseSchema: z.ZodArray<z.ZodObject<{
|
|
289
|
+
dt: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
290
|
+
builder: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
291
|
+
builderLogo: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
292
|
+
verified: z.ZodOptional<z.ZodNullable<z.ZodBoolean>>;
|
|
293
|
+
volume: z.ZodOptional<z.ZodNullable<z.ZodNumber>>;
|
|
294
|
+
activeUsers: z.ZodOptional<z.ZodNullable<z.ZodNumber>>;
|
|
295
|
+
rank: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
296
|
+
}, z.core.$loose>>;
|
|
297
|
+
declare const ListTraderLeaderboardResponseSchema: z.ZodArray<z.ZodObject<{
|
|
298
|
+
rank: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
299
|
+
proxyWallet: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
300
|
+
userName: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
301
|
+
vol: z.ZodOptional<z.ZodNullable<z.ZodNumber>>;
|
|
302
|
+
pnl: z.ZodOptional<z.ZodNullable<z.ZodNumber>>;
|
|
303
|
+
profileImage: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
304
|
+
xUsername: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
305
|
+
verifiedBadge: z.ZodOptional<z.ZodNullable<z.ZodBoolean>>;
|
|
306
|
+
}, z.core.$loose>>;
|
|
307
|
+
type LeaderboardEntry = z.infer<typeof LeaderboardEntrySchema>;
|
|
308
|
+
type BuilderVolumeEntry = z.infer<typeof BuilderVolumeEntrySchema>;
|
|
309
|
+
type TraderLeaderboardEntry = z.infer<typeof TraderLeaderboardEntrySchema>;
|
|
310
|
+
type ListBuilderLeaderboardResponse = z.infer<typeof ListBuilderLeaderboardResponseSchema>;
|
|
311
|
+
type ListBuilderVolumeResponse = z.infer<typeof ListBuilderVolumeResponseSchema>;
|
|
312
|
+
type ListTraderLeaderboardResponse = z.infer<typeof ListTraderLeaderboardResponseSchema>;
|
|
313
|
+
|
|
314
|
+
declare const PositionSchema: z.ZodObject<{
|
|
315
|
+
proxyWallet: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
316
|
+
asset: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
317
|
+
conditionId: z.ZodOptional<z.ZodNullable<z.ZodPipe<z.ZodString, z.ZodTransform<ConditionId, string>>>>;
|
|
318
|
+
size: z.ZodOptional<z.ZodNullable<z.ZodNumber>>;
|
|
319
|
+
avgPrice: z.ZodOptional<z.ZodNullable<z.ZodNumber>>;
|
|
320
|
+
initialValue: z.ZodOptional<z.ZodNullable<z.ZodNumber>>;
|
|
321
|
+
currentValue: z.ZodOptional<z.ZodNullable<z.ZodNumber>>;
|
|
322
|
+
cashPnl: z.ZodOptional<z.ZodNullable<z.ZodNumber>>;
|
|
323
|
+
percentPnl: z.ZodOptional<z.ZodNullable<z.ZodNumber>>;
|
|
324
|
+
totalBought: z.ZodOptional<z.ZodNullable<z.ZodNumber>>;
|
|
325
|
+
realizedPnl: z.ZodOptional<z.ZodNullable<z.ZodNumber>>;
|
|
326
|
+
percentRealizedPnl: z.ZodOptional<z.ZodNullable<z.ZodNumber>>;
|
|
327
|
+
curPrice: z.ZodOptional<z.ZodNullable<z.ZodNumber>>;
|
|
328
|
+
redeemable: z.ZodOptional<z.ZodNullable<z.ZodBoolean>>;
|
|
329
|
+
mergeable: z.ZodOptional<z.ZodNullable<z.ZodBoolean>>;
|
|
330
|
+
title: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
331
|
+
slug: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
332
|
+
icon: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
333
|
+
eventId: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
334
|
+
eventSlug: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
335
|
+
outcome: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
336
|
+
outcomeIndex: z.ZodOptional<z.ZodNullable<z.ZodNumber>>;
|
|
337
|
+
oppositeOutcome: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
338
|
+
oppositeAsset: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
339
|
+
endDate: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
340
|
+
negativeRisk: z.ZodOptional<z.ZodNullable<z.ZodBoolean>>;
|
|
341
|
+
}, z.core.$loose>;
|
|
342
|
+
declare const ClosedPositionSchema: z.ZodObject<{
|
|
343
|
+
proxyWallet: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
344
|
+
asset: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
345
|
+
conditionId: z.ZodOptional<z.ZodNullable<z.ZodPipe<z.ZodString, z.ZodTransform<ConditionId, string>>>>;
|
|
346
|
+
avgPrice: z.ZodOptional<z.ZodNullable<z.ZodNumber>>;
|
|
347
|
+
totalBought: z.ZodOptional<z.ZodNullable<z.ZodNumber>>;
|
|
348
|
+
realizedPnl: z.ZodOptional<z.ZodNullable<z.ZodNumber>>;
|
|
349
|
+
curPrice: z.ZodOptional<z.ZodNullable<z.ZodNumber>>;
|
|
350
|
+
timestamp: z.ZodOptional<z.ZodNullable<z.ZodNumber>>;
|
|
351
|
+
title: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
352
|
+
slug: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
353
|
+
icon: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
354
|
+
eventSlug: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
355
|
+
outcome: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
356
|
+
outcomeIndex: z.ZodOptional<z.ZodNullable<z.ZodNumber>>;
|
|
357
|
+
oppositeOutcome: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
358
|
+
oppositeAsset: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
359
|
+
endDate: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
360
|
+
}, z.core.$loose>;
|
|
361
|
+
declare const ValueSchema: z.ZodObject<{
|
|
362
|
+
user: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
363
|
+
value: z.ZodOptional<z.ZodNullable<z.ZodNumber>>;
|
|
364
|
+
}, z.core.$loose>;
|
|
365
|
+
declare const MarketPositionV1Schema: z.ZodObject<{
|
|
366
|
+
proxyWallet: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
367
|
+
name: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
368
|
+
profileImage: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
369
|
+
verified: z.ZodOptional<z.ZodNullable<z.ZodBoolean>>;
|
|
370
|
+
asset: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
371
|
+
conditionId: z.ZodOptional<z.ZodNullable<z.ZodPipe<z.ZodString, z.ZodTransform<ConditionId, string>>>>;
|
|
372
|
+
avgPrice: z.ZodOptional<z.ZodNullable<z.ZodNumber>>;
|
|
373
|
+
size: z.ZodOptional<z.ZodNullable<z.ZodNumber>>;
|
|
374
|
+
currPrice: z.ZodOptional<z.ZodNullable<z.ZodNumber>>;
|
|
375
|
+
currentValue: z.ZodOptional<z.ZodNullable<z.ZodNumber>>;
|
|
376
|
+
cashPnl: z.ZodOptional<z.ZodNullable<z.ZodNumber>>;
|
|
377
|
+
totalBought: z.ZodOptional<z.ZodNullable<z.ZodNumber>>;
|
|
378
|
+
realizedPnl: z.ZodOptional<z.ZodNullable<z.ZodNumber>>;
|
|
379
|
+
totalPnl: z.ZodOptional<z.ZodNullable<z.ZodNumber>>;
|
|
380
|
+
outcome: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
381
|
+
outcomeIndex: z.ZodOptional<z.ZodNullable<z.ZodNumber>>;
|
|
382
|
+
}, z.core.$loose>;
|
|
383
|
+
declare const MetaMarketPositionV1Schema: z.ZodObject<{
|
|
384
|
+
token: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
385
|
+
positions: z.ZodOptional<z.ZodNullable<z.ZodArray<z.ZodObject<{
|
|
386
|
+
proxyWallet: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
387
|
+
name: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
388
|
+
profileImage: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
389
|
+
verified: z.ZodOptional<z.ZodNullable<z.ZodBoolean>>;
|
|
390
|
+
asset: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
391
|
+
conditionId: z.ZodOptional<z.ZodNullable<z.ZodPipe<z.ZodString, z.ZodTransform<ConditionId, string>>>>;
|
|
392
|
+
avgPrice: z.ZodOptional<z.ZodNullable<z.ZodNumber>>;
|
|
393
|
+
size: z.ZodOptional<z.ZodNullable<z.ZodNumber>>;
|
|
394
|
+
currPrice: z.ZodOptional<z.ZodNullable<z.ZodNumber>>;
|
|
395
|
+
currentValue: z.ZodOptional<z.ZodNullable<z.ZodNumber>>;
|
|
396
|
+
cashPnl: z.ZodOptional<z.ZodNullable<z.ZodNumber>>;
|
|
397
|
+
totalBought: z.ZodOptional<z.ZodNullable<z.ZodNumber>>;
|
|
398
|
+
realizedPnl: z.ZodOptional<z.ZodNullable<z.ZodNumber>>;
|
|
399
|
+
totalPnl: z.ZodOptional<z.ZodNullable<z.ZodNumber>>;
|
|
400
|
+
outcome: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
401
|
+
outcomeIndex: z.ZodOptional<z.ZodNullable<z.ZodNumber>>;
|
|
402
|
+
}, z.core.$loose>>>>;
|
|
403
|
+
}, z.core.$loose>;
|
|
404
|
+
declare const ListPositionsResponseSchema: z.ZodArray<z.ZodObject<{
|
|
405
|
+
proxyWallet: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
406
|
+
asset: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
407
|
+
conditionId: z.ZodOptional<z.ZodNullable<z.ZodPipe<z.ZodString, z.ZodTransform<ConditionId, string>>>>;
|
|
408
|
+
size: z.ZodOptional<z.ZodNullable<z.ZodNumber>>;
|
|
409
|
+
avgPrice: z.ZodOptional<z.ZodNullable<z.ZodNumber>>;
|
|
410
|
+
initialValue: z.ZodOptional<z.ZodNullable<z.ZodNumber>>;
|
|
411
|
+
currentValue: z.ZodOptional<z.ZodNullable<z.ZodNumber>>;
|
|
412
|
+
cashPnl: z.ZodOptional<z.ZodNullable<z.ZodNumber>>;
|
|
413
|
+
percentPnl: z.ZodOptional<z.ZodNullable<z.ZodNumber>>;
|
|
414
|
+
totalBought: z.ZodOptional<z.ZodNullable<z.ZodNumber>>;
|
|
415
|
+
realizedPnl: z.ZodOptional<z.ZodNullable<z.ZodNumber>>;
|
|
416
|
+
percentRealizedPnl: z.ZodOptional<z.ZodNullable<z.ZodNumber>>;
|
|
417
|
+
curPrice: z.ZodOptional<z.ZodNullable<z.ZodNumber>>;
|
|
418
|
+
redeemable: z.ZodOptional<z.ZodNullable<z.ZodBoolean>>;
|
|
419
|
+
mergeable: z.ZodOptional<z.ZodNullable<z.ZodBoolean>>;
|
|
420
|
+
title: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
421
|
+
slug: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
422
|
+
icon: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
423
|
+
eventId: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
424
|
+
eventSlug: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
425
|
+
outcome: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
426
|
+
outcomeIndex: z.ZodOptional<z.ZodNullable<z.ZodNumber>>;
|
|
427
|
+
oppositeOutcome: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
428
|
+
oppositeAsset: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
429
|
+
endDate: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
430
|
+
negativeRisk: z.ZodOptional<z.ZodNullable<z.ZodBoolean>>;
|
|
431
|
+
}, z.core.$loose>>;
|
|
432
|
+
declare const ListClosedPositionsResponseSchema: z.ZodArray<z.ZodObject<{
|
|
433
|
+
proxyWallet: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
434
|
+
asset: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
435
|
+
conditionId: z.ZodOptional<z.ZodNullable<z.ZodPipe<z.ZodString, z.ZodTransform<ConditionId, string>>>>;
|
|
436
|
+
avgPrice: z.ZodOptional<z.ZodNullable<z.ZodNumber>>;
|
|
437
|
+
totalBought: z.ZodOptional<z.ZodNullable<z.ZodNumber>>;
|
|
438
|
+
realizedPnl: z.ZodOptional<z.ZodNullable<z.ZodNumber>>;
|
|
439
|
+
curPrice: z.ZodOptional<z.ZodNullable<z.ZodNumber>>;
|
|
440
|
+
timestamp: z.ZodOptional<z.ZodNullable<z.ZodNumber>>;
|
|
441
|
+
title: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
442
|
+
slug: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
443
|
+
icon: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
444
|
+
eventSlug: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
445
|
+
outcome: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
446
|
+
outcomeIndex: z.ZodOptional<z.ZodNullable<z.ZodNumber>>;
|
|
447
|
+
oppositeOutcome: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
448
|
+
oppositeAsset: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
449
|
+
endDate: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
450
|
+
}, z.core.$loose>>;
|
|
451
|
+
declare const FetchPortfolioValueResponseSchema: z.ZodArray<z.ZodObject<{
|
|
452
|
+
user: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
453
|
+
value: z.ZodOptional<z.ZodNullable<z.ZodNumber>>;
|
|
454
|
+
}, z.core.$loose>>;
|
|
455
|
+
declare const ListMarketPositionsResponseSchema: z.ZodArray<z.ZodObject<{
|
|
456
|
+
token: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
457
|
+
positions: z.ZodOptional<z.ZodNullable<z.ZodArray<z.ZodObject<{
|
|
458
|
+
proxyWallet: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
459
|
+
name: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
460
|
+
profileImage: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
461
|
+
verified: z.ZodOptional<z.ZodNullable<z.ZodBoolean>>;
|
|
462
|
+
asset: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
463
|
+
conditionId: z.ZodOptional<z.ZodNullable<z.ZodPipe<z.ZodString, z.ZodTransform<ConditionId, string>>>>;
|
|
464
|
+
avgPrice: z.ZodOptional<z.ZodNullable<z.ZodNumber>>;
|
|
465
|
+
size: z.ZodOptional<z.ZodNullable<z.ZodNumber>>;
|
|
466
|
+
currPrice: z.ZodOptional<z.ZodNullable<z.ZodNumber>>;
|
|
467
|
+
currentValue: z.ZodOptional<z.ZodNullable<z.ZodNumber>>;
|
|
468
|
+
cashPnl: z.ZodOptional<z.ZodNullable<z.ZodNumber>>;
|
|
469
|
+
totalBought: z.ZodOptional<z.ZodNullable<z.ZodNumber>>;
|
|
470
|
+
realizedPnl: z.ZodOptional<z.ZodNullable<z.ZodNumber>>;
|
|
471
|
+
totalPnl: z.ZodOptional<z.ZodNullable<z.ZodNumber>>;
|
|
472
|
+
outcome: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
473
|
+
outcomeIndex: z.ZodOptional<z.ZodNullable<z.ZodNumber>>;
|
|
474
|
+
}, z.core.$loose>>>>;
|
|
475
|
+
}, z.core.$loose>>;
|
|
476
|
+
type Position = z.infer<typeof PositionSchema>;
|
|
477
|
+
type ClosedPosition = z.infer<typeof ClosedPositionSchema>;
|
|
478
|
+
type Value = z.infer<typeof ValueSchema>;
|
|
479
|
+
type MarketPositionV1 = z.infer<typeof MarketPositionV1Schema>;
|
|
480
|
+
type MetaMarketPositionV1 = z.infer<typeof MetaMarketPositionV1Schema>;
|
|
481
|
+
type ListPositionsResponse = z.infer<typeof ListPositionsResponseSchema>;
|
|
482
|
+
type ListClosedPositionsResponse = z.infer<typeof ListClosedPositionsResponseSchema>;
|
|
483
|
+
type FetchPortfolioValueResponse = z.infer<typeof FetchPortfolioValueResponseSchema>;
|
|
484
|
+
type ListMarketPositionsResponse = z.infer<typeof ListMarketPositionsResponseSchema>;
|
|
485
|
+
|
|
486
|
+
export { type Activity, ActivitySchema, type ActivityType, ActivityTypeSchema, type Address, AddressSchema, type BuilderVolumeEntry, BuilderVolumeEntrySchema, type ClosedPosition, ClosedPositionSchema, 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 ListMarketHoldersResponse, ListMarketHoldersResponseSchema, type ListMarketPositionsResponse, ListMarketPositionsResponseSchema, type ListOpenInterestResponse, ListOpenInterestResponseSchema, type ListPositionsResponse, ListPositionsResponseSchema, type ListTraderLeaderboardResponse, ListTraderLeaderboardResponseSchema, type ListTradesResponse, ListTradesResponseSchema, type LiveVolume, LiveVolumeSchema, type MarketPositionV1, MarketPositionV1Schema, type MarketVolume, MarketVolumeSchema, type MetaHolder, MetaHolderSchema, type MetaMarketPositionV1, MetaMarketPositionV1Schema, type OpenInterest, OpenInterestSchema, type Position, PositionSchema, type Side, SideSchema, type TimePeriod, TimePeriodSchema, type Trade, TradeSchema, type Traded, TradedSchema, type TraderLeaderboardEntry, TraderLeaderboardEntrySchema, type Value, ValueSchema };
|
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
import {D}from'../chunk-CH54ACHI.js';import {z as z$1}from'zod';var i=z$1.string(),l=z$1.string(),u=z$1.enum(["TRADE","SPLIT","MERGE","REDEEM","REWARD","CONVERSION","MAKER_REBATE"]),a=z$1.enum(["BUY","SELL"]),v=z$1.enum(["DAY","WEEK","MONTH","ALL"]),I=z$1.enum(["OVERALL","POLITICS","SPORTS","CRYPTO","CULTURE","MENTIONS","WEATHER","ECONOMICS","TECH","FINANCE"]),E=z$1.enum(["PNL","VOL"]);var p=z$1.looseObject({proxyWallet:i.nullish(),side:a.nullish(),asset:z$1.string().nullish(),conditionId:D.nullish(),size:z$1.number().nullish(),price:z$1.number().nullish(),timestamp:z$1.number().int().nullish(),title:z$1.string().nullish(),slug:z$1.string().nullish(),icon: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()}),h=z$1.looseObject({proxyWallet:i.nullish(),timestamp:z$1.number().int().nullish(),conditionId:D.nullish(),type:u.nullish(),size:z$1.number().nullish(),usdcSize:z$1.number().nullish(),transactionHash:z$1.string().nullish(),price:z$1.number().nullish(),asset:z$1.string().nullish(),side:a.nullish(),outcomeIndex:z$1.number().int().nullish(),title:z$1.string().nullish(),slug:z$1.string().nullish(),icon:z$1.string().nullish(),eventSlug:z$1.string().nullish(),outcome:z$1.string().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()}),k=z$1.looseObject({user:i.nullish(),traded:z$1.number().int().nullish()}),C=z$1.array(p),B=z$1.array(h);var m=z$1.looseObject({proxyWallet:i.nullish(),bio:z$1.string().nullish(),asset:z$1.string().nullish(),pseudonym:z$1.string().nullish(),amount:z$1.number().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()}),c=z$1.looseObject({token:z$1.string().nullish(),holders:z$1.array(m).nullish()}),d=z$1.looseObject({market:l.nullish(),value:z$1.number().nullish()}),y=z$1.looseObject({market:l.nullish(),value:z$1.number().nullish()}),f=z$1.looseObject({total:z$1.number().nullish(),markets:z$1.array(y).nullish()}),W=z$1.array(c),F=z$1.array(d),U=z$1.array(f);var b=z$1.looseObject({rank:z$1.string().nullish(),builder:z$1.string().nullish(),volume:z$1.number().nullish(),activeUsers:z$1.number().int().nullish(),verified:z$1.boolean().nullish(),builderLogo:z$1.string().nullish()}),g=z$1.looseObject({dt:z$1.string().nullish(),builder:z$1.string().nullish(),builderLogo:z$1.string().nullish(),verified:z$1.boolean().nullish(),volume:z$1.number().nullish(),activeUsers:z$1.number().int().nullish(),rank:z$1.string().nullish()}),S=z$1.looseObject({rank:z$1.string().nullish(),proxyWallet:i.nullish(),userName:z$1.string().nullish(),vol:z$1.number().nullish(),pnl:z$1.number().nullish(),profileImage:z$1.string().nullish(),xUsername:z$1.string().nullish(),verifiedBadge:z$1.boolean().nullish()}),G=z$1.array(b),_=z$1.array(g),q=z$1.array(S);var x=z$1.looseObject({proxyWallet:i.nullish(),asset:z$1.string().nullish(),conditionId:D.nullish(),size:z$1.number().nullish(),avgPrice:z$1.number().nullish(),initialValue:z$1.number().nullish(),currentValue:z$1.number().nullish(),cashPnl:z$1.number().nullish(),percentPnl:z$1.number().nullish(),totalBought:z$1.number().nullish(),realizedPnl:z$1.number().nullish(),percentRealizedPnl:z$1.number().nullish(),curPrice:z$1.number().nullish(),redeemable:z$1.boolean().nullish(),mergeable:z$1.boolean().nullish(),title:z$1.string().nullish(),slug:z$1.string().nullish(),icon: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:z$1.string().nullish(),endDate:z$1.string().nullish(),negativeRisk:z$1.boolean().nullish()}),L=z$1.looseObject({proxyWallet:i.nullish(),asset:z$1.string().nullish(),conditionId:D.nullish(),avgPrice:z$1.number().nullish(),totalBought:z$1.number().nullish(),realizedPnl:z$1.number().nullish(),curPrice:z$1.number().nullish(),timestamp:z$1.number().int().nullish(),title:z$1.string().nullish(),slug:z$1.string().nullish(),icon: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:z$1.string().nullish(),endDate:z$1.string().nullish()}),z=z$1.looseObject({user:i.nullish(),value:z$1.number().nullish()}),R=z$1.looseObject({proxyWallet:i.nullish(),name:z$1.string().nullish(),profileImage:z$1.string().nullish(),verified:z$1.boolean().nullish(),asset:z$1.string().nullish(),conditionId:D.nullish(),avgPrice:z$1.number().nullish(),size:z$1.number().nullish(),currPrice:z$1.number().nullish(),currentValue:z$1.number().nullish(),cashPnl:z$1.number().nullish(),totalBought:z$1.number().nullish(),realizedPnl:z$1.number().nullish(),totalPnl:z$1.number().nullish(),outcome:z$1.string().nullish(),outcomeIndex:z$1.number().int().nullish()}),P=z$1.looseObject({token:z$1.string().nullish(),positions:z$1.array(R).nullish()}),Z=z$1.array(x),$=z$1.array(L),ee=z$1.array(z),te=z$1.array(P);export{h as ActivitySchema,u as ActivityTypeSchema,i as AddressSchema,g as BuilderVolumeEntrySchema,L as ClosedPositionSchema,U as FetchEventLiveVolumeResponseSchema,ee as FetchPortfolioValueResponseSchema,l as Hash64Schema,m as HolderSchema,I as LeaderboardCategorySchema,b as LeaderboardEntrySchema,E as LeaderboardOrderBySchema,B as ListActivityResponseSchema,G as ListBuilderLeaderboardResponseSchema,_ as ListBuilderVolumeResponseSchema,$ as ListClosedPositionsResponseSchema,W as ListMarketHoldersResponseSchema,te as ListMarketPositionsResponseSchema,F as ListOpenInterestResponseSchema,Z as ListPositionsResponseSchema,q as ListTraderLeaderboardResponseSchema,C as ListTradesResponseSchema,f as LiveVolumeSchema,R as MarketPositionV1Schema,y as MarketVolumeSchema,c as MetaHolderSchema,P as MetaMarketPositionV1Schema,d as OpenInterestSchema,x as PositionSchema,a as SideSchema,v as TimePeriodSchema,p as TradeSchema,k as TradedSchema,S as TraderLeaderboardEntrySchema,z as ValueSchema};//# sourceMappingURL=index.js.map
|
|
2
|
+
//# sourceMappingURL=index.js.map
|