Introducing The Sweep: OX’s New Live Security Research Series
Register Now
Breaking: The 2026 Vulnpocalypse Hits PHP: Four Critical RCEs, but How Dangerous Are They?
Read the Report
Are you exposed? Connect your apps in minutes.
Scan your apps free

@ukeyfe/nfc-signing-sdk

Latest version: v1.0.5

Overview

Last scanned
1 Dec 2026
Published
1 Dec 2026
npm package Publisher: ukeywallet
5 Versions
513 Downloads

Scan summary

@ukeyfe/nfc-signing-sdk was last scanned on 1 Dec 2026 at version 1.0.5. Risk score 0 of 100. No malicious behavior was detected.

  • Releases: 5 versions; the latest 2 were published within 6 days (26 Nov – 1 Dec 2026).
  • Findings: No rules fired in version 1.0.5.
  • Downloads: 513 downloads.

Versions

5 versions published
Versions and the rules that fired in each
VersionPublishedStatus
1.0.5 LATEST 1 Dec 2026 No rules fired
1.0.4 26 Nov 2026 No rules fired
1.0.3 20 Nov 2026 No rules fired
1.0.2 26 Oct 2026 Not shown
1.0.1 22 Oct 2026 Not shown

No rules fired in 1.0.5

Findings

Findings for v1.0.5. The score is a capped sum of the weights of the rules that fired — not CVSS, not exploitability, and not a probability. It is not comparable across packages with different scan coverage.

The score describes 1.0.5; other versions have their own rules, not their own score.

README

The publisher’s own README, as collected from the registry.

@ukeyfe/nfc-signing-sdk

TypeScript SDK for integrating THD89 NFC smart cards into wallet applications. The package provides card session management, encrypted APDU communication, key derivation, hardware signing, mnemonic backup, and chain-specific transaction utilities.

Hardware operations use a pluggable transport. The included NFC adapter targets React Native; Node.js applications and other hosts can use the encoding utilities, mock transport, or a custom transport implementation.

Installation

npm install @ukeyfe/nfc-signing-sdk

Runtime dependencies are installed automatically. The published package contains CommonJS JavaScript and TypeScript declarations. Node.js consumers require Node.js 20.x from 20.19, or Node.js 22.12 and later (^20.19.0 || >=22.12.0), which can load the SDK's ESM cryptography dependencies from CommonJS.

React Native

For the built-in React Native NFC transport, install the NFC module and random-values polyfill:

npm install react-native-nfc-manager react-native-get-random-values

Load the random-values polyfill before importing the SDK in your application entry point:

import 'react-native-get-random-values';

Configure NFC permissions and native capabilities, then rebuild the application. Use a physical NFC-capable device with compatible THD89 firmware. Expo applications require a native development build; Expo Go does not include the NFC module. The demo guide describes the repository's native setup.

Optional persistent storage

@react-native-async-storage/async-storage is optional. Install it if you want the SDK to use AsyncStorage for device credentials:

npm install @react-native-async-storage/async-storage

When available, the SDK selects it automatically; otherwise it falls back to in-memory storage. Applications can supply their own IStorageAdapter with NfcSigningSdk.setStorage(). Node.js consumers and applications using custom transports do not need the React Native packages above.

Native bundlers may resolve optional imports at build time. If you omit an optional integration in a Metro application, configure the bundler to allow optional dependencies as needed; npm's optional-peer metadata does not control Metro resolution.

Optional NEO integration

NEO helpers that use neon-js require a separate optional dependency:

npm install @cityofzion/neon-js@^5.9.0

Metro may also require this package when resolving the SDK's root exports, even if your application does not call the NEO helpers.

Sign an EVM transaction hash

The host prepares the transaction hash. The card derives the requested key and signs the hash inside a managed NFC session. This example requires an initialized card with wallet assets and its PIN; it does not initialize the wallet or broadcast a transaction.

import {
  eip1559TxHash,
  hexToBytes,
  thd89DeriveKey,
  thd89GetPubkey,
  thd89Sign,
  withTHD89Card,
} from '@ukeyfe/nfc-signing-sdk';

export async function signEvmTransactionHash(pin: string) {
  // Replace these example values with the transaction approved by your user.
  const { hash } = eip1559TxHash({
    chainId: 1,
    nonce: 0,
    maxPriorityFeePerGas: 1_000_000_000n,
    maxFeePerGas: 20_000_000_000n,
    gasLimit: 21_000,
    to: '0x0000000000000000000000000000000000000001',
    value: 100_000_000_000_000_000n,
    data: '0x',
  });

  return withTHD89Card(async (transceive, channel) => {
    await thd89DeriveKey(transceive, channel, pin, '00', "m/44'/60'/0'/0/0");
    const publicKey = await thd89GetPubkey(transceive, channel, pin, '00');
    const signature = await thd89Sign(
      transceive, channel, pin, '00', 0x00, hexToBytes(hash),
    );
    return { hash, publicKey, signature };
  }, { alertMessage: 'Hold your card near the NFC reader.' });
}

withTHD89Card() connects, selects the card application, performs the configured application/channel setup, invokes the callback, and disconnects in a finally block. Keep related card operations inside the same callback.

thd89GetPubkey() and thd89Sign() return { hex, bytes }. For algorithm '00', the public key is 64 bytes (X || Y, without the 04 prefix), and the signature is 64 bytes (r || s). To assemble an EVM transaction, normalize the signature with toLowS(), determine the recovery ID with findRecoveryId() and the public key, then call buildEip1559SignedTx() or buildLegacySignedTx(). Broadcasting is a separate operation.

Back up a mnemonic

Mnemonic backup uses the Oscar 83 01 / 83 02 commands. It is separate from creating or importing the card's cold-wallet assets. A backup can contain 1–460 bytes and requires a 6–32 byte password.

import {
  readMnemonicWithCard,
  writeMnemonicWithCard,
} from '@ukeyfe/nfc-signing-sdk';

export async function storeMnemonic(pin: string, mnemonic: string | string[]) {
  return writeMnemonicWithCard(pin, mnemonic, {
    overwrite: false,
    onProgress: (written, total) => {
      console.log(`Backup progress: ${written}/${total} bytes`);
    },
  });
}

export async function restoreMnemonic(pin: string) {
  return readMnemonicWithCard(pin);
}

The SDK normalizes whitespace, encodes UTF-8, and handles chunked transfer. No manual hexadecimal conversion is required. The write result contains cleanMnemonic, wordCount, bytesWritten, and overwritten.

Behavior to account for in your application:

  • Strict mnemonic mode accepts 12, 15, 18, 21, or 24 alphabetic English words. It checks format and word count; it does not validate the BIP-39 word list or checksum.
  • overwrite defaults to true. Set it to false to reject an existing backup, as above, or provide onConfirmOverwrite to ask the user before replacement. No confirmation UI is displayed automatically.
  • autoCreatePassword defaults to true: if an append operation reports 6F0D, the SDK attempts password creation using 83 A1 before retrying. createPasswordWithCard() also exposes password creation separately.
  • writeHotWalletBackupWithCard() and readHotWalletBackupWithCard() handle raw backup data. Read results include bytes, hex, and, when decodable, text/mnemonic fields. These fields do not certify mnemonic validity.

TON signing callback

signTonCellHash() expects its callback to return the raw 64-byte Ed25519 signature. Use the bytes field returned by thd89Sign():

import {
  signTonCellHash,
  thd89DeriveKey,
  thd89Sign,
  TON_DERIVATION_PATH,
  withTHD89Card,
} from '@ukeyfe/nfc-signing-sdk';

export async function signTonHash(pin: string, cellHash: Uint8Array) {
  return withTHD89Card(async (transceive, channel) => {
    await thd89DeriveKey(transceive, channel, pin, '01', TON_DERIVATION_PATH);
    return signTonCellHash(async (hash) => {
      const signature = await thd89Sign(transceive, channel, pin, '01', 0x00, hash);
      return signature.bytes;
    }, cellHash);
  });
}

Pass a 32-byte cell representation hash. ed25519PubKeyToTonAddress() derives a Wallet V4R2 address; it is not a generic address constructor for every TON wallet contract.

For TRON, the signing callback passed to signTronHash() may return the { hex } result from thd89Sign() directly. Pass publicKey.hex as the third argument to signTronHash() so the helper can determine the recovery ID; without it, the helper defaults to zero.

API overview

Area Main exports Scope
Card sessions withTHD89Card, withOscarCard, NfcSigningSdk Connection lifecycle and secure-channel setup
Transport ITransport, ReactNativeNfcTransport, MockTransport Native NFC, custom host integration, and offline tests
Device management thd89GetDeviceInfo, thd89GetSerialNumber, parseDeviceFormFactor, parseUkeySerialNumber Device metadata and UKEY Base34 serial classification
Wallet management thd89InitUser, thd89ChangePin, thd89ImportBackup Firmware-specific wallet and credential operations
Signing thd89DeriveKey, thd89GetPubkey, thd89Sign Hardware key derivation, public keys, and signatures
Backup writeMnemonicWithCard, readMnemonicWithCard, createPasswordWithCard Mnemonic backup and password initialization
Storage IStorageAdapter, MemoryStorageAdapter, setStorageAdapter Device credential storage
Firmware thd89DfuParseFirmware, thd89DfuSessionStep Firmware package selection and resumable transfer steps

NfcSigningSdk is a static facade, also exported as the default export. Individual functions and types are available as named exports. Use the bundled TypeScript declarations for complete signatures.

Chain utilities
Chain / family Included utilities
EVM Legacy and EIP-1559 encoding, ERC-20 call data, EIP-191/EIP-712 hashing, RPC helpers
TRON Address conversion, TRC-20 call data, signature formatting, transaction creation and broadcast helpers
TON Wallet V4R2 addresses, cell/BOC serialization, transfer payloads and broadcast helpers
Solana Base58 encoding, native SystemProgram transfer messages and transaction serialization
Bitcoin Legacy, SegWit and Taproot addresses; SegWit/Taproot sighashes, transaction serialization and network helpers
Kaspa Address encoding, Blake2b signing hashes and transaction helpers
CryptoNote Key/address derivation, stealth-address and ring-signature primitives
NEO N3 Local-key address and GAS transfer helpers via optional neon-js

These utilities have different levels of coverage. Local-key helpers operate on the host; they do not route signing through the card automatically. Applications must supply the correct derivation scheme, algorithm, signing mode, network parameters, and payload for their device firmware and chain.

Custom transports and storage

Use NfcSigningSdk.setTransport(transport) to set a default ITransport, or pass { transport } / { transceive } to a card session. A custom transceive receives an APDU byte array and returns the response bytes, including the status word. When only transceive is supplied, the caller manages the underlying connection.

MockTransport provides predefined APDU responses with mapApdu() and programmable responses with setHandler(). It does not emulate an initialized card or its cryptography automatically. A browser NFC transport is not included.

Storage adapters implement asynchronous getItem, setItem, and removeItem. Also implement the optional getAllKeys() method to let channel setup discover and reuse saved device bindings. Device credentials can include passwords; select an adapter appropriate for the host application's storage requirements. The in-memory adapter does not persist across restarts.

Errors and firmware sessions

Card command failures use THD89Error, with a message and an optional numeric sw status word. Transport failures use TransportError or its subclasses. isUserCancelError(error) identifies canceled NFC sessions. Match error types and status words instead of localized message text.

Firmware helpers expose transfer and resume operations; the application remains responsible for obtaining a compatible firmware image, reconnecting between NFC sessions, and retaining resume state. thd89DfuSessionStep() uses a configurable session budget; it does not establish or renew an NFC session itself. See the demo's bootloader screen for orchestration.

Development and license

See the repository guide for build and test instructions.

Licensed under the ISC License. You may use, copy, modify, and redistribute this SDK free of charge, including for commercial purposes, provided that the copyright and permission notices are retained. See the license for the full terms.

OX Radar and Response Center

Find threats in your stack.

OX Radar can check high-priority threats, like critical package CVEs, against your context.

Each incident is marked Detected or Not Detected with a remediation plan and proof all tracked in the Response Center.

Where it’s listed

The probe returned only these fields for this server — auth requirement, protocol and tool list weren’t observed, so they’re not shown (never guessed).

  • npm @ukeyfe/nfc-signing-sdk

References

The publisher’s own links, as the registry reports them. These are not sources for the assessment on this page.

Powered by Read the latest findings

Scan your whole stack

Group 1261154050 1
Group 1261154050
 

From OX Research Newsroom

Copy of Template Design OX Blog (1)
Research

Thousands Of GitHub Accounts Hijacked With wfx-loot CI Secret Stealing Malware Via GitHub Actions & npm

Cry2Wolf: How to Tell a Real Bug from a Nothingburger
AI & VibeSec

Cry2Wolf: Not Every Branded Bug Deserves a Fire Drill

CVE

Java4Shell (CVE-2026-114938): Easy to Crash, Hard to Exploit — Less Than 0.12% of JVMs Estimated at Risk of RCE

Frame 2085668439 (1)
Group 1261154229