UNPKG

@moonwell-fi/moonwell-sdk

Version:

TypeScript Interface for Moonwell

1,008 lines 99.6 kB
import type { Chain, Prettify, Transport } from "viem"; import { type GovernanceToken, type GovernanceTokenInfo, GovernanceTokensConfig, type GovernanceTokensType } from "./definitions/governance.js"; import { base, type markets as baseMarkets, type morphoMarkets as baseMorphoMarkets, type tokens as baseTokens, type vaults as baseVaults, createEnvironment as createBaseEnvironment } from "./definitions/base/environment.js"; import { createEnvironment as createMoonbeamEnvironment, type markets as moonbeamMarkets, type tokens as moonbeamTokens } from "./definitions/moonbeam/environment.js"; import { createEnvironment as createMoonriverEnvironment, type markets as moonriverMarkets, type tokens as moonriverTokens } from "./definitions/moonriver/environment.js"; import { createEnvironment as createOptimismEnvironment, type markets as optimismMarkets, type morphoMarkets as optimismMorphoMarkets, type tokens as optimismTokens, type vaults as optimismVaults } from "./definitions/optimism/environment.js"; import { createEnvironment as createEthereumEnvironment, ethereum, type tokens as ethereumTokens } from "./definitions/ethereum/environment.js"; import { avalanche, type tokens as avalancheTokens, createEnvironment as createAvalancheEnvironment } from "./definitions/avalanche/environment.js"; import { arbitrum, type tokens as arbitrumTokens, createEnvironment as createArbitrumEnvironment } from "./definitions/arbitrum/environment.js"; import { createEnvironment as createPolygonEnvironment, polygon, type tokens as polygonTokens } from "./definitions/polygon/environment.js"; import { moonbeam, moonriver, optimism } from "viem/chains"; import type { Environment, TokenConfig } from "./types/config.js"; export { arbitrum, avalanche, base, ethereum, GovernanceTokensConfig, moonbeam, moonriver, optimism, polygon, supportedChains, supportedChainsIds, }; export type { Chain, Environment, GovernanceToken, GovernanceTokenInfo, GovernanceTokensType, Prettify, SupportedChains, SupportedChainsIds, TokenConfig, Transport, }; declare const supportedChainsIds: { [id: number]: keyof typeof supportedChains; }; declare const supportedChains: { base: { blockExplorers: { readonly default: { readonly name: "Basescan"; readonly url: "https://basescan.org"; readonly apiUrl: "https://api.basescan.org/api"; }; }; blockTime: 2000; contracts: { readonly disputeGameFactory: { readonly 1: { readonly address: "0x43edB88C4B80fDD2AdFF2412A7BebF9dF42cB40e"; }; }; readonly l2OutputOracle: { readonly 1: { readonly address: "0x56315b90c40730925ec5485cf004d835058518A0"; }; }; readonly multicall3: { readonly address: "0xca11bde05977b3631167028862be2a173976ca11"; readonly blockCreated: 5022; }; readonly portal: { readonly 1: { readonly address: "0x49048044D57e1C92A77f79988d21Fa8fAF74E97e"; readonly blockCreated: 17482143; }; }; readonly l1StandardBridge: { readonly 1: { readonly address: "0x3154Cf16ccdb4C6d922629664174b904d80F2C35"; readonly blockCreated: 17482143; }; }; readonly gasPriceOracle: { readonly address: "0x420000000000000000000000000000000000000F"; }; readonly l1Block: { readonly address: "0x4200000000000000000000000000000000000015"; }; readonly l2CrossDomainMessenger: { readonly address: "0x4200000000000000000000000000000000000007"; }; readonly l2Erc721Bridge: { readonly address: "0x4200000000000000000000000000000000000014"; }; readonly l2StandardBridge: { readonly address: "0x4200000000000000000000000000000000000010"; }; readonly l2ToL1MessagePasser: { readonly address: "0x4200000000000000000000000000000000000016"; }; }; ensTlds?: readonly string[] | undefined; id: 8453; name: "Base"; nativeCurrency: { readonly name: "Ether"; readonly symbol: "ETH"; readonly decimals: 18; }; experimental_preconfirmationTime?: number | undefined | undefined; rpcUrls: { readonly default: { readonly http: readonly ["https://mainnet.base.org"]; }; }; sourceId: 1; testnet: false; custom?: Record<string, unknown> | undefined; extendSchema?: Record<string, unknown> | undefined; fees?: import("viem").ChainFees<undefined> | undefined; formatters: { readonly block: { exclude: [] | undefined; format: (args: import("viem/chains").OpStackRpcBlock, action?: string | undefined) => { baseFeePerGas: bigint | null; blobGasUsed: bigint; difficulty: bigint; excessBlobGas: bigint; extraData: import("viem").Hex; gasLimit: bigint; gasUsed: bigint; hash: `0x${string}` | null; logsBloom: `0x${string}` | null; miner: import("viem").Address; mixHash: import("viem").Hash; nonce: `0x${string}` | null; number: bigint | null; parentBeaconBlockRoot?: `0x${string}` | undefined; parentHash: import("viem").Hash; receiptsRoot: import("viem").Hex; sealFields: import("viem").Hex[]; sha3Uncles: import("viem").Hash; size: bigint; stateRoot: import("viem").Hash; timestamp: bigint; totalDifficulty: bigint | null; transactions: `0x${string}`[] | import("viem/chains").OpStackTransaction<boolean>[]; transactionsRoot: import("viem").Hash; uncles: import("viem").Hash[]; withdrawals?: import("viem").Withdrawal[] | undefined | undefined; withdrawalsRoot?: `0x${string}` | undefined; } & {}; type: "block"; }; readonly transaction: { exclude: [] | undefined; format: (args: import("viem/chains").OpStackRpcTransaction, action?: string | undefined) => ({ blockHash: `0x${string}` | null; blockNumber: bigint | null; blockTimestamp?: bigint | undefined; from: import("viem").Address; gas: bigint; hash: import("viem").Hash; input: import("viem").Hex; nonce: number; r: import("viem").Hex; s: import("viem").Hex; to: import("viem").Address | null; transactionIndex: number | null; typeHex: import("viem").Hex | null; v: bigint; value: bigint; yParity: number; gasPrice?: undefined | undefined; maxFeePerBlobGas?: undefined | undefined; maxFeePerGas: bigint; maxPriorityFeePerGas: bigint; isSystemTx?: boolean; mint?: bigint | undefined | undefined; sourceHash: import("viem").Hex; type: "deposit"; } | { r: import("viem").Hex; s: import("viem").Hex; v: bigint; to: import("viem").Address | null; from: import("viem").Address; gas: bigint; nonce: number; value: bigint; blockHash: `0x${string}` | null; blockNumber: bigint | null; blockTimestamp?: bigint | undefined; hash: import("viem").Hash; input: import("viem").Hex; transactionIndex: number | null; typeHex: import("viem").Hex | null; accessList?: undefined | undefined; authorizationList?: undefined | undefined; blobVersionedHashes?: undefined | undefined; chainId?: number | undefined; yParity?: undefined | undefined; type: "legacy"; gasPrice: bigint; maxFeePerBlobGas?: undefined | undefined; maxFeePerGas?: undefined | undefined; maxPriorityFeePerGas?: undefined | undefined; isSystemTx?: undefined | undefined; mint?: undefined | undefined; sourceHash?: undefined | undefined; } | { blockHash: `0x${string}` | null; blockNumber: bigint | null; blockTimestamp?: bigint | undefined; from: import("viem").Address; gas: bigint; hash: import("viem").Hash; input: import("viem").Hex; nonce: number; r: import("viem").Hex; s: import("viem").Hex; to: import("viem").Address | null; transactionIndex: number | null; typeHex: import("viem").Hex | null; v: bigint; value: bigint; yParity: number; accessList: import("viem").AccessList; authorizationList?: undefined | undefined; blobVersionedHashes?: undefined | undefined; chainId: number; type: "eip2930"; gasPrice: bigint; maxFeePerBlobGas?: undefined | undefined; maxFeePerGas?: undefined | undefined; maxPriorityFeePerGas?: undefined | undefined; isSystemTx?: undefined | undefined; mint?: undefined | undefined; sourceHash?: undefined | undefined; } | { blockHash: `0x${string}` | null; blockNumber: bigint | null; blockTimestamp?: bigint | undefined; from: import("viem").Address; gas: bigint; hash: import("viem").Hash; input: import("viem").Hex; nonce: number; r: import("viem").Hex; s: import("viem").Hex; to: import("viem").Address | null; transactionIndex: number | null; typeHex: import("viem").Hex | null; v: bigint; value: bigint; yParity: number; accessList: import("viem").AccessList; authorizationList?: undefined | undefined; blobVersionedHashes?: undefined | undefined; chainId: number; type: "eip1559"; gasPrice?: undefined | undefined; maxFeePerBlobGas?: undefined | undefined; maxFeePerGas: bigint; maxPriorityFeePerGas: bigint; isSystemTx?: undefined | undefined; mint?: undefined | undefined; sourceHash?: undefined | undefined; } | { blockHash: `0x${string}` | null; blockNumber: bigint | null; blockTimestamp?: bigint | undefined; from: import("viem").Address; gas: bigint; hash: import("viem").Hash; input: import("viem").Hex; nonce: number; r: import("viem").Hex; s: import("viem").Hex; to: import("viem").Address | null; transactionIndex: number | null; typeHex: import("viem").Hex | null; v: bigint; value: bigint; yParity: number; accessList: import("viem").AccessList; authorizationList?: undefined | undefined; blobVersionedHashes: readonly import("viem").Hex[]; chainId: number; type: "eip4844"; gasPrice?: undefined | undefined; maxFeePerBlobGas: bigint; maxFeePerGas: bigint; maxPriorityFeePerGas: bigint; isSystemTx?: undefined | undefined; mint?: undefined | undefined; sourceHash?: undefined | undefined; } | { blockHash: `0x${string}` | null; blockNumber: bigint | null; blockTimestamp?: bigint | undefined; from: import("viem").Address; gas: bigint; hash: import("viem").Hash; input: import("viem").Hex; nonce: number; r: import("viem").Hex; s: import("viem").Hex; to: import("viem").Address | null; transactionIndex: number | null; typeHex: import("viem").Hex | null; v: bigint; value: bigint; yParity: number; accessList: import("viem").AccessList; authorizationList: import("viem").SignedAuthorizationList; blobVersionedHashes?: undefined | undefined; chainId: number; type: "eip7702"; gasPrice?: undefined | undefined; maxFeePerBlobGas?: undefined | undefined; maxFeePerGas: bigint; maxPriorityFeePerGas: bigint; isSystemTx?: undefined | undefined; mint?: undefined | undefined; sourceHash?: undefined | undefined; }) & {}; type: "transaction"; }; readonly transactionReceipt: { exclude: [] | undefined; format: (args: import("viem/chains").OpStackRpcTransactionReceipt, action?: string | undefined) => { blobGasPrice?: bigint | undefined; blobGasUsed?: bigint | undefined; blockHash: import("viem").Hash; blockNumber: bigint; blockTimestamp?: bigint | undefined; contractAddress: import("viem").Address | null | undefined; cumulativeGasUsed: bigint; effectiveGasPrice: bigint; from: import("viem").Address; gasUsed: bigint; logs: import("viem").Log<bigint, number, false>[]; logsBloom: import("viem").Hex; root?: `0x${string}` | undefined; status: "success" | "reverted"; to: import("viem").Address | null; transactionHash: import("viem").Hash; transactionIndex: number; type: import("viem").TransactionType; l1GasPrice: bigint | null; l1GasUsed: bigint | null; l1Fee: bigint | null; l1FeeScalar: number | null; } & {}; type: "transactionReceipt"; }; }; prepareTransactionRequest?: ((args: import("viem").PrepareTransactionRequestParameters, options: { phase: "beforeFillTransaction" | "beforeFillParameters" | "afterFillParameters"; }) => Promise<import("viem").PrepareTransactionRequestParameters>) | [fn: ((args: import("viem").PrepareTransactionRequestParameters, options: { phase: "beforeFillTransaction" | "beforeFillParameters" | "afterFillParameters"; }) => Promise<import("viem").PrepareTransactionRequestParameters>) | undefined, options: { runAt: readonly ("beforeFillTransaction" | "beforeFillParameters" | "afterFillParameters")[]; }] | undefined; serializers: { readonly transaction: typeof import("viem/chains").serializeTransactionOpStack; }; verifyHash?: ((client: import("viem").Client, parameters: import("viem").VerifyHashActionParameters) => Promise<import("viem").VerifyHashActionReturnType>) | undefined; }; optimism: { blockExplorers: { readonly default: { readonly name: "Optimism Explorer"; readonly url: "https://optimistic.etherscan.io"; readonly apiUrl: "https://api-optimistic.etherscan.io/api"; }; }; blockTime: 2000; contracts: { readonly disputeGameFactory: { readonly 1: { readonly address: "0xe5965Ab5962eDc7477C8520243A95517CD252fA9"; }; }; readonly l2OutputOracle: { readonly 1: { readonly address: "0xdfe97868233d1aa22e815a266982f2cf17685a27"; }; }; readonly multicall3: { readonly address: "0xca11bde05977b3631167028862be2a173976ca11"; readonly blockCreated: 4286263; }; readonly portal: { readonly 1: { readonly address: "0xbEb5Fc579115071764c7423A4f12eDde41f106Ed"; }; }; readonly l1StandardBridge: { readonly 1: { readonly address: "0x99C9fc46f92E8a1c0deC1b1747d010903E884bE1"; }; }; readonly gasPriceOracle: { readonly address: "0x420000000000000000000000000000000000000F"; }; readonly l1Block: { readonly address: "0x4200000000000000000000000000000000000015"; }; readonly l2CrossDomainMessenger: { readonly address: "0x4200000000000000000000000000000000000007"; }; readonly l2Erc721Bridge: { readonly address: "0x4200000000000000000000000000000000000014"; }; readonly l2StandardBridge: { readonly address: "0x4200000000000000000000000000000000000010"; }; readonly l2ToL1MessagePasser: { readonly address: "0x4200000000000000000000000000000000000016"; }; }; ensTlds?: readonly string[] | undefined; id: 10; name: "OP Mainnet"; nativeCurrency: { readonly name: "Ether"; readonly symbol: "ETH"; readonly decimals: 18; }; experimental_preconfirmationTime?: number | undefined | undefined; rpcUrls: { readonly default: { readonly http: readonly ["https://mainnet.optimism.io"]; }; }; sourceId: 1; testnet?: boolean | undefined | undefined; custom?: Record<string, unknown> | undefined; extendSchema?: Record<string, unknown> | undefined; fees?: import("viem").ChainFees<undefined> | undefined; formatters: { readonly block: { exclude: [] | undefined; format: (args: import("viem/chains").OpStackRpcBlock, action?: string | undefined) => { baseFeePerGas: bigint | null; blobGasUsed: bigint; difficulty: bigint; excessBlobGas: bigint; extraData: import("viem").Hex; gasLimit: bigint; gasUsed: bigint; hash: `0x${string}` | null; logsBloom: `0x${string}` | null; miner: import("viem").Address; mixHash: import("viem").Hash; nonce: `0x${string}` | null; number: bigint | null; parentBeaconBlockRoot?: `0x${string}` | undefined; parentHash: import("viem").Hash; receiptsRoot: import("viem").Hex; sealFields: import("viem").Hex[]; sha3Uncles: import("viem").Hash; size: bigint; stateRoot: import("viem").Hash; timestamp: bigint; totalDifficulty: bigint | null; transactions: `0x${string}`[] | import("viem/chains").OpStackTransaction<boolean>[]; transactionsRoot: import("viem").Hash; uncles: import("viem").Hash[]; withdrawals?: import("viem").Withdrawal[] | undefined | undefined; withdrawalsRoot?: `0x${string}` | undefined; } & {}; type: "block"; }; readonly transaction: { exclude: [] | undefined; format: (args: import("viem/chains").OpStackRpcTransaction, action?: string | undefined) => ({ blockHash: `0x${string}` | null; blockNumber: bigint | null; blockTimestamp?: bigint | undefined; from: import("viem").Address; gas: bigint; hash: import("viem").Hash; input: import("viem").Hex; nonce: number; r: import("viem").Hex; s: import("viem").Hex; to: import("viem").Address | null; transactionIndex: number | null; typeHex: import("viem").Hex | null; v: bigint; value: bigint; yParity: number; gasPrice?: undefined | undefined; maxFeePerBlobGas?: undefined | undefined; maxFeePerGas: bigint; maxPriorityFeePerGas: bigint; isSystemTx?: boolean; mint?: bigint | undefined | undefined; sourceHash: import("viem").Hex; type: "deposit"; } | { r: import("viem").Hex; s: import("viem").Hex; v: bigint; to: import("viem").Address | null; from: import("viem").Address; gas: bigint; nonce: number; value: bigint; blockHash: `0x${string}` | null; blockNumber: bigint | null; blockTimestamp?: bigint | undefined; hash: import("viem").Hash; input: import("viem").Hex; transactionIndex: number | null; typeHex: import("viem").Hex | null; accessList?: undefined | undefined; authorizationList?: undefined | undefined; blobVersionedHashes?: undefined | undefined; chainId?: number | undefined; yParity?: undefined | undefined; type: "legacy"; gasPrice: bigint; maxFeePerBlobGas?: undefined | undefined; maxFeePerGas?: undefined | undefined; maxPriorityFeePerGas?: undefined | undefined; isSystemTx?: undefined | undefined; mint?: undefined | undefined; sourceHash?: undefined | undefined; } | { blockHash: `0x${string}` | null; blockNumber: bigint | null; blockTimestamp?: bigint | undefined; from: import("viem").Address; gas: bigint; hash: import("viem").Hash; input: import("viem").Hex; nonce: number; r: import("viem").Hex; s: import("viem").Hex; to: import("viem").Address | null; transactionIndex: number | null; typeHex: import("viem").Hex | null; v: bigint; value: bigint; yParity: number; accessList: import("viem").AccessList; authorizationList?: undefined | undefined; blobVersionedHashes?: undefined | undefined; chainId: number; type: "eip2930"; gasPrice: bigint; maxFeePerBlobGas?: undefined | undefined; maxFeePerGas?: undefined | undefined; maxPriorityFeePerGas?: undefined | undefined; isSystemTx?: undefined | undefined; mint?: undefined | undefined; sourceHash?: undefined | undefined; } | { blockHash: `0x${string}` | null; blockNumber: bigint | null; blockTimestamp?: bigint | undefined; from: import("viem").Address; gas: bigint; hash: import("viem").Hash; input: import("viem").Hex; nonce: number; r: import("viem").Hex; s: import("viem").Hex; to: import("viem").Address | null; transactionIndex: number | null; typeHex: import("viem").Hex | null; v: bigint; value: bigint; yParity: number; accessList: import("viem").AccessList; authorizationList?: undefined | undefined; blobVersionedHashes?: undefined | undefined; chainId: number; type: "eip1559"; gasPrice?: undefined | undefined; maxFeePerBlobGas?: undefined | undefined; maxFeePerGas: bigint; maxPriorityFeePerGas: bigint; isSystemTx?: undefined | undefined; mint?: undefined | undefined; sourceHash?: undefined | undefined; } | { blockHash: `0x${string}` | null; blockNumber: bigint | null; blockTimestamp?: bigint | undefined; from: import("viem").Address; gas: bigint; hash: import("viem").Hash; input: import("viem").Hex; nonce: number; r: import("viem").Hex; s: import("viem").Hex; to: import("viem").Address | null; transactionIndex: number | null; typeHex: import("viem").Hex | null; v: bigint; value: bigint; yParity: number; accessList: import("viem").AccessList; authorizationList?: undefined | undefined; blobVersionedHashes: readonly import("viem").Hex[]; chainId: number; type: "eip4844"; gasPrice?: undefined | undefined; maxFeePerBlobGas: bigint; maxFeePerGas: bigint; maxPriorityFeePerGas: bigint; isSystemTx?: undefined | undefined; mint?: undefined | undefined; sourceHash?: undefined | undefined; } | { blockHash: `0x${string}` | null; blockNumber: bigint | null; blockTimestamp?: bigint | undefined; from: import("viem").Address; gas: bigint; hash: import("viem").Hash; input: import("viem").Hex; nonce: number; r: import("viem").Hex; s: import("viem").Hex; to: import("viem").Address | null; transactionIndex: number | null; typeHex: import("viem").Hex | null; v: bigint; value: bigint; yParity: number; accessList: import("viem").AccessList; authorizationList: import("viem").SignedAuthorizationList; blobVersionedHashes?: undefined | undefined; chainId: number; type: "eip7702"; gasPrice?: undefined | undefined; maxFeePerBlobGas?: undefined | undefined; maxFeePerGas: bigint; maxPriorityFeePerGas: bigint; isSystemTx?: undefined | undefined; mint?: undefined | undefined; sourceHash?: undefined | undefined; }) & {}; type: "transaction"; }; readonly transactionReceipt: { exclude: [] | undefined; format: (args: import("viem/chains").OpStackRpcTransactionReceipt, action?: string | undefined) => { blobGasPrice?: bigint | undefined; blobGasUsed?: bigint | undefined; blockHash: import("viem").Hash; blockNumber: bigint; blockTimestamp?: bigint | undefined; contractAddress: import("viem").Address | null | undefined; cumulativeGasUsed: bigint; effectiveGasPrice: bigint; from: import("viem").Address; gasUsed: bigint; logs: import("viem").Log<bigint, number, false>[]; logsBloom: import("viem").Hex; root?: `0x${string}` | undefined; status: "success" | "reverted"; to: import("viem").Address | null; transactionHash: import("viem").Hash; transactionIndex: number; type: import("viem").TransactionType; l1GasPrice: bigint | null; l1GasUsed: bigint | null; l1Fee: bigint | null; l1FeeScalar: number | null; } & {}; type: "transactionReceipt"; }; }; prepareTransactionRequest?: ((args: import("viem").PrepareTransactionRequestParameters, options: { phase: "beforeFillTransaction" | "beforeFillParameters" | "afterFillParameters"; }) => Promise<import("viem").PrepareTransactionRequestParameters>) | [fn: ((args: import("viem").PrepareTransactionRequestParameters, options: { phase: "beforeFillTransaction" | "beforeFillParameters" | "afterFillParameters"; }) => Promise<import("viem").PrepareTransactionRequestParameters>) | undefined, options: { runAt: readonly ("beforeFillTransaction" | "beforeFillParameters" | "afterFillParameters")[]; }] | undefined; serializers: { readonly transaction: typeof import("viem/chains").serializeTransactionOpStack; }; verifyHash?: ((client: import("viem").Client, parameters: import("viem").VerifyHashActionParameters) => Promise<import("viem").VerifyHashActionReturnType>) | undefined; }; moonriver: { blockExplorers: { readonly default: { readonly name: "Moonscan"; readonly url: "https://moonriver.moonscan.io"; readonly apiUrl: "https://api-moonriver.moonscan.io/api"; }; }; blockTime?: number | undefined | undefined; contracts: { readonly multicall3: { readonly address: "0xcA11bde05977b3631167028862bE2a173976CA11"; readonly blockCreated: 1597904; }; }; ensTlds?: readonly string[] | undefined; id: 1285; name: "Moonriver"; nativeCurrency: { readonly decimals: 18; readonly name: "Moonriver"; readonly symbol: "MOVR"; }; experimental_preconfirmationTime?: number | undefined | undefined; rpcUrls: { readonly default: { readonly http: readonly ["https://rpc.api.moonriver.moonbeam.network"]; readonly webSocket: readonly ["wss://wss.api.moonriver.moonbeam.network"]; }; }; sourceId?: number | undefined | undefined; testnet: false; custom?: Record<string, unknown> | undefined; extendSchema?: Record<string, unknown> | undefined; fees?: import("viem").ChainFees<undefined> | undefined; formatters?: undefined; prepareTransactionRequest?: ((args: import("viem").PrepareTransactionRequestParameters, options: { phase: "beforeFillTransaction" | "beforeFillParameters" | "afterFillParameters"; }) => Promise<import("viem").PrepareTransactionRequestParameters>) | [fn: ((args: import("viem").PrepareTransactionRequestParameters, options: { phase: "beforeFillTransaction" | "beforeFillParameters" | "afterFillParameters"; }) => Promise<import("viem").PrepareTransactionRequestParameters>) | undefined, options: { runAt: readonly ("beforeFillTransaction" | "beforeFillParameters" | "afterFillParameters")[]; }] | undefined; serializers?: import("viem").ChainSerializers<undefined, import("viem").TransactionSerializable> | undefined; verifyHash?: ((client: import("viem").Client, parameters: import("viem").VerifyHashActionParameters) => Promise<import("viem").VerifyHashActionReturnType>) | undefined; }; moonbeam: { blockExplorers: { readonly default: { readonly name: "Moonscan"; readonly url: "https://moonscan.io"; readonly apiUrl: "https://api-moonbeam.moonscan.io/api"; }; }; blockTime?: number | undefined | undefined; contracts: { readonly multicall3: { readonly address: "0xcA11bde05977b3631167028862bE2a173976CA11"; readonly blockCreated: 609002; }; }; ensTlds?: readonly string[] | undefined; id: 1284; name: "Moonbeam"; nativeCurrency: { readonly decimals: 18; readonly name: "Moonbeam"; readonly symbol: "GLMR"; }; experimental_preconfirmationTime?: number | undefined | undefined; rpcUrls: { readonly default: { readonly http: readonly ["https://rpc.api.moonbeam.network"]; readonly webSocket: readonly ["wss://wss.api.moonbeam.network"]; }; }; sourceId?: number | undefined | undefined; testnet: false; custom?: Record<string, unknown> | undefined; extendSchema?: Record<string, unknown> | undefined; fees?: import("viem").ChainFees<undefined> | undefined; formatters?: undefined; prepareTransactionRequest?: ((args: import("viem").PrepareTransactionRequestParameters, options: { phase: "beforeFillTransaction" | "beforeFillParameters" | "afterFillParameters"; }) => Promise<import("viem").PrepareTransactionRequestParameters>) | [fn: ((args: import("viem").PrepareTransactionRequestParameters, options: { phase: "beforeFillTransaction" | "beforeFillParameters" | "afterFillParameters"; }) => Promise<import("viem").PrepareTransactionRequestParameters>) | undefined, options: { runAt: readonly ("beforeFillTransaction" | "beforeFillParameters" | "afterFillParameters")[]; }] | undefined; serializers?: import("viem").ChainSerializers<undefined, import("viem").TransactionSerializable> | undefined; verifyHash?: ((client: import("viem").Client, parameters: import("viem").VerifyHashActionParameters) => Promise<import("viem").VerifyHashActionReturnType>) | undefined; }; ethereum: { blockExplorers: { readonly default: { readonly name: "Etherscan"; readonly url: "https://etherscan.io"; readonly apiUrl: "https://api.etherscan.io/api"; }; }; blockTime: 12000; contracts: { readonly ensUniversalResolver: { readonly address: "0xeeeeeeee14d718c2b47d9923deab1335e144eeee"; readonly blockCreated: 23085558; }; readonly multicall3: { readonly address: "0xca11bde05977b3631167028862be2a173976ca11"; readonly blockCreated: 14353601; }; }; ensTlds?: readonly string[] | undefined; id: 1; name: "Ethereum"; nativeCurrency: { readonly name: "Ether"; readonly symbol: "ETH"; readonly decimals: 18; }; experimental_preconfirmationTime?: number | undefined | undefined; rpcUrls: { readonly default: { readonly http: readonly ["https://eth.merkle.io"]; }; }; sourceId?: number | undefined | undefined; testnet: false; custom?: Record<string, unknown> | undefined; extendSchema?: Record<string, unknown> | undefined; fees?: import("viem").ChainFees<undefined> | undefined; prepareTransactionRequest?: ((args: import("viem").PrepareTransactionRequestParameters, options: { phase: "beforeFillTransaction" | "beforeFillParameters" | "afterFillParameters"; }) => Promise<import("viem").PrepareTransactionRequestParameters>) | [fn: ((args: import("viem").PrepareTransactionRequestParameters, options: { phase: "beforeFillTransaction" | "beforeFillParameters" | "afterFillParameters"; }) => Promise<import("viem").PrepareTransactionRequestParameters>) | undefined, options: { runAt: readonly ("beforeFillTransaction" | "beforeFillParameters" | "afterFillParameters")[]; }] | undefined; serializers?: import("viem").ChainSerializers<undefined, import("viem").TransactionSerializable<bigint, number>> | undefined; verifyHash?: ((client: import("viem").Client, parameters: import("viem").VerifyHashActionParameters) => Promise<import("viem").VerifyHashActionReturnType>) | undefined; readonly formatters?: undefined | undefined; }; avalanche: { blockExplorers: { readonly default: { readonly name: "SnowTrace"; readonly url: "https://snowtrace.io"; readonly apiUrl: "https://api.snowtrace.io"; }; }; blockTime: 1700; contracts: { readonly multicall3: { readonly address: "0xca11bde05977b3631167028862be2a173976ca11"; readonly blockCreated: 11907934; }; }; ensTlds?: readonly string[] | undefined; id: 43114; name: "Avalanche"; nativeCurrency: { readonly decimals: 18; readonly name: "Avalanche"; readonly symbol: "AVAX"; }; experimental_preconfirmationTime?: number | undefined | undefined; rpcUrls: { readonly default: { readonly http: readonly ["https://api.avax.network/ext/bc/C/rpc"]; }; }; sourceId?: number | undefined | undefined; testnet?: boolean | undefined | undefined; custom?: Record<string, unknown> | undefined; extendSchema?: Record<string, unknown> | undefined; fees?: import("viem").ChainFees<undefined> | undefined; formatters?: undefined; prepareTransactionRequest?: ((args: import("viem").PrepareTransactionRequestParameters, options: { phase: "beforeFillTransaction" | "beforeFillParameters" | "afterFillParameters"; }) => Promise<import("viem").PrepareTransactionRequestParameters>) | [fn: ((args: import("viem").PrepareTransactionRequestParameters, options: { phase: "beforeFillTransaction" | "beforeFillParameters" | "afterFillParameters"; }) => Promise<import("viem").PrepareTransactionRequestParameters>) | undefined, options: { runAt: readonly ("beforeFillTransaction" | "beforeFillParameters" | "afterFillParameters")[]; }] | undefined; serializers?: import("viem").ChainSerializers<undefined, import("viem").TransactionSerializable> | undefined; verifyHash?: ((client: import("viem").Client, parameters: import("viem").VerifyHashActionParameters) => Promise<import("viem").VerifyHashActionReturnType>) | undefined; }; arbitrum: { blockExplorers: { readonly default: { readonly name: "Arbiscan"; readonly url: "https://arbiscan.io"; readonly apiUrl: "https://api.arbiscan.io/api"; }; }; blockTime: 250; contracts: { readonly multicall3: { readonly address: "0xca11bde05977b3631167028862be2a173976ca11"; readonly blockCreated: 7654707; }; }; ensTlds?: readonly string[] | undefined; id: 42161; name: "Arbitrum One"; nativeCurrency: { readonly name: "Ether"; readonly symbol: "ETH"; readonly decimals: 18; }; experimental_preconfirmationTime?: number | undefined | undefined; rpcUrls: { readonly default: { readonly http: readonly ["https://arb1.arbitrum.io/rpc"]; }; }; sourceId?: number | undefined | undefined; testnet?: boolean | undefined | undefined; custom?: Record<string, unknown> | undefined; extendSchema?: Record<string, unknown> | undefined; fees?: import("viem").ChainFees<undefined> | undefined; formatters?: undefined; prepareTransactionRequest?: ((args: import("viem").PrepareTransactionRequestParameters, options: { phase: "beforeFillTransaction" | "beforeFillParameters" | "afterFillParameters"; }) => Promise<import("viem").PrepareTransactionRequestParameters>) | [fn: ((args: import("viem").PrepareTransactionRequestParameters, options: { phase: "beforeFillTransaction" | "beforeFillParameters" | "afterFillParameters"; }) => Promise<import("viem").PrepareTransactionRequestParameters>) | undefined, options: { runAt: readonly ("beforeFillTransaction" | "beforeFillParameters" | "afterFillParameters")[]; }] | undefined; serializers?: import("viem").ChainSerializers<undefined, import("viem").TransactionSerializable> | undefined; verifyHash?: ((client: import("viem").Client, parameters: import("viem").VerifyHashActionParameters) => Promise<import("viem").VerifyHashActionReturnType>) | undefined; }; polygon: { blockExplorers: { readonly default: { readonly name: "PolygonScan"; readonly url: "https://polygonscan.com"; readonly apiUrl: "https://api.etherscan.io/v2/api"; }; }; blockTime: 2000; contracts: { readonly multicall3: { readonly address: "0xca11bde05977b3631167028862be2a173976ca11"; readonly blockCreated: 25770160; }; }; ensTlds?: readonly string[] | undefined; id: 137; name: "Polygon"; nativeCurrency: { readonly name: "POL"; readonly symbol: "POL"; readonly decimals: 18; }; experimental_preconfirmationTime?: number | undefined | undefined; rpcUrls: { readonly default: { readonly http: readonly ["https://polygon.drpc.org"]; }; }; sourceId?: number | undefined | undefined; testnet?: boolean | undefined | undefined; custom?: Record<string, unknown> | undefined; extendSchema?: Record<string, unknown> | undefined; fees?: import("viem").ChainFees<undefined> | undefined; formatters?: undefined; prepareTransactionRequest?: ((args: import("viem").PrepareTransactionRequestParameters, options: { phase: "beforeFillTransaction" | "beforeFillParameters" | "afterFillParameters"; }) => Promise<import("viem").PrepareTransactionRequestParameters>) | [fn: ((args: import("viem").PrepareTransactionRequestParameters, options: { phase: "beforeFillTransaction" | "beforeFillParameters" | "afterFillParameters"; }) => Promise<import("viem").PrepareTransactionRequestParameters>) | undefined, options: { runAt: readonly ("beforeFillTransaction" | "beforeFillParameters" | "afterFillParameters")[]; }] | undefined; serializers?: import("viem").ChainSerializers<undefined, import("viem").TransactionSerializable> | undefined; verifyHash?: ((client: import("viem").Client, parameters: import("viem").VerifyHashActionParameters) => Promise<import("viem").VerifyHashActionReturnType>) | undefined; }; }; type SupportedChains = Prettify<keyof typeof supportedChains>; type SupportedChainsIds = Prettify<keyof typeof supportedChainsIds>; export type BaseEnvironment = ReturnType<typeof createBaseEnvironment>; export type MoonbeamEnvironment = ReturnType<typeof createMoonbeamEnvironment>; export type MoonriverEnvironment = ReturnType<typeof createMoonriverEnvironment>; export type OptimismEnvironment = ReturnType<typeof createOptimismEnvironment>; export type EthereumEnvironment = ReturnType<typeof createEthereumEnvironment>; export type AvalancheEnvironment = ReturnType<typeof createAvalancheEnvironment>; export type ArbitrumEnvironment = ReturnType<typeof createArbitrumEnvironment>; export type PolygonEnvironment = ReturnType<typeof createPolygonEnvironment>; export type GetEnvironment<chain> = chain extends typeof base ? BaseEnvironment : chain extends typeof moonbeam ? MoonbeamEnvironment : chain extends typeof moonriver ? MoonriverEnvironment : chain extends typeof optimism ? OptimismEnvironment : chain extends typeof ethereum ? EthereumEnvironment : chain extends typeof avalanche ? AvalancheEnvironment : chain extends typeof arbitrum ? ArbitrumEnvironment : chain extends typeof polygon ? PolygonEnvironment : undefined; export declare const createEnvironment: <const chain extends Chain>(config: { chain: chain; rpcUrls?: string[] | undefined; }) => GetEnvironment<chain>; export declare const publicEnvironments: { base: Environment<{ readonly ETH: { readonly address: "0x0000000000000000000000000000000000000000"; readonly decimals: 18; readonly name: "Ethereum"; readonly symbol: "ETH"; }; readonly WETH: { readonly address: "0x4200000000000000000000000000000000000006"; readonly decimals: 18; readonly name: "Wrapped Ethereum"; readonly symbol: "WETH"; }; readonly USDC: { readonly address: "0x833589fCD6eDb6E08f4c7C32D4f71b54bdA02913"; readonly decimals: 6; readonly name: "USD Coin"; readonly symbol: "USDC"; }; readonly MOONWELL_USDC: { readonly address: "0xEdc817A28E8B93B03976FBd4a3dDBc9f7D176c22"; readonly decimals: 8; readonly name: "Moonwell USDC"; readonly symbol: "mUSDC"; }; readonly MOONWELL_ETH: { readonly address: "0x628ff693426583D9a7FB391E54366292F509D457"; readonly decimals: 8; readonly name: "Moonwell ETH"; readonly symbol: "mWETH"; }; readonly cbETH: { readonly address: "0x2Ae3F1Ec7F1F5012CFEab0185bfc7aa3cf0DEc22"; readonly decimals: 18; readonly name: "Coinbase Staked Ethereum"; readonly symbol: "cbETH"; }; readonly MOONWELL_cbETH: { readonly address: "0x3bf93770f2d4a794c3d9EBEfBAeBAE2a8f09A5E5"; readonly decimals: 8; readonly name: "Moonwell cbETH"; readonly symbol: "mcbETH"; }; readonly wstETH: { readonly address: "0xc1cba3fcea344f92d9239c08c0568f6f2f0ee452"; readonly decimals: 18; readonly name: "Lido Staked Ethereum"; readonly symbol: "wstETH"; }; readonly MOONWELL_wstETH: { read