@harmoniclabs/pebble-cli 0.1.0 → 0.1.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/dist/index.d.ts CHANGED
@@ -1,2 +1,2 @@
1
- #!/usr/bin/env node --max-old-space-size=8192
1
+ #!/usr/bin/env node
2
2
  export {};
package/dist/index.js CHANGED
@@ -1,4 +1,4 @@
1
- #!/usr/bin/env node --max-old-space-size=8192
1
+ #!/usr/bin/env node
2
2
  import { Command } from "commander";
3
3
  import { PEBBLE_VERSION, PEBBLE_LIB_VERSION, PEBBLE_COMMIT_HASH } from "./version.generated.js";
4
4
  import { initPebbleProject } from "./init/initPebbleProject.js";
@@ -19,6 +19,7 @@ program
19
19
  if (opts.version) {
20
20
  console.log(versionOutput);
21
21
  process.exit(0);
22
+ return;
22
23
  }
23
24
  program.help();
24
25
  });
@@ -162,9 +162,8 @@ ${includeOffchain ? "- `offchain/`: optional offchain scaffolding\n" : ""}
162
162
  await writeFile(pkgPath, JSON.stringify(pkgJson, null, 2) + "\n");
163
163
  // src/index.pebble template
164
164
  const indexPebblePath = path.join(srcDir, "index.pebble");
165
- const indexPebble = (`
166
- // if no methods are defined
167
- // a simple always failing contract is generated
165
+ const indexPebble = (`// if no methods are defined
166
+ // the contract is interpreted as always failing
168
167
  contract MyContract {
169
168
 
170
169
  param owner: PubKeyHash;
@@ -172,7 +171,7 @@ contract MyContract {
172
171
  spend ownerAllowsIt() {
173
172
  const { tx } = context;
174
173
 
175
- assert tx.signatories.includes( this.owner );
174
+ assert tx.requiredSigners.includes( this.owner );
176
175
  }
177
176
 
178
177
  spend sendToOwner( amount: int ) {
@@ -182,7 +181,7 @@ contract MyContract {
182
181
 
183
182
  const output = tx.outputs[0];
184
183
 
185
- assert output.address.credential.hash() == this.owner;
184
+ assert output.address.payment.hash() == this.owner;
186
185
  assert output.value.lovelaces() >= amount;
187
186
  }
188
187
 
@@ -1,3 +1,3 @@
1
- export declare const PEBBLE_VERSION = "0.1.0";
2
- export declare const PEBBLE_LIB_VERSION = "0.1.0";
3
- export declare const PEBBLE_COMMIT_HASH = "23b275129c3782c11ea56be9d6daa16f4ea21831";
1
+ export declare const PEBBLE_VERSION = "0.1.1";
2
+ export declare const PEBBLE_LIB_VERSION = "0.1.1";
3
+ export declare const PEBBLE_COMMIT_HASH = "2f328f9f2856553e39f7046dda85f1ce06247152";
@@ -1,4 +1,4 @@
1
1
  // This file is auto-generated by scripts/genVersions.js. Do not edit.
2
- export const PEBBLE_VERSION = "0.1.0";
3
- export const PEBBLE_LIB_VERSION = "0.1.0";
4
- export const PEBBLE_COMMIT_HASH = "23b275129c3782c11ea56be9d6daa16f4ea21831";
2
+ export const PEBBLE_VERSION = "0.1.1";
3
+ export const PEBBLE_LIB_VERSION = "0.1.1";
4
+ export const PEBBLE_COMMIT_HASH = "2f328f9f2856553e39f7046dda85f1ce06247152";
package/package.json CHANGED
@@ -1,8 +1,11 @@
1
1
  {
2
2
  "name": "@harmoniclabs/pebble-cli",
3
- "version": "0.1.0",
3
+ "version": "0.1.1",
4
4
  "description": "A simple, yet rock solid, functional language with an imperative bias, targeting UPLC",
5
- "bin": "./dist/index.js",
5
+ "bin": {
6
+ "pebble": "./dist/index.js",
7
+ "pebble-cli": "./dist/index.js"
8
+ },
6
9
  "types": "./dist/index.d.ts",
7
10
  "engines": {
8
11
  "node": ">=22",
@@ -47,7 +50,7 @@
47
50
  "dependencies": {
48
51
  "@harmoniclabs/crypto": "^0.3.0",
49
52
  "@harmoniclabs/obj-utils": "^1.0.0",
50
- "@harmoniclabs/pebble": "^0.1.0",
53
+ "@harmoniclabs/pebble": "^0.1.1",
51
54
  "@harmoniclabs/plutus-machine": "^2.1.1",
52
55
  "@harmoniclabs/uint8array-utils": "^1.0.4",
53
56
  "@harmoniclabs/uplc": "^1.4.0",
@@ -62,4 +65,4 @@
62
65
  "typescript": "^4.6.3"
63
66
  },
64
67
  "funding": "https://github.com/sponsors/HarmonicLabs"
65
- }
68
+ }