@0xmonaco/core 1.0.59 → 1.0.61

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.
@@ -9,6 +9,7 @@ export * from "./buildercodes";
9
9
  export * from "./delegated-agents";
10
10
  export * from "./faucet";
11
11
  export * from "./fees";
12
+ export * from "./managed-markets";
12
13
  export * from "./margin-accounts";
13
14
  export * from "./market";
14
15
  export * from "./orderbook";
package/dist/api/index.js CHANGED
@@ -9,6 +9,7 @@ export * from "./buildercodes";
9
9
  export * from "./delegated-agents";
10
10
  export * from "./faucet";
11
11
  export * from "./fees";
12
+ export * from "./managed-markets";
12
13
  export * from "./margin-accounts";
13
14
  export * from "./market";
14
15
  export * from "./orderbook";
@@ -0,0 +1,8 @@
1
+ import type { ClaimManagedMarketLeaseRequest, ListManagedMarketAssignmentsRequest, ListManagedMarketAssignmentsResponse, ManagedMarketLease, ManagedMarketQuoteStatus, ManagedMarketsAPI, RefreshManagedMarketQuotesRequest } from "@0xmonaco/types";
2
+ import { BaseAPI } from "../base";
3
+ /** Managed quote intents use the existing wallet session and never move funding. */
4
+ export declare class ManagedMarketsAPIImpl extends BaseAPI implements ManagedMarketsAPI {
5
+ listAssignments(request?: ListManagedMarketAssignmentsRequest): Promise<ListManagedMarketAssignmentsResponse>;
6
+ claimLease(launchId: string, request: ClaimManagedMarketLeaseRequest): Promise<ManagedMarketLease>;
7
+ refreshQuotes(launchId: string, request: RefreshManagedMarketQuotesRequest): Promise<ManagedMarketQuoteStatus>;
8
+ }
@@ -0,0 +1,24 @@
1
+ import { BaseAPI } from "../base";
2
+ /** Managed quote intents use the existing wallet session and never move funding. */
3
+ export class ManagedMarketsAPIImpl extends BaseAPI {
4
+ async listAssignments(request = {}) {
5
+ const query = new URLSearchParams();
6
+ if (request.page !== undefined)
7
+ query.set("page", String(request.page));
8
+ if (request.pageSize !== undefined)
9
+ query.set("pageSize", String(request.pageSize));
10
+ return this.makeAuthenticatedRequest(`/api/v1/managed-markets/assignments${query.size ? `?${query}` : ""}`);
11
+ }
12
+ async claimLease(launchId, request) {
13
+ return this.makeAuthenticatedRequest(`/api/v1/managed-markets/${encodeURIComponent(launchId)}/lease`, {
14
+ method: "POST",
15
+ body: JSON.stringify(request),
16
+ });
17
+ }
18
+ async refreshQuotes(launchId, request) {
19
+ return this.makeAuthenticatedRequest(`/api/v1/managed-markets/${encodeURIComponent(launchId)}/quotes`, {
20
+ method: "POST",
21
+ body: JSON.stringify(request),
22
+ });
23
+ }
24
+ }
@@ -123,6 +123,7 @@ export class MarginAccountsAPIImpl extends BaseAPI {
123
123
  quantity: request.quantity,
124
124
  leverage: request.leverage,
125
125
  reduceOnly: request.reduceOnly,
126
+ slippageToleranceBps: request.slippageToleranceBps,
126
127
  }),
127
128
  });
128
129
  }
@@ -139,6 +140,7 @@ export class MarginAccountsAPIImpl extends BaseAPI {
139
140
  quantity: request.quantity,
140
141
  leverage: request.leverage,
141
142
  reduceOnly: request.reduceOnly,
143
+ slippageToleranceBps: request.slippageToleranceBps,
142
144
  }),
143
145
  });
144
146
  }
@@ -150,7 +152,9 @@ export class MarginAccountsAPIImpl extends BaseAPI {
150
152
  tradingPairId: request.tradingPairId,
151
153
  strategyKey: request.strategyKey,
152
154
  marginMode: request.marginMode,
153
- selectedTradingPairIds: request.selectedTradingPairIds,
155
+ // No selectedTradingPairIds: cross scope is derived from trading, and
156
+ // the server ignores the deprecated field. Not sending it keeps a
157
+ // pre-upgrade caller's stale list from reaching the wire at all.
154
158
  side: request.side,
155
159
  positionSide: request.positionSide,
156
160
  orderType: request.orderType,
@@ -158,6 +162,7 @@ export class MarginAccountsAPIImpl extends BaseAPI {
158
162
  quantity: request.quantity,
159
163
  leverage: request.leverage,
160
164
  reduceOnly: request.reduceOnly,
165
+ slippageToleranceBps: request.slippageToleranceBps,
161
166
  }),
162
167
  });
163
168
  }
@@ -38,6 +38,9 @@ export declare const COVERED: {
38
38
  get_market_stats: string;
39
39
  get_my_fee_tier: string;
40
40
  get_pulse: string;
41
+ list_managed_market_assignments: string;
42
+ claim_managed_market_lease: string;
43
+ refresh_managed_market_quotes: string;
41
44
  get_sweeper_chains: string;
42
45
  get_my_trader_code: string;
43
46
  get_rewards_balance: string;
package/dist/coverage.js CHANGED
@@ -38,6 +38,9 @@ export const COVERED = {
38
38
  get_market_stats: "getMarketStats",
39
39
  get_my_fee_tier: "getMyFeeTier",
40
40
  get_pulse: "pulse.getPulse",
41
+ list_managed_market_assignments: "managedMarkets.listAssignments",
42
+ claim_managed_market_lease: "managedMarkets.claimLease",
43
+ refresh_managed_market_quotes: "managedMarkets.refreshQuotes",
41
44
  get_sweeper_chains: "sweeper.getChains",
42
45
  get_my_trader_code: "pitpass.getMyTraderCode",
43
46
  get_rewards_balance: "pitpass.getRewardsBalance",
package/dist/sdk.d.ts CHANGED
@@ -1,4 +1,4 @@
1
- import type { ApplicationsAPI, AuthAPI, AuthState, BuildercodesAPI, DelegatedAgentsAPI, FaucetAPI, FeesAPI, MarginAccountsAPI, MarketAPI, MonacoSDK, Network, PitpassAPI, PortfolioAPI, PositionsAPI, ProfileAPI, PulseAPI, SDKConfig, SubAccountsAPI, SweeperAPI, TradingAPI, VaultAPI, WhitelistAPI, WithdrawalsAPI } from "@0xmonaco/types";
1
+ import type { ApplicationsAPI, AuthAPI, AuthState, BuildercodesAPI, DelegatedAgentsAPI, FaucetAPI, FeesAPI, ManagedMarketsAPI, MarginAccountsAPI, MarketAPI, MonacoSDK, Network, PitpassAPI, PortfolioAPI, PositionsAPI, ProfileAPI, PulseAPI, SDKConfig, SubAccountsAPI, SweeperAPI, TradingAPI, VaultAPI, WhitelistAPI, WithdrawalsAPI } from "@0xmonaco/types";
2
2
  import { type Address, type PublicClient, type TransactionReceipt, type WalletClient } from "viem";
3
3
  import { type MonacoWebSocket, OrderbookAPIImpl, TradesAPIImpl } from "./api";
4
4
  export declare class MonacoSDKImpl implements MonacoSDK {
@@ -18,6 +18,7 @@ export declare class MonacoSDKImpl implements MonacoSDK {
18
18
  subAccounts: SubAccountsAPI;
19
19
  faucet: FaucetAPI;
20
20
  sweeper: SweeperAPI;
21
+ managedMarkets: ManagedMarketsAPI;
21
22
  whitelist: WhitelistAPI;
22
23
  profile: ProfileAPI;
23
24
  pulse: PulseAPI;
package/dist/sdk.js CHANGED
@@ -7,6 +7,7 @@ import { BuildercodesAPIImpl } from "./api/buildercodes";
7
7
  import { DelegatedAgentsAPIImpl } from "./api/delegated-agents";
8
8
  import { FaucetAPIImpl } from "./api/faucet";
9
9
  import { FeesAPIImpl } from "./api/fees";
10
+ import { ManagedMarketsAPIImpl } from "./api/managed-markets";
10
11
  import { MarginAccountsAPIImpl } from "./api/margin-accounts";
11
12
  import { MarketAPIImpl } from "./api/market";
12
13
  import { PitpassAPIImpl } from "./api/pitpass";
@@ -57,6 +58,7 @@ export class MonacoSDKImpl {
57
58
  subAccounts;
58
59
  faucet;
59
60
  sweeper;
61
+ managedMarkets;
60
62
  whitelist;
61
63
  profile;
62
64
  pulse;
@@ -89,6 +91,7 @@ export class MonacoSDKImpl {
89
91
  this.subAccounts.setSessionKeypair(credentials);
90
92
  this.faucet.setSessionKeypair(credentials);
91
93
  this.sweeper.setSessionKeypair(credentials);
94
+ this.managedMarkets.setSessionKeypair(credentials);
92
95
  this.whitelist.setSessionKeypair(credentials);
93
96
  this.pulse.setSessionKeypair(credentials);
94
97
  this.profile.setSessionKeypair(credentials);
@@ -130,6 +133,7 @@ export class MonacoSDKImpl {
130
133
  this.subAccounts.setServerKey(serverKey);
131
134
  this.faucet.setServerKey(serverKey);
132
135
  this.sweeper.setServerKey(serverKey);
136
+ this.managedMarkets.setServerKey(serverKey);
133
137
  this.whitelist.setServerKey(serverKey);
134
138
  this.pulse.setServerKey(serverKey);
135
139
  this.profile.setServerKey(serverKey);
@@ -197,6 +201,7 @@ export class MonacoSDKImpl {
197
201
  this.subAccounts = configureSigning(new SubAccountsAPIImpl(apiUrl));
198
202
  this.faucet = configureSigning(new FaucetAPIImpl(apiUrl));
199
203
  this.sweeper = configureSigning(new SweeperAPIImpl(apiUrl));
204
+ this.managedMarkets = configureSigning(new ManagedMarketsAPIImpl(apiUrl));
200
205
  this.whitelist = configureSigning(new WhitelistAPIImpl(apiUrl));
201
206
  this.pulse = configureSigning(new PulseAPIImpl(apiUrl));
202
207
  this.auth = configureSigning(new AuthAPIImpl(this.walletClient, this.chain, apiUrl));
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@0xmonaco/core",
3
- "version": "1.0.59",
3
+ "version": "1.0.61",
4
4
  "type": "module",
5
5
  "homepage": "https://docs.0xmonaco.com/sdk/typescript",
6
6
  "main": "./dist/index.js",
@@ -19,8 +19,8 @@
19
19
  "viem": "^2.45.2"
20
20
  },
21
21
  "dependencies": {
22
- "@0xmonaco/contracts": "1.0.59",
23
- "@0xmonaco/types": "1.0.59",
22
+ "@0xmonaco/contracts": "1.0.61",
23
+ "@0xmonaco/types": "1.0.61",
24
24
  "@noble/curves": "^1.9.1",
25
25
  "@noble/hashes": "^2.4.0",
26
26
  "http-status-codes": "^2.3.0"