@gearbox-protocol/sdk 13.6.0-kyc.6 → 13.6.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/cjs/dev/AccountOpener.js +5 -45
- package/dist/cjs/plugins/adapters/abi/actionAbi.js +1 -1
- package/dist/cjs/plugins/adapters/abi/conctructorAbi.js +1 -1
- package/dist/cjs/plugins/adapters/createAdapter.js +1 -1
- package/dist/cjs/plugins/adapters/types.js +1 -1
- package/dist/cjs/plugins/apy/ApyPlugin.js +266 -0
- package/dist/cjs/plugins/apy/apy-cache.js +120 -0
- package/dist/cjs/plugins/apy/apy-parser.js +169 -0
- package/dist/cjs/{sdk/market/kyc/securitize → plugins/apy}/constants.js +6 -3
- package/dist/cjs/{sdk/market/kyc/securitize → plugins/apy}/index.js +14 -6
- package/dist/cjs/{sdk/market/kyc/securitize/types.js → plugins/apy/pool-apy-types.js} +2 -2
- package/dist/cjs/plugins/apy/pool-apy-utils.js +141 -0
- package/dist/cjs/rewards/rewards/extra-apy.js +10 -8
- package/dist/cjs/sdk/GearboxSDK.js +5 -52
- package/dist/cjs/sdk/accounts/AbstractCreditAccountsService.js +16 -331
- package/dist/cjs/sdk/accounts/CreditAccountsServiceV310.js +1 -7
- package/dist/cjs/sdk/base/TokensMeta.js +43 -32
- package/dist/cjs/sdk/base/token-types.js +0 -9
- package/dist/cjs/sdk/chain/chains.js +32 -17
- package/dist/cjs/sdk/constants/address-provider.js +0 -3
- package/dist/cjs/sdk/market/MarketRegister.js +116 -70
- package/dist/cjs/sdk/market/MarketSuite.js +0 -3
- package/dist/cjs/sdk/market/index.js +0 -2
- package/dist/cjs/sdk/market/pool/PoolSuite.js +0 -3
- package/dist/cjs/sdk/market/pool/PoolV310Contract.js +2 -11
- package/dist/cjs/sdk/market/pool/index.js +0 -2
- package/dist/cjs/sdk/market/pricefeeds/PriceFeedsRegister.js +3 -3
- package/dist/cjs/sdk/options.js +1 -7
- package/dist/cjs/sdk/pools/PoolService.js +12 -104
- package/dist/cjs/sdk/utils/viem/index.js +0 -2
- package/dist/cjs/sdk/utils/viem/simulateWithPriceUpdates.js +39 -2
- package/dist/esm/dev/AccountOpener.js +6 -47
- package/dist/esm/plugins/adapters/abi/actionAbi.js +1 -1
- package/dist/esm/plugins/adapters/abi/conctructorAbi.js +1 -1
- package/dist/esm/plugins/adapters/createAdapter.js +1 -1
- package/dist/esm/plugins/adapters/types.js +1 -1
- package/dist/esm/plugins/apy/ApyPlugin.js +255 -0
- package/dist/esm/plugins/apy/apy-cache.js +86 -0
- package/dist/esm/plugins/apy/apy-parser.js +143 -0
- package/dist/esm/plugins/apy/constants.js +6 -0
- package/dist/esm/plugins/apy/index.js +7 -0
- package/dist/esm/plugins/apy/pool-apy-utils.js +113 -0
- package/dist/esm/rewards/rewards/extra-apy.js +10 -8
- package/dist/esm/sdk/GearboxSDK.js +6 -56
- package/dist/esm/sdk/accounts/AbstractCreditAccountsService.js +17 -332
- package/dist/esm/sdk/accounts/CreditAccountsServiceV310.js +1 -7
- package/dist/esm/sdk/base/TokensMeta.js +45 -32
- package/dist/esm/sdk/base/token-types.js +0 -6
- package/dist/esm/sdk/chain/chains.js +32 -17
- package/dist/esm/sdk/constants/address-provider.js +0 -2
- package/dist/esm/sdk/market/MarketRegister.js +118 -74
- package/dist/esm/sdk/market/MarketSuite.js +0 -3
- package/dist/esm/sdk/market/index.js +0 -1
- package/dist/esm/sdk/market/pool/PoolSuite.js +0 -3
- package/dist/esm/sdk/market/pool/PoolV310Contract.js +2 -11
- package/dist/esm/sdk/market/pool/index.js +0 -1
- package/dist/esm/sdk/market/pricefeeds/PriceFeedsRegister.js +3 -3
- package/dist/esm/sdk/options.js +1 -7
- package/dist/esm/sdk/pools/PoolService.js +13 -109
- package/dist/esm/sdk/utils/viem/index.js +0 -1
- package/dist/esm/sdk/utils/viem/simulateWithPriceUpdates.js +41 -2
- package/dist/types/plugins/adapters/types.d.ts +2 -2
- package/dist/types/plugins/apy/ApyPlugin.d.ts +46 -0
- package/dist/types/plugins/apy/apy-cache.d.ts +28 -0
- package/dist/types/plugins/apy/apy-parser.d.ts +5 -0
- package/dist/types/plugins/apy/constants.d.ts +2 -0
- package/dist/types/plugins/apy/index.d.ts +7 -0
- package/dist/types/plugins/apy/pool-apy-types.d.ts +41 -0
- package/dist/types/plugins/apy/pool-apy-utils.d.ts +73 -0
- package/dist/types/plugins/apy/types.d.ts +37 -0
- package/dist/types/rewards/rewards/api.d.ts +10 -1
- package/dist/types/rewards/rewards/common.d.ts +0 -10
- package/dist/types/rewards/rewards/extra-apy.d.ts +4 -6
- package/dist/types/sdk/GearboxSDK.d.ts +0 -7
- package/dist/types/sdk/accounts/AbstractCreditAccountsService.d.ts +2 -55
- package/dist/types/sdk/accounts/CreditAccountsServiceV310.d.ts +1 -1
- package/dist/types/sdk/accounts/types.d.ts +13 -93
- package/dist/types/sdk/base/TokensMeta.d.ts +3 -14
- package/dist/types/sdk/base/token-types.d.ts +4 -44
- package/dist/types/sdk/base/types.d.ts +11 -116
- package/dist/types/sdk/chain/chains.d.ts +5 -5
- package/dist/types/sdk/constants/address-provider.d.ts +0 -1
- package/dist/types/sdk/market/MarketRegister.d.ts +9 -6
- package/dist/types/sdk/market/MarketSuite.d.ts +0 -2
- package/dist/types/sdk/market/index.d.ts +0 -1
- package/dist/types/sdk/market/oracle/PriceOracleBaseContract.d.ts +2 -3
- package/dist/types/sdk/market/oracle/types.d.ts +10 -3
- package/dist/types/sdk/market/pool/PoolSuite.d.ts +0 -2
- package/dist/types/sdk/market/pool/PoolV310Contract.d.ts +2 -6
- package/dist/types/sdk/market/pool/index.d.ts +0 -1
- package/dist/types/sdk/market/pricefeeds/PriceFeedsRegister.d.ts +1 -1
- package/dist/types/sdk/market/types.d.ts +1 -1
- package/dist/types/sdk/options.d.ts +0 -1
- package/dist/types/sdk/pools/PoolService.d.ts +8 -8
- package/dist/types/sdk/pools/types.d.ts +1 -1
- package/dist/types/sdk/types/state-human.d.ts +0 -2
- package/dist/types/sdk/types/state.d.ts +0 -5
- package/dist/types/sdk/utils/viem/index.d.ts +0 -1
- package/package.json +2 -3
- package/dist/cjs/abi/kyc/iDSRegistryService.js +0 -70
- package/dist/cjs/abi/kyc/iDSToken.js +0 -71
- package/dist/cjs/abi/kyc/iKYCCompressor.js +0 -196
- package/dist/cjs/abi/kyc/iKYCFactory.js +0 -122
- package/dist/cjs/abi/kyc/iKYCUnderlying.js +0 -401
- package/dist/cjs/abi/kyc/iSecuritizeDegenNFT.js +0 -326
- package/dist/cjs/abi/kyc/iSecuritizeKYCFactory.js +0 -319
- package/dist/cjs/plugins/pools-history/Pools7DAgoPlugin.js +0 -108
- package/dist/cjs/plugins/pools-history/index.js +0 -24
- package/dist/cjs/sdk/market/kyc/KYCRegistry.js +0 -269
- package/dist/cjs/sdk/market/kyc/index.js +0 -26
- package/dist/cjs/sdk/market/kyc/securitize/SecuritizeKYCFactory.js +0 -229
- package/dist/cjs/sdk/market/kyc/types.js +0 -29
- package/dist/cjs/sdk/utils/viem/executeDelegatedMulticalls.js +0 -38
- package/dist/esm/abi/kyc/iDSRegistryService.js +0 -46
- package/dist/esm/abi/kyc/iDSToken.js +0 -47
- package/dist/esm/abi/kyc/iKYCCompressor.js +0 -172
- package/dist/esm/abi/kyc/iKYCFactory.js +0 -98
- package/dist/esm/abi/kyc/iKYCUnderlying.js +0 -377
- package/dist/esm/abi/kyc/iSecuritizeDegenNFT.js +0 -302
- package/dist/esm/abi/kyc/iSecuritizeKYCFactory.js +0 -295
- package/dist/esm/plugins/pools-history/Pools7DAgoPlugin.js +0 -90
- package/dist/esm/plugins/pools-history/index.js +0 -2
- package/dist/esm/sdk/market/kyc/KYCRegistry.js +0 -253
- package/dist/esm/sdk/market/kyc/index.js +0 -3
- package/dist/esm/sdk/market/kyc/securitize/SecuritizeKYCFactory.js +0 -205
- package/dist/esm/sdk/market/kyc/securitize/constants.js +0 -4
- package/dist/esm/sdk/market/kyc/securitize/index.js +0 -3
- package/dist/esm/sdk/market/kyc/types.js +0 -5
- package/dist/esm/sdk/utils/viem/executeDelegatedMulticalls.js +0 -14
- package/dist/types/abi/kyc/iDSRegistryService.d.ts +0 -71
- package/dist/types/abi/kyc/iDSToken.d.ts +0 -67
- package/dist/types/abi/kyc/iKYCCompressor.d.ts +0 -228
- package/dist/types/abi/kyc/iKYCFactory.d.ts +0 -139
- package/dist/types/abi/kyc/iKYCUnderlying.d.ts +0 -548
- package/dist/types/abi/kyc/iSecuritizeDegenNFT.d.ts +0 -404
- package/dist/types/abi/kyc/iSecuritizeKYCFactory.d.ts +0 -376
- package/dist/types/plugins/pools-history/Pools7DAgoPlugin.d.ts +0 -20
- package/dist/types/plugins/pools-history/index.d.ts +0 -2
- package/dist/types/plugins/pools-history/types.d.ts +0 -9
- package/dist/types/sdk/market/kyc/KYCRegistry.d.ts +0 -52
- package/dist/types/sdk/market/kyc/index.d.ts +0 -3
- package/dist/types/sdk/market/kyc/securitize/SecuritizeKYCFactory.d.ts +0 -420
- package/dist/types/sdk/market/kyc/securitize/constants.d.ts +0 -1
- package/dist/types/sdk/market/kyc/securitize/index.d.ts +0 -3
- package/dist/types/sdk/market/kyc/securitize/types.d.ts +0 -107
- package/dist/types/sdk/market/kyc/types.d.ts +0 -136
- package/dist/types/sdk/utils/viem/executeDelegatedMulticalls.d.ts +0 -28
- /package/dist/cjs/plugins/{pools-history → apy}/package.json +0 -0
- /package/dist/cjs/plugins/{pools-history → apy}/types.js +0 -0
- /package/dist/esm/plugins/{pools-history → apy}/package.json +0 -0
- /package/dist/esm/plugins/{pools-history/types.js → apy/pool-apy-types.js} +0 -0
- /package/dist/esm/{sdk/market/kyc/securitize → plugins/apy}/types.js +0 -0
|
@@ -1,420 +0,0 @@
|
|
|
1
|
-
import { type Address } from "viem";
|
|
2
|
-
import { BaseContract } from "../../../base/index.js";
|
|
3
|
-
import type { GearboxSDK } from "../../../GearboxSDK.js";
|
|
4
|
-
import type { MultiCall, RawTx } from "../../../types/index.js";
|
|
5
|
-
import type { DStokenData, IKYCFactory, KYCCompressorInvestorData, KYCFactoryData } from "../types.js";
|
|
6
|
-
import type { SecuritizeInvestorData, SecuritizeKYCFactoryStateHuman, SecuritizeOpenAccountRequirements, SecuritizeRegisterMessage } from "./types.js";
|
|
7
|
-
declare const abi: readonly [{
|
|
8
|
-
readonly type: "function";
|
|
9
|
-
readonly name: "contractType";
|
|
10
|
-
readonly inputs: readonly [];
|
|
11
|
-
readonly outputs: readonly [{
|
|
12
|
-
readonly name: "";
|
|
13
|
-
readonly type: "bytes32";
|
|
14
|
-
readonly internalType: "bytes32";
|
|
15
|
-
}];
|
|
16
|
-
readonly stateMutability: "view";
|
|
17
|
-
}, {
|
|
18
|
-
readonly type: "function";
|
|
19
|
-
readonly name: "getCreditAccounts";
|
|
20
|
-
readonly inputs: readonly [{
|
|
21
|
-
readonly name: "investor";
|
|
22
|
-
readonly type: "address";
|
|
23
|
-
readonly internalType: "address";
|
|
24
|
-
}];
|
|
25
|
-
readonly outputs: readonly [{
|
|
26
|
-
readonly name: "";
|
|
27
|
-
readonly type: "address[]";
|
|
28
|
-
readonly internalType: "address[]";
|
|
29
|
-
}];
|
|
30
|
-
readonly stateMutability: "view";
|
|
31
|
-
}, {
|
|
32
|
-
readonly type: "function";
|
|
33
|
-
readonly name: "getDegenNFT";
|
|
34
|
-
readonly inputs: readonly [];
|
|
35
|
-
readonly outputs: readonly [{
|
|
36
|
-
readonly name: "";
|
|
37
|
-
readonly type: "address";
|
|
38
|
-
readonly internalType: "address";
|
|
39
|
-
}];
|
|
40
|
-
readonly stateMutability: "view";
|
|
41
|
-
}, {
|
|
42
|
-
readonly type: "function";
|
|
43
|
-
readonly name: "getInvestor";
|
|
44
|
-
readonly inputs: readonly [{
|
|
45
|
-
readonly name: "creditAccount";
|
|
46
|
-
readonly type: "address";
|
|
47
|
-
readonly internalType: "address";
|
|
48
|
-
}];
|
|
49
|
-
readonly outputs: readonly [{
|
|
50
|
-
readonly name: "";
|
|
51
|
-
readonly type: "address";
|
|
52
|
-
readonly internalType: "address";
|
|
53
|
-
}];
|
|
54
|
-
readonly stateMutability: "view";
|
|
55
|
-
}, {
|
|
56
|
-
readonly type: "function";
|
|
57
|
-
readonly name: "getTokens";
|
|
58
|
-
readonly inputs: readonly [];
|
|
59
|
-
readonly outputs: readonly [{
|
|
60
|
-
readonly name: "";
|
|
61
|
-
readonly type: "address[]";
|
|
62
|
-
readonly internalType: "address[]";
|
|
63
|
-
}];
|
|
64
|
-
readonly stateMutability: "view";
|
|
65
|
-
}, {
|
|
66
|
-
readonly type: "function";
|
|
67
|
-
readonly name: "getWallet";
|
|
68
|
-
readonly inputs: readonly [{
|
|
69
|
-
readonly name: "creditAccount";
|
|
70
|
-
readonly type: "address";
|
|
71
|
-
readonly internalType: "address";
|
|
72
|
-
}];
|
|
73
|
-
readonly outputs: readonly [{
|
|
74
|
-
readonly name: "";
|
|
75
|
-
readonly type: "address";
|
|
76
|
-
readonly internalType: "address";
|
|
77
|
-
}];
|
|
78
|
-
readonly stateMutability: "view";
|
|
79
|
-
}, {
|
|
80
|
-
readonly type: "function";
|
|
81
|
-
readonly name: "isCreditAccount";
|
|
82
|
-
readonly inputs: readonly [{
|
|
83
|
-
readonly name: "creditAccount";
|
|
84
|
-
readonly type: "address";
|
|
85
|
-
readonly internalType: "address";
|
|
86
|
-
}];
|
|
87
|
-
readonly outputs: readonly [{
|
|
88
|
-
readonly name: "";
|
|
89
|
-
readonly type: "bool";
|
|
90
|
-
readonly internalType: "bool";
|
|
91
|
-
}];
|
|
92
|
-
readonly stateMutability: "view";
|
|
93
|
-
}, {
|
|
94
|
-
readonly type: "function";
|
|
95
|
-
readonly name: "isFrozen";
|
|
96
|
-
readonly inputs: readonly [{
|
|
97
|
-
readonly name: "creditAccount";
|
|
98
|
-
readonly type: "address";
|
|
99
|
-
readonly internalType: "address";
|
|
100
|
-
}];
|
|
101
|
-
readonly outputs: readonly [{
|
|
102
|
-
readonly name: "";
|
|
103
|
-
readonly type: "bool";
|
|
104
|
-
readonly internalType: "bool";
|
|
105
|
-
}];
|
|
106
|
-
readonly stateMutability: "view";
|
|
107
|
-
}, {
|
|
108
|
-
readonly type: "function";
|
|
109
|
-
readonly name: "multicall";
|
|
110
|
-
readonly inputs: readonly [{
|
|
111
|
-
readonly name: "creditAccount";
|
|
112
|
-
readonly type: "address";
|
|
113
|
-
readonly internalType: "address";
|
|
114
|
-
}, {
|
|
115
|
-
readonly name: "calls";
|
|
116
|
-
readonly type: "tuple[]";
|
|
117
|
-
readonly internalType: "struct MultiCall[]";
|
|
118
|
-
readonly components: readonly [{
|
|
119
|
-
readonly name: "target";
|
|
120
|
-
readonly type: "address";
|
|
121
|
-
readonly internalType: "address";
|
|
122
|
-
}, {
|
|
123
|
-
readonly name: "callData";
|
|
124
|
-
readonly type: "bytes";
|
|
125
|
-
readonly internalType: "bytes";
|
|
126
|
-
}];
|
|
127
|
-
}, {
|
|
128
|
-
readonly name: "tokensToRegister";
|
|
129
|
-
readonly type: "address[]";
|
|
130
|
-
readonly internalType: "address[]";
|
|
131
|
-
}, {
|
|
132
|
-
readonly name: "signaturesToCache";
|
|
133
|
-
readonly type: "tuple[]";
|
|
134
|
-
readonly internalType: "struct ISecuritizeDegenNFT.RegisterMessage[]";
|
|
135
|
-
readonly components: readonly [{
|
|
136
|
-
readonly name: "token";
|
|
137
|
-
readonly type: "address";
|
|
138
|
-
readonly internalType: "address";
|
|
139
|
-
}, {
|
|
140
|
-
readonly name: "signature";
|
|
141
|
-
readonly type: "tuple";
|
|
142
|
-
readonly internalType: "struct ISecuritizeDegenNFT.Signature";
|
|
143
|
-
readonly components: readonly [{
|
|
144
|
-
readonly name: "deadline";
|
|
145
|
-
readonly type: "uint256";
|
|
146
|
-
readonly internalType: "uint256";
|
|
147
|
-
}, {
|
|
148
|
-
readonly name: "signature";
|
|
149
|
-
readonly type: "bytes";
|
|
150
|
-
readonly internalType: "bytes";
|
|
151
|
-
}];
|
|
152
|
-
}];
|
|
153
|
-
}];
|
|
154
|
-
readonly outputs: readonly [];
|
|
155
|
-
readonly stateMutability: "nonpayable";
|
|
156
|
-
}, {
|
|
157
|
-
readonly type: "function";
|
|
158
|
-
readonly name: "openCreditAccount";
|
|
159
|
-
readonly inputs: readonly [{
|
|
160
|
-
readonly name: "creditManager";
|
|
161
|
-
readonly type: "address";
|
|
162
|
-
readonly internalType: "address";
|
|
163
|
-
}, {
|
|
164
|
-
readonly name: "calls";
|
|
165
|
-
readonly type: "tuple[]";
|
|
166
|
-
readonly internalType: "struct MultiCall[]";
|
|
167
|
-
readonly components: readonly [{
|
|
168
|
-
readonly name: "target";
|
|
169
|
-
readonly type: "address";
|
|
170
|
-
readonly internalType: "address";
|
|
171
|
-
}, {
|
|
172
|
-
readonly name: "callData";
|
|
173
|
-
readonly type: "bytes";
|
|
174
|
-
readonly internalType: "bytes";
|
|
175
|
-
}];
|
|
176
|
-
}, {
|
|
177
|
-
readonly name: "tokensToRegister";
|
|
178
|
-
readonly type: "address[]";
|
|
179
|
-
readonly internalType: "address[]";
|
|
180
|
-
}, {
|
|
181
|
-
readonly name: "signaturesToCache";
|
|
182
|
-
readonly type: "tuple[]";
|
|
183
|
-
readonly internalType: "struct ISecuritizeDegenNFT.RegisterMessage[]";
|
|
184
|
-
readonly components: readonly [{
|
|
185
|
-
readonly name: "token";
|
|
186
|
-
readonly type: "address";
|
|
187
|
-
readonly internalType: "address";
|
|
188
|
-
}, {
|
|
189
|
-
readonly name: "signature";
|
|
190
|
-
readonly type: "tuple";
|
|
191
|
-
readonly internalType: "struct ISecuritizeDegenNFT.Signature";
|
|
192
|
-
readonly components: readonly [{
|
|
193
|
-
readonly name: "deadline";
|
|
194
|
-
readonly type: "uint256";
|
|
195
|
-
readonly internalType: "uint256";
|
|
196
|
-
}, {
|
|
197
|
-
readonly name: "signature";
|
|
198
|
-
readonly type: "bytes";
|
|
199
|
-
readonly internalType: "bytes";
|
|
200
|
-
}];
|
|
201
|
-
}];
|
|
202
|
-
}];
|
|
203
|
-
readonly outputs: readonly [{
|
|
204
|
-
readonly name: "creditAccount";
|
|
205
|
-
readonly type: "address";
|
|
206
|
-
readonly internalType: "address";
|
|
207
|
-
}, {
|
|
208
|
-
readonly name: "wallet";
|
|
209
|
-
readonly type: "address";
|
|
210
|
-
readonly internalType: "address";
|
|
211
|
-
}];
|
|
212
|
-
readonly stateMutability: "nonpayable";
|
|
213
|
-
}, {
|
|
214
|
-
readonly type: "function";
|
|
215
|
-
readonly name: "precomputeWalletAddress";
|
|
216
|
-
readonly inputs: readonly [{
|
|
217
|
-
readonly name: "creditManager";
|
|
218
|
-
readonly type: "address";
|
|
219
|
-
readonly internalType: "address";
|
|
220
|
-
}, {
|
|
221
|
-
readonly name: "investor";
|
|
222
|
-
readonly type: "address";
|
|
223
|
-
readonly internalType: "address";
|
|
224
|
-
}];
|
|
225
|
-
readonly outputs: readonly [{
|
|
226
|
-
readonly name: "";
|
|
227
|
-
readonly type: "address";
|
|
228
|
-
readonly internalType: "address";
|
|
229
|
-
}];
|
|
230
|
-
readonly stateMutability: "view";
|
|
231
|
-
}, {
|
|
232
|
-
readonly type: "function";
|
|
233
|
-
readonly name: "serialize";
|
|
234
|
-
readonly inputs: readonly [];
|
|
235
|
-
readonly outputs: readonly [{
|
|
236
|
-
readonly name: "serializedData";
|
|
237
|
-
readonly type: "bytes";
|
|
238
|
-
readonly internalType: "bytes";
|
|
239
|
-
}];
|
|
240
|
-
readonly stateMutability: "view";
|
|
241
|
-
}, {
|
|
242
|
-
readonly type: "function";
|
|
243
|
-
readonly name: "setFrozenStatus";
|
|
244
|
-
readonly inputs: readonly [{
|
|
245
|
-
readonly name: "creditAccount";
|
|
246
|
-
readonly type: "address";
|
|
247
|
-
readonly internalType: "address";
|
|
248
|
-
}, {
|
|
249
|
-
readonly name: "frozen";
|
|
250
|
-
readonly type: "bool";
|
|
251
|
-
readonly internalType: "bool";
|
|
252
|
-
}];
|
|
253
|
-
readonly outputs: readonly [];
|
|
254
|
-
readonly stateMutability: "nonpayable";
|
|
255
|
-
}, {
|
|
256
|
-
readonly type: "function";
|
|
257
|
-
readonly name: "setInvestor";
|
|
258
|
-
readonly inputs: readonly [{
|
|
259
|
-
readonly name: "creditAccount";
|
|
260
|
-
readonly type: "address";
|
|
261
|
-
readonly internalType: "address";
|
|
262
|
-
}, {
|
|
263
|
-
readonly name: "investor";
|
|
264
|
-
readonly type: "address";
|
|
265
|
-
readonly internalType: "address";
|
|
266
|
-
}];
|
|
267
|
-
readonly outputs: readonly [];
|
|
268
|
-
readonly stateMutability: "nonpayable";
|
|
269
|
-
}, {
|
|
270
|
-
readonly type: "function";
|
|
271
|
-
readonly name: "version";
|
|
272
|
-
readonly inputs: readonly [];
|
|
273
|
-
readonly outputs: readonly [{
|
|
274
|
-
readonly name: "";
|
|
275
|
-
readonly type: "uint256";
|
|
276
|
-
readonly internalType: "uint256";
|
|
277
|
-
}];
|
|
278
|
-
readonly stateMutability: "view";
|
|
279
|
-
}, {
|
|
280
|
-
readonly type: "event";
|
|
281
|
-
readonly name: "CreateWallet";
|
|
282
|
-
readonly inputs: readonly [{
|
|
283
|
-
readonly name: "creditAccount";
|
|
284
|
-
readonly type: "address";
|
|
285
|
-
readonly indexed: true;
|
|
286
|
-
readonly internalType: "address";
|
|
287
|
-
}, {
|
|
288
|
-
readonly name: "wallet";
|
|
289
|
-
readonly type: "address";
|
|
290
|
-
readonly indexed: true;
|
|
291
|
-
readonly internalType: "address";
|
|
292
|
-
}, {
|
|
293
|
-
readonly name: "investor";
|
|
294
|
-
readonly type: "address";
|
|
295
|
-
readonly indexed: true;
|
|
296
|
-
readonly internalType: "address";
|
|
297
|
-
}];
|
|
298
|
-
readonly anonymous: false;
|
|
299
|
-
}, {
|
|
300
|
-
readonly type: "event";
|
|
301
|
-
readonly name: "SetFrozenStatus";
|
|
302
|
-
readonly inputs: readonly [{
|
|
303
|
-
readonly name: "creditAccount";
|
|
304
|
-
readonly type: "address";
|
|
305
|
-
readonly indexed: true;
|
|
306
|
-
readonly internalType: "address";
|
|
307
|
-
}, {
|
|
308
|
-
readonly name: "frozen";
|
|
309
|
-
readonly type: "bool";
|
|
310
|
-
readonly indexed: false;
|
|
311
|
-
readonly internalType: "bool";
|
|
312
|
-
}];
|
|
313
|
-
readonly anonymous: false;
|
|
314
|
-
}, {
|
|
315
|
-
readonly type: "event";
|
|
316
|
-
readonly name: "SetInvestor";
|
|
317
|
-
readonly inputs: readonly [{
|
|
318
|
-
readonly name: "creditAccount";
|
|
319
|
-
readonly type: "address";
|
|
320
|
-
readonly indexed: true;
|
|
321
|
-
readonly internalType: "address";
|
|
322
|
-
}, {
|
|
323
|
-
readonly name: "oldInvestor";
|
|
324
|
-
readonly type: "address";
|
|
325
|
-
readonly indexed: true;
|
|
326
|
-
readonly internalType: "address";
|
|
327
|
-
}, {
|
|
328
|
-
readonly name: "newInvestor";
|
|
329
|
-
readonly type: "address";
|
|
330
|
-
readonly indexed: true;
|
|
331
|
-
readonly internalType: "address";
|
|
332
|
-
}];
|
|
333
|
-
readonly anonymous: false;
|
|
334
|
-
}, {
|
|
335
|
-
readonly type: "error";
|
|
336
|
-
readonly name: "CallerIsNotInvestorException";
|
|
337
|
-
readonly inputs: readonly [{
|
|
338
|
-
readonly name: "caller";
|
|
339
|
-
readonly type: "address";
|
|
340
|
-
readonly internalType: "address";
|
|
341
|
-
}, {
|
|
342
|
-
readonly name: "creditAccount";
|
|
343
|
-
readonly type: "address";
|
|
344
|
-
readonly internalType: "address";
|
|
345
|
-
}];
|
|
346
|
-
}, {
|
|
347
|
-
readonly type: "error";
|
|
348
|
-
readonly name: "FrozenCreditAccountException";
|
|
349
|
-
readonly inputs: readonly [{
|
|
350
|
-
readonly name: "creditAccount";
|
|
351
|
-
readonly type: "address";
|
|
352
|
-
readonly internalType: "address";
|
|
353
|
-
}];
|
|
354
|
-
}, {
|
|
355
|
-
readonly type: "error";
|
|
356
|
-
readonly name: "InvalidCreditManagerException";
|
|
357
|
-
readonly inputs: readonly [{
|
|
358
|
-
readonly name: "creditManager";
|
|
359
|
-
readonly type: "address";
|
|
360
|
-
readonly internalType: "address";
|
|
361
|
-
}];
|
|
362
|
-
}, {
|
|
363
|
-
readonly type: "error";
|
|
364
|
-
readonly name: "InvalidUnderlyingTokenException";
|
|
365
|
-
readonly inputs: readonly [{
|
|
366
|
-
readonly name: "underlying";
|
|
367
|
-
readonly type: "address";
|
|
368
|
-
readonly internalType: "address";
|
|
369
|
-
}];
|
|
370
|
-
}, {
|
|
371
|
-
readonly type: "error";
|
|
372
|
-
readonly name: "UnknownCreditAccountException";
|
|
373
|
-
readonly inputs: readonly [{
|
|
374
|
-
readonly name: "creditAccount";
|
|
375
|
-
readonly type: "address";
|
|
376
|
-
readonly internalType: "address";
|
|
377
|
-
}];
|
|
378
|
-
}, {
|
|
379
|
-
readonly type: "error";
|
|
380
|
-
readonly name: "ZeroAddressException";
|
|
381
|
-
readonly inputs: readonly [];
|
|
382
|
-
}];
|
|
383
|
-
type abi = typeof abi;
|
|
384
|
-
export declare class SecuritizeKYCFactory extends BaseContract<abi> implements IKYCFactory<SecuritizeInvestorData, SecuritizeOpenAccountRequirements> {
|
|
385
|
-
#private;
|
|
386
|
-
readonly degenNFT: Address;
|
|
387
|
-
readonly owner: Address;
|
|
388
|
-
readonly dsTokens: DStokenData[];
|
|
389
|
-
constructor(sdk: GearboxSDK, data: KYCFactoryData);
|
|
390
|
-
/**
|
|
391
|
-
* {@inheritDoc IKYCFactory.decodeInvestorData}
|
|
392
|
-
*/
|
|
393
|
-
decodeInvestorData(data: KYCCompressorInvestorData): SecuritizeInvestorData;
|
|
394
|
-
/**
|
|
395
|
-
* {@inheritDoc IKYCFactory.getInvestor}
|
|
396
|
-
*/
|
|
397
|
-
getInvestor(creditAccount: Address, fromCache?: boolean): Promise<Address>;
|
|
398
|
-
/**
|
|
399
|
-
* {@inheritDoc IKYCFactory.precomputeWalletAddress}
|
|
400
|
-
*/
|
|
401
|
-
precomputeWalletAddress(creditManager: Address, investor: Address): Promise<Address>;
|
|
402
|
-
/**
|
|
403
|
-
* {@inheritDoc IKYCFactory.getWallet}
|
|
404
|
-
*/
|
|
405
|
-
getWallet(creditAccount: Address): Promise<Address>;
|
|
406
|
-
/**
|
|
407
|
-
* {@inheritDoc IKYCFactory.multicall}
|
|
408
|
-
*/
|
|
409
|
-
multicall(creditAccount: Address, calls: MultiCall[], tokensToRegister: Address[], signaturesToCache: SecuritizeRegisterMessage[]): RawTx;
|
|
410
|
-
/**
|
|
411
|
-
* {@inheritDoc IKYCFactory.getOpenAccountRequirements}
|
|
412
|
-
*/
|
|
413
|
-
getOpenAccountRequirements(investor: Address): Promise<SecuritizeOpenAccountRequirements | undefined>;
|
|
414
|
-
/**
|
|
415
|
-
* {@inheritDoc IKYCFactory.openCreditAccount}
|
|
416
|
-
*/
|
|
417
|
-
openCreditAccount(creditManager: Address, calls: MultiCall[], tokensToRegister: Address[], signaturesToCache: SecuritizeRegisterMessage[]): RawTx;
|
|
418
|
-
stateHuman(_raw?: boolean): SecuritizeKYCFactoryStateHuman;
|
|
419
|
-
}
|
|
420
|
-
export {};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export declare const KYC_FACTORY_SECURITIZE = "KYC_FACTORY::SECURITIZE";
|
|
@@ -1,107 +0,0 @@
|
|
|
1
|
-
import type { Address, Hex } from "viem";
|
|
2
|
-
import type { BaseContractStateHuman } from "../../../types/index.js";
|
|
3
|
-
import type { OpenAccountRequirements } from "../types.js";
|
|
4
|
-
import type { KYC_FACTORY_SECURITIZE } from "./constants.js";
|
|
5
|
-
/**
|
|
6
|
-
* Cached registration signature for a single DSToken, stored in the
|
|
7
|
-
* @see SecuritizeDegenNFT in https://github.com/Gearbox-protocol/periphery-v3
|
|
8
|
-
*
|
|
9
|
-
**/
|
|
10
|
-
export interface SecuritizeRegisterMessage {
|
|
11
|
-
/** DSToken address the signature authorises. */
|
|
12
|
-
token: Address;
|
|
13
|
-
/** EIP-712 deadline + raw signature bytes. */
|
|
14
|
-
signature: SecuritizeSignature;
|
|
15
|
-
}
|
|
16
|
-
/**
|
|
17
|
-
* Deadline-bound EIP-712 signature produced by the investor.
|
|
18
|
-
*
|
|
19
|
-
**/
|
|
20
|
-
export interface SecuritizeSignature {
|
|
21
|
-
/** Unix timestamp after which the signature is no longer valid. */
|
|
22
|
-
deadline: bigint;
|
|
23
|
-
/** Raw EIP-712 signature bytes. */
|
|
24
|
-
signature: Hex;
|
|
25
|
-
}
|
|
26
|
-
/**
|
|
27
|
-
* EIP-712 typed-data message that must be signed by the investor to allow the
|
|
28
|
-
* KYC factory to register a credit account as a vault in Securitize's VaultRegistrar
|
|
29
|
-
* @see VaultRegistrar in https://github.com/Gearbox-protocol/periphery-v3
|
|
30
|
-
*
|
|
31
|
-
**/
|
|
32
|
-
export interface SecuritizeRegisterVaultMessage {
|
|
33
|
-
/** EIP-712 domain from the VaultRegistrar contract. */
|
|
34
|
-
domain: {
|
|
35
|
-
name: string;
|
|
36
|
-
version: string;
|
|
37
|
-
chainId: bigint;
|
|
38
|
-
verifyingContract: Address;
|
|
39
|
-
};
|
|
40
|
-
/** Investor EOA that will sign the message. */
|
|
41
|
-
investor: Address;
|
|
42
|
-
/** Operator address (the DegenNFT contract). */
|
|
43
|
-
operator: Address;
|
|
44
|
-
/** DSToken address to register for. */
|
|
45
|
-
token: Address;
|
|
46
|
-
/** Monotonic nonce from VaultRegistrar (investor, operator). */
|
|
47
|
-
nonce: bigint;
|
|
48
|
-
/** Unix timestamp after which the message is no longer valid. */
|
|
49
|
-
deadline: bigint;
|
|
50
|
-
}
|
|
51
|
-
/**
|
|
52
|
-
* Per-credit-account data decoded from the KYC compressor's
|
|
53
|
-
* `getCreditAccountData` extra details for a Securitize factory.
|
|
54
|
-
**/
|
|
55
|
-
export interface SecuritizeCreditAccountData {
|
|
56
|
-
/** Credit account address. */
|
|
57
|
-
creditAccount: Address;
|
|
58
|
-
/** SecuritizeWallet proxy that owns the credit account. */
|
|
59
|
-
wallet: Address;
|
|
60
|
-
/** Whether the Securitize admin has frozen this account. */
|
|
61
|
-
frozen: boolean;
|
|
62
|
-
/** DSToken addresses where this credit account is registered as a vault. */
|
|
63
|
-
registeredTokens: Address[];
|
|
64
|
-
}
|
|
65
|
-
/**
|
|
66
|
-
* Investor-level data decoded from the KYC compressor's `getKYCInvestorData`
|
|
67
|
-
* extra details for a Securitize factory.
|
|
68
|
-
**/
|
|
69
|
-
export interface SecuritizeInvestorData {
|
|
70
|
-
/** Securitize KYC factory address that produced this data. */
|
|
71
|
-
factory: Address;
|
|
72
|
-
/** Credit accounts owned by the investor through this factory. */
|
|
73
|
-
creditAccounts: SecuritizeCreditAccountData[];
|
|
74
|
-
/** DSToken addresses where the investor is already registered. */
|
|
75
|
-
registeredTokens: Address[];
|
|
76
|
-
/** Cached signatures still valid and reusable for registration. */
|
|
77
|
-
cachedSignatures: SecuritizeRegisterMessage[];
|
|
78
|
-
/** EIP-712 messages the investor must sign to register new vaults. */
|
|
79
|
-
registerVaultMessages: SecuritizeRegisterVaultMessage[];
|
|
80
|
-
}
|
|
81
|
-
/**
|
|
82
|
-
* Human-readable serialisation of {@link SecuritizeKYCFactory} state.
|
|
83
|
-
**/
|
|
84
|
-
export interface SecuritizeKYCFactoryStateHuman extends BaseContractStateHuman {
|
|
85
|
-
owner: string;
|
|
86
|
-
degenNFT: string;
|
|
87
|
-
dsTokens: {
|
|
88
|
-
addr: string;
|
|
89
|
-
symbol: string;
|
|
90
|
-
name: string;
|
|
91
|
-
decimals: number;
|
|
92
|
-
registrar: string;
|
|
93
|
-
operators: string[];
|
|
94
|
-
}[];
|
|
95
|
-
}
|
|
96
|
-
export interface SecuritizeOpenAccountRequirements extends OpenAccountRequirements {
|
|
97
|
-
type: typeof KYC_FACTORY_SECURITIZE;
|
|
98
|
-
/**
|
|
99
|
-
* User must visit securitize website to register these tokens
|
|
100
|
-
*/
|
|
101
|
-
tokensToRegister: Address[];
|
|
102
|
-
/**
|
|
103
|
-
* User must sign these messages to gearbox and provide EIP-712 signatures
|
|
104
|
-
* as {@link SecuritizeRegisterMessage} to gearbox
|
|
105
|
-
*/
|
|
106
|
-
requiredSignatures: SecuritizeRegisterVaultMessage[];
|
|
107
|
-
}
|
|
@@ -1,136 +0,0 @@
|
|
|
1
|
-
import type { AbiParametersToPrimitiveTypes, ExtractAbiFunction } from "abitype";
|
|
2
|
-
import type { Address, ContractFunctionParameters } from "viem";
|
|
3
|
-
import type { iKYCCompressorAbi } from "../../../abi/kyc/iKYCCompressor.js";
|
|
4
|
-
import type { IBaseContract, Unarray } from "../../base/index.js";
|
|
5
|
-
import type { MultiCall, RawTx } from "../../types/index.js";
|
|
6
|
-
import type { SecuritizeInvestorData, SecuritizeKYCFactoryStateHuman, SecuritizeRegisterMessage } from "./securitize/types.js";
|
|
7
|
-
/**
|
|
8
|
-
* Discriminated union of all known KYC factory contract type strings.
|
|
9
|
-
**/
|
|
10
|
-
export declare const KYC_FACTORY_TYPES: readonly ["KYC_FACTORY::SECURITIZE"];
|
|
11
|
-
/**
|
|
12
|
-
* String literal union of known KYC factory types.
|
|
13
|
-
**/
|
|
14
|
-
export type KYCFactoryType = (typeof KYC_FACTORY_TYPES)[number];
|
|
15
|
-
/**
|
|
16
|
-
* Raw return type of `KYCCompressor.getKYCMarketsData`.
|
|
17
|
-
**/
|
|
18
|
-
export type KYCCompressorResponse = AbiParametersToPrimitiveTypes<ExtractAbiFunction<typeof iKYCCompressorAbi, "getKYCMarketsData">["outputs"]>;
|
|
19
|
-
/**
|
|
20
|
-
* On-chain state of a KYC underlying token.
|
|
21
|
-
**/
|
|
22
|
-
export type KYCUnderlyingData = Unarray<KYCCompressorResponse[0]>;
|
|
23
|
-
/**
|
|
24
|
-
* On-chain state of a KYC factory.
|
|
25
|
-
**/
|
|
26
|
-
export type KYCFactoryData = Unarray<KYCCompressorResponse[1]>;
|
|
27
|
-
/**
|
|
28
|
-
* Typed contract call parameters for `KYCCompressor.getKYCMarketsData`.
|
|
29
|
-
**/
|
|
30
|
-
export type KYCCompressorCall = ContractFunctionParameters<typeof iKYCCompressorAbi, "view", "getKYCMarketsData">;
|
|
31
|
-
/**
|
|
32
|
-
* Single element of the `KYCCompressor.getKYCInvestorData` return array.
|
|
33
|
-
* Contains per-factory credit accounts and factory-specific extra details.
|
|
34
|
-
**/
|
|
35
|
-
export type KYCCompressorInvestorData = Unarray<AbiParametersToPrimitiveTypes<ExtractAbiFunction<typeof iKYCCompressorAbi, "getKYCInvestorData">["outputs"]>[0]>;
|
|
36
|
-
/**
|
|
37
|
-
* Full KYC compressor response, used as the persisted/hydrated state.
|
|
38
|
-
**/
|
|
39
|
-
export type KYCState = KYCCompressorResponse;
|
|
40
|
-
/**
|
|
41
|
-
* Decoded DSToken data from the SecuritizeDegenNFT contract.
|
|
42
|
-
* Mirrors `ISecuritizeDegenNFT.DSTokenData`.
|
|
43
|
-
**/
|
|
44
|
-
export interface DStokenData {
|
|
45
|
-
/** DSToken address. */
|
|
46
|
-
address: Address;
|
|
47
|
-
/** Securitize VaultRegistrar for this token. */
|
|
48
|
-
registrar: Address;
|
|
49
|
-
/** Addresses authorised to register vaults for this token. */
|
|
50
|
-
operators: Address[];
|
|
51
|
-
}
|
|
52
|
-
/**
|
|
53
|
-
* Investor data decoded from the KYC compressor.
|
|
54
|
-
**/
|
|
55
|
-
export type InvestorData = SecuritizeInvestorData;
|
|
56
|
-
/**
|
|
57
|
-
* Human-readable KYC factory state.
|
|
58
|
-
**/
|
|
59
|
-
export type KYCFactoryStateHuman = SecuritizeKYCFactoryStateHuman;
|
|
60
|
-
/**
|
|
61
|
-
* Human-readable snapshot of the full KYC registry state.
|
|
62
|
-
**/
|
|
63
|
-
export interface KYCStateHuman {
|
|
64
|
-
/** State of each loaded KYC factory. */
|
|
65
|
-
factories: KYCFactoryStateHuman[];
|
|
66
|
-
}
|
|
67
|
-
/**
|
|
68
|
-
* Base type returned by {@link IKYCFactory.getOpenAccountRequirements} when an
|
|
69
|
-
* investor needs to perform additional steps before opening a credit account.
|
|
70
|
-
* Each KYC factory implementation extends this with factory-specific fields
|
|
71
|
-
* (e.g. tokens to register, signatures to provide).
|
|
72
|
-
*
|
|
73
|
-
**/
|
|
74
|
-
export interface OpenAccountRequirements {
|
|
75
|
-
/**
|
|
76
|
-
* Discriminant identifying which KYC factory produced these requirements.
|
|
77
|
-
*/
|
|
78
|
-
type: KYCFactoryType;
|
|
79
|
-
}
|
|
80
|
-
export interface IKYCFactory<TInvestorData, TOpenAccountRequirements extends OpenAccountRequirements> extends IBaseContract {
|
|
81
|
-
/**
|
|
82
|
-
* @internal
|
|
83
|
-
*
|
|
84
|
-
* Compressor provider encoded extra details for investor data
|
|
85
|
-
* Each factory knows how to decode its own extra details
|
|
86
|
-
*
|
|
87
|
-
* @param data raw KYCCompressor InvestorData
|
|
88
|
-
*/
|
|
89
|
-
decodeInvestorData(data: KYCCompressorInvestorData): TInvestorData;
|
|
90
|
-
/**
|
|
91
|
-
* Returns the investor address for a credit account.
|
|
92
|
-
* @param creditAccount credit account address
|
|
93
|
-
* @param fromCache if true, use and update an in-memory cache (creditAccount -> investor). On cache miss, loads from contract and stores the result for future calls.
|
|
94
|
-
*/
|
|
95
|
-
getInvestor(creditAccount: Address, fromCache?: boolean): Promise<Address>;
|
|
96
|
-
/**
|
|
97
|
-
* Precomputes the wallet address for a credit account.
|
|
98
|
-
* TODO: this is securitize-specific, but until there is no other KYC factory, we will keep it here
|
|
99
|
-
* @param creditManager credit manager address
|
|
100
|
-
* @param investor investor address
|
|
101
|
-
*/
|
|
102
|
-
precomputeWalletAddress(creditManager: Address, investor: Address): Promise<Address>;
|
|
103
|
-
/**
|
|
104
|
-
* Returns the wallet address for a credit account.
|
|
105
|
-
* Wallet is a smart contract that owns the credit account, and
|
|
106
|
-
* it is different from the investor address (actual user)
|
|
107
|
-
* @param creditAccount credit account address
|
|
108
|
-
*/
|
|
109
|
-
getWallet(creditAccount: Address): Promise<Address>;
|
|
110
|
-
/**
|
|
111
|
-
* Creates a raw transaction to perform operations on a credit account.
|
|
112
|
-
* Similar to {@link CreditFacadeV310Contract.multicall}
|
|
113
|
-
*
|
|
114
|
-
* @param creditAccount credit account address
|
|
115
|
-
* @param calls calls to perform
|
|
116
|
-
* @param tokensToRegister - TODO: this is securitize-specific, but until there is no other KYC factory, we will keep it here
|
|
117
|
-
* @param signaturesToCache - TODO: this is securitize-specific, but until there is no other KYC factory, we will keep it here
|
|
118
|
-
*/
|
|
119
|
-
multicall(creditAccount: Address, calls: MultiCall[], tokensToRegister: Address[], signaturesToCache: SecuritizeRegisterMessage[]): RawTx;
|
|
120
|
-
/**
|
|
121
|
-
* Checks if the user can open a credit account with this factory.
|
|
122
|
-
* TODO: there should be one more parameter with desired strategy - e.g. tokensToRegister for securitize
|
|
123
|
-
* @param investor investor address
|
|
124
|
-
* @returns open account requirements for the investor or undefined if the user can open a credit account without any further actions
|
|
125
|
-
*/
|
|
126
|
-
getOpenAccountRequirements(investor: Address): Promise<TOpenAccountRequirements | undefined>;
|
|
127
|
-
/**
|
|
128
|
-
* Creates a raw transaction to open a credit account.
|
|
129
|
-
* Similar to {@link CreditFacadeV310Contract.openCreditAccount}
|
|
130
|
-
* @param creditManager credit manager address
|
|
131
|
-
* @param calls initial calls to perform
|
|
132
|
-
* @param tokensToRegister - TODO: this is securitize-specific, but until there is no other KYC factory, we will keep it here
|
|
133
|
-
* @param signaturesToCache - TODO: this is securitize-specific, but until there is no other KYC factory, we will keep it here
|
|
134
|
-
*/
|
|
135
|
-
openCreditAccount(creditManager: Address, calls: MultiCall[], tokensToRegister: Address[], signaturesToCache: SecuritizeRegisterMessage[]): RawTx;
|
|
136
|
-
}
|