@polymarket/bindings 0.5.0 → 0.7.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/chunk-BAQM5QBB.js +2 -0
- package/dist/{chunk-I4SRN2Q5.js.map → chunk-BAQM5QBB.js.map} +1 -1
- package/dist/chunk-NFJUONUG.js +2 -0
- package/dist/chunk-NFJUONUG.js.map +1 -0
- package/dist/chunk-WVVJ3WNL.js +2 -0
- package/dist/chunk-WVVJ3WNL.js.map +1 -0
- package/dist/clob/index.d.ts +2633 -306
- package/dist/clob/index.js +1 -1
- package/dist/clob/index.js.map +1 -1
- package/dist/combos/index.d.ts +426 -170
- package/dist/combos/index.js +1 -1
- package/dist/combos/index.js.map +1 -1
- package/dist/data/index.d.ts +49 -49
- package/dist/data/index.js +1 -1
- package/dist/data/index.js.map +1 -1
- package/dist/gamma/index.d.ts +77 -67
- package/dist/gamma/index.js +1 -1
- package/dist/gamma/index.js.map +1 -1
- package/dist/index.d.ts +23 -5
- package/dist/index.js +1 -1
- package/dist/{orders-BDfNkzav.d.ts → orders-CAELACaR.d.ts} +1 -1
- package/dist/perps/index.d.ts +11 -11
- package/dist/perps/index.js +1 -1
- package/dist/relayer/index.d.ts +43 -2
- package/dist/relayer/index.js +1 -1
- package/dist/relayer/index.js.map +1 -1
- package/dist/subscriptions/index.d.ts +21 -21
- package/dist/subscriptions/index.js +1 -1
- package/dist/subscriptions/index.js.map +1 -1
- package/package.json +2 -2
- package/dist/chunk-6TO35A2S.js +0 -2
- package/dist/chunk-6TO35A2S.js.map +0 -1
- package/dist/chunk-GJX3FYFG.js +0 -2
- package/dist/chunk-GJX3FYFG.js.map +0 -1
- package/dist/chunk-I4SRN2Q5.js +0 -2
package/dist/gamma/index.js
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import {a,F,e,t,s,r}from'../chunk-
|
|
1
|
+
import {a,F,e,t,s,r}from'../chunk-NFJUONUG.js';export{y as BestLineSchema,d as CategoryReferenceSchema,u as ChatSchema,g as ClobRewardsSchema,r as CollectionReferenceSchema,O as CommentMediaSchema,J as CommentPositionSchema,K as CommentProfileSchema,P as CommentSchema,v as EventCreatorSchema,x as EventExternalPartnerMappingSchema,c as EventReferenceSchema,F as EventSchema,b as FeeScheduleSchema,I as FetchEventTagsResponseSchema,n as FetchMarketTagsResponseSchema,E as GammaEventSchema,j as GammaMarketSchema,a as ImageOptimizationSchema,h as InternalUserSchema,Q as ListCommentsResponseSchema,H as ListEventsKeysetResponseSchema,G as ListEventsResponseSchema,m as ListMarketsKeysetResponseSchema,l as ListMarketsResponseSchema,C as ListSportsMetadataResponseSchema,B as ListTeamsResponseSchema,k as MarketSchema,w as PartnerSchema,N as ReactionSchema,L as ReactionType,M as ReactionTypeSchema,f as RelatedMarketSchema,q as SeriesIdSchema,s as SeriesReferenceSchema,D as SportsMarketTypesResponseSchema,A as SportsMetadataSchema,e as TagReferenceSchema,z as TeamSchema,t as TemplateReferenceSchema,i as UmaResolutionStatus,p as hasBinaryOutcomes,o as normalizeMarket}from'../chunk-NFJUONUG.js';import {B,oa,Ma,ca,Ea,ma,Ja}from'../chunk-WVVJ3WNL.js';export{Ja as TagIdSchema}from'../chunk-WVVJ3WNL.js';import {z as z$1}from'zod';var z=(a=>(a.Pending="pending",a.Queued="queued",a.Success="success",a.Failed="failed",a.Cancelled="cancelled",a))(z||{}),E=z$1.union([z$1.string(),z$1.number().int().transform(String)]).transform(B),O=z$1.object({id:z$1.number().int(),marketId:E.nullish(),eventId:ma.nullish(),questionId:Ea.nullish(),content:z$1.string().nullish(),state:z$1.enum(z).nullish(),clearBook:z$1.boolean().nullish(),notifyDiscord:z$1.boolean().nullish(),showInFrontend:z$1.boolean().nullish(),adapterAddress:ca.nullish(),negRiskRequestId:z$1.string().nullish(),txHash:Ma.nullish(),createdAt:oa.nullish(),queuedAt:oa.nullish(),scheduledFor:oa.nullish(),txTimestamp:oa.nullish()}),Re=z$1.array(O);var Ie=z$1.object({hasMore:z$1.boolean().nullish(),totalResults:z$1.number().int().nullish()});var j=z$1.object({id:z$1.string(),communityMod:z$1.boolean().nullish(),creator:z$1.boolean().nullish(),mod:z$1.boolean().nullish()}),L=z$1.object({id:z$1.string().nullish(),name:z$1.string().nullish(),user:z$1.number().int().nullish(),referral:z$1.string().nullish(),createdBy:z$1.number().int().nullish(),updatedBy:z$1.number().int().nullish(),createdAt:oa.nullish(),updatedAt:oa.nullish(),utmSource:z$1.string().nullish(),utmMedium:z$1.string().nullish(),utmCampaign:z$1.string().nullish(),utmContent:z$1.string().nullish(),utmTerm:z$1.string().nullish(),walletActivated:z$1.boolean().nullish(),pseudonym:z$1.string().nullish(),displayUsernamePublic:z$1.boolean().nullish(),profileImage:z$1.string().nullish(),bio:z$1.string().nullish(),proxyWallet:z$1.string().nullish(),profileImageOptimized:a.nullish(),isCloseOnly:z$1.boolean().nullish(),isCertReq:z$1.boolean().nullish(),certReqDate:oa.nullish(),discordUsername:z$1.string().nullish(),xUsername:z$1.string().nullish(),verifiedBadge:z$1.boolean().nullish(),dubPartnerId:z$1.string().nullish(),termsAcceptedAt:oa.nullish(),viewOnlyAcknowledgedAt:oa.nullish(),isReferralRestricted:z$1.boolean().nullish()}).transform(({proxyWallet:i,...l})=>({...l,wallet:i})),Ee=z$1.object({createdAt:oa.nullish(),proxyWallet:ca.nullish(),profileImage:z$1.string().nullish(),displayUsernamePublic:z$1.boolean().nullish(),bio:z$1.string().nullish(),pseudonym:z$1.string().nullish(),name:z$1.string().nullish(),users:z$1.array(j).nullish(),xUsername:z$1.string().nullish(),verifiedBadge:z$1.boolean().nullish()}).transform(({proxyWallet:i,...l})=>({...l,wallet:i}));var k=z$1.object({id:Ja,event_count:z$1.number().int().nullish(),label:z$1.string().nullish(),slug:z$1.string().nullish()}).transform(({event_count:i,...l})=>({...l,eventCount:i})),C=z$1.object({hasMore:z$1.boolean().nullish(),totalResults:z$1.number().int().nullish()}),Ue=z$1.object({events:z$1.array(F).nullish(),tags:z$1.array(k).nullish(),profiles:z$1.array(L).nullish(),pagination:C.nullish()});var u=e.extend({templates:z$1.array(t).nullish()}),D=z$1.object({id:z$1.string(),tagID:z$1.number().int().nullish(),relatedTagID:z$1.number().int().nullish(),rank:z$1.number().int().nullish()}).transform(({tagID:i,relatedTagID:l,...v})=>({...v,tagId:i,relatedTagId:l})),Be=z$1.array(u),Ye=z$1.array(D),Ne=z$1.array(u);var U=s.extend({events:z$1.array(F).nullish(),collections:z$1.array(r).nullish(),tags:z$1.array(u).nullish()}),Je=z$1.array(U);var A=(s=>(s[s.EOA=0]="EOA",s[s.POLY_PROXY=1]="POLY_PROXY",s[s.GNOSIS_SAFE=2]="GNOSIS_SAFE",s[s.DEPOSIT_WALLET=3]="DEPOSIT_WALLET",s))(A||{}),Ze=z$1.object({type:z$1.enum(A),typeName:z$1.enum(["EOA","POLY_PROXY","GNOSIS_SAFE","DEPOSIT_WALLET"])});export{Re as ListMarketClarificationsResponseSchema,Ne as ListRelatedTagResourcesResponseSchema,Ye as ListRelatedTagsResponseSchema,Je as ListSeriesResponseSchema,Be as ListTagsResponseSchema,O as MarketClarificationSchema,z as MarketClarificationState,Ie as PaginationEnvelopeSchema,L as ProfileSchema,Ee as PublicProfileSchema,j as PublicProfileUserSchema,Ue as PublicSearchResponseSchema,D as RelatedTagSchema,C as SearchPaginationSchema,k as SearchTagSchema,U as SeriesSchema,u as TagSchema,A as WalletType,Ze as WalletTypeSchema};//# sourceMappingURL=index.js.map
|
|
2
2
|
//# sourceMappingURL=index.js.map
|
package/dist/gamma/index.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["../../src/gamma/market-clarification.ts","../../src/gamma/pagination.ts","../../src/gamma/profile.ts","../../src/gamma/search.ts","../../src/gamma/tag.ts","../../src/gamma/series.ts","../../src/gamma/wallet.ts"],"names":["MarketClarificationState","MarketIdFromWireSchema","z","toMarketId","MarketClarificationSchema","EventIdSchema","QuestionIdSchema","EvmAddressSchema","TxHashSchema","IsoDateTimeStringSchema","ListMarketClarificationsResponseSchema","PaginationEnvelopeSchema","PublicProfileUserSchema","ProfileSchema","ImageOptimizationSchema","proxyWallet","rest","PublicProfileSchema","SearchTagSchema","TagIdSchema","event_count","SearchPaginationSchema","PublicSearchResponseSchema","EventSchema","TagSchema","TagReferenceSchema","TemplateReferenceSchema","RelatedTagSchema","tagID","relatedTagID","ListTagsResponseSchema","ListRelatedTagsResponseSchema","ListRelatedTagResourcesResponseSchema","SeriesSchema","SeriesReferenceSchema","CollectionReferenceSchema","ListSeriesResponseSchema","WalletType","WalletTypeSchema"],"mappings":"8zCAWYA,CAAAA,CAAAA,CAAAA,CAAAA,GACVA,CAAAA,CAAA,QAAU,SAAA,CACVA,CAAAA,CAAA,MAAA,CAAS,QAAA,CACTA,EAAA,OAAA,CAAU,SAAA,CACVA,EAAA,MAAA,CAAS,QAAA,CACTA,EAAA,SAAA,CAAY,WAAA,CALFA,CAAAA,CAAAA,EAAAA,CAAAA,EAAA,EAAA,CAAA,CAUNC,EAAyBC,GAAAA,CAC5B,KAAA,CAAM,CAACA,GAAAA,CAAE,MAAA,GAAUA,GAAAA,CAAE,MAAA,GAAS,GAAA,EAAI,CAAE,UAAU,MAAM,CAAC,CAAC,CAAA,CACtD,SAAA,CAAUC,GAAU,CAAA,CAEVC,CAAAA,CAA4BF,GAAAA,CAAE,MAAA,CAAO,CAChD,EAAA,CAAIA,GAAAA,CAAE,QAAO,CAAE,GAAA,GACf,QAAA,CAAUD,CAAAA,CAAuB,SAAQ,CACzC,OAAA,CAASI,GAAc,OAAA,EAAQ,CAC/B,WAAYC,EAAAA,CAAiB,OAAA,GAC7B,OAAA,CAASJ,GAAAA,CAAE,MAAA,EAAO,CAAE,SAAQ,CAC5B,KAAA,CAAOA,IAAE,IAAA,CAAKF,CAAwB,EAAE,OAAA,EAAQ,CAChD,UAAWE,GAAAA,CAAE,OAAA,GAAU,OAAA,EAAQ,CAC/B,cAAeA,GAAAA,CAAE,OA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ACvD,MAAA,CAAQhC,IAAE,KAAA,CAAMqB,CAAW,CAAA,CAAE,OAAA,GAC7B,WAAA,CAAarB,GAAAA,CAAE,MAAMiC,CAAyB,CAAA,CAAE,SAAQ,CACxD,IAAA,CAAMjC,IAAE,KAAA,CAAMsB,CAAS,EAAE,OAAA,EAC3B,CAAC,CAAA,CAEYY,EAAAA,CAA2BlC,IAAE,KAAA,CAAM+B,CAAY,MCZhDI,CAAAA,CAAAA,CAAAA,CAAAA,GACVA,CAAAA,CAAAA,CAAAA,CAAA,IAAM,CAAA,CAAA,CAAN,KAAA,CACAA,IAAA,UAAA,CAAa,CAAA,CAAA,CAAb,aACAA,CAAAA,CAAAA,CAAAA,CAAA,WAAA,CAAc,GAAd,aAAA,CACAA,CAAAA,CAAAA,CAAAA,CAAA,eAAiB,CAAA,CAAA,CAAjB,gBAAA,CAJUA,CAAAA,CAAAA,EAAAA,CAAAA,EAAA,EAAA,CAAA,CAOCC,GAAmBpC,GAAAA,CAAE,MAAA,CAAO,CACvC,IAAA,CAAMA,GAAAA,CAAE,KAAKmC,CAAU,CAAA,CACvB,SAAUnC,GAAAA,CAAE,IAAA,CAAK,CAAC,KAAA,CAAO,YAAA,CAAc,cAAe,gBAAgB,CAAC,CACzE,CAAC","file":"index.js","sourcesContent":["import { z } from 'zod';\nimport {\n EventIdSchema,\n EvmAddressSchema,\n IsoDateTimeStringSchema,\n QuestionIdSchema,\n TxHashSchema,\n toMarketId,\n} from '../shared';\n\n/** Lifecycle state of a clarification as it is scheduled and posted on-chain. */\nexport enum MarketClarificationState {\n Pending = 'pending',\n Queued = 'queued',\n Success = 'success',\n Failed = 'failed',\n Cancelled = 'cancelled',\n}\n\n// The upstream payload returns `marketId` as a JSON number, but the `MarketId`\n// brand is string-valued, so accept number-or-string here (mirrors `EventIdSchema`).\nconst MarketIdFromWireSchema = z\n .union([z.string(), z.number().int().transform(String)])\n .transform(toMarketId);\n\nexport const MarketClarificationSchema = z.object({\n id: z.number().int(),\n marketId: MarketIdFromWireSchema.nullish(),\n eventId: EventIdSchema.nullish(),\n questionId: QuestionIdSchema.nullish(),\n content: z.string().nullish(),\n state: z.enum(MarketClarificationState).nullish(),\n clearBook: z.boolean().nullish(),\n notifyDiscord: z.boolean().nullish(),\n showInFrontend: z.boolean().nullish(),\n adapterAddress: EvmAddressSchema.nullish(),\n negRiskRequestId: z.string().nullish(),\n txHash: TxHashSchema.nullish(),\n createdAt: IsoDateTimeStringSchema.nullish(),\n queuedAt: IsoDateTimeStringSchema.nullish(),\n scheduledFor: IsoDateTimeStringSchema.nullish(),\n txTimestamp: IsoDateTimeStringSchema.nullish(),\n});\n\nexport const ListMarketClarificationsResponseSchema = z.array(\n MarketClarificationSchema,\n);\n\nexport type MarketClarification = z.infer<typeof MarketClarificationSchema>;\nexport type ListMarketClarificationsResponse = z.infer<\n typeof ListMarketClarificationsResponseSchema\n>;\n","import { z } from 'zod';\n\nexport const PaginationEnvelopeSchema = z.object({\n hasMore: z.boolean().nullish(),\n totalResults: z.number().int().nullish(),\n});\n\nexport type PaginationEnvelope = z.infer<typeof PaginationEnvelopeSchema>;\n","import { z } from 'zod';\nimport { EvmAddressSchema, IsoDateTimeStringSchema } from '../shared';\nimport { ImageOptimizationSchema } from './common';\n\nexport const PublicProfileUserSchema = z.object({\n id: z.string(),\n communityMod: z.boolean().nullish(),\n creator: z.boolean().nullish(),\n mod: z.boolean().nullish(),\n});\n\nexport const ProfileSchema = z\n .object({\n id: z.string().nullish(),\n name: z.string().nullish(),\n user: z.number().int().nullish(),\n referral: z.string().nullish(),\n createdBy: z.number().int().nullish(),\n updatedBy: z.number().int().nullish(),\n createdAt: IsoDateTimeStringSchema.nullish(),\n updatedAt: IsoDateTimeStringSchema.nullish(),\n utmSource: z.string().nullish(),\n utmMedium: z.string().nullish(),\n utmCampaign: z.string().nullish(),\n utmContent: z.string().nullish(),\n utmTerm: z.string().nullish(),\n walletActivated: z.boolean().nullish(),\n pseudonym: z.string().nullish(),\n displayUsernamePublic: z.boolean().nullish(),\n profileImage: z.string().nullish(),\n bio: z.string().nullish(),\n proxyWallet: z.string().nullish(),\n profileImageOptimized: ImageOptimizationSchema.nullish(),\n isCloseOnly: z.boolean().nullish(),\n isCertReq: z.boolean().nullish(),\n certReqDate: IsoDateTimeStringSchema.nullish(),\n discordUsername: z.string().nullish(),\n xUsername: z.string().nullish(),\n verifiedBadge: z.boolean().nullish(),\n dubPartnerId: z.string().nullish(),\n termsAcceptedAt: IsoDateTimeStringSchema.nullish(),\n viewOnlyAcknowledgedAt: IsoDateTimeStringSchema.nullish(),\n isReferralRestricted: z.boolean().nullish(),\n })\n .transform(({ proxyWallet, ...rest }) => ({\n ...rest,\n wallet: proxyWallet,\n }));\n\nexport const PublicProfileSchema = z\n .object({\n createdAt: IsoDateTimeStringSchema.nullish(),\n proxyWallet: EvmAddressSchema.nullish(),\n profileImage: z.string().nullish(),\n displayUsernamePublic: z.boolean().nullish(),\n bio: z.string().nullish(),\n pseudonym: z.string().nullish(),\n name: z.string().nullish(),\n users: z.array(PublicProfileUserSchema).nullish(),\n xUsername: z.string().nullish(),\n verifiedBadge: z.boolean().nullish(),\n })\n .transform(({ proxyWallet, ...rest }) => ({\n ...rest,\n wallet: proxyWallet,\n }));\n\nexport type PublicProfile = z.infer<typeof PublicProfileSchema>;\nexport type Profile = z.infer<typeof ProfileSchema>;\nexport type PublicProfileUser = z.infer<typeof PublicProfileUserSchema>;\n","import { z } from 'zod';\nimport { TagIdSchema } from '../shared';\nimport { EventSchema } from './event';\nimport { ProfileSchema } from './profile';\n\nexport const SearchTagSchema = z\n .object({\n id: TagIdSchema,\n event_count: z.number().int().nullish(),\n label: z.string().nullish(),\n slug: z.string().nullish(),\n })\n .transform(({ event_count, ...rest }) => ({\n ...rest,\n eventCount: event_count,\n }));\n\nexport const SearchPaginationSchema = z.object({\n hasMore: z.boolean().nullish(),\n totalResults: z.number().int().nullish(),\n});\n\nexport const PublicSearchResponseSchema = z.object({\n events: z.array(EventSchema).nullish(),\n tags: z.array(SearchTagSchema).nullish(),\n profiles: z.array(ProfileSchema).nullish(),\n pagination: SearchPaginationSchema.nullish(),\n});\n\nexport type SearchTag = z.infer<typeof SearchTagSchema>;\nexport type SearchPagination = z.infer<typeof SearchPaginationSchema>;\nexport type PublicSearchResponse = z.infer<typeof PublicSearchResponseSchema>;\n","import { z } from 'zod';\nimport { TagIdSchema } from '../shared';\nimport { TagReferenceSchema } from './common';\nimport { TemplateReferenceSchema } from './event';\n\nexport const TagSchema = TagReferenceSchema.extend({\n templates: z.array(TemplateReferenceSchema).nullish(),\n});\n\nexport const RelatedTagSchema = z\n .object({\n id: z.string(),\n tagID: z.number().int().nullish(),\n relatedTagID: z.number().int().nullish(),\n rank: z.number().int().nullish(),\n })\n .transform(({ tagID, relatedTagID, ...rest }) => ({\n ...rest,\n tagId: tagID,\n relatedTagId: relatedTagID,\n }));\n\nexport const ListTagsResponseSchema = z.array(TagSchema);\nexport const ListRelatedTagsResponseSchema = z.array(RelatedTagSchema);\nexport const ListRelatedTagResourcesResponseSchema = z.array(TagSchema);\n\nexport type Tag = z.infer<typeof TagSchema>;\nexport type RelatedTag = z.infer<typeof RelatedTagSchema>;\nexport type ListTagsResponse = z.infer<typeof ListTagsResponseSchema>;\nexport type ListRelatedTagsResponse = z.infer<\n typeof ListRelatedTagsResponseSchema\n>;\nexport type ListRelatedTagResourcesResponse = z.infer<\n typeof ListRelatedTagResourcesResponseSchema\n>;\n\nexport { TagIdSchema };\n","import { z } from 'zod';\nimport {\n CollectionReferenceSchema,\n EventSchema,\n SeriesReferenceSchema,\n} from './event';\nimport { TagSchema } from './tag';\n\nexport const SeriesSchema = SeriesReferenceSchema.extend({\n events: z.array(EventSchema).nullish(),\n collections: z.array(CollectionReferenceSchema).nullish(),\n tags: z.array(TagSchema).nullish(),\n});\n\nexport const ListSeriesResponseSchema = z.array(SeriesSchema);\n\nexport type Series = z.infer<typeof SeriesSchema>;\nexport type ListSeriesResponse = z.infer<typeof ListSeriesResponseSchema>;\n","import { z } from 'zod';\n\nexport enum WalletType {\n EOA = 0,\n POLY_PROXY = 1,\n GNOSIS_SAFE = 2,\n DEPOSIT_WALLET = 3,\n}\n\nexport const WalletTypeSchema = z.object({\n type: z.enum(WalletType),\n typeName: z.enum(['EOA', 'POLY_PROXY', 'GNOSIS_SAFE', 'DEPOSIT_WALLET']),\n});\n"]}
|
|
1
|
+
{"version":3,"sources":["../../src/gamma/market-clarification.ts","../../src/gamma/pagination.ts","../../src/gamma/profile.ts","../../src/gamma/search.ts","../../src/gamma/tag.ts","../../src/gamma/series.ts","../../src/gamma/wallet.ts"],"names":["MarketClarificationState","MarketIdFromWireSchema","z","toMarketId","MarketClarificationSchema","EventIdSchema","QuestionIdSchema","EvmAddressSchema","TxHashSchema","IsoDateTimeStringSchema","ListMarketClarificationsResponseSchema","PaginationEnvelopeSchema","PublicProfileUserSchema","ProfileSchema","ImageOptimizationSchema","proxyWallet","rest","PublicProfileSchema","SearchTagSchema","TagIdSchema","event_count","SearchPaginationSchema","PublicSearchResponseSchema","EventSchema","TagSchema","TagReferenceSchema","TemplateReferenceSchema","RelatedTagSchema","tagID","relatedTagID","ListTagsResponseSchema","ListRelatedTagsResponseSchema","ListRelatedTagResourcesResponseSchema","SeriesSchema","SeriesReferenceSchema","CollectionReferenceSchema","ListSeriesResponseSchema","WalletType","WalletTypeSchema"],"mappings":"uzCAWYA,CAAAA,CAAAA,CAAAA,CAAAA,GACVA,CAAAA,CAAA,QAAU,SAAA,CACVA,CAAAA,CAAA,MAAA,CAAS,QAAA,CACTA,EAAA,OAAA,CAAU,SAAA,CACVA,EAAA,MAAA,CAAS,QAAA,CACTA,EAAA,SAAA,CAAY,WAAA,CALFA,CAAAA,CAAAA,EAAAA,CAAAA,EAAA,EAAA,CAAA,CAUNC,EAAyBC,GAAAA,CAC5B,KAAA,CAAM,CAACA,GAAAA,CAAE,MAAA,GAAUA,GAAAA,CAAE,MAAA,GAAS,GAAA,EAAI,CAAE,UAAU,MAAM,CA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,CACzE,CAAC","file":"index.js","sourcesContent":["import { z } from 'zod';\nimport {\n EventIdSchema,\n EvmAddressSchema,\n IsoDateTimeStringSchema,\n QuestionIdSchema,\n TxHashSchema,\n toMarketId,\n} from '../shared';\n\n/** Lifecycle state of a clarification as it is scheduled and posted on-chain. */\nexport enum MarketClarificationState {\n Pending = 'pending',\n Queued = 'queued',\n Success = 'success',\n Failed = 'failed',\n Cancelled = 'cancelled',\n}\n\n// The upstream payload returns `marketId` as a JSON number, but the `MarketId`\n// brand is string-valued, so accept number-or-string here (mirrors `EventIdSchema`).\nconst MarketIdFromWireSchema = z\n .union([z.string(), z.number().int().transform(String)])\n .transform(toMarketId);\n\nexport const MarketClarificationSchema = z.object({\n id: z.number().int(),\n marketId: MarketIdFromWireSchema.nullish(),\n eventId: EventIdSchema.nullish(),\n questionId: QuestionIdSchema.nullish(),\n content: z.string().nullish(),\n state: z.enum(MarketClarificationState).nullish(),\n clearBook: z.boolean().nullish(),\n notifyDiscord: z.boolean().nullish(),\n showInFrontend: z.boolean().nullish(),\n adapterAddress: EvmAddressSchema.nullish(),\n negRiskRequestId: z.string().nullish(),\n txHash: TxHashSchema.nullish(),\n createdAt: IsoDateTimeStringSchema.nullish(),\n queuedAt: IsoDateTimeStringSchema.nullish(),\n scheduledFor: IsoDateTimeStringSchema.nullish(),\n txTimestamp: IsoDateTimeStringSchema.nullish(),\n});\n\nexport const ListMarketClarificationsResponseSchema = z.array(\n MarketClarificationSchema,\n);\n\nexport type MarketClarification = z.infer<typeof MarketClarificationSchema>;\nexport type ListMarketClarificationsResponse = z.infer<\n typeof ListMarketClarificationsResponseSchema\n>;\n","import { z } from 'zod';\n\nexport const PaginationEnvelopeSchema = z.object({\n hasMore: z.boolean().nullish(),\n totalResults: z.number().int().nullish(),\n});\n\nexport type PaginationEnvelope = z.infer<typeof PaginationEnvelopeSchema>;\n","import { z } from 'zod';\nimport { EvmAddressSchema, IsoDateTimeStringSchema } from '../shared';\nimport { ImageOptimizationSchema } from './common';\n\nexport const PublicProfileUserSchema = z.object({\n id: z.string(),\n communityMod: z.boolean().nullish(),\n creator: z.boolean().nullish(),\n mod: z.boolean().nullish(),\n});\n\nexport const ProfileSchema = z\n .object({\n id: z.string().nullish(),\n name: z.string().nullish(),\n user: z.number().int().nullish(),\n referral: z.string().nullish(),\n createdBy: z.number().int().nullish(),\n updatedBy: z.number().int().nullish(),\n createdAt: IsoDateTimeStringSchema.nullish(),\n updatedAt: IsoDateTimeStringSchema.nullish(),\n utmSource: z.string().nullish(),\n utmMedium: z.string().nullish(),\n utmCampaign: z.string().nullish(),\n utmContent: z.string().nullish(),\n utmTerm: z.string().nullish(),\n walletActivated: z.boolean().nullish(),\n pseudonym: z.string().nullish(),\n displayUsernamePublic: z.boolean().nullish(),\n profileImage: z.string().nullish(),\n bio: z.string().nullish(),\n proxyWallet: z.string().nullish(),\n profileImageOptimized: ImageOptimizationSchema.nullish(),\n isCloseOnly: z.boolean().nullish(),\n isCertReq: z.boolean().nullish(),\n certReqDate: IsoDateTimeStringSchema.nullish(),\n discordUsername: z.string().nullish(),\n xUsername: z.string().nullish(),\n verifiedBadge: z.boolean().nullish(),\n dubPartnerId: z.string().nullish(),\n termsAcceptedAt: IsoDateTimeStringSchema.nullish(),\n viewOnlyAcknowledgedAt: IsoDateTimeStringSchema.nullish(),\n isReferralRestricted: z.boolean().nullish(),\n })\n .transform(({ proxyWallet, ...rest }) => ({\n ...rest,\n wallet: proxyWallet,\n }));\n\nexport const PublicProfileSchema = z\n .object({\n createdAt: IsoDateTimeStringSchema.nullish(),\n proxyWallet: EvmAddressSchema.nullish(),\n profileImage: z.string().nullish(),\n displayUsernamePublic: z.boolean().nullish(),\n bio: z.string().nullish(),\n pseudonym: z.string().nullish(),\n name: z.string().nullish(),\n users: z.array(PublicProfileUserSchema).nullish(),\n xUsername: z.string().nullish(),\n verifiedBadge: z.boolean().nullish(),\n })\n .transform(({ proxyWallet, ...rest }) => ({\n ...rest,\n wallet: proxyWallet,\n }));\n\nexport type PublicProfile = z.infer<typeof PublicProfileSchema>;\nexport type Profile = z.infer<typeof ProfileSchema>;\nexport type PublicProfileUser = z.infer<typeof PublicProfileUserSchema>;\n","import { z } from 'zod';\nimport { TagIdSchema } from '../shared';\nimport { EventSchema } from './event';\nimport { ProfileSchema } from './profile';\n\nexport const SearchTagSchema = z\n .object({\n id: TagIdSchema,\n event_count: z.number().int().nullish(),\n label: z.string().nullish(),\n slug: z.string().nullish(),\n })\n .transform(({ event_count, ...rest }) => ({\n ...rest,\n eventCount: event_count,\n }));\n\nexport const SearchPaginationSchema = z.object({\n hasMore: z.boolean().nullish(),\n totalResults: z.number().int().nullish(),\n});\n\nexport const PublicSearchResponseSchema = z.object({\n events: z.array(EventSchema).nullish(),\n tags: z.array(SearchTagSchema).nullish(),\n profiles: z.array(ProfileSchema).nullish(),\n pagination: SearchPaginationSchema.nullish(),\n});\n\nexport type SearchTag = z.infer<typeof SearchTagSchema>;\nexport type SearchPagination = z.infer<typeof SearchPaginationSchema>;\nexport type PublicSearchResponse = z.infer<typeof PublicSearchResponseSchema>;\n","import { z } from 'zod';\nimport { TagIdSchema } from '../shared';\nimport { TagReferenceSchema } from './common';\nimport { TemplateReferenceSchema } from './event';\n\nexport const TagSchema = TagReferenceSchema.extend({\n templates: z.array(TemplateReferenceSchema).nullish(),\n});\n\nexport const RelatedTagSchema = z\n .object({\n id: z.string(),\n tagID: z.number().int().nullish(),\n relatedTagID: z.number().int().nullish(),\n rank: z.number().int().nullish(),\n })\n .transform(({ tagID, relatedTagID, ...rest }) => ({\n ...rest,\n tagId: tagID,\n relatedTagId: relatedTagID,\n }));\n\nexport const ListTagsResponseSchema = z.array(TagSchema);\nexport const ListRelatedTagsResponseSchema = z.array(RelatedTagSchema);\nexport const ListRelatedTagResourcesResponseSchema = z.array(TagSchema);\n\nexport type Tag = z.infer<typeof TagSchema>;\nexport type RelatedTag = z.infer<typeof RelatedTagSchema>;\nexport type ListTagsResponse = z.infer<typeof ListTagsResponseSchema>;\nexport type ListRelatedTagsResponse = z.infer<\n typeof ListRelatedTagsResponseSchema\n>;\nexport type ListRelatedTagResourcesResponse = z.infer<\n typeof ListRelatedTagResourcesResponseSchema\n>;\n\nexport { TagIdSchema };\n","import { z } from 'zod';\nimport {\n CollectionReferenceSchema,\n EventSchema,\n SeriesReferenceSchema,\n} from './event';\nimport { TagSchema } from './tag';\n\nexport const SeriesSchema = SeriesReferenceSchema.extend({\n events: z.array(EventSchema).nullish(),\n collections: z.array(CollectionReferenceSchema).nullish(),\n tags: z.array(TagSchema).nullish(),\n});\n\nexport const ListSeriesResponseSchema = z.array(SeriesSchema);\n\nexport type Series = z.infer<typeof SeriesSchema>;\nexport type ListSeriesResponse = z.infer<typeof ListSeriesResponseSchema>;\n","import { z } from 'zod';\n\nexport enum WalletType {\n EOA = 0,\n POLY_PROXY = 1,\n GNOSIS_SAFE = 2,\n DEPOSIT_WALLET = 3,\n}\n\nexport const WalletTypeSchema = z.object({\n type: z.enum(WalletType),\n typeName: z.enum(['EOA', 'POLY_PROXY', 'GNOSIS_SAFE', 'DEPOSIT_WALLET']),\n});\n"]}
|
package/dist/index.d.ts
CHANGED
|
@@ -33,6 +33,22 @@ declare enum TradeStatus {
|
|
|
33
33
|
Retrying = "TRADE_STATUS_RETRYING",
|
|
34
34
|
Failed = "TRADE_STATUS_FAILED"
|
|
35
35
|
}
|
|
36
|
+
/** Known venue scopes accepted by session-signer APIs. */
|
|
37
|
+
declare enum SessionSignerKnownScope {
|
|
38
|
+
/** All current and future venues. Cannot be combined with other scopes. */
|
|
39
|
+
ALL = "ALL",
|
|
40
|
+
/** Central limit order book trading. */
|
|
41
|
+
CLOB = "CLOB",
|
|
42
|
+
/** Combos request-for-quote trading. */
|
|
43
|
+
COMBOSRFQ = "COMBOSRFQ"
|
|
44
|
+
}
|
|
45
|
+
/**
|
|
46
|
+
* A session-signer scope. Known scopes are enumerated in
|
|
47
|
+
* {@link SessionSignerKnownScope}; newly introduced scopes flow through as
|
|
48
|
+
* plain strings before a bindings release enumerates them.
|
|
49
|
+
*/
|
|
50
|
+
type SessionSignerScope = SessionSignerKnownScope | (string & {});
|
|
51
|
+
declare const SessionSignerScopeSchema: z.ZodPipe<z.ZodString, z.ZodTransform<SessionSignerKnownScope | (string & {}), string>>;
|
|
36
52
|
type BestLineId = Tagged<string, 'BestLineId'>;
|
|
37
53
|
type BuilderCode = Tagged<HexString, 'BuilderCode'>;
|
|
38
54
|
type Uuid = Tagged<string, 'Uuid'>;
|
|
@@ -43,7 +59,9 @@ type ClobRewardId = Tagged<string, 'ClobRewardId'>;
|
|
|
43
59
|
type CommentId = Tagged<string, 'CommentId'>;
|
|
44
60
|
type ComboActivityId = Tagged<string, 'ComboActivityId'>;
|
|
45
61
|
type ComboConditionId = Tagged<HexString, 'ComboConditionId'>;
|
|
46
|
-
type
|
|
62
|
+
type ConditionId = Tagged<HexString, 'ConditionId'>;
|
|
63
|
+
/** @deprecated Use {@link ConditionId}. */
|
|
64
|
+
type CtfConditionId = ConditionId;
|
|
47
65
|
type CollectionId = Tagged<string, 'CollectionId'>;
|
|
48
66
|
type EventCreatorId = Tagged<string, 'EventCreatorId'>;
|
|
49
67
|
type EventExternalPartnerMappingId = Tagged<number, 'EventExternalPartnerMappingId'>;
|
|
@@ -83,7 +101,7 @@ declare function toChatId(value: string): ChatId;
|
|
|
83
101
|
declare function toClobRewardId(value: string): ClobRewardId;
|
|
84
102
|
declare function toCommentId(value: string): CommentId;
|
|
85
103
|
declare function toComboActivityId(value: string): ComboActivityId;
|
|
86
|
-
declare function
|
|
104
|
+
declare function toConditionId(value: string): ConditionId;
|
|
87
105
|
declare function toComboConditionId(value: string): ComboConditionId;
|
|
88
106
|
declare function toCollectionId(value: string): CollectionId;
|
|
89
107
|
declare function toEventCreatorId(value: string): EventCreatorId;
|
|
@@ -122,8 +140,8 @@ declare const ClobRewardIdSchema: z.ZodPipe<z.ZodString, z.ZodTransform<ClobRewa
|
|
|
122
140
|
declare const CommentIdSchema: z.ZodPipe<z.ZodString, z.ZodTransform<CommentId, string>>;
|
|
123
141
|
declare const ComboActivityIdSchema: z.ZodPipe<z.ZodString, z.ZodTransform<ComboActivityId, string>>;
|
|
124
142
|
declare const ComboConditionIdSchema: z.ZodPipe<z.ZodString, z.ZodTransform<ComboConditionId, string>>;
|
|
125
|
-
declare const
|
|
126
|
-
declare const
|
|
143
|
+
declare const ConditionIdSchema: z.ZodPipe<z.ZodString, z.ZodTransform<ConditionId, string>>;
|
|
144
|
+
declare const ConditionIdResponseSchema: z.ZodCustom<ConditionId, ConditionId>;
|
|
127
145
|
declare const EvmAddressSchema: z.ZodPipe<z.ZodString, z.ZodTransform<EvmAddress, string>>;
|
|
128
146
|
declare const EpochMillisecondsSchema: z.ZodPipe<z.ZodNumber, z.ZodTransform<EpochMilliseconds, number>>;
|
|
129
147
|
declare const EpochSecondsToMillisecondsSchema: z.ZodPipe<z.ZodNumber, z.ZodTransform<EpochMilliseconds, number>>;
|
|
@@ -183,4 +201,4 @@ declare function emptyStringToNull(value: unknown): unknown;
|
|
|
183
201
|
*/
|
|
184
202
|
declare const OptionalDecimalStringSchema: z.ZodPipe<z.ZodTransform<unknown, unknown>, z.ZodOptional<z.ZodNullable<z.ZodPipe<z.ZodString, z.ZodTransform<DecimalString, string>>>>>;
|
|
185
203
|
|
|
186
|
-
export { type ApiKey, ApiKeySchema, type BaseUnits, BaseUnitsSchema, type BestLineId, type BuilderCode, BuilderCodeSchema, type CategoryId, CategoryIdSchema, type ChatId, type ClobRewardId, ClobRewardIdSchema, type CollectionId, type ComboActivityId, ComboActivityIdSchema, type ComboConditionId, ComboConditionIdSchema, type CommentId, CommentIdSchema, CommentParentEntityType, CommentParentEntityTypeSchema, type
|
|
204
|
+
export { type ApiKey, ApiKeySchema, type BaseUnits, BaseUnitsSchema, type BestLineId, type BuilderCode, BuilderCodeSchema, type CategoryId, CategoryIdSchema, type ChatId, type ClobRewardId, ClobRewardIdSchema, type CollectionId, type ComboActivityId, ComboActivityIdSchema, type ComboConditionId, ComboConditionIdSchema, type CommentId, CommentIdSchema, CommentParentEntityType, CommentParentEntityTypeSchema, type ConditionId, ConditionIdResponseSchema, ConditionIdSchema, type CtfConditionId, DateLikeToIsoDateTimeStringSchema, type DecimalString, DecimalStringSchema, DecimalishSchema, E6BigIntStringToDecimalStringSchema, EpochLikeToIsoDateTimeStringSchema, type EpochMilliseconds, EpochMillisecondsSchema, EpochMillisecondsStringSchema, EpochMillisecondsToIsoDateTimeStringSchema, EpochSecondsToMillisecondsSchema, type EventCreatorId, type EventExternalPartnerMappingId, type EventId, EventIdSchema, EvmAddressSchema, ISOCalendarDateSchema, type ISOCalendarDateString, type ISODateString, ISODateStringSchema, type ImageOptimizationId, ImageOptimizationIdSchema, type InternalUserId, InternalUserIdSchema, type IsoCalendarDateString, IsoCalendarDateStringSchema, type IsoDateTimeString, IsoDateTimeStringSchema, type MarketId, MarketIdSchema, type MixedDateTimeString, MixedDateTimeStringSchema, type NotificationId, NotificationIdSchema, OptionalDateLikeToIsoDateTimeStringSchema, OptionalDecimalStringSchema, OptionalEpochLikeToIsoDateTimeStringSchema, OptionalEpochMillisecondsToIsoDateTimeStringSchema, type OrderId, OrderIdSchema, OrderSide, OrderSideSchema, OrderType, OrderTypeSchema, type PaginationCursor, PaginationCursorSchema, type PartnerId, type PositionId, PositionIdSchema, PositiveDecimalNumberSchema, type QuestionId, QuestionIdSchema, type ResolutionRequestId, ResolutionRequestIdSchema, type RfqId, RfqIdSchema, type RfqQuoteId, RfqQuoteIdSchema, type RfqRequestorPublicId, RfqRequestorPublicIdSchema, type SeriesId, SessionSignerKnownScope, type SessionSignerScope, SessionSignerScopeSchema, type SportId, type TagId, TagIdSchema, type TeamId, type TemplateId, type TickSizeValue, TickSizeValueSchema, type TokenId, TokenIdSchema, TradeStatus, TradeStatusSchema, type TransactionId, TransactionIdSchema, TxHashSchema, type Uuid, emptyStringToNull, toApiKey, toBaseUnits, toBestLineId, toBuilderCode, toCategoryId, toChatId, toClobRewardId, toCollectionId, toComboActivityId, toComboConditionId, toCommentId, toConditionId, toDecimalString, toEpochMilliseconds, toEventCreatorId, toEventExternalPartnerMappingId, toEventId, toImageOptimizationId, toInternalUserId, toIsoCalendarDateString, toIsoDateTimeString, toMarketId, toMixedDateTimeString, toNotificationId, toOrderId, toPaginationCursor, toPartnerId, toPositionId, toQuestionId, toResolutionRequestId, toRfqId, toRfqQuoteId, toRfqRequestorPublicId, toSeriesId, toSportId, toTagId, toTeamId, toTemplateId, toTokenId, toTransactionId, toUuid };
|
package/dist/index.js
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
export{
|
|
1
|
+
export{W as ApiKeySchema,Ra as BaseUnitsSchema,X as BuilderCodeSchema,V as CategoryIdSchema,Y as ClobRewardIdSchema,_ as ComboActivityIdSchema,$ as ComboConditionIdSchema,Z as CommentIdSchema,a as CommentParentEntityType,xa as CommentParentEntityTypeSchema,ba as ConditionIdResponseSchema,aa as ConditionIdSchema,ga as DateLikeToIsoDateTimeStringSchema,Na as DecimalStringSchema,Pa as DecimalishSchema,Oa as E6BigIntStringToDecimalStringSchema,ha as EpochLikeToIsoDateTimeStringSchema,da as EpochMillisecondsSchema,fa as EpochMillisecondsStringSchema,ka as EpochMillisecondsToIsoDateTimeStringSchema,ea as EpochSecondsToMillisecondsSchema,ma as EventIdSchema,ca as EvmAddressSchema,sa as ISOCalendarDateSchema,ra as ISODateStringSchema,ta as ImageOptimizationIdSchema,ua as InternalUserIdSchema,pa as IsoCalendarDateStringSchema,oa as IsoDateTimeStringSchema,va as MarketIdSchema,qa as MixedDateTimeStringSchema,wa as NotificationIdSchema,ia as OptionalDateLikeToIsoDateTimeStringSchema,Ta as OptionalDecimalStringSchema,ja as OptionalEpochLikeToIsoDateTimeStringSchema,la as OptionalEpochMillisecondsToIsoDateTimeStringSchema,ya as OrderIdSchema,b as OrderSide,za as OrderSideSchema,c as OrderType,Aa as OrderTypeSchema,Ca as PaginationCursorSchema,Da as PositionIdSchema,Qa as PositiveDecimalNumberSchema,Ea as QuestionIdSchema,Fa as ResolutionRequestIdSchema,Ga as RfqIdSchema,Ha as RfqQuoteIdSchema,Ia as RfqRequestorPublicIdSchema,e as SessionSignerKnownScope,f as SessionSignerScopeSchema,Ja as TagIdSchema,na as TickSizeValueSchema,Ka as TokenIdSchema,d as TradeStatus,Ba as TradeStatusSchema,La as TransactionIdSchema,Ma as TxHashSchema,Sa as emptyStringToNull,j as toApiKey,U as toBaseUnits,g as toBestLineId,h as toBuilderCode,k as toCategoryId,l as toChatId,m as toClobRewardId,r as toCollectionId,o as toComboActivityId,q as toComboConditionId,n as toCommentId,p as toConditionId,T as toDecimalString,u as toEpochMilliseconds,s as toEventCreatorId,t as toEventExternalPartnerMappingId,v as toEventId,w as toImageOptimizationId,x as toInternalUserId,y as toIsoCalendarDateString,z as toIsoDateTimeString,B as toMarketId,A as toMixedDateTimeString,C as toNotificationId,D as toOrderId,F as toPaginationCursor,E as toPartnerId,G as toPositionId,H as toQuestionId,I as toResolutionRequestId,J as toRfqId,K as toRfqQuoteId,L as toRfqRequestorPublicId,M as toSeriesId,N as toSportId,O as toTagId,P as toTeamId,Q as toTemplateId,S as toTokenId,R as toTransactionId,i as toUuid}from'./chunk-WVVJ3WNL.js';//# sourceMappingURL=index.js.map
|
|
2
2
|
//# sourceMappingURL=index.js.map
|
|
@@ -237,7 +237,7 @@ declare const PerpsDepositStatusSchema: z.ZodEnum<typeof PerpsDepositStatus>;
|
|
|
237
237
|
/**
|
|
238
238
|
* @experimental This API may change in a breaking way in any release, including patch releases.
|
|
239
239
|
*/
|
|
240
|
-
declare const PerpsWithdrawalStatusSchema: z.ZodPipe<z.ZodString, z.ZodTransform<
|
|
240
|
+
declare const PerpsWithdrawalStatusSchema: z.ZodPipe<z.ZodString, z.ZodTransform<(string & {}) | PerpsKnownWithdrawalStatus, string>>;
|
|
241
241
|
/**
|
|
242
242
|
* @experimental This API may change in a breaking way in any release, including patch releases.
|
|
243
243
|
*/
|
package/dist/perps/index.d.ts
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import * as _polymarket_types from '@polymarket/types';
|
|
2
|
-
import { P as PerpsInstrumentId, a as PerpsEntityId, b as PerpsFundingPaymentId, c as PerpsDepositStatus, d as PerpsWithdrawalId, e as PerpsKnownWithdrawalStatus, f as PerpsInternalTransferId, g as PerpsInternalTransferDirection, h as PerpsInstrumentType, i as PerpsInstrumentCategory, j as PerpsTradeId, k as PerpsSide } from '../orders-
|
|
3
|
-
export { F as FetchPerpsOpenOrdersResponseSchema, l as FetchPerpsOrdersResponseSchema, m as FetchPerpsUnreadNotificationsCountResponseSchema, L as ListPerpsFillsResponseSchema, n as ListPerpsNotificationsResponseSchema, M as MarkPerpsNotificationsReadResponseSchema, o as PerpsAccountFill, p as PerpsAccountFillSchema, q as PerpsAccountFillUpdateSchema, r as PerpsAssetSchema, s as PerpsCancelAllOrdersResponse, t as PerpsCancelAllOrdersResponseSchema, u as PerpsCancelOrderResult, v as PerpsCancelOrderResultSchema, w as PerpsClientOrderId, x as PerpsClientOrderIdSchema, y as PerpsCommandAck, z as PerpsCommandAckSchema, A as PerpsCommandStatusSchema, B as PerpsCredentials, C as PerpsDataResponseSchema, D as PerpsDecimal, E as PerpsDecimalInput, G as PerpsDecimalInputSchema, H as PerpsDepositAmount, I as PerpsDepositStatusSchema, J as PerpsEntityIdSchema, K as PerpsFundingInterval, N as PerpsFundingIntervalSchema, O as PerpsFundingPaymentIdSchema, Q as PerpsInstrumentCategorySchema, R as PerpsInstrumentIdSchema, S as PerpsInstrumentTypeSchema, T as PerpsInternalTransferDirectionSchema, U as PerpsInternalTransferIdSchema, V as PerpsKlineInterval, W as PerpsKlineIntervalSchema, X as PerpsLimitOrderCanceledNotification, Y as PerpsLimitOrderCanceledNotificationSchema, Z as PerpsLiquidationWarningNotification, _ as PerpsLiquidationWarningNotificationSchema, $ as PerpsMarginType, a0 as PerpsMarginTypeSchema, a1 as PerpsNotification, a2 as PerpsNotificationEntry, a3 as PerpsNotificationEntrySchema, a4 as PerpsNotificationId, a5 as PerpsNotificationIdSchema, a6 as PerpsNotificationOrderType, a7 as PerpsNotificationOrderTypeSchema, a8 as PerpsNotificationSchema, a9 as PerpsNotificationType, aa as PerpsNotificationTypeSchema, ab as PerpsOrder, ac as PerpsOrderId, ad as PerpsOrderIdSchema, ae as PerpsOrderSchema, af as PerpsOrderStatus, ag as PerpsOrderStatusSchema, ah as PerpsOrderUpdateSchema, ai as PerpsPnlInterval, aj as PerpsPnlIntervalSchema, ak as PerpsPositionChangeNotification, al as PerpsPositionChangeNotificationSchema, am as PerpsPositionClosedNotification, an as PerpsPositionClosedNotificationSchema, ao as PerpsPositionLiquidatedNotification, ap as PerpsPositionLiquidatedNotificationSchema, aq as PerpsPostOrderAck, ar as PerpsPostOrderAckSchema, as as PerpsSideSchema, at as PerpsSortDirection, au as PerpsSortDirectionSchema, av as PerpsTimeInForce, aw as PerpsTimeInForceSchema, ax as PerpsTpSlKind, ay as PerpsTpSlKindSchema, az as PerpsTpSlOrderFields, aA as PerpsTpSlOrderFieldsSchema, aB as PerpsTpSlScope, aC as PerpsTpSlScopeSchema, aD as PerpsTradeIdSchema, aE as PerpsTxHash, aF as PerpsTxHashSchema, aG as PerpsUpdateLeverageResult, aH as PerpsUpdateLeverageResultSchema, aI as PerpsWithdrawalAmount, aJ as PerpsWithdrawalIdSchema, aK as PerpsWithdrawalStatus, aL as PerpsWithdrawalStatusSchema, aM as decimalString, aN as perpsBaseUnits, aO as perpsDecimal } from '../orders-
|
|
2
|
+
import { P as PerpsInstrumentId, a as PerpsEntityId, b as PerpsFundingPaymentId, c as PerpsDepositStatus, d as PerpsWithdrawalId, e as PerpsKnownWithdrawalStatus, f as PerpsInternalTransferId, g as PerpsInternalTransferDirection, h as PerpsInstrumentType, i as PerpsInstrumentCategory, j as PerpsTradeId, k as PerpsSide } from '../orders-CAELACaR.js';
|
|
3
|
+
export { F as FetchPerpsOpenOrdersResponseSchema, l as FetchPerpsOrdersResponseSchema, m as FetchPerpsUnreadNotificationsCountResponseSchema, L as ListPerpsFillsResponseSchema, n as ListPerpsNotificationsResponseSchema, M as MarkPerpsNotificationsReadResponseSchema, o as PerpsAccountFill, p as PerpsAccountFillSchema, q as PerpsAccountFillUpdateSchema, r as PerpsAssetSchema, s as PerpsCancelAllOrdersResponse, t as PerpsCancelAllOrdersResponseSchema, u as PerpsCancelOrderResult, v as PerpsCancelOrderResultSchema, w as PerpsClientOrderId, x as PerpsClientOrderIdSchema, y as PerpsCommandAck, z as PerpsCommandAckSchema, A as PerpsCommandStatusSchema, B as PerpsCredentials, C as PerpsDataResponseSchema, D as PerpsDecimal, E as PerpsDecimalInput, G as PerpsDecimalInputSchema, H as PerpsDepositAmount, I as PerpsDepositStatusSchema, J as PerpsEntityIdSchema, K as PerpsFundingInterval, N as PerpsFundingIntervalSchema, O as PerpsFundingPaymentIdSchema, Q as PerpsInstrumentCategorySchema, R as PerpsInstrumentIdSchema, S as PerpsInstrumentTypeSchema, T as PerpsInternalTransferDirectionSchema, U as PerpsInternalTransferIdSchema, V as PerpsKlineInterval, W as PerpsKlineIntervalSchema, X as PerpsLimitOrderCanceledNotification, Y as PerpsLimitOrderCanceledNotificationSchema, Z as PerpsLiquidationWarningNotification, _ as PerpsLiquidationWarningNotificationSchema, $ as PerpsMarginType, a0 as PerpsMarginTypeSchema, a1 as PerpsNotification, a2 as PerpsNotificationEntry, a3 as PerpsNotificationEntrySchema, a4 as PerpsNotificationId, a5 as PerpsNotificationIdSchema, a6 as PerpsNotificationOrderType, a7 as PerpsNotificationOrderTypeSchema, a8 as PerpsNotificationSchema, a9 as PerpsNotificationType, aa as PerpsNotificationTypeSchema, ab as PerpsOrder, ac as PerpsOrderId, ad as PerpsOrderIdSchema, ae as PerpsOrderSchema, af as PerpsOrderStatus, ag as PerpsOrderStatusSchema, ah as PerpsOrderUpdateSchema, ai as PerpsPnlInterval, aj as PerpsPnlIntervalSchema, ak as PerpsPositionChangeNotification, al as PerpsPositionChangeNotificationSchema, am as PerpsPositionClosedNotification, an as PerpsPositionClosedNotificationSchema, ao as PerpsPositionLiquidatedNotification, ap as PerpsPositionLiquidatedNotificationSchema, aq as PerpsPostOrderAck, ar as PerpsPostOrderAckSchema, as as PerpsSideSchema, at as PerpsSortDirection, au as PerpsSortDirectionSchema, av as PerpsTimeInForce, aw as PerpsTimeInForceSchema, ax as PerpsTpSlKind, ay as PerpsTpSlKindSchema, az as PerpsTpSlOrderFields, aA as PerpsTpSlOrderFieldsSchema, aB as PerpsTpSlScope, aC as PerpsTpSlScopeSchema, aD as PerpsTradeIdSchema, aE as PerpsTxHash, aF as PerpsTxHashSchema, aG as PerpsUpdateLeverageResult, aH as PerpsUpdateLeverageResultSchema, aI as PerpsWithdrawalAmount, aJ as PerpsWithdrawalIdSchema, aK as PerpsWithdrawalStatus, aL as PerpsWithdrawalStatusSchema, aM as decimalString, aN as perpsBaseUnits, aO as perpsDecimal } from '../orders-CAELACaR.js';
|
|
4
4
|
import { DecimalString, EpochMilliseconds, BaseUnits } from '../index.js';
|
|
5
5
|
import { z } from 'zod';
|
|
6
6
|
|
|
@@ -793,7 +793,7 @@ declare const PerpsWithdrawalSchema: z.ZodPipe<z.ZodObject<{
|
|
|
793
793
|
asset: z.ZodString;
|
|
794
794
|
amount: z.ZodPipe<z.ZodString, z.ZodTransform<BaseUnits, string>>;
|
|
795
795
|
fee: z.ZodPipe<z.ZodString, z.ZodTransform<DecimalString, string>>;
|
|
796
|
-
status: z.ZodPipe<z.ZodString, z.ZodTransform<
|
|
796
|
+
status: z.ZodPipe<z.ZodString, z.ZodTransform<(string & {}) | PerpsKnownWithdrawalStatus, string>>;
|
|
797
797
|
to: z.ZodPipe<z.ZodString, z.ZodTransform<_polymarket_types.EvmAddress, string>>;
|
|
798
798
|
hash: z.ZodPipe<z.ZodTransform<unknown, unknown>, z.ZodOptional<z.ZodPipe<z.ZodString, z.ZodTransform<_polymarket_types.TxHash, string>>>>;
|
|
799
799
|
confirmations: z.ZodNumber;
|
|
@@ -805,7 +805,7 @@ declare const PerpsWithdrawalSchema: z.ZodPipe<z.ZodObject<{
|
|
|
805
805
|
asset: string;
|
|
806
806
|
amount: BaseUnits;
|
|
807
807
|
fee: DecimalString;
|
|
808
|
-
status:
|
|
808
|
+
status: (string & {}) | PerpsKnownWithdrawalStatus;
|
|
809
809
|
to: _polymarket_types.EvmAddress;
|
|
810
810
|
hash: _polymarket_types.TxHash | undefined;
|
|
811
811
|
confirmations: number;
|
|
@@ -817,7 +817,7 @@ declare const PerpsWithdrawalSchema: z.ZodPipe<z.ZodObject<{
|
|
|
817
817
|
asset: string;
|
|
818
818
|
amount: BaseUnits;
|
|
819
819
|
fee: DecimalString;
|
|
820
|
-
status:
|
|
820
|
+
status: (string & {}) | PerpsKnownWithdrawalStatus;
|
|
821
821
|
to: _polymarket_types.EvmAddress;
|
|
822
822
|
confirmations: number;
|
|
823
823
|
required_confirmations: number;
|
|
@@ -838,7 +838,7 @@ declare const ListPerpsWithdrawalsResponseSchema: z.ZodObject<{
|
|
|
838
838
|
asset: z.ZodString;
|
|
839
839
|
amount: z.ZodPipe<z.ZodString, z.ZodTransform<BaseUnits, string>>;
|
|
840
840
|
fee: z.ZodPipe<z.ZodString, z.ZodTransform<DecimalString, string>>;
|
|
841
|
-
status: z.ZodPipe<z.ZodString, z.ZodTransform<
|
|
841
|
+
status: z.ZodPipe<z.ZodString, z.ZodTransform<(string & {}) | PerpsKnownWithdrawalStatus, string>>;
|
|
842
842
|
to: z.ZodPipe<z.ZodString, z.ZodTransform<_polymarket_types.EvmAddress, string>>;
|
|
843
843
|
hash: z.ZodPipe<z.ZodTransform<unknown, unknown>, z.ZodOptional<z.ZodPipe<z.ZodString, z.ZodTransform<_polymarket_types.TxHash, string>>>>;
|
|
844
844
|
confirmations: z.ZodNumber;
|
|
@@ -850,7 +850,7 @@ declare const ListPerpsWithdrawalsResponseSchema: z.ZodObject<{
|
|
|
850
850
|
asset: string;
|
|
851
851
|
amount: BaseUnits;
|
|
852
852
|
fee: DecimalString;
|
|
853
|
-
status:
|
|
853
|
+
status: (string & {}) | PerpsKnownWithdrawalStatus;
|
|
854
854
|
to: _polymarket_types.EvmAddress;
|
|
855
855
|
hash: _polymarket_types.TxHash | undefined;
|
|
856
856
|
confirmations: number;
|
|
@@ -862,7 +862,7 @@ declare const ListPerpsWithdrawalsResponseSchema: z.ZodObject<{
|
|
|
862
862
|
asset: string;
|
|
863
863
|
amount: BaseUnits;
|
|
864
864
|
fee: DecimalString;
|
|
865
|
-
status:
|
|
865
|
+
status: (string & {}) | PerpsKnownWithdrawalStatus;
|
|
866
866
|
to: _polymarket_types.EvmAddress;
|
|
867
867
|
confirmations: number;
|
|
868
868
|
required_confirmations: number;
|
|
@@ -899,7 +899,7 @@ declare const PerpsWithdrawalUpdateSchema: z.ZodPipe<z.ZodObject<{
|
|
|
899
899
|
asset: z.ZodString;
|
|
900
900
|
amount: z.ZodPipe<z.ZodString, z.ZodTransform<BaseUnits, string>>;
|
|
901
901
|
fee: z.ZodPipe<z.ZodString, z.ZodTransform<DecimalString, string>>;
|
|
902
|
-
status: z.ZodPipe<z.ZodString, z.ZodTransform<
|
|
902
|
+
status: z.ZodPipe<z.ZodString, z.ZodTransform<(string & {}) | PerpsKnownWithdrawalStatus, string>>;
|
|
903
903
|
to: z.ZodPipe<z.ZodString, z.ZodTransform<_polymarket_types.EvmAddress, string>>;
|
|
904
904
|
hash: z.ZodPipe<z.ZodTransform<unknown, unknown>, z.ZodOptional<z.ZodPipe<z.ZodString, z.ZodTransform<_polymarket_types.TxHash, string>>>>;
|
|
905
905
|
}, z.core.$strip>, z.ZodTransform<{
|
|
@@ -907,7 +907,7 @@ declare const PerpsWithdrawalUpdateSchema: z.ZodPipe<z.ZodObject<{
|
|
|
907
907
|
asset: string;
|
|
908
908
|
amount: BaseUnits;
|
|
909
909
|
fee: DecimalString;
|
|
910
|
-
status:
|
|
910
|
+
status: (string & {}) | PerpsKnownWithdrawalStatus;
|
|
911
911
|
to: _polymarket_types.EvmAddress;
|
|
912
912
|
hash: _polymarket_types.TxHash | undefined;
|
|
913
913
|
}, {
|
|
@@ -915,7 +915,7 @@ declare const PerpsWithdrawalUpdateSchema: z.ZodPipe<z.ZodObject<{
|
|
|
915
915
|
asset: string;
|
|
916
916
|
amount: BaseUnits;
|
|
917
917
|
fee: DecimalString;
|
|
918
|
-
status:
|
|
918
|
+
status: (string & {}) | PerpsKnownWithdrawalStatus;
|
|
919
919
|
to: _polymarket_types.EvmAddress;
|
|
920
920
|
hash?: _polymarket_types.TxHash | undefined;
|
|
921
921
|
}>>;
|
package/dist/perps/index.js
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
export{$ as FetchPerpsAccountConfigResponseSchema,S as FetchPerpsAccountStatsResponseSchema,Q as FetchPerpsBalancesResponseSchema,Oa as FetchPerpsCandlesResponseSchema,Na as FetchPerpsFeesResponseSchema,Ja as FetchPerpsFundingHistoryResponseSchema,sa as FetchPerpsInstrumentsResponseSchema,ob as FetchPerpsOpenOrdersResponseSchema,nb as FetchPerpsOrdersResponseSchema,W as FetchPerpsPortfolioResponseSchema,ya as FetchPerpsStatisticsResponseSchema,ua as FetchPerpsTickersResponseSchema,Ha as FetchPerpsTradesResponseSchema,bb as FetchPerpsUnreadNotificationsCountResponseSchema,ja as ListPerpsDepositsResponseSchema,ba as ListPerpsEquityHistoryResponseSchema,rb as ListPerpsFillsResponseSchema,Y as ListPerpsFundingPaymentsResponseSchema,ab as ListPerpsNotificationsResponseSchema,da as ListPerpsPnlHistoryResponseSchema,ma as ListPerpsWithdrawalsResponseSchema,cb as MarkPerpsNotificationsReadResponseSchema,_ as PerpsAccountConfigSchema,qb as PerpsAccountFillSchema,sb as PerpsAccountFillUpdateSchema,Z as PerpsAccountFundingPaymentEntrySchema,X as PerpsAccountFundingPaymentSchema,R as PerpsAccountStatsSchema,J as PerpsAssetSchema,P as PerpsBalanceSchema,Da as PerpsBboSchema,Ea as PerpsBboUpdateSchema,Aa as PerpsBookLevelSchema,Ba as PerpsBookSchema,Ca as PerpsBookUpdateSchema,kb as PerpsCancelAllOrdersResponseSchema,jb as PerpsCancelOrderResultSchema,wa as PerpsCandleSchema,c as PerpsClientOrderIdSchema,hb as PerpsCommandAckSchema,gb as PerpsCommandStatusSchema,ga as PerpsCreateProxyResponseSchema,fa as PerpsCredentialsResponseSchema,L as PerpsDataResponseSchema,k as PerpsDecimalInputSchema,ha as PerpsDeleteProxyResponseSchema,ia as PerpsDepositSchema,r as PerpsDepositStatus,D as PerpsDepositStatusSchema,ka as PerpsDepositUpdateSchema,i as PerpsEntityIdSchema,aa as PerpsEquityPointSchema,La as PerpsFeeScheduleEntrySchema,Ka as PerpsFeeTierSchema,Ma as PerpsFeesInfoSchema,j as PerpsFundingIntervalSchema,f as PerpsFundingPaymentIdSchema,Ia as PerpsFundingRateSchema,m as PerpsInstrumentCategory,y as PerpsInstrumentCategorySchema,a as PerpsInstrumentIdSchema,ra as PerpsInstrumentSchema,l as PerpsInstrumentType,x as PerpsInstrumentTypeSchema,t as PerpsInternalTransferDirection,F as PerpsInternalTransferDirectionSchema,h as PerpsInternalTransferIdSchema,pa as PerpsInternalTransferSchema,u as PerpsKlineInterval,G as PerpsKlineIntervalSchema,s as PerpsKnownWithdrawalStatus,Xa as PerpsLimitOrderCanceledNotificationSchema,Ya as PerpsLiquidationWarningNotificationSchema,U as PerpsMarginSummarySchema,Ta as PerpsMarginType,Ua as PerpsMarginTypeSchema,$a as PerpsNotificationEntrySchema,d as PerpsNotificationIdSchema,Ra as PerpsNotificationOrderType,Sa as PerpsNotificationOrderTypeSchema,_a as PerpsNotificationSchema,Pa as PerpsNotificationType,Qa as PerpsNotificationTypeSchema,b as PerpsOrderIdSchema,mb as PerpsOrderSchema,db as PerpsOrderStatus,fb as PerpsOrderStatusSchema,pb as PerpsOrderUpdateSchema,v as PerpsPnlInterval,H as PerpsPnlIntervalSchema,ca as PerpsPnlPointSchema,T as PerpsPortfolioPositionSchema,V as PerpsPortfolioSchema,Va as PerpsPositionChangeNotificationSchema,Wa as PerpsPositionClosedNotificationSchema,Za as PerpsPositionLiquidatedNotificationSchema,ib as PerpsPostOrderAckSchema,ea as PerpsProxyKeySchema,Fa as PerpsPublicTradeSchema,Ga as PerpsPublicTradeUpdateSchema,qa as PerpsRiskTierSchema,n as PerpsSide,z as PerpsSideSchema,w as PerpsSortDirection,I as PerpsSortDirectionSchema,xa as PerpsStatisticSchema,za as PerpsStatisticUpdateSchema,va as PerpsTickerEntrySchema,ta as PerpsTickerSchema,o as PerpsTimeInForce,A as PerpsTimeInForceSchema,p as PerpsTpSlKind,B as PerpsTpSlKindSchema,eb as PerpsTpSlOrderFieldsSchema,q as PerpsTpSlScope,C as PerpsTpSlScopeSchema,e as PerpsTradeIdSchema,K as PerpsTxHashSchema,lb as PerpsUpdateLeverageResultSchema,na as PerpsWithdrawResponseSchema,g as PerpsWithdrawalIdSchema,la as PerpsWithdrawalSchema,E as PerpsWithdrawalStatusSchema,oa as PerpsWithdrawalUpdateSchema,O as decimalString,N as perpsBaseUnits,M as perpsDecimal}from'../chunk-
|
|
1
|
+
export{$ as FetchPerpsAccountConfigResponseSchema,S as FetchPerpsAccountStatsResponseSchema,Q as FetchPerpsBalancesResponseSchema,Oa as FetchPerpsCandlesResponseSchema,Na as FetchPerpsFeesResponseSchema,Ja as FetchPerpsFundingHistoryResponseSchema,sa as FetchPerpsInstrumentsResponseSchema,ob as FetchPerpsOpenOrdersResponseSchema,nb as FetchPerpsOrdersResponseSchema,W as FetchPerpsPortfolioResponseSchema,ya as FetchPerpsStatisticsResponseSchema,ua as FetchPerpsTickersResponseSchema,Ha as FetchPerpsTradesResponseSchema,bb as FetchPerpsUnreadNotificationsCountResponseSchema,ja as ListPerpsDepositsResponseSchema,ba as ListPerpsEquityHistoryResponseSchema,rb as ListPerpsFillsResponseSchema,Y as ListPerpsFundingPaymentsResponseSchema,ab as ListPerpsNotificationsResponseSchema,da as ListPerpsPnlHistoryResponseSchema,ma as ListPerpsWithdrawalsResponseSchema,cb as MarkPerpsNotificationsReadResponseSchema,_ as PerpsAccountConfigSchema,qb as PerpsAccountFillSchema,sb as PerpsAccountFillUpdateSchema,Z as PerpsAccountFundingPaymentEntrySchema,X as PerpsAccountFundingPaymentSchema,R as PerpsAccountStatsSchema,J as PerpsAssetSchema,P as PerpsBalanceSchema,Da as PerpsBboSchema,Ea as PerpsBboUpdateSchema,Aa as PerpsBookLevelSchema,Ba as PerpsBookSchema,Ca as PerpsBookUpdateSchema,kb as PerpsCancelAllOrdersResponseSchema,jb as PerpsCancelOrderResultSchema,wa as PerpsCandleSchema,c as PerpsClientOrderIdSchema,hb as PerpsCommandAckSchema,gb as PerpsCommandStatusSchema,ga as PerpsCreateProxyResponseSchema,fa as PerpsCredentialsResponseSchema,L as PerpsDataResponseSchema,k as PerpsDecimalInputSchema,ha as PerpsDeleteProxyResponseSchema,ia as PerpsDepositSchema,r as PerpsDepositStatus,D as PerpsDepositStatusSchema,ka as PerpsDepositUpdateSchema,i as PerpsEntityIdSchema,aa as PerpsEquityPointSchema,La as PerpsFeeScheduleEntrySchema,Ka as PerpsFeeTierSchema,Ma as PerpsFeesInfoSchema,j as PerpsFundingIntervalSchema,f as PerpsFundingPaymentIdSchema,Ia as PerpsFundingRateSchema,m as PerpsInstrumentCategory,y as PerpsInstrumentCategorySchema,a as PerpsInstrumentIdSchema,ra as PerpsInstrumentSchema,l as PerpsInstrumentType,x as PerpsInstrumentTypeSchema,t as PerpsInternalTransferDirection,F as PerpsInternalTransferDirectionSchema,h as PerpsInternalTransferIdSchema,pa as PerpsInternalTransferSchema,u as PerpsKlineInterval,G as PerpsKlineIntervalSchema,s as PerpsKnownWithdrawalStatus,Xa as PerpsLimitOrderCanceledNotificationSchema,Ya as PerpsLiquidationWarningNotificationSchema,U as PerpsMarginSummarySchema,Ta as PerpsMarginType,Ua as PerpsMarginTypeSchema,$a as PerpsNotificationEntrySchema,d as PerpsNotificationIdSchema,Ra as PerpsNotificationOrderType,Sa as PerpsNotificationOrderTypeSchema,_a as PerpsNotificationSchema,Pa as PerpsNotificationType,Qa as PerpsNotificationTypeSchema,b as PerpsOrderIdSchema,mb as PerpsOrderSchema,db as PerpsOrderStatus,fb as PerpsOrderStatusSchema,pb as PerpsOrderUpdateSchema,v as PerpsPnlInterval,H as PerpsPnlIntervalSchema,ca as PerpsPnlPointSchema,T as PerpsPortfolioPositionSchema,V as PerpsPortfolioSchema,Va as PerpsPositionChangeNotificationSchema,Wa as PerpsPositionClosedNotificationSchema,Za as PerpsPositionLiquidatedNotificationSchema,ib as PerpsPostOrderAckSchema,ea as PerpsProxyKeySchema,Fa as PerpsPublicTradeSchema,Ga as PerpsPublicTradeUpdateSchema,qa as PerpsRiskTierSchema,n as PerpsSide,z as PerpsSideSchema,w as PerpsSortDirection,I as PerpsSortDirectionSchema,xa as PerpsStatisticSchema,za as PerpsStatisticUpdateSchema,va as PerpsTickerEntrySchema,ta as PerpsTickerSchema,o as PerpsTimeInForce,A as PerpsTimeInForceSchema,p as PerpsTpSlKind,B as PerpsTpSlKindSchema,eb as PerpsTpSlOrderFieldsSchema,q as PerpsTpSlScope,C as PerpsTpSlScopeSchema,e as PerpsTradeIdSchema,K as PerpsTxHashSchema,lb as PerpsUpdateLeverageResultSchema,na as PerpsWithdrawResponseSchema,g as PerpsWithdrawalIdSchema,la as PerpsWithdrawalSchema,E as PerpsWithdrawalStatusSchema,oa as PerpsWithdrawalUpdateSchema,O as decimalString,N as perpsBaseUnits,M as perpsDecimal}from'../chunk-BAQM5QBB.js';import {u,da}from'../chunk-WVVJ3WNL.js';import {z}from'zod';var n=z.number().int().transform(e=>e===0?null:u(e)),jt=z.object({status:z.literal("ok"),deadline:n}),i=z.object({deadline:n,triggered:z.number().int().nonnegative(),daily_limit:z.number().int().nonnegative(),next_reset:da}).transform(e=>({deadline:e.deadline,triggered:e.triggered,dailyLimit:e.daily_limit,nextReset:e.next_reset})),Et=i;export{Et as FetchPerpsAutoCancelStatusResponseSchema,jt as PerpsAutoCancelResponseSchema,i as PerpsAutoCancelStatusSchema};//# sourceMappingURL=index.js.map
|
|
2
2
|
//# sourceMappingURL=index.js.map
|
package/dist/relayer/index.d.ts
CHANGED
|
@@ -1,6 +1,47 @@
|
|
|
1
|
+
import { z } from 'zod';
|
|
1
2
|
import { TransactionId } from '../index.js';
|
|
2
3
|
import * as _polymarket_types from '@polymarket/types';
|
|
3
|
-
import {
|
|
4
|
+
import { TxHash } from '@polymarket/types';
|
|
5
|
+
|
|
6
|
+
declare enum RelayerAuthorizeSessionSignerStatus {
|
|
7
|
+
SUBMITTED = "SUBMITTED",
|
|
8
|
+
REGISTRY_PENDING = "REGISTRY_PENDING",
|
|
9
|
+
REGISTERED = "REGISTERED",
|
|
10
|
+
FAILED = "FAILED",
|
|
11
|
+
SUPERSEDED = "SUPERSEDED",
|
|
12
|
+
REPAIR_REQUIRED = "REPAIR_REQUIRED"
|
|
13
|
+
}
|
|
14
|
+
type RelayerAuthorizeSessionSignerResponse = {
|
|
15
|
+
/** Lifecycle status of the authorization operation. */
|
|
16
|
+
status: RelayerAuthorizeSessionSignerStatus;
|
|
17
|
+
/** Submitted transaction hash when it is already available. */
|
|
18
|
+
transactionHash: TxHash | null;
|
|
19
|
+
/** Identifier used to poll the submitted transaction. */
|
|
20
|
+
transactionId: TransactionId;
|
|
21
|
+
};
|
|
22
|
+
declare const RelayerAuthorizeSessionSignerResponseSchema: z.ZodObject<{
|
|
23
|
+
status: z.ZodEnum<typeof RelayerAuthorizeSessionSignerStatus>;
|
|
24
|
+
transactionHash: z.ZodPipe<z.ZodOptional<z.ZodNullable<z.ZodPipe<z.ZodString, z.ZodTransform<TxHash, string>>>>, z.ZodTransform<TxHash | null, TxHash | null | undefined>>;
|
|
25
|
+
transactionId: z.ZodPipe<z.ZodString, z.ZodTransform<TransactionId, string>>;
|
|
26
|
+
}, z.core.$strip>;
|
|
27
|
+
declare enum RelayerRevokeSessionSignerStatus {
|
|
28
|
+
PENDING = "PENDING",
|
|
29
|
+
FENCED = "FENCED",
|
|
30
|
+
SWEPT = "SWEPT",
|
|
31
|
+
CHAIN_SUBMITTED = "CHAIN_SUBMITTED",
|
|
32
|
+
CONFIRMED = "CONFIRMED",
|
|
33
|
+
FAILED = "FAILED"
|
|
34
|
+
}
|
|
35
|
+
type RelayerRevokeSessionSignerResponse = {
|
|
36
|
+
/** Lifecycle status of the revocation operation. */
|
|
37
|
+
status: RelayerRevokeSessionSignerStatus;
|
|
38
|
+
/** Identifier used to poll the submitted transaction. */
|
|
39
|
+
transactionId: TransactionId;
|
|
40
|
+
};
|
|
41
|
+
declare const RelayerRevokeSessionSignerResponseSchema: z.ZodObject<{
|
|
42
|
+
status: z.ZodEnum<typeof RelayerRevokeSessionSignerStatus>;
|
|
43
|
+
transactionId: z.ZodPipe<z.ZodString, z.ZodTransform<TransactionId, string>>;
|
|
44
|
+
}, z.core.$strip>;
|
|
4
45
|
|
|
5
46
|
declare enum RelayerTransactionType {
|
|
6
47
|
SAFE = "SAFE",
|
|
@@ -183,4 +224,4 @@ declare const GaslessTransactionSchema: z.ZodPipe<z.ZodObject<{
|
|
|
183
224
|
}>>;
|
|
184
225
|
type GaslessTransaction = z.output<typeof GaslessTransactionSchema>;
|
|
185
226
|
|
|
186
|
-
export { type DepositWalletCall, DepositWalletCallSchema, type DepositWalletParams, DepositWalletParamsSchema, type GaslessTransaction, GaslessTransactionSchema, type RelayerDeployedResponse, RelayerDeployedResponseSchema, type RelayerDepositWalletCreateRequest, RelayerDepositWalletCreateRequestSchema, type RelayerDepositWalletExecuteRequest, RelayerDepositWalletExecuteRequestSchema, type RelayerExecuteParams, RelayerExecuteParamsSchema, type RelayerExecuteRequest, RelayerExecuteRequestSchema, type RelayerExecuteResponse, RelayerExecuteResponseSchema, type RelayerLegacyExecuteRequest, RelayerLegacyExecuteRequestSchema, RelayerTransactionState, RelayerTransactionType, RelayerTransactionTypeSchema };
|
|
227
|
+
export { type DepositWalletCall, DepositWalletCallSchema, type DepositWalletParams, DepositWalletParamsSchema, type GaslessTransaction, GaslessTransactionSchema, type RelayerAuthorizeSessionSignerResponse, RelayerAuthorizeSessionSignerResponseSchema, RelayerAuthorizeSessionSignerStatus, type RelayerDeployedResponse, RelayerDeployedResponseSchema, type RelayerDepositWalletCreateRequest, RelayerDepositWalletCreateRequestSchema, type RelayerDepositWalletExecuteRequest, RelayerDepositWalletExecuteRequestSchema, type RelayerExecuteParams, RelayerExecuteParamsSchema, type RelayerExecuteRequest, RelayerExecuteRequestSchema, type RelayerExecuteResponse, RelayerExecuteResponseSchema, type RelayerLegacyExecuteRequest, RelayerLegacyExecuteRequestSchema, type RelayerRevokeSessionSignerResponse, RelayerRevokeSessionSignerResponseSchema, RelayerRevokeSessionSignerStatus, RelayerTransactionState, RelayerTransactionType, RelayerTransactionTypeSchema };
|
package/dist/relayer/index.js
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import {La,Ma,ca}from'../chunk-WVVJ3WNL.js';import {z}from'zod';var E=(t=>(t.SUBMITTED="SUBMITTED",t.REGISTRY_PENDING="REGISTRY_PENDING",t.REGISTERED="REGISTERED",t.FAILED="FAILED",t.SUPERSEDED="SUPERSEDED",t.REPAIR_REQUIRED="REPAIR_REQUIRED",t))(E||{}),f=z.object({status:z.enum(E),transactionHash:Ma.nullish().transform(o=>o??null),transactionId:La}),c=(t=>(t.PENDING="PENDING",t.FENCED="FENCED",t.SWEPT="SWEPT",t.CHAIN_SUBMITTED="CHAIN_SUBMITTED",t.CONFIRMED="CONFIRMED",t.FAILED="FAILED",t))(c||{}),L=z.object({status:z.enum(c),transactionId:La});var m=(s=>(s.SAFE="SAFE",s.PROXY="PROXY",s.SAFE_CREATE="SAFE-CREATE",s.WALLET="WALLET",s.WALLET_CREATE="WALLET-CREATE",s))(m||{}),C=z.enum(m),u=z.enum(["PROXY","SAFE","SAFE-CREATE"]),R=(t=>(t.STATE_NEW="STATE_NEW",t.STATE_EXECUTED="STATE_EXECUTED",t.STATE_MINED="STATE_MINED",t.STATE_CONFIRMED="STATE_CONFIRMED",t.STATE_INVALID="STATE_INVALID",t.STATE_FAILED="STATE_FAILED",t))(R||{}),T=z.enum(R),x=z.object({baseGas:z.string().optional(),gasLimit:z.string().optional(),gasPrice:z.string().optional(),gasToken:ca.optional(),operation:z.string().optional(),payment:z.string().optional(),paymentReceiver:ca.optional(),paymentToken:ca.optional(),refundReceiver:ca.optional(),relay:ca.optional(),relayHub:ca.optional(),relayerFee:z.string().optional(),safeTxnGas:z.string().optional()}),N=z.object({address:ca,nonce:z.string().min(1)}),D=z.object({data:z.string().min(1),from:ca,metadata:z.string().optional(),nonce:z.string().min(1).optional(),proxyWallet:ca,signature:z.string().min(1),signatureParams:x,to:ca,type:u,value:z.string().optional()}),I=z.object({data:z.string().min(1),target:ca,value:z.string().min(1)}),h=z.object({calls:z.array(I).min(1),deadline:z.string().min(1),depositWallet:ca}),A=z.object({depositWalletParams:h,from:ca,metadata:z.string().optional(),nonce:z.string().min(1),signature:z.string().min(1),to:ca,type:z.literal("WALLET")}),S=z.object({from:ca,metadata:z.string().optional(),to:ca,type:z.literal("WALLET-CREATE")}),F=z.union([D,A,S]),b=z.object({state:T,transactionHash:Ma.nullish().transform(o=>o??null),transactionID:La}).transform(({transactionHash:o,transactionID:l,...i})=>({...i,transactionHash:o??null,transactionId:l})),G=z.object({deployed:z.boolean()}),j=z.object({error_msg:z.string().nullish(),state:T,transaction_hash:z.union([z.literal(""),Ma]).transform(o=>o===""?null:o),transaction_id:La}).transform(({error_msg:o,transaction_hash:l,transaction_id:i,...y})=>({...y,errorMsg:o??null,transactionHash:l??null,transactionId:i}));export{I as DepositWalletCallSchema,h as DepositWalletParamsSchema,j as GaslessTransactionSchema,f as RelayerAuthorizeSessionSignerResponseSchema,E as RelayerAuthorizeSessionSignerStatus,G as RelayerDeployedResponseSchema,S as RelayerDepositWalletCreateRequestSchema,A as RelayerDepositWalletExecuteRequestSchema,N as RelayerExecuteParamsSchema,F as RelayerExecuteRequestSchema,b as RelayerExecuteResponseSchema,D as RelayerLegacyExecuteRequestSchema,L as RelayerRevokeSessionSignerResponseSchema,c as RelayerRevokeSessionSignerStatus,R as RelayerTransactionState,m as RelayerTransactionType,C 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":"gEAGO,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,CAAAA,CAAAA,CAAAA,GACVA,EAAA,SAAA,CAAY,WAAA,CACZA,EAAA,cAAA,CAAiB,gBAAA,CACjBA,EAAA,WAAA,CAAc,aAAA,CACdA,CAAAA,CAAA,eAAA,CAAkB,iBAAA,CAClBA,CAAAA,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od';\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/session-signer.ts","../../src/relayer/transaction.ts"],"names":["RelayerAuthorizeSessionSignerStatus","RelayerAuthorizeSessionSignerResponseSchema","z","TxHashSchema","value","TransactionIdSchema","RelayerRevokeSessionSignerStatus","RelayerRevokeSessionSignerResponseSchema","RelayerTransactionType","RelayerTransactionTypeSchema","RelayerLegacyTransactionTypeSchema","RelayerTransactionState","RelayerTransactionStateSchema","RelayerSignatureParamsSchema","EvmAddressSchema","RelayerExecuteParamsSchema","RelayerLegacyExecuteRequestSchema","DepositWalletCallSchema","DepositWalletParamsSchema","RelayerDepositWalletExecuteRequestSchema","RelayerDepositWalletCreateRequestSchema","RelayerExecuteRequestSchema","RelayerExecuteResponseSchema","transactionHash","transactionID","rest","RelayerDeployedResponseSchema","GaslessTransactionSchema","error_msg","transaction_hash","transaction_id"],"mappings":"gEAQO,IAAKA,CAAAA,CAAAA,CAAAA,CAAAA,GACVA,CAAAA,CAAA,SAAA,CAAY,WAAA,CACZA,CAAAA,CAAA,gBAAA,CAAmB,kBAAA,CACnBA,CAAAA,CAAA,UAAA,CAAa,YAAA,CACbA,CAAAA,CAAA,MAAA,CAAS,QAAA,CACTA,CAAAA,CAAA,UAAA,CAAa,YAAA,CACbA,CAAAA,CAAA,eAAA,CAAkB,iBAAA,CANRA,CAAAA,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O,CAAE,OAAA,EAAQ,CAC9B,KAAA,CAAOU,CAAAA,CACP,gBAAA,CAAkBV,CAAAA,CACf,KAAA,CAAM,CAACA,CAAAA,CAAE,OAAA,CAAQ,EAAE,CAAA,CAAGC,EAAY,CAAC,CAAA,CACnC,SAAA,CAAWC,CAAAA,EAAWA,CAAAA,GAAU,EAAA,CAAK,IAAA,CAAOA,CAAM,CAAA,CACrD,cAAA,CAAgBC,EAClB,CAAC,CAAA,CACA,SAAA,CAAU,CAAC,CAAE,SAAA,CAAAuB,CAAAA,CAAW,gBAAA,CAAAC,CAAAA,CAAkB,cAAA,CAAAC,CAAAA,CAAgB,GAAGL,CAAK,CAAA,IAAO,CACxE,GAAGA,CAAAA,CACH,QAAA,CAAUG,CAAAA,EAAa,IAAA,CACvB,eAAA,CAAiBC,CAAAA,EAAoB,IAAA,CACrC,aAAA,CAAeC,CACjB,CAAA,CAAE","file":"index.js","sourcesContent":["import { z } from 'zod';\nimport {\n type TransactionId,\n TransactionIdSchema,\n type TxHash,\n TxHashSchema,\n} from '../shared';\n\nexport enum RelayerAuthorizeSessionSignerStatus {\n SUBMITTED = 'SUBMITTED',\n REGISTRY_PENDING = 'REGISTRY_PENDING',\n REGISTERED = 'REGISTERED',\n FAILED = 'FAILED',\n SUPERSEDED = 'SUPERSEDED',\n REPAIR_REQUIRED = 'REPAIR_REQUIRED',\n}\n\nexport type RelayerAuthorizeSessionSignerResponse = {\n /** Lifecycle status of the authorization operation. */\n status: RelayerAuthorizeSessionSignerStatus;\n /** Submitted transaction hash when it is already available. */\n transactionHash: TxHash | null;\n /** Identifier used to poll the submitted transaction. */\n transactionId: TransactionId;\n};\n\n// The upstream `operationId` is omitted from the normalized response because\n// it is an opaque identifier with no SDK consumer.\nexport const RelayerAuthorizeSessionSignerResponseSchema = z.object({\n status: z.enum(RelayerAuthorizeSessionSignerStatus),\n transactionHash: TxHashSchema.nullish().transform((value) => value ?? null),\n transactionId: TransactionIdSchema,\n}) satisfies z.ZodType<RelayerAuthorizeSessionSignerResponse>;\n\nexport enum RelayerRevokeSessionSignerStatus {\n PENDING = 'PENDING',\n FENCED = 'FENCED',\n SWEPT = 'SWEPT',\n CHAIN_SUBMITTED = 'CHAIN_SUBMITTED',\n CONFIRMED = 'CONFIRMED',\n FAILED = 'FAILED',\n}\n\nexport type RelayerRevokeSessionSignerResponse = {\n /** Lifecycle status of the revocation operation. */\n status: RelayerRevokeSessionSignerStatus;\n /** Identifier used to poll the submitted transaction. */\n transactionId: TransactionId;\n};\n\n// The upstream response includes `operationId` and `fenced`. They are omitted\n// from the normalized response because the operation ID has no SDK consumer,\n// while `fenced` is only a submission-time snapshot rather than the eventual\n// revocation outcome.\nexport const RelayerRevokeSessionSignerResponseSchema = z.object({\n status: z.enum(RelayerRevokeSessionSignerStatus),\n transactionId: TransactionIdSchema,\n}) satisfies z.ZodType<RelayerRevokeSessionSignerResponse>;\n","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"]}
|