11import { ok as assert } from 'assert' ;
22import { BIP32Interface } from '@bitgo/secp256k1' ;
3- import * as utxolib from '..' ;
3+ import { payments } from '..' ;
44import { getMainnet , Network , networks } from '../networks' ;
55
66import {
77 ChainCode ,
8+ withUnsafeNonSegwit ,
89 createPsbtForNetwork ,
910 fromOutput ,
1011 fromOutputWithPrevTx ,
@@ -37,7 +38,7 @@ export function mockPrevTx(
3738 const keypair = getKey ( 'mock-prev-tx' ) ;
3839 const pubkey = keypair . publicKey ;
3940 assert ( keypair . privateKey ) ;
40- const payment = utxolib . payments . p2pkh ( { pubkey } ) ;
41+ const payment = payments . p2pkh ( { pubkey } ) ;
4142 const destOutput = payment . output ;
4243 if ( ! destOutput ) throw new Error ( 'Impossible, payment we just constructed has no output' ) ;
4344
@@ -54,7 +55,7 @@ export function mockPrevTx(
5455 witnessUtxo : { script : destOutput , value : value * ( BigInt ( vout ) + BigInt ( 1 ) ) + BigInt ( 1000 ) } ,
5556 } ) ;
5657 // Don't require the prevTx for signing and finalizing for non-segwit input
57- utxolib . bitgo . withUnsafeNonSegwit ( psbtFromNetwork , ( ) => {
58+ withUnsafeNonSegwit ( psbtFromNetwork , ( ) => {
5859 psbtFromNetwork . signInput ( 0 , keypair ) ;
5960 psbtFromNetwork . validateSignaturesOfAllInputs ( ) ;
6061 psbtFromNetwork . finalizeAllInputs ( ) ;
0 commit comments