@0xmonaco/core 1.0.73 → 1.0.75
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 +0 -5
- package/dist/api/applications/api.d.ts +53 -22
- package/dist/api/applications/api.js +88 -22
- package/dist/api/auth/api.d.ts +1 -3
- package/dist/api/auth/api.js +1 -3
- package/dist/api/base.d.ts +0 -35
- package/dist/api/base.js +0 -54
- package/dist/api/buildercodes/api.d.ts +3 -3
- package/dist/api/buildercodes/api.js +3 -3
- package/dist/api/delegated-agents/api.js +1 -0
- package/dist/api/margin-accounts/api.d.ts +7 -1
- package/dist/api/margin-accounts/api.js +48 -2
- package/dist/api/market/api.js +3 -1
- package/dist/api/perp/routes.d.ts +22 -11
- package/dist/api/perp/routes.js +6 -0
- package/dist/api/pitpass/api.d.ts +19 -8
- package/dist/api/pitpass/api.js +49 -11
- package/dist/api/portfolio/api.d.ts +2 -2
- package/dist/api/portfolio/api.js +11 -2
- package/dist/api/positions/api.d.ts +20 -8
- package/dist/api/positions/api.js +20 -8
- package/dist/api/profile/api.d.ts +55 -18
- package/dist/api/profile/api.js +77 -28
- package/dist/api/trading/api.d.ts +6 -11
- package/dist/api/trading/api.js +6 -11
- package/dist/api/websocket/websocket.js +134 -26
- package/dist/coverage.d.ts +7 -0
- package/dist/coverage.js +7 -0
- package/dist/sdk.d.ts +0 -18
- package/dist/sdk.js +0 -42
- package/package.json +3 -3
package/dist/sdk.js
CHANGED
|
@@ -103,48 +103,6 @@ export class MonacoSDKImpl {
|
|
|
103
103
|
this.trades.setSessionKeypair(credentials);
|
|
104
104
|
this.ws.setSessionKeypair(credentials);
|
|
105
105
|
}
|
|
106
|
-
/**
|
|
107
|
-
* Set (or clear) the application secret key used for backend-authenticated
|
|
108
|
-
* requests (those annotated `#[require_backend]` on the gateway, e.g. the
|
|
109
|
-
* `applications` reporting endpoints).
|
|
110
|
-
*
|
|
111
|
-
* The raw `sk_...` key is sent in the `x-server-key` header on each such
|
|
112
|
-
* request. This is independent of {@link login}/session auth — a client may
|
|
113
|
-
* hold both a session and a server key at once.
|
|
114
|
-
*
|
|
115
|
-
* @param serverKey - The application secret key (`sk_...`), or `undefined` to clear.
|
|
116
|
-
*
|
|
117
|
-
* @example
|
|
118
|
-
* ```typescript
|
|
119
|
-
* sdk.setServerKey("sk_live_...");
|
|
120
|
-
* const orders = await sdk.applications.listApplicationOrders({ status: "FILLED" });
|
|
121
|
-
* ```
|
|
122
|
-
*/
|
|
123
|
-
setServerKey(serverKey) {
|
|
124
|
-
this.auth.setServerKey(serverKey);
|
|
125
|
-
this.delegatedAgents.setServerKey(serverKey);
|
|
126
|
-
this.applications.setServerKey(serverKey);
|
|
127
|
-
this.fees.setServerKey(serverKey);
|
|
128
|
-
this.buildercodes.setServerKey(serverKey);
|
|
129
|
-
this.copyTrading.setServerKey(serverKey);
|
|
130
|
-
this.pitpass.setServerKey(serverKey);
|
|
131
|
-
this.vault.setServerKey(serverKey);
|
|
132
|
-
this.withdrawals.setServerKey(serverKey);
|
|
133
|
-
this.trading.setServerKey(serverKey);
|
|
134
|
-
this.market.setServerKey(serverKey);
|
|
135
|
-
this.marginAccounts.setServerKey(serverKey);
|
|
136
|
-
this.positions.setServerKey(serverKey);
|
|
137
|
-
this.portfolio.setServerKey(serverKey);
|
|
138
|
-
this.subAccounts.setServerKey(serverKey);
|
|
139
|
-
this.faucet.setServerKey(serverKey);
|
|
140
|
-
this.sweeper.setServerKey(serverKey);
|
|
141
|
-
this.managedMarkets.setServerKey(serverKey);
|
|
142
|
-
this.whitelist.setServerKey(serverKey);
|
|
143
|
-
this.pulse.setServerKey(serverKey);
|
|
144
|
-
this.profile.setServerKey(serverKey);
|
|
145
|
-
this.orderbook.setServerKey(serverKey);
|
|
146
|
-
this.trades.setServerKey(serverKey);
|
|
147
|
-
}
|
|
148
106
|
/** Extract the session keypair from an auth state. */
|
|
149
107
|
sessionFromAuthState(authState) {
|
|
150
108
|
return {
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@0xmonaco/core",
|
|
3
|
-
"version": "1.0.
|
|
3
|
+
"version": "1.0.75",
|
|
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.
|
|
23
|
-
"@0xmonaco/types": "1.0.
|
|
22
|
+
"@0xmonaco/contracts": "1.0.75",
|
|
23
|
+
"@0xmonaco/types": "1.0.75",
|
|
24
24
|
"@noble/curves": "^1.9.1",
|
|
25
25
|
"@noble/hashes": "^2.4.0",
|
|
26
26
|
"http-status-codes": "^2.3.0"
|