UNPKG

@funded-labs/dab-js

Version:
35 lines (34 loc) 1.59 kB
import { HttpAgent, ActorSubclass, CreateCertificateOptions } from '@dfinity/agent'; import Registry from './standard_registry'; import { FormattedMetadata } from '../utils/registry'; import { Token } from '../interfaces/token'; export declare const TOKEN_STANDARDS: string[]; interface GetTokenActorParams { canisterId: string; standard: string; agent: HttpAgent; blsVerify?: CreateCertificateOptions['blsVerify']; } export declare const getTokenActor: <T = {}>({ canisterId, agent, standard, blsVerify, }: GetTokenActorParams) => Promise<ActorSubclass<import("../standard_wrappers/token_standards/methods").TokenServiceExtended<T>>>; export declare class TokenRegistry extends Registry { constructor(agent?: HttpAgent); getAll: () => Promise<FormattedMetadata[]>; } export declare const getTokens: ({ agent }?: { agent?: HttpAgent | undefined; }) => Promise<Token[]>; declare const _default: { getTokenActor: <T = {}>({ canisterId, agent, standard, blsVerify, }: GetTokenActorParams) => Promise<ActorSubclass<import("../standard_wrappers/token_standards/methods").TokenServiceExtended<T>>>; getTokens: ({ agent }?: { agent?: HttpAgent | undefined; }) => Promise<Token[]>; addToken: ({ agent, tokenInfo }: { agent: any; tokenInfo: any; }) => Promise<import("../interfaces/dab_registries/registry_standard").Response>; removeToken: ({ agent, canisterId }: { agent: any; canisterId: any; }) => Promise<import("../interfaces/dab_registries/registry_standard").Response>; }; export default _default;