@ic-wallet-kit/hpl
Version:
Ic middleware wallet HPL protocol
36 lines (35 loc) • 2.21 kB
TypeScript
import { HttpAgent } from "@dfinity/agent";
import { Principal } from "@dfinity/principal";
import { FtAssetInfo, HplAccountCacheModel, HplStateVirtualAccountsCacheModel, HplVirtualAccountCacheModel, RemoteAccountSelectorCat, RemoteAccountSelectorId, RemoteAccountSelectorIdRange } from "../../types";
import { AccountType } from "../../types/accounts/accountType";
import { HplStateCacheModel } from "../../types/cache/hplStateCacheModel";
import { ILogger } from "@ic-wallet-kit/common";
export declare class IngressActorWrapper {
private actor;
private logger;
private constructor();
static create(agent: HttpAgent, canisterId: string, logger: ILogger): IngressActorWrapper;
getAccounts(): Promise<bigint>;
getVirtualAccounts(): Promise<bigint>;
getFtAssets(): Promise<bigint>;
getAllAccountsInfo(accounts: bigint): Promise<HplAccountCacheModel[]>;
getAccountInfo(account: bigint): Promise<Array<[bigint, AccountType]> | []>;
getFtAssetInfo(ftAssets: bigint): Promise<Array<FtAssetInfo>>;
getAllVirtualAccountInfo(virtualAccounts: bigint): Promise<HplVirtualAccountCacheModel[]>;
getState(virtualAccounts: bigint, ftAssets: bigint, accounts: bigint, remotesToLook: [] | [RemoteAccountSelectorId | RemoteAccountSelectorCat | RemoteAccountSelectorIdRange]): Promise<HplStateCacheModel>;
getVirtualAccountState(virtualAccountId: bigint): Promise<HplStateVirtualAccountsCacheModel>;
getAdminState(): Promise<HplStateCacheModel>;
openAccount(ftAssetId: bigint): Promise<bigint>;
openVirtualAccount(assetId: bigint, accountId: bigint, accessByPrincipal: Principal, amount: bigint, expiration?: bigint): Promise<bigint>;
updateVirtualAccount(virtualAccountId: bigint, accountId: bigint, amount: bigint, expiration?: bigint): Promise<[bigint, bigint]>;
deleteVirtualAccounts(virtualAccountId: bigint): Promise<Array<{
ft: bigint;
}>>;
remoteAccountInfo(selector: RemoteAccountSelectorId | RemoteAccountSelectorCat | RemoteAccountSelectorIdRange): Promise<[[Principal, bigint], {
ft: bigint;
}][]>;
feeRatio(): Promise<bigint>;
private parseState;
private parseFtInfo;
private static getIngressActor;
}