Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

@privy-io/privy-browser

Package Overview
Dependencies
Maintainers
5
Versions
6
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@privy-io/privy-browser - npm Package Compare versions

Comparing version 0.0.1-beta.1 to 0.0.1-beta.2

4

package.json
{
"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>

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc