Code Monkey home page Code Monkey logo

narwallets-extension's Introduction

Narwallet Chrome Extension

Installation

Install Narwallets v4 from the Chrome Web Store

Objectives

  • Be the deafult chrome-extension wallet for NEAR DApps
  • What Metamask does for ethereum, we intend to do for NEAR

Comparision with NEAR Official Web Wallet

  • Narwallets-extension aims to be a simpler and complemetary tool to the official NEAR Web wallet
  • Narwallets is designed for a desktop/laptop experience with a chromium based browser, NEAR Web wallet works on any browser and mobile
  • Narwallets is available only in english, NEAR Web wallet supports multiple languages
  • Narwallets is not yet integrated with Ledger or other HW Wallets
  • Narwallets has only one option regading account recovery: Write-down the seed phrase. NEAR Web Wallet has other user-friendly recovery options (email & phone recovery).
  • Narwallets, aiming at simplicity, has no 2FA support yet.

The good:

  • It's an extension-wallet: You'll be able to interact with DApps without leaving the DApp web site
  • Provides a similar experience as Metamask/other extension-wallets, easing the onboard of ethereum users into the NEAR ecosystem.
  • Each wallet can have multiple accounts. You can see the sum of all your accounts in the wallet
  • You can have multiple wallets by providing different user/passwords.
  • Accounts are first added to in safe-by-default read-only mode (no keys)
  • All private data is stored encrypted on chrome local storage
  • Create free implict accounts (no near required)
  • Lockup contract accounts are auto-discovered and treated as another account in the group
  • Advanced mode allows you to take full control of your lockup contract account
  • Integration with DApps. New model: wallet initiated connection to active tab, resulting in chain & wallet agnostic DApps. See Wallet integration API Documentation here

multiple accounts and total

Road Map

Future versions

  • Ledger integration
  • 2FA Support
  • Manage Create named account (currently redirecting to NEAR Web Wallet)

Dev Tooling (v0.1)

  • This project uses typescript
  • Being a chrome extension, no bundler/minimizer is needed
  • No frameworks are used neither, this is plain typescript and a main index.html

Dev Flow (v0.1)

  • Chrome Dev Tools: Map folder to Narwallets-extension/extension
  • Use Chrome Dev Tools as an quick-and-dirty IDE with Edit & Continue
  • Use VSCode as the main IDE - Ctrl-Shift-B to build with typescript

Low-level Technical debt

  • Remove plus-typescript, convert all to typescript
  • npm i eslint --save-dev
  • When wallet-API was added a lot of functions became async. Add npm install eslint-plugin-no-floating-promise --save-dev

We're using base crypto libs as a bundle (The ideal solution would be to have typescript versions of each lib and compile to ES2020 modules)

  • Replace bundle with typescript versions of basic crypto tools

We need to reduce the bundle's size. Bundle is at https://github.com/Narwallets/bundled-crypto-libs.git

Bundle includes:

  • globalThis.Buffer = SafeBuffer.Buffer
  • globalThis.BN = BN
  • globalThis.bip39 = bip39
  • globalThis.pbkdf2 = pbkdf2
  • globalThis.createHmacPackage = {createHmac:createHmac}

Beta Test Installation (Latest Unstable Version)

Clone this repository and run as unpacked extension:

  • git clone https://github.com/Narwallets/narwallets-extension.git
  • cd narwallets-extension
  • install packages: npm install
  • compile: npm run build
  • open chrome
  • enable Extensions Developer Mode
  • load unpacked extension from [your-repos-dir]/narwallets-extension/extension

When new versions of the code are pushed

  • cd narwallets-extension
  • get changes: git pull
  • install packages: npm install (in case there were changes)
  • compile: npm run build
  • open extension
  • right-mouse-button-click con the extension popup, "Inspect" -> will open chrome-developer-tools
  • press Ctrl-R on the developer-tools, that will make sure you're using the last compilation

narwallets-extension's People

Contributors

calcifer1001 avatar defe3a avatar fercargo avatar laladraws avatar luciotato avatar the-preem-palver 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

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar

narwallets-extension's Issues

Decimal value with point when send near token to other near wallet

[Steps to reproduce]

  1. Open wallet
  2. Click "Send button"
  3. type received wallet in "Send to Account Id"
  4. Fill "Amount in NEAR" with value have point. Example "51.8"
  5. Click "OK"

[Expected result]
Send amount Near to Account ID (received wallet)

[Actual result]
Can't send Near, and show raise a error "The number ... cannot convert to BigInt because it is not a interger"

[Improvement] - Password creation

image

On this page, add a view button near the password to allow to check the password clearly.

Change "passwords don't match" by "Passwords don't match"

[Bug/Improvement] - Account Import

I'm importing Narwallet account ...
image
...
Oups, this is not my account ... So i Cancel...
image
Oh !! He is here !!

--->
Cancel don't work

How to remove this account ?

[BUG] - Welcome View

Step to reproduce :
Delete current narwallet extension
Add latest extension
image
In this view, disable the Menu at the top right. Because if you click on it you are stucked. You have to leave extension and launch extension again.
Then the Create password view appear

Sending NEP-141 Tokens/assets, when there's <0.000001 left, chose the entire balance as string (yoctos)

andreapn1709.near โ€” Today at 12:56 AM
[12:57 AM]
that's my account, when I send by near web wallet, I can send all my coin,
but when use narwallet, it always keeps 0.00001 when choose max

LMT-luciotato โ€” Today at 2:45 AM
I'll add an Issue to github. I think I know what it is. Looks like a rounding problem

SOLUTION TO EXPLORE:

  1. Include up-to 6 decimal places when entering amounts.
  2. When the input amount is for example 4.123456 and the token account has 4.123456111 as balance, transfer the entire amount. The general rule is that if there will be less than 0.0000001 (1e-6) left, set to transfer the amount in yoctos (full decimals).

compile error on Ubuntu

There's complile error on Ubuntu, which is because the first letter of "Contact.js" is uppercase, for passing compling, need to change "Contact.js" to "contact.js" for each import statement.

import { GContact } from "../data/Contact.js";

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.