Skip to content

Commit

Permalink
Merge pull request #681 from kinode-dao/hf/add-ws-auth
Browse files Browse the repository at this point in the history
eth: add ws auth
  • Loading branch information
nick1udwig authored Feb 8, 2025
2 parents 0d2013a + 1dbcae1 commit c342995
Show file tree
Hide file tree
Showing 49 changed files with 248 additions and 102 deletions.
73 changes: 36 additions & 37 deletions Cargo.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

17 changes: 17 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -82,6 +82,7 @@ Here are all the available boot flags for the Kinode runtime:
- `-l, --logging-off`: Run in non-logging mode. Do not write terminal output to file in .terminal_logs directory.
- `-d, --detached`: Run in detached mode (don't accept input on terminal).
- `--rpc <RPC>`: Add a WebSockets Optimism RPC URL at boot.
- `--rpc-config <RPC_CONFIG_PATH>`: Add WebSockets RPC URLs specified in config at boot
- `--password <PASSWORD>`: Node password (in double quotes).
- `--max-log-size <MAX_LOG_SIZE_BYTES>`: Max size of all terminal logs in bytes. Setting to 0 means no size limit. Default is 16MB.
- `--number-log-files <NUMBER_LOG_FILES>`: Number of terminal logs to rotate. Default is 4.
Expand All @@ -94,6 +95,22 @@ When compiled with the `simulation-mode` feature, two additional flags are avail
- `--fake-node-name <NAME>`: Name of fake node to boot.
- `--fakechain-port <FAKECHAIN_PORT>`: Port to bind to for local anvil-run blockchain.

`RPC_CONFIG_PATH` must point to a file containing a JSON array of JSON objects with required key of `"url"` (whose value must be a string) and optional field of `"auth"`.
`"auth"`, if included, must be a JSON object with one key, either `"Basic"`, `"Bearer"`, or `"Raw"`, and whose value must be a string.
E.g.:

```json
[
{
"url": "wss://path.to.my.rpc.com",
"auth": {
"Bearer": "this.is.my.bearer.key"
}
}
]
```

This allows authorization headers to be set for RPC providers.

## Configuring the ETH RPC Provider

Expand Down
5 changes: 3 additions & 2 deletions kinode/packages/app-store/Cargo.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion kinode/packages/app-store/app-store/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ alloy-primitives = "0.8.15"
alloy-sol-types = "0.8.15"
anyhow = "1.0"
bincode = "1.3.3"
kinode_process_lib = "1.0.0"
kinode_process_lib = "1.0.1"
process_macros = "0.1"
rand = "0.8"
serde = { version = "1.0", features = ["derive"] }
Expand Down
2 changes: 1 addition & 1 deletion kinode/packages/app-store/chain/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ alloy-primitives = "0.8.15"
alloy-sol-types = "0.8.15"
anyhow = "1.0"
bincode = "1.3.3"
kinode_process_lib = "1.0.0"
kinode_process_lib = "1.0.1"
process_macros = "0.1"
rand = "0.8"
serde = { version = "1.0", features = ["derive"] }
Expand Down
2 changes: 1 addition & 1 deletion kinode/packages/app-store/download/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ simulation-mode = []

[dependencies]
anyhow = "1.0"
kinode_process_lib = "1.0.0"
kinode_process_lib = "1.0.1"
process_macros = "0.1"
serde = { version = "1.0", features = ["derive"] }
serde_json = "1.0"
Expand Down
Loading

0 comments on commit c342995

Please sign in to comment.