Skip to content

Commit

Permalink
chore: update docs
Browse files Browse the repository at this point in the history
  • Loading branch information
merklefruit committed Dec 5, 2024
1 parent 4c82a59 commit 0fa211b
Show file tree
Hide file tree
Showing 3 changed files with 9 additions and 5 deletions.
8 changes: 5 additions & 3 deletions bolt-cli/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -42,11 +42,12 @@ Available commands:
The `delegate` command generates signed delegation messages for the Constraints API.
To learn more about the Constraints API, please refer to the [Bolt documentation][bolt-docs].

The `delegate` command supports three key sources:
The `delegate` command supports different key sources:

- Local BLS secret keys (as hex-encoded strings) via `secret-keys`
- Local EIP-2335 filesystem keystore directories via `local-keystore`
- Remote Dirk keystore via `dirk` (requires TLS credentials)
- Remote Web3Signer keystore via `web3signer`

<details>
<summary>Usage</summary>
Expand All @@ -62,6 +63,7 @@ Commands:
secret-keys Use local secret keys to generate the signed messages
local-keystore Use an EIP-2335 filesystem keystore directory to generate the signed messages
dirk Use a remote DIRK keystore to generate the signed messages
web3signer Use a remote web3signer keystore to generate the signed messages
help Print this message or the help of the given subcommand(s)
Options:
Expand Down Expand Up @@ -139,7 +141,7 @@ bolt delegate \
bolt delegate \
--delegatee-pubkey 0x83eeddfac5e60f8fe607ee8713efb8877c295ad9f8ca075f4d8f6f2ae241a30dd57f78f6f3863a9fe0d5b5db9d550b93 \
--chain holesky \
web3-signer --url https://localhost:9000 \
web3signer --url https://localhost:9000 \
--ca-cert-path ./test_data/web3signer/tls/web3signer.crt \
--combined_pem_path ./test_data/web3signer/tls/combined.pem
```
Expand All @@ -155,7 +157,7 @@ The `pubkeys` command lists available BLS public keys from different key sources
- Local BLS secret keys (as hex-encoded strings) via `secret-keys`
- Local EIP-2335 filesystem keystore directories via `local-keystore`
- Remote Dirk keystore via `dirk` (requires TLS credentials)
- Remote Web3Keystore via `web3signer`
- Remote Web3Signer via `web3signer`

<details>
<summary>Usage</summary>
Expand Down
2 changes: 2 additions & 0 deletions bolt-cli/src/cli.rs
Original file line number Diff line number Diff line change
Expand Up @@ -340,6 +340,7 @@ pub enum KeysSource {
},

/// Use a remote web3signer keystore as source for the public keys.
#[clap(name = "web3signer")]
Web3Signer {
/// The options for connecting to the web3signer keystore.
#[clap(flatten)]
Expand Down Expand Up @@ -372,6 +373,7 @@ pub enum SecretsSource {
},

/// Use a remote Web3Signer keystore to generate the signed messages.
#[clap(name = "web3signer")]
Web3Signer {
#[clap(flatten)]
opts: Web3SignerOpts,
Expand Down
4 changes: 2 additions & 2 deletions bolt-cli/src/common/web3signer.rs
Original file line number Diff line number Diff line change
Expand Up @@ -57,7 +57,7 @@ impl Web3Signer {
/// Reference: https://commit-boost.github.io/commit-boost-client/api/
pub async fn request_signature(&mut self, pub_key: &str, object_root: &str) -> Result<String> {
let path = self.base_url.join("/signer/v1/request_signature")?;
let body = CommitBoostRequestSignature {
let body = CommitBoostSignatureRequest {
type_: "consensus".to_string(),
pubkey: pub_key.to_string(),
object_root: object_root.to_string(),
Expand Down Expand Up @@ -102,7 +102,7 @@ struct CommitBoostKeys {

/// Request signature from the Web3Signer.
#[derive(Serialize, Deserialize)]
struct CommitBoostRequestSignature {
struct CommitBoostSignatureRequest {
#[serde(rename = "type")]
pub type_: String,
pub pubkey: String,
Expand Down

0 comments on commit 0fa211b

Please sign in to comment.