UNPKG

@angleprotocol/sdk

Version:
151 lines (150 loc) 4.67 kB
import { ChainId } from '../types'; export declare enum BorrowCollateral { 'LUSD' = "LUSD", 'bIB01' = "bIB01", 'bHIGH' = "bHIGH", 'wBTC' = "wBTC", 'wETH' = "wETH", 'wSTETH' = "wSTETH", 'MAI' = "MAI", 'cbETH' = "cbETH", 'USDC' = "USDC", 'wMATIC' = "wMATIC", 'OP' = "OP", 'agstk-am3CRV' = "agstk-am3CRV", 'wAVAX' = "wAVAX", 'cvx-crvFRAXUSDC' = "cvx-crvFRAXUSDC", 'cvx-3CRV' = "cvx-3CRV", 'cvx-crvLUSD3CRV' = "cvx-crvLUSD3CRV", 'cvx-crvUSDCUSDT' = "cvx-crvUSDCUSDT", 'sd-crvFRAXUSDC' = "sd-crvFRAXUSDC", 'sd-3CRV' = "sd-3CRV", 'sd-crvLUSD3CRV' = "sd-crvLUSD3CRV", 'sd-crvUSDCUSDT' = "sd-crvUSDCUSDT" } declare type BorrowCollateralType = { Oracle: string; VaultManager: string; additionalProperties?: { LPToken: string; Rewards: string[]; Staker: string; Swapper: string; }; }; export declare enum Collateral { 'DAI' = "DAI", 'FEI' = "FEI", 'FRAX' = "FRAX", 'USDC' = "USDC", 'wETH' = "wETH" } declare type CollateralType = Readonly<Partial<{ FeeManager: string; GenericLender?: string; LiquidityGauge?: string; Adapter4626?: string; Adapter4626Stakable?: string; Oracle: string; PerpetualManager: string; PoolManager: string; SanToken: string; Staking?: string; }>>; export declare enum Stablecoin { 'agEUR' = "agEUR", 'agGOLD' = "agGOLD" } declare type StablecoinType = Readonly<Partial<{ AgToken: string; OracleTokenUSD: string; Savings?: string; StableMaster?: string; Staking?: string; Swapper?: string; SwapperV2?: string; Transmuter?: string; Treasury: string; collaterals?: { [collateral in Collateral]?: CollateralType; }; borrowCollaterals?: { [collateral in BorrowCollateral]?: BorrowCollateralType; }; bridges?: { Anyswap?: string; LayerZero?: string; RainbowBridge?: string; }; }>>; export declare type ContractsRegistryType = Readonly<{ [chainId in ChainId]: Partial<{ ANGLE: string; AngleGovernor: string; ProposalSender: string; ProposalReceiver: string; veANGLEDelegation: string; AngleDistributor: string; AngleHelpers: string; AngleRouter: string; AngleRouterV2: string; Core: string; CoreBorrow: string; FlashAngle: string; FeeDistributor_sanUSDC_EUR: string; GaugeController: string; Governor: string; Guardian: string; AngleLabs: string; KeeperMulticall: string; KeeperRegistry: string; Merkl: { DistributionCreator?: string; Distributor?: string; CoreMerkl: string; }; MerkleRootDistributor: string; MerklGaugeMiddleman: string; Middleman: string; MulticallWithFailure: string; OracleNativeUSD: string; ProxyAdmin: string; ProxyAdminGuardian: string; RewardsDistributor: string; SmartWalletWhitelist: string; SurplusConverterSanTokens_EUR_USDC: string; SurplusConverterUniV3_IntraCollaterals: string; Timelock: string; veANGLE: string; veBoost?: string; veBoostProxy: string; bridges?: { Anyswap?: string; LayerZero?: string; RainbowBridge?: string; PosBridge?: string; }; } & { [key in Stablecoin]: StablecoinType; }>; }>; export declare const CONTRACTS_ADDRESSES: ContractsRegistryType; export declare function registry(chainId: number | ChainId): ContractsRegistryType['1'] | undefined; export declare function registry(chainId: number | ChainId, stablecoin: Stablecoin | string): StablecoinType | undefined; export declare function registry(chainId: number | ChainId, args: { stablecoin: Stablecoin | string; }): StablecoinType | undefined; export declare function registry(chainId: number | ChainId, stablecoin: Stablecoin | string, collateral: Collateral | string): CollateralType | undefined; export declare function registry(chainId: number | ChainId, args: { stablecoin: Stablecoin | string; collateral: Collateral | string; }): CollateralType | undefined; export declare function registry(chainId: number | ChainId, args: { stablecoin: Stablecoin | string; borrowCollateral: BorrowCollateral | string; }): BorrowCollateralType | undefined; export declare function registry(chainId: number | ChainId, args: { stablecoin: Stablecoin | string; collateral: Collateral | string; }): string | undefined; export {};