Reader small image

You're reading from  Ripple Quick Start Guide

Product typeBook
Published inDec 2018
Reading LevelIntermediate
PublisherPackt
ISBN-139781789532197
Edition1st Edition
Languages
Right arrow
Author (1)
Febin John James
Febin John James
author image
Febin John James

Febin John James is presently working on building autonomous lending and borrowing protocol on the Ethereum blockchain. He also works as a tech and marketing consultant to ICOs and blockchain-based start-ups. He has years of experience in building and scaling tech architectures from scratch. His blockchain stories on Medium have gained a lot of popularity and have been translated into multiple languages. He writes for well-known publications such as Hacker Noon and freeCodeCamp. He is also the author of the book, Cloud is a Piece of Cake. Previously, he worked as the CTO of Boutline, a sports start-up. He has also bagged devices, cash prizes, and recognition from companies such as Intel, Blackberry, and Microsoft.
Read more about Febin John James

Right arrow

Creating a time-held escrow

We'll again go with the same step of steps as before to create a time-held escrow:

  1. Prepare transaction: Here, we define the destination account to which money should be released, escrow release time, amount, and so on.
  2. Sign transaction: You need to sign the transaction cryptographically with your secret key. This proves that you own the source account.
  3. Submit transaction: Once you sign the transaction, you need to submit it to the Ripple network for validation. The escrow would be only created when the validators approve the transaction.

We prepare the create escrow transaction with the following code. As you can see, we've defined the destination and amount and passed the release time to "allowExecuteAfter" parameter:

const sender = 'r41sFTd4rftxY1VCn5ZDDipb4KaV5VLFy2';
const secret = 'sptkAoSPzHq8mKLWrjU33EDj7v96u...
lock icon
The rest of the page is locked
Previous PageNext Page
You have been reading a chapter from
Ripple Quick Start Guide
Published in: Dec 2018Publisher: PacktISBN-13: 9781789532197

Author (1)

author image
Febin John James

Febin John James is presently working on building autonomous lending and borrowing protocol on the Ethereum blockchain. He also works as a tech and marketing consultant to ICOs and blockchain-based start-ups. He has years of experience in building and scaling tech architectures from scratch. His blockchain stories on Medium have gained a lot of popularity and have been translated into multiple languages. He writes for well-known publications such as Hacker Noon and freeCodeCamp. He is also the author of the book, Cloud is a Piece of Cake. Previously, he worked as the CTO of Boutline, a sports start-up. He has also bagged devices, cash prizes, and recognition from companies such as Intel, Blackberry, and Microsoft.
Read more about Febin John James