{"id":13631488,"url":"https://github.com/snarflakes/PiEthereumWallet","last_synced_at":"2025-04-17T22:31:02.845Z","repository":{"id":65446818,"uuid":"534776697","full_name":"snarflakes/PiEthereumWallet","owner":"snarflakes","description":"Permissionless ID, Self-Banking (Ethereum) and Currency Trading Device","archived":false,"fork":false,"pushed_at":"2024-06-27T06:14:25.000Z","size":693,"stargazers_count":48,"open_issues_count":2,"forks_count":3,"subscribers_count":8,"default_branch":"main","last_synced_at":"2024-08-01T22:48:40.051Z","etag":null,"topics":["ethereum","identification","raspberry-pi","wallet"],"latest_commit_sha":null,"homepage":"https://nftydaze.com/opensource/","language":"Python","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"gpl-3.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/snarflakes.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":".github/FUNDING.yml","license":"license","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null},"funding":{"custom":["https://gitcoin.co/snarflakes","nftydaze.eth"]}},"created_at":"2022-09-09T19:19:57.000Z","updated_at":"2024-06-27T18:05:10.000Z","dependencies_parsed_at":"2024-06-10T00:20:50.518Z","dependency_job_id":"1708f10f-828d-4597-b261-60b1d2ebf168","html_url":"https://github.com/snarflakes/PiEthereumWallet","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/snarflakes%2FPiEthereumWallet","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/snarflakes%2FPiEthereumWallet/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/snarflakes%2FPiEthereumWallet/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/snarflakes%2FPiEthereumWallet/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/snarflakes","download_url":"https://codeload.github.com/snarflakes/PiEthereumWallet/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":223768482,"owners_count":17199355,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["ethereum","identification","raspberry-pi","wallet"],"created_at":"2024-08-01T22:02:27.547Z","updated_at":"2025-04-17T22:31:02.837Z","avatar_url":"https://github.com/snarflakes.png","language":"Python","funding_links":["https://gitcoin.co/snarflakes","nftydaze.eth"],"categories":["Python"],"sub_categories":[],"readme":"#  PiSwap L2. Physical Keys, Click Button Swaps, Open Source\n\nAn Ethereum/EVM/L2 Hardware Wallet (Raspberry Pi inside) with multi-L2 chain uniswap contract direct token Swap and physically hot-swappable private keys.\nNOT AUDITED. Do not use to store substantial quantities of funds. \n\nBringing the blockchain to physical life, using swappable private keys inside microSD cards, clicky buttons, open source code, and a bright informative display, this device makes for a great way to educate others, onboard, build, and swap tokens. No coding experience needed!\nDemonstration Videos: https://www.youtube.com/channel/UCEF_x9fTZcyoEAE-GllaJ8w\n\nFor $50 (+ cost of microSD cards) you can make your own! Load and gift small cold wallets to friends and family.\nDon't want the tax implications of sending your ETH?  Just send USDC + gas. \nHand the hardware to your 💘 crypto noob/student/child, they press and hold the physical button, it instantly routes a contract direct uniswap transaction to convert all the USDC to ETH(easily customize this swap to a token of your choosing)!\n\nPART List: \nraspberry pi zero WH (needs header pins): https://www.pishop.us/product/raspberry-pi-zero-wireless-wh-pre-soldered-header/\n(stock info) https://www.nowinstock.net/computers/developmentboards/raspberrypi/\nST screen: https://a.co/d/iT952LE\nmicroSD card for new private keys (smallest size and generic to reduce costs):https://a.co/d/50a2JCb\nmicroSD card reader with OTG (microUSB) adapter - https://www.amazon.com/dp/B096SGHJ4K?_encoding=UTF8\u0026psc=1\u0026ref_=cm_sw_r_cp_ud_dp_R4AX78ZPNXCDEEJW5CXM\u0026newOGT=1\nbattery pack (optional) - https://a.co/d/fKbBJRV\nWant WalletConnect?: camera module (optional) -https://a.co/d/3tTFnJs\n\n![image](https://nftydaze.com/wp-content/uploads/2023/04/IMG-1435.jpg)\n\n# User Interface Menu Flow\n![IMG_5963](https://github.com/user-attachments/assets/8df36b67-a583-497c-b559-e5e7b92dd86b)\n\nPlus there are a ton more buttons available to come up with your own essential wallet interactions!\n\n✅ account signing?\n✅ send an ETH transaction out?\n✅ wallet watcher with custom alerts to phone?\n✅ gas price watcher with alerts?\n\n\n# Installation\n\nA) Basic Raspberry Pi Zero setup for NOOBS.  start here if you have no clue what to do with your hardware or are very security minded.\nhttps://www.tomshardware.com/reviews/raspberry-pi-headless-setup-how-to,6028.html\n\nOR if you want seamless wifi connectivity at every boot (best option)\n\nB) Homebridge Raspberry Pi Zero setup: add a server for easy wifi connection when traveling around to peoples houses. You need a wifi or mobile phone hotspot connection for the wallet to work.\nhttps://homebridge.io/raspberry-pi-image\n\nUse this disk imager to burn a copy of one of those operating system \"images\" onto a microSD card: https://sourceforge.net/projects/win32diskimager/\n\nafter above completed steps proceed below. \n\nMake sure you have the following dependencies (modules) we build most modules in venv (virtual environment):\n\n````\nsudo apt-get update\nor\nsudo apt-get update --allow-releaseinfo-change\n\nsudo apt-get -y install python3-pip\nsudo apt install -y python3-lgpio\n\npython3 -m venv ~/myvenv\nsource ~/myvenv/bin/activate\nsource ~/.bashrc\n\n````\n\nInstall these libraries by running (only web3 version listed below works):\n\n````\npip install st7789 pillow board gpiozero adafruit-blinka RPI.GPIO adafruit-circuitpython-rgb-display qrcode spidev eth-account\npip install lgpio\npip install web3==6.20.3\npip install uniswap-python\n\nsudo apt install -y libopenblas-dev libatlas-base-dev\nsudo apt-get install -y libopenjp2-7 python3-numpy\n\nsudo usermod -aG gpio pi\n\nOptional for walletconnect function (these are lengthy challenging installs on a pi zero, flash the provided image to skip) :\npip install imutils opencv-python-headless py?walletconnect\n\nsudo raspi-config\n--select interface\n--enable SPI\n\nreboot\n````\n\nPrerequisites\n(These instructions assume that your Raspberry Pi is already connected to the Internet, happily running pip and has Python3 installed)\n\nIf you are running the Pi headless, connect to your Raspberry Pi using ssh.\n\n**I had to deactivate the included infura API as it was being spammed. Please generate your own free infura API number via the infura or alchemy websites and replace it in all the config.json file code. While you are at it, generate your own etherscan API, and polygon scan API, and any other L2 blockchain explorer API and replace those in the code. \n\nInstall \u0026 Run\nCopy the files from this repository onto the Pi, or clone using:\n\n```````````\ncd ~\ngit clone https://github.com/snarflakes/PiEthereumWallet.git\ncd PiEthereumWallet\n```````````\n\n# Application Details\n\nRun the PiSwapL2.py:\n`````````````\nsudo -E /home/pi/myvenv/bin/python3 piswapL2.py\n`````````````\n\n# Want to easily customize token swapping function? \n\nAny token pair from a uniswapV3 pool will work! \nEdit config.json file in each \"L2 chain\" directory.  Make sure you update the infura API, token in and token out names, symbol, contract address, decimal place, API, and pool fee (ie 100, 300). Want more token pairs available? Add more config.jsons to the chain directory.  config2.json, config3.json, config4.json etc.\n\n# Add as a service: How to have the Ethereum Wallet Program run whenever the Pi Boots Up \n\nIn order to have a command or program run when the Pi boots, you can add it as a service. Once this is done, you can start/stop enable/disable from the linux prompt.\nFollow these instructions: https://domoticproject.com/creating-raspberry-pi-service/\nDon't forget to add the activate myvenv code in the myscript file.  create file (myscript.service) add code below and save in: etc/systemd/system. turn on: sudo systemctl enable myscript.service\n````\n[Unit]\nDescription=piswapL2\nAfter=network.target\n\n[Service]\nType=simple\nUser=root\nGroup=pi\nEnvironment=\"PATH=/home/pi/myvenv/bin:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin\"\nEnvironment=\"PYTHONPATH=/home/pi/myvenv/lib/python3.7/site-packages\"\nWorkingDirectory=/home/pi/PiEthereumWallet\nExecStart=/bin/bash -c 'source /home/pi/myvenv/bin/activate \u0026\u0026 exec /home/pi/myvenv/bin/python3 piswapL2.py'\nRestart=always\n\n[Install]\nWantedBy=multi-user.target\n````\n# For extra security in public places? Make these mods to your OS.\n\nChange your user logon to be a very strong 10 digit password with symbol/upper/lowercase letter/numbers.  Also you can reduce the rate of incorrect authentication attempts with https://www.fail2ban.org/wiki/index.php/Main_Page\n\n# Want more Privacy (hide your IP address)?\n\nInstall free opensource software WireguardVPN by following instructions here: https://pivpn.io/\n\n# WalletConnect Optional Installation Instructions\n````\n[camera first]\nsudo apt-get install python3-opencv\nsudo apt-get install libqt4-test python3-sip python3-pyqt5 libqtgui4 libjasper-dev libatlas-base-dev -y\n\n##TURN ON CAMERA navigate through accessories on menu- \nsudo raspi-config\n\n[walletconnect function] (modules below are complex to install due to time/compute power of raspberry pi zero)\nsudo apt-get install libssl-dev\ncurl --proto '=https' --tlsv1.2 -sSf https://sh.rustup.rs | sh\npython3 -m pip install wsproto==1.0.0\npip install cryptography\n(or)\nsudo apt install python3-cryptography\npython3 -m pip install pyWalletConnect\n\n#Take Note Difficulty with installing cryptography module as \"sudo\", so script has to run through user because sudo doesn't have access\npractice from command line: \nsudo -E python3 imageid.py\n\n#work around for sudo -E (when running myscript) see below\nadded sys.path directions directly into the file so it would point to the location installed under the pi user\n(all directories need to be listed, if additional modules are found in subfolders those folders need to be named)\n\n`````````````\nCaution when running WalletConnect Wallet all signatures are auto-signed (be careful as any transaction you agree to will be auto signed with no confirmation\n\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fsnarflakes%2FPiEthereumWallet","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fsnarflakes%2FPiEthereumWallet","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fsnarflakes%2FPiEthereumWallet/lists"}