@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
@@ -18,11 +18,13 @@ module.exports = __toCommonJS(pool_exports);
18
18
  __reExport(pool_exports, require("./GaugeContract.js"), module.exports);
19
19
  __reExport(pool_exports, require("./LinearInterestRateModelContract.js"), module.exports);
20
20
  __reExport(pool_exports, require("./PoolSuite.js"), module.exports);
21
+ __reExport(pool_exports, require("./PoolV310Contract.js"), module.exports);
21
22
  __reExport(pool_exports, require("./types.js"), module.exports);
22
23
  // Annotate the CommonJS export names for ESM import in node:
23
24
  0 && (module.exports = {
24
25
  ...require("./GaugeContract.js"),
25
26
  ...require("./LinearInterestRateModelContract.js"),
26
27
  ...require("./PoolSuite.js"),
28
+ ...require("./PoolV310Contract.js"),
27
29
  ...require("./types.js")
28
30
  });
@@ -237,13 +237,13 @@ class PriceFeedRegister extends import_base.SDKConstruct {
237
237
  * Loads PARTIAL information about all updatable price feeds from MarketCompressor
238
238
  * Discovered price feeds are not saved anywhere in PriceFeedRegister, and can later be used to load price feed updates
239
239
  */
240
- async getPartialUpdatablePriceFeeds(configurators, pools) {
240
+ async getPartialUpdatablePriceFeeds(configurators) {
241
241
  const [priceFeedCompressorAddress] = this.sdk.addressProvider.mustGetLatest(
242
242
  import_constants.AP_PRICE_FEED_COMPRESSOR,
243
243
  import_constants.VERSION_RANGE_310
244
244
  );
245
245
  this.logger?.debug(
246
- { configurators, pools },
246
+ { configurators },
247
247
  `calling getUpdatablePriceFeeds in block ${this.sdk.currentBlock}`
248
248
  );
249
249
  const result = await this.client.readContract({
@@ -253,7 +253,7 @@ class PriceFeedRegister extends import_base.SDKConstruct {
253
253
  args: [
254
254
  {
255
255
  configurators,
256
- pools: pools ?? [],
256
+ pools: [],
257
257
  underlying: import_constants.ADDRESS_0X0
258
258
  }
259
259
  ],
@@ -44,6 +44,12 @@ const AttachOptionsSchema = import_v4.z.object({
44
44
  addressProvider: (0, import_utils.ZodAddress)().optional(),
45
45
  /** Addresses of market configurator contracts to load. */
46
46
  marketConfigurators: import_v4.z.array((0, import_utils.ZodAddress)()).optional(),
47
+ /**
48
+ * Addresses of KYC factory contracts to load.
49
+ * If not set, all default KYC factories for the chain are loaded
50
+ * (from {@link GearboxChain.kycFactories})
51
+ **/
52
+ kycFactories: import_v4.z.array((0, import_utils.ZodAddress)()).optional(),
47
53
  /** Pin SDK to a specific block number during attach. */
48
54
  blockNumber: import_v4.z.union([import_v4.z.bigint().nonnegative(), import_v4.z.number().int().nonnegative()]).optional(),
49
55
  /** Skip fetching updatable price feeds on attach and sync. */
@@ -22,6 +22,7 @@ __export(PoolService_exports, {
22
22
  });
23
23
  module.exports = __toCommonJS(PoolService_exports);
24
24
  var import_generated = require("../../abi/310/generated.js");
25
+ var import_iERC20 = require("../../abi/iERC20.js");
25
26
  var import_iERC20ZapperDeposits = require("../../abi/iERC20ZapperDeposits.js");
26
27
  var import_iETHZapperDeposits = require("../../abi/iETHZapperDeposits.js");
27
28
  var import_iZapper = require("../../abi/iZapper.js");
@@ -30,28 +31,73 @@ var import_constants = require("../constants/index.js");
30
31
  var import_utils = require("../utils/index.js");
31
32
  class PoolService extends import_base.SDKConstruct {
32
33
  /**
33
- * @inheritdoc IPoolsService.getDepositTokensIn
34
+ * {@inheritDoc IPoolsService.getDepositTokensIn}
34
35
  */
35
36
  getDepositTokensIn(pool) {
37
+ const underlying = this.#describeUnderlying(pool);
38
+ if (this.sdk.tokensMeta.isKYCUnderlying(underlying)) {
39
+ switch (underlying.contractType) {
40
+ case import_base.KYC_UNDERLYING_DEFAULT:
41
+ return this.#depositTokensIn(pool, false);
42
+ case import_base.KYC_UNDERLYING_ON_DEMAND:
43
+ return [underlying.asset];
44
+ }
45
+ }
36
46
  return this.#depositTokensIn(pool, true);
37
47
  }
38
48
  /**
39
- * @inheritdoc IPoolsService.getDepositTokensOut
49
+ * {@inheritDoc IPoolsService.getDepositTokensOut}
40
50
  */
41
51
  getDepositTokensOut(pool, tokenIn) {
52
+ const underlying = this.#describeUnderlying(pool);
53
+ if (this.sdk.tokensMeta.isKYCUnderlying(underlying)) {
54
+ switch (underlying.contractType) {
55
+ case import_base.KYC_UNDERLYING_DEFAULT:
56
+ return this.#depositTokensOut(pool, tokenIn, false);
57
+ case import_base.KYC_UNDERLYING_ON_DEMAND:
58
+ return [];
59
+ }
60
+ }
42
61
  return this.#depositTokensOut(pool, tokenIn, true);
43
62
  }
44
63
  /**
45
- * @inheritdoc IPoolsService.getDepositMetadata
64
+ * {@inheritDoc IPoolsService.getDepositMetadata}
46
65
  */
47
66
  getDepositMetadata(pool, tokenIn, tokenOut) {
67
+ const underlying = this.#describeUnderlying(pool);
68
+ if (this.sdk.tokensMeta.isKYCUnderlying(underlying)) {
69
+ switch (underlying.contractType) {
70
+ case import_base.KYC_UNDERLYING_DEFAULT: {
71
+ return this.#depositMetadata(
72
+ "kyc-default",
73
+ pool,
74
+ tokenIn,
75
+ tokenOut,
76
+ false
77
+ );
78
+ }
79
+ case import_base.KYC_UNDERLYING_ON_DEMAND:
80
+ return {
81
+ zapper: void 0,
82
+ approveTarget: underlying.liquidityProvider.addr,
83
+ permissible: false,
84
+ type: "kyc-on-demand"
85
+ };
86
+ }
87
+ }
48
88
  return this.#depositMetadata("classic", pool, tokenIn, tokenOut, true);
49
89
  }
50
90
  /**
51
- * @inheritdoc IPoolsService.addLiquidity
91
+ * {@inheritDoc IPoolsService.addLiquidity}
52
92
  */
53
93
  addLiquidity(props) {
54
94
  const { collateral, meta, permit, referralCode, pool, wallet } = props;
95
+ const underlying = this.#describeUnderlying(pool);
96
+ if (this.sdk.tokensMeta.isKYCUnderlying(underlying)) {
97
+ if (underlying.contractType === import_base.KYC_UNDERLYING_ON_DEMAND) {
98
+ return void 0;
99
+ }
100
+ }
55
101
  const { zapper } = meta;
56
102
  if (zapper && (0, import_utils.hexEq)(zapper.tokenIn.addr, import_constants.NATIVE_ADDRESS)) {
57
103
  return {
@@ -91,22 +137,51 @@ class PoolService extends import_base.SDKConstruct {
91
137
  }
92
138
  }
93
139
  /**
94
- * @inheritdoc IPoolsService.getWithdrawalTokensIn
140
+ * {@inheritDoc IPoolsService.getWithdrawalTokensIn}
95
141
  */
96
142
  getWithdrawalTokensIn(pool) {
143
+ const underlying = this.#describeUnderlying(pool);
144
+ if (this.sdk.tokensMeta.isKYCUnderlying(underlying)) {
145
+ switch (underlying.contractType) {
146
+ case import_base.KYC_UNDERLYING_DEFAULT:
147
+ return this.#withdrawalTokensIn(pool, false);
148
+ case import_base.KYC_UNDERLYING_ON_DEMAND:
149
+ return [];
150
+ }
151
+ }
97
152
  return this.#withdrawalTokensIn(pool, true);
98
153
  }
99
154
  /**
100
- * @inheritdoc IPoolsService.getWithdrawalTokensOut
155
+ * {@inheritDoc IPoolsService.getWithdrawalTokensOut}
101
156
  */
102
157
  getWithdrawalTokensOut(pool, tokenIn) {
158
+ const underlying = this.#describeUnderlying(pool);
159
+ if (this.sdk.tokensMeta.isKYCUnderlying(underlying)) {
160
+ switch (underlying.contractType) {
161
+ case import_base.KYC_UNDERLYING_DEFAULT:
162
+ return this.#withdrawalTokensOut(pool, tokenIn, false);
163
+ case import_base.KYC_UNDERLYING_ON_DEMAND:
164
+ return [underlying.asset];
165
+ }
166
+ }
103
167
  return this.#withdrawalTokensOut(pool, tokenIn, true);
104
168
  }
105
169
  /**
106
- * @inheritdoc IPoolsService.removeLiquidity
170
+ * {@inheritDoc IPoolsService.removeLiquidity}
107
171
  */
108
172
  removeLiquidity(props) {
109
173
  const { pool, amount, meta, wallet, permit } = props;
174
+ const underlying = this.#describeUnderlying(pool);
175
+ if (this.sdk.tokensMeta.isKYCUnderlying(underlying)) {
176
+ if (underlying.contractType === import_base.KYC_UNDERLYING_ON_DEMAND) {
177
+ return {
178
+ abi: import_iERC20.ierc20Abi,
179
+ functionName: "approve",
180
+ args: [underlying.liquidityProvider, 0n],
181
+ target: underlying.asset
182
+ };
183
+ }
184
+ }
110
185
  if (meta.zapper) {
111
186
  return permit ? {
112
187
  target: meta.zapper.baseParams.addr,
@@ -135,9 +210,30 @@ class PoolService extends import_base.SDKConstruct {
135
210
  };
136
211
  }
137
212
  /**
138
- * @inheritdoc IPoolsService.getWithdrawalMetadata
213
+ * {@inheritDoc IPoolsService.getWithdrawalMetadata}
139
214
  */
140
215
  getWithdrawalMetadata(pool, tokenIn, tokenOut) {
216
+ const underlying = this.#describeUnderlying(pool);
217
+ if (this.sdk.tokensMeta.isKYCUnderlying(underlying)) {
218
+ switch (underlying.contractType) {
219
+ case import_base.KYC_UNDERLYING_DEFAULT: {
220
+ return this.#withdrawalMetadata(
221
+ "kyc-default",
222
+ pool,
223
+ tokenIn,
224
+ tokenOut,
225
+ false
226
+ );
227
+ }
228
+ case import_base.KYC_UNDERLYING_ON_DEMAND:
229
+ return {
230
+ zapper: void 0,
231
+ approveTarget: void 0,
232
+ permissible: false,
233
+ type: "kyc-on-demand"
234
+ };
235
+ }
236
+ }
141
237
  return this.#withdrawalMetadata("classic", pool, tokenIn, tokenOut, true);
142
238
  }
143
239
  /**
@@ -297,8 +393,6 @@ class PoolService extends import_base.SDKConstruct {
297
393
  zapper,
298
394
  // Approval target is zapper when routed, otherwise the pool contract.
299
395
  approveTarget: zapper?.baseParams.addr ?? pool.pool.address,
300
- // TODO: instead of permissible, return permitType depending on tokenIn
301
- // "none" | "eip2612" | "dai_like";
302
396
  permissible: !!zapper && !(0, import_utils.hexEq)(tokenIn, import_constants.NATIVE_ADDRESS),
303
397
  type
304
398
  };
@@ -326,8 +420,6 @@ class PoolService extends import_base.SDKConstruct {
326
420
  zapper,
327
421
  // Approval target exists only for zapper-based withdrawals.
328
422
  approveTarget: zapper?.baseParams.addr,
329
- // TODO: instead of permissible, return permitType depending on tokenIn
330
- // "none" | "eip2612" | "dai_like";
331
423
  permissible: !!zapper,
332
424
  type
333
425
  };
@@ -0,0 +1,38 @@
1
+ "use strict";
2
+ var __defProp = Object.defineProperty;
3
+ var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
4
+ var __getOwnPropNames = Object.getOwnPropertyNames;
5
+ var __hasOwnProp = Object.prototype.hasOwnProperty;
6
+ var __export = (target, all) => {
7
+ for (var name in all)
8
+ __defProp(target, name, { get: all[name], enumerable: true });
9
+ };
10
+ var __copyProps = (to, from, except, desc) => {
11
+ if (from && typeof from === "object" || typeof from === "function") {
12
+ for (let key of __getOwnPropNames(from))
13
+ if (!__hasOwnProp.call(to, key) && key !== except)
14
+ __defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
15
+ }
16
+ return to;
17
+ };
18
+ var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
19
+ var executeDelegatedMulticalls_exports = {};
20
+ __export(executeDelegatedMulticalls_exports, {
21
+ executeDelegatedMulticalls: () => executeDelegatedMulticalls
22
+ });
23
+ module.exports = __toCommonJS(executeDelegatedMulticalls_exports);
24
+ var import_simulateWithPriceUpdates = require("./simulateWithPriceUpdates.js");
25
+ async function executeDelegatedMulticalls(client, multicalls, opts) {
26
+ if (!multicalls.length) return;
27
+ const results = await (0, import_simulateWithPriceUpdates.simulateWithPriceUpdates)(client, {
28
+ ...opts,
29
+ contracts: multicalls.map((d) => d.call)
30
+ });
31
+ for (let i = 0; i < multicalls.length; i++) {
32
+ multicalls[i].onResult(results[i]);
33
+ }
34
+ }
35
+ // Annotate the CommonJS export names for ESM import in node:
36
+ 0 && (module.exports = {
37
+ executeDelegatedMulticalls
38
+ });
@@ -16,6 +16,7 @@ var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: tru
16
16
  var viem_exports = {};
17
17
  module.exports = __toCommonJS(viem_exports);
18
18
  __reExport(viem_exports, require("./cast.js"), module.exports);
19
+ __reExport(viem_exports, require("./executeDelegatedMulticalls.js"), module.exports);
19
20
  __reExport(viem_exports, require("./sendRawTx.js"), module.exports);
20
21
  __reExport(viem_exports, require("./simulateMulticall.js"), module.exports);
21
22
  __reExport(viem_exports, require("./simulateWithPriceUpdates.js"), module.exports);
@@ -23,6 +24,7 @@ __reExport(viem_exports, require("./watchBlocksAsync.js"), module.exports);
23
24
  // Annotate the CommonJS export names for ESM import in node:
24
25
  0 && (module.exports = {
25
26
  ...require("./cast.js"),
27
+ ...require("./executeDelegatedMulticalls.js"),
26
28
  ...require("./sendRawTx.js"),
27
29
  ...require("./simulateMulticall.js"),
28
30
  ...require("./simulateWithPriceUpdates.js"),
@@ -0,0 +1,125 @@
1
+ const iDSRegistryServiceAbi = [
2
+ {
3
+ type: "function",
4
+ name: "ACCREDITED",
5
+ inputs: [],
6
+ outputs: [{ name: "", type: "uint8", internalType: "uint8" }],
7
+ stateMutability: "view"
8
+ },
9
+ {
10
+ type: "function",
11
+ name: "APPROVED",
12
+ inputs: [],
13
+ outputs: [{ name: "", type: "uint8", internalType: "uint8" }],
14
+ stateMutability: "view"
15
+ },
16
+ {
17
+ type: "function",
18
+ name: "KYC_APPROVED",
19
+ inputs: [],
20
+ outputs: [{ name: "", type: "uint8", internalType: "uint8" }],
21
+ stateMutability: "view"
22
+ },
23
+ {
24
+ type: "function",
25
+ name: "NONE",
26
+ inputs: [],
27
+ outputs: [{ name: "", type: "uint8", internalType: "uint8" }],
28
+ stateMutability: "view"
29
+ },
30
+ {
31
+ type: "function",
32
+ name: "PENDING",
33
+ inputs: [],
34
+ outputs: [{ name: "", type: "uint8", internalType: "uint8" }],
35
+ stateMutability: "view"
36
+ },
37
+ {
38
+ type: "function",
39
+ name: "PROFESSIONAL",
40
+ inputs: [],
41
+ outputs: [{ name: "", type: "uint8", internalType: "uint8" }],
42
+ stateMutability: "view"
43
+ },
44
+ {
45
+ type: "function",
46
+ name: "QUALIFIED",
47
+ inputs: [],
48
+ outputs: [{ name: "", type: "uint8", internalType: "uint8" }],
49
+ stateMutability: "view"
50
+ },
51
+ {
52
+ type: "function",
53
+ name: "REJECTED",
54
+ inputs: [],
55
+ outputs: [{ name: "", type: "uint8", internalType: "uint8" }],
56
+ stateMutability: "view"
57
+ },
58
+ {
59
+ type: "function",
60
+ name: "addWallet",
61
+ inputs: [
62
+ { name: "wallet", type: "address", internalType: "address" },
63
+ { name: "investorId", type: "string", internalType: "string" }
64
+ ],
65
+ outputs: [],
66
+ stateMutability: "nonpayable"
67
+ },
68
+ {
69
+ type: "function",
70
+ name: "getInvestor",
71
+ inputs: [{ name: "wallet", type: "address", internalType: "address" }],
72
+ outputs: [{ name: "", type: "string", internalType: "string" }],
73
+ stateMutability: "view"
74
+ },
75
+ {
76
+ type: "function",
77
+ name: "isInvestor",
78
+ inputs: [{ name: "investorId", type: "string", internalType: "string" }],
79
+ outputs: [{ name: "", type: "bool", internalType: "bool" }],
80
+ stateMutability: "view"
81
+ },
82
+ {
83
+ type: "function",
84
+ name: "isWallet",
85
+ inputs: [{ name: "wallet", type: "address", internalType: "address" }],
86
+ outputs: [{ name: "", type: "bool", internalType: "bool" }],
87
+ stateMutability: "view"
88
+ },
89
+ {
90
+ type: "function",
91
+ name: "registerInvestor",
92
+ inputs: [
93
+ { name: "investorId", type: "string", internalType: "string" },
94
+ { name: "collisionHash", type: "string", internalType: "string" }
95
+ ],
96
+ outputs: [],
97
+ stateMutability: "nonpayable"
98
+ },
99
+ {
100
+ type: "function",
101
+ name: "setAttribute",
102
+ inputs: [
103
+ { name: "investorId", type: "string", internalType: "string" },
104
+ { name: "attributeId", type: "uint8", internalType: "uint8" },
105
+ { name: "value", type: "uint256", internalType: "uint256" },
106
+ { name: "expiry", type: "uint256", internalType: "uint256" },
107
+ { name: "proof", type: "string", internalType: "string" }
108
+ ],
109
+ outputs: [],
110
+ stateMutability: "nonpayable"
111
+ },
112
+ {
113
+ type: "function",
114
+ name: "setCountry",
115
+ inputs: [
116
+ { name: "investorId", type: "string", internalType: "string" },
117
+ { name: "country", type: "string", internalType: "string" }
118
+ ],
119
+ outputs: [],
120
+ stateMutability: "nonpayable"
121
+ }
122
+ ];
123
+ export {
124
+ iDSRegistryServiceAbi
125
+ };
@@ -0,0 +1,47 @@
1
+ const iDSTokenAbi = [
2
+ {
3
+ type: "function",
4
+ name: "REGISTRY_SERVICE",
5
+ inputs: [],
6
+ outputs: [{ name: "", type: "uint256", internalType: "uint256" }],
7
+ stateMutability: "view"
8
+ },
9
+ {
10
+ type: "function",
11
+ name: "TRUST_SERVICE",
12
+ inputs: [],
13
+ outputs: [{ name: "", type: "uint256", internalType: "uint256" }],
14
+ stateMutability: "view"
15
+ },
16
+ {
17
+ type: "function",
18
+ name: "burn",
19
+ inputs: [
20
+ { name: "from", type: "address", internalType: "address" },
21
+ { name: "amount", type: "uint256", internalType: "uint256" },
22
+ { name: "reason", type: "string", internalType: "string" }
23
+ ],
24
+ outputs: [],
25
+ stateMutability: "nonpayable"
26
+ },
27
+ {
28
+ type: "function",
29
+ name: "getDSService",
30
+ inputs: [{ name: "serviceId", type: "uint256", internalType: "uint256" }],
31
+ outputs: [{ name: "", type: "address", internalType: "address" }],
32
+ stateMutability: "view"
33
+ },
34
+ {
35
+ type: "function",
36
+ name: "issueTokens",
37
+ inputs: [
38
+ { name: "to", type: "address", internalType: "address" },
39
+ { name: "amount", type: "uint256", internalType: "uint256" }
40
+ ],
41
+ outputs: [],
42
+ stateMutability: "nonpayable"
43
+ }
44
+ ];
45
+ export {
46
+ iDSTokenAbi
47
+ };
@@ -0,0 +1,172 @@
1
+ const iKYCCompressorAbi = [
2
+ {
3
+ type: "function",
4
+ name: "contractType",
5
+ inputs: [],
6
+ outputs: [{ name: "", type: "bytes32", internalType: "bytes32" }],
7
+ stateMutability: "view"
8
+ },
9
+ {
10
+ type: "function",
11
+ name: "getKYCInvestorData",
12
+ inputs: [
13
+ { name: "investor", type: "address", internalType: "address" },
14
+ { name: "factories", type: "address[]", internalType: "address[]" }
15
+ ],
16
+ outputs: [
17
+ {
18
+ name: "",
19
+ type: "tuple[]",
20
+ internalType: "struct IKYCCompressor.KYCInvestorData[]",
21
+ components: [
22
+ {
23
+ name: "creditAccounts",
24
+ type: "tuple[]",
25
+ internalType: "struct IKYCCompressor.KYCCreditAccountData[]",
26
+ components: [
27
+ {
28
+ name: "creditAccount",
29
+ type: "address",
30
+ internalType: "address"
31
+ },
32
+ { name: "wallet", type: "address", internalType: "address" },
33
+ { name: "frozen", type: "bool", internalType: "bool" },
34
+ { name: "extraDetails", type: "bytes", internalType: "bytes" }
35
+ ]
36
+ },
37
+ { name: "extraDetails", type: "bytes", internalType: "bytes" }
38
+ ]
39
+ }
40
+ ],
41
+ stateMutability: "view"
42
+ },
43
+ {
44
+ type: "function",
45
+ name: "getKYCMarketsData",
46
+ inputs: [
47
+ { name: "configurators", type: "address[]", internalType: "address[]" },
48
+ { name: "factories", type: "address[]", internalType: "address[]" }
49
+ ],
50
+ outputs: [
51
+ {
52
+ name: "",
53
+ type: "tuple[]",
54
+ internalType: "struct IKYCCompressor.KYCUnderlyingData[]",
55
+ components: [
56
+ {
57
+ name: "baseParams",
58
+ type: "tuple",
59
+ internalType: "struct BaseParams",
60
+ components: [
61
+ { name: "addr", type: "address", internalType: "address" },
62
+ { name: "version", type: "uint256", internalType: "uint256" },
63
+ {
64
+ name: "contractType",
65
+ type: "bytes32",
66
+ internalType: "bytes32"
67
+ },
68
+ {
69
+ name: "serializedParams",
70
+ type: "bytes",
71
+ internalType: "bytes"
72
+ }
73
+ ]
74
+ },
75
+ { name: "asset", type: "address", internalType: "address" },
76
+ { name: "factory", type: "address", internalType: "address" },
77
+ { name: "extraDetails", type: "bytes", internalType: "bytes" }
78
+ ]
79
+ },
80
+ {
81
+ name: "",
82
+ type: "tuple[]",
83
+ internalType: "struct IKYCCompressor.KYCFactoryData[]",
84
+ components: [
85
+ {
86
+ name: "baseParams",
87
+ type: "tuple",
88
+ internalType: "struct BaseParams",
89
+ components: [
90
+ { name: "addr", type: "address", internalType: "address" },
91
+ { name: "version", type: "uint256", internalType: "uint256" },
92
+ {
93
+ name: "contractType",
94
+ type: "bytes32",
95
+ internalType: "bytes32"
96
+ },
97
+ {
98
+ name: "serializedParams",
99
+ type: "bytes",
100
+ internalType: "bytes"
101
+ }
102
+ ]
103
+ },
104
+ {
105
+ name: "tokens",
106
+ type: "tuple[]",
107
+ internalType: "struct TokenData[]",
108
+ components: [
109
+ { name: "addr", type: "address", internalType: "address" },
110
+ { name: "symbol", type: "string", internalType: "string" },
111
+ { name: "name", type: "string", internalType: "string" },
112
+ { name: "decimals", type: "uint8", internalType: "uint8" }
113
+ ]
114
+ },
115
+ { name: "extraDetails", type: "bytes", internalType: "bytes" }
116
+ ]
117
+ }
118
+ ],
119
+ stateMutability: "view"
120
+ },
121
+ {
122
+ type: "function",
123
+ name: "setSubcompressor",
124
+ inputs: [
125
+ { name: "subcompressor", type: "address", internalType: "address" }
126
+ ],
127
+ outputs: [],
128
+ stateMutability: "nonpayable"
129
+ },
130
+ {
131
+ type: "function",
132
+ name: "subcompressors",
133
+ inputs: [
134
+ { name: "domain", type: "bytes32", internalType: "bytes32" },
135
+ { name: "postfix", type: "bytes32", internalType: "bytes32" }
136
+ ],
137
+ outputs: [{ name: "", type: "address", internalType: "address" }],
138
+ stateMutability: "view"
139
+ },
140
+ {
141
+ type: "function",
142
+ name: "version",
143
+ inputs: [],
144
+ outputs: [{ name: "", type: "uint256", internalType: "uint256" }],
145
+ stateMutability: "view"
146
+ },
147
+ {
148
+ type: "error",
149
+ name: "CallerIsNotInstanceOwnerException",
150
+ inputs: [{ name: "caller", type: "address", internalType: "address" }]
151
+ },
152
+ {
153
+ type: "error",
154
+ name: "InvalidDomainException",
155
+ inputs: [{ name: "domain", type: "bytes32", internalType: "bytes32" }]
156
+ },
157
+ {
158
+ type: "error",
159
+ name: "InvalidKYCFactoryException",
160
+ inputs: [{ name: "factory", type: "address", internalType: "address" }]
161
+ },
162
+ {
163
+ type: "error",
164
+ name: "InvalidMarketConfiguratorException",
165
+ inputs: [
166
+ { name: "marketConfigurator", type: "address", internalType: "address" }
167
+ ]
168
+ }
169
+ ];
170
+ export {
171
+ iKYCCompressorAbi
172
+ };