hive-keychain-commons
Version:
Platform-agnostic functions used in Hive Keychain mobile and extensions
44 lines (43 loc) • 1.66 kB
TypeScript
import { RequestVscStaking, RequestVscTransfer, RequestVscWithdrawal } from '../interfaces/keychain';
import { VscAccountBalance, VscHistoryItem, VscStatus } from '../interfaces/vsc';
export declare const VscUtils: {
checkStatus: (id: string) => Promise<VscStatus>;
waitForStatus: (id: string, timeoutSeconds?: number, endAtStatus?: VscStatus) => Promise<VscStatus>;
getOrganizedHistory: (username: string) => Promise<VscHistoryItem[]>;
getAddressFromDid: (did: string) => string | undefined;
getAccountBalance: (username: string) => Promise<VscAccountBalance>;
blockHeightToTimestamp: (height: number) => Date;
getFormattedAddress: (address: string) => string;
getWithdrawJson: (data: Omit<RequestVscWithdrawal, 'domain' | 'type'>, netId?: string) => {
id: string;
json: {
net_id: string | undefined;
from: string | undefined;
to: string;
amount: string;
asset: string;
memo: string;
};
};
getTransferJson: (data: Omit<RequestVscTransfer, 'domain' | 'type'>, netId?: string) => {
id: string;
json: {
net_id: string | undefined;
from: string | undefined;
to: string;
amount: string;
asset: string;
memo: string;
};
};
getStakingJson: (data: Omit<RequestVscStaking, 'domain' | 'type'>, netId?: string) => {
id: string;
json: {
net_id: string | undefined;
from: string | undefined;
to: string;
amount: string;
asset: string;
};
};
};