@0xmonaco/core 1.0.86 → 1.0.88

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.
@@ -233,6 +233,8 @@ export class AuthAPIImpl extends BaseAPI {
233
233
  // predates the fields (no `isNewUser: undefined` key).
234
234
  ...(responseBody.isNewUser !== undefined ? { isNewUser: responseBody.isNewUser } : {}),
235
235
  ...(responseBody.referralApplied !== undefined ? { referralApplied: responseBody.referralApplied } : {}),
236
+ // The server sends `null` when the code applied or none was presented.
237
+ ...(responseBody.referralNotAppliedReason != null ? { referralNotAppliedReason: responseBody.referralNotAppliedReason } : {}),
236
238
  };
237
239
  }
238
240
  /** Mint one code: one initial allowance plus one per 250,000 USDC of Mainnet volume. */
@@ -30,14 +30,19 @@ export declare class BuildercodesAPIImpl extends BaseAPI implements Buildercodes
30
30
  * application's configured payout address.
31
31
  */
32
32
  getConfig(): Promise<GetBuildercodesConfigResponse>;
33
- /** Set this frontend's builder fee. */
33
+ /**
34
+ * Set this frontend's builder fee and, when `makerBps` is given, its maker
35
+ * add-on, in one change. Omitting `makerBps` leaves the maker add-on as it
36
+ * is. A new maker add-on applies to orders placed shortly after it is saved.
37
+ */
34
38
  setBuilderFee(params: SetBuilderFeeParams): Promise<SetBuilderFeeResponse>;
35
39
  /** List this frontend's builder-fee audit log, newest first. */
36
40
  listBuilderFeeChanges(params?: ListBuilderFeeChangesParams): Promise<ListBuilderFeeChangesResponse>;
37
41
  /**
38
42
  * List this frontend's per-trade BuilderCodes credits, newest first. Each
39
- * credit carries its payout `kind`: `REVENUE_SHARE` for Monaco revenue share
40
- * or `BUILDER_FEE` for builder fees charged to takers. Pass `kind` to filter
43
+ * credit carries its payout `kind`: `REVENUE_SHARE` for Monaco revenue share,
44
+ * `BUILDER_FEE` for builder fees charged to takers, or `BUILDER_MAKER_FEE`
45
+ * for maker add-ons charged to makers. Pass `kind` to filter
41
46
  * the list; `total` then counts only that category.
42
47
  *
43
48
  * The server scopes every query to the authenticated application; neither
@@ -102,12 +102,17 @@ export class BuildercodesAPIImpl extends BaseAPI {
102
102
  method: "GET",
103
103
  });
104
104
  }
105
- /** Set this frontend's builder fee. */
105
+ /**
106
+ * Set this frontend's builder fee and, when `makerBps` is given, its maker
107
+ * add-on, in one change. Omitting `makerBps` leaves the maker add-on as it
108
+ * is. A new maker add-on applies to orders placed shortly after it is saved.
109
+ */
106
110
  async setBuilderFee(params) {
107
111
  const validated = validate(SetBuilderFeeParamsSchema, params);
112
+ const body = validated.makerBps === undefined ? { bps: validated.bps } : { bps: validated.bps, makerBps: validated.makerBps };
108
113
  return this.makeAuthenticatedRequest("/api/v1/buildercodes/builder-fee", {
109
114
  method: "PUT",
110
- body: JSON.stringify({ bps: validated.bps }),
115
+ body: JSON.stringify(body),
111
116
  });
112
117
  }
113
118
  /** List this frontend's builder-fee audit log, newest first. */
@@ -128,8 +133,9 @@ export class BuildercodesAPIImpl extends BaseAPI {
128
133
  }
129
134
  /**
130
135
  * List this frontend's per-trade BuilderCodes credits, newest first. Each
131
- * credit carries its payout `kind`: `REVENUE_SHARE` for Monaco revenue share
132
- * or `BUILDER_FEE` for builder fees charged to takers. Pass `kind` to filter
136
+ * credit carries its payout `kind`: `REVENUE_SHARE` for Monaco revenue share,
137
+ * `BUILDER_FEE` for builder fees charged to takers, or `BUILDER_MAKER_FEE`
138
+ * for maker add-ons charged to makers. Pass `kind` to filter
133
139
  * the list; `total` then counts only that category.
134
140
  *
135
141
  * The server scopes every query to the authenticated application; neither
@@ -15,7 +15,6 @@ export * from "./margin-accounts";
15
15
  export * from "./market";
16
16
  export * from "./orderbook";
17
17
  export * from "./perp";
18
- export * from "./pitpass";
19
18
  export * from "./portfolio";
20
19
  export * from "./positions";
21
20
  export * from "./profile";
package/dist/api/index.js CHANGED
@@ -15,7 +15,6 @@ export * from "./margin-accounts";
15
15
  export * from "./market";
16
16
  export * from "./orderbook";
17
17
  export * from "./perp";
18
- export * from "./pitpass";
19
18
  export * from "./portfolio";
20
19
  export * from "./positions";
21
20
  export * from "./profile";
@@ -90,7 +90,7 @@ export declare class TradingAPIImpl extends BaseAPI implements TradingAPI {
90
90
  postOnly?: boolean;
91
91
  selfTradePreventionMode?: SelfTradePreventionMode;
92
92
  clientOrderId?: string;
93
- /** Generated once per call when omitted. Supply the same key to retry a logical order within 24 hours. */
93
+ /** Generated once per call when omitted. Supply the same key to retry a logical order within 15 minutes. */
94
94
  idempotencyKey?: string;
95
95
  takeProfit?: ParentTpSlLegParams;
96
96
  stopLoss?: ParentTpSlLegParams;
@@ -157,7 +157,7 @@ export declare class TradingAPIImpl extends BaseAPI implements TradingAPI {
157
157
  /** Trailing stop that arms when this order fully fills; margin entry orders only. */
158
158
  trailingStop?: ParentTrailingStopLegParams;
159
159
  clientOrderId?: string;
160
- /** Generated once per call when omitted. Supply the same key to retry a logical order within 24 hours. */
160
+ /** Generated once per call when omitted. Supply the same key to retry a logical order within 15 minutes. */
161
161
  idempotencyKey?: string;
162
162
  }): Promise<CreateOrderResponse>;
163
163
  /**
@@ -28,8 +28,12 @@ import { ApproveTokenSchema, DepositSchema, validate, WithdrawSchema } from "@0x
28
28
  import { erc20Abi } from "viem";
29
29
  import { APIError, ContractError, InvalidConfigError } from "../../errors";
30
30
  import { BaseAPI } from "../base";
31
- /** Default delay between polls while waiting for a withdrawal's proof. */
32
- const DEFAULT_WITHDRAWAL_POLL_INTERVAL_MS = 5_000;
31
+ /**
32
+ * Default delay between polls while waiting for a withdrawal's proof. The proof
33
+ * lands a few seconds after initiate, so a longer interval would add most of
34
+ * itself to every withdrawal's end-to-end time.
35
+ */
36
+ const DEFAULT_WITHDRAWAL_POLL_INTERVAL_MS = 500;
33
37
  /**
34
38
  * Default total wait for a withdrawal's proof (5 minutes). A withdrawal's merkle
35
39
  * proof only lands after its root is confirmed on-chain, which on a healthy
@@ -152,14 +152,4 @@ export declare const COVERED: {
152
152
  /** operationId → reason it is intentionally not covered by @0xmonaco/core. */
153
153
  export declare const INTENTIONALLY_EXCLUDED: {
154
154
  health_check: string;
155
- pitpass_get_my_trader_code: string;
156
- pitpass_set_trader_code: string;
157
- pitpass_clear_trader_code: string;
158
- pitpass_check_trader_code_availability: string;
159
- pitpass_get_trader_code_info: string;
160
- pitpass_get_rewards_balance: string;
161
- pitpass_transfer_rewards: string;
162
- pitpass_get_my_referral_position: string;
163
- pitpass_get_my_referral_downline: string;
164
- pitpass_get_my_referral_tree: string;
165
155
  };
package/dist/coverage.js CHANGED
@@ -152,14 +152,4 @@ export const COVERED = {
152
152
  /** operationId → reason it is intentionally not covered by @0xmonaco/core. */
153
153
  export const INTENTIONALLY_EXCLUDED = {
154
154
  health_check: "Infrastructure liveness probe (GET /health); not part of the data SDK surface.",
155
- pitpass_get_my_trader_code: "Deprecated /api/v1/pitpass alias of get_my_trader_code; the client calls the canonical /api/v1/tradercodes path via tradercodes.",
156
- pitpass_set_trader_code: "Deprecated /api/v1/pitpass alias of set_trader_code; the client calls the canonical /api/v1/tradercodes path via tradercodes.",
157
- pitpass_clear_trader_code: "Deprecated /api/v1/pitpass alias of clear_trader_code; the client calls the canonical /api/v1/tradercodes path via tradercodes.",
158
- pitpass_check_trader_code_availability: "Deprecated /api/v1/pitpass alias of check_trader_code_availability; the client calls the canonical /api/v1/tradercodes path via tradercodes.",
159
- pitpass_get_trader_code_info: "Deprecated /api/v1/pitpass alias of get_trader_code_info; the client calls the canonical /api/v1/tradercodes path via tradercodes.",
160
- pitpass_get_rewards_balance: "Deprecated /api/v1/pitpass alias of get_rewards_balance; the client calls the canonical /api/v1/tradercodes path via tradercodes.",
161
- pitpass_transfer_rewards: "Deprecated /api/v1/pitpass alias of transfer_rewards; the client calls the canonical /api/v1/tradercodes path via tradercodes.",
162
- pitpass_get_my_referral_position: "Deprecated /api/v1/pitpass alias of get_my_referral_position; the client calls the canonical /api/v1/tradercodes path via tradercodes.",
163
- pitpass_get_my_referral_downline: "Deprecated /api/v1/pitpass alias of get_my_referral_downline; the client calls the canonical /api/v1/tradercodes path via tradercodes.",
164
- pitpass_get_my_referral_tree: "Deprecated /api/v1/pitpass alias of get_my_referral_tree; the client calls the canonical /api/v1/tradercodes path via tradercodes.",
165
155
  };
package/dist/sdk.d.ts CHANGED
@@ -1,4 +1,4 @@
1
- import type { ApplicationsAPI, AuthAPI, AuthState, BuildercodesAPI, CopyTradingAPI, DelegatedAgentsAPI, FaucetAPI, FeesAPI, ManagedMarketsAPI, MarginAccountsAPI, MarketAPI, MonacoSDK, Network, PitpassAPI, PortfolioAPI, PositionsAPI, ProfileAPI, PulseAPI, SDKConfig, SubAccountsAPI, SweeperAPI, TraderCodesAPI, TradingAPI, VaultAPI, WhitelistAPI, WithdrawalsAPI } from "@0xmonaco/types";
1
+ import type { ApplicationsAPI, AuthAPI, AuthState, BuildercodesAPI, CopyTradingAPI, DelegatedAgentsAPI, FaucetAPI, FeesAPI, ManagedMarketsAPI, MarginAccountsAPI, MarketAPI, MonacoSDK, Network, PortfolioAPI, PositionsAPI, ProfileAPI, PulseAPI, SDKConfig, SubAccountsAPI, SweeperAPI, TraderCodesAPI, 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 {
@@ -9,12 +9,6 @@ export declare class MonacoSDKImpl implements MonacoSDK {
9
9
  buildercodes: BuildercodesAPI;
10
10
  copyTrading: CopyTradingAPI;
11
11
  tradercodes: TraderCodesAPI;
12
- /**
13
- * The same instance as {@link tradercodes}.
14
- *
15
- * @deprecated Use `tradercodes`. Removed after at least two SDK releases.
16
- */
17
- pitpass: PitpassAPI;
18
12
  vault: VaultAPI;
19
13
  withdrawals: WithdrawalsAPI;
20
14
  trading: TradingAPI;
package/dist/sdk.js CHANGED
@@ -51,12 +51,6 @@ export class MonacoSDKImpl {
51
51
  buildercodes;
52
52
  copyTrading;
53
53
  tradercodes;
54
- /**
55
- * The same instance as {@link tradercodes}.
56
- *
57
- * @deprecated Use `tradercodes`. Removed after at least two SDK releases.
58
- */
59
- pitpass;
60
54
  vault;
61
55
  withdrawals;
62
56
  trading;
@@ -181,8 +175,6 @@ export class MonacoSDKImpl {
181
175
  this.buildercodes = configureSigning(new BuildercodesAPIImpl(apiUrl));
182
176
  this.copyTrading = configureSigning(new CopyTradingAPIImpl(apiUrl));
183
177
  this.tradercodes = configureSigning(new TraderCodesAPIImpl(apiUrl));
184
- // Deprecated alias: the same instance, so session and signing state are shared.
185
- this.pitpass = this.tradercodes;
186
178
  this.profile = configureSigning(new ProfileAPIImpl(apiUrl));
187
179
  this.vault = configureSigning(new VaultAPIImpl(this.publicClient, this.walletClient, this.chain, this.applications, this.profile, apiUrl));
188
180
  this.withdrawals = configureSigning(new WithdrawalsAPIImpl(apiUrl));
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@0xmonaco/core",
3
- "version": "1.0.86",
3
+ "version": "1.0.88",
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.86",
23
- "@0xmonaco/types": "1.0.86",
22
+ "@0xmonaco/contracts": "1.0.88",
23
+ "@0xmonaco/types": "1.0.88",
24
24
  "@noble/curves": "^1.9.1",
25
25
  "@noble/hashes": "^2.4.0",
26
26
  "http-status-codes": "^2.3.0"
@@ -1,13 +0,0 @@
1
- /**
2
- * Deprecated PitPass name for the TraderCodes API implementation (`sdk.pitpass`).
3
- *
4
- * PitPass is the umbrella over TraderCodes and BuilderCodes; this surface only
5
- * ever covered TraderCodes. Use `TraderCodesAPIImpl` (`sdk.tradercodes`).
6
- */
7
- import { TraderCodesAPIImpl } from "../tradercodes";
8
- /**
9
- * @deprecated Use {@link TraderCodesAPIImpl}. It calls the same
10
- * `/api/v1/tradercodes/...` endpoints; removed after at least two SDK releases.
11
- */
12
- export declare class PitpassAPIImpl extends TraderCodesAPIImpl {
13
- }
@@ -1,13 +0,0 @@
1
- /**
2
- * Deprecated PitPass name for the TraderCodes API implementation (`sdk.pitpass`).
3
- *
4
- * PitPass is the umbrella over TraderCodes and BuilderCodes; this surface only
5
- * ever covered TraderCodes. Use `TraderCodesAPIImpl` (`sdk.tradercodes`).
6
- */
7
- import { TraderCodesAPIImpl } from "../tradercodes";
8
- /**
9
- * @deprecated Use {@link TraderCodesAPIImpl}. It calls the same
10
- * `/api/v1/tradercodes/...` endpoints; removed after at least two SDK releases.
11
- */
12
- export class PitpassAPIImpl extends TraderCodesAPIImpl {
13
- }