Functions
fetchJsonParsedAccount
fetchJsonParsedAccount<
TData
,TAddress
>(rpc
,address
,config?
):Promise
<{address
:Address
<TAddress
>;exists
:false
; } |BaseAccount
&object
&object
|BaseAccount
&object
&object
>
Fetches a MaybeAccount from the provided RPC client and address by using
getAccountInfo under the hood with the jsonParsed
encoding.
It may also return a MaybeEncodedAccount if the RPC client does not know how to parse the account at the requested address. In any case, the expected data type should be explicitly provided as the first type parameter.
Type Parameters
Type Parameter | Default type | Description |
---|---|---|
TData extends object | - | The expected type of this account's data. |
TAddress extends string | string | Supply a string literal to define an account having a particular address. |
Parameters
Parameter | Type |
---|---|
rpc | Rpc <GetAccountInfoApi > |
address | Address <TAddress > |
config? | FetchAccountConfig |
Returns
Promise
<{ address
: Address
<TAddress
>; exists
: false
; } | BaseAccount
& object
& object
| BaseAccount
& object
& object
>