@xyo-network/signing
Advanced tools
Comparing version 0.9.1 to 0.10.0
@@ -5,2 +5,3 @@ export { IXyoPublicKey, IXyoSignature, IXyoSigner, IXyoSignerProvider } from './@types'; | ||
export { XyoStubSigner } from './xyo-stub-signer'; | ||
export { signerSpec } from './xyo-signing-test-utils'; | ||
//# sourceMappingURL=index.d.ts.map |
@@ -8,3 +8,3 @@ "use strict"; | ||
* @Last modified by: ryanxyo | ||
* @Last modified time: Tuesday, 11th December 2018 9:30:23 am | ||
* @Last modified time: Friday, 14th December 2018 12:32:38 pm | ||
* @License: All Rights Reserved | ||
@@ -20,2 +20,4 @@ * @Copyright: Copyright XY | The Findables Company | ||
exports.XyoStubSigner = xyo_stub_signer_1.XyoStubSigner; | ||
var xyo_signing_test_utils_1 = require("./xyo-signing-test-utils"); | ||
exports.signerSpec = xyo_signing_test_utils_1.signerSpec; | ||
//# sourceMappingURL=index.js.map |
@@ -6,6 +6,7 @@ /// <reference types="node" /> | ||
private readonly desiredSignatureHexString; | ||
private readonly validData?; | ||
static schemaObjectId: number; | ||
static deserialize(data: Buffer, serializationService: IXyoSerializationService): XyoStubSignature; | ||
schemaObjectId: number; | ||
constructor(desiredSignatureHexString: string); | ||
constructor(desiredSignatureHexString: string, validData?: Buffer | undefined); | ||
verify(data: Buffer, publicKey: IXyoPublicKey): Promise<boolean>; | ||
@@ -12,0 +13,0 @@ readonly encodedSignature: Buffer; |
@@ -8,3 +8,3 @@ "use strict"; | ||
* @Last modified by: ryanxyo | ||
* @Last modified time: Wednesday, 12th December 2018 1:38:11 pm | ||
* @Last modified time: Friday, 14th December 2018 12:31:06 pm | ||
* @License: All Rights Reserved | ||
@@ -25,5 +25,6 @@ * @Copyright: Copyright XY | The Findables Company | ||
class XyoStubSignature extends serialization_1.XyoBaseSerializable { | ||
constructor(desiredSignatureHexString) { | ||
constructor(desiredSignatureHexString, validData) { | ||
super(serialization_schema_1.schema); | ||
this.desiredSignatureHexString = desiredSignatureHexString; | ||
this.validData = validData; | ||
this.schemaObjectId = XyoStubSignature.schemaObjectId; | ||
@@ -37,2 +38,5 @@ } | ||
return __awaiter(this, void 0, void 0, function* () { | ||
if (this.validData) { | ||
return data.equals(this.validData); | ||
} | ||
return true; | ||
@@ -39,0 +43,0 @@ }); |
{ | ||
"name": "@xyo-network/signing", | ||
"version": "0.9.1", | ||
"version": "0.10.0", | ||
"description": "Signing Types and Services for the XYO Network", | ||
@@ -10,4 +10,4 @@ "main": "dist/index.js", | ||
"dependencies": { | ||
"@xyo-network/serialization": "^0.9.0", | ||
"@xyo-network/serialization-schema": "^0.9.1" | ||
"@xyo-network/serialization": "^0.10.0", | ||
"@xyo-network/serialization-schema": "^0.10.0" | ||
}, | ||
@@ -23,3 +23,3 @@ "devDependencies": { | ||
}, | ||
"gitHead": "9b5c8fc3e8d804e589947149e4c5112694e198e9" | ||
"gitHead": "599931020ccd642efbc6e4b1fabd243d87a490bf" | ||
} |
@@ -7,3 +7,3 @@ /* | ||
* @Last modified by: ryanxyo | ||
* @Last modified time: Tuesday, 11th December 2018 9:30:23 am | ||
* @Last modified time: Friday, 14th December 2018 12:32:38 pm | ||
* @License: All Rights Reserved | ||
@@ -17,1 +17,3 @@ * @Copyright: Copyright XY | The Findables Company | ||
export { XyoStubSigner } from './xyo-stub-signer' | ||
export { signerSpec } from './xyo-signing-test-utils' |
@@ -7,3 +7,3 @@ /* | ||
* @Last modified by: ryanxyo | ||
* @Last modified time: Wednesday, 12th December 2018 1:38:11 pm | ||
* @Last modified time: Friday, 14th December 2018 12:31:06 pm | ||
* @License: All Rights Reserved | ||
@@ -28,3 +28,6 @@ * @Copyright: Copyright XY | The Findables Company | ||
constructor (private readonly desiredSignatureHexString: string) { | ||
constructor ( | ||
private readonly desiredSignatureHexString: string, | ||
private readonly validData?: Buffer | ||
) { | ||
super(schema) | ||
@@ -34,2 +37,6 @@ } | ||
public async verify(data: Buffer, publicKey: IXyoPublicKey): Promise<boolean> { | ||
if (this.validData) { | ||
return data.equals(this.validData) | ||
} | ||
return true | ||
@@ -36,0 +43,0 @@ } |
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
33273
34
625
+ Added@xyo-network/base@0.10.0(transitive)
+ Added@xyo-network/errors@0.10.0(transitive)
+ Added@xyo-network/serialization@0.10.0(transitive)
+ Added@xyo-network/serialization-schema@0.10.0(transitive)
- Removed@xyo-network/base@0.9.0(transitive)
- Removed@xyo-network/errors@0.9.0(transitive)
- Removed@xyo-network/serialization@0.9.0(transitive)
- Removed@xyo-network/serialization-schema@0.9.1(transitive)