@privy-io/js-sdk-core
Advanced tools
Comparing version 0.3.0-beta-20230927205941 to 0.3.0-beta-20230928004335
@@ -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
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
Long strings
Supply chain riskContains long string literals, which may be a sign of obfuscated or packed code.
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
Wildcard dependency
QualityPackage has a dependency with a floating version range. This can cause issues if the dependency publishes a new major version.
Found 1 instance in 1 package
Long strings
Supply chain riskContains long string literals, which may be a sign of obfuscated or packed code.
Found 1 instance in 1 package
0
174131
4280
+ Added@privy-io/api-base@0.3.0-beta-20230928004335(transitive)
+ Added@privy-io/public-api@1.2.0-beta-20230928004335(transitive)
- Removed@privy-io/api-base@1.4.0(transitive)
- Removed@privy-io/public-api@2.15.1(transitive)
- Removedbase-x@4.0.0(transitive)
- Removedbs58@5.0.0(transitive)