@chainflip/rpc 2.0.1 → 2.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.
- package/dist/common.d.cts +95 -112
- package/dist/common.d.ts +95 -112
- package/dist/parsers.cjs +15 -33
- package/dist/parsers.d.cts +64 -81
- package/dist/parsers.d.ts +64 -81
- package/dist/parsers.mjs +15 -33
- package/package.json +2 -2
package/dist/common.d.cts
CHANGED
|
@@ -80,37 +80,6 @@ type EncodeCfParametersParams = [
|
|
|
80
80
|
dcaParams?: Nullish<DcaParams>
|
|
81
81
|
];
|
|
82
82
|
type RpcRequest = WithHash<{
|
|
83
|
-
broker_request_swap_deposit_address: [
|
|
84
|
-
sourceAsset: UncheckedAssetAndChain,
|
|
85
|
-
destinationAsset: UncheckedAssetAndChain,
|
|
86
|
-
destinationAddress: string,
|
|
87
|
-
brokerCommission: number,
|
|
88
|
-
ccmMetadata: Nullish<CcmParams>,
|
|
89
|
-
boostFee: Nullish<number>,
|
|
90
|
-
affiliateFees: Nullish<{
|
|
91
|
-
account: string;
|
|
92
|
-
bps: number;
|
|
93
|
-
}[]>,
|
|
94
|
-
fillOrKillParams: FillOrKillParams,
|
|
95
|
-
dcaParams?: Nullish<DcaParams>
|
|
96
|
-
];
|
|
97
|
-
broker_request_account_creation_deposit_address: [
|
|
98
|
-
signatureData: {
|
|
99
|
-
Ethereum: {
|
|
100
|
-
signature: HexString;
|
|
101
|
-
signer: HexString;
|
|
102
|
-
sig_type: 'Eip712';
|
|
103
|
-
};
|
|
104
|
-
},
|
|
105
|
-
transactionMetadata: {
|
|
106
|
-
nonce: number;
|
|
107
|
-
expiry_block: number;
|
|
108
|
-
},
|
|
109
|
-
asset: UncheckedAssetAndChain,
|
|
110
|
-
boostFee: Nullish<number>,
|
|
111
|
-
refundAddress: string
|
|
112
|
-
];
|
|
113
|
-
broker_request_swap_parameter_encoding: RequestSwapParameterEncodingParams;
|
|
114
83
|
cf_request_swap_parameter_encoding: [
|
|
115
84
|
brokerAccountId: string,
|
|
116
85
|
...RequestSwapParameterEncodingParams
|
|
@@ -215,6 +184,37 @@ type RpcRequest = WithHash<{
|
|
|
215
184
|
cf_get_vault_addresses: [];
|
|
216
185
|
}> & {
|
|
217
186
|
chain_getBlockHash: [blockHeight?: number];
|
|
187
|
+
broker_request_swap_deposit_address: [
|
|
188
|
+
sourceAsset: UncheckedAssetAndChain,
|
|
189
|
+
destinationAsset: UncheckedAssetAndChain,
|
|
190
|
+
destinationAddress: string,
|
|
191
|
+
brokerCommission: number,
|
|
192
|
+
ccmMetadata: Nullish<CcmParams>,
|
|
193
|
+
boostFee: Nullish<number>,
|
|
194
|
+
affiliateFees: Nullish<{
|
|
195
|
+
account: string;
|
|
196
|
+
bps: number;
|
|
197
|
+
}[]>,
|
|
198
|
+
fillOrKillParams: FillOrKillParams,
|
|
199
|
+
dcaParams?: Nullish<DcaParams>
|
|
200
|
+
];
|
|
201
|
+
broker_request_account_creation_deposit_address: [
|
|
202
|
+
signatureData: {
|
|
203
|
+
Ethereum: {
|
|
204
|
+
signature: HexString;
|
|
205
|
+
signer: HexString;
|
|
206
|
+
sig_type: 'Eip712';
|
|
207
|
+
};
|
|
208
|
+
},
|
|
209
|
+
transactionMetadata: {
|
|
210
|
+
nonce: number;
|
|
211
|
+
expiry_block: number;
|
|
212
|
+
},
|
|
213
|
+
asset: UncheckedAssetAndChain,
|
|
214
|
+
boostFee: Nullish<number>,
|
|
215
|
+
refundAddress: string
|
|
216
|
+
];
|
|
217
|
+
broker_request_swap_parameter_encoding: RequestSwapParameterEncodingParams;
|
|
218
218
|
};
|
|
219
219
|
declare const rpcResult: {
|
|
220
220
|
readonly broker_request_swap_deposit_address: z.ZodObject<{
|
|
@@ -25871,45 +25871,45 @@ declare const rpcResult: {
|
|
|
25871
25871
|
}>, "many">;
|
|
25872
25872
|
readonly cf_lending_config: z.ZodObject<{
|
|
25873
25873
|
ltv_thresholds: z.ZodObject<{
|
|
25874
|
-
target: z.ZodNumber
|
|
25875
|
-
topup: z.ZodNumber
|
|
25876
|
-
soft_liquidation: z.ZodNumber
|
|
25877
|
-
soft_liquidation_abort: z.ZodNumber
|
|
25878
|
-
hard_liquidation: z.ZodNumber
|
|
25879
|
-
hard_liquidation_abort: z.ZodNumber
|
|
25880
|
-
low_ltv: z.ZodNumber
|
|
25881
|
-
}, "strip", z.ZodTypeAny, {
|
|
25882
|
-
target: number;
|
|
25883
|
-
topup: number;
|
|
25884
|
-
soft_liquidation: number;
|
|
25885
|
-
soft_liquidation_abort: number;
|
|
25886
|
-
hard_liquidation: number;
|
|
25887
|
-
hard_liquidation_abort: number;
|
|
25888
|
-
low_ltv: number;
|
|
25889
|
-
}, {
|
|
25890
|
-
target: number;
|
|
25891
|
-
topup: number;
|
|
25892
|
-
soft_liquidation: number;
|
|
25893
|
-
soft_liquidation_abort: number;
|
|
25894
|
-
hard_liquidation: number;
|
|
25895
|
-
hard_liquidation_abort: number;
|
|
25896
|
-
low_ltv: number;
|
|
25874
|
+
target: z.ZodNullable<z.ZodNumber>;
|
|
25875
|
+
topup: z.ZodNullable<z.ZodNumber>;
|
|
25876
|
+
soft_liquidation: z.ZodNullable<z.ZodNumber>;
|
|
25877
|
+
soft_liquidation_abort: z.ZodNullable<z.ZodNumber>;
|
|
25878
|
+
hard_liquidation: z.ZodNullable<z.ZodNumber>;
|
|
25879
|
+
hard_liquidation_abort: z.ZodNullable<z.ZodNumber>;
|
|
25880
|
+
low_ltv: z.ZodNullable<z.ZodNumber>;
|
|
25881
|
+
}, "strip", z.ZodTypeAny, {
|
|
25882
|
+
target: number | null;
|
|
25883
|
+
topup: number | null;
|
|
25884
|
+
soft_liquidation: number | null;
|
|
25885
|
+
soft_liquidation_abort: number | null;
|
|
25886
|
+
hard_liquidation: number | null;
|
|
25887
|
+
hard_liquidation_abort: number | null;
|
|
25888
|
+
low_ltv: number | null;
|
|
25889
|
+
}, {
|
|
25890
|
+
target: number | null;
|
|
25891
|
+
topup: number | null;
|
|
25892
|
+
soft_liquidation: number | null;
|
|
25893
|
+
soft_liquidation_abort: number | null;
|
|
25894
|
+
hard_liquidation: number | null;
|
|
25895
|
+
hard_liquidation_abort: number | null;
|
|
25896
|
+
low_ltv: number | null;
|
|
25897
25897
|
}>;
|
|
25898
25898
|
network_fee_contributions: z.ZodObject<{
|
|
25899
|
-
extra_interest: z.ZodNumber
|
|
25900
|
-
low_ltv_penalty_max: z.ZodNumber
|
|
25901
|
-
from_origination_fee: z.ZodNumber
|
|
25902
|
-
from_liquidation_fee: z.ZodNumber
|
|
25903
|
-
}, "strip", z.ZodTypeAny, {
|
|
25904
|
-
extra_interest: number;
|
|
25905
|
-
low_ltv_penalty_max: number;
|
|
25906
|
-
from_origination_fee: number;
|
|
25907
|
-
from_liquidation_fee: number;
|
|
25908
|
-
}, {
|
|
25909
|
-
extra_interest: number;
|
|
25910
|
-
low_ltv_penalty_max: number;
|
|
25911
|
-
from_origination_fee: number;
|
|
25912
|
-
from_liquidation_fee: number;
|
|
25899
|
+
extra_interest: z.ZodNullable<z.ZodNumber>;
|
|
25900
|
+
low_ltv_penalty_max: z.ZodNullable<z.ZodNumber>;
|
|
25901
|
+
from_origination_fee: z.ZodNullable<z.ZodNumber>;
|
|
25902
|
+
from_liquidation_fee: z.ZodNullable<z.ZodNumber>;
|
|
25903
|
+
}, "strip", z.ZodTypeAny, {
|
|
25904
|
+
extra_interest: number | null;
|
|
25905
|
+
low_ltv_penalty_max: number | null;
|
|
25906
|
+
from_origination_fee: number | null;
|
|
25907
|
+
from_liquidation_fee: number | null;
|
|
25908
|
+
}, {
|
|
25909
|
+
extra_interest: number | null;
|
|
25910
|
+
low_ltv_penalty_max: number | null;
|
|
25911
|
+
from_origination_fee: number | null;
|
|
25912
|
+
from_liquidation_fee: number | null;
|
|
25913
25913
|
}>;
|
|
25914
25914
|
fee_swap_interval_blocks: z.ZodNumber;
|
|
25915
25915
|
interest_payment_interval_blocks: z.ZodNumber;
|
|
@@ -25921,23 +25921,24 @@ declare const rpcResult: {
|
|
|
25921
25921
|
hard_liquidation_max_oracle_slippage: z.ZodNumber;
|
|
25922
25922
|
fee_swap_max_oracle_slippage: z.ZodNumber;
|
|
25923
25923
|
minimum_loan_amount_usd: z.ZodEffects<z.ZodUnion<[z.ZodNumber, z.ZodEffects<z.ZodEffects<z.ZodString, `0x${string}`, string>, bigint, string>, z.ZodString]>, bigint, string | number>;
|
|
25924
|
+
minimum_supply_amount_usd: z.ZodEffects<z.ZodUnion<[z.ZodNumber, z.ZodEffects<z.ZodEffects<z.ZodString, `0x${string}`, string>, bigint, string>, z.ZodString]>, bigint, string | number>;
|
|
25924
25925
|
minimum_update_loan_amount_usd: z.ZodEffects<z.ZodUnion<[z.ZodNumber, z.ZodEffects<z.ZodEffects<z.ZodString, `0x${string}`, string>, bigint, string>, z.ZodString]>, bigint, string | number>;
|
|
25925
25926
|
minimum_update_collateral_amount_usd: z.ZodEffects<z.ZodUnion<[z.ZodNumber, z.ZodEffects<z.ZodEffects<z.ZodString, `0x${string}`, string>, bigint, string>, z.ZodString]>, bigint, string | number>;
|
|
25926
25927
|
}, "strip", z.ZodTypeAny, {
|
|
25927
25928
|
ltv_thresholds: {
|
|
25928
|
-
target: number;
|
|
25929
|
-
topup: number;
|
|
25930
|
-
soft_liquidation: number;
|
|
25931
|
-
soft_liquidation_abort: number;
|
|
25932
|
-
hard_liquidation: number;
|
|
25933
|
-
hard_liquidation_abort: number;
|
|
25934
|
-
low_ltv: number;
|
|
25929
|
+
target: number | null;
|
|
25930
|
+
topup: number | null;
|
|
25931
|
+
soft_liquidation: number | null;
|
|
25932
|
+
soft_liquidation_abort: number | null;
|
|
25933
|
+
hard_liquidation: number | null;
|
|
25934
|
+
hard_liquidation_abort: number | null;
|
|
25935
|
+
low_ltv: number | null;
|
|
25935
25936
|
};
|
|
25936
25937
|
network_fee_contributions: {
|
|
25937
|
-
extra_interest: number;
|
|
25938
|
-
low_ltv_penalty_max: number;
|
|
25939
|
-
from_origination_fee: number;
|
|
25940
|
-
from_liquidation_fee: number;
|
|
25938
|
+
extra_interest: number | null;
|
|
25939
|
+
low_ltv_penalty_max: number | null;
|
|
25940
|
+
from_origination_fee: number | null;
|
|
25941
|
+
from_liquidation_fee: number | null;
|
|
25941
25942
|
};
|
|
25942
25943
|
fee_swap_interval_blocks: number;
|
|
25943
25944
|
interest_payment_interval_blocks: number;
|
|
@@ -25949,23 +25950,24 @@ declare const rpcResult: {
|
|
|
25949
25950
|
hard_liquidation_max_oracle_slippage: number;
|
|
25950
25951
|
fee_swap_max_oracle_slippage: number;
|
|
25951
25952
|
minimum_loan_amount_usd: bigint;
|
|
25953
|
+
minimum_supply_amount_usd: bigint;
|
|
25952
25954
|
minimum_update_loan_amount_usd: bigint;
|
|
25953
25955
|
minimum_update_collateral_amount_usd: bigint;
|
|
25954
25956
|
}, {
|
|
25955
25957
|
ltv_thresholds: {
|
|
25956
|
-
target: number;
|
|
25957
|
-
topup: number;
|
|
25958
|
-
soft_liquidation: number;
|
|
25959
|
-
soft_liquidation_abort: number;
|
|
25960
|
-
hard_liquidation: number;
|
|
25961
|
-
hard_liquidation_abort: number;
|
|
25962
|
-
low_ltv: number;
|
|
25958
|
+
target: number | null;
|
|
25959
|
+
topup: number | null;
|
|
25960
|
+
soft_liquidation: number | null;
|
|
25961
|
+
soft_liquidation_abort: number | null;
|
|
25962
|
+
hard_liquidation: number | null;
|
|
25963
|
+
hard_liquidation_abort: number | null;
|
|
25964
|
+
low_ltv: number | null;
|
|
25963
25965
|
};
|
|
25964
25966
|
network_fee_contributions: {
|
|
25965
|
-
extra_interest: number;
|
|
25966
|
-
low_ltv_penalty_max: number;
|
|
25967
|
-
from_origination_fee: number;
|
|
25968
|
-
from_liquidation_fee: number;
|
|
25967
|
+
extra_interest: number | null;
|
|
25968
|
+
low_ltv_penalty_max: number | null;
|
|
25969
|
+
from_origination_fee: number | null;
|
|
25970
|
+
from_liquidation_fee: number | null;
|
|
25969
25971
|
};
|
|
25970
25972
|
fee_swap_interval_blocks: number;
|
|
25971
25973
|
interest_payment_interval_blocks: number;
|
|
@@ -25977,6 +25979,7 @@ declare const rpcResult: {
|
|
|
25977
25979
|
hard_liquidation_max_oracle_slippage: number;
|
|
25978
25980
|
fee_swap_max_oracle_slippage: number;
|
|
25979
25981
|
minimum_loan_amount_usd: string | number;
|
|
25982
|
+
minimum_supply_amount_usd: string | number;
|
|
25980
25983
|
minimum_update_loan_amount_usd: string | number;
|
|
25981
25984
|
minimum_update_collateral_amount_usd: string | number;
|
|
25982
25985
|
}>;
|
|
@@ -26870,7 +26873,7 @@ declare const rpcResult: {
|
|
|
26870
26873
|
lp_id: string;
|
|
26871
26874
|
}[];
|
|
26872
26875
|
}>>, "many">;
|
|
26873
|
-
readonly cf_get_vault_addresses: z.ZodEffects<z.
|
|
26876
|
+
readonly cf_get_vault_addresses: z.ZodEffects<z.ZodObject<{
|
|
26874
26877
|
ethereum: z.ZodObject<{
|
|
26875
26878
|
Eth: z.ZodEffects<z.ZodArray<z.ZodNumber, "many">, `0x${string}`, number[]>;
|
|
26876
26879
|
}, "strip", z.ZodTypeAny, {
|
|
@@ -26915,27 +26918,7 @@ declare const rpcResult: {
|
|
|
26915
26918
|
}>, {
|
|
26916
26919
|
Ethereum: `0x${string}`;
|
|
26917
26920
|
Arbitrum: `0x${string}`;
|
|
26918
|
-
Bitcoin: Map<`cF${string}`,
|
|
26919
|
-
current: string;
|
|
26920
|
-
previous: string;
|
|
26921
|
-
}>;
|
|
26922
|
-
}, {
|
|
26923
|
-
ethereum: {
|
|
26924
|
-
Eth: number[];
|
|
26925
|
-
};
|
|
26926
|
-
arbitrum: {
|
|
26927
|
-
Arb: number[];
|
|
26928
|
-
};
|
|
26929
|
-
bitcoin: [string, {
|
|
26930
|
-
Btc: number[];
|
|
26931
|
-
}][];
|
|
26932
|
-
}>, {
|
|
26933
|
-
Ethereum: `0x${string}`;
|
|
26934
|
-
Arbitrum: `0x${string}`;
|
|
26935
|
-
Bitcoin: Map<`cF${string}`, {
|
|
26936
|
-
current: string;
|
|
26937
|
-
previous: string;
|
|
26938
|
-
}>;
|
|
26921
|
+
Bitcoin: Map<`cF${string}`, string>;
|
|
26939
26922
|
}, {
|
|
26940
26923
|
ethereum: {
|
|
26941
26924
|
Eth: number[];
|
package/dist/common.d.ts
CHANGED
|
@@ -80,37 +80,6 @@ type EncodeCfParametersParams = [
|
|
|
80
80
|
dcaParams?: Nullish<DcaParams>
|
|
81
81
|
];
|
|
82
82
|
type RpcRequest = WithHash<{
|
|
83
|
-
broker_request_swap_deposit_address: [
|
|
84
|
-
sourceAsset: UncheckedAssetAndChain,
|
|
85
|
-
destinationAsset: UncheckedAssetAndChain,
|
|
86
|
-
destinationAddress: string,
|
|
87
|
-
brokerCommission: number,
|
|
88
|
-
ccmMetadata: Nullish<CcmParams>,
|
|
89
|
-
boostFee: Nullish<number>,
|
|
90
|
-
affiliateFees: Nullish<{
|
|
91
|
-
account: string;
|
|
92
|
-
bps: number;
|
|
93
|
-
}[]>,
|
|
94
|
-
fillOrKillParams: FillOrKillParams,
|
|
95
|
-
dcaParams?: Nullish<DcaParams>
|
|
96
|
-
];
|
|
97
|
-
broker_request_account_creation_deposit_address: [
|
|
98
|
-
signatureData: {
|
|
99
|
-
Ethereum: {
|
|
100
|
-
signature: HexString;
|
|
101
|
-
signer: HexString;
|
|
102
|
-
sig_type: 'Eip712';
|
|
103
|
-
};
|
|
104
|
-
},
|
|
105
|
-
transactionMetadata: {
|
|
106
|
-
nonce: number;
|
|
107
|
-
expiry_block: number;
|
|
108
|
-
},
|
|
109
|
-
asset: UncheckedAssetAndChain,
|
|
110
|
-
boostFee: Nullish<number>,
|
|
111
|
-
refundAddress: string
|
|
112
|
-
];
|
|
113
|
-
broker_request_swap_parameter_encoding: RequestSwapParameterEncodingParams;
|
|
114
83
|
cf_request_swap_parameter_encoding: [
|
|
115
84
|
brokerAccountId: string,
|
|
116
85
|
...RequestSwapParameterEncodingParams
|
|
@@ -215,6 +184,37 @@ type RpcRequest = WithHash<{
|
|
|
215
184
|
cf_get_vault_addresses: [];
|
|
216
185
|
}> & {
|
|
217
186
|
chain_getBlockHash: [blockHeight?: number];
|
|
187
|
+
broker_request_swap_deposit_address: [
|
|
188
|
+
sourceAsset: UncheckedAssetAndChain,
|
|
189
|
+
destinationAsset: UncheckedAssetAndChain,
|
|
190
|
+
destinationAddress: string,
|
|
191
|
+
brokerCommission: number,
|
|
192
|
+
ccmMetadata: Nullish<CcmParams>,
|
|
193
|
+
boostFee: Nullish<number>,
|
|
194
|
+
affiliateFees: Nullish<{
|
|
195
|
+
account: string;
|
|
196
|
+
bps: number;
|
|
197
|
+
}[]>,
|
|
198
|
+
fillOrKillParams: FillOrKillParams,
|
|
199
|
+
dcaParams?: Nullish<DcaParams>
|
|
200
|
+
];
|
|
201
|
+
broker_request_account_creation_deposit_address: [
|
|
202
|
+
signatureData: {
|
|
203
|
+
Ethereum: {
|
|
204
|
+
signature: HexString;
|
|
205
|
+
signer: HexString;
|
|
206
|
+
sig_type: 'Eip712';
|
|
207
|
+
};
|
|
208
|
+
},
|
|
209
|
+
transactionMetadata: {
|
|
210
|
+
nonce: number;
|
|
211
|
+
expiry_block: number;
|
|
212
|
+
},
|
|
213
|
+
asset: UncheckedAssetAndChain,
|
|
214
|
+
boostFee: Nullish<number>,
|
|
215
|
+
refundAddress: string
|
|
216
|
+
];
|
|
217
|
+
broker_request_swap_parameter_encoding: RequestSwapParameterEncodingParams;
|
|
218
218
|
};
|
|
219
219
|
declare const rpcResult: {
|
|
220
220
|
readonly broker_request_swap_deposit_address: z.ZodObject<{
|
|
@@ -25871,45 +25871,45 @@ declare const rpcResult: {
|
|
|
25871
25871
|
}>, "many">;
|
|
25872
25872
|
readonly cf_lending_config: z.ZodObject<{
|
|
25873
25873
|
ltv_thresholds: z.ZodObject<{
|
|
25874
|
-
target: z.ZodNumber
|
|
25875
|
-
topup: z.ZodNumber
|
|
25876
|
-
soft_liquidation: z.ZodNumber
|
|
25877
|
-
soft_liquidation_abort: z.ZodNumber
|
|
25878
|
-
hard_liquidation: z.ZodNumber
|
|
25879
|
-
hard_liquidation_abort: z.ZodNumber
|
|
25880
|
-
low_ltv: z.ZodNumber
|
|
25881
|
-
}, "strip", z.ZodTypeAny, {
|
|
25882
|
-
target: number;
|
|
25883
|
-
topup: number;
|
|
25884
|
-
soft_liquidation: number;
|
|
25885
|
-
soft_liquidation_abort: number;
|
|
25886
|
-
hard_liquidation: number;
|
|
25887
|
-
hard_liquidation_abort: number;
|
|
25888
|
-
low_ltv: number;
|
|
25889
|
-
}, {
|
|
25890
|
-
target: number;
|
|
25891
|
-
topup: number;
|
|
25892
|
-
soft_liquidation: number;
|
|
25893
|
-
soft_liquidation_abort: number;
|
|
25894
|
-
hard_liquidation: number;
|
|
25895
|
-
hard_liquidation_abort: number;
|
|
25896
|
-
low_ltv: number;
|
|
25874
|
+
target: z.ZodNullable<z.ZodNumber>;
|
|
25875
|
+
topup: z.ZodNullable<z.ZodNumber>;
|
|
25876
|
+
soft_liquidation: z.ZodNullable<z.ZodNumber>;
|
|
25877
|
+
soft_liquidation_abort: z.ZodNullable<z.ZodNumber>;
|
|
25878
|
+
hard_liquidation: z.ZodNullable<z.ZodNumber>;
|
|
25879
|
+
hard_liquidation_abort: z.ZodNullable<z.ZodNumber>;
|
|
25880
|
+
low_ltv: z.ZodNullable<z.ZodNumber>;
|
|
25881
|
+
}, "strip", z.ZodTypeAny, {
|
|
25882
|
+
target: number | null;
|
|
25883
|
+
topup: number | null;
|
|
25884
|
+
soft_liquidation: number | null;
|
|
25885
|
+
soft_liquidation_abort: number | null;
|
|
25886
|
+
hard_liquidation: number | null;
|
|
25887
|
+
hard_liquidation_abort: number | null;
|
|
25888
|
+
low_ltv: number | null;
|
|
25889
|
+
}, {
|
|
25890
|
+
target: number | null;
|
|
25891
|
+
topup: number | null;
|
|
25892
|
+
soft_liquidation: number | null;
|
|
25893
|
+
soft_liquidation_abort: number | null;
|
|
25894
|
+
hard_liquidation: number | null;
|
|
25895
|
+
hard_liquidation_abort: number | null;
|
|
25896
|
+
low_ltv: number | null;
|
|
25897
25897
|
}>;
|
|
25898
25898
|
network_fee_contributions: z.ZodObject<{
|
|
25899
|
-
extra_interest: z.ZodNumber
|
|
25900
|
-
low_ltv_penalty_max: z.ZodNumber
|
|
25901
|
-
from_origination_fee: z.ZodNumber
|
|
25902
|
-
from_liquidation_fee: z.ZodNumber
|
|
25903
|
-
}, "strip", z.ZodTypeAny, {
|
|
25904
|
-
extra_interest: number;
|
|
25905
|
-
low_ltv_penalty_max: number;
|
|
25906
|
-
from_origination_fee: number;
|
|
25907
|
-
from_liquidation_fee: number;
|
|
25908
|
-
}, {
|
|
25909
|
-
extra_interest: number;
|
|
25910
|
-
low_ltv_penalty_max: number;
|
|
25911
|
-
from_origination_fee: number;
|
|
25912
|
-
from_liquidation_fee: number;
|
|
25899
|
+
extra_interest: z.ZodNullable<z.ZodNumber>;
|
|
25900
|
+
low_ltv_penalty_max: z.ZodNullable<z.ZodNumber>;
|
|
25901
|
+
from_origination_fee: z.ZodNullable<z.ZodNumber>;
|
|
25902
|
+
from_liquidation_fee: z.ZodNullable<z.ZodNumber>;
|
|
25903
|
+
}, "strip", z.ZodTypeAny, {
|
|
25904
|
+
extra_interest: number | null;
|
|
25905
|
+
low_ltv_penalty_max: number | null;
|
|
25906
|
+
from_origination_fee: number | null;
|
|
25907
|
+
from_liquidation_fee: number | null;
|
|
25908
|
+
}, {
|
|
25909
|
+
extra_interest: number | null;
|
|
25910
|
+
low_ltv_penalty_max: number | null;
|
|
25911
|
+
from_origination_fee: number | null;
|
|
25912
|
+
from_liquidation_fee: number | null;
|
|
25913
25913
|
}>;
|
|
25914
25914
|
fee_swap_interval_blocks: z.ZodNumber;
|
|
25915
25915
|
interest_payment_interval_blocks: z.ZodNumber;
|
|
@@ -25921,23 +25921,24 @@ declare const rpcResult: {
|
|
|
25921
25921
|
hard_liquidation_max_oracle_slippage: z.ZodNumber;
|
|
25922
25922
|
fee_swap_max_oracle_slippage: z.ZodNumber;
|
|
25923
25923
|
minimum_loan_amount_usd: z.ZodEffects<z.ZodUnion<[z.ZodNumber, z.ZodEffects<z.ZodEffects<z.ZodString, `0x${string}`, string>, bigint, string>, z.ZodString]>, bigint, string | number>;
|
|
25924
|
+
minimum_supply_amount_usd: z.ZodEffects<z.ZodUnion<[z.ZodNumber, z.ZodEffects<z.ZodEffects<z.ZodString, `0x${string}`, string>, bigint, string>, z.ZodString]>, bigint, string | number>;
|
|
25924
25925
|
minimum_update_loan_amount_usd: z.ZodEffects<z.ZodUnion<[z.ZodNumber, z.ZodEffects<z.ZodEffects<z.ZodString, `0x${string}`, string>, bigint, string>, z.ZodString]>, bigint, string | number>;
|
|
25925
25926
|
minimum_update_collateral_amount_usd: z.ZodEffects<z.ZodUnion<[z.ZodNumber, z.ZodEffects<z.ZodEffects<z.ZodString, `0x${string}`, string>, bigint, string>, z.ZodString]>, bigint, string | number>;
|
|
25926
25927
|
}, "strip", z.ZodTypeAny, {
|
|
25927
25928
|
ltv_thresholds: {
|
|
25928
|
-
target: number;
|
|
25929
|
-
topup: number;
|
|
25930
|
-
soft_liquidation: number;
|
|
25931
|
-
soft_liquidation_abort: number;
|
|
25932
|
-
hard_liquidation: number;
|
|
25933
|
-
hard_liquidation_abort: number;
|
|
25934
|
-
low_ltv: number;
|
|
25929
|
+
target: number | null;
|
|
25930
|
+
topup: number | null;
|
|
25931
|
+
soft_liquidation: number | null;
|
|
25932
|
+
soft_liquidation_abort: number | null;
|
|
25933
|
+
hard_liquidation: number | null;
|
|
25934
|
+
hard_liquidation_abort: number | null;
|
|
25935
|
+
low_ltv: number | null;
|
|
25935
25936
|
};
|
|
25936
25937
|
network_fee_contributions: {
|
|
25937
|
-
extra_interest: number;
|
|
25938
|
-
low_ltv_penalty_max: number;
|
|
25939
|
-
from_origination_fee: number;
|
|
25940
|
-
from_liquidation_fee: number;
|
|
25938
|
+
extra_interest: number | null;
|
|
25939
|
+
low_ltv_penalty_max: number | null;
|
|
25940
|
+
from_origination_fee: number | null;
|
|
25941
|
+
from_liquidation_fee: number | null;
|
|
25941
25942
|
};
|
|
25942
25943
|
fee_swap_interval_blocks: number;
|
|
25943
25944
|
interest_payment_interval_blocks: number;
|
|
@@ -25949,23 +25950,24 @@ declare const rpcResult: {
|
|
|
25949
25950
|
hard_liquidation_max_oracle_slippage: number;
|
|
25950
25951
|
fee_swap_max_oracle_slippage: number;
|
|
25951
25952
|
minimum_loan_amount_usd: bigint;
|
|
25953
|
+
minimum_supply_amount_usd: bigint;
|
|
25952
25954
|
minimum_update_loan_amount_usd: bigint;
|
|
25953
25955
|
minimum_update_collateral_amount_usd: bigint;
|
|
25954
25956
|
}, {
|
|
25955
25957
|
ltv_thresholds: {
|
|
25956
|
-
target: number;
|
|
25957
|
-
topup: number;
|
|
25958
|
-
soft_liquidation: number;
|
|
25959
|
-
soft_liquidation_abort: number;
|
|
25960
|
-
hard_liquidation: number;
|
|
25961
|
-
hard_liquidation_abort: number;
|
|
25962
|
-
low_ltv: number;
|
|
25958
|
+
target: number | null;
|
|
25959
|
+
topup: number | null;
|
|
25960
|
+
soft_liquidation: number | null;
|
|
25961
|
+
soft_liquidation_abort: number | null;
|
|
25962
|
+
hard_liquidation: number | null;
|
|
25963
|
+
hard_liquidation_abort: number | null;
|
|
25964
|
+
low_ltv: number | null;
|
|
25963
25965
|
};
|
|
25964
25966
|
network_fee_contributions: {
|
|
25965
|
-
extra_interest: number;
|
|
25966
|
-
low_ltv_penalty_max: number;
|
|
25967
|
-
from_origination_fee: number;
|
|
25968
|
-
from_liquidation_fee: number;
|
|
25967
|
+
extra_interest: number | null;
|
|
25968
|
+
low_ltv_penalty_max: number | null;
|
|
25969
|
+
from_origination_fee: number | null;
|
|
25970
|
+
from_liquidation_fee: number | null;
|
|
25969
25971
|
};
|
|
25970
25972
|
fee_swap_interval_blocks: number;
|
|
25971
25973
|
interest_payment_interval_blocks: number;
|
|
@@ -25977,6 +25979,7 @@ declare const rpcResult: {
|
|
|
25977
25979
|
hard_liquidation_max_oracle_slippage: number;
|
|
25978
25980
|
fee_swap_max_oracle_slippage: number;
|
|
25979
25981
|
minimum_loan_amount_usd: string | number;
|
|
25982
|
+
minimum_supply_amount_usd: string | number;
|
|
25980
25983
|
minimum_update_loan_amount_usd: string | number;
|
|
25981
25984
|
minimum_update_collateral_amount_usd: string | number;
|
|
25982
25985
|
}>;
|
|
@@ -26870,7 +26873,7 @@ declare const rpcResult: {
|
|
|
26870
26873
|
lp_id: string;
|
|
26871
26874
|
}[];
|
|
26872
26875
|
}>>, "many">;
|
|
26873
|
-
readonly cf_get_vault_addresses: z.ZodEffects<z.
|
|
26876
|
+
readonly cf_get_vault_addresses: z.ZodEffects<z.ZodObject<{
|
|
26874
26877
|
ethereum: z.ZodObject<{
|
|
26875
26878
|
Eth: z.ZodEffects<z.ZodArray<z.ZodNumber, "many">, `0x${string}`, number[]>;
|
|
26876
26879
|
}, "strip", z.ZodTypeAny, {
|
|
@@ -26915,27 +26918,7 @@ declare const rpcResult: {
|
|
|
26915
26918
|
}>, {
|
|
26916
26919
|
Ethereum: `0x${string}`;
|
|
26917
26920
|
Arbitrum: `0x${string}`;
|
|
26918
|
-
Bitcoin: Map<`cF${string}`,
|
|
26919
|
-
current: string;
|
|
26920
|
-
previous: string;
|
|
26921
|
-
}>;
|
|
26922
|
-
}, {
|
|
26923
|
-
ethereum: {
|
|
26924
|
-
Eth: number[];
|
|
26925
|
-
};
|
|
26926
|
-
arbitrum: {
|
|
26927
|
-
Arb: number[];
|
|
26928
|
-
};
|
|
26929
|
-
bitcoin: [string, {
|
|
26930
|
-
Btc: number[];
|
|
26931
|
-
}][];
|
|
26932
|
-
}>, {
|
|
26933
|
-
Ethereum: `0x${string}`;
|
|
26934
|
-
Arbitrum: `0x${string}`;
|
|
26935
|
-
Bitcoin: Map<`cF${string}`, {
|
|
26936
|
-
current: string;
|
|
26937
|
-
previous: string;
|
|
26938
|
-
}>;
|
|
26921
|
+
Bitcoin: Map<`cF${string}`, string>;
|
|
26939
26922
|
}, {
|
|
26940
26923
|
ethereum: {
|
|
26941
26924
|
Eth: number[];
|
package/dist/parsers.cjs
CHANGED
|
@@ -609,19 +609,19 @@ var cfLendingPools = _zod.z.array(
|
|
|
609
609
|
);
|
|
610
610
|
var cfLendingConfig = _zod.z.object({
|
|
611
611
|
ltv_thresholds: _zod.z.object({
|
|
612
|
-
target: _zod.z.number(),
|
|
613
|
-
topup: _zod.z.number(),
|
|
614
|
-
soft_liquidation: _zod.z.number(),
|
|
615
|
-
soft_liquidation_abort: _zod.z.number(),
|
|
616
|
-
hard_liquidation: _zod.z.number(),
|
|
617
|
-
hard_liquidation_abort: _zod.z.number(),
|
|
618
|
-
low_ltv: _zod.z.number()
|
|
612
|
+
target: _zod.z.number().nullable(),
|
|
613
|
+
topup: _zod.z.number().nullable(),
|
|
614
|
+
soft_liquidation: _zod.z.number().nullable(),
|
|
615
|
+
soft_liquidation_abort: _zod.z.number().nullable(),
|
|
616
|
+
hard_liquidation: _zod.z.number().nullable(),
|
|
617
|
+
hard_liquidation_abort: _zod.z.number().nullable(),
|
|
618
|
+
low_ltv: _zod.z.number().nullable()
|
|
619
619
|
}),
|
|
620
620
|
network_fee_contributions: _zod.z.object({
|
|
621
|
-
extra_interest: _zod.z.number(),
|
|
622
|
-
low_ltv_penalty_max: _zod.z.number(),
|
|
623
|
-
from_origination_fee: _zod.z.number(),
|
|
624
|
-
from_liquidation_fee: _zod.z.number()
|
|
621
|
+
extra_interest: _zod.z.number().nullable(),
|
|
622
|
+
low_ltv_penalty_max: _zod.z.number().nullable(),
|
|
623
|
+
from_origination_fee: _zod.z.number().nullable(),
|
|
624
|
+
from_liquidation_fee: _zod.z.number().nullable()
|
|
625
625
|
}),
|
|
626
626
|
fee_swap_interval_blocks: _zod.z.number(),
|
|
627
627
|
interest_payment_interval_blocks: _zod.z.number(),
|
|
@@ -633,6 +633,7 @@ var cfLendingConfig = _zod.z.object({
|
|
|
633
633
|
hard_liquidation_max_oracle_slippage: _zod.z.number(),
|
|
634
634
|
fee_swap_max_oracle_slippage: _zod.z.number(),
|
|
635
635
|
minimum_loan_amount_usd: numberOrHex,
|
|
636
|
+
minimum_supply_amount_usd: numberOrHex,
|
|
636
637
|
minimum_update_loan_amount_usd: numberOrHex,
|
|
637
638
|
minimum_update_collateral_amount_usd: numberOrHex
|
|
638
639
|
});
|
|
@@ -691,33 +692,14 @@ var cfVaultAddresses = _zod.z.object({
|
|
|
691
692
|
])
|
|
692
693
|
)
|
|
693
694
|
}).transform(({ ethereum, arbitrum, bitcoin }) => {
|
|
694
|
-
const bitcoinAddresses =
|
|
695
|
-
|
|
696
|
-
|
|
697
|
-
obj = { current: "", previous: "" };
|
|
698
|
-
acc.set(brokerId, obj);
|
|
699
|
-
}
|
|
700
|
-
if (!obj.previous) {
|
|
701
|
-
obj.previous = Btc;
|
|
702
|
-
} else {
|
|
703
|
-
obj.current = Btc;
|
|
704
|
-
}
|
|
705
|
-
return acc;
|
|
706
|
-
}, /* @__PURE__ */ new Map());
|
|
695
|
+
const bitcoinAddresses = new Map(
|
|
696
|
+
bitcoin.map(([brokerId, { Btc }]) => [brokerId, Btc])
|
|
697
|
+
);
|
|
707
698
|
return {
|
|
708
699
|
Ethereum: ethereum.Eth,
|
|
709
700
|
Arbitrum: arbitrum.Arb,
|
|
710
701
|
Bitcoin: bitcoinAddresses
|
|
711
702
|
};
|
|
712
|
-
}).superRefine(({ Bitcoin }, ctx) => {
|
|
713
|
-
Bitcoin.forEach((value, key) => {
|
|
714
|
-
if (!value.current) {
|
|
715
|
-
ctx.addIssue({
|
|
716
|
-
message: `No current BTC address for broker ${key}`,
|
|
717
|
-
code: _zod.z.ZodIssueCode.custom
|
|
718
|
-
});
|
|
719
|
-
}
|
|
720
|
-
});
|
|
721
703
|
});
|
|
722
704
|
|
|
723
705
|
|
package/dist/parsers.d.cts
CHANGED
|
@@ -30173,45 +30173,45 @@ declare const cfLendingPools: z.ZodArray<z.ZodObject<{
|
|
|
30173
30173
|
}>, "many">;
|
|
30174
30174
|
declare const cfLendingConfig: z.ZodObject<{
|
|
30175
30175
|
ltv_thresholds: z.ZodObject<{
|
|
30176
|
-
target: z.ZodNumber
|
|
30177
|
-
topup: z.ZodNumber
|
|
30178
|
-
soft_liquidation: z.ZodNumber
|
|
30179
|
-
soft_liquidation_abort: z.ZodNumber
|
|
30180
|
-
hard_liquidation: z.ZodNumber
|
|
30181
|
-
hard_liquidation_abort: z.ZodNumber
|
|
30182
|
-
low_ltv: z.ZodNumber
|
|
30183
|
-
}, "strip", z.ZodTypeAny, {
|
|
30184
|
-
target: number;
|
|
30185
|
-
topup: number;
|
|
30186
|
-
soft_liquidation: number;
|
|
30187
|
-
soft_liquidation_abort: number;
|
|
30188
|
-
hard_liquidation: number;
|
|
30189
|
-
hard_liquidation_abort: number;
|
|
30190
|
-
low_ltv: number;
|
|
30191
|
-
}, {
|
|
30192
|
-
target: number;
|
|
30193
|
-
topup: number;
|
|
30194
|
-
soft_liquidation: number;
|
|
30195
|
-
soft_liquidation_abort: number;
|
|
30196
|
-
hard_liquidation: number;
|
|
30197
|
-
hard_liquidation_abort: number;
|
|
30198
|
-
low_ltv: number;
|
|
30176
|
+
target: z.ZodNullable<z.ZodNumber>;
|
|
30177
|
+
topup: z.ZodNullable<z.ZodNumber>;
|
|
30178
|
+
soft_liquidation: z.ZodNullable<z.ZodNumber>;
|
|
30179
|
+
soft_liquidation_abort: z.ZodNullable<z.ZodNumber>;
|
|
30180
|
+
hard_liquidation: z.ZodNullable<z.ZodNumber>;
|
|
30181
|
+
hard_liquidation_abort: z.ZodNullable<z.ZodNumber>;
|
|
30182
|
+
low_ltv: z.ZodNullable<z.ZodNumber>;
|
|
30183
|
+
}, "strip", z.ZodTypeAny, {
|
|
30184
|
+
target: number | null;
|
|
30185
|
+
topup: number | null;
|
|
30186
|
+
soft_liquidation: number | null;
|
|
30187
|
+
soft_liquidation_abort: number | null;
|
|
30188
|
+
hard_liquidation: number | null;
|
|
30189
|
+
hard_liquidation_abort: number | null;
|
|
30190
|
+
low_ltv: number | null;
|
|
30191
|
+
}, {
|
|
30192
|
+
target: number | null;
|
|
30193
|
+
topup: number | null;
|
|
30194
|
+
soft_liquidation: number | null;
|
|
30195
|
+
soft_liquidation_abort: number | null;
|
|
30196
|
+
hard_liquidation: number | null;
|
|
30197
|
+
hard_liquidation_abort: number | null;
|
|
30198
|
+
low_ltv: number | null;
|
|
30199
30199
|
}>;
|
|
30200
30200
|
network_fee_contributions: z.ZodObject<{
|
|
30201
|
-
extra_interest: z.ZodNumber
|
|
30202
|
-
low_ltv_penalty_max: z.ZodNumber
|
|
30203
|
-
from_origination_fee: z.ZodNumber
|
|
30204
|
-
from_liquidation_fee: z.ZodNumber
|
|
30205
|
-
}, "strip", z.ZodTypeAny, {
|
|
30206
|
-
extra_interest: number;
|
|
30207
|
-
low_ltv_penalty_max: number;
|
|
30208
|
-
from_origination_fee: number;
|
|
30209
|
-
from_liquidation_fee: number;
|
|
30210
|
-
}, {
|
|
30211
|
-
extra_interest: number;
|
|
30212
|
-
low_ltv_penalty_max: number;
|
|
30213
|
-
from_origination_fee: number;
|
|
30214
|
-
from_liquidation_fee: number;
|
|
30201
|
+
extra_interest: z.ZodNullable<z.ZodNumber>;
|
|
30202
|
+
low_ltv_penalty_max: z.ZodNullable<z.ZodNumber>;
|
|
30203
|
+
from_origination_fee: z.ZodNullable<z.ZodNumber>;
|
|
30204
|
+
from_liquidation_fee: z.ZodNullable<z.ZodNumber>;
|
|
30205
|
+
}, "strip", z.ZodTypeAny, {
|
|
30206
|
+
extra_interest: number | null;
|
|
30207
|
+
low_ltv_penalty_max: number | null;
|
|
30208
|
+
from_origination_fee: number | null;
|
|
30209
|
+
from_liquidation_fee: number | null;
|
|
30210
|
+
}, {
|
|
30211
|
+
extra_interest: number | null;
|
|
30212
|
+
low_ltv_penalty_max: number | null;
|
|
30213
|
+
from_origination_fee: number | null;
|
|
30214
|
+
from_liquidation_fee: number | null;
|
|
30215
30215
|
}>;
|
|
30216
30216
|
fee_swap_interval_blocks: z.ZodNumber;
|
|
30217
30217
|
interest_payment_interval_blocks: z.ZodNumber;
|
|
@@ -30223,23 +30223,24 @@ declare const cfLendingConfig: z.ZodObject<{
|
|
|
30223
30223
|
hard_liquidation_max_oracle_slippage: z.ZodNumber;
|
|
30224
30224
|
fee_swap_max_oracle_slippage: z.ZodNumber;
|
|
30225
30225
|
minimum_loan_amount_usd: z.ZodEffects<z.ZodUnion<[z.ZodNumber, z.ZodEffects<z.ZodEffects<z.ZodString, `0x${string}`, string>, bigint, string>, z.ZodString]>, bigint, string | number>;
|
|
30226
|
+
minimum_supply_amount_usd: z.ZodEffects<z.ZodUnion<[z.ZodNumber, z.ZodEffects<z.ZodEffects<z.ZodString, `0x${string}`, string>, bigint, string>, z.ZodString]>, bigint, string | number>;
|
|
30226
30227
|
minimum_update_loan_amount_usd: z.ZodEffects<z.ZodUnion<[z.ZodNumber, z.ZodEffects<z.ZodEffects<z.ZodString, `0x${string}`, string>, bigint, string>, z.ZodString]>, bigint, string | number>;
|
|
30227
30228
|
minimum_update_collateral_amount_usd: z.ZodEffects<z.ZodUnion<[z.ZodNumber, z.ZodEffects<z.ZodEffects<z.ZodString, `0x${string}`, string>, bigint, string>, z.ZodString]>, bigint, string | number>;
|
|
30228
30229
|
}, "strip", z.ZodTypeAny, {
|
|
30229
30230
|
ltv_thresholds: {
|
|
30230
|
-
target: number;
|
|
30231
|
-
topup: number;
|
|
30232
|
-
soft_liquidation: number;
|
|
30233
|
-
soft_liquidation_abort: number;
|
|
30234
|
-
hard_liquidation: number;
|
|
30235
|
-
hard_liquidation_abort: number;
|
|
30236
|
-
low_ltv: number;
|
|
30231
|
+
target: number | null;
|
|
30232
|
+
topup: number | null;
|
|
30233
|
+
soft_liquidation: number | null;
|
|
30234
|
+
soft_liquidation_abort: number | null;
|
|
30235
|
+
hard_liquidation: number | null;
|
|
30236
|
+
hard_liquidation_abort: number | null;
|
|
30237
|
+
low_ltv: number | null;
|
|
30237
30238
|
};
|
|
30238
30239
|
network_fee_contributions: {
|
|
30239
|
-
extra_interest: number;
|
|
30240
|
-
low_ltv_penalty_max: number;
|
|
30241
|
-
from_origination_fee: number;
|
|
30242
|
-
from_liquidation_fee: number;
|
|
30240
|
+
extra_interest: number | null;
|
|
30241
|
+
low_ltv_penalty_max: number | null;
|
|
30242
|
+
from_origination_fee: number | null;
|
|
30243
|
+
from_liquidation_fee: number | null;
|
|
30243
30244
|
};
|
|
30244
30245
|
fee_swap_interval_blocks: number;
|
|
30245
30246
|
interest_payment_interval_blocks: number;
|
|
@@ -30251,23 +30252,24 @@ declare const cfLendingConfig: z.ZodObject<{
|
|
|
30251
30252
|
hard_liquidation_max_oracle_slippage: number;
|
|
30252
30253
|
fee_swap_max_oracle_slippage: number;
|
|
30253
30254
|
minimum_loan_amount_usd: bigint;
|
|
30255
|
+
minimum_supply_amount_usd: bigint;
|
|
30254
30256
|
minimum_update_loan_amount_usd: bigint;
|
|
30255
30257
|
minimum_update_collateral_amount_usd: bigint;
|
|
30256
30258
|
}, {
|
|
30257
30259
|
ltv_thresholds: {
|
|
30258
|
-
target: number;
|
|
30259
|
-
topup: number;
|
|
30260
|
-
soft_liquidation: number;
|
|
30261
|
-
soft_liquidation_abort: number;
|
|
30262
|
-
hard_liquidation: number;
|
|
30263
|
-
hard_liquidation_abort: number;
|
|
30264
|
-
low_ltv: number;
|
|
30260
|
+
target: number | null;
|
|
30261
|
+
topup: number | null;
|
|
30262
|
+
soft_liquidation: number | null;
|
|
30263
|
+
soft_liquidation_abort: number | null;
|
|
30264
|
+
hard_liquidation: number | null;
|
|
30265
|
+
hard_liquidation_abort: number | null;
|
|
30266
|
+
low_ltv: number | null;
|
|
30265
30267
|
};
|
|
30266
30268
|
network_fee_contributions: {
|
|
30267
|
-
extra_interest: number;
|
|
30268
|
-
low_ltv_penalty_max: number;
|
|
30269
|
-
from_origination_fee: number;
|
|
30270
|
-
from_liquidation_fee: number;
|
|
30269
|
+
extra_interest: number | null;
|
|
30270
|
+
low_ltv_penalty_max: number | null;
|
|
30271
|
+
from_origination_fee: number | null;
|
|
30272
|
+
from_liquidation_fee: number | null;
|
|
30271
30273
|
};
|
|
30272
30274
|
fee_swap_interval_blocks: number;
|
|
30273
30275
|
interest_payment_interval_blocks: number;
|
|
@@ -30279,6 +30281,7 @@ declare const cfLendingConfig: z.ZodObject<{
|
|
|
30279
30281
|
hard_liquidation_max_oracle_slippage: number;
|
|
30280
30282
|
fee_swap_max_oracle_slippage: number;
|
|
30281
30283
|
minimum_loan_amount_usd: string | number;
|
|
30284
|
+
minimum_supply_amount_usd: string | number;
|
|
30282
30285
|
minimum_update_loan_amount_usd: string | number;
|
|
30283
30286
|
minimum_update_collateral_amount_usd: string | number;
|
|
30284
30287
|
}>;
|
|
@@ -31923,7 +31926,7 @@ declare const cfLendingPoolSupplyBalances: z.ZodArray<z.ZodIntersection<z.ZodUni
|
|
|
31923
31926
|
lp_id: string;
|
|
31924
31927
|
}[];
|
|
31925
31928
|
}>>, "many">;
|
|
31926
|
-
declare const cfVaultAddresses: z.ZodEffects<z.
|
|
31929
|
+
declare const cfVaultAddresses: z.ZodEffects<z.ZodObject<{
|
|
31927
31930
|
ethereum: z.ZodObject<{
|
|
31928
31931
|
Eth: z.ZodEffects<z.ZodArray<z.ZodNumber, "many">, `0x${string}`, number[]>;
|
|
31929
31932
|
}, "strip", z.ZodTypeAny, {
|
|
@@ -31968,27 +31971,7 @@ declare const cfVaultAddresses: z.ZodEffects<z.ZodEffects<z.ZodObject<{
|
|
|
31968
31971
|
}>, {
|
|
31969
31972
|
Ethereum: `0x${string}`;
|
|
31970
31973
|
Arbitrum: `0x${string}`;
|
|
31971
|
-
Bitcoin: Map<`cF${string}`,
|
|
31972
|
-
current: string;
|
|
31973
|
-
previous: string;
|
|
31974
|
-
}>;
|
|
31975
|
-
}, {
|
|
31976
|
-
ethereum: {
|
|
31977
|
-
Eth: number[];
|
|
31978
|
-
};
|
|
31979
|
-
arbitrum: {
|
|
31980
|
-
Arb: number[];
|
|
31981
|
-
};
|
|
31982
|
-
bitcoin: [string, {
|
|
31983
|
-
Btc: number[];
|
|
31984
|
-
}][];
|
|
31985
|
-
}>, {
|
|
31986
|
-
Ethereum: `0x${string}`;
|
|
31987
|
-
Arbitrum: `0x${string}`;
|
|
31988
|
-
Bitcoin: Map<`cF${string}`, {
|
|
31989
|
-
current: string;
|
|
31990
|
-
previous: string;
|
|
31991
|
-
}>;
|
|
31974
|
+
Bitcoin: Map<`cF${string}`, string>;
|
|
31992
31975
|
}, {
|
|
31993
31976
|
ethereum: {
|
|
31994
31977
|
Eth: number[];
|
package/dist/parsers.d.ts
CHANGED
|
@@ -30173,45 +30173,45 @@ declare const cfLendingPools: z.ZodArray<z.ZodObject<{
|
|
|
30173
30173
|
}>, "many">;
|
|
30174
30174
|
declare const cfLendingConfig: z.ZodObject<{
|
|
30175
30175
|
ltv_thresholds: z.ZodObject<{
|
|
30176
|
-
target: z.ZodNumber
|
|
30177
|
-
topup: z.ZodNumber
|
|
30178
|
-
soft_liquidation: z.ZodNumber
|
|
30179
|
-
soft_liquidation_abort: z.ZodNumber
|
|
30180
|
-
hard_liquidation: z.ZodNumber
|
|
30181
|
-
hard_liquidation_abort: z.ZodNumber
|
|
30182
|
-
low_ltv: z.ZodNumber
|
|
30183
|
-
}, "strip", z.ZodTypeAny, {
|
|
30184
|
-
target: number;
|
|
30185
|
-
topup: number;
|
|
30186
|
-
soft_liquidation: number;
|
|
30187
|
-
soft_liquidation_abort: number;
|
|
30188
|
-
hard_liquidation: number;
|
|
30189
|
-
hard_liquidation_abort: number;
|
|
30190
|
-
low_ltv: number;
|
|
30191
|
-
}, {
|
|
30192
|
-
target: number;
|
|
30193
|
-
topup: number;
|
|
30194
|
-
soft_liquidation: number;
|
|
30195
|
-
soft_liquidation_abort: number;
|
|
30196
|
-
hard_liquidation: number;
|
|
30197
|
-
hard_liquidation_abort: number;
|
|
30198
|
-
low_ltv: number;
|
|
30176
|
+
target: z.ZodNullable<z.ZodNumber>;
|
|
30177
|
+
topup: z.ZodNullable<z.ZodNumber>;
|
|
30178
|
+
soft_liquidation: z.ZodNullable<z.ZodNumber>;
|
|
30179
|
+
soft_liquidation_abort: z.ZodNullable<z.ZodNumber>;
|
|
30180
|
+
hard_liquidation: z.ZodNullable<z.ZodNumber>;
|
|
30181
|
+
hard_liquidation_abort: z.ZodNullable<z.ZodNumber>;
|
|
30182
|
+
low_ltv: z.ZodNullable<z.ZodNumber>;
|
|
30183
|
+
}, "strip", z.ZodTypeAny, {
|
|
30184
|
+
target: number | null;
|
|
30185
|
+
topup: number | null;
|
|
30186
|
+
soft_liquidation: number | null;
|
|
30187
|
+
soft_liquidation_abort: number | null;
|
|
30188
|
+
hard_liquidation: number | null;
|
|
30189
|
+
hard_liquidation_abort: number | null;
|
|
30190
|
+
low_ltv: number | null;
|
|
30191
|
+
}, {
|
|
30192
|
+
target: number | null;
|
|
30193
|
+
topup: number | null;
|
|
30194
|
+
soft_liquidation: number | null;
|
|
30195
|
+
soft_liquidation_abort: number | null;
|
|
30196
|
+
hard_liquidation: number | null;
|
|
30197
|
+
hard_liquidation_abort: number | null;
|
|
30198
|
+
low_ltv: number | null;
|
|
30199
30199
|
}>;
|
|
30200
30200
|
network_fee_contributions: z.ZodObject<{
|
|
30201
|
-
extra_interest: z.ZodNumber
|
|
30202
|
-
low_ltv_penalty_max: z.ZodNumber
|
|
30203
|
-
from_origination_fee: z.ZodNumber
|
|
30204
|
-
from_liquidation_fee: z.ZodNumber
|
|
30205
|
-
}, "strip", z.ZodTypeAny, {
|
|
30206
|
-
extra_interest: number;
|
|
30207
|
-
low_ltv_penalty_max: number;
|
|
30208
|
-
from_origination_fee: number;
|
|
30209
|
-
from_liquidation_fee: number;
|
|
30210
|
-
}, {
|
|
30211
|
-
extra_interest: number;
|
|
30212
|
-
low_ltv_penalty_max: number;
|
|
30213
|
-
from_origination_fee: number;
|
|
30214
|
-
from_liquidation_fee: number;
|
|
30201
|
+
extra_interest: z.ZodNullable<z.ZodNumber>;
|
|
30202
|
+
low_ltv_penalty_max: z.ZodNullable<z.ZodNumber>;
|
|
30203
|
+
from_origination_fee: z.ZodNullable<z.ZodNumber>;
|
|
30204
|
+
from_liquidation_fee: z.ZodNullable<z.ZodNumber>;
|
|
30205
|
+
}, "strip", z.ZodTypeAny, {
|
|
30206
|
+
extra_interest: number | null;
|
|
30207
|
+
low_ltv_penalty_max: number | null;
|
|
30208
|
+
from_origination_fee: number | null;
|
|
30209
|
+
from_liquidation_fee: number | null;
|
|
30210
|
+
}, {
|
|
30211
|
+
extra_interest: number | null;
|
|
30212
|
+
low_ltv_penalty_max: number | null;
|
|
30213
|
+
from_origination_fee: number | null;
|
|
30214
|
+
from_liquidation_fee: number | null;
|
|
30215
30215
|
}>;
|
|
30216
30216
|
fee_swap_interval_blocks: z.ZodNumber;
|
|
30217
30217
|
interest_payment_interval_blocks: z.ZodNumber;
|
|
@@ -30223,23 +30223,24 @@ declare const cfLendingConfig: z.ZodObject<{
|
|
|
30223
30223
|
hard_liquidation_max_oracle_slippage: z.ZodNumber;
|
|
30224
30224
|
fee_swap_max_oracle_slippage: z.ZodNumber;
|
|
30225
30225
|
minimum_loan_amount_usd: z.ZodEffects<z.ZodUnion<[z.ZodNumber, z.ZodEffects<z.ZodEffects<z.ZodString, `0x${string}`, string>, bigint, string>, z.ZodString]>, bigint, string | number>;
|
|
30226
|
+
minimum_supply_amount_usd: z.ZodEffects<z.ZodUnion<[z.ZodNumber, z.ZodEffects<z.ZodEffects<z.ZodString, `0x${string}`, string>, bigint, string>, z.ZodString]>, bigint, string | number>;
|
|
30226
30227
|
minimum_update_loan_amount_usd: z.ZodEffects<z.ZodUnion<[z.ZodNumber, z.ZodEffects<z.ZodEffects<z.ZodString, `0x${string}`, string>, bigint, string>, z.ZodString]>, bigint, string | number>;
|
|
30227
30228
|
minimum_update_collateral_amount_usd: z.ZodEffects<z.ZodUnion<[z.ZodNumber, z.ZodEffects<z.ZodEffects<z.ZodString, `0x${string}`, string>, bigint, string>, z.ZodString]>, bigint, string | number>;
|
|
30228
30229
|
}, "strip", z.ZodTypeAny, {
|
|
30229
30230
|
ltv_thresholds: {
|
|
30230
|
-
target: number;
|
|
30231
|
-
topup: number;
|
|
30232
|
-
soft_liquidation: number;
|
|
30233
|
-
soft_liquidation_abort: number;
|
|
30234
|
-
hard_liquidation: number;
|
|
30235
|
-
hard_liquidation_abort: number;
|
|
30236
|
-
low_ltv: number;
|
|
30231
|
+
target: number | null;
|
|
30232
|
+
topup: number | null;
|
|
30233
|
+
soft_liquidation: number | null;
|
|
30234
|
+
soft_liquidation_abort: number | null;
|
|
30235
|
+
hard_liquidation: number | null;
|
|
30236
|
+
hard_liquidation_abort: number | null;
|
|
30237
|
+
low_ltv: number | null;
|
|
30237
30238
|
};
|
|
30238
30239
|
network_fee_contributions: {
|
|
30239
|
-
extra_interest: number;
|
|
30240
|
-
low_ltv_penalty_max: number;
|
|
30241
|
-
from_origination_fee: number;
|
|
30242
|
-
from_liquidation_fee: number;
|
|
30240
|
+
extra_interest: number | null;
|
|
30241
|
+
low_ltv_penalty_max: number | null;
|
|
30242
|
+
from_origination_fee: number | null;
|
|
30243
|
+
from_liquidation_fee: number | null;
|
|
30243
30244
|
};
|
|
30244
30245
|
fee_swap_interval_blocks: number;
|
|
30245
30246
|
interest_payment_interval_blocks: number;
|
|
@@ -30251,23 +30252,24 @@ declare const cfLendingConfig: z.ZodObject<{
|
|
|
30251
30252
|
hard_liquidation_max_oracle_slippage: number;
|
|
30252
30253
|
fee_swap_max_oracle_slippage: number;
|
|
30253
30254
|
minimum_loan_amount_usd: bigint;
|
|
30255
|
+
minimum_supply_amount_usd: bigint;
|
|
30254
30256
|
minimum_update_loan_amount_usd: bigint;
|
|
30255
30257
|
minimum_update_collateral_amount_usd: bigint;
|
|
30256
30258
|
}, {
|
|
30257
30259
|
ltv_thresholds: {
|
|
30258
|
-
target: number;
|
|
30259
|
-
topup: number;
|
|
30260
|
-
soft_liquidation: number;
|
|
30261
|
-
soft_liquidation_abort: number;
|
|
30262
|
-
hard_liquidation: number;
|
|
30263
|
-
hard_liquidation_abort: number;
|
|
30264
|
-
low_ltv: number;
|
|
30260
|
+
target: number | null;
|
|
30261
|
+
topup: number | null;
|
|
30262
|
+
soft_liquidation: number | null;
|
|
30263
|
+
soft_liquidation_abort: number | null;
|
|
30264
|
+
hard_liquidation: number | null;
|
|
30265
|
+
hard_liquidation_abort: number | null;
|
|
30266
|
+
low_ltv: number | null;
|
|
30265
30267
|
};
|
|
30266
30268
|
network_fee_contributions: {
|
|
30267
|
-
extra_interest: number;
|
|
30268
|
-
low_ltv_penalty_max: number;
|
|
30269
|
-
from_origination_fee: number;
|
|
30270
|
-
from_liquidation_fee: number;
|
|
30269
|
+
extra_interest: number | null;
|
|
30270
|
+
low_ltv_penalty_max: number | null;
|
|
30271
|
+
from_origination_fee: number | null;
|
|
30272
|
+
from_liquidation_fee: number | null;
|
|
30271
30273
|
};
|
|
30272
30274
|
fee_swap_interval_blocks: number;
|
|
30273
30275
|
interest_payment_interval_blocks: number;
|
|
@@ -30279,6 +30281,7 @@ declare const cfLendingConfig: z.ZodObject<{
|
|
|
30279
30281
|
hard_liquidation_max_oracle_slippage: number;
|
|
30280
30282
|
fee_swap_max_oracle_slippage: number;
|
|
30281
30283
|
minimum_loan_amount_usd: string | number;
|
|
30284
|
+
minimum_supply_amount_usd: string | number;
|
|
30282
30285
|
minimum_update_loan_amount_usd: string | number;
|
|
30283
30286
|
minimum_update_collateral_amount_usd: string | number;
|
|
30284
30287
|
}>;
|
|
@@ -31923,7 +31926,7 @@ declare const cfLendingPoolSupplyBalances: z.ZodArray<z.ZodIntersection<z.ZodUni
|
|
|
31923
31926
|
lp_id: string;
|
|
31924
31927
|
}[];
|
|
31925
31928
|
}>>, "many">;
|
|
31926
|
-
declare const cfVaultAddresses: z.ZodEffects<z.
|
|
31929
|
+
declare const cfVaultAddresses: z.ZodEffects<z.ZodObject<{
|
|
31927
31930
|
ethereum: z.ZodObject<{
|
|
31928
31931
|
Eth: z.ZodEffects<z.ZodArray<z.ZodNumber, "many">, `0x${string}`, number[]>;
|
|
31929
31932
|
}, "strip", z.ZodTypeAny, {
|
|
@@ -31968,27 +31971,7 @@ declare const cfVaultAddresses: z.ZodEffects<z.ZodEffects<z.ZodObject<{
|
|
|
31968
31971
|
}>, {
|
|
31969
31972
|
Ethereum: `0x${string}`;
|
|
31970
31973
|
Arbitrum: `0x${string}`;
|
|
31971
|
-
Bitcoin: Map<`cF${string}`,
|
|
31972
|
-
current: string;
|
|
31973
|
-
previous: string;
|
|
31974
|
-
}>;
|
|
31975
|
-
}, {
|
|
31976
|
-
ethereum: {
|
|
31977
|
-
Eth: number[];
|
|
31978
|
-
};
|
|
31979
|
-
arbitrum: {
|
|
31980
|
-
Arb: number[];
|
|
31981
|
-
};
|
|
31982
|
-
bitcoin: [string, {
|
|
31983
|
-
Btc: number[];
|
|
31984
|
-
}][];
|
|
31985
|
-
}>, {
|
|
31986
|
-
Ethereum: `0x${string}`;
|
|
31987
|
-
Arbitrum: `0x${string}`;
|
|
31988
|
-
Bitcoin: Map<`cF${string}`, {
|
|
31989
|
-
current: string;
|
|
31990
|
-
previous: string;
|
|
31991
|
-
}>;
|
|
31974
|
+
Bitcoin: Map<`cF${string}`, string>;
|
|
31992
31975
|
}, {
|
|
31993
31976
|
ethereum: {
|
|
31994
31977
|
Eth: number[];
|
package/dist/parsers.mjs
CHANGED
|
@@ -609,19 +609,19 @@ var cfLendingPools = z.array(
|
|
|
609
609
|
);
|
|
610
610
|
var cfLendingConfig = z.object({
|
|
611
611
|
ltv_thresholds: z.object({
|
|
612
|
-
target: z.number(),
|
|
613
|
-
topup: z.number(),
|
|
614
|
-
soft_liquidation: z.number(),
|
|
615
|
-
soft_liquidation_abort: z.number(),
|
|
616
|
-
hard_liquidation: z.number(),
|
|
617
|
-
hard_liquidation_abort: z.number(),
|
|
618
|
-
low_ltv: z.number()
|
|
612
|
+
target: z.number().nullable(),
|
|
613
|
+
topup: z.number().nullable(),
|
|
614
|
+
soft_liquidation: z.number().nullable(),
|
|
615
|
+
soft_liquidation_abort: z.number().nullable(),
|
|
616
|
+
hard_liquidation: z.number().nullable(),
|
|
617
|
+
hard_liquidation_abort: z.number().nullable(),
|
|
618
|
+
low_ltv: z.number().nullable()
|
|
619
619
|
}),
|
|
620
620
|
network_fee_contributions: z.object({
|
|
621
|
-
extra_interest: z.number(),
|
|
622
|
-
low_ltv_penalty_max: z.number(),
|
|
623
|
-
from_origination_fee: z.number(),
|
|
624
|
-
from_liquidation_fee: z.number()
|
|
621
|
+
extra_interest: z.number().nullable(),
|
|
622
|
+
low_ltv_penalty_max: z.number().nullable(),
|
|
623
|
+
from_origination_fee: z.number().nullable(),
|
|
624
|
+
from_liquidation_fee: z.number().nullable()
|
|
625
625
|
}),
|
|
626
626
|
fee_swap_interval_blocks: z.number(),
|
|
627
627
|
interest_payment_interval_blocks: z.number(),
|
|
@@ -633,6 +633,7 @@ var cfLendingConfig = z.object({
|
|
|
633
633
|
hard_liquidation_max_oracle_slippage: z.number(),
|
|
634
634
|
fee_swap_max_oracle_slippage: z.number(),
|
|
635
635
|
minimum_loan_amount_usd: numberOrHex,
|
|
636
|
+
minimum_supply_amount_usd: numberOrHex,
|
|
636
637
|
minimum_update_loan_amount_usd: numberOrHex,
|
|
637
638
|
minimum_update_collateral_amount_usd: numberOrHex
|
|
638
639
|
});
|
|
@@ -691,33 +692,14 @@ var cfVaultAddresses = z.object({
|
|
|
691
692
|
])
|
|
692
693
|
)
|
|
693
694
|
}).transform(({ ethereum, arbitrum, bitcoin }) => {
|
|
694
|
-
const bitcoinAddresses =
|
|
695
|
-
|
|
696
|
-
|
|
697
|
-
obj = { current: "", previous: "" };
|
|
698
|
-
acc.set(brokerId, obj);
|
|
699
|
-
}
|
|
700
|
-
if (!obj.previous) {
|
|
701
|
-
obj.previous = Btc;
|
|
702
|
-
} else {
|
|
703
|
-
obj.current = Btc;
|
|
704
|
-
}
|
|
705
|
-
return acc;
|
|
706
|
-
}, /* @__PURE__ */ new Map());
|
|
695
|
+
const bitcoinAddresses = new Map(
|
|
696
|
+
bitcoin.map(([brokerId, { Btc }]) => [brokerId, Btc])
|
|
697
|
+
);
|
|
707
698
|
return {
|
|
708
699
|
Ethereum: ethereum.Eth,
|
|
709
700
|
Arbitrum: arbitrum.Arb,
|
|
710
701
|
Bitcoin: bitcoinAddresses
|
|
711
702
|
};
|
|
712
|
-
}).superRefine(({ Bitcoin }, ctx) => {
|
|
713
|
-
Bitcoin.forEach((value, key) => {
|
|
714
|
-
if (!value.current) {
|
|
715
|
-
ctx.addIssue({
|
|
716
|
-
message: `No current BTC address for broker ${key}`,
|
|
717
|
-
code: z.ZodIssueCode.custom
|
|
718
|
-
});
|
|
719
|
-
}
|
|
720
|
-
});
|
|
721
703
|
});
|
|
722
704
|
export {
|
|
723
705
|
accountInfoCommon,
|
package/package.json
CHANGED
|
@@ -1,13 +1,13 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@chainflip/rpc",
|
|
3
|
-
"version": "2.0.
|
|
3
|
+
"version": "2.0.3",
|
|
4
4
|
"type": "module",
|
|
5
5
|
"dependencies": {
|
|
6
6
|
"@chainflip/utils": "0.11.0",
|
|
7
7
|
"zod": "^3.25.75"
|
|
8
8
|
},
|
|
9
9
|
"devDependencies": {
|
|
10
|
-
"@types/node": "^24.10.
|
|
10
|
+
"@types/node": "^24.10.1",
|
|
11
11
|
"@types/ws": "^8.18.1",
|
|
12
12
|
"ws": "^8.18.3"
|
|
13
13
|
},
|