chaingate
Version:
A complete TypeScript library for connecting to and making transactions on different blockchains
22 lines (21 loc) • 1.1 kB
TypeScript
import { Api } from 'chaingate-client';
import { Address } from '../Address';
import { CurrencyInfo } from './CurrencyInfo';
import { CurrencyProviders } from './CurrencyProviders';
import { CurrencyAmount } from './CurrencyAmount';
import { CurrencyPreparedTransaction } from './CurrencyPreparedTransaction';
export declare abstract class Currency {
protected readonly api: Api;
readonly currencyInfo: CurrencyInfo;
protected currencyProviders: CurrencyProviders;
protected constructor(currencyInfo: CurrencyInfo, api: Api, currencyProviders: CurrencyProviders);
abstract amount(amountStr: string, unit: unknown): Promise<CurrencyAmount>;
abstract getAddress(): Promise<string>;
abstract getBalance(address?: string): Promise<{
confirmed: CurrencyAmount;
unconfirmed: CurrencyAmount;
}>;
abstract createTransfer(toAddress: Address, amount: CurrencyAmount): Promise<CurrencyPreparedTransaction>;
getPublicKey(): Promise<import("../PublicKey").PublicKey>;
getPrivateKey(): Promise<import("../Secret/implementations/PrivateKey").PrivateKey>;
}