New Case Study:See how Anthropic automated 95% of dependency reviews with Socket.Learn More
Socket
Sign inDemoInstall
Socket

gridplus-sdk

Package Overview
Dependencies
Maintainers
1
Versions
182
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

gridplus-sdk - npm Package Compare versions

Comparing version 0.10.4 to 0.10.5

29

dist/client.d.ts

@@ -18,3 +18,2 @@ import { UInt4 } from 'bitwise/types';

private privKey;
private pairingSalt;
private retryCount;

@@ -24,4 +23,2 @@ private fwVersion;

private ephemeralPub;
/** The shared secret of the client. */
private sharedSecret;
/** The ID of the connected Lattice */

@@ -34,3 +31,3 @@ private deviceId;

*/
constructor({ baseUrl, crypto, name, privKey, timeout, retryCount }: {
constructor({ baseUrl, crypto, name, privKey, stateData, timeout, retryCount }: {
/** The base URL of the signing server. */

@@ -46,4 +43,2 @@ baseUrl?: string;

key?: KeyPair;
/** A random string used to salt the pairing code. */
pairingSalt?: string;
/** Number of times to retry a request if it fails. */

@@ -53,4 +48,11 @@ retryCount?: number;

timeout?: number;
/** User can pass in previous state data to rehydrate connected session */
stateData?: string;
});
/**
* Get a JSON string containing state data that can be used to rehydrate a session.
* Pass the contents of this to the constructor as `stateData` to rehydrate.
*/
getStateData(): string;
/**
* `connect` will attempt to contact a device based on its deviceId. The response should include

@@ -269,12 +271,17 @@ * an ephemeral public key, which is used to pair with the device in a later request.

* a "wrong wallet" error, the SDK will automatically request
* the current wallet UID from the device and retry the request,
* but the original request payload may need to be modified.
* the current wallet UID from the device and may retry the
* request, but the original request payload must be modified.
*/
private _replaceWalletUID;
/**
* Only certain types of requests can be retried in the event
* of a "wrong wallet" error.
* Return JSON-stringified version of state data. Can be used to
* rehydrate an SDK session without reconnecting to the target Lattice.
*/
private _canReplaceWalletUID;
private _packStateData;
/**
* Unpack a JSON-stringified version of state data and apply it to state.
* This will allow us to rehydrate an old session.
*/
private _unpackAndApplyStateData;
/**
* Get the active wallet.

@@ -281,0 +288,0 @@ * @returns The active wallet.

@@ -116,14 +116,14 @@ "use strict";

_a[responseCodes.RESP_SUCCESS] = 0x00,
_a[responseCodes.RESP_ERR_INVALID_MSG] = 'Invalid Request',
_a[responseCodes.RESP_ERR_UNSUPPORTED_VER] = 'Unsupported Version',
_a[responseCodes.RESP_ERR_DEV_BUSY] = 'Device Busy',
_a[responseCodes.RESP_ERR_USER_TIMEOUT] = 'Timeout Waiting for User',
_a[responseCodes.RESP_ERR_USER_DECLINED] = 'Request Declined by User',
_a[responseCodes.RESP_ERR_PAIR_FAIL] = 'Pairing Failed',
_a[responseCodes.RESP_ERR_PAIR_DISABLED] = 'Pairing is Currently Disabled',
_a[responseCodes.RESP_ERR_PERMISSION_DISABLED] = 'Automated Signing is Currently Disabled',
_a[responseCodes.RESP_ERR_INTERNAL] = 'Device Error',
_a[responseCodes.RESP_ERR_INVALID_MSG] = 'Invalid request',
_a[responseCodes.RESP_ERR_UNSUPPORTED_VER] = 'Unsupported version',
_a[responseCodes.RESP_ERR_DEV_BUSY] = 'Device busy',
_a[responseCodes.RESP_ERR_USER_TIMEOUT] = 'Timeout waiting for user',
_a[responseCodes.RESP_ERR_USER_DECLINED] = 'Request declined by user',
_a[responseCodes.RESP_ERR_PAIR_FAIL] = 'Pairing failed',
_a[responseCodes.RESP_ERR_PAIR_DISABLED] = 'Pairing is currently disabled',
_a[responseCodes.RESP_ERR_PERMISSION_DISABLED] = 'Automated signing is currently disabled',
_a[responseCodes.RESP_ERR_INTERNAL] = 'Device error',
_a[responseCodes.RESP_ERR_GCE_TIMEOUT] = 'Timeout',
_a[responseCodes.RESP_ERR_WRONG_WALLET] = 'Incorrect Wallet UID Provided',
_a[responseCodes.RESP_ERR_DEV_LOCKED] = 'Device Locked',
_a[responseCodes.RESP_ERR_WRONG_WALLET] = 'Active wallet does not match request',
_a[responseCodes.RESP_ERR_DEV_LOCKED] = 'Device locked',
_a[responseCodes.RESP_ERR_DISABLED] = 'Disabled',

@@ -130,0 +130,0 @@ _a[responseCodes.RESP_ERR_ALREADY] = 'Record already exists. You must first remove it on your device.',

@@ -53,3 +53,3 @@ "use strict";

if (responseCode !== constants_1.responseCodes.RESP_SUCCESS) {
parsed.err = "Error from device: ".concat(constants_1.responseMsgs[responseCode] ? constants_1.responseMsgs[responseCode] : 'Unknown Error');
parsed.err = "".concat(constants_1.responseMsgs[responseCode] ? constants_1.responseMsgs[responseCode] : 'Unknown Error', " (Lattice)");
parsed.responseCode = responseCode;

@@ -56,0 +56,0 @@ return parsed;

{
"name": "gridplus-sdk",
"version": "0.10.4",
"version": "0.10.5",
"description": "SDK to interact with GridPlus Lattice1 device",

@@ -5,0 +5,0 @@ "scripts": {

Sorry, the diff of this file is not supported yet

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

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