forked from cygnet3/sp-client
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
The new readme reflects the new purpose of sp-client: to be a silent payments library operating on the level of a wallet.
- Loading branch information
Showing
1 changed file
with
5 additions
and
21 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,23 +1,7 @@ | ||
# SP backend | ||
# SP client | ||
|
||
This is the silent payments backend for our flutter silent payments wallet [Donationwallet](https://github.com/cygnet3/donationwallet). | ||
Sp-client is a library that can be used to build silent payment wallets. | ||
It builds on top of [rust-silentpayments](https://github.com/cygnet3/rust-silentpayments). | ||
|
||
Our wallet uses nakamoto (a BIP158 client) and rust-silentpayments. To communicate with flutter, we use flutter\_rust\_bridge. | ||
|
||
## Generate binaries for android | ||
|
||
Generating the binaries for android requires installing `cargo-ndk`. Install it by running `cargo install cargo-ndk`. You may also need to add your desired toolchains: | ||
|
||
``` | ||
rustup target add \ | ||
aarch64-linux-android \ | ||
armv7-linux-androideabi \ | ||
x86_64-linux-android \ | ||
i686-linux-android | ||
``` | ||
|
||
After these are installed, run `just build-android` (or just copy the command found in the `justfile`). | ||
|
||
## Updating flutter api | ||
|
||
To bridge between flutter and rust, the interface in `src/api.rs` is exposed to flutter. Whenever this file is updated, you need to run `flutter_rust_bridge_codegen`. First install it using `cargo install flutter_rust_bridge_codegen`, then run `just gen` (or copy the command found in the `justfile`. | ||
Whereas rust-silentpayments concerns itself with cryptography (it is essentially a wrapper around secp256k1 for some silent payments logic), | ||
sp-client is concerned with high-level wallet stuff, such as parsing incoming transactions, managing owned outputs, and signing transactions. |