useUpdateAsset
React Hook for updating an asset.
Hook for updating an existing Asset.
Usage
The following example shows how an asset can be updated.
Return Value
The return value is partially based on Tanstack Query, with some return types aggregated for simplicity.
Configuration
assetId
The asset ID to update - required.
name
The updated name for the asset.
storage
The storage configs to use for the asset. This is preferably EIP-721 or EIP-1155 compatible metadata configs.
The metadata can be overridden when the Asset and its metadata are exported to IPFS - we provide some helper types for metadata best practices based on ERC-721 and ERC-1155:
mutationConfig
The mutationConfig
parameter allows for any
Tanstack Query
useMutation
options, such as cacheTime
or retry
. These override any
configs passed by default by the internal hook.
Was this page helpful?