Escrow
In this session, we will create an escrow.
Start coding
import dayjs from 'dayjs';
import { Client, isoTimeToRippleTime, xrpToDrops } from 'xrpl';
import { generateConditionAndFulfillment, escrowTransaction } from './helpers';
const main = async () => {
console.log('lets get started...');
// Connect the client to the network
const client = new Client('wss://s.altnet.rippletest.net:51233');
await client.connect();
const { wallet: walletOne } = await client.fundWallet();
const { wallet: walletTwo } = await client.fundWallet();
console.log({ walletOne, walletTwo });
};
main();Create the escrow
Finishing the escrow
Extra credits
Canceling your escrow
Use the escrow as a smart contract
Last updated

