11 Commits

Author SHA1 Message Date
a44b3f5036 Update/v0.5.3 (#18)
* Several copy fixes and improvements

* Remove config, minor copy edits to reflect same
2023-10-19 14:39:41 -06:00
fc34714068 Update/v0.5.2 (#16)
* Update to latest upstream, edits for Alpine Linux, update references to StartOS

* Update to latest upstream v0.5.2
2023-09-11 15:20:28 -06:00
792eb41501 Update to latest upstream, edits for Alpine Linux, update references to StartOS (#14) 2023-05-31 10:17:11 -06:00
e0c5ca2546 Update to v0.5.0 upstream, update migration, update README, add prepare.sh (#13) 2023-05-11 09:45:45 -06:00
f5769c6f17 Bump version/release notes for donation address 2023-04-11 15:19:10 -06:00
bf4f47850d Add donation page (#12) 2023-04-11 14:37:22 -06:00
4d1e7d76e8 Update to v0.4.3 (#11) 2023-04-10 17:41:46 -06:00
dd9d49b3b1 Update/v0.4.1 (#9)
* Update to v0.4.1

* Minor fixes, prepped for beta v0.4.1~1

* Minor fixes, ready for beta v0.4.1~1
2023-03-14 22:20:43 -06:00
889aba3519 Update to v0.4.1 (#8) 2023-03-13 08:46:52 -06:00
442d82accd 0.4.0 update (#7)
* Init 0.4.0 update

* Stop DDOSing Robosats coordinator with hcks
2023-03-09 15:35:33 -07:00
ccf000b094 update upstream to 0.3.3 (#6)
Co-authored-by: islandbitcoin <dread@start9.com>
2023-01-16 14:01:15 -05:00
14 changed files with 57 additions and 94 deletions

2
.gitignore vendored
View File

@ -3,4 +3,4 @@ image.tar
scripts/*.js scripts/*.js
.DS_Store .DS_Store
.vscode/ .vscode/
docker-images/ docker-images/

View File

@ -1,7 +1,6 @@
FROM recksato/robosats-client:v0.3.2-alpha FROM recksato/robosats-client:v0.5.3-alpha
RUN apt-get update && apt-get install wget curl sudo bash tini -y RUN apk add bash curl sudo tini wget yq; \
RUN wget https://github.com/mikefarah/yq/releases/download/v4.6.3/yq_linux_amd64.tar.gz -O - |\ rm -f /var/cache/apk/*
tar xz && mv yq_linux_amd64 /usr/bin/yq
ENV APP_HOST robosats.embassy ENV APP_HOST robosats.embassy
ENV APP_PORT 12596 ENV APP_PORT 12596

View File

@ -8,10 +8,10 @@ TS_FILES := $(shell find ./ -name \*.ts)
all: verify all: verify
verify: $(PKG_ID).s9pk verify: $(PKG_ID).s9pk
embassy-sdk verify s9pk $(PKG_ID).s9pk start-sdk verify s9pk $(PKG_ID).s9pk
install: $(PKG_ID).s9pk install: $(PKG_ID).s9pk
embassy-cli package install $(PKG_ID).s9pk start-cli package install $(PKG_ID).s9pk
clean: clean:
rm -rf docker-images rm -rf docker-images
@ -31,5 +31,4 @@ docker-images/aarch64.tar: Dockerfile docker_entrypoint.sh
docker buildx build --tag start9/$(PKG_ID)/main:$(PKG_VERSION) --platform=linux/arm64 --build-arg PLATFORM=arm64 -o type=docker,dest=docker-images/aarch64.tar . docker buildx build --tag start9/$(PKG_ID)/main:$(PKG_VERSION) --platform=linux/arm64 --build-arg PLATFORM=arm64 -o type=docker,dest=docker-images/aarch64.tar .
$(PKG_ID).s9pk: manifest.yaml instructions.md LICENSE icon.png scripts/embassy.js docker-images/aarch64.tar docker-images/x86_64.tar $(PKG_ID).s9pk: manifest.yaml instructions.md LICENSE icon.png scripts/embassy.js docker-images/aarch64.tar docker-images/x86_64.tar
if ! [ -z "$(ARCH)" ]; then cp docker-images/$(ARCH).tar image.tar; fi start-sdk pack
embassy-sdk pack

View File

@ -1,18 +1,16 @@
# Wrapper for RoboSats # Wrapper for RoboSats
A simple and private Lightning P2P exchange you can use directly from StartOS.
RoboSats is a simple and private bitcoin exchange
## Dependencies ## Dependencies
- [docker](https://docs.docker.com/get-docker) - [docker](https://docs.docker.com/get-docker)
- [docker-buildx](https://docs.docker.com/buildx/working-with-buildx/) - [docker-buildx](https://docs.docker.com/buildx/working-with-buildx/)
- [yq](https://mikefarah.gitbook.io/yq) - [yq](https://mikefarah.gitbook.io/yq)
- [deno](https://deno.land/) - [deno](https://deno.land/)
- [make](https://www.gnu.org/software/make/) - [make](https://www.gnu.org/software/make/)
- [embassy-sdk](https://github.com/Start9Labs/embassy-os/tree/master/backend) - [start-sdk](https://github.com/Start9Labs/start-os/tree/master/backend)
## Build enviroment ## Build enviroment
Prepare your EmbassyOS build enviroment. In this example we are using Ubuntu 20.04. Prepare your StartOS build enviroment. In this example we are using Ubuntu 20.04.
1. Install docker 1. Install docker
``` ```
@ -31,11 +29,12 @@ docker run --privileged --rm linuxkit/binfmt:v0.8
``` ```
4. Install yq 4. Install yq
``` ```
sudo snap install yq wget https://github.com/mikefarah/yq/releases/download/${VERSION}/${BINARY}.tar.gz -O - |\
tar xz && mv ${BINARY} /usr/bin/yq
``` ```
5. Install deno 5. Install deno
``` ```
sudo snap install deno cargo install deno
``` ```
6. Install essentials build packages 6. Install essentials build packages
``` ```
@ -47,17 +46,16 @@ curl https://sh.rustup.rs -sSf | sh
# Choose nr 1 (default install) # Choose nr 1 (default install)
source $HOME/.cargo/env source $HOME/.cargo/env
``` ```
8. Build and install embassy-sdk 8. Build and install start-sdk
``` ```
cd ~/ && git clone --recursive https://github.com/Start9Labs/embassy-os.git cd ~/ && git clone --recursive https://github.com/Start9Labs/start-os.git
cd embassy-os/backend/ cd start-os/backend/
./install-sdk.sh ./install-sdk.sh
embassy-sdk init start-sdk init
``` ```
Now you are ready to build your **robosats** service Now you are ready to build your **robosats** service
## Cloning ## Cloning
Clone the project locally. Clone the project locally.
``` ```
@ -66,26 +64,23 @@ cd robosats-wrapper
``` ```
## Building ## Building
To build the service, run the following command: To build the service, run the following command:
``` ```
make make
``` ```
## Installing (on Embassy) ## Installing (on Start9 servers)
Run the following commands to determine successful install: Run the following commands to determine successful install:
> :information_source: Change embassy-q1w2e3r4.local to your Embassy address > :information_source: Change <SERVER-NAME>.local to your Start9 server address
``` ```
embassy-cli auth login start-cli auth login
#Enter your embassy password #Enter your Start9 server master password
embassy-cli --host https://embassy-q1w2e3r4.local package install robosats.s9pk start-cli --host https://<SERVER-NAME>.local package install robosats.s9pk
``` ```
**Tip:** You can also install the robosats.s9pk using **Sideload Service** under the **Embassy > SETTINGS** section. **Tip:** You can also install the robosats.s9pk using **Sideload Service** under the **System > Settings** section.
## Verify Install ## Verify Install
Go to your Start9 server's Services page, select RoboSats, configure and start the service.
Go to your Embassy Services page, select RoboSats, configure and start the service.
**Done!** **Done!**

View File

@ -1,12 +1,9 @@
# Welcome to RoboSats! # Welcome to RoboSats!
A simple and private Lightning P2P exchange you can use directly from StartOS.
A simple and private bitcoin exchange you can use right here on your Embassy. You can find a quick start guide, tutorial videos, and detailed documentation at [Learn RoboSats](https://learn.robosats.com/).
## Basic Use
You can find detailed documentation on how to use RoboSats by [Clicking here](https://learn.robosats.com/)
## Basic Usage Instructions
1. Open RoboSats by using the `LAUNCH UI` button. 1. Open RoboSats by using the `LAUNCH UI` button.
2. For the first time using RoboSats, you will be provided a robot token. 2. For the first time using RoboSats, you will be provided a robot token (a unique, transient identifier) - you can create as many of these as you'd like.
3. You can save this token on the RoboSats service config screen if you need to persist your session.
**Note: It is strongly recommended to use a new robot every time when using RoboSats.** **Note: Robots are saved in your "garage." It is strongly recommended to use a new robot every time you start a new exchange.**

View File

@ -1,31 +1,23 @@
# Example written in yaml (toml and json are also acceptable)
# The package identifier used by the OS. This must be unique amongst all other known packages
id: robosats id: robosats
# A human readable service title
title: "RoboSats" title: "RoboSats"
# Service version - accepts up to four digits, where the last confirms to revisions necessary for EmbassyOS - see documentation: https://github.com/Start9Labs/emver-rs. This value will change with each release of the service. version: 0.5.3
version: 0.3.2
# Release notes for the update - can be a string, paragraph or URL
release-notes: | release-notes: |
* Updated to run on x86_64 architecture * Updated to v0.5.3-alpha [Release Notes](https://github.com/RoboSats/robosats/releases/tag/v0.5.3-alpha)
* Fix backup restore * IMPORTANT: Versions previous to v0.5.1 will no longer be compatible
# The type of license for the project. Include the LICENSE in the root of the project directory. A license is required for a Start9 package. * Remove old naming conventions
* Remove redundant config option (replaced by Robot Garage in UI)
license: mit license: mit
# The Start9 wrapper repository URL for the package. This repo contains the manifest file (this), any scripts necessary for configuration, backups, actions, or health checks (more below). This key must exist. But could be embedded into the source repository. wrapper-repo: "https://github.com/kn0wmad/robosats-wrapper"
wrapper-repo: "https://github.com/Start9Labs/robosats-wrapper"
# The original project repository URL. There is no upstream repo in this example
upstream-repo: "https://github.com/Reckless-Satoshi/robosats" upstream-repo: "https://github.com/Reckless-Satoshi/robosats"
# URL to the support site / channel for the project. This key can be omitted if none exists, or it can link to the original project repository issues.
support-site: "https://github.com/Reckless-Satoshi/robosats/issues" support-site: "https://github.com/Reckless-Satoshi/robosats/issues"
# URL to the marketing site for the project. This key can be omitted if none exists, or it can link to the original project repository.
marketing-site: "https://learn.robosats.com/" marketing-site: "https://learn.robosats.com/"
donation-url: "https://learn.robosats.com/contribute/donate/"
# The series of commands to build the project into an s9pk for arm64/v8. In this case we are using a Makefile with the simple build command "make". # The series of commands to build the project into an s9pk for arm64/v8. In this case we are using a Makefile with the simple build command "make".
build: ["make"] build: ["make"]
# Human readable descriptors for the service. These are used throughout the EmbassyOS user interface, primarily in the marketplace. # Human readable descriptors for the service. These are used throughout the StartOS user interface, primarily in the marketplace.
description: description:
# This is the first description visible to the user in the marketplace. # This is the first description visible to the user in the marketplace.
short: A simple and private bitcoin exchange short: A simple and private p2p bitcoin exchange
# This description will display with additional details in the service's individual marketplace page # This description will display with additional details in the service's individual marketplace page
long: | long: |
RoboSats is a simple and private way to exchange bitcoin for national currencies. Robosats simplifies the peer-to-peer user experience and uses lightning hold invoices to minimize custody and trust requirements. The deterministically generated avatars help users stick to best privacy practices. RoboSats is a simple and private way to exchange bitcoin for national currencies. Robosats simplifies the peer-to-peer user experience and uses lightning hold invoices to minimize custody and trust requirements. The deterministically generated avatars help users stick to best privacy practices.
@ -49,15 +41,11 @@ main:
health-checks: health-checks:
web-ui: web-ui:
name: Web Interface name: Web Interface
success-message: The RoboSats UI is ready to visit in a web browser success-message: The RoboSats UI is ready
type: script type: script
config: config: ~
get: # properties:
type: script # type: script
set:
type: script
properties:
type: script
# This denotes any data, asset, or pointer volumes that should be connected when the "docker run" command is invoked # This denotes any data, asset, or pointer volumes that should be connected when the "docker run" command is invoked
volumes: volumes:
# This is the image where files from the project asset directory will go # This is the image where files from the project asset directory will go
@ -70,7 +58,7 @@ interfaces:
# A human readable name for display in the UI # A human readable name for display in the UI
name: User Interface name: User Interface
# A descriptive description of what the interface does # A descriptive description of what the interface does
description: A simple user interface that is expected to display the text "Hello Word" description: Your RoboSats Tor Hidden Service address
tor-config: tor-config:
# Port mappings are from the external port to the internal container port # Port mappings are from the external port to the internal container port
port-mapping: port-mapping:

8
prepare.sh Executable file
View File

@ -0,0 +1,8 @@
#!/bin/bash
# install yq
wget https://github.com/mikefarah/yq/releases/latest/download/yq_linux_amd64 -O /usr/bin/yq &&\
chmod +x /usr/bin/yq
# install deno
cargo install deno

View File

@ -1 +1 @@
export * from "https://deno.land/x/embassyd_sdk@v0.3.3.0.2/mod.ts"; export * from "https://deno.land/x/embassyd_sdk@v0.3.3.0.9/mod.ts";

View File

@ -1,6 +1,5 @@
export { setConfig } from "./procedures/setConfig.ts"; export { setConfig } from "./procedures/setConfig.ts";
export { getConfig } from "./procedures/getConfig.ts"; export { getConfig } from "./procedures/getConfig.ts";
export { properties } from "./procedures/properties.ts"; // export { properties } from "./procedures/properties.ts";
export { migration } from "./procedures/migrations.ts"; export { migration } from "./procedures/migrations.ts";
export { health } from "./procedures/healthChecks.ts"; export { health } from "./procedures/healthChecks.ts";
// export { main } from "./procedures/main.ts";

View File

@ -1,4 +1,4 @@
// To utilize the default config system built, this file is required. It defines the *structure* of the configuration file. These structured options display as changeable UI elements within the "Config" section of the service details page in the Embassy UI. // To utilize the default config system built, this file is required. It defines the *structure* of the configuration file. These structured options display as changeable UI elements within the "Config" section of the service details page in the StartOS UI.
import { compat, types as T } from "../deps.ts"; import { compat, types as T } from "../deps.ts";
@ -21,12 +21,4 @@ export const getConfig: T.ExpectedExports.getConfig = compat.getConfig({
"target": "lan-address", "target": "lan-address",
"interface": "main", "interface": "main",
}, },
"rs-hash": {
"type": "string",
"name": "Robosats Unique Token",
"description": "This is just a place that you can store your unique token if you choose. This is the nym identity that is randomly generated at boot for you on each startup.",
"nullable": true,
"copyable": true,
"masked": false,
}
}); });

View File

@ -1,5 +1,5 @@
import { types as T, healthUtil } from "../deps.ts"; import { types as T, healthUtil } from "../deps.ts";
export const health: T.ExpectedExports.health = { export const health: T.ExpectedExports.health = {
"web-ui": healthUtil.checkWebUrl("http://robosats.embassy:12596") "web-ui": healthUtil.checkWebUrl("http://robosats.embassy:12596/selfhosted")
} }

View File

@ -1,11 +0,0 @@
// import { types as T, util } from "../deps.ts";
// export const main: T.ExpectedExports.main = async (effects) => {
// await effects.runDaemon(
// {
// command: "docker_entrypoint.sh",
// args: [],
// },
// ).wait();
// return util.ok;
// };

View File

@ -1,4 +1,4 @@
import { compat, types as T } from "../deps.ts"; import { compat, types as T } from "../deps.ts";
export const migration: T.ExpectedExports.migration = compat.migrations export const migration: T.ExpectedExports.migration = compat.migrations
.fromMapping({}, "0.3.2" ); .fromMapping({}, "0.5.3" );

View File

@ -1,3 +0,0 @@
import { compat, types as T } from "../deps.ts";
export const properties: T.ExpectedExports.properties = compat.properties;