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
Elixir client for Cardano's Ouroboros networking protocol.
6
+
Elixir client for Cardano's Ouroboros networking protocol. This library can be used to build Elixir applications that connect to a Cardano node using the Node-to-Client protocol.
7
7
8
-
⚠️ This project is under active development. For a more stable solution to connect to a Cardano node using Elixir, see [Xogmios](https://github.com/wowica/xogmios).
8
+
⚠️ This project is under active development. See [Xogmios](https://github.com/wowica/xogmios) for a more stable solution to connect to a Cardano node through [Ogmios](https://ogmios.dev/).
9
9
10
10
## Mini-Protocols currently supported by this library:
11
11
@@ -23,7 +23,7 @@ Below is an example of how to connect to a Cardano node and run a query that ret
23
23
24
24
```elixir
25
25
$ iex
26
-
>Mix.install([{:xander, "~> 0.1.0"}])
26
+
>Mix.install([{:xander, "~> 0.2.0"}])
27
27
># Must be a valid Unix socket path
28
28
># to a fully synced Cardano node
29
29
> socket_path ="/path/to/cardano-node.socket"
@@ -44,6 +44,160 @@ $ iex
44
44
For a more detailed description of different ways to use this library, read the following sections:
45
45
46
46
47
-
1.[Running queries via Docker](docs/running-via-docker.md)
48
-
2.[Running queries with native Elixir install](docs/running-natively.md)
⚠️ This project does not provide off-chain transaction functionality such as building and signing of transactions.
160
+
161
+
In order to submit transactions via Xander, you can either run the `submit_tx.exs` script directly or use Docker.
162
+
163
+
164
+
## Running the script
165
+
166
+
This assumes you have Elixir installed. In order to run the script directly, follow the steps below:
167
+
168
+
1. Get ahold of the CBOR hex of a valid signed transaction (not covered by this library)
169
+
2. Populate the environment variable `CARDANO_NODE_SOCKET_PATH` with a socket file for a fully synced Cardano node.
170
+
3. Ensure the `Config.default_config!` function call matches the network being used:
171
+
-`Config.default_config!(socket_path)` defaults to Mainnet
172
+
-`Config.default_config!(socket_path, :preview)` for Preview network
173
+
4. Run `elixir submit_tx.exs <transaction-CBOR-hex>` providing the CBOR hex as its single argument.
174
+
175
+
A successful submission should return the transaction ID. This ID can be used to check the status of the transaction on any Cardano blockchain explorer.
176
+
177
+
## Using Docker
178
+
179
+
This assumes you have Docker installed. No Elixir installation is required.
180
+
181
+
1. First, build the image:
182
+
183
+
```
184
+
docker build -t xander .
185
+
```
186
+
187
+
2. Ensure the `Config.default_config!` function inside the `submit_tx.exs` file matches the network being used:
188
+
-`Config.default_config!(socket_path)` defaults to Mainnet
189
+
-`Config.default_config!(socket_path, :preview)` for Preview network
190
+
191
+
3. Get ahold of the CBOR hex of a valid signed transaction (not covered by this library)
192
+
193
+
Run the previously built Docker image with the `-v` argument, which mounts the path of your local socket path to
194
+
the container's default socket path (`/tmp/cardano-node-preview.socket`):
A successful submission should return the transaction ID. This ID can be used to check the status of the transaction on any Cardano blockchain explorer.
0 commit comments