crypto-ducatus-wallet-core
Version:
A multi-currency support library for address derivation, private key creation, and transaction creation
14 lines (13 loc) • 350 B
text/typescript
export class DUCTxProvider {
lib = require('ducatuscore-lib');
create({ recipients, utxos, change, fee }) {
let tx = new this.lib.Transaction().from(utxos).fee(Number(fee));
for (const recipient of recipients) {
tx.to(recipient.address, recipient.amount);
}
if (change) {
tx.change(change);
}
return tx;
}
}