A command-line interface tool designed to facilitate data signing using the Eternl wallet through a local web server integration.
eternl-cli acts as a bridge between your command line and the Eternl browser wallet. When executed, it spins up a local HTTP server and opens a browser window, prompting the user to sign a specific message or payload. It then captures the signature, verifies it against CIP-8 / COSE standards, and outputs the result to the terminal.
- Local Server: Starts a lightweight HTTP server on port
8872. - Browser Integration: Automatically opens the default web browser to the signing interface.
- Signature Verification: Validates signatures using
ed25519andCOSEstandards. - DID & PeerID Generation: Derives and displays Decentralized Identifiers (DID) and Libp2p Peer IDs from the public key.
To build the project from source, ensure you have Go installed, then run:
make buildThis will produce an executable binary named eternl-cli.
Run the binary with a hex-encoded string as the argument. This string represents the data you want to sign.
./eternl-cli <hex_encoded_message># Sign the hex string "deadbeef"
./eternl-cli deadbeef- The tool will start the server and open your browser.
- Follow the prompts in the browser to sign the data with your Eternl wallet.
- Once signed, the CLI will output the verification details:
DID:[did:key:z6M...]
Address:[addr1...]
PubKey:[...]
PubKeyRaw:[...]
Signature:[...]
EDSignature:[...]
- Port: 8872
- Endpoints:
/: Serves the HTML signing interface./sig: Accepts the signature payload from the browser.
- Verification: The tool verifies the
COSE_Sign1structure and theed25519signature to ensure authenticity.