Giter VIP home page Giter VIP logo

solar's Introduction

Solar Wallet

Latest stable release MacOS Windows Android iOS


User-friendly Stellar wallet, featuring multi-signature, custom assets management and more.

Runs on Mac OS, Windows, Linux, Android and iOS.

Download

See https://github.com/satoshipay/solar/releases. You will find the binaries there.

Key security

Keys are encrypted with a key derived from the user's password before storing them on the local filesystem. That means that the user's secret key is safe as long as their password is strong enough. However, if they forget their password there will be no way of recovering the secret key. That's why you should always make a backup of your secret key.

The encryption key is derived from the password using PBKDF2 with SHA256. The actual encryption is performed using xsalsa20-poly1305.

Development

Desktop

Install the dependencies first:

npm install

To run the app in development mode:

npm run dev

# On Mac OS:
PLATFORM=darwin npm run dev

To run the tests:

npm test

To run the storybook:

npm run storybook

Run dev server without electron

cd web/
npm run dev

Android/iOS

See Cordova build readme.

Production build

Desktop

npm run build:mac
npm run build:win
npm run build:linux

Building windows binaries on macOS

Starting with macOS Catalina 32-bit executables are not supported. This means that the windows binaries cannot be build natively. One can circumvent this issue by using docker for building the windows binaries. Details are documented here. Since Solar is using Squirrel.Windows the electronuserland/builder:wine-mono image should be used.

To run the docker container use:

docker run --rm -ti \
 --env-file <(env | grep -iE 'DEBUG|NODE_|ELECTRON_|YARN_|NPM_|CI|CIRCLE|TRAVIS_TAG|TRAVIS|TRAVIS_REPO_|TRAVIS_BUILD_|TRAVIS_BRANCH|TRAVIS_PULL_REQUEST_|APPVEYOR_|CSC_|GH_|GITHUB_|BT_|AWS_|STRIP|BUILD_') \
 --env ELECTRON_CACHE="/root/.cache/electron" \
 --env ELECTRON_BUILDER_CACHE="/root/.cache/electron-builder" \
 -v ${PWD}:/project \
 -v ${PWD##*/}-node-modules:/project/node_modules \
 -v ~/.cache/electron:/root/.cache/electron \
 -v ~/.cache/electron-builder:/root/.cache/electron-builder \
 -v /Volumes/Certificates/solar:/root/Certs \
 electronuserland/builder:wine-mono bash -c 'npm config set script-shell bash && npm install && npm run build:win:signed'

Note: We have seen weird module resolution troubles with Parcel. In this case make sure to rm -rf node_modules/ on the host, then try again.

Signed binaries

To sign the binaries, make sure you have the code signing certificates on your local filesystem as a .p12 file and have the password for them. Make sure not to save the certificates in the Solar directory in order to not accidentally bundling them into the app installer!

You can create a signing-mac.env and a signing-win.env file, pointing electron-builder to the right certificate to use for each target platform:

CSC_LINK=~/secret-certificates/SatoshiPayLtd.p12   # point to your local certificate file

Now run npm run build:*:signed to create a signed application build. You will be prompted for the certificate's password.

To check the Mac DMG signature, run codesign -dv --verbose=4 ./electron/dist/<file>. To verify the Windows installer signature, you can upload the file to virustotal.com.

Newer versions of Mac OS require apps to be notarized. The build:mac:signed script will notarize the app. For this to succeed, you also need to add your Apple ID to your signing-mac.env file:

Note: Application signing has only been tested on a Mac OS development machine so far.

Android/iOS

See Cordova build readme.

License

MIT

solar's People

Contributors

alanpearce avatar andywer avatar dependabot[bot] avatar ebma avatar luca-90 avatar marcoachury avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

solar's Issues

Trustlines a.k.a Basic EURT support

  • Trustline management
    • Show trustlines
    • Add a trustline (manually + hardcoded list of popular ones?)
    • Remove a trustline
  • Show non-XLM balances
  • Allow choosing asset on payment creation

Add some SatoshiPay branding

There is no official name for the app yet, but adding some SatoshiPay branding won't hurt.

  • Add SatoshiPay icon to electron app
  • Change electron app name / window title
  • (Maybe) Add icon to page / header

Initial setup

This project has been started outside of SatoshiPay. Finish the migration of the repository to its new home and make sure the code base matches the overall standards we use at SatoshiPay.

Migrate to TypeScript

This was the last project I wrote without TypeScript. Time to change that as long as the code is not yet too large.

UI / UX upgrade

Preparation necessary: Ping Daniel!

New brand color: #02b8f5

Recent txs don't update on payment

Ran dev electron app using npm run dev in electron/. Created a payment in the mocked testnet wallet. Payment worked, but transaction didn't show up.

Check: Maybe the tx only gets added to the bottom of the txs list instead of at the top?

Basic error handling

Display a useful error to the user if there is one. Use snackbar or similar.

Should be a generic solution that can be used by any part of the code.

Rename "wallets" to "accounts"

Bad wording. Having multiple "wallets" is confusing.

There is only one wallet: Our app that the user uses. It contains a set of accounts.

Create electron-targeted bundle

Add --target=electron to the parcel invocation. Will bundle app files, but not dependencies. Should allow using node dependencies in the app code.

Make sure that node dependencies can be used. Will probably be unable to develop in the browser (without the electron wrapper), though, once the first node dependency is used.

Account password support

  • Prompt user for password before signing the transaction if a password is required
  • Allow setting password on creating a new account

Nice to have: Show some info that the account is password protected (or that it's not if mainnet) on the account page.

Store data in local storage (web)

While developing in web mode, the data should still be persisted.

Might become obsolete if #50 is solved. Minimal effort!

  • Development build: Store data in local storage
  • Production build: Don't allow production web builds without electron

Data Storage

As a user I want my data to be persisted. Right now it's just some volatile mock data.

Provide:

  • Encrypt / decrypt passwords
  • Save data to disk in electron app
    • Make sure it still works in the browser, though (for development)

QR codes

  • Create secret key QR for account export
  • Scan secret key QR for account import
  • Create payment request QRs
  • Scan payment request QRs

Changing passwords

Keep in mind the following edge cases:

  • Account is not password-protected yet, user wants to set a password
  • Account is password-protected, user wants to drop the password protection (not a critical use case)

Add more components to storybook

Add components that are otherwise difficult / inconvenient to test and components with a focus on reusability:

  • Balance
  • TransactionList
  • TransactionSummary

HOCs are both hard to read and hard to provide types for

Use render props instead (see here, for example)?

Example:

// instead of withBalance(options)(Component):
import BalanceSubscription from '../data/BalanceSubscription'

const ShowMyBalance = (props: { wallet: Wallet }) => {
  return (
    <BalanceSubscription publicKey={wallet.publicKey} testnet={wallet.testnet}>
      {(balance: number) => (
        <div>Your balance: {balance}</div>
      )}
    </BalanceSubscription>
  )
}

Feels more intuitive, is easier to read and type and is also conceptually closer to the underlying subscription functions.

Create accounts without prior private key

As a user I want to be able to create a new account from scratch.

  • "Add wallet" dialog:
    • should create wallet from scratch (create new private key)
    • should show a button to import an existing account

Add splash screen to app

Show some nice splash screen for the few seconds the app loads. Ideally show it even before the browser view has initialized (splash screen implemented in electron main process, not in bundle).

Manage accounts

Provide:

  • Adding accounts
  • Renaming accounts
  • Deleting accounts
  • Changing passwords

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.