UNPKG

@darkpay/dark-api

Version:

JavaScript API for Darkdot blockchain.

11 lines (10 loc) 787 B
import { AnyAccountId, AnyProductId, AnyStorefrontId } from '@darkpay/dark-types/substrate/interfaces/utils'; import { ProductData, ProductWithSomeDetails, ProfileData, StorefrontData } from '@darkpay/dark-types'; import { ProductDetailsOpts } from './types'; export declare type FindStructsFns = { findProducts: (ids: AnyProductId[]) => Promise<ProductData[]>; findStorefronts: (ids: AnyStorefrontId[]) => Promise<StorefrontData[]>; findProfiles: (ids: AnyAccountId[]) => Promise<ProfileData[]>; }; /** Load product structs and related structs like owner profile, storefront, root product if required. */ export declare function loadAndSetProductRelatedStructs(products: ProductData[], finders: FindStructsFns, opts?: ProductDetailsOpts): Promise<ProductWithSomeDetails[]>;