3
  • Case 1 : I have IOTAs on 1 address

    User can't send to multiple addresses simultaneously. Private key reuse.

  • Case 2: I have IOTAs on multiple addresses

    User can't choose the address to spend on GUI wallet.

    Is it possible via API for case 2?

5

AFAIK, the current wallet don't support this kind of complex scenario (i.e. sending to multiple addresses simultaneously). You have to craft a proper Bundle to send funds to multiple addresses.

Case 1 :

  • Assume that you have 600 iotas in <MY_ADDRESS>
  • Assume that you need to send 200 iotas to Alice
  • Assume that you need to send 300 iotas to Bob

You need to craft a Bundle with the following transactions in it :

<MY_ADDRESS> send 200 to <ALICE_ADDRESS>
<MY_ADDRESS> send 300 to <BOB_ADDRESS>
<MY_ADDRESS> send 100 to <MY_OTHER_ADDRESS>

You need to sign all those transaction with the private key of <MY_ADDRESS>

Case 2 :

  • Assume that you have 300 iotas in <MY_ADDRESS_1>
  • Assume that you have 300 iotas in <MY_ADDRESS_2>
  • Assume that you need to send 200 iotas to Alice
  • Assume that you need to send 300 iotas to Bob

You need to craft a Bundle with the following transactions in it :

<MY_ADDRESS_1> send 200 to <ALICE_ADDRESS>
<MY_ADDRESS_1> send 100 to <BOB_ADDRESS>
<MY_ADDRESS_2> send 200 to <BOB_ADDRESS>
<MY_ADDRESS_2> send 100 to <MY_OTHER_ADDRESS>

Of course the first transactions must be signed with the private key for <MY_ADDRESS_1> and the 2 last transactions must be signed with private key for <MY_ADDRESS_2>

More info about bundles :

  • 1
    In your last example, 100 iotas are left on <MY_ADDRESS_1> and you overspend 100 iotas on <MY_ADDRESS_2>. Are those transactions still considered valid ? – aguadoe Mar 6 '18 at 14:57
  • @aguadoe : good catch. I fixed it. – ben75 Mar 6 '18 at 17:15

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.