How-To:Handle Withdrawals

From Nxt Wiki
Jump to: navigation, search
This page contains changes which are not marked for translation.

Developers have provided some insights into good methods for implementing features in your software. This tip was created by Come-from-Beyond.

For more information on the API calls referenced here, check our high-level API documentation.

1 One way to handle withdrawals

  1. Use this API call: http://localhost:7876/nxt?requestType=sendMoney&secretPhrase=123&recipient=2983475693816&amount=5000&fee=1&deadline=32767
  2. This request will return a transaction ID and transaction bytes.
  3. Save both these values and periodically check that transaction is still in the blockchain.
    • Due to possible transaction malleability issues, do not rely on transaction ID alone to verify a transaction has been sent.
  4. If the transaction becomes unknown or unconfirmed, you can rebroadcast it via broadcastTransaction (Transaction bytes can be obtained using getTransactionBytes)
  5. Once the transaction reaches 720 confirmations, it's safe.

2 Some very important things