A React Native JS library to enable easy communication with TAPSIGNER™ and SATSCARD™.
-==[Request card development samples here]==-
See the python library by Coinkite for protocol specifications.
yarn add coinkite-tap-protocol
This library uses a few node core modules like secp256k1, buffer, crypto etc. which react native doesn't support because they probably use C++ code bundled with the Node JS binary, not Javascript.
We suggest using rn-nodify to enable using node core modules after yarn add coinkite-tap-protocol
rn-nodify needs stream-browserify for browser support.
metro.cofig.js
...
resolver: {
extraNodeModules: {
stream: require.resolve('stream-browserify'),
},
},
transformer: {
...
},
...
react-native-nfc-manager is used for the NFC communications with the cards. Please refer to their docs for nfc integration.
-
add the post install script in your package.json
"postinstall": "rn-nodeify --install fs,dgram,process,path,console,crypto --hack"
-
install the required modules
yarn add coinkite-tap-protocol rn-nodify stream-browserify react-native-nfc-manager
-
update metro config resolver
extraNodeModules: {
stream: require.resolve('stream-browserify'),
}
- install respoective cocopod dependencies
cd ios && pod install