Used as support for a video.
This code is not suited for a real use-case involving an escrow account. It is a very simple example used only to illustrate how to create a pre-signed transaction on the stellar testnet.
- nodeJS 10+
accounts.json
: test accounts as shown inaccounts.sample.json
(alice and bob accounts have to be funded)
Use the stellar laboratory to create and fund the accounts.
- Alice creates an Escrow account
- Alice (using Escrow) creates a pre-signed transaction: payment to Bob and merge Escrow into Alice after a lockup period
- Alice sends XLMs to the Escrow account
- Bob submits the pre-signed transaction after lockup period