useEuenoContext()

The useEuenoContext() hook returns some user information including:

  • account: string - owallet account of user

  • publicKey: string - the public key of user

  • token: string - token after login

  • userInfo: this param can be null or UserInfo type. The UserInfo has interface as below:

interface UserInfo {
  name_tag: string;
  balance_usd: number;
  avatar: null;
  status: string;
  _id: string;
  account: string;
  memo: string;
  createAt: string;
  pack_info: {
    _id: string;
    price_to_usd: number;
    discount: number;
    project_size: number;
    description: string;
    type: string;
  };
}

Example

import { useEuenoContext } from "@eueno/lib-browser";
const {
    wallet: { publicKey, account },
    service: { token, userInfo },
} = useEuenoContext();

Last updated