chaingate
Version:
A complete TypeScript library for connecting to and making transactions on different blockchains
18 lines (17 loc) • 1.47 kB
TypeScript
import { Client } from '@hey-api/client-fetch';
import { CurrencyInfo } from '../../../CurrencyInfo';
import { GlobalMarketsResponse, UtxoNetworkKey } from '../../../../Client';
import { TtlCache } from '../../../../InternalUtils/TtlCache';
import { UtxoCurrencyUtils } from '../UtxoCurrencyUtils/UtxoCurrencyUtils';
import { PublicKey } from '../../../../Wallet/entities/PublicKey';
import { NetworkParams } from '../UtxoCurrencyUtils/NetworkParams';
import { PrivateKey } from '../../../../Wallet/entities/Secret/implementations/PrivateKey';
export type AddressTypeSupported = 'legacy-p2pkh' | 'legacy-p2pk' | 'segwit-p2wpkh' | 'taproot-p2tr';
export type AddressType = 'legacy-p2pkh' | 'legacy-p2sh' | 'legacy-p2pk' | 'legacy-p2ms' | 'segwit-p2wpkh' | 'segwit-p2wsh' | 'taproot-p2tr' | 'taproot-n-of-n' | 'taproot-m-of-n' | 'anchor';
export declare abstract class Bech32UtxoCurrencyUtils<CI extends CurrencyInfo> extends UtxoCurrencyUtils<CI> {
protected constructor(client: Client, currencyInfo: CI, markets: TtlCache<GlobalMarketsResponse>, network: UtxoNetworkKey, networkParams: NetworkParams, signHeader: string);
publicKeyToAddress(publicKey: PublicKey, addressType?: AddressTypeSupported): string;
identifyAddressType(address: string): AddressType | 'unknown';
signMessage(message: string | Uint8Array, privateKey: PrivateKey): Promise<string>;
verifySignedMessage(message: string, signature: string, address: string): Promise<boolean>;
}