@polymarket/bindings 0.1.0-beta.3 → 0.1.0-beta.4

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/dist/index.d.ts CHANGED
@@ -27,7 +27,10 @@ type CategoryId = Tagged<string, 'CategoryId'>;
27
27
  type ChatId = Tagged<string, 'ChatId'>;
28
28
  type ClobRewardId = Tagged<string, 'ClobRewardId'>;
29
29
  type CommentId = Tagged<string, 'CommentId'>;
30
- type ConditionId = Tagged<HexString, 'ConditionId'>;
30
+ type ComboConditionId = Tagged<HexString, 'ComboConditionId'>;
31
+ type CtfConditionId = Tagged<HexString, 'CtfConditionId'>;
32
+ /** @deprecated Use {@link CtfConditionId}. */
33
+ type ConditionId = CtfConditionId;
31
34
  type CollectionId = Tagged<string, 'CollectionId'>;
32
35
  type EventCreatorId = Tagged<string, 'EventCreatorId'>;
33
36
  type EventExternalPartnerMappingId = Tagged<number, 'EventExternalPartnerMappingId'>;
@@ -65,7 +68,10 @@ declare function toCategoryId(value: string): CategoryId;
65
68
  declare function toChatId(value: string): ChatId;
66
69
  declare function toClobRewardId(value: string): ClobRewardId;
67
70
  declare function toCommentId(value: string): CommentId;
68
- declare function toConditionId(value: string): ConditionId;
71
+ declare function toCtfConditionId(value: string): CtfConditionId;
72
+ /** @deprecated Use {@link toCtfConditionId}. */
73
+ declare const toConditionId: typeof toCtfConditionId;
74
+ declare function toComboConditionId(value: string): ComboConditionId;
69
75
  declare function toCollectionId(value: string): CollectionId;
70
76
  declare function toEventCreatorId(value: string): EventCreatorId;
71
77
  declare function toEventExternalPartnerMappingId(value: number): EventExternalPartnerMappingId;
@@ -100,8 +106,13 @@ declare const ApiKeySchema: z.ZodPipe<z.ZodString, z.ZodTransform<ApiKey, string
100
106
  declare const BuilderCodeSchema: z.ZodPipe<z.ZodString, z.ZodTransform<BuilderCode, string>>;
101
107
  declare const ClobRewardIdSchema: z.ZodPipe<z.ZodString, z.ZodTransform<ClobRewardId, string>>;
102
108
  declare const CommentIdSchema: z.ZodPipe<z.ZodString, z.ZodTransform<CommentId, string>>;
103
- declare const ConditionIdSchema: z.ZodPipe<z.ZodString, z.ZodTransform<ConditionId, string>>;
104
- declare const OptionalConditionIdSchema: z.ZodPipe<z.ZodTransform<unknown, unknown>, z.ZodOptional<z.ZodPipe<z.ZodString, z.ZodTransform<ConditionId, string>>>>;
109
+ declare const ComboConditionIdSchema: z.ZodPipe<z.ZodString, z.ZodTransform<ComboConditionId, string>>;
110
+ declare const CtfConditionIdSchema: z.ZodPipe<z.ZodString, z.ZodTransform<CtfConditionId, string>>;
111
+ declare const OptionalCtfConditionIdSchema: z.ZodPipe<z.ZodTransform<unknown, unknown>, z.ZodOptional<z.ZodPipe<z.ZodString, z.ZodTransform<CtfConditionId, string>>>>;
112
+ /** @deprecated Use {@link CtfConditionIdSchema}. */
113
+ declare const ConditionIdSchema: z.ZodPipe<z.ZodString, z.ZodTransform<CtfConditionId, string>>;
114
+ /** @deprecated Use {@link OptionalCtfConditionIdSchema}. */
115
+ declare const OptionalConditionIdSchema: z.ZodPipe<z.ZodTransform<unknown, unknown>, z.ZodOptional<z.ZodPipe<z.ZodString, z.ZodTransform<CtfConditionId, string>>>>;
105
116
  declare const EvmAddressSchema: z.ZodPipe<z.ZodString, z.ZodTransform<EvmAddress, string>>;
106
117
  declare const EpochMillisecondsSchema: z.ZodPipe<z.ZodNumber, z.ZodTransform<EpochMilliseconds, number>>;
107
118
  declare const EpochSecondsToMillisecondsSchema: z.ZodPipe<z.ZodNumber, z.ZodTransform<EpochMilliseconds, number>>;
@@ -144,4 +155,4 @@ type ISODateString = IsoDateTimeString;
144
155
  type ISOCalendarDateString = IsoCalendarDateString;
145
156
  type TickSizeValue = z.output<typeof TickSizeValueSchema>;
146
157
 
147
- export { type ApiKey, ApiKeySchema, type BaseUnits, BaseUnitsSchema, type BestLineId, type BuilderCode, BuilderCodeSchema, type CategoryId, CategoryIdSchema, type ChatId, type ClobRewardId, ClobRewardIdSchema, type CollectionId, type CommentId, CommentIdSchema, CommentParentEntityType, CommentParentEntityTypeSchema, type ConditionId, ConditionIdSchema, DateLikeToIsoDateTimeStringSchema, type DecimalString, DecimalStringSchema, DecimalishSchema, EpochLikeToIsoDateTimeStringSchema, type EpochMilliseconds, EpochMillisecondsSchema, EpochMillisecondsStringSchema, EpochMillisecondsToIsoDateTimeStringSchema, EpochSecondsToMillisecondsSchema, type EventCreatorId, type EventExternalPartnerMappingId, type EventId, EventIdSchema, EvmAddressSchema, ISOCalendarDateSchema, type ISOCalendarDateString, type ISODateString, ISODateStringSchema, type ImageOptimizationId, ImageOptimizationIdSchema, type InternalUserId, InternalUserIdSchema, type IsoCalendarDateString, IsoCalendarDateStringSchema, type IsoDateTimeString, IsoDateTimeStringSchema, type MarketId, MarketIdSchema, type MixedDateTimeString, MixedDateTimeStringSchema, type NotificationId, NotificationIdSchema, OptionalConditionIdSchema, OptionalDateLikeToIsoDateTimeStringSchema, OptionalEpochMillisecondsToIsoDateTimeStringSchema, OrderSide, OrderSideSchema, OrderType, OrderTypeSchema, type PaginationCursor, PaginationCursorSchema, type PartnerId, type PositionId, PositionIdSchema, PositiveDecimalNumberSchema, type QuestionId, QuestionIdSchema, type ResolutionRequestId, ResolutionRequestIdSchema, type RfqId, RfqIdSchema, type RfqQuoteId, RfqQuoteIdSchema, type RfqRequestorPublicId, RfqRequestorPublicIdSchema, type SeriesId, type SportId, type TagId, TagIdSchema, type TeamId, type TemplateId, type TickSizeValue, TickSizeValueSchema, type TokenId, TokenIdSchema, type TransactionId, TransactionIdSchema, TxHashSchema, type Uuid, toApiKey, toBaseUnits, toBestLineId, toBuilderCode, toCategoryId, toChatId, toClobRewardId, toCollectionId, toCommentId, toConditionId, toDecimalString, toEpochMilliseconds, toEventCreatorId, toEventExternalPartnerMappingId, toEventId, toImageOptimizationId, toInternalUserId, toIsoCalendarDateString, toIsoDateTimeString, toMarketId, toMixedDateTimeString, toNotificationId, toPaginationCursor, toPartnerId, toPositionId, toQuestionId, toResolutionRequestId, toRfqId, toRfqQuoteId, toRfqRequestorPublicId, toSeriesId, toSportId, toTagId, toTeamId, toTemplateId, toTokenId, toTransactionId, toUuid };
158
+ export { type ApiKey, ApiKeySchema, type BaseUnits, BaseUnitsSchema, type BestLineId, type BuilderCode, BuilderCodeSchema, type CategoryId, CategoryIdSchema, type ChatId, type ClobRewardId, ClobRewardIdSchema, type CollectionId, type ComboConditionId, ComboConditionIdSchema, type CommentId, CommentIdSchema, CommentParentEntityType, CommentParentEntityTypeSchema, type ConditionId, ConditionIdSchema, type CtfConditionId, CtfConditionIdSchema, DateLikeToIsoDateTimeStringSchema, type DecimalString, DecimalStringSchema, DecimalishSchema, EpochLikeToIsoDateTimeStringSchema, type EpochMilliseconds, EpochMillisecondsSchema, EpochMillisecondsStringSchema, EpochMillisecondsToIsoDateTimeStringSchema, EpochSecondsToMillisecondsSchema, type EventCreatorId, type EventExternalPartnerMappingId, type EventId, EventIdSchema, EvmAddressSchema, ISOCalendarDateSchema, type ISOCalendarDateString, type ISODateString, ISODateStringSchema, type ImageOptimizationId, ImageOptimizationIdSchema, type InternalUserId, InternalUserIdSchema, type IsoCalendarDateString, IsoCalendarDateStringSchema, type IsoDateTimeString, IsoDateTimeStringSchema, type MarketId, MarketIdSchema, type MixedDateTimeString, MixedDateTimeStringSchema, type NotificationId, NotificationIdSchema, OptionalConditionIdSchema, OptionalCtfConditionIdSchema, OptionalDateLikeToIsoDateTimeStringSchema, OptionalEpochMillisecondsToIsoDateTimeStringSchema, OrderSide, OrderSideSchema, OrderType, OrderTypeSchema, type PaginationCursor, PaginationCursorSchema, type PartnerId, type PositionId, PositionIdSchema, PositiveDecimalNumberSchema, type QuestionId, QuestionIdSchema, type ResolutionRequestId, ResolutionRequestIdSchema, type RfqId, RfqIdSchema, type RfqQuoteId, RfqQuoteIdSchema, type RfqRequestorPublicId, RfqRequestorPublicIdSchema, type SeriesId, type SportId, type TagId, TagIdSchema, type TeamId, type TemplateId, type TickSizeValue, TickSizeValueSchema, type TokenId, TokenIdSchema, type TransactionId, TransactionIdSchema, TxHashSchema, type Uuid, toApiKey, toBaseUnits, toBestLineId, toBuilderCode, toCategoryId, toChatId, toClobRewardId, toCollectionId, toComboConditionId, toCommentId, toConditionId, toCtfConditionId, toDecimalString, toEpochMilliseconds, toEventCreatorId, toEventExternalPartnerMappingId, toEventId, toImageOptimizationId, toInternalUserId, toIsoCalendarDateString, toIsoDateTimeString, toMarketId, toMixedDateTimeString, toNotificationId, toPaginationCursor, toPartnerId, toPositionId, toQuestionId, toResolutionRequestId, toRfqId, toRfqQuoteId, toRfqRequestorPublicId, toSeriesId, toSportId, toTagId, toTeamId, toTemplateId, toTokenId, toTransactionId, toUuid };
package/dist/index.js CHANGED
@@ -1,2 +1,2 @@
1
- export{Q as ApiKeySchema,Fa as BaseUnitsSchema,R as BuilderCodeSchema,P as CategoryIdSchema,S as ClobRewardIdSchema,T as CommentIdSchema,a as CommentParentEntityType,oa as CommentParentEntityTypeSchema,U as ConditionIdSchema,_ as DateLikeToIsoDateTimeStringSchema,Ca as DecimalStringSchema,Da as DecimalishSchema,$ as EpochLikeToIsoDateTimeStringSchema,X as EpochMillisecondsSchema,Z as EpochMillisecondsStringSchema,ba as EpochMillisecondsToIsoDateTimeStringSchema,Y as EpochSecondsToMillisecondsSchema,da as EventIdSchema,W as EvmAddressSchema,ja as ISOCalendarDateSchema,ia as ISODateStringSchema,ka as ImageOptimizationIdSchema,la as InternalUserIdSchema,ga as IsoCalendarDateStringSchema,fa as IsoDateTimeStringSchema,ma as MarketIdSchema,ha as MixedDateTimeStringSchema,na as NotificationIdSchema,V as OptionalConditionIdSchema,aa as OptionalDateLikeToIsoDateTimeStringSchema,ca as OptionalEpochMillisecondsToIsoDateTimeStringSchema,b as OrderSide,pa as OrderSideSchema,c as OrderType,qa as OrderTypeSchema,ra as PaginationCursorSchema,sa as PositionIdSchema,Ea as PositiveDecimalNumberSchema,ta as QuestionIdSchema,ua as ResolutionRequestIdSchema,va as RfqIdSchema,wa as RfqQuoteIdSchema,xa as RfqRequestorPublicIdSchema,ya as TagIdSchema,ea as TickSizeValueSchema,za as TokenIdSchema,Aa as TransactionIdSchema,Ba as TxHashSchema,g as toApiKey,O as toBaseUnits,d as toBestLineId,e as toBuilderCode,h as toCategoryId,i as toChatId,j as toClobRewardId,m as toCollectionId,k as toCommentId,l as toConditionId,N as toDecimalString,p as toEpochMilliseconds,n as toEventCreatorId,o as toEventExternalPartnerMappingId,q as toEventId,r as toImageOptimizationId,s as toInternalUserId,t as toIsoCalendarDateString,u as toIsoDateTimeString,w as toMarketId,v as toMixedDateTimeString,x as toNotificationId,z as toPaginationCursor,y as toPartnerId,A as toPositionId,B as toQuestionId,C as toResolutionRequestId,D as toRfqId,E as toRfqQuoteId,F as toRfqRequestorPublicId,G as toSeriesId,H as toSportId,I as toTagId,J as toTeamId,K as toTemplateId,M as toTokenId,L as toTransactionId,f as toUuid}from'./chunk-KZQH7LDK.js';//# sourceMappingURL=index.js.map
1
+ export{S as ApiKeySchema,Ka as BaseUnitsSchema,T as BuilderCodeSchema,R as CategoryIdSchema,U as ClobRewardIdSchema,W as ComboConditionIdSchema,V as CommentIdSchema,a as CommentParentEntityType,ta as CommentParentEntityTypeSchema,Z as ConditionIdSchema,X as CtfConditionIdSchema,da as DateLikeToIsoDateTimeStringSchema,Ha as DecimalStringSchema,Ia as DecimalishSchema,ea as EpochLikeToIsoDateTimeStringSchema,aa as EpochMillisecondsSchema,ca as EpochMillisecondsStringSchema,ga as EpochMillisecondsToIsoDateTimeStringSchema,ba as EpochSecondsToMillisecondsSchema,ia as EventIdSchema,$ as EvmAddressSchema,oa as ISOCalendarDateSchema,na as ISODateStringSchema,pa as ImageOptimizationIdSchema,qa as InternalUserIdSchema,la as IsoCalendarDateStringSchema,ka as IsoDateTimeStringSchema,ra as MarketIdSchema,ma as MixedDateTimeStringSchema,sa as NotificationIdSchema,_ as OptionalConditionIdSchema,Y as OptionalCtfConditionIdSchema,fa as OptionalDateLikeToIsoDateTimeStringSchema,ha as OptionalEpochMillisecondsToIsoDateTimeStringSchema,b as OrderSide,ua as OrderSideSchema,c as OrderType,va as OrderTypeSchema,wa as PaginationCursorSchema,xa as PositionIdSchema,Ja as PositiveDecimalNumberSchema,ya as QuestionIdSchema,za as ResolutionRequestIdSchema,Aa as RfqIdSchema,Ba as RfqQuoteIdSchema,Ca as RfqRequestorPublicIdSchema,Da as TagIdSchema,ja as TickSizeValueSchema,Ea as TokenIdSchema,Fa as TransactionIdSchema,Ga as TxHashSchema,g as toApiKey,Q as toBaseUnits,d as toBestLineId,e as toBuilderCode,h as toCategoryId,i as toChatId,j as toClobRewardId,o as toCollectionId,n as toComboConditionId,k as toCommentId,m as toConditionId,l as toCtfConditionId,P as toDecimalString,r as toEpochMilliseconds,p as toEventCreatorId,q as toEventExternalPartnerMappingId,s as toEventId,t as toImageOptimizationId,u as toInternalUserId,v as toIsoCalendarDateString,w as toIsoDateTimeString,y as toMarketId,x as toMixedDateTimeString,z as toNotificationId,B as toPaginationCursor,A as toPartnerId,C as toPositionId,D as toQuestionId,E as toResolutionRequestId,F as toRfqId,G as toRfqQuoteId,H as toRfqRequestorPublicId,I as toSeriesId,J as toSportId,K as toTagId,L as toTeamId,M as toTemplateId,O as toTokenId,N as toTransactionId,f as toUuid}from'./chunk-IHJYHHWK.js';//# sourceMappingURL=index.js.map
2
2
  //# sourceMappingURL=index.js.map
@@ -1,2 +1,2 @@
1
- import {W as W$1,Aa,Ba}from'../chunk-KZQH7LDK.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:W$1.optional(),operation:z.string().optional(),payment:z.string().optional(),paymentReceiver:W$1.optional(),paymentToken:W$1.optional(),refundReceiver:W$1.optional(),relay:W$1.optional(),relayHub:W$1.optional(),relayerFee:z.string().optional(),safeTxnGas:z.string().optional()}),d=z.object({address:W$1,nonce:z.string().min(1)}),R=z.object({data:z.string().min(1),from:W$1,metadata:z.string().optional(),nonce:z.string().min(1).optional(),proxyWallet:W$1,signature:z.string().min(1),signatureParams:y,to:W$1,type:u,value:z.string().optional()}),T=z.object({data:z.string().min(1),target:W$1,value:z.string().min(1)}),x=z.object({calls:z.array(T).min(1),deadline:z.string().min(1),depositWallet:W$1}),S=z.object({depositWalletParams:x,from:W$1,metadata:z.string().optional(),nonce:z.string().min(1),signature:z.string().min(1),to:W$1,type:z.literal("WALLET")}),g=z.object({from:W$1,metadata:z.string().optional(),to:W$1,type:z.literal("WALLET-CREATE")}),W=z.union([R,S,g]),f=z.object({state:m,transactionHash:Ba.nullish().transform(a=>a??null),transactionID:Aa}).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(""),Ba]).transform(a=>a===""?null:a),transaction_id:Aa}).transform(({error_msg:a,transaction_hash:s,transaction_id:r,...E})=>({...E,errorMsg:a??null,transactionHash:s??null,transactionId:r}));export{T as DepositWalletCallSchema,x as DepositWalletParamsSchema,_ as GaslessTransactionSchema,L as RelayerDeployedResponseSchema,g as RelayerDepositWalletCreateRequestSchema,S as RelayerDepositWalletExecuteRequestSchema,d as RelayerExecuteParamsSchema,W as RelayerExecuteRequestSchema,f as RelayerExecuteResponseSchema,R as RelayerLegacyExecuteRequestSchema,c as RelayerTransactionState,i as RelayerTransactionType,D as RelayerTransactionTypeSchema};//# sourceMappingURL=index.js.map
1
+ import {$,Fa,Ga}from'../chunk-IHJYHHWK.js';import {z}from'zod';var i=(n=>(n.SAFE="SAFE",n.PROXY="PROXY",n.SAFE_CREATE="SAFE-CREATE",n.WALLET="WALLET",n.WALLET_CREATE="WALLET-CREATE",n))(i||{}),D=z.enum(i),u=z.enum(["PROXY","SAFE","SAFE-CREATE"]),c=(o=>(o.STATE_NEW="STATE_NEW",o.STATE_EXECUTED="STATE_EXECUTED",o.STATE_MINED="STATE_MINED",o.STATE_CONFIRMED="STATE_CONFIRMED",o.STATE_INVALID="STATE_INVALID",o.STATE_FAILED="STATE_FAILED",o))(c||{}),m=z.enum(c),y=z.object({baseGas:z.string().optional(),gasLimit:z.string().optional(),gasPrice:z.string().optional(),gasToken:$.optional(),operation:z.string().optional(),payment:z.string().optional(),paymentReceiver:$.optional(),paymentToken:$.optional(),refundReceiver:$.optional(),relay:$.optional(),relayHub:$.optional(),relayerFee:z.string().optional(),safeTxnGas:z.string().optional()}),d=z.object({address:$,nonce:z.string().min(1)}),R=z.object({data:z.string().min(1),from:$,metadata:z.string().optional(),nonce:z.string().min(1).optional(),proxyWallet:$,signature:z.string().min(1),signatureParams:y,to:$,type:u,value:z.string().optional()}),T=z.object({data:z.string().min(1),target:$,value:z.string().min(1)}),x=z.object({calls:z.array(T).min(1),deadline:z.string().min(1),depositWallet:$}),S=z.object({depositWalletParams:x,from:$,metadata:z.string().optional(),nonce:z.string().min(1),signature:z.string().min(1),to:$,type:z.literal("WALLET")}),g=z.object({from:$,metadata:z.string().optional(),to:$,type:z.literal("WALLET-CREATE")}),W=z.union([R,S,g]),f=z.object({state:m,transactionHash:Ga.nullish().transform(a=>a??null),transactionID:Fa}).transform(({transactionHash:a,transactionID:s,...r})=>({...r,transactionHash:a??null,transactionId:s})),L=z.object({deployed:z.boolean()}),_=z.object({error_msg:z.string().nullish(),state:m,transaction_hash:z.union([z.literal(""),Ga]).transform(a=>a===""?null:a),transaction_id:Fa}).transform(({error_msg:a,transaction_hash:s,transaction_id:r,...E})=>({...E,errorMsg:a??null,transactionHash:s??null,transactionId:r}));export{T as DepositWalletCallSchema,x as DepositWalletParamsSchema,_ as GaslessTransactionSchema,L as RelayerDeployedResponseSchema,g as RelayerDepositWalletCreateRequestSchema,S as RelayerDepositWalletExecuteRequestSchema,d as RelayerExecuteParamsSchema,W as RelayerExecuteRequestSchema,f as RelayerExecuteResponseSchema,R as RelayerLegacyExecuteRequestSchema,c as RelayerTransactionState,i as RelayerTransactionType,D as RelayerTransactionTypeSchema};//# sourceMappingURL=index.js.map
2
2
  //# sourceMappingURL=index.js.map
@@ -1 +1 @@
1
- {"version":3,"sources":["../../src/relayer/transaction.ts"],"names":["RelayerTransactionType","RelayerTransactionTypeSchema","z","RelayerLegacyTransactionTypeSchema","RelayerTransactionState","RelayerTransactionStateSchema","RelayerSignatureParamsSchema","EvmAddressSchema","RelayerExecuteParamsSchema","RelayerLegacyExecuteRequestSchema","DepositWalletCallSchema","DepositWalletParamsSchema","RelayerDepositWalletExecuteRequestSchema","RelayerDepositWalletCreateRequestSchema","RelayerExecuteRequestSchema","RelayerExecuteResponseSchema","TxHashSchema","value","TransactionIdSchema","transactionHash","transactionID","rest","RelayerDeployedResponseSchema","GaslessTransactionSchema","error_msg","transaction_hash","transaction_id"],"mappings":"sEAGO,IAAKA,OACVA,CAAAA,CAAA,IAAA,CAAO,MAAA,CACPA,CAAAA,CAAA,KAAA,CAAQ,OAAA,CACRA,EAAA,WAAA,CAAc,aAAA,CACdA,EAAA,MAAA,CAAS,QAAA,CACTA,EAAA,aAAA,CAAgB,eAAA,CALNA,CAAAA,CAAAA,EAAAA,CAAAA,EAAA,EAAA,CAAA,CAQCC,CAAAA,CAA+BC,CAAAA,CAAE,KAAKF,CAAsB,CAAA,CAEnEG,EAAqCD,CAAAA,CAAE,IAAA,CAAK,CAChD,OAAA,CACA,MAAA,CACA,aACF,CAAC,CAAA,CAEWE,CAAAA,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AAK,KAAO,CACxE,GAAGA,CAAAA,CACH,QAAA,CAAUG,CAAAA,EAAa,IAAA,CACvB,gBAAiBC,CAAAA,EAAoB,IAAA,CACrC,aAAA,CAAeC,CACjB,CAAA,CAAE","file":"index.js","sourcesContent":["import { z } from 'zod';\nimport { EvmAddressSchema, TransactionIdSchema, TxHashSchema } from '../shared';\n\nexport enum RelayerTransactionType {\n SAFE = 'SAFE',\n PROXY = 'PROXY',\n SAFE_CREATE = 'SAFE-CREATE',\n WALLET = 'WALLET',\n WALLET_CREATE = 'WALLET-CREATE',\n}\n\nexport const RelayerTransactionTypeSchema = z.enum(RelayerTransactionType);\n\nconst RelayerLegacyTransactionTypeSchema = z.enum([\n RelayerTransactionType.PROXY,\n RelayerTransactionType.SAFE,\n RelayerTransactionType.SAFE_CREATE,\n]);\n\nexport enum RelayerTransactionState {\n STATE_NEW = 'STATE_NEW',\n STATE_EXECUTED = 'STATE_EXECUTED',\n STATE_MINED = 'STATE_MINED',\n STATE_CONFIRMED = 'STATE_CONFIRMED',\n STATE_INVALID = 'STATE_INVALID',\n STATE_FAILED = 'STATE_FAILED',\n}\n\nconst RelayerTransactionStateSchema = z.enum(RelayerTransactionState);\n\nconst RelayerSignatureParamsSchema = z.object({\n baseGas: z.string().optional(),\n gasLimit: z.string().optional(),\n gasPrice: z.string().optional(),\n gasToken: EvmAddressSchema.optional(),\n operation: z.string().optional(),\n payment: z.string().optional(),\n paymentReceiver: EvmAddressSchema.optional(),\n paymentToken: EvmAddressSchema.optional(),\n refundReceiver: EvmAddressSchema.optional(),\n relay: EvmAddressSchema.optional(),\n relayHub: EvmAddressSchema.optional(),\n relayerFee: z.string().optional(),\n safeTxnGas: z.string().optional(),\n});\n\nexport const RelayerExecuteParamsSchema = z.object({\n address: EvmAddressSchema,\n nonce: z.string().min(1),\n});\n\nexport type RelayerExecuteParams = z.output<typeof RelayerExecuteParamsSchema>;\n\nexport const RelayerLegacyExecuteRequestSchema = z.object({\n data: z.string().min(1),\n from: EvmAddressSchema,\n metadata: z.string().optional(),\n nonce: z.string().min(1).optional(),\n proxyWallet: EvmAddressSchema,\n signature: z.string().min(1),\n signatureParams: RelayerSignatureParamsSchema,\n to: EvmAddressSchema,\n type: RelayerLegacyTransactionTypeSchema,\n value: z.string().optional(),\n});\n\nexport type RelayerLegacyExecuteRequest = z.input<\n typeof RelayerLegacyExecuteRequestSchema\n>;\n\nexport const DepositWalletCallSchema = z.object({\n data: z.string().min(1),\n target: EvmAddressSchema,\n value: z.string().min(1),\n});\n\nexport type DepositWalletCall = z.input<typeof DepositWalletCallSchema>;\n\nexport const DepositWalletParamsSchema = z.object({\n calls: z.array(DepositWalletCallSchema).min(1),\n deadline: z.string().min(1),\n depositWallet: EvmAddressSchema,\n});\n\nexport type DepositWalletParams = z.input<typeof DepositWalletParamsSchema>;\n\nexport const RelayerDepositWalletExecuteRequestSchema = z.object({\n depositWalletParams: DepositWalletParamsSchema,\n from: EvmAddressSchema,\n metadata: z.string().optional(),\n nonce: z.string().min(1),\n signature: z.string().min(1),\n to: EvmAddressSchema,\n type: z.literal(RelayerTransactionType.WALLET),\n});\n\nexport type RelayerDepositWalletExecuteRequest = z.input<\n typeof RelayerDepositWalletExecuteRequestSchema\n>;\n\nexport const RelayerDepositWalletCreateRequestSchema = z.object({\n from: EvmAddressSchema,\n metadata: z.string().optional(),\n to: EvmAddressSchema,\n type: z.literal(RelayerTransactionType.WALLET_CREATE),\n});\n\nexport type RelayerDepositWalletCreateRequest = z.input<\n typeof RelayerDepositWalletCreateRequestSchema\n>;\n\nexport const RelayerExecuteRequestSchema = z.union([\n RelayerLegacyExecuteRequestSchema,\n RelayerDepositWalletExecuteRequestSchema,\n RelayerDepositWalletCreateRequestSchema,\n]);\n\nexport type RelayerExecuteRequest = z.input<typeof RelayerExecuteRequestSchema>;\n\nexport const RelayerExecuteResponseSchema = z\n .object({\n state: RelayerTransactionStateSchema,\n transactionHash: TxHashSchema.nullish().transform((value) => value ?? null),\n transactionID: TransactionIdSchema,\n })\n .transform(({ transactionHash, transactionID, ...rest }) => ({\n ...rest,\n transactionHash: transactionHash ?? null,\n transactionId: transactionID,\n }));\n\nexport type RelayerExecuteResponse = z.output<\n typeof RelayerExecuteResponseSchema\n>;\n\nexport const RelayerDeployedResponseSchema = z.object({\n deployed: z.boolean(),\n});\n\nexport type RelayerDeployedResponse = z.output<\n typeof RelayerDeployedResponseSchema\n>;\n\nexport const GaslessTransactionSchema = z\n .object({\n error_msg: z.string().nullish(),\n state: RelayerTransactionStateSchema,\n transaction_hash: z\n .union([z.literal(''), TxHashSchema])\n .transform((value) => (value === '' ? null : value)),\n transaction_id: TransactionIdSchema,\n })\n .transform(({ error_msg, transaction_hash, transaction_id, ...rest }) => ({\n ...rest,\n errorMsg: error_msg ?? null,\n transactionHash: transaction_hash ?? null,\n transactionId: transaction_id,\n }));\n\nexport type GaslessTransaction = z.output<typeof GaslessTransactionSchema>;\n"]}
1
+ {"version":3,"sources":["../../src/relayer/transaction.ts"],"names":["RelayerTransactionType","RelayerTransactionTypeSchema","z","RelayerLegacyTransactionTypeSchema","RelayerTransactionState","RelayerTransactionStateSchema","RelayerSignatureParamsSchema","EvmAddressSchema","RelayerExecuteParamsSchema","RelayerLegacyExecuteRequestSchema","DepositWalletCallSchema","DepositWalletParamsSchema","RelayerDepositWalletExecuteRequestSchema","RelayerDepositWalletCreateRequestSchema","RelayerExecuteRequestSchema","RelayerExecuteResponseSchema","TxHashSchema","value","TransactionIdSchema","transactionHash","transactionID","rest","RelayerDeployedResponseSchema","GaslessTransactionSchema","error_msg","transaction_hash","transaction_id"],"mappings":"+DAGO,IAAKA,OACVA,CAAAA,CAAA,IAAA,CAAO,MAAA,CACPA,CAAAA,CAAA,KAAA,CAAQ,OAAA,CACRA,EAAA,WAAA,CAAc,aAAA,CACdA,EAAA,MAAA,CAAS,QAAA,CACTA,EAAA,aAAA,CAAgB,eAAA,CALNA,CAAAA,CAAAA,EAAAA,CAAAA,EAAA,EAAA,CAAA,CAQCC,C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rD,cAAA,CAAgBC,EAClB,CAAC,CAAA,CACA,SAAA,CAAU,CAAC,CAAE,SAAA,CAAAM,EAAW,gBAAA,CAAAC,CAAAA,CAAkB,cAAA,CAAAC,CAAAA,CAAgB,GAAGL,CAAK,KAAO,CACxE,GAAGA,CAAAA,CACH,QAAA,CAAUG,CAAAA,EAAa,IAAA,CACvB,gBAAiBC,CAAAA,EAAoB,IAAA,CACrC,aAAA,CAAeC,CACjB,CAAA,CAAE","file":"index.js","sourcesContent":["import { z } from 'zod';\nimport { EvmAddressSchema, TransactionIdSchema, TxHashSchema } from '../shared';\n\nexport enum RelayerTransactionType {\n SAFE = 'SAFE',\n PROXY = 'PROXY',\n SAFE_CREATE = 'SAFE-CREATE',\n WALLET = 'WALLET',\n WALLET_CREATE = 'WALLET-CREATE',\n}\n\nexport const RelayerTransactionTypeSchema = z.enum(RelayerTransactionType);\n\nconst RelayerLegacyTransactionTypeSchema = z.enum([\n RelayerTransactionType.PROXY,\n RelayerTransactionType.SAFE,\n RelayerTransactionType.SAFE_CREATE,\n]);\n\nexport enum RelayerTransactionState {\n STATE_NEW = 'STATE_NEW',\n STATE_EXECUTED = 'STATE_EXECUTED',\n STATE_MINED = 'STATE_MINED',\n STATE_CONFIRMED = 'STATE_CONFIRMED',\n STATE_INVALID = 'STATE_INVALID',\n STATE_FAILED = 'STATE_FAILED',\n}\n\nconst RelayerTransactionStateSchema = z.enum(RelayerTransactionState);\n\nconst RelayerSignatureParamsSchema = z.object({\n baseGas: z.string().optional(),\n gasLimit: z.string().optional(),\n gasPrice: z.string().optional(),\n gasToken: EvmAddressSchema.optional(),\n operation: z.string().optional(),\n payment: z.string().optional(),\n paymentReceiver: EvmAddressSchema.optional(),\n paymentToken: EvmAddressSchema.optional(),\n refundReceiver: EvmAddressSchema.optional(),\n relay: EvmAddressSchema.optional(),\n relayHub: EvmAddressSchema.optional(),\n relayerFee: z.string().optional(),\n safeTxnGas: z.string().optional(),\n});\n\nexport const RelayerExecuteParamsSchema = z.object({\n address: EvmAddressSchema,\n nonce: z.string().min(1),\n});\n\nexport type RelayerExecuteParams = z.output<typeof RelayerExecuteParamsSchema>;\n\nexport const RelayerLegacyExecuteRequestSchema = z.object({\n data: z.string().min(1),\n from: EvmAddressSchema,\n metadata: z.string().optional(),\n nonce: z.string().min(1).optional(),\n proxyWallet: EvmAddressSchema,\n signature: z.string().min(1),\n signatureParams: RelayerSignatureParamsSchema,\n to: EvmAddressSchema,\n type: RelayerLegacyTransactionTypeSchema,\n value: z.string().optional(),\n});\n\nexport type RelayerLegacyExecuteRequest = z.input<\n typeof RelayerLegacyExecuteRequestSchema\n>;\n\nexport const DepositWalletCallSchema = z.object({\n data: z.string().min(1),\n target: EvmAddressSchema,\n value: z.string().min(1),\n});\n\nexport type DepositWalletCall = z.input<typeof DepositWalletCallSchema>;\n\nexport const DepositWalletParamsSchema = z.object({\n calls: z.array(DepositWalletCallSchema).min(1),\n deadline: z.string().min(1),\n depositWallet: EvmAddressSchema,\n});\n\nexport type DepositWalletParams = z.input<typeof DepositWalletParamsSchema>;\n\nexport const RelayerDepositWalletExecuteRequestSchema = z.object({\n depositWalletParams: DepositWalletParamsSchema,\n from: EvmAddressSchema,\n metadata: z.string().optional(),\n nonce: z.string().min(1),\n signature: z.string().min(1),\n to: EvmAddressSchema,\n type: z.literal(RelayerTransactionType.WALLET),\n});\n\nexport type RelayerDepositWalletExecuteRequest = z.input<\n typeof RelayerDepositWalletExecuteRequestSchema\n>;\n\nexport const RelayerDepositWalletCreateRequestSchema = z.object({\n from: EvmAddressSchema,\n metadata: z.string().optional(),\n to: EvmAddressSchema,\n type: z.literal(RelayerTransactionType.WALLET_CREATE),\n});\n\nexport type RelayerDepositWalletCreateRequest = z.input<\n typeof RelayerDepositWalletCreateRequestSchema\n>;\n\nexport const RelayerExecuteRequestSchema = z.union([\n RelayerLegacyExecuteRequestSchema,\n RelayerDepositWalletExecuteRequestSchema,\n RelayerDepositWalletCreateRequestSchema,\n]);\n\nexport type RelayerExecuteRequest = z.input<typeof RelayerExecuteRequestSchema>;\n\nexport const RelayerExecuteResponseSchema = z\n .object({\n state: RelayerTransactionStateSchema,\n transactionHash: TxHashSchema.nullish().transform((value) => value ?? null),\n transactionID: TransactionIdSchema,\n })\n .transform(({ transactionHash, transactionID, ...rest }) => ({\n ...rest,\n transactionHash: transactionHash ?? null,\n transactionId: transactionID,\n }));\n\nexport type RelayerExecuteResponse = z.output<\n typeof RelayerExecuteResponseSchema\n>;\n\nexport const RelayerDeployedResponseSchema = z.object({\n deployed: z.boolean(),\n});\n\nexport type RelayerDeployedResponse = z.output<\n typeof RelayerDeployedResponseSchema\n>;\n\nexport const GaslessTransactionSchema = z\n .object({\n error_msg: z.string().nullish(),\n state: RelayerTransactionStateSchema,\n transaction_hash: z\n .union([z.literal(''), TxHashSchema])\n .transform((value) => (value === '' ? null : value)),\n transaction_id: TransactionIdSchema,\n })\n .transform(({ error_msg, transaction_hash, transaction_id, ...rest }) => ({\n ...rest,\n errorMsg: error_msg ?? null,\n transactionHash: transaction_hash ?? null,\n transactionId: transaction_id,\n }));\n\nexport type GaslessTransaction = z.output<typeof GaslessTransactionSchema>;\n"]}
package/dist/rfq.d.ts CHANGED
@@ -1,6 +1,6 @@
1
1
  import * as _polymarket_types from '@polymarket/types';
2
2
  import { EvmAddress, HexString, EvmSignature, Erc1271Signature } from '@polymarket/types';
3
- import { RfqId, RfqQuoteId, PositionId, ConditionId, DecimalString, EpochMilliseconds, OrderSide, TokenId, BaseUnits, RfqRequestorPublicId } from './index.js';
3
+ import { RfqId, RfqQuoteId, PositionId, ComboConditionId, DecimalString, EpochMilliseconds, OrderSide, TokenId, BaseUnits, RfqRequestorPublicId } from './index.js';
4
4
  import { z } from 'zod';
5
5
  import { S as SignatureType } from './signature-type-CrLAA9AN.js';
6
6
 
@@ -122,7 +122,7 @@ declare const RfqQuoteRequestSchema: z.ZodPipe<z.ZodObject<{
122
122
  rfq_id: z.ZodPipe<z.ZodString, z.ZodTransform<RfqId, string>>;
123
123
  requestor_public_id: z.ZodPipe<z.ZodString, z.ZodTransform<RfqRequestorPublicId, string>>;
124
124
  leg_position_ids: z.ZodArray<z.ZodPipe<z.ZodString, z.ZodTransform<PositionId, string>>>;
125
- condition_id: z.ZodPipe<z.ZodString, z.ZodTransform<ConditionId, string>>;
125
+ condition_id: z.ZodPipe<z.ZodString, z.ZodTransform<ComboConditionId, string>>;
126
126
  yes_position_id: z.ZodPipe<z.ZodString, z.ZodTransform<PositionId, string>>;
127
127
  no_position_id: z.ZodPipe<z.ZodString, z.ZodTransform<PositionId, string>>;
128
128
  direction: z.ZodEnum<typeof RfqDirection>;
@@ -148,7 +148,7 @@ declare const RfqQuoteRequestSchema: z.ZodPipe<z.ZodObject<{
148
148
  }>>;
149
149
  submission_deadline: z.ZodPipe<z.ZodNumber, z.ZodTransform<EpochMilliseconds, number>>;
150
150
  }, z.core.$strip>, z.ZodTransform<{
151
- conditionId: ConditionId;
151
+ conditionId: ComboConditionId;
152
152
  direction: RfqDirection;
153
153
  legPositionIds: PositionId[];
154
154
  noPositionId: PositionId;
@@ -170,7 +170,7 @@ declare const RfqQuoteRequestSchema: z.ZodPipe<z.ZodObject<{
170
170
  rfq_id: RfqId;
171
171
  requestor_public_id: RfqRequestorPublicId;
172
172
  leg_position_ids: PositionId[];
173
- condition_id: ConditionId;
173
+ condition_id: ComboConditionId;
174
174
  yes_position_id: PositionId;
175
175
  no_position_id: PositionId;
176
176
  direction: RfqDirection;
@@ -235,7 +235,7 @@ declare const RfqConfirmationRequestSchema: z.ZodPipe<z.ZodObject<{
235
235
  maker_address: z.ZodPipe<z.ZodString, z.ZodTransform<EvmAddress, string>>;
236
236
  signature_type: z.ZodEnum<typeof SignatureType>;
237
237
  leg_position_ids: z.ZodArray<z.ZodPipe<z.ZodString, z.ZodTransform<PositionId, string>>>;
238
- condition_id: z.ZodPipe<z.ZodString, z.ZodTransform<ConditionId, string>>;
238
+ condition_id: z.ZodPipe<z.ZodString, z.ZodTransform<ComboConditionId, string>>;
239
239
  yes_position_id: z.ZodPipe<z.ZodString, z.ZodTransform<PositionId, string>>;
240
240
  no_position_id: z.ZodPipe<z.ZodString, z.ZodTransform<PositionId, string>>;
241
241
  direction: z.ZodEnum<typeof RfqDirection>;
@@ -244,7 +244,7 @@ declare const RfqConfirmationRequestSchema: z.ZodPipe<z.ZodObject<{
244
244
  price_e6: z.ZodPipe<z.ZodString, z.ZodTransform<DecimalString, string>>;
245
245
  confirm_by: z.ZodPipe<z.ZodNumber, z.ZodTransform<EpochMilliseconds, number>>;
246
246
  }, z.core.$strip>, z.ZodTransform<{
247
- conditionId: ConditionId;
247
+ conditionId: ComboConditionId;
248
248
  confirmBy: EpochMilliseconds;
249
249
  direction: RfqDirection;
250
250
  fillSize: DecimalString;
@@ -267,7 +267,7 @@ declare const RfqConfirmationRequestSchema: z.ZodPipe<z.ZodObject<{
267
267
  maker_address: EvmAddress;
268
268
  signature_type: SignatureType;
269
269
  leg_position_ids: PositionId[];
270
- condition_id: ConditionId;
270
+ condition_id: ComboConditionId;
271
271
  yes_position_id: PositionId;
272
272
  no_position_id: PositionId;
273
273
  direction: RfqDirection;
@@ -342,7 +342,7 @@ declare const RfqErrorMessageSchema: z.ZodPipe<z.ZodObject<{
342
342
  request?: unknown;
343
343
  }>>;
344
344
  type RfqErrorMessage = z.infer<typeof RfqErrorMessageSchema>;
345
- declare const RfqQuoterInboundMessageSchema: z.ZodUnion<readonly [z.ZodObject<{
345
+ declare const RfqQuoterInboundMessageSchema: z.ZodDiscriminatedUnion<[z.ZodObject<{
346
346
  type: z.ZodLiteral<RfqKnownInboundType.Auth>;
347
347
  success: z.ZodBoolean;
348
348
  address: z.ZodOptional<z.ZodPipe<z.ZodString, z.ZodTransform<EvmAddress, string>>>;
@@ -353,7 +353,7 @@ declare const RfqQuoterInboundMessageSchema: z.ZodUnion<readonly [z.ZodObject<{
353
353
  rfq_id: z.ZodPipe<z.ZodString, z.ZodTransform<RfqId, string>>;
354
354
  requestor_public_id: z.ZodPipe<z.ZodString, z.ZodTransform<RfqRequestorPublicId, string>>;
355
355
  leg_position_ids: z.ZodArray<z.ZodPipe<z.ZodString, z.ZodTransform<PositionId, string>>>;
356
- condition_id: z.ZodPipe<z.ZodString, z.ZodTransform<ConditionId, string>>;
356
+ condition_id: z.ZodPipe<z.ZodString, z.ZodTransform<ComboConditionId, string>>;
357
357
  yes_position_id: z.ZodPipe<z.ZodString, z.ZodTransform<PositionId, string>>;
358
358
  no_position_id: z.ZodPipe<z.ZodString, z.ZodTransform<PositionId, string>>;
359
359
  direction: z.ZodEnum<typeof RfqDirection>;
@@ -379,7 +379,7 @@ declare const RfqQuoterInboundMessageSchema: z.ZodUnion<readonly [z.ZodObject<{
379
379
  }>>;
380
380
  submission_deadline: z.ZodPipe<z.ZodNumber, z.ZodTransform<EpochMilliseconds, number>>;
381
381
  }, z.core.$strip>, z.ZodTransform<{
382
- conditionId: ConditionId;
382
+ conditionId: ComboConditionId;
383
383
  direction: RfqDirection;
384
384
  legPositionIds: PositionId[];
385
385
  noPositionId: PositionId;
@@ -401,7 +401,7 @@ declare const RfqQuoterInboundMessageSchema: z.ZodUnion<readonly [z.ZodObject<{
401
401
  rfq_id: RfqId;
402
402
  requestor_public_id: RfqRequestorPublicId;
403
403
  leg_position_ids: PositionId[];
404
- condition_id: ConditionId;
404
+ condition_id: ComboConditionId;
405
405
  yes_position_id: PositionId;
406
406
  no_position_id: PositionId;
407
407
  direction: RfqDirection;
@@ -446,7 +446,7 @@ declare const RfqQuoterInboundMessageSchema: z.ZodUnion<readonly [z.ZodObject<{
446
446
  maker_address: z.ZodPipe<z.ZodString, z.ZodTransform<EvmAddress, string>>;
447
447
  signature_type: z.ZodEnum<typeof SignatureType>;
448
448
  leg_position_ids: z.ZodArray<z.ZodPipe<z.ZodString, z.ZodTransform<PositionId, string>>>;
449
- condition_id: z.ZodPipe<z.ZodString, z.ZodTransform<ConditionId, string>>;
449
+ condition_id: z.ZodPipe<z.ZodString, z.ZodTransform<ComboConditionId, string>>;
450
450
  yes_position_id: z.ZodPipe<z.ZodString, z.ZodTransform<PositionId, string>>;
451
451
  no_position_id: z.ZodPipe<z.ZodString, z.ZodTransform<PositionId, string>>;
452
452
  direction: z.ZodEnum<typeof RfqDirection>;
@@ -455,7 +455,7 @@ declare const RfqQuoterInboundMessageSchema: z.ZodUnion<readonly [z.ZodObject<{
455
455
  price_e6: z.ZodPipe<z.ZodString, z.ZodTransform<DecimalString, string>>;
456
456
  confirm_by: z.ZodPipe<z.ZodNumber, z.ZodTransform<EpochMilliseconds, number>>;
457
457
  }, z.core.$strip>, z.ZodTransform<{
458
- conditionId: ConditionId;
458
+ conditionId: ComboConditionId;
459
459
  confirmBy: EpochMilliseconds;
460
460
  direction: RfqDirection;
461
461
  fillSize: DecimalString;
@@ -478,7 +478,7 @@ declare const RfqQuoterInboundMessageSchema: z.ZodUnion<readonly [z.ZodObject<{
478
478
  maker_address: EvmAddress;
479
479
  signature_type: SignatureType;
480
480
  leg_position_ids: PositionId[];
481
- condition_id: ConditionId;
481
+ condition_id: ComboConditionId;
482
482
  yes_position_id: PositionId;
483
483
  no_position_id: PositionId;
484
484
  direction: RfqDirection;
@@ -539,7 +539,7 @@ declare const RfqQuoterInboundMessageSchema: z.ZodUnion<readonly [z.ZodObject<{
539
539
  rfq_id?: RfqId | undefined;
540
540
  quote_id?: RfqQuoteId | undefined;
541
541
  request?: unknown;
542
- }>>]>;
542
+ }>>], "type">;
543
543
  type RfqQuoterInboundMessage = z.infer<typeof RfqQuoterInboundMessageSchema>;
544
544
  type RfqQuoterOutboundMessage = RfqQuoteMessage | RfqQuoteCancelMessage | RfqConfirmationResponseMessage;
545
545
 
package/dist/rfq.js CHANGED
@@ -1,2 +1,2 @@
1
- import {b as b$1}from'./chunk-HOD4LKZU.js';import {N as N$1,W,X,sa,U as U$1,xa,va,wa,Ba}from'./chunk-KZQH7LDK.js';import {z as z$1}from'zod';var A=(n=>(n.Buy="BUY",n.Sell="SELL",n))(A||{}),M=(n=>(n.Yes="YES",n.No="NO",n))(M||{}),y=(n=>(n.Confirm="CONFIRM",n.Decline="DECLINE",n))(y||{}),E=(p=>(p.Matched="MATCHED",p.Mined="MINED",p.Confirmed="CONFIRMED",p.Retrying="RETRYING",p.Failed="FAILED",p))(E||{}),h=(n=>(n.Notional="notional",n.Shares="shares",n))(h||{}),x=(i=>(i.AddressMismatch="ADDRESS_MISMATCH",i.CompetitionWindowClosed="COMPETITION_WINDOW_CLOSED",i.ContradictoryLegs="CONTRADICTORY_LEGS",i.ExpiredRfq="EXPIRED_RFQ",i.InvalidAcceptance="INVALID_ACCEPTANCE",i.InvalidConfirmation="INVALID_CONFIRMATION",i.InvalidExecutionResult="INVALID_EXECUTION_RESULT",i.InvalidIdentity="INVALID_IDENTITY",i.InvalidMessage="INVALID_MESSAGE",i.InvalidQuote="INVALID_QUOTE",i.InvalidRfq="INVALID_RFQ",i.InvalidRfqState="INVALID_RFQ_STATE",i.InvalidRole="INVALID_ROLE",i.LegMetadataUnavailable="LEG_METADATA_UNAVAILABLE",i.MakerAlreadyResponded="MAKER_ALREADY_RESPONDED",i.MakerNotRequired="MAKER_NOT_REQUIRED",i.QuoteMismatch="QUOTE_MISMATCH",i.QuoteUnavailable="QUOTE_UNAVAILABLE",i.RateLimited="RATE_LIMITED",i.RequestFailed="REQUEST_FAILED",i.ServiceUnavailable="SERVICE_UNAVAILABLE",i.TradeSubmissionFailed="TRADE_SUBMISSION_FAILED",i.Unauthenticated="UNAUTHENTICATED",i.UnauthorizedRole="UNAUTHORIZED_ROLE",i.UnknownRfq="UNKNOWN_RFQ",i))(x||{}),Q=z$1.enum(A),T=z$1.literal("YES"),g=z$1.enum(y),O=z$1.enum(E),K=z$1.enum(h),U=z$1.enum(x),_=z$1.string().regex(/^\d+$/).transform(e=>{let R=BigInt(e),n=R/1000000n,q=(R%1000000n).toString().padStart(6,"0").replace(/0+$/,"");return N$1(`${n}${q===""?"":`.${q}`}`)}),D=z$1.discriminatedUnion("unit",[z$1.object({unit:z$1.literal("notional"),value_e6:_}),z$1.object({unit:z$1.literal("shares"),value_e6:_})]).transform(e=>({unit:e.unit,value:e.value_e6})),N=(o=>(o.Auth="auth",o.QuoteRequest="RFQ_REQUEST",o.QuoteAck="ACK_RFQ_QUOTE",o.QuoteCancelAck="ACK_RFQ_QUOTE_CANCEL",o.ConfirmationRequest="RFQ_CONFIRMATION_REQUEST",o.ConfirmationAck="ACK_RFQ_CONFIRMATION_RESPONSE",o.ExecutionUpdate="RFQ_EXECUTION_UPDATE",o.Error="RFQ_ERROR",o))(N||{}),s=z$1.object({type:z$1.enum(N)}),k=s.extend({type:z$1.literal("auth"),success:z$1.boolean(),address:W.optional(),role:z$1.string().optional(),error:z$1.string().optional()}),L=s.extend({type:z$1.literal("RFQ_REQUEST"),rfq_id:va,requestor_public_id:xa,leg_position_ids:z$1.array(sa),condition_id:U$1,yes_position_id:sa,no_position_id:sa,direction:Q,side:T,requested_size:D,submission_deadline:X}).transform(e=>({conditionId:e.condition_id,direction:e.direction,legPositionIds:e.leg_position_ids,noPositionId:e.no_position_id,requestorPublicId:e.requestor_public_id,requestedSize:e.requested_size,rfqId:e.rfq_id,side:e.side,submissionDeadline:e.submission_deadline,type:"quote_request",yesPositionId:e.yes_position_id})),C=s.extend({type:z$1.literal("ACK_RFQ_QUOTE"),rfq_id:va,quote_id:wa}).transform(e=>({quoteId:e.quote_id,rfqId:e.rfq_id,type:"quote_ack"})),v=s.extend({type:z$1.literal("ACK_RFQ_QUOTE_CANCEL"),rfq_id:va,quote_id:wa}).transform(e=>({quoteId:e.quote_id,rfqId:e.rfq_id,type:"quote_cancel_ack"})),F=s.extend({type:z$1.literal("RFQ_CONFIRMATION_REQUEST"),rfq_id:va,quote_id:wa,signer_address:W,maker_address:W,signature_type:b$1,leg_position_ids:z$1.array(sa),condition_id:U$1,yes_position_id:sa,no_position_id:sa,direction:Q,side:T,fill_size_e6:_,price_e6:_,confirm_by:X}).transform(e=>({conditionId:e.condition_id,confirmBy:e.confirm_by,direction:e.direction,fillSize:e.fill_size_e6,legPositionIds:e.leg_position_ids,makerAddress:e.maker_address,noPositionId:e.no_position_id,price:e.price_e6,quoteId:e.quote_id,rfqId:e.rfq_id,side:e.side,signatureType:e.signature_type,signerAddress:e.signer_address,type:"confirmation_request",yesPositionId:e.yes_position_id})),z=s.extend({type:z$1.literal("ACK_RFQ_CONFIRMATION_RESPONSE"),rfq_id:va,quote_id:wa,decision:g}).transform(e=>({decision:e.decision,quoteId:e.quote_id,rfqId:e.rfq_id,type:"confirmation_ack"})),b=s.extend({type:z$1.literal("RFQ_EXECUTION_UPDATE"),rfq_id:va,status:O,tx_hash:Ba.optional()}).transform(e=>({rfqId:e.rfq_id,status:e.status,...e.tx_hash===void 0?{}:{txHash:e.tx_hash},type:"execution_update"})),P=s.extend({type:z$1.literal("RFQ_ERROR"),request_type:z$1.string().optional(),rfq_id:va.optional(),quote_id:wa.optional(),code:U,error:z$1.string(),request:z$1.unknown().optional()}).transform(e=>({code:e.code,message:e.error,quoteId:e.quote_id,requestType:e.request_type,rfqId:e.rfq_id,type:"rfq_error"})),Y=z$1.union([k,L,C,v,F,z,b,P]);export{k as RfqAuthResponseMessageSchema,z as RfqConfirmationAckSchema,y as RfqConfirmationDecision,g as RfqConfirmationDecisionSchema,F as RfqConfirmationRequestSchema,A as RfqDirection,Q as RfqDirectionSchema,x as RfqErrorCode,U as RfqErrorCodeSchema,P as RfqErrorMessageSchema,E as RfqExecutionStatus,O as RfqExecutionStatusSchema,b as RfqExecutionUpdateSchema,s as RfqKnownInboundMessageSchema,N as RfqKnownInboundType,C as RfqQuoteAckSchema,v as RfqQuoteCancelAckSchema,L as RfqQuoteRequestSchema,Y as RfqQuoterInboundMessageSchema,h as RfqRequestedSizeUnit,K as RfqRequestedSizeUnitSchema,M as RfqSide,T as RfqSideSchema};//# sourceMappingURL=rfq.js.map
1
+ import {b as b$1}from'./chunk-HOD4LKZU.js';import {P as P$1,$,aa,xa,W,Ca,Aa,Ba,Ga}from'./chunk-IHJYHHWK.js';import {z as z$1}from'zod';var y=(n=>(n.Buy="BUY",n.Sell="SELL",n))(y||{}),M=(n=>(n.Yes="YES",n.No="NO",n))(M||{}),A=(n=>(n.Confirm="CONFIRM",n.Decline="DECLINE",n))(A||{}),E=(p=>(p.Matched="MATCHED",p.Mined="MINED",p.Confirmed="CONFIRMED",p.Retrying="RETRYING",p.Failed="FAILED",p))(E||{}),h=(n=>(n.Notional="notional",n.Shares="shares",n))(h||{}),x=(i=>(i.AddressMismatch="ADDRESS_MISMATCH",i.CompetitionWindowClosed="COMPETITION_WINDOW_CLOSED",i.ContradictoryLegs="CONTRADICTORY_LEGS",i.ExpiredRfq="EXPIRED_RFQ",i.InvalidAcceptance="INVALID_ACCEPTANCE",i.InvalidConfirmation="INVALID_CONFIRMATION",i.InvalidExecutionResult="INVALID_EXECUTION_RESULT",i.InvalidIdentity="INVALID_IDENTITY",i.InvalidMessage="INVALID_MESSAGE",i.InvalidQuote="INVALID_QUOTE",i.InvalidRfq="INVALID_RFQ",i.InvalidRfqState="INVALID_RFQ_STATE",i.InvalidRole="INVALID_ROLE",i.LegMetadataUnavailable="LEG_METADATA_UNAVAILABLE",i.MakerAlreadyResponded="MAKER_ALREADY_RESPONDED",i.MakerNotRequired="MAKER_NOT_REQUIRED",i.QuoteMismatch="QUOTE_MISMATCH",i.QuoteUnavailable="QUOTE_UNAVAILABLE",i.RateLimited="RATE_LIMITED",i.RequestFailed="REQUEST_FAILED",i.ServiceUnavailable="SERVICE_UNAVAILABLE",i.TradeSubmissionFailed="TRADE_SUBMISSION_FAILED",i.Unauthenticated="UNAUTHENTICATED",i.UnauthorizedRole="UNAUTHORIZED_ROLE",i.UnknownRfq="UNKNOWN_RFQ",i))(x||{}),Q=z$1.enum(y),T=z$1.literal("YES"),g=z$1.enum(A),U=z$1.enum(E),K=z$1.enum(h),O=z$1.enum(x),_=z$1.string().regex(/^\d+$/).transform(e=>{let R=BigInt(e),n=R/1000000n,q=(R%1000000n).toString().padStart(6,"0").replace(/0+$/,"");return P$1(`${n}${q===""?"":`.${q}`}`)}),D=z$1.discriminatedUnion("unit",[z$1.object({unit:z$1.literal("notional"),value_e6:_}),z$1.object({unit:z$1.literal("shares"),value_e6:_})]).transform(e=>({unit:e.unit,value:e.value_e6})),N=(o=>(o.Auth="auth",o.QuoteRequest="RFQ_REQUEST",o.QuoteAck="ACK_RFQ_QUOTE",o.QuoteCancelAck="ACK_RFQ_QUOTE_CANCEL",o.ConfirmationRequest="RFQ_CONFIRMATION_REQUEST",o.ConfirmationAck="ACK_RFQ_CONFIRMATION_RESPONSE",o.ExecutionUpdate="RFQ_EXECUTION_UPDATE",o.Error="RFQ_ERROR",o))(N||{}),s=z$1.object({type:z$1.enum(N)}),k=s.extend({type:z$1.literal("auth"),success:z$1.boolean(),address:$.optional(),role:z$1.string().optional(),error:z$1.string().optional()}),L=s.extend({type:z$1.literal("RFQ_REQUEST"),rfq_id:Aa,requestor_public_id:Ca,leg_position_ids:z$1.array(xa),condition_id:W,yes_position_id:xa,no_position_id:xa,direction:Q,side:T,requested_size:D,submission_deadline:aa}).transform(e=>({conditionId:e.condition_id,direction:e.direction,legPositionIds:e.leg_position_ids,noPositionId:e.no_position_id,requestorPublicId:e.requestor_public_id,requestedSize:e.requested_size,rfqId:e.rfq_id,side:e.side,submissionDeadline:e.submission_deadline,type:"quote_request",yesPositionId:e.yes_position_id})),C=s.extend({type:z$1.literal("ACK_RFQ_QUOTE"),rfq_id:Aa,quote_id:Ba}).transform(e=>({quoteId:e.quote_id,rfqId:e.rfq_id,type:"quote_ack"})),v=s.extend({type:z$1.literal("ACK_RFQ_QUOTE_CANCEL"),rfq_id:Aa,quote_id:Ba}).transform(e=>({quoteId:e.quote_id,rfqId:e.rfq_id,type:"quote_cancel_ack"})),F=s.extend({type:z$1.literal("RFQ_CONFIRMATION_REQUEST"),rfq_id:Aa,quote_id:Ba,signer_address:$,maker_address:$,signature_type:b$1,leg_position_ids:z$1.array(xa),condition_id:W,yes_position_id:xa,no_position_id:xa,direction:Q,side:T,fill_size_e6:_,price_e6:_,confirm_by:aa}).transform(e=>({conditionId:e.condition_id,confirmBy:e.confirm_by,direction:e.direction,fillSize:e.fill_size_e6,legPositionIds:e.leg_position_ids,makerAddress:e.maker_address,noPositionId:e.no_position_id,price:e.price_e6,quoteId:e.quote_id,rfqId:e.rfq_id,side:e.side,signatureType:e.signature_type,signerAddress:e.signer_address,type:"confirmation_request",yesPositionId:e.yes_position_id})),b=s.extend({type:z$1.literal("ACK_RFQ_CONFIRMATION_RESPONSE"),rfq_id:Aa,quote_id:Ba,decision:g}).transform(e=>({decision:e.decision,quoteId:e.quote_id,rfqId:e.rfq_id,type:"confirmation_ack"})),z=s.extend({type:z$1.literal("RFQ_EXECUTION_UPDATE"),rfq_id:Aa,status:U,tx_hash:Ga.optional()}).transform(e=>({rfqId:e.rfq_id,status:e.status,...e.tx_hash===void 0?{}:{txHash:e.tx_hash},type:"execution_update"})),P=s.extend({type:z$1.literal("RFQ_ERROR"),request_type:z$1.string().optional(),rfq_id:Aa.optional(),quote_id:Ba.optional(),code:O,error:z$1.string(),request:z$1.unknown().optional()}).transform(e=>({code:e.code,message:e.error,quoteId:e.quote_id,requestType:e.request_type,rfqId:e.rfq_id,type:"rfq_error"})),Y=z$1.discriminatedUnion("type",[k,L,C,v,F,b,z,P]);export{k as RfqAuthResponseMessageSchema,b as RfqConfirmationAckSchema,A as RfqConfirmationDecision,g as RfqConfirmationDecisionSchema,F as RfqConfirmationRequestSchema,y as RfqDirection,Q as RfqDirectionSchema,x as RfqErrorCode,O as RfqErrorCodeSchema,P as RfqErrorMessageSchema,E as RfqExecutionStatus,U as RfqExecutionStatusSchema,z as RfqExecutionUpdateSchema,s as RfqKnownInboundMessageSchema,N as RfqKnownInboundType,C as RfqQuoteAckSchema,v as RfqQuoteCancelAckSchema,L as RfqQuoteRequestSchema,Y as RfqQuoterInboundMessageSchema,h as RfqRequestedSizeUnit,K as RfqRequestedSizeUnitSchema,M as RfqSide,T as RfqSideSchema};//# sourceMappingURL=rfq.js.map
2
2
  //# sourceMappingURL=rfq.js.map
package/dist/rfq.js.map CHANGED
@@ -1 +1 @@
1
- {"version":3,"sources":["../src/rfq.ts"],"names":["RfqDirection","RfqSide","RfqConfirmationDecision","RfqExecutionStatus","RfqRequestedSizeUnit","RfqErrorCode","RfqDirectionSchema","z","RfqSideSchema","RfqConfirmationDecisionSchema","RfqExecutionStatusSchema","RfqRequestedSizeUnitSchema","RfqErrorCodeSchema","BigIntStringToDecimalStringSchema","value","scaledValue","whole","fraction","toDecimalString","RfqRequestedSizeSchema","size","RfqKnownInboundType","RfqKnownInboundMessageSchema","RfqAuthResponseMessageSchema","EvmAddressSchema","RfqQuoteRequestSchema","RfqIdSchema","RfqRequestorPublicIdSchema","PositionIdSchema","ConditionIdSchema","EpochMillisecondsSchema","message","RfqQuoteAckSchema","RfqQuoteIdSchema","RfqQuoteCancelAckSchema","RfqConfirmationRequestSchema","SignatureTypeSchema","RfqConfirmationAckSchema","RfqExecutionUpdateSchema","TxHashSchema","RfqErrorMessageSchema","RfqQuoterInboundMessageSchema"],"mappings":"6IA8BO,IAAKA,CAAAA,CAAAA,CAAAA,CAAAA,GACVA,EAAA,GAAA,CAAM,KAAA,CACNA,CAAAA,CAAA,IAAA,CAAO,OAFGA,CAAAA,CAAAA,EAAAA,CAAAA,EAAA,EAAA,CAAA,CAKAC,OACVA,CAAAA,CAAA,GAAA,CAAM,MACNA,CAAAA,CAAA,EAAA,CAAK,IAAA,CAFKA,CAAAA,CAAAA,EAAAA,CAAAA,EAAA,IAKAC,CAAAA,CAAAA,CAAAA,CAAAA,GACVA,CAAAA,CAAA,QAAU,SAAA,CACVA,CAAAA,CAAA,QAAU,SAAA,CAFAA,CAAAA,CAAAA,EAAAA,CAAAA,EAAA,EAAA,CAAA,CAKAC,CAAAA,CAAAA,CAAAA,CAAAA,GACVA,EAAA,OAAA,CAAU,SAAA,CACVA,EAAA,KAAA,CA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,MAAA,CAChB,GAAIA,CAAAA,CAAQ,OAAA,GAAY,OAAY,EAAC,CAAI,CAAE,MAAA,CAAQA,EAAQ,OAAQ,CAAA,CACnE,IAAA,CAAM,kBACR,EAAE,CAAA,CAIWS,CAAAA,CAAwBlB,EAA6B,MAAA,CAAO,CACvE,KAAMf,GAAAA,CAAE,OAAA,CAAQ,WAAyB,CAAA,CACzC,aAAcA,GAAAA,CAAE,MAAA,GAAS,QAAA,EAAS,CAClC,OAAQmB,EAAAA,CAAY,QAAA,EAAS,CAC7B,QAAA,CAAUO,GAAiB,QAAA,EAAS,CACpC,KAAMrB,CAAAA,CACN,KAAA,CAAOL,IAAE,MAAA,EAAO,CAChB,OAAA,CAASA,GAAAA,CAAE,SAAQ,CAAE,QAAA,EACvB,CAAC,CAAA,CAAE,UAAWwB,CAAAA,GAAa,CACzB,IAAA,CAAMA,CAAAA,CAAQ,KACd,OAAA,CAASA,CAAAA,CAAQ,MACjB,OAAA,CAASA,CAAAA,CAAQ,SACjB,WAAA,CAAaA,CAAAA,CAAQ,YAAA,CACrB,KAAA,CAAOA,EAAQ,MAAA,CACf,IAAA,CAAM,WACR,CAAA,CAAE,CAAA,CAIWU,EAAgClC,GAAAA,CAAE,KAAA,CAAM,CACnDgB,CAAAA,CACAE,EACAO,CAAAA,CACAE,CAAAA,CACAC,EACAE,CAAAA,CACAC,CAAAA,CACAE,CACF,CAAC","file":"rfq.js","sourcesContent":["import type {\n Erc1271Signature,\n EvmSignature,\n HexString,\n} from '@polymarket/types';\nimport { z } from 'zod';\nimport { type SignatureType, SignatureTypeSchema } from './clob/signature-type';\nimport type { BaseUnits, DecimalString, EvmAddress, TokenId } from './shared';\nimport {\n ConditionIdSchema,\n EpochMillisecondsSchema,\n EvmAddressSchema,\n type OrderSide,\n type PositionId,\n PositionIdSchema,\n type RfqId,\n RfqIdSchema,\n type RfqQuoteId,\n RfqQuoteIdSchema,\n RfqRequestorPublicIdSchema,\n TxHashSchema,\n toDecimalString,\n} from './shared';\n\nexport type {\n RfqId,\n RfqQuoteId,\n RfqRequestorPublicId,\n} from './shared';\n\nexport enum RfqDirection {\n Buy = 'BUY',\n Sell = 'SELL',\n}\n\nexport enum RfqSide {\n Yes = 'YES',\n No = 'NO',\n}\n\nexport enum RfqConfirmationDecision {\n Confirm = 'CONFIRM',\n Decline = 'DECLINE',\n}\n\nexport enum RfqExecutionStatus {\n Matched = 'MATCHED',\n Mined = 'MINED',\n Confirmed = 'CONFIRMED',\n Retrying = 'RETRYING',\n Failed = 'FAILED',\n}\n\nexport enum RfqRequestedSizeUnit {\n Notional = 'notional',\n Shares = 'shares',\n}\n\nexport enum RfqErrorCode {\n AddressMismatch = 'ADDRESS_MISMATCH',\n CompetitionWindowClosed = 'COMPETITION_WINDOW_CLOSED',\n ContradictoryLegs = 'CONTRADICTORY_LEGS',\n ExpiredRfq = 'EXPIRED_RFQ',\n InvalidAcceptance = 'INVALID_ACCEPTANCE',\n InvalidConfirmation = 'INVALID_CONFIRMATION',\n InvalidExecutionResult = 'INVALID_EXECUTION_RESULT',\n InvalidIdentity = 'INVALID_IDENTITY',\n InvalidMessage = 'INVALID_MESSAGE',\n InvalidQuote = 'INVALID_QUOTE',\n InvalidRfq = 'INVALID_RFQ',\n InvalidRfqState = 'INVALID_RFQ_STATE',\n InvalidRole = 'INVALID_ROLE',\n LegMetadataUnavailable = 'LEG_METADATA_UNAVAILABLE',\n MakerAlreadyResponded = 'MAKER_ALREADY_RESPONDED',\n MakerNotRequired = 'MAKER_NOT_REQUIRED',\n QuoteMismatch = 'QUOTE_MISMATCH',\n QuoteUnavailable = 'QUOTE_UNAVAILABLE',\n RateLimited = 'RATE_LIMITED',\n RequestFailed = 'REQUEST_FAILED',\n ServiceUnavailable = 'SERVICE_UNAVAILABLE',\n TradeSubmissionFailed = 'TRADE_SUBMISSION_FAILED',\n Unauthenticated = 'UNAUTHENTICATED',\n UnauthorizedRole = 'UNAUTHORIZED_ROLE',\n UnknownRfq = 'UNKNOWN_RFQ',\n}\n\nexport const RfqDirectionSchema = z.enum(RfqDirection);\nexport const RfqSideSchema = z.literal(RfqSide.Yes);\nexport const RfqConfirmationDecisionSchema = z.enum(RfqConfirmationDecision);\nexport const RfqExecutionStatusSchema = z.enum(RfqExecutionStatus);\nexport const RfqRequestedSizeUnitSchema = z.enum(RfqRequestedSizeUnit);\nexport const RfqErrorCodeSchema = z.enum(RfqErrorCode);\n\nconst BigIntStringToDecimalStringSchema = z\n .string()\n .regex(/^\\d+$/)\n .transform((value) => {\n const scaledValue = BigInt(value);\n const whole = scaledValue / 1_000_000n;\n const fraction = (scaledValue % 1_000_000n)\n .toString()\n .padStart(6, '0')\n .replace(/0+$/, '');\n\n return toDecimalString(`${whole}${fraction === '' ? '' : `.${fraction}`}`);\n });\n\nexport type RfqRequestedSize =\n | {\n unit: RfqRequestedSizeUnit.Notional;\n value: DecimalString;\n }\n | {\n unit: RfqRequestedSizeUnit.Shares;\n value: DecimalString;\n };\n\nconst RfqRequestedSizeSchema = z\n .discriminatedUnion('unit', [\n z.object({\n unit: z.literal(RfqRequestedSizeUnit.Notional),\n value_e6: BigIntStringToDecimalStringSchema,\n }),\n z.object({\n unit: z.literal(RfqRequestedSizeUnit.Shares),\n value_e6: BigIntStringToDecimalStringSchema,\n }),\n ])\n .transform(\n (size): RfqRequestedSize => ({\n unit: size.unit,\n value: size.value_e6,\n }),\n ) satisfies z.ZodType<RfqRequestedSize>;\n\nexport type RfqSignedOrder = {\n salt: string;\n maker: EvmAddress;\n signer: EvmAddress;\n tokenId: PositionId | TokenId;\n makerAmount: BaseUnits;\n takerAmount: BaseUnits;\n side: RfqOrderSide;\n signatureType: SignatureType;\n timestamp: string;\n builder?: HexString;\n expiration?: string;\n metadata?: HexString;\n signature: EvmSignature | Erc1271Signature;\n};\n\nexport type RfqOrderSide = OrderSide | 0 | 1;\n\nexport type RfqAuthMessage = {\n type: 'auth';\n auth: {\n apiKey: string;\n passphrase: string;\n secret: string;\n };\n identity: {\n signer_address: EvmAddress;\n maker_address: EvmAddress;\n signature_type: SignatureType;\n };\n};\n\nexport enum RfqKnownInboundType {\n Auth = 'auth',\n QuoteRequest = 'RFQ_REQUEST',\n QuoteAck = 'ACK_RFQ_QUOTE',\n QuoteCancelAck = 'ACK_RFQ_QUOTE_CANCEL',\n ConfirmationRequest = 'RFQ_CONFIRMATION_REQUEST',\n ConfirmationAck = 'ACK_RFQ_CONFIRMATION_RESPONSE',\n ExecutionUpdate = 'RFQ_EXECUTION_UPDATE',\n Error = 'RFQ_ERROR',\n}\n\nexport const RfqKnownInboundMessageSchema = z.object({\n type: z.enum(RfqKnownInboundType),\n});\n\nexport const RfqAuthResponseMessageSchema = RfqKnownInboundMessageSchema.extend(\n {\n type: z.literal(RfqKnownInboundType.Auth),\n success: z.boolean(),\n address: EvmAddressSchema.optional(),\n role: z.string().optional(),\n error: z.string().optional(),\n },\n);\n\nexport type RfqAuthResponseMessage = z.infer<\n typeof RfqAuthResponseMessageSchema\n>;\n\nexport const RfqQuoteRequestSchema = RfqKnownInboundMessageSchema.extend({\n type: z.literal(RfqKnownInboundType.QuoteRequest),\n rfq_id: RfqIdSchema,\n requestor_public_id: RfqRequestorPublicIdSchema,\n leg_position_ids: z.array(PositionIdSchema),\n condition_id: ConditionIdSchema,\n yes_position_id: PositionIdSchema,\n no_position_id: PositionIdSchema,\n direction: RfqDirectionSchema,\n side: RfqSideSchema,\n requested_size: RfqRequestedSizeSchema,\n submission_deadline: EpochMillisecondsSchema,\n}).transform((message) => ({\n conditionId: message.condition_id,\n direction: message.direction,\n legPositionIds: message.leg_position_ids,\n noPositionId: message.no_position_id,\n requestorPublicId: message.requestor_public_id,\n requestedSize: message.requested_size,\n rfqId: message.rfq_id,\n side: message.side,\n submissionDeadline: message.submission_deadline,\n type: 'quote_request' as const,\n yesPositionId: message.yes_position_id,\n}));\n\nexport type RfqQuoteRequest = z.infer<typeof RfqQuoteRequestSchema>;\n\nexport type RfqQuoteMessage = {\n type: 'RFQ_QUOTE';\n rfq_id: RfqId;\n price_e6: string;\n size_e6: string;\n signed_order: RfqSignedOrder;\n};\n\nexport type RfqQuoteCancelMessage = {\n type: 'RFQ_QUOTE_CANCEL';\n rfq_id: RfqId;\n quote_id: RfqQuoteId;\n signer_address: EvmAddress;\n maker_address: EvmAddress;\n};\n\nexport const RfqQuoteAckSchema = RfqKnownInboundMessageSchema.extend({\n type: z.literal(RfqKnownInboundType.QuoteAck),\n rfq_id: RfqIdSchema,\n quote_id: RfqQuoteIdSchema,\n}).transform((message) => ({\n quoteId: message.quote_id,\n rfqId: message.rfq_id,\n type: 'quote_ack' as const,\n}));\n\nexport type RfqQuoteAck = z.infer<typeof RfqQuoteAckSchema>;\n\nexport const RfqQuoteCancelAckSchema = RfqKnownInboundMessageSchema.extend({\n type: z.literal(RfqKnownInboundType.QuoteCancelAck),\n rfq_id: RfqIdSchema,\n quote_id: RfqQuoteIdSchema,\n}).transform((message) => ({\n quoteId: message.quote_id,\n rfqId: message.rfq_id,\n type: 'quote_cancel_ack' as const,\n}));\n\nexport type RfqQuoteCancelAck = z.infer<typeof RfqQuoteCancelAckSchema>;\n\nexport const RfqConfirmationRequestSchema = RfqKnownInboundMessageSchema.extend(\n {\n type: z.literal(RfqKnownInboundType.ConfirmationRequest),\n rfq_id: RfqIdSchema,\n quote_id: RfqQuoteIdSchema,\n signer_address: EvmAddressSchema,\n maker_address: EvmAddressSchema,\n signature_type: SignatureTypeSchema,\n leg_position_ids: z.array(PositionIdSchema),\n condition_id: ConditionIdSchema,\n yes_position_id: PositionIdSchema,\n no_position_id: PositionIdSchema,\n direction: RfqDirectionSchema,\n side: RfqSideSchema,\n fill_size_e6: BigIntStringToDecimalStringSchema,\n price_e6: BigIntStringToDecimalStringSchema,\n confirm_by: EpochMillisecondsSchema,\n },\n).transform((message) => ({\n conditionId: message.condition_id,\n confirmBy: message.confirm_by,\n direction: message.direction,\n fillSize: message.fill_size_e6,\n legPositionIds: message.leg_position_ids,\n makerAddress: message.maker_address,\n noPositionId: message.no_position_id,\n price: message.price_e6,\n quoteId: message.quote_id,\n rfqId: message.rfq_id,\n side: message.side,\n signatureType: message.signature_type,\n signerAddress: message.signer_address,\n type: 'confirmation_request' as const,\n yesPositionId: message.yes_position_id,\n}));\n\nexport type RfqConfirmationRequest = z.infer<\n typeof RfqConfirmationRequestSchema\n>;\n\nexport type RfqConfirmationResponseMessage = {\n type: 'RFQ_CONFIRMATION_RESPONSE';\n rfq_id: RfqId;\n quote_id: RfqQuoteId;\n decision: RfqConfirmationDecision;\n};\n\nexport const RfqConfirmationAckSchema = RfqKnownInboundMessageSchema.extend({\n type: z.literal(RfqKnownInboundType.ConfirmationAck),\n rfq_id: RfqIdSchema,\n quote_id: RfqQuoteIdSchema,\n decision: RfqConfirmationDecisionSchema,\n}).transform((message) => ({\n decision: message.decision,\n quoteId: message.quote_id,\n rfqId: message.rfq_id,\n type: 'confirmation_ack' as const,\n}));\n\nexport type RfqConfirmationAck = z.infer<typeof RfqConfirmationAckSchema>;\n\nexport const RfqExecutionUpdateSchema = RfqKnownInboundMessageSchema.extend({\n type: z.literal(RfqKnownInboundType.ExecutionUpdate),\n rfq_id: RfqIdSchema,\n status: RfqExecutionStatusSchema,\n tx_hash: TxHashSchema.optional(),\n}).transform((message) => ({\n rfqId: message.rfq_id,\n status: message.status,\n ...(message.tx_hash === undefined ? {} : { txHash: message.tx_hash }),\n type: 'execution_update' as const,\n}));\n\nexport type RfqExecutionUpdate = z.infer<typeof RfqExecutionUpdateSchema>;\n\nexport const RfqErrorMessageSchema = RfqKnownInboundMessageSchema.extend({\n type: z.literal(RfqKnownInboundType.Error),\n request_type: z.string().optional(),\n rfq_id: RfqIdSchema.optional(),\n quote_id: RfqQuoteIdSchema.optional(),\n code: RfqErrorCodeSchema,\n error: z.string(),\n request: z.unknown().optional(),\n}).transform((message) => ({\n code: message.code,\n message: message.error,\n quoteId: message.quote_id,\n requestType: message.request_type,\n rfqId: message.rfq_id,\n type: 'rfq_error' as const,\n}));\n\nexport type RfqErrorMessage = z.infer<typeof RfqErrorMessageSchema>;\n\nexport const RfqQuoterInboundMessageSchema = z.union([\n RfqAuthResponseMessageSchema,\n RfqQuoteRequestSchema,\n RfqQuoteAckSchema,\n RfqQuoteCancelAckSchema,\n RfqConfirmationRequestSchema,\n RfqConfirmationAckSchema,\n RfqExecutionUpdateSchema,\n RfqErrorMessageSchema,\n]);\n\nexport type RfqQuoterInboundMessage = z.infer<\n typeof RfqQuoterInboundMessageSchema\n>;\n\nexport type RfqQuoterOutboundMessage =\n | RfqQuoteMessage\n | RfqQuoteCancelMessage\n | RfqConfirmationResponseMessage;\n"]}
1
+ {"version":3,"sources":["../src/rfq.ts"],"names":["RfqDirection","RfqSide","RfqConfirmationDecision","RfqExecutionStatus","RfqRequestedSizeUnit","RfqErrorCode","RfqDirectionSchema","z","RfqSideSchema","RfqConfirmationDecisionSchema","RfqExecutionStatusSchema","RfqRequestedSizeUnitSchema","RfqErrorCodeSchema","BigIntStringToDecimalStringSchema","value","scaledValue","whole","fraction","toDecimalString","RfqRequestedSizeSchema","size","RfqKnownInboundType","RfqKnownInboundMessageSchema","RfqAuthResponseMessageSchema","EvmAddressSchema","RfqQuoteRequestSchema","RfqIdSchema","RfqRequestorPublicIdSchema","PositionIdSchema","ComboConditionIdSchema","EpochMillisecondsSchema","message","RfqQuoteAckSchema","RfqQuoteIdSchema","RfqQuoteCancelAckSchema","RfqConfirmationRequestSchema","SignatureTypeSchema","RfqConfirmationAckSchema","RfqExecutionUpdateSchema","TxHashSchema","RfqErrorMessageSchema","RfqQuoterInboundMessageSchema"],"mappings":"uIA8BO,IAAKA,CAAAA,CAAAA,CAAAA,CAAAA,GACVA,EAAA,GAAA,CAAM,KAAA,CACNA,CAAAA,CAAA,IAAA,CAAO,OAFGA,CAAAA,CAAAA,EAAAA,CAAAA,EAAA,EAAA,CAAA,CAKAC,OACVA,CAAAA,CAAA,GAAA,CAAM,MACNA,CAAAA,CAAA,EAAA,CAAK,IAAA,CAFKA,CAAAA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ket/types';\nimport { z } from 'zod';\nimport { type SignatureType, SignatureTypeSchema } from './clob/signature-type';\nimport type { BaseUnits, DecimalString, EvmAddress, TokenId } from './shared';\nimport {\n ComboConditionIdSchema,\n EpochMillisecondsSchema,\n EvmAddressSchema,\n type OrderSide,\n type PositionId,\n PositionIdSchema,\n type RfqId,\n RfqIdSchema,\n type RfqQuoteId,\n RfqQuoteIdSchema,\n RfqRequestorPublicIdSchema,\n TxHashSchema,\n toDecimalString,\n} from './shared';\n\nexport type {\n RfqId,\n RfqQuoteId,\n RfqRequestorPublicId,\n} from './shared';\n\nexport enum RfqDirection {\n Buy = 'BUY',\n Sell = 'SELL',\n}\n\nexport enum RfqSide {\n Yes = 'YES',\n No = 'NO',\n}\n\nexport enum RfqConfirmationDecision {\n Confirm = 'CONFIRM',\n Decline = 'DECLINE',\n}\n\nexport enum RfqExecutionStatus {\n Matched = 'MATCHED',\n Mined = 'MINED',\n Confirmed = 'CONFIRMED',\n Retrying = 'RETRYING',\n Failed = 'FAILED',\n}\n\nexport enum RfqRequestedSizeUnit {\n Notional = 'notional',\n Shares = 'shares',\n}\n\nexport enum RfqErrorCode {\n AddressMismatch = 'ADDRESS_MISMATCH',\n CompetitionWindowClosed = 'COMPETITION_WINDOW_CLOSED',\n ContradictoryLegs = 'CONTRADICTORY_LEGS',\n ExpiredRfq = 'EXPIRED_RFQ',\n InvalidAcceptance = 'INVALID_ACCEPTANCE',\n InvalidConfirmation = 'INVALID_CONFIRMATION',\n InvalidExecutionResult = 'INVALID_EXECUTION_RESULT',\n InvalidIdentity = 'INVALID_IDENTITY',\n InvalidMessage = 'INVALID_MESSAGE',\n InvalidQuote = 'INVALID_QUOTE',\n InvalidRfq = 'INVALID_RFQ',\n InvalidRfqState = 'INVALID_RFQ_STATE',\n InvalidRole = 'INVALID_ROLE',\n LegMetadataUnavailable = 'LEG_METADATA_UNAVAILABLE',\n MakerAlreadyResponded = 'MAKER_ALREADY_RESPONDED',\n MakerNotRequired = 'MAKER_NOT_REQUIRED',\n QuoteMismatch = 'QUOTE_MISMATCH',\n QuoteUnavailable = 'QUOTE_UNAVAILABLE',\n RateLimited = 'RATE_LIMITED',\n RequestFailed = 'REQUEST_FAILED',\n ServiceUnavailable = 'SERVICE_UNAVAILABLE',\n TradeSubmissionFailed = 'TRADE_SUBMISSION_FAILED',\n Unauthenticated = 'UNAUTHENTICATED',\n UnauthorizedRole = 'UNAUTHORIZED_ROLE',\n UnknownRfq = 'UNKNOWN_RFQ',\n}\n\nexport const RfqDirectionSchema = z.enum(RfqDirection);\nexport const RfqSideSchema = z.literal(RfqSide.Yes);\nexport const RfqConfirmationDecisionSchema = z.enum(RfqConfirmationDecision);\nexport const RfqExecutionStatusSchema = z.enum(RfqExecutionStatus);\nexport const RfqRequestedSizeUnitSchema = z.enum(RfqRequestedSizeUnit);\nexport const RfqErrorCodeSchema = z.enum(RfqErrorCode);\n\nconst BigIntStringToDecimalStringSchema = z\n .string()\n .regex(/^\\d+$/)\n .transform((value) => {\n const scaledValue = BigInt(value);\n const whole = scaledValue / 1_000_000n;\n const fraction = (scaledValue % 1_000_000n)\n .toString()\n .padStart(6, '0')\n .replace(/0+$/, '');\n\n return toDecimalString(`${whole}${fraction === '' ? '' : `.${fraction}`}`);\n });\n\nexport type RfqRequestedSize =\n | {\n unit: RfqRequestedSizeUnit.Notional;\n value: DecimalString;\n }\n | {\n unit: RfqRequestedSizeUnit.Shares;\n value: DecimalString;\n };\n\nconst RfqRequestedSizeSchema = z\n .discriminatedUnion('unit', [\n z.object({\n unit: z.literal(RfqRequestedSizeUnit.Notional),\n value_e6: BigIntStringToDecimalStringSchema,\n }),\n z.object({\n unit: z.literal(RfqRequestedSizeUnit.Shares),\n value_e6: BigIntStringToDecimalStringSchema,\n }),\n ])\n .transform(\n (size): RfqRequestedSize => ({\n unit: size.unit,\n value: size.value_e6,\n }),\n ) satisfies z.ZodType<RfqRequestedSize>;\n\nexport type RfqSignedOrder = {\n salt: string;\n maker: EvmAddress;\n signer: EvmAddress;\n tokenId: PositionId | TokenId;\n makerAmount: BaseUnits;\n takerAmount: BaseUnits;\n side: RfqOrderSide;\n signatureType: SignatureType;\n timestamp: string;\n builder?: HexString;\n expiration?: string;\n metadata?: HexString;\n signature: EvmSignature | Erc1271Signature;\n};\n\nexport type RfqOrderSide = OrderSide | 0 | 1;\n\nexport type RfqAuthMessage = {\n type: 'auth';\n auth: {\n apiKey: string;\n passphrase: string;\n secret: string;\n };\n identity: {\n signer_address: EvmAddress;\n maker_address: EvmAddress;\n signature_type: SignatureType;\n };\n};\n\nexport enum RfqKnownInboundType {\n Auth = 'auth',\n QuoteRequest = 'RFQ_REQUEST',\n QuoteAck = 'ACK_RFQ_QUOTE',\n QuoteCancelAck = 'ACK_RFQ_QUOTE_CANCEL',\n ConfirmationRequest = 'RFQ_CONFIRMATION_REQUEST',\n ConfirmationAck = 'ACK_RFQ_CONFIRMATION_RESPONSE',\n ExecutionUpdate = 'RFQ_EXECUTION_UPDATE',\n Error = 'RFQ_ERROR',\n}\n\nexport const RfqKnownInboundMessageSchema = z.object({\n type: z.enum(RfqKnownInboundType),\n});\n\nexport const RfqAuthResponseMessageSchema = RfqKnownInboundMessageSchema.extend(\n {\n type: z.literal(RfqKnownInboundType.Auth),\n success: z.boolean(),\n address: EvmAddressSchema.optional(),\n role: z.string().optional(),\n error: z.string().optional(),\n },\n);\n\nexport type RfqAuthResponseMessage = z.infer<\n typeof RfqAuthResponseMessageSchema\n>;\n\nexport const RfqQuoteRequestSchema = RfqKnownInboundMessageSchema.extend({\n type: z.literal(RfqKnownInboundType.QuoteRequest),\n rfq_id: RfqIdSchema,\n requestor_public_id: RfqRequestorPublicIdSchema,\n leg_position_ids: z.array(PositionIdSchema),\n condition_id: ComboConditionIdSchema,\n yes_position_id: PositionIdSchema,\n no_position_id: PositionIdSchema,\n direction: RfqDirectionSchema,\n side: RfqSideSchema,\n requested_size: RfqRequestedSizeSchema,\n submission_deadline: EpochMillisecondsSchema,\n}).transform((message) => ({\n conditionId: message.condition_id,\n direction: message.direction,\n legPositionIds: message.leg_position_ids,\n noPositionId: message.no_position_id,\n requestorPublicId: message.requestor_public_id,\n requestedSize: message.requested_size,\n rfqId: message.rfq_id,\n side: message.side,\n submissionDeadline: message.submission_deadline,\n type: 'quote_request' as const,\n yesPositionId: message.yes_position_id,\n}));\n\nexport type RfqQuoteRequest = z.infer<typeof RfqQuoteRequestSchema>;\n\nexport type RfqQuoteMessage = {\n type: 'RFQ_QUOTE';\n rfq_id: RfqId;\n price_e6: string;\n size_e6: string;\n signed_order: RfqSignedOrder;\n};\n\nexport type RfqQuoteCancelMessage = {\n type: 'RFQ_QUOTE_CANCEL';\n rfq_id: RfqId;\n quote_id: RfqQuoteId;\n signer_address: EvmAddress;\n maker_address: EvmAddress;\n};\n\nexport const RfqQuoteAckSchema = RfqKnownInboundMessageSchema.extend({\n type: z.literal(RfqKnownInboundType.QuoteAck),\n rfq_id: RfqIdSchema,\n quote_id: RfqQuoteIdSchema,\n}).transform((message) => ({\n quoteId: message.quote_id,\n rfqId: message.rfq_id,\n type: 'quote_ack' as const,\n}));\n\nexport type RfqQuoteAck = z.infer<typeof RfqQuoteAckSchema>;\n\nexport const RfqQuoteCancelAckSchema = RfqKnownInboundMessageSchema.extend({\n type: z.literal(RfqKnownInboundType.QuoteCancelAck),\n rfq_id: RfqIdSchema,\n quote_id: RfqQuoteIdSchema,\n}).transform((message) => ({\n quoteId: message.quote_id,\n rfqId: message.rfq_id,\n type: 'quote_cancel_ack' as const,\n}));\n\nexport type RfqQuoteCancelAck = z.infer<typeof RfqQuoteCancelAckSchema>;\n\nexport const RfqConfirmationRequestSchema = RfqKnownInboundMessageSchema.extend(\n {\n type: z.literal(RfqKnownInboundType.ConfirmationRequest),\n rfq_id: RfqIdSchema,\n quote_id: RfqQuoteIdSchema,\n signer_address: EvmAddressSchema,\n maker_address: EvmAddressSchema,\n signature_type: SignatureTypeSchema,\n leg_position_ids: z.array(PositionIdSchema),\n condition_id: ComboConditionIdSchema,\n yes_position_id: PositionIdSchema,\n no_position_id: PositionIdSchema,\n direction: RfqDirectionSchema,\n side: RfqSideSchema,\n fill_size_e6: BigIntStringToDecimalStringSchema,\n price_e6: BigIntStringToDecimalStringSchema,\n confirm_by: EpochMillisecondsSchema,\n },\n).transform((message) => ({\n conditionId: message.condition_id,\n confirmBy: message.confirm_by,\n direction: message.direction,\n fillSize: message.fill_size_e6,\n legPositionIds: message.leg_position_ids,\n makerAddress: message.maker_address,\n noPositionId: message.no_position_id,\n price: message.price_e6,\n quoteId: message.quote_id,\n rfqId: message.rfq_id,\n side: message.side,\n signatureType: message.signature_type,\n signerAddress: message.signer_address,\n type: 'confirmation_request' as const,\n yesPositionId: message.yes_position_id,\n}));\n\nexport type RfqConfirmationRequest = z.infer<\n typeof RfqConfirmationRequestSchema\n>;\n\nexport type RfqConfirmationResponseMessage = {\n type: 'RFQ_CONFIRMATION_RESPONSE';\n rfq_id: RfqId;\n quote_id: RfqQuoteId;\n decision: RfqConfirmationDecision;\n};\n\nexport const RfqConfirmationAckSchema = RfqKnownInboundMessageSchema.extend({\n type: z.literal(RfqKnownInboundType.ConfirmationAck),\n rfq_id: RfqIdSchema,\n quote_id: RfqQuoteIdSchema,\n decision: RfqConfirmationDecisionSchema,\n}).transform((message) => ({\n decision: message.decision,\n quoteId: message.quote_id,\n rfqId: message.rfq_id,\n type: 'confirmation_ack' as const,\n}));\n\nexport type RfqConfirmationAck = z.infer<typeof RfqConfirmationAckSchema>;\n\nexport const RfqExecutionUpdateSchema = RfqKnownInboundMessageSchema.extend({\n type: z.literal(RfqKnownInboundType.ExecutionUpdate),\n rfq_id: RfqIdSchema,\n status: RfqExecutionStatusSchema,\n tx_hash: TxHashSchema.optional(),\n}).transform((message) => ({\n rfqId: message.rfq_id,\n status: message.status,\n ...(message.tx_hash === undefined ? {} : { txHash: message.tx_hash }),\n type: 'execution_update' as const,\n}));\n\nexport type RfqExecutionUpdate = z.infer<typeof RfqExecutionUpdateSchema>;\n\nexport const RfqErrorMessageSchema = RfqKnownInboundMessageSchema.extend({\n type: z.literal(RfqKnownInboundType.Error),\n request_type: z.string().optional(),\n rfq_id: RfqIdSchema.optional(),\n quote_id: RfqQuoteIdSchema.optional(),\n code: RfqErrorCodeSchema,\n error: z.string(),\n request: z.unknown().optional(),\n}).transform((message) => ({\n code: message.code,\n message: message.error,\n quoteId: message.quote_id,\n requestType: message.request_type,\n rfqId: message.rfq_id,\n type: 'rfq_error' as const,\n}));\n\nexport type RfqErrorMessage = z.infer<typeof RfqErrorMessageSchema>;\n\nexport const RfqQuoterInboundMessageSchema = z.discriminatedUnion('type', [\n RfqAuthResponseMessageSchema,\n RfqQuoteRequestSchema,\n RfqQuoteAckSchema,\n RfqQuoteCancelAckSchema,\n RfqConfirmationRequestSchema,\n RfqConfirmationAckSchema,\n RfqExecutionUpdateSchema,\n RfqErrorMessageSchema,\n]);\n\nexport type RfqQuoterInboundMessage = z.infer<\n typeof RfqQuoterInboundMessageSchema\n>;\n\nexport type RfqQuoterOutboundMessage =\n | RfqQuoteMessage\n | RfqQuoteCancelMessage\n | RfqConfirmationResponseMessage;\n"]}
@@ -1,4 +1,4 @@
1
- import { TokenId, DecimalString, EpochMilliseconds, ConditionId, IsoDateTimeString, OrderSide, OrderType, CommentId, CommentParentEntityType, EventId, SeriesId, ImageOptimizationId, BaseUnits } from '../index.js';
1
+ import { TokenId, DecimalString, EpochMilliseconds, CtfConditionId, IsoDateTimeString, OrderSide, OrderType, CommentId, CommentParentEntityType, EventId, SeriesId, ImageOptimizationId, BaseUnits } from '../index.js';
2
2
  import { z } from 'zod';
3
3
  import { R as ReactionType } from '../comment-C-jBbhp7.js';
4
4
  import '@polymarket/types';
@@ -284,7 +284,7 @@ declare const NewMarketEventSchema: z.ZodPipe<z.ZodObject<{
284
284
  }, z.core.$strip>>>;
285
285
  timestamp: z.ZodOptional<z.ZodNullable<z.ZodPipe<z.ZodString, z.ZodTransform<EpochMilliseconds, string>>>>;
286
286
  tags: z.ZodOptional<z.ZodNullable<z.ZodArray<z.ZodString>>>;
287
- condition_id: z.ZodOptional<z.ZodNullable<z.ZodPipe<z.ZodString, z.ZodTransform<ConditionId, string>>>>;
287
+ condition_id: z.ZodOptional<z.ZodNullable<z.ZodPipe<z.ZodString, z.ZodTransform<CtfConditionId, string>>>>;
288
288
  active: z.ZodOptional<z.ZodNullable<z.ZodBoolean>>;
289
289
  clob_token_ids: z.ZodOptional<z.ZodNullable<z.ZodArray<z.ZodString>>>;
290
290
  sports_market_type: z.ZodOptional<z.ZodNullable<z.ZodString>>;
@@ -307,7 +307,7 @@ declare const NewMarketEventSchema: z.ZodPipe<z.ZodObject<{
307
307
  title?: string | null | undefined;
308
308
  description?: string | null | undefined;
309
309
  } | null | undefined;
310
- conditionId: ConditionId | null | undefined;
310
+ conditionId: CtfConditionId | null | undefined;
311
311
  clobTokenIds: string[] | null | undefined;
312
312
  sportsMarketType: string | null | undefined;
313
313
  gameStartTime: IsoDateTimeString | null | undefined;
@@ -345,7 +345,7 @@ declare const NewMarketEventSchema: z.ZodPipe<z.ZodObject<{
345
345
  } | null | undefined;
346
346
  timestamp?: EpochMilliseconds | null | undefined;
347
347
  tags?: string[] | null | undefined;
348
- condition_id?: ConditionId | null | undefined;
348
+ condition_id?: CtfConditionId | null | undefined;
349
349
  active?: boolean | null | undefined;
350
350
  clob_token_ids?: string[] | null | undefined;
351
351
  sports_market_type?: string | null | undefined;
@@ -865,7 +865,7 @@ declare const CustomMarketEventSchema: z.ZodDiscriminatedUnion<[z.ZodPipe<z.ZodO
865
865
  }, z.core.$strip>>>;
866
866
  timestamp: z.ZodOptional<z.ZodNullable<z.ZodPipe<z.ZodString, z.ZodTransform<EpochMilliseconds, string>>>>;
867
867
  tags: z.ZodOptional<z.ZodNullable<z.ZodArray<z.ZodString>>>;
868
- condition_id: z.ZodOptional<z.ZodNullable<z.ZodPipe<z.ZodString, z.ZodTransform<ConditionId, string>>>>;
868
+ condition_id: z.ZodOptional<z.ZodNullable<z.ZodPipe<z.ZodString, z.ZodTransform<CtfConditionId, string>>>>;
869
869
  active: z.ZodOptional<z.ZodNullable<z.ZodBoolean>>;
870
870
  clob_token_ids: z.ZodOptional<z.ZodNullable<z.ZodArray<z.ZodString>>>;
871
871
  sports_market_type: z.ZodOptional<z.ZodNullable<z.ZodString>>;
@@ -888,7 +888,7 @@ declare const CustomMarketEventSchema: z.ZodDiscriminatedUnion<[z.ZodPipe<z.ZodO
888
888
  title?: string | null | undefined;
889
889
  description?: string | null | undefined;
890
890
  } | null | undefined;
891
- conditionId: ConditionId | null | undefined;
891
+ conditionId: CtfConditionId | null | undefined;
892
892
  clobTokenIds: string[] | null | undefined;
893
893
  sportsMarketType: string | null | undefined;
894
894
  gameStartTime: IsoDateTimeString | null | undefined;
@@ -926,7 +926,7 @@ declare const CustomMarketEventSchema: z.ZodDiscriminatedUnion<[z.ZodPipe<z.ZodO
926
926
  } | null | undefined;
927
927
  timestamp?: EpochMilliseconds | null | undefined;
928
928
  tags?: string[] | null | undefined;
929
- condition_id?: ConditionId | null | undefined;
929
+ condition_id?: CtfConditionId | null | undefined;
930
930
  active?: boolean | null | undefined;
931
931
  clob_token_ids?: string[] | null | undefined;
932
932
  sports_market_type?: string | null | undefined;
@@ -1207,7 +1207,7 @@ declare const MarketEventSchema: z.ZodDiscriminatedUnion<[z.ZodPipe<z.ZodObject<
1207
1207
  }, z.core.$strip>>>;
1208
1208
  timestamp: z.ZodOptional<z.ZodNullable<z.ZodPipe<z.ZodString, z.ZodTransform<EpochMilliseconds, string>>>>;
1209
1209
  tags: z.ZodOptional<z.ZodNullable<z.ZodArray<z.ZodString>>>;
1210
- condition_id: z.ZodOptional<z.ZodNullable<z.ZodPipe<z.ZodString, z.ZodTransform<ConditionId, string>>>>;
1210
+ condition_id: z.ZodOptional<z.ZodNullable<z.ZodPipe<z.ZodString, z.ZodTransform<CtfConditionId, string>>>>;
1211
1211
  active: z.ZodOptional<z.ZodNullable<z.ZodBoolean>>;
1212
1212
  clob_token_ids: z.ZodOptional<z.ZodNullable<z.ZodArray<z.ZodString>>>;
1213
1213
  sports_market_type: z.ZodOptional<z.ZodNullable<z.ZodString>>;
@@ -1230,7 +1230,7 @@ declare const MarketEventSchema: z.ZodDiscriminatedUnion<[z.ZodPipe<z.ZodObject<
1230
1230
  title?: string | null | undefined;
1231
1231
  description?: string | null | undefined;
1232
1232
  } | null | undefined;
1233
- conditionId: ConditionId | null | undefined;
1233
+ conditionId: CtfConditionId | null | undefined;
1234
1234
  clobTokenIds: string[] | null | undefined;
1235
1235
  sportsMarketType: string | null | undefined;
1236
1236
  gameStartTime: IsoDateTimeString | null | undefined;
@@ -1268,7 +1268,7 @@ declare const MarketEventSchema: z.ZodDiscriminatedUnion<[z.ZodPipe<z.ZodObject<
1268
1268
  } | null | undefined;
1269
1269
  timestamp?: EpochMilliseconds | null | undefined;
1270
1270
  tags?: string[] | null | undefined;
1271
- condition_id?: ConditionId | null | undefined;
1271
+ condition_id?: CtfConditionId | null | undefined;
1272
1272
  active?: boolean | null | undefined;
1273
1273
  clob_token_ids?: string[] | null | undefined;
1274
1274
  sports_market_type?: string | null | undefined;
@@ -1,2 +1,2 @@
1
- import {M,J as J$1,N as N$1,O as O$1}from'../chunk-HLGLT7ER.js';import {pa,Ca,u,za,Z as Z$1,ba,U as U$1,qa,oa,X as X$1,Da}from'../chunk-KZQH7LDK.js';import {z}from'zod';var g=z.preprocess(r=>typeof r=="string"?r.toUpperCase():r,pa),b=(p=>(p.Matched="TRADE_STATUS_MATCHED",p.MatchedNotBroadcasted="TRADE_STATUS_MATCHED_NOT_BROADCASTED",p.Mined="TRADE_STATUS_MINED",p.Confirmed="TRADE_STATUS_CONFIRMED",p.Retrying="TRADE_STATUS_RETRYING",p.Failed="TRADE_STATUS_FAILED",p))(b||{}),$=z.preprocess(r=>typeof r!="string"||r.startsWith("TRADE_STATUS_")?r:Object.values(b).find(n=>n.slice(13)===r)??r,z.enum(b)),O=(c=>(c.Live="LIVE",c.Matched="MATCHED",c.Delayed="DELAYED",c.Unmatched="UNMATCHED",c.Canceled="CANCELED",c))(O||{}),V=z.enum(O),U=z.object({price:Ca,size:Ca}),C=z.string().regex(/^\d+$/).transform(r=>u(new Date(Number(r)*1e3).toISOString())),W=z.string().regex(/^\d+$/).transform(r=>r==="0"?void 0:u(new Date(Number(r)*1e3).toISOString())),B=z.object({event_type:z.literal("book"),market:z.string(),asset_id:za,bids:z.array(U),asks:z.array(U),hash:z.string().nullish(),timestamp:Z$1.nullish(),min_order_size:Ca.nullish(),tick_size:Ca.nullish(),neg_risk:z.boolean().nullish(),last_trade_price:Ca.nullish()}).transform(({event_type:r,asset_id:a,min_order_size:n,tick_size:s,neg_risk:o,last_trade_price:c,...p})=>({topic:"market",type:r,payload:{...p,tokenId:a,minOrderSize:n,tickSize:s,negRisk:o,lastTradePrice:c}})),J=z.object({asset_id:za,price:Ca,size:Ca,side:g,hash:z.string().nullish(),best_bid:Ca.nullish(),best_ask:Ca.nullish()}).transform(({asset_id:r,best_bid:a,best_ask:n,...s})=>({...s,tokenId:r,bestBid:a,bestAsk:n})),j=z.object({event_type:z.literal("price_change"),market:z.string(),price_changes:z.array(J),timestamp:Z$1.nullish()}).transform(({event_type:r,price_changes:a,...n})=>({topic:"market",type:r,payload:{...n,priceChanges:a}})),w=z.object({event_type:z.literal("last_trade_price"),market:z.string(),asset_id:za,price:Ca,size:Ca.nullish(),fee_rate_bps:Ca.nullish(),side:g,timestamp:Z$1.nullish(),transaction_hash:z.string().nullish()}).transform(({event_type:r,asset_id:a,fee_rate_bps:n,transaction_hash:s,...o})=>({topic:"market",type:r,payload:{...o,tokenId:a,feeRateBps:n,transactionHash:s}})),q=z.object({event_type:z.literal("tick_size_change"),market:z.string(),asset_id:za,old_tick_size:Ca.nullish(),new_tick_size:Ca,timestamp:Z$1.nullish()}).transform(({event_type:r,asset_id:a,old_tick_size:n,new_tick_size:s,...o})=>({topic:"market",type:r,payload:{...o,tokenId:a,oldTickSize:n,newTickSize:s}})),N=z.object({event_type:z.literal("best_bid_ask"),market:z.string(),asset_id:za,best_bid:Ca.nullish(),best_ask:Ca.nullish(),spread:Ca.nullish(),timestamp:Z$1.nullish()}).transform(({event_type:r,asset_id:a,best_bid:n,best_ask:s,...o})=>({topic:"market",type:r,payload:{...o,tokenId:a,bestBid:n,bestAsk:s}})),L=z.object({id:z.string(),ticker:z.string().nullish(),slug:z.string().nullish(),title:z.string().nullish(),description:z.string().nullish()}),H=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(za).nullish(),outcomes:z.array(z.string()).nullish(),event_message:L.nullish(),timestamp:Z$1.nullish(),tags:z.array(z.string()).nullish(),condition_id:U$1.nullish(),active:z.boolean().nullish(),clob_token_ids:z.array(z.string()).nullish(),sports_market_type:z.string().nullish(),line:Ca.nullish(),game_start_time:ba.nullish(),order_price_min_tick_size:Ca.nullish(),group_item_title:z.string().nullish(),taker_base_fee:Ca.nullish(),fees_enabled:z.boolean().nullish(),fee_schedule:z.unknown().nullish()}).transform(({event_type:r,assets_ids:a,event_message:n,condition_id:s,clob_token_ids:o,sports_market_type:c,game_start_time:p,order_price_min_tick_size:y,group_item_title:u,taker_base_fee:S,fees_enabled:E,fee_schedule:_,...T})=>({topic:"market",type:r,payload:{...T,tokenIds:a,eventMessage:n,conditionId:s,clobTokenIds:o,sportsMarketType:c,gameStartTime:p,orderPriceMinTickSize:y,groupItemTitle:u,takerBaseFee:S,feesEnabled:E,feeSchedule:_}})),Y=z.object({event_type:z.literal("market_resolved"),id:z.string(),market:z.string(),assets_ids:z.array(za).nullish(),winning_asset_id:za.nullish(),winning_outcome:z.string().nullish(),event_message:L.nullish(),timestamp:Z$1.nullish(),tags:z.array(z.string()).nullish()}).transform(({event_type:r,assets_ids:a,winning_asset_id:n,winning_outcome:s,event_message:o,...c})=>({topic:"market",type:r,payload:{...c,tokenIds:a,winningTokenId:n,winningOutcome:s,eventMessage:o}})),F=(s=>(s.Placement="PLACEMENT",s.Update="UPDATE",s.Cancellation="CANCELLATION",s))(F||{}),X=z.enum(F),ee=z.object({event_type:z.literal("order"),id:z.string(),owner:z.string(),market:z.string(),asset_id:za,side:g,order_owner:z.string().nullish(),original_size:Ca,size_matched:Ca,price:Ca,associate_trades:z.array(z.string()).nullish(),outcome:z.string().nullish(),type:X,created_at:C.nullish(),expiration:W.nullish(),order_type:qa.nullish(),status:V.nullish(),maker_address:z.string().nullish(),timestamp:Z$1}).transform(({event_type:r,type:a,asset_id:n,order_owner:s,original_size:o,size_matched:c,associate_trades:p,created_at:y,expiration:u,order_type:S,maker_address:E,..._})=>({topic:"user",type:r,payload:{..._,orderEventType:a,tokenId:n,orderOwner:s,originalSize:o,sizeMatched:c,associateTrades:p,createdAt:y,expiresAt:u,orderType:S,makerAddress:E}})),te=z.object({order_id:z.string(),owner:z.string(),maker_address:z.string().nullish(),matched_amount:Ca,price:Ca,fee_rate_bps:Ca.nullish(),asset_id:za,outcome:z.string().nullish(),outcome_index:z.number().int().nullish(),side:g}).transform(({order_id:r,maker_address:a,matched_amount:n,fee_rate_bps:s,asset_id:o,outcome_index:c,...p})=>({...p,orderId:r,makerAddress:a,matchedAmount:n,feeRateBps:s,tokenId:o,outcomeIndex:c})),re=z.object({event_type:z.literal("trade"),type:z.literal("TRADE"),id:z.string(),taker_order_id:z.string(),market:z.string(),asset_id:za,side:g,size:Ca,fee_rate_bps:Ca.nullish(),price:Ca,status:$,match_time:C.nullish(),matchtime:C.nullish(),last_update:C.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(te).nullish(),trader_side:z.union([z.literal("TAKER"),z.literal("MAKER")]).nullish(),timestamp:Z$1}).transform(({event_type:r,type:a,taker_order_id:n,asset_id:s,fee_rate_bps:o,match_time:c,matchtime:p,last_update:y,trade_owner:u,maker_address:S,transaction_hash:E,bucket_index:_,maker_orders:T,trader_side:G,...Q})=>({topic:"user",type:r,payload:{...Q,takerOrderId:n,tokenId:s,feeRateBps:o,matchedAt:c??p,updatedAt:y,tradeOwner:u,makerAddress:S,transactionHash:E,bucketIndex:_,makerOrders:T,traderSide:G}})),Me=z.discriminatedUnion("event_type",[B,j,w,q]),Re=z.discriminatedUnion("event_type",[N,H,Y]),Ae=z.discriminatedUnion("event_type",[B,j,w,q,N,H,Y]),Ie=z.discriminatedUnion("event_type",[ee,re]);var ie=z.object({id:z.string(),body:z.string().nullish(),parentEntityType:oa.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(N$1).nullish(),profile:J$1.nullish(),reactions:z.array(M).nullish(),reportCount:z.number().int().nullish(),reactionCount:z.number().int().nullish(),tradeAsset:z.string().nullish()}),ne=z.object({topic:z.literal("comments"),type:z.literal("comment_created"),timestamp:X$1,payload:O$1}),ae=z.object({topic:z.literal("comments"),type:z.literal("comment_removed"),timestamp:X$1,payload:ie}),se=z.object({topic:z.literal("comments"),type:z.literal("reaction_created"),timestamp:X$1,payload:M}),oe=z.object({topic:z.literal("comments"),type:z.literal("reaction_removed"),timestamp:X$1,payload:M}),K=z.object({symbol:z.string(),timestamp:X$1,value:Da}),ce="prices.crypto.binance",pe="prices.crypto.chainlink",le=z.literal("crypto_prices"),me=z.literal("crypto_prices_chainlink"),de=le.transform(()=>ce),he=me.transform(()=>pe),ye=z.object({topic:de,type:z.literal("update"),timestamp:X$1,payload:K}),ue=z.object({topic:he,type:z.literal("update"),timestamp:X$1,payload:K}),Se=z.discriminatedUnion("topic",[ye,ue]),Ee=z.object({symbol:z.string(),value:Da,full_accuracy_value:Ca.nullish(),timestamp:X$1,received_at:X$1.nullish(),is_carried_forward:z.boolean().nullish()}).transform(({full_accuracy_value:r,received_at:a,is_carried_forward:n,value:s,...o})=>({...o,value:r??s,receivedAt:a,isCarriedForward:n})),_e=z.object({timestamp:z.number(),value:Da}),ke=z.object({symbol:z.string(),data:z.array(_e)}),ge=z.literal("equity_prices"),fe="prices.equity.pyth",Z=ge.transform(()=>fe),ve=z.object({topic:Z,type:z.literal("update"),timestamp:X$1,payload:Ee}),Ce=z.object({topic:Z,type:z.literal("subscribe"),timestamp:X$1,payload:ke}),Te=z.discriminatedUnion("type",[ve,Ce]),Pe=z.discriminatedUnion("type",[ne,ae,se,oe]),je=z.discriminatedUnion("topic",[Pe,Se,Te]);var be=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:ba.nullish(),finished_timestamp:ba.nullish(),turn:z.string().nullish()}).transform(({finishedTimestamp:r,finished_timestamp:a,...n})=>({...n,finishedAt:r??a})),Le=be.transform(r=>({topic:"sports",type:"sport_result",payload:r}));export{ne as CommentCreatedEventSchema,ae as CommentRemovedEventSchema,Pe as CommentsEventSchema,ye as CryptoPricesBinanceEventSchema,ue as CryptoPricesChainlinkEventSchema,Se as CryptoPricesEventSchema,Re as CustomMarketEventSchema,Te as EquityPricesEventSchema,Ce as EquityPricesSubscribeEventSchema,ve as EquityPricesUpdateEventSchema,N as MarketBestBidAskEventSchema,B as MarketBookEventSchema,Ae as MarketEventSchema,w as MarketLastTradePriceEventSchema,j as MarketPriceChangeEventSchema,Y as MarketResolvedEventSchema,q as MarketTickSizeChangeEventSchema,H as NewMarketEventSchema,se as ReactionCreatedEventSchema,oe as ReactionRemovedEventSchema,je as RealtimeEventSchema,Le as SportsResultEventSchema,Me as StandardMarketEventSchema,b as TradeStatus,Ie as UserEventSchema,ee as UserOrderEventSchema,F as UserOrderEventType,O as UserOrderStatus,re as UserTradeEventSchema};//# sourceMappingURL=index.js.map
1
+ import {M,J as J$1,N as N$1,O as O$1}from'../chunk-YJ7M6UHS.js';import {ua,Ha,w as w$1,Ea,ca,ga,X as X$1,va,ta,aa,Ia}from'../chunk-IHJYHHWK.js';import {z}from'zod';var f=z.preprocess(r=>typeof r=="string"?r.toUpperCase():r,ua),b=(p=>(p.Matched="TRADE_STATUS_MATCHED",p.MatchedNotBroadcasted="TRADE_STATUS_MATCHED_NOT_BROADCASTED",p.Mined="TRADE_STATUS_MINED",p.Confirmed="TRADE_STATUS_CONFIRMED",p.Retrying="TRADE_STATUS_RETRYING",p.Failed="TRADE_STATUS_FAILED",p))(b||{}),$=z.preprocess(r=>typeof r!="string"||r.startsWith("TRADE_STATUS_")?r:Object.values(b).find(n=>n.slice(13)===r)??r,z.enum(b)),O=(c=>(c.Live="LIVE",c.Matched="MATCHED",c.Delayed="DELAYED",c.Unmatched="UNMATCHED",c.Canceled="CANCELED",c))(O||{}),V=z.enum(O),U=z.object({price:Ha,size:Ha}),C=z.string().regex(/^\d+$/).transform(r=>w$1(new Date(Number(r)*1e3).toISOString())),W=z.string().regex(/^\d+$/).transform(r=>r==="0"?void 0:w$1(new Date(Number(r)*1e3).toISOString())),B=z.object({event_type:z.literal("book"),market:z.string(),asset_id:Ea,bids:z.array(U),asks:z.array(U),hash:z.string().nullish(),timestamp:ca.nullish(),min_order_size:Ha.nullish(),tick_size:Ha.nullish(),neg_risk:z.boolean().nullish(),last_trade_price:Ha.nullish()}).transform(({event_type:r,asset_id:a,min_order_size:n,tick_size:s,neg_risk:o,last_trade_price:c,...p})=>({topic:"market",type:r,payload:{...p,tokenId:a,minOrderSize:n,tickSize:s,negRisk:o,lastTradePrice:c}})),J=z.object({asset_id:Ea,price:Ha,size:Ha,side:f,hash:z.string().nullish(),best_bid:Ha.nullish(),best_ask:Ha.nullish()}).transform(({asset_id:r,best_bid:a,best_ask:n,...s})=>({...s,tokenId:r,bestBid:a,bestAsk:n})),j=z.object({event_type:z.literal("price_change"),market:z.string(),price_changes:z.array(J),timestamp:ca.nullish()}).transform(({event_type:r,price_changes:a,...n})=>({topic:"market",type:r,payload:{...n,priceChanges:a}})),w=z.object({event_type:z.literal("last_trade_price"),market:z.string(),asset_id:Ea,price:Ha,size:Ha.nullish(),fee_rate_bps:Ha.nullish(),side:f,timestamp:ca.nullish(),transaction_hash:z.string().nullish()}).transform(({event_type:r,asset_id:a,fee_rate_bps:n,transaction_hash:s,...o})=>({topic:"market",type:r,payload:{...o,tokenId:a,feeRateBps:n,transactionHash:s}})),q=z.object({event_type:z.literal("tick_size_change"),market:z.string(),asset_id:Ea,old_tick_size:Ha.nullish(),new_tick_size:Ha,timestamp:ca.nullish()}).transform(({event_type:r,asset_id:a,old_tick_size:n,new_tick_size:s,...o})=>({topic:"market",type:r,payload:{...o,tokenId:a,oldTickSize:n,newTickSize:s}})),N=z.object({event_type:z.literal("best_bid_ask"),market:z.string(),asset_id:Ea,best_bid:Ha.nullish(),best_ask:Ha.nullish(),spread:Ha.nullish(),timestamp:ca.nullish()}).transform(({event_type:r,asset_id:a,best_bid:n,best_ask:s,...o})=>({topic:"market",type:r,payload:{...o,tokenId:a,bestBid:n,bestAsk:s}})),L=z.object({id:z.string(),ticker:z.string().nullish(),slug:z.string().nullish(),title:z.string().nullish(),description:z.string().nullish()}),H=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(Ea).nullish(),outcomes:z.array(z.string()).nullish(),event_message:L.nullish(),timestamp:ca.nullish(),tags:z.array(z.string()).nullish(),condition_id:X$1.nullish(),active:z.boolean().nullish(),clob_token_ids:z.array(z.string()).nullish(),sports_market_type:z.string().nullish(),line:Ha.nullish(),game_start_time:ga.nullish(),order_price_min_tick_size:Ha.nullish(),group_item_title:z.string().nullish(),taker_base_fee:Ha.nullish(),fees_enabled:z.boolean().nullish(),fee_schedule:z.unknown().nullish()}).transform(({event_type:r,assets_ids:a,event_message:n,condition_id:s,clob_token_ids:o,sports_market_type:c,game_start_time:p,order_price_min_tick_size:y,group_item_title:u,taker_base_fee:S,fees_enabled:E,fee_schedule:_,...T})=>({topic:"market",type:r,payload:{...T,tokenIds:a,eventMessage:n,conditionId:s,clobTokenIds:o,sportsMarketType:c,gameStartTime:p,orderPriceMinTickSize:y,groupItemTitle:u,takerBaseFee:S,feesEnabled:E,feeSchedule:_}})),Y=z.object({event_type:z.literal("market_resolved"),id:z.string(),market:z.string(),assets_ids:z.array(Ea).nullish(),winning_asset_id:Ea.nullish(),winning_outcome:z.string().nullish(),event_message:L.nullish(),timestamp:ca.nullish(),tags:z.array(z.string()).nullish()}).transform(({event_type:r,assets_ids:a,winning_asset_id:n,winning_outcome:s,event_message:o,...c})=>({topic:"market",type:r,payload:{...c,tokenIds:a,winningTokenId:n,winningOutcome:s,eventMessage:o}})),F=(s=>(s.Placement="PLACEMENT",s.Update="UPDATE",s.Cancellation="CANCELLATION",s))(F||{}),X=z.enum(F),ee=z.object({event_type:z.literal("order"),id:z.string(),owner:z.string(),market:z.string(),asset_id:Ea,side:f,order_owner:z.string().nullish(),original_size:Ha,size_matched:Ha,price:Ha,associate_trades:z.array(z.string()).nullish(),outcome:z.string().nullish(),type:X,created_at:C.nullish(),expiration:W.nullish(),order_type:va.nullish(),status:V.nullish(),maker_address:z.string().nullish(),timestamp:ca}).transform(({event_type:r,type:a,asset_id:n,order_owner:s,original_size:o,size_matched:c,associate_trades:p,created_at:y,expiration:u,order_type:S,maker_address:E,..._})=>({topic:"user",type:r,payload:{..._,orderEventType:a,tokenId:n,orderOwner:s,originalSize:o,sizeMatched:c,associateTrades:p,createdAt:y,expiresAt:u,orderType:S,makerAddress:E}})),te=z.object({order_id:z.string(),owner:z.string(),maker_address:z.string().nullish(),matched_amount:Ha,price:Ha,fee_rate_bps:Ha.nullish(),asset_id:Ea,outcome:z.string().nullish(),outcome_index:z.number().int().nullish(),side:f}).transform(({order_id:r,maker_address:a,matched_amount:n,fee_rate_bps:s,asset_id:o,outcome_index:c,...p})=>({...p,orderId:r,makerAddress:a,matchedAmount:n,feeRateBps:s,tokenId:o,outcomeIndex:c})),re=z.object({event_type:z.literal("trade"),type:z.literal("TRADE"),id:z.string(),taker_order_id:z.string(),market:z.string(),asset_id:Ea,side:f,size:Ha,fee_rate_bps:Ha.nullish(),price:Ha,status:$,match_time:C.nullish(),matchtime:C.nullish(),last_update:C.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(te).nullish(),trader_side:z.union([z.literal("TAKER"),z.literal("MAKER")]).nullish(),timestamp:ca}).transform(({event_type:r,type:a,taker_order_id:n,asset_id:s,fee_rate_bps:o,match_time:c,matchtime:p,last_update:y,trade_owner:u,maker_address:S,transaction_hash:E,bucket_index:_,maker_orders:T,trader_side:G,...Q})=>({topic:"user",type:r,payload:{...Q,takerOrderId:n,tokenId:s,feeRateBps:o,matchedAt:c??p,updatedAt:y,tradeOwner:u,makerAddress:S,transactionHash:E,bucketIndex:_,makerOrders:T,traderSide:G}})),Me=z.discriminatedUnion("event_type",[B,j,w,q]),Re=z.discriminatedUnion("event_type",[N,H,Y]),Ae=z.discriminatedUnion("event_type",[B,j,w,q,N,H,Y]),Ie=z.discriminatedUnion("event_type",[ee,re]);var ie=z.object({id:z.string(),body:z.string().nullish(),parentEntityType:ta.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(N$1).nullish(),profile:J$1.nullish(),reactions:z.array(M).nullish(),reportCount:z.number().int().nullish(),reactionCount:z.number().int().nullish(),tradeAsset:z.string().nullish()}),ne=z.object({topic:z.literal("comments"),type:z.literal("comment_created"),timestamp:aa,payload:O$1}),ae=z.object({topic:z.literal("comments"),type:z.literal("comment_removed"),timestamp:aa,payload:ie}),se=z.object({topic:z.literal("comments"),type:z.literal("reaction_created"),timestamp:aa,payload:M}),oe=z.object({topic:z.literal("comments"),type:z.literal("reaction_removed"),timestamp:aa,payload:M}),K=z.object({symbol:z.string(),timestamp:aa,value:Ia}),ce="prices.crypto.binance",pe="prices.crypto.chainlink",le=z.literal("crypto_prices"),me=z.literal("crypto_prices_chainlink"),de=le.transform(()=>ce),he=me.transform(()=>pe),ye=z.object({topic:de,type:z.literal("update"),timestamp:aa,payload:K}),ue=z.object({topic:he,type:z.literal("update"),timestamp:aa,payload:K}),Se=z.discriminatedUnion("topic",[ye,ue]),Ee=z.object({symbol:z.string(),value:Ia,full_accuracy_value:Ha.nullish(),timestamp:aa,received_at:aa.nullish(),is_carried_forward:z.boolean().nullish()}).transform(({full_accuracy_value:r,received_at:a,is_carried_forward:n,value:s,...o})=>({...o,value:r??s,receivedAt:a,isCarriedForward:n})),_e=z.object({timestamp:z.number(),value:Ia}),ke=z.object({symbol:z.string(),data:z.array(_e)}),fe=z.literal("equity_prices"),ge="prices.equity.pyth",Z=fe.transform(()=>ge),ve=z.object({topic:Z,type:z.literal("update"),timestamp:aa,payload:Ee}),Ce=z.object({topic:Z,type:z.literal("subscribe"),timestamp:aa,payload:ke}),Te=z.discriminatedUnion("type",[ve,Ce]),Pe=z.discriminatedUnion("type",[ne,ae,se,oe]),je=z.discriminatedUnion("topic",[Pe,Se,Te]);var be=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:ga.nullish(),finished_timestamp:ga.nullish(),turn:z.string().nullish()}).transform(({finishedTimestamp:r,finished_timestamp:a,...n})=>({...n,finishedAt:r??a})),Le=be.transform(r=>({topic:"sports",type:"sport_result",payload:r}));export{ne as CommentCreatedEventSchema,ae as CommentRemovedEventSchema,Pe as CommentsEventSchema,ye as CryptoPricesBinanceEventSchema,ue as CryptoPricesChainlinkEventSchema,Se as CryptoPricesEventSchema,Re as CustomMarketEventSchema,Te as EquityPricesEventSchema,Ce as EquityPricesSubscribeEventSchema,ve as EquityPricesUpdateEventSchema,N as MarketBestBidAskEventSchema,B as MarketBookEventSchema,Ae as MarketEventSchema,w as MarketLastTradePriceEventSchema,j as MarketPriceChangeEventSchema,Y as MarketResolvedEventSchema,q as MarketTickSizeChangeEventSchema,H as NewMarketEventSchema,se as ReactionCreatedEventSchema,oe as ReactionRemovedEventSchema,je as RealtimeEventSchema,Le as SportsResultEventSchema,Me as StandardMarketEventSchema,b as TradeStatus,Ie as UserEventSchema,ee as UserOrderEventSchema,F as UserOrderEventType,O as UserOrderStatus,re as UserTradeEventSchema};//# sourceMappingURL=index.js.map
2
2
  //# sourceMappingURL=index.js.map