Skip to content

Commit 43994fe

Browse files
author
KovacZan
committed
feat: multipayment transfer
1 parent b266391 commit 43994fe

File tree

1 file changed

+6
-4
lines changed

1 file changed

+6
-4
lines changed

src/index.ts

Lines changed: 6 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -24,11 +24,12 @@ const senderPassphrase = "master dizzy era math peanut crew run manage better fl
2424
nonce = Utils.BigNumber.make(nonce).plus(1);
2525

2626
// This is where we build our transaction
27-
const trx = Transactions.BuilderFactory.transfer()
27+
const trx = Transactions.BuilderFactory.multiPayment()
2828
.version(2)
2929
.nonce(String(nonce))
30-
.amount("100")
31-
.recipientId(recipientWalletAddress)
30+
.addPayment(recipientWalletAddress, "100")
31+
.addPayment(recipientWalletAddress, "100")
32+
.addPayment(recipientWalletAddress, "100")
3233
.sign(senderPassphrase);
3334

3435
const transaction = trx.build().toJson();
@@ -49,7 +50,8 @@ const senderPassphrase = "master dizzy era math peanut crew run manage better fl
4950
expiration: transaction.expiration,
5051
recipientId: transaction.recipientId,
5152
signature: transaction.signature,
52-
id: transaction.id
53+
id: transaction.id,
54+
asset: transaction.asset
5355
}
5456
]
5557
}

0 commit comments

Comments
 (0)