Skip to content

Commit 2ca3bf5

Browse files
OttoAllmendingerllm-git
andcommitted
feat(abstract-utxo): remove deprecated signature verification functions
Remove deprecated methods `defaultSigHashType` and `verifySignature` in favor of using utxolib's functions directly. BREAKING CHANGE: Consumers must now use `utxolib.bitgo.getDefaultSigHash(network)` Issue: BTC-2676 Co-authored-by: llm-git <[email protected]>
1 parent e4078d4 commit 2ca3bf5

File tree

1 file changed

+0
-29
lines changed

1 file changed

+0
-29
lines changed

modules/abstract-utxo/src/abstractUtxoCoin.ts

Lines changed: 0 additions & 29 deletions
Original file line numberDiff line numberDiff line change
@@ -920,35 +920,6 @@ export abstract class AbstractUtxoCoin extends BaseCoin {
920920
return isReplayProtectionUnspent<TNumber>(unspent, this.network);
921921
}
922922

923-
/**
924-
* @deprecated - use utxolib.bitgo.getDefaultSigHash(network) instead
925-
* @returns {number}
926-
*/
927-
get defaultSigHashType(): number {
928-
return utxolib.bitgo.getDefaultSigHash(this.network);
929-
}
930-
931-
/**
932-
* @deprecated - use utxolib.bitcoin.verifySignature() instead
933-
*/
934-
verifySignature(
935-
transaction: any,
936-
inputIndex: number,
937-
amount: number,
938-
verificationSettings: {
939-
signatureIndex?: number;
940-
publicKey?: string;
941-
} = {}
942-
): boolean {
943-
if (transaction.network !== this.network) {
944-
throw new Error(`network mismatch`);
945-
}
946-
return utxolib.bitgo.verifySignature(transaction, inputIndex, amount, {
947-
signatureIndex: verificationSettings.signatureIndex,
948-
publicKey: verificationSettings.publicKey ? Buffer.from(verificationSettings.publicKey, 'hex') : undefined,
949-
});
950-
}
951-
952923
/**
953924
* Decompose a raw psbt/transaction into useful information, such as the total amounts,
954925
* change amounts, and transaction outputs.

0 commit comments

Comments
 (0)