chaingate
Version:
A complete TypeScript library for connecting to and making transactions on different blockchains
23 lines (22 loc) • 1.25 kB
TypeScript
import { ChainGateClient, UtxoApi } from 'chaingate-client';
import { Address } from '../../../Address';
import { Currency } from '../../Currency';
import { NetworkParams } from './NetworkParams';
import { CurrencyInfo } from '../../CurrencyInfo';
import { CurrencyAmount } from '../../CurrencyAmount';
import { UtxoPreparedTransaction } from './UtxoPreparedTransaction';
import { AddressHistory } from './AddressHistory';
import { CurrencyProviders } from '../../CurrencyProviders';
export declare abstract class Utxo<DefaultUnit extends string> extends Currency {
protected readonly api: UtxoApi;
protected readonly networkParams: NetworkParams;
protected constructor(currencyInfo: CurrencyInfo, client: ChainGateClient, api: UtxoApi, currencyProviders: CurrencyProviders, networkParams: NetworkParams);
abstract getAddress(): Promise<string>;
abstract createTransfer(toAddress: Address, amount: CurrencyAmount): Promise<UtxoPreparedTransaction<DefaultUnit>>;
getBalance(address?: string): Promise<{
confirmed: CurrencyAmount;
unconfirmed: CurrencyAmount;
}>;
amount(amountStr: string, unit: DefaultUnit | 'satoshi'): Promise<CurrencyAmount>;
addressHistory(page: number): Promise<AddressHistory>;
}