chaingate
Version:
A complete TypeScript library for connecting to and making transactions on different blockchains
16 lines (15 loc) • 1.05 kB
TypeScript
import { UtxoCurrencyUtils } from '../abstract/UtxoCurrencyUtils/UtxoCurrencyUtils';
import { Client } from '@hey-api/client-fetch';
import { TtlCache } from '../../../InternalUtils/TtlCache';
import { GlobalMarketsResponse } from '../../../Client';
import { BitcoinCashInfo } from '../../CurrencyInfo';
import { PrivateKey } from '../../../Wallet/entities/Secret/implementations/PrivateKey';
import { PublicKey } from '../../../Wallet/entities/PublicKey';
export type AddressTypeSupported = 'legacy' | 'cashaddr' | 'bitpay';
export declare class BitcoinCashUtils extends UtxoCurrencyUtils<typeof BitcoinCashInfo> {
constructor(client: Client, markets: TtlCache<GlobalMarketsResponse>);
identifyAddressType(address: string): 'legacy' | 'cashaddr' | 'bitpay' | 'unknown';
publicKeyToAddress(publicKey: PublicKey, addressType?: AddressTypeSupported): string;
signMessage(message: string | Uint8Array, privateKey: PrivateKey): Promise<string>;
verifySignedMessage(message: string, signature: string, address: string): Promise<boolean>;
}