Skip to content

useSubAccountIdsByModuleIdFromApi

Hook for getting sub account ids by module.

Import

import { useSubAccountIdsByModuleIdFromApi } from '@abstract-money/react'

Usage

index.tsx
import { useSubAccountIdsByModuleIdFromApi } from '@abstract-money/react'
import { stringToAccountId } from '@abstract-money/core'
 
function App() {
  const subAccountIdsByModuleIdFromApiQuery = useSubAccountIdsByModuleIdFromApi({
    args: {
      moduleId: '...',
      accountId: stringToAccountId('pion-1')
    }
  })
}

Parameters

args

Arguments passed to the hook

accountId

AccountId that has sub accounts to query against.

moduleId

string

ID of the ModuleId that sub accounts must have installed.

extra

{ apiUrl?: string | undefined; } | undefined

Extra options to override decorated parameters.

query

QueryOptions | undefined

QueryOptions to use.