@0xmonaco/core 1.0.67 → 1.0.69
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/buildercodes/api.d.ts +7 -2
- package/dist/api/buildercodes/api.js +10 -2
- package/dist/api/faucet/api.d.ts +2 -2
- package/dist/api/faucet/api.js +2 -2
- package/dist/api/websocket/websocket.js +6 -3
- package/dist/api/whitelist/api.d.ts +4 -18
- package/dist/api/whitelist/api.js +4 -18
- package/package.json +3 -3
|
@@ -31,7 +31,10 @@ export declare class BuildercodesAPIImpl extends BaseAPI implements Buildercodes
|
|
|
31
31
|
*/
|
|
32
32
|
getConfig(): Promise<GetBuildercodesConfigResponse>;
|
|
33
33
|
/**
|
|
34
|
-
* List this frontend's per-trade BuilderCodes credits, newest first.
|
|
34
|
+
* List this frontend's per-trade BuilderCodes credits, newest first. Each
|
|
35
|
+
* credit carries its payout `kind`: `REVENUE_SHARE` (your share of Monaco's
|
|
36
|
+
* fee) or `BUILDER_FEE` (your builder fee). Pass `kind` to list one stream;
|
|
37
|
+
* `total` then counts only that stream.
|
|
35
38
|
*
|
|
36
39
|
* The server scopes every query to the authenticated application; neither
|
|
37
40
|
* the application id nor payout wallet can be supplied by the caller.
|
|
@@ -40,7 +43,9 @@ export declare class BuildercodesAPIImpl extends BaseAPI implements Buildercodes
|
|
|
40
43
|
/**
|
|
41
44
|
* Summarize this frontend's BuilderCodes earnings by token.
|
|
42
45
|
*
|
|
43
|
-
* Amounts are RAW atomic units and remain separated by token.
|
|
46
|
+
* Amounts are RAW atomic units and remain separated by token. `byToken` sums
|
|
47
|
+
* every payout kind; `byTokenAndKind` splits the same totals into the
|
|
48
|
+
* revenue share and the builder fee.
|
|
44
49
|
*/
|
|
45
50
|
getPayoutSummary(): Promise<GetBuildercodePayoutSummaryResponse>;
|
|
46
51
|
/**
|
|
@@ -103,7 +103,10 @@ export class BuildercodesAPIImpl extends BaseAPI {
|
|
|
103
103
|
});
|
|
104
104
|
}
|
|
105
105
|
/**
|
|
106
|
-
* List this frontend's per-trade BuilderCodes credits, newest first.
|
|
106
|
+
* List this frontend's per-trade BuilderCodes credits, newest first. Each
|
|
107
|
+
* credit carries its payout `kind`: `REVENUE_SHARE` (your share of Monaco's
|
|
108
|
+
* fee) or `BUILDER_FEE` (your builder fee). Pass `kind` to list one stream;
|
|
109
|
+
* `total` then counts only that stream.
|
|
107
110
|
*
|
|
108
111
|
* The server scopes every query to the authenticated application; neither
|
|
109
112
|
* the application id nor payout wallet can be supplied by the caller.
|
|
@@ -119,6 +122,9 @@ export class BuildercodesAPIImpl extends BaseAPI {
|
|
|
119
122
|
if (params?.pageSize !== undefined) {
|
|
120
123
|
searchParams.append("pageSize", params.pageSize.toString());
|
|
121
124
|
}
|
|
125
|
+
if (params?.kind !== undefined) {
|
|
126
|
+
searchParams.append("kind", params.kind);
|
|
127
|
+
}
|
|
122
128
|
const query = searchParams.toString();
|
|
123
129
|
const path = query ? `/api/v1/buildercodes/payouts?${query}` : "/api/v1/buildercodes/payouts";
|
|
124
130
|
return this.makeAuthenticatedRequest(path, { method: "GET" });
|
|
@@ -126,7 +132,9 @@ export class BuildercodesAPIImpl extends BaseAPI {
|
|
|
126
132
|
/**
|
|
127
133
|
* Summarize this frontend's BuilderCodes earnings by token.
|
|
128
134
|
*
|
|
129
|
-
* Amounts are RAW atomic units and remain separated by token.
|
|
135
|
+
* Amounts are RAW atomic units and remain separated by token. `byToken` sums
|
|
136
|
+
* every payout kind; `byTokenAndKind` splits the same totals into the
|
|
137
|
+
* revenue share and the builder fee.
|
|
130
138
|
*/
|
|
131
139
|
async getPayoutSummary() {
|
|
132
140
|
return this.makeAuthenticatedRequest("/api/v1/buildercodes/payouts/summary", { method: "GET" });
|
package/dist/api/faucet/api.d.ts
CHANGED
|
@@ -35,8 +35,8 @@ export declare class FaucetAPIImpl extends BaseAPI implements FaucetAPI {
|
|
|
35
35
|
*
|
|
36
36
|
* Read-only: remaining requests in the rolling 24h window, when the next
|
|
37
37
|
* request becomes available (`nextAvailableAt`, absent when nothing is in
|
|
38
|
-
* the window), and the 5 most recent requests.
|
|
39
|
-
* matching mint enforcement.
|
|
38
|
+
* the window), and the 5 most recent requests. Scoped to the wallet on this
|
|
39
|
+
* app (each app has its own quota), matching mint enforcement.
|
|
40
40
|
*
|
|
41
41
|
* @returns Promise resolving to the quota and recent-request history
|
|
42
42
|
*/
|
package/dist/api/faucet/api.js
CHANGED
|
@@ -40,8 +40,8 @@ export class FaucetAPIImpl extends BaseAPI {
|
|
|
40
40
|
*
|
|
41
41
|
* Read-only: remaining requests in the rolling 24h window, when the next
|
|
42
42
|
* request becomes available (`nextAvailableAt`, absent when nothing is in
|
|
43
|
-
* the window), and the 5 most recent requests.
|
|
44
|
-
* matching mint enforcement.
|
|
43
|
+
* the window), and the 5 most recent requests. Scoped to the wallet on this
|
|
44
|
+
* app (each app has its own quota), matching mint enforcement.
|
|
45
45
|
*
|
|
46
46
|
* @returns Promise resolving to the quota and recent-request history
|
|
47
47
|
*/
|
|
@@ -180,9 +180,8 @@ function parseConditionalOrderEventData(raw) {
|
|
|
180
180
|
// update.
|
|
181
181
|
createdAt: readOptionalString(data, "createdAt"),
|
|
182
182
|
updatedAt: readString(data, "updatedAt"),
|
|
183
|
-
// Populated on the subscribe-time snapshot frame
|
|
184
|
-
//
|
|
185
|
-
// value from being silently dropped before the subscriber.
|
|
183
|
+
// Populated on live updates and on the subscribe-time snapshot frame
|
|
184
|
+
// (0XM-2440); absent only for a row written before the counter existed.
|
|
186
185
|
version: readOptionalNumber(data, "version"),
|
|
187
186
|
};
|
|
188
187
|
}
|
|
@@ -597,6 +596,7 @@ function parseOrderSnapshotItem(raw) {
|
|
|
597
596
|
// `clientOrderId: undefined`, which a structural comparison would see.
|
|
598
597
|
const clientOrderId = readOptionalString(item, "clientOrderId");
|
|
599
598
|
const selfTradePreventionMode = readOptionalString(item, "selfTradePreventionMode");
|
|
599
|
+
const parentOrderId = readOptionalString(item, "parentOrderId");
|
|
600
600
|
const version = readOptionalNumber(item, "version");
|
|
601
601
|
return {
|
|
602
602
|
orderId: readString(item, "orderId"),
|
|
@@ -631,6 +631,9 @@ function parseOrderSnapshotItem(raw) {
|
|
|
631
631
|
// Spread in conditionally like `clientOrderId`: absent means the order
|
|
632
632
|
// requested no override, and must stay absent (0XM-2733).
|
|
633
633
|
...(selfTradePreventionMode === undefined ? {} : { selfTradePreventionMode }),
|
|
634
|
+
// Spread in conditionally too: absent for an order that is not a TWAP
|
|
635
|
+
// child, and absent must stay absent.
|
|
636
|
+
...(parentOrderId === undefined ? {} : { parentOrderId }),
|
|
634
637
|
// Spread in conditionally for the same reason as `clientOrderId`: the
|
|
635
638
|
// server omits the key when unknown, and absent must stay absent rather
|
|
636
639
|
// than becoming `version: undefined` — a resync compares this value, and
|
|
@@ -1,27 +1,13 @@
|
|
|
1
1
|
/**
|
|
2
|
-
*
|
|
3
|
-
*
|
|
4
|
-
* Public (unauthenticated) whitelist/waitlist application submission. The
|
|
5
|
-
* server validates and de-duplicates by wallet address and email, creating an
|
|
6
|
-
* inactive user pending manual approval. This is an onboarding endpoint, not a
|
|
7
|
-
* trading operation.
|
|
8
|
-
*
|
|
9
|
-
* @example
|
|
10
|
-
* ```typescript
|
|
11
|
-
* const { message, userId } = await sdk.whitelist.submit({
|
|
12
|
-
* walletAddress: "0x...",
|
|
13
|
-
* email: "user@example.com",
|
|
14
|
-
* });
|
|
15
|
-
* ```
|
|
2
|
+
* Retained client for the retired public whitelist endpoint.
|
|
3
|
+
* Submissions return HTTP 403 FORBIDDEN without changing applicant data.
|
|
16
4
|
*/
|
|
17
5
|
import type { SubmitWhitelistRequest, SubmitWhitelistResponse, WhitelistAPI } from "@0xmonaco/types";
|
|
18
6
|
import { BaseAPI } from "../base";
|
|
19
7
|
export declare class WhitelistAPIImpl extends BaseAPI implements WhitelistAPI {
|
|
20
8
|
/**
|
|
21
|
-
*
|
|
22
|
-
*
|
|
23
|
-
* @param body - Applicant details
|
|
24
|
-
* @returns Promise resolving to the status message and created user id
|
|
9
|
+
* @deprecated Public whitelist applications are closed. The server returns HTTP 403.
|
|
10
|
+
* @param body - Legacy applicant details; the request shape is retained for compatibility.
|
|
25
11
|
*/
|
|
26
12
|
submit(body: SubmitWhitelistRequest): Promise<SubmitWhitelistResponse>;
|
|
27
13
|
}
|
|
@@ -1,27 +1,13 @@
|
|
|
1
1
|
/**
|
|
2
|
-
*
|
|
3
|
-
*
|
|
4
|
-
* Public (unauthenticated) whitelist/waitlist application submission. The
|
|
5
|
-
* server validates and de-duplicates by wallet address and email, creating an
|
|
6
|
-
* inactive user pending manual approval. This is an onboarding endpoint, not a
|
|
7
|
-
* trading operation.
|
|
8
|
-
*
|
|
9
|
-
* @example
|
|
10
|
-
* ```typescript
|
|
11
|
-
* const { message, userId } = await sdk.whitelist.submit({
|
|
12
|
-
* walletAddress: "0x...",
|
|
13
|
-
* email: "user@example.com",
|
|
14
|
-
* });
|
|
15
|
-
* ```
|
|
2
|
+
* Retained client for the retired public whitelist endpoint.
|
|
3
|
+
* Submissions return HTTP 403 FORBIDDEN without changing applicant data.
|
|
16
4
|
*/
|
|
17
5
|
import { BaseAPI } from "../base";
|
|
18
6
|
import { perpRoutes } from "../perp/routes";
|
|
19
7
|
export class WhitelistAPIImpl extends BaseAPI {
|
|
20
8
|
/**
|
|
21
|
-
*
|
|
22
|
-
*
|
|
23
|
-
* @param body - Applicant details
|
|
24
|
-
* @returns Promise resolving to the status message and created user id
|
|
9
|
+
* @deprecated Public whitelist applications are closed. The server returns HTTP 403.
|
|
10
|
+
* @param body - Legacy applicant details; the request shape is retained for compatibility.
|
|
25
11
|
*/
|
|
26
12
|
async submit(body) {
|
|
27
13
|
return await this.makePublicRequest(perpRoutes.whitelist.submit(), {
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@0xmonaco/core",
|
|
3
|
-
"version": "1.0.
|
|
3
|
+
"version": "1.0.69",
|
|
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.69",
|
|
23
|
+
"@0xmonaco/types": "1.0.69",
|
|
24
24
|
"@noble/curves": "^1.9.1",
|
|
25
25
|
"@noble/hashes": "^2.4.0",
|
|
26
26
|
"http-status-codes": "^2.3.0"
|