Now, let's learn how to send checks from a Ripple account. In order to send checks, we need to accomplish the following three things. The process is similar to sending money:
- Prepare transaction: Here we define the destination address, amount to be paid, and so on.
- Sign transaction: You need to sign the transaction cryptographically with your secret key. This proves that you own this account.
- Submit transaction: Once you sign the transaction, you need to submit it to the Ripple network for validation. Your check would become valid only when the validators approve your transaction.
In order to create a check, we would be using the "CheckCreate" method. The following code takes the destination and amount to be paid as input and generates the transaction JSON as output. You need to own the recipient account since we would be using it to cash out...