{"id":16154434,"url":"https://github.com/vtnerd/lwsf","last_synced_at":"2025-04-30T08:22:54.406Z","repository":{"id":254903525,"uuid":"822866001","full_name":"vtnerd/lwsf","owner":"vtnerd","description":"C++ frontend/api for monero LWS compatible servers","archived":false,"fork":false,"pushed_at":"2025-04-19T02:20:48.000Z","size":366,"stargazers_count":6,"open_issues_count":0,"forks_count":1,"subscribers_count":4,"default_branch":"main","last_synced_at":"2025-04-19T11:06:56.533Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":"C++","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"bsd-3-clause","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/vtnerd.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null,"zenodo":null}},"created_at":"2024-07-02T01:44:22.000Z","updated_at":"2025-04-19T02:20:51.000Z","dependencies_parsed_at":"2024-08-26T22:46:20.505Z","dependency_job_id":"0285fcf8-01f9-43aa-9fbc-e45903d441b8","html_url":"https://github.com/vtnerd/lwsf","commit_stats":null,"previous_names":["vtnerd/lwsf"],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/vtnerd%2Flwsf","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/vtnerd%2Flwsf/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/vtnerd%2Flwsf/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/vtnerd%2Flwsf/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/vtnerd","download_url":"https://codeload.github.com/vtnerd/lwsf/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":251666938,"owners_count":21624401,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":[],"created_at":"2024-10-10T01:17:23.648Z","updated_at":"2025-04-30T08:22:54.399Z","avatar_url":"https://github.com/vtnerd.png","language":"C++","funding_links":[],"categories":[],"sub_categories":[],"readme":"# lwsf\n\n\u003e This project is **NOT** a part of the official monero \"core\" code, but _may_\n\u003e be merged into that project.\n\n\u003e This project is correctly incomplete, so the instructions here are for\n\u003e the truly adventurous.\n\n## Table of Contents\n\n  - [Introduction](#introduction)\n  - [About this project](#about-this-project)\n  - [License](#license)\n  - [Compiling lwsf from source](#compiling-lwsf-from-source)\n    - [Dependencies](#dependencies)\n    - [Cloning the repository](#cloning-the-repository)\n    - [Build Instructions](#build-instructions)\n  - [Running lwsf](#running-lwsf)\n\n\n## Introduction\n\nMonero is a private, secure, untraceable, decentralised digital currency. You are your bank, you control your funds, and nobody can trace your transfers unless you allow them to do so.\n\n**Privacy:** Monero uses a cryptographically sound system to allow you to send and receive funds without your transactions being easily revealed on the blockchain (the ledger of transactions that everyone has). This ensures that your purchases, receipts, and all transfers remain absolutely private by default.\n\n**Security:** Using the power of a distributed peer-to-peer consensus network, every transaction on the network is cryptographically secured. Individual wallets have a 25 word mnemonic seed that is only displayed once, and can be written down to backup the wallet. Wallet files are encrypted with a passphrase to ensure they are useless if stolen.\n\n**Untraceability:** By taking advantage of ring signatures, a special property of a certain type of cryptography, Monero is able to ensure that transactions are not only untraceable, but have an optional measure of ambiguity that ensures that transactions cannot easily be tied back to an individual user or computer.\n\n**Decentralization:** The utility of monero depends on its decentralised peer-to-peer consensus network - anyone should be able to run the monero software, validate the integrity of the blockchain, and participate in all aspects of the monero network using consumer-grade commodity hardware. Decentralization of the monero network is maintained by software development that minimizes the costs of running the monero software and inhibits the proliferation of specialized, non-commodity hardware.\n\n\n## About this project\n\nThe tl;dr is that you if you import this project into your wallet,\nyou can choose at runtime between a Monero \"full\" wallet that does\nall of the transaction scanning locally, or a Monero \"light\" wallet\nthat does all of the scanning remotely. A single C++ `virtual`\ninterface has two different implementations for Monero wallet\nprocessing.\n\n**The longer version -**\n\nThis is a client library for the [Monero light-wallet REST API](https://github.com/monero-project/meta/blob/master/api/lightwallet_rest.md)\n(i.e. MyMonero compatible) that implements the [`wallet2_api.h`](https://github.com/monero-project/monero/blob/3b01c490953fe92f3c6628fa31d280a4f0490d28/src/wallet/api/wallet2_api.h)\ninterface. Downstream projects/wallets can write code that calls into\nthe `wallet2_api.h` functions to manage a Monero wallet, and select\na \"standard\" monero wallet by calling\n`Monero::WalletManagerFactory::getWalletManager()` or select a\nlight-wallet by calling `lwsf::WalletManagerFactory::getWalletManager()`.\n\n[`lwcli` illustrates how this works](https://github.com/cifro-codes/lwcli/blob/4a6793608c46f05d959336ea55dd106e0b0339bd/src/main.cpp#L281).\nThe main function calls a different \"factory\" function depending on the\nCLI arguments. The `lwcli` TUI \"draw\" code is then given a single\n`Monero::WalletManager` interface object that can be one of two\nimplementations. The `lwsf` manager requires the\nuser to specify a [LWS](https://github.com/vtnerd/monero-lws) server,\nwhereas the `Monero` manager requires a monero daemon RPC. The\nlight-wallet implementation can have quicker sync time, whereas the\nmonerod implementation will have better privacy guarantees. If you\nrun your own LWS server, the privacy is identical.\n\nThe projects use different file formats for storing data, so\nyou have to manully import a wallet via seed if you want to\nchange backends. The files output by the `Monero` factory function\nare compatbile with `monero-gui` and `monero-wallet-cli`, as it\nuses the same code.\n\n\n## License\n\nSee [LICENSE](LICENSE).\n\n\n## Compiling lwsf from source\n\n### Dependencies\n\nThe following table summarizes the tools and libraries required to build.\n\n| Dep          | Min. version  | Vendored | Debian/Ubuntu pkg    | Arch pkg     | Void pkg           | Fedora pkg          | Optional | Purpose         |\n| ------------ | ------------- | -------- | -------------------- | ------------ | ------------------ | ------------------- | -------- | --------------- |\n| GCC          | 7             | NO       | `build-essential`    | `base-devel` | `base-devel`       | `gcc`               | NO       |                 |\n| CMake        | 3.5           | NO       | `cmake`              | `cmake`      | `cmake`            | `cmake`             | NO       |                 |\n| Boost        | 1.66          | NO       | `libboost-all-dev`   | `boost`      | `boost-devel`      | `boost-devel`       | NO       | C++ libraries   |\n| monero       | master branch | NO       |                      |              |                    |                     | NO       | Monero libraries|\n| OpenSSL      | basically any | NO       | `libssl-dev`         | `openssl`    | `libressl-devel`   | `openssl-devel`     | NO       | sha256 sum      |\n| libzmq       | 4.2.0         | NO       | `libzmq3-dev`        | `zeromq`     | `zeromq-devel`     | `zeromq-devel`      | NO       | ZeroMQ library  |\n| libunbound   | 1.4.16        | NO       | `libunbound-dev`     | `unbound`    | `unbound-devel`    | `unbound-devel`     | NO       | DNS resolver    |\n| libsodium    | ?             | NO       | `libsodium-dev`      | `libsodium`  | `libsodium-devel`  | `libsodium-devel`   | NO       | cryptography    |\n| Doxygen      | any           | NO       | `doxygen`            | `doxygen`    | `doxygen`          | `doxygen`           | YES      | Documentation   |\n| Graphviz     | any           | NO       | `graphviz`           | `graphviz`   | `graphviz`         | `graphviz`          | YES      | Documentation   |\n\nFollow the guide from the [Monero projdect](https://github.com/monero-project/monero/blob/master/README.md#dependencies) for\ndependency installation and cloning the Monero repository. Stop\nafter you've finished the cloning section for Monero, as `lwsf`\nwill build Monero separately for you.\n\n### Cloning the repository\n\nClone recursively to pull-in needed submodule(s):\n\n```bash\ngit clone --recursive https://github.com/vtnerd/lwsf.git\ncd monero-lws \u0026\u0026 git submodule init \u0026\u0026 git submodule update\n```\n\n### Build instructions\n\nMonero uses the CMake build system. Create a folder for the build,\nand specify both the Monero source directory and\nlwsf source directory:\n\n```bash\nmkdir build_lwsf \u0026\u0026 cd build_lwsf\ncmake -DCMAKE_BUILD_TYPE=Release -DMONERO_SOURCE_DIR=/home/user/monero_source /home/user/lwsf_source\ncmake --build\n```\n\n## Running lwsf\n\nWhen complete, you should have `lwsf-ledger` executable in\n`/home/user/build_lwsf/src` and a `lwsf-api.a` file in the\nsame folder. Run the `-h` option on `lwsf-ledger` to test\nagainst a LWS server.\n\n### lwsf-api.a\n\nThis file is a little tricky to use outright as it doesn't\ncontain the entire code needed. The remainder of the code\nis in `.a` files in the Monero source directory. The best\nway to include `lwsf` into another project is to use Cmake\nwith the [`FetchContent` function](https://github.com/cifro-codes/lwcli/blob/4a6793608c46f05d959336ea55dd106e0b0339bd/CMakeLists.txt#L40).\nAfter running those few lines, you will have a `lwsf-api`\ntarget in Cmake:\n\n```cmake\nproject(your_project)\ninclude(FetchContent)\nFetchContent_Declare(lwsf SOURCE_DIR \"${your_project_SOURCE_DIR}/external/lwsf\")\n\nif (NOT lwsf_POPULATED)\n  FetchContent_MakeAvailable(lwsf)\nendif ()\n\nadd_library(your_library ...)\ntarget_link_libraries(your_library lwsf-api)\n```\n\n\n\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fvtnerd%2Flwsf","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fvtnerd%2Flwsf","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fvtnerd%2Flwsf/lists"}