Skip to content

Commit

Permalink
Merge pull request #2 from input-output-hk/KtorZ/installation-instruc…
Browse files Browse the repository at this point in the history
…tions

Add installation instructions and component requirements to the user guide
  • Loading branch information
KtorZ authored Apr 22, 2020
2 parents fb514f7 + 477c354 commit a012cc6
Show file tree
Hide file tree
Showing 6 changed files with 143 additions and 7 deletions.
2 changes: 1 addition & 1 deletion docs/user-guide/architecture.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
---
weight: 2
weight: 1
title: Architecture
---

Expand Down
11 changes: 10 additions & 1 deletion docs/user-guide/common-use-cases/how-to-create-a-wallet.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,13 @@ weight: 1
title: How to create a wallet
---

{{<hint warning>}}
**Difficulty:** beginner

**Requires:**
- 📦 cardano-wallet >= `v2020-03-11`
{{</hint>}}

The easiest and most common way of managing your funds on the Cardano blockchain is through a [hierarchical deterministic wallet](({{< ref "hierarchical-deterministic-wallets.md" >}})). One can create a wallet using the following endpoint of [cardano-wallet](https://github.com/input-output-hk/cardano-wallet):

[`POST /byron-wallets`](https://input-output-hk.github.io/cardano-wallet/api/edge/#operation/postByronWallet)
Expand All @@ -15,7 +22,9 @@ There are several wallet types available:

The basic difference between them is that for a `random` wallet user needs to [create new address]({{< ref "how-to-get-target-address-for-incoming-transaction.md" >}}) manually, whereas for sequential wallets like `icarus`, `trezor` and `ledger` addresses are [generated automatically]({{< ref "how-to-get-target-address-for-incoming-transaction.md#listing-addresses-in-sequential-wallets" >}}) by the wallet.

Please note that `random` wallets are considered deprecated and should not be used by new applications.
{{<hint danger>}}
Please note that `random` wallets are considered **deprecated** and should not be used by new applications.
{{</hint>}}

Note also that you can have many wallets being operated by a single `cardano-wallet` server.

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,21 +3,28 @@ weight: 3
title: How to get target address for incoming transaction
---

{{<hint warning>}}
**Difficulty:** beginner

**Requires:**
- 📦 cardano-wallet >= `v2020-04-01`
{{</hint>}}

Once you have a wallet you can manage your funds. In order to receive a transaction you need to provide an address associated with your wallet to the sender.

## Random wallets

For `random` wallets user needs to invoke wallet endpoint to create new address:
For `random` wallets user needs to invoke the following wallet endpoint to create new addresses:

[`POST /byron-wallets/{walletId}/addresses`](https://input-output-hk.github.io/cardano-wallet/api/edge/#operation/createAddress)

In order to list existing addresses another endpoint can be used:

[`GET /wallets/{walletId}/addresses`](https://input-output-hk.github.io/cardano-wallet/api/edge/#operation/listAddresses)
[`GET /byron-wallets/{walletId}/addresses`](https://input-output-hk.github.io/cardano-wallet/api/edge/#operation/listByronAddresses)


## Sequential wallets {#listing-addresses-in-sequential-wallets}

For sequential wallets such as `icarus`, `trezor`, `ledger` there is no need for the user to explicitely create new addresses. Unused and used addresses can be retrived via endpoint:
For sequential wallets such as `icarus`, `trezor`, `ledger` there is no need for the user to explicitly create new addresses. Unused and used addresses can be retrieved via endpoint:

[`GET /wallets/{walletId}/addresses`](https://input-output-hk.github.io/cardano-wallet/api/edge/#operation/listAddresses)
[`GET /byron-wallets/{walletId}/addresses`](https://input-output-hk.github.io/cardano-wallet/api/edge/#operation/listByronAddresses)
17 changes: 16 additions & 1 deletion docs/user-guide/common-use-cases/how-to-make-a-transaction.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,10 +2,16 @@
weight: 4
title: How to make a transaction
---

{{<tabs>}}

{{<tab "using cardano-wallet">}}
{{<hint warning>}}
**Difficulty:** beginner

**Requires:**
- 📦 cardano-wallet >= `v2020-04-01`
{{</hint>}}

Assuming you have already created a wallet, you can send a transaction by using the following endpoint:

[`POST /v2/byron-wallets/{walletId}/transactions`](https://input-output-hk.github.io/cardano-wallet/api/edge/#operation/postByronTransaction)
Expand All @@ -25,6 +31,15 @@ For more information about transactions lifecycle, have a look at this [wiki pag


{{<tab "using cardano-transactions">}}

{{<hint warning>}}
**Difficulty:** advanced

**Requires:**
- 📦 cardano-transactions >= `1.0.0`
- 📦 cardano-submit-api >= `2.0.0` OR cardano-wallet >= `v2020-04-01`
{{</hint>}}

Alternatively, `cardano-wallet` and `cardano-submit-api` allows clients to submit already signed and serialized transactions as a raw bytes blob. This can be done by submitting such serialized data as an `application/octet-stream` to either of:

- cardano-wallet: [`POST /v2/proxy/transactions`](https://input-output-hk.github.io/cardano-wallet/api/edge/#operation/postExternalTransaction)
Expand Down
8 changes: 8 additions & 0 deletions docs/user-guide/common-use-cases/how-to-manage-wallets.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,14 @@
weight: 2
title: How to manage wallets
---

{{<hint warning>}}
**Difficulty:** beginner

**Requires:**
- 📦 cardano-wallet >= `v2020-04-01`
{{</hint>}}

Once you created a wallet you can manage it with `cardano-wallet` endpoints. There are several operations available.

### List all wallets
Expand Down
97 changes: 97 additions & 0 deletions docs/user-guide/installation.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,97 @@
---
weight: 3
title: Installation Instructions
---

## Using Docker (recommended)

Docker images are continuously built and deployed on [dockerhub](https://hub.docker.com/u/inputoutput) under specific tags. Using docker provides **the fastest** and **easiest** user experience for setting up the Cardano stack. You should prefer this solution over building from sources unless you have really good reasons not to. The following images are available for each component of the Adrestia architecture:

| Repository | Tags | Documentation |
| :--- | :---: | :---: |
| [inputoutput/cardano-node][inputoutput-cardano-node] | `master`, `MAJOR.MINOR.PATCH` | [link][doc-cardano-node] |
| [inputoutput/cardano-db-sync][inputoutput-cardano-db-sync] | `master`, `MAJOR.MINOR.PATCH` | [link][doc-cardano-db-sync] |
| [inputoutput/cardano-graphql][inputoutput-cardano-graphql] | `master`, `MAJOR.MINOR.PATCH` | [link][doc-cardano-graphql] |
| [inputoutput/cardano-explorer-api][inputoutput-cardano-explorer-api] | `master`, `MAJOR.MINOR.PATCH` | [link][doc-cardano-rest] |
| [inputoutput/cardano-submit-api][inputoutput-cardano-submit-api] | `master`, `MAJOR.MINOR.PATCH` | [link][doc-cardano-rest] |
| [inputoutput/cardano-wallet][inputoutput-cardano-wallet] | `byron`, `YYYY.MM.DD-byron` | [link][doc-cardano-wallet] |

Each `MAJOR.MINOR.PATCH` or `YYYY.MM.DD-byron` tag must match actual releases of the corresponding component. Refer to each component release notes to know which release tags are available. For example, in order to use `cardano-node@1.10.0`, one can simply run:

```
docker pull inputoutput/cardano-node:1.10.0
```

Similarly, one can pull `cardano-wallet@v2020-04-07` with:

```
docker pull inputoutput/cardano-wallet:v2020.4.7-byron
```

{{<hint info>}}
ℹ️ _About version compatibility_

For version compatibility between components, please refer to compatibility matrix on each component main page (e.g. [cardano-wallet#latest-releases](https://github.com/input-output-hk/cardano-wallet#latest-releases)).
{{</hint>}}

Some leaf components like `cardano-submit-api` also provide example setup via [docker-compose](https://docs.docker.com/compose/). Those are useful for a quick start and for development, and also gives a baseline for development. See for example [input-output-hk/cardano-rest](https://github.com/input-output-hk/cardano-rest/blob/master/docker-compose.yml).

## Pre-compiled Artifacts / Building From Sources

In case you prefer using raw binary instead, some components do provide pre-compiled release artifacts for each release. These can be downloaded directly from the github servers, via the UI or using a command-line tool like `wget` or `cURL`. For example, one can download a pre-packaged linux binary for `cardano-wallet@v2020-04-07` via:

```
curl -L https://github.com/input-output-hk/cardano-wallet/releases/download/v2020-04-07/cardano-wallet-v2020-04-07-linux64.tar.gz | tar xz
./cardano-wallet-byron-linux64/cardano-wallet --help
The CLI is a proxy to the wallet server, which is required for most commands.
Commands are turned into corresponding API calls, and submitted to an
up-and-running server. Some commands do not require an active server and can be
run offline (e.g. 'mnemonic generate').
[...]
```



If you feel brave enough and want to compile everything from sources, please refer to each repository's documentation. As a pre-requisite, you may want to install and configure [Nix](https://nixos.org/), [stack](https://docs.haskellstack.org/en/stable/README/) or [cabal](https://www.haskell.org/cabal/) depending on your weapon of choice. Build instructions are available on each repository's main README.

Repository | Releases | Linux | MacOS | Windows |
--- | --- | --- | -- | --- |
[cardano-node][cardano-node] | [releases][release-cardano-node] | ✔️ | ✔️ | ✔️ |
[cardano-db-sync][cardano-db-sync] | [releases][release-cardano-db-sync] | ✔️ | ✔️ | ❌ |
[cardano-submit-api][cardano-rest] | [releases][release-cardano-rest] | ✔️ | ✔️ | ❌ |
[cardano-explorer-api][cardano-rest] | [releases][release-cardano-rest] | ✔️ | ✔️ | ❌ |
[cardano-graphql][cardano-graphql] | [releases][release-cardano-graphql] | ✔️ | ✔️ | ❌ |
[cardano-wallet][cardano-wallet] | [releases][release-cardano-wallet] | ✔️ | ✔️ | ✔️ |

[cardano-node]: https://github.com/input-output-hk/cardano-node
[cardano-db-sync]: https://github.com/input-output-hk/cardano-db-sync
[cardano-rest]: https://github.com/input-output-hk/cardano-rest
[cardano-graphql]: https://github.com/input-output-hk/cardano-graphql
[cardano-wallet]: https://github.com/input-output-hk/cardano-wallet

[release-cardano-node]: https://github.com/input-output-hk/cardano-node/releases
[release-cardano-db-sync]: https://github.com/input-output-hk/cardano-db-sync/releases
[release-cardano-rest]: https://github.com/input-output-hk/cardano-rest/releases
[release-cardano-graphql]: https://github.com/input-output-hk/cardano-graphql/releases
[release-cardano-wallet]: https://github.com/input-output-hk/cardano-wallet/releases

[cardano-node]: https://github.com/input-output-hk/cardano-node
[cardano-db-sync]: https://github.com/input-output-hk/cardano-db-sync
[cardano-explorer-api]: https://github.com/input-output-hk/cardano-rest
[cardano-submit-api]: https://github.com/input-output-hk/cardano-rest
[cardano-graphql]: https://github.com/input-output-hk/cardano-graphql
[cardano-wallet]: https://github.com/input-output-hk/cardano-wallet

[doc-cardano-node]: https://github.com/input-output-hk/cardano-node/blob/master/nix/docker.nix#L1-L25
[doc-cardano-db-sync]: https://github.com/input-output-hk/cardano-db-sync/blob/master/nix/docker.nix#L1-L35
[doc-cardano-rest]: https://github.com/input-output-hk/cardano-rest/wiki/Docker
[doc-cardano-graphql]: https://github.com/input-output-hk/cardano-graphql/wiki/Docker
[doc-cardano-wallet]: https://github.com/input-output-hk/cardano-wallet/wiki/Docker
[inputoutput-cardano-node]: https://hub.docker.com/r/inputoutput/cardano-node
[inputoutput-cardano-db-sync]: https://hub.docker.com/r/inputoutput/cardano-db-sync
[inputoutput-cardano-graphql]: https://hub.docker.com/r/inputoutput/cardano-graphql
[inputoutput-cardano-submit-api]: https://hub.docker.com/r/inputoutput/cardano-submit-api
[inputoutput-cardano-explorer-api]: https://hub.docker.com/r/inputoutput/cardano-explorer-api
[inputoutput-cardano-wallet]: https://hub.docker.com/r/inputoutput/cardano-wallet

0 comments on commit a012cc6

Please sign in to comment.