Skip to main content

GuardianApproval

Usage scenario: social recovery during login where verification from other guardians is needed.

Usage

<GuardianApproval
chainId="AELF"
networkType="MAINNET"
guardianList={[
{
isLoginAccount: true,
verifier: {
endPoints: ["your endPoints"],
verifierAddresses: ["your verifierAddresses"],
id: "your verifier id",
name: "your verifier name",
imageUrl: "your verifier imageUrl",
},
identifier: "identifier",
guardianType: "Phone",
key: "",
},
]}
/>

API

PropertyDescriptionTypeDefaultVersion
classNameCustomized class namestring-
originChainIdID of the chain where user account is registeredChainId-V1.5.1
targetChainIdID of the chain which the current operation targetsChainId-V1.5.1
headerHeader of guardian list displayReactNode-
guardianListIdentifier information (email, phone, Google ID, Apple ID)BaseGuardianItem[]-
isErrorTipIs error tip set as defaultbooleantrue
wrapperStyleCustomized inline stylesReact.CSSProperties-
operationTypeOperation typeOperationTypeEnum-
onErrorCallback of error(error: {errorFields:string, error: any}) => void;-
onConfirmCallback when guardian approval is completed(guardianList: GuardiansApproved[]) => void;-
onGuardianListChangeCallback when guardian verification starts and guardian list changes(guardianList: GuardiansApproved[]) => void;-
networkTypeNetwork typeMAINNET | TESTNET-V2.0.0