scryptlib
Advanced tools
Comparing version 0.2.7 to 0.2.8
export { buildContractClass, VerifyResult } from './contract'; | ||
export { compile } from './compilerWrapper'; | ||
export { bsv, signTx, toHex, getPreimage, num2bin } from './utils'; | ||
export { serializeState } from './serializer'; | ||
export { Int, Bool, Bytes, PrivKey, PubKey, Sig, Ripemd160, Sha1, Sha256, SigHashType, SigHashPreimage, OpCodeType } from './scryptTypes'; |
@@ -13,2 +13,4 @@ "use strict"; | ||
Object.defineProperty(exports, "num2bin", { enumerable: true, get: function () { return utils_1.num2bin; } }); | ||
var serializer_1 = require("./serializer"); | ||
Object.defineProperty(exports, "serializeState", { enumerable: true, get: function () { return serializer_1.serializeState; } }); | ||
var scryptTypes_1 = require("./scryptTypes"); | ||
@@ -15,0 +17,0 @@ Object.defineProperty(exports, "Int", { enumerable: true, get: function () { return scryptTypes_1.Int; } }); |
@@ -9,8 +9,12 @@ "use strict"; | ||
const BN = bsv.crypto.BN; | ||
const Interpreter = bsv.Script.Interpreter; | ||
exports.DEFAULT_FLAGS = Interpreter.SCRIPT_VERIFY_MINIMALDATA | ||
| Interpreter.SCRIPT_ENABLE_SIGHASH_FORKID | ||
| Interpreter.SCRIPT_ENABLE_MAGNETIC_OPCODES | ||
| Interpreter.SCRIPT_ENABLE_MONOLITH_OPCODES | ||
| Interpreter.SCRIPT_VERIFY_NULLFAIL; | ||
const Interp = bsv.Script.Interpreter; | ||
exports.DEFAULT_FLAGS = | ||
//Interp.SCRIPT_VERIFY_P2SH | Interp.SCRIPT_VERIFY_CLEANSTACK | // no longer applies now p2sh is deprecated: cleanstack only applies to p2sh | ||
Interp.SCRIPT_ENABLE_MAGNETIC_OPCODES | Interp.SCRIPT_ENABLE_MONOLITH_OPCODES | // TODO: to be removed after upgrade to bsv 2.0 | ||
Interp.SCRIPT_VERIFY_STRICTENC | | ||
Interp.SCRIPT_ENABLE_SIGHASH_FORKID | Interp.SCRIPT_VERIFY_LOW_S | Interp.SCRIPT_VERIFY_NULLFAIL | | ||
Interp.SCRIPT_VERIFY_DERSIG | | ||
Interp.SCRIPT_VERIFY_MINIMALDATA | Interp.SCRIPT_VERIFY_NULLDUMMY | | ||
Interp.SCRIPT_VERIFY_DISCOURAGE_UPGRADABLE_NOPS | | ||
Interp.SCRIPT_VERIFY_CHECKLOCKTIMEVERIFY | Interp.SCRIPT_VERIFY_CHECKSEQUENCEVERIFY; | ||
exports.DEFAULT_SIGHASH_TYPE = bsv.crypto.Signature.SIGHASH_ALL | bsv.crypto.Signature.SIGHASH_FORKID; | ||
@@ -200,3 +204,3 @@ function bool2Asm(str) { | ||
if (n === 0) { | ||
return "00".repeat(dataLen); | ||
return '00'.repeat(dataLen); | ||
} | ||
@@ -203,0 +207,0 @@ const num = BN.fromNumber(n); |
{ | ||
"name": "scryptlib", | ||
"version": "0.2.7", | ||
"version": "0.2.8", | ||
"description": "Javascript SDK for integration of Bitcoin SV Smart Contracts written in sCrypt language.", | ||
@@ -5,0 +5,0 @@ "engines": { |
61051
19
1353