Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 4 additions & 3 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -11,15 +11,16 @@ mise trust
mise install
```

**Recommended**: Add [mise shell integration](https://mise.jdx.dev/getting-started.html#activate-mise) so that the mise environment will automatically activate when you are this repo, giving you access to all executables and environment variables. Otherwise you will need will need to either manually `mise activate [SHELL]` or run all commands with the `mise exec` prefix.
**Recommended**: Add [mise shell integration](https://mise.jdx.dev/getting-started.html#activate-mise) so that the mise environment will automatically activate when you are this repo, giving you access to all executables and environment variables. Otherwise you will need will need to either manually exec the script found with `mise activate [SHELL]` (such as `eval "$(mise activate bash)"`) or run all commands with the `mise exec` prefix.

## pkg-config
## system packages

We use `pkg-config` in the build process.
We use `pkg-config` and `clang` in the build process.
One way to install it is through brew:

```
brew install pkgconf
brew install llvm
```

## [lefthook](https://lefthook.dev/) (optional)
Expand Down
28 changes: 27 additions & 1 deletion sdks/js/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -20,12 +20,38 @@ cd spark/sdks/js
corepack prepare --activate
```

Then install dependencies for all workspaces:
Then install & build dependencies for all workspaces:

```
# cd to js or to any subdirectory of js
cd spark/sdks/js
yarn
yarn build
```

Please note there is a postinstall script that runs after install to build some dependencies. This will run automatically when the dependency tree changes or when manually running `yarn rebuild`.

## Running Examples

Example (`spark-node-express`):

```
cd spark/sdks/js
yarn
yarn build
cd examples/spark-node-express
yarn start
```

Refer to the individual README files in each directory for any additional instructions.

**Alternative: Use mise tasks from the repo root for common workflows:**

See root README for instructions on installing mise. Then see `mise.toml` for all tasks. Common ones:

```bash
# From the spark repo root
mise spark-cli-regtest # Run CLI with regtest network
mise spark-cli-mainnet # Run CLI with mainnet
mise test-js # Run JS tests
```
4 changes: 2 additions & 2 deletions sdks/js/examples/spark-node-express/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -21,13 +21,13 @@ npm run start
To init a new wallet, make an empty POST request to either.

```
https://localhost:{PORT}/spark-wallet/init
http://localhost:{PORT}/spark-wallet/wallet/init
```

or

```
https://localhost:{PORT}/issuer-wallet/init
http://localhost:{PORT}/issuer-wallet/wallet/init
```

Your mnemonic should then get saved to your local machine and you can explore our api from there.
Expand Down
4 changes: 4 additions & 0 deletions sdks/js/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -42,9 +42,13 @@
"bare-make": "^1.5.1",
"cmake-bare": "^1.6.5",
"detox": "^20.39.0",
"eslint": "^8.56.0",
"octokit": "^4.0.2",
"ts-prune": "^0.10.3",
"turbo": "^2.4.4"
},
"resolutions": {
"eslint": "^8.56.0"
},
"packageManager": "yarn@4.9.2"
}
Loading