You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: Makefile
+40-1Lines changed: 40 additions & 1 deletion
Original file line number
Diff line number
Diff line change
@@ -117,6 +117,45 @@ help:
117
117
@echo " make run-debug - Update repo, compile in debug mode and run the program"
118
118
@echo " make clean - Clean the build files"
119
119
@echo " make test - Update repo and run the tests"
120
+
@echo " make build-arm-macos - Build the project for aarch64 macOS (Apple Silicon)"
121
+
@echo " make build-x86-macos - Build the project for x86_64 macOS (Intel)"
122
+
@echo " make build-x86-linux - Build the project for x86_64 Linux"
120
123
@echo " make help - Show this help message"
121
124
122
-
.PHONY: all release debug run run-debug clean test help check_cargo check_cargo_env check_dependencies check_curl check_openssl clone_repo update_repo build
125
+
check_arm_macos_target:
126
+
@rustup target list --installed | grep aarch64-apple-darwin > /dev/null ||\
127
+
(echo "Error: Rust target aarch64-apple-darwin not installed."&& \
128
+
echo"Please install it by running: rustup target add aarch64-apple-darwin"&&\
5. Verify the SHA256 checksum of your binary against the one listed in the manifest.txt file.
87
80
6. Run the app by executing the binary.
88
81
89
82
### 2. Building Locally
@@ -116,6 +109,13 @@ You can install the app in two ways:
116
109
3.**Tauri Prerequisites**
117
110
Confirm correct installation of Rust, Node.js, npm, and pnpm.
118
111
112
+
#### Arch Linux (AUR)
113
+
114
+
- Install via an AUR helper like `yay`:
115
+
```sh
116
+
yay -S kaleidoswap
117
+
```
118
+
119
119
#### Building and Running
120
120
121
121
1.**Install dependencies**:
@@ -124,30 +124,41 @@ You can install the app in two ways:
124
124
```
125
125
2.**Build the Tauri app**:
126
126
```sh
127
-
tauri build
127
+
npm run tauri build
128
128
```
129
129
3.**Run Kaleidoswap in development mode**:
130
130
```sh
131
-
tauri dev
131
+
npm run tauri dev
132
132
```
133
133
134
134
## Usage 💡
135
135
136
136
### Connecting to an RGB Lightning Node
137
137
138
138
1.**Launch** Kaleidoswap.
139
-
2.**Configure the Node** in the **Settings** page:
140
-
- Connect to a local or remote instance of [rgb-lightning-node](https://github.com/RGB-Tools/rgb-lightning-node).
141
-
- Provide the correct host/port and any additional configuration details required.
142
-
143
-
### Trading and Swapping Assets
144
-
145
-
1.**Select or Add a Market Maker** on the **Settings** page.
146
-
- KaleidoSwap currently provides two built-in makers: one for **regtest** and another for **signet** (mutinynet). Supported assets and pairs can be found at [KaleidoSwap RGB Registry](https://registry.kaleidoswap.com/).
147
-
2.**Check Supported Pairs**: Ensure you have at least one Lightning channel funded with the RGB asset you want to trade.
148
-
- If you lack a channel, you can **buy one** from an LSP that supports your chosen RGB asset.
149
-
3.**Initiate the Swap**:
150
-
- Go to the trading interface, pick your maker and select a supported trading pair.
139
+
2.**Setup Your Node**:
140
+
- Create a new local node using the setup wizard, or
141
+
- Connect to a remote instance of [rgb-lightning-node](https://github.com/RGB-Tools/rgb-lightning-node) by providing the correct host/port and any additional configuration details required.
142
+
143
+
### Getting Started with Trading
144
+
145
+
1.**Deposit Bitcoin**:
146
+
- Use one of the available faucets to deposit some Bitcoin to your wallet.
147
+
- Wait for the transaction to confirm.
148
+
149
+
2.**Buy a Channel with RGB Assets**:
150
+
- Navigate to the **Buy New Channel** page.
151
+
- Request a channel from an LSP, specifying capacity and the RGB asset you want included.
152
+
- Wait for the channel to be opened and confirmed.
153
+
154
+
3.**Select or Add a Market Maker**:
155
+
- KaleidoSwap currently provides two built-in makers: one for **regtest** and another for **signet** (mutinynet).
156
+
- Supported assets and pairs can be found at [KaleidoSwap RGB Registry](https://registry.kaleidoswap.com/).
157
+
- Go to the **Settings** page if you want to add a different market maker.
158
+
159
+
4.**Initiate the Swap**:
160
+
- Go to the trading interface and select a supported trading pair.
161
+
- Ensure you have at least one Lightning channel funded with the RGB asset you want to trade.
151
162
- Accept the RFQ price to execute the swap.
152
163
153
164
> **Important**: Since Kaleidoswap is in alpha, swaps may fail or get stuck. Check the [docs](https://docs.kaleidoswap.com) for troubleshooting, and feel free to [open an issue](#support-) if you encounter problems.
@@ -221,4 +232,4 @@ Kaleidoswap is licensed under the [MIT License](LICENSE.md).
221
232
- The software may contain bugs, errors, or security vulnerabilities that could result in the loss of funds.
222
233
---
223
234
224
-
*Thanks for using Kaleidoswap! We're excited to see what you build, and we appreciate your feedback and contributions.*
235
+
*Thanks for using Kaleidoswap! We're excited to see what you build, and we appreciate your feedback and contributions.*
# Guide for Intel (x86_64) Mac Users: Compiling a Compatible rgb-lightning-node
2
+
3
+
## 1. Introduction
4
+
5
+
This guide is for users of Intel-based (x86_64) Macs who are using KaleidoSwap. The default KaleidoSwap application might ship with an ARM64 (Apple Silicon) version of the `rgb-lightning-node` binary. This binary is incompatible with Intel Macs and will prevent the RGB node features from working.
6
+
7
+
These instructions will help you compile an x86_64 version of `rgb-lightning-node` from the source and replace the incompatible binary within your KaleidoSwap application.
8
+
9
+
## 2. Prerequisites
10
+
11
+
Before you begin, ensure you have the following installed on your Mac:
12
+
13
+
***Xcode Command Line Tools**: These provide essential development tools like `git` and compilers. If you don't have them, running `make check_dependencies` in the project (see compilation steps) should prompt you to install them. You can also manually install them by running `xcode-select --install` in your Terminal.
14
+
***Rust and Cargo**: The Rust programming language and its package manager, Cargo, are required. If you don't have them, the `make check_cargo_env` step (or simply `make`) in the project's Makefile will guide you through the installation via [rustup.rs](https://rustup.rs/).
15
+
***`x86_64-apple-darwin` Rust Target**: This specific Rust target is needed to compile for Intel Macs. You can install it by running the following command in your Terminal:
16
+
```bash
17
+
rustup target add x86_64-apple-darwin
18
+
```
19
+
The `make build-x86-macos`command will also check for this and provide an error if it's missing.
20
+
21
+
## 3. Compilation Steps
22
+
23
+
Follow these steps to compile the x86_64 `rgb-lightning-node` binary:
*Note: If the `rgb-lightning-node` is part of a different repository that KaleidoSwap Desktop uses as a submodule (e.g., `rgb-lightning-node` itself), you'd clone that specific repository. However, the `make build-x86-macos` target is defined in the `kaleidoswap-desktop` Makefile, which handles the `rgb-lightning-node` submodule.*
31
+
32
+
2. **Navigate to the Project Directory**:
33
+
```bash
34
+
cd kaleidoswap-desktop
35
+
```
36
+
37
+
3. **Run the Makefile Target to Build for x86 macOS**:
38
+
This command will check dependencies, update the `rgb-lightning-node` submodule, and compile the binary for the x86_64 architecture.
39
+
```bash
40
+
make build-x86-macos
41
+
```
42
+
43
+
4. **Locate the Compiled Binary**:
44
+
After a successful build, the binary will be located at:
45
+
`bin/rgb-lightning-node-x86_64`
46
+
(Relative to the `kaleidoswap-desktop` project directory).
47
+
48
+
## 4. Replacing the Binary in KaleidoSwap.app
49
+
50
+
Once you have compiled the `rgb-lightning-node-x86_64` binary, you need to replace the existing one inside your `KaleidoSwap.app` package.
51
+
52
+
1. **Locate `KaleidoSwap.app`**: This is usually in your `/Applications` folder.
53
+
2. **Show Package Contents**: Right-click on `KaleidoSwap.app` and select"Show Package Contents".
54
+
3. **Navigate to the Binary Directory**: In the new Finder window that opens, navigate to:
55
+
`Contents/Resources/_up_/bin/`
56
+
4. **Back Up the Existing Binary (Important!)**:
57
+
Inside this `bin` directory, you might see an existing `rgb-lightning-node` file. Before proceeding, **back this file up**. You can rename it to `rgb-lightning-node_ARM_backup` or copy it to a safe location.
58
+
5. **Copy the Compiled Binary**:
59
+
Copy the `rgb-lightning-node-x86_64` file from your `kaleidoswap-desktop/bin/` directory into the app bundle's `Contents/Resources/_up_/bin/` directory.
60
+
6. **Rename the Copied Binary**:
61
+
Inside the app bundle (`Contents/Resources/_up_/bin/`), rename the file you just copied from `rgb-lightning-node-x86_64` to `rgb-lightning-node`.
62
+
7. **Ensure Executability**:
63
+
Open your Terminal application and run the `chmod +x` command to make sure the new binary is executable. Adjust the path if your `KaleidoSwap.app` is not in the `/Applications` folder:
After these steps, try launching KaleidoSwap. The application should now use your compiled x86_64 `rgb-lightning-node`.
69
+
70
+
## 5. Troubleshooting/Notes
71
+
72
+
* **Application Updates**: If you update the KaleidoSwap application (e.g., by downloading a new version), it will likely overwrite your custom `rgb-lightning-node` binary. You will need to repeat the steps in Section 4 ("Replacing the Binary in KaleidoSwap.app") after each update.
73
+
* **Node Startup Issues**: If the RGB node still fails to start, the enhanced error reporting (recently added to the node management code) should provide more specific error messages within the KaleidoSwap application or its logs.
74
+
* **Checking Logs**: You can find detailed logs from the `rgb-lightning-node` which might help diagnose issues. On macOS, these logs are typically stored at:
0 commit comments