@pod-network/trade-sdk 0.2.0 → 0.4.0
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 +94 -2
- package/dist/client.d.ts +19 -1
- package/dist/client.d.ts.map +1 -1
- package/dist/client.js +25 -13
- package/dist/client.js.map +1 -1
- package/dist/codec/bridge.d.ts +82 -0
- package/dist/codec/bridge.d.ts.map +1 -0
- package/dist/codec/bridge.js +114 -0
- package/dist/codec/bridge.js.map +1 -0
- package/dist/codec/decode.d.ts +15 -2
- package/dist/codec/decode.d.ts.map +1 -1
- package/dist/codec/decode.js +46 -6
- package/dist/codec/decode.js.map +1 -1
- package/dist/codec/direction.d.ts +10 -0
- package/dist/codec/direction.d.ts.map +1 -0
- package/dist/codec/direction.js +46 -0
- package/dist/codec/direction.js.map +1 -0
- package/dist/codec/orders-v2.d.ts +19 -0
- package/dist/codec/orders-v2.d.ts.map +1 -0
- package/dist/codec/orders-v2.js +200 -0
- package/dist/codec/orders-v2.js.map +1 -0
- package/dist/codec/units.d.ts +10 -0
- package/dist/codec/units.d.ts.map +1 -1
- package/dist/codec/units.js +25 -1
- package/dist/codec/units.js.map +1 -1
- package/dist/index.d.ts +3 -0
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +5 -0
- package/dist/index.js.map +1 -1
- package/dist/sync/orders.d.ts +71 -16
- package/dist/sync/orders.d.ts.map +1 -1
- package/dist/sync/orders.js +202 -83
- package/dist/sync/orders.js.map +1 -1
- package/dist/sync/sources.d.ts +5 -1
- package/dist/sync/sources.d.ts.map +1 -1
- package/dist/sync/sources.js +16 -0
- package/dist/sync/sources.js.map +1 -1
- package/dist/sync/withdrawals.d.ts +5 -0
- package/dist/sync/withdrawals.d.ts.map +1 -0
- package/dist/sync/withdrawals.js +172 -0
- package/dist/sync/withdrawals.js.map +1 -0
- package/dist/transport/claim.d.ts +160 -0
- package/dist/transport/claim.d.ts.map +1 -0
- package/dist/transport/claim.js +341 -0
- package/dist/transport/claim.js.map +1 -0
- package/dist/transport/jsonrpc.d.ts +16 -0
- package/dist/transport/jsonrpc.d.ts.map +1 -0
- package/dist/transport/jsonrpc.js +42 -0
- package/dist/transport/jsonrpc.js.map +1 -0
- package/dist/transport/rest.d.ts +15 -1
- package/dist/transport/rest.d.ts.map +1 -1
- package/dist/transport/rest.js +25 -1
- package/dist/transport/rest.js.map +1 -1
- package/dist/transport/ws.d.ts +22 -2
- package/dist/transport/ws.d.ts.map +1 -1
- package/dist/transport/ws.js +14 -2
- package/dist/transport/ws.js.map +1 -1
- package/dist/types/public.d.ts +212 -9
- package/dist/types/public.d.ts.map +1 -1
- package/dist/types/wire.d.ts +147 -41
- package/dist/types/wire.d.ts.map +1 -1
- package/dist/write/delegation.d.ts.map +1 -1
- package/dist/write/delegation.js +2 -12
- package/dist/write/delegation.js.map +1 -1
- package/dist/write/index.d.ts +26 -1
- package/dist/write/index.d.ts.map +1 -1
- package/dist/write/index.js +21 -14
- package/dist/write/index.js.map +1 -1
- package/package.json +1 -1
- package/src/client.ts +33 -18
- package/src/codec/bridge.ts +138 -0
- package/src/codec/decode.ts +54 -10
- package/src/codec/direction.ts +36 -0
- package/src/codec/orders-v2.ts +222 -0
- package/src/codec/units.ts +24 -1
- package/src/index.ts +16 -0
- package/src/sync/orders.ts +203 -83
- package/src/sync/sources.ts +16 -1
- package/src/sync/withdrawals.ts +177 -0
- package/src/transport/claim.ts +434 -0
- package/src/transport/jsonrpc.ts +54 -0
- package/src/transport/rest.ts +35 -7
- package/src/transport/ws.ts +30 -4
- package/src/types/public.ts +233 -7
- package/src/types/wire.ts +161 -29
- package/src/write/delegation.ts +2 -12
- package/src/write/index.ts +59 -13
package/dist/transport/ws.js
CHANGED
|
@@ -13,7 +13,7 @@ const asString = (v) => (typeof v === "string" ? v : undefined);
|
|
|
13
13
|
* subscription's `since` to `resumeSince`, so restarting it is one call:
|
|
14
14
|
*
|
|
15
15
|
* ```ts
|
|
16
|
-
* const sub = ws.subscribe("
|
|
16
|
+
* const sub = ws.subscribe("pod_orders_v2", { account }, onFrame, (err) => {
|
|
17
17
|
* if (err instanceof PodSubscriptionClosedError && err.resumable) sub.resubscribe();
|
|
18
18
|
* });
|
|
19
19
|
* ```
|
|
@@ -32,6 +32,11 @@ export class PodSubscriptionClosedError extends Error {
|
|
|
32
32
|
* had not yet taken a whole tick.
|
|
33
33
|
*/
|
|
34
34
|
resumeSince;
|
|
35
|
+
/**
|
|
36
|
+
* `pod_orders_v2` only: the last book of `resumeSince` that was delivered, when
|
|
37
|
+
* that batch was only partly delivered. Absent means the batch landed whole.
|
|
38
|
+
*/
|
|
39
|
+
resumeSinceBook;
|
|
35
40
|
/** `-32020` only: how many ticks the broadcast dropped. */
|
|
36
41
|
missed;
|
|
37
42
|
/** The raw `params.error`, for fields this version does not map. */
|
|
@@ -45,6 +50,7 @@ export class PodSubscriptionClosedError extends Error {
|
|
|
45
50
|
// close we failed to understand can hot-loop, which is the worse failure.
|
|
46
51
|
this.resumable = data.resumable === true;
|
|
47
52
|
this.resumeSince = asNumber(data.resume_since);
|
|
53
|
+
this.resumeSinceBook = asString(data.resume_since_book);
|
|
48
54
|
this.missed = asNumber(data.missed);
|
|
49
55
|
this.raw = raw;
|
|
50
56
|
}
|
|
@@ -217,6 +223,8 @@ export class PodWsClient {
|
|
|
217
223
|
out.depth = p.depth;
|
|
218
224
|
if (p.since !== undefined)
|
|
219
225
|
out.since = p.since;
|
|
226
|
+
if (p.sinceBook !== undefined)
|
|
227
|
+
out.since_book = p.sinceBook;
|
|
220
228
|
return out;
|
|
221
229
|
}
|
|
222
230
|
sendSubscribe(sub) {
|
|
@@ -275,7 +283,11 @@ export class PodWsClient {
|
|
|
275
283
|
// is the gap the close frame exists to prevent. Doing it here also
|
|
276
284
|
// means `resubscribe()` alone resumes correctly.
|
|
277
285
|
if (closed.resumable && closed.resumeSince !== undefined) {
|
|
278
|
-
|
|
286
|
+
// Both halves, together. A close with no `resume_since_book` says the
|
|
287
|
+
// batch landed whole, so the stored book must be cleared rather than
|
|
288
|
+
// carried over: it belongs to an older batch, and leaving it would
|
|
289
|
+
// ask the server to skip books inside the new one.
|
|
290
|
+
sub.params = { ...sub.params, since: closed.resumeSince, sinceBook: closed.resumeSinceBook };
|
|
279
291
|
}
|
|
280
292
|
if (sub.onError)
|
|
281
293
|
sub.onError(closed);
|
package/dist/transport/ws.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ws.js","sourceRoot":"","sources":["../../src/transport/ws.ts"],"names":[],"mappings":"AAAA,yEAAyE;AACzE,0EAA0E;AAC1E,uEAAuE;AACvE,2EAA2E;
|
|
1
|
+
{"version":3,"file":"ws.js","sourceRoot":"","sources":["../../src/transport/ws.ts"],"names":[],"mappings":"AAAA,yEAAyE;AACzE,0EAA0E;AAC1E,uEAAuE;AACvE,2EAA2E;AA+D3E,MAAM,QAAQ,GAAG,CAAC,CAAU,EAAE,EAAE,CAAC,CAAC,OAAO,CAAC,KAAK,QAAQ,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,SAAS,CAAC,CAAC;AACzE,MAAM,QAAQ,GAAG,CAAC,CAAU,EAAE,EAAE,CAAC,CAAC,OAAO,CAAC,KAAK,QAAQ,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,SAAS,CAAC,CAAC;AAEzE;;;;;;;;;;;;;;;;;GAiBG;AACH,MAAM,OAAO,0BAA2B,SAAQ,KAAK;IACnD,wFAAwF;IAC/E,IAAI,CAAS;IACtB,iDAAiD;IACxC,SAAS,CAAU;IAC5B;;;OAGG;IACM,WAAW,CAAU;IAC9B;;;OAGG;IACM,eAAe,CAAY;IACpC,2DAA2D;IAClD,MAAM,CAAU;IACzB,oEAAoE;IAC3D,GAAG,CAAU;IAEtB,YAAY,GAAmB;QAC7B,KAAK,CAAC,QAAQ,CAAC,GAAG,CAAC,OAAO,CAAC,IAAI,mCAAmC,CAAC,CAAC;QACpE,MAAM,IAAI,GAA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OAAO,CAAC,MAAM,CAAC,CAAC;;wBAChC,IAAI,CAAC,IAAI,CAAC,OAAO,EAAE,MAAM,CAAC,CAAC;oBAChC,OAAO;gBACT,CAAC;gBACD,GAAG,CAAC,SAAS,CAAC,GAAG,CAAC,MAAM,CAAC,MAAM,CAAC,CAAC;gBACjC,OAAO;YACT,CAAC;YACD,IAAI,GAAG,IAAI,GAAG,CAAC,EAAE,KAAK,SAAS,IAAI,IAAI,CAAC,OAAO,CAAC,GAAG,CAAC,GAAG,CAAC,EAAE,CAAC,EAAE,CAAC;gBAC5D,MAAM,EAAE,GAAG,IAAI,CAAC,OAAO,CAAC,GAAG,CAAC,GAAG,CAAC,EAAE,CAAE,CAAC;gBACrC,IAAI,CAAC,OAAO,CAAC,MAAM,CAAC,GAAG,CAAC,EAAE,CAAC,CAAC;gBAC5B,EAAE,CAAC,GAAG,CAAC,MAAM,EAAE,GAAG,CAAC,KAAK,CAAC,CAAC;YAC5B,CAAC;QACH,CAAC,CAAC;QACF,IAAI,OAAO,IAAI,KAAK,QAAQ;YAAE,MAAM,CAAC,IAAI,CAAC,CAAC;aACtC,IAAI,IAAI,YAAY,IAAI;YAAE,IAAI,CAAC,IAAI,EAAE,CAAC,IAAI,CAAC,MAAM,CAAC,CAAC,KAAK,CAAC,GAAG,EAAE,GAAE,CAAC,CAAC,CAAC;aACnE,IAAI,IAAI,YAAY,WAAW;YAAE,MAAM,CAAC,IAAI,WAAW,EAAE,CAAC,MAAM,CAAC,IAAI,CAAC,CAAC,CAAC;IAC/E,CAAC;CACF"}
|
package/dist/types/public.d.ts
CHANGED
|
@@ -17,6 +17,112 @@ export type OrderKind = "user_signed" | "liquidation" | "triggered" | "adl" | "a
|
|
|
17
17
|
| "backstop_transfer";
|
|
18
18
|
export type TriggerType = "take_profit" | "stop_loss";
|
|
19
19
|
export type OrderDirection = "buy" | "sell" | "open_long" | "add_long" | "reduce_long" | "close_long" | "open_short" | "add_short" | "reduce_short" | "close_short" | "long_to_short" | "short_to_long" | "liquidation";
|
|
20
|
+
/**
|
|
21
|
+
* Why the engine refused something, as a stable identifier to branch on.
|
|
22
|
+
*
|
|
23
|
+
* Open by design: a newer node may report a code this version does not list, so
|
|
24
|
+
* treat an unrecognised one like `"unspecified"` — the accompanying `message` is
|
|
25
|
+
* then all there is. `"unspecified"` itself means the engine has not given that
|
|
26
|
+
* reason a name yet.
|
|
27
|
+
*/
|
|
28
|
+
export type RejectCode = "insufficient_balance" | "invalid_price" | "zero_size" | "notional_below_minimum" | "unknown_market" | "order_not_found" | "not_order_owner" | "stale_nonce" | "wrong_pair" | "engine_managed_order" | "price_above_maximum" | "price_off_tick" | "market_order_must_be_ioc" | "size_above_maximum" | "size_off_lot" | "notional_overflow" | "notional_above_cap" | "unspecified" | (string & {});
|
|
29
|
+
/**
|
|
30
|
+
* An amendment the engine refused. The order itself is untouched — this is the
|
|
31
|
+
* answer to a price/size change that did not happen.
|
|
32
|
+
*
|
|
33
|
+
* The requested price and size are echoed back because a client may have several
|
|
34
|
+
* amendments outstanding on one order, and they are how it tells which one this
|
|
35
|
+
* answers.
|
|
36
|
+
*/
|
|
37
|
+
export interface AmendRejection {
|
|
38
|
+
/** The price that was asked for. */
|
|
39
|
+
requestedPrice: bigint;
|
|
40
|
+
/** The size that was asked for, as an unsigned magnitude. */
|
|
41
|
+
requestedSize: bigint;
|
|
42
|
+
/** Branch on this rather than on `message`. */
|
|
43
|
+
code: RejectCode;
|
|
44
|
+
/**
|
|
45
|
+
* Present only when the reason carries detail the code cannot — the amounts on
|
|
46
|
+
* `insufficient_balance`, `invalid_price` and `notional_below_minimum`, the pair on
|
|
47
|
+
* `unknown_market`, and the whole reason on `unspecified`. For every other code the
|
|
48
|
+
* message would just restate the code.
|
|
49
|
+
*/
|
|
50
|
+
message?: string;
|
|
51
|
+
/**
|
|
52
|
+
* Who asked. Deliberately not the order's owner: a refusal says nothing about who
|
|
53
|
+
* owns the order, and on `not_order_owner` the requester is precisely who does not.
|
|
54
|
+
* Absent when the stream names a single account.
|
|
55
|
+
*/
|
|
56
|
+
requestedBy?: Address;
|
|
57
|
+
/** The batch the refusal landed in (ms). */
|
|
58
|
+
batchMs: number;
|
|
59
|
+
}
|
|
60
|
+
/** What the engine did to an order, as `pod_orders_v2` reports it (ADR 0029 §3). */
|
|
61
|
+
export type OrderEventKind = "new" | "reject" | "fill" | "cancel" | "expire" | "modify" | "modify_reject";
|
|
62
|
+
/**
|
|
63
|
+
* The statuses an order can *close* with. Narrower than `OrderStatus`, which also
|
|
64
|
+
* covers the states a live order passes through — so a `switch` over this one can be
|
|
65
|
+
* exhaustive.
|
|
66
|
+
*/
|
|
67
|
+
export type TerminalStatus = Extract<OrderStatus, "filled" | "canceled" | "margin_canceled" | "expired">;
|
|
68
|
+
/** One fill, plus the status it closed the order with when it did. */
|
|
69
|
+
export interface OrderEventFill extends PartialFill {
|
|
70
|
+
/**
|
|
71
|
+
* Base filled over the order's life **as of this fill**.
|
|
72
|
+
*
|
|
73
|
+
* Not the same as `order.filledBase`, which is where the *whole frame* left the order:
|
|
74
|
+
* two fills of one order in one batch would otherwise both report the final total,
|
|
75
|
+
* so neither matches the fill it is attached to.
|
|
76
|
+
*/
|
|
77
|
+
totalBase: bigint;
|
|
78
|
+
/**
|
|
79
|
+
* Absent while the order is still working.
|
|
80
|
+
*
|
|
81
|
+
* `margin_canceled` here is the engine evicting the order for margin, reported on the
|
|
82
|
+
* fill that closed it. An eviction that closes an order *without* a fill arrives as a
|
|
83
|
+
* plain `cancel` instead: the wire cannot yet distinguish it from a user cancel (ADR
|
|
84
|
+
* 0029 §6 reserves a `why` for that), so do not try to re-derive it from `status`.
|
|
85
|
+
*/
|
|
86
|
+
closedAs?: TerminalStatus;
|
|
87
|
+
}
|
|
88
|
+
/**
|
|
89
|
+
* One transition the stream reported.
|
|
90
|
+
*
|
|
91
|
+
* The alternative is diffing consecutive snapshots, which can only see net state: two
|
|
92
|
+
* fills in one batch collapse into one change, a fill that closes an order hides the
|
|
93
|
+
* partial, and a transition that changes nothing about the order — a refused amendment
|
|
94
|
+
* — is invisible without a synthetic marker to spot it by.
|
|
95
|
+
*
|
|
96
|
+
* Deliberately lean. `order` is the row as the whole frame left it, so durable state a
|
|
97
|
+
* transition leaves behind is read from there — a `reject`'s `rejectReason` annotates the
|
|
98
|
+
* `invalid` status it set. Detail that belongs to the transition itself, and describes
|
|
99
|
+
* nothing about the order afterwards, is on the event: `fill`, and `amendRejection`.
|
|
100
|
+
*/
|
|
101
|
+
export interface OrderEvent {
|
|
102
|
+
kind: OrderEventKind;
|
|
103
|
+
/**
|
|
104
|
+
* The order it happened to, as the whole frame left it.
|
|
105
|
+
*
|
|
106
|
+
* A live row, not a copy: the stream mutates it in place as later frames arrive. Read
|
|
107
|
+
* it in the callback, and copy it if you keep it — a buffered event would otherwise
|
|
108
|
+
* show the order's present state rather than its state at the time.
|
|
109
|
+
*/
|
|
110
|
+
order: Order;
|
|
111
|
+
/** The batch it landed in (ms). */
|
|
112
|
+
batchMs: number;
|
|
113
|
+
/** `fill` only: this fill alone, not a running total. */
|
|
114
|
+
fill?: OrderEventFill;
|
|
115
|
+
/**
|
|
116
|
+
* `modify_reject` only: the amendment the engine refused.
|
|
117
|
+
*
|
|
118
|
+
* On the event rather than on `order`, because the order is exactly what it is not
|
|
119
|
+
* about — a refusal changes nothing about it. Parked on the entity it would be
|
|
120
|
+
* write-once and never cleared, so an order would keep reporting a refusal it had
|
|
121
|
+
* long since amended past, and only when the row came from this stream rather than
|
|
122
|
+
* from REST.
|
|
123
|
+
*/
|
|
124
|
+
amendRejection?: AmendRejection;
|
|
125
|
+
}
|
|
20
126
|
export interface TokenInfo {
|
|
21
127
|
address: Address;
|
|
22
128
|
symbol: string;
|
|
@@ -94,12 +200,12 @@ export interface Order {
|
|
|
94
200
|
id: Hash;
|
|
95
201
|
txHash: Hash;
|
|
96
202
|
orderbookId?: MarketId;
|
|
203
|
+
/**
|
|
204
|
+
* Whether the book is spot or perp, when the source said so — REST rows carry it,
|
|
205
|
+
* streamed ones do not. It is static market metadata rather than a fact about the
|
|
206
|
+
* order, so the reliable read is a join: `markets.find((m) => m.id === o.orderbookId)?.type`.
|
|
207
|
+
*/
|
|
97
208
|
marketType?: MarketType;
|
|
98
|
-
/** Token-address pair (base/quote); present on WS stream orders. */
|
|
99
|
-
pair?: {
|
|
100
|
-
base: Address;
|
|
101
|
-
quote: Address;
|
|
102
|
-
};
|
|
103
209
|
side: OrderSide;
|
|
104
210
|
orderType: OrderType;
|
|
105
211
|
status: OrderStatus;
|
|
@@ -112,11 +218,20 @@ export interface Order {
|
|
|
112
218
|
filledQuote: bigint;
|
|
113
219
|
fee: bigint;
|
|
114
220
|
effectivePrice?: bigint;
|
|
115
|
-
|
|
116
|
-
|
|
117
|
-
|
|
221
|
+
/**
|
|
222
|
+
* The auction deadline the order was signed for (ms). REST only: it is a fact
|
|
223
|
+
* about the intent, not about when the order became real, and the
|
|
224
|
+
* `pod_orders_v2` frame does not carry it. To order orders, use `includedMs` —
|
|
225
|
+
* both sources report that.
|
|
226
|
+
*/
|
|
227
|
+
deadlineMs?: number;
|
|
228
|
+
/** TTL expiry (ms). Undefined when the order never expires. */
|
|
229
|
+
endMs?: number;
|
|
230
|
+
/** Batch-inclusion time (ms) — when the order entered the book. */
|
|
118
231
|
includedMs?: number;
|
|
119
232
|
fills: PartialFill[];
|
|
233
|
+
/** Why the engine rejected the order; set only on `status: "invalid"`. */
|
|
234
|
+
rejectReason?: string;
|
|
120
235
|
reduceOnly?: boolean;
|
|
121
236
|
ioc?: boolean;
|
|
122
237
|
direction?: OrderDirection;
|
|
@@ -174,7 +289,8 @@ export interface Trigger {
|
|
|
174
289
|
reduceOnly: boolean;
|
|
175
290
|
ioc: boolean;
|
|
176
291
|
deadlineMs: number;
|
|
177
|
-
|
|
292
|
+
/** TTL expiry (ms). Undefined when the trigger never expires. */
|
|
293
|
+
endMs?: number;
|
|
178
294
|
}
|
|
179
295
|
export interface BackstopTransfer {
|
|
180
296
|
orderbookId?: MarketId;
|
|
@@ -289,4 +405,91 @@ export interface TriggersQuery {
|
|
|
289
405
|
orderbookId?: MarketId;
|
|
290
406
|
limit?: number;
|
|
291
407
|
}
|
|
408
|
+
/**
|
|
409
|
+
* One bridged token, as `GET /v1/bridge/config` serves it.
|
|
410
|
+
*
|
|
411
|
+
* `min`, `max` and `decimals` are all on the **claim chain's** terms, not pod's
|
|
412
|
+
* 18 — see `codec/bridge.ts`, which owns that conversion.
|
|
413
|
+
*/
|
|
414
|
+
export interface BridgeToken {
|
|
415
|
+
podToken: Address;
|
|
416
|
+
l1Token: Address;
|
|
417
|
+
/** Decimals on the claim chain, and so the withdrawal granularity on pod. */
|
|
418
|
+
decimals: number;
|
|
419
|
+
/** Smallest admissible withdrawal, in claim-chain decimals. */
|
|
420
|
+
min: bigint;
|
|
421
|
+
/** Largest admissible withdrawal, in claim-chain decimals. */
|
|
422
|
+
max: bigint;
|
|
423
|
+
}
|
|
424
|
+
/** Static bridge configuration — the one chain pod withdrawals settle on. */
|
|
425
|
+
export interface BridgeConfig {
|
|
426
|
+
/** `0` when the node has no bridge configured, in which case `tokens` is
|
|
427
|
+
* empty and no withdrawal is admissible at all. */
|
|
428
|
+
claimChainId: number;
|
|
429
|
+
/** The bridge contract on the claim chain, where `Claim` is emitted. */
|
|
430
|
+
sourceContract: Address;
|
|
431
|
+
/** Bridge version; feeds the claim-hash domain separator. */
|
|
432
|
+
version: number;
|
|
433
|
+
tokens: BridgeToken[];
|
|
434
|
+
}
|
|
435
|
+
/**
|
|
436
|
+
* Why a withdrawal produced no L1 claim. Any value here means **no L1 event will
|
|
437
|
+
* ever fire**, so a client watching only the claim chain would wait forever —
|
|
438
|
+
* this is the only place a reason exists.
|
|
439
|
+
*/
|
|
440
|
+
export type WithdrawalError =
|
|
441
|
+
/** The CLOB balance did not cover it at execution. Admission deliberately
|
|
442
|
+
* doesn't check the balance (pending fills can raise it), so this races that. */
|
|
443
|
+
"insufficient_balance"
|
|
444
|
+
/** The solver never included the intent before its deadline. Funds are
|
|
445
|
+
* untouched and the withdrawal can simply be resubmitted. */
|
|
446
|
+
| "not_included"
|
|
447
|
+
/**
|
|
448
|
+
* Any other reason a node reports. This set is **open by construction**: the
|
|
449
|
+
* node's reason enum is explicitly extensible and an app ships ahead of the
|
|
450
|
+
* fleet, so a spelling this build predates has to arrive verbatim rather than
|
|
451
|
+
* be dropped. Dropping it makes a *failed* withdrawal read as claimable —
|
|
452
|
+
* the one direction it is unsafe to be lossy in, because the caller then
|
|
453
|
+
* reports success and waits for a claim that can never land.
|
|
454
|
+
*
|
|
455
|
+
* `(string & {})` keeps the two known values in editor completion while still
|
|
456
|
+
* admitting the rest. Treat an unknown reason exactly like a known one, and
|
|
457
|
+
* show it verbatim rather than guessing which known reason it resembles.
|
|
458
|
+
*/
|
|
459
|
+
| (string & {});
|
|
460
|
+
/** One terminal withdrawal outcome, from `pod_withdrawals` or its REST backfill. */
|
|
461
|
+
export interface Withdrawal {
|
|
462
|
+
/** `keccak(abi.encode(signer, nonce, sequence))` — derivable client-side
|
|
463
|
+
* before submitting, which is what lets a client match its own withdrawal. */
|
|
464
|
+
id: Hash;
|
|
465
|
+
/** The debited account: the master, for a delegated withdrawal. */
|
|
466
|
+
withdrawer: Address;
|
|
467
|
+
/** Recipient on the **claim chain**. Nothing is credited on pod. */
|
|
468
|
+
to: Address;
|
|
469
|
+
/** Pod-side token address. */
|
|
470
|
+
token: Address;
|
|
471
|
+
/** Pod's 18 decimals, as signed. The L1 claim carries this converted to the
|
|
472
|
+
* token's claim-chain decimals — never pass this value to `claim`. */
|
|
473
|
+
amount: bigint;
|
|
474
|
+
/** Absent when the withdrawal is claimable on L1. */
|
|
475
|
+
error?: WithdrawalError;
|
|
476
|
+
/**
|
|
477
|
+
* The tick's batch deadline, in **microseconds** — not the millisecond
|
|
478
|
+
* convention the rest of this surface uses.
|
|
479
|
+
*
|
|
480
|
+
* Deliberate: this value is also the resume cursor for `pod_withdrawals` and
|
|
481
|
+
* for the REST backfill, both of which compare it in micros. Narrowing it to
|
|
482
|
+
* ms and back would round a tick boundary and silently re-serve or skip a
|
|
483
|
+
* tick, so it stays in the unit the server compares.
|
|
484
|
+
*/
|
|
485
|
+
timeUs: number;
|
|
486
|
+
}
|
|
487
|
+
export interface WithdrawalsQuery {
|
|
488
|
+
/** Batch deadline in microseconds; strictly greater. */
|
|
489
|
+
since?: number;
|
|
490
|
+
/** Last id already seen *within* the `since` tick, to resume mid-tick. */
|
|
491
|
+
sinceId?: Hash;
|
|
492
|
+
/** Server default 500, capped at 1000. */
|
|
493
|
+
limit?: number;
|
|
494
|
+
}
|
|
292
495
|
//# sourceMappingURL=public.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"public.d.ts","sourceRoot":"","sources":["../../src/types/public.ts"],"names":[],"mappings":"AAGA,MAAM,MAAM,GAAG,GAAG,KAAK,MAAM,EAAE,CAAC;AAChC,MAAM,MAAM,QAAQ,GAAG,GAAG,CAAC;AAC3B,MAAM,MAAM,OAAO,GAAG,GAAG,CAAC;AAC1B,MAAM,MAAM,IAAI,GAAG,GAAG,CAAC;AAEvB,MAAM,MAAM,UAAU,GAClB,IAAI,GAAG,IAAI,GAAG,KAAK,GAAG,KAAK,GAAG,IAAI,GAAG,IAAI,GAAG,IAAI,GAAG,IAAI,GAAG,IAAI,CAAC;AAEnE,sFAAsF;AACtF,MAAM,WAAW,SAAS;IACxB,IAAI,EAAE,MAAM,CAAC;IACb,EAAE,CAAC,EAAE,MAAM,CAAC;CACb;AAED,MAAM,MAAM,UAAU,GAAG,MAAM,GAAG,MAAM,CAAC;AACzC,MAAM,MAAM,SAAS,GAAG,KAAK,GAAG,MAAM,CAAC;AACvC,MAAM,MAAM,SAAS,GAAG,OAAO,GAAG,QAAQ,CAAC;AAC3C,MAAM,MAAM,WAAW,GACnB,SAAS,GAAG,QAAQ,GAAG,QAAQ,GAAG,SAAS,GAC3C,UAAU,GAAG,iBAAiB,GAAG,SAAS,CAAC;AAC/C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,EAAE,eAAe,CAAC;IACxB;;;;;;;;OAQG;IACH,MAAM,EAAE,MAAM,CAAC;CAChB;AAED,MAAM,WAAW,gBAAgB;IAC/B,wDAAwD;IACxD,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,0EAA0E;IAC1E,OAAO,CAAC,EAAE,IAAI,CAAC;IACf,0CAA0C;IAC1C,KAAK,CAAC,EAAE,MAAM,CAAC;CAChB"}
|
package/dist/types/wire.d.ts
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import type { Hex } from "./public.js";
|
|
1
|
+
import type { Hex, OrderEventKind } from "./public.js";
|
|
2
2
|
export type WireDecimal = string;
|
|
3
3
|
export interface WireStatus {
|
|
4
4
|
solution_now: number;
|
|
@@ -77,7 +77,8 @@ export interface WirePartialFill {
|
|
|
77
77
|
}
|
|
78
78
|
export interface WireOrder {
|
|
79
79
|
orderbook_id?: Hex;
|
|
80
|
-
|
|
80
|
+
/** The order endpoints say "perpetual" where `/clob/markets` says "perp". */
|
|
81
|
+
market_type?: "spot" | "perp" | "perpetual";
|
|
81
82
|
kind: string;
|
|
82
83
|
order_id: Hex;
|
|
83
84
|
tx_hash: Hex;
|
|
@@ -95,12 +96,6 @@ export interface WireOrder {
|
|
|
95
96
|
included_batch?: number | string;
|
|
96
97
|
effective_price?: WireDecimal | null;
|
|
97
98
|
fills?: WirePartialFill[];
|
|
98
|
-
/** Present on WS stream orders (raw engine Order) instead of orderbook_id. */
|
|
99
|
-
pair?: {
|
|
100
|
-
base: Hex;
|
|
101
|
-
quote: Hex;
|
|
102
|
-
};
|
|
103
|
-
/** Present on REST orders; absent on the WS raw Order (derive from `initial_size`). */
|
|
104
99
|
side?: "buy" | "sell";
|
|
105
100
|
reduce_only?: boolean;
|
|
106
101
|
ioc?: boolean;
|
|
@@ -116,7 +111,6 @@ export interface WireOrdersPage {
|
|
|
116
111
|
}
|
|
117
112
|
export interface WireTickSnapshot {
|
|
118
113
|
volume: WireDecimal;
|
|
119
|
-
minimum_expiry?: number;
|
|
120
114
|
}
|
|
121
115
|
export interface WireOrderbook {
|
|
122
116
|
orderbook_id?: Hex;
|
|
@@ -237,38 +231,107 @@ export interface WireBackstopPage {
|
|
|
237
231
|
total_count: number;
|
|
238
232
|
solution_now: number;
|
|
239
233
|
}
|
|
240
|
-
export
|
|
241
|
-
|
|
242
|
-
|
|
243
|
-
|
|
244
|
-
|
|
245
|
-
|
|
246
|
-
|
|
247
|
-
|
|
248
|
-
|
|
249
|
-
|
|
250
|
-
|
|
251
|
-
|
|
252
|
-
|
|
253
|
-
|
|
254
|
-
|
|
255
|
-
|
|
256
|
-
|
|
257
|
-
|
|
258
|
-
|
|
259
|
-
|
|
260
|
-
|
|
261
|
-
|
|
262
|
-
|
|
263
|
-
|
|
264
|
-
|
|
265
|
-
|
|
266
|
-
|
|
267
|
-
|
|
268
|
-
|
|
269
|
-
|
|
270
|
-
|
|
271
|
-
|
|
234
|
+
export interface WireOrdersFrame {
|
|
235
|
+
/** The orderbook these actions happened on; constant for the frame. */
|
|
236
|
+
book: Hex;
|
|
237
|
+
/** Deadline (micros) of the batch the actions **landed in**. Half of the resume cursor; `book` is the other half. */
|
|
238
|
+
batch: number;
|
|
239
|
+
/**
|
|
240
|
+
* Owner addresses, indexed by `orders[].a` and by events that name an order by
|
|
241
|
+
* `id`. Omitted when the subscription names exactly one account — decode on
|
|
242
|
+
* this field, not on the filter that was sent.
|
|
243
|
+
*/
|
|
244
|
+
accts?: Hex[];
|
|
245
|
+
orders: WireOrderEntity[];
|
|
246
|
+
events: WireOrderEvent[];
|
|
247
|
+
}
|
|
248
|
+
/** An order as admitted: the facts that do not change. Its status is implied by the events. */
|
|
249
|
+
export interface WireOrderEntity {
|
|
250
|
+
id: Hex;
|
|
251
|
+
/** Creating transaction, or its parent `submitBatch` envelope. */
|
|
252
|
+
tx: Hex;
|
|
253
|
+
/** Index into the frame's `accts`; present iff `accts` is. */
|
|
254
|
+
a?: number;
|
|
255
|
+
n: number;
|
|
256
|
+
px: WireDecimal;
|
|
257
|
+
/** Signed size: the sign carries the side, so there is no side field. */
|
|
258
|
+
sz: WireDecimal;
|
|
259
|
+
/** TTL expiry (micros). **Omitted means the order never expires.** */
|
|
260
|
+
end?: number;
|
|
261
|
+
/** **Omitted means user-signed.** */
|
|
262
|
+
kind?: string;
|
|
263
|
+
/** **Omitted means a limit order.** */
|
|
264
|
+
type?: "market";
|
|
265
|
+
/** Omitted means false. */
|
|
266
|
+
reduce_only?: boolean;
|
|
267
|
+
/** Omitted means false. */
|
|
268
|
+
ioc?: boolean;
|
|
269
|
+
/** Omitted unless the order is a fired trigger's synthetic. */
|
|
270
|
+
trigger?: string;
|
|
271
|
+
/** Omitted when ungrouped. */
|
|
272
|
+
grouping?: string;
|
|
273
|
+
}
|
|
274
|
+
/**
|
|
275
|
+
* One transition, discriminated by `k`. Every event names its order by exactly
|
|
276
|
+
* one of `o` (an index into this frame's `orders`) or `id` (resting from an
|
|
277
|
+
* earlier batch, owned by `accts[a]`).
|
|
278
|
+
*
|
|
279
|
+
* Kinds are open: unknown values of `k` must be ignored rather than rejected, so
|
|
280
|
+
* this is a plain shape with per-kind optional fields rather than a union that
|
|
281
|
+
* would make an unrecognised kind unrepresentable.
|
|
282
|
+
*/
|
|
283
|
+
export interface WireOrderEvent {
|
|
284
|
+
k: OrderEventKind | (string & {});
|
|
285
|
+
o?: number;
|
|
286
|
+
id?: Hex;
|
|
287
|
+
a?: number;
|
|
288
|
+
/** `reject`: why the engine dropped the order. `modify_reject`: detail the `code` cannot carry. */
|
|
289
|
+
why?: string;
|
|
290
|
+
/**
|
|
291
|
+
* `modify_reject`: index into `accts` for the account that *asked*, which is not
|
|
292
|
+
* necessarily the order's owner — hence not `a`. On `not_order_owner` the requester
|
|
293
|
+
* is precisely who does not own it.
|
|
294
|
+
*/
|
|
295
|
+
by?: number;
|
|
296
|
+
/** `modify_reject`: the price that was asked for. */
|
|
297
|
+
req_px?: WireDecimal;
|
|
298
|
+
/** `modify_reject`: the size that was asked for, unsigned. */
|
|
299
|
+
req_sz?: WireDecimal;
|
|
300
|
+
/** `modify_reject`: the stable reason identifier — branch on this, not on `why`. */
|
|
301
|
+
code?: string;
|
|
302
|
+
/** `fill`: base filled by **this** fill. */
|
|
303
|
+
b?: WireDecimal;
|
|
304
|
+
/** `fill`: quote filled by this fill. */
|
|
305
|
+
q?: WireDecimal;
|
|
306
|
+
/**
|
|
307
|
+
* Total base filled over the order's life so far.
|
|
308
|
+
*
|
|
309
|
+
* Carried by `fill`, `cancel` and `expire` alike (ADR 0029 §4.1): a terminated
|
|
310
|
+
* order reports what it had filled, as an explicit zero rather than an omission,
|
|
311
|
+
* so absence never has to be read as zero. Optional only because this one shape
|
|
312
|
+
* covers every kind — `new`, `reject` and `modify` have no totals to report.
|
|
313
|
+
*/
|
|
314
|
+
tb?: WireDecimal;
|
|
315
|
+
/** Total quote filled so far; travels with `tb`. */
|
|
316
|
+
tq?: WireDecimal;
|
|
317
|
+
/** Total fee charged so far; travels with `tb`. There is no per-fill counterpart. */
|
|
318
|
+
tf?: WireDecimal;
|
|
319
|
+
/** `fill`: present only on the fill that closed the order, carrying its terminal status. */
|
|
320
|
+
st?: "filled" | "canceled" | "margin_canceled" | "expired";
|
|
321
|
+
/**
|
|
322
|
+
* `fill` on a perp market: the owner's position after this fill, signed and
|
|
323
|
+
* 1e18-scaled. Omitted on spot, which has no position.
|
|
324
|
+
*
|
|
325
|
+
* The position *before* is not sent because it is derivable — `pa - sign(sz) * b`,
|
|
326
|
+
* the same arithmetic the engine used to produce the pair — and the transition
|
|
327
|
+
* between the two is what says whether the fill opened, added to, reduced, closed
|
|
328
|
+
* or flipped the position.
|
|
329
|
+
*/
|
|
330
|
+
pa?: WireDecimal;
|
|
331
|
+
/** `modify`: the price after the change. */
|
|
332
|
+
px?: WireDecimal;
|
|
333
|
+
/** `modify`: the size after the change, as an **unsigned magnitude**. */
|
|
334
|
+
sz?: WireDecimal;
|
|
272
335
|
}
|
|
273
336
|
export interface WirePositionsPush {
|
|
274
337
|
account: Hex;
|
|
@@ -280,4 +343,47 @@ export interface WireTriggersPush {
|
|
|
280
343
|
total_count: number;
|
|
281
344
|
next_cursor: string | null;
|
|
282
345
|
}
|
|
346
|
+
export interface WireBridgeToken {
|
|
347
|
+
pod_token: Hex;
|
|
348
|
+
l1_token: Hex;
|
|
349
|
+
decimals: number;
|
|
350
|
+
/** Hex-encoded U256, in claim-chain decimals. */
|
|
351
|
+
min: string;
|
|
352
|
+
max: string;
|
|
353
|
+
}
|
|
354
|
+
export interface WireBridgeConfig {
|
|
355
|
+
claim_chain_id: number;
|
|
356
|
+
source_contract: Hex;
|
|
357
|
+
version: number;
|
|
358
|
+
tokens: WireBridgeToken[];
|
|
359
|
+
}
|
|
360
|
+
/** `pod_withdrawals` delivers an ARRAY of these per tick; the REST backfill
|
|
361
|
+
* serves the identical shape, so a backfilled outcome is indistinguishable
|
|
362
|
+
* from one that arrived live. */
|
|
363
|
+
export interface WireWithdrawal {
|
|
364
|
+
withdrawal_id: Hex;
|
|
365
|
+
withdrawer: Hex;
|
|
366
|
+
to: Hex;
|
|
367
|
+
token: Hex;
|
|
368
|
+
/** Hex-encoded U256 in pod's 18 decimals — the amount as signed. */
|
|
369
|
+
amount: string;
|
|
370
|
+
/** Omitted (not null) when the withdrawal is claimable. */
|
|
371
|
+
error?: string | null;
|
|
372
|
+
timestamp_us: number;
|
|
373
|
+
}
|
|
374
|
+
/** `GET /v1/bridge/withdrawals/by-id/{id}`. Nested rather than flattened because
|
|
375
|
+
* `WithdrawalUpdate` carries a u128 and serde's `flatten` cannot round-trip one.
|
|
376
|
+
*
|
|
377
|
+
* `status` is always present, but it is NOT what a consumer decides on: `proof`
|
|
378
|
+
* takes precedence, including over a `status` this build has never seen, so an
|
|
379
|
+
* unfamiliar label cannot veto a certificate attached to the same response.
|
|
380
|
+
* `proof` is omitted (never null) until one can be assembled. `fetchClaimStatus`
|
|
381
|
+
* carries the full precedence. */
|
|
382
|
+
export interface WireWithdrawalDetail {
|
|
383
|
+
withdrawal: WireWithdrawal;
|
|
384
|
+
status: "claimable" | "pending" | "refused";
|
|
385
|
+
proof?: {
|
|
386
|
+
claim_hash?: Hex | null;
|
|
387
|
+
};
|
|
388
|
+
}
|
|
283
389
|
//# sourceMappingURL=wire.d.ts.map
|