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

@bitgo/sdk-core

Package Overview
Dependencies
Maintainers
7
Versions
200
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@bitgo/sdk-core - npm Package Compare versions

Comparing version 2.0.0-rc.28 to 2.0.0-rc.29

11

CHANGELOG.md

@@ -6,2 +6,13 @@ # Change Log

# [2.0.0-rc.29](https://github.com/BitGo/BitGoJS/compare/@bitgo/sdk-core@2.0.0-rc.28...@bitgo/sdk-core@2.0.0-rc.29) (2022-09-21)
### Features
* the client needs to generate a gpg key for their backup key share and share it with bitgo ([fb10fae](https://github.com/BitGo/BitGoJS/commit/fb10fae409761363fd8a3bb489011c34f041140c))
# [2.0.0-rc.28](https://github.com/BitGo/BitGoJS/compare/@bitgo/sdk-core@2.0.0-rc.27...@bitgo/sdk-core@2.0.0-rc.28) (2022-09-21)

@@ -8,0 +19,0 @@

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

import * as pgp from 'openpgp';
import { Key } from 'openpgp';

@@ -92,2 +93,10 @@ import { BitGoBase } from '../bitgoBase';

export declare function verifySignature(text: string, armoredSignature: string, publicArmor: string): Promise<boolean>;
/**
* Generate a GPG key pair
*
* @param: keyCurve the curve to create a key with
* @param: username name of the user (optional)
* @param: email email of the user (optional)
*/
export declare function generateGPGKeyPair(keyCurve: pgp.EllipticCurveName, username?: string | undefined, email?: string | undefined): Promise<pgp.SerializedKeyPair<string>>;
//# sourceMappingURL=opengpgUtils.d.ts.map

37

dist/src/bitgo/utils/opengpgUtils.js

@@ -22,7 +22,11 @@ "use strict";

};
var __importDefault = (this && this.__importDefault) || function (mod) {
return (mod && mod.__esModule) ? mod : { "default": mod };
};
Object.defineProperty(exports, "__esModule", { value: true });
exports.verifySignature = exports.signText = exports.readSignedMessage = exports.encryptAndSignText = exports.encryptText = exports.createShareProof = exports.createSharedDataProof = exports.verifySharedDataProof = exports.verifyEdShareProof = exports.getBitgoGpgPubKey = void 0;
exports.generateGPGKeyPair = exports.verifySignature = exports.signText = exports.readSignedMessage = exports.encryptAndSignText = exports.encryptText = exports.createShareProof = exports.createSharedDataProof = exports.verifySharedDataProof = exports.verifyEdShareProof = exports.getBitgoGpgPubKey = void 0;
const pgp = __importStar(require("openpgp"));
const openpgp_1 = require("openpgp");
const pgp = __importStar(require("openpgp"));
const _ = __importStar(require("lodash"));
const crypto_1 = __importDefault(require("crypto"));
const sodium = require('libsodium-wrappers-sumo');

@@ -80,3 +84,3 @@ /**

// @ts-ignore
primaryUser.user.otherCertifications[0].rawNotations, (notation) => { var _a; return ((_a = dataToVerify.find((i) => i.name == notation.name)) === null || _a === void 0 ? void 0 : _a.value) !== Buffer.from(notation.value).toString(); });
primaryUser.user.otherCertifications[0].rawNotations, (notation) => { var _a; return ((_a = dataToVerify.find((i) => i.name === notation.name)) === null || _a === void 0 ? void 0 : _a.value) !== Buffer.from(notation.value).toString(); });
return !anyInvalidProof;

@@ -318,2 +322,27 @@ }

exports.verifySignature = verifySignature;
//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoib3BlbmdwZ1V0aWxzLmpzIiwic291cmNlUm9vdCI6IiIsInNvdXJjZXMiOlsiLi4vLi4vLi4vLi4vc3JjL2JpdGdvL3V0aWxzL29wZW5ncGdVdGlscy50cyJdLCJuYW1lcyI6W10sIm1hcHBpbmdzIjoiO0FBQUEsc0RBQXNEOzs7Ozs7Ozs7Ozs7Ozs7Ozs7Ozs7O0FBRXRELHFDQVdpQjtBQUNqQiw2Q0FBK0I7QUFDL0IsMENBQTRCO0FBRzVCLE1BQU0sTUFBTSxHQUFHLE9BQU8sQ0FBQyx5QkFBeUIsQ0FBQyxDQUFDO0FBRWxEOzs7O0dBSUc7QUFDSSxLQUFLLFVBQVUsaUJBQWlCLENBQUMsS0FBZ0I7SUFDdEQsTUFBTSxTQUFTLEdBQUcsTUFBTSxLQUFLLENBQUMsY0FBYyxFQUFFLENBQUM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bnZhbGlkIG51bWJlciBvZiBzaWduYXR1cmVzJyk7XG4gIH1cblxuICB0cnkge1xuICAgIGF3YWl0IHZlcmlmaWNhdGlvblJlc3VsdC5zaWduYXR1cmVzWzBdLnZlcmlmaWVkO1xuICAgIHJldHVybiB0ZXh0ID09PSB2ZXJpZmljYXRpb25SZXN1bHQuZGF0YTtcbiAgfSBjYXRjaCB7XG4gICAgcmV0dXJuIGZhbHNlO1xuICB9XG59XG4iXX0=
/**
* Generate a GPG key pair
*
* @param: keyCurve the curve to create a key with
* @param: username name of the user (optional)
* @param: email email of the user (optional)
*/
async function generateGPGKeyPair(keyCurve, username, email) {
const randomHexString = crypto_1.default.randomBytes(12).toString('hex');
username = username !== null && username !== void 0 ? username : randomHexString;
email = email !== null && email !== void 0 ? email : `user-${randomHexString}@${randomHexString}.com`;
// Allow generating secp256k1 key pairs
pgp.config.rejectCurves = new Set();
const gpgKey = await pgp.generateKey({
userIDs: [
{
name: username,
email,
},
],
curve: keyCurve,
});
return gpgKey;
}
exports.generateGPGKeyPair = generateGPGKeyPair;
//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoib3BlbmdwZ1V0aWxzLmpzIiwic291cmNlUm9vdCI6IiIsInNvdXJjZXMiOlsiLi4vLi4vLi4vLi4vc3JjL2JpdGdvL3V0aWxzL29wZW5ncGdVdGlscy50cyJdLCJuYW1lcyI6W10sIm1hcHBpbmdzIjoiO0FBQUEsc0RBQXNEOzs7Ozs7Ozs7Ozs7Ozs7Ozs7Ozs7Ozs7O0FBRXRELDZDQUErQjtBQUMvQixxQ0FXaUI7QUFDakIsMENBQTRCO0FBRTVCLG9EQUE0QjtBQUU1QixNQUFNLE1BQU0sR0FBRyxPQUFPLENBQUMseUJBQXlCLENBQUMsQ0FBQztBQUVsRDs7OztHQUlHO0FBQ0ksS0FBSyxVQUFVLGlCQUFpQixDQUFDLEtBQWdCO0lBQ3RELE1BQU0sU0FBUyxHQUFHLE1BQU0sS0F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YWlsLFxuICAgICAgfSxcbiAgICBdLFxuICAgIGN1cnZlOiBrZXlDdXJ2ZSxcbiAgfSk7XG5cbiAgcmV0dXJuIGdwZ0tleTtcbn1cbiJdfQ==

38

dist/src/bitgo/utils/tss/ecdsa/ecdsa.js
"use strict";
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
if (k2 === undefined) k2 = k;
Object.defineProperty(o, k2, { enumerable: true, get: function() { return m[k]; } });
}) : (function(o, m, k, k2) {
if (k2 === undefined) k2 = k;
o[k2] = m[k];
}));
var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) {
Object.defineProperty(o, "default", { enumerable: true, value: v });
}) : function(o, v) {
o["default"] = v;
});
var __importStar = (this && this.__importStar) || function (mod) {
if (mod && mod.__esModule) return mod;
var result = {};
if (mod != null) for (var k in mod) if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k);
__setModuleDefault(result, mod);
return result;
};
var __importDefault = (this && this.__importDefault) || function (mod) {

@@ -27,5 +8,3 @@ return (mod && mod.__esModule) ? mod : { "default": mod };

const tss_1 = require("../../../../account-lib/mpc/tss");
const openpgp = __importStar(require("openpgp"));
const ecdsa_1 = __importDefault(require("../../../tss/ecdsa"));
const crypto = __importStar(require("crypto"));
const baseTSSUtils_1 = __importDefault(require("../baseTSSUtils"));

@@ -36,2 +15,3 @@ const baseTypes_1 = require("../baseTypes");

const opengpgUtils_1 = require("../../opengpgUtils");
const assert_1 = __importDefault(require("assert"));
const encryptNShare = ecdsa_1.default.encryptNShare;

@@ -65,13 +45,3 @@ /** @inheritdoc */

const backupKeyShare = await MPC.keyShare(2, m, n);
const randomHexString = crypto.randomBytes(12).toString('hex');
openpgp.config.rejectCurves = new Set();
const userGpgKey = await openpgp.generateKey({
userIDs: [
{
name: randomHexString,
email: `user-${randomHexString}@${randomHexString}.com`,
},
],
curve: 'secp256k1',
});
const userGpgKey = await opengpgUtils_1.generateGPGKeyPair('secp256k1');
const bitgoKeychain = await this.createBitgoKeychain(userGpgKey, userKeyShare, backupKeyShare, params.enterprise);

@@ -196,2 +166,3 @@ const userKeychainPromise = this.createParticipantKeychain(userGpgKey, 1, userKeyShare, backupKeyShare, bitgoKeychain, params.passphrase, params.originalPasscodeEncryptionCode);

async signRequestBase(params, requestType) {
var _a;
let txRequestResolved;

@@ -235,2 +206,3 @@ let txRequestId;

else if (requestType === baseTypes_1.RequestType.message) {
assert_1.default((_a = txRequestResolved.unsignedMessages) === null || _a === void 0 ? void 0 : _a[0]);
signablePayload = Buffer.from(txRequestResolved.unsignedMessages[0].message, 'hex');

@@ -264,2 +236,2 @@ }

exports.EcdsaUtils = EcdsaUtils;
//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiZWNkc2EuanMiLCJzb3VyY2VSb290IjoiIiwic291cmNlcyI6WyIuLi8uLi8uLi8uLi8uLi8uLi9zcmMvYml0Z28vdXRpbHMvdHNzL2VjZHNhL2VjZHNhLnRzIl0sIm5hbWVzIjpbXSwibWFwcGluZ3MiOiI7Ozs7Ozs7Ozs7Ozs7Ozs7Ozs7Ozs7Ozs7QUFBQSx5REFBK0Q7QUFDL0QsaURBQW1DO0FBR25DLCtEQUFvRTtBQUVwRSwrQ0FBaUM7QUFDakMsbUVBQTJDO0FBRTNDLDRDQUFpRTtBQUNqRSxnREFBbUQ7QUFDbkQsb0RBQXlFO0FBQ3pFLHFEQUFvRTtBQUlwRSxNQUFNLGFBQWEsR0FBRyxlQUFZLENBQUMsYUFBYSxDQUFDO0FBRWpELGtCQUFrQjtBQUNsQixNQUFhLFVBQVcsU0FBUSxzQkFBc0I7SUFHcEQsWUFBWSxLQUFnQixFQUFFLFFBQW1CLEVBQUUsTUFBZ0I7UUFDakUsS0FBSyxDQUFDLEtBQUssRUFBRSxRQUFRLEVBQUUsTUFBTSxDQUFDLENBQUM7UUFIekIsc0JBQWlCLEdBQTRCLFNBQVMsQ0FBQztRQUk3RCxJQU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5cGUubWVzc2FnZSk7XG4gIH1cbn1cbiJdfQ==

@@ -30,4 +30,2 @@ "use strict";

const bs58 = __importStar(require("bs58"));
const crypto = __importStar(require("crypto"));
const openpgp = __importStar(require("openpgp"));
const hdTree_1 = require("../../../../account-lib/mpc/hdTree");

@@ -185,14 +183,3 @@ const tss_1 = __importDefault(require("../../../../account-lib/mpc/tss"));

const backupKeyShare = MPC.keyShare(2, m, n);
const randomHexString = crypto.randomBytes(12).toString('hex');
// Allow generating secp256k1 key pairs
openpgp.config.rejectCurves = new Set();
const userGpgKey = await openpgp.generateKey({
userIDs: [
{
name: randomHexString,
email: `user-${randomHexString}@${randomHexString}.com`,
},
],
curve: 'secp256k1',
});
const userGpgKey = await opengpgUtils_1.generateGPGKeyPair('secp256k1');
const bitgoKeychain = await this.createBitgoKeychain(userGpgKey, userKeyShare, backupKeyShare, params.enterprise);

@@ -336,2 +323,2 @@ const userKeychainPromise = this.createUserKeychain(userGpgKey, userKeyShare, backupKeyShare, bitgoKeychain, params.passphrase, params.originalPasscodeEncryptionCode);

exports.TssUtils = EddsaUtils;
//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiZWRkc2EuanMiLCJzb3VyY2VSb290IjoiIiwic291cmNlcyI6WyIuLi8uLi8uLi8uLi8uLi8uLi9zcmMvYml0Z28vdXRpbHMvdHNzL2VkZHNhL2VkZHNhLnRzIl0sIm5hbWVzIjpbXSwibWFwcGluZ3MiOiI7Ozs7Ozs7Ozs7Ozs7Ozs7Ozs7Ozs7Ozs7QUFBQTs7R0FFRztBQUNILDJDQUE2QjtBQUM3QiwrQ0FBaUM7QUFDakMsaURBQW1DO0FBQ25DLCtEQUFrRTtBQUNsRSwwRUFBMkU7QUFFM0UscURBQXNGO0FBQ3RGLHNDQVFzQjtBQVN0QixtRUFBMkM7QUFFM0M7O0dBRUc7QUFFSCxNQUFhLFVBQVcsU0FBUSxzQkFBc0I7SUFDcEQ7Ozs7Ozs7OztPQVN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1ZmZlci5mcm9tKGNvbW1vblB1YkhleFN0ciwgJ2hleCcpKTtcbiAgfVxufVxuLyoqXG4gKiBAZGVwcmVjYXRlZCAtIHVzZSBFZGRzYVV0aWxzXG4gKi9cbmV4cG9ydCBjb25zdCBUc3NVdGlscyA9IEVkZHNhVXRpbHM7XG4iXX0=
{
"name": "@bitgo/sdk-core",
"version": "2.0.0-rc.28",
"version": "2.0.0-rc.29",
"description": "core library functions for BitGoJS",

@@ -39,3 +39,3 @@ "main": "./dist/src/index.js",

"@bitgo/statics": "^8.0.0-rc.21",
"@bitgo/utxo-lib": "^3.0.0-rc.5",
"@bitgo/utxo-lib": "^3.0.0-rc.6",
"@noble/secp256k1": "1.6.3",

@@ -72,3 +72,3 @@ "@stablelib/hex": "^1.0.0",

},
"gitHead": "fb2ed263de0025ee9cb393a1aeb78f4f083b8f8d"
"gitHead": "eeba4982cbc8daf0c53b1e1f39f121e5569a329e"
}

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