Skip to content

Commit

Permalink
Update README
Browse files Browse the repository at this point in the history
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
cygnet3 committed Apr 24, 2024
1 parent 53ab611 commit f766e79
Showing 1 changed file with 5 additions and 21 deletions.
26 changes: 5 additions & 21 deletions README.md
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.

0 comments on commit f766e79

Please sign in to comment.