@gearbox-protocol/sdk 14.7.0 → 14.8.0-next.2

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/compressors/{kycCompressor.js → rwaCompressor.js} +13 -13
  2. package/dist/cjs/abi/compressors/subcompressors/{kyc/onDemandKYCUnderlyingSubcompressor.js → rwa/onDemandRWAUnderlyingSubcompressor.js} +6 -6
  3. package/dist/cjs/abi/compressors/subcompressors/{kyc/securitizeKYCFactorySubcompressor.js → rwa/securitizeRWAFactorySubcompressor.js} +6 -6
  4. package/dist/cjs/abi/{kyc/iKYCCompressor.js → rwa/iRWACompressor.js} +13 -13
  5. package/dist/cjs/abi/{kyc/iKYCFactory.js → rwa/iRWAFactory.js} +6 -6
  6. package/dist/cjs/abi/{kyc/iKYCUnderlying.js → rwa/iRWAUnderlying.js} +7 -7
  7. package/dist/cjs/abi/{kyc/iSecuritizeKYCFactory.js → rwa/iSecuritizeRWAFactory.js} +7 -7
  8. package/dist/cjs/dev/claimDSToken.js +4 -4
  9. package/dist/cjs/plugins/adapters/abi/index.js +2 -0
  10. package/dist/cjs/plugins/adapters/abi/securitize/index.js +30 -0
  11. package/dist/cjs/sdk/OnchainSDK.js +12 -12
  12. package/dist/cjs/sdk/accounts/CreditAccountsServiceV310.js +59 -59
  13. package/dist/cjs/sdk/base/TokensMeta.js +6 -6
  14. package/dist/cjs/sdk/base/token-types.js +11 -11
  15. package/dist/cjs/sdk/chain/chains.js +16 -16
  16. package/dist/cjs/sdk/constants/address-provider.js +3 -3
  17. package/dist/cjs/sdk/market/MarketSuite.js +2 -2
  18. package/dist/cjs/sdk/market/index.js +2 -2
  19. package/dist/cjs/sdk/market/pool/PoolSuite.js +2 -2
  20. package/dist/cjs/sdk/market/pool/PoolV310Contract.js +3 -3
  21. package/dist/cjs/sdk/market/{kyc/KYCRegistry.js → rwa/RWARegistry.js} +48 -48
  22. package/dist/cjs/sdk/market/{kyc → rwa}/index.js +6 -6
  23. package/dist/cjs/sdk/market/{kyc → rwa}/securitize/SecuritizeDegenNFT.js +1 -1
  24. package/dist/cjs/sdk/market/{kyc/securitize/SecuritizeKYCFactory.js → rwa/securitize/SecuritizeRWAFactory.js} +20 -20
  25. package/dist/cjs/sdk/market/{kyc → rwa}/securitize/constants.js +3 -3
  26. package/dist/cjs/sdk/market/{kyc → rwa}/securitize/index.js +2 -2
  27. package/dist/cjs/sdk/market/{kyc → rwa}/types.js +6 -6
  28. package/dist/cjs/sdk/options.js +4 -4
  29. package/dist/cjs/sdk/pools/PoolService.js +26 -26
  30. package/dist/esm/abi/compressors/{kycCompressor.js → rwaCompressor.js} +9 -9
  31. package/dist/esm/abi/compressors/subcompressors/{kyc/onDemandKYCUnderlyingSubcompressor.js → rwa/onDemandRWAUnderlyingSubcompressor.js} +2 -2
  32. package/dist/esm/abi/compressors/subcompressors/{kyc/securitizeKYCFactorySubcompressor.js → rwa/securitizeRWAFactorySubcompressor.js} +2 -2
  33. package/dist/esm/abi/{kyc/iKYCCompressor.js → rwa/iRWACompressor.js} +9 -9
  34. package/dist/esm/abi/{kyc/iKYCFactory.js → rwa/iRWAFactory.js} +2 -2
  35. package/dist/esm/abi/{kyc/iKYCUnderlying.js → rwa/iRWAUnderlying.js} +3 -3
  36. package/dist/esm/abi/{kyc/iSecuritizeKYCFactory.js → rwa/iSecuritizeRWAFactory.js} +3 -3
  37. package/dist/esm/dev/claimDSToken.js +4 -4
  38. package/dist/esm/plugins/adapters/abi/index.js +1 -0
  39. package/dist/esm/plugins/adapters/abi/securitize/index.js +5 -0
  40. package/dist/esm/sdk/OnchainSDK.js +13 -13
  41. package/dist/esm/sdk/accounts/CreditAccountsServiceV310.js +59 -59
  42. package/dist/esm/sdk/base/TokensMeta.js +6 -6
  43. package/dist/esm/sdk/base/token-types.js +7 -7
  44. package/dist/esm/sdk/chain/chains.js +16 -16
  45. package/dist/esm/sdk/constants/address-provider.js +2 -2
  46. package/dist/esm/sdk/market/MarketSuite.js +2 -2
  47. package/dist/esm/sdk/market/index.js +1 -1
  48. package/dist/esm/sdk/market/pool/PoolSuite.js +2 -2
  49. package/dist/esm/sdk/market/pool/PoolV310Contract.js +3 -3
  50. package/dist/esm/sdk/market/{kyc/KYCRegistry.js → rwa/RWARegistry.js} +50 -50
  51. package/dist/esm/sdk/market/{kyc → rwa}/index.js +1 -1
  52. package/dist/esm/sdk/market/{kyc → rwa}/securitize/SecuritizeDegenNFT.js +1 -1
  53. package/dist/esm/sdk/market/{kyc/securitize/SecuritizeKYCFactory.js → rwa/securitize/SecuritizeRWAFactory.js} +17 -17
  54. package/dist/esm/sdk/market/rwa/securitize/constants.js +4 -0
  55. package/dist/esm/sdk/market/{kyc → rwa}/securitize/index.js +1 -1
  56. package/dist/esm/sdk/market/rwa/types.js +9 -0
  57. package/dist/esm/sdk/options.js +4 -4
  58. package/dist/esm/sdk/pools/PoolService.js +28 -28
  59. package/dist/types/abi/compressors/{kycCompressor.d.ts → rwaCompressor.d.ts} +8 -8
  60. package/dist/types/abi/compressors/subcompressors/{kyc/onDemandKYCUnderlyingSubcompressor.d.ts → rwa/onDemandRWAUnderlyingSubcompressor.d.ts} +1 -1
  61. package/dist/types/abi/compressors/subcompressors/{kyc/securitizeKYCFactorySubcompressor.d.ts → rwa/securitizeRWAFactorySubcompressor.d.ts} +1 -1
  62. package/dist/types/abi/{kyc/iKYCCompressor.d.ts → rwa/iRWACompressor.d.ts} +8 -8
  63. package/dist/types/abi/{kyc/iKYCFactory.d.ts → rwa/iRWAFactory.d.ts} +1 -1
  64. package/dist/types/abi/{kyc/iKYCUnderlying.d.ts → rwa/iRWAUnderlying.d.ts} +2 -2
  65. package/dist/types/abi/{kyc/iSecuritizeKYCFactory.d.ts → rwa/iSecuritizeRWAFactory.d.ts} +2 -2
  66. package/dist/types/dev/claimDSToken.d.ts +1 -1
  67. package/dist/types/plugins/adapters/abi/index.d.ts +1 -0
  68. package/dist/types/plugins/adapters/abi/securitize/index.d.ts +5 -0
  69. package/dist/types/sdk/OnchainSDK.d.ts +5 -5
  70. package/dist/types/sdk/accounts/CreditAccountsServiceV310.d.ts +19 -19
  71. package/dist/types/sdk/accounts/types.d.ts +26 -26
  72. package/dist/types/sdk/base/TokensMeta.d.ts +5 -5
  73. package/dist/types/sdk/base/token-types.d.ts +17 -17
  74. package/dist/types/sdk/base/types.d.ts +2 -2
  75. package/dist/types/sdk/chain/chains.d.ts +2 -2
  76. package/dist/types/sdk/constants/address-provider.d.ts +1 -1
  77. package/dist/types/sdk/market/MarketSuite.d.ts +2 -2
  78. package/dist/types/sdk/market/index.d.ts +1 -1
  79. package/dist/types/sdk/market/pool/PoolSuite.d.ts +2 -2
  80. package/dist/types/sdk/market/pool/PoolV310Contract.d.ts +2 -2
  81. package/dist/types/sdk/market/rwa/RWARegistry.d.ts +52 -0
  82. package/dist/types/sdk/market/{kyc → rwa}/index.d.ts +1 -1
  83. package/dist/types/sdk/market/{kyc/securitize/SecuritizeKYCFactory.d.ts → rwa/securitize/SecuritizeRWAFactory.d.ts} +16 -16
  84. package/dist/types/sdk/market/rwa/securitize/constants.d.ts +1 -0
  85. package/dist/types/sdk/market/{kyc → rwa}/securitize/index.d.ts +1 -1
  86. package/dist/types/sdk/market/{kyc → rwa}/securitize/types.d.ts +12 -12
  87. package/dist/types/sdk/market/{kyc → rwa}/types.d.ts +48 -48
  88. package/dist/types/sdk/market/types.d.ts +1 -1
  89. package/dist/types/sdk/options.d.ts +1 -1
  90. package/dist/types/sdk/pools/types.d.ts +4 -4
  91. package/dist/types/sdk/types/state-human.d.ts +2 -2
  92. package/dist/types/sdk/types/state.d.ts +3 -3
  93. package/package.json +1 -1
  94. package/dist/esm/sdk/market/kyc/securitize/constants.js +0 -4
  95. package/dist/esm/sdk/market/kyc/types.js +0 -9
  96. package/dist/types/sdk/market/kyc/KYCRegistry.d.ts +0 -52
  97. package/dist/types/sdk/market/kyc/securitize/constants.d.ts +0 -1
  98. /package/dist/cjs/abi/{kyc → rwa}/iDSRegistryService.js +0 -0
  99. /package/dist/cjs/abi/{kyc → rwa}/iDSToken.js +0 -0
  100. /package/dist/cjs/abi/{kyc → rwa}/iSecuritizeDegenNFT.js +0 -0
  101. /package/dist/cjs/sdk/market/{kyc → rwa}/securitize/types.js +0 -0
  102. /package/dist/esm/abi/{kyc → rwa}/iDSRegistryService.js +0 -0
  103. /package/dist/esm/abi/{kyc → rwa}/iDSToken.js +0 -0
  104. /package/dist/esm/abi/{kyc → rwa}/iSecuritizeDegenNFT.js +0 -0
  105. /package/dist/esm/sdk/market/{kyc → rwa}/securitize/types.js +0 -0
  106. /package/dist/types/abi/{kyc → rwa}/iDSRegistryService.d.ts +0 -0
  107. /package/dist/types/abi/{kyc → rwa}/iDSToken.d.ts +0 -0
  108. /package/dist/types/abi/{kyc → rwa}/iSecuritizeDegenNFT.d.ts +0 -0
  109. /package/dist/types/sdk/market/{kyc → rwa}/securitize/SecuritizeDegenNFT.d.ts +0 -0
@@ -3,10 +3,10 @@ import type { GetOpenAccountRequirementsProps } from "../../../accounts/types.js
3
3
  import { BaseContract } from "../../../base/index.js";
4
4
  import type { OnchainSDK } from "../../../OnchainSDK.js";
5
5
  import type { MultiCall, RawTx } from "../../../types/index.js";
6
- import type { IKYCFactory, KYCCompressorInvestorData, KYCFactoryData } from "../types.js";
7
- import { KYC_FACTORY_SECURITIZE } from "./constants.js";
6
+ import type { IRWAFactory, RWACompressorInvestorData, RWAFactoryData } from "../types.js";
7
+ import { RWA_FACTORY_SECURITIZE } from "./constants.js";
8
8
  import { SecuritizeDegenNFT } from "./SecuritizeDegenNFT.js";
9
- import { type DStokenData, type SecuritizeInvestorData, type SecuritizeKYCFactoryStateHuman, type SecuritizeOpenAccountRequirements, type SecuritizeOperationParams } from "./types.js";
9
+ import { type DStokenData, type SecuritizeInvestorData, type SecuritizeOpenAccountRequirements, type SecuritizeOperationParams, type SecuritizeRWAFactoryStateHuman } from "./types.js";
10
10
  declare const abi: readonly [{
11
11
  readonly type: "function";
12
12
  readonly name: "contractType";
@@ -345,7 +345,7 @@ declare const abi: readonly [{
345
345
  readonly stateMutability: "view";
346
346
  }, {
347
347
  readonly type: "event";
348
- readonly name: "OpenKYCCreditAccount";
348
+ readonly name: "OpenRWACreditAccount";
349
349
  readonly inputs: readonly [{
350
350
  readonly name: "creditAccount";
351
351
  readonly type: "address";
@@ -456,23 +456,23 @@ declare const abi: readonly [{
456
456
  readonly inputs: readonly [];
457
457
  }];
458
458
  type abi = typeof abi;
459
- export declare class SecuritizeKYCFactory extends BaseContract<abi> implements IKYCFactory<typeof KYC_FACTORY_SECURITIZE> {
459
+ export declare class SecuritizeRWAFactory extends BaseContract<abi> implements IRWAFactory<typeof RWA_FACTORY_SECURITIZE> {
460
460
  #private;
461
461
  readonly degenNFT: SecuritizeDegenNFT;
462
462
  readonly owner: Address;
463
463
  readonly dsTokens: DStokenData[];
464
- readonly contractType = "KYC_FACTORY::SECURITIZE";
465
- constructor(sdk: OnchainSDK, data: KYCFactoryData);
464
+ readonly contractType = "RWA_FACTORY::SECURITIZE";
465
+ constructor(sdk: OnchainSDK, data: RWAFactoryData);
466
466
  /**
467
- * {@inheritDoc IKYCFactory.decodeInvestorData}
467
+ * {@inheritDoc IRWAFactory.decodeInvestorData}
468
468
  */
469
- decodeInvestorData(data: KYCCompressorInvestorData): SecuritizeInvestorData;
469
+ decodeInvestorData(data: RWACompressorInvestorData): SecuritizeInvestorData;
470
470
  /**
471
- * {@inheritDoc IKYCFactory.getInvestor}
471
+ * {@inheritDoc IRWAFactory.getInvestor}
472
472
  */
473
473
  getInvestor(creditAccount: Address, fromCache?: boolean): Promise<Address>;
474
474
  /**
475
- * {@inheritDoc IKYCFactory.getApprovalAddress}
475
+ * {@inheritDoc IRWAFactory.getApprovalAddress}
476
476
  */
477
477
  getApprovalAddress(options: {
478
478
  creditManager: Address;
@@ -482,21 +482,21 @@ export declare class SecuritizeKYCFactory extends BaseContract<abi> implements I
482
482
  creditAccount: Address;
483
483
  }): Promise<Address>;
484
484
  /**
485
- * {@inheritDoc IKYCFactory.getWallet}
485
+ * {@inheritDoc IRWAFactory.getWallet}
486
486
  */
487
487
  getWallet(creditAccount: Address): Promise<Address>;
488
488
  /**
489
- * {@inheritDoc IKYCFactory.multicall}
489
+ * {@inheritDoc IRWAFactory.multicall}
490
490
  */
491
491
  multicall(creditAccount: Address, calls: MultiCall[], options?: SecuritizeOperationParams): RawTx;
492
492
  /**
493
- * {@inheritDoc IKYCFactory.getOpenAccountRequirements}
493
+ * {@inheritDoc IRWAFactory.getOpenAccountRequirements}
494
494
  */
495
495
  getOpenAccountRequirements(investor: Address, props: GetOpenAccountRequirementsProps): Promise<SecuritizeOpenAccountRequirements | undefined>;
496
496
  /**
497
- * {@inheritDoc IKYCFactory.openCreditAccount}
497
+ * {@inheritDoc IRWAFactory.openCreditAccount}
498
498
  */
499
499
  openCreditAccount(creditManager: Address, calls: MultiCall[], options?: SecuritizeOperationParams): RawTx;
500
- stateHuman(_raw?: boolean): SecuritizeKYCFactoryStateHuman;
500
+ stateHuman(_raw?: boolean): SecuritizeRWAFactoryStateHuman;
501
501
  }
502
502
  export {};
@@ -0,0 +1 @@
1
+ export declare const RWA_FACTORY_SECURITIZE = "RWA_FACTORY::SECURITIZE";
@@ -1,3 +1,3 @@
1
1
  export * from "./constants.js";
2
- export * from "./SecuritizeKYCFactory.js";
2
+ export * from "./SecuritizeRWAFactory.js";
3
3
  export * from "./types.js";
@@ -1,6 +1,6 @@
1
1
  import type { Address, Hex, TypedDataDefinition } from "viem";
2
2
  import type { BaseContractStateHuman } from "../../../types/index.js";
3
- import type { KYC_FACTORY_SECURITIZE } from "./constants.js";
3
+ import type { RWA_FACTORY_SECURITIZE } from "./constants.js";
4
4
  /**
5
5
  * On-chain data about Securitize DSTokens
6
6
  **/
@@ -57,7 +57,7 @@ export declare const SECURITIZE_REGISTER_VAULT_TYPES: {
57
57
  };
58
58
  /**
59
59
  * EIP-712 typed-data message that must be signed by the investor to allow the
60
- * KYC factory to register a credit account as a vault in Securitize's VaultRegistrar.
60
+ * RWA factory to register a credit account as a vault in Securitize's VaultRegistrar.
61
61
  *
62
62
  * Shaped as a viem {@link TypedDataDefinition} so it can be spread directly into
63
63
  * `walletClient.signTypedData({ account, ...message })`. The caller only has to
@@ -74,7 +74,7 @@ export declare const SECURITIZE_REGISTER_VAULT_TYPES: {
74
74
  **/
75
75
  export type SecuritizeRegisterVaultMessage = TypedDataDefinition<typeof SECURITIZE_REGISTER_VAULT_TYPES, "RegisterVault">;
76
76
  /**
77
- * Per-credit-account data decoded from the KYC compressor's
77
+ * Per-credit-account data decoded from the RWA compressor's
78
78
  * `getCreditAccountData` extra details for a Securitize factory.
79
79
  **/
80
80
  export interface SecuritizeCreditAccountData {
@@ -88,12 +88,12 @@ export interface SecuritizeCreditAccountData {
88
88
  registeredTokens: Address[];
89
89
  }
90
90
  /**
91
- * Investor-level data decoded from the KYC compressor's `getKYCInvestorData`
91
+ * Investor-level data decoded from the RWA compressor's `getRWAInvestorData`
92
92
  * extra details for a Securitize factory.
93
93
  **/
94
94
  export interface SecuritizeInvestorData {
95
- type: typeof KYC_FACTORY_SECURITIZE;
96
- /** Securitize KYC factory address that produced this data. */
95
+ type: typeof RWA_FACTORY_SECURITIZE;
96
+ /** Securitize RWA factory address that produced this data. */
97
97
  factory: Address;
98
98
  /** Credit accounts owned by the investor through this factory. */
99
99
  creditAccounts: SecuritizeCreditAccountData[];
@@ -105,9 +105,9 @@ export interface SecuritizeInvestorData {
105
105
  registerVaultMessages: SecuritizeRegisterVaultMessage[];
106
106
  }
107
107
  /**
108
- * Human-readable serialisation of {@link SecuritizeKYCFactory} state.
108
+ * Human-readable serialisation of {@link SecuritizeRWAFactory} state.
109
109
  **/
110
- export interface SecuritizeKYCFactoryStateHuman extends BaseContractStateHuman {
110
+ export interface SecuritizeRWAFactoryStateHuman extends BaseContractStateHuman {
111
111
  owner: string;
112
112
  degenNFT: string;
113
113
  dsTokens: {
@@ -120,18 +120,18 @@ export interface SecuritizeKYCFactoryStateHuman extends BaseContractStateHuman {
120
120
  }[];
121
121
  }
122
122
  /**
123
- * Factory-specific parameters for {@link SecuritizeKYCFactory.multicall}
124
- * and {@link SecuritizeKYCFactory.openCreditAccount}.
123
+ * Factory-specific parameters for {@link SecuritizeRWAFactory.multicall}
124
+ * and {@link SecuritizeRWAFactory.openCreditAccount}.
125
125
  **/
126
126
  export interface SecuritizeOperationParams {
127
- type: typeof KYC_FACTORY_SECURITIZE;
127
+ type: typeof RWA_FACTORY_SECURITIZE;
128
128
  /** DSToken addresses to register for this operation. */
129
129
  tokensToRegister: Address[];
130
130
  /** Cached EIP-712 registration signatures to store on-chain. */
131
131
  signaturesToCache: SecuritizeRegisterMessage[];
132
132
  }
133
133
  export interface SecuritizeOpenAccountRequirements {
134
- type: typeof KYC_FACTORY_SECURITIZE;
134
+ type: typeof RWA_FACTORY_SECURITIZE;
135
135
  /**
136
136
  * User must visit securitize website to register these tokens
137
137
  * May be empty if user already registered all required tokens
@@ -1,94 +1,94 @@
1
1
  import type { AbiParametersToPrimitiveTypes, ExtractAbiFunction } from "abitype";
2
2
  import type { Address, ContractFunctionParameters } from "viem";
3
- import type { iKYCCompressorAbi } from "../../../abi/kyc/iKYCCompressor.js";
3
+ import type { iRWACompressorAbi } from "../../../abi/rwa/iRWACompressor.js";
4
4
  import type { GetOpenAccountRequirementsProps } from "../../accounts/types.js";
5
5
  import type { IBaseContract, Unarray } from "../../base/index.js";
6
6
  import type { MultiCall, RawTx } from "../../types/index.js";
7
- import type { SecuritizeInvestorData, SecuritizeKYCFactoryStateHuman, SecuritizeOpenAccountRequirements, SecuritizeOperationParams } from "./securitize/index.js";
8
- import { KYC_FACTORY_SECURITIZE } from "./securitize/index.js";
7
+ import type { SecuritizeInvestorData, SecuritizeOpenAccountRequirements, SecuritizeOperationParams, SecuritizeRWAFactoryStateHuman } from "./securitize/index.js";
8
+ import { RWA_FACTORY_SECURITIZE } from "./securitize/index.js";
9
9
  /**
10
- * Discriminated union of all known KYC factory contract type strings.
10
+ * Discriminated union of all known RWA factory contract type strings.
11
11
  **/
12
- export declare const KYC_FACTORY_TYPES: readonly ["KYC_FACTORY::SECURITIZE"];
12
+ export declare const RWA_FACTORY_TYPES: readonly ["RWA_FACTORY::SECURITIZE"];
13
13
  /**
14
- * String literal union of known KYC factory types.
14
+ * String literal union of known RWA factory types.
15
15
  **/
16
- export type KYCFactoryType = (typeof KYC_FACTORY_TYPES)[number];
16
+ export type RWAFactoryType = (typeof RWA_FACTORY_TYPES)[number];
17
17
  /**
18
18
  * @internal
19
19
  *
20
- * Type-level registry mapping each {@link KYCFactoryType} to its associated
21
- * data types. Adding a new KYC factory requires a single new entry here;
20
+ * Type-level registry mapping each {@link RWAFactoryType} to its associated
21
+ * data types. Adding a new RWA factory requires a single new entry here;
22
22
  * all derived types update automatically.
23
23
  **/
24
- interface KYCFactoryTypeMap {
25
- [KYC_FACTORY_SECURITIZE]: {
24
+ interface RWAFactoryTypeMap {
25
+ [RWA_FACTORY_SECURITIZE]: {
26
26
  investorData: SecuritizeInvestorData;
27
27
  openAccountRequirements: SecuritizeOpenAccountRequirements;
28
- stateHuman: SecuritizeKYCFactoryStateHuman;
28
+ stateHuman: SecuritizeRWAFactoryStateHuman;
29
29
  operationParams: SecuritizeOperationParams;
30
30
  };
31
31
  }
32
32
  /**
33
- * Investor data decoded from the KYC compressor, defaults to union of all factory types
33
+ * Investor data decoded from the RWA compressor, defaults to union of all factory types
34
34
  * Can be discriminated by type
35
35
  **/
36
- export type KYCInvestorData<T extends KYCFactoryType = KYCFactoryType> = KYCFactoryTypeMap[T]["investorData"];
36
+ export type RWAInvestorData<T extends RWAFactoryType = RWAFactoryType> = RWAFactoryTypeMap[T]["investorData"];
37
37
  /**
38
- * Open-account requirements for a KYC factory, defaults to union of all factory types
38
+ * Open-account requirements for a RWA factory, defaults to union of all factory types
39
39
  * Can be discriminated by type
40
40
  **/
41
- export type KYCOpenAccountRequirements<T extends KYCFactoryType = KYCFactoryType> = KYCFactoryTypeMap[T]["openAccountRequirements"];
41
+ export type RWAOpenAccountRequirements<T extends RWAFactoryType = RWAFactoryType> = RWAFactoryTypeMap[T]["openAccountRequirements"];
42
42
  /**
43
- * Open credit account/Multicall extra params type for a KYC factory, defaults to union of all factory types
43
+ * Open credit account/Multicall extra params type for a RWA factory, defaults to union of all factory types
44
44
  * Can be discriminated by type
45
45
  **/
46
- export type KYCOperationParams<T extends KYCFactoryType = KYCFactoryType> = KYCFactoryTypeMap[T]["operationParams"];
46
+ export type RWAOperationParams<T extends RWAFactoryType = RWAFactoryType> = RWAFactoryTypeMap[T]["operationParams"];
47
47
  /**
48
- * Raw return type of `KYCCompressor.getKYCMarketsData`.
48
+ * Raw return type of `RWACompressor.getRWAMarketsData`.
49
49
  **/
50
- export type KYCCompressorResponse = AbiParametersToPrimitiveTypes<ExtractAbiFunction<typeof iKYCCompressorAbi, "getKYCMarketsData">["outputs"]>;
50
+ export type RWACompressorResponse = AbiParametersToPrimitiveTypes<ExtractAbiFunction<typeof iRWACompressorAbi, "getRWAMarketsData">["outputs"]>;
51
51
  /**
52
- * On-chain state of a KYC underlying token.
52
+ * On-chain state of a RWA underlying token.
53
53
  **/
54
- export type KYCUnderlyingData = Unarray<KYCCompressorResponse[0]>;
54
+ export type RWAUnderlyingData = Unarray<RWACompressorResponse[0]>;
55
55
  /**
56
- * On-chain state of a KYC factory.
56
+ * On-chain state of a RWA factory.
57
57
  **/
58
- export type KYCFactoryData = Unarray<KYCCompressorResponse[1]>;
58
+ export type RWAFactoryData = Unarray<RWACompressorResponse[1]>;
59
59
  /**
60
- * Typed contract call parameters for `KYCCompressor.getKYCMarketsData`.
60
+ * Typed contract call parameters for `RWACompressor.getRWAMarketsData`.
61
61
  **/
62
- export type KYCCompressorCall = ContractFunctionParameters<typeof iKYCCompressorAbi, "view", "getKYCMarketsData">;
62
+ export type RWACompressorCall = ContractFunctionParameters<typeof iRWACompressorAbi, "view", "getRWAMarketsData">;
63
63
  /**
64
- * Single element of the `KYCCompressor.getKYCInvestorData` return array.
64
+ * Single element of the `RWACompressor.getRWAInvestorData` return array.
65
65
  * Contains per-factory credit accounts and factory-specific extra details.
66
66
  **/
67
- export type KYCCompressorInvestorData = Unarray<AbiParametersToPrimitiveTypes<ExtractAbiFunction<typeof iKYCCompressorAbi, "getKYCInvestorData">["outputs"]>[0]>;
67
+ export type RWACompressorInvestorData = Unarray<AbiParametersToPrimitiveTypes<ExtractAbiFunction<typeof iRWACompressorAbi, "getRWAInvestorData">["outputs"]>[0]>;
68
68
  /**
69
- * Full KYC compressor response, used as the persisted/hydrated state.
69
+ * Full RWA compressor response, used as the persisted/hydrated state.
70
70
  **/
71
- export type KYCState = KYCCompressorResponse;
71
+ export type RWAState = RWACompressorResponse;
72
72
  /**
73
- * Human-readable KYC factory state, union of all factory types.
73
+ * Human-readable RWA factory state, union of all factory types.
74
74
  **/
75
- export type KYCFactoryStateHuman = KYCFactoryTypeMap[KYCFactoryType]["stateHuman"];
75
+ export type RWAFactoryStateHuman = RWAFactoryTypeMap[RWAFactoryType]["stateHuman"];
76
76
  /**
77
- * Human-readable snapshot of the full KYC registry state.
77
+ * Human-readable snapshot of the full RWA registry state.
78
78
  **/
79
- export interface KYCStateHuman {
80
- /** State of each loaded KYC factory. */
81
- factories: KYCFactoryStateHuman[];
79
+ export interface RWAStateHuman {
80
+ /** State of each loaded RWA factory. */
81
+ factories: RWAFactoryStateHuman[];
82
82
  }
83
83
  /**
84
- * Shared interface for all KYC factory contracts.
84
+ * Shared interface for all RWA factory contracts.
85
85
  *
86
86
  * Parameterised by a single factory type literal `T` which indexes into
87
- * {@link KYCFactoryTypeMap} to derive all associated data types.
87
+ * {@link RWAFactoryTypeMap} to derive all associated data types.
88
88
  *
89
89
  * @typeParam T - factory type
90
90
  **/
91
- export interface IKYCFactory<T extends KYCFactoryType = KYCFactoryType> extends IBaseContract {
91
+ export interface IRWAFactory<T extends RWAFactoryType = RWAFactoryType> extends IBaseContract {
92
92
  /**
93
93
  * Narrowed factory type discriminant
94
94
  **/
@@ -99,9 +99,9 @@ export interface IKYCFactory<T extends KYCFactoryType = KYCFactoryType> extends
99
99
  * Decodes factory-specific extra details from the compressor's investor data.
100
100
  * Each factory knows how to decode its own extra details.
101
101
  *
102
- * @param data - raw KYCCompressor InvestorData
102
+ * @param data - raw RWACompressor InvestorData
103
103
  **/
104
- decodeInvestorData(data: KYCCompressorInvestorData): KYCInvestorData<T>;
104
+ decodeInvestorData(data: RWACompressorInvestorData): RWAInvestorData<T>;
105
105
  /**
106
106
  * Returns the investor address for a credit account.
107
107
  * @param creditAccount - credit account address
@@ -137,9 +137,9 @@ export interface IKYCFactory<T extends KYCFactoryType = KYCFactoryType> extends
137
137
  * @param creditAccount - credit account address
138
138
  * @param calls - calls to perform
139
139
  * @param options - factory-specific parameters (e.g. tokens to
140
- * register, signatures to cache). Undefined value means that no KYC actions are required
140
+ * register, signatures to cache). Undefined value means that no RWA actions are required
141
141
  **/
142
- multicall(creditAccount: Address, calls: MultiCall[], options?: KYCOperationParams<T>): RawTx;
142
+ multicall(creditAccount: Address, calls: MultiCall[], options?: RWAOperationParams<T>): RawTx;
143
143
  /**
144
144
  * Checks if the user can open a credit account with this factory.
145
145
  * @param investor - investor address
@@ -147,7 +147,7 @@ export interface IKYCFactory<T extends KYCFactoryType = KYCFactoryType> extends
147
147
  * @returns open account requirements for the investor, or `undefined` if the
148
148
  * user can open a credit account without any further actions
149
149
  **/
150
- getOpenAccountRequirements(investor: Address, props: GetOpenAccountRequirementsProps): Promise<KYCOpenAccountRequirements<T> | undefined>;
150
+ getOpenAccountRequirements(investor: Address, props: GetOpenAccountRequirementsProps): Promise<RWAOpenAccountRequirements<T> | undefined>;
151
151
  /**
152
152
  * Creates a raw transaction to open a credit account.
153
153
  * Similar to {@link CreditFacadeV310Contract.openCreditAccount}.
@@ -156,16 +156,16 @@ export interface IKYCFactory<T extends KYCFactoryType = KYCFactoryType> extends
156
156
  * @param calls - initial calls to perform
157
157
  * @param options - factory-specific parameters (e.g. tokens to
158
158
  * register, signatures to cache).
159
- * Undefined value means that no KYC actions are required (e.g. when we open second credit account)
159
+ * Undefined value means that no RWA actions are required (e.g. when we open second credit account)
160
160
  **/
161
- openCreditAccount(creditManager: Address, calls: MultiCall[], options?: KYCOperationParams<T>): RawTx;
161
+ openCreditAccount(creditManager: Address, calls: MultiCall[], options?: RWAOperationParams<T>): RawTx;
162
162
  }
163
163
  /**
164
- * Narrows an {@link IKYCFactory} to a specific factory type.
164
+ * Narrows an {@link IRWAFactory} to a specific factory type.
165
165
  *
166
166
  * @param factory - factory instance to check
167
167
  * @param type - expected factory type literal
168
168
  * @returns `true` if `factory.factoryType === type`
169
169
  **/
170
- export declare function isKYCFactory<T extends KYCFactoryType>(factory: IKYCFactory, type: T): factory is IKYCFactory<T>;
170
+ export declare function isRWAFactory<T extends RWAFactoryType>(factory: IRWAFactory, type: T): factory is IRWAFactory<T>;
171
171
  export {};
@@ -5,6 +5,6 @@ import type { Unarray } from "../base/index.js";
5
5
  type CompressorZapperData = Unarray<AbiParametersToPrimitiveTypes<ExtractAbiFunction<typeof peripheryCompressorAbi, "getZappers">["outputs"]>>;
6
6
  export interface ZapperData extends CompressorZapperData {
7
7
  pool: Address;
8
- type: "migration" | "kyc" | "base";
8
+ type: "migration" | "rwa" | "base";
9
9
  }
10
10
  export {};
@@ -16,7 +16,7 @@ export declare const OnchainSDKOptionsSchema: z.ZodObject<{
16
16
  export declare const AttachOptionsSchema: z.ZodObject<{
17
17
  addressProvider: z.ZodOptional<z.ZodPipe<z.ZodString, z.ZodTransform<`0x${string}`, string>>>;
18
18
  marketConfigurators: z.ZodOptional<z.ZodArray<z.ZodPipe<z.ZodString, z.ZodTransform<`0x${string}`, string>>>>;
19
- kycFactories: z.ZodOptional<z.ZodArray<z.ZodPipe<z.ZodString, z.ZodTransform<`0x${string}`, string>>>>;
19
+ rwaFactories: z.ZodOptional<z.ZodArray<z.ZodPipe<z.ZodString, z.ZodTransform<`0x${string}`, string>>>>;
20
20
  blockNumber: z.ZodOptional<z.ZodUnion<readonly [z.ZodBigInt, z.ZodNumber]>>;
21
21
  ignoreUpdateablePrices: z.ZodOptional<z.ZodBoolean>;
22
22
  ignoreMarkets: z.ZodOptional<z.ZodArray<z.ZodPipe<z.ZodString, z.ZodTransform<`0x${string}`, string>>>>;
@@ -52,7 +52,7 @@ export interface RemoveLiquidityProps {
52
52
  permit: PermitResult | undefined;
53
53
  meta: WithdrawalMetadata;
54
54
  }
55
- export type MarketType = "kyc-on-demand" | "kyc-default" | "classic";
55
+ export type MarketType = "rwa-on-demand" | "rwa-default" | "classic";
56
56
  export interface DepositMetadata {
57
57
  /**
58
58
  * Zapper that will perform the deposit, undefined in case of direct pool underlying deposit
@@ -106,7 +106,7 @@ export interface IPoolsService {
106
106
  * Returns list of tokens that user can receive after depositing to a pool,
107
107
  * depends on the pool type and the token being deposited (one of returned by {@link getDepositTokensIn}).
108
108
  *
109
- * Can return empty array if no tokens can be received (e.g. for KYC underlying on demand)
109
+ * Can return empty array if no tokens can be received (e.g. for RWA underlying on demand)
110
110
  *
111
111
  * @param pool
112
112
  * @param tokenIn
@@ -118,7 +118,7 @@ export interface IPoolsService {
118
118
  *
119
119
  * @param pool
120
120
  * @param tokenIn
121
- * @param tokenOut can be undefined if deposit is not resulting in a token out (e.g. for KYC underlying on demand)
121
+ * @param tokenOut can be undefined if deposit is not resulting in a token out (e.g. for RWA underlying on demand)
122
122
  */
123
123
  getDepositMetadata(pool: Address, tokenIn: Address, tokenOut?: Address): DepositMetadata;
124
124
  /**
@@ -142,7 +142,7 @@ export interface IPoolsService {
142
142
  getWithdrawalMetadata(pool: Address, tokenIn: Address, tokenOut?: Address): WithdrawalMetadata;
143
143
  /**
144
144
  * Returns contract call parameters for adding liquidity to a pool
145
- * Or undefined if no deposit action is required (e.g. for KYC underlying on demand)
145
+ * Or undefined if no deposit action is required (e.g. for RWA underlying on demand)
146
146
  * @param props - {@link AddLiquidityProps}
147
147
  * @returns - {@link AddLiquidityCall}
148
148
  */
@@ -1,7 +1,7 @@
1
1
  import type { Address } from "viem";
2
2
  import type { TokenMetaData } from "../base/index.js";
3
3
  import type { PriceFeedContractType } from "../market/index.js";
4
- import type { KYCStateHuman } from "../market/kyc/index.js";
4
+ import type { RWAStateHuman } from "../market/rwa/index.js";
5
5
  export interface BaseContractStateHuman {
6
6
  address: string;
7
7
  version: number;
@@ -201,7 +201,7 @@ export interface GearboxStateHuman {
201
201
  markets: MarketStateHuman[];
202
202
  plugins: Record<string, unknown>;
203
203
  tokens: TokenMetaData[];
204
- kyc: KYCStateHuman;
204
+ rwa: RWAStateHuman;
205
205
  }
206
206
  /**
207
207
  * Human-readable state for all chains managed by {@link MultichainSDK}.
@@ -1,7 +1,7 @@
1
1
  import type { MarketData } from "../base/index.js";
2
2
  import type { NetworkType } from "../chain/chains.js";
3
3
  import type { AddressProviderState } from "../core/index.js";
4
- import type { KYCState } from "../market/kyc/index.js";
4
+ import type { RWAState } from "../market/rwa/index.js";
5
5
  import type { PluginStatesMap, PluginsMap } from "../plugins/index.js";
6
6
  /**
7
7
  * Complete serialisable snapshot of the SDK state for a single chain.
@@ -42,9 +42,9 @@ export interface GearboxState<Plugins extends PluginsMap = {}> {
42
42
  **/
43
43
  markets: MarketData[];
44
44
  /**
45
- * KYC compressor state snapshot, if KYC factories were loaded.
45
+ * RWA compressor state snapshot, if RWA factories were loaded.
46
46
  **/
47
- kyc?: KYCState;
47
+ rwa?: RWAState;
48
48
  /**
49
49
  * Per-plugin serialised state.
50
50
  **/
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@gearbox-protocol/sdk",
3
- "version": "14.7.0",
3
+ "version": "14.8.0-next.2",
4
4
  "description": "Gearbox SDK",
5
5
  "license": "MIT",
6
6
  "main": "./dist/cjs/sdk/index.js",
@@ -1,4 +0,0 @@
1
- const KYC_FACTORY_SECURITIZE = "KYC_FACTORY::SECURITIZE";
2
- export {
3
- KYC_FACTORY_SECURITIZE
4
- };
@@ -1,9 +0,0 @@
1
- import { KYC_FACTORY_SECURITIZE } from "./securitize/index.js";
2
- const KYC_FACTORY_TYPES = [KYC_FACTORY_SECURITIZE];
3
- function isKYCFactory(factory, type) {
4
- return factory.contractType === type;
5
- }
6
- export {
7
- KYC_FACTORY_TYPES,
8
- isKYCFactory
9
- };
@@ -1,52 +0,0 @@
1
- import type { Address } from "abitype";
2
- import { SDKConstruct } from "../../base/index.js";
3
- import type { DelegatedMulticall } from "../../utils/viem/index.js";
4
- import { SecuritizeKYCFactory } from "./securitize/index.js";
5
- import type { KYCCompressorResponse, KYCInvestorData, KYCState, KYCStateHuman } from "./types.js";
6
- /**
7
- * Registry of KYC underlying tokens and KYC factory contracts.
8
- *
9
- * Populated from the on-chain {@link https://github.com/Gearbox-protocol/periphery-v3 KYCCompressor}
10
- * during SDK attach/hydrate. Provides methods to query investor-level data and
11
- * to resolve KYC factory instances by address.
12
- **/
13
- export declare class KYCRegistry extends SDKConstruct {
14
- #private;
15
- /**
16
- * @internal
17
- *
18
- * Returns delegated multicalls for loading all KYC underlying tokens from the on-chain KYC compressor.
19
- * Used by the SDK to compose batched RPC calls.
20
- *
21
- * @param configurators - Market configurators to query.
22
- * @param kycFactories - KYC factory contracts to query.
23
- */
24
- getLoadMulticalls(configurators: Address[], kycFactories?: Address[]): DelegatedMulticall[];
25
- /**
26
- * Fetches decoded investor data from the on-chain KYC compressor.
27
- *
28
- * Each factory produces its own investor data (e.g. registered tokens,
29
- * cached signatures, EIP-712 messages to sign).
30
- *
31
- * @param investor - Investor EOA address.
32
- * @param factories_ - Optional subset of factory addresses to query.
33
- * When omitted, all loaded factories are used.
34
- */
35
- getInvestorData(investor: Address, factories_?: Address[]): Promise<KYCInvestorData[]>;
36
- /** All loaded KYC factory instances. */
37
- get factories(): SecuritizeKYCFactory[];
38
- /** Raw KYC compressor response, or `undefined` before attach/hydrate. */
39
- get state(): KYCState | undefined;
40
- /**
41
- * Returns a human-readable snapshot of the KYC state.
42
- */
43
- stateHuman(raw?: boolean): KYCStateHuman;
44
- /**
45
- * @internal
46
- *
47
- * Replaces the internal state with a new KYC compressor response.
48
- * Rebuilds token metadata for KYC underlyings and re-instantiates factory
49
- * wrappers.
50
- */
51
- setState(resp?: KYCCompressorResponse): void;
52
- }
@@ -1 +0,0 @@
1
- export declare const KYC_FACTORY_SECURITIZE = "KYC_FACTORY::SECURITIZE";
File without changes
File without changes
File without changes
File without changes
File without changes