import { Address } from '@solana/kit'; /** * Display options for asset queries */ export type DisplayOptions = { /** * Whether to show unverified collections */ showUnverifiedCollections?: boolean; /** * Whether to show collection metadata */ showCollectionMetadata?: boolean; /** * Whether to show fungible assets */ showFungible?: boolean; /** * Whether to show inscription data */ showInscription?: boolean; }; export type DasApiAssetInterface = 'V1_NFT' | 'V1_PRINT' | 'LEGACY_NFT' | 'V2_NFT' | 'FungibleAsset' | 'FungibleToken' | 'Custom' | 'Identity' | 'Executable' | 'ProgrammableNFT' | 'MplCoreAsset' | 'MplCoreCollection'; export type DasApiAssetContent = { json_uri: string; files?: Array<{ uri?: string; mime?: string; [key: string]: unknown; }>; metadata: DasApiMetadata; links?: Array<{ [key: string]: unknown; }>; }; export type DasApiMetadata = { name: string; symbol: string; description?: string; token_standard?: string; attributes?: Array<{ trait_type?: string; value?: string; [key: string]: unknown; }>; [key: string]: unknown; }; export type DasApiAuthorityScope = 'full' | 'royalty' | 'metadata' | 'extension'; export type DasApiAssetAuthority = { address: Address; scopes: DasApiAuthorityScope[]; }; export type DasApiAssetCompression = { eligible: boolean; compressed: boolean; data_hash: Address; creator_hash: Address; collection_hash?: Address; asset_data_hash?: Address; flags?: number; asset_hash: Address; tree: Address; seq: number; leaf_id: number; }; export type DasApiPropGroupKey = 'collection'; export type DasApiAssetGrouping = { group_key: DasApiPropGroupKey; group_value: string; verified?: boolean; collection_metadata?: { name: string; symbol: string; description: string; image: string; }; }; export type DasApiAssetRoyalty = { royalty_model: 'creators' | 'fanout' | 'single'; target: Address | null; percent: number; basis_points: number; primary_sale_happened: boolean; locked: boolean; }; export type DasApiAssetCreator = { address: Address; share: number; verified: boolean; }; export type DasApiAssetOwnership = { frozen: boolean; non_transferable?: boolean; delegated: boolean; delegate: Address | null; ownership_model: 'single' | 'token'; owner: Address; }; export type DasApiUses = { use_method: 'burn' | 'multiple' | 'single'; remaining: number; total: number; }; export type DasApiAssetSupply = { print_max_supply: number; print_current_supply: number; edition_nonce: number | null; }; /** * Representation of an asset. */ export type DasApiAsset = { /** * The asset interface. */ interface: DasApiAssetInterface; /** * The asset Id. */ id: Address; /** * The asset content. */ content: DasApiAssetContent; /** * List of authorities. */ authorities: Array; /** * Compression information. */ compression: DasApiAssetCompression; /** * Grouping information. */ grouping: Array; /** * Royalty information. */ royalty: DasApiAssetRoyalty; /** * List of creators. */ creators: Array; /** * Ownership information. */ ownership: DasApiAssetOwnership; /** * Uses information. */ uses?: DasApiUses; /** * Supply information. */ supply: DasApiAssetSupply; /** * Indicates whether the asset's metadata is mutable or not. */ mutable: boolean; /** * Indicates whether the asset is burnt or not. */ burnt: boolean; } & DasApiCoreAssetFields; /** * Optional fields on an asset if the interface is for Core (i.e. interface is 'MplCoreAsset' or 'MplCoreCollection') * It is recommended to use the mpl-core-das package along with this one to convert the types * to be consistent with mpl-core (e.g. AssetV1) */ export type DasApiCoreAssetFields = { /** * Plugins active on the asset or collection */ plugins?: Record; /** * External plugins active on the asset or collection */ external_plugins?: Record[]; /** * Plugins on the asset/collection that were unknown at the time of indexing. * Contact your DAS provider to update their core indexing version if this field is being populated. * If you have an up-to-date version of mpl-core-das installed, that library will also try to deserialize the plugin */ unknown_plugins?: Record[]; /** * External plugin adapters on the asset/collection that were unknown at the time of indexing. * Contact your DAS provider to update their core indexing version if this field is being populated. * If you have an up-to-date version of mpl-core-das installed, that library will also try to deserialize the plugin */ unknown_external_plugins?: Record[]; /** * Additional fields that are indexed for Core assets or collections */ mpl_core_info?: { /** * Number of assets minted to this collection * Only applicable for collections */ num_minted?: number; /** * Current number of assets in this collection * Only applicable for collections */ current_size?: number; plugins_json_version: number; }; }; /** * Input parameters for getAsset RPC call */ export type GetAssetRpcInput = { /** * The asset ID to fetch */ id: Address; /** * Display options for the query */ displayOptions?: DisplayOptions; }; export type GetAssetApi = { getAsset(params: GetAssetRpcInput): DasApiAsset; }; export type GetAssetProofRpcResponse = { root: Address; proof: Address[]; node_index: number; leaf: Address; tree_id: Address; }; export type GetAssetProofRpcInput = { /** * The ID of the asset to fetch the proof for */ id: Address; }; export type GetAssetProofApi = { getAssetProof(params: GetAssetProofRpcInput): GetAssetProofRpcResponse; }; //# sourceMappingURL=rpc.d.ts.map