import { IAirGapSignedTransaction, IAirGapTransaction, ProtocolSymbols, UnsignedTransaction } from '@airgap/coinlib-core'; import { SignedBitcoinSegwitTransaction } from '../types/signed-transaction-bitcoin-segwit'; import { RawBitcoinTransaction } from '../types/transaction-bitcoin'; import { BitcoinProtocol } from './BitcoinProtocol'; import { BitcoinProtocolOptions } from './BitcoinProtocolOptions'; import { BitcoinAddressCursor, BitcoinAddressResult } from './BitcoinTypes'; export declare class BitcoinSegwitProtocol extends BitcoinProtocol { name: string; identifier: ProtocolSymbols; standardDerivationPath: string; addressPlaceholder: string; constructor(options?: BitcoinProtocolOptions); getPublicKeyFromHexSecret(secret: string, derivationPath: string): Promise; getPrivateKeyFromHexSecret(secret: string, derivationPath: string): Promise; getExtendedPrivateKeyFromMnemonic(mnemonic: string, derivationPath: string, password?: string): Promise; getExtendedPrivateKeyFromHexSecret(secret: string, derivationPath: string): Promise; getAddressFromPublicKey(publicKey: string, cursor?: BitcoinAddressCursor): Promise; getAddressesFromPublicKey(publicKey: string, cursor?: BitcoinAddressCursor): Promise; getAddressFromExtendedPublicKey(extendedPublicKey: string, visibilityDerivationIndex: number, addressDerivationIndex: number): Promise; getAddressesFromExtendedPublicKey(extendedPublicKey: string, visibilityDerivationIndex: number, addressCount: number, offset: number): Promise; getTransactionDetails(unsignedTx: UnsignedTransaction): Promise; getTransactionDetailsFromSigned(signedTx: SignedBitcoinSegwitTransaction): Promise; prepareTransactionFromExtendedPublicKey(extendedPublicKey: string, offset: number, recipients: string[], values: string[], fee: string, extras: { masterFingerprint: string; replaceByFee: boolean; }): Promise; /** * The inherited implementation builds a legacy P2PKH transaction, which is wrong for P2WPKH * inputs: it would compute the sighash over the wrong script and return a "successfully" signed * transaction no node accepts. Segwit signing goes through the PSBT flow with an extended key. */ signWithPrivateKey(_privateKey: string, _transaction: RawBitcoinTransaction): Promise; signWithExtendedPrivateKey(extendedPrivateKey: string, transaction: any): Promise; broadcastTransaction(rawTransaction: string): Promise; }