Giter VIP home page Giter VIP logo

safari-wallet's Introduction

Safari Wallet

This is an experiment to see whether we can build a viable browser extension Ethereum wallet for Safari on macOS and especially iOS.

Overview

A diagram might be useful, but basically the current plan/rundown is:

  • The window.ethereum object (EIP-1193 JavaScript API) will be injected into each page. This way, the wallet will automatically work with all apps/dApps that support MetaMask.

  • For the interface, the native Safari extension popover is used, in tandem with the WebExtensions API.

The bulk of the development is currently going on in the Shared (App and Extension) and Shared (App) folders.

It is important to read these files:

  • Shared (App) > Shared (Extension) > Resources > README.md

  • Shared (App) > Shared (Extension) > Resources > ethereum > README.md

  • test-dapp > README.md

Popover

Setting up the popover

  1. Open this repo as a project in Xcode

  2. From the menu bar: File > Packages > Update to Latest Package Versions

  3. In the leftmost top bar breadcrumb, which should be on "macOS" by default, switch it to "iOS"

  4. Set the following breadcrumb to a mobile device, perhaps "iPhone 13 Pro"?

  5. Click the play button to start the emulator

  6. Once the emulator has loaded (it might take a few minutes), open the Settings app

  7. Settings > Safari > Extensions > Wallet Extension

  8. Switch to on

Then, to test the popover, navigate to https://safari-wallet-test-dapp.vercel.app in Safari (or http://localhost:3000/, if you're running the local dev server)

You can also set up the local dev server here (WIP): https://github.com/natclark/safari-wallet-test-dapp

Keys

Use your own Alchemy or Infura keys by creating a file called keys.swift in the Shared (App and Extension) directory. The filename is added to .gitignore so won't be committed.

// Shared (App and Extension)/keys.swift
struct ApiKeys {
    static let alchemyMainnet = "<YOUR KEY HERE>"
    static let alchemyRopsten = "<YOUR KEY HERE>"
    static let infuraRopsten = "<YOUR KEY HERE>"
    static let infuraMainnet = "<YOUR KEY HERE>"
    static let covalent = "<YOUR KEY HERE>"
    static let unmarshal = "<YOUR KEY HERE>"
    static let etherscan = "<YOUR KEY HERE>"
    static let zerion = "Demo.ukEVQp6L5vfgxcz4sBke7XvS873GMYHy"
}

safari-wallet's People

Contributors

ronaldmannak avatar bejitono avatar jamierumbelow avatar tassivg avatar dimitarnestorov avatar natclark avatar

Stargazers

Kevin Alexander Scott Jellis avatar Jan Crisologo avatar Onuwa Nnachi Isaac avatar Camden avatar rake avatar Tom Waite avatar Massimiliano avatar  avatar  avatar Umar avatar

Watchers

James Cloos avatar  avatar  avatar  avatar

Forkers

william3johnson

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.