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

@privy-io/js-sdk-core

Package Overview
Dependencies
Maintainers
8
Versions
725
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@privy-io/js-sdk-core - npm Package Compare versions

Comparing version 0.3.0-beta-20230927205941 to 0.3.0-beta-20230928004335

dist/index.mjs

568

dist/index.d.ts

@@ -15,73 +15,3 @@ import EventEmitter from "eventemitter3";

*/
syncWithToken(token: string): Promise<{
token: string | null;
refresh_token: string | null;
user: {
id: string;
created_at: number;
linked_accounts: ({
type: "email";
address: string;
verified_at: number;
} | {
type: "phone";
phoneNumber: string;
verified_at: number;
} | {
type: "wallet";
address: string;
verified_at: number;
chain_type: "ethereum";
wallet_client: "unknown";
chain_id?: string | undefined;
wallet_client_type?: string | undefined;
connector_type?: string | undefined;
} | {
type: "wallet";
address: string;
verified_at: number;
chain_id: "eip155:1";
chain_type: "ethereum";
wallet_client: "privy";
wallet_client_type: "privy";
connector_type: "embedded";
recovery_method: "privy" | "user-passcode";
} | {
type: "google_oauth";
name: string | null;
email: string;
subject: string;
verified_at: number;
} | {
type: "twitter_oauth";
name: string | null;
subject: string;
verified_at: number;
username: string | null;
} | {
type: "discord_oauth";
email: string | null;
subject: string;
verified_at: number;
username: string | null;
} | {
type: "github_oauth";
name: string | null;
email: string | null;
subject: string;
verified_at: number;
username: string | null;
} | {
type: "apple_oauth";
email: string | null;
subject: string;
verified_at: number;
} | {
type: "custom_auth";
verified_at: number;
custom_user_id: string;
})[];
};
is_new_user?: boolean | undefined;
}>;
syncWithToken(token: string): Promise<import("@privy-io/public-api").IAuthenticatedUser>;
}

@@ -96,5 +26,3 @@ declare class Email {

*/
sendCode(email: string, token?: string): Promise<{
success: boolean;
}>;
sendCode(email: string, token?: string): Promise<import("@privy-io/public-api").ISuccessObject>;
/**

@@ -106,73 +34,3 @@ * Logs a user in via an email address and one time code

*/
loginWithCode(email: string, code: string): Promise<{
token: string | null;
refresh_token: string | null;
user: {
id: string;
created_at: number;
linked_accounts: ({
type: "email";
address: string;
verified_at: number;
} | {
type: "phone";
phoneNumber: string;
verified_at: number;
} | {
type: "wallet";
address: string;
verified_at: number;
chain_type: "ethereum";
wallet_client: "unknown";
chain_id?: string | undefined;
wallet_client_type?: string | undefined;
connector_type?: string | undefined;
} | {
type: "wallet";
address: string;
verified_at: number;
chain_id: "eip155:1";
chain_type: "ethereum";
wallet_client: "privy";
wallet_client_type: "privy";
connector_type: "embedded";
recovery_method: "privy" | "user-passcode";
} | {
type: "google_oauth";
name: string | null;
email: string;
subject: string;
verified_at: number;
} | {
type: "twitter_oauth";
name: string | null;
subject: string;
verified_at: number;
username: string | null;
} | {
type: "discord_oauth";
email: string | null;
subject: string;
verified_at: number;
username: string | null;
} | {
type: "github_oauth";
name: string | null;
email: string | null;
subject: string;
verified_at: number;
username: string | null;
} | {
type: "apple_oauth";
email: string | null;
subject: string;
verified_at: number;
} | {
type: "custom_auth";
verified_at: number;
custom_user_id: string;
})[];
};
is_new_user?: boolean | undefined;
}>;
loginWithCode(email: string, code: string): Promise<import("@privy-io/public-api").IAuthenticatedUser>;
/**

@@ -184,134 +42,4 @@ * Links an email adress to an existing user

*/
linkWithCode(email: string, code: string): Promise<{
id: string;
created_at: number;
linked_accounts: ({
type: "email";
address: string;
verified_at: number;
} | {
type: "phone";
phoneNumber: string;
verified_at: number;
} | {
type: "wallet";
address: string;
verified_at: number;
chain_type: "ethereum";
wallet_client: "unknown";
chain_id?: string | undefined;
wallet_client_type?: string | undefined;
connector_type?: string | undefined;
} | {
type: "wallet";
address: string;
verified_at: number;
chain_id: "eip155:1";
chain_type: "ethereum";
wallet_client: "privy";
wallet_client_type: "privy";
connector_type: "embedded";
recovery_method: "privy" | "user-passcode";
} | {
type: "google_oauth";
name: string | null;
email: string;
subject: string;
verified_at: number;
} | {
type: "twitter_oauth";
name: string | null;
subject: string;
verified_at: number;
username: string | null;
} | {
type: "discord_oauth";
email: string | null;
subject: string;
verified_at: number;
username: string | null;
} | {
type: "github_oauth";
name: string | null;
email: string | null;
subject: string;
verified_at: number;
username: string | null;
} | {
type: "apple_oauth";
email: string | null;
subject: string;
verified_at: number;
} | {
type: "custom_auth";
verified_at: number;
custom_user_id: string;
})[];
}>;
unlink(email: string): Promise<{
id: string;
created_at: number;
linked_accounts: ({
type: "email";
address: string;
verified_at: number;
} | {
type: "phone";
phoneNumber: string;
verified_at: number;
} | {
type: "wallet";
address: string;
verified_at: number;
chain_type: "ethereum";
wallet_client: "unknown";
chain_id?: string | undefined;
wallet_client_type?: string | undefined;
connector_type?: string | undefined;
} | {
type: "wallet";
address: string;
verified_at: number;
chain_id: "eip155:1";
chain_type: "ethereum";
wallet_client: "privy";
wallet_client_type: "privy";
connector_type: "embedded";
recovery_method: "privy" | "user-passcode";
} | {
type: "google_oauth";
name: string | null;
email: string;
subject: string;
verified_at: number;
} | {
type: "twitter_oauth";
name: string | null;
subject: string;
verified_at: number;
username: string | null;
} | {
type: "discord_oauth";
email: string | null;
subject: string;
verified_at: number;
username: string | null;
} | {
type: "github_oauth";
name: string | null;
email: string | null;
subject: string;
verified_at: number;
username: string | null;
} | {
type: "apple_oauth";
email: string | null;
subject: string;
verified_at: number;
} | {
type: "custom_auth";
verified_at: number;
custom_user_id: string;
})[];
}>;
linkWithCode(email: string, code: string): Promise<import("@privy-io/public-api").IUser>;
unlink(email: string): Promise<import("@privy-io/public-api").IUser>;
}

@@ -326,5 +54,3 @@ declare class Phone {

*/
sendCode(phoneNumber: string, token?: string): Promise<{
success: boolean;
}>;
sendCode(phoneNumber: string, token?: string): Promise<import("@privy-io/public-api").ISuccessObject>;
/**

@@ -336,73 +62,3 @@ * Logs a user in via a phone number and one time code

*/
loginWithCode(phoneNumber: string, code: string): Promise<{
token: string | null;
refresh_token: string | null;
user: {
id: string;
created_at: number;
linked_accounts: ({
type: "email";
address: string;
verified_at: number;
} | {
type: "phone";
phoneNumber: string;
verified_at: number;
} | {
type: "wallet";
address: string;
verified_at: number;
chain_type: "ethereum";
wallet_client: "unknown";
chain_id?: string | undefined;
wallet_client_type?: string | undefined;
connector_type?: string | undefined;
} | {
type: "wallet";
address: string;
verified_at: number;
chain_id: "eip155:1";
chain_type: "ethereum";
wallet_client: "privy";
wallet_client_type: "privy";
connector_type: "embedded";
recovery_method: "privy" | "user-passcode";
} | {
type: "google_oauth";
name: string | null;
email: string;
subject: string;
verified_at: number;
} | {
type: "twitter_oauth";
name: string | null;
subject: string;
verified_at: number;
username: string | null;
} | {
type: "discord_oauth";
email: string | null;
subject: string;
verified_at: number;
username: string | null;
} | {
type: "github_oauth";
name: string | null;
email: string | null;
subject: string;
verified_at: number;
username: string | null;
} | {
type: "apple_oauth";
email: string | null;
subject: string;
verified_at: number;
} | {
type: "custom_auth";
verified_at: number;
custom_user_id: string;
})[];
};
is_new_user?: boolean | undefined;
}>;
loginWithCode(phoneNumber: string, code: string): Promise<import("@privy-io/public-api").IAuthenticatedUser>;
/**

@@ -414,134 +70,4 @@ * Links a phone number to an existing user

*/
linkWithCode(phoneNumber: string, code: string): Promise<{
id: string;
created_at: number;
linked_accounts: ({
type: "email";
address: string;
verified_at: number;
} | {
type: "phone";
phoneNumber: string;
verified_at: number;
} | {
type: "wallet";
address: string;
verified_at: number;
chain_type: "ethereum";
wallet_client: "unknown";
chain_id?: string | undefined;
wallet_client_type?: string | undefined;
connector_type?: string | undefined;
} | {
type: "wallet";
address: string;
verified_at: number;
chain_id: "eip155:1";
chain_type: "ethereum";
wallet_client: "privy";
wallet_client_type: "privy";
connector_type: "embedded";
recovery_method: "privy" | "user-passcode";
} | {
type: "google_oauth";
name: string | null;
email: string;
subject: string;
verified_at: number;
} | {
type: "twitter_oauth";
name: string | null;
subject: string;
verified_at: number;
username: string | null;
} | {
type: "discord_oauth";
email: string | null;
subject: string;
verified_at: number;
username: string | null;
} | {
type: "github_oauth";
name: string | null;
email: string | null;
subject: string;
verified_at: number;
username: string | null;
} | {
type: "apple_oauth";
email: string | null;
subject: string;
verified_at: number;
} | {
type: "custom_auth";
verified_at: number;
custom_user_id: string;
})[];
}>;
unlink(phoneNumber: string): Promise<{
id: string;
created_at: number;
linked_accounts: ({
type: "email";
address: string;
verified_at: number;
} | {
type: "phone";
phoneNumber: string;
verified_at: number;
} | {
type: "wallet";
address: string;
verified_at: number;
chain_type: "ethereum";
wallet_client: "unknown";
chain_id?: string | undefined;
wallet_client_type?: string | undefined;
connector_type?: string | undefined;
} | {
type: "wallet";
address: string;
verified_at: number;
chain_id: "eip155:1";
chain_type: "ethereum";
wallet_client: "privy";
wallet_client_type: "privy";
connector_type: "embedded";
recovery_method: "privy" | "user-passcode";
} | {
type: "google_oauth";
name: string | null;
email: string;
subject: string;
verified_at: number;
} | {
type: "twitter_oauth";
name: string | null;
subject: string;
verified_at: number;
username: string | null;
} | {
type: "discord_oauth";
email: string | null;
subject: string;
verified_at: number;
username: string | null;
} | {
type: "github_oauth";
name: string | null;
email: string | null;
subject: string;
verified_at: number;
username: string | null;
} | {
type: "apple_oauth";
email: string | null;
subject: string;
verified_at: number;
} | {
type: "custom_auth";
verified_at: number;
custom_user_id: string;
})[];
}>;
linkWithCode(phoneNumber: string, code: string): Promise<import("@privy-io/public-api").IUser>;
unlink(phoneNumber: string): Promise<import("@privy-io/public-api").IUser>;
}

@@ -785,77 +311,3 @@ declare class Auth {

*/
get(): Promise<{
token: string | null;
refresh_token: string | null;
user: {
id: string;
created_at: number;
linked_accounts: ({
type: "email";
address: string;
verified_at: number;
} | {
type: "phone";
phoneNumber: string;
verified_at: number;
} | {
type: "wallet";
address: string;
verified_at: number;
chain_type: "ethereum";
wallet_client: "unknown";
chain_id?: string | undefined;
wallet_client_type?: string | undefined;
connector_type?: string | undefined;
} | {
type: "wallet";
address: string;
verified_at: number;
chain_id: "eip155:1";
chain_type: "ethereum";
wallet_client: "privy";
wallet_client_type: "privy";
connector_type: "embedded";
recovery_method: "privy" | "user-passcode";
} | {
type: "google_oauth";
name: string | null;
email: string;
subject: string;
verified_at: number;
} | {
type: "twitter_oauth";
name: string | null;
subject: string;
verified_at: number;
username: string | null;
} | {
type: "discord_oauth";
email: string | null;
subject: string;
verified_at: number;
username: string | null;
} | {
type: "github_oauth";
name: string | null;
email: string | null;
subject: string;
verified_at: number;
username: string | null;
} | {
type: "apple_oauth";
email: string | null;
subject: string;
verified_at: number;
} | {
type: "custom_auth";
verified_at: number;
custom_user_id: string;
})[];
};
is_new_user?: boolean | undefined;
} | {
token: null;
refresh_token: null;
user: null;
}>;
get(): Promise<import("@privy-io/public-api").IAuthenticatedUser | import("@privy-io/public-api").ILoggedOutUser>;
}

@@ -862,0 +314,0 @@ /**

{
"name": "@privy-io/js-sdk-core",
"version": "0.3.0-beta-20230927205941",
"version": "0.3.0-beta-20230928004335",
"description": "Vanilla JS client for the Privy Auth API",

@@ -17,3 +17,3 @@ "keywords": [

"main": "./dist/index.js",
"module": "./dist/esm/index.js",
"module": "./dist/index.mjs",
"types": "./dist/index.d.ts",

@@ -24,3 +24,3 @@ "typings": "./dist/index",

"require": "./dist/index.js",
"import": "./dist/esm/index.js",
"import": "./dist/index.mjs",
"types": "./dist/index.d.ts"

@@ -63,3 +63,3 @@ }

"@ethersproject/providers": "^5.7.2",
"@privy-io/public-api": "*",
"@privy-io/public-api": "1.2.0-beta-20230928004335",
"eventemitter3": "^5.0.1",

@@ -66,0 +66,0 @@ "fetch-retry": "^5.0.6",

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is too big to display

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