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

@particle-network/auth

Package Overview
Dependencies
Maintainers
1
Versions
118
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@particle-network/auth - npm Package Compare versions

Comparing version 0.1.0 to 0.1.1

1

lib/index.js

@@ -18,2 +18,3 @@ "use strict";

__exportStar(require("./particle-network"), exports);
__exportStar(require("./utils"), exports);
//# sourceMappingURL=index.js.map
export * from "./particle-network";
export type { AuthType, UserInfo, Wallet, supportChains, Config, ChainName, ChainInfo } from "./types";
export * from "./utils";

@@ -12,2 +12,23 @@ export declare class AuthError {

}
export interface RequestArguments {
method: string;
params?: unknown;
}
export interface JsonRpcRequest extends RequestArguments {
id: number | string;
jsonrpc: string;
}
export interface JsonRpcError {
code: number;
message: string;
}
export interface JsonRpcResponse {
id: number | string;
jsonrpc: string;
result?: any;
error?: JsonRpcError;
}
export interface ParticleRpcRequest extends JsonRpcRequest {
chainId: number;
}
export declare type AuthType = "email" | "phone" | "google" | "facebook" | "apple";

@@ -14,0 +35,0 @@ export interface UserInfo {

@@ -0,2 +1,3 @@

export declare function isHttpUrl(url: string): boolean;
export declare function getDeviceId(): string;
export declare function getVersion(): string;
"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
exports.getVersion = exports.getDeviceId = void 0;
exports.getVersion = exports.getDeviceId = exports.isHttpUrl = void 0;
const uuid_1 = require("uuid");
const HTTP_REGEX = "^https?:";
function getUrlProtocol(url) {
const matches = url.match(new RegExp(/^\w+:/, "gi"));
if (!matches || !matches.length)
return;
return matches[0];
}
function matchRegexProtocol(url, regex) {
const protocol = getUrlProtocol(url);
if (typeof protocol === "undefined")
return false;
return new RegExp(regex).test(protocol);
}
function isHttpUrl(url) {
return matchRegexProtocol(url, HTTP_REGEX);
}
exports.isHttpUrl = isHttpUrl;
function getDeviceId() {

@@ -6,0 +23,0 @@ const storeKey = "pn_device_id";

2

package.json
{
"name": "@particle-network/auth",
"version": "0.1.0",
"version": "0.1.1",
"files": [

@@ -5,0 +5,0 @@ "lib",

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

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