From 43994fedaffe0ade3ba19e05f957c33e5ca48e18 Mon Sep 17 00:00:00 2001 From: KovacZan Date: Tue, 11 Feb 2020 08:46:16 +0100 Subject: [PATCH] feat: multipayment transfer --- src/index.ts | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) diff --git a/src/index.ts b/src/index.ts index ad005ed..ac4eb4f 100644 --- a/src/index.ts +++ b/src/index.ts @@ -24,11 +24,12 @@ const senderPassphrase = "master dizzy era math peanut crew run manage better fl nonce = Utils.BigNumber.make(nonce).plus(1); // This is where we build our transaction - const trx = Transactions.BuilderFactory.transfer() + const trx = Transactions.BuilderFactory.multiPayment() .version(2) .nonce(String(nonce)) - .amount("100") - .recipientId(recipientWalletAddress) + .addPayment(recipientWalletAddress, "100") + .addPayment(recipientWalletAddress, "100") + .addPayment(recipientWalletAddress, "100") .sign(senderPassphrase); const transaction = trx.build().toJson(); @@ -49,7 +50,8 @@ const senderPassphrase = "master dizzy era math peanut crew run manage better fl expiration: transaction.expiration, recipientId: transaction.recipientId, signature: transaction.signature, - id: transaction.id + id: transaction.id, + asset: transaction.asset } ] }