@iris-credit/core-sdk 0.0.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (73) hide show
  1. package/LICENSE +21 -0
  2. package/lib/cjs/abis/blm.d.ts +192 -0
  3. package/lib/cjs/abis/blm.js +251 -0
  4. package/lib/cjs/abis/errors.d.ts +441 -0
  5. package/lib/cjs/abis/errors.js +558 -0
  6. package/lib/cjs/abis/index.d.ts +4 -0
  7. package/lib/cjs/abis/index.js +20 -0
  8. package/lib/cjs/abis/iris.d.ts +1448 -0
  9. package/lib/cjs/abis/iris.js +1850 -0
  10. package/lib/cjs/abis/whitelist-blm.d.ts +235 -0
  11. package/lib/cjs/abis/whitelist-blm.js +307 -0
  12. package/lib/cjs/addresses.d.ts +12 -0
  13. package/lib/cjs/addresses.js +17 -0
  14. package/lib/cjs/chain.d.ts +35 -0
  15. package/lib/cjs/chain.js +40 -0
  16. package/lib/cjs/constants.d.ts +14 -0
  17. package/lib/cjs/constants.js +18 -0
  18. package/lib/cjs/index.d.ts +7 -0
  19. package/lib/cjs/index.js +23 -0
  20. package/lib/cjs/math/MathLib.d.ts +26 -0
  21. package/lib/cjs/math/MathLib.js +88 -0
  22. package/lib/cjs/math/index.d.ts +1 -0
  23. package/lib/cjs/math/index.js +17 -0
  24. package/lib/cjs/package.json +1 -0
  25. package/lib/cjs/signatures/authorization.d.ts +20 -0
  26. package/lib/cjs/signatures/authorization.js +25 -0
  27. package/lib/cjs/signatures/erc2612.d.ts +34 -0
  28. package/lib/cjs/signatures/erc2612.js +26 -0
  29. package/lib/cjs/signatures/index.d.ts +4 -0
  30. package/lib/cjs/signatures/index.js +20 -0
  31. package/lib/cjs/signatures/permit2.d.ts +33 -0
  32. package/lib/cjs/signatures/permit2.js +41 -0
  33. package/lib/cjs/signatures/quote.d.ts +34 -0
  34. package/lib/cjs/signatures/quote.js +40 -0
  35. package/lib/cjs/types.d.ts +9 -0
  36. package/lib/cjs/types.js +7 -0
  37. package/lib/esm/abis/blm.d.ts +192 -0
  38. package/lib/esm/abis/blm.js +248 -0
  39. package/lib/esm/abis/errors.d.ts +441 -0
  40. package/lib/esm/abis/errors.js +555 -0
  41. package/lib/esm/abis/index.d.ts +4 -0
  42. package/lib/esm/abis/index.js +4 -0
  43. package/lib/esm/abis/iris.d.ts +1448 -0
  44. package/lib/esm/abis/iris.js +1847 -0
  45. package/lib/esm/abis/whitelist-blm.d.ts +235 -0
  46. package/lib/esm/abis/whitelist-blm.js +304 -0
  47. package/lib/esm/addresses.d.ts +12 -0
  48. package/lib/esm/addresses.js +13 -0
  49. package/lib/esm/chain.d.ts +35 -0
  50. package/lib/esm/chain.js +38 -0
  51. package/lib/esm/constants.d.ts +14 -0
  52. package/lib/esm/constants.js +15 -0
  53. package/lib/esm/index.d.ts +7 -0
  54. package/lib/esm/index.js +7 -0
  55. package/lib/esm/math/MathLib.d.ts +26 -0
  56. package/lib/esm/math/MathLib.js +86 -0
  57. package/lib/esm/math/index.d.ts +1 -0
  58. package/lib/esm/math/index.js +1 -0
  59. package/lib/esm/package.json +1 -0
  60. package/lib/esm/signatures/authorization.d.ts +20 -0
  61. package/lib/esm/signatures/authorization.js +21 -0
  62. package/lib/esm/signatures/erc2612.d.ts +34 -0
  63. package/lib/esm/signatures/erc2612.js +22 -0
  64. package/lib/esm/signatures/index.d.ts +4 -0
  65. package/lib/esm/signatures/index.js +4 -0
  66. package/lib/esm/signatures/permit2.d.ts +33 -0
  67. package/lib/esm/signatures/permit2.js +37 -0
  68. package/lib/esm/signatures/quote.d.ts +34 -0
  69. package/lib/esm/signatures/quote.js +36 -0
  70. package/lib/esm/types.d.ts +9 -0
  71. package/lib/esm/types.js +3 -0
  72. package/package.json +39 -0
  73. package/src/index.ts +7 -0
@@ -0,0 +1,235 @@
1
+ export declare const whitelistBlmAbi: readonly [{
2
+ readonly type: "constructor";
3
+ readonly inputs: readonly [{
4
+ readonly name: "iris";
5
+ readonly type: "address";
6
+ readonly internalType: "address";
7
+ }];
8
+ readonly stateMutability: "nonpayable";
9
+ }, {
10
+ readonly type: "function";
11
+ readonly name: "IRIS";
12
+ readonly inputs: readonly [];
13
+ readonly outputs: readonly [{
14
+ readonly name: "";
15
+ readonly type: "address";
16
+ readonly internalType: "contract IIris";
17
+ }];
18
+ readonly stateMutability: "view";
19
+ }, {
20
+ readonly type: "function";
21
+ readonly name: "bondRequirement";
22
+ readonly inputs: readonly [{
23
+ readonly name: "quote";
24
+ readonly type: "tuple";
25
+ readonly internalType: "struct Quote";
26
+ readonly components: readonly [{
27
+ readonly name: "borrower";
28
+ readonly type: "address";
29
+ readonly internalType: "address";
30
+ }, {
31
+ readonly name: "solver";
32
+ readonly type: "address";
33
+ readonly internalType: "address";
34
+ }, {
35
+ readonly name: "receiver";
36
+ readonly type: "address";
37
+ readonly internalType: "address";
38
+ }, {
39
+ readonly name: "blm";
40
+ readonly type: "address";
41
+ readonly internalType: "address";
42
+ }, {
43
+ readonly name: "collateralToken";
44
+ readonly type: "address";
45
+ readonly internalType: "address";
46
+ }, {
47
+ readonly name: "debtToken";
48
+ readonly type: "address";
49
+ readonly internalType: "address";
50
+ }, {
51
+ readonly name: "collateral";
52
+ readonly type: "uint256";
53
+ readonly internalType: "uint256";
54
+ }, {
55
+ readonly name: "debt";
56
+ readonly type: "uint256";
57
+ readonly internalType: "uint256";
58
+ }, {
59
+ readonly name: "fixedRate";
60
+ readonly type: "uint256";
61
+ readonly internalType: "uint256";
62
+ }, {
63
+ readonly name: "duration";
64
+ readonly type: "uint256";
65
+ readonly internalType: "uint256";
66
+ }, {
67
+ readonly name: "overdueRate";
68
+ readonly type: "uint256";
69
+ readonly internalType: "uint256";
70
+ }, {
71
+ readonly name: "overduePeriod";
72
+ readonly type: "uint256";
73
+ readonly internalType: "uint256";
74
+ }, {
75
+ readonly name: "bond";
76
+ readonly type: "uint256";
77
+ readonly internalType: "uint256";
78
+ }, {
79
+ readonly name: "bondLltv";
80
+ readonly type: "uint256";
81
+ readonly internalType: "uint256";
82
+ }, {
83
+ readonly name: "venueBitmap";
84
+ readonly type: "uint256";
85
+ readonly internalType: "uint256";
86
+ }, {
87
+ readonly name: "venueId";
88
+ readonly type: "uint256";
89
+ readonly internalType: "uint256";
90
+ }, {
91
+ readonly name: "deadline";
92
+ readonly type: "uint256";
93
+ readonly internalType: "uint256";
94
+ }, {
95
+ readonly name: "nonce";
96
+ readonly type: "uint256";
97
+ readonly internalType: "uint256";
98
+ }, {
99
+ readonly name: "data";
100
+ readonly type: "bytes";
101
+ readonly internalType: "bytes";
102
+ }];
103
+ }];
104
+ readonly outputs: readonly [{
105
+ readonly name: "";
106
+ readonly type: "uint256";
107
+ readonly internalType: "uint256";
108
+ }];
109
+ readonly stateMutability: "view";
110
+ }, {
111
+ readonly type: "function";
112
+ readonly name: "intercept";
113
+ readonly inputs: readonly [{
114
+ readonly name: "";
115
+ readonly type: "address";
116
+ readonly internalType: "address";
117
+ }];
118
+ readonly outputs: readonly [{
119
+ readonly name: "";
120
+ readonly type: "uint256";
121
+ readonly internalType: "uint256";
122
+ }];
123
+ readonly stateMutability: "view";
124
+ }, {
125
+ readonly type: "function";
126
+ readonly name: "isWhitelisted";
127
+ readonly inputs: readonly [{
128
+ readonly name: "";
129
+ readonly type: "address";
130
+ readonly internalType: "address";
131
+ }];
132
+ readonly outputs: readonly [{
133
+ readonly name: "";
134
+ readonly type: "bool";
135
+ readonly internalType: "bool";
136
+ }];
137
+ readonly stateMutability: "view";
138
+ }, {
139
+ readonly type: "function";
140
+ readonly name: "setIsWhitelisted";
141
+ readonly inputs: readonly [{
142
+ readonly name: "account";
143
+ readonly type: "address";
144
+ readonly internalType: "address";
145
+ }, {
146
+ readonly name: "newIsWhitelisted";
147
+ readonly type: "bool";
148
+ readonly internalType: "bool";
149
+ }];
150
+ readonly outputs: readonly [];
151
+ readonly stateMutability: "nonpayable";
152
+ }, {
153
+ readonly type: "function";
154
+ readonly name: "setParams";
155
+ readonly inputs: readonly [{
156
+ readonly name: "token";
157
+ readonly type: "address";
158
+ readonly internalType: "address";
159
+ }, {
160
+ readonly name: "newSlope";
161
+ readonly type: "uint256";
162
+ readonly internalType: "uint256";
163
+ }, {
164
+ readonly name: "newIntercept";
165
+ readonly type: "uint256";
166
+ readonly internalType: "uint256";
167
+ }];
168
+ readonly outputs: readonly [];
169
+ readonly stateMutability: "nonpayable";
170
+ }, {
171
+ readonly type: "function";
172
+ readonly name: "slope";
173
+ readonly inputs: readonly [{
174
+ readonly name: "";
175
+ readonly type: "address";
176
+ readonly internalType: "address";
177
+ }];
178
+ readonly outputs: readonly [{
179
+ readonly name: "";
180
+ readonly type: "uint256";
181
+ readonly internalType: "uint256";
182
+ }];
183
+ readonly stateMutability: "view";
184
+ }, {
185
+ readonly type: "event";
186
+ readonly name: "SetIsWhitelisted";
187
+ readonly inputs: readonly [{
188
+ readonly name: "account";
189
+ readonly type: "address";
190
+ readonly indexed: true;
191
+ readonly internalType: "address";
192
+ }, {
193
+ readonly name: "isWhitelisted";
194
+ readonly type: "bool";
195
+ readonly indexed: false;
196
+ readonly internalType: "bool";
197
+ }];
198
+ readonly anonymous: false;
199
+ }, {
200
+ readonly type: "event";
201
+ readonly name: "SetParams";
202
+ readonly inputs: readonly [{
203
+ readonly name: "token";
204
+ readonly type: "address";
205
+ readonly indexed: false;
206
+ readonly internalType: "address";
207
+ }, {
208
+ readonly name: "newSlope";
209
+ readonly type: "uint256";
210
+ readonly indexed: false;
211
+ readonly internalType: "uint256";
212
+ }, {
213
+ readonly name: "newIntercept";
214
+ readonly type: "uint256";
215
+ readonly indexed: false;
216
+ readonly internalType: "uint256";
217
+ }];
218
+ readonly anonymous: false;
219
+ }, {
220
+ readonly type: "error";
221
+ readonly name: "ParamsTooHigh";
222
+ readonly inputs: readonly [];
223
+ }, {
224
+ readonly type: "error";
225
+ readonly name: "Unauthorized";
226
+ readonly inputs: readonly [];
227
+ }, {
228
+ readonly type: "error";
229
+ readonly name: "ZeroAddress";
230
+ readonly inputs: readonly [];
231
+ }, {
232
+ readonly type: "error";
233
+ readonly name: "ZeroAmount";
234
+ readonly inputs: readonly [];
235
+ }];
@@ -0,0 +1,307 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.whitelistBlmAbi = void 0;
4
+ exports.whitelistBlmAbi = [
5
+ {
6
+ type: "constructor",
7
+ inputs: [
8
+ {
9
+ name: "iris",
10
+ type: "address",
11
+ internalType: "address",
12
+ },
13
+ ],
14
+ stateMutability: "nonpayable",
15
+ },
16
+ {
17
+ type: "function",
18
+ name: "IRIS",
19
+ inputs: [],
20
+ outputs: [
21
+ {
22
+ name: "",
23
+ type: "address",
24
+ internalType: "contract IIris",
25
+ },
26
+ ],
27
+ stateMutability: "view",
28
+ },
29
+ {
30
+ type: "function",
31
+ name: "bondRequirement",
32
+ inputs: [
33
+ {
34
+ name: "quote",
35
+ type: "tuple",
36
+ internalType: "struct Quote",
37
+ components: [
38
+ {
39
+ name: "borrower",
40
+ type: "address",
41
+ internalType: "address",
42
+ },
43
+ {
44
+ name: "solver",
45
+ type: "address",
46
+ internalType: "address",
47
+ },
48
+ {
49
+ name: "receiver",
50
+ type: "address",
51
+ internalType: "address",
52
+ },
53
+ {
54
+ name: "blm",
55
+ type: "address",
56
+ internalType: "address",
57
+ },
58
+ {
59
+ name: "collateralToken",
60
+ type: "address",
61
+ internalType: "address",
62
+ },
63
+ {
64
+ name: "debtToken",
65
+ type: "address",
66
+ internalType: "address",
67
+ },
68
+ {
69
+ name: "collateral",
70
+ type: "uint256",
71
+ internalType: "uint256",
72
+ },
73
+ {
74
+ name: "debt",
75
+ type: "uint256",
76
+ internalType: "uint256",
77
+ },
78
+ {
79
+ name: "fixedRate",
80
+ type: "uint256",
81
+ internalType: "uint256",
82
+ },
83
+ {
84
+ name: "duration",
85
+ type: "uint256",
86
+ internalType: "uint256",
87
+ },
88
+ {
89
+ name: "overdueRate",
90
+ type: "uint256",
91
+ internalType: "uint256",
92
+ },
93
+ {
94
+ name: "overduePeriod",
95
+ type: "uint256",
96
+ internalType: "uint256",
97
+ },
98
+ {
99
+ name: "bond",
100
+ type: "uint256",
101
+ internalType: "uint256",
102
+ },
103
+ {
104
+ name: "bondLltv",
105
+ type: "uint256",
106
+ internalType: "uint256",
107
+ },
108
+ {
109
+ name: "venueBitmap",
110
+ type: "uint256",
111
+ internalType: "uint256",
112
+ },
113
+ {
114
+ name: "venueId",
115
+ type: "uint256",
116
+ internalType: "uint256",
117
+ },
118
+ {
119
+ name: "deadline",
120
+ type: "uint256",
121
+ internalType: "uint256",
122
+ },
123
+ {
124
+ name: "nonce",
125
+ type: "uint256",
126
+ internalType: "uint256",
127
+ },
128
+ {
129
+ name: "data",
130
+ type: "bytes",
131
+ internalType: "bytes",
132
+ },
133
+ ],
134
+ },
135
+ ],
136
+ outputs: [
137
+ {
138
+ name: "",
139
+ type: "uint256",
140
+ internalType: "uint256",
141
+ },
142
+ ],
143
+ stateMutability: "view",
144
+ },
145
+ {
146
+ type: "function",
147
+ name: "intercept",
148
+ inputs: [
149
+ {
150
+ name: "",
151
+ type: "address",
152
+ internalType: "address",
153
+ },
154
+ ],
155
+ outputs: [
156
+ {
157
+ name: "",
158
+ type: "uint256",
159
+ internalType: "uint256",
160
+ },
161
+ ],
162
+ stateMutability: "view",
163
+ },
164
+ {
165
+ type: "function",
166
+ name: "isWhitelisted",
167
+ inputs: [
168
+ {
169
+ name: "",
170
+ type: "address",
171
+ internalType: "address",
172
+ },
173
+ ],
174
+ outputs: [
175
+ {
176
+ name: "",
177
+ type: "bool",
178
+ internalType: "bool",
179
+ },
180
+ ],
181
+ stateMutability: "view",
182
+ },
183
+ {
184
+ type: "function",
185
+ name: "setIsWhitelisted",
186
+ inputs: [
187
+ {
188
+ name: "account",
189
+ type: "address",
190
+ internalType: "address",
191
+ },
192
+ {
193
+ name: "newIsWhitelisted",
194
+ type: "bool",
195
+ internalType: "bool",
196
+ },
197
+ ],
198
+ outputs: [],
199
+ stateMutability: "nonpayable",
200
+ },
201
+ {
202
+ type: "function",
203
+ name: "setParams",
204
+ inputs: [
205
+ {
206
+ name: "token",
207
+ type: "address",
208
+ internalType: "address",
209
+ },
210
+ {
211
+ name: "newSlope",
212
+ type: "uint256",
213
+ internalType: "uint256",
214
+ },
215
+ {
216
+ name: "newIntercept",
217
+ type: "uint256",
218
+ internalType: "uint256",
219
+ },
220
+ ],
221
+ outputs: [],
222
+ stateMutability: "nonpayable",
223
+ },
224
+ {
225
+ type: "function",
226
+ name: "slope",
227
+ inputs: [
228
+ {
229
+ name: "",
230
+ type: "address",
231
+ internalType: "address",
232
+ },
233
+ ],
234
+ outputs: [
235
+ {
236
+ name: "",
237
+ type: "uint256",
238
+ internalType: "uint256",
239
+ },
240
+ ],
241
+ stateMutability: "view",
242
+ },
243
+ {
244
+ type: "event",
245
+ name: "SetIsWhitelisted",
246
+ inputs: [
247
+ {
248
+ name: "account",
249
+ type: "address",
250
+ indexed: true,
251
+ internalType: "address",
252
+ },
253
+ {
254
+ name: "isWhitelisted",
255
+ type: "bool",
256
+ indexed: false,
257
+ internalType: "bool",
258
+ },
259
+ ],
260
+ anonymous: false,
261
+ },
262
+ {
263
+ type: "event",
264
+ name: "SetParams",
265
+ inputs: [
266
+ {
267
+ name: "token",
268
+ type: "address",
269
+ indexed: false,
270
+ internalType: "address",
271
+ },
272
+ {
273
+ name: "newSlope",
274
+ type: "uint256",
275
+ indexed: false,
276
+ internalType: "uint256",
277
+ },
278
+ {
279
+ name: "newIntercept",
280
+ type: "uint256",
281
+ indexed: false,
282
+ internalType: "uint256",
283
+ },
284
+ ],
285
+ anonymous: false,
286
+ },
287
+ {
288
+ type: "error",
289
+ name: "ParamsTooHigh",
290
+ inputs: [],
291
+ },
292
+ {
293
+ type: "error",
294
+ name: "Unauthorized",
295
+ inputs: [],
296
+ },
297
+ {
298
+ type: "error",
299
+ name: "ZeroAddress",
300
+ inputs: [],
301
+ },
302
+ {
303
+ type: "error",
304
+ name: "ZeroAmount",
305
+ inputs: [],
306
+ },
307
+ ];
@@ -0,0 +1,12 @@
1
+ import type { Address } from "viem";
2
+ export interface ChainAddresses {
3
+ readonly iris: Address;
4
+ readonly permit2: Address;
5
+ }
6
+ export declare const CHAIN_ADDRESSES: {
7
+ 1: {
8
+ iris: "0x0000000000000000000000000000000000000000";
9
+ permit2: `0x${string}`;
10
+ };
11
+ };
12
+ export declare const getChainAddresses: (chainId: 1) => ChainAddresses;
@@ -0,0 +1,17 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.getChainAddresses = exports.CHAIN_ADDRESSES = void 0;
4
+ const chain_js_1 = require("./chain.js");
5
+ // Permit2 is deployed at the same canonical address on every chain.
6
+ const PERMIT2_ADDRESS = "0x000000000022D473030F116dDEE9F6B43aC78BA3";
7
+ exports.CHAIN_ADDRESSES = {
8
+ [chain_js_1.ChainId.EthMainnet]: {
9
+ // TODO: Iris is not yet deployed to mainnet. Replace with the deployed address.
10
+ iris: "0x0000000000000000000000000000000000000000",
11
+ permit2: PERMIT2_ADDRESS,
12
+ },
13
+ };
14
+ const getChainAddresses = (chainId) => {
15
+ return exports.CHAIN_ADDRESSES[chainId];
16
+ };
17
+ exports.getChainAddresses = getChainAddresses;
@@ -0,0 +1,35 @@
1
+ export declare const ChainId: {
2
+ readonly EthMainnet: 1;
3
+ };
4
+ export type ChainId = (typeof ChainId)[keyof typeof ChainId];
5
+ export interface ChainMetadata {
6
+ readonly name: string;
7
+ readonly id: ChainId;
8
+ readonly explorerUrl: string;
9
+ readonly nativeCurrency: {
10
+ readonly name: string;
11
+ readonly symbol: string;
12
+ readonly decimals: number;
13
+ };
14
+ readonly identifier: string;
15
+ }
16
+ export declare namespace ChainUtils {
17
+ const toHexChainId: (chainId: 1) => string;
18
+ const getExplorerUrl: (chainId: 1) => string;
19
+ const getExplorerAddressUrl: (chainId: 1, address: string) => string;
20
+ const getExplorerTransactionUrl: (chainId: 1, tx: string) => string;
21
+ const supportedChainIds: 1[];
22
+ const CHAIN_METADATA: {
23
+ 1: {
24
+ name: string;
25
+ id: 1;
26
+ nativeCurrency: {
27
+ name: string;
28
+ symbol: string;
29
+ decimals: number;
30
+ };
31
+ explorerUrl: string;
32
+ identifier: string;
33
+ };
34
+ };
35
+ }
@@ -0,0 +1,40 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.ChainUtils = exports.ChainId = void 0;
4
+ const iris_ts_1 = require("@iris-credit/iris-ts");
5
+ exports.ChainId = {
6
+ EthMainnet: 1,
7
+ // BaseMainnet: 8453,
8
+ };
9
+ var ChainUtils;
10
+ (function (ChainUtils) {
11
+ ChainUtils.toHexChainId = (chainId) => {
12
+ return `0x${chainId.toString(16)}`;
13
+ };
14
+ ChainUtils.getExplorerUrl = (chainId) => {
15
+ return ChainUtils.CHAIN_METADATA[chainId].explorerUrl;
16
+ };
17
+ ChainUtils.getExplorerAddressUrl = (chainId, address) => {
18
+ return `${ChainUtils.getExplorerUrl(chainId)}/address/${address}`;
19
+ };
20
+ ChainUtils.getExplorerTransactionUrl = (chainId, tx) => {
21
+ return `${ChainUtils.getExplorerUrl(chainId)}/tx/${tx}`;
22
+ };
23
+ ChainUtils.supportedChainIds = (0, iris_ts_1.values)(exports.ChainId);
24
+ ChainUtils.CHAIN_METADATA = {
25
+ [exports.ChainId.EthMainnet]: {
26
+ name: "Ethereum",
27
+ id: exports.ChainId.EthMainnet,
28
+ nativeCurrency: { name: "Ether", symbol: "ETH", decimals: 18 },
29
+ explorerUrl: "https://etherscan.io",
30
+ identifier: "mainnet",
31
+ },
32
+ // [ChainId.BaseMainnet]: {
33
+ // name: "Base",
34
+ // id: ChainId.BaseMainnet,
35
+ // nativeCurrency: { name: "Ether", symbol: "ETH", decimals: 18 },
36
+ // explorerUrl: "https://basescan.org",
37
+ // identifier: "base",
38
+ // },
39
+ };
40
+ })(ChainUtils || (exports.ChainUtils = ChainUtils = {}));
@@ -0,0 +1,14 @@
1
+ export declare const BP = 100000000000000n;
2
+ export declare const ORACLE_PRICE_SCALE = 1000000000000000000000000000000000000n;
3
+ export declare const SECONDS_PER_YEAR: bigint;
4
+ export declare const MIN_DURATION: bigint;
5
+ export declare const MAX_DURATION: bigint;
6
+ export declare const MAX_FIXED_RATE = 1000000000000000000n;
7
+ export declare const MAX_OVERDUE_RATE = 1000000000000000000n;
8
+ export declare const MAX_OVERDUE_PERIOD: bigint;
9
+ export declare const MAX_LIF = 150000000000000000n;
10
+ export declare const TIME_TO_MAX_LIF: bigint;
11
+ export declare const MAX_BOND_LIF = 50000000000000000n;
12
+ export declare const LIQUIDATION_CURSOR = 500000000000000000n;
13
+ export declare const MAX_FEE = 400000000000000000n;
14
+ export declare const QUOTE_TTL: bigint;
@@ -0,0 +1,18 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.QUOTE_TTL = exports.MAX_FEE = exports.LIQUIDATION_CURSOR = exports.MAX_BOND_LIF = exports.TIME_TO_MAX_LIF = exports.MAX_LIF = exports.MAX_OVERDUE_PERIOD = exports.MAX_OVERDUE_RATE = exports.MAX_FIXED_RATE = exports.MAX_DURATION = exports.MIN_DURATION = exports.SECONDS_PER_YEAR = exports.ORACLE_PRICE_SCALE = exports.BP = void 0;
4
+ const iris_ts_1 = require("@iris-credit/iris-ts");
5
+ exports.BP = 100000000000000n; // 1e14
6
+ exports.ORACLE_PRICE_SCALE = 1000000000000000000000000000000000000n; // 1e36
7
+ exports.SECONDS_PER_YEAR = iris_ts_1.Time.s.from.y(1n); // 365 days
8
+ exports.MIN_DURATION = iris_ts_1.Time.s.from.d(1n);
9
+ exports.MAX_DURATION = iris_ts_1.Time.s.from.y(2n);
10
+ exports.MAX_FIXED_RATE = 1000000000000000000n; // 1e18 (100%)
11
+ exports.MAX_OVERDUE_RATE = 1000000000000000000n; // 1e18
12
+ exports.MAX_OVERDUE_PERIOD = iris_ts_1.Time.s.from.d(30n);
13
+ exports.MAX_LIF = 150000000000000000n; // 0.15e18
14
+ exports.TIME_TO_MAX_LIF = iris_ts_1.Time.s.from.min(15n);
15
+ exports.MAX_BOND_LIF = 50000000000000000n; // 0.05e18
16
+ exports.LIQUIDATION_CURSOR = 500000000000000000n; // 0.5e18
17
+ exports.MAX_FEE = 400000000000000000n; // 0.4e18 (40%)
18
+ exports.QUOTE_TTL = iris_ts_1.Time.s.from.min(2n);
@@ -0,0 +1,7 @@
1
+ export * from "./types.js";
2
+ export * from "./chain.js";
3
+ export * from "./constants.js";
4
+ export * from "./addresses.js";
5
+ export * from "./signatures/index.js";
6
+ export * from "./math/index.js";
7
+ export * from "./abis/index.js";