getAccountInfo(params: Object)

Requires:
MiniKit≥3.1.0@ray-js/ray≥0.9.0
Platforms:
iOSAndroid
import { getAccountInfo } from '@ray-js/ray';

// Promise usage
try {
  const res = await getAccountInfo();
  console.log(res);
} catch (err) {
  console.log(err.errorMsg);
}

Description

Get mini app account information

Parameters

PropertyTypeRequiredDescription
complete() => voidNoCompletion callback (executed on both success and failure)
success(params: Object) => voidNoCallback on successful API call
fail(params: Object) => voidNoFailure callback
success callback parameters
PropertyTypeDescriptionMiniKit Since
Mini app account informationv3.2.0
fail callback parameters
PropertyTypeDescription
errorMsgstringError message
errorCodestring | numberError code
Error extension

Return Value

None

Examples

import { getAccountInfo } from '@ray-js/ray'

getAccountInfo({
  success: data => {
    console.log(data);
  },
  fail: error => {
    console.error(error);
  },
});