Skip to content

nunet/dev-tools-eternl-cli

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

2 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Eternl CLI

A command-line interface tool designed to facilitate data signing using the Eternl wallet through a local web server integration.

Overview

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.

Features

  • 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 ed25519 and COSE standards.
  • DID & PeerID Generation: Derives and displays Decentralized Identifiers (DID) and Libp2p Peer IDs from the public key.

Installation

To build the project from source, ensure you have Go installed, then run:

make build

This will produce an executable binary named eternl-cli.

Usage

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>

Example

# Sign the hex string "deadbeef"
./eternl-cli deadbeef
  1. The tool will start the server and open your browser.
  2. Follow the prompts in the browser to sign the data with your Eternl wallet.
  3. Once signed, the CLI will output the verification details:
DID:[did:key:z6M...]
Address:[addr1...]
PubKey:[...]
PubKeyRaw:[...]
Signature:[...]
EDSignature:[...]

Technical Details

  • Port: 8872
  • Endpoints:
    • /: Serves the HTML signing interface.
    • /sig: Accepts the signature payload from the browser.
  • Verification: The tool verifies the COSE_Sign1 structure and the ed25519 signature to ensure authenticity.

About

Mirror of https://gitlab.com/nunet/dev-tools/eternl-cli - A command-line interface tool designed to facilitate data signing using the Eternl wallet through a local web server integration.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors