Search icon CANCEL
Subscription
0
Cart icon
Close icon
You have no products in your basket yet
Save more on your purchases!
Savings automatically calculated. No voucher code required
Arrow left icon
All Products
Best Sellers
New Releases
Books
Videos
Audiobooks
Learning Hub
Newsletters
Free Learning
Arrow right icon
Ripple Quick Start Guide

You're reading from  Ripple Quick Start Guide

Product type Book
Published in Dec 2018
Publisher Packt
ISBN-13 9781789532197
Pages 160 pages
Edition 1st Edition
Languages
Author (1):
Febin John James Febin John James
Profile icon Febin John James

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 chapter is locked
Register for a free Packt account to unlock a world of extra content!
A free Packt account unlocks extra newsletters, articles, discounted offers, and much more. Start advancing your knowledge today.
Unlock this book and the full library FREE for 7 days
Get unlimited access to 7000+ expert-authored eBooks and videos courses covering every tech area you can think of
Renews at ₹800/month. Cancel anytime}