@hyperbridge/simplex 0.16.13 → 0.17.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/dist/bin/simplex.js +762 -261
- package/dist/bin/simplex.js.map +1 -1
- package/dist/index.cjs +333 -81
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.cts +58 -13
- package/dist/index.d.ts +58 -13
- package/dist/index.js +327 -70
- package/dist/index.js.map +1 -1
- package/dist/sqlite.cjs +8 -1
- package/dist/sqlite.cjs.map +1 -1
- package/dist/sqlite.d.cts +1 -1
- package/dist/sqlite.d.ts +1 -1
- package/dist/sqlite.js +8 -1
- package/dist/sqlite.js.map +1 -1
- package/dist/{types-BISgqJhM.d.cts → types-BPyUX8qu.d.cts} +7 -0
- package/dist/{types-BISgqJhM.d.ts → types-BPyUX8qu.d.ts} +7 -0
- package/dist/ui/assets/index-D8DLeEH0.js +106 -0
- package/dist/ui/index.html +1 -1
- package/package.json +3 -3
- package/dist/ui/assets/index-DShjZe_c.js +0 -106
package/dist/index.d.cts
CHANGED
|
@@ -2,8 +2,8 @@ import { EventEmitter as EventEmitter$1 } from 'node:events';
|
|
|
2
2
|
import { HexString, ERC7821Call, ChainConfig, Order, TokenInfo, IntentsCoprocessor, ExecutionResult, IntentGateway, FillOptions, FillerConfig as FillerConfig$1 } from '@hyperbridge/sdk';
|
|
3
3
|
import { PublicClient, Hash, AbiEvent, BlockNumber, BlockTag, GetLogsParameters, GetLogsReturnType, WalletClient, Transport, Chain } from 'viem';
|
|
4
4
|
import { LocalAccount, Account } from 'viem/accounts';
|
|
5
|
-
import { L as LoggerContext, a as LogLevel, b as Logger, A as ActivityStore, c as ActivityInsert, d as ActivityEvent, O as OrderHistoryPage, W as WalletTx, e as LimitOrderStore, f as LimitOrder, g as LimitOrderFilter, B as BidStore, S as SimplexDataStore, h as LimitOrderFill, i as StoredBid, j as LogSink, k as BidStats, l as StateStore, I as InventoryStore } from './types-
|
|
6
|
-
export { m as ActivityType, n as BidInsert, o as InventorySnapshot, p as LimitOrderFillInsert, q as LimitOrderFillRecord, r as LimitOrderHold, s as LimitOrderInsert, t as LimitOrderPosting, u as LimitOrderSide, v as LimitOrderStatus, w as OperatorNotification, R as RuntimeState, x as WalletTxKind, y as addLogSink, z as configureLogger, C as getLogger } from './types-
|
|
5
|
+
import { L as LoggerContext, a as LogLevel, b as Logger, A as ActivityStore, c as ActivityInsert, d as ActivityEvent, O as OrderHistoryPage, W as WalletTx, e as LimitOrderStore, f as LimitOrder, g as LimitOrderFilter, B as BidStore, S as SimplexDataStore, h as LimitOrderFill, i as StoredBid, j as LogSink, k as BidStats, l as StateStore, I as InventoryStore } from './types-BPyUX8qu.cjs';
|
|
6
|
+
export { m as ActivityType, n as BidInsert, o as InventorySnapshot, p as LimitOrderFillInsert, q as LimitOrderFillRecord, r as LimitOrderHold, s as LimitOrderInsert, t as LimitOrderPosting, u as LimitOrderSide, v as LimitOrderStatus, w as OperatorNotification, R as RuntimeState, x as WalletTxKind, y as addLogSink, z as configureLogger, C as getLogger } from './types-BPyUX8qu.cjs';
|
|
7
7
|
import { ChannelCredentials } from '@grpc/grpc-js';
|
|
8
8
|
import { EventEmitter } from 'events';
|
|
9
9
|
import Decimal$1, { Decimal } from 'decimal.js';
|
|
@@ -936,7 +936,11 @@ declare class UserOpSender {
|
|
|
936
936
|
*/
|
|
937
937
|
private estimateGas;
|
|
938
938
|
private buildSignedUserOp;
|
|
939
|
-
/**
|
|
939
|
+
/**
|
|
940
|
+
* Mirrors the gas-price selection used by the delegation and fill paths: Pimlico's and
|
|
941
|
+
* Alchemy's own pricing, otherwise the chain's gas price raised to the priority fee a
|
|
942
|
+
* rundler bundler requires, when the bundler gives one.
|
|
943
|
+
*/
|
|
940
944
|
private getGasPrice;
|
|
941
945
|
private sendBundlerRpc;
|
|
942
946
|
private waitForUserOpReceipt;
|
|
@@ -1419,10 +1423,10 @@ declare function validateAssetDefinitions(assets: Record<string, AssetDefinition
|
|
|
1419
1423
|
* 1. the user's `[assets]` table — an *escape hatch* for assets the registry
|
|
1420
1424
|
* doesn't ship (or per-deployment overrides), never required for shipped
|
|
1421
1425
|
* symbols;
|
|
1422
|
-
* 2. shipped symbols (USDC, USDT, DAI, CNGN, USDR, ZARP, EURC, XSGD, TRYB
|
|
1423
|
-
* resolved per chain from the SDK chain registry (`chain.ts`) —
|
|
1424
|
-
* source of truth shared with the rest of the SDK, so an
|
|
1425
|
-
* correction there is never shadowed by a parallel table here.
|
|
1426
|
+
* 2. shipped symbols (USDC, USDT, DAI, CNGN, USDR, ZARP, EURC, XSGD, TRYB,
|
|
1427
|
+
* BRIDGE) resolved per chain from the SDK chain registry (`chain.ts`) —
|
|
1428
|
+
* the single source of truth shared with the rest of the SDK, so an
|
|
1429
|
+
* address correction there is never shadowed by a parallel table here.
|
|
1426
1430
|
*
|
|
1427
1431
|
* Address lookups are per `(symbol, chain)` — a chain where no layer knows the
|
|
1428
1432
|
* asset simply doesn't trade pairs involving it. The registry holds addresses
|
|
@@ -1830,7 +1834,7 @@ interface FillerTomlConfig {
|
|
|
1830
1834
|
* Optional asset-registry escape hatch: symbol → { chain → address }. Only
|
|
1831
1835
|
* needed for assets the built-in registry does not ship, or to override a
|
|
1832
1836
|
* shipped address for a deployment. Shipped symbols: USDC, USDT, DAI, CNGN
|
|
1833
|
-
* (SDK chain registry) + curated USDR, ZARP, EURC, XSGD and
|
|
1837
|
+
* (SDK chain registry) + curated USDR, ZARP, EURC, XSGD, TRYB and BRIDGE.
|
|
1834
1838
|
*/
|
|
1835
1839
|
assets?: Record<string, AssetDefinition>;
|
|
1836
1840
|
/**
|
|
@@ -2248,6 +2252,7 @@ declare class ContractInteractionService {
|
|
|
2248
2252
|
cacheService: CacheService;
|
|
2249
2253
|
private logger;
|
|
2250
2254
|
private sdkHelperCache;
|
|
2255
|
+
private blockTimes;
|
|
2251
2256
|
private solverAccountAddress;
|
|
2252
2257
|
private signer;
|
|
2253
2258
|
constructor(clientManager: ChainClientManager, configService: FillerConfigService, signer: Signer, sharedCacheService?: CacheService);
|
|
@@ -2406,11 +2411,28 @@ declare class ContractInteractionService {
|
|
|
2406
2411
|
*
|
|
2407
2412
|
* Operators configure seconds because that is the unit the risk is actually in, but the
|
|
2408
2413
|
* contract compares against block numbers so `order.deadline` and this read the same
|
|
2409
|
-
* clock. The conversion uses the chain's
|
|
2410
|
-
* up, since erring long costs a slightly stale quote while erring
|
|
2411
|
-
* winnable bids.
|
|
2414
|
+
* clock. The conversion uses the chain's block time from {@link blockTimeSeconds}; it is
|
|
2415
|
+
* deliberately rounded up, since erring long costs a slightly stale quote while erring
|
|
2416
|
+
* short silently drops winnable bids.
|
|
2412
2417
|
*/
|
|
2413
2418
|
private bidValidUntilBlock;
|
|
2419
|
+
/**
|
|
2420
|
+
* Seconds per block on `chain`. Measured once, when simplex starts ({@link initCache}), and
|
|
2421
|
+
* kept until it stops. A chain with no measurement yet, because it was added later or its
|
|
2422
|
+
* blocks could not be read at startup, is measured at its first bid.
|
|
2423
|
+
*
|
|
2424
|
+
* The nominal `Chain.blockTime` cannot be relied on alone: it goes stale when a chain
|
|
2425
|
+
* speeds up (BSC makes a block every 0.45s against a declared 0.75s) and some chains
|
|
2426
|
+
* declare none. Converting at a slower block time than the chain's ends a bid early, so
|
|
2427
|
+
* the faster of the measured and the declared figure is used, and a stalled or idle
|
|
2428
|
+
* stretch in the sample never shortens a bid.
|
|
2429
|
+
*
|
|
2430
|
+
* Blocks that cannot be read fall back to the declared figure, then to
|
|
2431
|
+
* {@link FALLBACK_BLOCK_TIME_SECONDS}. That answer is not kept.
|
|
2432
|
+
*/
|
|
2433
|
+
private blockTimeSeconds;
|
|
2434
|
+
/** The average block time over the chain's last {@link BLOCK_TIME_SAMPLE_BLOCKS} blocks, in seconds. */
|
|
2435
|
+
private measureBlockTimeSeconds;
|
|
2414
2436
|
/**
|
|
2415
2437
|
* Builds the signed, never-executed UserOperation that carries one limit order
|
|
2416
2438
|
* to the HyperFX orderbook.
|
|
@@ -3084,7 +3106,10 @@ interface CancelledLimitOrder {
|
|
|
3084
3106
|
interface ReconcileReport {
|
|
3085
3107
|
/** Orderbook entries no limit order here owns, now withdrawn. */
|
|
3086
3108
|
cancelled: number;
|
|
3087
|
-
/**
|
|
3109
|
+
/**
|
|
3110
|
+
* Limit orders posted again: their entry had gone, or it was signed for an
|
|
3111
|
+
* EntryPoint the fill chain no longer uses.
|
|
3112
|
+
*/
|
|
3088
3113
|
reposted: number;
|
|
3089
3114
|
/** Postings the orderbook is not backing in full, left alone and surfaced. */
|
|
3090
3115
|
underFunded: number;
|
|
@@ -3120,6 +3145,8 @@ declare class LimitOrderService {
|
|
|
3120
3145
|
private logger;
|
|
3121
3146
|
private cachedLimits?;
|
|
3122
3147
|
private onEvent?;
|
|
3148
|
+
/** Re-signs in flight, by order id. A fill's resize waits one out rather than reposting alongside it. */
|
|
3149
|
+
private readonly resigning;
|
|
3123
3150
|
constructor(store: LimitOrderStore, client: OrderbookClient, contractService: ContractInteractionService, configService: FillerConfigService, assetRegistry: AssetRegistry, signer: Signer, defaultTtlSecs: number, delegationService?: DelegationService | undefined, loggers?: LoggerContext,
|
|
3124
3151
|
/** Where a new order's nonce starts; tests pin it, production draws it at random. */
|
|
3125
3152
|
startingNonce?: () => bigint,
|
|
@@ -3269,9 +3296,25 @@ declare class LimitOrderService {
|
|
|
3269
3296
|
* They drift apart when a request never got an answer or the process died
|
|
3270
3297
|
* between two of them: an entry the orderbook still lists that nothing here
|
|
3271
3298
|
* owns, an order here whose entry has gone, or an entry the orderbook has cut
|
|
3272
|
-
* down because the solver cannot cover what it quoted.
|
|
3299
|
+
* down because the solver cannot cover what it quoted. A posted op is also
|
|
3300
|
+
* signed over one EntryPoint, so when the fill chain moves to another, every
|
|
3301
|
+
* entry signed before the move is withdrawn and posted again.
|
|
3273
3302
|
*/
|
|
3274
3303
|
reconcile(now?: Date): Promise<ReconcileReport>;
|
|
3304
|
+
/**
|
|
3305
|
+
* Withdraws a posting signed for an EntryPoint its fill chain no longer uses,
|
|
3306
|
+
* and posts it again signed for the one it uses now. Answers whether a new
|
|
3307
|
+
* posting landed.
|
|
3308
|
+
*
|
|
3309
|
+
* The row is read again and claimed out of `open` first: a fill can have worked
|
|
3310
|
+
* it down or started its own repost since reconciliation listed it, and that
|
|
3311
|
+
* write is the one to follow. A fill that lands once the claim is taken waits
|
|
3312
|
+
* in `resize` for this to finish. The EntryPoint is only written with a posting
|
|
3313
|
+
* that landed, so a pass cut short anywhere leaves a row the next pass still
|
|
3314
|
+
* reads as stale, or as having no entry, and finishes the job.
|
|
3315
|
+
*/
|
|
3316
|
+
private resign;
|
|
3317
|
+
private signAgain;
|
|
3275
3318
|
/**
|
|
3276
3319
|
* Lowers every open order's `remaining` to what the solver's account will still
|
|
3277
3320
|
* pay for it, and puts the order back on the book at that size.
|
|
@@ -3330,6 +3373,8 @@ declare class LimitOrderService {
|
|
|
3330
3373
|
* only the second one.
|
|
3331
3374
|
*/
|
|
3332
3375
|
private submit;
|
|
3376
|
+
/** The EntryPoint a posting on `chain` is signed for now. */
|
|
3377
|
+
private entryPointFor;
|
|
3333
3378
|
/**
|
|
3334
3379
|
* The entry the orderbook holds at `commitment`, if it holds one. A lookup that
|
|
3335
3380
|
* fails answers null, which sends the caller down the nonce-bump path it would
|
package/dist/index.d.ts
CHANGED
|
@@ -2,8 +2,8 @@ import { EventEmitter as EventEmitter$1 } from 'node:events';
|
|
|
2
2
|
import { HexString, ERC7821Call, ChainConfig, Order, TokenInfo, IntentsCoprocessor, ExecutionResult, IntentGateway, FillOptions, FillerConfig as FillerConfig$1 } from '@hyperbridge/sdk';
|
|
3
3
|
import { PublicClient, Hash, AbiEvent, BlockNumber, BlockTag, GetLogsParameters, GetLogsReturnType, WalletClient, Transport, Chain } from 'viem';
|
|
4
4
|
import { LocalAccount, Account } from 'viem/accounts';
|
|
5
|
-
import { L as LoggerContext, a as LogLevel, b as Logger, A as ActivityStore, c as ActivityInsert, d as ActivityEvent, O as OrderHistoryPage, W as WalletTx, e as LimitOrderStore, f as LimitOrder, g as LimitOrderFilter, B as BidStore, S as SimplexDataStore, h as LimitOrderFill, i as StoredBid, j as LogSink, k as BidStats, l as StateStore, I as InventoryStore } from './types-
|
|
6
|
-
export { m as ActivityType, n as BidInsert, o as InventorySnapshot, p as LimitOrderFillInsert, q as LimitOrderFillRecord, r as LimitOrderHold, s as LimitOrderInsert, t as LimitOrderPosting, u as LimitOrderSide, v as LimitOrderStatus, w as OperatorNotification, R as RuntimeState, x as WalletTxKind, y as addLogSink, z as configureLogger, C as getLogger } from './types-
|
|
5
|
+
import { L as LoggerContext, a as LogLevel, b as Logger, A as ActivityStore, c as ActivityInsert, d as ActivityEvent, O as OrderHistoryPage, W as WalletTx, e as LimitOrderStore, f as LimitOrder, g as LimitOrderFilter, B as BidStore, S as SimplexDataStore, h as LimitOrderFill, i as StoredBid, j as LogSink, k as BidStats, l as StateStore, I as InventoryStore } from './types-BPyUX8qu.js';
|
|
6
|
+
export { m as ActivityType, n as BidInsert, o as InventorySnapshot, p as LimitOrderFillInsert, q as LimitOrderFillRecord, r as LimitOrderHold, s as LimitOrderInsert, t as LimitOrderPosting, u as LimitOrderSide, v as LimitOrderStatus, w as OperatorNotification, R as RuntimeState, x as WalletTxKind, y as addLogSink, z as configureLogger, C as getLogger } from './types-BPyUX8qu.js';
|
|
7
7
|
import { ChannelCredentials } from '@grpc/grpc-js';
|
|
8
8
|
import { EventEmitter } from 'events';
|
|
9
9
|
import Decimal$1, { Decimal } from 'decimal.js';
|
|
@@ -936,7 +936,11 @@ declare class UserOpSender {
|
|
|
936
936
|
*/
|
|
937
937
|
private estimateGas;
|
|
938
938
|
private buildSignedUserOp;
|
|
939
|
-
/**
|
|
939
|
+
/**
|
|
940
|
+
* Mirrors the gas-price selection used by the delegation and fill paths: Pimlico's and
|
|
941
|
+
* Alchemy's own pricing, otherwise the chain's gas price raised to the priority fee a
|
|
942
|
+
* rundler bundler requires, when the bundler gives one.
|
|
943
|
+
*/
|
|
940
944
|
private getGasPrice;
|
|
941
945
|
private sendBundlerRpc;
|
|
942
946
|
private waitForUserOpReceipt;
|
|
@@ -1419,10 +1423,10 @@ declare function validateAssetDefinitions(assets: Record<string, AssetDefinition
|
|
|
1419
1423
|
* 1. the user's `[assets]` table — an *escape hatch* for assets the registry
|
|
1420
1424
|
* doesn't ship (or per-deployment overrides), never required for shipped
|
|
1421
1425
|
* symbols;
|
|
1422
|
-
* 2. shipped symbols (USDC, USDT, DAI, CNGN, USDR, ZARP, EURC, XSGD, TRYB
|
|
1423
|
-
* resolved per chain from the SDK chain registry (`chain.ts`) —
|
|
1424
|
-
* source of truth shared with the rest of the SDK, so an
|
|
1425
|
-
* correction there is never shadowed by a parallel table here.
|
|
1426
|
+
* 2. shipped symbols (USDC, USDT, DAI, CNGN, USDR, ZARP, EURC, XSGD, TRYB,
|
|
1427
|
+
* BRIDGE) resolved per chain from the SDK chain registry (`chain.ts`) —
|
|
1428
|
+
* the single source of truth shared with the rest of the SDK, so an
|
|
1429
|
+
* address correction there is never shadowed by a parallel table here.
|
|
1426
1430
|
*
|
|
1427
1431
|
* Address lookups are per `(symbol, chain)` — a chain where no layer knows the
|
|
1428
1432
|
* asset simply doesn't trade pairs involving it. The registry holds addresses
|
|
@@ -1830,7 +1834,7 @@ interface FillerTomlConfig {
|
|
|
1830
1834
|
* Optional asset-registry escape hatch: symbol → { chain → address }. Only
|
|
1831
1835
|
* needed for assets the built-in registry does not ship, or to override a
|
|
1832
1836
|
* shipped address for a deployment. Shipped symbols: USDC, USDT, DAI, CNGN
|
|
1833
|
-
* (SDK chain registry) + curated USDR, ZARP, EURC, XSGD and
|
|
1837
|
+
* (SDK chain registry) + curated USDR, ZARP, EURC, XSGD, TRYB and BRIDGE.
|
|
1834
1838
|
*/
|
|
1835
1839
|
assets?: Record<string, AssetDefinition>;
|
|
1836
1840
|
/**
|
|
@@ -2248,6 +2252,7 @@ declare class ContractInteractionService {
|
|
|
2248
2252
|
cacheService: CacheService;
|
|
2249
2253
|
private logger;
|
|
2250
2254
|
private sdkHelperCache;
|
|
2255
|
+
private blockTimes;
|
|
2251
2256
|
private solverAccountAddress;
|
|
2252
2257
|
private signer;
|
|
2253
2258
|
constructor(clientManager: ChainClientManager, configService: FillerConfigService, signer: Signer, sharedCacheService?: CacheService);
|
|
@@ -2406,11 +2411,28 @@ declare class ContractInteractionService {
|
|
|
2406
2411
|
*
|
|
2407
2412
|
* Operators configure seconds because that is the unit the risk is actually in, but the
|
|
2408
2413
|
* contract compares against block numbers so `order.deadline` and this read the same
|
|
2409
|
-
* clock. The conversion uses the chain's
|
|
2410
|
-
* up, since erring long costs a slightly stale quote while erring
|
|
2411
|
-
* winnable bids.
|
|
2414
|
+
* clock. The conversion uses the chain's block time from {@link blockTimeSeconds}; it is
|
|
2415
|
+
* deliberately rounded up, since erring long costs a slightly stale quote while erring
|
|
2416
|
+
* short silently drops winnable bids.
|
|
2412
2417
|
*/
|
|
2413
2418
|
private bidValidUntilBlock;
|
|
2419
|
+
/**
|
|
2420
|
+
* Seconds per block on `chain`. Measured once, when simplex starts ({@link initCache}), and
|
|
2421
|
+
* kept until it stops. A chain with no measurement yet, because it was added later or its
|
|
2422
|
+
* blocks could not be read at startup, is measured at its first bid.
|
|
2423
|
+
*
|
|
2424
|
+
* The nominal `Chain.blockTime` cannot be relied on alone: it goes stale when a chain
|
|
2425
|
+
* speeds up (BSC makes a block every 0.45s against a declared 0.75s) and some chains
|
|
2426
|
+
* declare none. Converting at a slower block time than the chain's ends a bid early, so
|
|
2427
|
+
* the faster of the measured and the declared figure is used, and a stalled or idle
|
|
2428
|
+
* stretch in the sample never shortens a bid.
|
|
2429
|
+
*
|
|
2430
|
+
* Blocks that cannot be read fall back to the declared figure, then to
|
|
2431
|
+
* {@link FALLBACK_BLOCK_TIME_SECONDS}. That answer is not kept.
|
|
2432
|
+
*/
|
|
2433
|
+
private blockTimeSeconds;
|
|
2434
|
+
/** The average block time over the chain's last {@link BLOCK_TIME_SAMPLE_BLOCKS} blocks, in seconds. */
|
|
2435
|
+
private measureBlockTimeSeconds;
|
|
2414
2436
|
/**
|
|
2415
2437
|
* Builds the signed, never-executed UserOperation that carries one limit order
|
|
2416
2438
|
* to the HyperFX orderbook.
|
|
@@ -3084,7 +3106,10 @@ interface CancelledLimitOrder {
|
|
|
3084
3106
|
interface ReconcileReport {
|
|
3085
3107
|
/** Orderbook entries no limit order here owns, now withdrawn. */
|
|
3086
3108
|
cancelled: number;
|
|
3087
|
-
/**
|
|
3109
|
+
/**
|
|
3110
|
+
* Limit orders posted again: their entry had gone, or it was signed for an
|
|
3111
|
+
* EntryPoint the fill chain no longer uses.
|
|
3112
|
+
*/
|
|
3088
3113
|
reposted: number;
|
|
3089
3114
|
/** Postings the orderbook is not backing in full, left alone and surfaced. */
|
|
3090
3115
|
underFunded: number;
|
|
@@ -3120,6 +3145,8 @@ declare class LimitOrderService {
|
|
|
3120
3145
|
private logger;
|
|
3121
3146
|
private cachedLimits?;
|
|
3122
3147
|
private onEvent?;
|
|
3148
|
+
/** Re-signs in flight, by order id. A fill's resize waits one out rather than reposting alongside it. */
|
|
3149
|
+
private readonly resigning;
|
|
3123
3150
|
constructor(store: LimitOrderStore, client: OrderbookClient, contractService: ContractInteractionService, configService: FillerConfigService, assetRegistry: AssetRegistry, signer: Signer, defaultTtlSecs: number, delegationService?: DelegationService | undefined, loggers?: LoggerContext,
|
|
3124
3151
|
/** Where a new order's nonce starts; tests pin it, production draws it at random. */
|
|
3125
3152
|
startingNonce?: () => bigint,
|
|
@@ -3269,9 +3296,25 @@ declare class LimitOrderService {
|
|
|
3269
3296
|
* They drift apart when a request never got an answer or the process died
|
|
3270
3297
|
* between two of them: an entry the orderbook still lists that nothing here
|
|
3271
3298
|
* owns, an order here whose entry has gone, or an entry the orderbook has cut
|
|
3272
|
-
* down because the solver cannot cover what it quoted.
|
|
3299
|
+
* down because the solver cannot cover what it quoted. A posted op is also
|
|
3300
|
+
* signed over one EntryPoint, so when the fill chain moves to another, every
|
|
3301
|
+
* entry signed before the move is withdrawn and posted again.
|
|
3273
3302
|
*/
|
|
3274
3303
|
reconcile(now?: Date): Promise<ReconcileReport>;
|
|
3304
|
+
/**
|
|
3305
|
+
* Withdraws a posting signed for an EntryPoint its fill chain no longer uses,
|
|
3306
|
+
* and posts it again signed for the one it uses now. Answers whether a new
|
|
3307
|
+
* posting landed.
|
|
3308
|
+
*
|
|
3309
|
+
* The row is read again and claimed out of `open` first: a fill can have worked
|
|
3310
|
+
* it down or started its own repost since reconciliation listed it, and that
|
|
3311
|
+
* write is the one to follow. A fill that lands once the claim is taken waits
|
|
3312
|
+
* in `resize` for this to finish. The EntryPoint is only written with a posting
|
|
3313
|
+
* that landed, so a pass cut short anywhere leaves a row the next pass still
|
|
3314
|
+
* reads as stale, or as having no entry, and finishes the job.
|
|
3315
|
+
*/
|
|
3316
|
+
private resign;
|
|
3317
|
+
private signAgain;
|
|
3275
3318
|
/**
|
|
3276
3319
|
* Lowers every open order's `remaining` to what the solver's account will still
|
|
3277
3320
|
* pay for it, and puts the order back on the book at that size.
|
|
@@ -3330,6 +3373,8 @@ declare class LimitOrderService {
|
|
|
3330
3373
|
* only the second one.
|
|
3331
3374
|
*/
|
|
3332
3375
|
private submit;
|
|
3376
|
+
/** The EntryPoint a posting on `chain` is signed for now. */
|
|
3377
|
+
private entryPointFor;
|
|
3333
3378
|
/**
|
|
3334
3379
|
* The entry the orderbook holds at `commitment`, if it holds one. A lookup that
|
|
3335
3380
|
* fails answers null, which sends the caller down the nonce-bump path it would
|