@0xmonaco/core 1.0.26-develop.aeb6d5b → 1.0.28
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/api/index.d.ts +0 -1
- package/dist/api/index.js +0 -1
- package/dist/api/market/api.d.ts +1 -2
- package/dist/api/market/api.js +0 -3
- package/dist/api/perp/routes.d.ts +0 -8
- package/dist/api/perp/routes.js +0 -1
- package/dist/coverage.d.ts +0 -2
- package/dist/coverage.js +0 -2
- package/dist/sdk.d.ts +1 -2
- package/dist/sdk.js +0 -5
- package/package.json +3 -3
- package/dist/api/pulse/api.d.ts +0 -24
- package/dist/api/pulse/api.js +0 -27
- package/dist/api/pulse/index.d.ts +0 -1
- package/dist/api/pulse/index.js +0 -1
package/dist/api/index.d.ts
CHANGED
package/dist/api/index.js
CHANGED
package/dist/api/market/api.d.ts
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import type { Candlestick, FundingState, GetCandlesticksParams, GetScreenerParams, GetScreenerResponse, GetTradingPairsParams, GetTradingPairsResponse, IndexPrice, Interval,
|
|
1
|
+
import type { Candlestick, FundingState, GetCandlesticksParams, GetScreenerParams, GetScreenerResponse, GetTradingPairsParams, GetTradingPairsResponse, IndexPrice, Interval, ListFundingHistoryParams, ListFundingHistoryResponse, MarketAPI, MarketMetadata, MarketStats, MarkPrice, OpenInterest, PerpMarketConfig, PerpMarketSummary, TradingMode, TradingPair } from "@0xmonaco/types";
|
|
2
2
|
import { BaseAPI } from "../base";
|
|
3
3
|
/**
|
|
4
4
|
* Market API Implementation
|
|
@@ -17,7 +17,6 @@ export declare class MarketAPIImpl extends BaseAPI implements MarketAPI {
|
|
|
17
17
|
getIndexPrice(tradingPairId: string): Promise<IndexPrice>;
|
|
18
18
|
getFundingState(tradingPairId: string): Promise<FundingState>;
|
|
19
19
|
listFundingHistory(tradingPairId: string, params?: ListFundingHistoryParams): Promise<ListFundingHistoryResponse>;
|
|
20
|
-
listAllFundingHistory(params?: ListAllFundingHistoryParams): Promise<ListAllFundingHistoryResponse>;
|
|
21
20
|
getOpenInterest(tradingPairId: string): Promise<OpenInterest>;
|
|
22
21
|
getScreener(params?: GetScreenerParams): Promise<GetScreenerResponse>;
|
|
23
22
|
getMarketStats(): Promise<MarketStats>;
|
package/dist/api/market/api.js
CHANGED
|
@@ -100,9 +100,6 @@ export class MarketAPIImpl extends BaseAPI {
|
|
|
100
100
|
validate(GetMarketMetadataSchema, { tradingPairId });
|
|
101
101
|
return await this.makePublicRequest(perpRoutes.market.listFundingHistory(tradingPairId, params));
|
|
102
102
|
}
|
|
103
|
-
async listAllFundingHistory(params) {
|
|
104
|
-
return await this.makePublicRequest(perpRoutes.market.listAllFundingHistory(params));
|
|
105
|
-
}
|
|
106
103
|
async getOpenInterest(tradingPairId) {
|
|
107
104
|
validate(GetMarketMetadataSchema, { tradingPairId });
|
|
108
105
|
return await this.makePublicRequest(perpRoutes.market.getOpenInterest(tradingPairId));
|
|
@@ -67,14 +67,6 @@ export declare const perpRoutes: {
|
|
|
67
67
|
endTime?: string;
|
|
68
68
|
page?: number;
|
|
69
69
|
pageSize?: number;
|
|
70
|
-
orderBy?: string;
|
|
71
|
-
}) => string;
|
|
72
|
-
readonly listAllFundingHistory: (params?: {
|
|
73
|
-
startTime?: string;
|
|
74
|
-
endTime?: string;
|
|
75
|
-
page?: number;
|
|
76
|
-
pageSize?: number;
|
|
77
|
-
orderBy?: string;
|
|
78
70
|
}) => string;
|
|
79
71
|
readonly getOpenInterest: (tradingPairId: string) => string;
|
|
80
72
|
readonly getScreener: (params?: {
|
package/dist/api/perp/routes.js
CHANGED
|
@@ -52,7 +52,6 @@ export const perpRoutes = {
|
|
|
52
52
|
getIndexPrice: (tradingPairId) => `${API_V1}/market/pairs/${encodeSegment(tradingPairId)}/index-price`,
|
|
53
53
|
getFundingState: (tradingPairId) => `${API_V1}/market/pairs/${encodeSegment(tradingPairId)}/funding`,
|
|
54
54
|
listFundingHistory: (tradingPairId, params) => withQuery(`${API_V1}/market/pairs/${encodeSegment(tradingPairId)}/funding/history`, params),
|
|
55
|
-
listAllFundingHistory: (params) => withQuery(`${API_V1}/market/funding/history`, params),
|
|
56
55
|
getOpenInterest: (tradingPairId) => `${API_V1}/market/pairs/${encodeSegment(tradingPairId)}/open-interest`,
|
|
57
56
|
getScreener: (params) => withQuery(`${API_V1}/market/screener`, params),
|
|
58
57
|
getMarketStats: () => `${API_V1}/market/stats`,
|
package/dist/coverage.d.ts
CHANGED
|
@@ -30,7 +30,6 @@ export declare const COVERED: {
|
|
|
30
30
|
get_market_metadata: string;
|
|
31
31
|
get_market_stats: string;
|
|
32
32
|
get_my_fee_tier: string;
|
|
33
|
-
get_pulse: string;
|
|
34
33
|
get_my_trader_code: string;
|
|
35
34
|
get_rewards_balance: string;
|
|
36
35
|
get_trader_code_info: string;
|
|
@@ -65,7 +64,6 @@ export declare const COVERED: {
|
|
|
65
64
|
get_withdrawal: string;
|
|
66
65
|
initiate_withdrawal: string;
|
|
67
66
|
list_pending_withdrawals: string;
|
|
68
|
-
list_all_funding_history: string;
|
|
69
67
|
list_application_balances: string;
|
|
70
68
|
list_application_movements: string;
|
|
71
69
|
list_application_orders: string;
|
package/dist/coverage.js
CHANGED
|
@@ -30,7 +30,6 @@ export const COVERED = {
|
|
|
30
30
|
get_market_metadata: "getMarketMetadata",
|
|
31
31
|
get_market_stats: "getMarketStats",
|
|
32
32
|
get_my_fee_tier: "getMyFeeTier",
|
|
33
|
-
get_pulse: "pulse.getPulse",
|
|
34
33
|
get_my_trader_code: "pitpass.getMyTraderCode",
|
|
35
34
|
get_rewards_balance: "pitpass.getRewardsBalance",
|
|
36
35
|
get_trader_code_info: "pitpass.getTraderCodeInfo",
|
|
@@ -65,7 +64,6 @@ export const COVERED = {
|
|
|
65
64
|
get_withdrawal: "getWithdrawal",
|
|
66
65
|
initiate_withdrawal: "initiateWithdrawal",
|
|
67
66
|
list_pending_withdrawals: "listPendingWithdrawals",
|
|
68
|
-
list_all_funding_history: "listAllFundingHistory",
|
|
69
67
|
list_application_balances: "listApplicationBalances",
|
|
70
68
|
list_application_movements: "listApplicationMovements",
|
|
71
69
|
list_application_orders: "listApplicationOrders",
|
package/dist/sdk.d.ts
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import type { ApplicationsAPI, AuthAPI, AuthState, DelegatedAgentsAPI, FaucetAPI, FeesAPI, MarginAccountsAPI, MarketAPI, MonacoSDK, Network, PitpassAPI, PortfolioAPI, PositionsAPI, ProfileAPI,
|
|
1
|
+
import type { ApplicationsAPI, AuthAPI, AuthState, DelegatedAgentsAPI, FaucetAPI, FeesAPI, MarginAccountsAPI, MarketAPI, MonacoSDK, Network, PitpassAPI, PortfolioAPI, PositionsAPI, ProfileAPI, SDKConfig, SubAccountsAPI, 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,7 +18,6 @@ export declare class MonacoSDKImpl implements MonacoSDK {
|
|
|
18
18
|
faucet: FaucetAPI;
|
|
19
19
|
whitelist: WhitelistAPI;
|
|
20
20
|
profile: ProfileAPI;
|
|
21
|
-
pulse: PulseAPI;
|
|
22
21
|
orderbook: OrderbookAPIImpl;
|
|
23
22
|
trades: TradesAPIImpl;
|
|
24
23
|
ws: MonacoWebSocket;
|
package/dist/sdk.js
CHANGED
|
@@ -12,7 +12,6 @@ import { PitpassAPIImpl } from "./api/pitpass";
|
|
|
12
12
|
import { PortfolioAPIImpl } from "./api/portfolio";
|
|
13
13
|
import { PositionsAPIImpl } from "./api/positions";
|
|
14
14
|
import { ProfileAPIImpl } from "./api/profile";
|
|
15
|
-
import { PulseAPIImpl } from "./api/pulse";
|
|
16
15
|
import { SubAccountsAPIImpl } from "./api/sub-accounts";
|
|
17
16
|
import { TradingAPIImpl } from "./api/trading";
|
|
18
17
|
import { VaultAPIImpl } from "./api/vault";
|
|
@@ -55,7 +54,6 @@ export class MonacoSDKImpl {
|
|
|
55
54
|
faucet;
|
|
56
55
|
whitelist;
|
|
57
56
|
profile;
|
|
58
|
-
pulse;
|
|
59
57
|
orderbook;
|
|
60
58
|
trades;
|
|
61
59
|
ws;
|
|
@@ -84,7 +82,6 @@ export class MonacoSDKImpl {
|
|
|
84
82
|
this.subAccounts.setSessionKeypair(credentials);
|
|
85
83
|
this.faucet.setSessionKeypair(credentials);
|
|
86
84
|
this.whitelist.setSessionKeypair(credentials);
|
|
87
|
-
this.pulse.setSessionKeypair(credentials);
|
|
88
85
|
this.profile.setSessionKeypair(credentials);
|
|
89
86
|
this.orderbook.setSessionKeypair(credentials);
|
|
90
87
|
this.trades.setSessionKeypair(credentials);
|
|
@@ -123,7 +120,6 @@ export class MonacoSDKImpl {
|
|
|
123
120
|
this.subAccounts.setServerKey(serverKey);
|
|
124
121
|
this.faucet.setServerKey(serverKey);
|
|
125
122
|
this.whitelist.setServerKey(serverKey);
|
|
126
|
-
this.pulse.setServerKey(serverKey);
|
|
127
123
|
this.profile.setServerKey(serverKey);
|
|
128
124
|
this.orderbook.setServerKey(serverKey);
|
|
129
125
|
this.trades.setServerKey(serverKey);
|
|
@@ -185,7 +181,6 @@ export class MonacoSDKImpl {
|
|
|
185
181
|
this.subAccounts = new SubAccountsAPIImpl(apiUrl);
|
|
186
182
|
this.faucet = new FaucetAPIImpl(apiUrl);
|
|
187
183
|
this.whitelist = new WhitelistAPIImpl(apiUrl);
|
|
188
|
-
this.pulse = new PulseAPIImpl(apiUrl);
|
|
189
184
|
this.auth = new AuthAPIImpl(this.walletClient, this.chain, apiUrl);
|
|
190
185
|
this.delegatedAgents = new DelegatedAgentsAPIImpl(apiUrl);
|
|
191
186
|
this.fees = new FeesAPIImpl(apiUrl);
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@0xmonaco/core",
|
|
3
|
-
"version": "1.0.
|
|
3
|
+
"version": "1.0.28",
|
|
4
4
|
"type": "module",
|
|
5
5
|
"repository": {
|
|
6
6
|
"type": "git",
|
|
@@ -23,8 +23,8 @@
|
|
|
23
23
|
"viem": "^2.45.2"
|
|
24
24
|
},
|
|
25
25
|
"dependencies": {
|
|
26
|
-
"@0xmonaco/contracts": "1.0.
|
|
27
|
-
"@0xmonaco/types": "1.0.
|
|
26
|
+
"@0xmonaco/contracts": "1.0.28",
|
|
27
|
+
"@0xmonaco/types": "1.0.28",
|
|
28
28
|
"@noble/curves": "^1.9.1",
|
|
29
29
|
"@noble/hashes": "^1.8.0",
|
|
30
30
|
"http-status-codes": "^2.3.0"
|
package/dist/api/pulse/api.d.ts
DELETED
|
@@ -1,24 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* Pulse API Implementation
|
|
3
|
-
*
|
|
4
|
-
* Read-only access to the market-pulse news feed: AI-synthesized, per-asset
|
|
5
|
-
* headlines with sentiment tags, served from the backend's hourly-refreshed
|
|
6
|
-
* cache. Public — no authentication required.
|
|
7
|
-
*
|
|
8
|
-
* @example
|
|
9
|
-
* ```typescript
|
|
10
|
-
* const pulse = await sdk.pulse.getPulse();
|
|
11
|
-
* for (const item of pulse.items) {
|
|
12
|
-
* console.log(`[${item.sentiment}] ${item.asset}: ${item.summary}`);
|
|
13
|
-
* }
|
|
14
|
-
* ```
|
|
15
|
-
*/
|
|
16
|
-
import type { GetPulseResponse, PulseAPI } from "@0xmonaco/types";
|
|
17
|
-
import { BaseAPI } from "../base";
|
|
18
|
-
export declare class PulseAPIImpl extends BaseAPI implements PulseAPI {
|
|
19
|
-
/**
|
|
20
|
-
* Get the latest market pulse snapshot (public, no auth headers).
|
|
21
|
-
* Returns 503 while the backend cache is cold.
|
|
22
|
-
*/
|
|
23
|
-
getPulse(): Promise<GetPulseResponse>;
|
|
24
|
-
}
|
package/dist/api/pulse/api.js
DELETED
|
@@ -1,27 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* Pulse API Implementation
|
|
3
|
-
*
|
|
4
|
-
* Read-only access to the market-pulse news feed: AI-synthesized, per-asset
|
|
5
|
-
* headlines with sentiment tags, served from the backend's hourly-refreshed
|
|
6
|
-
* cache. Public — no authentication required.
|
|
7
|
-
*
|
|
8
|
-
* @example
|
|
9
|
-
* ```typescript
|
|
10
|
-
* const pulse = await sdk.pulse.getPulse();
|
|
11
|
-
* for (const item of pulse.items) {
|
|
12
|
-
* console.log(`[${item.sentiment}] ${item.asset}: ${item.summary}`);
|
|
13
|
-
* }
|
|
14
|
-
* ```
|
|
15
|
-
*/
|
|
16
|
-
import { BaseAPI } from "../base";
|
|
17
|
-
export class PulseAPIImpl extends BaseAPI {
|
|
18
|
-
/**
|
|
19
|
-
* Get the latest market pulse snapshot (public, no auth headers).
|
|
20
|
-
* Returns 503 while the backend cache is cold.
|
|
21
|
-
*/
|
|
22
|
-
async getPulse() {
|
|
23
|
-
return await this.makePublicRequest("/api/v1/pulse", {
|
|
24
|
-
method: "GET",
|
|
25
|
-
});
|
|
26
|
-
}
|
|
27
|
-
}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export { PulseAPIImpl } from "./api";
|
package/dist/api/pulse/index.js
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export { PulseAPIImpl } from "./api";
|