Skip to content

Commit 4f05b34

Browse files
committed
feat: initial README, fixes #5
Signed-off-by: Chris Gianelloni <[email protected]>
1 parent dc50183 commit 4f05b34

File tree

1 file changed

+56
-1
lines changed

1 file changed

+56
-1
lines changed

README.md

Lines changed: 56 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1,56 @@
1-
# go-cardano-submit-api
1+
# go-cardano-submit-api
2+
Cardano Transaction Submission API
3+
4+
A simple HTTP API which accepts a CBOR encoded Cardano transaction as a
5+
payload body and submits it to a Cardano full node using the Ouroboros
6+
LocalTxSubmission Node-to-Client (NtC) protocol.
7+
8+
## Usage
9+
The recommended method of using this application is via the published
10+
container images.
11+
12+
```
13+
docker run -p 8090 ghcr.io/cloudstruct/cardano-submit-api:0.4.0
14+
```
15+
16+
### Configuration
17+
Configuration can be done using either a `config.yaml` file or setting
18+
environment variables. Our recommendation is environment variables.
19+
20+
#### Environment variables
21+
Configuration via environment variables can be broken into two sets of
22+
variables. The first set controls the behavior of the application, while the
23+
second set controls the connection to the Cardano node instance.
24+
25+
Application configuration:
26+
`API_LISTEN_ADDRESS` - Address to bind for API calls, all addresses if empty (default: empty)
27+
`API_LISTEN_PORT` - Port to bind for API calls (default: 8090)
28+
`DEBUG_ADDRESS` - Address to bind for pprof debugging (default: localhost)
29+
`DEBUG_PORT` - Port to bind for pprof debugging, disabled if 0 (default: 0)
30+
`LOGGING_LEVEL` - Logging level for log output (default: info)
31+
`METRICS_LISTEN_ADDRESS` - Address to bind for Prometheus format metrics, all
32+
addresses if empty (default: empty)
33+
`METRICS_LISTEN_PORT` - Port to bind for metrics (default: 8081)
34+
35+
Connection to the Cardano node can be performed using specific named network
36+
shortcuts for known network magic configurations. Supported named networks are:
37+
38+
- mainnet
39+
- preprod
40+
- preview
41+
- testnet
42+
43+
You can set the network to an empty value and provide your own network magic to
44+
connect to unlisted networks.
45+
46+
TCP connection to a Cardano node without using an intermediary like SOCAT is
47+
possible using the node address and port. It is up to you to expose the node's
48+
NtC communication socket over TCP. TCP connections are preferred over socket
49+
within the application.
50+
51+
Cardano node configuration:
52+
`CARDANO_NETWORK` - Use a named Cardano network (default: mainnet)
53+
`CARDANO_NODE_ADDRESS` - Address to Cardano node NtC via TCP (default: unset)
54+
`CARDANO_NODE_PORT` - Port to Cardano node NtC via TCP (default: unset)
55+
`CARDANO_NODE_NETWORK_MAGIC` - Cardano network magic (default: automatically determined from named network)
56+
`CARDANO_NODE_SOCKET_PATH` - Socket path to Cardano node NtC via UNIX socket (default: /node-ipc/node.socket)

0 commit comments

Comments
 (0)