@bitgo-beta/sdk-lib-mpc
Advanced tools
Comparing version 8.2.1-alpha.23 to 8.2.1-alpha.24
@@ -18,3 +18,5 @@ /** | ||
order: () => bigint; | ||
scalarBytes: number; | ||
pointBytes: number; | ||
} | ||
//# sourceMappingURL=baseCurve.d.ts.map |
@@ -6,2 +6,2 @@ "use strict"; | ||
Object.defineProperty(exports, "__esModule", { value: true }); | ||
//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiYmFzZUN1cnZlLmpzIiwic291cmNlUm9vdCI6IiIsInNvdXJjZXMiOlsiLi4vLi4vLi4vc3JjL2N1cnZlcy9iYXNlQ3VydmUudHMiXSwibmFtZXMiOltdLCJtYXBwaW5ncyI6IjtBQUFBOztHQUVHIiwic291cmNlc0NvbnRlbnQiOlsiLyoqXG4gKiBCYXNlIEludGVyZmFjZSBmb3Igc3VwcG9ydGluZyBlbGxpcHRpYyBjdXJ2ZSBwYXJhbWV0ZXJzXG4gKi9cblxuZXhwb3J0IGludGVyZmFjZSBCYXNlQ3VydmUge1xuICAvLyBGdW5jdGlvbiB0aGF0IHJlZHVjZXMgYSBzY2FsYXIgbW9kdWxvIHRoZSBvcmRlciBvZiB0aGVcbiAgLy8gY3VydmUuXG4gIHNjYWxhclJlZHVjZShzOiBiaWdpbnQpOiBiaWdpbnQ7XG4gIC8vIEZ1bmN0aW9uIHRoYXQgcmV0dXJucyB0aGUgbmVnYXRlZCBmaWVsZCBlbGVtZW50IG1vZHVsb1xuICAvLyB0aGUgb3JkZXIgb2YgdGhlIGN1cnZlLlxuICBzY2FsYXJOZWdhdGUoczogYmlnaW50KTogYmlnaW50O1xuICAvLyBGdW5jdGlvbiB0aGF0IHJldHVybnMgdGhlIG1vZHVsYXIgbXVsdGlwbGljYXRpdmUgaW52ZXJzZVxuICAvLyBvZiBhIGZpZWxkIGVsZW1lbnQuXG4gIHNjYWxhckludmVydChzOiBiaWdpbnQpOiBiaWdpbnQ7XG4gIC8vIEZ1bmN0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QgdmVyaWZpZXMgYSBzaWduYXR1cmUuXG4gIHZlcmlmeShtZXNzYWdlOiBCdWZmZXIsIHNpZ25hdHVyZTogQnVmZmVyLCBwdWJsaWNLZXk6IGJpZ2ludCk6IGJvb2xlYW47XG4gIC8vIG9yZGVyIG9mIHRoZSBjdXJ2ZVxuICBvcmRlcjogKCkgPT4gYmlnaW50O1xuICAvLyB0aGUgc2l6ZSBvZiBzY2FsYXIgb2YgdGhlIGN1cnZlIGluIGJ5dGVzXG4gIHNjYWxhckJ5dGVzOiBudW1iZXI7XG4gIC8vIHRoZSBzaXplIG9mIHBvaW50IG9mIHRoZSBjdXJ2ZSBpbiBieXRlc1xuICBwb2ludEJ5dGVzOiBudW1iZXI7XG59XG4iXX0= |
@@ -16,3 +16,5 @@ /// <reference types="node" /> | ||
order(): bigint; | ||
scalarBytes: number; | ||
pointBytes: number; | ||
} | ||
//# sourceMappingURL=secp256k1.d.ts.map |
@@ -26,3 +26,10 @@ "use strict"; | ||
const order = secp.CURVE.n; | ||
const privateKeySize = 32; | ||
const publicKeySize = 33; | ||
class Secp256k1Curve { | ||
constructor() { | ||
this.scalarBytes = privateKeySize; | ||
// Always use compressed points. | ||
this.pointBytes = publicKeySize; | ||
} | ||
scalarRandom() { | ||
@@ -32,3 +39,3 @@ return util_1.bigIntFromU8ABE(secp.utils.randomPrivateKey()); | ||
scalarAdd(x, y) { | ||
return util_1.bigIntFromU8ABE(secp.utils.privateAdd(x, util_1.bigIntToBufferBE(y, 32))); | ||
return util_1.bigIntFromU8ABE(secp.utils.privateAdd(x, util_1.bigIntToBufferBE(y, privateKeySize))); | ||
} | ||
@@ -52,16 +59,16 @@ scalarSub(x, y) { | ||
pointAdd(a, b) { | ||
const pointA = secp.Point.fromHex(util_1.bigIntToBufferBE(a, 32)); | ||
const pointB = secp.Point.fromHex(util_1.bigIntToBufferBE(b, 32)); | ||
const pointA = secp.Point.fromHex(util_1.bigIntToBufferBE(a, privateKeySize)); | ||
const pointB = secp.Point.fromHex(util_1.bigIntToBufferBE(b, privateKeySize)); | ||
return util_1.bigIntFromU8ABE(pointA.add(pointB).toRawBytes(true)); | ||
} | ||
pointMultiply(p, s) { | ||
const pointA = secp.Point.fromHex(util_1.bigIntToBufferBE(p, 32)); | ||
const pointA = secp.Point.fromHex(util_1.bigIntToBufferBE(p, privateKeySize)); | ||
return util_1.bigIntFromU8ABE(pointA.multiply(s).toRawBytes(true)); | ||
} | ||
basePointMult(n) { | ||
const point = util_1.bigIntToBufferBE(n, 32); | ||
const point = util_1.bigIntToBufferBE(n, privateKeySize); | ||
return util_1.bigIntFromU8ABE(secp.getPublicKey(point, true)); | ||
} | ||
verify(message, signature, publicKey) { | ||
return Buffer.from(secp.recoverPublicKey(message, signature.subarray(1), signature[0], true)).equals(util_1.bigIntToBufferBE(publicKey, 33)); | ||
return Buffer.from(secp.recoverPublicKey(message, signature.subarray(1), signature[0], true)).equals(util_1.bigIntToBufferBE(publicKey, publicKeySize)); | ||
} | ||
@@ -73,2 +80,2 @@ order() { | ||
exports.Secp256k1Curve = Secp256k1Curve; | ||
//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoic2VjcDI1NmsxLmpzIiwic291cmNlUm9vdCI6IiIsInNvdXJjZXMiOlsiLi4vLi4vLi4vc3JjL2N1cnZlcy9zZWNwMjU2azEudHMiXSwibmFtZXMiOltdLCJtYXBwaW5ncyI6Ijs7Ozs7Ozs7Ozs7Ozs7Ozs7Ozs7OztBQUFBLGtDQUE0RDtBQUU1RCx1REFBeUM7QUFFekMsTUFBTSxLQUFLLEdBQUcsSUFBSSxDQUFDLEtBQUssQ0FBQyxDQUFDLENBQUM7QUFFM0IsTUFBYSxjQUFjO0lBQ3pCLFlBQVk7UUFDVixPQUFPLHNCQUFlLENBQUMsSUFBSSxDQUFDLEtBQUssQ0FBQyxnQkFBZ0IsRUFBRSxDQUFDLENBQUM7SUFDeEQsQ0FBQztJQUVELFNBQVMsQ0FBQyxDQUFTLE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0tleVNpemU7XG59XG4iXX0= |
@@ -0,5 +1,8 @@ | ||
export * from './curves'; | ||
export * from './openssl'; | ||
export * from './tss'; | ||
export * from './curves'; | ||
export * as HashCommitment from './hashCommitment'; | ||
export * as Schnorr from './schnorrProof'; | ||
export * from './types'; | ||
export * from './util'; | ||
export * from './openssl'; | ||
//# sourceMappingURL=index.d.ts.map |
@@ -9,10 +9,26 @@ "use strict"; | ||
})); | ||
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 __exportStar = (this && this.__exportStar) || function(m, exports) { | ||
for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p); | ||
}; | ||
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; | ||
}; | ||
Object.defineProperty(exports, "__esModule", { value: true }); | ||
exports.Schnorr = exports.HashCommitment = void 0; | ||
__exportStar(require("./curves"), exports); | ||
__exportStar(require("./openssl"), exports); | ||
__exportStar(require("./tss"), exports); | ||
__exportStar(require("./curves"), exports); | ||
exports.HashCommitment = __importStar(require("./hashCommitment")); | ||
exports.Schnorr = __importStar(require("./schnorrProof")); | ||
__exportStar(require("./types"), exports); | ||
__exportStar(require("./util"), exports); | ||
__exportStar(require("./openssl"), exports); | ||
//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiaW5kZXguanMiLCJzb3VyY2VSb290IjoiIiwic291cmNlcyI6WyIuLi8uLi9zcmMvaW5kZXgudHMiXSwibmFtZXMiOltdLCJtYXBwaW5ncyI6Ijs7Ozs7Ozs7Ozs7O0FBQUEsd0NBQXNCO0FBQ3RCLDJDQUF5QjtBQUN6Qix5Q0FBdUI7QUFDdkIsNENBQTBCIiwic291cmNlc0NvbnRlbnQiOlsiZXhwb3J0ICogZnJvbSAnLi90c3MnO1xuZXhwb3J0ICogZnJvbSAnLi9jdXJ2ZXMnO1xuZXhwb3J0ICogZnJvbSAnLi91dGlsJztcbmV4cG9ydCAqIGZyb20gJy4vb3BlbnNzbCc7XG4iXX0= | ||
//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiaW5kZXguanMiLCJzb3VyY2VSb290IjoiIiwic291cmNlcyI6WyIuLi8uLi9zcmMvaW5kZXgudHMiXSwibmFtZXMiOltdLCJtYXBwaW5ncyI6Ijs7Ozs7Ozs7Ozs7Ozs7Ozs7Ozs7Ozs7OztBQUFBLDJDQUF5QjtBQUN6Qiw0Q0FBMEI7QUFDMUIsd0NBQXNCO0FBRXRCLG1FQUFtRDtBQUNuRCwwREFBMEM7QUFDMUMsMENBQXdCO0FBQ3hCLHlDQUF1QiIsInNvdXJjZXNDb250ZW50IjpbImV4cG9ydCAqIGZyb20gJy4vY3VydmVzJztcbmV4cG9ydCAqIGZyb20gJy4vb3BlbnNzbCc7XG5leHBvcnQgKiBmcm9tICcuL3Rzcyc7XG5cbmV4cG9ydCAqIGFzIEhhc2hDb21taXRtZW50IGZyb20gJy4vaGFzaENvbW1pdG1lbnQnO1xuZXhwb3J0ICogYXMgU2Nobm9yciBmcm9tICcuL3NjaG5vcnJQcm9vZic7XG5leHBvcnQgKiBmcm9tICcuL3R5cGVzJztcbmV4cG9ydCAqIGZyb20gJy4vdXRpbCc7XG4iXX0= |
export * as EcdsaTypes from './types'; | ||
export * as EcdsaRangeProof from './rangeproof'; | ||
export * as EcdsaPaillierProof from './paillierproof'; | ||
export * as EcdsaZkVProof from './zkVProof'; | ||
export declare const minModulusBitLength = 3072; | ||
//# sourceMappingURL=index.d.ts.map |
@@ -22,7 +22,8 @@ "use strict"; | ||
Object.defineProperty(exports, "__esModule", { value: true }); | ||
exports.minModulusBitLength = exports.EcdsaPaillierProof = exports.EcdsaRangeProof = exports.EcdsaTypes = void 0; | ||
exports.minModulusBitLength = exports.EcdsaZkVProof = exports.EcdsaPaillierProof = exports.EcdsaRangeProof = exports.EcdsaTypes = void 0; | ||
exports.EcdsaTypes = __importStar(require("./types")); | ||
exports.EcdsaRangeProof = __importStar(require("./rangeproof")); | ||
exports.EcdsaPaillierProof = __importStar(require("./paillierproof")); | ||
exports.EcdsaZkVProof = __importStar(require("./zkVProof")); | ||
exports.minModulusBitLength = 3072; | ||
//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiaW5kZXguanMiLCJzb3VyY2VSb290IjoiIiwic291cmNlcyI6WyIuLi8uLi8uLi8uLi9zcmMvdHNzL2VjZHNhL2luZGV4LnRzIl0sIm5hbWVzIjpbXSwibWFwcGluZ3MiOiI7Ozs7Ozs7Ozs7Ozs7Ozs7Ozs7Ozs7QUFBQSxzREFBc0M7QUFDdEMsZ0VBQWdEO0FBQ2hELHNFQUFzRDtBQUV6QyxRQUFBLG1CQUFtQixHQUFHLElBQUksQ0FBQyIsInNvdXJjZXNDb250ZW50IjpbImV4cG9ydCAqIGFzIEVjZHNhVHlwZXMgZnJvbSAnLi90eXBlcyc7XG5leHBvcnQgKiBhcyBFY2RzYVJhbmdlUHJvb2YgZnJvbSAnLi9yYW5nZXByb29mJztcbmV4cG9ydCAqIGFzIEVjZHNhUGFpbGxpZXJQcm9vZiBmcm9tICcuL3BhaWxsaWVycHJvb2YnO1xuXG5leHBvcnQgY29uc3QgbWluTW9kdWx1c0JpdExlbmd0aCA9IDMwNzI7XG4iXX0= | ||
//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiaW5kZXguanMiLCJzb3VyY2VSb290IjoiIiwic291cmNlcyI6WyIuLi8uLi8uLi8uLi9zcmMvdHNzL2VjZHNhL2luZGV4LnRzIl0sIm5hbWVzIjpbXSwibWFwcGluZ3MiOiI7Ozs7Ozs7Ozs7Ozs7Ozs7Ozs7Ozs7QUFBQSxzREFBc0M7QUFDdEMsZ0VBQWdEO0FBQ2hELHNFQUFzRDtBQUN0RCw0REFBNEM7QUFFL0IsUUFBQSxtQkFBbUIsR0FBRyxJQUFJLENBQUMiLCJzb3VyY2VzQ29udGVudCI6WyJleHBvcnQgKiBhcyBFY2RzYVR5cGVzIGZyb20gJy4vdHlwZXMnO1xuZXhwb3J0ICogYXMgRWNkc2FSYW5nZVByb29mIGZyb20gJy4vcmFuZ2Vwcm9vZic7XG5leHBvcnQgKiBhcyBFY2RzYVBhaWxsaWVyUHJvb2YgZnJvbSAnLi9wYWlsbGllcnByb29mJztcbmV4cG9ydCAqIGFzIEVjZHNhWmtWUHJvb2YgZnJvbSAnLi96a1ZQcm9vZic7XG5cbmV4cG9ydCBjb25zdCBtaW5Nb2R1bHVzQml0TGVuZ3RoID0gMzA3MjtcbiJdfQ== |
@@ -125,3 +125,8 @@ interface NtildeProof<T> { | ||
} | ||
export interface ZkVProof { | ||
Alpha: bigint; | ||
t: bigint; | ||
u: bigint; | ||
} | ||
export {}; | ||
//# sourceMappingURL=types.d.ts.map |
@@ -132,2 +132,2 @@ "use strict"; | ||
exports.serializePaillierChallengeWithProofs = serializePaillierChallengeWithProofs; | ||
//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoidHlwZXMuanMiLCJzb3VyY2VSb290IjoiIiwic291cmNlcyI6WyIuLi8uLi8uLi8uLi9zcmMvdHNzL2VjZHNhL3R5cGVzLnRzIl0sIm5hbWVzIjpbXSwibWFwcGluZ3MiOiI7OztBQUFBLG9FQUFvRTtBQUNwRSxxQ0FBMEc7QUF5QzFHOzs7R0FHRztBQUNILFNBQWdCLGlCQUFpQixDQUFDLFNBQTJCO0lBQzNELE9BQU87UUFDTCxNQUFNLEVBQUUsa0JBQVcsQ0FBQyxTQUFTLENBQUMsTUFBTSxDQUFDO1FBQ3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FuZ2VQcm9vZldpdGhDaGVjayB7XG4gIHo6IGJpZ2ludDtcbiAgenBybTogYmlnaW50O1xuICB0OiBiaWdpbnQ7XG4gIHY6IGJpZ2ludDtcbiAgdzogYmlnaW50O1xuICBzOiBiaWdpbnQ7XG4gIHMxOiBiaWdpbnQ7XG4gIHMyOiBiaWdpbnQ7XG4gIHQxOiBiaWdpbnQ7XG4gIHQyOiBiaWdpbnQ7XG4gIHU6IGJpZ2ludDtcbn1cblxuZXhwb3J0IGludGVyZmFjZSBaa1ZQcm9vZiB7XG4gIEFscGhhOiBiaWdpbnQ7XG4gIHQ6IGJpZ2ludDtcbiAgdTogYmlnaW50O1xufVxuIl19 |
@@ -23,5 +23,5 @@ /// <reference types="node" /> | ||
export declare function bigIntToHex(bigint: bigint, hexLength?: number): string; | ||
export declare function bigIntToBufferLE(n: bigint, bytes?: number): Buffer; | ||
export declare function bigIntToBufferLE(n: bigint, minBytes?: number): Buffer; | ||
export declare function bigIntFromBufferLE(buf: Buffer): bigint; | ||
export declare function bigIntToBufferBE(n: bigint, bytes?: number): Buffer; | ||
export declare function bigIntToBufferBE(n: bigint, minBytes?: number): Buffer; | ||
export declare function bigIntFromBufferBE(buf: Buffer): bigint; | ||
@@ -28,0 +28,0 @@ export declare function bigIntFromU8ABE(buf: Uint8Array): bigint; |
@@ -56,8 +56,8 @@ "use strict"; | ||
exports.bigIntToHex = bigIntToHex; | ||
function bigIntToBufferLE(n, bytes) { | ||
function bigIntToBufferLE(n, minBytes) { | ||
let v = n.toString(16); | ||
v = '0'.slice(0, v.length % 2) + v; | ||
const buf = Buffer.from(v, 'hex').reverse(); | ||
if (bytes && buf.length < bytes) { | ||
return Buffer.concat([buf, Buffer.alloc(bytes - buf.length)]); | ||
if (minBytes && buf.length < minBytes) { | ||
return Buffer.concat([buf, Buffer.alloc(minBytes - buf.length)]); | ||
} | ||
@@ -71,8 +71,8 @@ return buf; | ||
exports.bigIntFromBufferLE = bigIntFromBufferLE; | ||
function bigIntToBufferBE(n, bytes) { | ||
function bigIntToBufferBE(n, minBytes) { | ||
let v = n.toString(16); | ||
v = '0'.slice(0, v.length % 2) + v; | ||
const buf = Buffer.from(v, 'hex'); | ||
if (bytes && buf.length < bytes) { | ||
return Buffer.concat([Buffer.alloc(bytes - buf.length), buf]); | ||
if (minBytes && buf.length < minBytes) { | ||
return Buffer.concat([Buffer.alloc(minBytes - buf.length), buf]); | ||
} | ||
@@ -145,2 +145,2 @@ return buf; | ||
exports.randomBigInt = randomBigInt; | ||
//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoidXRpbC5qcyIsInNvdXJjZVJvb3QiOiIiLCJzb3VyY2VzIjpbIi4uLy4uL3NyYy91dGlsLnRzIl0sIm5hbWVzIjpbXSwibWFwcGluZ3MiOiI7OztBQUFBLHFEQUE0QztBQUM1Qyw2REFBMEQ7QUFDMUQsdURBQXVDO0FBRXZDOzs7R0FHRztBQUNILFNBQWdCLHdCQUF3QixDQUFDLE1BQWdCO0lBQ3ZELE9BQU8sTUFBTSxDQUFDLEdBQUcsQ0FBQyxDQUFDLEtBQUssRUFBRSxFQUFFO1FBQzFCLE9BQU8sV0FBVyxDQUFDLEtBQUssQ0FBQyxDQUFDO0lBQzVCLENBQUMsQ0FBQyxDQUFDO0FBQ0wsQ0FBQztBQUpELDREQUlDO0FBRUQ7Ozs7R0FJRztBQUNILFNBQWdCLHdCQUF3QixDQUFDLE1BQWdCLEVBQUUsU0FBa0I7SUFDM0UsT0FBTyxNQUFNLENBQUMsR0FBRyxDQUFDLENBQUMsS0FBSyxFQUFFLEVBQUU7UUFDMUIsT0FBTyxXQUFXLENBQUMsS0FBSyxFQUFFLFNBQVMsQ0FBQyxDQUFDO0lBQ3ZDLENBQUMsQ0FBQyxDQUFDO0FBQ0wsQ0FBQztBQUpELDREQUlDO0FBRUQsU0FBZ0IsV0FBVyxDQUFDLEdBQVc7SUFDckMsK0RBQStEO0lBQy9ELDREQUE0RDtJQUM1RCw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ldyBFcnJvcigneCBtdXN0IGJlIGxhcmdlciB0aGFuIDInKTtcbiAgfVxuICB3aGlsZSAodHJ1ZSkge1xuICAgIGNvbnN0IHkgPSBhd2FpdCByYW5kb21CaWdJbnQoYml0TGVuZ3RoKHgpKTtcbiAgICBpZiAoeSA+IEJpZ0ludCgwKSAmJiB5IDwgeCAmJiBnY2QoeCwgeSkgPT09IEJpZ0ludCgxKSkge1xuICAgICAgcmV0dXJuIHk7XG4gICAgfVxuICB9XG59XG5cbi8qKlxuICogR2VuZXJhdGUgYSByYW5kb20gbnVtYmVyIG9mIGEgZ2l2ZW4gYml0bGVuZ3RoXG4gKiBAcGFyYW0gYml0bGVuZ3RoXG4gKiBAcmV0dXJucyB7UHJvbWlzZTxiaWdpbnQ+fVxuICovXG5leHBvcnQgYXN5bmMgZnVuY3Rpb24gcmFuZG9tQmlnSW50KGJpdGxlbmd0aDogbnVtYmVyKTogUHJvbWlzZTxiaWdpbnQ+IHtcbiAgcmV0dXJuIGJpZ0ludEZyb21CdWZmZXJCRShCdWZmZXIuZnJvbShhd2FpdCByYW5kQml0cyhiaXRsZW5ndGgsIHRydWUpKSk7XG59XG4iXX0= |
{ | ||
"name": "@bitgo-beta/sdk-lib-mpc", | ||
"version": "8.2.1-alpha.23", | ||
"version": "8.2.1-alpha.24", | ||
"description": "library functions for BitGo's MPC solution", | ||
@@ -51,3 +51,3 @@ "main": "./dist/src/index.js", | ||
}, | ||
"gitHead": "f11494f7f806d1cdf5e836064351287b050a2ee6" | ||
"gitHead": "c922094755cf410acc296b5462f2cdeb396bb78d" | ||
} |
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
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
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
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
10606120
60
4411