login()
Syntax
login(account: string)
Login to eueno by Owallet account address. After login, the token will be saved in local storage with the name “eueno-token”. YOU MUST LOG IN BEFORE USING ANY METHOD IN EUENO LIBRARY.
Parameters
Name
Type
Required
Description
account
string
Yes
Owallet account address.
Example
import { login} from "@eueno/lib-browser";
const onLogin = async () => {
try {
const account = "0xf069fF728e9fc85D81163269F3b04Ef5CF387f15";
const response = await login(account);
console.log("LOGIN", response);
} catch (error) {
console.log(error);
}
};
Response of example:
"data": {
"account": "0xf069ff728e9fc85d81163269f3b04ef5cf387f15",
"memo": "3506489706676224",
"balance": 0,
"token": "eyJhbG…8GMCQ",
"create_at": "2022-12-26T03:16:26.903Z"
}
Last updated