web3Accounts
Subshell.extension.web3Accounts
is a proxy to @polkadot/extension-dapp's web3Accounts
function:
web3Accounts(): Promise<InjectedAccountWithMeta[]>
- returns a list of all the injected accounts, accross all extensions (source in meta)
If you have not installed the polkadot-js extension, or haven't imported any account and make them visible to the Subshell app, calling the function will return an empty array:
> await Subshell.extension.web3Accounts()
[]
Otherwise, you will see output like:
> await Subshell.extension.web3Accounts()
[
{
address: "5G9KKUwpghVHB3PUvcdFQrDqVip8eH5BG8sCzDdt19XTztgU",
meta: { genesisHash: "", name: "throwaway", source: "cennznet-extension" },
type: "sr25519"
},
{
address: "5G9KKUwpghVHB3PUvcdFQrDqVip8eH5BG8sCzDdt19XTztgU",
meta: { genesisHash: "", name: "throwaway", source: "polkadot-js" },
type: "sr25519"
}
]