@morpho-dev/router 0.7.2 → 0.8.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/cli.js +292 -122
- package/dist/drizzle/migrations/0000_setup_single_migration_folder.sql +64 -64
- package/dist/drizzle/migrations/0001_add-trigger-for-consumed-events.sql +5 -5
- package/dist/drizzle/migrations/0002_insert-status-code.sql +1 -1
- package/dist/drizzle/migrations/0003_update-triggers-for-consumed-events.sql +1 -1
- package/dist/drizzle/migrations/0004_drop-status-offers-foreign-key-constraint.sql +1 -1
- package/dist/drizzle/migrations/0005_add-index-to-boost-group-query-and-offer-hash.sql +1 -1
- package/dist/drizzle/migrations/0006_add-callbacks-and-positions-relations.sql +11 -11
- package/dist/drizzle/migrations/0008_validation.sql +10 -10
- package/dist/drizzle/migrations/0009_add-transfers-table.sql +4 -4
- package/dist/drizzle/migrations/0010_add-price.sql +1 -1
- package/dist/drizzle/migrations/0011_nullable-callback-amount.sql +1 -1
- package/dist/drizzle/migrations/0012_add-position-asset.sql +1 -1
- package/dist/drizzle/migrations/0013_remove-depecrated-domains.sql +13 -13
- package/dist/drizzle/migrations/0014_rename-offers-v2-into-offers.sql +19 -19
- package/dist/drizzle/migrations/0015_add-lots-table.sql +3 -3
- package/dist/drizzle/migrations/0016_merkle-metadata.sql +7 -7
- package/dist/drizzle/migrations/0017_dusty_the_hunter.sql +1 -1
- package/dist/drizzle/migrations/0018_add_chain_collector_constraints.sql +3 -3
- package/dist/drizzle/migrations/0019_add-obligation-units-shares.sql +2 -2
- package/dist/drizzle/migrations/0020_add-session.sql +1 -1
- package/dist/drizzle/migrations/0021_drop_chain_collector_epoch_indexes.sql +2 -2
- package/dist/drizzle/migrations/0021_migrate-rate-to-price.sql +6 -6
- package/dist/drizzle/migrations/0022_consolidate-price.sql +5 -5
- package/dist/drizzle/migrations/0023_remove-block-number-for-collaterals.sql +1 -1
- package/dist/drizzle/migrations/0024_add-obligation-id-to-lots.sql +8 -0
- package/dist/drizzle/migrations/0025_rename-price-to-tick.sql +202 -0
- package/dist/drizzle/migrations/meta/0000_snapshot.json +48 -48
- package/dist/drizzle/migrations/meta/0001_snapshot.json +48 -48
- package/dist/drizzle/migrations/meta/0002_snapshot.json +48 -48
- package/dist/drizzle/migrations/meta/0003_snapshot.json +48 -48
- package/dist/drizzle/migrations/meta/0004_snapshot.json +47 -47
- package/dist/drizzle/migrations/meta/0005_snapshot.json +47 -47
- package/dist/drizzle/migrations/meta/0006_snapshot.json +61 -61
- package/dist/drizzle/migrations/meta/0008_snapshot.json +62 -62
- package/dist/drizzle/migrations/meta/0009_snapshot.json +66 -66
- package/dist/drizzle/migrations/meta/0010_snapshot.json +66 -66
- package/dist/drizzle/migrations/meta/0013_snapshot.json +48 -48
- package/dist/drizzle/migrations/meta/0014_snapshot.json +48 -48
- package/dist/drizzle/migrations/meta/0015_snapshot.json +52 -52
- package/dist/drizzle/migrations/meta/0016_snapshot.json +61 -61
- package/dist/drizzle/migrations/meta/0017_snapshot.json +61 -61
- package/dist/drizzle/migrations/meta/0018_snapshot.json +62 -62
- package/dist/drizzle/migrations/meta/0019_snapshot.json +62 -62
- package/dist/drizzle/migrations/meta/0023_snapshot.json +62 -62
- package/dist/drizzle/migrations/meta/0024_snapshot.json +1448 -0
- package/dist/drizzle/migrations/meta/0025_snapshot.json +1448 -0
- package/dist/drizzle/migrations/meta/_journal.json +14 -0
- package/dist/index.browser.d.mts +103 -33
- package/dist/index.browser.d.mts.map +1 -1
- package/dist/index.browser.d.ts +103 -33
- package/dist/index.browser.d.ts.map +1 -1
- package/dist/index.browser.js +298 -146
- package/dist/index.browser.js.map +1 -1
- package/dist/index.browser.mjs +293 -147
- package/dist/index.browser.mjs.map +1 -1
- package/dist/index.node.d.mts +182 -63
- package/dist/index.node.d.mts.map +1 -1
- package/dist/index.node.d.ts +182 -63
- package/dist/index.node.d.ts.map +1 -1
- package/dist/index.node.js +342 -127
- package/dist/index.node.js.map +1 -1
- package/dist/index.node.mjs +337 -128
- package/dist/index.node.mjs.map +1 -1
- package/package.json +1 -1
package/dist/index.node.d.mts
CHANGED
|
@@ -1871,8 +1871,8 @@ type Offer = {
|
|
|
1871
1871
|
/** The address that made the offer. */readonly maker: Address; /** The amount of assets offered. Mutually exclusive with obligationUnits and obligationShares. */
|
|
1872
1872
|
readonly assets: bigint; /** The max debt units to trade. Mutually exclusive with assets and obligationShares. */
|
|
1873
1873
|
readonly obligationUnits: bigint; /** The max lending shares to trade. Mutually exclusive with assets and obligationUnits. */
|
|
1874
|
-
readonly obligationShares: bigint; /** The
|
|
1875
|
-
readonly
|
|
1874
|
+
readonly obligationShares: bigint; /** The offer tick. */
|
|
1875
|
+
readonly tick: number; /** The date at which all interests will be paid. */
|
|
1876
1876
|
readonly maturity: Maturity; /** The date at which the offer will expire. */
|
|
1877
1877
|
readonly expiry: number; /** The date at which the offer will start. */
|
|
1878
1878
|
readonly start: number; /** The group. Used for OCO (One-Cancelled-Other) mechanism. */
|
|
@@ -1900,7 +1900,7 @@ declare const OfferSchema: () => z$1.ZodObject<{
|
|
|
1900
1900
|
assets: z$1.ZodBigInt;
|
|
1901
1901
|
obligationUnits: z$1.ZodDefault<z$1.ZodOptional<z$1.ZodBigInt>>;
|
|
1902
1902
|
obligationShares: z$1.ZodDefault<z$1.ZodOptional<z$1.ZodBigInt>>;
|
|
1903
|
-
|
|
1903
|
+
tick: z$1.ZodCoercedNumber<unknown>;
|
|
1904
1904
|
maturity: z$1.ZodPipe<z$1.ZodNumber, z$1.ZodTransform<Maturity, number>>;
|
|
1905
1905
|
expiry: z$1.ZodNumber;
|
|
1906
1906
|
start: z$1.ZodNumber;
|
|
@@ -1975,7 +1975,7 @@ declare const serialize: (offer: Offer) => {
|
|
|
1975
1975
|
assets: string;
|
|
1976
1976
|
obligationUnits: string;
|
|
1977
1977
|
obligationShares: string;
|
|
1978
|
-
|
|
1978
|
+
tick: number;
|
|
1979
1979
|
maturity: number;
|
|
1980
1980
|
expiry: number;
|
|
1981
1981
|
start: number;
|
|
@@ -2010,7 +2010,7 @@ type RandomConfig = {
|
|
|
2010
2010
|
expiry?: number;
|
|
2011
2011
|
group?: Hex | bigint | number | string;
|
|
2012
2012
|
session?: Hex | bigint | number | string;
|
|
2013
|
-
|
|
2013
|
+
tick?: number;
|
|
2014
2014
|
callback?: {
|
|
2015
2015
|
address: Address;
|
|
2016
2016
|
data: Hex;
|
|
@@ -2059,7 +2059,7 @@ declare const types: {
|
|
|
2059
2059
|
readonly name: "obligationShares";
|
|
2060
2060
|
readonly type: "uint256";
|
|
2061
2061
|
}, {
|
|
2062
|
-
readonly name: "
|
|
2062
|
+
readonly name: "tick";
|
|
2063
2063
|
readonly type: "uint256";
|
|
2064
2064
|
}, {
|
|
2065
2065
|
readonly name: "maturity";
|
|
@@ -2455,6 +2455,41 @@ declare class InvalidQuoteError extends BaseError<z$1.ZodError | Error> {
|
|
|
2455
2455
|
readonly name = "Quote.InvalidQuoteError";
|
|
2456
2456
|
constructor(error: z$1.ZodError | Error);
|
|
2457
2457
|
}
|
|
2458
|
+
declare namespace Tick_d_exports {
|
|
2459
|
+
export { InvalidPriceError, InvalidTickError, MAX_PRICE, TICK_RANGE, priceToTick, tickToPrice };
|
|
2460
|
+
}
|
|
2461
|
+
/** Tick domain supported by Morpho V2. */
|
|
2462
|
+
declare const TICK_RANGE = 990;
|
|
2463
|
+
/** Max allowed price (1e18 in wad). */
|
|
2464
|
+
declare const MAX_PRICE: bigint;
|
|
2465
|
+
/**
|
|
2466
|
+
* Converts a tick to a wad price using the same approximation and rounding as TickLib.
|
|
2467
|
+
* @param tick - Tick value in the inclusive range [0, 990].
|
|
2468
|
+
* @returns The price in wad units.
|
|
2469
|
+
* @throws {@link InvalidTickError} If tick is not an integer in range [0, 990].
|
|
2470
|
+
*/
|
|
2471
|
+
declare function tickToPrice(tick: number): bigint;
|
|
2472
|
+
declare namespace tickToPrice {
|
|
2473
|
+
type ErrorType = InvalidTickError;
|
|
2474
|
+
}
|
|
2475
|
+
/**
|
|
2476
|
+
* Returns the lowest tick with a higher-or-equal price.
|
|
2477
|
+
* @param price - Price in wad units.
|
|
2478
|
+
* @returns The first tick whose {@link tickToPrice} is greater than or equal to `price`.
|
|
2479
|
+
* @throws {@link InvalidPriceError} If price is outside [0, 1e18].
|
|
2480
|
+
*/
|
|
2481
|
+
declare function priceToTick(price: bigint): number;
|
|
2482
|
+
declare namespace priceToTick {
|
|
2483
|
+
type ErrorType = InvalidPriceError;
|
|
2484
|
+
}
|
|
2485
|
+
declare class InvalidTickError extends BaseError {
|
|
2486
|
+
readonly name = "Tick.InvalidTickError";
|
|
2487
|
+
constructor(tick: number);
|
|
2488
|
+
}
|
|
2489
|
+
declare class InvalidPriceError extends BaseError {
|
|
2490
|
+
readonly name = "Tick.InvalidPriceError";
|
|
2491
|
+
constructor(price: bigint);
|
|
2492
|
+
}
|
|
2458
2493
|
declare namespace TradingFee_d_exports {
|
|
2459
2494
|
export { BREAKPOINTS, Fees, InvalidFeeError, InvalidFeesLengthError, TradingFee, WAD, activate, compute, deactivate, from$9 as from, getFees, isActivated };
|
|
2460
2495
|
}
|
|
@@ -2868,7 +2903,7 @@ type Row = {
|
|
|
2868
2903
|
assets: bigint;
|
|
2869
2904
|
obligationUnits: bigint;
|
|
2870
2905
|
obligationShares: bigint;
|
|
2871
|
-
|
|
2906
|
+
tick: number;
|
|
2872
2907
|
maturity: Maturity;
|
|
2873
2908
|
expiry: number;
|
|
2874
2909
|
start: number;
|
|
@@ -2939,8 +2974,8 @@ declare namespace get$4 {
|
|
|
2939
2974
|
limit?: number;
|
|
2940
2975
|
};
|
|
2941
2976
|
type Level = {
|
|
2942
|
-
/** The
|
|
2943
|
-
assets: bigint; /** Number of offers at this
|
|
2977
|
+
/** The offer tick for this level */tick: number; /** Sum of takeable amounts at this tick */
|
|
2978
|
+
assets: bigint; /** Number of offers at this tick */
|
|
2944
2979
|
count: number;
|
|
2945
2980
|
};
|
|
2946
2981
|
type ReturnType = {
|
|
@@ -3029,6 +3064,7 @@ type Lot = {
|
|
|
3029
3064
|
user: Address;
|
|
3030
3065
|
contract: Address;
|
|
3031
3066
|
group: string;
|
|
3067
|
+
obligationId: string;
|
|
3032
3068
|
lower: bigint;
|
|
3033
3069
|
upper: bigint;
|
|
3034
3070
|
};
|
|
@@ -3051,6 +3087,7 @@ declare namespace create$5 {
|
|
|
3051
3087
|
positionContract: Address;
|
|
3052
3088
|
positionUser: Address;
|
|
3053
3089
|
group: string;
|
|
3090
|
+
obligationId: string;
|
|
3054
3091
|
size: bigint;
|
|
3055
3092
|
};
|
|
3056
3093
|
type Parameters = OfferLotInfo[];
|
|
@@ -3062,6 +3099,7 @@ declare namespace get$3 {
|
|
|
3062
3099
|
user?: Address;
|
|
3063
3100
|
contract?: Address;
|
|
3064
3101
|
group?: string;
|
|
3102
|
+
obligationId?: string;
|
|
3065
3103
|
};
|
|
3066
3104
|
type ReturnType = Lot[];
|
|
3067
3105
|
}
|
|
@@ -3082,6 +3120,7 @@ type Offset = {
|
|
|
3082
3120
|
user: Address;
|
|
3083
3121
|
contract: Address;
|
|
3084
3122
|
group: string;
|
|
3123
|
+
obligationId: string;
|
|
3085
3124
|
value: bigint;
|
|
3086
3125
|
};
|
|
3087
3126
|
type OffsetsDomain = {
|
|
@@ -3096,6 +3135,7 @@ declare namespace get$2 {
|
|
|
3096
3135
|
user?: Address;
|
|
3097
3136
|
contract?: Address;
|
|
3098
3137
|
group?: string;
|
|
3138
|
+
obligationId?: string;
|
|
3099
3139
|
};
|
|
3100
3140
|
type ReturnType = Offset[];
|
|
3101
3141
|
}
|
|
@@ -3174,7 +3214,8 @@ declare namespace getByUser {
|
|
|
3174
3214
|
chainId: Id;
|
|
3175
3215
|
contract: Address;
|
|
3176
3216
|
user: Address;
|
|
3177
|
-
blockNumber: number; /** The
|
|
3217
|
+
blockNumber: number; /** The obligation this reserved amount belongs to, or null if no lots exist */
|
|
3218
|
+
obligationId: string | null; /** The amount reserved by active offers: max(lot.upper) - offset - consumed */
|
|
3178
3219
|
reserved: bigint;
|
|
3179
3220
|
};
|
|
3180
3221
|
type ReturnType = {
|
|
@@ -3263,7 +3304,7 @@ type ValidationsDomain = {
|
|
|
3263
3304
|
upsert: (validations: Validation[]) => Promise<void>;
|
|
3264
3305
|
};
|
|
3265
3306
|
declare namespace Database_d_exports {
|
|
3266
|
-
export { Core, Database, Driver, WithDomains, connect$2 as connect };
|
|
3307
|
+
export { Core, Database, Driver, WithDomains, connect$2 as connect, getSchemaNamesForMigration };
|
|
3267
3308
|
}
|
|
3268
3309
|
type Driver = ReturnType<typeof drizzle> | ReturnType<typeof drizzle$1>;
|
|
3269
3310
|
type Domains = {
|
|
@@ -3299,6 +3340,12 @@ type Database = Core & {
|
|
|
3299
3340
|
* @returns The database client {@link connect.ReturnType}
|
|
3300
3341
|
*/
|
|
3301
3342
|
declare function connect$2(chainRegistry: ChainRegistry, connectionString?: string): Database;
|
|
3343
|
+
/**
|
|
3344
|
+
* Build the list of router schemas that should exist before running migrations.
|
|
3345
|
+
* @param version - Current schema version (e.g. `router_v1.8`).
|
|
3346
|
+
* @returns Ordered schema names from `router_v1.7` to current, or just current if parsing fails.
|
|
3347
|
+
*/
|
|
3348
|
+
declare function getSchemaNamesForMigration(version: string): string[];
|
|
3302
3349
|
declare namespace Gate_d_exports {
|
|
3303
3350
|
export { Batch, Issue, Result, Rule, RuleNames, Single, batch$1 as batch, run, single };
|
|
3304
3351
|
}
|
|
@@ -3383,6 +3430,10 @@ type ConfigRule = {
|
|
|
3383
3430
|
type: "loan_token";
|
|
3384
3431
|
chain_id: Id;
|
|
3385
3432
|
address: Address;
|
|
3433
|
+
} | {
|
|
3434
|
+
type: "collateral_token";
|
|
3435
|
+
chain_id: Id;
|
|
3436
|
+
address: Address;
|
|
3386
3437
|
} | {
|
|
3387
3438
|
type: "oracle";
|
|
3388
3439
|
chain_id: Id;
|
|
@@ -3555,15 +3606,17 @@ declare namespace BookResponse_d_exports {
|
|
|
3555
3606
|
export { BookLevelResponse, from$4 as from };
|
|
3556
3607
|
}
|
|
3557
3608
|
type BookLevelResponse = {
|
|
3609
|
+
tick: number;
|
|
3558
3610
|
price: string;
|
|
3559
3611
|
assets: string;
|
|
3560
3612
|
count: number;
|
|
3561
3613
|
};
|
|
3562
|
-
|
|
3563
|
-
|
|
3614
|
+
type Input$1 = {
|
|
3615
|
+
tick: number;
|
|
3564
3616
|
assets: bigint;
|
|
3565
3617
|
count: number;
|
|
3566
|
-
}
|
|
3618
|
+
};
|
|
3619
|
+
declare function from$4(level: Input$1): BookLevelResponse;
|
|
3567
3620
|
//#endregion
|
|
3568
3621
|
//#region src/api/Schema/health.d.ts
|
|
3569
3622
|
declare const CollectorHealth: z.ZodObject<{
|
|
@@ -3637,13 +3690,13 @@ interface paths {
|
|
|
3637
3690
|
};
|
|
3638
3691
|
/**
|
|
3639
3692
|
* Get aggregated book
|
|
3640
|
-
* @description Returns aggregated book data for a given obligation and side. Offers are grouped by
|
|
3693
|
+
* @description Returns aggregated book data for a given obligation and side. Offers are grouped by tick with summed takeable amounts, and each level includes the corresponding wad-scaled price. Book levels are sorted by tick (ascending for sell side, descending for buy side).
|
|
3641
3694
|
*/
|
|
3642
3695
|
get: {
|
|
3643
3696
|
parameters: {
|
|
3644
3697
|
query?: {
|
|
3645
3698
|
/**
|
|
3646
|
-
* @description Maximum number of
|
|
3699
|
+
* @description Maximum number of tick levels to return.
|
|
3647
3700
|
* @example 10
|
|
3648
3701
|
*/
|
|
3649
3702
|
limit?: number;
|
|
@@ -3759,7 +3812,7 @@ interface paths {
|
|
|
3759
3812
|
};
|
|
3760
3813
|
/**
|
|
3761
3814
|
* Get config rules
|
|
3762
|
-
* @description Returns configured rules (maturities, loan tokens, oracles) for supported chains.
|
|
3815
|
+
* @description Returns configured rules (maturities, loan tokens, collateral tokens, oracles) for supported chains.
|
|
3763
3816
|
*/
|
|
3764
3817
|
get: {
|
|
3765
3818
|
parameters: {
|
|
@@ -3771,7 +3824,7 @@ interface paths {
|
|
|
3771
3824
|
chains?: number[];
|
|
3772
3825
|
/**
|
|
3773
3826
|
* @description Filter by rule types (comma-separated).
|
|
3774
|
-
* @example maturity,loan_token,oracle
|
|
3827
|
+
* @example maturity,loan_token,collateral_token,oracle
|
|
3775
3828
|
*/
|
|
3776
3829
|
types?: string[];
|
|
3777
3830
|
/**
|
|
@@ -4151,7 +4204,7 @@ interface paths {
|
|
|
4151
4204
|
};
|
|
4152
4205
|
/**
|
|
4153
4206
|
* Get user positions
|
|
4154
|
-
* @description Returns positions for a user with reserved balance.
|
|
4207
|
+
* @description Returns positions for a user with reserved balance per obligation. Each (position, obligation) pair is returned as a separate row. Positions with no lots return a single row with obligation_id = null and reserved = 0.
|
|
4155
4208
|
*/
|
|
4156
4209
|
get: {
|
|
4157
4210
|
parameters: {
|
|
@@ -4260,14 +4313,19 @@ interface components {
|
|
|
4260
4313
|
schemas: {
|
|
4261
4314
|
BookListResponse: {
|
|
4262
4315
|
meta: components["schemas"]["Meta"]; /** @example eyJvZmZzZXQiOjEwMH0 */
|
|
4263
|
-
cursor: string | null; /** @description Aggregated book levels grouped by
|
|
4316
|
+
cursor: string | null; /** @description Aggregated book levels grouped by offer tick. */
|
|
4264
4317
|
data: components["schemas"]["BookLevelResponse"][];
|
|
4265
4318
|
};
|
|
4266
4319
|
Meta: {
|
|
4267
4320
|
/** @example 2024-01-01T12:00:00.000Z */timestamp: string;
|
|
4268
4321
|
};
|
|
4269
4322
|
BookLevelResponse: {
|
|
4270
|
-
/** @example
|
|
4323
|
+
/** @example 495 */tick: number;
|
|
4324
|
+
/**
|
|
4325
|
+
* @description Price derived from tick, scaled by 1e18.
|
|
4326
|
+
* @example 500000000000000000
|
|
4327
|
+
*/
|
|
4328
|
+
price: string; /** @example 369216000000000000000000 */
|
|
4271
4329
|
assets: string; /** @example 5 */
|
|
4272
4330
|
count: number;
|
|
4273
4331
|
};
|
|
@@ -4344,6 +4402,11 @@ interface components {
|
|
|
4344
4402
|
* "address": "0xA0b86991c6218b36c1d19D4a2e9Eb0cE3606eB48"
|
|
4345
4403
|
* },
|
|
4346
4404
|
* {
|
|
4405
|
+
* "type": "collateral_token",
|
|
4406
|
+
* "chain_id": 1,
|
|
4407
|
+
* "address": "0x7f39C581F595B53c5cb19bD0b3f8dA6c935E2Ca0"
|
|
4408
|
+
* },
|
|
4409
|
+
* {
|
|
4347
4410
|
* "type": "oracle",
|
|
4348
4411
|
* "chain_id": 1,
|
|
4349
4412
|
* "address": "0xDddd770BADd886dF3864029e4B377B5F6a2B6b83"
|
|
@@ -4393,7 +4456,7 @@ interface components {
|
|
|
4393
4456
|
* "obligation_shares": "0",
|
|
4394
4457
|
* "start": 1761922790,
|
|
4395
4458
|
* "expiry": 1761922799,
|
|
4396
|
-
* "
|
|
4459
|
+
* "tick": 495,
|
|
4397
4460
|
* "group": "0x000000000000000000000000000000000000000000000000000000000008b8f4",
|
|
4398
4461
|
* "session": "0x0000000000000000000000000000000000000000000000000000000000000000",
|
|
4399
4462
|
* "callback": "0x0000000000000000000000000000000000000000",
|
|
@@ -4437,7 +4500,7 @@ interface components {
|
|
|
4437
4500
|
* "obligation_shares": "0",
|
|
4438
4501
|
* "start": 1761922790,
|
|
4439
4502
|
* "expiry": 1761922799,
|
|
4440
|
-
* "
|
|
4503
|
+
* "tick": 495,
|
|
4441
4504
|
* "group": "0x000000000000000000000000000000000000000000000000000000000008b8f4",
|
|
4442
4505
|
* "session": "0x0000000000000000000000000000000000000000000000000000000000000000",
|
|
4443
4506
|
* "callback": "0x0000000000000000000000000000000000000000",
|
|
@@ -4482,8 +4545,8 @@ interface components {
|
|
|
4482
4545
|
obligation_units: string; /** @example 0 */
|
|
4483
4546
|
obligation_shares: string; /** @example 1761922790 */
|
|
4484
4547
|
start: number; /** @example 1761922799 */
|
|
4485
|
-
expiry: number; /** @example
|
|
4486
|
-
|
|
4548
|
+
expiry: number; /** @example 495 */
|
|
4549
|
+
tick: number; /** @example 0x000000000000000000000000000000000000000000000000000000000008b8f4 */
|
|
4487
4550
|
group: string; /** @example 0x0000000000000000000000000000000000000000000000000000000000000000 */
|
|
4488
4551
|
session: string; /** @example 0x0000000000000000000000000000000000000000 */
|
|
4489
4552
|
callback: string; /** @example 0x */
|
|
@@ -4632,6 +4695,7 @@ interface components {
|
|
|
4632
4695
|
* "chain_id": 1,
|
|
4633
4696
|
* "contract": "0xC9A9C45C0eB717f8b5F193Af6bAa05A1c0Ac5078",
|
|
4634
4697
|
* "user": "0x7b093658BE7f90B63D7c359e8f408e503c2D9401",
|
|
4698
|
+
* "obligation_id": "0x12590ae1aee324a005be565f3bcdd16dbf8daf7969b26c181c8b8f467dad9f67",
|
|
4635
4699
|
* "reserved": "200000000000000000000",
|
|
4636
4700
|
* "block_number": 21345678
|
|
4637
4701
|
* }
|
|
@@ -4642,7 +4706,12 @@ interface components {
|
|
|
4642
4706
|
PositionListItemResponse: {
|
|
4643
4707
|
/** @example 1 */chain_id: number; /** @example 0xC9A9C45C0eB717f8b5F193Af6bAa05A1c0Ac5078 */
|
|
4644
4708
|
contract: string; /** @example 0x7b093658BE7f90B63D7c359e8f408e503c2D9401 */
|
|
4645
|
-
user: string;
|
|
4709
|
+
user: string;
|
|
4710
|
+
/**
|
|
4711
|
+
* @description Obligation id this reserved amount belongs to, or null if no lots exist.
|
|
4712
|
+
* @example 0x12590ae1aee324a005be565f3bcdd16dbf8daf7969b26c181c8b8f467dad9f67
|
|
4713
|
+
*/
|
|
4714
|
+
obligation_id: string | null; /** @example 200000000000000000000 */
|
|
4646
4715
|
reserved: string; /** @example 21345678 */
|
|
4647
4716
|
block_number: number;
|
|
4648
4717
|
};
|
|
@@ -4653,8 +4722,8 @@ interface components {
|
|
|
4653
4722
|
/** @example 0x7b093658BE7f90B63D7c359e8f408e503c2D9401 */maker: string; /** @example 369216000000000000000000 */
|
|
4654
4723
|
assets: string; /** @example 0 */
|
|
4655
4724
|
obligation_units?: string; /** @example 0 */
|
|
4656
|
-
obligation_shares?: string; /** @example
|
|
4657
|
-
|
|
4725
|
+
obligation_shares?: string; /** @example 495 */
|
|
4726
|
+
tick: number; /** @example 1761922799 */
|
|
4658
4727
|
maturity: number; /** @example 1761922799 */
|
|
4659
4728
|
expiry: number; /** @example 1761922790 */
|
|
4660
4729
|
start: number; /** @example 0x000000000000000000000000000000000000000000000000000000000008b8f4 */
|
|
@@ -4735,7 +4804,7 @@ type Input = Readonly<{
|
|
|
4735
4804
|
assets: bigint;
|
|
4736
4805
|
obligationUnits: bigint;
|
|
4737
4806
|
obligationShares: bigint;
|
|
4738
|
-
|
|
4807
|
+
tick: number;
|
|
4739
4808
|
maturity: number;
|
|
4740
4809
|
expiry: number;
|
|
4741
4810
|
start: number;
|
|
@@ -4804,6 +4873,7 @@ type PositionResponse = {
|
|
|
4804
4873
|
chain_id: Id;
|
|
4805
4874
|
contract: Address;
|
|
4806
4875
|
user: Address;
|
|
4876
|
+
obligation_id: string | null;
|
|
4807
4877
|
reserved: string;
|
|
4808
4878
|
block_number: number;
|
|
4809
4879
|
};
|
|
@@ -4854,6 +4924,7 @@ declare const schemas: {
|
|
|
4854
4924
|
maturity: "maturity";
|
|
4855
4925
|
callback: "callback";
|
|
4856
4926
|
loan_token: "loan_token";
|
|
4927
|
+
collateral_token: "collateral_token";
|
|
4857
4928
|
}>>>>;
|
|
4858
4929
|
chains: z$1.ZodOptional<z$1.ZodPipe<z$1.ZodTransform<{} | null | undefined, unknown>, z$1.ZodArray<z$1.ZodPipe<z$1.ZodString, z$1.ZodTransform<number, string>>>>>;
|
|
4859
4930
|
}, z$1.core.$strip>;
|
|
@@ -5198,7 +5269,7 @@ declare class HttpGetApiFailedError extends BaseError {
|
|
|
5198
5269
|
}
|
|
5199
5270
|
//#endregion
|
|
5200
5271
|
//#region src/database/drizzle/VERSION.d.ts
|
|
5201
|
-
declare const VERSION: "router_v1.
|
|
5272
|
+
declare const VERSION: "router_v1.8";
|
|
5202
5273
|
//#endregion
|
|
5203
5274
|
//#region src/database/drizzle/schema.d.ts
|
|
5204
5275
|
declare enum EnumTableName {
|
|
@@ -5221,12 +5292,12 @@ declare enum EnumTableName {
|
|
|
5221
5292
|
MERKLE_PATHS = "merkle_paths"
|
|
5222
5293
|
}
|
|
5223
5294
|
declare const TABLE_NAMES: readonly EnumTableName[];
|
|
5224
|
-
declare const VERSIONED_TABLE_NAMES: ("\"router_v1.
|
|
5295
|
+
declare const VERSIONED_TABLE_NAMES: ("\"router_v1.8\".\"obligations\"" | "\"router_v1.8\".\"groups\"" | "\"router_v1.8\".\"consumed_events\"" | "\"router_v1.8\".\"obligation_collaterals_v2\"" | "\"router_v1.8\".\"oracles\"" | "\"router_v1.8\".\"offers\"" | "\"router_v1.8\".\"offers_callbacks\"" | "\"router_v1.8\".\"callbacks\"" | "\"router_v1.8\".\"positions\"" | "\"router_v1.8\".\"transfers\"" | "\"router_v1.8\".\"validations\"" | "\"router_v1.8\".\"collectors\"" | "\"router_v1.8\".\"chains\"" | "\"router_v1.8\".\"lots\"" | "\"router_v1.8\".\"offsets\"" | "\"router_v1.8\".\"trees\"" | "\"router_v1.8\".\"merkle_paths\"")[];
|
|
5225
5296
|
type TableName = (typeof TABLE_NAMES)[number];
|
|
5226
5297
|
type VersionedTableName = `"${typeof VERSION}"."${TableName}"`;
|
|
5227
5298
|
declare const obligations: drizzle_orm_pg_core0.PgTableWithColumns<{
|
|
5228
5299
|
name: EnumTableName.OBLIGATIONS;
|
|
5229
|
-
schema: "router_v1.
|
|
5300
|
+
schema: "router_v1.8";
|
|
5230
5301
|
columns: {
|
|
5231
5302
|
obligationId: drizzle_orm_pg_core0.PgColumn<{
|
|
5232
5303
|
name: "obligation_id";
|
|
@@ -5307,7 +5378,7 @@ declare const obligations: drizzle_orm_pg_core0.PgTableWithColumns<{
|
|
|
5307
5378
|
}>;
|
|
5308
5379
|
declare const groups: drizzle_orm_pg_core0.PgTableWithColumns<{
|
|
5309
5380
|
name: EnumTableName.GROUPS;
|
|
5310
|
-
schema: "router_v1.
|
|
5381
|
+
schema: "router_v1.8";
|
|
5311
5382
|
columns: {
|
|
5312
5383
|
chainId: drizzle_orm_pg_core0.PgColumn<{
|
|
5313
5384
|
name: "chain_id";
|
|
@@ -5422,7 +5493,7 @@ declare const groups: drizzle_orm_pg_core0.PgTableWithColumns<{
|
|
|
5422
5493
|
}>;
|
|
5423
5494
|
declare const consumedEvents: drizzle_orm_pg_core0.PgTableWithColumns<{
|
|
5424
5495
|
name: EnumTableName.CONSUMED_EVENTS;
|
|
5425
|
-
schema: "router_v1.
|
|
5496
|
+
schema: "router_v1.8";
|
|
5426
5497
|
columns: {
|
|
5427
5498
|
eventId: drizzle_orm_pg_core0.PgColumn<{
|
|
5428
5499
|
name: "event_id";
|
|
@@ -5556,7 +5627,7 @@ declare const consumedEvents: drizzle_orm_pg_core0.PgTableWithColumns<{
|
|
|
5556
5627
|
}>;
|
|
5557
5628
|
declare const obligationCollateralsV2: drizzle_orm_pg_core0.PgTableWithColumns<{
|
|
5558
5629
|
name: EnumTableName.OBLIGATION_COLLATERALS_V2;
|
|
5559
|
-
schema: "router_v1.
|
|
5630
|
+
schema: "router_v1.8";
|
|
5560
5631
|
columns: {
|
|
5561
5632
|
obligationId: drizzle_orm_pg_core0.PgColumn<{
|
|
5562
5633
|
name: "obligation_id";
|
|
@@ -5673,7 +5744,7 @@ declare const obligationCollateralsV2: drizzle_orm_pg_core0.PgTableWithColumns<{
|
|
|
5673
5744
|
}>;
|
|
5674
5745
|
declare const oracles: drizzle_orm_pg_core0.PgTableWithColumns<{
|
|
5675
5746
|
name: EnumTableName.ORACLES;
|
|
5676
|
-
schema: "router_v1.
|
|
5747
|
+
schema: "router_v1.8";
|
|
5677
5748
|
columns: {
|
|
5678
5749
|
chainId: drizzle_orm_pg_core0.PgColumn<{
|
|
5679
5750
|
name: "chain_id";
|
|
@@ -5769,7 +5840,7 @@ declare const oracles: drizzle_orm_pg_core0.PgTableWithColumns<{
|
|
|
5769
5840
|
}>;
|
|
5770
5841
|
declare const offers: drizzle_orm_pg_core0.PgTableWithColumns<{
|
|
5771
5842
|
name: EnumTableName.OFFERS;
|
|
5772
|
-
schema: "router_v1.
|
|
5843
|
+
schema: "router_v1.8";
|
|
5773
5844
|
columns: {
|
|
5774
5845
|
hash: drizzle_orm_pg_core0.PgColumn<{
|
|
5775
5846
|
name: "hash";
|
|
@@ -5860,13 +5931,13 @@ declare const offers: drizzle_orm_pg_core0.PgTableWithColumns<{
|
|
|
5860
5931
|
identity: undefined;
|
|
5861
5932
|
generated: undefined;
|
|
5862
5933
|
}, {}, {}>;
|
|
5863
|
-
|
|
5864
|
-
name: "
|
|
5934
|
+
tick: drizzle_orm_pg_core0.PgColumn<{
|
|
5935
|
+
name: "tick";
|
|
5865
5936
|
tableName: EnumTableName.OFFERS;
|
|
5866
|
-
dataType: "
|
|
5867
|
-
columnType: "
|
|
5868
|
-
data:
|
|
5869
|
-
driverParam: string;
|
|
5937
|
+
dataType: "number";
|
|
5938
|
+
columnType: "PgInteger";
|
|
5939
|
+
data: number;
|
|
5940
|
+
driverParam: string | number;
|
|
5870
5941
|
notNull: true;
|
|
5871
5942
|
hasDefault: false;
|
|
5872
5943
|
isPrimaryKey: false;
|
|
@@ -6096,7 +6167,7 @@ declare const offers: drizzle_orm_pg_core0.PgTableWithColumns<{
|
|
|
6096
6167
|
}>;
|
|
6097
6168
|
declare const offersCallbacks: drizzle_orm_pg_core0.PgTableWithColumns<{
|
|
6098
6169
|
name: EnumTableName.OFFERS_CALLBACKS;
|
|
6099
|
-
schema: "router_v1.
|
|
6170
|
+
schema: "router_v1.8";
|
|
6100
6171
|
columns: {
|
|
6101
6172
|
offerHash: drizzle_orm_pg_core0.PgColumn<{
|
|
6102
6173
|
name: "offer_hash";
|
|
@@ -6141,7 +6212,7 @@ declare const offersCallbacks: drizzle_orm_pg_core0.PgTableWithColumns<{
|
|
|
6141
6212
|
}>;
|
|
6142
6213
|
declare const callbacks$1: drizzle_orm_pg_core0.PgTableWithColumns<{
|
|
6143
6214
|
name: EnumTableName.CALLBACKS;
|
|
6144
|
-
schema: "router_v1.
|
|
6215
|
+
schema: "router_v1.8";
|
|
6145
6216
|
columns: {
|
|
6146
6217
|
id: drizzle_orm_pg_core0.PgColumn<{
|
|
6147
6218
|
name: "id";
|
|
@@ -6241,7 +6312,7 @@ declare const callbacks$1: drizzle_orm_pg_core0.PgTableWithColumns<{
|
|
|
6241
6312
|
}>;
|
|
6242
6313
|
declare const lots: drizzle_orm_pg_core0.PgTableWithColumns<{
|
|
6243
6314
|
name: EnumTableName.LOTS;
|
|
6244
|
-
schema: "router_v1.
|
|
6315
|
+
schema: "router_v1.8";
|
|
6245
6316
|
columns: {
|
|
6246
6317
|
chainId: drizzle_orm_pg_core0.PgColumn<{
|
|
6247
6318
|
name: "chain_id";
|
|
@@ -6319,6 +6390,25 @@ declare const lots: drizzle_orm_pg_core0.PgTableWithColumns<{
|
|
|
6319
6390
|
}, {}, {
|
|
6320
6391
|
length: 66;
|
|
6321
6392
|
}>;
|
|
6393
|
+
obligationId: drizzle_orm_pg_core0.PgColumn<{
|
|
6394
|
+
name: "obligation_id";
|
|
6395
|
+
tableName: EnumTableName.LOTS;
|
|
6396
|
+
dataType: "string";
|
|
6397
|
+
columnType: "PgVarchar";
|
|
6398
|
+
data: string;
|
|
6399
|
+
driverParam: string;
|
|
6400
|
+
notNull: true;
|
|
6401
|
+
hasDefault: false;
|
|
6402
|
+
isPrimaryKey: false;
|
|
6403
|
+
isAutoincrement: false;
|
|
6404
|
+
hasRuntimeDefault: false;
|
|
6405
|
+
enumValues: [string, ...string[]];
|
|
6406
|
+
baseColumn: never;
|
|
6407
|
+
identity: undefined;
|
|
6408
|
+
generated: undefined;
|
|
6409
|
+
}, {}, {
|
|
6410
|
+
length: 66;
|
|
6411
|
+
}>;
|
|
6322
6412
|
lower: drizzle_orm_pg_core0.PgColumn<{
|
|
6323
6413
|
name: "lower";
|
|
6324
6414
|
tableName: EnumTableName.LOTS;
|
|
@@ -6358,7 +6448,7 @@ declare const lots: drizzle_orm_pg_core0.PgTableWithColumns<{
|
|
|
6358
6448
|
}>;
|
|
6359
6449
|
declare const offsets: drizzle_orm_pg_core0.PgTableWithColumns<{
|
|
6360
6450
|
name: EnumTableName.OFFSETS;
|
|
6361
|
-
schema: "router_v1.
|
|
6451
|
+
schema: "router_v1.8";
|
|
6362
6452
|
columns: {
|
|
6363
6453
|
chainId: drizzle_orm_pg_core0.PgColumn<{
|
|
6364
6454
|
name: "chain_id";
|
|
@@ -6436,6 +6526,25 @@ declare const offsets: drizzle_orm_pg_core0.PgTableWithColumns<{
|
|
|
6436
6526
|
}, {}, {
|
|
6437
6527
|
length: 66;
|
|
6438
6528
|
}>;
|
|
6529
|
+
obligationId: drizzle_orm_pg_core0.PgColumn<{
|
|
6530
|
+
name: "obligation_id";
|
|
6531
|
+
tableName: EnumTableName.OFFSETS;
|
|
6532
|
+
dataType: "string";
|
|
6533
|
+
columnType: "PgVarchar";
|
|
6534
|
+
data: string;
|
|
6535
|
+
driverParam: string;
|
|
6536
|
+
notNull: true;
|
|
6537
|
+
hasDefault: false;
|
|
6538
|
+
isPrimaryKey: false;
|
|
6539
|
+
isAutoincrement: false;
|
|
6540
|
+
hasRuntimeDefault: false;
|
|
6541
|
+
enumValues: [string, ...string[]];
|
|
6542
|
+
baseColumn: never;
|
|
6543
|
+
identity: undefined;
|
|
6544
|
+
generated: undefined;
|
|
6545
|
+
}, {}, {
|
|
6546
|
+
length: 66;
|
|
6547
|
+
}>;
|
|
6439
6548
|
value: drizzle_orm_pg_core0.PgColumn<{
|
|
6440
6549
|
name: "value";
|
|
6441
6550
|
tableName: EnumTableName.OFFSETS;
|
|
@@ -6459,7 +6568,7 @@ declare const offsets: drizzle_orm_pg_core0.PgTableWithColumns<{
|
|
|
6459
6568
|
declare const PositionTypes: drizzle_orm_pg_core0.PgEnum<[Type, ...Type[]]>;
|
|
6460
6569
|
declare const positionTypes: drizzle_orm_pg_core0.PgTableWithColumns<{
|
|
6461
6570
|
name: "position_types";
|
|
6462
|
-
schema: "router_v1.
|
|
6571
|
+
schema: "router_v1.8";
|
|
6463
6572
|
columns: {
|
|
6464
6573
|
id: drizzle_orm_pg_core0.PgColumn<{
|
|
6465
6574
|
name: "id";
|
|
@@ -6500,7 +6609,7 @@ declare const positionTypes: drizzle_orm_pg_core0.PgTableWithColumns<{
|
|
|
6500
6609
|
}>;
|
|
6501
6610
|
declare const positions: drizzle_orm_pg_core0.PgTableWithColumns<{
|
|
6502
6611
|
name: EnumTableName.POSITIONS;
|
|
6503
|
-
schema: "router_v1.
|
|
6612
|
+
schema: "router_v1.8";
|
|
6504
6613
|
columns: {
|
|
6505
6614
|
chainId: drizzle_orm_pg_core0.PgColumn<{
|
|
6506
6615
|
name: "chain_id";
|
|
@@ -6651,7 +6760,7 @@ declare const positions: drizzle_orm_pg_core0.PgTableWithColumns<{
|
|
|
6651
6760
|
}>;
|
|
6652
6761
|
declare const transfers: drizzle_orm_pg_core0.PgTableWithColumns<{
|
|
6653
6762
|
name: EnumTableName.TRANSFERS;
|
|
6654
|
-
schema: "router_v1.
|
|
6763
|
+
schema: "router_v1.8";
|
|
6655
6764
|
columns: {
|
|
6656
6765
|
eventId: drizzle_orm_pg_core0.PgColumn<{
|
|
6657
6766
|
name: "event_id";
|
|
@@ -6805,7 +6914,7 @@ declare const transfers: drizzle_orm_pg_core0.PgTableWithColumns<{
|
|
|
6805
6914
|
declare const StatusCode: drizzle_orm_pg_core0.PgEnum<[Status, ...Status[]]>;
|
|
6806
6915
|
declare const status: drizzle_orm_pg_core0.PgTableWithColumns<{
|
|
6807
6916
|
name: "status";
|
|
6808
|
-
schema: "router_v1.
|
|
6917
|
+
schema: "router_v1.8";
|
|
6809
6918
|
columns: {
|
|
6810
6919
|
id: drizzle_orm_pg_core0.PgColumn<{
|
|
6811
6920
|
name: "id";
|
|
@@ -6846,7 +6955,7 @@ declare const status: drizzle_orm_pg_core0.PgTableWithColumns<{
|
|
|
6846
6955
|
}>;
|
|
6847
6956
|
declare const validations: drizzle_orm_pg_core0.PgTableWithColumns<{
|
|
6848
6957
|
name: "validations";
|
|
6849
|
-
schema: "router_v1.
|
|
6958
|
+
schema: "router_v1.8";
|
|
6850
6959
|
columns: {
|
|
6851
6960
|
offerHash: drizzle_orm_pg_core0.PgColumn<{
|
|
6852
6961
|
name: "offer_hash";
|
|
@@ -6906,7 +7015,7 @@ declare const validations: drizzle_orm_pg_core0.PgTableWithColumns<{
|
|
|
6906
7015
|
}>;
|
|
6907
7016
|
declare const collectors: drizzle_orm_pg_core0.PgTableWithColumns<{
|
|
6908
7017
|
name: EnumTableName.COLLECTORS;
|
|
6909
|
-
schema: "router_v1.
|
|
7018
|
+
schema: "router_v1.8";
|
|
6910
7019
|
columns: {
|
|
6911
7020
|
chainId: drizzle_orm_pg_core0.PgColumn<{
|
|
6912
7021
|
name: "chain_id";
|
|
@@ -7002,7 +7111,7 @@ declare const collectors: drizzle_orm_pg_core0.PgTableWithColumns<{
|
|
|
7002
7111
|
}>;
|
|
7003
7112
|
declare const chains$1: drizzle_orm_pg_core0.PgTableWithColumns<{
|
|
7004
7113
|
name: EnumTableName.CHAINS;
|
|
7005
|
-
schema: "router_v1.
|
|
7114
|
+
schema: "router_v1.8";
|
|
7006
7115
|
columns: {
|
|
7007
7116
|
chainId: drizzle_orm_pg_core0.PgColumn<{
|
|
7008
7117
|
name: "chain_id";
|
|
@@ -7079,7 +7188,7 @@ declare const chains$1: drizzle_orm_pg_core0.PgTableWithColumns<{
|
|
|
7079
7188
|
}>;
|
|
7080
7189
|
declare const trees: drizzle_orm_pg_core0.PgTableWithColumns<{
|
|
7081
7190
|
name: EnumTableName.TREES;
|
|
7082
|
-
schema: "router_v1.
|
|
7191
|
+
schema: "router_v1.8";
|
|
7083
7192
|
columns: {
|
|
7084
7193
|
root: drizzle_orm_pg_core0.PgColumn<{
|
|
7085
7194
|
name: "root";
|
|
@@ -7141,7 +7250,7 @@ declare const trees: drizzle_orm_pg_core0.PgTableWithColumns<{
|
|
|
7141
7250
|
}>;
|
|
7142
7251
|
declare const merklePaths: drizzle_orm_pg_core0.PgTableWithColumns<{
|
|
7143
7252
|
name: EnumTableName.MERKLE_PATHS;
|
|
7144
|
-
schema: "router_v1.
|
|
7253
|
+
schema: "router_v1.8";
|
|
7145
7254
|
columns: {
|
|
7146
7255
|
offerHash: drizzle_orm_pg_core0.PgColumn<{
|
|
7147
7256
|
name: "offer_hash";
|
|
@@ -7223,9 +7332,9 @@ declare namespace index_d_exports$2 {
|
|
|
7223
7332
|
}
|
|
7224
7333
|
//#endregion
|
|
7225
7334
|
//#region src/gatekeeper/morphoRules.d.ts
|
|
7226
|
-
declare const morphoRules: (chains: Chain$1[]) => (Rule<Offer, "mixed_maker"> | Rule<Offer, "amount_mutual_exclusivity"> | Rule<Offer, "chain_ids"> | Rule<Offer, "maturity"> | Rule<Offer, "callback"> | Rule<Offer, "
|
|
7335
|
+
declare const morphoRules: (chains: Chain$1[]) => (Rule<Offer, "mixed_maker"> | Rule<Offer, "amount_mutual_exclusivity"> | Rule<Offer, "chain_ids"> | Rule<Offer, "maturity"> | Rule<Offer, "callback"> | Rule<Offer, "loan_token"> | Rule<Offer, "collateral_token"> | Rule<Offer, "oracle">)[];
|
|
7227
7336
|
declare namespace Rules_d_exports {
|
|
7228
|
-
export { ValidityParameters, amountMutualExclusivity, callback, chains, maturity, oracle, sameMaker,
|
|
7337
|
+
export { ValidityParameters, amountMutualExclusivity, callback, chains, collateralToken, loanToken, maturity, oracle, sameMaker, validity };
|
|
7229
7338
|
}
|
|
7230
7339
|
type ValidityParameters = {
|
|
7231
7340
|
client: PublicClient<Transport, Chain$1>;
|
|
@@ -7254,15 +7363,25 @@ declare const callback: ({
|
|
|
7254
7363
|
allowedAddresses: Address[];
|
|
7255
7364
|
}) => Rule<Offer, "callback">;
|
|
7256
7365
|
/**
|
|
7257
|
-
* A validation rule that checks if the offer's
|
|
7258
|
-
* @param assetsByChainId - Allowed
|
|
7366
|
+
* A validation rule that checks if the offer's loan token is allowed for its chain.
|
|
7367
|
+
* @param assetsByChainId - Allowed loan tokens indexed by chain id.
|
|
7259
7368
|
* @returns The issue that was found. If the offer is valid, this will be undefined.
|
|
7260
7369
|
*/
|
|
7261
|
-
declare const
|
|
7370
|
+
declare const loanToken: ({
|
|
7262
7371
|
assetsByChainId
|
|
7263
7372
|
}: {
|
|
7264
7373
|
assetsByChainId: Partial<Record<Id, Address[]>>;
|
|
7265
|
-
}) => Rule<Offer, "
|
|
7374
|
+
}) => Rule<Offer, "loan_token">;
|
|
7375
|
+
/**
|
|
7376
|
+
* A validation rule that checks if the offer's collateral tokens are allowed for its chain.
|
|
7377
|
+
* @param collateralAssetsByChainId - Allowed collateral tokens indexed by chain id.
|
|
7378
|
+
* @returns The issue that was found. If the offer is valid, this will be undefined.
|
|
7379
|
+
*/
|
|
7380
|
+
declare const collateralToken: ({
|
|
7381
|
+
collateralAssetsByChainId
|
|
7382
|
+
}: {
|
|
7383
|
+
collateralAssetsByChainId: Partial<Record<Id, Address[]>>;
|
|
7384
|
+
}) => Rule<Offer, "collateral_token">;
|
|
7266
7385
|
/**
|
|
7267
7386
|
* A validation rule that checks if the offer's oracle addresses are allowed for its chain.
|
|
7268
7387
|
* @param oraclesByChainId - Allowed oracles indexed by chain id.
|
|
@@ -7519,5 +7638,5 @@ declare namespace index_d_exports$3 {
|
|
|
7519
7638
|
export { BaseError, GlobalErrorType, Group_d_exports as Group, Random_d_exports as Random, ReorgError, Snake, time_d_exports as Time, atMostOneNonZero, batch, batchMulticall, fromSnakeCase$3 as fromSnakeCase, lazy, max$1 as max, min, poll, retry, stringifyBigint, toSnakeCase$1 as toSnakeCase, wait };
|
|
7520
7639
|
}
|
|
7521
7640
|
//#endregion
|
|
7522
|
-
export { index_d_exports as Abi, BookResponse_d_exports as BookResponse, BooksController, Brand, BrandTypeId, Callback_d_exports as Callback, Chain_d_exports as Chain, ChainHealth, ChainRegistry_d_exports as ChainRegistry, ChainsHealthResponse, Collateral_d_exports as Collateral, CollectorHealth, CollectorsHealthResponse, Compute, ConfigContractsController, ConfigRule, ConfigRulesController, ConfigRulesPayload, Database_d_exports as Database, ERC4626_d_exports as ERC4626, ErrorPayload, Errors_d_exports as Errors, Format_d_exports as Format, Gatekeeper_d_exports as Gatekeeper, Client_d_exports as GatekeeperClient, Health_d_exports as Health, HealthController, Indexer_d_exports as Indexer, LLTV_d_exports as LLTV, Liquidity_d_exports as Liquidity, Logger_d_exports as Logger, Maturity_d_exports as Maturity, index_d_exports$1 as Mempool, Obligation_d_exports as Obligation, ObligationResponse_d_exports as ObligationResponse, ObligationsController, Offer_d_exports as Offer, OfferResponse_d_exports as OfferResponse, OffersController, index_d_exports$2 as OffersSchema, OpenApi, Oracle_d_exports as Oracle, Position_d_exports as Position, PositionResponse_d_exports as PositionResponse, Quote_d_exports as Quote, RouterApi_d_exports as RouterApi, Client_d_exports$1 as RouterClient, RouterStatusResponse, Rules_d_exports as Rules, SuccessPayload, time_d_exports as Time, TradingFee_d_exports as TradingFee, Transfer_d_exports as Transfer, Tree_d_exports as Tree, UsersController, index_d_exports$3 as Utils, ValidateController, ValidateOffersData, ValidateOffersIssues, ValidateOffersSuccess, Gate_d_exports as Validation, ValidationIssue, morphoRules, parse, safeParse };
|
|
7641
|
+
export { index_d_exports as Abi, BookResponse_d_exports as BookResponse, BooksController, Brand, BrandTypeId, Callback_d_exports as Callback, Chain_d_exports as Chain, ChainHealth, ChainRegistry_d_exports as ChainRegistry, ChainsHealthResponse, Collateral_d_exports as Collateral, CollectorHealth, CollectorsHealthResponse, Compute, ConfigContractsController, ConfigRule, ConfigRulesController, ConfigRulesPayload, Database_d_exports as Database, ERC4626_d_exports as ERC4626, ErrorPayload, Errors_d_exports as Errors, Format_d_exports as Format, Gatekeeper_d_exports as Gatekeeper, Client_d_exports as GatekeeperClient, Health_d_exports as Health, HealthController, Indexer_d_exports as Indexer, LLTV_d_exports as LLTV, Liquidity_d_exports as Liquidity, Logger_d_exports as Logger, Maturity_d_exports as Maturity, index_d_exports$1 as Mempool, Obligation_d_exports as Obligation, ObligationResponse_d_exports as ObligationResponse, ObligationsController, Offer_d_exports as Offer, OfferResponse_d_exports as OfferResponse, OffersController, index_d_exports$2 as OffersSchema, OpenApi, Oracle_d_exports as Oracle, Position_d_exports as Position, PositionResponse_d_exports as PositionResponse, Quote_d_exports as Quote, RouterApi_d_exports as RouterApi, Client_d_exports$1 as RouterClient, RouterStatusResponse, Rules_d_exports as Rules, SuccessPayload, Tick_d_exports as Tick, time_d_exports as Time, TradingFee_d_exports as TradingFee, Transfer_d_exports as Transfer, Tree_d_exports as Tree, UsersController, index_d_exports$3 as Utils, ValidateController, ValidateOffersData, ValidateOffersIssues, ValidateOffersSuccess, Gate_d_exports as Validation, ValidationIssue, morphoRules, parse, safeParse };
|
|
7523
7642
|
//# sourceMappingURL=index.node.d.mts.map
|