The ProtocolInitializer provides a constructor or a static fromRpc method to create an instance of the ProtocolInterface for a given network and chain

Type Parameters

  • P extends Platform

  • PN extends ProtocolName

  • N extends Network

  • C extends PlatformToChains<P> = PlatformToChains<P>

Hierarchy

  • ProtocolInitializer

Methods

Methods

  • fromRpc will create a new instance of the Protocol client given the RPC and the config

    Parameters

    • rpc: any

      the RPC connection to the chain, used to query the chain for its native chain id

    • config: ChainsConfig<"Mainnet" | "Testnet" | "Devnet", P>

      the ChainsConfig to use to initialize the protocol client

    Returns Promise<ProtocolInterface<PN, N, C>>

Generated using TypeDoc