mirror of
https://github.com/selfxyz/self.git
synced 2026-04-05 03:00:53 -04:00
Chore/update readme (#203)
This commit is contained in:
@@ -2,13 +2,13 @@
|
||||
## Install
|
||||
You can install with this command
|
||||
```
|
||||
npm i @openpassport/core
|
||||
npm i @selfxyz/core
|
||||
```
|
||||
|
||||
## Initialize
|
||||
You should have CELO_RPC_URL and SCOPE in your environment or somewhere in your code.
|
||||
```typescript
|
||||
import { SelfBackendVerifier } from "@openpassport/core";
|
||||
import { SelfBackendVerifier } from "@selfxyz/core";
|
||||
|
||||
const selfBackendVerifier = new SelfBackendVerifier(
|
||||
process.env.CELO_RPC_URL as string,
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
# Installation
|
||||
|
||||
```bash
|
||||
yarn add @openpassport/sdk
|
||||
yarn add @selfxyz/sdk
|
||||
```
|
||||
|
||||
# Generate a QR code
|
||||
@@ -9,7 +9,7 @@ yarn add @openpassport/sdk
|
||||
### Create an AppType type object:
|
||||
|
||||
```typescript
|
||||
import { AppType } from '@openpassport/sdk';
|
||||
import { AppType } from '@selfxyz/sdk';
|
||||
const appName = '🤠 Cowboy App';
|
||||
const scope = 'cowboyApp';
|
||||
const userID = 'user1234';
|
||||
@@ -42,7 +42,7 @@ Use the appType object defined above to generate a QR code.
|
||||
The generated QR code is an `HTML element` that you can display in your app.
|
||||
|
||||
```typescript
|
||||
import { QRCodeGenerator } from '@openpassport/sdk';
|
||||
import { QRCodeGenerator } from '@selfxyz/sdk';
|
||||
|
||||
// [...] define cowboyApp as described above
|
||||
|
||||
@@ -56,7 +56,7 @@ const qrCode: HTMLElement = await QRCodeGenerator.generateQRCode(cowboyApp);
|
||||
To use the `OpenPassportVerifier`, import and initialize it as follows:
|
||||
|
||||
```typescript
|
||||
import { OpenPassportVerifier } from '@openpassport/sdk';
|
||||
import { OpenPassportVerifier } from '@selfxyz/sdk';
|
||||
const verifier = new OpenPassportVerifier({
|
||||
scope: 'cowboyApp',
|
||||
requirements: [
|
||||
|
||||
Reference in New Issue
Block a user