getAccountInfo
Gets the info of an account
Parameters:
address (optional, default: connected wallet address): string - the account address with which to get the info
Returns:
object ({...}
) - the account info
raw_data: object (
{...}
) - the raw data of the accountexecutable: boolean (
false
) - whether the account is executablelamports: number (
10000
) - the number of lamports in the accountowner: string (
"..."
) - the owner of the accountrentEpoch: number (
250
) - the rent epochinfo (if
executable
isfalse
): object ({...}
) - the parsed data of the accountprogram (if
executable
isfalse
): string (spl-token
) - the program of the accountspace (if
executable
isfalse
): number (150
) - the space of the accounttype (if
executable
isfalse
): string ("account"
) - the type of the account
Throws:
SOL Pay SDK Fatal Error: Invalid address ${address}, and no wallet was connected. Use SOLPay.connectWallet() to connect to a Solana wallet.
- an invalid address was used, and no wallet was connectedSOL Pay SDK Fatal Error: No connection found. Use SOLPay.connectNetwork() to connect to the Solana network.
- could not find a connection to the Solana networkSOL Pay SDK Fatal Error: Connection did not respond. Use SOLPay.connectNetwork() to connect to the Solana network.
- did not receive response from Solana network
Last updated