diff --git a/ts_src/psbt.ts b/ts_src/psbt.ts index c55e6bc..8838b37 100644 --- a/ts_src/psbt.ts +++ b/ts_src/psbt.ts @@ -11,8 +11,6 @@ import { PsbtOutputUpdate, Transaction as ITransaction, TransactionFromBuffer, - TransactionInput, - TransactionOutput, } from 'bip174/src/lib/interfaces'; import { checkForInput, checkForOutput } from 'bip174/src/lib/utils'; import { fromOutputScript, toOutputScript } from './address'; @@ -28,10 +26,21 @@ import * as payments from './payments'; import * as bscript from './script'; import { Output, Transaction } from './transaction'; +export interface TransactionInput { + hash: string | Buffer; + index: number; + sequence?: number; +} + export interface PsbtTxInput extends TransactionInput { hash: Buffer; } +export interface TransactionOutput { + script: Buffer; + value: number; +} + export interface PsbtTxOutput extends TransactionOutput { address: string | undefined; } diff --git a/types/psbt.d.ts b/types/psbt.d.ts index 022a95d..e7a79eb 100644 --- a/types/psbt.d.ts +++ b/types/psbt.d.ts @@ -1,11 +1,20 @@ import { Psbt as PsbtBase } from 'bip174'; -import { KeyValue, PsbtGlobalUpdate, PsbtInput, PsbtInputUpdate, PsbtOutput, PsbtOutputUpdate, TransactionInput, TransactionOutput } from 'bip174/src/lib/interfaces'; +import { KeyValue, PsbtGlobalUpdate, PsbtInput, PsbtInputUpdate, PsbtOutput, PsbtOutputUpdate } from 'bip174/src/lib/interfaces'; import { Signer, SignerAsync } from './ecpair'; import { Network } from './networks'; import { Transaction } from './transaction'; +export interface TransactionInput { + hash: string | Buffer; + index: number; + sequence?: number; +} export interface PsbtTxInput extends TransactionInput { hash: Buffer; } +export interface TransactionOutput { + script: Buffer; + value: number; +} export interface PsbtTxOutput extends TransactionOutput { address: string | undefined; }