UNPKG

chaingate

Version:

A complete TypeScript library for connecting to and making transactions on different blockchains

17 lines (16 loc) 1.36 kB
import { CurrencyInfo } from '../../../CurrencyInfo'; import { UtxoNetworkKey } from '../../../../Client'; import { UtxoCurrencyUtils } from '../UtxoCurrencyUtils/UtxoCurrencyUtils'; import { PublicKey } from '../../../../Wallet/entities/PublicKey'; import { NetworkParams } from '../UtxoCurrencyUtils/NetworkParams'; import { PrivateKey } from '../../../../Wallet/entities/Secret/implementations/PrivateKey'; import { ChainGateContext } from '../../ChainGateContext'; 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(context: ChainGateContext, currencyInfo: CI, 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>; }