type Wallet = {secret: string, address:string }

export const makeTestnetWallet = () : Promise<Wallet> => fetch('https://faucet.altnet.rippletest.net/accounts', {
    method: 'POST',
    headers: {
        'Accept': 'application/json',
        'Content-Type': 'application/json'
    },
}).then((raw:any) => {
    return raw.json().then(content => {
        return({
            secret: content.account.secret,
            address: content.account.address
        });
    })
});