mirror of
https://github.com/XRPLF/xrpl-dev-portal.git
synced 2025-11-24 13:45:49 +00:00
Added testnet accounts
This commit is contained in:
@@ -15,11 +15,6 @@ const main = async () => {
|
|||||||
const myFulfillment = new cc.PreimageSha256();
|
const myFulfillment = new cc.PreimageSha256();
|
||||||
myFulfillment.setPreimage(preimageData);
|
myFulfillment.setPreimage(preimageData);
|
||||||
const conditionHex = myFulfillment.getConditionBinary().toString('hex').toUpperCase();
|
const conditionHex = myFulfillment.getConditionBinary().toString('hex').toUpperCase();
|
||||||
|
|
||||||
// Get credentials from the Testnet Faucet ------------------------------------
|
|
||||||
console.log("Requesting an address from the Testnet faucet...");
|
|
||||||
const { wallet } = await client.fundWallet();
|
|
||||||
console.log("Wallet: ", wallet.address);
|
|
||||||
|
|
||||||
console.log('Condition:', conditionHex);
|
console.log('Condition:', conditionHex);
|
||||||
console.log('Fulfillment:', myFulfillment.serializeBinary().toString('hex').toUpperCase());
|
console.log('Fulfillment:', myFulfillment.serializeBinary().toString('hex').toUpperCase());
|
||||||
@@ -28,6 +23,11 @@ const main = async () => {
|
|||||||
const client = new xrpl.Client('wss://s.altnet.rippletest.net:51233');
|
const client = new xrpl.Client('wss://s.altnet.rippletest.net:51233');
|
||||||
await client.connect();
|
await client.connect();
|
||||||
|
|
||||||
|
// Get credentials from the Testnet Faucet ------------------------------------
|
||||||
|
console.log("Requesting an address from the Testnet faucet...");
|
||||||
|
const { wallet } = await client.fundWallet();
|
||||||
|
console.log("Wallet: ", wallet.address);
|
||||||
|
|
||||||
const firstRippleEpoch = 946684800;
|
const firstRippleEpoch = 946684800;
|
||||||
const escrowCreateTransaction = {
|
const escrowCreateTransaction = {
|
||||||
"TransactionType": "EscrowCreate",
|
"TransactionType": "EscrowCreate",
|
||||||
|
|||||||
Reference in New Issue
Block a user