Methods
Methods can be used after initializing the Wepin PIN Pad Library.
generateRegistrationPINBlock
To display the PIN pad screen to receive the PIN required for wallet creation and user registration, process the entered PIN to create a PIN Block.
Parameters
<void>
Return value
Promise
<RegistrationPinBlock>UVD
<EncUVD>b64Data
<string> Data encrypted with the original key ofb64SKey
.b64SKey
<string> The key used to generateb64Data
.seqNum
<number> optional A value used to verify that PIN Blocks are used in sequential order.
hint
<EncPinHint>data
<string> The encrypted value of the PIN hint.length
<string> The length of the PIN hint.version
<number> The version of the PIN hint.
Example
generateAuthPINBlock
To display the PIN pad screen to receive the PIN required for user authentication and process the entered PIN to create a PIN Block. If the user has enabled 2FA (OTP), display a screen to receive the OTP code and process it as well.
Parameters
count
<number> optionalThe number of PIN Blocks to be generated. The default value is 1.
Return value
Promise
<AuthPinBlock>UVDs
<EncUVD[]> A list of encrypted PIN Blocks.UVD
<EncUVD>b64Data
<string> Data encrypted with the original key ofb64SKey
.b64SKey
<string> The key used to generateb64Data
.seqNum
<number> optional A value used to verify that PIN Blocks are used in sequential order. In a Multi Tx request, PIN Blocks must be used strictly in the received order (1, 2, 3...).
otp
<string> optional The OTP code entered by the user if they have enabled 2FA (OTP).
Example
generateChangePINBlock
To display the PIN pad screen to receive the PIN required for the user to change their PIN and process the entered PIN to create a PIN Block. If the user has enabled 2FA (OTP), display a screen to receive the OTP code and process it as well.
Parameters
<void>
Return Value
Promise
<ChangePinBlock>UVD
<EncUVD>b64Data
<string> Data encrypted with the original key ofb64SKey
.b64SKey
<string> The key used to generateb64Data
.seqNum
<number> optional A value used to verify that PIN Blocks are used in sequential order.
newUVD
<EncUVD>b64Data
<string> Data encrypted with the original key ofb64SKey
.b64SKey
<string> The key used to generateb64Data
.seqNum
<number> optional A value used to verify that PIN Blocks are used in sequential order.
hint
<EncPinHint>data
<string> The encrypted value of the PIN hint.length
<string> The length of the PIN hint.version
<number> The version of the PIN hint.
otp
<string> optional The OTP code entered by the user if they have enabled 2FA (OTP).
Example
generateAuthOTP
Display a screen to receive the OTP code from the user and process it.
Parameters
<void>
Return Value
Promise
<AuthOTP>code
<string> The entered OTP code.
Example
finalize
It terminates the use of the Wepin PIN Pad Library.
Parameters
<void>
Return Value
<void>
Example
Last updated