@stratosphere-network/shared
Version:
Shared utilities and types for StratoSphere SDK
29 lines • 1.23 kB
TypeScript
import { JsonRpcProvider, Wallet } from 'ethers';
import { SupportedChain } from '../types/chains';
import { PublicClient } from 'viem';
/**
* Creates a JSON RPC provider for the specified chain
* @param chain The supported chain to create a provider for
* @returns JsonRpcProvider instance
*/
export declare function createProvider(chain: SupportedChain): JsonRpcProvider;
/**
* Creates a wallet from a private key and connects it to the specified chain
* @param privateKey The private key to create the wallet from
* @param chain The supported chain to connect to
* @returns Wallet instance connected to the provider
*/
export declare function createWallet(privateKey: string, chain: SupportedChain): Wallet;
/**
* Creates a viem public client for the specified chain
* @param chain The supported chain to create a client for
* @returns Viem public client instance
*/
export declare function createViemClient(chain: SupportedChain): PublicClient;
/**
* Gets the chain configuration for a supported chain
* @param chain The supported chain
* @returns ChainConfig object
*/
export declare function getChainConfig(chain: SupportedChain): import("../types/chains").ChainConfig;
//# sourceMappingURL=provider.d.ts.map