You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

tools.ts 477B

12345678910111213141516
  1. type Wallet = {secret: string, address:string }
  2. export const makeTestnetWallet = () : Promise<Wallet> => fetch('https://faucet.altnet.rippletest.net/accounts', {
  3. method: 'POST',
  4. headers: {
  5. 'Accept': 'application/json',
  6. 'Content-Type': 'application/json'
  7. },
  8. }).then((raw:any) => {
  9. return raw.json().then(content => {
  10. return({
  11. secret: content.account.secret,
  12. address: content.account.address
  13. });
  14. })
  15. });