useAccountsAddressesFromApi
Hook for fetching addresses of multiple Abstract accounts
Import
import { useAccountsAddressesFromApi } from '@abstract-money/react'
Usage
index.tsx
import { useAccountsAddressesFromApi } from '@abstract-money/react'
import { stringToAccountId } from '@abstract-money/core'
function App() {
const accountsBaseAddresses = useAccountsAddressesFromApi({
chainName: 'pion',
args: {
accountIds: [
stringToAccountId('pion-1'),
stringToAccountId('pion-2'),
stringToAccountId('pion-3'),
],
},
})
}
Parameters
chainName
string | undefined
Name of the chain to be used to fetch the query.
args
Arguments passed to the hook
accountIds
AccountId[]
Array of account IDs to fetch base addresses for.
extra
{
apiUrl?: string | undefined;
cosmWasmClient?: CosmWasmClient | undefined;
} | undefined
Extra options to override decorated parameters.
query
QueryOptions | undefined
QueryOptions
to use.