@0xmonaco/core 0.8.21 → 0.8.22-develop.efb9dc9
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/auth/api.d.ts +2 -2
- package/dist/api/auth/api.js +5 -4
- package/dist/api/index.d.ts +1 -0
- package/dist/api/index.js +1 -0
- package/dist/api/perp/routes.d.ts +5 -0
- package/dist/api/perp/routes.js +1 -0
- package/dist/api/pitpass/api.d.ts +56 -0
- package/dist/api/pitpass/api.js +69 -0
- package/dist/api/pitpass/index.d.ts +6 -0
- package/dist/api/pitpass/index.js +6 -0
- package/dist/api/positions/api.d.ts +2 -1
- package/dist/api/positions/api.js +5 -1
- package/dist/coverage.d.ts +5 -0
- package/dist/coverage.js +5 -0
- package/dist/sdk.d.ts +2 -1
- package/dist/sdk.js +5 -0
- package/package.json +3 -3
package/dist/api/auth/api.d.ts
CHANGED
|
@@ -71,7 +71,7 @@ export declare class AuthAPIImpl extends BaseAPI implements AuthAPI {
|
|
|
71
71
|
* console.log(`User ID: ${authResult.user.id}`);
|
|
72
72
|
* ```
|
|
73
73
|
*/
|
|
74
|
-
authenticate(clientId: string): Promise<AuthState>;
|
|
74
|
+
authenticate(clientId: string, referralCode?: string): Promise<AuthState>;
|
|
75
75
|
/**
|
|
76
76
|
* Signs a challenge message using the wallet client.
|
|
77
77
|
*
|
|
@@ -137,7 +137,7 @@ export declare class AuthAPIImpl extends BaseAPI implements AuthAPI {
|
|
|
137
137
|
* console.log(`Session public key: ${authResult.sessionPublicKey}`);
|
|
138
138
|
* ```
|
|
139
139
|
*/
|
|
140
|
-
verifySignature(address: string, signature: string, nonce: string, clientId: string, session: SessionCredentials): Promise<AuthState>;
|
|
140
|
+
verifySignature(address: string, signature: string, nonce: string, clientId: string, session: SessionCredentials, referralCode?: string): Promise<AuthState>;
|
|
141
141
|
/**
|
|
142
142
|
* Extends the current session's expiry.
|
|
143
143
|
*
|
package/dist/api/auth/api.js
CHANGED
|
@@ -77,7 +77,7 @@ export class AuthAPIImpl extends BaseAPI {
|
|
|
77
77
|
* console.log(`User ID: ${authResult.user.id}`);
|
|
78
78
|
* ```
|
|
79
79
|
*/
|
|
80
|
-
async authenticate(clientId) {
|
|
80
|
+
async authenticate(clientId, referralCode) {
|
|
81
81
|
if (!this.walletClient) {
|
|
82
82
|
throw new InvalidConfigError("Wallet client not set. Connect a wallet first.", "walletClient");
|
|
83
83
|
}
|
|
@@ -96,8 +96,8 @@ export class AuthAPIImpl extends BaseAPI {
|
|
|
96
96
|
const challenge = await this.createChallenge(account.address, clientId, session.publicKey);
|
|
97
97
|
// 3. Sign the challenge message with the wallet
|
|
98
98
|
const signature = await this.signChallenge(challenge.message);
|
|
99
|
-
// 4. Verify signature, registering the session public key
|
|
100
|
-
return await this.verifySignature(account.address, signature, challenge.nonce, clientId, session);
|
|
99
|
+
// 4. Verify signature, registering the session public key (and optional referral)
|
|
100
|
+
return await this.verifySignature(account.address, signature, challenge.nonce, clientId, session, referralCode);
|
|
101
101
|
}
|
|
102
102
|
/**
|
|
103
103
|
* Signs a challenge message using the wallet client.
|
|
@@ -192,7 +192,7 @@ export class AuthAPIImpl extends BaseAPI {
|
|
|
192
192
|
* console.log(`Session public key: ${authResult.sessionPublicKey}`);
|
|
193
193
|
* ```
|
|
194
194
|
*/
|
|
195
|
-
async verifySignature(address, signature, nonce, clientId, session) {
|
|
195
|
+
async verifySignature(address, signature, nonce, clientId, session, referralCode) {
|
|
196
196
|
const responseBody = await this.makePublicRequest("/api/v1/auth/verify", {
|
|
197
197
|
method: "POST",
|
|
198
198
|
body: JSON.stringify({
|
|
@@ -202,6 +202,7 @@ export class AuthAPIImpl extends BaseAPI {
|
|
|
202
202
|
clientId: clientId,
|
|
203
203
|
chainId: this.chain.id,
|
|
204
204
|
sessionPublicKey: session.publicKey,
|
|
205
|
+
...(referralCode ? { referralCode } : {}),
|
|
205
206
|
}),
|
|
206
207
|
});
|
|
207
208
|
return {
|
package/dist/api/index.d.ts
CHANGED
package/dist/api/index.js
CHANGED
|
@@ -168,6 +168,11 @@ export declare const perpRoutes: {
|
|
|
168
168
|
page?: number;
|
|
169
169
|
pageSize?: number;
|
|
170
170
|
}) => string;
|
|
171
|
+
readonly pnlHistory: (positionId: string, params: {
|
|
172
|
+
interval: string;
|
|
173
|
+
startTime?: number;
|
|
174
|
+
endTime?: number;
|
|
175
|
+
}) => string;
|
|
171
176
|
};
|
|
172
177
|
readonly marginAccounts: {
|
|
173
178
|
readonly list: (params?: {
|
package/dist/api/perp/routes.js
CHANGED
|
@@ -93,6 +93,7 @@ export const perpRoutes = {
|
|
|
93
93
|
reduceMargin: (positionId) => `${API_V1}/positions/${encodeSegment(positionId)}/margin/reduce`,
|
|
94
94
|
attachTpSl: (positionId) => `${API_V1}/positions/${encodeSegment(positionId)}/tp-sl`,
|
|
95
95
|
history: (params) => withQuery(`${API_V1}/positions/history`, params),
|
|
96
|
+
pnlHistory: (positionId, params) => withQuery(`${API_V1}/positions/${encodeSegment(positionId)}/pnl/history`, params),
|
|
96
97
|
},
|
|
97
98
|
marginAccounts: {
|
|
98
99
|
list: (params) => withQuery(`${API_V1}/margin/accounts`, params),
|
|
@@ -0,0 +1,56 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* PitPass TraderCode API Implementation
|
|
3
|
+
*
|
|
4
|
+
* Provides methods for the PitPass referral system: reading your wallet-derived
|
|
5
|
+
* TraderCode, a public lookup to validate a referral code at sign-up, reading
|
|
6
|
+
* your accrued rewards balance, and transferring rewards into a tradeable balance.
|
|
7
|
+
*
|
|
8
|
+
* `getMyTraderCode` and `getRewardsBalance` require authentication.
|
|
9
|
+
* `getTraderCodeInfo` is public (no auth required).
|
|
10
|
+
* `transferRewards` requires authentication.
|
|
11
|
+
*
|
|
12
|
+
* @example
|
|
13
|
+
* ```typescript
|
|
14
|
+
* // Read your own code (authenticated)
|
|
15
|
+
* const { code } = await sdk.pitpass.getMyTraderCode();
|
|
16
|
+
* console.log(`Share code: Monaco - ${code}`);
|
|
17
|
+
*
|
|
18
|
+
* // Validate a referral code at sign-up (public)
|
|
19
|
+
* const info = await sdk.pitpass.getTraderCodeInfo("0xabc...");
|
|
20
|
+
* console.log(`Referrer code: ${info.code}`);
|
|
21
|
+
*
|
|
22
|
+
* // Read accrued rewards balance (authenticated)
|
|
23
|
+
* const { balances } = await sdk.pitpass.getRewardsBalance();
|
|
24
|
+
* for (const b of balances) {
|
|
25
|
+
* console.log(`${b.token}: ${b.available}`);
|
|
26
|
+
* }
|
|
27
|
+
*
|
|
28
|
+
* // Transfer rewards into trading balance (authenticated)
|
|
29
|
+
* const result = await sdk.pitpass.transferRewards({
|
|
30
|
+
* token: "0xusdc...",
|
|
31
|
+
* amount: "1000000",
|
|
32
|
+
* });
|
|
33
|
+
* console.log(`Rewards remaining: ${result.rewardsBalance}`);
|
|
34
|
+
* ```
|
|
35
|
+
*/
|
|
36
|
+
import type { GetRewardsBalanceResponse, PitpassAPI, TraderCodeInfoResponse, TraderCodeResponse, TransferRewardsParams, TransferRewardsResponse } from "@0xmonaco/types";
|
|
37
|
+
import { BaseAPI } from "../base";
|
|
38
|
+
export declare class PitpassAPIImpl extends BaseAPI implements PitpassAPI {
|
|
39
|
+
/**
|
|
40
|
+
* Return the authenticated caller's TraderCode (their normalized wallet address).
|
|
41
|
+
*/
|
|
42
|
+
getMyTraderCode(): Promise<TraderCodeResponse>;
|
|
43
|
+
/**
|
|
44
|
+
* Public lookup of a TraderCode by wallet address.
|
|
45
|
+
* Accepts the bare address or the `Monaco - <address>` display form.
|
|
46
|
+
*/
|
|
47
|
+
getTraderCodeInfo(code: string): Promise<TraderCodeInfoResponse>;
|
|
48
|
+
/**
|
|
49
|
+
* Return the caller's current PitPass rewards-bucket balances.
|
|
50
|
+
*/
|
|
51
|
+
getRewardsBalance(): Promise<GetRewardsBalanceResponse>;
|
|
52
|
+
/**
|
|
53
|
+
* Transfer earned PitPass rewards into a trading balance.
|
|
54
|
+
*/
|
|
55
|
+
transferRewards(params: TransferRewardsParams): Promise<TransferRewardsResponse>;
|
|
56
|
+
}
|
|
@@ -0,0 +1,69 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* PitPass TraderCode API Implementation
|
|
3
|
+
*
|
|
4
|
+
* Provides methods for the PitPass referral system: reading your wallet-derived
|
|
5
|
+
* TraderCode, a public lookup to validate a referral code at sign-up, reading
|
|
6
|
+
* your accrued rewards balance, and transferring rewards into a tradeable balance.
|
|
7
|
+
*
|
|
8
|
+
* `getMyTraderCode` and `getRewardsBalance` require authentication.
|
|
9
|
+
* `getTraderCodeInfo` is public (no auth required).
|
|
10
|
+
* `transferRewards` requires authentication.
|
|
11
|
+
*
|
|
12
|
+
* @example
|
|
13
|
+
* ```typescript
|
|
14
|
+
* // Read your own code (authenticated)
|
|
15
|
+
* const { code } = await sdk.pitpass.getMyTraderCode();
|
|
16
|
+
* console.log(`Share code: Monaco - ${code}`);
|
|
17
|
+
*
|
|
18
|
+
* // Validate a referral code at sign-up (public)
|
|
19
|
+
* const info = await sdk.pitpass.getTraderCodeInfo("0xabc...");
|
|
20
|
+
* console.log(`Referrer code: ${info.code}`);
|
|
21
|
+
*
|
|
22
|
+
* // Read accrued rewards balance (authenticated)
|
|
23
|
+
* const { balances } = await sdk.pitpass.getRewardsBalance();
|
|
24
|
+
* for (const b of balances) {
|
|
25
|
+
* console.log(`${b.token}: ${b.available}`);
|
|
26
|
+
* }
|
|
27
|
+
*
|
|
28
|
+
* // Transfer rewards into trading balance (authenticated)
|
|
29
|
+
* const result = await sdk.pitpass.transferRewards({
|
|
30
|
+
* token: "0xusdc...",
|
|
31
|
+
* amount: "1000000",
|
|
32
|
+
* });
|
|
33
|
+
* console.log(`Rewards remaining: ${result.rewardsBalance}`);
|
|
34
|
+
* ```
|
|
35
|
+
*/
|
|
36
|
+
import { TransferRewardsParamsSchema, validate } from "@0xmonaco/types";
|
|
37
|
+
import { BaseAPI } from "../base";
|
|
38
|
+
export class PitpassAPIImpl extends BaseAPI {
|
|
39
|
+
/**
|
|
40
|
+
* Return the authenticated caller's TraderCode (their normalized wallet address).
|
|
41
|
+
*/
|
|
42
|
+
async getMyTraderCode() {
|
|
43
|
+
return await this.makeAuthenticatedRequest("/api/v1/pitpass/codes/me", { method: "GET" });
|
|
44
|
+
}
|
|
45
|
+
/**
|
|
46
|
+
* Public lookup of a TraderCode by wallet address.
|
|
47
|
+
* Accepts the bare address or the `Monaco - <address>` display form.
|
|
48
|
+
*/
|
|
49
|
+
async getTraderCodeInfo(code) {
|
|
50
|
+
const encoded = encodeURIComponent(code.trim());
|
|
51
|
+
return await this.makePublicRequest(`/api/v1/pitpass/codes/${encoded}`, { method: "GET" });
|
|
52
|
+
}
|
|
53
|
+
/**
|
|
54
|
+
* Return the caller's current PitPass rewards-bucket balances.
|
|
55
|
+
*/
|
|
56
|
+
async getRewardsBalance() {
|
|
57
|
+
return await this.makeAuthenticatedRequest("/api/v1/pitpass/rewards/balance", { method: "GET" });
|
|
58
|
+
}
|
|
59
|
+
/**
|
|
60
|
+
* Transfer earned PitPass rewards into a trading balance.
|
|
61
|
+
*/
|
|
62
|
+
async transferRewards(params) {
|
|
63
|
+
const validated = validate(TransferRewardsParamsSchema, params);
|
|
64
|
+
return await this.makeAuthenticatedRequest("/api/v1/pitpass/rewards/transfer", {
|
|
65
|
+
method: "POST",
|
|
66
|
+
body: JSON.stringify({ token: validated.token, amount: validated.amount }),
|
|
67
|
+
});
|
|
68
|
+
}
|
|
69
|
+
}
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import type { AddPositionMarginRequest, AttachPositionTpSlRequest, AttachPositionTpSlResponse, BatchCloseAllRequest, BatchCloseAllResponse, ClosePositionRequest, ClosePositionResponse, GetPositionResponse, ListPositionHistoryParams, ListPositionHistoryResponse, ListPositionsParams, ListPositionsResponse, PositionMarginResponse, PositionRisk, PositionsAPI, ReducePositionMarginRequest } from "@0xmonaco/types";
|
|
1
|
+
import type { AddPositionMarginRequest, AttachPositionTpSlRequest, AttachPositionTpSlResponse, BatchCloseAllRequest, BatchCloseAllResponse, ClosePositionRequest, ClosePositionResponse, GetPositionPnlHistoryParams, GetPositionPnlHistoryResponse, GetPositionResponse, ListPositionHistoryParams, ListPositionHistoryResponse, ListPositionsParams, ListPositionsResponse, PositionMarginResponse, PositionRisk, PositionsAPI, ReducePositionMarginRequest } from "@0xmonaco/types";
|
|
2
2
|
import { BaseAPI } from "../base";
|
|
3
3
|
export declare class PositionsAPIImpl extends BaseAPI implements PositionsAPI {
|
|
4
4
|
listPositions(params?: ListPositionsParams): Promise<ListPositionsResponse>;
|
|
@@ -10,4 +10,5 @@ export declare class PositionsAPIImpl extends BaseAPI implements PositionsAPI {
|
|
|
10
10
|
reducePositionMargin(positionId: string, request: ReducePositionMarginRequest): Promise<PositionMarginResponse>;
|
|
11
11
|
attachPositionTpSl(positionId: string, request: AttachPositionTpSlRequest): Promise<AttachPositionTpSlResponse>;
|
|
12
12
|
listPositionHistory(params?: ListPositionHistoryParams): Promise<ListPositionHistoryResponse>;
|
|
13
|
+
getPositionPnlHistory(positionId: string, params: GetPositionPnlHistoryParams): Promise<GetPositionPnlHistoryResponse>;
|
|
13
14
|
}
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { AddPositionMarginSchema, AttachPositionTpSlSchema, BatchCloseAllSchema, ClosePositionSchema, GetPositionRiskSchema, GetPositionSchema, ListPositionHistorySchema, ListPositionsSchema, ReducePositionMarginSchema, validate, } from "@0xmonaco/types";
|
|
1
|
+
import { AddPositionMarginSchema, AttachPositionTpSlSchema, BatchCloseAllSchema, ClosePositionSchema, GetPositionPnlHistorySchema, GetPositionRiskSchema, GetPositionSchema, ListPositionHistorySchema, ListPositionsSchema, ReducePositionMarginSchema, validate, } from "@0xmonaco/types";
|
|
2
2
|
import { BaseAPI } from "../base";
|
|
3
3
|
import { perpRoutes } from "../perp";
|
|
4
4
|
export class PositionsAPIImpl extends BaseAPI {
|
|
@@ -95,4 +95,8 @@ export class PositionsAPIImpl extends BaseAPI {
|
|
|
95
95
|
}
|
|
96
96
|
return await this.makeAuthenticatedRequest(perpRoutes.positions.history(params));
|
|
97
97
|
}
|
|
98
|
+
async getPositionPnlHistory(positionId, params) {
|
|
99
|
+
validate(GetPositionPnlHistorySchema, { positionId, params });
|
|
100
|
+
return await this.makeAuthenticatedRequest(perpRoutes.positions.pnlHistory(positionId, params));
|
|
101
|
+
}
|
|
98
102
|
}
|
package/dist/coverage.d.ts
CHANGED
|
@@ -29,6 +29,9 @@ export declare const COVERED: {
|
|
|
29
29
|
get_market_metadata: string;
|
|
30
30
|
get_market_stats: string;
|
|
31
31
|
get_my_fee_tier: string;
|
|
32
|
+
get_my_trader_code: string;
|
|
33
|
+
get_rewards_balance: string;
|
|
34
|
+
get_trader_code_info: string;
|
|
32
35
|
get_open_interest: string;
|
|
33
36
|
get_order_by_id: string;
|
|
34
37
|
get_orderbook_snapshot: string;
|
|
@@ -38,6 +41,7 @@ export declare const COVERED: {
|
|
|
38
41
|
get_portfolio_chart: string;
|
|
39
42
|
get_portfolio_stats: string;
|
|
40
43
|
get_position: string;
|
|
44
|
+
get_position_pnl_history: string;
|
|
41
45
|
get_position_risk: string;
|
|
42
46
|
get_parent_margin_account_movements: string;
|
|
43
47
|
get_parent_margin_account_summary: string;
|
|
@@ -84,6 +88,7 @@ export declare const COVERED: {
|
|
|
84
88
|
transfer_collateral_to_margin_account: string;
|
|
85
89
|
transfer_collateral_to_parent_margin_account: string;
|
|
86
90
|
transfer_collateral_to_risk_bucket: string;
|
|
91
|
+
transfer_rewards: string;
|
|
87
92
|
update_sub_account_limit: string;
|
|
88
93
|
upsert_delegated_agent: string;
|
|
89
94
|
verify_signature: string;
|
package/dist/coverage.js
CHANGED
|
@@ -29,6 +29,9 @@ export const COVERED = {
|
|
|
29
29
|
get_market_metadata: "getMarketMetadata",
|
|
30
30
|
get_market_stats: "getMarketStats",
|
|
31
31
|
get_my_fee_tier: "getMyFeeTier",
|
|
32
|
+
get_my_trader_code: "pitpass.getMyTraderCode",
|
|
33
|
+
get_rewards_balance: "pitpass.getRewardsBalance",
|
|
34
|
+
get_trader_code_info: "pitpass.getTraderCodeInfo",
|
|
32
35
|
get_open_interest: "getOpenInterest",
|
|
33
36
|
get_order_by_id: "getOrder",
|
|
34
37
|
get_orderbook_snapshot: "getOrderbook",
|
|
@@ -38,6 +41,7 @@ export const COVERED = {
|
|
|
38
41
|
get_portfolio_chart: "getPortfolioChart",
|
|
39
42
|
get_portfolio_stats: "getPortfolioStats",
|
|
40
43
|
get_position: "getPosition",
|
|
44
|
+
get_position_pnl_history: "getPositionPnlHistory",
|
|
41
45
|
get_position_risk: "getPositionRisk",
|
|
42
46
|
get_parent_margin_account_movements: "getParentMarginAccountMovements",
|
|
43
47
|
get_parent_margin_account_summary: "getParentMarginAccountSummary",
|
|
@@ -84,6 +88,7 @@ export const COVERED = {
|
|
|
84
88
|
transfer_collateral_to_margin_account: "transferCollateralToMarginAccount",
|
|
85
89
|
transfer_collateral_to_parent_margin_account: "transferCollateralToParentMarginAccount",
|
|
86
90
|
transfer_collateral_to_risk_bucket: "transferCollateralToRiskBucket",
|
|
91
|
+
transfer_rewards: "pitpass.transferRewards",
|
|
87
92
|
update_sub_account_limit: "subAccounts.updateLimit",
|
|
88
93
|
upsert_delegated_agent: "upsertDelegatedAgent",
|
|
89
94
|
verify_signature: "verifySignature",
|
package/dist/sdk.d.ts
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import type { ApplicationsAPI, AuthAPI, AuthState, DelegatedAgentsAPI, FaucetAPI, FeesAPI, MarginAccountsAPI, MarketAPI, MonacoSDK, Network, PositionsAPI, ProfileAPI, SDKConfig, SubAccountsAPI, TradingAPI, VaultAPI, WhitelistAPI, WithdrawalsAPI } from "@0xmonaco/types";
|
|
1
|
+
import type { ApplicationsAPI, AuthAPI, AuthState, DelegatedAgentsAPI, FaucetAPI, FeesAPI, MarginAccountsAPI, MarketAPI, MonacoSDK, Network, PitpassAPI, 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 {
|
|
@@ -6,6 +6,7 @@ export declare class MonacoSDKImpl implements MonacoSDK {
|
|
|
6
6
|
delegatedAgents: DelegatedAgentsAPI;
|
|
7
7
|
applications: ApplicationsAPI;
|
|
8
8
|
fees: FeesAPI;
|
|
9
|
+
pitpass: PitpassAPI;
|
|
9
10
|
vault: VaultAPI;
|
|
10
11
|
withdrawals: WithdrawalsAPI;
|
|
11
12
|
trading: TradingAPI;
|
package/dist/sdk.js
CHANGED
|
@@ -8,6 +8,7 @@ import { FaucetAPIImpl } from "./api/faucet";
|
|
|
8
8
|
import { FeesAPIImpl } from "./api/fees";
|
|
9
9
|
import { MarginAccountsAPIImpl } from "./api/margin-accounts";
|
|
10
10
|
import { MarketAPIImpl } from "./api/market";
|
|
11
|
+
import { PitpassAPIImpl } from "./api/pitpass";
|
|
11
12
|
import { PositionsAPIImpl } from "./api/positions";
|
|
12
13
|
import { ProfileAPIImpl } from "./api/profile";
|
|
13
14
|
import { SubAccountsAPIImpl } from "./api/sub-accounts";
|
|
@@ -33,6 +34,7 @@ export class MonacoSDKImpl {
|
|
|
33
34
|
delegatedAgents;
|
|
34
35
|
applications;
|
|
35
36
|
fees;
|
|
37
|
+
pitpass;
|
|
36
38
|
vault;
|
|
37
39
|
withdrawals;
|
|
38
40
|
trading;
|
|
@@ -60,6 +62,7 @@ export class MonacoSDKImpl {
|
|
|
60
62
|
this.delegatedAgents.setSessionKeypair(credentials);
|
|
61
63
|
this.applications.setSessionKeypair(credentials);
|
|
62
64
|
this.fees.setSessionKeypair(credentials);
|
|
65
|
+
this.pitpass.setSessionKeypair(credentials);
|
|
63
66
|
this.vault.setSessionKeypair(credentials);
|
|
64
67
|
this.withdrawals.setSessionKeypair(credentials);
|
|
65
68
|
this.trading.setSessionKeypair(credentials);
|
|
@@ -96,6 +99,7 @@ export class MonacoSDKImpl {
|
|
|
96
99
|
this.delegatedAgents.setServerKey(serverKey);
|
|
97
100
|
this.applications.setServerKey(serverKey);
|
|
98
101
|
this.fees.setServerKey(serverKey);
|
|
102
|
+
this.pitpass.setServerKey(serverKey);
|
|
99
103
|
this.vault.setServerKey(serverKey);
|
|
100
104
|
this.withdrawals.setServerKey(serverKey);
|
|
101
105
|
this.trading.setServerKey(serverKey);
|
|
@@ -164,6 +168,7 @@ export class MonacoSDKImpl {
|
|
|
164
168
|
this.auth = new AuthAPIImpl(this.walletClient, this.chain, apiUrl);
|
|
165
169
|
this.delegatedAgents = new DelegatedAgentsAPIImpl(apiUrl);
|
|
166
170
|
this.fees = new FeesAPIImpl(apiUrl);
|
|
171
|
+
this.pitpass = new PitpassAPIImpl(apiUrl);
|
|
167
172
|
this.profile = new ProfileAPIImpl(apiUrl);
|
|
168
173
|
this.vault = new VaultAPIImpl(this.publicClient, this.walletClient, this.chain, this.applications, this.profile, apiUrl);
|
|
169
174
|
this.withdrawals = new WithdrawalsAPIImpl(apiUrl);
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@0xmonaco/core",
|
|
3
|
-
"version": "0.8.
|
|
3
|
+
"version": "0.8.22-develop.efb9dc9",
|
|
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": "0.8.
|
|
27
|
-
"@0xmonaco/types": "0.8.
|
|
26
|
+
"@0xmonaco/contracts": "0.8.22-develop.efb9dc9",
|
|
27
|
+
"@0xmonaco/types": "0.8.22-develop.efb9dc9",
|
|
28
28
|
"@noble/curves": "^1.9.1",
|
|
29
29
|
"@noble/hashes": "^1.8.0",
|
|
30
30
|
"http-status-codes": "^2.3.0"
|