To get started with Flexy, you need to provide an essential prop which handles all operations within the widget and can be configured as follows:
prop
walletClientOrSigner
type
WalletClient | JsonRpcSigner
This prop allows the widget interact with the blockchain and request for signatures from the connected user. Depending on your implementation, you may pass in either:
WalletClient: For projects using Viem
JsonRpcSigner: For projects using Ethers JS
Most often than not, you'll be using a javascript library/toolkit to setup an ethereum connection on the browser. Here's how to setup Flexy using the popular ones:
While this is most often not the case, you may have setup your ethereum connection using only viem or ethers and no third party libraries. Here's how to setup Flexy in this case: