scrypt-ts
Advanced tools
Comparing version 0.1.4-alpha.3 to 0.1.4-alpha.5
@@ -121,14 +121,24 @@ "use strict"; | ||
} | ||
const result = this.buildEntryMethodCall(entryMethodInvoking).verify(txContext); | ||
if (!result.success && result.error) { | ||
const matches = /\[(.+?)\]\((.+?)#(\d+)\)/.exec(result.error); | ||
result.error.substring(0, matches.index); | ||
const line = parseInt(matches[3]); | ||
const tsLine = sourceMap[line - 1][0][2] + 1; | ||
result.error = `[Go to Source](file://${srcFile}:${tsLine})`; | ||
try { | ||
const result = this.buildEntryMethodCall(entryMethodInvoking).verify(txContext); | ||
if (!result.success && result.error) { | ||
const matches = /\[(.+?)\]\((.+?)#(\d+)\)/.exec(result.error); | ||
result.error.substring(0, matches.index); | ||
const line = parseInt(matches[3]); | ||
const tsLine = sourceMap[line - 1][0][2] + 1; | ||
result.error = `[Go to Source](file://${srcFile}:${tsLine})`; | ||
} | ||
return result; | ||
} | ||
return result; | ||
catch (error) { | ||
throw error; // make error throwing from `verify` | ||
} | ||
} | ||
getUnlockingScript(callPub) { | ||
return this.clone().buildEntryMethodCall(callPub).unlockingScript; | ||
try { | ||
return this.clone().buildEntryMethodCall(callPub).unlockingScript; | ||
} | ||
catch (error) { | ||
throw error; // make error throwing from `getUnlockingScript` | ||
} | ||
} | ||
@@ -332,3 +342,3 @@ genLaunchConfig(a, tx, inputIndex) { | ||
if (!this.entryMethodCall) { | ||
throw new Error('a contract public method should be called within the `callPub` function'); | ||
throw new Error('a contract public method should be called on the `self` parameter within the `callPub` function'); | ||
} | ||
@@ -335,0 +345,0 @@ const entryCall = this.entryMethodCall; |
{ | ||
"name": "scrypt-ts", | ||
"version": "0.1.4-alpha.3", | ||
"version": "0.1.4-alpha.5", | ||
"description": "A toolset for building sCrypt smart contract applications on Bitcoin SV network written in typescript.", | ||
@@ -46,3 +46,3 @@ "main": "dist/index.js", | ||
"reflect-metadata": "^0.1.13", | ||
"scryptlib": "=1.1.0-beta.11", | ||
"scryptlib": "=1.1.0-beta.12", | ||
"sourcemap-codec": "^1.4.8", | ||
@@ -49,0 +49,0 @@ "ts-patch": "^2.0.2", |
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
156865
3385
Updatedscryptlib@=1.1.0-beta.12