Hooks
useMetadataClient
Hook for accessing the Sequence Metadata client for token and contract metadata
Import
Usage
Return Type: SequenceMetadata
The hook returns a configured instance of the SequenceMetadata
client. Here’s the detailed structure:
Available Methods
Service Methods
ping
: Check service availabilityversion
: Get metadata service version informationruntimeStatus
: Get current runtime status of the service
Task Management Methods
getTask
: Get details of a specific taskgetTaskStatus
: Get status of a task
Token Metadata Methods
getTokenMetadata
: Fetch metadata for specific tokensgetTokenMetadataBatch
: Batch fetch token metadatasearchTokenMetadata
: Search through token metadatasearchTokenIDs
: Search for specific token IDstokenCollectionFilters
: Get available filters for token collections
Token Refresh Methods
refreshTokenMetadata
: Refresh metadata for specific tokensenqueueTokensForRefresh
: Queue tokens for metadata refreshgetTokenRefreshStatus
: Check status of token refreshgetTokenRefreshResult
: Get results of token refreshcancelRefreshJob
: Cancel an ongoing refresh job
Contract Methods
getContractInfo
: Fetch metadata for a single contractgetContractInfoBatch
: Batch fetch contract metadatasearchContractInfo
: Search through contract metadatasearchContractInfoBatch
: Batch search contract metadatarefreshContractInfo
: Refresh contract metadatarefreshContractTokens
: Refresh tokens for a contractrefreshAllContractTokens
: Refresh all tokens for a contract
Search Methods
searchMetadata
: Search through all metadatasearchTokens
: Search for specific tokenssearchContracts
: Search for specific contracts
Niftyswap Methods
getNiftyswapTokenQuantity
: Get token quantity information from NiftyswapgetNiftyswapUnitPrices
: Get unit prices from NiftyswapgetNiftyswapUnitPricesWithQuantities
: Get unit prices with quantities from Niftyswap
Mint Monitor Methods
addContractToMintMonitor
: Add contract to mint monitoringremoveContractFromMintMonitor
: Remove contract from mint monitoringmintMonitorJobStatus
: Check status of mint monitoring jobmintMonitorTriggerJob
: Trigger a mint monitoring job
Contract Sync Methods
syncContractTokens
: Sync tokens for a contractabortContractSync
: Abort an ongoing contract synccontractSyncJobStatus
: Check status of contract sync
Directory Methods
directoryGetNetworks
: Get available networksdirectoryGetCollections
: Get collections directorydirectorySearchCollections
: Search through collections directory
Parameters
The hook doesn’t accept any parameters but uses configuration from the useConfig
hook:
The configuration determines:
- The metadata service URL
- Your project’s access key for authentication
- Optional JWT for authenticated requests
The client is memoized based on the projectAccessKey
and jwt
to prevent unnecessary re-instantiation.
Was this page helpful?