https://github.com/spruceid/mobile-sdk-react
React Native Mobile SDK
https://github.com/spruceid/mobile-sdk-react
identity mdl ssi wallet
Last synced: 10 months ago
JSON representation
React Native Mobile SDK
- Host: GitHub
- URL: https://github.com/spruceid/mobile-sdk-react
- Owner: spruceid
- License: apache-2.0
- Created: 2024-01-10T14:53:44.000Z (over 2 years ago)
- Default Branch: main
- Last Pushed: 2024-11-04T08:30:36.000Z (over 1 year ago)
- Last Synced: 2024-12-03T07:09:47.232Z (over 1 year ago)
- Topics: identity, mdl, ssi, wallet
- Language: TypeScript
- Homepage: http://spruceid.github.io/wallet-sdk-react/
- Size: 2.04 MB
- Stars: 0
- Watchers: 6
- Forks: 0
- Open Issues: 2
-
Metadata Files:
- Readme: README.md
- Contributing: CONTRIBUTING.md
- License: LICENSE-APACHE
Awesome Lists containing this project
README
[](https://www.npmjs.com/package/@spruceid/react-native-mobile-sdk)
[](https://spruceid.github.io/mobile-sdk-react/)
# SpruceID Mobile SDK for React Native
> [!IMPORTANT]
> This repo has been archived in favor of a monorepo, please see https://github.com/spruceid/sprucekit-mobile.
## Maturity Disclaimer
In its current version, Mobile SDK has not yet undergone a formal security audit
to desired levels of confidence for suitable use in production systems. This
implementation is currently suitable for exploratory work and experimentation
only. We welcome feedback on the usability, architecture, and security of this
implementation and are committed to a conducting a formal audit with a reputable
security firm before the v1.0 release.
## Installation
```sh
npm install @spruceid/react-native-mobile-sdk
```
### iOS
Add to the app's info.plist
```xml
NSBluetoothAlwaysUsageDescription
Secure transmission of mobile DL/ID data
```
### Android
Add to the `AndroidManifest.xml`
```xml
```
In addition to the manifest, on newer Android versions your applications will
also need to trigger a dialogue prompt. [You can refer to this documentation for more information](https://reactnative.dev/docs/permissionsandroid)
```js
await PermissionsAndroid.requestMultiple([
'android.permission.ACCESS_FINE_LOCATION',
'android.permission.BLUETOOTH_CONNECT',
'android.permission.BLUETOOTH_SCAN',
'android.permission.BLUETOOTH_ADVERTISE',
]);
```
## Usage
```js
import { createMdocFromCbor } from '@spruceid/react-native-mobile-sdk';
// ...
const mdoc = await createMdocFromCbor(mdocCborBase64);
```
For more, see [the documentation](https://spruceid.github.io/mobile-sdk-react/).
## Contributing
See the [contributing guide](https://github.com/spruceid/mobile-sdk-react/blob/main/CONTRIBUTING.md)
to learn how to contribute to the repository and the development workflow.
## Architecture
Our Mobile SDKs use shared code, with most of the logic being written once in
Rust, and when not possible, native APIs (e.g. Bluetooth, OS Keychain) are
called in native SDKs.
```
┌────────────┐
│React Native│
└──────┬─────┘
│
┌────┴────┐
┌───▼──┐ ┌──▼──┐
│Kotlin│ │Swift│
└───┬──┘ └──┬──┘
└────┬────┘
│
┌──▼─┐
│Rust│
└────┘
```
- [Kotlin SDK](https://github.com/spruceid/mobile-sdk-kt)
- [Swift SDK](https://github.com/spruceid/mobile-sdk-swift)
- [Rust layer](https://github.com/spruceid/mobile-sdk-rs)