const geesomeWallet = geesomeWallet.client({backendUrl: 'https://wallet.galtproject.io'});
const password = `SKhrSfX2`;
await geesomeWallet.register('[email protected]', '+799911112233', 'username', password);
const resultSeed = await geesomeWallet.exportSeed();
const password = `SKhrSfX2`;
await geesomeWallet.register('[email protected]', '+799911112233', 'username', password, {
seed: 'direct ordinary element answer novel fossil gift bag device couch disease awesome'
});
const resultSeed = await geesomeWallet.exportSeed();
const receivedByEmailCode = '112233';
await geesomeWallet.confirmWallet('email', '[email protected]', receivedByEmailCode);
const receivedByPhoneCode = '112233';
await geesomeWallet.confirmWallet('phone', '+799911112233', receivedByPhoneCode);
await geesomeWallet.login('[email protected]', password, 'email');
await geesomeWallet.login('+799911112233', password, 'phone');
await geesomeWallet.updateWallet({
phone: '+799911112234'
});
const receivedByPhoneCode = '112233';
await geesomeWallet.confirmWallet('phone', '+799911112234', receivedByPhoneCode);
const provider = geesomeWallet.provider({
email: '[email protected]',
password: password,
rpcUrl: 'https://mainnet.infura.io/v3/YOUR-PROJECT-ID',
backendUrl: 'https://wallet.galtproject.io'
});
const Web3 = require('web3');
const web3 = new Web3(provider);
await web3.eth.sendTransaction({
from: await web3.eth.getAccounts().then(accs => accs[0]),
to: '0x...',
value: '0'
});
More about using web3: https://web3js.readthedocs.io/