Functions
fetchEncodedAccounts
fetchEncodedAccounts<
TAddresses
,TWrappedAddresses
>(rpc
,addresses
,config?
):Promise
<{ [P in string | number | symbol]: MaybeEncodedAccount<TAddresses[P<P>]> }>
Fetches an array of MaybeEncodedAccounts from the provided RPC client and an array of addresses.
It uses the getMultipleAccounts RPC method under the hood with base64 encodings and an additional configuration object can be provided to customize the behavior of the RPC call.
Type Parameters
Type Parameter | Default type | Description |
---|---|---|
TAddresses extends string [] | string [] | Supply an array of string literals to define accounts having particular addresses. |
TWrappedAddresses extends { [P in string | number | symbol]: Address<TAddresses[P<P>]> } | { [P in string | number | symbol]: Address<TAddresses[P<P>]> } | - |
Parameters
Parameter | Type |
---|---|
rpc | Rpc <GetMultipleAccountsApi > |
addresses | TWrappedAddresses |
config? | FetchAccountsConfig |
Returns
Promise
<{ [P in string | number | symbol]: MaybeEncodedAccount<TAddresses[P<P>]> }>