@polymarket/bindings 0.5.0 → 0.6.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.
@@ -1,2 +1,2 @@
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
1
+ import {a,F,e,t,s,r}from'../chunk-UDKFL2IM.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-UDKFL2IM.js';import {A as A$1,qa,Oa,ea,Ga,oa,La}from'../chunk-AY4D74DC.js';export{La as TagIdSchema}from'../chunk-AY4D74DC.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(A$1),O=z$1.object({id:z$1.number().int(),marketId:E.nullish(),eventId:oa.nullish(),questionId:Ga.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:ea.nullish(),negRiskRequestId:z$1.string().nullish(),txHash:Oa.nullish(),createdAt:qa.nullish(),queuedAt:qa.nullish(),scheduledFor:qa.nullish(),txTimestamp:qa.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:qa.nullish(),updatedAt:qa.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:qa.nullish(),discordUsername:z$1.string().nullish(),xUsername:z$1.string().nullish(),verifiedBadge:z$1.boolean().nullish(),dubPartnerId:z$1.string().nullish(),termsAcceptedAt:qa.nullish(),viewOnlyAcknowledgedAt:qa.nullish(),isReferralRestricted:z$1.boolean().nullish()}).transform(({proxyWallet:i,...l})=>({...l,wallet:i})),Ee=z$1.object({createdAt:qa.nullish(),proxyWallet:ea.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:La,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
@@ -43,7 +43,9 @@ type ClobRewardId = Tagged<string, 'ClobRewardId'>;
43
43
  type CommentId = Tagged<string, 'CommentId'>;
44
44
  type ComboActivityId = Tagged<string, 'ComboActivityId'>;
45
45
  type ComboConditionId = Tagged<HexString, 'ComboConditionId'>;
46
- type CtfConditionId = Tagged<HexString, 'CtfConditionId'>;
46
+ type ConditionId = Tagged<HexString, 'ConditionId'>;
47
+ /** @deprecated Use {@link ConditionId}. */
48
+ type CtfConditionId = ConditionId;
47
49
  type CollectionId = Tagged<string, 'CollectionId'>;
48
50
  type EventCreatorId = Tagged<string, 'EventCreatorId'>;
49
51
  type EventExternalPartnerMappingId = Tagged<number, 'EventExternalPartnerMappingId'>;
@@ -83,7 +85,9 @@ declare function toChatId(value: string): ChatId;
83
85
  declare function toClobRewardId(value: string): ClobRewardId;
84
86
  declare function toCommentId(value: string): CommentId;
85
87
  declare function toComboActivityId(value: string): ComboActivityId;
86
- declare function toCtfConditionId(value: string): CtfConditionId;
88
+ declare function toConditionId(value: string): ConditionId;
89
+ /** @deprecated Use {@link toConditionId}. */
90
+ declare const toCtfConditionId: typeof toConditionId;
87
91
  declare function toComboConditionId(value: string): ComboConditionId;
88
92
  declare function toCollectionId(value: string): CollectionId;
89
93
  declare function toEventCreatorId(value: string): EventCreatorId;
@@ -122,8 +126,13 @@ declare const ClobRewardIdSchema: z.ZodPipe<z.ZodString, z.ZodTransform<ClobRewa
122
126
  declare const CommentIdSchema: z.ZodPipe<z.ZodString, z.ZodTransform<CommentId, string>>;
123
127
  declare const ComboActivityIdSchema: z.ZodPipe<z.ZodString, z.ZodTransform<ComboActivityId, string>>;
124
128
  declare const ComboConditionIdSchema: z.ZodPipe<z.ZodString, z.ZodTransform<ComboConditionId, string>>;
125
- declare const CtfConditionIdSchema: z.ZodPipe<z.ZodString, z.ZodTransform<CtfConditionId, string>>;
126
- declare const OptionalCtfConditionIdSchema: z.ZodPipe<z.ZodTransform<unknown, unknown>, z.ZodOptional<z.ZodPipe<z.ZodString, z.ZodTransform<CtfConditionId, string>>>>;
129
+ declare const ConditionIdSchema: z.ZodPipe<z.ZodString, z.ZodTransform<ConditionId, string>>;
130
+ /** @deprecated Use {@link ConditionIdSchema}. */
131
+ declare const CtfConditionIdSchema: z.ZodPipe<z.ZodString, z.ZodTransform<ConditionId, string>>;
132
+ declare const OptionalConditionIdSchema: z.ZodPipe<z.ZodTransform<unknown, unknown>, z.ZodOptional<z.ZodPipe<z.ZodString, z.ZodTransform<ConditionId, string>>>>;
133
+ /** @deprecated Use {@link OptionalConditionIdSchema}. */
134
+ declare const OptionalCtfConditionIdSchema: z.ZodPipe<z.ZodTransform<unknown, unknown>, z.ZodOptional<z.ZodPipe<z.ZodString, z.ZodTransform<ConditionId, string>>>>;
135
+ declare const ConditionIdResponseSchema: z.ZodCustom<ConditionId, ConditionId>;
127
136
  declare const EvmAddressSchema: z.ZodPipe<z.ZodString, z.ZodTransform<EvmAddress, string>>;
128
137
  declare const EpochMillisecondsSchema: z.ZodPipe<z.ZodNumber, z.ZodTransform<EpochMilliseconds, number>>;
129
138
  declare const EpochSecondsToMillisecondsSchema: z.ZodPipe<z.ZodNumber, z.ZodTransform<EpochMilliseconds, number>>;
@@ -183,4 +192,4 @@ declare function emptyStringToNull(value: unknown): unknown;
183
192
  */
184
193
  declare const OptionalDecimalStringSchema: z.ZodPipe<z.ZodTransform<unknown, unknown>, z.ZodOptional<z.ZodNullable<z.ZodPipe<z.ZodString, z.ZodTransform<DecimalString, string>>>>>;
185
194
 
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 };
195
+ export { type ApiKey, ApiKeySchema, type BaseUnits, BaseUnitsSchema, type BestLineId, type BuilderCode, BuilderCodeSchema, type CategoryId, CategoryIdSchema, type ChatId, type ClobRewardId, ClobRewardIdSchema, type CollectionId, type ComboActivityId, ComboActivityIdSchema, type ComboConditionId, ComboConditionIdSchema, type CommentId, CommentIdSchema, CommentParentEntityType, CommentParentEntityTypeSchema, type ConditionId, ConditionIdResponseSchema, ConditionIdSchema, type CtfConditionId, CtfConditionIdSchema, DateLikeToIsoDateTimeStringSchema, type DecimalString, DecimalStringSchema, DecimalishSchema, E6BigIntStringToDecimalStringSchema, EpochLikeToIsoDateTimeStringSchema, type EpochMilliseconds, EpochMillisecondsSchema, EpochMillisecondsStringSchema, EpochMillisecondsToIsoDateTimeStringSchema, EpochSecondsToMillisecondsSchema, type EventCreatorId, type EventExternalPartnerMappingId, type EventId, EventIdSchema, EvmAddressSchema, ISOCalendarDateSchema, type ISOCalendarDateString, type ISODateString, ISODateStringSchema, type ImageOptimizationId, ImageOptimizationIdSchema, type InternalUserId, InternalUserIdSchema, type IsoCalendarDateString, IsoCalendarDateStringSchema, type IsoDateTimeString, IsoDateTimeStringSchema, type MarketId, MarketIdSchema, type MixedDateTimeString, MixedDateTimeStringSchema, type NotificationId, NotificationIdSchema, OptionalConditionIdSchema, OptionalCtfConditionIdSchema, OptionalDateLikeToIsoDateTimeStringSchema, OptionalDecimalStringSchema, 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, toConditionId, 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,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
1
+ export{V as ApiKeySchema,Ta as BaseUnitsSchema,W as BuilderCodeSchema,U as CategoryIdSchema,X as ClobRewardIdSchema,Z as ComboActivityIdSchema,_ as ComboConditionIdSchema,Y as CommentIdSchema,a as CommentParentEntityType,za as CommentParentEntityTypeSchema,da as ConditionIdResponseSchema,$ as ConditionIdSchema,aa as CtfConditionIdSchema,ia as DateLikeToIsoDateTimeStringSchema,Pa as DecimalStringSchema,Ra as DecimalishSchema,Qa as E6BigIntStringToDecimalStringSchema,ja as EpochLikeToIsoDateTimeStringSchema,fa as EpochMillisecondsSchema,ha as EpochMillisecondsStringSchema,ma as EpochMillisecondsToIsoDateTimeStringSchema,ga as EpochSecondsToMillisecondsSchema,oa as EventIdSchema,ea as EvmAddressSchema,ua as ISOCalendarDateSchema,ta as ISODateStringSchema,va as ImageOptimizationIdSchema,wa as InternalUserIdSchema,ra as IsoCalendarDateStringSchema,qa as IsoDateTimeStringSchema,xa as MarketIdSchema,sa as MixedDateTimeStringSchema,ya as NotificationIdSchema,ba as OptionalConditionIdSchema,ca as OptionalCtfConditionIdSchema,ka as OptionalDateLikeToIsoDateTimeStringSchema,Va as OptionalDecimalStringSchema,la as OptionalEpochLikeToIsoDateTimeStringSchema,na as OptionalEpochMillisecondsToIsoDateTimeStringSchema,Aa as OrderIdSchema,b as OrderSide,Ba as OrderSideSchema,c as OrderType,Ca as OrderTypeSchema,Ea as PaginationCursorSchema,Fa as PositionIdSchema,Sa as PositiveDecimalNumberSchema,Ga as QuestionIdSchema,Ha as ResolutionRequestIdSchema,Ia as RfqIdSchema,Ja as RfqQuoteIdSchema,Ka as RfqRequestorPublicIdSchema,La as TagIdSchema,pa as TickSizeValueSchema,Ma as TokenIdSchema,d as TradeStatus,Da as TradeStatusSchema,Na as TransactionIdSchema,Oa as TxHashSchema,Ua as emptyStringToNull,h as toApiKey,T as toBaseUnits,e as toBestLineId,f as toBuilderCode,i as toCategoryId,j as toChatId,k as toClobRewardId,q as toCollectionId,m as toComboActivityId,p as toComboConditionId,l as toCommentId,n as toConditionId,o as toCtfConditionId,S as toDecimalString,t as toEpochMilliseconds,r as toEventCreatorId,s as toEventExternalPartnerMappingId,u as toEventId,v as toImageOptimizationId,w as toInternalUserId,x as toIsoCalendarDateString,y as toIsoDateTimeString,A as toMarketId,z as toMixedDateTimeString,B as toNotificationId,C as toOrderId,E as toPaginationCursor,D as toPartnerId,F as toPositionId,G as toQuestionId,H as toResolutionRequestId,I as toRfqId,J as toRfqQuoteId,K as toRfqRequestorPublicId,L as toSeriesId,M as toSportId,N as toTagId,O as toTeamId,P as toTemplateId,R as toTokenId,Q as toTransactionId,g as toUuid}from'./chunk-AY4D74DC.js';//# sourceMappingURL=index.js.map
2
2
  //# sourceMappingURL=index.js.map
@@ -1,2 +1,2 @@
1
- export{$ as FetchPerpsAccountConfigResponseSchema,S as FetchPerpsAccountStatsResponseSchema,Q as FetchPerpsBalancesResponseSchema,Oa as FetchPerpsCandlesResponseSchema,Na as FetchPerpsFeesResponseSchema,Ja as FetchPerpsFundingHistoryResponseSchema,sa as FetchPerpsInstrumentsResponseSchema,ob as FetchPerpsOpenOrdersResponseSchema,nb as FetchPerpsOrdersResponseSchema,W as FetchPerpsPortfolioResponseSchema,ya as FetchPerpsStatisticsResponseSchema,ua as FetchPerpsTickersResponseSchema,Ha as FetchPerpsTradesResponseSchema,bb as FetchPerpsUnreadNotificationsCountResponseSchema,ja as ListPerpsDepositsResponseSchema,ba as ListPerpsEquityHistoryResponseSchema,rb as ListPerpsFillsResponseSchema,Y as ListPerpsFundingPaymentsResponseSchema,ab as ListPerpsNotificationsResponseSchema,da as ListPerpsPnlHistoryResponseSchema,ma as ListPerpsWithdrawalsResponseSchema,cb as MarkPerpsNotificationsReadResponseSchema,_ as PerpsAccountConfigSchema,qb as PerpsAccountFillSchema,sb as PerpsAccountFillUpdateSchema,Z as PerpsAccountFundingPaymentEntrySchema,X as PerpsAccountFundingPaymentSchema,R as PerpsAccountStatsSchema,J as PerpsAssetSchema,P as PerpsBalanceSchema,Da as PerpsBboSchema,Ea as PerpsBboUpdateSchema,Aa as PerpsBookLevelSchema,Ba as PerpsBookSchema,Ca as PerpsBookUpdateSchema,kb as PerpsCancelAllOrdersResponseSchema,jb as PerpsCancelOrderResultSchema,wa as PerpsCandleSchema,c as PerpsClientOrderIdSchema,hb as PerpsCommandAckSchema,gb as PerpsCommandStatusSchema,ga as PerpsCreateProxyResponseSchema,fa as PerpsCredentialsResponseSchema,L as PerpsDataResponseSchema,k as PerpsDecimalInputSchema,ha as PerpsDeleteProxyResponseSchema,ia as PerpsDepositSchema,r as PerpsDepositStatus,D as PerpsDepositStatusSchema,ka as PerpsDepositUpdateSchema,i as PerpsEntityIdSchema,aa as PerpsEquityPointSchema,La as PerpsFeeScheduleEntrySchema,Ka as PerpsFeeTierSchema,Ma as PerpsFeesInfoSchema,j as PerpsFundingIntervalSchema,f as PerpsFundingPaymentIdSchema,Ia as PerpsFundingRateSchema,m as PerpsInstrumentCategory,y as PerpsInstrumentCategorySchema,a as PerpsInstrumentIdSchema,ra as PerpsInstrumentSchema,l as PerpsInstrumentType,x as PerpsInstrumentTypeSchema,t as PerpsInternalTransferDirection,F as PerpsInternalTransferDirectionSchema,h as PerpsInternalTransferIdSchema,pa as PerpsInternalTransferSchema,u as PerpsKlineInterval,G as PerpsKlineIntervalSchema,s as PerpsKnownWithdrawalStatus,Xa as PerpsLimitOrderCanceledNotificationSchema,Ya as PerpsLiquidationWarningNotificationSchema,U as PerpsMarginSummarySchema,Ta as PerpsMarginType,Ua as PerpsMarginTypeSchema,$a as PerpsNotificationEntrySchema,d as PerpsNotificationIdSchema,Ra as PerpsNotificationOrderType,Sa as PerpsNotificationOrderTypeSchema,_a as PerpsNotificationSchema,Pa as PerpsNotificationType,Qa as PerpsNotificationTypeSchema,b as PerpsOrderIdSchema,mb as PerpsOrderSchema,db as PerpsOrderStatus,fb as PerpsOrderStatusSchema,pb as PerpsOrderUpdateSchema,v as PerpsPnlInterval,H as PerpsPnlIntervalSchema,ca as PerpsPnlPointSchema,T as PerpsPortfolioPositionSchema,V as PerpsPortfolioSchema,Va as PerpsPositionChangeNotificationSchema,Wa as PerpsPositionClosedNotificationSchema,Za as PerpsPositionLiquidatedNotificationSchema,ib as PerpsPostOrderAckSchema,ea as PerpsProxyKeySchema,Fa as PerpsPublicTradeSchema,Ga as PerpsPublicTradeUpdateSchema,qa as PerpsRiskTierSchema,n as PerpsSide,z as PerpsSideSchema,w as PerpsSortDirection,I as PerpsSortDirectionSchema,xa as PerpsStatisticSchema,za as PerpsStatisticUpdateSchema,va as PerpsTickerEntrySchema,ta as PerpsTickerSchema,o as PerpsTimeInForce,A as PerpsTimeInForceSchema,p as PerpsTpSlKind,B as PerpsTpSlKindSchema,eb as PerpsTpSlOrderFieldsSchema,q as PerpsTpSlScope,C as PerpsTpSlScopeSchema,e as PerpsTradeIdSchema,K as PerpsTxHashSchema,lb as PerpsUpdateLeverageResultSchema,na as PerpsWithdrawResponseSchema,g as PerpsWithdrawalIdSchema,la as PerpsWithdrawalSchema,E as PerpsWithdrawalStatusSchema,oa as PerpsWithdrawalUpdateSchema,O as decimalString,N as perpsBaseUnits,M as perpsDecimal}from'../chunk-I4SRN2Q5.js';import {s,ba}from'../chunk-6TO35A2S.js';import {z}from'zod';var n=z.number().int().transform(e=>e===0?null:s(e)),jt=z.object({status:z.literal("ok"),deadline:n}),i=z.object({deadline:n,triggered:z.number().int().nonnegative(),daily_limit:z.number().int().nonnegative(),next_reset:ba}).transform(e=>({deadline:e.deadline,triggered:e.triggered,dailyLimit:e.daily_limit,nextReset:e.next_reset})),Et=i;export{Et as FetchPerpsAutoCancelStatusResponseSchema,jt as PerpsAutoCancelResponseSchema,i as PerpsAutoCancelStatusSchema};//# sourceMappingURL=index.js.map
1
+ export{$ as FetchPerpsAccountConfigResponseSchema,S as FetchPerpsAccountStatsResponseSchema,Q as FetchPerpsBalancesResponseSchema,Oa as FetchPerpsCandlesResponseSchema,Na as FetchPerpsFeesResponseSchema,Ja as FetchPerpsFundingHistoryResponseSchema,sa as FetchPerpsInstrumentsResponseSchema,ob as FetchPerpsOpenOrdersResponseSchema,nb as FetchPerpsOrdersResponseSchema,W as FetchPerpsPortfolioResponseSchema,ya as FetchPerpsStatisticsResponseSchema,ua as FetchPerpsTickersResponseSchema,Ha as FetchPerpsTradesResponseSchema,bb as FetchPerpsUnreadNotificationsCountResponseSchema,ja as ListPerpsDepositsResponseSchema,ba as ListPerpsEquityHistoryResponseSchema,rb as ListPerpsFillsResponseSchema,Y as ListPerpsFundingPaymentsResponseSchema,ab as ListPerpsNotificationsResponseSchema,da as ListPerpsPnlHistoryResponseSchema,ma as ListPerpsWithdrawalsResponseSchema,cb as MarkPerpsNotificationsReadResponseSchema,_ as PerpsAccountConfigSchema,qb as PerpsAccountFillSchema,sb as PerpsAccountFillUpdateSchema,Z as PerpsAccountFundingPaymentEntrySchema,X as PerpsAccountFundingPaymentSchema,R as PerpsAccountStatsSchema,J as PerpsAssetSchema,P as PerpsBalanceSchema,Da as PerpsBboSchema,Ea as PerpsBboUpdateSchema,Aa as PerpsBookLevelSchema,Ba as PerpsBookSchema,Ca as PerpsBookUpdateSchema,kb as PerpsCancelAllOrdersResponseSchema,jb as PerpsCancelOrderResultSchema,wa as PerpsCandleSchema,c as PerpsClientOrderIdSchema,hb as PerpsCommandAckSchema,gb as PerpsCommandStatusSchema,ga as PerpsCreateProxyResponseSchema,fa as PerpsCredentialsResponseSchema,L as PerpsDataResponseSchema,k as PerpsDecimalInputSchema,ha as PerpsDeleteProxyResponseSchema,ia as PerpsDepositSchema,r as PerpsDepositStatus,D as PerpsDepositStatusSchema,ka as PerpsDepositUpdateSchema,i as PerpsEntityIdSchema,aa as PerpsEquityPointSchema,La as PerpsFeeScheduleEntrySchema,Ka as PerpsFeeTierSchema,Ma as PerpsFeesInfoSchema,j as PerpsFundingIntervalSchema,f as PerpsFundingPaymentIdSchema,Ia as PerpsFundingRateSchema,m as PerpsInstrumentCategory,y as PerpsInstrumentCategorySchema,a as PerpsInstrumentIdSchema,ra as PerpsInstrumentSchema,l as PerpsInstrumentType,x as PerpsInstrumentTypeSchema,t as PerpsInternalTransferDirection,F as PerpsInternalTransferDirectionSchema,h as PerpsInternalTransferIdSchema,pa as PerpsInternalTransferSchema,u as PerpsKlineInterval,G as PerpsKlineIntervalSchema,s as PerpsKnownWithdrawalStatus,Xa as PerpsLimitOrderCanceledNotificationSchema,Ya as PerpsLiquidationWarningNotificationSchema,U as PerpsMarginSummarySchema,Ta as PerpsMarginType,Ua as PerpsMarginTypeSchema,$a as PerpsNotificationEntrySchema,d as PerpsNotificationIdSchema,Ra as PerpsNotificationOrderType,Sa as PerpsNotificationOrderTypeSchema,_a as PerpsNotificationSchema,Pa as PerpsNotificationType,Qa as PerpsNotificationTypeSchema,b as PerpsOrderIdSchema,mb as PerpsOrderSchema,db as PerpsOrderStatus,fb as PerpsOrderStatusSchema,pb as PerpsOrderUpdateSchema,v as PerpsPnlInterval,H as PerpsPnlIntervalSchema,ca as PerpsPnlPointSchema,T as PerpsPortfolioPositionSchema,V as PerpsPortfolioSchema,Va as PerpsPositionChangeNotificationSchema,Wa as PerpsPositionClosedNotificationSchema,Za as PerpsPositionLiquidatedNotificationSchema,ib as PerpsPostOrderAckSchema,ea as PerpsProxyKeySchema,Fa as PerpsPublicTradeSchema,Ga as PerpsPublicTradeUpdateSchema,qa as PerpsRiskTierSchema,n as PerpsSide,z as PerpsSideSchema,w as PerpsSortDirection,I as PerpsSortDirectionSchema,xa as PerpsStatisticSchema,za as PerpsStatisticUpdateSchema,va as PerpsTickerEntrySchema,ta as PerpsTickerSchema,o as PerpsTimeInForce,A as PerpsTimeInForceSchema,p as PerpsTpSlKind,B as PerpsTpSlKindSchema,eb as PerpsTpSlOrderFieldsSchema,q as PerpsTpSlScope,C as PerpsTpSlScopeSchema,e as PerpsTradeIdSchema,K as PerpsTxHashSchema,lb as PerpsUpdateLeverageResultSchema,na as PerpsWithdrawResponseSchema,g as PerpsWithdrawalIdSchema,la as PerpsWithdrawalSchema,E as PerpsWithdrawalStatusSchema,oa as PerpsWithdrawalUpdateSchema,O as decimalString,N as perpsBaseUnits,M as perpsDecimal}from'../chunk-QX4CCP47.js';import {t,fa}from'../chunk-AY4D74DC.js';import {z}from'zod';var n=z.number().int().transform(e=>e===0?null:t(e)),jt=z.object({status:z.literal("ok"),deadline:n}),i=z.object({deadline:n,triggered:z.number().int().nonnegative(),daily_limit:z.number().int().nonnegative(),next_reset:fa}).transform(e=>({deadline:e.deadline,triggered:e.triggered,dailyLimit:e.daily_limit,nextReset:e.next_reset})),Et=i;export{Et as FetchPerpsAutoCancelStatusResponseSchema,jt as PerpsAutoCancelResponseSchema,i as PerpsAutoCancelStatusSchema};//# sourceMappingURL=index.js.map
2
2
  //# sourceMappingURL=index.js.map
@@ -1,2 +1,2 @@
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
1
+ import {ea,Na,Oa}from'../chunk-AY4D74DC.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:ea.optional(),operation:z.string().optional(),payment:z.string().optional(),paymentReceiver:ea.optional(),paymentToken:ea.optional(),refundReceiver:ea.optional(),relay:ea.optional(),relayHub:ea.optional(),relayerFee:z.string().optional(),safeTxnGas:z.string().optional()}),d=z.object({address:ea,nonce:z.string().min(1)}),R=z.object({data:z.string().min(1),from:ea,metadata:z.string().optional(),nonce:z.string().min(1).optional(),proxyWallet:ea,signature:z.string().min(1),signatureParams:y,to:ea,type:u,value:z.string().optional()}),T=z.object({data:z.string().min(1),target:ea,value:z.string().min(1)}),x=z.object({calls:z.array(T).min(1),deadline:z.string().min(1),depositWallet:ea}),S=z.object({depositWalletParams:x,from:ea,metadata:z.string().optional(),nonce:z.string().min(1),signature:z.string().min(1),to:ea,type:z.literal("WALLET")}),g=z.object({from:ea,metadata:z.string().optional(),to:ea,type:z.literal("WALLET-CREATE")}),W=z.union([R,S,g]),f=z.object({state:m,transactionHash:Oa.nullish().transform(a=>a??null),transactionID:Na}).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(""),Oa]).transform(a=>a===""?null:a),transaction_id:Na}).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
@@ -1,4 +1,4 @@
1
- import { TokenId, DecimalString, EpochMilliseconds, CtfConditionId, IsoDateTimeString, OrderSide, OrderType, TradeStatus, BaseUnits, CommentId, CommentParentEntityType, EventId, SeriesId, ImageOptimizationId } from '../index.js';
1
+ import { TokenId, DecimalString, EpochMilliseconds, ConditionId, IsoDateTimeString, OrderSide, OrderType, TradeStatus, BaseUnits, CommentId, CommentParentEntityType, EventId, SeriesId, ImageOptimizationId } from '../index.js';
2
2
  import { z } from 'zod';
3
3
  import { P as PerpsInstrumentId, V as PerpsKlineInterval, c as PerpsDepositStatus, j as PerpsTradeId, ac as PerpsOrderId, k as PerpsSide, b as PerpsFundingPaymentId, a4 as PerpsNotificationId, a9 as PerpsNotificationType, a6 as PerpsNotificationOrderType, $ as PerpsMarginType, av as PerpsTimeInForce, af as PerpsOrderStatus, ax as PerpsTpSlKind, aB as PerpsTpSlScope, d as PerpsWithdrawalId, e as PerpsKnownWithdrawalStatus } from '../orders-BDfNkzav.js';
4
4
  import * as _polymarket_types from '@polymarket/types';
@@ -277,7 +277,7 @@ declare const NewMarketEventSchema: z.ZodPipe<z.ZodObject<{
277
277
  }, z.core.$strip>>>;
278
278
  timestamp: z.ZodOptional<z.ZodNullable<z.ZodPipe<z.ZodString, z.ZodTransform<EpochMilliseconds, string>>>>;
279
279
  tags: z.ZodOptional<z.ZodNullable<z.ZodArray<z.ZodString>>>;
280
- condition_id: z.ZodOptional<z.ZodNullable<z.ZodPipe<z.ZodString, z.ZodTransform<CtfConditionId, string>>>>;
280
+ condition_id: z.ZodOptional<z.ZodNullable<z.ZodPipe<z.ZodString, z.ZodTransform<ConditionId, string>>>>;
281
281
  active: z.ZodOptional<z.ZodNullable<z.ZodBoolean>>;
282
282
  clob_token_ids: z.ZodOptional<z.ZodNullable<z.ZodArray<z.ZodString>>>;
283
283
  sports_market_type: z.ZodOptional<z.ZodNullable<z.ZodString>>;
@@ -300,7 +300,7 @@ declare const NewMarketEventSchema: z.ZodPipe<z.ZodObject<{
300
300
  title?: string | null | undefined;
301
301
  description?: string | null | undefined;
302
302
  } | null | undefined;
303
- conditionId: CtfConditionId | null | undefined;
303
+ conditionId: ConditionId | null | undefined;
304
304
  clobTokenIds: string[] | null | undefined;
305
305
  sportsMarketType: string | null | undefined;
306
306
  gameStartTime: IsoDateTimeString | null | undefined;
@@ -338,7 +338,7 @@ declare const NewMarketEventSchema: z.ZodPipe<z.ZodObject<{
338
338
  } | null | undefined;
339
339
  timestamp?: EpochMilliseconds | null | undefined;
340
340
  tags?: string[] | null | undefined;
341
- condition_id?: CtfConditionId | null | undefined;
341
+ condition_id?: ConditionId | null | undefined;
342
342
  active?: boolean | null | undefined;
343
343
  clob_token_ids?: string[] | null | undefined;
344
344
  sports_market_type?: string | null | undefined;
@@ -858,7 +858,7 @@ declare const CustomMarketEventSchema: z.ZodDiscriminatedUnion<[z.ZodPipe<z.ZodO
858
858
  }, z.core.$strip>>>;
859
859
  timestamp: z.ZodOptional<z.ZodNullable<z.ZodPipe<z.ZodString, z.ZodTransform<EpochMilliseconds, string>>>>;
860
860
  tags: z.ZodOptional<z.ZodNullable<z.ZodArray<z.ZodString>>>;
861
- condition_id: z.ZodOptional<z.ZodNullable<z.ZodPipe<z.ZodString, z.ZodTransform<CtfConditionId, string>>>>;
861
+ condition_id: z.ZodOptional<z.ZodNullable<z.ZodPipe<z.ZodString, z.ZodTransform<ConditionId, string>>>>;
862
862
  active: z.ZodOptional<z.ZodNullable<z.ZodBoolean>>;
863
863
  clob_token_ids: z.ZodOptional<z.ZodNullable<z.ZodArray<z.ZodString>>>;
864
864
  sports_market_type: z.ZodOptional<z.ZodNullable<z.ZodString>>;
@@ -881,7 +881,7 @@ declare const CustomMarketEventSchema: z.ZodDiscriminatedUnion<[z.ZodPipe<z.ZodO
881
881
  title?: string | null | undefined;
882
882
  description?: string | null | undefined;
883
883
  } | null | undefined;
884
- conditionId: CtfConditionId | null | undefined;
884
+ conditionId: ConditionId | null | undefined;
885
885
  clobTokenIds: string[] | null | undefined;
886
886
  sportsMarketType: string | null | undefined;
887
887
  gameStartTime: IsoDateTimeString | null | undefined;
@@ -919,7 +919,7 @@ declare const CustomMarketEventSchema: z.ZodDiscriminatedUnion<[z.ZodPipe<z.ZodO
919
919
  } | null | undefined;
920
920
  timestamp?: EpochMilliseconds | null | undefined;
921
921
  tags?: string[] | null | undefined;
922
- condition_id?: CtfConditionId | null | undefined;
922
+ condition_id?: ConditionId | null | undefined;
923
923
  active?: boolean | null | undefined;
924
924
  clob_token_ids?: string[] | null | undefined;
925
925
  sports_market_type?: string | null | undefined;
@@ -1200,7 +1200,7 @@ declare const MarketEventSchema: z.ZodDiscriminatedUnion<[z.ZodPipe<z.ZodObject<
1200
1200
  }, z.core.$strip>>>;
1201
1201
  timestamp: z.ZodOptional<z.ZodNullable<z.ZodPipe<z.ZodString, z.ZodTransform<EpochMilliseconds, string>>>>;
1202
1202
  tags: z.ZodOptional<z.ZodNullable<z.ZodArray<z.ZodString>>>;
1203
- condition_id: z.ZodOptional<z.ZodNullable<z.ZodPipe<z.ZodString, z.ZodTransform<CtfConditionId, string>>>>;
1203
+ condition_id: z.ZodOptional<z.ZodNullable<z.ZodPipe<z.ZodString, z.ZodTransform<ConditionId, string>>>>;
1204
1204
  active: z.ZodOptional<z.ZodNullable<z.ZodBoolean>>;
1205
1205
  clob_token_ids: z.ZodOptional<z.ZodNullable<z.ZodArray<z.ZodString>>>;
1206
1206
  sports_market_type: z.ZodOptional<z.ZodNullable<z.ZodString>>;
@@ -1223,7 +1223,7 @@ declare const MarketEventSchema: z.ZodDiscriminatedUnion<[z.ZodPipe<z.ZodObject<
1223
1223
  title?: string | null | undefined;
1224
1224
  description?: string | null | undefined;
1225
1225
  } | null | undefined;
1226
- conditionId: CtfConditionId | null | undefined;
1226
+ conditionId: ConditionId | null | undefined;
1227
1227
  clobTokenIds: string[] | null | undefined;
1228
1228
  sportsMarketType: string | null | undefined;
1229
1229
  gameStartTime: IsoDateTimeString | null | undefined;
@@ -1261,7 +1261,7 @@ declare const MarketEventSchema: z.ZodDiscriminatedUnion<[z.ZodPipe<z.ZodObject<
1261
1261
  } | null | undefined;
1262
1262
  timestamp?: EpochMilliseconds | null | undefined;
1263
1263
  tags?: string[] | null | undefined;
1264
- condition_id?: CtfConditionId | null | undefined;
1264
+ condition_id?: ConditionId | null | undefined;
1265
1265
  active?: boolean | null | undefined;
1266
1266
  clob_token_ids?: string[] | null | undefined;
1267
1267
  sports_market_type?: string | null | undefined;
@@ -1,2 +1,2 @@
1
- import {N,K,O,P}from'../chunk-GJX3FYFG.js';import {Ga,Ea,Ca,va,za as za$1,wa,sb,b as b$1,a,P as P$1,V,pb,Z,ka,oa,_a}from'../chunk-I4SRN2Q5.js';import {xa,La,x as x$1,Ra,Ia,da,ia,_,ya,za,ba,va as va$1,Na,R}from'../chunk-6TO35A2S.js';export{d as TradeStatus}from'../chunk-6TO35A2S.js';import {z}from'zod';var x=z.preprocess(t=>typeof t=="string"?t.toUpperCase():t,xa),re=(p=>(p.Live="LIVE",p.Matched="MATCHED",p.Delayed="DELAYED",p.Unmatched="UNMATCHED",p.Canceled="CANCELED",p))(re||{}),_e=z.enum(re),te=z.object({price:La,size:La}),b=z.string().regex(/^\d+$/).transform(t=>x$1(new Date(Number(t)*1e3).toISOString())),xe=z.string().regex(/^\d+$/).transform(t=>t==="0"?void 0:x$1(new Date(Number(t)*1e3).toISOString())),ne=z.object({event_type:z.literal("book"),market:z.string(),asset_id:Ia,bids:z.array(te),asks:z.array(te),hash:z.string().nullish(),timestamp:da.nullish(),min_order_size:Ra,tick_size:Ra,neg_risk:z.boolean().nullish(),last_trade_price:Ra}).transform(({event_type:t,asset_id:n,min_order_size:a,tick_size:i,neg_risk:s,last_trade_price:p,...S})=>({topic:"market",type:t,payload:{...S,tokenId:n,minOrderSize:a,tickSize:i,negRisk:s,lastTradePrice:p}})),Te=z.object({asset_id:Ia,price:La,size:La,side:x,hash:z.string().nullish(),best_bid:Ra,best_ask:Ra}).transform(({asset_id:t,best_bid:n,best_ask:a,...i})=>({...i,tokenId:t,bestBid:n,bestAsk:a})),ae=z.object({event_type:z.literal("price_change"),market:z.string(),price_changes:z.array(Te),timestamp:da.nullish()}).transform(({event_type:t,price_changes:n,...a})=>({topic:"market",type:t,payload:{...a,priceChanges:n}})),ie=z.object({event_type:z.literal("last_trade_price"),market:z.string(),asset_id:Ia,price:La,size:Ra,fee_rate_bps:Ra,side:x,timestamp:da.nullish(),transaction_hash:z.string().nullish()}).transform(({event_type:t,asset_id:n,fee_rate_bps:a,transaction_hash:i,...s})=>({topic:"market",type:t,payload:{...s,tokenId:n,feeRateBps:a,transactionHash:i}})),se=z.object({event_type:z.literal("tick_size_change"),market:z.string(),asset_id:Ia,old_tick_size:Ra,new_tick_size:La,timestamp:da.nullish()}).transform(({event_type:t,asset_id:n,old_tick_size:a,new_tick_size:i,...s})=>({topic:"market",type:t,payload:{...s,tokenId:n,oldTickSize:a,newTickSize:i}})),oe=z.object({event_type:z.literal("best_bid_ask"),market:z.string(),asset_id:Ia,best_bid:Ra,best_ask:Ra,spread:Ra,timestamp:da.nullish()}).transform(({event_type:t,asset_id:n,best_bid:a,best_ask:i,...s})=>({topic:"market",type:t,payload:{...s,tokenId:n,bestBid:a,bestAsk:i}})),pe=z.object({id:z.string(),ticker:z.string().nullish(),slug:z.string().nullish(),title:z.string().nullish(),description:z.string().nullish()}),ce=z.object({event_type:z.literal("new_market"),id:z.string(),question:z.string().nullish(),market:z.string(),slug:z.string().nullish(),description:z.string().nullish(),assets_ids:z.array(Ia).nullish(),outcomes:z.array(z.string()).nullish(),event_message:pe.nullish(),timestamp:da.nullish(),tags:z.array(z.string()).nullish(),condition_id:_.nullish(),active:z.boolean().nullish(),clob_token_ids:z.array(z.string()).nullish(),sports_market_type:z.string().nullish(),line:Ra,game_start_time:ia.nullish(),order_price_min_tick_size:Ra,group_item_title:z.string().nullish(),taker_base_fee:Ra,fees_enabled:z.boolean().nullish(),fee_schedule:z.unknown().nullish()}).transform(({event_type:t,assets_ids:n,event_message:a,condition_id:i,clob_token_ids:s,sports_market_type:p,game_start_time:S,order_price_min_tick_size:P,group_item_title:E,taker_base_fee:v,fees_enabled:k,fee_schedule:C,...z})=>({topic:"market",type:t,payload:{...z,tokenIds:n,eventMessage:a,conditionId:i,clobTokenIds:s,sportsMarketType:p,gameStartTime:S,orderPriceMinTickSize:P,groupItemTitle:E,takerBaseFee:v,feesEnabled:k,feeSchedule:C}})),me=z.object({event_type:z.literal("market_resolved"),id:z.string(),market:z.string(),assets_ids:z.array(Ia).nullish(),winning_asset_id:Ia.nullish(),winning_outcome:z.string().nullish(),event_message:pe.nullish(),timestamp:da.nullish(),tags:z.array(z.string()).nullish()}).transform(({event_type:t,assets_ids:n,winning_asset_id:a,winning_outcome:i,event_message:s,...p})=>({topic:"market",type:t,payload:{...p,tokenIds:n,winningTokenId:a,winningOutcome:i,eventMessage:s}})),le=(i=>(i.Placement="PLACEMENT",i.Update="UPDATE",i.Cancellation="CANCELLATION",i))(le||{}),be=z.enum(le),ze=z.object({event_type:z.literal("order"),id:z.string(),owner:z.string(),market:z.string(),asset_id:Ia,side:x,order_owner:z.string().nullish(),original_size:La,size_matched:La,price:La,associate_trades:z.array(z.string()).nullish(),outcome:z.string().nullish(),type:be,created_at:b.nullish(),expiration:xe.nullish(),order_type:ya.nullish(),status:_e.nullish(),maker_address:z.string().nullish(),timestamp:da}).transform(({event_type:t,type:n,asset_id:a,order_owner:i,original_size:s,size_matched:p,associate_trades:S,created_at:P,expiration:E,order_type:v,maker_address:k,...C})=>({topic:"user",type:t,payload:{...C,orderEventType:n,tokenId:a,orderOwner:i,originalSize:s,sizeMatched:p,associateTrades:S,createdAt:P,expiresAt:E,orderType:v,makerAddress:k}})),Ie=z.object({order_id:z.string(),owner:z.string(),maker_address:z.string().nullish(),matched_amount:La,price:La,fee_rate_bps:Ra,asset_id:Ia,outcome:z.string().nullish(),outcome_index:z.number().int().nullish(),side:x}).transform(({order_id:t,maker_address:n,matched_amount:a,fee_rate_bps:i,asset_id:s,outcome_index:p,...S})=>({...S,orderId:t,makerAddress:n,matchedAmount:a,feeRateBps:i,tokenId:s,outcomeIndex:p})),we=z.object({event_type:z.literal("trade"),type:z.literal("TRADE"),id:z.string(),taker_order_id:z.string(),market:z.string(),asset_id:Ia,side:x,size:La,fee_rate_bps:Ra,price:La,status:za,match_time:b.nullish(),matchtime:b.nullish(),last_update:b.nullish(),outcome:z.string().nullish(),owner:z.string(),trade_owner:z.string().nullish(),maker_address:z.string().nullish(),transaction_hash:z.string().nullish(),bucket_index:z.number().int().nullish(),maker_orders:z.array(Ie).nullish(),trader_side:z.union([z.literal("TAKER"),z.literal("MAKER")]).nullish(),timestamp:da}).transform(({event_type:t,type:n,taker_order_id:a,asset_id:i,fee_rate_bps:s,match_time:p,matchtime:S,last_update:P,trade_owner:E,maker_address:v,transaction_hash:k,bucket_index:C,maker_orders:z,trader_side:ke,...Ce})=>({topic:"user",type:t,payload:{...Ce,takerOrderId:a,tokenId:i,feeRateBps:s,matchedAt:p??S,updatedAt:P,tradeOwner:E,makerAddress:v,transactionHash:k,bucketIndex:C,makerOrders:z,traderSide:ke}})),qt=z.discriminatedUnion("event_type",[ne,ae,ie,se]),Ot=z.discriminatedUnion("event_type",[oe,ce,me]),jt=z.discriminatedUnion("event_type",[ne,ae,ie,se,oe,ce,me]),Nt=z.discriminatedUnion("event_type",[ze,we]);var de=z.number().int().nonnegative(),Ue=z.string().regex(/^trades::\d+$/),Me=z.string().regex(/^bbo::\d+$/),Re=z.string().regex(/^book::\d+$/),Ae=z.string().regex(/^tickers::(all|\d+)$/),Be=z.string().regex(/^statistics::(all|\d+)$/),qe=z.string().regex(/^klines::\d+::(1m|5m|15m|1h|4h|1d|1w)$/),Oe=z.string().regex(/^tpsl::\d+$/),je=z.enum(["balances","portfolio","orders","fills","funding","deposits","withdrawals","notifications"]),u=z.object({ts:ba,sq:de}),Ne=u.extend({ch:Ue,data:z.array(Ga)}).transform(({ch:t,ts:n,sq:a,data:i})=>({topic:"perps.trades",type:"trade",channel:t,timestamp:n,sequence:a,payload:i})),De=u.extend({ch:Me,data:Ea}).transform(({ch:t,ts:n,sq:a,data:i})=>({topic:"perps.bbo",type:"bbo",channel:t,timestamp:n,sequence:a,payload:i})),Le=u.extend({ch:Re,data:Ca}).transform(({ch:t,ts:n,sq:a,data:i})=>({topic:"perps.book",type:"book",channel:t,timestamp:n,sequence:a,payload:{instrumentId:he(t),...i}})),$e=u.extend({ch:Ae,data:va}).transform(({ch:t,ts:n,sq:a,data:i})=>({topic:"perps.tickers",type:"ticker",channel:t,timestamp:n,sequence:a,payload:i})),Fe=u.extend({ch:Be,data:za$1}).transform(({ch:t,ts:n,sq:a,data:i})=>({topic:"perps.statistics",type:"statistic",channel:t,timestamp:n,sequence:a,payload:i})),Ke=u.extend({ch:qe,data:z.array(wa)}).transform(({ch:t,ts:n,sq:a,data:i})=>({topic:"perps.candles",type:"candle",channel:t,timestamp:n,sequence:a,payload:{instrumentId:he(t),interval:rt(t),candles:i}})),Qt=z.union([Ne,De,Le,$e,Fe,Ke]),We=u.extend({ch:je});function f(t,n,a){return We.extend({ch:z.literal(n),data:a}).transform(i=>{let s=i;return {type:t,channel:s.ch,timestamp:s.ts,sequence:s.sq,payload:s.data}})}var He=f("balance","balances",P$1),Ye=f("portfolio","portfolio",V),Ze=f("order","orders",pb),Ve=f("fill","fills",z.array(sb)),Qe=f("funding","funding",Z),Ge=f("deposit","deposits",ka),Je=f("withdrawal","withdrawals",oa),Xe=f("notification","notifications",_a),Gt=z.object({ch:z.literal("notifications"),ts:ba,sq:de,type:z.literal("resync")}).transform(({ch:t,ts:n,sq:a})=>({type:"resync",channel:t,timestamp:n,sequence:a})),et=z.object({oid:b$1,st:z.enum(["untriggered","armed","cancelled","expired"]),reason:z.string().optional()}),tt=u.extend({ch:Oe,data:et.transform(t=>({orderId:t.oid,status:t.st,reason:t.reason}))}).transform(({ch:t,ts:n,sq:a,data:i})=>({type:"tpsl",channel:t,timestamp:n,sequence:a,payload:i})),Jt=z.union([He,Ye,Ze,Ve,Qe,Ge,Je,Xe,tt]);function he(t){let[,n]=t.split("::");return a.parse(Number(n))}function rt(t){let[,,n]=t.split("::");return n}var nt=z.object({id:z.string(),body:z.string().nullish(),parentEntityType:va$1.nullish(),parentEntityID:z.number().int().nullish(),parentCommentID:z.string().nullish(),userAddress:z.string().nullish(),replyAddress:z.string().nullish(),createdAt:z.string().nullish(),updatedAt:z.string().nullish(),media:z.array(O).nullish(),profile:K.nullish(),reactions:z.array(N).nullish(),reportCount:z.number().int().nullish(),reactionCount:z.number().int().nullish(),tradeAsset:z.string().nullish()}),at=z.object({topic:z.literal("comments"),type:z.literal("comment_created"),timestamp:ba,payload:P}),it=z.object({topic:z.literal("comments"),type:z.literal("comment_removed"),timestamp:ba,payload:nt}),st=z.object({topic:z.literal("comments"),type:z.literal("reaction_created"),timestamp:ba,payload:N}),ot=z.object({topic:z.literal("comments"),type:z.literal("reaction_removed"),timestamp:ba,payload:N}),Se=z.object({symbol:z.string(),timestamp:ba,value:Na}),pt="prices.crypto.binance",ct="prices.crypto.chainlink",ue="prices.crypto.chainlink.twap",mt=z.literal("crypto_prices"),lt=z.literal("crypto_prices_chainlink"),dt=z.literal("crypto_prices_twap_thirty"),ht=z.literal("crypto_prices_twap_sixty"),yt=mt.transform(()=>pt),St=lt.transform(()=>ct),ut=dt.transform(()=>ue),ft=ht.transform(()=>ue),Pt=z.object({topic:yt,type:z.literal("update"),timestamp:ba,payload:Se}),Et=z.object({topic:St,type:z.literal("update"),timestamp:ba,payload:Se}),ye=1000000000000000000n;function vt(t){let n=BigInt(t),a=n<0n,i=a?-n:n,s=i/ye,p=(i%ye).toString().padStart(18,"0").replace(/0+$/,"");return R(`${a?"-":""}${s}${p===""?"":`.${p}`}`)}var kt=z.string().regex(/^-?\d+$/).transform(vt),Ct=z.object({symbol:z.string(),value:Na,full_accuracy_value:kt,timestamp:ba});function fe(t){return Ct.extend({window_s:z.literal(t)}).transform(n=>({symbol:n.symbol,timestamp:n.timestamp,value:n.full_accuracy_value,windowSeconds:n.window_s}))}var Pe=z.object({topic:ut,type:z.literal("update"),timestamp:ba,payload:fe(30)}),Ee=z.object({topic:ft,type:z.literal("update"),timestamp:ba,payload:fe(60)}),nr=z.union([Pe,Ee]),gt=z.discriminatedUnion("topic",[Pt,Et,Pe,Ee]),_t=z.object({symbol:z.string(),value:Na,full_accuracy_value:La.nullish(),timestamp:ba,received_at:ba.nullish(),is_carried_forward:z.boolean().nullish()}).transform(({full_accuracy_value:t,received_at:n,is_carried_forward:a,value:i,...s})=>({...s,value:t??i,receivedAt:n,isCarriedForward:a})),xt=z.object({timestamp:z.number(),value:Na}),Tt=z.object({symbol:z.string(),data:z.array(xt)}),bt=z.literal("equity_prices"),zt="prices.equity.pyth",ve=bt.transform(()=>zt),It=z.object({topic:ve,type:z.literal("update"),timestamp:ba,payload:_t}),wt=z.object({topic:ve,type:z.literal("subscribe"),timestamp:ba,payload:Tt}),Ut=z.discriminatedUnion("type",[It,wt]),Mt=z.discriminatedUnion("type",[at,it,st,ot]),ar=z.discriminatedUnion("topic",[Mt,gt,Ut]);var Rt=z.object({gameId:z.number().int(),sportradarGameId:z.string().nullish(),slug:z.string().nullish(),leagueAbbreviation:z.string(),homeTeam:z.string().nullish(),awayTeam:z.string().nullish(),status:z.string(),live:z.boolean(),ended:z.boolean(),score:z.string(),period:z.string().nullish(),elapsed:z.string().nullish(),finishedTimestamp:ia.nullish(),finished_timestamp:ia.nullish(),turn:z.string().nullish()}).transform(({finishedTimestamp:t,finished_timestamp:n,...a})=>({...a,finishedAt:t??n})),pr=Rt.transform(t=>({topic:"sports",type:"sport_result",payload:t}));export{at as CommentCreatedEventSchema,it as CommentRemovedEventSchema,Mt as CommentsEventSchema,Pt as CryptoPricesBinanceEventSchema,Et as CryptoPricesChainlinkEventSchema,nr as CryptoPricesChainlinkTwapEventSchema,Ee as CryptoPricesChainlinkTwapSixtyEventSchema,Pe as CryptoPricesChainlinkTwapThirtyEventSchema,gt as CryptoPricesEventSchema,Ot as CustomMarketEventSchema,Ut as EquityPricesEventSchema,wt as EquityPricesSubscribeEventSchema,It as EquityPricesUpdateEventSchema,oe as MarketBestBidAskEventSchema,ne as MarketBookEventSchema,jt as MarketEventSchema,ie as MarketLastTradePriceEventSchema,ae as MarketPriceChangeEventSchema,me as MarketResolvedEventSchema,se as MarketTickSizeChangeEventSchema,ce as NewMarketEventSchema,He as PerpsBalanceUpdateEventSchema,De as PerpsBboEventSchema,Le as PerpsBookEventSchema,Ke as PerpsCandleEventSchema,Ge as PerpsDepositUpdateEventSchema,Ve as PerpsFillUpdateEventSchema,Qe as PerpsFundingUpdateEventSchema,Qt as PerpsMarketDataEventSchema,Xe as PerpsNotificationUpdateEventSchema,Gt as PerpsNotificationsResyncFrameSchema,Ze as PerpsOrderUpdateEventSchema,Ye as PerpsPortfolioUpdateEventSchema,Jt as PerpsSessionUpdateEventSchema,Fe as PerpsStatisticEventSchema,$e as PerpsTickerEventSchema,tt as PerpsTpSlUpdateEventSchema,Ne as PerpsTradeEventSchema,Je as PerpsWithdrawalUpdateEventSchema,st as ReactionCreatedEventSchema,ot as ReactionRemovedEventSchema,ar as RealtimeEventSchema,pr as SportsResultEventSchema,qt as StandardMarketEventSchema,Nt as UserEventSchema,ze as UserOrderEventSchema,le as UserOrderEventType,re as UserOrderStatus,we as UserTradeEventSchema};//# sourceMappingURL=index.js.map
1
+ import {N,K,O,P}from'../chunk-UDKFL2IM.js';import {Ga,Ea,Ca as Ca$1,va,za,wa,sb,b as b$1,a,P as P$1,V,pb,Z,ka,oa,_a}from'../chunk-QX4CCP47.js';import {Ba,Pa,y,Va,Ma,ha,ma,$,Ca,Da,fa,za as za$1,Ra,S}from'../chunk-AY4D74DC.js';export{d as TradeStatus}from'../chunk-AY4D74DC.js';import {z}from'zod';var x=z.preprocess(t=>typeof t=="string"?t.toUpperCase():t,Ba),re=(p=>(p.Live="LIVE",p.Matched="MATCHED",p.Delayed="DELAYED",p.Unmatched="UNMATCHED",p.Canceled="CANCELED",p))(re||{}),_e=z.enum(re),te=z.object({price:Pa,size:Pa}),b=z.string().regex(/^\d+$/).transform(t=>y(new Date(Number(t)*1e3).toISOString())),xe=z.string().regex(/^\d+$/).transform(t=>t==="0"?void 0:y(new Date(Number(t)*1e3).toISOString())),ne=z.object({event_type:z.literal("book"),market:z.string(),asset_id:Ma,bids:z.array(te),asks:z.array(te),hash:z.string().nullish(),timestamp:ha.nullish(),min_order_size:Va,tick_size:Va,neg_risk:z.boolean().nullish(),last_trade_price:Va}).transform(({event_type:t,asset_id:n,min_order_size:a,tick_size:i,neg_risk:s,last_trade_price:p,...S})=>({topic:"market",type:t,payload:{...S,tokenId:n,minOrderSize:a,tickSize:i,negRisk:s,lastTradePrice:p}})),Te=z.object({asset_id:Ma,price:Pa,size:Pa,side:x,hash:z.string().nullish(),best_bid:Va,best_ask:Va}).transform(({asset_id:t,best_bid:n,best_ask:a,...i})=>({...i,tokenId:t,bestBid:n,bestAsk:a})),ae=z.object({event_type:z.literal("price_change"),market:z.string(),price_changes:z.array(Te),timestamp:ha.nullish()}).transform(({event_type:t,price_changes:n,...a})=>({topic:"market",type:t,payload:{...a,priceChanges:n}})),ie=z.object({event_type:z.literal("last_trade_price"),market:z.string(),asset_id:Ma,price:Pa,size:Va,fee_rate_bps:Va,side:x,timestamp:ha.nullish(),transaction_hash:z.string().nullish()}).transform(({event_type:t,asset_id:n,fee_rate_bps:a,transaction_hash:i,...s})=>({topic:"market",type:t,payload:{...s,tokenId:n,feeRateBps:a,transactionHash:i}})),se=z.object({event_type:z.literal("tick_size_change"),market:z.string(),asset_id:Ma,old_tick_size:Va,new_tick_size:Pa,timestamp:ha.nullish()}).transform(({event_type:t,asset_id:n,old_tick_size:a,new_tick_size:i,...s})=>({topic:"market",type:t,payload:{...s,tokenId:n,oldTickSize:a,newTickSize:i}})),oe=z.object({event_type:z.literal("best_bid_ask"),market:z.string(),asset_id:Ma,best_bid:Va,best_ask:Va,spread:Va,timestamp:ha.nullish()}).transform(({event_type:t,asset_id:n,best_bid:a,best_ask:i,...s})=>({topic:"market",type:t,payload:{...s,tokenId:n,bestBid:a,bestAsk:i}})),pe=z.object({id:z.string(),ticker:z.string().nullish(),slug:z.string().nullish(),title:z.string().nullish(),description:z.string().nullish()}),ce=z.object({event_type:z.literal("new_market"),id:z.string(),question:z.string().nullish(),market:z.string(),slug:z.string().nullish(),description:z.string().nullish(),assets_ids:z.array(Ma).nullish(),outcomes:z.array(z.string()).nullish(),event_message:pe.nullish(),timestamp:ha.nullish(),tags:z.array(z.string()).nullish(),condition_id:$.nullish(),active:z.boolean().nullish(),clob_token_ids:z.array(z.string()).nullish(),sports_market_type:z.string().nullish(),line:Va,game_start_time:ma.nullish(),order_price_min_tick_size:Va,group_item_title:z.string().nullish(),taker_base_fee:Va,fees_enabled:z.boolean().nullish(),fee_schedule:z.unknown().nullish()}).transform(({event_type:t,assets_ids:n,event_message:a,condition_id:i,clob_token_ids:s,sports_market_type:p,game_start_time:S,order_price_min_tick_size:P,group_item_title:E,taker_base_fee:v,fees_enabled:k,fee_schedule:C,...z})=>({topic:"market",type:t,payload:{...z,tokenIds:n,eventMessage:a,conditionId:i,clobTokenIds:s,sportsMarketType:p,gameStartTime:S,orderPriceMinTickSize:P,groupItemTitle:E,takerBaseFee:v,feesEnabled:k,feeSchedule:C}})),me=z.object({event_type:z.literal("market_resolved"),id:z.string(),market:z.string(),assets_ids:z.array(Ma).nullish(),winning_asset_id:Ma.nullish(),winning_outcome:z.string().nullish(),event_message:pe.nullish(),timestamp:ha.nullish(),tags:z.array(z.string()).nullish()}).transform(({event_type:t,assets_ids:n,winning_asset_id:a,winning_outcome:i,event_message:s,...p})=>({topic:"market",type:t,payload:{...p,tokenIds:n,winningTokenId:a,winningOutcome:i,eventMessage:s}})),le=(i=>(i.Placement="PLACEMENT",i.Update="UPDATE",i.Cancellation="CANCELLATION",i))(le||{}),be=z.enum(le),ze=z.object({event_type:z.literal("order"),id:z.string(),owner:z.string(),market:z.string(),asset_id:Ma,side:x,order_owner:z.string().nullish(),original_size:Pa,size_matched:Pa,price:Pa,associate_trades:z.array(z.string()).nullish(),outcome:z.string().nullish(),type:be,created_at:b.nullish(),expiration:xe.nullish(),order_type:Ca.nullish(),status:_e.nullish(),maker_address:z.string().nullish(),timestamp:ha}).transform(({event_type:t,type:n,asset_id:a,order_owner:i,original_size:s,size_matched:p,associate_trades:S,created_at:P,expiration:E,order_type:v,maker_address:k,...C})=>({topic:"user",type:t,payload:{...C,orderEventType:n,tokenId:a,orderOwner:i,originalSize:s,sizeMatched:p,associateTrades:S,createdAt:P,expiresAt:E,orderType:v,makerAddress:k}})),Ie=z.object({order_id:z.string(),owner:z.string(),maker_address:z.string().nullish(),matched_amount:Pa,price:Pa,fee_rate_bps:Va,asset_id:Ma,outcome:z.string().nullish(),outcome_index:z.number().int().nullish(),side:x}).transform(({order_id:t,maker_address:n,matched_amount:a,fee_rate_bps:i,asset_id:s,outcome_index:p,...S})=>({...S,orderId:t,makerAddress:n,matchedAmount:a,feeRateBps:i,tokenId:s,outcomeIndex:p})),we=z.object({event_type:z.literal("trade"),type:z.literal("TRADE"),id:z.string(),taker_order_id:z.string(),market:z.string(),asset_id:Ma,side:x,size:Pa,fee_rate_bps:Va,price:Pa,status:Da,match_time:b.nullish(),matchtime:b.nullish(),last_update:b.nullish(),outcome:z.string().nullish(),owner:z.string(),trade_owner:z.string().nullish(),maker_address:z.string().nullish(),transaction_hash:z.string().nullish(),bucket_index:z.number().int().nullish(),maker_orders:z.array(Ie).nullish(),trader_side:z.union([z.literal("TAKER"),z.literal("MAKER")]).nullish(),timestamp:ha}).transform(({event_type:t,type:n,taker_order_id:a,asset_id:i,fee_rate_bps:s,match_time:p,matchtime:S,last_update:P,trade_owner:E,maker_address:v,transaction_hash:k,bucket_index:C,maker_orders:z,trader_side:ke,...Ce})=>({topic:"user",type:t,payload:{...Ce,takerOrderId:a,tokenId:i,feeRateBps:s,matchedAt:p??S,updatedAt:P,tradeOwner:E,makerAddress:v,transactionHash:k,bucketIndex:C,makerOrders:z,traderSide:ke}})),qt=z.discriminatedUnion("event_type",[ne,ae,ie,se]),Ot=z.discriminatedUnion("event_type",[oe,ce,me]),jt=z.discriminatedUnion("event_type",[ne,ae,ie,se,oe,ce,me]),Nt=z.discriminatedUnion("event_type",[ze,we]);var de=z.number().int().nonnegative(),Ue=z.string().regex(/^trades::\d+$/),Me=z.string().regex(/^bbo::\d+$/),Re=z.string().regex(/^book::\d+$/),Ae=z.string().regex(/^tickers::(all|\d+)$/),Be=z.string().regex(/^statistics::(all|\d+)$/),qe=z.string().regex(/^klines::\d+::(1m|5m|15m|1h|4h|1d|1w)$/),Oe=z.string().regex(/^tpsl::\d+$/),je=z.enum(["balances","portfolio","orders","fills","funding","deposits","withdrawals","notifications"]),u=z.object({ts:fa,sq:de}),Ne=u.extend({ch:Ue,data:z.array(Ga)}).transform(({ch:t,ts:n,sq:a,data:i})=>({topic:"perps.trades",type:"trade",channel:t,timestamp:n,sequence:a,payload:i})),De=u.extend({ch:Me,data:Ea}).transform(({ch:t,ts:n,sq:a,data:i})=>({topic:"perps.bbo",type:"bbo",channel:t,timestamp:n,sequence:a,payload:i})),Le=u.extend({ch:Re,data:Ca$1}).transform(({ch:t,ts:n,sq:a,data:i})=>({topic:"perps.book",type:"book",channel:t,timestamp:n,sequence:a,payload:{instrumentId:he(t),...i}})),$e=u.extend({ch:Ae,data:va}).transform(({ch:t,ts:n,sq:a,data:i})=>({topic:"perps.tickers",type:"ticker",channel:t,timestamp:n,sequence:a,payload:i})),Fe=u.extend({ch:Be,data:za}).transform(({ch:t,ts:n,sq:a,data:i})=>({topic:"perps.statistics",type:"statistic",channel:t,timestamp:n,sequence:a,payload:i})),Ke=u.extend({ch:qe,data:z.array(wa)}).transform(({ch:t,ts:n,sq:a,data:i})=>({topic:"perps.candles",type:"candle",channel:t,timestamp:n,sequence:a,payload:{instrumentId:he(t),interval:rt(t),candles:i}})),Qt=z.union([Ne,De,Le,$e,Fe,Ke]),We=u.extend({ch:je});function f(t,n,a){return We.extend({ch:z.literal(n),data:a}).transform(i=>{let s=i;return {type:t,channel:s.ch,timestamp:s.ts,sequence:s.sq,payload:s.data}})}var He=f("balance","balances",P$1),Ye=f("portfolio","portfolio",V),Ze=f("order","orders",pb),Ve=f("fill","fills",z.array(sb)),Qe=f("funding","funding",Z),Ge=f("deposit","deposits",ka),Je=f("withdrawal","withdrawals",oa),Xe=f("notification","notifications",_a),Gt=z.object({ch:z.literal("notifications"),ts:fa,sq:de,type:z.literal("resync")}).transform(({ch:t,ts:n,sq:a})=>({type:"resync",channel:t,timestamp:n,sequence:a})),et=z.object({oid:b$1,st:z.enum(["untriggered","armed","cancelled","expired"]),reason:z.string().optional()}),tt=u.extend({ch:Oe,data:et.transform(t=>({orderId:t.oid,status:t.st,reason:t.reason}))}).transform(({ch:t,ts:n,sq:a,data:i})=>({type:"tpsl",channel:t,timestamp:n,sequence:a,payload:i})),Jt=z.union([He,Ye,Ze,Ve,Qe,Ge,Je,Xe,tt]);function he(t){let[,n]=t.split("::");return a.parse(Number(n))}function rt(t){let[,,n]=t.split("::");return n}var nt=z.object({id:z.string(),body:z.string().nullish(),parentEntityType:za$1.nullish(),parentEntityID:z.number().int().nullish(),parentCommentID:z.string().nullish(),userAddress:z.string().nullish(),replyAddress:z.string().nullish(),createdAt:z.string().nullish(),updatedAt:z.string().nullish(),media:z.array(O).nullish(),profile:K.nullish(),reactions:z.array(N).nullish(),reportCount:z.number().int().nullish(),reactionCount:z.number().int().nullish(),tradeAsset:z.string().nullish()}),at=z.object({topic:z.literal("comments"),type:z.literal("comment_created"),timestamp:fa,payload:P}),it=z.object({topic:z.literal("comments"),type:z.literal("comment_removed"),timestamp:fa,payload:nt}),st=z.object({topic:z.literal("comments"),type:z.literal("reaction_created"),timestamp:fa,payload:N}),ot=z.object({topic:z.literal("comments"),type:z.literal("reaction_removed"),timestamp:fa,payload:N}),Se=z.object({symbol:z.string(),timestamp:fa,value:Ra}),pt="prices.crypto.binance",ct="prices.crypto.chainlink",ue="prices.crypto.chainlink.twap",mt=z.literal("crypto_prices"),lt=z.literal("crypto_prices_chainlink"),dt=z.literal("crypto_prices_twap_thirty"),ht=z.literal("crypto_prices_twap_sixty"),yt=mt.transform(()=>pt),St=lt.transform(()=>ct),ut=dt.transform(()=>ue),ft=ht.transform(()=>ue),Pt=z.object({topic:yt,type:z.literal("update"),timestamp:fa,payload:Se}),Et=z.object({topic:St,type:z.literal("update"),timestamp:fa,payload:Se}),ye=1000000000000000000n;function vt(t){let n=BigInt(t),a=n<0n,i=a?-n:n,s=i/ye,p=(i%ye).toString().padStart(18,"0").replace(/0+$/,"");return S(`${a?"-":""}${s}${p===""?"":`.${p}`}`)}var kt=z.string().regex(/^-?\d+$/).transform(vt),Ct=z.object({symbol:z.string(),value:Ra,full_accuracy_value:kt,timestamp:fa});function fe(t){return Ct.extend({window_s:z.literal(t)}).transform(n=>({symbol:n.symbol,timestamp:n.timestamp,value:n.full_accuracy_value,windowSeconds:n.window_s}))}var Pe=z.object({topic:ut,type:z.literal("update"),timestamp:fa,payload:fe(30)}),Ee=z.object({topic:ft,type:z.literal("update"),timestamp:fa,payload:fe(60)}),nr=z.union([Pe,Ee]),gt=z.discriminatedUnion("topic",[Pt,Et,Pe,Ee]),_t=z.object({symbol:z.string(),value:Ra,full_accuracy_value:Pa.nullish(),timestamp:fa,received_at:fa.nullish(),is_carried_forward:z.boolean().nullish()}).transform(({full_accuracy_value:t,received_at:n,is_carried_forward:a,value:i,...s})=>({...s,value:t??i,receivedAt:n,isCarriedForward:a})),xt=z.object({timestamp:z.number(),value:Ra}),Tt=z.object({symbol:z.string(),data:z.array(xt)}),bt=z.literal("equity_prices"),zt="prices.equity.pyth",ve=bt.transform(()=>zt),It=z.object({topic:ve,type:z.literal("update"),timestamp:fa,payload:_t}),wt=z.object({topic:ve,type:z.literal("subscribe"),timestamp:fa,payload:Tt}),Ut=z.discriminatedUnion("type",[It,wt]),Mt=z.discriminatedUnion("type",[at,it,st,ot]),ar=z.discriminatedUnion("topic",[Mt,gt,Ut]);var Rt=z.object({gameId:z.number().int(),sportradarGameId:z.string().nullish(),slug:z.string().nullish(),leagueAbbreviation:z.string(),homeTeam:z.string().nullish(),awayTeam:z.string().nullish(),status:z.string(),live:z.boolean(),ended:z.boolean(),score:z.string(),period:z.string().nullish(),elapsed:z.string().nullish(),finishedTimestamp:ma.nullish(),finished_timestamp:ma.nullish(),turn:z.string().nullish()}).transform(({finishedTimestamp:t,finished_timestamp:n,...a})=>({...a,finishedAt:t??n})),pr=Rt.transform(t=>({topic:"sports",type:"sport_result",payload:t}));export{at as CommentCreatedEventSchema,it as CommentRemovedEventSchema,Mt as CommentsEventSchema,Pt as CryptoPricesBinanceEventSchema,Et as CryptoPricesChainlinkEventSchema,nr as CryptoPricesChainlinkTwapEventSchema,Ee as CryptoPricesChainlinkTwapSixtyEventSchema,Pe as CryptoPricesChainlinkTwapThirtyEventSchema,gt as CryptoPricesEventSchema,Ot as CustomMarketEventSchema,Ut as EquityPricesEventSchema,wt as EquityPricesSubscribeEventSchema,It as EquityPricesUpdateEventSchema,oe as MarketBestBidAskEventSchema,ne as MarketBookEventSchema,jt as MarketEventSchema,ie as MarketLastTradePriceEventSchema,ae as MarketPriceChangeEventSchema,me as MarketResolvedEventSchema,se as MarketTickSizeChangeEventSchema,ce as NewMarketEventSchema,He as PerpsBalanceUpdateEventSchema,De as PerpsBboEventSchema,Le as PerpsBookEventSchema,Ke as PerpsCandleEventSchema,Ge as PerpsDepositUpdateEventSchema,Ve as PerpsFillUpdateEventSchema,Qe as PerpsFundingUpdateEventSchema,Qt as PerpsMarketDataEventSchema,Xe as PerpsNotificationUpdateEventSchema,Gt as PerpsNotificationsResyncFrameSchema,Ze as PerpsOrderUpdateEventSchema,Ye as PerpsPortfolioUpdateEventSchema,Jt as PerpsSessionUpdateEventSchema,Fe as PerpsStatisticEventSchema,$e as PerpsTickerEventSchema,tt as PerpsTpSlUpdateEventSchema,Ne as PerpsTradeEventSchema,Je as PerpsWithdrawalUpdateEventSchema,st as ReactionCreatedEventSchema,ot as ReactionRemovedEventSchema,ar as RealtimeEventSchema,pr as SportsResultEventSchema,qt as StandardMarketEventSchema,Nt as UserEventSchema,ze as UserOrderEventSchema,le as UserOrderEventType,re as UserOrderStatus,we as UserTradeEventSchema};//# sourceMappingURL=index.js.map
2
2
  //# sourceMappingURL=index.js.map