@win-trader/bindings 0.0.1 → 0.0.3

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.
@@ -29,61 +29,29 @@ export declare const VaultError: {
29
29
  8: {
30
30
  message: string;
31
31
  };
32
- /**
33
- * Reservation would exceed total vault assets.
34
- */
35
32
  9: {
36
33
  message: string;
37
34
  };
38
35
  /**
39
- * claim_fees_to amount exceeds available unclaimed fees.
36
+ * `upgrade` called with no pending proposal.
40
37
  */
41
38
  10: {
42
39
  message: string;
43
40
  };
44
41
  /**
45
- * `record_absorbed_collateral` saw a vault balance delta that differs from
46
- * the supplied `amount` — PM and Vault disagree on what actually moved.
47
- */
48
- 12: {
49
- message: string;
50
- };
51
- /**
52
- * `deposit`/`mint` only accept self-deposits: receiver, from, and operator
53
- * must all match.
42
+ * `upgrade` called before the proposal's timelock eta.
54
43
  */
55
- 13: {
44
+ 11: {
56
45
  message: string;
57
46
  };
58
47
  /**
59
- * `upgrade` rejected — no `propose_upgrade` was made before commit.
48
+ * `upgrade` called with a hash that differs from the proposal.
60
49
  */
61
- 14: {
62
- message: string;
63
- };
64
- /**
65
- * `upgrade` rejected — timelock has not elapsed yet.
66
- */
67
- 15: {
68
- message: string;
69
- };
70
- /**
71
- * `upgrade` rejected — `new_wasm_hash` does not match the proposed
72
- * `PendingUpgrade.wasm_hash`.
73
- */
74
- 16: {
75
- message: string;
76
- };
77
- /**
78
- * `withdraw`/`redeem` rejected — positions are open and the PM-synced
79
- * `NetGlobalTraderPnl` is older than `PNL_SYNC_MAX_AGE_SECS`, so
80
- * `free_liquidity` cannot be trusted to cover open trader profits.
81
- */
82
- 17: {
50
+ 12: {
83
51
  message: string;
84
52
  };
85
53
  };
86
- export type VaultDataKey = {
54
+ export type Key = {
87
55
  tag: "Initialized";
88
56
  values: void;
89
57
  } | {
@@ -93,26 +61,17 @@ export type VaultDataKey = {
93
61
  tag: "PositionManager";
94
62
  values: void;
95
63
  } | {
96
- tag: "ReservedUsdc";
64
+ tag: "RequestRouter";
97
65
  values: void;
98
66
  } | {
99
- tag: "UnclaimedFees";
67
+ tag: "LpConfig";
100
68
  values: void;
101
69
  } | {
102
- tag: "NetGlobalTraderPnl";
103
- values: void;
104
- } | {
105
- tag: "LastPnlSyncTime";
106
- values: void;
107
- } | {
108
- tag: "IsPaused";
70
+ tag: "Paused";
109
71
  values: void;
110
72
  } | {
111
73
  tag: "Version";
112
74
  values: void;
113
- } | {
114
- tag: "LockupExpiresAt";
115
- values: readonly [string];
116
75
  };
117
76
  export interface OwnerTokensKey {
118
77
  index: u32;
@@ -1187,105 +1146,210 @@ export interface AllowanceData {
1187
1146
  live_until_ledger: u32;
1188
1147
  }
1189
1148
  /**
1190
- * Represents a single trader's open leveraged position.
1149
+ * Authoritative per-market state: the side aggregates, the funding indices,
1150
+ * the current funding flows, and the market configuration.
1151
+ *
1152
+ * Soroban limits UDT field names to 30 characters, so where a doc glossary
1153
+ * term is longer the field drops the redundant qualifier and its doc
1154
+ * comment carries the full term (e.g. `receiver_backed_index_long` is the
1155
+ * doc's `receiver_backed_payer_index` for the long side).
1191
1156
  */
1192
- export interface Position {
1193
- /**
1194
- * USDC collateral deposited by the trader.
1195
- */
1196
- collateral: i128;
1197
- /**
1198
- * Global borrow accumulator index at position open (for lazy fee calc).
1199
- */
1200
- entry_borrow_index: i128;
1157
+ export interface Market {
1158
+ config: MarketConfig;
1201
1159
  /**
1202
- * Global funding accumulator index at position open (for lazy fee calc).
1160
+ * `INDEX_PRECISION`-scaled bps/day payer rate for the current interval.
1203
1161
  */
1204
- entry_funding_index: i128;
1162
+ current_payer_rate: i128;
1163
+ current_payer_side: PayerSide;
1164
+ last_funding_checkpoint: u64;
1165
+ long: MarketSide;
1205
1166
  /**
1206
- * Oracle price at the time the position was opened (scaled by 1e7).
1167
+ * Cumulative payer fee per unit of dominant-side size that is LP
1168
+ * revenue on collection (§8.2).
1207
1169
  */
1208
- entry_price: i128;
1170
+ lp_backed_index_long: i128;
1171
+ lp_backed_index_short: i128;
1209
1172
  /**
1210
- * Flat USDC fee escrowed when TP or SL is set. Paid to executor on trigger, refunded on user close / ADL, forfeited to revenue on liquidation.
1173
+ * LP-allocated remainder of the payer flow, cash/second at
1174
+ * `INDEX_PRECISION` (§8.1).
1211
1175
  */
1212
- execution_fee_escrow: i128;
1176
+ lp_flow_per_second: i128;
1177
+ lp_payer_remainder: i128;
1213
1178
  /**
1214
- * True for a long position, false for a short.
1179
+ * Cumulative payer fee per unit of dominant-side size whose collection
1180
+ * restores cash backing an already-accrued receiver claim (§8.2).
1215
1181
  */
1216
- is_long: boolean;
1182
+ receiver_backed_index_long: i128;
1183
+ receiver_backed_index_short: i128;
1217
1184
  /**
1218
- * Block timestamp when the position was last increased (anti-front-running lock).
1185
+ * Receiver-allocated share of the payer flow, cash/second at
1186
+ * `INDEX_PRECISION` (§8.1).
1219
1187
  */
1220
- last_increased_time: u64;
1188
+ receiver_flow_per_second: i128;
1189
+ receiver_flow_remainder: i128;
1221
1190
  /**
1222
- * Notional size of the position in USDC.
1191
+ * Cumulative funding credit per unit of light-side size (§8.2).
1223
1192
  */
1224
- size: i128;
1225
- /**
1226
- * Stop-loss price (scaled by 1e7). 0 = not set.
1227
- */
1228
- stop_loss: i128;
1229
- /**
1230
- * Take-profit price (scaled by 1e7). 0 = not set.
1231
- */
1232
- take_profit: i128;
1193
+ receiver_index_long: i128;
1194
+ receiver_index_remainder: i128;
1195
+ receiver_index_short: i128;
1196
+ receiver_payer_remainder: i128;
1197
+ short: MarketSide;
1198
+ }
1199
+ export interface LpConfig {
1200
+ lp_request_delay: u64;
1201
+ max_withdraw_utilization_bps: u32;
1202
+ min_deposit_nav_factor_bps: u32;
1233
1203
  }
1234
1204
  /**
1235
- * Global market state for a single tradeable asset symbol.
1205
+ * Represents a single trader's open leveraged position.
1236
1206
  */
1237
- export interface MarketInfo {
1207
+ export interface Position {
1238
1208
  /**
1239
- * Cumulative borrow fee index (grows monotonically with time).
1209
+ * Asset units at `PRICE_PRECISION`.
1240
1210
  */
1241
- acc_borrow_index: i128;
1211
+ base_exposure: i128;
1212
+ borrow_debt: i128;
1242
1213
  /**
1243
- * Cumulative funding rate index (signed; positive = longs pay shorts).
1214
+ * Cash owned by an optional-order executor.
1244
1215
  */
1245
- acc_funding_index: i128;
1216
+ execution_budget: i128;
1217
+ funding_paid_to_lps_debt: i128;
1218
+ funding_paid_to_receivers_debt: i128;
1219
+ funding_received_debt: i128;
1220
+ id: u64;
1221
+ is_long: boolean;
1222
+ last_increased_time: u64;
1223
+ market: string;
1224
+ owner: string;
1246
1225
  /**
1247
- * Volume-weighted average entry price of all active long positions.
1226
+ * Fixed gross capacity assigned when risk opens.
1248
1227
  */
1249
- global_long_avg_price: i128;
1228
+ risk_units: i128;
1250
1229
  /**
1251
- * Volume-weighted average entry price of all active short positions.
1230
+ * USD notional at `PRICE_PRECISION`.
1252
1231
  */
1253
- global_short_avg_price: i128;
1232
+ size: i128;
1254
1233
  /**
1255
- * Timestamp of the last keeper index update.
1234
+ * Trigger price for the optional stop-loss order; `0` = none.
1256
1235
  */
1257
- last_index_update: u64;
1236
+ stop_loss: i128;
1258
1237
  /**
1259
- * Total notional size of all open long positions.
1238
+ * Trader-owned collateral recorded in contract state (the doc's
1239
+ * "stored collateral"). Effective collateral — stored collateral after
1240
+ * pending fees and funding credits — is always derived, never stored.
1260
1241
  */
1261
- long_open_interest: i128;
1242
+ stored_collateral: i128;
1262
1243
  /**
1263
- * Total notional size of all open short positions.
1244
+ * Trigger price for the optional take-profit order; `0` = none.
1264
1245
  */
1265
- short_open_interest: i128;
1246
+ take_profit: i128;
1247
+ }
1248
+ export interface LpRequest {
1249
+ amount: i128;
1250
+ execute_after: u64;
1251
+ id: u64;
1252
+ kind: LpRequestKind;
1253
+ owner: string;
1254
+ request_time: u64;
1255
+ status: LpRequestStatus;
1256
+ }
1257
+ /**
1258
+ * Which side currently pays funding (§8.1: the side with more base
1259
+ * exposure). `None` when the market is balanced or empty.
1260
+ */
1261
+ export type PayerSide = {
1262
+ tag: "None";
1263
+ values: void;
1264
+ } | {
1265
+ tag: "Long";
1266
+ values: void;
1267
+ } | {
1268
+ tag: "Short";
1269
+ values: void;
1270
+ };
1271
+ export type RiskState = {
1272
+ tag: "Normal";
1273
+ values: void;
1274
+ } | {
1275
+ tag: "Warning";
1276
+ values: void;
1277
+ } | {
1278
+ tag: "Adl";
1279
+ values: void;
1280
+ } | {
1281
+ tag: "HardCap";
1282
+ values: void;
1283
+ };
1284
+ export interface MarketSide {
1285
+ base_exposure: i128;
1286
+ risk_state: RiskState;
1287
+ risk_units: i128;
1288
+ size_open_interest: i128;
1289
+ stored_collateral_total: i128;
1290
+ }
1291
+ export interface RoundPrice {
1292
+ price: i128;
1293
+ symbol: string;
1294
+ }
1295
+ export interface OracleRound {
1296
+ id: u64;
1297
+ previous_id: u64;
1298
+ previous_timestamp: u64;
1299
+ prices: Array<RoundPrice>;
1300
+ timestamp: u64;
1301
+ }
1302
+ export interface GlobalConfig {
1303
+ base_borrow_rate_bps_day: i128;
1304
+ hard_cap_factor_limit_bps: u32;
1305
+ lp_revenue_share_bps: u32;
1306
+ max_active_markets: u32;
1307
+ max_adl_reward: i128;
1308
+ max_insolvent_touch_reward: i128;
1309
+ max_variable_borrow_bps_day: i128;
1310
+ min_collateral: i128;
1311
+ min_position_lifetime: u64;
1312
+ risk_capacity_limit_bps: u32;
1313
+ risk_keeper_revenue_share_bps: u32;
1314
+ }
1315
+ export interface MarketConfig {
1316
+ adl_pnl_factor_bps: u32;
1317
+ adl_reward_bps: u32;
1318
+ hard_cap_pnl_factor_bps: u32;
1319
+ liquidation_reward_bps: u32;
1320
+ maintenance_margin_bps: u32;
1321
+ market_risk_factor_bps: u32;
1322
+ max_funding_rate_bps_day: i128;
1323
+ max_long_base_exposure: i128;
1324
+ max_long_size_open_interest: i128;
1325
+ max_short_base_exposure: i128;
1326
+ max_short_size_open_interest: i128;
1327
+ open_fee_high_bps: u32;
1328
+ open_fee_low_bps: u32;
1329
+ recovery_pnl_factor_bps: u32;
1330
+ warning_pnl_factor_bps: u32;
1266
1331
  }
1267
1332
  /**
1268
1333
  * Global safety thresholds for price validation.
1269
1334
  */
1270
1335
  export interface OracleConfig {
1271
1336
  /**
1272
- * How long a cached aggregated price remains valid (in seconds). A
1273
- * `get_price` call within this window of the last fetch returns the
1274
- * cached value without re-querying sources. Must be > 0 and
1275
- * <= `staleness_threshold` (otherwise the cache could outlive a fresh
1276
- * source price and serve stale data).
1337
+ * How long a cached aggregated price remains valid after the router
1338
+ * fetch (in seconds). A cache hit also requires every source timestamp
1339
+ * used for the cached median to remain within `staleness_threshold`.
1340
+ * Must be > 0 and <= `staleness_threshold`.
1277
1341
  */
1278
1342
  cache_duration: u64;
1279
1343
  /**
1280
1344
  * Maximum allowed spread between oracle sources in basis points
1281
- * (e.g., 100 = 1%). Bounded at `shared::constants::MAX_DEVIATION_BPS_CEILING`.
1345
+ * (e.g., 100 = 1%). Bounded at `crate::constants::MAX_DEVIATION_BPS_CEILING`.
1282
1346
  */
1283
1347
  max_deviation_bps: i128;
1284
1348
  /**
1285
1349
  * Minimum number of source responses that must agree within
1286
1350
  * `max_deviation_bps` for OracleRouter to return a price. Floored at
1287
- * `shared::constants::MIN_REQUIRED_SOURCES_FLOOR`, ceilinged at
1288
- * `shared::constants::MAX_ORACLE_SOURCES`.
1351
+ * `crate::constants::MIN_REQUIRED_SOURCES_FLOOR`, ceilinged at
1352
+ * `crate::constants::MAX_ORACLE_SOURCES`.
1289
1353
  */
1290
1354
  min_required_sources: u32;
1291
1355
  /**
@@ -1294,6 +1358,13 @@ export interface OracleConfig {
1294
1358
  */
1295
1359
  staleness_threshold: u64;
1296
1360
  }
1361
+ export type LpRequestKind = {
1362
+ tag: "Deposit";
1363
+ values: void;
1364
+ } | {
1365
+ tag: "Withdrawal";
1366
+ values: void;
1367
+ };
1297
1368
  /**
1298
1369
  * Data required during a WASM migration. Single definition for all contracts.
1299
1370
  */
@@ -1303,15 +1374,54 @@ export interface MigrationData {
1303
1374
  /**
1304
1375
  * Pending WASM upgrade — set by `propose_upgrade`, consumed by `upgrade`
1305
1376
  * (cleared atomically on a successful install), or cleared by `cancel_upgrade`.
1306
- * Single shape across every protocol contract; all four contracts store it at
1377
+ * Single shape across every protocol contract. Contracts store it at
1307
1378
  * the shared `pending_upgrade` Symbol key in their own instance storage (see
1308
- * `interfaces::upgrade::pending_upgrade_key`). `upgrade` refuses to install
1379
+ * `crate::upgrade::pending_upgrade_key`). `upgrade` refuses to install
1309
1380
  * unless `pending.wasm_hash` matches the supplied hash and `now >= eta`.
1310
1381
  */
1311
1382
  export interface PendingUpgrade {
1312
1383
  eta: u64;
1313
1384
  wasm_hash: Buffer;
1314
1385
  }
1386
+ export type LpRequestStatus = {
1387
+ tag: "Pending";
1388
+ values: void;
1389
+ } | {
1390
+ tag: "Settled";
1391
+ values: void;
1392
+ } | {
1393
+ tag: "Failed";
1394
+ values: void;
1395
+ } | {
1396
+ tag: "Expired";
1397
+ values: void;
1398
+ };
1399
+ export interface SettlementResult {
1400
+ /**
1401
+ * Shares minted for a deposit or assets paid for a withdrawal.
1402
+ */
1403
+ amount: i128;
1404
+ status: SettlementStatus;
1405
+ }
1406
+ export type SettlementStatus = {
1407
+ tag: "Settled";
1408
+ values: void;
1409
+ } | {
1410
+ tag: "Failed";
1411
+ values: void;
1412
+ };
1413
+ export interface AccountingSnapshot {
1414
+ cash_lp_equity: i128;
1415
+ cash_shortfall: i128;
1416
+ free_lp_capital: i128;
1417
+ lp_blocked_side_count: u32;
1418
+ non_lp_claims: i128;
1419
+ open_position_count: u64;
1420
+ physical_cash: i128;
1421
+ required_risk_backing: i128;
1422
+ total_risk_units: i128;
1423
+ vault_nav: i128;
1424
+ }
1315
1425
  export declare const UpgradeableError: {
1316
1426
  /**
1317
1427
  * When migration is attempted but not allowed due to upgrade state.
@@ -1418,58 +1528,7 @@ export type PausableStorageKey = {
1418
1528
  tag: "Paused";
1419
1529
  values: void;
1420
1530
  };
1421
- /**
1422
- * Execution-bounty and open-fee parameters charged to traders.
1423
- * `open_fee_bps` and `liquidation_bounty_bps` are in basis points;
1424
- * `tp_sl_execution_fee` is a flat USDC amount at PRECISION scale.
1425
- */
1426
- export interface FeeConfig {
1427
- liquidation_bounty_bps: u32;
1428
- open_fee_bps: u32;
1429
- tp_sl_execution_fee: i128;
1430
- }
1431
- /**
1432
- * Defines how protocol revenue is split between parties.
1433
- * All values are in basis points (bps). Must sum to 10_000.
1434
- */
1435
- export interface FeeSplits {
1436
- dev_bps: u32;
1437
- lp_bps: u32;
1438
- staker_bps: u32;
1439
- }
1440
- /**
1441
- * Global protocol risk and timing parameters.
1442
- */
1443
- export interface ProtocolLimits {
1444
- adl_pnl_bps: u32;
1445
- adl_utilization_bps: u32;
1446
- cooldown_duration: u64;
1447
- funding_cut_bps: u32;
1448
- liquidation_threshold_bps: u32;
1449
- max_utilization_ratio: i128;
1450
- min_collateral: i128;
1451
- min_position_lifetime: u64;
1452
- }
1453
- /**
1454
- * Borrow rate kink curve and funding rate parameters (all in basis points).
1455
- */
1456
- export interface BorrowRateConfig {
1457
- base_borrow_rate_bps: i128;
1458
- base_funding_rate_bps: i128;
1459
- optimal_utilization_bps: i128;
1460
- slope1_bps: i128;
1461
- slope2_bps: i128;
1462
- }
1463
1531
  export interface Client {
1464
- /**
1465
- * Construct and simulate a mint transaction. Returns an `AssembledTransaction` object which will have a `result` field containing the result of the simulation. If this transaction changes contract state, you will need to call `signAndSend()` on the returned object.
1466
- */
1467
- mint: ({ shares, receiver, from, operator }: {
1468
- shares: i128;
1469
- receiver: string;
1470
- from: string;
1471
- operator: string;
1472
- }, options?: MethodOptions) => Promise<AssembledTransaction<i128>>;
1473
1532
  /**
1474
1533
  * Construct and simulate a name transaction. Returns an `AssembledTransaction` object which will have a `result` field containing the result of the simulation. If this transaction changes contract state, you will need to call `signAndSend()` on the returned object.
1475
1534
  * Returns the name for this token.
@@ -1485,15 +1544,6 @@ export interface Client {
1485
1544
  pause: ({ caller }: {
1486
1545
  caller: string;
1487
1546
  }, options?: MethodOptions) => Promise<AssembledTransaction<null>>;
1488
- /**
1489
- * Construct and simulate a redeem transaction. Returns an `AssembledTransaction` object which will have a `result` field containing the result of the simulation. If this transaction changes contract state, you will need to call `signAndSend()` on the returned object.
1490
- */
1491
- redeem: ({ shares, receiver, owner, operator }: {
1492
- shares: i128;
1493
- receiver: string;
1494
- owner: string;
1495
- operator: string;
1496
- }, options?: MethodOptions) => Promise<AssembledTransaction<i128>>;
1497
1547
  /**
1498
1548
  * Construct and simulate a symbol transaction. Returns an `AssembledTransaction` object which will have a `result` field containing the result of the simulation. If this transaction changes contract state, you will need to call `signAndSend()` on the returned object.
1499
1549
  * Returns the symbol for this token.
@@ -1548,20 +1598,11 @@ export interface Client {
1548
1598
  balance: ({ account }: {
1549
1599
  account: string;
1550
1600
  }, options?: MethodOptions) => Promise<AssembledTransaction<i128>>;
1551
- /**
1552
- * Construct and simulate a deposit transaction. Returns an `AssembledTransaction` object which will have a `result` field containing the result of the simulation. If this transaction changes contract state, you will need to call `signAndSend()` on the returned object.
1553
- */
1554
- deposit: ({ assets, receiver, from, operator }: {
1555
- assets: i128;
1556
- receiver: string;
1557
- from: string;
1558
- operator: string;
1559
- }, options?: MethodOptions) => Promise<AssembledTransaction<i128>>;
1560
1601
  /**
1561
1602
  * Construct and simulate a migrate transaction. Returns an `AssembledTransaction` object which will have a `result` field containing the result of the simulation. If this transaction changes contract state, you will need to call `signAndSend()` on the returned object.
1562
1603
  */
1563
- migrate: ({ migration_data, operator }: {
1564
- migration_data: MigrationData;
1604
+ migrate: ({ data, operator }: {
1605
+ data: MigrationData;
1565
1606
  operator: string;
1566
1607
  }, options?: MethodOptions) => Promise<AssembledTransaction<null>>;
1567
1608
  /**
@@ -1581,34 +1622,14 @@ export interface Client {
1581
1622
  * Construct and simulate a decimals transaction. Returns an `AssembledTransaction` object which will have a `result` field containing the result of the simulation. If this transaction changes contract state, you will need to call `signAndSend()` on the returned object.
1582
1623
  */
1583
1624
  decimals: (options?: MethodOptions) => Promise<AssembledTransaction<u32>>;
1584
- /**
1585
- * Construct and simulate a max_mint transaction. Returns an `AssembledTransaction` object which will have a `result` field containing the result of the simulation. If this transaction changes contract state, you will need to call `signAndSend()` on the returned object.
1586
- */
1587
- max_mint: ({ receiver }: {
1588
- receiver: string;
1589
- }, options?: MethodOptions) => Promise<AssembledTransaction<i128>>;
1590
1625
  /**
1591
1626
  * Construct and simulate a transfer transaction. Returns an `AssembledTransaction` object which will have a `result` field containing the result of the simulation. If this transaction changes contract state, you will need to call `signAndSend()` on the returned object.
1592
- * Override to propagate the sender's remaining lockup onto a recipient
1593
- * who held no shares before the transfer. Without this, an LP could
1594
- * circumvent the cooldown by transferring LP shares to a fresh address
1595
- * that then withdraws. Recipients with an existing balance keep their
1596
- * own expiry — see `propagate_lockup_on_transfer`.
1597
1627
  */
1598
1628
  transfer: ({ from, to, amount }: {
1599
1629
  from: string;
1600
1630
  to: string;
1601
1631
  amount: i128;
1602
1632
  }, options?: MethodOptions) => Promise<AssembledTransaction<null>>;
1603
- /**
1604
- * Construct and simulate a withdraw transaction. Returns an `AssembledTransaction` object which will have a `result` field containing the result of the simulation. If this transaction changes contract state, you will need to call `signAndSend()` on the returned object.
1605
- */
1606
- withdraw: ({ assets, receiver, owner, operator }: {
1607
- assets: i128;
1608
- receiver: string;
1609
- owner: string;
1610
- operator: string;
1611
- }, options?: MethodOptions) => Promise<AssembledTransaction<i128>>;
1612
1633
  /**
1613
1634
  * Construct and simulate a allowance transaction. Returns an `AssembledTransaction` object which will have a `result` field containing the result of the simulation. If this transaction changes contract state, you will need to call `signAndSend()` on the returned object.
1614
1635
  * Returns the amount of tokens a `spender` is allowed to spend on behalf
@@ -1624,74 +1645,10 @@ export interface Client {
1624
1645
  owner: string;
1625
1646
  spender: string;
1626
1647
  }, options?: MethodOptions) => Promise<AssembledTransaction<i128>>;
1627
- /**
1628
- * Construct and simulate a claim_fees transaction. Returns an `AssembledTransaction` object which will have a `result` field containing the result of the simulation. If this transaction changes contract state, you will need to call `signAndSend()` on the returned object.
1629
- */
1630
- claim_fees: ({ caller, recipient }: {
1631
- caller: string;
1632
- recipient: string;
1633
- }, options?: MethodOptions) => Promise<AssembledTransaction<null>>;
1634
- /**
1635
- * Construct and simulate a max_redeem transaction. Returns an `AssembledTransaction` object which will have a `result` field containing the result of the simulation. If this transaction changes contract state, you will need to call `signAndSend()` on the returned object.
1636
- */
1637
- max_redeem: ({ owner }: {
1638
- owner: string;
1639
- }, options?: MethodOptions) => Promise<AssembledTransaction<i128>>;
1640
- /**
1641
- * Construct and simulate a pay_profit transaction. Returns an `AssembledTransaction` object which will have a `result` field containing the result of the simulation. If this transaction changes contract state, you will need to call `signAndSend()` on the returned object.
1642
- * Pay `amount` from the vault to `trader` to settle a profitable close.
1643
- * Loss settlement does NOT route through here — see ADR-0001.
1644
- */
1645
- pay_profit: ({ caller, trader, amount }: {
1646
- caller: string;
1647
- trader: string;
1648
- amount: i128;
1649
- }, options?: MethodOptions) => Promise<AssembledTransaction<null>>;
1650
- /**
1651
- * Construct and simulate a accrue_fees transaction. Returns an `AssembledTransaction` object which will have a `result` field containing the result of the simulation. If this transaction changes contract state, you will need to call `signAndSend()` on the returned object.
1652
- * Books PM-pushed revenue into `unclaimed_fees`, clamped so
1653
- * `unclaimed_fees + reserved_usdc` never exceeds `total_assets` — fee
1654
- * claims can only ever be tagged against capital the vault holds. A
1655
- * clamped accrual emits `FeeAccrualClamped` for monitoring instead of
1656
- * reverting: this runs inside PM's close/liquidation paths, which must
1657
- * never fail on fee bookkeeping.
1658
- *
1659
- * Emits `TotalAssetsUpdate` alongside `AccrueFees`. PM's `recv_revenue`
1660
- * pushes fee USDC into the vault via a raw token transfer immediately
1661
- * before this call, and no other vault entrypoint witnesses that
1662
- * transfer — without the snapshot, off-chain indexers would lose the
1663
- * LP slice (`fee - non_lp_slice`) on every accrual.
1664
- */
1665
- accrue_fees: ({ caller, amount }: {
1666
- caller: string;
1667
- amount: i128;
1668
- }, options?: MethodOptions) => Promise<AssembledTransaction<null>>;
1669
- /**
1670
- * Construct and simulate a max_deposit transaction. Returns an `AssembledTransaction` object which will have a `result` field containing the result of the simulation. If this transaction changes contract state, you will need to call `signAndSend()` on the returned object.
1671
- */
1672
- max_deposit: ({ receiver }: {
1673
- receiver: string;
1674
- }, options?: MethodOptions) => Promise<AssembledTransaction<i128>>;
1675
1648
  /**
1676
1649
  * Construct and simulate a query_asset transaction. Returns an `AssembledTransaction` object which will have a `result` field containing the result of the simulation. If this transaction changes contract state, you will need to call `signAndSend()` on the returned object.
1677
1650
  */
1678
1651
  query_asset: (options?: MethodOptions) => Promise<AssembledTransaction<string>>;
1679
- /**
1680
- * Construct and simulate a max_withdraw transaction. Returns an `AssembledTransaction` object which will have a `result` field containing the result of the simulation. If this transaction changes contract state, you will need to call `signAndSend()` on the returned object.
1681
- */
1682
- max_withdraw: ({ owner }: {
1683
- owner: string;
1684
- }, options?: MethodOptions) => Promise<AssembledTransaction<i128>>;
1685
- /**
1686
- * Construct and simulate a preview_mint transaction. Returns an `AssembledTransaction` object which will have a `result` field containing the result of the simulation. If this transaction changes contract state, you will need to call `signAndSend()` on the returned object.
1687
- */
1688
- preview_mint: ({ shares }: {
1689
- shares: i128;
1690
- }, options?: MethodOptions) => Promise<AssembledTransaction<i128>>;
1691
- /**
1692
- * Construct and simulate a total_assets transaction. Returns an `AssembledTransaction` object which will have a `result` field containing the result of the simulation. If this transaction changes contract state, you will need to call `signAndSend()` on the returned object.
1693
- */
1694
- total_assets: (options?: MethodOptions) => Promise<AssembledTransaction<i128>>;
1695
1652
  /**
1696
1653
  * Construct and simulate a total_supply transaction. Returns an `AssembledTransaction` object which will have a `result` field containing the result of the simulation. If this transaction changes contract state, you will need to call `signAndSend()` on the returned object.
1697
1654
  * Returns the total amount of tokens in circulation.
@@ -1702,20 +1659,22 @@ export interface Client {
1702
1659
  */
1703
1660
  total_supply: (options?: MethodOptions) => Promise<AssembledTransaction<i128>>;
1704
1661
  /**
1705
- * Construct and simulate a claim_fees_to transaction. Returns an `AssembledTransaction` object which will have a `result` field containing the result of the simulation. If this transaction changes contract state, you will need to call `signAndSend()` on the returned object.
1662
+ * Construct and simulate a get_lp_config transaction. Returns an `AssembledTransaction` object which will have a `result` field containing the result of the simulation. If this transaction changes contract state, you will need to call `signAndSend()` on the returned object.
1706
1663
  */
1707
- claim_fees_to: ({ caller, recipient, amount }: {
1708
- caller: string;
1709
- recipient: string;
1710
- amount: i128;
1711
- }, options?: MethodOptions) => Promise<AssembledTransaction<null>>;
1664
+ get_lp_config: (options?: MethodOptions) => Promise<AssembledTransaction<LpConfig>>;
1712
1665
  /**
1713
- * Construct and simulate a reserved_usdc transaction. Returns an `AssembledTransaction` object which will have a `result` field containing the result of the simulation. If this transaction changes contract state, you will need to call `signAndSend()` on the returned object.
1666
+ * Construct and simulate a physical_cash transaction. Returns an `AssembledTransaction` object which will have a `result` field containing the result of the simulation. If this transaction changes contract state, you will need to call `signAndSend()` on the returned object.
1714
1667
  */
1715
- reserved_usdc: (options?: MethodOptions) => Promise<AssembledTransaction<i128>>;
1668
+ physical_cash: (options?: MethodOptions) => Promise<AssembledTransaction<i128>>;
1669
+ /**
1670
+ * Construct and simulate a set_lp_config transaction. Returns an `AssembledTransaction` object which will have a `result` field containing the result of the simulation. If this transaction changes contract state, you will need to call `signAndSend()` on the returned object.
1671
+ */
1672
+ set_lp_config: ({ caller, config }: {
1673
+ caller: string;
1674
+ config: LpConfig;
1675
+ }, options?: MethodOptions) => Promise<AssembledTransaction<null>>;
1716
1676
  /**
1717
1677
  * Construct and simulate a transfer_from transaction. Returns an `AssembledTransaction` object which will have a `result` field containing the result of the simulation. If this transaction changes contract state, you will need to call `signAndSend()` on the returned object.
1718
- * Same lockup-propagation guarantee for the allowance-based path.
1719
1678
  */
1720
1679
  transfer_from: ({ spender, from, to, amount }: {
1721
1680
  spender: string;
@@ -1725,46 +1684,30 @@ export interface Client {
1725
1684
  }, options?: MethodOptions) => Promise<AssembledTransaction<null>>;
1726
1685
  /**
1727
1686
  * Construct and simulate a cancel_upgrade transaction. Returns an `AssembledTransaction` object which will have a `result` field containing the result of the simulation. If this transaction changes contract state, you will need to call `signAndSend()` on the returned object.
1728
- * PAUSER veto of a pending upgrade.
1729
1687
  */
1730
1688
  cancel_upgrade: ({ caller }: {
1731
1689
  caller: string;
1732
1690
  }, options?: MethodOptions) => Promise<AssembledTransaction<null>>;
1733
1691
  /**
1734
- * Construct and simulate a free_liquidity transaction. Returns an `AssembledTransaction` object which will have a `result` field containing the result of the simulation. If this transaction changes contract state, you will need to call `signAndSend()` on the returned object.
1735
- */
1736
- free_liquidity: (options?: MethodOptions) => Promise<AssembledTransaction<i128>>;
1737
- /**
1738
- * Construct and simulate a preview_redeem transaction. Returns an `AssembledTransaction` object which will have a `result` field containing the result of the simulation. If this transaction changes contract state, you will need to call `signAndSend()` on the returned object.
1739
- */
1740
- preview_redeem: ({ shares }: {
1741
- shares: i128;
1742
- }, options?: MethodOptions) => Promise<AssembledTransaction<i128>>;
1743
- /**
1744
- * Construct and simulate a unclaimed_fees transaction. Returns an `AssembledTransaction` object which will have a `result` field containing the result of the simulation. If this transaction changes contract state, you will need to call `signAndSend()` on the returned object.
1745
- * Accrued non-LP revenue awaiting `claim_fees` / `claim_fees_to`. Exposed
1746
- * so tests can reconcile counter movement against token-side transfers
1747
- * without inferring via subtraction.
1692
+ * Construct and simulate a settle_deposit transaction. Returns an `AssembledTransaction` object which will have a `result` field containing the result of the simulation. If this transaction changes contract state, you will need to call `signAndSend()` on the returned object.
1748
1693
  */
1749
- unclaimed_fees: (options?: MethodOptions) => Promise<AssembledTransaction<i128>>;
1694
+ settle_deposit: ({ caller, owner, assets, round }: {
1695
+ caller: string;
1696
+ owner: string;
1697
+ assets: i128;
1698
+ round: OracleRound;
1699
+ }, options?: MethodOptions) => Promise<AssembledTransaction<SettlementResult>>;
1750
1700
  /**
1751
- * Construct and simulate a update_net_pnl transaction. Returns an `AssembledTransaction` object which will have a `result` field containing the result of the simulation. If this transaction changes contract state, you will need to call `signAndSend()` on the returned object.
1701
+ * Construct and simulate a transfer_claim transaction. Returns an `AssembledTransaction` object which will have a `result` field containing the result of the simulation. If this transaction changes contract state, you will need to call `signAndSend()` on the returned object.
1752
1702
  */
1753
- update_net_pnl: ({ caller, pnl }: {
1703
+ transfer_claim: ({ caller, recipient, amount, claims_after }: {
1754
1704
  caller: string;
1755
- pnl: i128;
1705
+ recipient: string;
1706
+ amount: i128;
1707
+ claims_after: i128;
1756
1708
  }, options?: MethodOptions) => Promise<AssembledTransaction<null>>;
1757
- /**
1758
- * Construct and simulate a preview_deposit transaction. Returns an `AssembledTransaction` object which will have a `result` field containing the result of the simulation. If this transaction changes contract state, you will need to call `signAndSend()` on the returned object.
1759
- */
1760
- preview_deposit: ({ assets }: {
1761
- assets: i128;
1762
- }, options?: MethodOptions) => Promise<AssembledTransaction<i128>>;
1763
1709
  /**
1764
1710
  * Construct and simulate a propose_upgrade transaction. Returns an `AssembledTransaction` object which will have a `result` field containing the result of the simulation. If this transaction changes contract state, you will need to call `signAndSend()` on the returned object.
1765
- * Propose a WASM upgrade. UPGRADER role only. Records `{wasm_hash, eta}`
1766
- * where `eta = now + timelock` so `upgrade` can refuse to install a
1767
- * different hash or fire before `eta`.
1768
1711
  */
1769
1712
  propose_upgrade: ({ caller, wasm_hash }: {
1770
1713
  caller: string;
@@ -1775,83 +1718,61 @@ export interface Client {
1775
1718
  */
1776
1719
  bump_vault_state: (options?: MethodOptions) => Promise<AssembledTransaction<null>>;
1777
1720
  /**
1778
- * Construct and simulate a preview_withdraw transaction. Returns an `AssembledTransaction` object which will have a `result` field containing the result of the simulation. If this transaction changes contract state, you will need to call `signAndSend()` on the returned object.
1721
+ * Construct and simulate a settle_withdrawal transaction. Returns an `AssembledTransaction` object which will have a `result` field containing the result of the simulation. If this transaction changes contract state, you will need to call `signAndSend()` on the returned object.
1779
1722
  */
1780
- preview_withdraw: ({ assets }: {
1781
- assets: i128;
1782
- }, options?: MethodOptions) => Promise<AssembledTransaction<i128>>;
1783
- /**
1784
- * Construct and simulate a convert_to_assets transaction. Returns an `AssembledTransaction` object which will have a `result` field containing the result of the simulation. If this transaction changes contract state, you will need to call `signAndSend()` on the returned object.
1785
- */
1786
- convert_to_assets: ({ shares }: {
1723
+ settle_withdrawal: ({ caller, owner, shares, round }: {
1724
+ caller: string;
1725
+ owner: string;
1787
1726
  shares: i128;
1788
- }, options?: MethodOptions) => Promise<AssembledTransaction<i128>>;
1727
+ round: OracleRound;
1728
+ }, options?: MethodOptions) => Promise<AssembledTransaction<SettlementResult>>;
1789
1729
  /**
1790
- * Construct and simulate a convert_to_shares transaction. Returns an `AssembledTransaction` object which will have a `result` field containing the result of the simulation. If this transaction changes contract state, you will need to call `signAndSend()` on the returned object.
1730
+ * Construct and simulate a receive_collateral transaction. Returns an `AssembledTransaction` object which will have a `result` field containing the result of the simulation. If this transaction changes contract state, you will need to call `signAndSend()` on the returned object.
1791
1731
  */
1792
- convert_to_shares: ({ assets }: {
1793
- assets: i128;
1794
- }, options?: MethodOptions) => Promise<AssembledTransaction<i128>>;
1795
- /**
1796
- * Construct and simulate a lockup_expires_at transaction. Returns an `AssembledTransaction` object which will have a `result` field containing the result of the simulation. If this transaction changes contract state, you will need to call `signAndSend()` on the returned object.
1797
- * Returns the unix timestamp at which `user` may next withdraw/redeem.
1798
- * Returns 0 if `user` has never deposited (no lockup recorded).
1799
- */
1800
- lockup_expires_at: ({ user }: {
1801
- user: string;
1802
- }, options?: MethodOptions) => Promise<AssembledTransaction<u64>>;
1803
- /**
1804
- * Construct and simulate a release_liquidity transaction. Returns an `AssembledTransaction` object which will have a `result` field containing the result of the simulation. If this transaction changes contract state, you will need to call `signAndSend()` on the returned object.
1805
- */
1806
- release_liquidity: ({ caller, amount }: {
1732
+ receive_collateral: ({ caller, from, amount }: {
1807
1733
  caller: string;
1734
+ from: string;
1808
1735
  amount: i128;
1809
1736
  }, options?: MethodOptions) => Promise<AssembledTransaction<null>>;
1810
1737
  /**
1811
- * Construct and simulate a reserve_liquidity transaction. Returns an `AssembledTransaction` object which will have a `result` field containing the result of the simulation. If this transaction changes contract state, you will need to call `signAndSend()` on the returned object.
1738
+ * Construct and simulate a set_request_router transaction. Returns an `AssembledTransaction` object which will have a `result` field containing the result of the simulation. If this transaction changes contract state, you will need to call `signAndSend()` on the returned object.
1812
1739
  */
1813
- reserve_liquidity: ({ caller, amount }: {
1740
+ set_request_router: ({ caller, request_router }: {
1814
1741
  caller: string;
1815
- amount: i128;
1742
+ request_router: string;
1816
1743
  }, options?: MethodOptions) => Promise<AssembledTransaction<null>>;
1817
1744
  /**
1818
- * Construct and simulate a net_global_trader_pnl transaction. Returns an `AssembledTransaction` object which will have a `result` field containing the result of the simulation. If this transaction changes contract state, you will need to call `signAndSend()` on the returned object.
1819
- * Net unrealized PnL across all open trader positions, as last synced by
1820
- * PM via `update_net_pnl`. Realized PnL is intentionally NOT included —
1821
- * it has already moved physically through `pay_profit` /
1822
- * `record_absorbed_collateral` and is reflected directly in `total_assets`.
1745
+ * Construct and simulate a total_share_supply transaction. Returns an `AssembledTransaction` object which will have a `result` field containing the result of the simulation. If this transaction changes contract state, you will need to call `signAndSend()` on the returned object.
1823
1746
  */
1824
- net_global_trader_pnl: (options?: MethodOptions) => Promise<AssembledTransaction<i128>>;
1747
+ total_share_supply: (options?: MethodOptions) => Promise<AssembledTransaction<i128>>;
1825
1748
  /**
1826
- * Construct and simulate a total_assets_excl_pnl transaction. Returns an `AssembledTransaction` object which will have a `result` field containing the result of the simulation. If this transaction changes contract state, you will need to call `signAndSend()` on the returned object.
1827
- * Total assets minus only the fee buffer — PnL is excluded so consumers
1828
- * (PM's utilization gate) are not subject to mark-price feedback into
1829
- * the utilization denominator. LP-facing flows still use `free_liquidity`.
1749
+ * Construct and simulate a accounting_snapshot transaction. Returns an `AssembledTransaction` object which will have a `result` field containing the result of the simulation. If this transaction changes contract state, you will need to call `signAndSend()` on the returned object.
1830
1750
  */
1831
- total_assets_excl_pnl: (options?: MethodOptions) => Promise<AssembledTransaction<i128>>;
1751
+ accounting_snapshot: ({ round }: {
1752
+ round: OracleRound;
1753
+ }, options?: MethodOptions) => Promise<AssembledTransaction<AccountingSnapshot>>;
1832
1754
  /**
1833
- * Construct and simulate a record_absorbed_collateral transaction. Returns an `AssembledTransaction` object which will have a `result` field containing the result of the simulation. If this transaction changes contract state, you will need to call `signAndSend()` on the returned object.
1834
- * Notify the vault that PositionManager has just transferred `amount`
1835
- * USDC of seized/loss-settlement collateral directly into the vault's
1836
- * wallet. This call does NOT move tokens, but it DOES verify the
1837
- * on-chain delta — `post - pre` must equal `amount`, otherwise PM and
1838
- * Vault have diverged and we panic. See ADR-0001.
1755
+ * Construct and simulate a can_create_lp_request transaction. Returns an `AssembledTransaction` object which will have a `result` field containing the result of the simulation. If this transaction changes contract state, you will need to call `signAndSend()` on the returned object.
1839
1756
  */
1840
- record_absorbed_collateral: ({ caller, trader, amount, pre_balance }: {
1757
+ can_create_lp_request: (options?: MethodOptions) => Promise<AssembledTransaction<boolean>>;
1758
+ /**
1759
+ * Construct and simulate a transfer_safety_claim transaction. Returns an `AssembledTransaction` object which will have a `result` field containing the result of the simulation. If this transaction changes contract state, you will need to call `signAndSend()` on the returned object.
1760
+ */
1761
+ transfer_safety_claim: ({ caller, recipient, amount }: {
1841
1762
  caller: string;
1842
- trader: string;
1763
+ recipient: string;
1843
1764
  amount: i128;
1844
- pre_balance: i128;
1845
1765
  }, options?: MethodOptions) => Promise<AssembledTransaction<null>>;
1846
1766
  }
1847
1767
  export declare class Client extends ContractClient {
1848
1768
  readonly options: ContractClientOptions;
1849
1769
  static deploy<T = Client>(
1850
1770
  /** Constructor/Initialization Args for the contract's `__constructor` method */
1851
- { asset, config_manager, position_manager }: {
1852
- asset: string;
1771
+ { asset_address, config_manager, position_manager, lp_config }: {
1772
+ asset_address: string;
1853
1773
  config_manager: string;
1854
1774
  position_manager: string;
1775
+ lp_config: LpConfig;
1855
1776
  },
1856
1777
  /** Options for initializing a Client as well as for calling a method, with extras specific to deploying. */
1857
1778
  options: MethodOptions & Omit<ContractClientOptions, "contractId"> & {
@@ -1864,51 +1785,34 @@ export declare class Client extends ContractClient {
1864
1785
  }): Promise<AssembledTransaction<T>>;
1865
1786
  constructor(options: ContractClientOptions);
1866
1787
  readonly fromJSON: {
1867
- mint: (json: string) => AssembledTransaction<bigint>;
1868
1788
  name: (json: string) => AssembledTransaction<string>;
1869
1789
  pause: (json: string) => AssembledTransaction<null>;
1870
- redeem: (json: string) => AssembledTransaction<bigint>;
1871
1790
  symbol: (json: string) => AssembledTransaction<string>;
1872
1791
  approve: (json: string) => AssembledTransaction<null>;
1873
1792
  balance: (json: string) => AssembledTransaction<bigint>;
1874
- deposit: (json: string) => AssembledTransaction<bigint>;
1875
1793
  migrate: (json: string) => AssembledTransaction<null>;
1876
1794
  unpause: (json: string) => AssembledTransaction<null>;
1877
1795
  upgrade: (json: string) => AssembledTransaction<null>;
1878
1796
  decimals: (json: string) => AssembledTransaction<number>;
1879
- max_mint: (json: string) => AssembledTransaction<bigint>;
1880
1797
  transfer: (json: string) => AssembledTransaction<null>;
1881
- withdraw: (json: string) => AssembledTransaction<bigint>;
1882
1798
  allowance: (json: string) => AssembledTransaction<bigint>;
1883
- claim_fees: (json: string) => AssembledTransaction<null>;
1884
- max_redeem: (json: string) => AssembledTransaction<bigint>;
1885
- pay_profit: (json: string) => AssembledTransaction<null>;
1886
- accrue_fees: (json: string) => AssembledTransaction<null>;
1887
- max_deposit: (json: string) => AssembledTransaction<bigint>;
1888
1799
  query_asset: (json: string) => AssembledTransaction<string>;
1889
- max_withdraw: (json: string) => AssembledTransaction<bigint>;
1890
- preview_mint: (json: string) => AssembledTransaction<bigint>;
1891
- total_assets: (json: string) => AssembledTransaction<bigint>;
1892
1800
  total_supply: (json: string) => AssembledTransaction<bigint>;
1893
- claim_fees_to: (json: string) => AssembledTransaction<null>;
1894
- reserved_usdc: (json: string) => AssembledTransaction<bigint>;
1801
+ get_lp_config: (json: string) => AssembledTransaction<LpConfig>;
1802
+ physical_cash: (json: string) => AssembledTransaction<bigint>;
1803
+ set_lp_config: (json: string) => AssembledTransaction<null>;
1895
1804
  transfer_from: (json: string) => AssembledTransaction<null>;
1896
1805
  cancel_upgrade: (json: string) => AssembledTransaction<null>;
1897
- free_liquidity: (json: string) => AssembledTransaction<bigint>;
1898
- preview_redeem: (json: string) => AssembledTransaction<bigint>;
1899
- unclaimed_fees: (json: string) => AssembledTransaction<bigint>;
1900
- update_net_pnl: (json: string) => AssembledTransaction<null>;
1901
- preview_deposit: (json: string) => AssembledTransaction<bigint>;
1806
+ settle_deposit: (json: string) => AssembledTransaction<SettlementResult>;
1807
+ transfer_claim: (json: string) => AssembledTransaction<null>;
1902
1808
  propose_upgrade: (json: string) => AssembledTransaction<null>;
1903
1809
  bump_vault_state: (json: string) => AssembledTransaction<null>;
1904
- preview_withdraw: (json: string) => AssembledTransaction<bigint>;
1905
- convert_to_assets: (json: string) => AssembledTransaction<bigint>;
1906
- convert_to_shares: (json: string) => AssembledTransaction<bigint>;
1907
- lockup_expires_at: (json: string) => AssembledTransaction<bigint>;
1908
- release_liquidity: (json: string) => AssembledTransaction<null>;
1909
- reserve_liquidity: (json: string) => AssembledTransaction<null>;
1910
- net_global_trader_pnl: (json: string) => AssembledTransaction<bigint>;
1911
- total_assets_excl_pnl: (json: string) => AssembledTransaction<bigint>;
1912
- record_absorbed_collateral: (json: string) => AssembledTransaction<null>;
1810
+ settle_withdrawal: (json: string) => AssembledTransaction<SettlementResult>;
1811
+ receive_collateral: (json: string) => AssembledTransaction<null>;
1812
+ set_request_router: (json: string) => AssembledTransaction<null>;
1813
+ total_share_supply: (json: string) => AssembledTransaction<bigint>;
1814
+ accounting_snapshot: (json: string) => AssembledTransaction<AccountingSnapshot>;
1815
+ can_create_lp_request: (json: string) => AssembledTransaction<boolean>;
1816
+ transfer_safety_claim: (json: string) => AssembledTransaction<null>;
1913
1817
  };
1914
1818
  }