@btc-vision/btc-runtime 1.0.0 → 1.0.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@btc-vision/btc-runtime",
3
- "version": "1.0.0",
3
+ "version": "1.0.1",
4
4
  "description": "Bitcoin Smart Contract Runtime",
5
5
  "main": "btc/index.ts",
6
6
  "types": "btc/index.ts",
@@ -32,17 +32,17 @@ export class BlockchainEnvironment {
32
32
 
33
33
  constructor() {}
34
34
 
35
- private _contract: Potential<OP_NET> = null;
35
+ private _contract: Potential<() => OP_NET> = null;
36
36
 
37
37
  public get contract(): OP_NET {
38
38
  if (!this._contract) {
39
39
  throw this.error('Contract is required');
40
40
  }
41
41
 
42
- return this._contract as OP_NET;
42
+ return this._contract();
43
43
  }
44
44
 
45
- public set contract(contract: OP_NET) {
45
+ public set contract(contract: () => OP_NET) {
46
46
  this._contract = contract;
47
47
  }
48
48