scrypt-ts-lib
Advanced tools
Comparing version 0.1.22 to 0.1.23
@@ -16,2 +16,5 @@ import { ByteString, SmartContractLib } from 'scrypt-ts'; | ||
static verifySig(msg: ByteString, sig: RabinSig, pubKey: RabinPubKey): boolean; | ||
static parseMsg(response: { | ||
digest: string; | ||
}): ByteString; | ||
static parsePubKey(response: { | ||
@@ -18,0 +21,0 @@ rabin: { |
@@ -18,10 +18,5 @@ "use strict"; | ||
static hash(x) { | ||
let result = (0, scrypt_ts_1.toByteString)(''); | ||
for (let i = 0; i < RabinVerifier.SECURITY_LEVEL; i++) { | ||
if (i == 0) { | ||
result = RabinVerifier.expandHash(x); | ||
} | ||
else { | ||
result += RabinVerifier.expandHash(result); | ||
} | ||
let result = RabinVerifier.expandHash(x); | ||
for (let i = 0; i < RabinVerifier.SECURITY_LEVEL - 1; i++) { | ||
result += RabinVerifier.expandHash(result); | ||
} | ||
@@ -61,2 +56,5 @@ return result; | ||
} | ||
static parseMsg(response) { | ||
return (0, scrypt_ts_1.toByteString)(response.digest); | ||
} | ||
static parsePubKey(response) { | ||
@@ -63,0 +61,0 @@ return scrypt_ts_1.Utils.fromLEUnsigned(response.rabin.public_key); |
{ | ||
"name": "scrypt-ts-lib", | ||
"version": "0.1.22", | ||
"version": "0.1.23", | ||
"description": "A collection of smart contract libraries for `scrypt-ts`.", | ||
@@ -5,0 +5,0 @@ "types": "dist/index.d.ts", |
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
681213
5925