dab-js-without-registry
Version:
JS adapter for DAB
34 lines (33 loc) • 1.52 kB
TypeScript
import { HttpAgent, ActorSubclass } 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;
}
export declare const getTokenActor: <T = {}>({ canisterId, agent, standard, }: 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, }: 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;