P2PSDKInit(params: Object)

Requires:
P2PKit≥0.0.1@ray-js/ray≥1.3.15
Platforms:
iOSAndroid
import { p2p } from '@ray-js/ray';

const { P2PSDKInit } = p2p;

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

Description

P2P SDK init

Parameters

PropertyTypeRequiredDescription
userIdstringNouser id
complete() => voidNoCompletion callback (executed on both success and failure)
success() => voidNoCallback on successful API call
fail(params: Object) => voidNoFailure callback
fail callback parameters
PropertyTypeDescription
errorMsgstringError message
errorCodestring | numberError code
Error extension

Return Value

None

Examples

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

p2p.P2PSDKInit({
  userId: "xx",
  success: data => {
    console.log(data);
  },
  fail: error => {
    console.error(error);
  },
});