import { TX } from './index' ; /**
 * A read-only instance
 */ export class Authhead { private tx : any ; constructor ( tx , enc ? ) { this . tx = TX . fromRaw ( tx , enc ) ; } getSigningOutput ( ) { let obj = this . toObject ( 'main' ) ; let signingIndex = obj . outputs . length > 1 ? 1 : 0 ; return { hash : this . getHash ( ) , index : signingIndex as number , script : obj . outputs [ signingIndex ] . script as string } ; } getId ( ) { return this . getHash ( ) ; } getHash ( ) { return this . tx . toJSON ( ) . hash as string ; } toObject ( network ) { return this . tx . getJSON ( network ) ; } }