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.1 to 0.10.2

dist/types/client.d.ts

161

dist/client.d.ts
import { UInt4 } from 'bitwise/types';
import { Buffer } from 'buffer/';
import { KeyPair } from 'elliptic';
import { Crypto, KVRecord, ABIRecord, SignData, AddAbiDefsData, GetAbiRecordsData, GetKvRecordsData } from './types/client';
/**

@@ -34,9 +36,9 @@ * `Client` is a class-based interface for managing a Lattice device.

/** The crypto library to use. Currently only 'secp256k1' is supported. */
crypto: string;
crypto: Crypto;
/** The name of the client. */
name: string;
/** The private key of the client.*/
privKey?: string;
privKey?: Buffer;
/** The public key of the client. */
key?: string;
key?: KeyPair;
/** A random string used to salt the pairing code. */

@@ -54,3 +56,3 @@ pairingSalt?: string;

*/
connect(deviceId: any, cb: any): any;
connect(deviceId: string, cb: (err?: string, isPaired?: boolean) => void): void;
/**

@@ -63,3 +65,3 @@ * If a pairing secret is provided, `pair` uses it to sign a hash of the public key, name, and

*/
pair(pairingSecret: any, cb: any): any;
pair(pairingSecret: string, cb: (err?: string, hasActiveWallet?: boolean) => void): void;
/**

@@ -80,3 +82,3 @@ * `test` takes a data object with a testID and a payload, and sends them to the device.

flag: UInt4;
}, cb: any): any;
}, cb: (err?: string, data?: Buffer | string[]) => void): any;
/**

@@ -87,3 +89,6 @@ * `sign` builds and sends a request for signing to the device.

*/
sign(opts: any, cb: any, cachedData?: any, nextCode?: any): any;
sign(opts: {
data: any;
currency: string;
}, cb: (err?: string, data?: SignData) => void, cachedData?: any, nextCode?: any): any;
/**

@@ -94,3 +99,3 @@ * `addAbiDefs` sends a list of ABI definitions to the device in chunks of up to `MAX_ABI_DEFS`.

*/
addAbiDefs(defs: any, cb: any, nextCode?: any): any;
addAbiDefs(defs: ABIRecord[], cb: (err?: string, data?: AddAbiDefsData) => void, nextCode?: any): any;
/**

@@ -102,8 +107,7 @@ * `getAbiRecords` fetches a set of ABI records saved on the Lattice. You can fetch

*/
getAbiRecords(opts: any, cb: any, fetched: {
getAbiRecords(opts: {
n: number;
startIdx: number;
numRemaining: number;
numFetched: number;
records: any[];
}): any;
category: string;
}, cb: (err?: string, data?: GetAbiRecordsData) => void, fetched?: GetAbiRecordsData): any;
/**

@@ -115,5 +119,10 @@ * `removeAbiRecords` requests removal of ABI records on the device. You can request

*/
removeAbiRecords(opts: any, cb: any, cbData?: {
removeAbiRecords(opts: {
sigs: (number | string)[];
}, cb: (err?: string, data?: {
numRemoved: number;
numTried: number;
}) => void, cbData?: {
numRemoved: number;
numTried: number;
}): any;

@@ -125,3 +134,9 @@ /**

*/
addPermissionV0(opts: any, cb: any): any;
addPermissionV0(opts: {
currency: string;
timeWindow: number;
limit: number;
decimals: number;
asset: string;
}, cb: (err?: string) => void): any;
/**

@@ -131,3 +146,7 @@ * `getKvRecords` fetches a list of key-value records from the Lattice.

*/
getKvRecords(opts: any, cb: any): Buffer;
getKvRecords(opts: {
type?: number;
n?: number;
start?: number;
}, cb: (err?: string, data?: GetKvRecordsData) => void): any;
/**

@@ -139,3 +158,7 @@ * `addKvRecords` takes in a set of key-value records and sends a request to add them to the

*/
addKvRecords(opts: any, cb: any): any;
addKvRecords(opts: {
type?: number;
records: KVRecord[];
caseSensitive: boolean;
}, cb: (err?: string) => void): any;
/**

@@ -146,3 +169,6 @@ * `removeKvRecords` takes in an array of ids and sends a request to remove them from the Lattice.

*/
removeKvRecords(opts: any, cb: any): any;
removeKvRecords(opts: {
type: number;
ids: number[];
}, cb: (err?: string) => void): any;
/**

@@ -154,3 +180,3 @@ * Get the active wallet in the device. If we already have one recorded, we don't need to do

*/
_getActiveWallet(cb: any, forceRefresh?: boolean): any;
private _getActiveWallet;
/**

@@ -161,3 +187,3 @@ * Get the shared secret, derived via ECDH from the local private key and the ephemeral public key

*/
_getSharedSecret(): Buffer;
private _getSharedSecret;
/**

@@ -169,3 +195,3 @@ * Get the ephemeral id, which is the first 4 bytes of the shared secret generated from the local

*/
_getEphemId(): any;
private _getEphemId;
/**

@@ -175,3 +201,3 @@ * Builds an encrypted request

*/
_buildEncRequest(enc_request_code: any, payload: any): Buffer;
private _buildEncRequest;
/**

@@ -185,3 +211,3 @@ * Build a request to send to the device.

*/
_buildRequest(request_code: any, payload: any): Buffer;
private _buildRequest;
/**

@@ -192,3 +218,3 @@ * Send a request to the device and wait for a response.

*/
_request(payload: any, encReqCode: any, cb: any, retryCount?: number): any;
private _request;
/**

@@ -203,3 +229,3 @@ * `_handleConnect` will call `StartPairingMode` on the device, which gives the user 60 seconds to finalize

*/
_handleConnect(res: any): boolean;
private _handleConnect;
/**

@@ -212,9 +238,3 @@ * All encrypted responses must be decrypted with the previous shared secret. Per specification,

*/
_handleEncResponse(encRes: any, len: any): {
err: string;
data?: undefined;
} | {
err: any;
data: Buffer;
};
private _handleEncResponse;
/**

@@ -228,3 +248,3 @@ * Pair will create a new pairing if the user successfully enters the secret into the device in

*/
_handlePair(encRes: any): any;
private _handlePair;
/**

@@ -235,12 +255,3 @@ * @category Device Response

*/
_handleGetAddresses(encRes: any, flag: any): {
err: string;
data?: undefined;
} | {
err: any;
data: Buffer;
} | {
data: any[];
err: any;
};
private _handleGetAddresses;
/**

@@ -252,9 +263,3 @@ * If there is an active wallet, return null. Otherwise, return an error message.

*/
_handleGetWallets(encRes: any): "No active wallet." | {
err: string;
data?: undefined;
} | {
err: any;
data: Buffer;
};
private _handleGetWallets;
/**

@@ -270,46 +275,3 @@ * `_handleSign` takes the encrypted response from the device and decrypts it. It then parses the

*/
_handleSign(encRes: any, currencyType: any, req?: any): {
pubkey: any;
sig: any;
} | {
err: any;
tx?: undefined;
txHash?: undefined;
changeRecipient?: undefined;
sigs?: undefined;
sig?: undefined;
signer?: undefined;
} | {
tx: string;
txHash: any;
changeRecipient: any;
sigs: any[];
err?: undefined;
sig?: undefined;
signer?: undefined;
} | {
tx: string;
txHash: string;
sig: {
v: any;
r: any;
s: any;
};
signer: Buffer;
err?: undefined;
changeRecipient?: undefined;
sigs?: undefined;
} | {
sig: {
v: any;
r: any;
s: any;
};
signer: Buffer;
err?: undefined;
tx?: undefined;
txHash?: undefined;
changeRecipient?: undefined;
sigs?: undefined;
};
private _handleSign;
/**

@@ -320,4 +282,13 @@ * Reset the active wallets to empty values.

*/
_resetActiveWallets(): void;
private _resetActiveWallets;
/**
* Update the payload with the current wallet UID.
* Some (not all) requests require the active wallet UID
* in order for Lattice firmware to accept them. If we get
* 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.
*/
private _replaceWalletUID;
/**
* Get the active wallet.

@@ -324,0 +295,0 @@ * @returns The active wallet.

@@ -431,51 +431,37 @@ "use strict";

buffer_1.Buffer.from(category).copy(payload, 4);
return this._request(payload, 'GET_ABI_RECORDS', function (err, res, responseCode) {
if (responseCode === constants_1.responseCodes.RESP_ERR_WRONG_WALLET) {
// If we catch a case where the wallet has changed, try getting the new active wallet
// and recursively make the original request.
_this._getActiveWallet(function (err) {
if (err)
return cb(err);
else
return _this.getAbiRecords(opts, cb, fetched);
});
return this._request(payload, 'GET_ABI_RECORDS', function (err, res) {
if (err) {
return cb(err);
}
else if (err) {
// If there was another error caught, return it
if (err)
return cb(err);
// Correct wallet and no errors -- handle the response
var d = _this._handleEncResponse(res, constants_1.decResLengths.getAbiRecords);
if (d.err)
return cb(d.err);
// Decode the response
var off = 65; // Skip 65 byte pubkey prefix
var numRemaining = d.data.readUInt32LE(off);
off += 4;
var numReturned = d.data.readUInt8(off);
off += 1;
// Start adding data if there is data to add
fetched.numRemaining = numRemaining;
if (!fetched.records) {
fetched.records = [];
}
for (var i = 0; i < numReturned; i++) {
// Parse and add the def
var packedDef = d.data.slice(off, off + ethereumAbi_1.ABI_DEF_SZ);
off += ethereumAbi_1.ABI_DEF_SZ;
fetched.records.push((0, ethereumAbi_1.unpackAbiDef)(packedDef));
}
// Decrement the total counter
opts.n -= numReturned;
if (opts.n < 1 || numReturned < 1) {
fetched.numFetched = fetched.records.length;
return cb(null, fetched);
}
else {
// Correct wallet and no errors -- handle the response
var d = _this._handleEncResponse(res, constants_1.decResLengths.getAbiRecords);
if (d.err)
return cb(d.err);
// Decode the response
var off = 65; // Skip 65 byte pubkey prefix
var numRemaining = d.data.readUInt32LE(off);
off += 4;
var numReturned = d.data.readUInt8(off);
off += 1;
// Start adding data if there is data to add
fetched.numRemaining = numRemaining;
if (!fetched.records) {
fetched.records = [];
}
for (var i = 0; i < numReturned; i++) {
// Parse and add the def
var packedDef = d.data.slice(off, off + ethereumAbi_1.ABI_DEF_SZ);
off += ethereumAbi_1.ABI_DEF_SZ;
fetched.records.push((0, ethereumAbi_1.unpackAbiDef)(packedDef));
}
// Decrement the total counter
opts.n -= numReturned;
if (opts.n < 1 || numReturned < 1) {
fetched.numFetched = fetched.records.length;
return cb(null, fetched);
}
else {
// Recurse if there is more to fetch
opts.startIdx += numReturned;
return _this.getAbiRecords(opts, cb, fetched);
}
// Recurse if there is more to fetch
opts.startIdx += numReturned;
return _this.getAbiRecords(opts, cb, fetched);
}

@@ -519,36 +505,22 @@ });

});
return this._request(payload, 'REMOVE_ABI_RECORDS', function (err, res, responseCode) {
if (responseCode === constants_1.responseCodes.RESP_ERR_WRONG_WALLET) {
// If we catch a case where the wallet has changed, try getting the new active wallet
// and recursively make the original request.
_this._getActiveWallet(function (err) {
if (err)
return cb(err);
else
return _this.removeAbiRecords(opts, cb, cbData);
});
return this._request(payload, 'REMOVE_ABI_RECORDS', function (err, res) {
if (err) {
return cb(err);
}
else if (err) {
// If there was another error caught, return it
if (err)
return cb(err);
// Correct wallet and no errors -- handle the response
var d = _this._handleEncResponse(res, constants_1.decResLengths.removeAbiRecords);
if (d.err)
return cb(d.err);
// Decode the response
var off = 65; // Skip 65 byte pubkey prefix
var rmv = d.data.readUInt8(off);
off += 1;
cbData.numRemoved += rmv;
cbData.numTried += sigsSlice.length;
if (cbData.numTried >= opts.sigs.length) {
return cb(null, cbData);
}
else {
// Correct wallet and no errors -- handle the response
var d = _this._handleEncResponse(res, constants_1.decResLengths.removeAbiRecords);
if (d.err)
return cb(d.err);
// Decode the response
var off_1 = 65; // Skip 65 byte pubkey prefix
var rmv = d.data.readUInt8(off_1);
off_1 += 1;
cbData.numRemoved += rmv;
cbData.numTried += sigsSlice.length;
if (cbData.numTried >= opts.sigs.length) {
return cb(null, cbData);
}
else {
// Recurse if there are more to remove
return _this.removeAbiRecords(opts, cb, cbData);
}
// Recurse if there are more to remove
return _this.removeAbiRecords(opts, cb, cbData);
}

@@ -954,11 +926,7 @@ });

var invalidEphemId = parsed.responseCode === constants_1.responseCodes.RESP_ERR_INVALID_EPHEM_ID;
var success = parsed.responseCode === constants_1.responseCodes.RESP_SUCCESS &&
!parsed.err;
var canRetry = retryCount > 0;
// Clean up state if needed
if (wrongWallet) {
// If we got a `wrongWallet` error, we should clear our wallet state, reconnect,
// and get the current active wallet before retrying the original request.
_this._resetActiveWallets();
}
// Re-connect and/or retry request if needed
if (deviceBusy && canRetry) {
if (canRetry && deviceBusy) {
// Wait a few seconds and retry

@@ -969,3 +937,8 @@ setTimeout(function () {

}
else if ((wrongWallet || invalidEphemId) && canRetry) {
else if (canRetry && (wrongWallet || invalidEphemId)) {
if (wrongWallet) {
// If we got a `wrongWallet` error, clear our wallet state, reconnect,
// and get the current active wallet before retrying the original request.
_this._resetActiveWallets();
}
// Reconnect and retry

@@ -975,16 +948,22 @@ _this.connect(_this.deviceId, function (err, isPaired) {

// Abort on connection error
cb(err);
return cb(err);
}
else if (!isPaired) {
// Abort if we are not paired
cb('Not paired to device.');
return cb('Not paired to device.');
}
else {
// Retry the original request
_this._request(payload, encReqCode, cb, retryCount - 1);
// Retry the original request.
// We may need to modify it to include the new wallet UID.
payload = _this._replaceWalletUID(encReqCode, payload);
if (!payload) {
// Something is out of sync -- there is no wallet
return cb('Failed to retry request. Try reconnecting.');
}
_this._request(payload, encReqCode, cb, retryCount - 1);
});
}
else if (parsed.err) {
// If there was an error in the response, return it
else if (!success) {
if (!parsed.err) {
return cb('Unknown error. Try reconnecting or updating your firmware.');
}
cb(parsed.err);

@@ -1263,9 +1242,2 @@ }

var preImageTxHash = serializedTx;
if (preSerializedData.isSegwitSpend === true) {
// Segwit transactions need to be re-serialized using legacy serialization
// before the transaction hash is calculated. This allows legacy clients
// to validate the transactions.
preSerializedData.isSegwitSpend = false;
preImageTxHash = bitcoin_1.default.serializeTx(preSerializedData);
}
var txHash = this.crypto

@@ -1294,3 +1266,3 @@ .createHash('sha256')

// Determine the `v` param and add it to the sig before returning
var rawTx = ethereum_1.default.buildEthRawTx(req, sig, ethAddr);
var _a = ethereum_1.default.buildEthRawTx(req, sig, ethAddr), rawTx = _a.rawTx, sigWithV = _a.sigWithV;
return {

@@ -1300,5 +1272,5 @@ tx: "0x".concat(rawTx),

sig: {
v: sig.v,
r: sig.r.toString('hex'),
s: sig.s.toString('hex'),
v: sigWithV.v,
r: sigWithV.r.toString('hex'),
s: sigWithV.s.toString('hex'),
},

@@ -1342,2 +1314,26 @@ signer: ethAddr,

/**
* Update the payload with the current wallet UID.
* Some (not all) requests require the active wallet UID
* in order for Lattice firmware to accept them. If we get
* 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.
*/
Client.prototype._replaceWalletUID = function (encReqCode, payload) {
var wallet = this.getActiveWallet();
if (!wallet) {
return null;
}
// Only certain request types need an updated wallet UID
if (encReqCode === 'GET_ADDRESSES') {
// Wallet UID is the first 32 bytes
wallet.uid.copy(payload, 0);
}
else if (encReqCode === 'SIGN_TRANSACTION') {
// Wallet UID is bytes 2-34
wallet.uid.copy(payload, 2);
}
return payload;
};
/**
* Get the active wallet.

@@ -1344,0 +1340,0 @@ * @returns The active wallet.

@@ -342,2 +342,3 @@ declare const AES_IV: number[];

HEX: number;
SOLANA: number;
};

@@ -344,0 +345,0 @@ };

@@ -309,3 +309,4 @@ "use strict";

ASCII: 0,
HEX: 1
HEX: 1,
SOLANA: 2,
}

@@ -358,2 +359,5 @@ }

c.ethMaxMsgSz = c.ethMaxDataSz;
// Max number of params in an EIP712 type. This was added to firmware
// to avoid blowing stack size.
c.eip712MaxTypeParams = 18;
// EXTRA FIELDS ADDED IN LATER VERSIONS

@@ -383,2 +387,4 @@ //-------------------------------------

];
// We updated the max number of params in EIP712 types
c.eip712MaxTypeParams = 36;
}

@@ -385,0 +391,0 @@ // V0.13.0 added native segwit addresses and fixed a bug in exporting

@@ -26,3 +26,6 @@ import { Buffer } from 'buffer/';

};
buildEthRawTx: (tx: any, sig: any, address: any) => any;
buildEthRawTx: (tx: any, sig: any, address: any) => {
rawTx: any;
sigWithV: any;
};
hashTransaction: (serializedTx: any) => string;

@@ -29,0 +32,0 @@ chainIds: {

@@ -51,7 +51,7 @@ "use strict";

// may be configurable in future versions
var hash = prehash
var hash_1 = prehash
? prehash
: buffer_1.Buffer.from((0, js_sha3_1.keccak256)(buffer_1.Buffer.concat([get_personal_sign_prefix(msg.length), msg])), 'hex');
// Get recovery param with a `v` value of [27,28] by setting `useEIP155=false`
return addRecoveryParam(hash, sig, signer, {
return addRecoveryParam(hash_1, sig, signer, {
chainId: 1,

@@ -392,3 +392,3 @@ useEIP155: false,

}
return rlpEncodedWithSig.toString('hex');
return { rawTx: rlpEncodedWithSig.toString('hex'), sigWithV: newSig };
};

@@ -400,3 +400,3 @@ // Attach a recovery parameter to a signature by brute-forcing ECRecover

// Rebuild the keccak256 hash here so we can `ecrecover`
var hash = new Uint8Array(hashBuf);
var hash_2 = new Uint8Array(hashBuf);
var v = 0;

@@ -410,3 +410,3 @@ // Fix signature componenet lengths to 32 bytes each

var rs = new Uint8Array(buffer_1.Buffer.concat([r, s]));
var pubkey = secp256k1_1.default.ecdsaRecover(rs, v, hash, false).slice(1);
var pubkey = secp256k1_1.default.ecdsaRecover(rs, v, hash_2, false).slice(1);
// If the first `v` value is a match, return the sig!

@@ -419,3 +419,3 @@ if (pubToAddrStr(pubkey) === address.toString('hex')) {

v = 1;
pubkey = secp256k1_1.default.ecdsaRecover(rs, v, hash, false).slice(1);
pubkey = secp256k1_1.default.ecdsaRecover(rs, v, hash_2, false).slice(1);
if (pubToAddrStr(pubkey) === address.toString('hex')) {

@@ -615,6 +615,5 @@ sig.v = getRecoveryParam(v, txData);

try {
var MAX_BASE_MSG_SZ = input.fwConstants.ethMaxMsgSz;
var VAR_PATH_SZ = input.fwConstants.varAddrPathSzAllowed;
var _a = input.fwConstants, ethMaxMsgSz = _a.ethMaxMsgSz, varAddrPathSzAllowed = _a.varAddrPathSzAllowed, eip712MaxTypeParams_1 = _a.eip712MaxTypeParams;
var TYPED_DATA = constants_1.ethMsgProtocol.TYPED_DATA;
var L = 24 + MAX_BASE_MSG_SZ + 4;
var L = 24 + ethMaxMsgSz + 4;
var off = 0;

@@ -625,12 +624,12 @@ req.payload = buffer_1.Buffer.alloc(L);

// Write the signer path
var signerPathBuf = (0, util_1.buildSignerPathBuf)(input.signerPath, VAR_PATH_SZ);
var signerPathBuf = (0, util_1.buildSignerPathBuf)(input.signerPath, varAddrPathSzAllowed);
signerPathBuf.copy(req.payload, off);
off += signerPathBuf.length;
// Parse/clean the EIP712 payload, serialize with CBOR, and write to the payload
var data = JSON.parse(JSON.stringify(input.payload));
if (!data.primaryType || !data.types[data.primaryType])
var data_1 = JSON.parse(JSON.stringify(input.payload));
if (!data_1.primaryType || !data_1.types[data_1.primaryType])
throw new Error('primaryType must be specified and the type must be included.');
if (!data.message || !data.domain)
if (!data_1.message || !data_1.domain)
throw new Error('message and domain must be specified.');
if (0 > Object.keys(data.types).indexOf('EIP712Domain'))
if (0 > Object.keys(data_1.types).indexOf('EIP712Domain'))
throw new Error('EIP712Domain type must be defined.');

@@ -642,16 +641,22 @@ // Parse the payload to ensure we have valid EIP712 data types and that

// our EIP712 validation module.
input.payload.message = parseEIP712Msg(JSON.parse(JSON.stringify(data.message)), JSON.parse(JSON.stringify(data.primaryType)), JSON.parse(JSON.stringify(data.types)), true);
input.payload.domain = parseEIP712Msg(JSON.parse(JSON.stringify(data.domain)), 'EIP712Domain', JSON.parse(JSON.stringify(data.types)), true);
data.domain = parseEIP712Msg(data.domain, 'EIP712Domain', data.types, false);
data.message = parseEIP712Msg(data.message, data.primaryType, data.types, false);
input.payload.message = parseEIP712Msg(JSON.parse(JSON.stringify(data_1.message)), JSON.parse(JSON.stringify(data_1.primaryType)), JSON.parse(JSON.stringify(data_1.types)), true);
input.payload.domain = parseEIP712Msg(JSON.parse(JSON.stringify(data_1.domain)), 'EIP712Domain', JSON.parse(JSON.stringify(data_1.types)), true);
data_1.domain = parseEIP712Msg(data_1.domain, 'EIP712Domain', data_1.types, false);
data_1.message = parseEIP712Msg(data_1.message, data_1.primaryType, data_1.types, false);
// Now build the message to be sent to the Lattice
var payload = buffer_1.Buffer.from(borc_1.default.encode(data));
var payload = buffer_1.Buffer.from(borc_1.default.encode(data_1));
var fwConst = input.fwConstants;
var maxSzAllowed = MAX_BASE_MSG_SZ + fwConst.extraDataMaxFrames * fwConst.extraDataFrameSz;
if (fwConst.ethMsgPreHashAllowed && payload.length > maxSzAllowed) {
var maxSzAllowed = ethMaxMsgSz + fwConst.extraDataMaxFrames * fwConst.extraDataFrameSz;
// Determine if we need to prehash
var shouldPrehash_1 = payload.length > maxSzAllowed;
Object.keys(data_1.types).forEach(function (k) {
if (data_1.types[k].length > eip712MaxTypeParams_1) {
shouldPrehash_1 = true;
}
});
if (fwConst.ethMsgPreHashAllowed && shouldPrehash_1) {
// If this payload is too large to send, but the Lattice allows a prehashed message, do that
req.payload.writeUInt16LE(payload.length, off);
off += 2;
var encoded = eth_eip712_util_browser_1.TypedDataUtils.hash(req.input.payload);
var prehash = buffer_1.Buffer.from((0, js_sha3_1.keccak256)(encoded), 'hex');
var prehash = eth_eip712_util_browser_1.TypedDataUtils.hash(req.input.payload);
prehash.copy(req.payload, off);

@@ -658,0 +663,0 @@ req.prehash = prehash;

@@ -200,3 +200,4 @@ "use strict";

// Build the request with the specified encoding type
if (encoding === index_1.Constants.SIGNING.ENCODINGS.HEX) {
if (encoding === index_1.Constants.SIGNING.ENCODINGS.HEX ||
encoding === index_1.Constants.SIGNING.ENCODINGS.SOLANA) {
return {

@@ -203,0 +204,0 @@ payloadBuf: (0, util_1.ensureHexBuffer)(payload),

{
"name": "gridplus-sdk",
"version": "0.10.1",
"version": "0.10.2",
"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 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