您最多选择25个主题 主题必须以字母或数字开头,可以包含连字符 (-),并且长度不得超过35个字符

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. });