diff --git a/docs/sage/config.md b/docs/sage/config.md index 79ae2ac..94b09c2 100644 --- a/docs/sage/config.md +++ b/docs/sage/config.md @@ -204,7 +204,7 @@ With some DNS servers, the DNS introducers may be blocked or otherwise unreliabl ```toml [[networks]] -dns_introducers = ["introducer.chia.net"] +peer_introducers = ["introducer.chia.net"] ``` ### inherit @@ -226,48 +226,20 @@ For example: [defaults] delta_sync = true -[defaults.change] -mode = "same" - -[defaults.derivation] -mode = "auto" -derivation_batch_size = 1000 - [[wallets]] name = "Main" fingerprint = 1239439275 network = "mainnet" +emoji = "🌱" ``` ### defaults.delta_sync Delta sync is enabled by default. During initial sync, the wallet will use a peer to subscribe to each of its p2 puzzle hashes (addresses) and coin ids. If delta sync is enabled, it will start from the previous peak height instead of downloading all of the coins every time. This is an optimization, but it can lead to data loss if a race condition occurs - for example, if a p2 puzzle hash or coin id is inserted into the database but the app is restarted before it finishes syncing it. In the case of lost data, a resync is required. -### defaults.change - -The mode can be one of the following: - -- `default` - is currently set to `same`, but may change in the future unless manually set -- `same` - reuses the first address among coins you are spending as the change address -- `new` - uses the next unused address to increase transaction privacy - ```toml -[defaults.change] -mode = "same" -``` - -### defaults.derivation - -The mode can be one of the following: - -- `default` - is currently set to `auto`, but may change in the future unless manually set -- `auto` - when the number of unused unhardened addresses is running low, a new batch will be generated -- `static` - only existing addresses will be used, no new ones will be generated automatically - -```toml -[defaults.derivation] -mode = "auto" -derivation_batch_size = 1000 +[defaults] +delta_sync = true ``` ### name @@ -294,39 +266,42 @@ This fingerprint is used for internal identification purposes, and is not consid fingerprint = 1239439275 ``` -### delta_sync +### network -This is a per-wallet override for `defaults.delta_sync`, although it's not currently exposed to the UI to reduce complexity: +A network override, for when you want the wallet to use a different network than the `default_network` automatically. When you log into the wallet, the network you're connected to will switch, and when you log out it will switch back to the default. This is especially useful if you have a wallet that is dedicated to testing, but you want your other wallets to use mainnet. ```toml [[wallets]] -delta_sync = false +network = "testnet11" ``` -### change +### delta_sync -The same as `defaults.change`, although it would take the following form (after the initial `[[wallets]]` settings): +This is a per-wallet override for `defaults.delta_sync`, although it's not currently exposed to the UI to reduce complexity: ```toml -[wallets.change] -mode = "same" +[[wallets]] +delta_sync = false ``` -### derivation +### emoji -The same as `defaults.derivation`, although it would take the following form (after the initial `[[wallets]]` settings): +An optional emoji shown next to the wallet's name, for display purposes only. It can be set in the UI or with the `set_wallet_emoji` RPC endpoint. ```toml -[wallets.derivation] -mode = "auto" -derivation_batch_size = 1000 +[[wallets]] +emoji = "🌱" ``` -### network +### change_address -A network override, for when you want the wallet to use a different network than the `default_network` automatically. When you log into the wallet, the network you're connected to will switch, and when you log out it will switch back to the default. This is especially useful if you have a wallet that is dedicated to testing, but you want your other wallets to use mainnet. +An optional address that all change is sent to, instead of one of the wallet's own derived addresses. When set, it is also returned as the wallet's address by `get_wallet_address`. It can be set in the UI or with the `set_change_address` RPC endpoint. + +:::warning +Sage doesn't check that this address belongs to the wallet. If you set it to an address you don't control, any change from your transactions will be sent there. +::: ```toml [[wallets]] -network = "testnet11" +change_address = "xch1..." ``` diff --git a/docs/sage/files.md b/docs/sage/files.md index 18e1ce4..9037c0d 100644 --- a/docs/sage/files.md +++ b/docs/sage/files.md @@ -21,13 +21,16 @@ The username `Alice` is a placeholder, and must be replaced by your actual usern ## Files -| Name | Description | -| --------------- | -------------------------------------------------------------------------------------------- | -| `config.toml` | The main configuration file used by the app. See [Config](/sage/config). | -| `keys.bin` | A binary encoding of all imported keys. | -| `logs` | Logs emitted by the backend of the app. | -| `networks.toml` | Information about blockchain networks (ie mainnet or testnet11). See [Config](/sage/config). | -| `peers` | Binary files that store previous peer connections. | -| `ssl` | The SSL certificate used for full node connections and the RPC. | -| `wallets` | SQLite databases for each network and key pair. | -| `wallets.toml` | Configuration for each imported wallet. See [Config](/sage/config). | +| Name | Description | +| ------------------- | --------------------------------------------------------------------------------------------------- | +| `apps` | Files for each installed Sage app. | +| `config.toml` | The main configuration file used by the app. See [Config](/sage/config). | +| `keys.bin` | A binary encoding of all imported keys. | +| `log` | Logs emitted by the backend of the app. | +| `networks.toml` | Information about blockchain networks (ie mainnet or testnet11). See [Config](/sage/config). | +| `peers` | Binary files that store previous peer connections. | +| `sage-apps.sqlite3` | A SQLite database of installed Sage apps and their settings. | +| `ssl` | The SSL certificate used for full node connections and the RPC. | +| `themes` | User themes, each in its own directory with a `theme.json` file. | +| `wallets` | SQLite databases for each key pair and network, stored as `wallets//.sqlite`. | +| `wallets.toml` | Configuration for each imported wallet. See [Config](/sage/config). | diff --git a/docs/sage/index.md b/docs/sage/index.md index 42a2539..9a82065 100644 --- a/docs/sage/index.md +++ b/docs/sage/index.md @@ -13,6 +13,10 @@ This section covers Sage itself: building it from source, where it stores its fi If you are looking for download instructions for the app, visit the [Sage Website](https://sagewallet.net). ::: +:::tip +If you want to build an app that runs inside Sage, see the [Sage Apps guides](https://fancybudgie.com/sage) on Fancy Budgie. +::: + ## Source Installation Sage is built with [Tauri v2](https://tauri.app/), a framework for building efficient cross-platform applications that work on both desktop and mobile devices. You will need to follow the [Prerequisites](https://tauri.app/start/prerequisites/) section of the Tauri docs before proceeding with a source installation. diff --git a/docs/sage/rpc-setup.md b/docs/sage/rpc-setup.md index a0b7f0f..fc33856 100644 --- a/docs/sage/rpc-setup.md +++ b/docs/sage/rpc-setup.md @@ -22,7 +22,7 @@ You will need to follow the [Prerequisites](https://tauri.app/start/prerequisite Run the following command, using whichever version number you want to install (it should be the same version as the GUI, if you were running it previously): ```bash -cargo install --git https://github.com/xch-dev/sage --tag v0.11.1 sage-cli +cargo install --git https://github.com/xch-dev/sage --tag v0.13.1 sage-cli ``` Now you can run `sage rpc start` to start the Sage process in the foreground. You can also run RPC commands by passing in their request body like so: