ModuleSDK
Utilites
Clients

Clients

The Module SDK requires a viem client to interact with the blockchain. The client is used to send transactions and read data from the blockchain. The client object is of type PublicClient from viem.

getClient

The getClient function is used to create a client object for the current network in a future-proof way. This function returns a client object of type PublicClient from viem.

import { getClient } from "@rhinestone/module-sdk";
 
const client = getClient({
  rpcUrl: "https://mainnet.infura.io/v3/1234...",
});