@gearbox-protocol/sdk 13.5.0 → 13.6.0-kyc.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.
- package/dist/cjs/abi/kyc/iKYCCompressor.js +196 -0
- package/dist/cjs/abi/kyc/iKYCFactory.js +122 -0
- package/dist/cjs/abi/kyc/iKYCUnderlying.js +401 -0
- package/dist/cjs/abi/kyc/iSecuritizeDegenNFT.js +326 -0
- package/dist/cjs/abi/kyc/iSecuritizeKYCFactory.js +319 -0
- package/dist/cjs/dev/AccountOpener.js +45 -5
- package/dist/cjs/sdk/GearboxSDK.js +51 -4
- package/dist/cjs/sdk/accounts/AbstractCreditAccountsService.js +331 -16
- package/dist/cjs/sdk/accounts/CreditAccountsServiceV310.js +7 -1
- package/dist/cjs/sdk/base/TokensMeta.js +32 -43
- package/dist/cjs/sdk/base/token-types.js +9 -0
- package/dist/cjs/sdk/chain/chains.js +2 -1
- package/dist/cjs/sdk/constants/address-provider.js +3 -0
- package/dist/cjs/sdk/market/MarketRegister.js +70 -116
- package/dist/cjs/sdk/market/MarketSuite.js +3 -0
- package/dist/cjs/sdk/market/kyc/KYCRegister.js +255 -0
- package/dist/cjs/sdk/market/kyc/index.js +24 -0
- package/dist/cjs/sdk/market/kyc/securitize/SecuritizeKYCFactory.js +229 -0
- package/dist/cjs/sdk/market/kyc/securitize/constants.js +28 -0
- package/dist/cjs/sdk/market/kyc/securitize/index.js +26 -0
- package/dist/cjs/sdk/market/kyc/securitize/types.js +16 -0
- package/dist/cjs/sdk/market/kyc/types.js +29 -0
- package/dist/cjs/sdk/market/pool/PoolSuite.js +3 -0
- package/dist/cjs/sdk/market/pool/PoolV310Contract.js +11 -2
- package/dist/cjs/sdk/market/pool/index.js +2 -0
- package/dist/cjs/sdk/market/pricefeeds/PriceFeedsRegister.js +3 -3
- package/dist/cjs/sdk/options.js +6 -0
- package/dist/cjs/sdk/pools/PoolService.js +104 -12
- package/dist/cjs/sdk/utils/viem/executeDelegatedMulticalls.js +38 -0
- package/dist/cjs/sdk/utils/viem/index.js +2 -0
- package/dist/esm/abi/kyc/iKYCCompressor.js +172 -0
- package/dist/esm/abi/kyc/iKYCFactory.js +98 -0
- package/dist/esm/abi/kyc/iKYCUnderlying.js +377 -0
- package/dist/esm/abi/kyc/iSecuritizeDegenNFT.js +302 -0
- package/dist/esm/abi/kyc/iSecuritizeKYCFactory.js +295 -0
- package/dist/esm/dev/AccountOpener.js +47 -6
- package/dist/esm/sdk/GearboxSDK.js +55 -5
- package/dist/esm/sdk/accounts/AbstractCreditAccountsService.js +332 -17
- package/dist/esm/sdk/accounts/CreditAccountsServiceV310.js +7 -1
- package/dist/esm/sdk/base/TokensMeta.js +32 -45
- package/dist/esm/sdk/base/token-types.js +6 -0
- package/dist/esm/sdk/chain/chains.js +2 -1
- package/dist/esm/sdk/constants/address-provider.js +2 -0
- package/dist/esm/sdk/market/MarketRegister.js +74 -118
- package/dist/esm/sdk/market/MarketSuite.js +3 -0
- package/dist/esm/sdk/market/kyc/KYCRegister.js +239 -0
- package/dist/esm/sdk/market/kyc/index.js +2 -0
- package/dist/esm/sdk/market/kyc/securitize/SecuritizeKYCFactory.js +205 -0
- package/dist/esm/sdk/market/kyc/securitize/constants.js +4 -0
- package/dist/esm/sdk/market/kyc/securitize/index.js +3 -0
- package/dist/esm/sdk/market/kyc/securitize/types.js +0 -0
- package/dist/esm/sdk/market/kyc/types.js +5 -0
- package/dist/esm/sdk/market/pool/PoolSuite.js +3 -0
- package/dist/esm/sdk/market/pool/PoolV310Contract.js +11 -2
- package/dist/esm/sdk/market/pool/index.js +1 -0
- package/dist/esm/sdk/market/pricefeeds/PriceFeedsRegister.js +3 -3
- package/dist/esm/sdk/options.js +6 -0
- package/dist/esm/sdk/pools/PoolService.js +109 -13
- package/dist/esm/sdk/utils/viem/executeDelegatedMulticalls.js +14 -0
- package/dist/esm/sdk/utils/viem/index.js +1 -0
- package/dist/types/abi/kyc/iKYCCompressor.d.ts +228 -0
- package/dist/types/abi/kyc/iKYCFactory.d.ts +139 -0
- package/dist/types/abi/kyc/iKYCUnderlying.d.ts +548 -0
- package/dist/types/abi/kyc/iSecuritizeDegenNFT.d.ts +404 -0
- package/dist/types/abi/kyc/iSecuritizeKYCFactory.d.ts +376 -0
- package/dist/types/sdk/GearboxSDK.d.ts +7 -0
- package/dist/types/sdk/accounts/AbstractCreditAccountsService.d.ts +55 -2
- package/dist/types/sdk/accounts/CreditAccountsServiceV310.d.ts +1 -1
- package/dist/types/sdk/accounts/types.d.ts +93 -13
- package/dist/types/sdk/base/TokensMeta.d.ts +14 -3
- package/dist/types/sdk/base/token-types.d.ts +44 -4
- package/dist/types/sdk/base/types.d.ts +116 -2
- package/dist/types/sdk/chain/chains.d.ts +5 -1
- package/dist/types/sdk/constants/address-provider.d.ts +1 -0
- package/dist/types/sdk/market/MarketRegister.d.ts +6 -9
- package/dist/types/sdk/market/MarketSuite.d.ts +2 -0
- package/dist/types/sdk/market/kyc/KYCRegister.d.ts +31 -0
- package/dist/types/sdk/market/kyc/index.d.ts +2 -0
- package/dist/types/sdk/market/kyc/securitize/SecuritizeKYCFactory.d.ts +420 -0
- package/dist/types/sdk/market/kyc/securitize/constants.d.ts +1 -0
- package/dist/types/sdk/market/kyc/securitize/index.d.ts +3 -0
- package/dist/types/sdk/market/kyc/securitize/types.d.ts +62 -0
- package/dist/types/sdk/market/kyc/types.d.ts +93 -0
- package/dist/types/sdk/market/oracle/PriceOracleBaseContract.d.ts +3 -2
- package/dist/types/sdk/market/oracle/types.d.ts +3 -10
- package/dist/types/sdk/market/pool/PoolSuite.d.ts +2 -0
- package/dist/types/sdk/market/pool/PoolV310Contract.d.ts +6 -2
- package/dist/types/sdk/market/pool/index.d.ts +1 -0
- package/dist/types/sdk/market/pricefeeds/PriceFeedsRegister.d.ts +1 -1
- package/dist/types/sdk/market/types.d.ts +1 -1
- package/dist/types/sdk/options.d.ts +1 -0
- package/dist/types/sdk/pools/PoolService.d.ts +8 -8
- package/dist/types/sdk/pools/types.d.ts +1 -1
- package/dist/types/sdk/types/state-human.d.ts +2 -0
- package/dist/types/sdk/types/state.d.ts +5 -0
- package/dist/types/sdk/utils/viem/executeDelegatedMulticalls.d.ts +11 -0
- package/dist/types/sdk/utils/viem/index.d.ts +1 -0
- package/package.json +3 -2
|
@@ -152,7 +152,7 @@ export declare class PriceFeedRegister extends SDKConstruct implements IHooks<Pr
|
|
|
152
152
|
* Loads PARTIAL information about all updatable price feeds from MarketCompressor
|
|
153
153
|
* Discovered price feeds are not saved anywhere in PriceFeedRegister, and can later be used to load price feed updates
|
|
154
154
|
*/
|
|
155
|
-
getPartialUpdatablePriceFeeds(configurators: Address[]
|
|
155
|
+
getPartialUpdatablePriceFeeds(configurators: Address[]): Promise<IPriceFeedContract[]>;
|
|
156
156
|
/**
|
|
157
157
|
* Instantiates the appropriate price feed contract wrapper based on
|
|
158
158
|
* the `contractType` discriminator in the node's base params.
|
|
@@ -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" | "base";
|
|
8
|
+
type: "migration" | "kyc" | "base";
|
|
9
9
|
}
|
|
10
10
|
export {};
|
|
@@ -7,6 +7,7 @@ import type { ILogger } from "./types/index.js";
|
|
|
7
7
|
export declare const SDKOptions: z.ZodObject<{
|
|
8
8
|
addressProvider: z.ZodOptional<z.ZodPipe<z.ZodString, z.ZodTransform<`0x${string}`, string>>>;
|
|
9
9
|
marketConfigurators: z.ZodOptional<z.ZodArray<z.ZodPipe<z.ZodString, z.ZodTransform<`0x${string}`, string>>>>;
|
|
10
|
+
kycFactories: z.ZodOptional<z.ZodArray<z.ZodPipe<z.ZodString, z.ZodTransform<`0x${string}`, string>>>>;
|
|
10
11
|
blockNumber: z.ZodOptional<z.ZodUnion<readonly [z.ZodBigInt, z.ZodNumber]>>;
|
|
11
12
|
ignoreUpdateablePrices: z.ZodOptional<z.ZodBoolean>;
|
|
12
13
|
ignoreMarkets: z.ZodOptional<z.ZodArray<z.ZodPipe<z.ZodString, z.ZodTransform<`0x${string}`, string>>>>;
|
|
@@ -4,35 +4,35 @@ import type { AddLiquidityProps, DepositMetadata, IPoolsService, PoolServiceCall
|
|
|
4
4
|
export declare class PoolService extends SDKConstruct implements IPoolsService {
|
|
5
5
|
#private;
|
|
6
6
|
/**
|
|
7
|
-
* @
|
|
7
|
+
* {@inheritDoc IPoolsService.getDepositTokensIn}
|
|
8
8
|
*/
|
|
9
9
|
getDepositTokensIn(pool: Address): Address[];
|
|
10
10
|
/**
|
|
11
|
-
* @
|
|
11
|
+
* {@inheritDoc IPoolsService.getDepositTokensOut}
|
|
12
12
|
*/
|
|
13
13
|
getDepositTokensOut(pool: Address, tokenIn: Address): Address[];
|
|
14
14
|
/**
|
|
15
|
-
* @
|
|
15
|
+
* {@inheritDoc IPoolsService.getDepositMetadata}
|
|
16
16
|
*/
|
|
17
17
|
getDepositMetadata(pool: Address, tokenIn: Address, tokenOut?: Address): DepositMetadata;
|
|
18
18
|
/**
|
|
19
|
-
* @
|
|
19
|
+
* {@inheritDoc IPoolsService.addLiquidity}
|
|
20
20
|
*/
|
|
21
21
|
addLiquidity(props: AddLiquidityProps): PoolServiceCall | undefined;
|
|
22
22
|
/**
|
|
23
|
-
* @
|
|
23
|
+
* {@inheritDoc IPoolsService.getWithdrawalTokensIn}
|
|
24
24
|
*/
|
|
25
25
|
getWithdrawalTokensIn(pool: Address): Address[];
|
|
26
26
|
/**
|
|
27
|
-
* @
|
|
27
|
+
* {@inheritDoc IPoolsService.getWithdrawalTokensOut}
|
|
28
28
|
*/
|
|
29
29
|
getWithdrawalTokensOut(pool: Address, tokenIn: Address): Address[];
|
|
30
30
|
/**
|
|
31
|
-
* @
|
|
31
|
+
* {@inheritDoc IPoolsService.removeLiquidity}
|
|
32
32
|
*/
|
|
33
33
|
removeLiquidity(props: RemoveLiquidityProps): PoolServiceCall;
|
|
34
34
|
/**
|
|
35
|
-
* @
|
|
35
|
+
* {@inheritDoc IPoolsService.getWithdrawalMetadata}
|
|
36
36
|
*/
|
|
37
37
|
getWithdrawalMetadata(pool: Address, tokenIn: Address, tokenOut?: Address): WithdrawalMetadata;
|
|
38
38
|
}
|
|
@@ -53,7 +53,7 @@ export interface RemoveLiquidityProps {
|
|
|
53
53
|
permit: PermitResult | undefined;
|
|
54
54
|
meta: WithdrawalMetadata;
|
|
55
55
|
}
|
|
56
|
-
export type MarketType = "classic";
|
|
56
|
+
export type MarketType = "kyc-on-demand" | "kyc-default" | "classic";
|
|
57
57
|
export interface DepositMetadata {
|
|
58
58
|
/**
|
|
59
59
|
* Zapper that will perform the deposit, undefined in case of direct pool underlying deposit
|
|
@@ -1,6 +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
5
|
export interface BaseContractStateHuman {
|
|
5
6
|
address: string;
|
|
6
7
|
version: number;
|
|
@@ -199,4 +200,5 @@ export interface GearboxStateHuman {
|
|
|
199
200
|
markets: MarketStateHuman[];
|
|
200
201
|
plugins: Record<string, unknown>;
|
|
201
202
|
tokens: TokenMetaData[];
|
|
203
|
+
kyc: KYCStateHuman;
|
|
202
204
|
}
|
|
@@ -1,6 +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
5
|
import type { PluginStatesMap, PluginsMap } from "../plugins/index.js";
|
|
5
6
|
/**
|
|
6
7
|
* Complete serialisable snapshot of the Gearbox SDK state.
|
|
@@ -40,6 +41,10 @@ export interface GearboxState<Plugins extends PluginsMap = {}> {
|
|
|
40
41
|
* All loaded market data.
|
|
41
42
|
**/
|
|
42
43
|
markets: MarketData[];
|
|
44
|
+
/**
|
|
45
|
+
* KYC compressor state snapshot, if KYC factories were loaded.
|
|
46
|
+
**/
|
|
47
|
+
kyc?: KYCState;
|
|
43
48
|
/**
|
|
44
49
|
* Per-plugin serialised state.
|
|
45
50
|
**/
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
import type { Chain, Client, ContractFunctionParameters, Transport } from "viem";
|
|
2
|
+
import type { IPriceUpdateTx } from "../../types/index.js";
|
|
3
|
+
export interface DelegatedMulticall {
|
|
4
|
+
call: ContractFunctionParameters;
|
|
5
|
+
onResult: (resp: unknown) => void;
|
|
6
|
+
}
|
|
7
|
+
export declare function executeDelegatedMulticalls(client: Client<Transport, Chain>, multicalls: DelegatedMulticall[], opts: {
|
|
8
|
+
priceUpdates: IPriceUpdateTx[];
|
|
9
|
+
blockNumber: bigint;
|
|
10
|
+
gas?: bigint;
|
|
11
|
+
}): Promise<void>;
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@gearbox-protocol/sdk",
|
|
3
|
-
"version": "13.
|
|
3
|
+
"version": "13.6.0-kyc.2",
|
|
4
4
|
"description": "Gearbox SDK",
|
|
5
5
|
"license": "MIT",
|
|
6
6
|
"main": "./dist/cjs/sdk/index.js",
|
|
@@ -105,7 +105,8 @@
|
|
|
105
105
|
"typescript": "^5.9.3",
|
|
106
106
|
"viem-deal": "^2.0.4",
|
|
107
107
|
"vite": "^8.0.3",
|
|
108
|
-
"vitest": "^4.1.2"
|
|
108
|
+
"vitest": "^4.1.2",
|
|
109
|
+
"yaml": "^2.8.3"
|
|
109
110
|
},
|
|
110
111
|
"peerDependencies": {
|
|
111
112
|
"axios": "^1.0.0",
|