• Stars
    star
    235
  • Rank 165,816 (Top 4 %)
  • Language
    TypeScript
  • Created over 6 years ago
  • Updated about 1 month ago

Reviews

There are no reviews yet. Be the first to send feedback to the community and the maintainers!

Repository Details

A lightweight web wallet for Cardano cryptocurrency with Trezor, Ledger and BitBox02 support. Please note that the only valid domain for our wallet is adalite.io

AdaLite wallet

A very simple Cardano wallet written entirely in JS.

Some disclaimers before we start

AdaLite is not created by Cardano Foundation, Emurgo, or IOHK. The official Cardano team has not reviewed this code and is not responsible for any damage it may cause you. AdaLite does not store your private keys and you are responsible for storing them safely. Please be aware that if your computer is compromised, your mnemonic may be leaked when used as the access method on Adalite. We encourage you to use AdaLite with a hardware wallet for maximum safety. We appreciate feedback, especially a review of the crypto-related code.

Why we are building this

The official Cardano wallet from IOHK runs a full node and takes a long time to sync the blockchain. It's also very big and downloads >500MB of JavaScript dependencies (which can create a large attack surface and requires a lot of auditing). AdaLite is much smaller and is thus much easier to audit. Since it doesn't run a full node or require to sync the entire blockchain it's also very fast. Recovering your wallet from the mnemonic only takes a few seconds.

Validate the source

If you want, you can verify the integrity of the code running in your browser, you can:

  • checkout the latest version from the master branch (the one being deployed)
  • build the project
  • download the source .js from devtools and compare it to the built version

Compatibility with Daedalus/Yoroi

See https://github.com/vacuumlabs/adalite/wiki/AdaLite-FAQ#compatibility-with-other-wallets

Run project locally

Configuration

Prepare .env file e.g. by cp .env.example .env

Run AdaLite

yarn install
yarn build
ADALITE_ENABLE_HTTPS=true ADALITE_PORT=3000 yarn start-server

Navigate to http://localhost:3000 (or wherever you've configured) and don't forget to set .env to http://localhost:3000 if you were copying the default .env.example file. You may also need to disable caching in your browser to forget previous redirects.

note: ADALITE_ENABLE_HTTPS=true provides a self-signed https certificate, it is recommended to set the flag only when running the app locally.

Development

For development you can start the server with

yarn dev

It runs webpack with the --watch flag and the server with PORT=3000 unless you specify otherwise

Creating releases

For creating releases we use tool release-it, tutorial and setup are written in Releases file

Mocking transaction submission

in .env set the following values (your local settings may differ but by default this should work):

ADALITE_ENABLE_SERVER_MOCKING_MODE = true
ADALITE_MOCK_TX_SUBMISSION_SUCCESS = true
ADALITE_MOCK_TX_SUMMARY_SUCCESS = false

The ADALITE_ENABLE_SERVER_MOCKING_MODE flag tells the server to start in mocking mode to avoid submitting transactions to the actual blockchain. Moreover, it mocks certain blockchain explorer endpoints to fake the transaction submission.

ADALITE_MOCK_TX_SUBMISSION_SUCCESS tells the mock server whether it has to return a success response for tx submission or not.

ADALITE_MOCK_TX_SUMMARY_SUCCESS tells the mock server whether to return that the transaction exists in the blockchain or not - this is useful for polling for transaction status after submission.

Test

lint tests

yarn eslint

unit tests

yarn test

Open app/tests/index.html in browser

Cypress tests

Cypress requires the app to be running with correct environment variables. Type

yarn cypress:dev

to start the app with the correct settings. It calls yarn dev itself, but with correct environment variables for testing.

After that, you can either type

yarn cypress:open

to start the tests with the interactive Test runner, which allows time travel, logs, pausing, etc.

Or, to run the tests in a headless fashion, type

yarn cypress:run

If you wish to create a video of the tests, pass in VIDEO=true yarn cypress:run and videos of all test suites will be created in /app/cypress/videos.

Check us out at https://www.adalite.io


Donations are really appreciated!

BTC: bc1qjdvjjhm5ynucwltmrxpnk6van4ve06528x6q99

ETH: 0xe1575549f79742d21E56426a1F9AD26997F5B9fb

ADA: addr1qxfxlatvpnl7wywyz6g4vqyfgmf9mdyjsh3hnec0yuvrhk8jh8axm6pzha46j5e7j3a2mjdvnpufphgjawhyh0tg9r3sk85ls4

Trezor integration

Some notes on how to implement new coin into Trezor can be found here: https://github.com/vacuumlabs/trezor-core/wiki/Trezor-Development

Hot reloading

Hot reloading is not working well with components that use connect. The project is leading towards removal of connect and its replacement by useSelector so eventually this issue should be solved. The issue you can experience with connect is that components would stop receiving state updates and you therefore need to reload the app.

Known issue with unistore and connect developit/unistore#116

Refactoring

As all projects also this one would appreciate some refactoring love. To save some time on identifying potential source for refactoring see refactoring-proposal.

More Repositories

1

react-custom-validation

JavaScript
131
star
2

babel-plugin-extensible-destructuring

Plugin for extensible destructuring in Babel
JavaScript
118
star
3

cardano-hw-cli

Cardano CLI tool for hardware wallets
TypeScript
64
star
4

yacol

JavaScript
26
star
5

cardano-crypto.js

Cardano cryptography from the official cardano-crypto transpiled to js with emscripten
JavaScript
26
star
6

firebase-transactions

JavaScript
25
star
7

es-proposals

Proposals for EcmaScript language
24
star
8

cardano-ctf

A game where Cardano developers and enthusiasts can try to exploit purposely vulnerable smart contracts and learn about the most common security issues and how to prevent them.
TypeScript
20
star
9

persistent

Efficient Persistent Data Structures for Dart
Dart
19
star
10

ledger-app-cardano-shelley

update of Ledger Nano Cardano app code from Byron to Shelley
C
17
star
11

data-provider

Data providers for React
JavaScript
10
star
12

ledgerjs-cardano-shelley

update of Ledger Nano javascript code to Cardano Shelley
TypeScript
9
star
13

vlux

Very simple flux
JavaScript
4
star
14

cardano-hw-interop-lib

Library to make CBOR encoded Cardano transactions comply with CIP-0021
TypeScript
4
star
15

obedbot

JavaScript
4
star
16

audits

Vacuumlabs Auditing - Reports
3
star
17

cryptofund-utilities

Python
3
star
18

ledger-cardano-app

Ledger NanoS implementation of Cardano cryptowallet
C
3
star
19

invoicer

Invoice generator for VacuumLabs
JavaScript
3
star
20

contract-generator

Automatic contract generation based on templates.
CSS
3
star
21

guild-mobile-dev

A guild for all developers who create mobile apps - Android, iOS, React Native, Flutter …
Dart
2
star
22

laneplot

LanePlot - gantt chart component for jQuery
JavaScript
2
star
23

babel-plugin-superstrict

JavaScript
2
star
24

vacuumlabs-threading

JavaScript
2
star
25

report-bot

Scrape reports from slack and provide them in a meaningful format.
JavaScript
2
star
26

immutable-utils

Useful extension to immutable.js
JavaScript
2
star
27

tribal-components-ui

TypeScript
1
star
28

amazon_s3

Dart
1
star
29

spring-example

Example project with Spring Boot, Kotlin, Postgres, JPA, Kafka, Avro
Kotlin
1
star
30

js-jail

JavaScript
1
star
31

ledgerjs-cardano

JavaScript
1
star
32

wolf-society

Website for Wolf Society Foundation
TypeScript
1
star
33

eslint-config-vacuumlabs

ESLint shareable config for the Vacuumlabs JavaScript style guide
JavaScript
1
star
34

internalapps-cicd

Repository to store global build and deploy Github Actions configs
1
star
35

officebot

JavaScript
1
star
36

eshop-api

unified api to common eshops
JavaScript
1
star