Methods

Search Assets

Return the list of assets given a search criteria.

Parameters

NameRequiredDescription
negateIndicates whether the search criteria should be inverted or not.
conditionTypeIndicates whether to retrieve all ("all") or any ("any") asset that matches the search criteria.
interfaceThe interface value (one of ["V1_NFT", "V1_PRINT" "LEGACY_NFT", "V2_NFT", "FungibleAsset", "Custom", "Identity", "Executable"]).
ownerAddressThe address of the owner.
ownerTypeType of ownership ["single", "token"].
creatorAddressThe address of the creator.
creatorVerifiedIndicates whether the creator must be verified or not.
authorityAddressThe address of the authority.
groupingThe grouping ["key", "value"] pair.
delegateAddressThe address of the delegate.
frozenIndicates whether the asset is frozen or not.
supplyThe supply of the asset.
supplyMintThe address of the supply mint.
compressedIndicates whether the asset is compressed or not.
compressibleIndicates whether the asset is compressible or not.
royaltyTargetTypeType of royalty ["creators", "fanout", "single"].
royaltyTargetThe target address for royalties.
royaltyAmountThe royalties amount.
burntIndicates whether the asset is burnt or not.
sortBySorting criteria. This is specified as an object { sortBy: <value>, sortDirection: <value> }, where sortBy is one of ["created", "updated", "recentAction", "none"] and sortDirection is one of ["asc", "desc"].
limitThe maximum number of assets to retrieve.
pageThe index of the "page" to retrieve.
beforeRetrieve assets before the specified ID.
afterRetrieve assets after the specified ID.
jsonUriThe value for the JSON URI.

Example

getAssetByOwner Example

import { publicKey } from '@metaplex-foundation/umi';
import { createUmi } from '@metaplex-foundation/umi-bundle-defaults';
import { dasApi } from '@metaplex-foundation/digital-asset-standard-api';

const umi = createUmi('<ENDPOINT>').use(dasApi());

const assets = await umi.rpc.searchAssets({
    owner: publicKey('N4f6zftYsuu4yT7icsjLwh4i6pB1zvvKbseHj2NmSQw'),
    jsonUri: 'https://arweave.net/c9aGs5fOk7gD4wWnSvmzeqgtfxAGRgtI1jYzvl8-IVs/chiaki-violet-azure-common.json',
});
console.log(assets.items.length == 1);
Previous
Get Asset By Owner