scryptlib
Advanced tools
Comparing version 1.1.0-beta to 1.1.0-beta2
@@ -261,5 +261,5 @@ "use strict"; | ||
{ | ||
var _a = __read(utils_1.parseStateHex(contract, scriptHex), 2), firstCall = _a[0], args = _a[1]; | ||
var _a = __read(utils_1.parseStateHex(contract, scriptHex), 2), isGenesis = _a[0], args = _a[1]; | ||
contract.statePropsArgs = args; | ||
contract.firstCall = firstCall; | ||
contract.isGenesis = isGenesis; | ||
} | ||
@@ -266,0 +266,0 @@ break; |
@@ -58,3 +58,3 @@ import { LibraryEntity, ParamEntity } from '.'; | ||
statePropsArgs: Arguments; | ||
firstCall: boolean; | ||
isGenesis: boolean; | ||
get lockingScript(): Script; | ||
@@ -61,0 +61,0 @@ private _txContext?; |
@@ -79,3 +79,3 @@ "use strict"; | ||
// A newly constructed contract always has this set to true, and after invocation, always has it set to false | ||
this.firstCall = true; | ||
this.isGenesis = true; | ||
} | ||
@@ -303,3 +303,3 @@ Object.defineProperty(AbstractContract.prototype, "lockingScript", { | ||
if (AbstractContract.isStateful(this)) { | ||
var state = internal_1.buildContractState(this.statePropsArgs, this.firstCall, this.resolver.resolverType); | ||
var state = internal_1.buildContractState(this.statePropsArgs, this.isGenesis, this.resolver.resolverType); | ||
return internal_1.bsv.Script.fromHex(state); | ||
@@ -338,5 +338,5 @@ } | ||
if (AbstractContract.isStateful(this)) { | ||
var _a = __read(_1.parseStateHex(this, this._dataPartInHex), 2), firstCall = _a[0], args = _a[1]; | ||
var _a = __read(_1.parseStateHex(this, this._dataPartInHex), 2), isGenesis = _a[0], args = _a[1]; | ||
this.statePropsArgs = args; | ||
this.firstCall = firstCall; | ||
this.isGenesis = isGenesis; | ||
} | ||
@@ -542,3 +542,3 @@ }; | ||
arg.value = value; | ||
this.firstCall = false; | ||
this.isGenesis = false; | ||
} | ||
@@ -545,0 +545,0 @@ else { |
@@ -126,7 +126,7 @@ /// <reference types="node" /> | ||
* @param args | ||
* @param firstCall | ||
* @param isGenesis | ||
* @param finalTypeResolver | ||
* @returns | ||
*/ | ||
export declare function buildContractState(args: Arguments, firstCall: boolean, finalTypeResolver: TypeResolver): string; | ||
export declare function buildContractState(args: Arguments, isGenesis: boolean, finalTypeResolver: TypeResolver): string; | ||
export declare function buildDefaultStateProps(contract: AbstractContract): Arguments; | ||
@@ -133,0 +133,0 @@ export declare function readBytes(br: bsv.encoding.BufferReader): { |
{ | ||
"name": "scryptlib", | ||
"version": "1.1.0-beta", | ||
"version": "1.1.0-beta2", | ||
"description": "Javascript SDK for integration of Bitcoin SV Smart Contracts written in sCrypt language.", | ||
@@ -5,0 +5,0 @@ "engines": { |
Sorry, the diff of this file is too big to display
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
966462