diff --git a/.gitignore b/.gitignore index a0fe341..cd2b490 100644 --- a/.gitignore +++ b/.gitignore @@ -9,5 +9,7 @@ package-lock.json node.json yarn-error.log +.yarnrc + venv dist* diff --git a/package.json b/package.json index 926c48c..ddca46f 100644 --- a/package.json +++ b/package.json @@ -3,6 +3,9 @@ "version": "0.2.0", "description": "Example of a starknet wallet implemented with starknetjs", "main": "index.js", + "bin": { + "starknet-cli-wallet": "./dist/src/index.js" + }, "types": "./dist/types/index.d.ts", "scripts": { "clean": "rm -rf dist", diff --git a/src/index.ts b/src/index.ts index 1acb26f..6f44bbf 100644 --- a/src/index.ts +++ b/src/index.ts @@ -1,3 +1,5 @@ +#!/usr/bin/env node + import { ensureEnvVar } from "./util"; import { program } from "commander"; import { getProvider } from "./ProviderConfig"; diff --git a/src/secp256k1.ts b/src/secp256k1.ts deleted file mode 100644 index ff43853..0000000 --- a/src/secp256k1.ts +++ /dev/null @@ -1,7 +0,0 @@ -// Common.js and ECMAScript Modules (ESM) -import { secp256k1 } from "@noble/curves/secp256k1"; - -const key = secp256k1.utils.randomPrivateKey(); -const pub = secp256k1.getPublicKey(key); -const msg = new Uint8Array(32).fill(1); -const sig = secp256k1.sign(msg, key); diff --git a/tsconfig.json b/tsconfig.json index 32eb006..55aa92a 100644 --- a/tsconfig.json +++ b/tsconfig.json @@ -4,8 +4,8 @@ "module": "commonjs", "strict": true, "esModuleInterop": true, - "outDir": "dist", + "outDir": "./dist", "resolveJsonModule": true }, - "include": ["./test"] + "include": ["./src/index.ts", "./test"] }