@hyperbridge/simplex 0.16.6 → 0.16.7
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/bin/simplex.js +535 -182
- package/dist/bin/simplex.js.map +1 -1
- package/dist/index.cjs +324 -75
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.cts +68 -50
- package/dist/index.d.ts +68 -50
- package/dist/index.js +324 -75
- package/dist/index.js.map +1 -1
- package/dist/ui/assets/index-Be446eYK.js +106 -0
- package/dist/ui/assets/index-C3T-gubp.css +1 -0
- package/dist/ui/index.html +2 -2
- package/package.json +2 -2
- package/dist/ui/assets/index-CsBo6xg3.js +0 -106
- package/dist/ui/assets/index-PIGVK8XG.css +0 -1
package/dist/index.d.cts
CHANGED
|
@@ -353,46 +353,50 @@ declare class FillerConfigService {
|
|
|
353
353
|
* What one quorum call is allowed to spend.
|
|
354
354
|
*
|
|
355
355
|
* `deadlineMs` is the ceiling on the call itself: past it, the endpoints still
|
|
356
|
-
* outstanding are treated as failures and the call
|
|
357
|
-
*
|
|
358
|
-
*
|
|
359
|
-
*
|
|
360
|
-
*
|
|
356
|
+
* outstanding are treated as failures, so they stop voting and the call is
|
|
357
|
+
* decided over the endpoints that answered, or fails with a QuorumError naming
|
|
358
|
+
* them. Early exit decides as soon as the endpoints still out could not change
|
|
359
|
+
* the outcome; the deadline decides when one of them never answers.
|
|
360
|
+
*
|
|
361
|
+
* `timeoutMs` bounds one endpoint's attempt, and there is only ever one: the
|
|
362
|
+
* transports are built with `retryCount: 0`, so an endpoint's whole
|
|
363
|
+
* contribution to a call is a single request. That is what keeps the two
|
|
364
|
+
* numbers independent — a task cannot approach `deadlineMs` by retrying inside
|
|
365
|
+
* itself, so a deadline that fires means something outside the budget went
|
|
366
|
+
* wrong rather than an endpoint using the budget as designed.
|
|
361
367
|
*/
|
|
362
368
|
interface QuorumBudget {
|
|
363
369
|
timeoutMs: number;
|
|
364
|
-
retryCount: number;
|
|
365
|
-
retryDelayMs: number;
|
|
366
370
|
deadlineMs: number;
|
|
367
371
|
}
|
|
368
372
|
/**
|
|
369
373
|
* Wraps multiple viem `PublicClient`s — one per configured RPC URL — and runs
|
|
370
374
|
* selected read paths (`getLogs`, `getBlockNumber`, `getTransactionConfirmations`)
|
|
371
|
-
* as a **BFT quorum**: a result is accepted only when `quorumThreshold(
|
|
372
|
-
*
|
|
375
|
+
* as a **BFT quorum**: a result is accepted only when `quorumThreshold(m)` of the
|
|
376
|
+
* `m` endpoints that answered agree on it.
|
|
373
377
|
*
|
|
374
378
|
* A provider that *answers with divergent data* is never special-cased away — it
|
|
375
379
|
* simply fails to join the agreeing group, which is what makes a lying or reorged
|
|
376
380
|
* endpoint detectable rather than authoritative.
|
|
377
381
|
*
|
|
378
|
-
*
|
|
379
|
-
*
|
|
380
|
-
*
|
|
381
|
-
*
|
|
382
|
-
*
|
|
383
|
-
*
|
|
384
|
-
*
|
|
385
|
-
*
|
|
386
|
-
* scanner that misses orders loses fills.
|
|
382
|
+
* A provider that *fails* does not vote. A failed request says nothing about the
|
|
383
|
+
* chain, so it must not outvote the endpoints that agree: the threshold guards
|
|
384
|
+
* against endpoints that answer wrongly, and every answer still counts. Six
|
|
385
|
+
* endpoints with two failing decide over the other four, three of which must
|
|
386
|
+
* agree. The price, worth stating plainly, is that a call can be decided by fewer
|
|
387
|
+
* endpoints than the operator configured; at the limit, one endpoint answering
|
|
388
|
+
* while the rest fail decides alone. The voters are still exclusively the
|
|
389
|
+
* operator's own.
|
|
387
390
|
*
|
|
388
|
-
*
|
|
389
|
-
*
|
|
390
|
-
*
|
|
391
|
-
*
|
|
392
|
-
*
|
|
393
|
-
*
|
|
394
|
-
*
|
|
395
|
-
*
|
|
391
|
+
* The bench is the one state this class keeps, and {@link benchFor} decides who
|
|
392
|
+
* goes on it: a request-rate limit ({@link isSuspendableRateLimit}), a response
|
|
393
|
+
* that is not JSON ({@link isMalformedResponse}), or a head behind the quorum's
|
|
394
|
+
* ({@link isStaleHead}). All three share the property that earns it — the
|
|
395
|
+
* endpoint will keep failing the same way for a while — so a benched endpoint is
|
|
396
|
+
* not asked for its window: asking would spend its quota, or hold the call open
|
|
397
|
+
* for an answer already known to fail. When every endpoint is benched, all are
|
|
398
|
+
* queried again; there is nobody left to prefer. Every other failure is per
|
|
399
|
+
* call, and the endpoint is asked again next time.
|
|
396
400
|
*
|
|
397
401
|
* The constructor validates that URLs resolve to distinct hostnames so a "quorum"
|
|
398
402
|
* isn't secretly the same upstream in disguise.
|
|
@@ -402,8 +406,8 @@ declare class QuorumPublicClient {
|
|
|
402
406
|
readonly rpcUrls: string[];
|
|
403
407
|
/**
|
|
404
408
|
* The quorum bar when every endpoint answers: `quorumThreshold(n)` over the
|
|
405
|
-
* full set.
|
|
406
|
-
*
|
|
409
|
+
* full set. Each call's bar is `quorumThreshold` over the endpoints that answer
|
|
410
|
+
* it, so this is the most it can be.
|
|
407
411
|
*/
|
|
408
412
|
readonly threshold: number;
|
|
409
413
|
private readonly logger?;
|
|
@@ -424,11 +428,10 @@ declare class QuorumPublicClient {
|
|
|
424
428
|
/** Endpoints currently benched, by URL. See {@link benchFor} for the reasons. */
|
|
425
429
|
suspended(): string[];
|
|
426
430
|
/**
|
|
427
|
-
* The endpoints this call queries
|
|
428
|
-
*
|
|
429
|
-
*
|
|
430
|
-
*
|
|
431
|
-
* queried again; there is nobody left to prefer.
|
|
431
|
+
* The endpoints this call queries: everyone not benched. A benched endpoint is
|
|
432
|
+
* dropped outright: it answers nothing while throttled, so asking it could only
|
|
433
|
+
* cost a request. With every endpoint benched, everyone is queried again; there
|
|
434
|
+
* is nobody left to prefer.
|
|
432
435
|
*/
|
|
433
436
|
private participants;
|
|
434
437
|
/**
|
|
@@ -453,22 +456,26 @@ declare class QuorumPublicClient {
|
|
|
453
456
|
* retries would otherwise stall every confirmation poll). Stragglers settle
|
|
454
457
|
* out of band and are ignored. `tryDecide` returns undefined to keep
|
|
455
458
|
* waiting; once every task has settled, `finalize` must decide (it throws
|
|
456
|
-
* the QuorumError when the full response set still has no quorum).
|
|
457
|
-
*
|
|
458
|
-
*
|
|
459
|
+
* the QuorumError when the full response set still has no quorum).
|
|
460
|
+
*
|
|
461
|
+
* Both are handed the bar: the BFT threshold over the endpoints that have not
|
|
462
|
+
* failed, answered or still out. A failure lowers it rather than counting
|
|
463
|
+
* against it. Counting the pending endpoints keeps an early decision to a bar
|
|
464
|
+
* no lower than the full response set would get, so a vote it did not wait for
|
|
465
|
+
* could never have reversed it.
|
|
459
466
|
*
|
|
460
467
|
* `deadlineMs` bounds the other direction: when the bar is NOT reachable
|
|
461
468
|
* from the fast responders, the call used to wait out every straggler, and
|
|
462
469
|
* the caller's own retry loop multiplied that into minutes of a chain not
|
|
463
470
|
* being scanned at all, silently. At the deadline the outstanding endpoints
|
|
464
471
|
* are treated as failures — named in the QuorumError, so the operator sees
|
|
465
|
-
* which ones held the call up — and `finalize` decides
|
|
466
|
-
*
|
|
472
|
+
* which ones held the call up — and `finalize` decides over the endpoints
|
|
473
|
+
* that answered.
|
|
467
474
|
*/
|
|
468
475
|
private settleUntilQuorum;
|
|
469
476
|
/**
|
|
470
|
-
* Highest block head backed by a
|
|
471
|
-
*
|
|
477
|
+
* Highest block head backed by a quorum of the endpoints that answer. Throws
|
|
478
|
+
* {@link QuorumError} when none do.
|
|
472
479
|
*/
|
|
473
480
|
getBlockNumber(): Promise<bigint>;
|
|
474
481
|
/**
|
|
@@ -2652,13 +2659,11 @@ interface PostedOrder {
|
|
|
2652
2659
|
* Every code the orderbook's `RejectionCode` enum can send, listed rather than
|
|
2653
2660
|
* written as a union so a test can hold it against the published schema.
|
|
2654
2661
|
*
|
|
2655
|
-
* Why the orderbook refuses an order. `MIN_ORDER_SIZE
|
|
2656
|
-
* prevented by validation before posting
|
|
2657
|
-
*
|
|
2658
|
-
*
|
|
2659
|
-
*
|
|
2660
|
-
* register the order's input symbol on the server, which is the server's own
|
|
2661
|
-
* config and nothing here can check ahead of asking.
|
|
2662
|
+
* Why the orderbook refuses an order. `MIN_ORDER_SIZE`, `TTL_TOO_SHORT` and
|
|
2663
|
+
* `UNSUPPORTED_SOURCE_CHAIN` are prevented by validation before posting, the last
|
|
2664
|
+
* against the chains the server serves and the tokens its registry lists on each;
|
|
2665
|
+
* `REPLAYED` and `ORDER_EXISTS` are answered by bumping the nonce; the rest are
|
|
2666
|
+
* encoding bugs on our side.
|
|
2662
2667
|
*/
|
|
2663
2668
|
declare const REJECTION_CODES: readonly ["MALFORMED_USER_OP", "NO_FILL_ORDER", "UNSUPPORTED_CHAIN", "UNSUPPORTED_SHAPE", "NOT_PHANTOM", "TTL_TOO_SHORT", "UNSUPPORTED_PAIR", "BAD_SIGNATURE", "BAD_NONCE_BINDING", "REPLAYED", "ORDER_EXISTS", "TOO_MANY_ORDERS", "MIN_ORDER_SIZE", "MISSING_DECLARATION", "EMPTY_DECLARATION", "UNSUPPORTED_SOURCE_CHAIN"];
|
|
2664
2669
|
type RejectionCode = (typeof REJECTION_CODES)[number];
|
|
@@ -2909,14 +2914,17 @@ declare class LimitOrderService {
|
|
|
2909
2914
|
private withdraw;
|
|
2910
2915
|
private signAndCancel;
|
|
2911
2916
|
/**
|
|
2912
|
-
* The pairs an order can be written against,
|
|
2917
|
+
* The pairs an order can be written against, the smallest payout each token may carry, and
|
|
2918
|
+
* the tokens the orderbook registers on each chain.
|
|
2913
2919
|
*
|
|
2914
2920
|
* The orderbook lists the books; `resolveBook` refuses a request naming anything else, so the
|
|
2915
|
-
* operator is offered exactly these and no combination of symbols they could not post.
|
|
2921
|
+
* operator is offered exactly these and no combination of symbols they could not post. The
|
|
2922
|
+
* chains do the same for the source chains an order can accept.
|
|
2916
2923
|
*/
|
|
2917
2924
|
books(): Promise<{
|
|
2918
2925
|
books: Book[];
|
|
2919
2926
|
minOrderSizes: TokenMinSize[];
|
|
2927
|
+
chains: ChainInfo[];
|
|
2920
2928
|
}>;
|
|
2921
2929
|
/**
|
|
2922
2930
|
* Reads `serverInfo` and `books`, reusing the last read for {@link LIMITS_TTL_MS}.
|
|
@@ -3494,6 +3502,15 @@ declare class FXFiller implements FillerStrategy {
|
|
|
3494
3502
|
* the output token's own decimals.
|
|
3495
3503
|
*/
|
|
3496
3504
|
private matchLeg;
|
|
3505
|
+
/** Why no limit order serves the order, leg by leg, for the line that says it was passed over. */
|
|
3506
|
+
private explainUnmatched;
|
|
3507
|
+
/**
|
|
3508
|
+
* One leg as the matcher sees it, or null when its input token is not one the asset
|
|
3509
|
+
* registry knows on the source chain.
|
|
3510
|
+
*
|
|
3511
|
+
* Amounts cross into the matcher at 1e18, the unit limit orders are kept in.
|
|
3512
|
+
*/
|
|
3513
|
+
private incomingFor;
|
|
3497
3514
|
/**
|
|
3498
3515
|
* The order's input in **USD**, or null when no limit order connects its input
|
|
3499
3516
|
* token to a dollar.
|
|
@@ -3831,10 +3848,11 @@ declare class LimitOrderController {
|
|
|
3831
3848
|
fills: LimitOrderFill[];
|
|
3832
3849
|
bids: StoredBid[];
|
|
3833
3850
|
} | null>;
|
|
3834
|
-
/** The pairs the orderbook lists,
|
|
3851
|
+
/** The pairs the orderbook lists, the smallest payout each token may carry, and its tokens per chain. */
|
|
3835
3852
|
books(): Promise<{
|
|
3836
3853
|
books: Book[];
|
|
3837
3854
|
minOrderSizes: TokenMinSize[];
|
|
3855
|
+
chains: ChainInfo[];
|
|
3838
3856
|
}>;
|
|
3839
3857
|
/** Creates the order, posts it, and reports what the orderbook made of it. */
|
|
3840
3858
|
create(request: CreateLimitOrderRequest): Promise<PostedLimitOrder>;
|
package/dist/index.d.ts
CHANGED
|
@@ -353,46 +353,50 @@ declare class FillerConfigService {
|
|
|
353
353
|
* What one quorum call is allowed to spend.
|
|
354
354
|
*
|
|
355
355
|
* `deadlineMs` is the ceiling on the call itself: past it, the endpoints still
|
|
356
|
-
* outstanding are treated as failures and the call
|
|
357
|
-
*
|
|
358
|
-
*
|
|
359
|
-
*
|
|
360
|
-
*
|
|
356
|
+
* outstanding are treated as failures, so they stop voting and the call is
|
|
357
|
+
* decided over the endpoints that answered, or fails with a QuorumError naming
|
|
358
|
+
* them. Early exit decides as soon as the endpoints still out could not change
|
|
359
|
+
* the outcome; the deadline decides when one of them never answers.
|
|
360
|
+
*
|
|
361
|
+
* `timeoutMs` bounds one endpoint's attempt, and there is only ever one: the
|
|
362
|
+
* transports are built with `retryCount: 0`, so an endpoint's whole
|
|
363
|
+
* contribution to a call is a single request. That is what keeps the two
|
|
364
|
+
* numbers independent — a task cannot approach `deadlineMs` by retrying inside
|
|
365
|
+
* itself, so a deadline that fires means something outside the budget went
|
|
366
|
+
* wrong rather than an endpoint using the budget as designed.
|
|
361
367
|
*/
|
|
362
368
|
interface QuorumBudget {
|
|
363
369
|
timeoutMs: number;
|
|
364
|
-
retryCount: number;
|
|
365
|
-
retryDelayMs: number;
|
|
366
370
|
deadlineMs: number;
|
|
367
371
|
}
|
|
368
372
|
/**
|
|
369
373
|
* Wraps multiple viem `PublicClient`s — one per configured RPC URL — and runs
|
|
370
374
|
* selected read paths (`getLogs`, `getBlockNumber`, `getTransactionConfirmations`)
|
|
371
|
-
* as a **BFT quorum**: a result is accepted only when `quorumThreshold(
|
|
372
|
-
*
|
|
375
|
+
* as a **BFT quorum**: a result is accepted only when `quorumThreshold(m)` of the
|
|
376
|
+
* `m` endpoints that answered agree on it.
|
|
373
377
|
*
|
|
374
378
|
* A provider that *answers with divergent data* is never special-cased away — it
|
|
375
379
|
* simply fails to join the agreeing group, which is what makes a lying or reorged
|
|
376
380
|
* endpoint detectable rather than authoritative.
|
|
377
381
|
*
|
|
378
|
-
*
|
|
379
|
-
*
|
|
380
|
-
*
|
|
381
|
-
*
|
|
382
|
-
*
|
|
383
|
-
*
|
|
384
|
-
*
|
|
385
|
-
*
|
|
386
|
-
* scanner that misses orders loses fills.
|
|
382
|
+
* A provider that *fails* does not vote. A failed request says nothing about the
|
|
383
|
+
* chain, so it must not outvote the endpoints that agree: the threshold guards
|
|
384
|
+
* against endpoints that answer wrongly, and every answer still counts. Six
|
|
385
|
+
* endpoints with two failing decide over the other four, three of which must
|
|
386
|
+
* agree. The price, worth stating plainly, is that a call can be decided by fewer
|
|
387
|
+
* endpoints than the operator configured; at the limit, one endpoint answering
|
|
388
|
+
* while the rest fail decides alone. The voters are still exclusively the
|
|
389
|
+
* operator's own.
|
|
387
390
|
*
|
|
388
|
-
*
|
|
389
|
-
*
|
|
390
|
-
*
|
|
391
|
-
*
|
|
392
|
-
*
|
|
393
|
-
*
|
|
394
|
-
*
|
|
395
|
-
*
|
|
391
|
+
* The bench is the one state this class keeps, and {@link benchFor} decides who
|
|
392
|
+
* goes on it: a request-rate limit ({@link isSuspendableRateLimit}), a response
|
|
393
|
+
* that is not JSON ({@link isMalformedResponse}), or a head behind the quorum's
|
|
394
|
+
* ({@link isStaleHead}). All three share the property that earns it — the
|
|
395
|
+
* endpoint will keep failing the same way for a while — so a benched endpoint is
|
|
396
|
+
* not asked for its window: asking would spend its quota, or hold the call open
|
|
397
|
+
* for an answer already known to fail. When every endpoint is benched, all are
|
|
398
|
+
* queried again; there is nobody left to prefer. Every other failure is per
|
|
399
|
+
* call, and the endpoint is asked again next time.
|
|
396
400
|
*
|
|
397
401
|
* The constructor validates that URLs resolve to distinct hostnames so a "quorum"
|
|
398
402
|
* isn't secretly the same upstream in disguise.
|
|
@@ -402,8 +406,8 @@ declare class QuorumPublicClient {
|
|
|
402
406
|
readonly rpcUrls: string[];
|
|
403
407
|
/**
|
|
404
408
|
* The quorum bar when every endpoint answers: `quorumThreshold(n)` over the
|
|
405
|
-
* full set.
|
|
406
|
-
*
|
|
409
|
+
* full set. Each call's bar is `quorumThreshold` over the endpoints that answer
|
|
410
|
+
* it, so this is the most it can be.
|
|
407
411
|
*/
|
|
408
412
|
readonly threshold: number;
|
|
409
413
|
private readonly logger?;
|
|
@@ -424,11 +428,10 @@ declare class QuorumPublicClient {
|
|
|
424
428
|
/** Endpoints currently benched, by URL. See {@link benchFor} for the reasons. */
|
|
425
429
|
suspended(): string[];
|
|
426
430
|
/**
|
|
427
|
-
* The endpoints this call queries
|
|
428
|
-
*
|
|
429
|
-
*
|
|
430
|
-
*
|
|
431
|
-
* queried again; there is nobody left to prefer.
|
|
431
|
+
* The endpoints this call queries: everyone not benched. A benched endpoint is
|
|
432
|
+
* dropped outright: it answers nothing while throttled, so asking it could only
|
|
433
|
+
* cost a request. With every endpoint benched, everyone is queried again; there
|
|
434
|
+
* is nobody left to prefer.
|
|
432
435
|
*/
|
|
433
436
|
private participants;
|
|
434
437
|
/**
|
|
@@ -453,22 +456,26 @@ declare class QuorumPublicClient {
|
|
|
453
456
|
* retries would otherwise stall every confirmation poll). Stragglers settle
|
|
454
457
|
* out of band and are ignored. `tryDecide` returns undefined to keep
|
|
455
458
|
* waiting; once every task has settled, `finalize` must decide (it throws
|
|
456
|
-
* the QuorumError when the full response set still has no quorum).
|
|
457
|
-
*
|
|
458
|
-
*
|
|
459
|
+
* the QuorumError when the full response set still has no quorum).
|
|
460
|
+
*
|
|
461
|
+
* Both are handed the bar: the BFT threshold over the endpoints that have not
|
|
462
|
+
* failed, answered or still out. A failure lowers it rather than counting
|
|
463
|
+
* against it. Counting the pending endpoints keeps an early decision to a bar
|
|
464
|
+
* no lower than the full response set would get, so a vote it did not wait for
|
|
465
|
+
* could never have reversed it.
|
|
459
466
|
*
|
|
460
467
|
* `deadlineMs` bounds the other direction: when the bar is NOT reachable
|
|
461
468
|
* from the fast responders, the call used to wait out every straggler, and
|
|
462
469
|
* the caller's own retry loop multiplied that into minutes of a chain not
|
|
463
470
|
* being scanned at all, silently. At the deadline the outstanding endpoints
|
|
464
471
|
* are treated as failures — named in the QuorumError, so the operator sees
|
|
465
|
-
* which ones held the call up — and `finalize` decides
|
|
466
|
-
*
|
|
472
|
+
* which ones held the call up — and `finalize` decides over the endpoints
|
|
473
|
+
* that answered.
|
|
467
474
|
*/
|
|
468
475
|
private settleUntilQuorum;
|
|
469
476
|
/**
|
|
470
|
-
* Highest block head backed by a
|
|
471
|
-
*
|
|
477
|
+
* Highest block head backed by a quorum of the endpoints that answer. Throws
|
|
478
|
+
* {@link QuorumError} when none do.
|
|
472
479
|
*/
|
|
473
480
|
getBlockNumber(): Promise<bigint>;
|
|
474
481
|
/**
|
|
@@ -2652,13 +2659,11 @@ interface PostedOrder {
|
|
|
2652
2659
|
* Every code the orderbook's `RejectionCode` enum can send, listed rather than
|
|
2653
2660
|
* written as a union so a test can hold it against the published schema.
|
|
2654
2661
|
*
|
|
2655
|
-
* Why the orderbook refuses an order. `MIN_ORDER_SIZE
|
|
2656
|
-
* prevented by validation before posting
|
|
2657
|
-
*
|
|
2658
|
-
*
|
|
2659
|
-
*
|
|
2660
|
-
* register the order's input symbol on the server, which is the server's own
|
|
2661
|
-
* config and nothing here can check ahead of asking.
|
|
2662
|
+
* Why the orderbook refuses an order. `MIN_ORDER_SIZE`, `TTL_TOO_SHORT` and
|
|
2663
|
+
* `UNSUPPORTED_SOURCE_CHAIN` are prevented by validation before posting, the last
|
|
2664
|
+
* against the chains the server serves and the tokens its registry lists on each;
|
|
2665
|
+
* `REPLAYED` and `ORDER_EXISTS` are answered by bumping the nonce; the rest are
|
|
2666
|
+
* encoding bugs on our side.
|
|
2662
2667
|
*/
|
|
2663
2668
|
declare const REJECTION_CODES: readonly ["MALFORMED_USER_OP", "NO_FILL_ORDER", "UNSUPPORTED_CHAIN", "UNSUPPORTED_SHAPE", "NOT_PHANTOM", "TTL_TOO_SHORT", "UNSUPPORTED_PAIR", "BAD_SIGNATURE", "BAD_NONCE_BINDING", "REPLAYED", "ORDER_EXISTS", "TOO_MANY_ORDERS", "MIN_ORDER_SIZE", "MISSING_DECLARATION", "EMPTY_DECLARATION", "UNSUPPORTED_SOURCE_CHAIN"];
|
|
2664
2669
|
type RejectionCode = (typeof REJECTION_CODES)[number];
|
|
@@ -2909,14 +2914,17 @@ declare class LimitOrderService {
|
|
|
2909
2914
|
private withdraw;
|
|
2910
2915
|
private signAndCancel;
|
|
2911
2916
|
/**
|
|
2912
|
-
* The pairs an order can be written against,
|
|
2917
|
+
* The pairs an order can be written against, the smallest payout each token may carry, and
|
|
2918
|
+
* the tokens the orderbook registers on each chain.
|
|
2913
2919
|
*
|
|
2914
2920
|
* The orderbook lists the books; `resolveBook` refuses a request naming anything else, so the
|
|
2915
|
-
* operator is offered exactly these and no combination of symbols they could not post.
|
|
2921
|
+
* operator is offered exactly these and no combination of symbols they could not post. The
|
|
2922
|
+
* chains do the same for the source chains an order can accept.
|
|
2916
2923
|
*/
|
|
2917
2924
|
books(): Promise<{
|
|
2918
2925
|
books: Book[];
|
|
2919
2926
|
minOrderSizes: TokenMinSize[];
|
|
2927
|
+
chains: ChainInfo[];
|
|
2920
2928
|
}>;
|
|
2921
2929
|
/**
|
|
2922
2930
|
* Reads `serverInfo` and `books`, reusing the last read for {@link LIMITS_TTL_MS}.
|
|
@@ -3494,6 +3502,15 @@ declare class FXFiller implements FillerStrategy {
|
|
|
3494
3502
|
* the output token's own decimals.
|
|
3495
3503
|
*/
|
|
3496
3504
|
private matchLeg;
|
|
3505
|
+
/** Why no limit order serves the order, leg by leg, for the line that says it was passed over. */
|
|
3506
|
+
private explainUnmatched;
|
|
3507
|
+
/**
|
|
3508
|
+
* One leg as the matcher sees it, or null when its input token is not one the asset
|
|
3509
|
+
* registry knows on the source chain.
|
|
3510
|
+
*
|
|
3511
|
+
* Amounts cross into the matcher at 1e18, the unit limit orders are kept in.
|
|
3512
|
+
*/
|
|
3513
|
+
private incomingFor;
|
|
3497
3514
|
/**
|
|
3498
3515
|
* The order's input in **USD**, or null when no limit order connects its input
|
|
3499
3516
|
* token to a dollar.
|
|
@@ -3831,10 +3848,11 @@ declare class LimitOrderController {
|
|
|
3831
3848
|
fills: LimitOrderFill[];
|
|
3832
3849
|
bids: StoredBid[];
|
|
3833
3850
|
} | null>;
|
|
3834
|
-
/** The pairs the orderbook lists,
|
|
3851
|
+
/** The pairs the orderbook lists, the smallest payout each token may carry, and its tokens per chain. */
|
|
3835
3852
|
books(): Promise<{
|
|
3836
3853
|
books: Book[];
|
|
3837
3854
|
minOrderSizes: TokenMinSize[];
|
|
3855
|
+
chains: ChainInfo[];
|
|
3838
3856
|
}>;
|
|
3839
3857
|
/** Creates the order, posts it, and reports what the orderbook made of it. */
|
|
3840
3858
|
create(request: CreateLimitOrderRequest): Promise<PostedLimitOrder>;
|