UNPKG

@nfid/identitykit

Version:

A React library for adding wallet connections to dApps.

18 lines (17 loc) 1.17 kB
import { AccountsSignerClient, AccountsSignerClientOptions, DelegationSignerClient, DelegationSignerClientOptions } from "./signer-client"; export declare const IdentityKitAuthType: { readonly DELEGATION: "DELEGATION"; readonly ACCOUNTS: "ACCOUNTS"; }; type ObjectValuesType<T> = T[keyof T]; export type IdentityKitAuthType = ObjectValuesType<typeof IdentityKitAuthType>; export declare class IdentityKit<T extends IdentityKitAuthType = typeof IdentityKitAuthType.ACCOUNTS, TSignerClient = T extends typeof IdentityKitAuthType.DELEGATION ? DelegationSignerClient : AccountsSignerClient> { signerClient: TSignerClient; constructor(signerClient: TSignerClient); getIcpBalance(): Promise<number>; static create<T extends IdentityKitAuthType = typeof IdentityKitAuthType.ACCOUNTS, TSignerClientOptions = T extends typeof IdentityKitAuthType.DELEGATION ? DelegationSignerClientOptions : AccountsSignerClientOptions>({ signerClientOptions, authType }: { signerClientOptions: TSignerClientOptions; authType: T; }): Promise<IdentityKit<"ACCOUNTS", DelegationSignerClient> | IdentityKit<"ACCOUNTS", AccountsSignerClient>>; } export {};