Wallet Integration
Browser wallet extension connection
window.zetrix.authorize(
{ method: "changeAccounts" },
(resp) => {
if (resp.code === 0) {
window.zetrix.authorize(
{ method: "sendRandom", param: { random: "blob" } },
(resAuth) => {
if (resAuth.code === 0) {
// Retrieve the necessary info from resp.data and resAuth.data to retrieve the address, signData & publicKey
sessionStorage.setItem("zetrixAccount", resp.data.address);
sessionStorage.setItem("isLogin", "true");
}
}
);
}
}
);Mobile wallet connection
Last updated