UNPKG

@dfinity/ledger-icp

Version:

A library for interfacing with the ICP ledger on the Internet Computer.

25 lines (24 loc) 781 B
import type { Principal } from "@dfinity/principal"; export declare class AccountIdentifier { private readonly bytes; private constructor(); static fromHex(hex: string): AccountIdentifier; static fromPrincipal({ principal, subAccount, }: { principal: Principal; subAccount?: SubAccount; }): AccountIdentifier; toHex(): string; toUint8Array(): Uint8Array; toNumbers(): number[]; toAccountIdentifierHash(): { hash: Uint8Array; }; } export declare class SubAccount { private readonly bytes; private constructor(); static fromBytes(bytes: Uint8Array): SubAccount | Error; static fromPrincipal(principal: Principal): SubAccount; static fromID(id: number): SubAccount; toUint8Array(): Uint8Array; }