Tooling
Module SDK
Utilities
getClient

⚠️ Deprecation Notice

ModuleSDK was developed by Rhinestone and is no longer actively supported. For new projects, we recommend using the Rhinestone SDK instead.

Rhinestone SDK Documentation (opens in a new tab)

getClient

Gets an rpc client to use for a given chain. This is a wrapper around viem's PublicClient.

Usage

const client = getClient({ rpcUrl: 'https://rpc.eth.gateway.fm	' })

Parameters

rpcUrl

  • Type: string

The rpc url of the chain you want to connect to.

Returns

  • Type: PublicClient

The rpc client to use for the given chain.