Skip to main content

@portkey/onboarding

Introduction

This is used to activate the app, opening the invitation link and initiating app login.

Installation

npm install @portkey/onboarding

How to use

evokePortkey.app

import { evokePortkey } from "@portkey/onboarding";

evokePortkey.app({
action: "login",
custom: { data: dataStr, extraData },
onStatusChange: (status) => {
if (status === "failure") {
setLoading(false);
singleMessage.error("Evoke portkey app timeout");
}
},
});
PropertyDescriptionTypeDefaultVersion
domainAddress displayed upon app activation.stringlocation.host-
actionOperation needed for app activation.linkDapp | login | addContact | addGroup--
customParameters for app activation operations: linkDapp: {url: 'https://xxxxxx'}, login: any,addContact addGroup: string---
timeoutTimeout, the amount of time exceeded. A prompt for failed app activation will be displayed.number (ms)4000-
customFailureCallbackCustomed callback failure.()=>void;--
onStatusChangeStatus of activation.(status: 'pending' | 'failure' | 'success') => void--

evokePortkey.extension

Checking whether the user has installed the "Portkey" extension. If verified that the user has not installed this extension, proceed to the appropriate store or official channel for download and installation.

PropertyDescriptionTypeDefaultVersion
openTargetType of openning._self | _blank_blank-

evokePortkey.thirdParty

Open the third-party doanload page.

PropertyDescriptionTypeDefaultVersion
actionOperation needed for app activation.linkDapp | login--
customParameters for app activation operations: linkDapp: {url: 'https://xxxxxx'}---