1.0.2 • Published 4 months ago

@digitalcredentials/data-integrity-rn v1.0.2

Weekly downloads
-
License
MIT
Repository
github
Last release
4 months ago

Data Integrity Polyfill for React Native (@digitalcredentials/data-integrity-rn)

Build status NPM Version

React Native polyfill for globals required for Data Integrity and VC apps (TextEncoder, crypto.subtle, etc).

Table of Contents

Background

There are several global objects such as TextEncoder and crypto that are present in Node.js and most browsers, but not in React Native.

This is a polyfill for these objects, which exports the following globals:

  • TextEncoder and TextDecoder
  • crypto and crypto.subtle (WebCryptography API)

Install

  • Node.js 20+ is recommended.

NPM

To install via NPM:

npm install @digitalcredentials/data-integrity-rn

Development

To install locally (for development):

git clone https://github.com/digitalcredentials/data-integrity-rn.git
cd data-integrity-rn
npm install

Usage

When developing for React Native and using various Digital Bazaar or DCC provided libraries such as jsonld or @digitalcredentials/vc, make sure to import this polyfill before importing the libraries:

import '@digitalcredentials/data-integrity-rn'
// Now you can import various libraries
import '@digitalcredentials/vc'
// ...

Contribute

PRs accepted.

If editing the Readme, please conform to the standard-readme specification.

License

MIT License © 2023 Digital Credentials Consortium.

1.0.2

4 months ago

1.0.1

4 months ago

1.0.0

9 months ago