UNPKG

@funded-labs/dab-js

Version:
19 lines (18 loc) 1.11 kB
import { HttpAgent, ActorSubclass, CreateCertificateOptions } from '@dfinity/agent'; import { IDL } from '@dfinity/candid'; import { Principal } from '@dfinity/principal'; declare type ExtendedActorConstructor = new () => ActorSubclass; export declare type BaseMethodsExtendedActor<T> = { [K in keyof T as `_${Uncapitalize<string & K>}`]: T[K]; }; export declare const createExtendedActorClass: (agent: HttpAgent, methods: any, canisterId: string | Principal, IDLFactory: IDL.InterfaceFactory, blsVerify?: CreateCertificateOptions['blsVerify']) => ExtendedActorConstructor; export declare function generateActor<T>({ agent, canisterId, IDL, }: { agent: HttpAgent; canisterId: string; IDL: IDL.InterfaceFactory; }): ActorSubclass<T>; declare const _default: { createExtendedActorClass: (agent: HttpAgent, methods: any, canisterId: string | Principal, IDLFactory: IDL.InterfaceFactory, blsVerify?: ((pk: Uint8Array, sig: Uint8Array, msg: Uint8Array) => boolean | Promise<boolean>) | undefined) => ExtendedActorConstructor; generateActor: typeof generateActor; }; export default _default;