Closed samyan closed 1 year ago
Got it. Just added the typings of typescript for set array of keys to [sign method] as the original is obsolete:
original:
sign(privateKey: PrivateKey | string): this;
replaced:
sign(privateKey: PrivateKey | PrivateKey[] | string | string[]): this;
final code
const txHex: string = new Bitcore.Transaction()
.from(utxos)
.to(toAddress, spendAmount.toNumber())
.change(toAddress)
.fee(this.feeAmount.toNumber())
.sign(fromSources.map((fromSources) => fromSources.privateKey))
.serialize();
Hi, i'm trying to collect all funds from our hd wallets and send it to the main wallet. I'm looking in docs but i can find nothing about.
I don't know if I'm on the right track, or what I require is done completely differently? Thanks in advance.