diff --git a/backend/src/api/transaction-utils.ts b/backend/src/api/transaction-utils.ts index b8a9a108a..0b10afdfb 100644 --- a/backend/src/api/transaction-utils.ts +++ b/backend/src/api/transaction-utils.ts @@ -3,7 +3,6 @@ import { IEsploraApi } from './bitcoin/esplora-api.interface'; import { Common } from './common'; import bitcoinApi, { bitcoinCoreApi } from './bitcoin/bitcoin-api-factory'; import * as bitcoinjs from 'bitcoinjs-lib'; -import crypto from 'node:crypto'; class TransactionUtils { constructor() { } @@ -171,14 +170,6 @@ class TransactionUtils { 16 ); } - - public calcScriptHash(script: string): string { - if (!/^[0-9a-fA-F]*$/.test(script) || script.length % 2 !== 0) { - throw new Error('script is not a valid hex string'); - } - const buf = Buffer.from(script, 'hex'); - return crypto.createHash('sha256').update(buf).digest('hex'); - } } export default new TransactionUtils();