Skip to content

Commit

Permalink
update related projects with sample applications
Browse files Browse the repository at this point in the history
  • Loading branch information
woodser committed Aug 16, 2024
1 parent cf0d59c commit 943734d
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 10 deletions.
18 changes: 10 additions & 8 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -108,6 +108,15 @@ await walletFull.close(true);
* [Getting started part 1: creating a Node.js application](docs/developer_guide/getting_started_p1.md)
* [Getting started part 2: creating a web application](docs/developer_guide/getting_started_p2.md)

## Related projects

* [monero-cpp](https://github.com/woodser/monero-cpp) - C++ library counterpart
* [monero-java](https://github.com/woodser/monero-java) - Java library counterpart
* [haveno-ts](https://github.com/haveno-dex/haveno-ts) - used for testing Haveno and its TypeScript library
* [xmr-sample-webpack](https://github.com/woodser/xmr-sample-webpack) - sample browser application using Webpack
* [xmr-sample-next](https://github.com/woodser/xmr-sample-next) - sample browser application using Next.js
* [xmr-sample-vite](https://github.com/woodser/xmr-sample-vite) - sample browser application using Vite (work in progress)

## Using monero-ts in your project

1. `cd your_project` or `mkdir your_project && cd your_project && npm init`
Expand All @@ -126,7 +135,7 @@ To avoid the error "Failed to parse URL from /path/to/file.wasm" on Node.js >16:
- Windows: `set NODE_OPTIONS=--openssl-legacy-provider`

#### Building a browser application
1. Bundle your application code for a browser. See [xmr-sample-app](https://github.com/woodser/xmr-sample-app) for an example project using webpack.
1. Bundle your application code for a browser. See [xmr-sample-webpack](https://github.com/woodser/xmr-sample-webpack) for an example project using Webpack.
2. Copy assets from ./dist to your web app's build directory.

#### Using RPC servers:
Expand Down Expand Up @@ -173,13 +182,6 @@ Compiled WebAssembly binaries are committed to ./dist for convenience, but these
2. In another terminal, build browser tests: `./bin/build_browser_tests.sh`
3. Access http://localhost:8080/tests.html in a browser to run all tests

## Related projects

* [monero-java](https://github.com/woodser/monero-java)
* [monero-cpp](https://github.com/woodser/monero-cpp)
* [haveno-ts](https://github.com/haveno-dex/haveno-ts)
* [xmr-sample-app](https://github.com/woodser/xmr-sample-app) - sample web application using monero-ts

## License

This project is licensed under MIT.
Expand Down
4 changes: 2 additions & 2 deletions docs/developer_guide/getting_started_p2.md
Original file line number Diff line number Diff line change
Expand Up @@ -27,9 +27,9 @@ A script is available to automatically download, build, and launch sample monero

1. Create a new folder to contain the project: `mkdir ~/monero-ts-sample-web-apps`
2. Enter the new directory: `cd ~/monero-ts-sample-web-apps`
3. Download and run the web app starter script: `bash <(curl -sL https://raw.githubusercontent.com/woodser/xmr-sample-app/master/bin/web_template_script.sh)`
3. Download and run the web app starter script: `bash <(curl -sL https://raw.githubusercontent.com/woodser/xmr-sample-webpack/master/bin/web_template_script.sh)`

Alternatively, you can [manually download](https://raw.githubusercontent.com/woodser/xmr-sample-app/master/bin/web_template_script.sh) the script then run it.
Alternatively, you can [manually download](https://raw.githubusercontent.com/woodser/xmr-sample-webpack/master/bin/web_template_script.sh) the script then run it.

The script configures a project folder and serves sample web applications on port 9100. Open a web browser and navigate to http://localhost:9100 for links to the applications:
* "Offline wallet generator" shows off the final result of following this guide. To view the complete offline wallet generator code as a functioning web application, see "src/offline_wallet_generator.html" and "src/offline_wallet_generator.ts".
Expand Down

0 comments on commit 943734d

Please sign in to comment.