useModulesFromApi
Hook for getting all existing modules on a chain.
Import
import { useModulesFromApi } from '@abstract-money/react'
Usage
index.tsx
import { useModulesFromApi } from '@abstract-money/react'
function App() {
const modulesFromApiQuery = useModulesFromApi({
args: {
chainName: 'pion'
}
})
}
Parameters
args
Arguments passed to the hook
chainName
string
Name of chain to query.
filter (optional)
ModuleFilter
An object to filter the modules. It can include the following properties:
name
:string
(optional) - Filter by the module's namenamespace
:string
(optional) - Filter by the module's namespacestatus
:ModuleStatus
(optional) - Filter by the module's statustype
:ModuleType
(optional) - Filter by the module's typeversion
:string
(optional) - Filter by the module's version
extra
{ apiUrl?: string | undefined; } | undefined
Extra options to override decorated parameters.
query
QueryOptions | undefined
QueryOptions
to use.