fun checkIntentPage(intent: Intent, callback: ((tagId: String, result: String)
Success return:aid#serial#publicKey
Uninitialized return:aid#serial#6D05
fun initCard(version: String, password: String, initString: String)
version:Version(01,02,03,...)
password: Device password (6-digit number)
initStr: privateKeyHex + publicKeyHex + crc8Hex(privateKeyHex + publicKeyHex)
Success return:aid#serial#publicKey
fun verifyPassword(word: String)
word: Device password (6-digit number)
Success return:9A00
fun writePassword(newPassword: String)
newPassword: Device password (6-digit number)
Success return:9A00
fun changePassword(oldPassword: String, newPassword: String)
oldPassword: Device password (6-digit number)
newPassword: New password (6-digit number)
Success return:9A00
fun transferBTC(word: String)
password: Device password (6-digit number)
Success return:9A00
fun signBTC(command: String, password: String)
command: single input transaction hex([0x80, 0x80, 0x04, 0x00, hashLength, 0x02, hashData])
password: Device password (6-digit number)
Success return:xxxxxxxx9A00
fun transferEVMAndTRX(version: String, hash: String, password: String)
version:Version(01,02,03,...)
password: Device password (6-digit number)
hashStr: Transaction hash string
Success return:rs string - the first 6 characters have no practical use; characters 6-7 are a hexadecimal number (its value ×2 is the character length of r segment (leftLen)), the r segment starts at character 8; after the r segment, the hexadecimal number from position 10+leftLen to 12+leftLen (its value ×2 is the character length of s segment) determines the length of s segment, and the s segment starts at position 12+leftLen
fun readSeed(password: String, isOnlyRead: Boolean, seed: String)
password: Device password (6-digit number)
isOnlyRead: Whether it is read-only; if not, writing will be performed when the read result is empty
seed:Mnemonic phrase to be written
Success return:9A00
fun writeSeed(password: String, seed: String)
password: Device password (6-digit number)
seed:Mnemonic phrase to be written
Success return:9A00
fun read2fa(password: String)
password: Device password (6-digit number)
Success return:xxxxxxxx9A00 - The first two hexadecimal characters represent the length of the tag, followed by the ASCII value of the tag.
For example: 0170026F6F9A00
01 indicates that the first tag has a length of 1, and 70 represents the ASCII value of the tag 'p';
02 indicates that the second tag has a length of 2, and 6F6F represents the ASCII value of the second tag 'oo'.
ffun write2fa(hashStr: String, password: String)
password: Device password (6-digit number)
hashStr:name and private hex([(name.len + private.len).toBytes, nameBytes, privateBytes])
Success return:xxxxxxxx9A00 - The first two hexadecimal characters represent the length of the tag, followed by the ASCII value of the tag.
For example: 0170026F6F9A00
01 indicates that the first tag has a length of 1, and 70 represents the ASCII value of the tag 'p';
02 indicates that the second tag has a length of 2, and 6F6F represents the ASCII value of the second tag 'oo'.
fun get2fa(hashStr: String)
hashStr: tag length and tag hex(0170, 026F6F, ...)
Success return:xxxxxxxx9A00 - When the NFC command completes successfully (Status Word 0x9A00), the preceding response data must be processed using the platform-provided 2FA derivation mechanism. The response data should be treated as an opaque value and must not be interpreted or transformed directly by the application. The derivation process produces a deterministic, numeric verification code that is always exactly six digits in length and left-padded with zeros if necessary. Applications should rely exclusively on the official SDK or utility method to obtain the final 2FA code.
fun delete2fa(hashStr: String, password: String)
password: Device password (6-digit number)
hashStr: tag length and tag hex(0170, 026F6F, ...)
Success return:9A00
-1-- Multiple devices scanned at one time-2-- Unsupported device-3-- Device unavailable-4-- Incorrect aid length-5-- Version error-6-- Password not set-7-- No device detected-999-- Unknown error9A00-- Success6D01-- Initialization failed6D05-- Uninitialized6D07-- Incorrect password length6D0C-- Password verification failed6D00-- 10 consecutive verification failures, device locked
Note: When verifying the password, 6D0C will be returned for the first error; subsequent failures will return 6D09, 6D08, 6D07, ... , 6D00 in sequence