Rename folders (#97)

* Rename arkd folder & drop cli

* Rename ark cli folder & update docs

* Update readme

* Fix

* scripts: add build-all

* Add target to build cli for all platforms

* Update build scripts

---------

Co-authored-by: tiero <3596602+tiero@users.noreply.github.com>
This commit is contained in:
Pietralberto Mazza
2024-02-09 19:32:58 +01:00
committed by GitHub
parent 0d8c7bffb2
commit dc00d60585
119 changed files with 154 additions and 449 deletions

View File

@@ -0,0 +1,71 @@
---
sidebar_position: 2
title: Ark CLI
---
The Ark CLI allows you to interact with the Ark Service Provider (ASP). It is a command line tool that can be used to create and manage your Ark Wallet.
## Configure the CLI
The CLI requires an initial setup to initialize the wallet and connect to the ASP:
```bash
$ ark init init --password <PASSWORD> --ark-url <ARK_URL>
```
You can also restore a wallet by specifying the hex encoded private key with the `--prvkey` flag.
## Receive VTXO
### Get receiving address
You can print your onchain and offchain receiving addresses to receive funds with:
```bash
$ ark receive
```
This command also shows the list of relays used to reach the ASP.
:::tip
testnet only: `ark faucet` to receive newly created VTXO from the service provider.
:::
### Print balance
You can see both the onchain and offchain balance of the wallet with:
```bash
$ ark balance
```
## Send VTXO(s)
You can make an offchain payment by sending to either one or many receivers:
```bash
$ ark send --to <ARK_ADDRESS> --amount <AMOUNT>
$ ark send --receivers '[{"to": "<ARK_ADDRESS>", "amount": <AMOUNT>}, ...]'
```
The amount must be specified in _sats_ unit.
## Redemption
### Collaborative redemption
You can redeem onchain your funds by collaborating with the ASP with:
```bash
$ ark redeem --address <ONCHAIN_ADDRESS> --amount <AMOUNT>
```
Any change produced with this operation goes to your offchain address.
### Unilateral redemption
If the ASP is unresponsive you can redeem all your offchain funds unilaterally with:
```bash
$ ark redeem --address <ONCHAIN_ADDRESS> --force
```

View File

@@ -1,70 +0,0 @@
---
sidebar_position: 2
title: Noah CLI
---
The Noah CLI allows you to interact with the Ark Service Provider (ASP). It is a command line tool that can be used to create and manage your Ark Wallet.
## Configure the CLI
The noah CLI requires a set of variables to be set, use flags to set them.
```bash
noah config connect <ARK_URL>
```
## Set up Noah wallet
`noah init` is a command that sets up a Noah wallet with a 32-bytes private key and a password in order to encrypt the private key.
```bash
noah init --password <PASSWORD> [--prvkey <PRIVATE_KEY>]
```
## Receive VTXO
### Get receiving address
You can use the noah CLI to print your Ark address. This can be used to receive VTXO.
```bash
noah receive
```
:::tip
testnet only: `noah faucet <AMOUNT>` to receive newly created VTXO from the service provider.
:::
### Print balance
```bash
noah balance
```
`balance` returns the sum of all VTXOs belonging to the Noah wallet.
## Send VTXO(s)
```bash
noah send --receivers '[{"to": "<ARK_ADDRESS", "amount": <AMOUNT>}, ...]'
```
Noah CLI is responsible to select the coins to send for the given amount. It will sync with the service provider to forfeit the VTXO(s) and create a new VTXO belonging to the recipient. A change VTXO will be created if needed. Asks user password before signing.
## Redemption
### Collaborative redemption
```bash
noah redeem --address <ONCHAIN_ADDRESS> --amount <AMOUNT>
```
Noah CLI will sync with the service provider in order to redeem onchain the given amount in the next round, any remaining change will become a new vTXO. Asks user password before signing.
### Unilateral redemption
```bash
noah redeem --address <ONCHAIN_ADDRESS> --force
```
With the `--force` flag Noah CLI will unilateraly redeem all VTXOs by signing the psbt(s) and broadcast them. Asks user password before signing.