Skip to content

permaweb/eth-client-1.0

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

4 Commits
 
 
 
 
 
 
 
 

Repository files navigation

eth_client

HyperBEAM device project generated by rebar3 new device.

Build

rebar3 compile

Package

rebar3 device package
rebar3 device verify

Test

rebar3 device test
rebar3 eunit-all

Local Node

rebar3 device local

Node Configuration

eth-client@1.0 reads the Ethereum RPC endpoint and optional API header from node-private configuration. Request-provided rpc-url, api-key, and api-key-header values are ignored.

Flat config:

#{
  <<"priv-eth-rpc-url">> => <<"https://rpc.example.com/eth/<key>">>
}

Structured config:

#{
  <<"priv-eth-client-keys">> => #{
    <<"default">> => #{
      <<"rpc-url">> => <<"https://rpc.example.com/eth/<key>">>,
      <<"api-key">> => <<>>,
      <<"api-key-header">> => <<"x-api-key">>
    }
  }
}

The same map can be loaded from a JSON file with eth-client-keys-path or HB_ETH_CLIENT_KEYS_PATH.

Relay Guardrails

eth-client@1.0 sends JSON-RPC through relay@1.0, so production nodes should pin relay egress with relay-allowed-hosts. Entries are bare hostnames, not URLs.

Example:

#{
  <<"relay-allowed-hosts">> => [
    <<"rpc-example.com">>,
    <<"price-api.example.com">>
  ]
}

Use only the RPC host on an RPC-only node. Include the price API host only on nodes that also fetch token prices through relay@1.0.

Publish

rebar3 device publish --key wallet.json

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

Packages

Contributors

Languages