diff --git a/src/nft.ts b/src/nft.ts index ef1a0fac..3d0429f3 100644 --- a/src/nft.ts +++ b/src/nft.ts @@ -27,6 +27,8 @@ import { UploadAssetFromDataUrlParams, SearchOption, SearchReponse, + AinftTokenSearch, + AinftCollectionSearch, } from './types'; import Ainft721 from './ainft721'; import stringify from 'fast-json-stable-stringify'; @@ -269,7 +271,7 @@ export default class Nft extends FactoryBase { * @returns * @param {NftSearchParams & SearchOption} searchParams */ - searchCollections(searchParams: NftSearchParams & SearchOption): Promise { + searchCollections(searchParams: NftSearchParams & SearchOption): Promise> { let query: Record = {}; if (searchParams) { const { userAddress, nftId, name, symbol, limit, offset } = searchParams; @@ -283,7 +285,7 @@ export default class Nft extends FactoryBase { * Search nft assets on the ain blockchain. * @param {NftSearchParams & SearchOption} searchParams */ - searchAssets(searchParams: NftSearchParams & SearchOption): Promise { + searchAssets(searchParams: NftSearchParams & SearchOption): Promise> { let query: Record = {}; if (searchParams) { const { userAddress, nftId, name, symbol, limit, offset, tokenId } = searchParams; diff --git a/src/types.ts b/src/types.ts index 14292ec0..85448689 100644 --- a/src/types.ts +++ b/src/types.ts @@ -880,8 +880,8 @@ export interface AinftTokenSearch { collectionInfo: AinftCollectionSearch; } -export interface SearchReponse { - list: Array, +export interface SearchReponse { + list: Array, isFinal: boolean; nextOffset: string; } \ No newline at end of file