@0xmonaco/core 0.0.0-develop-20260323152825 → 0.0.0-develop-20260412233650
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/README.md +4 -7
- package/dist/api/applications/api.d.ts +0 -1
- package/dist/api/applications/api.js +0 -1
- package/dist/api/applications/index.d.ts +0 -1
- package/dist/api/applications/index.js +0 -1
- package/dist/api/auth/api.d.ts +9 -9
- package/dist/api/auth/api.js +9 -12
- package/dist/api/auth/index.d.ts +0 -1
- package/dist/api/auth/index.js +0 -1
- package/dist/api/base.d.ts +0 -1
- package/dist/api/base.js +0 -1
- package/dist/api/fees/api.d.ts +2 -1
- package/dist/api/fees/api.js +8 -1
- package/dist/api/fees/index.d.ts +0 -1
- package/dist/api/fees/index.js +0 -1
- package/dist/api/index.d.ts +0 -1
- package/dist/api/index.js +0 -1
- package/dist/api/market/api.d.ts +0 -1
- package/dist/api/market/api.js +0 -1
- package/dist/api/market/index.d.ts +0 -1
- package/dist/api/market/index.js +0 -1
- package/dist/api/orderbook/api.d.ts +0 -1
- package/dist/api/orderbook/api.js +0 -1
- package/dist/api/orderbook/index.d.ts +0 -1
- package/dist/api/orderbook/index.js +0 -1
- package/dist/api/profile/api.d.ts +26 -2
- package/dist/api/profile/api.js +47 -4
- package/dist/api/profile/index.d.ts +0 -1
- package/dist/api/profile/index.js +0 -1
- package/dist/api/trades/api.d.ts +0 -1
- package/dist/api/trades/api.js +0 -1
- package/dist/api/trades/index.d.ts +0 -1
- package/dist/api/trades/index.js +0 -1
- package/dist/api/trading/api.d.ts +0 -1
- package/dist/api/trading/api.js +0 -1
- package/dist/api/trading/index.d.ts +0 -1
- package/dist/api/trading/index.js +0 -1
- package/dist/api/vault/api.d.ts +0 -1
- package/dist/api/vault/api.js +0 -1
- package/dist/api/vault/index.d.ts +0 -1
- package/dist/api/vault/index.js +0 -1
- package/dist/api/websocket/index.d.ts +0 -1
- package/dist/api/websocket/index.js +0 -1
- package/dist/api/websocket/types.d.ts +0 -1
- package/dist/api/websocket/types.js +0 -1
- package/dist/api/websocket/utils.d.ts +0 -1
- package/dist/api/websocket/utils.js +0 -1
- package/dist/api/websocket/websocket.d.ts +0 -1
- package/dist/api/websocket/websocket.js +0 -1
- package/dist/errors/errors.d.ts +0 -1
- package/dist/errors/errors.js +0 -1
- package/dist/errors/index.d.ts +0 -1
- package/dist/errors/index.js +0 -1
- package/dist/index.d.ts +0 -1
- package/dist/index.js +0 -1
- package/dist/networks/index.d.ts +0 -1
- package/dist/networks/index.js +0 -1
- package/dist/networks/networks.d.ts +0 -1
- package/dist/networks/networks.js +0 -1
- package/dist/sdk.d.ts +4 -5
- package/dist/sdk.js +5 -6
- package/dist/utils/index.d.ts +0 -1
- package/dist/utils/index.js +0 -1
- package/dist/utils/magnitude.d.ts +0 -1
- package/dist/utils/magnitude.js +0 -1
- package/package.json +3 -3
- package/dist/api/applications/api.d.ts.map +0 -1
- package/dist/api/applications/api.js.map +0 -1
- package/dist/api/applications/index.d.ts.map +0 -1
- package/dist/api/applications/index.js.map +0 -1
- package/dist/api/auth/api.d.ts.map +0 -1
- package/dist/api/auth/api.js.map +0 -1
- package/dist/api/auth/index.d.ts.map +0 -1
- package/dist/api/auth/index.js.map +0 -1
- package/dist/api/base.d.ts.map +0 -1
- package/dist/api/base.js.map +0 -1
- package/dist/api/fees/api.d.ts.map +0 -1
- package/dist/api/fees/api.js.map +0 -1
- package/dist/api/fees/index.d.ts.map +0 -1
- package/dist/api/fees/index.js.map +0 -1
- package/dist/api/index.d.ts.map +0 -1
- package/dist/api/index.js.map +0 -1
- package/dist/api/market/api.d.ts.map +0 -1
- package/dist/api/market/api.js.map +0 -1
- package/dist/api/market/index.d.ts.map +0 -1
- package/dist/api/market/index.js.map +0 -1
- package/dist/api/orderbook/api.d.ts.map +0 -1
- package/dist/api/orderbook/api.js.map +0 -1
- package/dist/api/orderbook/index.d.ts.map +0 -1
- package/dist/api/orderbook/index.js.map +0 -1
- package/dist/api/profile/api.d.ts.map +0 -1
- package/dist/api/profile/api.js.map +0 -1
- package/dist/api/profile/index.d.ts.map +0 -1
- package/dist/api/profile/index.js.map +0 -1
- package/dist/api/trades/api.d.ts.map +0 -1
- package/dist/api/trades/api.js.map +0 -1
- package/dist/api/trades/index.d.ts.map +0 -1
- package/dist/api/trades/index.js.map +0 -1
- package/dist/api/trading/api.d.ts.map +0 -1
- package/dist/api/trading/api.js.map +0 -1
- package/dist/api/trading/index.d.ts.map +0 -1
- package/dist/api/trading/index.js.map +0 -1
- package/dist/api/vault/api.d.ts.map +0 -1
- package/dist/api/vault/api.js.map +0 -1
- package/dist/api/vault/index.d.ts.map +0 -1
- package/dist/api/vault/index.js.map +0 -1
- package/dist/api/websocket/index.d.ts.map +0 -1
- package/dist/api/websocket/index.js.map +0 -1
- package/dist/api/websocket/types.d.ts.map +0 -1
- package/dist/api/websocket/types.js.map +0 -1
- package/dist/api/websocket/utils.d.ts.map +0 -1
- package/dist/api/websocket/utils.js.map +0 -1
- package/dist/api/websocket/websocket.d.ts.map +0 -1
- package/dist/api/websocket/websocket.js.map +0 -1
- package/dist/errors/errors.d.ts.map +0 -1
- package/dist/errors/errors.js.map +0 -1
- package/dist/errors/index.d.ts.map +0 -1
- package/dist/errors/index.js.map +0 -1
- package/dist/index.d.ts.map +0 -1
- package/dist/index.js.map +0 -1
- package/dist/networks/index.d.ts.map +0 -1
- package/dist/networks/index.js.map +0 -1
- package/dist/networks/networks.d.ts.map +0 -1
- package/dist/networks/networks.js.map +0 -1
- package/dist/sdk.d.ts.map +0 -1
- package/dist/sdk.js.map +0 -1
- package/dist/utils/index.d.ts.map +0 -1
- package/dist/utils/index.js.map +0 -1
- package/dist/utils/magnitude.d.ts.map +0 -1
- package/dist/utils/magnitude.js.map +0 -1
package/README.md
CHANGED
|
@@ -125,7 +125,7 @@ async function authExample() {
|
|
|
125
125
|
console.log("Authenticated:", authState.user);
|
|
126
126
|
console.log("Tokens:", {
|
|
127
127
|
accessToken: authState.accessToken,
|
|
128
|
-
refreshToken: authState.refreshToken,
|
|
128
|
+
refreshToken: authState.refreshToken,
|
|
129
129
|
});
|
|
130
130
|
|
|
131
131
|
// Authenticated WebSocket channels are now connected - start receiving real-time updates
|
|
@@ -141,8 +141,7 @@ async function authExample() {
|
|
|
141
141
|
await monaco.logout();
|
|
142
142
|
|
|
143
143
|
// Or manually revoke the token
|
|
144
|
-
|
|
145
|
-
await monaco.auth.revokeToken(authState.refreshToken);
|
|
144
|
+
await monaco.auth.revokeToken();
|
|
146
145
|
}
|
|
147
146
|
|
|
148
147
|
// Market Data
|
|
@@ -277,11 +276,9 @@ interface AuthState {
|
|
|
277
276
|
}
|
|
278
277
|
```
|
|
279
278
|
|
|
280
|
-
**⚠️ Important:** The authentication response contains `refreshToken`, NOT `revokeToken`.
|
|
281
|
-
|
|
282
279
|
```typescript
|
|
283
|
-
//
|
|
284
|
-
await sdk.auth.revokeToken(
|
|
280
|
+
// Revoke the current session's token
|
|
281
|
+
await sdk.auth.revokeToken();
|
|
285
282
|
|
|
286
283
|
// 💡 TIP: Use the built-in logout method
|
|
287
284
|
await sdk.logout(); // Automatically calls revokeToken internally
|
package/dist/api/auth/api.d.ts
CHANGED
|
@@ -182,14 +182,15 @@ export declare class AuthAPIImpl extends BaseAPI implements AuthAPI {
|
|
|
182
182
|
*/
|
|
183
183
|
refreshToken(refreshToken: string): Promise<TokenRefreshResponse>;
|
|
184
184
|
/**
|
|
185
|
-
* Revokes
|
|
185
|
+
* Revokes the current session's refresh token.
|
|
186
186
|
*
|
|
187
|
-
* Invalidates
|
|
188
|
-
* new access tokens. This is useful
|
|
189
|
-
* a token has been compromised.
|
|
187
|
+
* Invalidates the refresh token associated with the current access token,
|
|
188
|
+
* preventing it from being used to obtain new access tokens. This is useful
|
|
189
|
+
* for logout functionality or when a token has been compromised.
|
|
190
|
+
*
|
|
191
|
+
* The server identifies the token to revoke from the access token in the
|
|
192
|
+
* Authorization header — no request body is needed.
|
|
190
193
|
*
|
|
191
|
-
* **Important:** Pass the `refreshToken` from the authentication response.
|
|
192
|
-
* @param refreshToken - The refresh token to revoke (from authResult.refreshToken)
|
|
193
194
|
* @returns Promise resolving when the token is revoked
|
|
194
195
|
* @throws {APIError} When token revocation fails
|
|
195
196
|
*
|
|
@@ -197,10 +198,9 @@ export declare class AuthAPIImpl extends BaseAPI implements AuthAPI {
|
|
|
197
198
|
* ```typescript
|
|
198
199
|
* // After authentication
|
|
199
200
|
* const authResult = await authAPI.authenticate(clientId);
|
|
200
|
-
* await authAPI.revokeToken(
|
|
201
|
+
* await authAPI.revokeToken();
|
|
201
202
|
* console.log("Token revoked successfully");
|
|
202
203
|
* ```
|
|
203
204
|
*/
|
|
204
|
-
revokeToken(
|
|
205
|
+
revokeToken(): Promise<void>;
|
|
205
206
|
}
|
|
206
|
-
//# sourceMappingURL=api.d.ts.map
|
package/dist/api/auth/api.js
CHANGED
|
@@ -277,14 +277,15 @@ export class AuthAPIImpl extends BaseAPI {
|
|
|
277
277
|
};
|
|
278
278
|
}
|
|
279
279
|
/**
|
|
280
|
-
* Revokes
|
|
280
|
+
* Revokes the current session's refresh token.
|
|
281
281
|
*
|
|
282
|
-
* Invalidates
|
|
283
|
-
* new access tokens. This is useful
|
|
284
|
-
* a token has been compromised.
|
|
282
|
+
* Invalidates the refresh token associated with the current access token,
|
|
283
|
+
* preventing it from being used to obtain new access tokens. This is useful
|
|
284
|
+
* for logout functionality or when a token has been compromised.
|
|
285
|
+
*
|
|
286
|
+
* The server identifies the token to revoke from the access token in the
|
|
287
|
+
* Authorization header — no request body is needed.
|
|
285
288
|
*
|
|
286
|
-
* **Important:** Pass the `refreshToken` from the authentication response.
|
|
287
|
-
* @param refreshToken - The refresh token to revoke (from authResult.refreshToken)
|
|
288
289
|
* @returns Promise resolving when the token is revoked
|
|
289
290
|
* @throws {APIError} When token revocation fails
|
|
290
291
|
*
|
|
@@ -292,17 +293,13 @@ export class AuthAPIImpl extends BaseAPI {
|
|
|
292
293
|
* ```typescript
|
|
293
294
|
* // After authentication
|
|
294
295
|
* const authResult = await authAPI.authenticate(clientId);
|
|
295
|
-
* await authAPI.revokeToken(
|
|
296
|
+
* await authAPI.revokeToken();
|
|
296
297
|
* console.log("Token revoked successfully");
|
|
297
298
|
* ```
|
|
298
299
|
*/
|
|
299
|
-
async revokeToken(
|
|
300
|
+
async revokeToken() {
|
|
300
301
|
await this.makeAuthenticatedRequest("/api/v1/auth/revoke", {
|
|
301
302
|
method: "POST",
|
|
302
|
-
body: JSON.stringify({
|
|
303
|
-
refresh_token: refreshToken,
|
|
304
|
-
}),
|
|
305
303
|
});
|
|
306
304
|
}
|
|
307
305
|
}
|
|
308
|
-
//# sourceMappingURL=api.js.map
|
package/dist/api/auth/index.d.ts
CHANGED
package/dist/api/auth/index.js
CHANGED
package/dist/api/base.d.ts
CHANGED
package/dist/api/base.js
CHANGED
package/dist/api/fees/api.d.ts
CHANGED
|
@@ -35,6 +35,8 @@ export declare class FeesAPIImpl extends BaseAPI implements FeesAPI {
|
|
|
35
35
|
* @param params.side - The order side ("BUY" or "SELL")
|
|
36
36
|
* @param params.price - The price per unit as string
|
|
37
37
|
* @param params.quantity - The quantity to trade as string
|
|
38
|
+
* @param params.order_type - Order type: "LIMIT" (default) or "MARKET"
|
|
39
|
+
* @param params.slippage_tolerance_bps - Slippage tolerance in bps (0–1000, MARKET only, default 500)
|
|
38
40
|
* @returns Promise resolving to SimulateFeeResponse with fee breakdown
|
|
39
41
|
*
|
|
40
42
|
* @example
|
|
@@ -68,4 +70,3 @@ export declare class FeesAPIImpl extends BaseAPI implements FeesAPI {
|
|
|
68
70
|
*/
|
|
69
71
|
simulateFees(params: SimulateFeeParams): Promise<SimulateFeeResponse>;
|
|
70
72
|
}
|
|
71
|
-
//# sourceMappingURL=api.d.ts.map
|
package/dist/api/fees/api.js
CHANGED
|
@@ -35,6 +35,8 @@ export class FeesAPIImpl extends BaseAPI {
|
|
|
35
35
|
* @param params.side - The order side ("BUY" or "SELL")
|
|
36
36
|
* @param params.price - The price per unit as string
|
|
37
37
|
* @param params.quantity - The quantity to trade as string
|
|
38
|
+
* @param params.order_type - Order type: "LIMIT" (default) or "MARKET"
|
|
39
|
+
* @param params.slippage_tolerance_bps - Slippage tolerance in bps (0–1000, MARKET only, default 500)
|
|
38
40
|
* @returns Promise resolving to SimulateFeeResponse with fee breakdown
|
|
39
41
|
*
|
|
40
42
|
* @example
|
|
@@ -74,10 +76,15 @@ export class FeesAPIImpl extends BaseAPI {
|
|
|
74
76
|
searchParams.append("side", validatedParams.side);
|
|
75
77
|
searchParams.append("price", validatedParams.price);
|
|
76
78
|
searchParams.append("quantity", validatedParams.quantity);
|
|
79
|
+
if (validatedParams.order_type !== undefined) {
|
|
80
|
+
searchParams.append("order_type", validatedParams.order_type);
|
|
81
|
+
}
|
|
82
|
+
if (validatedParams.slippage_tolerance_bps !== undefined) {
|
|
83
|
+
searchParams.append("slippage_tolerance_bps", String(validatedParams.slippage_tolerance_bps));
|
|
84
|
+
}
|
|
77
85
|
const endpoint = `/api/v1/fees/simulate?${searchParams.toString()}`;
|
|
78
86
|
return await this.makeAuthenticatedRequest(endpoint, {
|
|
79
87
|
method: "GET",
|
|
80
88
|
});
|
|
81
89
|
}
|
|
82
90
|
}
|
|
83
|
-
//# sourceMappingURL=api.js.map
|
package/dist/api/fees/index.d.ts
CHANGED
package/dist/api/fees/index.js
CHANGED
package/dist/api/index.d.ts
CHANGED
package/dist/api/index.js
CHANGED
package/dist/api/market/api.d.ts
CHANGED
|
@@ -11,4 +11,3 @@ export declare class MarketAPIImpl extends BaseAPI implements MarketAPI {
|
|
|
11
11
|
getCandlesticks(tradingPairId: string, interval: Interval, params?: GetCandlesticksParams): Promise<Candlestick[]>;
|
|
12
12
|
getMarketMetadata(tradingPairId: string): Promise<MarketMetadata>;
|
|
13
13
|
}
|
|
14
|
-
//# sourceMappingURL=api.d.ts.map
|
package/dist/api/market/api.js
CHANGED
package/dist/api/market/index.js
CHANGED
|
@@ -17,7 +17,7 @@
|
|
|
17
17
|
* console.log(`User: ${profile.username} (${profile.address})`);
|
|
18
18
|
* ```
|
|
19
19
|
*/
|
|
20
|
-
import type { AccountBalance, GetPaginatedUserMovementsResponse, GetUserBalancesParams, GetUserBalancesResponse, GetUserMovementsParams, PortfolioChartResponse, PortfolioMetric, PortfolioPeriod, PortfolioStats, ProfileAPI, UserProfile } from "@0xmonaco/types";
|
|
20
|
+
import type { AccountBalance, GetPaginatedUserMovementsResponse, GetUserBalancesParams, GetUserBalancesResponse, GetUserMovementsParams, GetUserTradesParams, GetUserTradesResponse, PortfolioChartResponse, PortfolioMetric, PortfolioPeriod, PortfolioStats, ProfileAPI, UserProfile } from "@0xmonaco/types";
|
|
21
21
|
import { BaseAPI } from "../base";
|
|
22
22
|
export declare class ProfileAPIImpl extends BaseAPI implements ProfileAPI {
|
|
23
23
|
/**
|
|
@@ -163,5 +163,29 @@ export declare class ProfileAPIImpl extends BaseAPI implements ProfileAPI {
|
|
|
163
163
|
* ```
|
|
164
164
|
*/
|
|
165
165
|
getPortfolioChart(period: PortfolioPeriod, metric: PortfolioMetric): Promise<PortfolioChartResponse>;
|
|
166
|
+
/**
|
|
167
|
+
* Get the current user's trade history with pagination.
|
|
168
|
+
*
|
|
169
|
+
* Fetches the user's executed trades from the /api/v1/accounts/trades endpoint.
|
|
170
|
+
* Requires a valid access token to be set.
|
|
171
|
+
*
|
|
172
|
+
* @param params - Optional query parameters for pagination and filtering
|
|
173
|
+
* @param params.page - Page number (starts from 1, default: 1)
|
|
174
|
+
* @param params.limit - Number of items per page (default: 20, max: 100)
|
|
175
|
+
* @param params.trading_pair_id - Filter by trading pair ID (UUID)
|
|
176
|
+
* @returns Promise resolving to paginated trades response
|
|
177
|
+
* @throws {ValidationError} When the provided params fail client-side validation
|
|
178
|
+
* @throws {APIError} When the request fails or user is not authenticated
|
|
179
|
+
*
|
|
180
|
+
* @example
|
|
181
|
+
* ```typescript
|
|
182
|
+
* // Get first page of trades
|
|
183
|
+
* const trades = await profileAPI.getUserTrades();
|
|
184
|
+
* console.log(`Total trades: ${trades.total_count}`);
|
|
185
|
+
*
|
|
186
|
+
* // Filter by trading pair
|
|
187
|
+
* const pairTrades = await profileAPI.getUserTrades({ trading_pair_id: "550e8400-e29b-41d4-a716-446655440000" });
|
|
188
|
+
* ```
|
|
189
|
+
*/
|
|
190
|
+
getUserTrades(params?: GetUserTradesParams): Promise<GetUserTradesResponse>;
|
|
166
191
|
}
|
|
167
|
-
//# sourceMappingURL=api.d.ts.map
|
package/dist/api/profile/api.js
CHANGED
|
@@ -17,7 +17,7 @@
|
|
|
17
17
|
* console.log(`User: ${profile.username} (${profile.address})`);
|
|
18
18
|
* ```
|
|
19
19
|
*/
|
|
20
|
-
import { GetUserMovementsSchema, validate } from "@0xmonaco/types";
|
|
20
|
+
import { GetUserMovementsSchema, GetUserTradesSchema, validate } from "@0xmonaco/types";
|
|
21
21
|
import { APIError } from "../../errors";
|
|
22
22
|
import { BaseAPI } from "../base";
|
|
23
23
|
export class ProfileAPIImpl extends BaseAPI {
|
|
@@ -188,7 +188,8 @@ export class ProfileAPIImpl extends BaseAPI {
|
|
|
188
188
|
* ```
|
|
189
189
|
*/
|
|
190
190
|
async getPortfolioStats(period) {
|
|
191
|
-
|
|
191
|
+
const searchParams = new URLSearchParams({ period });
|
|
192
|
+
return await this.makeAuthenticatedRequest(`/api/v1/accounts/me/portfolio?${searchParams}`);
|
|
192
193
|
}
|
|
193
194
|
/**
|
|
194
195
|
* Get the current user's portfolio chart time series for a given period and metric.
|
|
@@ -210,7 +211,49 @@ export class ProfileAPIImpl extends BaseAPI {
|
|
|
210
211
|
* ```
|
|
211
212
|
*/
|
|
212
213
|
async getPortfolioChart(period, metric) {
|
|
213
|
-
|
|
214
|
+
const searchParams = new URLSearchParams({ period, metric });
|
|
215
|
+
return await this.makeAuthenticatedRequest(`/api/v1/accounts/me/portfolio/chart?${searchParams}`);
|
|
216
|
+
}
|
|
217
|
+
/**
|
|
218
|
+
* Get the current user's trade history with pagination.
|
|
219
|
+
*
|
|
220
|
+
* Fetches the user's executed trades from the /api/v1/accounts/trades endpoint.
|
|
221
|
+
* Requires a valid access token to be set.
|
|
222
|
+
*
|
|
223
|
+
* @param params - Optional query parameters for pagination and filtering
|
|
224
|
+
* @param params.page - Page number (starts from 1, default: 1)
|
|
225
|
+
* @param params.limit - Number of items per page (default: 20, max: 100)
|
|
226
|
+
* @param params.trading_pair_id - Filter by trading pair ID (UUID)
|
|
227
|
+
* @returns Promise resolving to paginated trades response
|
|
228
|
+
* @throws {ValidationError} When the provided params fail client-side validation
|
|
229
|
+
* @throws {APIError} When the request fails or user is not authenticated
|
|
230
|
+
*
|
|
231
|
+
* @example
|
|
232
|
+
* ```typescript
|
|
233
|
+
* // Get first page of trades
|
|
234
|
+
* const trades = await profileAPI.getUserTrades();
|
|
235
|
+
* console.log(`Total trades: ${trades.total_count}`);
|
|
236
|
+
*
|
|
237
|
+
* // Filter by trading pair
|
|
238
|
+
* const pairTrades = await profileAPI.getUserTrades({ trading_pair_id: "550e8400-e29b-41d4-a716-446655440000" });
|
|
239
|
+
* ```
|
|
240
|
+
*/
|
|
241
|
+
async getUserTrades(params) {
|
|
242
|
+
if (params) {
|
|
243
|
+
validate(GetUserTradesSchema, params);
|
|
244
|
+
}
|
|
245
|
+
const searchParams = new URLSearchParams();
|
|
246
|
+
if (params?.page !== undefined) {
|
|
247
|
+
searchParams.append("page", params.page.toString());
|
|
248
|
+
}
|
|
249
|
+
if (params?.limit !== undefined) {
|
|
250
|
+
searchParams.append("limit", params.limit.toString());
|
|
251
|
+
}
|
|
252
|
+
if (params?.trading_pair_id !== undefined) {
|
|
253
|
+
searchParams.append("trading_pair_id", params.trading_pair_id);
|
|
254
|
+
}
|
|
255
|
+
const queryString = searchParams.toString();
|
|
256
|
+
const url = queryString ? `/api/v1/accounts/trades?${queryString}` : "/api/v1/accounts/trades";
|
|
257
|
+
return await this.makeAuthenticatedRequest(url);
|
|
214
258
|
}
|
|
215
259
|
}
|
|
216
|
-
//# sourceMappingURL=api.js.map
|
package/dist/api/trades/api.d.ts
CHANGED
package/dist/api/trades/api.js
CHANGED
package/dist/api/trades/index.js
CHANGED
package/dist/api/trading/api.js
CHANGED
package/dist/api/vault/api.d.ts
CHANGED
package/dist/api/vault/api.js
CHANGED
package/dist/api/vault/index.js
CHANGED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
//# sourceMappingURL=types.js.map
|
package/dist/errors/errors.d.ts
CHANGED
package/dist/errors/errors.js
CHANGED
package/dist/errors/index.d.ts
CHANGED
package/dist/errors/index.js
CHANGED
package/dist/index.d.ts
CHANGED
|
@@ -3,4 +3,3 @@ export { APIError, ContractError, InvalidConfigError, InvalidStateError, MonacoC
|
|
|
3
3
|
export { resolveApiUrl, resolveWsUrl } from "./networks";
|
|
4
4
|
export { createMonacoSDK, MonacoSDKImpl as MonacoSDK } from "./sdk";
|
|
5
5
|
export { ALL_MAGNITUDES, calculateValidMagnitudes, MAX_BUCKETS_ALLOWED, MIN_BUCKETS_ALLOWED, } from "./utils";
|
|
6
|
-
//# sourceMappingURL=index.d.ts.map
|
package/dist/index.js
CHANGED
|
@@ -3,4 +3,3 @@ export { APIError, ContractError, InvalidConfigError, InvalidStateError, MonacoC
|
|
|
3
3
|
export { resolveApiUrl, resolveWsUrl } from "./networks";
|
|
4
4
|
export { createMonacoSDK, MonacoSDKImpl as MonacoSDK } from "./sdk";
|
|
5
5
|
export { ALL_MAGNITUDES, calculateValidMagnitudes, MAX_BUCKETS_ALLOWED, MIN_BUCKETS_ALLOWED, } from "./utils";
|
|
6
|
-
//# sourceMappingURL=index.js.map
|
package/dist/networks/index.d.ts
CHANGED
package/dist/networks/index.js
CHANGED
package/dist/sdk.d.ts
CHANGED
|
@@ -31,8 +31,8 @@ export declare class MonacoSDKImpl implements MonacoSDK {
|
|
|
31
31
|
* - `expiresAt`: When the access token expires
|
|
32
32
|
* - `user`: User information
|
|
33
33
|
*
|
|
34
|
-
* Note:
|
|
35
|
-
*
|
|
34
|
+
* Note: Use `sdk.logout()` to revoke the token and clean up, or call
|
|
35
|
+
* `sdk.auth.revokeToken()` directly to just revoke.
|
|
36
36
|
*
|
|
37
37
|
* @param clientId - The client ID for authentication
|
|
38
38
|
* @param options - Optional configuration
|
|
@@ -50,7 +50,7 @@ export declare class MonacoSDKImpl implements MonacoSDK {
|
|
|
50
50
|
* await sdk.ws.connect();
|
|
51
51
|
*
|
|
52
52
|
* // Later, to revoke:
|
|
53
|
-
* await sdk.auth.revokeToken(
|
|
53
|
+
* await sdk.auth.revokeToken(); // ✅
|
|
54
54
|
* // Or revoke and disconnect WebSocket:
|
|
55
55
|
* await sdk.logout(); // ✅ Calls revokeToken internally and disconnects WebSocket
|
|
56
56
|
* ```
|
|
@@ -76,7 +76,7 @@ export declare class MonacoSDKImpl implements MonacoSDK {
|
|
|
76
76
|
*
|
|
77
77
|
* This method revokes the refresh token (if available), disconnects all authenticated
|
|
78
78
|
* WebSocket channels, and clears the local auth state.
|
|
79
|
-
* It internally calls `auth.revokeToken(
|
|
79
|
+
* It internally calls `auth.revokeToken()` to invalidate the token on the server.
|
|
80
80
|
*
|
|
81
81
|
* @example
|
|
82
82
|
* ```typescript
|
|
@@ -130,4 +130,3 @@ export declare class MonacoSDKImpl implements MonacoSDK {
|
|
|
130
130
|
* @returns Monaco SDK instance
|
|
131
131
|
*/
|
|
132
132
|
export declare function createMonacoSDK(config: SDKConfig): MonacoSDK;
|
|
133
|
-
//# sourceMappingURL=sdk.d.ts.map
|