1.0.0 • Published 6 months ago
@coolwallet/transport-react-native-nfc v1.0.0
transport-react-native-nfc
Introduction
@coolwallet/transport-react-native-nfc
is a TypeScript SDK designed to facilitate NFC (Near Field Communication) interactions, particularly for accessing and managing NFC-enabled CoolWallet Go cards. This SDK provides functions to simplify sending APDU commands to NFC devices.
Features
- NFC Initialization: Easily initialize and configure NFC communication.
- APDU Communication: Send APDU commands.
Installation
To install the SDK, use npm or yarn:
npm install @coolwallet/transport-react-native-nfc
# or
yarn add @coolwallet/transport-react-native-nfc
Usage
import { NFCTransport } from '@coolwallet/transport-react-native-nfc'
import { CardType } from '@coolwallet/core/lib/transport';
const nfcTransport = new NFCTransport(CardType.Go);
const apduCommand = '00A404000E436F6F6C57616C6C65744C495445';
nfcTransport.request(apduCommand, 'someDataPackets')
.then((response) => {
console.log('APDU response:', response);
})
.catch((error) => {
console.error('Failed to send APDU command', error);
});
// use transport in other package:
import CoolWallet from '@coolwallet/wallet'
const wallet = new CoolWallet(transport, appPrivateKey, appId)
1.0.0
6 months ago
1.0.0-beta.7
7 months ago
1.0.0-beta.8
6 months ago
1.0.0-beta.6
1 year ago
1.0.0-beta.4
1 year ago
1.0.0-beta.5
1 year ago
1.0.0-beta.3
1 year ago
1.0.0-beta.2
1 year ago