@polymarket/bindings 0.6.0 → 0.8.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-2WODFBG4.js +2 -0
- package/dist/chunk-2WODFBG4.js.map +1 -0
- package/dist/chunk-E3SBSYCF.js +2 -0
- package/dist/{chunk-UDKFL2IM.js.map → chunk-E3SBSYCF.js.map} +1 -1
- package/dist/{chunk-QX4CCP47.js → chunk-ZLKBCIHA.js} +2 -2
- package/dist/{chunk-QX4CCP47.js.map → chunk-ZLKBCIHA.js.map} +1 -1
- package/dist/clob/index.d.ts +2815 -322
- package/dist/clob/index.js +1 -1
- package/dist/clob/index.js.map +1 -1
- package/dist/combos/index.d.ts +14 -10
- package/dist/combos/index.js +1 -1
- package/dist/combos/index.js.map +1 -1
- package/dist/data/index.d.ts +490 -154
- package/dist/data/index.js +1 -1
- package/dist/data/index.js.map +1 -1
- package/dist/gamma/index.js +1 -1
- package/dist/gamma/index.js.map +1 -1
- package/dist/index.d.ts +22 -8
- 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 +446 -242
- package/dist/subscriptions/index.js +1 -1
- package/dist/subscriptions/index.js.map +1 -1
- package/package.json +2 -2
- package/dist/chunk-AY4D74DC.js +0 -2
- package/dist/chunk-AY4D74DC.js.map +0 -1
- package/dist/chunk-UDKFL2IM.js +0 -2
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-ZLKBCIHA.js';import {u,da}from'../chunk-2WODFBG4.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 {Ma,Na,ca}from'../chunk-2WODFBG4.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:Na.nullish().transform(o=>o??null),transactionId:Ma}),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:Ma});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:Na.nullish().transform(o=>o??null),transactionID:Ma}).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(""),Na]).transform(o=>o===""?null:o),transaction_id:Ma}).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,CAAA,cAAgB,eAAA,CAChBA,CAAAA,CAAA,aAAe,cAAA,CANLA,CAAAA,CAAAA,EAAAA,CAAAA,EAAA,IASNC,CAAAA,CAAgCH,CAAAA,CAAE,IAAA,CAAKE,CAAuB,CAAA,CAE9DE,CAAAA,CAA+BJ,EAAE,MAAA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A,CAAOG,EACP,eAAA,CAAiBW,EAAAA,CAAa,SAAQ,CAAE,SAAA,CAAWC,CAAAA,EAAUA,CAAAA,EAAS,IAAI,CAAA,CAC1E,cAAeC,EACjB,CAAC,EACA,SAAA,CAAU,CAAC,CAAE,eAAA,CAAAC,CAAAA,CAAiB,aAAA,CAAAC,CAAAA,CAAe,GAAGC,CAAK,KAAO,CAC3D,GAAGA,EACH,eAAA,CAAiBF,CAAAA,EAAmB,KACpC,aAAA,CAAeC,CACjB,CAAA,CAAE,CAAA,CAMSE,CAAAA,CAAgCpB,CAAAA,CAAE,OAAO,CACpD,QAAA,CAAUA,CAAAA,CAAE,OAAA,EACd,CAAC,EAMYqB,CAAAA,CAA2BrB,CAAAA,CACrC,MAAA,CAAO,CACN,SAAA,CAAWA,CAAAA,CAAE,QAAO,CAAE,OAAA,GACtB,KAAA,CAAOG,CAAAA,CACP,iBAAkBH,CAAAA,CACf,KAAA,CAAM,CAACA,CAAAA,CAAE,OAAA,CAAQ,EAAE,EAAGc,EAAY,CAAC,EACnC,SAAA,CAAWC,CAAAA,EAAWA,IAAU,EAAA,CAAK,IAAA,CAAOA,CAAM,CAAA,CACrD,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"]}
|
|
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,CAAAA,EAAAA,CAAAA,EAAA,EAAA,CAAA,CAoBCC,CAAAA,CAA8CC,CAAAA,CAAE,MAAA,CAAO,CAClE,MAAA,CAAQA,CAAAA,CAAE,IAAA,CAAKF,CAAmC,CAAA,CAClD,eAAA,CAAiBG,EAAAA,CAAa,OAAA,EA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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"]}
|