@digiv3rse/client
v2.1.3
Published
Low level DiGi API client
Downloads
4
Maintainers
Readme
DiGi JavaScript SDK
The official framework-agnostic JavaScript SDK for DiGi Protocol.
This package enables you to interact with the DiGi API via a type safe interface that abstracts away some of the GraphQL intricacies.
Documentation
Quick start
Install the DiGi React Native SDK package using your package manager of choice:
| Package Manager | Command |
| :-------------: | :----------------------------------------- |
| npm | npm install @digiv3rse/client@latest
|
| yarn | yarn add @digiv3rse/client@latest
|
| pnpm | pnpm add @digiv3rse/client@latest
|
Development configuration example:
import { DiGiClient, development } from '@digiv3rse/client';
const client = new DiGiClient({
environment: development,
});
Production configuration example:
import { DiGiClient, production } from '@digiv3rse/client';
const client = new DiGiClient({
environment: production,
});
In a browser-based implementation you can use the Web Storage API to persist authentication state.
const client = new DiGiClient({
environment: production,
storage: window.localStorage,
});