Code Monkey home page Code Monkey logo

bob-extension's Introduction

Bob Extension

Handshake wallet in the browser

Chrome Web Store

home

Note about wallet rescan

Bob extension uses the address indexer to make wallet rescan faster and more performant on our hosted infrastructure. However, this will expose all addresses related to your wallet to our backend. We do not keep any logs containing your addresses. If privacy is a concern, you may point RPC to a different hsd node (including Bob Desktop!) in settings prior to importing your wallet.

Development

Requirement

  • Node v12+

Install

npm install 

Run in dev mode

NODE_ENV=development npm run dev

Run in simnet

NETWORK_TYPE=simnet npm run dev

Build

NODE_ENV=production npm run build

Injected Bob3

Bob Extension injects a Bob3 object to each page, which enables apps to interact with the wallet.

Connect to Bob extension and get wallet info

// If Bob is locked, this will open the popup and prompt user to login
const wallet = await bob3.connect();
const receiveAddress = await wallet.getAddress();
const balance = await wallet.getBalance();

Send Open

Once a name is available, a sendopen transaction starts the opening phase.

// Bob3 uses the same
const wallet = await bob3.connect();
const tx = await wallet.sendBid('silverhand');

Send Bid

Place a bid

Params:

Name Default Description
name Required name to bid on
amount Required amount to bid (in HNS)
lockup Required amount to lock up to blind your bid (must be greater than bid amount)
// Bob3 uses the same
const wallet = await bob3.connect();
const tx = await wallet.sendBid('silverhand', 100, 150);

Send Reveal

Reveal a bid

Params:

Name Default Description
name Required name to reveal bid for
// Bob3 uses the same
const wallet = await bob3.connect();
const tx = await wallet.sendReveal('silverhand');

Send Redeem

Redeem a losing bid after REVEAL period is over.

Params:

Name Default Description
name Required name to redeem bid for
// Bob3 uses the same
const wallet = await bob3.connect();
const tx = await wallet.sendRedeem('silverhand');

Send Update

Update root zone record. First update is called a register, which will return the difference between winning bid and second highest bid.

Params:

Name Default Description
name Required name to update data for
data Required JSON-encoded resource
// Bob3 uses the same
const wallet = await bob3.connect();
const tx = await wallet.sendUpdate('silverhand', [ 
  {
    type: "NS", 
    ns: "ns1.example.com.",
  },
]);

bob-extension's People

Contributors

anunayj avatar caseykennedy avatar chikeichan avatar falci avatar kurumiimari avatar realrasengan avatar rithvikvibhu 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

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar

bob-extension's Issues

Error not thrown if amount exceeds amount in wallet.

When trying to send via await wallet.send(address, 123456789); an error isn't thrown if the user doesn't have that much.

This results in no indication that a transaction went through or not on the website end, and no popup on the user end.

Encoding issues

I just installed Bob Extension from Chrome Extension Store.
image

the “Terms�
“Kyokan,� “we� and “us�

Version: 0.3.0
Browser: Brave - Version 1.26.67 Chromium: 91.0.4472.114 (Official Build) (x86_64)

Firefox Extension

Would be nice!

There used to be a plugin that allowed Chrome extensions in Firefox but it seems it's been removed by Mozilla.

Error while build: Can't resolve 'bdb/lib/DB'

while build using command: NODE_ENV=production npm run build

i got error:

ERROR in ./src/background/services/setting.ts
Module not found: Error: Can't resolve 'bdb/lib/DB' in '/home/suhail/github/handshake/bob-extension/src/background/services'
 @ ./src/background/services/setting.ts 5:11-32
 @ ./src/background/backgroundPage.ts

Option to disable hijacking of system proxy within the extension

Proxy Hijacking on part of the bob chrome extension has been a known issue for a while and has not be officially fixed yet.

Most users use their own method for resolving Handshake names and do not want to rely on the built in functionality of the extension.

The extension hijacks the system proxy even when using LetsDane or Fingertip.

The community proposes that an option to disable the proxy hijacking, be added to the core code to support a more fluid experience for every person who decides to use the Bob Wallet Extension.

option to turn extension on or off

the extension tends to clash with fingertip [which has a usage across apps, not installed in a browser], requiring the extension to be activated at times of need but disabled to leave fingertip functioning the rest of the time
it would e desirable to have a switch to enable the extension as needed but not need to go into 'manage extensions' to achieve it

Rename `bob-extension` to `kabob`

Not only is kabob an adorably cute name, but it subconsciously functions as a reminder that the extension is not the full version of Bob.

Also, this would help developers handle bug reports easier.

Inspiration

SS 2022-06-22 at 2 18 56 PM

SS 2022-06-22 at 2 20 13 PM

Bob extension takes up 10 GB+ of storage

I've found that Bob extension (running on Brave) takes up more than 10 GB of storage space.
This storage is abnormally large as Bob Windows app running SPV uses much less (I also have about 2x the wallets on the desktop version).

The storage is in either
C:\Users\<username>\AppData\Local\BraveSoftware\Brave-Browser\User Data\Default\IndexedDB\chrome-extension_ogcmjchbmdichlfelhmceldndgmgpcem_0.indexeddb.blob\
C:\Users\<username>\AppData\Local\<chrome version>\User Data\Default\IndexedDB\chrome-extension_ogcmjchbmdichlfelhmceldndgmgpcem_0.indexeddb.blob\

As shown on SpaceSniffer
image

Low contrast field

The current theme/colours make it a bit hard to see the inputs: they don't have border and the background has too low contrast.

If I take a screenshot, you will see it based on your monitor/screen properties, which may be result in a different result.
So, let's try with a photo instead:

image

Ignore the "waves" and not the almost missing input.

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.