createClientWithInterfacesFromRpc
Creates a client from a raw Rpc object, filling in whichever client interfaces the RPC supports.
The returned object implements a ClientWithGetMinimumBalance when the RPC supports the GetMinimumBalanceForRentExemptionApi, and a ClientWithFetchAccounts when it supports the GetAccountInfoApi and/or the GetMultipleAccountsApi. The return type reflects the interfaces available on the provided RPC, so you only get the interfaces your RPC can actually back.
Note that this does not create a fully-fledged Kit client — it only wraps the RPC in the account
interfaces above. To build a complete client, use createClient().use(solanaRpc(...)) instead,
which additionally exposes the underlying RPC and other capabilities.
Type Parameters
| Type Parameter |
|---|
TRpc extends | Rpc<GetMinimumBalanceForRentExemptionApi> | Rpc<GetAccountInfoApi> | Rpc<GetMultipleAccountsApi> |
Parameters
| Parameter | Type | Description |
|---|---|---|
rpc | TRpc | A raw Rpc object. The interfaces filled in on the returned client depend on which RPC methods it supports. |
Returns
ClientInterfacesFromRpc<TRpc>