style: add build output after applying prettier

This commit is contained in:
d-yokoi 2019-03-03 23:31:17 +09:00
parent 6526000999
commit 0ad8fbc6ba
No known key found for this signature in database
GPG key ID: 49EAF81BC6A0D19A
22 changed files with 217 additions and 203 deletions

View file

@ -34,14 +34,14 @@ function decode(buffer) {
const s = fromDER(decode.s);
return {
signature: Buffer.concat([r, s], 64),
hashType: hashType
hashType: hashType,
};
}
exports.decode = decode;
function encode(signature, hashType) {
typeforce({
signature: types.BufferN(64),
hashType: types.UInt8
hashType: types.UInt8,
}, { signature, hashType });
const hashTypeMod = hashType & ~0x80;
if (hashTypeMod <= 0 || hashTypeMod >= 4)
@ -50,9 +50,6 @@ function encode(signature, hashType) {
hashTypeBuffer.writeUInt8(hashType, 0);
const r = toDER(signature.slice(0, 32));
const s = toDER(signature.slice(32, 64));
return Buffer.concat([
bip66.encode(r, s),
hashTypeBuffer
]);
return Buffer.concat([bip66.encode(r, s), hashTypeBuffer]);
}
exports.encode = encode;