@optimex-xyz/market-maker-sdk 0.8.0 → 0.9.0-dev-cb35949

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/index.d.ts CHANGED
@@ -6,6 +6,7 @@ interface EnvironmentConfig {
6
6
  backendUrl: string;
7
7
  rpcUrl: string;
8
8
  paymentAddressMap: Record<string, string>;
9
+ liquidationAddressMap: Record<string, string>;
9
10
  protocolFetcherProxyAddress: string;
10
11
  }
11
12
  interface AppConfig extends EnvironmentConfig {
@@ -986,6 +987,266 @@ interface ERC20 extends BaseContract {
986
987
  };
987
988
  }
988
989
 
990
+ interface LendingLiquidationInterface extends Interface {
991
+ getFunction(nameOrSignature: "LENDING_MANAGEMENT" | "MORPHO" | "VALIDATOR_FORCE_CLOSE_TYPEHASH" | "eip712Domain" | "onMorphoLiquidate" | "optimexDomain" | "owBtc" | "payment"): FunctionFragment;
992
+ getEvent(nameOrSignatureOrTopic: "EIP712DomainChanged" | "ForceClose" | "Liquidate" | "Payment"): EventFragment;
993
+ encodeFunctionData(functionFragment: "LENDING_MANAGEMENT", values?: undefined): string;
994
+ encodeFunctionData(functionFragment: "MORPHO", values?: undefined): string;
995
+ encodeFunctionData(functionFragment: "VALIDATOR_FORCE_CLOSE_TYPEHASH", values?: undefined): string;
996
+ encodeFunctionData(functionFragment: "eip712Domain", values?: undefined): string;
997
+ encodeFunctionData(functionFragment: "onMorphoLiquidate", values: [BigNumberish, BytesLike]): string;
998
+ encodeFunctionData(functionFragment: "optimexDomain", values?: undefined): string;
999
+ encodeFunctionData(functionFragment: "owBtc", values?: undefined): string;
1000
+ encodeFunctionData(functionFragment: "payment", values: [
1001
+ BytesLike,
1002
+ AddressLike,
1003
+ BigNumberish,
1004
+ BytesLike,
1005
+ boolean,
1006
+ BytesLike
1007
+ ]): string;
1008
+ decodeFunctionResult(functionFragment: "LENDING_MANAGEMENT", data: BytesLike): Result;
1009
+ decodeFunctionResult(functionFragment: "MORPHO", data: BytesLike): Result;
1010
+ decodeFunctionResult(functionFragment: "VALIDATOR_FORCE_CLOSE_TYPEHASH", data: BytesLike): Result;
1011
+ decodeFunctionResult(functionFragment: "eip712Domain", data: BytesLike): Result;
1012
+ decodeFunctionResult(functionFragment: "onMorphoLiquidate", data: BytesLike): Result;
1013
+ decodeFunctionResult(functionFragment: "optimexDomain", data: BytesLike): Result;
1014
+ decodeFunctionResult(functionFragment: "owBtc", data: BytesLike): Result;
1015
+ decodeFunctionResult(functionFragment: "payment", data: BytesLike): Result;
1016
+ }
1017
+ declare namespace EIP712DomainChangedEvent$1 {
1018
+ type InputTuple = [];
1019
+ type OutputTuple = [];
1020
+ interface OutputObject {
1021
+ }
1022
+ type Event = TypedContractEvent<InputTuple, OutputTuple, OutputObject>;
1023
+ type Filter = TypedDeferredTopicFilter<Event>;
1024
+ type Log = TypedEventLog<Event>;
1025
+ type LogDescription = TypedLogDescription<Event>;
1026
+ }
1027
+ declare namespace ForceCloseEvent {
1028
+ type InputTuple = [
1029
+ positionManager: AddressLike,
1030
+ positionId: BytesLike,
1031
+ tradeId: BytesLike,
1032
+ marketId: BytesLike,
1033
+ repaidLoan: BigNumberish,
1034
+ userRefund: BigNumberish
1035
+ ];
1036
+ type OutputTuple = [
1037
+ positionManager: string,
1038
+ positionId: string,
1039
+ tradeId: string,
1040
+ marketId: string,
1041
+ repaidLoan: bigint,
1042
+ userRefund: bigint
1043
+ ];
1044
+ interface OutputObject {
1045
+ positionManager: string;
1046
+ positionId: string;
1047
+ tradeId: string;
1048
+ marketId: string;
1049
+ repaidLoan: bigint;
1050
+ userRefund: bigint;
1051
+ }
1052
+ type Event = TypedContractEvent<InputTuple, OutputTuple, OutputObject>;
1053
+ type Filter = TypedDeferredTopicFilter<Event>;
1054
+ type Log = TypedEventLog<Event>;
1055
+ type LogDescription = TypedLogDescription<Event>;
1056
+ }
1057
+ declare namespace LiquidateEvent {
1058
+ type InputTuple = [
1059
+ positionManager: AddressLike,
1060
+ positionId: BytesLike,
1061
+ tradeId: BytesLike,
1062
+ marketId: BytesLike,
1063
+ seizedCollateral: BigNumberish,
1064
+ remainingCollateral: BigNumberish,
1065
+ repaidLoan: BigNumberish,
1066
+ bonusLoan: BigNumberish
1067
+ ];
1068
+ type OutputTuple = [
1069
+ positionManager: string,
1070
+ positionId: string,
1071
+ tradeId: string,
1072
+ marketId: string,
1073
+ seizedCollateral: bigint,
1074
+ remainingCollateral: bigint,
1075
+ repaidLoan: bigint,
1076
+ bonusLoan: bigint
1077
+ ];
1078
+ interface OutputObject {
1079
+ positionManager: string;
1080
+ positionId: string;
1081
+ tradeId: string;
1082
+ marketId: string;
1083
+ seizedCollateral: bigint;
1084
+ remainingCollateral: bigint;
1085
+ repaidLoan: bigint;
1086
+ bonusLoan: bigint;
1087
+ }
1088
+ type Event = TypedContractEvent<InputTuple, OutputTuple, OutputObject>;
1089
+ type Filter = TypedDeferredTopicFilter<Event>;
1090
+ type Log = TypedEventLog<Event>;
1091
+ type LogDescription = TypedLogDescription<Event>;
1092
+ }
1093
+ declare namespace PaymentEvent {
1094
+ type InputTuple = [
1095
+ positionManager: AddressLike,
1096
+ positionId: BytesLike,
1097
+ tradeId: BytesLike,
1098
+ sender: AddressLike,
1099
+ marketId: BytesLike,
1100
+ amount: BigNumberish,
1101
+ collateral: BigNumberish
1102
+ ];
1103
+ type OutputTuple = [
1104
+ positionManager: string,
1105
+ positionId: string,
1106
+ tradeId: string,
1107
+ sender: string,
1108
+ marketId: string,
1109
+ amount: bigint,
1110
+ collateral: bigint
1111
+ ];
1112
+ interface OutputObject {
1113
+ positionManager: string;
1114
+ positionId: string;
1115
+ tradeId: string;
1116
+ sender: string;
1117
+ marketId: string;
1118
+ amount: bigint;
1119
+ collateral: bigint;
1120
+ }
1121
+ type Event = TypedContractEvent<InputTuple, OutputTuple, OutputObject>;
1122
+ type Filter = TypedDeferredTopicFilter<Event>;
1123
+ type Log = TypedEventLog<Event>;
1124
+ type LogDescription = TypedLogDescription<Event>;
1125
+ }
1126
+ interface LendingLiquidation extends BaseContract {
1127
+ connect(runner?: ContractRunner | null): LendingLiquidation;
1128
+ waitForDeployment(): Promise<this>;
1129
+ interface: LendingLiquidationInterface;
1130
+ queryFilter<TCEvent extends TypedContractEvent>(event: TCEvent, fromBlockOrBlockhash?: string | number | undefined, toBlock?: string | number | undefined): Promise<Array<TypedEventLog<TCEvent>>>;
1131
+ queryFilter<TCEvent extends TypedContractEvent>(filter: TypedDeferredTopicFilter<TCEvent>, fromBlockOrBlockhash?: string | number | undefined, toBlock?: string | number | undefined): Promise<Array<TypedEventLog<TCEvent>>>;
1132
+ on<TCEvent extends TypedContractEvent>(event: TCEvent, listener: TypedListener<TCEvent>): Promise<this>;
1133
+ on<TCEvent extends TypedContractEvent>(filter: TypedDeferredTopicFilter<TCEvent>, listener: TypedListener<TCEvent>): Promise<this>;
1134
+ once<TCEvent extends TypedContractEvent>(event: TCEvent, listener: TypedListener<TCEvent>): Promise<this>;
1135
+ once<TCEvent extends TypedContractEvent>(filter: TypedDeferredTopicFilter<TCEvent>, listener: TypedListener<TCEvent>): Promise<this>;
1136
+ listeners<TCEvent extends TypedContractEvent>(event: TCEvent): Promise<Array<TypedListener<TCEvent>>>;
1137
+ listeners(eventName?: string): Promise<Array<Listener>>;
1138
+ removeAllListeners<TCEvent extends TypedContractEvent>(event?: TCEvent): Promise<this>;
1139
+ LENDING_MANAGEMENT: TypedContractMethod<[], [string], "view">;
1140
+ MORPHO: TypedContractMethod<[], [string], "view">;
1141
+ VALIDATOR_FORCE_CLOSE_TYPEHASH: TypedContractMethod<[], [string], "view">;
1142
+ eip712Domain: TypedContractMethod<[
1143
+ ], [
1144
+ [
1145
+ string,
1146
+ string,
1147
+ string,
1148
+ bigint,
1149
+ string,
1150
+ string,
1151
+ bigint[]
1152
+ ] & {
1153
+ fields: string;
1154
+ name: string;
1155
+ version: string;
1156
+ chainId: bigint;
1157
+ verifyingContract: string;
1158
+ salt: string;
1159
+ extensions: bigint[];
1160
+ }
1161
+ ], "view">;
1162
+ onMorphoLiquidate: TypedContractMethod<[
1163
+ repaidAssets: BigNumberish,
1164
+ data: BytesLike
1165
+ ], [
1166
+ void
1167
+ ], "nonpayable">;
1168
+ optimexDomain: TypedContractMethod<[
1169
+ ], [
1170
+ [string, string] & {
1171
+ name: string;
1172
+ version: string;
1173
+ }
1174
+ ], "view">;
1175
+ owBtc: TypedContractMethod<[], [string], "view">;
1176
+ payment: TypedContractMethod<[
1177
+ tradeId: BytesLike,
1178
+ positionManager: AddressLike,
1179
+ amount: BigNumberish,
1180
+ positionId: BytesLike,
1181
+ isLiquidate: boolean,
1182
+ validatorSignature: BytesLike
1183
+ ], [
1184
+ void
1185
+ ], "nonpayable">;
1186
+ getFunction<T extends ContractMethod = ContractMethod>(key: string | FunctionFragment): T;
1187
+ getFunction(nameOrSignature: "LENDING_MANAGEMENT"): TypedContractMethod<[], [string], "view">;
1188
+ getFunction(nameOrSignature: "MORPHO"): TypedContractMethod<[], [string], "view">;
1189
+ getFunction(nameOrSignature: "VALIDATOR_FORCE_CLOSE_TYPEHASH"): TypedContractMethod<[], [string], "view">;
1190
+ getFunction(nameOrSignature: "eip712Domain"): TypedContractMethod<[
1191
+ ], [
1192
+ [
1193
+ string,
1194
+ string,
1195
+ string,
1196
+ bigint,
1197
+ string,
1198
+ string,
1199
+ bigint[]
1200
+ ] & {
1201
+ fields: string;
1202
+ name: string;
1203
+ version: string;
1204
+ chainId: bigint;
1205
+ verifyingContract: string;
1206
+ salt: string;
1207
+ extensions: bigint[];
1208
+ }
1209
+ ], "view">;
1210
+ getFunction(nameOrSignature: "onMorphoLiquidate"): TypedContractMethod<[
1211
+ repaidAssets: BigNumberish,
1212
+ data: BytesLike
1213
+ ], [
1214
+ void
1215
+ ], "nonpayable">;
1216
+ getFunction(nameOrSignature: "optimexDomain"): TypedContractMethod<[
1217
+ ], [
1218
+ [string, string] & {
1219
+ name: string;
1220
+ version: string;
1221
+ }
1222
+ ], "view">;
1223
+ getFunction(nameOrSignature: "owBtc"): TypedContractMethod<[], [string], "view">;
1224
+ getFunction(nameOrSignature: "payment"): TypedContractMethod<[
1225
+ tradeId: BytesLike,
1226
+ positionManager: AddressLike,
1227
+ amount: BigNumberish,
1228
+ positionId: BytesLike,
1229
+ isLiquidate: boolean,
1230
+ validatorSignature: BytesLike
1231
+ ], [
1232
+ void
1233
+ ], "nonpayable">;
1234
+ getEvent(key: "EIP712DomainChanged"): TypedContractEvent<EIP712DomainChangedEvent$1.InputTuple, EIP712DomainChangedEvent$1.OutputTuple, EIP712DomainChangedEvent$1.OutputObject>;
1235
+ getEvent(key: "ForceClose"): TypedContractEvent<ForceCloseEvent.InputTuple, ForceCloseEvent.OutputTuple, ForceCloseEvent.OutputObject>;
1236
+ getEvent(key: "Liquidate"): TypedContractEvent<LiquidateEvent.InputTuple, LiquidateEvent.OutputTuple, LiquidateEvent.OutputObject>;
1237
+ getEvent(key: "Payment"): TypedContractEvent<PaymentEvent.InputTuple, PaymentEvent.OutputTuple, PaymentEvent.OutputObject>;
1238
+ filters: {
1239
+ "EIP712DomainChanged()": TypedContractEvent<EIP712DomainChangedEvent$1.InputTuple, EIP712DomainChangedEvent$1.OutputTuple, EIP712DomainChangedEvent$1.OutputObject>;
1240
+ EIP712DomainChanged: TypedContractEvent<EIP712DomainChangedEvent$1.InputTuple, EIP712DomainChangedEvent$1.OutputTuple, EIP712DomainChangedEvent$1.OutputObject>;
1241
+ "ForceClose(address,bytes32,bytes32,bytes32,uint256,uint256)": TypedContractEvent<ForceCloseEvent.InputTuple, ForceCloseEvent.OutputTuple, ForceCloseEvent.OutputObject>;
1242
+ ForceClose: TypedContractEvent<ForceCloseEvent.InputTuple, ForceCloseEvent.OutputTuple, ForceCloseEvent.OutputObject>;
1243
+ "Liquidate(address,bytes32,bytes32,bytes32,uint256,uint256,uint256,uint256)": TypedContractEvent<LiquidateEvent.InputTuple, LiquidateEvent.OutputTuple, LiquidateEvent.OutputObject>;
1244
+ Liquidate: TypedContractEvent<LiquidateEvent.InputTuple, LiquidateEvent.OutputTuple, LiquidateEvent.OutputObject>;
1245
+ "Payment(address,bytes32,bytes32,address,bytes32,uint256,uint256)": TypedContractEvent<PaymentEvent.InputTuple, PaymentEvent.OutputTuple, PaymentEvent.OutputObject>;
1246
+ Payment: TypedContractEvent<PaymentEvent.InputTuple, PaymentEvent.OutputTuple, PaymentEvent.OutputObject>;
1247
+ };
1248
+ }
1249
+
989
1250
  interface PaymentInterface extends Interface {
990
1251
  getFunction(nameOrSignature: "payment" | "protocol" | "setProtocol"): FunctionFragment;
991
1252
  getEvent(nameOrSignatureOrTopic: "PaymentTransferred" | "ProtocolUpdated"): EventFragment;
@@ -3525,6 +3786,341 @@ declare class ERC20__factory {
3525
3786
  static connect(address: string, runner?: ContractRunner | null): ERC20;
3526
3787
  }
3527
3788
 
3789
+ declare class LendingLiquidation__factory {
3790
+ static readonly abi: readonly [{
3791
+ readonly inputs: readonly [{
3792
+ readonly internalType: "address";
3793
+ readonly name: "_owBtc";
3794
+ readonly type: "address";
3795
+ }, {
3796
+ readonly internalType: "address";
3797
+ readonly name: "_morpho";
3798
+ readonly type: "address";
3799
+ }, {
3800
+ readonly internalType: "address";
3801
+ readonly name: "_lendingManagement";
3802
+ readonly type: "address";
3803
+ }, {
3804
+ readonly internalType: "string";
3805
+ readonly name: "name";
3806
+ readonly type: "string";
3807
+ }, {
3808
+ readonly internalType: "string";
3809
+ readonly name: "version";
3810
+ readonly type: "string";
3811
+ }];
3812
+ readonly stateMutability: "nonpayable";
3813
+ readonly type: "constructor";
3814
+ }, {
3815
+ readonly inputs: readonly [];
3816
+ readonly name: "ECDSAInvalidSignature";
3817
+ readonly type: "error";
3818
+ }, {
3819
+ readonly inputs: readonly [{
3820
+ readonly internalType: "uint256";
3821
+ readonly name: "length";
3822
+ readonly type: "uint256";
3823
+ }];
3824
+ readonly name: "ECDSAInvalidSignatureLength";
3825
+ readonly type: "error";
3826
+ }, {
3827
+ readonly inputs: readonly [{
3828
+ readonly internalType: "bytes32";
3829
+ readonly name: "s";
3830
+ readonly type: "bytes32";
3831
+ }];
3832
+ readonly name: "ECDSAInvalidSignatureS";
3833
+ readonly type: "error";
3834
+ }, {
3835
+ readonly inputs: readonly [];
3836
+ readonly name: "InvalidMorpho";
3837
+ readonly type: "error";
3838
+ }, {
3839
+ readonly inputs: readonly [];
3840
+ readonly name: "InvalidShortString";
3841
+ readonly type: "error";
3842
+ }, {
3843
+ readonly inputs: readonly [{
3844
+ readonly internalType: "address";
3845
+ readonly name: "validator";
3846
+ readonly type: "address";
3847
+ }];
3848
+ readonly name: "NotAuthorizedValidator";
3849
+ readonly type: "error";
3850
+ }, {
3851
+ readonly inputs: readonly [];
3852
+ readonly name: "NotEnoughPaymentAmount";
3853
+ readonly type: "error";
3854
+ }, {
3855
+ readonly inputs: readonly [{
3856
+ readonly internalType: "string";
3857
+ readonly name: "str";
3858
+ readonly type: "string";
3859
+ }];
3860
+ readonly name: "StringTooLong";
3861
+ readonly type: "error";
3862
+ }, {
3863
+ readonly anonymous: false;
3864
+ readonly inputs: readonly [];
3865
+ readonly name: "EIP712DomainChanged";
3866
+ readonly type: "event";
3867
+ }, {
3868
+ readonly anonymous: false;
3869
+ readonly inputs: readonly [{
3870
+ readonly indexed: true;
3871
+ readonly internalType: "address";
3872
+ readonly name: "positionManager";
3873
+ readonly type: "address";
3874
+ }, {
3875
+ readonly indexed: true;
3876
+ readonly internalType: "bytes32";
3877
+ readonly name: "positionId";
3878
+ readonly type: "bytes32";
3879
+ }, {
3880
+ readonly indexed: true;
3881
+ readonly internalType: "bytes32";
3882
+ readonly name: "tradeId";
3883
+ readonly type: "bytes32";
3884
+ }, {
3885
+ readonly indexed: false;
3886
+ readonly internalType: "bytes32";
3887
+ readonly name: "marketId";
3888
+ readonly type: "bytes32";
3889
+ }, {
3890
+ readonly indexed: false;
3891
+ readonly internalType: "uint256";
3892
+ readonly name: "repaidLoan";
3893
+ readonly type: "uint256";
3894
+ }, {
3895
+ readonly indexed: false;
3896
+ readonly internalType: "uint256";
3897
+ readonly name: "userRefund";
3898
+ readonly type: "uint256";
3899
+ }];
3900
+ readonly name: "ForceClose";
3901
+ readonly type: "event";
3902
+ }, {
3903
+ readonly anonymous: false;
3904
+ readonly inputs: readonly [{
3905
+ readonly indexed: true;
3906
+ readonly internalType: "address";
3907
+ readonly name: "positionManager";
3908
+ readonly type: "address";
3909
+ }, {
3910
+ readonly indexed: true;
3911
+ readonly internalType: "bytes32";
3912
+ readonly name: "positionId";
3913
+ readonly type: "bytes32";
3914
+ }, {
3915
+ readonly indexed: true;
3916
+ readonly internalType: "bytes32";
3917
+ readonly name: "tradeId";
3918
+ readonly type: "bytes32";
3919
+ }, {
3920
+ readonly indexed: false;
3921
+ readonly internalType: "bytes32";
3922
+ readonly name: "marketId";
3923
+ readonly type: "bytes32";
3924
+ }, {
3925
+ readonly indexed: false;
3926
+ readonly internalType: "uint256";
3927
+ readonly name: "seizedCollateral";
3928
+ readonly type: "uint256";
3929
+ }, {
3930
+ readonly indexed: false;
3931
+ readonly internalType: "uint256";
3932
+ readonly name: "remainingCollateral";
3933
+ readonly type: "uint256";
3934
+ }, {
3935
+ readonly indexed: false;
3936
+ readonly internalType: "uint256";
3937
+ readonly name: "repaidLoan";
3938
+ readonly type: "uint256";
3939
+ }, {
3940
+ readonly indexed: false;
3941
+ readonly internalType: "uint256";
3942
+ readonly name: "bonusLoan";
3943
+ readonly type: "uint256";
3944
+ }];
3945
+ readonly name: "Liquidate";
3946
+ readonly type: "event";
3947
+ }, {
3948
+ readonly anonymous: false;
3949
+ readonly inputs: readonly [{
3950
+ readonly indexed: true;
3951
+ readonly internalType: "address";
3952
+ readonly name: "positionManager";
3953
+ readonly type: "address";
3954
+ }, {
3955
+ readonly indexed: true;
3956
+ readonly internalType: "bytes32";
3957
+ readonly name: "positionId";
3958
+ readonly type: "bytes32";
3959
+ }, {
3960
+ readonly indexed: true;
3961
+ readonly internalType: "bytes32";
3962
+ readonly name: "tradeId";
3963
+ readonly type: "bytes32";
3964
+ }, {
3965
+ readonly indexed: false;
3966
+ readonly internalType: "address";
3967
+ readonly name: "sender";
3968
+ readonly type: "address";
3969
+ }, {
3970
+ readonly indexed: false;
3971
+ readonly internalType: "bytes32";
3972
+ readonly name: "marketId";
3973
+ readonly type: "bytes32";
3974
+ }, {
3975
+ readonly indexed: false;
3976
+ readonly internalType: "uint256";
3977
+ readonly name: "amount";
3978
+ readonly type: "uint256";
3979
+ }, {
3980
+ readonly indexed: false;
3981
+ readonly internalType: "uint256";
3982
+ readonly name: "collateral";
3983
+ readonly type: "uint256";
3984
+ }];
3985
+ readonly name: "Payment";
3986
+ readonly type: "event";
3987
+ }, {
3988
+ readonly inputs: readonly [];
3989
+ readonly name: "LENDING_MANAGEMENT";
3990
+ readonly outputs: readonly [{
3991
+ readonly internalType: "contract ILendingManagement";
3992
+ readonly name: "";
3993
+ readonly type: "address";
3994
+ }];
3995
+ readonly stateMutability: "view";
3996
+ readonly type: "function";
3997
+ }, {
3998
+ readonly inputs: readonly [];
3999
+ readonly name: "MORPHO";
4000
+ readonly outputs: readonly [{
4001
+ readonly internalType: "contract IMorpho";
4002
+ readonly name: "";
4003
+ readonly type: "address";
4004
+ }];
4005
+ readonly stateMutability: "view";
4006
+ readonly type: "function";
4007
+ }, {
4008
+ readonly inputs: readonly [];
4009
+ readonly name: "VALIDATOR_FORCE_CLOSE_TYPEHASH";
4010
+ readonly outputs: readonly [{
4011
+ readonly internalType: "bytes32";
4012
+ readonly name: "";
4013
+ readonly type: "bytes32";
4014
+ }];
4015
+ readonly stateMutability: "view";
4016
+ readonly type: "function";
4017
+ }, {
4018
+ readonly inputs: readonly [];
4019
+ readonly name: "eip712Domain";
4020
+ readonly outputs: readonly [{
4021
+ readonly internalType: "bytes1";
4022
+ readonly name: "fields";
4023
+ readonly type: "bytes1";
4024
+ }, {
4025
+ readonly internalType: "string";
4026
+ readonly name: "name";
4027
+ readonly type: "string";
4028
+ }, {
4029
+ readonly internalType: "string";
4030
+ readonly name: "version";
4031
+ readonly type: "string";
4032
+ }, {
4033
+ readonly internalType: "uint256";
4034
+ readonly name: "chainId";
4035
+ readonly type: "uint256";
4036
+ }, {
4037
+ readonly internalType: "address";
4038
+ readonly name: "verifyingContract";
4039
+ readonly type: "address";
4040
+ }, {
4041
+ readonly internalType: "bytes32";
4042
+ readonly name: "salt";
4043
+ readonly type: "bytes32";
4044
+ }, {
4045
+ readonly internalType: "uint256[]";
4046
+ readonly name: "extensions";
4047
+ readonly type: "uint256[]";
4048
+ }];
4049
+ readonly stateMutability: "view";
4050
+ readonly type: "function";
4051
+ }, {
4052
+ readonly inputs: readonly [{
4053
+ readonly internalType: "uint256";
4054
+ readonly name: "repaidAssets";
4055
+ readonly type: "uint256";
4056
+ }, {
4057
+ readonly internalType: "bytes";
4058
+ readonly name: "data";
4059
+ readonly type: "bytes";
4060
+ }];
4061
+ readonly name: "onMorphoLiquidate";
4062
+ readonly outputs: readonly [];
4063
+ readonly stateMutability: "nonpayable";
4064
+ readonly type: "function";
4065
+ }, {
4066
+ readonly inputs: readonly [];
4067
+ readonly name: "optimexDomain";
4068
+ readonly outputs: readonly [{
4069
+ readonly internalType: "string";
4070
+ readonly name: "name";
4071
+ readonly type: "string";
4072
+ }, {
4073
+ readonly internalType: "string";
4074
+ readonly name: "version";
4075
+ readonly type: "string";
4076
+ }];
4077
+ readonly stateMutability: "view";
4078
+ readonly type: "function";
4079
+ }, {
4080
+ readonly inputs: readonly [];
4081
+ readonly name: "owBtc";
4082
+ readonly outputs: readonly [{
4083
+ readonly internalType: "contract OW_BTC";
4084
+ readonly name: "";
4085
+ readonly type: "address";
4086
+ }];
4087
+ readonly stateMutability: "view";
4088
+ readonly type: "function";
4089
+ }, {
4090
+ readonly inputs: readonly [{
4091
+ readonly internalType: "bytes32";
4092
+ readonly name: "tradeId";
4093
+ readonly type: "bytes32";
4094
+ }, {
4095
+ readonly internalType: "contract IAccountPositionManager";
4096
+ readonly name: "positionManager";
4097
+ readonly type: "address";
4098
+ }, {
4099
+ readonly internalType: "uint256";
4100
+ readonly name: "amount";
4101
+ readonly type: "uint256";
4102
+ }, {
4103
+ readonly internalType: "bytes32";
4104
+ readonly name: "positionId";
4105
+ readonly type: "bytes32";
4106
+ }, {
4107
+ readonly internalType: "bool";
4108
+ readonly name: "isLiquidate";
4109
+ readonly type: "bool";
4110
+ }, {
4111
+ readonly internalType: "bytes";
4112
+ readonly name: "validatorSignature";
4113
+ readonly type: "bytes";
4114
+ }];
4115
+ readonly name: "payment";
4116
+ readonly outputs: readonly [];
4117
+ readonly stateMutability: "nonpayable";
4118
+ readonly type: "function";
4119
+ }];
4120
+ static createInterface(): LendingLiquidationInterface;
4121
+ static connect(address: string, runner?: ContractRunner | null): LendingLiquidation;
4122
+ }
4123
+
3528
4124
  declare class Payment__factory {
3529
4125
  static readonly abi: readonly [{
3530
4126
  readonly inputs: readonly [{
@@ -5518,6 +6114,8 @@ declare class Signer__factory {
5518
6114
 
5519
6115
  type index_ERC20__factory = ERC20__factory;
5520
6116
  declare const index_ERC20__factory: typeof ERC20__factory;
6117
+ type index_LendingLiquidation__factory = LendingLiquidation__factory;
6118
+ declare const index_LendingLiquidation__factory: typeof LendingLiquidation__factory;
5521
6119
  type index_Payment__factory = Payment__factory;
5522
6120
  declare const index_Payment__factory: typeof Payment__factory;
5523
6121
  type index_ProtocolFetcherProxy__factory = ProtocolFetcherProxy__factory;
@@ -5527,7 +6125,7 @@ declare const index_Router__factory: typeof Router__factory;
5527
6125
  type index_Signer__factory = Signer__factory;
5528
6126
  declare const index_Signer__factory: typeof Signer__factory;
5529
6127
  declare namespace index {
5530
- export { index_ERC20__factory as ERC20__factory, index_Payment__factory as Payment__factory, index_ProtocolFetcherProxy__factory as ProtocolFetcherProxy__factory, index_Router__factory as Router__factory, index_Signer__factory as Signer__factory };
6128
+ export { index_ERC20__factory as ERC20__factory, index_LendingLiquidation__factory as LendingLiquidation__factory, index_Payment__factory as Payment__factory, index_ProtocolFetcherProxy__factory as ProtocolFetcherProxy__factory, index_Router__factory as Router__factory, index_Signer__factory as Signer__factory };
5531
6129
  }
5532
6130
 
5533
6131
  declare namespace ITypes {
@@ -5563,6 +6161,26 @@ declare namespace ITypes {
5563
6161
  type TradeFinalizationStructOutput = ITypes$1.TradeFinalizationStructOutput;
5564
6162
  }
5565
6163
 
6164
+ declare class ProtocolService implements ConfigObserver {
6165
+ private provider;
6166
+ private contract;
6167
+ constructor();
6168
+ /**
6169
+ * Implementation of ConfigObserver interface
6170
+ * Updates service when config changes
6171
+ */
6172
+ onConfigUpdate(newConfig: AppConfig): void;
6173
+ getCurrentPubkey(network: string): Promise<ITypes.MPCInfoStructOutput>;
6174
+ getPFeeRate({ fromNetworkId, fromTokenId, toNetworkId, toTokenId, }: {
6175
+ fromNetworkId: string;
6176
+ fromTokenId: string;
6177
+ toNetworkId: string;
6178
+ toTokenId: string;
6179
+ }): Promise<number>;
6180
+ getRouter(): Promise<string>;
6181
+ }
6182
+ declare const protocolService: ProtocolService;
6183
+
5566
6184
  declare class RouterService implements ConfigObserver {
5567
6185
  private provider;
5568
6186
  private contract;
@@ -6184,4 +6802,4 @@ declare function camelToSnakeCase(str: string): string;
6184
6802
  declare const ensureHexPrefix: (value: string) => string;
6185
6803
  declare const removeHexPrefix: (value: string) => string;
6186
6804
 
6187
- export { type AppConfig, type ConfigObserver, type ERC20, ERC20__factory, type Environment, type EnvironmentConfig, ITypes, type Payment, Payment__factory, type ProtocolFetcherProxy, ProtocolFetcherProxy__factory, type Router, RouterService, Router__factory, SDK, SignatureType, type Signer, SignerService, Signer__factory, SolverService, type Token, TokenSchema, TokenService, camelToSnakeCase, config, confirmDepositType, confirmPaymentType, confirmSettlementType, convertToCamelCase, convertToSnakeCase, ensureHexPrefix, index as factories, getCommitInfoHash, getMakePaymentHash, getSignature, getSigner, getTradeIdsHash, makePaymentType, presignType, removeHexPrefix, rfqAuthenticationTypes, routerService, sdk, selectionType, signerService, snakeToCamelCase, solverService, tokenService };
6805
+ export { type AppConfig, type ConfigObserver, type ERC20, ERC20__factory, type Environment, type EnvironmentConfig, ITypes, type LendingLiquidation, LendingLiquidation__factory, type Payment, Payment__factory, type ProtocolFetcherProxy, ProtocolFetcherProxy__factory, ProtocolService, type Router, RouterService, Router__factory, SDK, SignatureType, type Signer, SignerService, Signer__factory, SolverService, type Token, TokenSchema, TokenService, camelToSnakeCase, config, confirmDepositType, confirmPaymentType, confirmSettlementType, convertToCamelCase, convertToSnakeCase, ensureHexPrefix, index as factories, getCommitInfoHash, getMakePaymentHash, getSignature, getSigner, getTradeIdsHash, makePaymentType, presignType, protocolService, removeHexPrefix, rfqAuthenticationTypes, routerService, sdk, selectionType, signerService, snakeToCamelCase, solverService, tokenService };