Code Monkey home page Code Monkey logo

orbit-wallet-extension's Introduction

Orbit

Available free in the Chrome Web Store

Orbit is a Chrome extension for organising Solana wallets. It allows adding arbitrary tags and freeform notes to each account, in addition to a label.

Filtering

Accounts can be filtered by tags, and searched by label/notes. These can be used independently or combined.

Connecting to an app

Orbit implements Wallet Standard for Solana, meaning that it can be used to connect any of your accounts to any Solana app. It does not have any ability to sign for an account, so such connections are read-only.

Exporting

Export addresses

You can copy a list of addresses, which can be useful to bulk import into apps. Tags and search can be used to filter the addresses included.

Export Orbit accounts

You can also export the Orbit accounts including label, notes and tags in JSON format.

Importing

Import addresses

You can bulk import a list of addresses into Orbit. Addresses already stored will be skipped. Imported addresses will be given an autogenerated label and empty notes/tags.

Import Orbit accounts

This is used to import accounts that were exported using Orbit.

Development

Orbit is open source and built using Vite and the crxjs vite-plugin.

All data is stored locally in extension storage.

The UI is built using react-router.

Running locally

The extension can be created by running npm run dev. This will populate the dist/ directory, which can be imported into Chrome. This will also watch the local repo for changes to the code and automatically update the installed extension.

Wallet Adapter and Wallet Standard

As mentioned above, Orbit implements Wallet Standard, which means that it can be used to connect to any app without any code changes. In practice the implementation for this is going to be through Wallet Adapter, a library apps use to interact with Solana wallets. Currently wallet-adapter only displays wallet-standard wallets if they implement either SolanaSignAndSendTransactionFeature or SolanaSignTransactionFeature (source). Therefore, for now Orbit implements the SolanaSignTransactionFeature feature but throws an error if it is called.

Building for production

Run npm run build to create a production build.

There's an issue where dist/assets/index.browser.<hash>.js is including process.env.NODE_ENV. process is not defined in the browser environment. I'm not sure how to define it, using Vite's define doesn't work, presumably because that's defining it in the extension but not in the popup. As a workaround, we can use sed to remove this:

sed -i '' 's/=(()=>process.env.NODE_ENV==="development")()/=false/' dist/assets/index.browser.*.js

I'm also not yet sure where this injection is coming from or what it's for. But in production, it'll resolve to false.

After this, just zip the dist/ directory and submit to the Chrome store!

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.