@polymarket/client 0.2.0 → 0.3.0-beta.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/actions/index.d.ts +4 -4
- package/dist/actions/index.js +1 -1
- package/dist/chunk-4LDMO37Q.js +6 -0
- package/dist/chunk-4LDMO37Q.js.map +1 -0
- package/dist/chunk-BYPXVDER.js +2 -0
- package/dist/chunk-BYPXVDER.js.map +1 -0
- package/dist/chunk-KZISI26J.js +2 -0
- package/dist/{chunk-3GYPYD7Z.js.map → chunk-KZISI26J.js.map} +1 -1
- package/dist/ethers-v5.d.ts +1 -1
- package/dist/ethers-v5.js +1 -1
- package/dist/index.d.ts +4 -4
- package/dist/index.js +2 -2
- package/dist/index.js.map +1 -1
- package/dist/node.js +1 -1
- package/dist/privy.js +1 -1
- package/dist/{sports-CYYRGlQj.d.ts → sports-06gcFYkj.d.ts} +1 -1
- package/dist/{types-vvy5wT5V.d.ts → types-CJLEdIu5.d.ts} +51 -8
- package/dist/viem.d.ts +1 -1
- package/dist/viem.js +1 -1
- package/package.json +2 -2
- package/dist/chunk-3GYPYD7Z.js +0 -2
- package/dist/chunk-FA3ZDOJN.js +0 -2
- package/dist/chunk-FA3ZDOJN.js.map +0 -1
- package/dist/chunk-TYJAXA3Y.js +0 -6
- package/dist/chunk-TYJAXA3Y.js.map +0 -1
package/dist/node.js
CHANGED
|
@@ -1,3 +1,3 @@
|
|
|
1
|
-
import {e}from'./chunk-
|
|
1
|
+
import {e}from'./chunk-KZISI26J.js';import g from'process';import {invariant}from'@polymarket/types';async function u(t,e,r,i,n){let s=`${e}${r}${i}`;n!==void 0&&(s+=n);let y=await globalThis.crypto.subtle.importKey("raw",l(t),{name:"HMAC",hash:"SHA-256"},false,["sign"]),c=await globalThis.crypto.subtle.sign("HMAC",y,new TextEncoder().encode(s));return f(d(c))}function l(t){let e=t.replace(/-/g,"+").replace(/_/g,"/").replace(/[^A-Za-z0-9+/=]/g,""),r=atob(e),i=new Uint8Array(r.length);for(let n=0;n<r.length;n+=1)i[n]=r.charCodeAt(n);return i.buffer}function d(t){let e=new Uint8Array(t),r="";for(let i of e)r+=String.fromCharCode(i);return btoa(r)}function f(t){return t.replace(/\+/g,"-").replace(/\//g,"_")}invariant(g.release.name==="node","The @polymarket/client/node entrypoint requires a Node.js runtime.");invariant(typeof window>"u"&&typeof document>"u","The @polymarket/client/node entrypoint cannot be imported in a browser-like runtime.");function K(t){return new o(t)}var o=class{#e;constructor(e){this.#e=e;}get isBuilderKey(){return true}get supportGasless(){return true}async authorize(e){return this.#r(e)}async#r(e$1){try{let r=Math.floor(Date.now()/1e3);return {POLY_BUILDER_API_KEY:this.#e.key,POLY_BUILDER_PASSPHRASE:this.#e.passphrase,POLY_BUILDER_SIGNATURE:await u(this.#e.secret,r,e$1.method,e$1.path,e$1.body),POLY_BUILDER_TIMESTAMP:`${r}`}}catch(r){throw e.fromError(r,"Could not sign the builder-authenticated request")}}};
|
|
2
2
|
export{K as builderApiKey};//# sourceMappingURL=node.js.map
|
|
3
3
|
//# sourceMappingURL=node.js.map
|
package/dist/privy.js
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import {e as e$1,d,c,b as b$1,a}from'./chunk-
|
|
1
|
+
import {e as e$1,d,c,b as b$1,a}from'./chunk-KZISI26J.js';import h from'process';import {invariant,expectEvmAddress,expectTxHash,expectEvmSignature,never}from'@polymarket/types';import {Hex}from'ox';import {createPublicClient,http,WaitForTransactionReceiptTimeoutError}from'viem';import {waitForTransactionReceipt}from'viem/actions';import*as E from'viem/chains';invariant(h.release.name==="node","The @polymarket/client/privy entrypoint requires a Node.js runtime.");invariant(typeof window>"u"&&typeof document>"u","The @polymarket/client/privy entrypoint cannot be imported in a browser-like runtime.");var P=Object.values(E);function D(r){return {getAddress(){return b(r)},signTypedData(t){return A(r,t)},signMessage(t){return H(r,t)},async sendTransaction(t){return new o(await I(r,t),t.chainId)}}}async function b(r){try{let t=await r.privy.wallets().get(r.walletId);return expectEvmAddress(t.address)}catch(t){throw e$1.fromError(t,"Could not resolve signer address")}}async function I(r,t){try{let n=await r.privy.wallets().ethereum().sendTransaction(r.walletId,{authorization_context:r.authorizationContext,caip2:`eip155:${t.chainId}`,params:{transaction:{chain_id:t.chainId,data:t.data,to:t.to,value:t.value?.toString()}}});return expectTxHash(n.hash)}catch(n){s(n);}}async function A(r,t){try{let n=await r.privy.wallets().ethereum().signTypedData(r.walletId,{authorization_context:r.authorizationContext,params:{typed_data:{domain:e(t.domain),message:e(t.message),primary_type:t.primaryType,types:t.types}}});return expectEvmSignature(n.signature)}catch(n){s(n);}}async function H(r,t){try{let n=await r.privy.wallets().ethereum().signMessage(r.walletId,{authorization_context:r.authorizationContext,message:Hex.toBytes(t)});return expectEvmSignature(n.signature)}catch(n){s(n);}}function e(r){return typeof r=="bigint"?`${r}`:Array.isArray(r)?r.map(t=>e(t)):typeof r=="object"&&r!==null?Object.fromEntries(Object.entries(r).flatMap(([t,n])=>n===void 0?[]:[[t,e(n)]])):r}function s(r){throw i(r)?new d("User rejected the signing request",{cause:r}):e$1.fromError(r)}function i(r,t=new Set){if(t.has(r)||r===null||typeof r!="object")return false;t.add(r);let n=r;return n.code===4001||n.code==="ACTION_REJECTED"||n.name==="APIUserAbortError"||i(n.error,t)||i(n.cause,t)}var o=class{transactionId=null;#r;#t;constructor(t,n){this.#r=n,this.#t=t;}get transactionHash(){return this.#t}async wait(){try{let t=await waitForTransactionReceipt(createPublicClient({chain:S(this.#r),transport:http()}),{hash:this.#t}),n=expectTxHash(t.transactionHash);if(this.#t=n,t.status==="reverted")throw new c(`Transaction ${n} reverted`);return {transactionHash:n,transactionId:null}}catch(t){throw t instanceof WaitForTransactionReceiptTimeoutError?new b$1(`Timed out waiting for transaction ${this.#t} to settle`,{cause:t}):a.fromError(t)}}};function S(r){let t=P.find(n=>n.id===r);if(t!==void 0)return t;never(`Unsupported chain ID for direct Privy transaction wait: ${r}`);}export{D as signerFrom};//# sourceMappingURL=privy.js.map
|
|
2
2
|
//# sourceMappingURL=privy.js.map
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { OrderResponse } from '@polymarket/bindings/clob';
|
|
2
|
-
import {
|
|
2
|
+
import { bN as RateLimitError, bQ as RequestRejectedError, cz as SigningError, cH as TransportError, cK as UnexpectedResponseError, U as UserInputError, ay as InsufficientLiquidityError, h as BaseSecureClient, fc as PrepareLimitOrderRequest, eR as OrderWorkflow, eQ as OrderPostingWorkflow, fe as PrepareMarketOrderRequest, p as CancelledSigningError, bD as PostOrderError, cC as TimeoutError, cD as TransactionFailedError, fQ as SignedOrder, B as BaseClient } from './types-CJLEdIu5.js';
|
|
3
3
|
import { SportsMarketTypesResponse, SportsMetadata } from '@polymarket/bindings/gamma';
|
|
4
4
|
|
|
5
5
|
type PrepareMarketOrderError = InsufficientLiquidityError | RateLimitError | RequestRejectedError | SigningError | TransportError | UnexpectedResponseError | UserInputError;
|
|
@@ -11,7 +11,7 @@ import { Activity, ComboActivity, Trade, Value, Traded, ClosedPosition, ComboPos
|
|
|
11
11
|
import * as _polymarket_bindings_combos from '@polymarket/bindings/combos';
|
|
12
12
|
import { ComboMarket, RfqQuoteRequest, RfqRequestedSize, RfqSide, RfqQuoteAck, RfqConfirmationRequest, RfqConfirmationAck as RfqConfirmationAck$1, RfqExecutionUpdate, RfqTrade, RfqQuoteCancelAck, RfqErrorCode, RfqId, RfqQuoteId, CollateralReturnPlanResponse } from '@polymarket/bindings/combos';
|
|
13
13
|
import { PerpsInstrument, PerpsTicker, PerpsBook, PerpsCandle, PerpsFundingRate, PerpsPublicTrade, PerpsFeeScheduleEntry, PerpsWithdrawalId, PerpsDepositStatus, PerpsWithdrawalStatus, PerpsPnlInterval, PerpsDecimalInput, PerpsTimeInForce, PerpsCredentials, PerpsBalance, PerpsPortfolio, PerpsAccountStats, PerpsAccountConfig, PerpsOrder, PerpsAccountFill, PerpsAccountFundingPayment, PerpsDeposit, PerpsWithdrawal, PerpsEquityPoint, PerpsPnlPoint, PerpsOrderId, PerpsPostOrderAck, PerpsCancelOrderResult, PerpsUpdateLeverageResult, PerpsInstrumentCategory, PerpsKlineInterval } from '@polymarket/bindings/perps';
|
|
14
|
-
import { PerpsSessionEvent, CommentsEvent, CryptoPricesTopic, EquityPricesTopic, EquityPricesEvent, MarketEvent, StandardMarketEvent, UserEvent, SportsEvent, CryptoPricesBinanceEvent, CryptoPricesChainlinkEvent, PerpsTradeEvent, PerpsBboEvent, PerpsBookEvent, PerpsCandleEvent, PerpsTickerEvent, PerpsStatisticEvent, CryptoPricesEvent, PerpsMarketDataEvent } from '@polymarket/bindings/subscriptions';
|
|
14
|
+
import { PerpsSessionEvent, CommentsEvent, CryptoPricesTopic, CryptoPricesChainlinkTwapTopic, CryptoPricesChainlinkTwapWindowSeconds, EquityPricesTopic, EquityPricesEvent, MarketEvent, StandardMarketEvent, CryptoPricesChainlinkTwapThirtyEvent, CryptoPricesChainlinkTwapSixtyEvent, CryptoPricesChainlinkTwapEvent, UserEvent, SportsEvent, CryptoPricesBinanceEvent, CryptoPricesChainlinkEvent, PerpsTradeEvent, PerpsBboEvent, PerpsBookEvent, PerpsCandleEvent, PerpsTickerEvent, PerpsStatisticEvent, CryptoPricesEvent, PerpsMarketDataEvent } from '@polymarket/bindings/subscriptions';
|
|
15
15
|
import { Hex } from 'ox';
|
|
16
16
|
|
|
17
17
|
type ResponseValidationContext = {
|
|
@@ -89,6 +89,11 @@ declare class ConnectionLostError extends PolymarketError {
|
|
|
89
89
|
}
|
|
90
90
|
type RequestRejectedErrorOptions = {
|
|
91
91
|
status: number;
|
|
92
|
+
/**
|
|
93
|
+
* Server-requested delay in seconds before retrying, when the response
|
|
94
|
+
* provided one.
|
|
95
|
+
*/
|
|
96
|
+
retryAfter?: number;
|
|
92
97
|
};
|
|
93
98
|
/**
|
|
94
99
|
* Error thrown when a service responds with a non-success status other than
|
|
@@ -97,14 +102,32 @@ type RequestRejectedErrorOptions = {
|
|
|
97
102
|
declare class RequestRejectedError extends PolymarketError {
|
|
98
103
|
name: "RequestRejectedError";
|
|
99
104
|
readonly status: number;
|
|
105
|
+
/**
|
|
106
|
+
* Server-requested delay in seconds before retrying, when the response
|
|
107
|
+
* provided one.
|
|
108
|
+
*/
|
|
109
|
+
readonly retryAfter?: number;
|
|
100
110
|
constructor(message: string, options: ErrorOptions & RequestRejectedErrorOptions);
|
|
101
111
|
}
|
|
112
|
+
type RateLimitErrorOptions = {
|
|
113
|
+
/**
|
|
114
|
+
* Server-requested delay in seconds before retrying, when the response
|
|
115
|
+
* provided one.
|
|
116
|
+
*/
|
|
117
|
+
retryAfter?: number;
|
|
118
|
+
};
|
|
102
119
|
/**
|
|
103
120
|
* Error thrown when the service rejects a request because the rate limit has
|
|
104
121
|
* been exceeded.
|
|
105
122
|
*/
|
|
106
123
|
declare class RateLimitError extends PolymarketError {
|
|
107
124
|
name: "RateLimitError";
|
|
125
|
+
/**
|
|
126
|
+
* Server-requested delay in seconds before retrying, when the response
|
|
127
|
+
* provided one.
|
|
128
|
+
*/
|
|
129
|
+
readonly retryAfter?: number;
|
|
130
|
+
constructor(message: string, options?: ErrorOptions & RateLimitErrorOptions);
|
|
108
131
|
}
|
|
109
132
|
/**
|
|
110
133
|
* Error thrown when an async wait operation exceeds its allotted polling time.
|
|
@@ -324,6 +347,7 @@ type Page<T> = {
|
|
|
324
347
|
*/
|
|
325
348
|
hasMore: boolean;
|
|
326
349
|
nextCursor?: PaginationCursor;
|
|
350
|
+
/** Total number of matching items across all pages. Only present when the service reports one. */
|
|
327
351
|
totalCount?: number;
|
|
328
352
|
};
|
|
329
353
|
type Paginated<T> = AsyncIterable<Page<T>> & {
|
|
@@ -2853,7 +2877,8 @@ type PublicSubscriptionsActions = {
|
|
|
2853
2877
|
* Starts one or more realtime subscriptions on this client.
|
|
2854
2878
|
*
|
|
2855
2879
|
* @throws {@link SubscribeError}
|
|
2856
|
-
* Thrown when
|
|
2880
|
+
* Thrown when a TWAP subscription requests an unsupported window or the
|
|
2881
|
+
* realtime connection fails.
|
|
2857
2882
|
*
|
|
2858
2883
|
* @example
|
|
2859
2884
|
* ```ts
|
|
@@ -2873,7 +2898,8 @@ type SecureSubscriptionsActions = {
|
|
|
2873
2898
|
* Starts one or more realtime subscriptions on this client.
|
|
2874
2899
|
*
|
|
2875
2900
|
* @throws {@link SubscribeError}
|
|
2876
|
-
* Thrown when
|
|
2901
|
+
* Thrown when a TWAP subscription requests an unsupported window or the
|
|
2902
|
+
* realtime connection fails.
|
|
2877
2903
|
*
|
|
2878
2904
|
* @example
|
|
2879
2905
|
* ```ts
|
|
@@ -8137,6 +8163,13 @@ type CryptoPricesSubscription = {
|
|
|
8137
8163
|
topic: CryptoPricesTopic;
|
|
8138
8164
|
symbols?: readonly string[];
|
|
8139
8165
|
};
|
|
8166
|
+
type CryptoPricesChainlinkTwapSubscription = {
|
|
8167
|
+
topic: CryptoPricesChainlinkTwapTopic;
|
|
8168
|
+
/** Averaging window used to calculate each TWAP price. */
|
|
8169
|
+
windowSeconds: CryptoPricesChainlinkTwapWindowSeconds;
|
|
8170
|
+
/** Lowercase slash-delimited symbols, such as `btc/usd`. */
|
|
8171
|
+
symbols?: readonly string[];
|
|
8172
|
+
};
|
|
8140
8173
|
type EquityPricesSubscription = {
|
|
8141
8174
|
topic: EquityPricesTopic;
|
|
8142
8175
|
symbol: string;
|
|
@@ -8189,7 +8222,7 @@ type PerpsStatisticsSubscription = {
|
|
|
8189
8222
|
* @experimental This API may change in a breaking way in any release, including patch releases.
|
|
8190
8223
|
*/
|
|
8191
8224
|
type PerpsMarketDataSubscription = PerpsTradesSubscription | PerpsBboSubscription | PerpsBookSubscription | PerpsCandlesSubscription | PerpsTickersSubscription | PerpsStatisticsSubscription;
|
|
8192
|
-
type PublicSubscriptionSpec = MarketSubscription | SportsSubscription | CommentsSubscription | CryptoPricesSubscription | EquityPricesSubscription | PerpsMarketDataSubscription;
|
|
8225
|
+
type PublicSubscriptionSpec = MarketSubscription | SportsSubscription | CommentsSubscription | CryptoPricesSubscription | CryptoPricesChainlinkTwapSubscription | EquityPricesSubscription | PerpsMarketDataSubscription;
|
|
8193
8226
|
type SecureSubscriptionSpec = PublicSubscriptionSpec | UserSubscription;
|
|
8194
8227
|
type PublicRealtimeEvent = MarketEvent | SportsEvent | CommentsEvent | CryptoPricesEvent | EquityPricesEvent | PerpsMarketDataEvent;
|
|
8195
8228
|
type SecureRealtimeEvent = PublicRealtimeEvent | UserEvent;
|
|
@@ -8201,6 +8234,7 @@ type EventByTopic = {
|
|
|
8201
8234
|
comments: CommentsEvent;
|
|
8202
8235
|
'prices.crypto.binance': CryptoPricesBinanceEvent;
|
|
8203
8236
|
'prices.crypto.chainlink': CryptoPricesChainlinkEvent;
|
|
8237
|
+
'prices.crypto.chainlink.twap': CryptoPricesChainlinkTwapEvent;
|
|
8204
8238
|
'prices.equity.pyth': EquityPricesEvent;
|
|
8205
8239
|
'perps.trades': PerpsTradeEvent;
|
|
8206
8240
|
'perps.bbo': PerpsBboEvent;
|
|
@@ -8210,7 +8244,12 @@ type EventByTopic = {
|
|
|
8210
8244
|
'perps.statistics': PerpsStatisticEvent;
|
|
8211
8245
|
};
|
|
8212
8246
|
type EventForMarketSubscription<TSpec extends MarketSubscription> = 'customFeatureEnabled' extends keyof TSpec ? true extends TSpec['customFeatureEnabled'] ? MarketEvent : StandardMarketEvent : StandardMarketEvent;
|
|
8213
|
-
type
|
|
8247
|
+
type EventForCryptoPricesChainlinkTwapSubscription<TSpec extends CryptoPricesChainlinkTwapSubscription> = TSpec extends {
|
|
8248
|
+
windowSeconds: 30;
|
|
8249
|
+
} ? CryptoPricesChainlinkTwapThirtyEvent : TSpec extends {
|
|
8250
|
+
windowSeconds: 60;
|
|
8251
|
+
} ? CryptoPricesChainlinkTwapSixtyEvent : CryptoPricesChainlinkTwapEvent;
|
|
8252
|
+
type EventForSubscriptionSpec<TSpec extends SecureSubscriptionSpec> = TSpec extends MarketSubscription ? EventForMarketSubscription<TSpec> : TSpec extends CryptoPricesChainlinkTwapSubscription ? EventForCryptoPricesChainlinkTwapSubscription<TSpec> : TSpec extends {
|
|
8214
8253
|
topic: infer TTopic extends keyof EventByTopic;
|
|
8215
8254
|
} ? EventByTopic[TTopic] : never;
|
|
8216
8255
|
type EventForSubscriptionSpecs<TSubscriptions extends readonly SecureSubscriptionSpec[]> = EventForSubscriptionSpec<TSubscriptions[number]>;
|
|
@@ -8222,7 +8261,10 @@ type SubscriptionHandle<TEvent> = {
|
|
|
8222
8261
|
*/
|
|
8223
8262
|
close(): Promise<void>;
|
|
8224
8263
|
} & AsyncIterable<TEvent>;
|
|
8225
|
-
type SubscribeError = TransportError;
|
|
8264
|
+
type SubscribeError = TransportError | UserInputError;
|
|
8265
|
+
declare const SubscribeError: {
|
|
8266
|
+
isError(error: unknown): error is TransportError | UserInputError;
|
|
8267
|
+
};
|
|
8226
8268
|
/**
|
|
8227
8269
|
* Starts one or more realtime subscriptions on this client.
|
|
8228
8270
|
*
|
|
@@ -8230,7 +8272,8 @@ type SubscribeError = TransportError;
|
|
|
8230
8272
|
* This is a low-level function. Most SDK consumers should prefer the client instance API.
|
|
8231
8273
|
*
|
|
8232
8274
|
* @throws {@link SubscribeError}
|
|
8233
|
-
* Thrown when
|
|
8275
|
+
* Thrown when a TWAP subscription requests an unsupported window or the
|
|
8276
|
+
* realtime connection fails.
|
|
8234
8277
|
*
|
|
8235
8278
|
* @example
|
|
8236
8279
|
* ```ts
|
|
@@ -8590,4 +8633,4 @@ type Signer = {
|
|
|
8590
8633
|
sendTransaction(request: SignerTransactionRequest): Promise<TransactionHandle>;
|
|
8591
8634
|
};
|
|
8592
8635
|
|
|
8593
|
-
export { FetchMidpointError as $, type ApiKeyAuthorization as A, type BaseClient as B, CancelAllError as C, type DataActions as D, DepositToPerpsError as E, type DepositToPerpsRequest as F, type DiscoveryActions as G, DownloadAccountingSnapshotError as H, DropNotificationsError as I, type EnvironmentConfig as J, type EnvironmentConfigFork as K, type EnvironmentContracts as L, EstimateMarketPriceError as M, ExecuteCollateralReturnPlanError as N, type ExecuteCollateralReturnPlanRequest as O, FetchClosedOnlyModeError as P, FetchCommentsByIdError as Q, FetchEventError as R, type Signer as S, type TypedDataPayload as T, UserInputError as U, FetchEventLiveVolumeError as V, FetchEventTagsError as W, FetchLastTradePriceError as X, FetchLastTradePricesError as Y, FetchMarketError as Z, FetchMarketTagsError as _, type TypedData as a, type ListPerpsTradesRequest as a$, FetchMidpointsError as a0, FetchNotificationsError as a1, FetchOrderBookError as a2, FetchOrderBooksError as a3, FetchOrderError as a4, FetchOrderScoringError as a5, FetchOrdersScoringError as a6, type FetchPerpsAccountConfigRequest as a7, FetchPerpsBookError as a8, type FetchPerpsBookRequest as a9, ListBuilderLeaderboardError as aA, ListBuilderTradesError as aB, ListBuilderVolumeError as aC, ListClosedPositionsError as aD, ListComboActivityError as aE, ListComboMarketsError as aF, ListComboPositionsError as aG, ListCommentsByUserAddressError as aH, ListCommentsError as aI, ListCurrentRewardsError as aJ, ListEventsError as aK, ListMarketHoldersError as aL, ListMarketPositionsError as aM, ListMarketRewardsError as aN, ListMarketsError as aO, ListOpenInterestError as aP, ListOpenOrdersError as aQ, ListPerpsCandlesError as aR, type ListPerpsCandlesRequest as aS, type ListPerpsDepositsRequest as aT, type ListPerpsEquityHistoryRequest as aU, type ListPerpsFillsRequest as aV, ListPerpsFundingHistoryError as aW, type ListPerpsFundingHistoryRequest as aX, type ListPerpsFundingPaymentsRequest as aY, type ListPerpsPnlHistoryRequest as aZ, ListPerpsTradesError as a_, FetchPerpsFeesError as aa, FetchPerpsInstrumentsError as ab, type FetchPerpsInstrumentsRequest as ac, type FetchPerpsOpenOrdersRequest as ad, type FetchPerpsOrdersRequest as ae, FetchPerpsTickerError as af, type FetchPerpsTickerRequest as ag, FetchPerpsTickersError as ah, type FetchPerpsTickersRequest as ai, FetchPortfolioValueError as aj, FetchPriceError as ak, FetchPriceHistoryError as al, FetchPricesError as am, FetchPublicProfileError as an, FetchRelatedTagResourcesError as ao, FetchRelatedTagsError as ap, FetchRewardPercentagesError as aq, FetchSeriesError as ar, FetchSpreadError as as, FetchSpreadsError as at, FetchTagError as au, FetchTotalEarningsForUserForDayError as av, FetchTradedMarketCountError as aw, InsufficientLiquidityError as ax, ListAccountTradesError as ay, ListActivityError as az, type TransactionCall as b, type RfqConfirmationRequestEvent as b$, type ListPerpsWithdrawalsRequest as b0, ListPositionsError as b1, ListSeriesError as b2, ListTagsError as b3, ListTeamsError as b4, ListTraderLeaderboardError as b5, ListTradesError as b6, ListUserEarningsAndMarketsConfigError as b7, ListUserEarningsForDayError as b8, MergePositionsError as b9, type PlacePerpsPositionTpSlResult as bA, PlanCollateralReturnError as bB, PostOrderError as bC, PostOrdersError as bD, type PostPerpsOrdersRequest as bE, type PublicAccountActions as bF, type PublicActions as bG, type PublicClient as bH, type PublicClientOptions as bI, type PublicPerpsActions as bJ, type PublicRewardsActions as bK, type PublicSubscriptionsActions as bL, RateLimitError as bM, RedeemPositionsError as bN, RequestRejectedError as bO, type RequestRejectedErrorOptions as bP, type RestEndpoint as bQ, type ResumePerpsSessionRequest as bR, RevokePerpsCredentialsError as bS, type RevokePerpsCredentialsRequest as bT, type RfqCancelQuoteAck as bU, RfqCancelQuoteError as bV, RfqCancelQuoteRejectedError as bW, type RfqCancelQuoteRejectedErrorOptions as bX, type RfqConfirmationAck as bY, RfqConfirmationError as bZ, RfqConfirmationRejectedError as b_, OpenPerpsSessionError as ba, type OpenPerpsSessionRequest as bb, OpenRfqSessionError as bc, type Page as bd, PageSizeSchema as be, type Paginated as bf, type PerpsActions as bg, type PerpsBookDepth as bh, type PerpsEndpoints as bi, type PerpsOrderRequest as bj, type PerpsPlaceFokOrderRequest as bk, type PerpsPlaceGtcOrderRequest as bl, type PerpsPlaceIocOrderRequest as bm, type PerpsPlacedTpSlOrder as bn, type PerpsPlacedTpSlOrders as bo, type PerpsPositionTpSlTrigger as bp, PerpsSession as bq, type PerpsSessionAccountError as br, type PerpsSessionLifecycleError as bs, type PerpsSessionTradingError as bt, type PerpsTpSlTrigger as bu, type PlacePerpsOrderRequest as bv, type PlacePerpsOrderResult as bw, type PlacePerpsOrderWithTpSlRequest as bx, type PlacePerpsOrderWithTpSlResult as by, type PlacePerpsPositionTpSlRequest as bz, type AccountIdentity as c, perpsActions as c$, type RfqEvent as c0, RfqQuoteError as c1, type RfqQuoteReference as c2, RfqQuoteRejectedError as c3, type RfqQuoteRejectedErrorOptions as c4, type RfqQuoteRequestEvent as c5, type RfqQuoteResponse as c6, type RfqQuoteSource as c7, type RfqSession as c8, type RfqTradeEvent as c9, TransactionFailedError as cA, type TransactionHandle as cB, type TransactionOutcome as cC, TransferErc20Error as cD, TransportError as cE, type TypedDataDomain as cF, type TypedDataField as cG, UnexpectedResponseError as cH, UpdatePerpsLeverageError as cI, type UpdatePerpsLeverageRequest as cJ, WaitForOrderFillSettlementError as cK, WaitForTransactionError as cL, type WalletDerivationConfig as cM, type WebSocketCloseCode as cN, type WebSocketEndpoint as cO, WebSocketKnownCloseCode as cP, WithdrawFromPerpsError as cQ, type WithdrawFromPerpsRequest as cR, accountActions as cS, allActions as cT, analyticsActions as cU, createPublicClient as cV, createSecureClient as cW, dataActions as cX, discoveryActions as cY, forkEnvironmentConfig as cZ, makeErrorGuard as c_, SearchError as ca, SearchSort as cb, type SecureAccountActions as cc, type SecureActions as cd, type SecureClient as ce, type SecureClientOptions as cf, type SecureDownloadAccountingSnapshotRequest as cg, type SecureFetchPortfolioValueRequest as ch, type SecureFetchTradedMarketCountRequest as ci, type SecureListActivityRequest as cj, type SecureListClosedPositionsRequest as ck, type SecureListComboActivityRequest as cl, type SecureListComboPositionsRequest as cm, type SecureListPositionsRequest as cn, type SecurePerpsActions as co, type SecureRewardsActions as cp, type SecureRfqActions as cq, type SecureSubscriptionsActions as cr, type SecureTradingActions as cs, type SecureWalletActions as ct, SetupGaslessWalletError as cu, SetupTradingApprovalsError as cv, type SignerTransactionRequest as cw, SigningError as cx, SplitPositionError as cy, TimeoutError as cz, type AnalyticsActions as d, type FetchRelatedTagsRequest as d$, production as d0, rewardsActions as d1, rfqActions as d2, subscriptionsActions as d3, tradingActions as d4, walletActions as d5, type CancelMarketOrdersRequest as d6, type CancelOrderRequest as d7, type CancelOrdersRequest as d8, type CollateralReturnExecutionWorkflow as d9, type FetchEventLiveVolumeRequest as dA, type FetchEventRequest as dB, type FetchEventTagsRequest as dC, FetchExecuteParamsError as dD, type FetchExecuteParamsRequest as dE, type FetchGaslessTransactionRequest as dF, type FetchLastTradePriceRequest as dG, type FetchLastTradePricesRequest as dH, FetchMarketInfoError as dI, type FetchMarketInfoRequest as dJ, type FetchMarketRequest as dK, type FetchMarketTagsRequest as dL, type FetchMidpointRequest as dM, type FetchMidpointsRequest as dN, FetchNegRiskError as dO, type FetchNegRiskRequest as dP, type FetchOrderBookRequest as dQ, type FetchOrderBooksRequest as dR, type FetchOrderRequest as dS, type FetchOrderScoringRequest as dT, type FetchOrdersScoringRequest as dU, type FetchPortfolioValueRequest as dV, type FetchPriceHistoryRequest as dW, type FetchPriceRequest as dX, type FetchPricesRequest as dY, type FetchPublicProfileRequest as dZ, type FetchRelatedTagResourcesRequest as d_, type CommentsEventType as da, type CommentsSubscription as db, type CryptoPricesEventType as dc, type CryptoPricesSubscription as dd, DeployDepositWalletError as de, type DownloadAccountingSnapshotRequest as df, type DropNotificationsRequest as dg, type EquityPricesEventType as dh, type EquityPricesSubscription as di, type Erc1155ApprovalForAllWorkflow as dj, type Erc1155ApprovalForAllWorkflowRequest as dk, type Erc20ApprovalWorkflow as dl, type Erc20ApprovalWorkflowRequest as dm, type Erc20TransferWorkflow as dn, type Erc20TransferWorkflowRequest as dp, type EstimateMarketBuyPriceRequest as dq, type EstimateMarketPriceRequest as dr, type EstimateMarketSellPriceRequest as ds, type EventForSubscriptionSpec as dt, type EventForSubscriptionSpecs as du, FetchBalanceAllowanceError as dv, type FetchBalanceAllowanceRequest as dw, FetchBuilderFeeRatesError as dx, type FetchBuilderFeeRatesRequest as dy, type FetchCommentsByIdRequest as dz, ApproveErc1155ForAllError as e, type PostOrdersRequest as e$, type FetchSeriesRequest as e0, type FetchSpreadRequest as e1, type FetchSpreadsRequest as e2, type FetchTagRequest as e3, FetchTickSizeError as e4, type FetchTickSizeRequest as e5, type FetchTotalEarningsForUserForDayRequest as e6, type FetchTradedMarketCountRequest as e7, GaslessTransactionMetadataSchema as e8, type GaslessWorkflow as e9, type ListTagsRequest as eA, type ListTeamsRequest as eB, type ListTraderLeaderboardRequest as eC, type ListTradesRequest as eD, type ListUserEarningsAndMarketsConfigRequest as eE, type ListUserEarningsForDayRequest as eF, type MarketEventType as eG, type MarketSubscription as eH, MergeComboPositionError as eI, MergeMarketPositionError as eJ, type MergePositionsWorkflow as eK, type MergePositionsWorkflowRequest as eL, type OrderDraft as eM, type OrderPostingWorkflow as eN, type OrderWorkflow as eO, type OrderWorkflowRequest as eP, type PerpsBboSubscription as eQ, type PerpsBookSubscription as eR, type PerpsCandlesSubscription as eS, type PerpsDepositWorkflow as eT, type PerpsDepositWorkflowRequest as eU, type PerpsMarketDataEventType as eV, type PerpsMarketDataSubscription as eW, type PerpsStatisticsSubscription as eX, type PerpsStreamingCandleInterval as eY, type PerpsTickersSubscription as eZ, type PerpsTradesSubscription as e_, type GaslessWorkflowRequest as ea, IsWalletDeployedError as eb, type IsWalletDeployedRequest as ec, type ListAccountTradesRequest as ed, type ListActivityRequest as ee, type ListBuilderLeaderboardRequest as ef, type ListBuilderTradesRequest as eg, type ListBuilderVolumeRequest as eh, type ListClosedPositionsRequest as ei, type ListComboActivityRequest as ej, type ListComboMarketsRequest as ek, type ListComboPositionsRequest as el, type ListCommentsByUserAddressRequest as em, type ListCommentsRequest as en, type ListCurrentRewardsRequest as eo, type ListEventsRequest as ep, ListMarketClarificationsError as eq, type ListMarketClarificationsRequest as er, type ListMarketHoldersRequest as es, type ListMarketPositionsRequest as et, type ListMarketRewardsRequest as eu, type ListMarketsRequest as ev, type ListOpenInterestRequest as ew, type ListOpenOrdersRequest as ex, type ListPositionsRequest as ey, type ListSeriesRequest as ez, ApproveErc20Error as f, type UserSubscription as f$, PrepareCollateralReturnExecutionError as f0, PrepareErc1155ApprovalForAllError as f1, type PrepareErc1155ApprovalForAllRequest as f2, PrepareErc20ApprovalError as f3, type PrepareErc20ApprovalRequest as f4, PrepareErc20TransferError as f5, type PrepareErc20TransferRequest as f6, PrepareGaslessTransactionError as f7, type PrepareGaslessTransactionRequest as f8, type PrepareLimitOrderRequest as f9, type PublicRealtimeTopic as fA, type PublicSubscriptionSpec as fB, type RedeemPositionsWorkflow as fC, type RedeemPositionsWorkflowRequest as fD, ResolveConditionByTokenError as fE, type ResolveConditionByTokenRequest as fF, type RfqConfirmationRejectedErrorOptions as fG, type RfqExecutionUpdateEvent as fH, type SearchRequest as fI, type SearchResults as fJ, type SecureRealtimeEvent as fK, type SecureRealtimeTopic as fL, type SecureSubscriptionSpec as fM, type SignedOrder as fN, SplitComboPositionError as fO, SplitMarketPositionError as fP, type SplitPositionWorkflow as fQ, type SplitPositionWorkflowRequest as fR, type SportsEventType as fS, type SportsSubscription as fT, type SubscribeError as fU, type SubscriptionHandle as fV, type TradingApprovalsWorkflow as fW, type TradingApprovalsWorkflowRequest as fX, UpdateBalanceAllowanceError as fY, type UpdateBalanceAllowanceRequest as fZ, type UserEventType as f_, type PrepareMarketBuyOrderRequest as fa, type PrepareMarketOrderRequest as fb, type PrepareMarketSellOrderRequest as fc, PrepareMergeComboPositionError as fd, type PrepareMergeComboPositionRequest as fe, PrepareMergeMarketPositionError as ff, type PrepareMergeMarketPositionRequest as fg, PrepareMergePositionsError as fh, type PrepareMergePositionsRequest as fi, PreparePerpsDepositError as fj, PrepareRedeemComboPositionError as fk, type PrepareRedeemComboPositionRequest as fl, type PrepareRedeemMarketPositionsByConditionIdRequest as fm, type PrepareRedeemMarketPositionsByMarketIdRequest as fn, PrepareRedeemMarketPositionsError as fo, type PrepareRedeemMarketPositionsRequest as fp, PrepareRedeemPositionsError as fq, type PrepareRedeemPositionsRequest as fr, PrepareSplitComboPositionError as fs, type PrepareSplitComboPositionRequest as ft, PrepareSplitMarketPositionError as fu, type PrepareSplitMarketPositionRequest as fv, PrepareSplitPositionError as fw, type PrepareSplitPositionRequest as fx, PrepareTradingApprovalsError as fy, type PublicRealtimeEvent as fz, BasePublicClient as g, listClosedPositions as g$, WaitForGaslessTransactionError as g0, type WaitForOrderFillSettlementRequest as g1, approveErc1155ForAll as g2, approveErc20 as g3, cancelAll as g4, cancelMarketOrders as g5, cancelOrder as g6, cancelOrders as g7, deployDepositWallet as g8, depositToPerps as g9, fetchOrdersScoring as gA, fetchPerpsBook as gB, fetchPerpsFees as gC, fetchPerpsInstruments as gD, fetchPerpsTicker as gE, fetchPerpsTickers as gF, fetchPortfolioValue as gG, fetchPrice as gH, fetchPriceHistory as gI, fetchPrices as gJ, fetchPublicProfile as gK, fetchRelatedTagResources as gL, fetchRelatedTags as gM, fetchRewardPercentages as gN, fetchSeries as gO, fetchSpread as gP, fetchSpreads as gQ, fetchTag as gR, fetchTickSize as gS, fetchTotalEarningsForUserForDay as gT, fetchTradedMarketCount as gU, fetchTransaction as gV, isWalletDeployed as gW, listAccountTrades as gX, listActivity as gY, listBuilderLeaderboard as gZ, listBuilderTrades as g_, downloadAccountingSnapshot as ga, dropNotifications as gb, estimateMarketPrice as gc, executeCollateralReturnPlan as gd, fetchBalanceAllowance as ge, fetchBuilderFeeRates as gf, fetchBuilderVolume as gg, fetchClosedOnlyMode as gh, fetchCommentsById as gi, fetchEvent as gj, fetchEventLiveVolume as gk, fetchEventTags as gl, fetchExecuteParams as gm, fetchLastTradePrice as gn, fetchLastTradePrices as go, fetchMarket as gp, fetchMarketInfo as gq, fetchMarketTags as gr, fetchMidpoint as gs, fetchMidpoints as gt, fetchNegRisk as gu, fetchNotifications as gv, fetchOrder as gw, fetchOrderBook as gx, fetchOrderBooks as gy, fetchOrderScoring as gz, BaseSecureClient as h, listComboActivity as h0, listComboMarkets as h1, listComboPositions as h2, listComments as h3, listCommentsByUserAddress as h4, listCurrentRewards as h5, listEvents as h6, listMarketClarifications as h7, listMarketHolders as h8, listMarketPositions as h9, prepareErc20Transfer as hA, prepareGaslessTransaction as hB, prepareMergeComboPosition as hC, prepareMergeMarketPosition as hD, prepareMergePositions as hE, preparePerpsDeposit as hF, prepareRedeemComboPosition as hG, prepareRedeemMarketPositions as hH, prepareRedeemPositions as hI, prepareSplitComboPosition as hJ, prepareSplitMarketPosition as hK, prepareSplitPosition as hL, prepareTradingApprovals as hM, redeemPositions as hN, resolveConditionByToken as hO, revokePerpsCredentials as hP, search as hQ, setupTradingApprovals as hR, splitComboPosition as hS, splitMarketPosition as hT, splitPosition as hU, subscribe as hV, transferErc20 as hW, updateBalanceAllowance as hX, waitForOrderFillSettlement as hY, withdrawFromPerps as hZ, listMarketRewards as ha, listMarkets as hb, listOpenInterest as hc, listOpenOrders as hd, listPerpsCandles as he, listPerpsFundingHistory as hf, listPerpsTrades as hg, listPositions as hh, listSeries as hi, listTags as hj, listTeams as hk, listTraderLeaderboard as hl, listTrades as hm, listUserEarningsAndMarketsConfig as hn, listUserEarningsForDay as ho, mergeComboPosition as hp, mergeMarketPosition as hq, mergePositions as hr, openPerpsSession as hs, openRfqSession as ht, planCollateralReturn as hu, postOrder as hv, postOrders as hw, prepareCollateralReturnExecution as hx, prepareErc1155ApprovalForAll as hy, prepareErc20Approval as hz, type BeginAuthenticationRequest as i, type CancelAllPerpsOrdersRequest as j, CancelMarketOrdersError as k, CancelOrderError as l, CancelOrdersError as m, type CancelPerpsOrderRequest as n, type CancelPerpsOrdersRequest as o, CancelledSigningError as p, type Client as q, type ClientActions as r, type ClientDecorator as s, type ClobEndpoints as t, ComboPositionSort as u, type CombosEndpoints as v, ConnectionLostError as w, type ConnectionLostErrorOptions as x, type CreatePerpsSessionRequest as y, CreateSecureClientError as z };
|
|
8636
|
+
export { FetchMarketTagsError as $, type ApiKeyAuthorization as A, type BaseClient as B, CancelAllError as C, type CryptoPricesChainlinkTwapSubscription as D, type DataActions as E, DepositToPerpsError as F, type DepositToPerpsRequest as G, type DiscoveryActions as H, DownloadAccountingSnapshotError as I, DropNotificationsError as J, type EnvironmentConfig as K, type EnvironmentConfigFork as L, type EnvironmentContracts as M, EstimateMarketPriceError as N, ExecuteCollateralReturnPlanError as O, type ExecuteCollateralReturnPlanRequest as P, FetchClosedOnlyModeError as Q, FetchCommentsByIdError as R, type Signer as S, type TypedDataPayload as T, UserInputError as U, FetchEventError as V, FetchEventLiveVolumeError as W, FetchEventTagsError as X, FetchLastTradePriceError as Y, FetchLastTradePricesError as Z, FetchMarketError as _, type TypedData as a, ListPerpsTradesError as a$, FetchMidpointError as a0, FetchMidpointsError as a1, FetchNotificationsError as a2, FetchOrderBookError as a3, FetchOrderBooksError as a4, FetchOrderError as a5, FetchOrderScoringError as a6, FetchOrdersScoringError as a7, type FetchPerpsAccountConfigRequest as a8, FetchPerpsBookError as a9, ListActivityError as aA, ListBuilderLeaderboardError as aB, ListBuilderTradesError as aC, ListBuilderVolumeError as aD, ListClosedPositionsError as aE, ListComboActivityError as aF, ListComboMarketsError as aG, ListComboPositionsError as aH, ListCommentsByUserAddressError as aI, ListCommentsError as aJ, ListCurrentRewardsError as aK, ListEventsError as aL, ListMarketHoldersError as aM, ListMarketPositionsError as aN, ListMarketRewardsError as aO, ListMarketsError as aP, ListOpenInterestError as aQ, ListOpenOrdersError as aR, ListPerpsCandlesError as aS, type ListPerpsCandlesRequest as aT, type ListPerpsDepositsRequest as aU, type ListPerpsEquityHistoryRequest as aV, type ListPerpsFillsRequest as aW, ListPerpsFundingHistoryError as aX, type ListPerpsFundingHistoryRequest as aY, type ListPerpsFundingPaymentsRequest as aZ, type ListPerpsPnlHistoryRequest as a_, type FetchPerpsBookRequest as aa, FetchPerpsFeesError as ab, FetchPerpsInstrumentsError as ac, type FetchPerpsInstrumentsRequest as ad, type FetchPerpsOpenOrdersRequest as ae, type FetchPerpsOrdersRequest as af, FetchPerpsTickerError as ag, type FetchPerpsTickerRequest as ah, FetchPerpsTickersError as ai, type FetchPerpsTickersRequest as aj, FetchPortfolioValueError as ak, FetchPriceError as al, FetchPriceHistoryError as am, FetchPricesError as an, FetchPublicProfileError as ao, FetchRelatedTagResourcesError as ap, FetchRelatedTagsError as aq, FetchRewardPercentagesError as ar, FetchSeriesError as as, FetchSpreadError as at, FetchSpreadsError as au, FetchTagError as av, FetchTotalEarningsForUserForDayError as aw, FetchTradedMarketCountError as ax, InsufficientLiquidityError as ay, ListAccountTradesError as az, type TransactionCall as b, RfqConfirmationError as b$, type ListPerpsTradesRequest as b0, type ListPerpsWithdrawalsRequest as b1, ListPositionsError as b2, ListSeriesError as b3, ListTagsError as b4, ListTeamsError as b5, ListTraderLeaderboardError as b6, ListTradesError as b7, ListUserEarningsAndMarketsConfigError as b8, ListUserEarningsForDayError as b9, type PlacePerpsPositionTpSlRequest as bA, type PlacePerpsPositionTpSlResult as bB, PlanCollateralReturnError as bC, PostOrderError as bD, PostOrdersError as bE, type PostPerpsOrdersRequest as bF, type PublicAccountActions as bG, type PublicActions as bH, type PublicClient as bI, type PublicClientOptions as bJ, type PublicPerpsActions as bK, type PublicRewardsActions as bL, type PublicSubscriptionsActions as bM, RateLimitError as bN, type RateLimitErrorOptions as bO, RedeemPositionsError as bP, RequestRejectedError as bQ, type RequestRejectedErrorOptions as bR, type RestEndpoint as bS, type ResumePerpsSessionRequest as bT, RevokePerpsCredentialsError as bU, type RevokePerpsCredentialsRequest as bV, type RfqCancelQuoteAck as bW, RfqCancelQuoteError as bX, RfqCancelQuoteRejectedError as bY, type RfqCancelQuoteRejectedErrorOptions as bZ, type RfqConfirmationAck as b_, MergePositionsError as ba, OpenPerpsSessionError as bb, type OpenPerpsSessionRequest as bc, OpenRfqSessionError as bd, type Page as be, PageSizeSchema as bf, type Paginated as bg, type PerpsActions as bh, type PerpsBookDepth as bi, type PerpsEndpoints as bj, type PerpsOrderRequest as bk, type PerpsPlaceFokOrderRequest as bl, type PerpsPlaceGtcOrderRequest as bm, type PerpsPlaceIocOrderRequest as bn, type PerpsPlacedTpSlOrder as bo, type PerpsPlacedTpSlOrders as bp, type PerpsPositionTpSlTrigger as bq, PerpsSession as br, type PerpsSessionAccountError as bs, type PerpsSessionLifecycleError as bt, type PerpsSessionTradingError as bu, type PerpsTpSlTrigger as bv, type PlacePerpsOrderRequest as bw, type PlacePerpsOrderResult as bx, type PlacePerpsOrderWithTpSlRequest as by, type PlacePerpsOrderWithTpSlResult as bz, type AccountIdentity as c, discoveryActions as c$, RfqConfirmationRejectedError as c0, type RfqConfirmationRequestEvent as c1, type RfqEvent as c2, RfqQuoteError as c3, type RfqQuoteReference as c4, RfqQuoteRejectedError as c5, type RfqQuoteRejectedErrorOptions as c6, type RfqQuoteRequestEvent as c7, type RfqQuoteResponse as c8, type RfqQuoteSource as c9, SplitPositionError as cA, SubscribeError as cB, TimeoutError as cC, TransactionFailedError as cD, type TransactionHandle as cE, type TransactionOutcome as cF, TransferErc20Error as cG, TransportError as cH, type TypedDataDomain as cI, type TypedDataField as cJ, UnexpectedResponseError as cK, UpdatePerpsLeverageError as cL, type UpdatePerpsLeverageRequest as cM, WaitForOrderFillSettlementError as cN, WaitForTransactionError as cO, type WalletDerivationConfig as cP, type WebSocketCloseCode as cQ, type WebSocketEndpoint as cR, WebSocketKnownCloseCode as cS, WithdrawFromPerpsError as cT, type WithdrawFromPerpsRequest as cU, accountActions as cV, allActions as cW, analyticsActions as cX, createPublicClient as cY, createSecureClient as cZ, dataActions as c_, type RfqSession as ca, type RfqTradeEvent as cb, SearchError as cc, SearchSort as cd, type SecureAccountActions as ce, type SecureActions as cf, type SecureClient as cg, type SecureClientOptions as ch, type SecureDownloadAccountingSnapshotRequest as ci, type SecureFetchPortfolioValueRequest as cj, type SecureFetchTradedMarketCountRequest as ck, type SecureListActivityRequest as cl, type SecureListClosedPositionsRequest as cm, type SecureListComboActivityRequest as cn, type SecureListComboPositionsRequest as co, type SecureListPositionsRequest as cp, type SecurePerpsActions as cq, type SecureRewardsActions as cr, type SecureRfqActions as cs, type SecureSubscriptionsActions as ct, type SecureTradingActions as cu, type SecureWalletActions as cv, SetupGaslessWalletError as cw, SetupTradingApprovalsError as cx, type SignerTransactionRequest as cy, SigningError as cz, type AnalyticsActions as d, type FetchPricesRequest as d$, forkEnvironmentConfig as d0, makeErrorGuard as d1, perpsActions as d2, production as d3, rewardsActions as d4, rfqActions as d5, subscriptionsActions as d6, tradingActions as d7, walletActions as d8, type CancelMarketOrdersRequest as d9, FetchBuilderFeeRatesError as dA, type FetchBuilderFeeRatesRequest as dB, type FetchCommentsByIdRequest as dC, type FetchEventLiveVolumeRequest as dD, type FetchEventRequest as dE, type FetchEventTagsRequest as dF, FetchExecuteParamsError as dG, type FetchExecuteParamsRequest as dH, type FetchGaslessTransactionRequest as dI, type FetchLastTradePriceRequest as dJ, type FetchLastTradePricesRequest as dK, FetchMarketInfoError as dL, type FetchMarketInfoRequest as dM, type FetchMarketRequest as dN, type FetchMarketTagsRequest as dO, type FetchMidpointRequest as dP, type FetchMidpointsRequest as dQ, FetchNegRiskError as dR, type FetchNegRiskRequest as dS, type FetchOrderBookRequest as dT, type FetchOrderBooksRequest as dU, type FetchOrderRequest as dV, type FetchOrderScoringRequest as dW, type FetchOrdersScoringRequest as dX, type FetchPortfolioValueRequest as dY, type FetchPriceHistoryRequest as dZ, type FetchPriceRequest as d_, type CancelOrderRequest as da, type CancelOrdersRequest as db, type CollateralReturnExecutionWorkflow as dc, type CommentsEventType as dd, type CommentsSubscription as de, type CryptoPricesEventType as df, type CryptoPricesSubscription as dg, DeployDepositWalletError as dh, type DownloadAccountingSnapshotRequest as di, type DropNotificationsRequest as dj, type EquityPricesEventType as dk, type EquityPricesSubscription as dl, type Erc1155ApprovalForAllWorkflow as dm, type Erc1155ApprovalForAllWorkflowRequest as dn, type Erc20ApprovalWorkflow as dp, type Erc20ApprovalWorkflowRequest as dq, type Erc20TransferWorkflow as dr, type Erc20TransferWorkflowRequest as ds, type EstimateMarketBuyPriceRequest as dt, type EstimateMarketPriceRequest as du, type EstimateMarketSellPriceRequest as dv, type EventForSubscriptionSpec as dw, type EventForSubscriptionSpecs as dx, FetchBalanceAllowanceError as dy, type FetchBalanceAllowanceRequest as dz, ApproveErc1155ForAllError as e, type PerpsStreamingCandleInterval as e$, type FetchPublicProfileRequest as e0, type FetchRelatedTagResourcesRequest as e1, type FetchRelatedTagsRequest as e2, type FetchSeriesRequest as e3, type FetchSpreadRequest as e4, type FetchSpreadsRequest as e5, type FetchTagRequest as e6, FetchTickSizeError as e7, type FetchTickSizeRequest as e8, type FetchTotalEarningsForUserForDayRequest as e9, type ListOpenOrdersRequest as eA, type ListPositionsRequest as eB, type ListSeriesRequest as eC, type ListTagsRequest as eD, type ListTeamsRequest as eE, type ListTraderLeaderboardRequest as eF, type ListTradesRequest as eG, type ListUserEarningsAndMarketsConfigRequest as eH, type ListUserEarningsForDayRequest as eI, type MarketEventType as eJ, type MarketSubscription as eK, MergeComboPositionError as eL, MergeMarketPositionError as eM, type MergePositionsWorkflow as eN, type MergePositionsWorkflowRequest as eO, type OrderDraft as eP, type OrderPostingWorkflow as eQ, type OrderWorkflow as eR, type OrderWorkflowRequest as eS, type PerpsBboSubscription as eT, type PerpsBookSubscription as eU, type PerpsCandlesSubscription as eV, type PerpsDepositWorkflow as eW, type PerpsDepositWorkflowRequest as eX, type PerpsMarketDataEventType as eY, type PerpsMarketDataSubscription as eZ, type PerpsStatisticsSubscription as e_, type FetchTradedMarketCountRequest as ea, GaslessTransactionMetadataSchema as eb, type GaslessWorkflow as ec, type GaslessWorkflowRequest as ed, IsWalletDeployedError as ee, type IsWalletDeployedRequest as ef, type ListAccountTradesRequest as eg, type ListActivityRequest as eh, type ListBuilderLeaderboardRequest as ei, type ListBuilderTradesRequest as ej, type ListBuilderVolumeRequest as ek, type ListClosedPositionsRequest as el, type ListComboActivityRequest as em, type ListComboMarketsRequest as en, type ListComboPositionsRequest as eo, type ListCommentsByUserAddressRequest as ep, type ListCommentsRequest as eq, type ListCurrentRewardsRequest as er, type ListEventsRequest as es, ListMarketClarificationsError as et, type ListMarketClarificationsRequest as eu, type ListMarketHoldersRequest as ev, type ListMarketPositionsRequest as ew, type ListMarketRewardsRequest as ex, type ListMarketsRequest as ey, type ListOpenInterestRequest as ez, ApproveErc20Error as f, type UpdateBalanceAllowanceRequest as f$, type PerpsTickersSubscription as f0, type PerpsTradesSubscription as f1, type PostOrdersRequest as f2, PrepareCollateralReturnExecutionError as f3, PrepareErc1155ApprovalForAllError as f4, type PrepareErc1155ApprovalForAllRequest as f5, PrepareErc20ApprovalError as f6, type PrepareErc20ApprovalRequest as f7, PrepareErc20TransferError as f8, type PrepareErc20TransferRequest as f9, type PrepareSplitPositionRequest as fA, PrepareTradingApprovalsError as fB, type PublicRealtimeEvent as fC, type PublicRealtimeTopic as fD, type PublicSubscriptionSpec as fE, type RedeemPositionsWorkflow as fF, type RedeemPositionsWorkflowRequest as fG, ResolveConditionByTokenError as fH, type ResolveConditionByTokenRequest as fI, type RfqConfirmationRejectedErrorOptions as fJ, type RfqExecutionUpdateEvent as fK, type SearchRequest as fL, type SearchResults as fM, type SecureRealtimeEvent as fN, type SecureRealtimeTopic as fO, type SecureSubscriptionSpec as fP, type SignedOrder as fQ, SplitComboPositionError as fR, SplitMarketPositionError as fS, type SplitPositionWorkflow as fT, type SplitPositionWorkflowRequest as fU, type SportsEventType as fV, type SportsSubscription as fW, type SubscriptionHandle as fX, type TradingApprovalsWorkflow as fY, type TradingApprovalsWorkflowRequest as fZ, UpdateBalanceAllowanceError as f_, PrepareGaslessTransactionError as fa, type PrepareGaslessTransactionRequest as fb, type PrepareLimitOrderRequest as fc, type PrepareMarketBuyOrderRequest as fd, type PrepareMarketOrderRequest as fe, type PrepareMarketSellOrderRequest as ff, PrepareMergeComboPositionError as fg, type PrepareMergeComboPositionRequest as fh, PrepareMergeMarketPositionError as fi, type PrepareMergeMarketPositionRequest as fj, PrepareMergePositionsError as fk, type PrepareMergePositionsRequest as fl, PreparePerpsDepositError as fm, PrepareRedeemComboPositionError as fn, type PrepareRedeemComboPositionRequest as fo, type PrepareRedeemMarketPositionsByConditionIdRequest as fp, type PrepareRedeemMarketPositionsByMarketIdRequest as fq, PrepareRedeemMarketPositionsError as fr, type PrepareRedeemMarketPositionsRequest as fs, PrepareRedeemPositionsError as ft, type PrepareRedeemPositionsRequest as fu, PrepareSplitComboPositionError as fv, type PrepareSplitComboPositionRequest as fw, PrepareSplitMarketPositionError as fx, type PrepareSplitMarketPositionRequest as fy, PrepareSplitPositionError as fz, BasePublicClient as g, listBuilderLeaderboard as g$, type UserEventType as g0, type UserSubscription as g1, WaitForGaslessTransactionError as g2, type WaitForOrderFillSettlementRequest as g3, approveErc1155ForAll as g4, approveErc20 as g5, cancelAll as g6, cancelMarketOrders as g7, cancelOrder as g8, cancelOrders as g9, fetchOrderBooks as gA, fetchOrderScoring as gB, fetchOrdersScoring as gC, fetchPerpsBook as gD, fetchPerpsFees as gE, fetchPerpsInstruments as gF, fetchPerpsTicker as gG, fetchPerpsTickers as gH, fetchPortfolioValue as gI, fetchPrice as gJ, fetchPriceHistory as gK, fetchPrices as gL, fetchPublicProfile as gM, fetchRelatedTagResources as gN, fetchRelatedTags as gO, fetchRewardPercentages as gP, fetchSeries as gQ, fetchSpread as gR, fetchSpreads as gS, fetchTag as gT, fetchTickSize as gU, fetchTotalEarningsForUserForDay as gV, fetchTradedMarketCount as gW, fetchTransaction as gX, isWalletDeployed as gY, listAccountTrades as gZ, listActivity as g_, deployDepositWallet as ga, depositToPerps as gb, downloadAccountingSnapshot as gc, dropNotifications as gd, estimateMarketPrice as ge, executeCollateralReturnPlan as gf, fetchBalanceAllowance as gg, fetchBuilderFeeRates as gh, fetchBuilderVolume as gi, fetchClosedOnlyMode as gj, fetchCommentsById as gk, fetchEvent as gl, fetchEventLiveVolume as gm, fetchEventTags as gn, fetchExecuteParams as go, fetchLastTradePrice as gp, fetchLastTradePrices as gq, fetchMarket as gr, fetchMarketInfo as gs, fetchMarketTags as gt, fetchMidpoint as gu, fetchMidpoints as gv, fetchNegRisk as gw, fetchNotifications as gx, fetchOrder as gy, fetchOrderBook as gz, BaseSecureClient as h, withdrawFromPerps as h$, listBuilderTrades as h0, listClosedPositions as h1, listComboActivity as h2, listComboMarkets as h3, listComboPositions as h4, listComments as h5, listCommentsByUserAddress as h6, listCurrentRewards as h7, listEvents as h8, listMarketClarifications as h9, prepareErc1155ApprovalForAll as hA, prepareErc20Approval as hB, prepareErc20Transfer as hC, prepareGaslessTransaction as hD, prepareMergeComboPosition as hE, prepareMergeMarketPosition as hF, prepareMergePositions as hG, preparePerpsDeposit as hH, prepareRedeemComboPosition as hI, prepareRedeemMarketPositions as hJ, prepareRedeemPositions as hK, prepareSplitComboPosition as hL, prepareSplitMarketPosition as hM, prepareSplitPosition as hN, prepareTradingApprovals as hO, redeemPositions as hP, resolveConditionByToken as hQ, revokePerpsCredentials as hR, search as hS, setupTradingApprovals as hT, splitComboPosition as hU, splitMarketPosition as hV, splitPosition as hW, subscribe as hX, transferErc20 as hY, updateBalanceAllowance as hZ, waitForOrderFillSettlement as h_, listMarketHolders as ha, listMarketPositions as hb, listMarketRewards as hc, listMarkets as hd, listOpenInterest as he, listOpenOrders as hf, listPerpsCandles as hg, listPerpsFundingHistory as hh, listPerpsTrades as hi, listPositions as hj, listSeries as hk, listTags as hl, listTeams as hm, listTraderLeaderboard as hn, listTrades as ho, listUserEarningsAndMarketsConfig as hp, listUserEarningsForDay as hq, mergeComboPosition as hr, mergeMarketPosition as hs, mergePositions as ht, openPerpsSession as hu, openRfqSession as hv, planCollateralReturn as hw, postOrder as hx, postOrders as hy, prepareCollateralReturnExecution as hz, type BeginAuthenticationRequest as i, type CancelAllPerpsOrdersRequest as j, CancelMarketOrdersError as k, CancelOrderError as l, CancelOrdersError as m, type CancelPerpsOrderRequest as n, type CancelPerpsOrdersRequest as o, CancelledSigningError as p, type Client as q, type ClientActions as r, type ClientDecorator as s, type ClobEndpoints as t, ComboPositionSort as u, type CombosEndpoints as v, ConnectionLostError as w, type ConnectionLostErrorOptions as x, type CreatePerpsSessionRequest as y, CreateSecureClientError as z };
|
package/dist/viem.d.ts
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { PrivateKey } from '@polymarket/types';
|
|
2
2
|
import { Chain, Transport, WalletClient } from 'viem';
|
|
3
|
-
import { S as Signer } from './types-
|
|
3
|
+
import { S as Signer } from './types-CJLEdIu5.js';
|
|
4
4
|
import '@polymarket/bindings';
|
|
5
5
|
import '@polymarket/bindings/gamma';
|
|
6
6
|
import '@polymarket/bindings/relayer';
|
package/dist/viem.js
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import {a,l,j,i,h,c as c$1}from'./chunk-
|
|
1
|
+
import {a,l,j,i,h,c as c$1}from'./chunk-4LDMO37Q.js';import {invariant,expectEvmAddress,expectEvmSignature,isPrivateKey,expectTxHash}from'@polymarket/types';import {createWalletClient,http,UserRejectedRequestError,TransactionExecutionError,WaitForTransactionReceiptTimeoutError}from'viem';import {privateKeyToAccount}from'viem/accounts';import {waitForTransactionReceipt}from'viem/actions';import {polygon}from'viem/chains';function H(t){return t.account!==void 0}function q(t){invariant(H(t),"Wallet client with account is required");let n=t.account,e=expectEvmAddress(typeof t.account=="string"?t.account:t.account.address);return {getAddress(){return Promise.resolve(e)},async signTypedData(r){return expectEvmSignature(await I(t,{account:n,...r}))},async signMessage(r){return expectEvmSignature(await R(t,{account:n,message:{raw:r}}))},async sendTransaction({chainId:r,...f}){await K(t,r);let m=await A(t,{account:n,...f});return new s(m,t)}}}function b(t,n={}){if(!isPrivateKey(t))throw new a("Expected a hex-encoded 32-byte private key.");return q(createWalletClient({account:privateKeyToAccount(t),chain:n.chain??polygon,transport:n.transport??http()}))}async function A(t,n){try{let e=await t.sendTransaction(n);return expectTxHash(e)}catch(e){c(e);}}async function K(t,n){try{let e=t.chain?.id??await t.getChainId();if(e!==n)throw new l(`Wallet client is connected to chain ${e}, expected ${n}`)}catch(e){throw e instanceof l?e:l.fromError(e,"Could not resolve wallet client chain ID")}}async function I(t,n){try{return await t.signTypedData(n)}catch(e){c(e);}}async function R(t,n){try{return await t.signMessage(n)}catch(e){c(e);}}function c(t){if(t instanceof UserRejectedRequestError)throw j.fromError(t);if(t instanceof TransactionExecutionError){let n=t.walk(e=>e instanceof UserRejectedRequestError);if(n)throw j.fromError(n)}throw l.fromError(t)}var s=class{transactionId=null;#t;#n;constructor(n,e){this.#t=expectTxHash(n),this.#n=e;}get transactionHash(){return this.#t}async wait(){try{let n=await waitForTransactionReceipt(this.#n,{hash:this.#t}),e=expectTxHash(n.transactionHash);if(this.#t=e,n.status==="reverted")throw new i(`Transaction ${e} reverted`);return {transactionHash:e,transactionId:null}}catch(n){throw n instanceof WaitForTransactionReceiptTimeoutError?new h(`Timed out waiting for transaction ${this.#t} to settle`,{cause:n}):c$1.fromError(n)}}};export{b as privateKey,q as signerFrom};//# sourceMappingURL=viem.js.map
|
|
2
2
|
//# sourceMappingURL=viem.js.map
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@polymarket/client",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.3.0-beta.0",
|
|
4
4
|
"description": "The Polymarket TypeScript client",
|
|
5
5
|
"repository": {
|
|
6
6
|
"type": "git",
|
|
@@ -93,7 +93,7 @@
|
|
|
93
93
|
"ky": "^1.14.3",
|
|
94
94
|
"ox": "^0.14.16",
|
|
95
95
|
"zod": "^4.3.6",
|
|
96
|
-
"@polymarket/bindings": "0.
|
|
96
|
+
"@polymarket/bindings": "0.3.0-beta.0",
|
|
97
97
|
"@polymarket/types": "0.1.0"
|
|
98
98
|
},
|
|
99
99
|
"publishConfig": {
|
package/dist/chunk-3GYPYD7Z.js
DELETED
|
@@ -1,2 +0,0 @@
|
|
|
1
|
-
import {PolymarketError}from'@polymarket/types';var e=class t extends PolymarketError{name="TransportError";constructor(r,s={}){super(r,s);}static fromError(r){return new t(r instanceof Error?r.message:"Request failed",{cause:r})}};var a=class extends PolymarketError{name="TimeoutError";constructor(r,s={}){super(r,s);}},o=class extends PolymarketError{name="TransactionFailedError";constructor(r,s={}){super(r,s);}},i=class t extends PolymarketError{name="CancelledSigningError";constructor(r,s={}){super(r,s);}static fromError(r){return new t(r.message,{cause:r})}};var u=class t extends PolymarketError{name="SigningError";constructor(r,s={}){super(r,s);}static fromError(r,s){let p=s??(r instanceof Error?r.message:"Signing failed");return new t(p,{cause:r})}};export{e as a,a as b,o as c,i as d,u as e};//# sourceMappingURL=chunk-3GYPYD7Z.js.map
|
|
2
|
-
//# sourceMappingURL=chunk-3GYPYD7Z.js.map
|