UNPKG

@nfid/identitykit

Version:

A React library for adding wallet connections to dApps.

30 lines (29 loc) 1.02 kB
import { Signer } from "@slide-computer/signer"; import { SubAccount } from "@dfinity/ledger-icp"; import { Principal } from "@dfinity/principal"; import { type Identity } from "@dfinity/agent"; import { PartialIdentity } from "@dfinity/identity"; import { IdentityKitAuthType, IdentityKitDelegationType } from "../../../lib"; /** * @deprecated This function is deprecated. Please use separate hooks instead (useUser, useBalance etc). */ export declare function useIdentityKit(): { signer?: Signer; user?: { principal: Principal; subaccount?: SubAccount; }; icpBalance?: number; authType: IdentityKitAuthType; delegationType?: IdentityKitDelegationType; accounts?: { principal: Principal; subAccount?: SubAccount; }[]; identity?: Identity | PartialIdentity; isInitializing: boolean; isUserConnecting: boolean; connect: (signerIdOrUrl?: string) => void; disconnect: () => Promise<void>; fetchIcpBalance?: () => Promise<void>; };