Chore/update readme (#203)

This commit is contained in:
nicoshark
2025-02-22 15:14:51 -08:00
committed by GitHub
parent 2155bf95a5
commit 002b383ea9
2 changed files with 6 additions and 6 deletions

View File

@@ -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,

View File

@@ -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: [