UNPKG

@xlink-network/xlink-sdk

Version:
831 lines (828 loc) 28.8 kB
import * as viem_experimental from 'viem/experimental'; import * as viem_chains from 'viem/chains'; import * as viem from 'viem'; declare const coreDaoTestnet: { blockExplorers: { readonly default: { readonly name: "Core Dao Testnet Explorer"; readonly url: "https://scan.test.btcs.network"; }; }; contracts: { readonly multicall3: { readonly address: "0xcA11bde05977b3631167028862bE2a173976CA11"; readonly blockCreated: 15979981; }; }; id: 1115; name: "Core Dao Testnet"; nativeCurrency: { readonly name: "CORE"; readonly symbol: "CORE"; readonly decimals: 18; }; rpcUrls: { readonly default: { readonly http: readonly ["https://rpc.test.btcs.network"]; }; }; sourceId?: number | undefined; testnet: true; custom?: Record<string, unknown> | undefined; fees?: viem.ChainFees<undefined> | undefined; formatters?: undefined; serializers?: viem.ChainSerializers<undefined, viem.TransactionSerializable> | undefined; }; declare const bsquared: { blockExplorers: { readonly default: { readonly name: "B² Explorer"; readonly url: "https://explorer.bsquared.network"; }; }; contracts: { readonly multicall3: { readonly address: "0x648cB32CCc0253fd2D811c506F969c1611Eaa82f"; readonly blockCreated: 5662185; }; }; id: 223; name: "B²"; nativeCurrency: { readonly name: "BTC"; readonly symbol: "BTC"; readonly decimals: 18; }; rpcUrls: { readonly default: { readonly http: readonly ["https://rpc.bsquared.network"]; }; readonly alt: { readonly http: readonly ["https://b2-mainnet.alt.technology"]; }; readonly ankr: { readonly http: readonly ["https://rpc.ankr.com/b2"]; }; }; sourceId?: number | undefined; testnet: false; custom?: Record<string, unknown> | undefined; fees?: viem.ChainFees<undefined> | undefined; formatters?: undefined; serializers?: viem.ChainSerializers<undefined, viem.TransactionSerializable> | undefined; }; declare const bsquaredTestnet: { blockExplorers: { readonly default: { readonly name: "B² Testnet Explorer"; readonly url: "https://testnet-explorer.bsquared.network/"; }; }; contracts?: viem.Prettify<{ [key: string]: viem.ChainContract | { [sourceId: number]: viem.ChainContract | undefined; } | undefined; } & { ensRegistry?: viem.ChainContract | undefined; ensUniversalResolver?: viem.ChainContract | undefined; multicall3?: viem.ChainContract | undefined; universalSignatureVerifier?: viem.ChainContract | undefined; }> | undefined; id: 1123; name: "B² Testnet"; nativeCurrency: { readonly name: "BTC"; readonly symbol: "BTC"; readonly decimals: 18; }; rpcUrls: { readonly default: { readonly http: readonly ["https://testnet-rpc.bsquared.network"]; }; readonly alt: { readonly http: readonly ["https://b2-testnet.alt.technology"]; }; readonly ankr: { readonly http: readonly ["https://rpc.ankr.com/b2_testnet"]; }; }; sourceId?: number | undefined; testnet: true; custom?: Record<string, unknown> | undefined; fees?: viem.ChainFees<undefined> | undefined; formatters?: undefined; serializers?: viem.ChainSerializers<undefined, viem.TransactionSerializable> | undefined; }; declare const bob: { blockExplorers: { readonly default: { readonly name: "BOB Explorer"; readonly url: "https://explorer.gobob.xyz"; }; }; contracts: { readonly multicall3: { readonly address: "0xcA11bde05977b3631167028862bE2a173976CA11"; readonly blockCreated: 23131; }; readonly l2OutputOracle: { readonly 1: { readonly address: "0xdDa53E23f8a32640b04D7256e651C1db98dB11C1"; readonly blockCreated: 4462615; }; }; readonly portal: { readonly 1: { readonly address: "0x8AdeE124447435fE03e3CD24dF3f4cAE32E65a3E"; readonly blockCreated: 4462615; }; }; 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"; }; }; id: 60808; name: "BOB"; nativeCurrency: { readonly decimals: 18; readonly name: "ETH"; readonly symbol: "ETH"; }; rpcUrls: { readonly default: { readonly http: readonly ["https://rpc.gobob.xyz"]; readonly webSocket: readonly ["wss://rpc.gobob.xyz"]; }; }; sourceId: 1; testnet?: boolean | undefined; custom?: Record<string, unknown> | undefined; fees?: viem.ChainFees<undefined> | undefined; formatters: { readonly block: { exclude: [] | undefined; format: (args: viem_chains.OpStackRpcBlock) => { baseFeePerGas: bigint | null; blobGasUsed: bigint; difficulty: bigint; excessBlobGas: bigint; extraData: viem.Hex; gasLimit: bigint; gasUsed: bigint; hash: `0x${string}` | null; logsBloom: `0x${string}` | null; miner: viem.Address; mixHash: viem.Hash; nonce: `0x${string}` | null; number: bigint | null; parentBeaconBlockRoot?: viem.Hex | undefined; parentHash: viem.Hash; receiptsRoot: viem.Hex; sealFields: viem.Hex[]; sha3Uncles: viem.Hash; size: bigint; stateRoot: viem.Hash; timestamp: bigint; totalDifficulty: bigint | null; transactions: `0x${string}`[] | viem_chains.OpStackTransaction<boolean>[]; transactionsRoot: viem.Hash; uncles: viem.Hash[]; withdrawals?: viem.Withdrawal[] | undefined; withdrawalsRoot?: viem.Hex | undefined; } & {}; type: "block"; }; readonly transaction: { exclude: [] | undefined; format: (args: viem_chains.OpStackRpcTransaction) => ({ blockHash: `0x${string}` | null; blockNumber: bigint | null; from: viem.Address; gas: bigint; hash: viem.Hash; input: viem.Hex; nonce: number; r: viem.Hex; s: viem.Hex; to: viem.Address | null; transactionIndex: number | null; typeHex: viem.Hex | null; v: bigint; value: bigint; yParity: number; gasPrice?: undefined; maxFeePerBlobGas?: undefined; maxFeePerGas: bigint; maxPriorityFeePerGas: bigint; isSystemTx?: boolean; mint?: bigint | undefined; sourceHash: viem.Hex; type: "deposit"; } | { r: viem.Hex; s: viem.Hex; v: bigint; to: viem.Address | null; from: viem.Address; gas: bigint; nonce: number; value: bigint; blockHash: `0x${string}` | null; blockNumber: bigint | null; hash: viem.Hash; input: viem.Hex; transactionIndex: number | null; typeHex: viem.Hex | null; accessList?: undefined; authorizationList?: undefined; blobVersionedHashes?: undefined; chainId?: number | undefined; yParity?: undefined; type: "legacy"; gasPrice: bigint; maxFeePerBlobGas?: undefined; maxFeePerGas?: undefined; maxPriorityFeePerGas?: undefined; isSystemTx?: undefined; mint?: undefined; sourceHash?: undefined; } | { blockHash: `0x${string}` | null; blockNumber: bigint | null; from: viem.Address; gas: bigint; hash: viem.Hash; input: viem.Hex; nonce: number; r: viem.Hex; s: viem.Hex; to: viem.Address | null; transactionIndex: number | null; typeHex: viem.Hex | null; v: bigint; value: bigint; yParity: number; accessList: viem.AccessList; authorizationList?: undefined; blobVersionedHashes?: undefined; chainId: number; type: "eip2930"; gasPrice: bigint; maxFeePerBlobGas?: undefined; maxFeePerGas?: undefined; maxPriorityFeePerGas?: undefined; isSystemTx?: undefined; mint?: undefined; sourceHash?: undefined; } | { blockHash: `0x${string}` | null; blockNumber: bigint | null; from: viem.Address; gas: bigint; hash: viem.Hash; input: viem.Hex; nonce: number; r: viem.Hex; s: viem.Hex; to: viem.Address | null; transactionIndex: number | null; typeHex: viem.Hex | null; v: bigint; value: bigint; yParity: number; accessList: viem.AccessList; authorizationList?: undefined; blobVersionedHashes?: undefined; chainId: number; type: "eip1559"; gasPrice?: undefined; maxFeePerBlobGas?: undefined; maxFeePerGas: bigint; maxPriorityFeePerGas: bigint; isSystemTx?: undefined; mint?: undefined; sourceHash?: undefined; } | { blockHash: `0x${string}` | null; blockNumber: bigint | null; from: viem.Address; gas: bigint; hash: viem.Hash; input: viem.Hex; nonce: number; r: viem.Hex; s: viem.Hex; to: viem.Address | null; transactionIndex: number | null; typeHex: viem.Hex | null; v: bigint; value: bigint; yParity: number; accessList: viem.AccessList; authorizationList?: undefined; blobVersionedHashes: readonly viem.Hex[]; chainId: number; type: "eip4844"; gasPrice?: undefined; maxFeePerBlobGas: bigint; maxFeePerGas: bigint; maxPriorityFeePerGas: bigint; isSystemTx?: undefined; mint?: undefined; sourceHash?: undefined; } | { blockHash: `0x${string}` | null; blockNumber: bigint | null; from: viem.Address; gas: bigint; hash: viem.Hash; input: viem.Hex; nonce: number; r: viem.Hex; s: viem.Hex; to: viem.Address | null; transactionIndex: number | null; typeHex: viem.Hex | null; v: bigint; value: bigint; yParity: number; accessList: viem.AccessList; authorizationList: viem_experimental.SignedAuthorizationList; blobVersionedHashes?: undefined; chainId: number; type: "eip7702"; gasPrice?: undefined; maxFeePerBlobGas?: undefined; maxFeePerGas: bigint; maxPriorityFeePerGas: bigint; isSystemTx?: undefined; mint?: undefined; sourceHash?: undefined; }) & {}; type: "transaction"; }; readonly transactionReceipt: { exclude: [] | undefined; format: (args: viem_chains.OpStackRpcTransactionReceipt) => { blobGasPrice?: bigint | undefined; blobGasUsed?: bigint | undefined; blockHash: viem.Hash; blockNumber: bigint; contractAddress: viem.Address | null | undefined; cumulativeGasUsed: bigint; effectiveGasPrice: bigint; from: viem.Address; gasUsed: bigint; logs: viem.Log<bigint, number, false>[]; logsBloom: viem.Hex; root?: viem.Hash | undefined; status: "success" | "reverted"; to: viem.Address | null; transactionHash: viem.Hash; transactionIndex: number; type: viem.TransactionType; l1GasPrice: bigint | null; l1GasUsed: bigint | null; l1Fee: bigint | null; l1FeeScalar: number | null; } & {}; type: "transactionReceipt"; }; }; serializers: { readonly transaction: typeof viem_chains.serializeTransactionOpStack; }; }; declare const bobTestnet: { blockExplorers: { readonly default: { readonly name: "BOB Testnet Explorer"; readonly url: "https://testnet-explorer.gobob.xyz"; }; }; contracts?: viem.Prettify<{ [key: string]: viem.ChainContract | { [sourceId: number]: viem.ChainContract | undefined; } | undefined; } & { ensRegistry?: viem.ChainContract | undefined; ensUniversalResolver?: viem.ChainContract | undefined; multicall3?: viem.ChainContract | undefined; universalSignatureVerifier?: viem.ChainContract | undefined; }> | undefined; id: 111; name: "BOB Testnet"; nativeCurrency: { readonly name: "ETH"; readonly symbol: "ETH"; readonly decimals: 18; }; rpcUrls: { readonly default: { readonly http: readonly ["https://testnet.rpc.gobob.xyz/"]; }; }; sourceId?: number | undefined; testnet: true; custom?: Record<string, unknown> | undefined; fees?: viem.ChainFees<undefined> | undefined; formatters?: undefined; serializers?: viem.ChainSerializers<undefined, viem.TransactionSerializable> | undefined; }; declare const bitlayer: { blockExplorers: { readonly default: { readonly name: "Bitlayer Explorer"; readonly url: "https://www.btrscan.com"; }; }; contracts: { readonly multicall3: { readonly address: "0xca11bde05977b3631167028862be2a173976ca11"; readonly blockCreated: 3225645; }; }; id: 200901; name: "Bitlayer"; nativeCurrency: { readonly name: "BTC"; readonly symbol: "BTC"; readonly decimals: 18; }; rpcUrls: { readonly default: { readonly http: readonly ["https://rpc.bitlayer.org"]; }; }; sourceId?: number | undefined; testnet: false; custom?: Record<string, unknown> | undefined; fees?: viem.ChainFees<undefined> | undefined; formatters?: undefined; serializers?: viem.ChainSerializers<undefined, viem.TransactionSerializable> | undefined; }; declare const bitlayerTestnet: { blockExplorers: { readonly default: { readonly name: "Bitlayer Testnet Explorer"; readonly url: "https://testnet.btrscan.com"; }; }; contracts?: viem.Prettify<{ [key: string]: viem.ChainContract | { [sourceId: number]: viem.ChainContract | undefined; } | undefined; } & { ensRegistry?: viem.ChainContract | undefined; ensUniversalResolver?: viem.ChainContract | undefined; multicall3?: viem.ChainContract | undefined; universalSignatureVerifier?: viem.ChainContract | undefined; }> | undefined; id: 200810; name: "Bitlayer Testnet"; nativeCurrency: { readonly name: "BTC"; readonly symbol: "BTC"; readonly decimals: 18; }; rpcUrls: { readonly default: { readonly http: readonly ["https://testnet-rpc.bitlayer.org"]; }; }; sourceId?: number | undefined; testnet: true; custom?: Record<string, unknown> | undefined; fees?: viem.ChainFees<undefined> | undefined; formatters?: undefined; serializers?: viem.ChainSerializers<undefined, viem.TransactionSerializable> | undefined; }; declare const lorenzo: { blockExplorers: { readonly default: { readonly name: "Lorenzo Explorer"; readonly url: "https://scan.lorenzo-protocol.xyz"; }; }; contracts: { readonly multicall3: { readonly address: "0x756e73C560Aeeb310b127F214e11e03139FC8f0a"; readonly blockCreated: 2490478; }; }; id: 8329; name: "Lorenzo"; nativeCurrency: { readonly name: "stBTC"; readonly symbol: "stBTC"; readonly decimals: 18; }; rpcUrls: { readonly default: { readonly http: readonly ["https://rpc.lorenzo-protocol.xyz"]; }; }; sourceId?: number | undefined; testnet: false; custom?: Record<string, unknown> | undefined; fees?: viem.ChainFees<undefined> | undefined; formatters?: undefined; serializers?: viem.ChainSerializers<undefined, viem.TransactionSerializable> | undefined; }; declare const lorenzoTestnet: { blockExplorers: { readonly default: { readonly name: "Lorenzo Testnet Explorer"; readonly url: "https://scan-testnet.lorenzo-protocol.xyz"; }; }; contracts?: viem.Prettify<{ [key: string]: viem.ChainContract | { [sourceId: number]: viem.ChainContract | undefined; } | undefined; } & { ensRegistry?: viem.ChainContract | undefined; ensUniversalResolver?: viem.ChainContract | undefined; multicall3?: viem.ChainContract | undefined; universalSignatureVerifier?: viem.ChainContract | undefined; }> | undefined; id: 83291; name: "Lorenzo Testnet"; nativeCurrency: { readonly name: "stBTC"; readonly symbol: "stBTC"; readonly decimals: 18; }; rpcUrls: { readonly default: { readonly http: readonly ["https://rpc-testnet.lorenzo-protocol.xyz"]; }; }; sourceId?: number | undefined; testnet: true; custom?: Record<string, unknown> | undefined; fees?: viem.ChainFees<undefined> | undefined; formatters?: undefined; serializers?: viem.ChainSerializers<undefined, viem.TransactionSerializable> | undefined; }; declare const merlin: { blockExplorers: { readonly default: { readonly name: "blockscout"; readonly url: "https://scan.merlinchain.io"; readonly apiUrl: "https://scan.merlinchain.io/api"; }; }; contracts: { readonly multicall3: { readonly address: "0x13caE7bc3C7F02FF64cB17076F289467fB133e04"; readonly blockCreated: 12377144; }; readonly ensRegistry?: viem.ChainContract | undefined; readonly ensUniversalResolver?: viem.ChainContract | undefined; readonly universalSignatureVerifier?: viem.ChainContract | undefined; }; id: 4200; name: "Merlin"; nativeCurrency: { readonly name: "BTC"; readonly symbol: "BTC"; readonly decimals: 18; }; rpcUrls: { readonly default: { readonly http: readonly ["https://rpc.merlinchain.io"]; }; }; sourceId?: number | undefined; testnet?: boolean | undefined; custom?: Record<string, unknown> | undefined; fees?: viem.ChainFees<undefined> | undefined; serializers?: viem.ChainSerializers<undefined, viem.TransactionSerializable<bigint, number>> | undefined; readonly formatters?: undefined; }; declare const merlinTestnet: { blockExplorers: { readonly default: { readonly name: "Merlin Testnet Explorer"; readonly url: "https://testnet-scan.merlinchain.io"; }; }; contracts: { readonly multicall3: { readonly address: "0xcA11bde05977b3631167028862bE2a173976CA11"; readonly blockCreated: 4632260; }; }; id: 686868; name: "Merlin Testnet"; nativeCurrency: { readonly name: "BTC"; readonly symbol: "BTC"; readonly decimals: 18; }; rpcUrls: { readonly default: { readonly http: readonly ["https://testnet-rpc.merlinchain.io"]; }; }; sourceId?: number | undefined; testnet: true; custom?: Record<string, unknown> | undefined; fees?: viem.ChainFees<undefined> | undefined; formatters?: undefined; serializers?: viem.ChainSerializers<undefined, viem.TransactionSerializable> | undefined; }; declare const ailayer: { blockExplorers: { readonly default: { readonly name: "AILayer Explorer"; readonly url: "https://mainnet-explorer.ailayer.xyz"; }; }; contracts: { readonly multicall3: { readonly address: "0x8BDc1E8149E7259833f8776CAfDa5c55Cfb8Bbd9"; readonly blockCreated: 4351314; }; }; id: 2649; name: "AILayer"; nativeCurrency: { readonly name: "BTC"; readonly symbol: "BTC"; readonly decimals: 18; }; rpcUrls: { readonly default: { readonly http: readonly ["https://mainnet-rpc.ailayer.xyz/"]; readonly webSocket: readonly ["wss://mainnet-rpc.ailayer.xyz"]; }; }; sourceId?: number | undefined; testnet: false; custom?: Record<string, unknown> | undefined; fees?: viem.ChainFees<undefined> | undefined; formatters?: undefined; serializers?: viem.ChainSerializers<undefined, viem.TransactionSerializable> | undefined; }; declare const ailayerTestnet: { blockExplorers: { readonly default: { readonly name: "AILayer Testnet Explorer"; readonly url: "https://testnet-explorer.ailayer.xyz"; }; }; contracts?: viem.Prettify<{ [key: string]: viem.ChainContract | { [sourceId: number]: viem.ChainContract | undefined; } | undefined; } & { ensRegistry?: viem.ChainContract | undefined; ensUniversalResolver?: viem.ChainContract | undefined; multicall3?: viem.ChainContract | undefined; universalSignatureVerifier?: viem.ChainContract | undefined; }> | undefined; id: 2648; name: "AILayer Testnet"; nativeCurrency: { readonly name: "BTC"; readonly symbol: "BTC"; readonly decimals: 18; }; rpcUrls: { readonly default: { readonly http: readonly ["https://testnet-rpc.ailayer.xyz"]; readonly webSocket: readonly ["wss://testnet-rpc.ailayer.xyz"]; }; }; sourceId?: number | undefined; testnet: true; custom?: Record<string, unknown> | undefined; fees?: viem.ChainFees<undefined> | undefined; formatters?: undefined; serializers?: viem.ChainSerializers<undefined, viem.TransactionSerializable> | undefined; }; declare const xLayer: { blockExplorers: { readonly default: { readonly name: "OKLink"; readonly url: "https://www.oklink.com/xlayer"; readonly apiUrl: "https://www.oklink.com/api/v5/explorer/xlayer/api"; }; }; contracts: { readonly multicall3: { readonly address: "0xcA11bde05977b3631167028862bE2a173976CA11"; readonly blockCreated: 47416; }; }; id: 196; name: "X Layer Mainnet"; nativeCurrency: { readonly decimals: 18; readonly name: "OKB"; readonly symbol: "OKB"; }; rpcUrls: { readonly default: { readonly http: readonly ["https://rpc.xlayer.tech"]; }; }; sourceId?: number | undefined; testnet?: boolean | undefined; custom?: Record<string, unknown> | undefined; fees?: viem.ChainFees<undefined> | undefined; serializers?: viem.ChainSerializers<undefined, viem.TransactionSerializable<bigint, number>> | undefined; readonly formatters?: undefined; }; declare const blifeTestnet: { blockExplorers: { readonly default: { readonly name: "Blife Testnet Explorer"; readonly url: "https://private-testnet.blifeprotocol.com/"; readonly apiUrl: ""; }; }; contracts?: viem.Prettify<{ [key: string]: viem.ChainContract | { [sourceId: number]: viem.ChainContract | undefined; } | undefined; } & { ensRegistry?: viem.ChainContract | undefined; ensUniversalResolver?: viem.ChainContract | undefined; multicall3?: viem.ChainContract | undefined; universalSignatureVerifier?: viem.ChainContract | undefined; }> | undefined; id: 34798; name: "Blife Testnet"; nativeCurrency: { readonly name: "WBTC"; readonly symbol: "WBTC"; readonly decimals: 18; }; rpcUrls: { readonly default: { readonly http: readonly ["https://private-testnet.blifeprotocol.com:25600"]; }; }; sourceId?: number | undefined; testnet: true; custom?: Record<string, unknown> | undefined; fees?: viem.ChainFees<undefined> | undefined; formatters?: undefined; serializers?: viem.ChainSerializers<undefined, viem.TransactionSerializable> | undefined; }; declare const berachainTestnet: { blockExplorers: { readonly default: { readonly name: "Berachain Bartio Testnet Explorer"; readonly url: "https://bartio.beratrail.io/"; readonly apiUrl: ""; }; }; contracts?: viem.Prettify<{ [key: string]: viem.ChainContract | { [sourceId: number]: viem.ChainContract | undefined; } | undefined; } & { ensRegistry?: viem.ChainContract | undefined; ensUniversalResolver?: viem.ChainContract | undefined; multicall3?: viem.ChainContract | undefined; universalSignatureVerifier?: viem.ChainContract | undefined; }> | undefined; id: 80084; name: "Berachain Bartio"; nativeCurrency: { readonly decimals: 18; readonly name: "BERA Token"; readonly symbol: "BERA"; }; rpcUrls: { readonly default: { readonly http: readonly ["https://api.routescan.io/v2/network/testnet/evm/80084/etherscan"]; }; }; sourceId?: number | undefined; testnet: true; custom?: Record<string, unknown> | undefined; fees?: viem.ChainFees<undefined> | undefined; formatters?: undefined; serializers?: viem.ChainSerializers<undefined, viem.TransactionSerializable> | undefined; }; export { ailayer, ailayerTestnet, berachainTestnet, bitlayer, bitlayerTestnet, blifeTestnet, bob, bobTestnet, bsquared, bsquaredTestnet, coreDaoTestnet, lorenzo, lorenzoTestnet, merlin, merlinTestnet, xLayer };