@gearbox-protocol/sdk 14.0.0 → 14.1.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 (109) hide show
  1. package/dist/cjs/abi/kyc/iDSRegistryService.js +149 -0
  2. package/dist/cjs/abi/kyc/iDSToken.js +71 -0
  3. package/dist/cjs/abi/kyc/iKYCCompressor.js +196 -0
  4. package/dist/cjs/abi/kyc/iKYCFactory.js +122 -0
  5. package/dist/cjs/abi/kyc/iKYCUnderlying.js +401 -0
  6. package/dist/cjs/abi/kyc/iSecuritizeDegenNFT.js +326 -0
  7. package/dist/cjs/abi/kyc/iSecuritizeKYCFactory.js +319 -0
  8. package/dist/cjs/dev/AccountOpener.js +45 -5
  9. package/dist/cjs/sdk/OnchainSDK.js +55 -5
  10. package/dist/cjs/sdk/accounts/AbstractCreditAccountsService.js +335 -21
  11. package/dist/cjs/sdk/accounts/CreditAccountsServiceV310.js +7 -1
  12. package/dist/cjs/sdk/base/TokensMeta.js +22 -42
  13. package/dist/cjs/sdk/base/token-types.js +9 -0
  14. package/dist/cjs/sdk/chain/chains.js +18 -1
  15. package/dist/cjs/sdk/constants/address-provider.js +3 -0
  16. package/dist/cjs/sdk/market/MarketRegister.js +70 -116
  17. package/dist/cjs/sdk/market/MarketSuite.js +3 -0
  18. package/dist/cjs/sdk/market/index.js +2 -0
  19. package/dist/cjs/sdk/market/kyc/KYCRegistry.js +269 -0
  20. package/dist/cjs/sdk/market/kyc/index.js +26 -0
  21. package/dist/cjs/sdk/market/kyc/securitize/SecuritizeKYCFactory.js +242 -0
  22. package/dist/cjs/sdk/market/kyc/securitize/constants.js +28 -0
  23. package/dist/cjs/sdk/market/kyc/securitize/index.js +26 -0
  24. package/dist/cjs/sdk/market/kyc/securitize/types.js +16 -0
  25. package/dist/cjs/sdk/{accounts/utils.js → market/kyc/types.js} +11 -15
  26. package/dist/cjs/sdk/market/pool/PoolSuite.js +3 -0
  27. package/dist/cjs/sdk/market/pool/PoolV310Contract.js +11 -2
  28. package/dist/cjs/sdk/market/pool/index.js +2 -0
  29. package/dist/cjs/sdk/market/pricefeeds/PriceFeedsRegister.js +3 -3
  30. package/dist/cjs/sdk/options.js +6 -0
  31. package/dist/cjs/sdk/pools/PoolService.js +104 -12
  32. package/dist/cjs/sdk/utils/viem/executeDelegatedMulticalls.js +38 -0
  33. package/dist/cjs/sdk/utils/viem/index.js +2 -0
  34. package/dist/esm/abi/kyc/iDSRegistryService.js +125 -0
  35. package/dist/esm/abi/kyc/iDSToken.js +47 -0
  36. package/dist/esm/abi/kyc/iKYCCompressor.js +172 -0
  37. package/dist/esm/abi/kyc/iKYCFactory.js +98 -0
  38. package/dist/esm/abi/kyc/iKYCUnderlying.js +377 -0
  39. package/dist/esm/abi/kyc/iSecuritizeDegenNFT.js +302 -0
  40. package/dist/esm/abi/kyc/iSecuritizeKYCFactory.js +295 -0
  41. package/dist/esm/dev/AccountOpener.js +47 -6
  42. package/dist/esm/sdk/OnchainSDK.js +57 -5
  43. package/dist/esm/sdk/accounts/AbstractCreditAccountsService.js +336 -22
  44. package/dist/esm/sdk/accounts/CreditAccountsServiceV310.js +7 -1
  45. package/dist/esm/sdk/base/TokensMeta.js +22 -44
  46. package/dist/esm/sdk/base/token-types.js +6 -0
  47. package/dist/esm/sdk/chain/chains.js +18 -1
  48. package/dist/esm/sdk/constants/address-provider.js +2 -0
  49. package/dist/esm/sdk/market/MarketRegister.js +74 -118
  50. package/dist/esm/sdk/market/MarketSuite.js +3 -0
  51. package/dist/esm/sdk/market/index.js +1 -0
  52. package/dist/esm/sdk/market/kyc/KYCRegistry.js +253 -0
  53. package/dist/esm/sdk/market/kyc/index.js +3 -0
  54. package/dist/esm/sdk/market/kyc/securitize/SecuritizeKYCFactory.js +218 -0
  55. package/dist/esm/sdk/market/kyc/securitize/constants.js +4 -0
  56. package/dist/esm/sdk/market/kyc/securitize/index.js +3 -0
  57. package/dist/esm/sdk/market/kyc/securitize/types.js +0 -0
  58. package/dist/esm/sdk/market/kyc/types.js +9 -0
  59. package/dist/esm/sdk/market/pool/PoolSuite.js +3 -0
  60. package/dist/esm/sdk/market/pool/PoolV310Contract.js +11 -2
  61. package/dist/esm/sdk/market/pool/index.js +1 -0
  62. package/dist/esm/sdk/market/pricefeeds/PriceFeedsRegister.js +3 -3
  63. package/dist/esm/sdk/options.js +6 -0
  64. package/dist/esm/sdk/pools/PoolService.js +109 -13
  65. package/dist/esm/sdk/utils/viem/executeDelegatedMulticalls.js +14 -0
  66. package/dist/esm/sdk/utils/viem/index.js +1 -0
  67. package/dist/types/abi/kyc/iDSRegistryService.d.ts +191 -0
  68. package/dist/types/abi/kyc/iDSToken.d.ts +67 -0
  69. package/dist/types/abi/kyc/iKYCCompressor.d.ts +228 -0
  70. package/dist/types/abi/kyc/iKYCFactory.d.ts +139 -0
  71. package/dist/types/abi/kyc/iKYCUnderlying.d.ts +548 -0
  72. package/dist/types/abi/kyc/iSecuritizeDegenNFT.d.ts +404 -0
  73. package/dist/types/abi/kyc/iSecuritizeKYCFactory.d.ts +376 -0
  74. package/dist/types/sdk/OnchainSDK.d.ts +19 -1
  75. package/dist/types/sdk/accounts/AbstractCreditAccountsService.d.ts +59 -6
  76. package/dist/types/sdk/accounts/CreditAccountsServiceV310.d.ts +1 -1
  77. package/dist/types/sdk/accounts/types.d.ts +114 -14
  78. package/dist/types/sdk/base/TokensMeta.d.ts +14 -3
  79. package/dist/types/sdk/base/token-types.d.ts +44 -4
  80. package/dist/types/sdk/base/types.d.ts +116 -2
  81. package/dist/types/sdk/chain/chains.d.ts +5 -1
  82. package/dist/types/sdk/constants/address-provider.d.ts +1 -0
  83. package/dist/types/sdk/market/MarketRegister.d.ts +6 -9
  84. package/dist/types/sdk/market/MarketSuite.d.ts +2 -0
  85. package/dist/types/sdk/market/index.d.ts +1 -0
  86. package/dist/types/sdk/market/kyc/KYCRegistry.d.ts +52 -0
  87. package/dist/types/sdk/market/kyc/index.d.ts +3 -0
  88. package/dist/types/sdk/market/kyc/securitize/SecuritizeKYCFactory.d.ts +429 -0
  89. package/dist/types/sdk/market/kyc/securitize/constants.d.ts +1 -0
  90. package/dist/types/sdk/market/kyc/securitize/index.d.ts +3 -0
  91. package/dist/types/sdk/market/kyc/securitize/types.d.ts +136 -0
  92. package/dist/types/sdk/market/kyc/types.d.ts +171 -0
  93. package/dist/types/sdk/market/oracle/PriceOracleBaseContract.d.ts +3 -2
  94. package/dist/types/sdk/market/oracle/types.d.ts +3 -10
  95. package/dist/types/sdk/market/pool/PoolSuite.d.ts +2 -0
  96. package/dist/types/sdk/market/pool/PoolV310Contract.d.ts +6 -2
  97. package/dist/types/sdk/market/pool/index.d.ts +1 -0
  98. package/dist/types/sdk/market/pricefeeds/PriceFeedsRegister.d.ts +1 -1
  99. package/dist/types/sdk/market/types.d.ts +1 -1
  100. package/dist/types/sdk/options.d.ts +1 -0
  101. package/dist/types/sdk/pools/PoolService.d.ts +8 -8
  102. package/dist/types/sdk/pools/types.d.ts +1 -1
  103. package/dist/types/sdk/types/state-human.d.ts +2 -0
  104. package/dist/types/sdk/types/state.d.ts +5 -0
  105. package/dist/types/sdk/utils/viem/executeDelegatedMulticalls.d.ts +28 -0
  106. package/dist/types/sdk/utils/viem/index.d.ts +1 -0
  107. package/package.json +1 -1
  108. package/dist/esm/sdk/accounts/utils.js +0 -14
  109. package/dist/types/sdk/accounts/utils.d.ts +0 -2
@@ -1,34 +1,84 @@
1
1
  import { iPoolV310Abi } from "../../abi/310/generated.js";
2
+ import { ierc20Abi } from "../../abi/iERC20.js";
2
3
  import { ierc20ZapperDepositsAbi } from "../../abi/iERC20ZapperDeposits.js";
3
4
  import { iethZapperDepositsAbi } from "../../abi/iETHZapperDeposits.js";
4
5
  import { iZapperAbi } from "../../abi/iZapper.js";
5
- import { SDKConstruct } from "../base/index.js";
6
+ import {
7
+ KYC_UNDERLYING_DEFAULT,
8
+ KYC_UNDERLYING_ON_DEMAND,
9
+ SDKConstruct
10
+ } from "../base/index.js";
6
11
  import { NATIVE_ADDRESS } from "../constants/index.js";
7
12
  import { AddressSet, hexEq } from "../utils/index.js";
8
13
  class PoolService extends SDKConstruct {
9
14
  /**
10
- * @inheritdoc IPoolsService.getDepositTokensIn
15
+ * {@inheritDoc IPoolsService.getDepositTokensIn}
11
16
  */
12
17
  getDepositTokensIn(pool) {
18
+ const underlying = this.#describeUnderlying(pool);
19
+ if (this.sdk.tokensMeta.isKYCUnderlying(underlying)) {
20
+ switch (underlying.contractType) {
21
+ case KYC_UNDERLYING_DEFAULT:
22
+ return this.#depositTokensIn(pool, false);
23
+ case KYC_UNDERLYING_ON_DEMAND:
24
+ return [underlying.asset];
25
+ }
26
+ }
13
27
  return this.#depositTokensIn(pool, true);
14
28
  }
15
29
  /**
16
- * @inheritdoc IPoolsService.getDepositTokensOut
30
+ * {@inheritDoc IPoolsService.getDepositTokensOut}
17
31
  */
18
32
  getDepositTokensOut(pool, tokenIn) {
33
+ const underlying = this.#describeUnderlying(pool);
34
+ if (this.sdk.tokensMeta.isKYCUnderlying(underlying)) {
35
+ switch (underlying.contractType) {
36
+ case KYC_UNDERLYING_DEFAULT:
37
+ return this.#depositTokensOut(pool, tokenIn, false);
38
+ case KYC_UNDERLYING_ON_DEMAND:
39
+ return [];
40
+ }
41
+ }
19
42
  return this.#depositTokensOut(pool, tokenIn, true);
20
43
  }
21
44
  /**
22
- * @inheritdoc IPoolsService.getDepositMetadata
45
+ * {@inheritDoc IPoolsService.getDepositMetadata}
23
46
  */
24
47
  getDepositMetadata(pool, tokenIn, tokenOut) {
48
+ const underlying = this.#describeUnderlying(pool);
49
+ if (this.sdk.tokensMeta.isKYCUnderlying(underlying)) {
50
+ switch (underlying.contractType) {
51
+ case KYC_UNDERLYING_DEFAULT: {
52
+ return this.#depositMetadata(
53
+ "kyc-default",
54
+ pool,
55
+ tokenIn,
56
+ tokenOut,
57
+ false
58
+ );
59
+ }
60
+ case KYC_UNDERLYING_ON_DEMAND:
61
+ return {
62
+ zapper: void 0,
63
+ approveTarget: underlying.liquidityProvider.addr,
64
+ permissible: false,
65
+ type: "kyc-on-demand"
66
+ };
67
+ }
68
+ }
25
69
  return this.#depositMetadata("classic", pool, tokenIn, tokenOut, true);
26
70
  }
27
71
  /**
28
- * @inheritdoc IPoolsService.addLiquidity
72
+ * {@inheritDoc IPoolsService.addLiquidity}
29
73
  */
30
74
  addLiquidity(props) {
31
75
  const { collateral, meta, permit, referralCode, pool, wallet } = props;
76
+ const underlying = this.#describeUnderlying(pool);
77
+ if (this.sdk.tokensMeta.isKYCUnderlying(underlying)) {
78
+ if (underlying.contractType === KYC_UNDERLYING_ON_DEMAND) {
79
+ return void 0;
80
+ }
81
+ }
32
82
  const { zapper } = meta;
33
83
  if (zapper && hexEq(zapper.tokenIn.addr, NATIVE_ADDRESS)) {
34
84
  return {
@@ -68,22 +118,51 @@ class PoolService extends SDKConstruct {
68
118
  }
69
119
  }
70
120
  /**
71
- * @inheritdoc IPoolsService.getWithdrawalTokensIn
121
+ * {@inheritDoc IPoolsService.getWithdrawalTokensIn}
72
122
  */
73
123
  getWithdrawalTokensIn(pool) {
124
+ const underlying = this.#describeUnderlying(pool);
125
+ if (this.sdk.tokensMeta.isKYCUnderlying(underlying)) {
126
+ switch (underlying.contractType) {
127
+ case KYC_UNDERLYING_DEFAULT:
128
+ return this.#withdrawalTokensIn(pool, false);
129
+ case KYC_UNDERLYING_ON_DEMAND:
130
+ return [];
131
+ }
132
+ }
74
133
  return this.#withdrawalTokensIn(pool, true);
75
134
  }
76
135
  /**
77
- * @inheritdoc IPoolsService.getWithdrawalTokensOut
136
+ * {@inheritDoc IPoolsService.getWithdrawalTokensOut}
78
137
  */
79
138
  getWithdrawalTokensOut(pool, tokenIn) {
139
+ const underlying = this.#describeUnderlying(pool);
140
+ if (this.sdk.tokensMeta.isKYCUnderlying(underlying)) {
141
+ switch (underlying.contractType) {
142
+ case KYC_UNDERLYING_DEFAULT:
143
+ return this.#withdrawalTokensOut(pool, tokenIn, false);
144
+ case KYC_UNDERLYING_ON_DEMAND:
145
+ return [underlying.asset];
146
+ }
147
+ }
80
148
  return this.#withdrawalTokensOut(pool, tokenIn, true);
81
149
  }
82
150
  /**
83
- * @inheritdoc IPoolsService.removeLiquidity
151
+ * {@inheritDoc IPoolsService.removeLiquidity}
84
152
  */
85
153
  removeLiquidity(props) {
86
154
  const { pool, amount, meta, wallet, permit } = props;
155
+ const underlying = this.#describeUnderlying(pool);
156
+ if (this.sdk.tokensMeta.isKYCUnderlying(underlying)) {
157
+ if (underlying.contractType === KYC_UNDERLYING_ON_DEMAND) {
158
+ return {
159
+ abi: ierc20Abi,
160
+ functionName: "approve",
161
+ args: [underlying.liquidityProvider, 0n],
162
+ target: underlying.asset
163
+ };
164
+ }
165
+ }
87
166
  if (meta.zapper) {
88
167
  return permit ? {
89
168
  target: meta.zapper.baseParams.addr,
@@ -112,9 +191,30 @@ class PoolService extends SDKConstruct {
112
191
  };
113
192
  }
114
193
  /**
115
- * @inheritdoc IPoolsService.getWithdrawalMetadata
194
+ * {@inheritDoc IPoolsService.getWithdrawalMetadata}
116
195
  */
117
196
  getWithdrawalMetadata(pool, tokenIn, tokenOut) {
197
+ const underlying = this.#describeUnderlying(pool);
198
+ if (this.sdk.tokensMeta.isKYCUnderlying(underlying)) {
199
+ switch (underlying.contractType) {
200
+ case KYC_UNDERLYING_DEFAULT: {
201
+ return this.#withdrawalMetadata(
202
+ "kyc-default",
203
+ pool,
204
+ tokenIn,
205
+ tokenOut,
206
+ false
207
+ );
208
+ }
209
+ case KYC_UNDERLYING_ON_DEMAND:
210
+ return {
211
+ zapper: void 0,
212
+ approveTarget: void 0,
213
+ permissible: false,
214
+ type: "kyc-on-demand"
215
+ };
216
+ }
217
+ }
118
218
  return this.#withdrawalMetadata("classic", pool, tokenIn, tokenOut, true);
119
219
  }
120
220
  /**
@@ -274,8 +374,6 @@ class PoolService extends SDKConstruct {
274
374
  zapper,
275
375
  // Approval target is zapper when routed, otherwise the pool contract.
276
376
  approveTarget: zapper?.baseParams.addr ?? pool.pool.address,
277
- // TODO: instead of permissible, return permitType depending on tokenIn
278
- // "none" | "eip2612" | "dai_like";
279
377
  permissible: !!zapper && !hexEq(tokenIn, NATIVE_ADDRESS),
280
378
  type
281
379
  };
@@ -303,8 +401,6 @@ class PoolService extends SDKConstruct {
303
401
  zapper,
304
402
  // Approval target exists only for zapper-based withdrawals.
305
403
  approveTarget: zapper?.baseParams.addr,
306
- // TODO: instead of permissible, return permitType depending on tokenIn
307
- // "none" | "eip2612" | "dai_like";
308
404
  permissible: !!zapper,
309
405
  type
310
406
  };
@@ -0,0 +1,14 @@
1
+ import { simulateWithPriceUpdates } from "./simulateWithPriceUpdates.js";
2
+ async function executeDelegatedMulticalls(client, multicalls, opts) {
3
+ if (!multicalls.length) return;
4
+ const results = await simulateWithPriceUpdates(client, {
5
+ ...opts,
6
+ contracts: multicalls.map((d) => d.call)
7
+ });
8
+ for (let i = 0; i < multicalls.length; i++) {
9
+ multicalls[i].onResult(results[i]);
10
+ }
11
+ }
12
+ export {
13
+ executeDelegatedMulticalls
14
+ };
@@ -1,4 +1,5 @@
1
1
  export * from "./cast.js";
2
+ export * from "./executeDelegatedMulticalls.js";
2
3
  export * from "./sendRawTx.js";
3
4
  export * from "./simulateMulticall.js";
4
5
  export * from "./simulateWithPriceUpdates.js";
@@ -0,0 +1,191 @@
1
+ export declare const iDSRegistryServiceAbi: readonly [{
2
+ readonly type: "function";
3
+ readonly name: "ACCREDITED";
4
+ readonly inputs: readonly [];
5
+ readonly outputs: readonly [{
6
+ readonly name: "";
7
+ readonly type: "uint8";
8
+ readonly internalType: "uint8";
9
+ }];
10
+ readonly stateMutability: "view";
11
+ }, {
12
+ readonly type: "function";
13
+ readonly name: "APPROVED";
14
+ readonly inputs: readonly [];
15
+ readonly outputs: readonly [{
16
+ readonly name: "";
17
+ readonly type: "uint8";
18
+ readonly internalType: "uint8";
19
+ }];
20
+ readonly stateMutability: "view";
21
+ }, {
22
+ readonly type: "function";
23
+ readonly name: "KYC_APPROVED";
24
+ readonly inputs: readonly [];
25
+ readonly outputs: readonly [{
26
+ readonly name: "";
27
+ readonly type: "uint8";
28
+ readonly internalType: "uint8";
29
+ }];
30
+ readonly stateMutability: "view";
31
+ }, {
32
+ readonly type: "function";
33
+ readonly name: "NONE";
34
+ readonly inputs: readonly [];
35
+ readonly outputs: readonly [{
36
+ readonly name: "";
37
+ readonly type: "uint8";
38
+ readonly internalType: "uint8";
39
+ }];
40
+ readonly stateMutability: "view";
41
+ }, {
42
+ readonly type: "function";
43
+ readonly name: "PENDING";
44
+ readonly inputs: readonly [];
45
+ readonly outputs: readonly [{
46
+ readonly name: "";
47
+ readonly type: "uint8";
48
+ readonly internalType: "uint8";
49
+ }];
50
+ readonly stateMutability: "view";
51
+ }, {
52
+ readonly type: "function";
53
+ readonly name: "PROFESSIONAL";
54
+ readonly inputs: readonly [];
55
+ readonly outputs: readonly [{
56
+ readonly name: "";
57
+ readonly type: "uint8";
58
+ readonly internalType: "uint8";
59
+ }];
60
+ readonly stateMutability: "view";
61
+ }, {
62
+ readonly type: "function";
63
+ readonly name: "QUALIFIED";
64
+ readonly inputs: readonly [];
65
+ readonly outputs: readonly [{
66
+ readonly name: "";
67
+ readonly type: "uint8";
68
+ readonly internalType: "uint8";
69
+ }];
70
+ readonly stateMutability: "view";
71
+ }, {
72
+ readonly type: "function";
73
+ readonly name: "REJECTED";
74
+ readonly inputs: readonly [];
75
+ readonly outputs: readonly [{
76
+ readonly name: "";
77
+ readonly type: "uint8";
78
+ readonly internalType: "uint8";
79
+ }];
80
+ readonly stateMutability: "view";
81
+ }, {
82
+ readonly type: "function";
83
+ readonly name: "addWallet";
84
+ readonly inputs: readonly [{
85
+ readonly name: "wallet";
86
+ readonly type: "address";
87
+ readonly internalType: "address";
88
+ }, {
89
+ readonly name: "investorId";
90
+ readonly type: "string";
91
+ readonly internalType: "string";
92
+ }];
93
+ readonly outputs: readonly [];
94
+ readonly stateMutability: "nonpayable";
95
+ }, {
96
+ readonly type: "function";
97
+ readonly name: "getInvestor";
98
+ readonly inputs: readonly [{
99
+ readonly name: "wallet";
100
+ readonly type: "address";
101
+ readonly internalType: "address";
102
+ }];
103
+ readonly outputs: readonly [{
104
+ readonly name: "";
105
+ readonly type: "string";
106
+ readonly internalType: "string";
107
+ }];
108
+ readonly stateMutability: "view";
109
+ }, {
110
+ readonly type: "function";
111
+ readonly name: "isInvestor";
112
+ readonly inputs: readonly [{
113
+ readonly name: "investorId";
114
+ readonly type: "string";
115
+ readonly internalType: "string";
116
+ }];
117
+ readonly outputs: readonly [{
118
+ readonly name: "";
119
+ readonly type: "bool";
120
+ readonly internalType: "bool";
121
+ }];
122
+ readonly stateMutability: "view";
123
+ }, {
124
+ readonly type: "function";
125
+ readonly name: "isWallet";
126
+ readonly inputs: readonly [{
127
+ readonly name: "wallet";
128
+ readonly type: "address";
129
+ readonly internalType: "address";
130
+ }];
131
+ readonly outputs: readonly [{
132
+ readonly name: "";
133
+ readonly type: "bool";
134
+ readonly internalType: "bool";
135
+ }];
136
+ readonly stateMutability: "view";
137
+ }, {
138
+ readonly type: "function";
139
+ readonly name: "registerInvestor";
140
+ readonly inputs: readonly [{
141
+ readonly name: "investorId";
142
+ readonly type: "string";
143
+ readonly internalType: "string";
144
+ }, {
145
+ readonly name: "collisionHash";
146
+ readonly type: "string";
147
+ readonly internalType: "string";
148
+ }];
149
+ readonly outputs: readonly [];
150
+ readonly stateMutability: "nonpayable";
151
+ }, {
152
+ readonly type: "function";
153
+ readonly name: "setAttribute";
154
+ readonly inputs: readonly [{
155
+ readonly name: "investorId";
156
+ readonly type: "string";
157
+ readonly internalType: "string";
158
+ }, {
159
+ readonly name: "attributeId";
160
+ readonly type: "uint8";
161
+ readonly internalType: "uint8";
162
+ }, {
163
+ readonly name: "value";
164
+ readonly type: "uint256";
165
+ readonly internalType: "uint256";
166
+ }, {
167
+ readonly name: "expiry";
168
+ readonly type: "uint256";
169
+ readonly internalType: "uint256";
170
+ }, {
171
+ readonly name: "proof";
172
+ readonly type: "string";
173
+ readonly internalType: "string";
174
+ }];
175
+ readonly outputs: readonly [];
176
+ readonly stateMutability: "nonpayable";
177
+ }, {
178
+ readonly type: "function";
179
+ readonly name: "setCountry";
180
+ readonly inputs: readonly [{
181
+ readonly name: "investorId";
182
+ readonly type: "string";
183
+ readonly internalType: "string";
184
+ }, {
185
+ readonly name: "country";
186
+ readonly type: "string";
187
+ readonly internalType: "string";
188
+ }];
189
+ readonly outputs: readonly [];
190
+ readonly stateMutability: "nonpayable";
191
+ }];
@@ -0,0 +1,67 @@
1
+ export declare const iDSTokenAbi: readonly [{
2
+ readonly type: "function";
3
+ readonly name: "REGISTRY_SERVICE";
4
+ readonly inputs: readonly [];
5
+ readonly outputs: readonly [{
6
+ readonly name: "";
7
+ readonly type: "uint256";
8
+ readonly internalType: "uint256";
9
+ }];
10
+ readonly stateMutability: "view";
11
+ }, {
12
+ readonly type: "function";
13
+ readonly name: "TRUST_SERVICE";
14
+ readonly inputs: readonly [];
15
+ readonly outputs: readonly [{
16
+ readonly name: "";
17
+ readonly type: "uint256";
18
+ readonly internalType: "uint256";
19
+ }];
20
+ readonly stateMutability: "view";
21
+ }, {
22
+ readonly type: "function";
23
+ readonly name: "burn";
24
+ readonly inputs: readonly [{
25
+ readonly name: "from";
26
+ readonly type: "address";
27
+ readonly internalType: "address";
28
+ }, {
29
+ readonly name: "amount";
30
+ readonly type: "uint256";
31
+ readonly internalType: "uint256";
32
+ }, {
33
+ readonly name: "reason";
34
+ readonly type: "string";
35
+ readonly internalType: "string";
36
+ }];
37
+ readonly outputs: readonly [];
38
+ readonly stateMutability: "nonpayable";
39
+ }, {
40
+ readonly type: "function";
41
+ readonly name: "getDSService";
42
+ readonly inputs: readonly [{
43
+ readonly name: "serviceId";
44
+ readonly type: "uint256";
45
+ readonly internalType: "uint256";
46
+ }];
47
+ readonly outputs: readonly [{
48
+ readonly name: "";
49
+ readonly type: "address";
50
+ readonly internalType: "address";
51
+ }];
52
+ readonly stateMutability: "view";
53
+ }, {
54
+ readonly type: "function";
55
+ readonly name: "issueTokens";
56
+ readonly inputs: readonly [{
57
+ readonly name: "to";
58
+ readonly type: "address";
59
+ readonly internalType: "address";
60
+ }, {
61
+ readonly name: "amount";
62
+ readonly type: "uint256";
63
+ readonly internalType: "uint256";
64
+ }];
65
+ readonly outputs: readonly [];
66
+ readonly stateMutability: "nonpayable";
67
+ }];
@@ -0,0 +1,228 @@
1
+ export declare const iKYCCompressorAbi: readonly [{
2
+ readonly type: "function";
3
+ readonly name: "contractType";
4
+ readonly inputs: readonly [];
5
+ readonly outputs: readonly [{
6
+ readonly name: "";
7
+ readonly type: "bytes32";
8
+ readonly internalType: "bytes32";
9
+ }];
10
+ readonly stateMutability: "view";
11
+ }, {
12
+ readonly type: "function";
13
+ readonly name: "getKYCInvestorData";
14
+ readonly inputs: readonly [{
15
+ readonly name: "investor";
16
+ readonly type: "address";
17
+ readonly internalType: "address";
18
+ }, {
19
+ readonly name: "factories";
20
+ readonly type: "address[]";
21
+ readonly internalType: "address[]";
22
+ }];
23
+ readonly outputs: readonly [{
24
+ readonly name: "";
25
+ readonly type: "tuple[]";
26
+ readonly internalType: "struct IKYCCompressor.KYCInvestorData[]";
27
+ readonly components: readonly [{
28
+ readonly name: "creditAccounts";
29
+ readonly type: "tuple[]";
30
+ readonly internalType: "struct IKYCCompressor.KYCCreditAccountData[]";
31
+ readonly components: readonly [{
32
+ readonly name: "creditAccount";
33
+ readonly type: "address";
34
+ readonly internalType: "address";
35
+ }, {
36
+ readonly name: "wallet";
37
+ readonly type: "address";
38
+ readonly internalType: "address";
39
+ }, {
40
+ readonly name: "frozen";
41
+ readonly type: "bool";
42
+ readonly internalType: "bool";
43
+ }, {
44
+ readonly name: "extraDetails";
45
+ readonly type: "bytes";
46
+ readonly internalType: "bytes";
47
+ }];
48
+ }, {
49
+ readonly name: "extraDetails";
50
+ readonly type: "bytes";
51
+ readonly internalType: "bytes";
52
+ }];
53
+ }];
54
+ readonly stateMutability: "view";
55
+ }, {
56
+ readonly type: "function";
57
+ readonly name: "getKYCMarketsData";
58
+ readonly inputs: readonly [{
59
+ readonly name: "configurators";
60
+ readonly type: "address[]";
61
+ readonly internalType: "address[]";
62
+ }, {
63
+ readonly name: "factories";
64
+ readonly type: "address[]";
65
+ readonly internalType: "address[]";
66
+ }];
67
+ readonly outputs: readonly [{
68
+ readonly name: "";
69
+ readonly type: "tuple[]";
70
+ readonly internalType: "struct IKYCCompressor.KYCUnderlyingData[]";
71
+ readonly components: readonly [{
72
+ readonly name: "baseParams";
73
+ readonly type: "tuple";
74
+ readonly internalType: "struct BaseParams";
75
+ readonly components: readonly [{
76
+ readonly name: "addr";
77
+ readonly type: "address";
78
+ readonly internalType: "address";
79
+ }, {
80
+ readonly name: "version";
81
+ readonly type: "uint256";
82
+ readonly internalType: "uint256";
83
+ }, {
84
+ readonly name: "contractType";
85
+ readonly type: "bytes32";
86
+ readonly internalType: "bytes32";
87
+ }, {
88
+ readonly name: "serializedParams";
89
+ readonly type: "bytes";
90
+ readonly internalType: "bytes";
91
+ }];
92
+ }, {
93
+ readonly name: "asset";
94
+ readonly type: "address";
95
+ readonly internalType: "address";
96
+ }, {
97
+ readonly name: "factory";
98
+ readonly type: "address";
99
+ readonly internalType: "address";
100
+ }, {
101
+ readonly name: "extraDetails";
102
+ readonly type: "bytes";
103
+ readonly internalType: "bytes";
104
+ }];
105
+ }, {
106
+ readonly name: "";
107
+ readonly type: "tuple[]";
108
+ readonly internalType: "struct IKYCCompressor.KYCFactoryData[]";
109
+ readonly components: readonly [{
110
+ readonly name: "baseParams";
111
+ readonly type: "tuple";
112
+ readonly internalType: "struct BaseParams";
113
+ readonly components: readonly [{
114
+ readonly name: "addr";
115
+ readonly type: "address";
116
+ readonly internalType: "address";
117
+ }, {
118
+ readonly name: "version";
119
+ readonly type: "uint256";
120
+ readonly internalType: "uint256";
121
+ }, {
122
+ readonly name: "contractType";
123
+ readonly type: "bytes32";
124
+ readonly internalType: "bytes32";
125
+ }, {
126
+ readonly name: "serializedParams";
127
+ readonly type: "bytes";
128
+ readonly internalType: "bytes";
129
+ }];
130
+ }, {
131
+ readonly name: "tokens";
132
+ readonly type: "tuple[]";
133
+ readonly internalType: "struct TokenData[]";
134
+ readonly components: readonly [{
135
+ readonly name: "addr";
136
+ readonly type: "address";
137
+ readonly internalType: "address";
138
+ }, {
139
+ readonly name: "symbol";
140
+ readonly type: "string";
141
+ readonly internalType: "string";
142
+ }, {
143
+ readonly name: "name";
144
+ readonly type: "string";
145
+ readonly internalType: "string";
146
+ }, {
147
+ readonly name: "decimals";
148
+ readonly type: "uint8";
149
+ readonly internalType: "uint8";
150
+ }];
151
+ }, {
152
+ readonly name: "extraDetails";
153
+ readonly type: "bytes";
154
+ readonly internalType: "bytes";
155
+ }];
156
+ }];
157
+ readonly stateMutability: "view";
158
+ }, {
159
+ readonly type: "function";
160
+ readonly name: "setSubcompressor";
161
+ readonly inputs: readonly [{
162
+ readonly name: "subcompressor";
163
+ readonly type: "address";
164
+ readonly internalType: "address";
165
+ }];
166
+ readonly outputs: readonly [];
167
+ readonly stateMutability: "nonpayable";
168
+ }, {
169
+ readonly type: "function";
170
+ readonly name: "subcompressors";
171
+ readonly inputs: readonly [{
172
+ readonly name: "domain";
173
+ readonly type: "bytes32";
174
+ readonly internalType: "bytes32";
175
+ }, {
176
+ readonly name: "postfix";
177
+ readonly type: "bytes32";
178
+ readonly internalType: "bytes32";
179
+ }];
180
+ readonly outputs: readonly [{
181
+ readonly name: "";
182
+ readonly type: "address";
183
+ readonly internalType: "address";
184
+ }];
185
+ readonly stateMutability: "view";
186
+ }, {
187
+ readonly type: "function";
188
+ readonly name: "version";
189
+ readonly inputs: readonly [];
190
+ readonly outputs: readonly [{
191
+ readonly name: "";
192
+ readonly type: "uint256";
193
+ readonly internalType: "uint256";
194
+ }];
195
+ readonly stateMutability: "view";
196
+ }, {
197
+ readonly type: "error";
198
+ readonly name: "CallerIsNotInstanceOwnerException";
199
+ readonly inputs: readonly [{
200
+ readonly name: "caller";
201
+ readonly type: "address";
202
+ readonly internalType: "address";
203
+ }];
204
+ }, {
205
+ readonly type: "error";
206
+ readonly name: "InvalidDomainException";
207
+ readonly inputs: readonly [{
208
+ readonly name: "domain";
209
+ readonly type: "bytes32";
210
+ readonly internalType: "bytes32";
211
+ }];
212
+ }, {
213
+ readonly type: "error";
214
+ readonly name: "InvalidKYCFactoryException";
215
+ readonly inputs: readonly [{
216
+ readonly name: "factory";
217
+ readonly type: "address";
218
+ readonly internalType: "address";
219
+ }];
220
+ }, {
221
+ readonly type: "error";
222
+ readonly name: "InvalidMarketConfiguratorException";
223
+ readonly inputs: readonly [{
224
+ readonly name: "marketConfigurator";
225
+ readonly type: "address";
226
+ readonly internalType: "address";
227
+ }];
228
+ }];