Search icon CANCEL
Arrow left icon
Explore Products
Best Sellers
New Releases
Books
Videos
Audiobooks
Learning Hub
Conferences
Free Learning
Arrow right icon
Arrow up icon
GO TO TOP
Ripple Quick Start Guide

You're reading from   Ripple Quick Start Guide Get started with XRP and develop applications on Ripple's blockchain

Arrow left icon
Product type Paperback
Published in Dec 2018
Publisher Packt
ISBN-13 9781789532197
Length 160 pages
Edition 1st Edition
Languages
Concepts
Arrow right icon
Author (1):
Arrow left icon
Febin John James Febin John James
Author Profile Icon Febin John James
Febin John James
Arrow right icon
View More author details
Toc

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 $19.99/month. Cancel anytime