Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
69 changes: 22 additions & 47 deletions docs/sage/config.md
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand All @@ -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
Expand All @@ -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..."
```
23 changes: 13 additions & 10 deletions docs/sage/files.md
Original file line number Diff line number Diff line change
Expand Up @@ -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/<fingerprint>/<network>.sqlite`. |
| `wallets.toml` | Configuration for each imported wallet. See [Config](/sage/config). |
4 changes: 4 additions & 0 deletions docs/sage/index.md
Original file line number Diff line number Diff line change
Expand Up @@ -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.
Expand Down
2 changes: 1 addition & 1 deletion docs/sage/rpc-setup.md
Original file line number Diff line number Diff line change
Expand Up @@ -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:
Expand Down
Loading