useAccountsForAddress

Get all accounts associated with the provided address

Example

const {
data: accountsForAddress,
isLoading,
error,
} = useAccountsForAddress(contract, "{{account_address}}");
function useAccountsForAddress(
contract: RequiredParam<SmartContract<BaseContract>>,
address: RequiredParam<string>,
): UseQueryResult<Array<string>>;

Parameters

Instance of a account factory contract

Type

let contract: RequiredParam<SmartContract<BaseContract>>;

The address to get associated accounts for

Type

let address: RequiredParam<string>;

Returns

let returnType: UseQueryResult<Array<string>>;

Query result object that includes an array of all accounts associated with the address