@privy-io/privy-browser
Advanced tools
Comparing version 0.0.1-beta.1 to 0.0.1-beta.2
{ | ||
"name": "@privy-io/privy-browser", | ||
"version": "0.0.1-beta.1", | ||
"version": "0.0.1-beta.2", | ||
"description": "Browser client for the Privy API", | ||
@@ -39,3 +39,3 @@ "keywords": [ | ||
"@ethersproject/address": "^5.6.0", | ||
"@privy-io/crypto": "0.0.3", | ||
"@privy-io/crypto": "0.0.4", | ||
"axios": "^0.26.1", | ||
@@ -42,0 +42,0 @@ "base64-js": "^1.5.1", |
# @privy-io/privy-browser | ||
Browser client for the Privy API. | ||
Privy's browser client allows you to interact with the Privy API from broswer clients. | ||
For interacting with user data from a node backend, use [@privy-io/privy-node](https://www.npmjs.com/package/@privy-io/privy-node). | ||
https://www.privy.io | ||
![build](https://github.com/privy-io/privy-js/actions/workflows/tests.yml/badge.svg) | ||
[![npm version](https://badge.fury.io/js/@privy-io%2Fbrowser.svg)](https://www.npmjs.com/package/@privy-io/privy-browser) | ||
[![npm version](https://badge.fury.io/js/@privy-io%2Fprivy-browser.svg)](https://www.npmjs.com/package/@privy-io/privy-browser) | ||
## Documentation | ||
See https://docs.privy.io/. | ||
## Installation | ||
@@ -25,5 +31,3 @@ | ||
const session = new CustomSession(async function authenticate() { | ||
const response = await axios.post<{token: string}>( | ||
`/your/custom/endpoint`, | ||
); | ||
const response = await axios.post<{token: string}>(`/your/custom/endpoint`); | ||
return response.data.token; | ||
@@ -40,12 +44,12 @@ }); | ||
```typescript | ||
const userId = "0x123"; | ||
const userId = '0x123'; | ||
// To write... | ||
const [email, ssn] = await client.put(userId, [ | ||
{field: "email", value: "foo@example.com"}, | ||
{field: "ssn", value: "123-45-6789"}, | ||
{field: 'email', value: 'foo@example.com'}, | ||
{field: 'ssn', value: '123-45-6789'}, | ||
]); | ||
// To read... | ||
const [email, ssn] = await client.get(userId, ["email", "ssn"]); | ||
const [email, ssn] = await client.get(userId, ['email', 'ssn']); | ||
console.log(email.text()); | ||
@@ -69,4 +73,8 @@ console.log(ssn.text()); | ||
Some of the tests are currently expected to be run against a running instance of the API. To successfully run those, you will need to create a `.env` file in the root of this repo with the following fields: | ||
Some of the tests are currently expected to be run against a running instance of the API. | ||
Reset data in the API instance before running tests, e.g. by recreating and seeding the test database. | ||
To successfully run tests, you will need to create a `.env` file in the root of `./privy-browser` with the following fields: | ||
``` | ||
@@ -73,0 +81,0 @@ PRIVY_API_URL=<privy api url> |
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
106549
89
+ Added@privy-io/crypto@0.0.4(transitive)
- Removed@privy-io/crypto@0.0.3(transitive)
Updated@privy-io/crypto@0.0.4