Giter Club home page Giter Club logo

seacrest's Introduction

Seacrest


Seacrest allows you to connect with WalletConnect 2.0 from your terminal or GitHub Action.

You start Seacrest either in a terminal or as a GitHub Action. In either case, you'll see a QR Code in your terminal after Seacrest starts [like literally, in your terminal or in the GitHub Actions logs]. Connect any WalletConnect app (e.g. MetaMask Mobile) to that QR Code. From then on out, point your apps to the Ethereum node https://localhost:8585. For standard requests, like the current block number, Seacrest proxies the request to an Ethereum node you specify. But for requests for unlocked accounts or signing transactions, Seacrest will forward the request to your WalletConnect app. Magically, you'll have an "unlocked account" available to use with Hardhat or any other Ethereum tool.

Installing

Terminal

To run Seacrest, install it through npm or yarn:

npm install -g seacrest

Next, run seacrest, specifying an Ethereum node to proxy requests to:

seacrest {ethereum_network} {wallet_connect_project_id} http://goerli.infura.io 8585

Now, you can specify http://localhost:8585 as your Ethereum node in any service. If that service calls eth_accounts, eth_sendTransaction, net_version, or personal_sign, that request will be intercepted by Seacrest and passed to WalletConnect. Otherwise, the request will be proxied the given Ethereum node.

GitHub Actions

Seacrest is also meant to be easily used in a GitHub Action. Add to your YAML file:

- name: Seacrest
  uses: hayesgm/seacrest@v1
  with:
    wallet_connect_project_id: '...'
    requested_network: 'goerli' # or 5
    ethereum_url: https://goerli.infura.io # optional, otherwise mainnet
    port: 8585 # default 8585

You will need to pull into your logs when the action is running and connect your wallet. Pull into the action log and scan the QR code. It's a little finnicky, but it should work.

Subsequently, you can simply use http://localhost:8585 as your Ethereum node. Any requests for accounts or signatures will be redirected to WalletConnect. For instance, you could deploy scripts from Hardhat using this node, with the security of WalletConnect but the ease and transparency of GitHub Actions.

Configuration

You can configure the following values from the environment:

  • ETHEREUM_URL: Ethereum node to proxy to
  • PORT: Port to bind on
  • LARGE: Show full size QR code or compact
  • RESHOW_DELAY: Reshow the QR code every so often (used in GitHub Actions)

Why?

First, for fun and profit. Moreso, there's value in interacting and deploying Ethereum contracts in plain sight. But that's hard to do since most people don't want to share private keys with GitHub Secrets, even if they are throw-aways. This gives developers the option to securely sign transactions in public.

Secondly, you could use this as an authorization flow in GitHub Actions, e.g. to unlock other secrets or anything else. It is the first "human in the loop" authorization action that I know of.

Contributing

Create a PR to contribute to Seacrest. All contributors agree to accept the license specified in this repository for all contributions to this project. See LICENSE.md.

Feel free to create Feature Requests in the issues.

Note: The author generated the Seacrest logo with DALL•E, OpenAI's text-to-image generation model. The image was further modified by the author.

seacrest's People

Contributors

hayesgm avatar kevincheng96 avatar cwang25 avatar isabellewei avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.