BitShares Forum

Main => General Discussion => Topic started by: BTSdac on January 25, 2015, 02:47:10 pm

Title: what is useful of Bitshares-js?
Post by: BTSdac on January 25, 2015, 02:47:10 pm
I notice there is project named  Bitshares-js in github.  maybe the useful would been clear for people with code experience,   but i think some people in there like me don`t know ,what is it for.
anyone can say it ,thank you
Title: Re: what is useful of Bitshares-js?
Post by: jamesc on January 25, 2015, 04:10:39 pm
It is a smaller JavaScript version of Bitshares.  This makes it possible to run Bitshares secure functions (like the wallet) in the browser and it helps so the server does not have to store any user's private keys.
Title: Re: what is useful of Bitshares-js?
Post by: fluxer555 on January 25, 2015, 04:34:41 pm
Does this run as a full node in the browser?
Title: Re: what is useful of Bitshares-js?
Post by: jamesc on January 26, 2015, 01:47:07 am
Does this run as a full node in the browser?
No, not a full node.  It will talk to full nodes.  We already have the Qt wallet that runs on the full node.

Client side wallets talking to a set of full nodes will scale very well.  This can spread out too.  China, for example, could host local full nodes that are easy to reach on the network.  We will find the same blockchain.
Title: Re: what is useful of Bitshares-js?
Post by: theoretical on January 27, 2015, 09:38:20 pm

run Bitshares secure functions (like the wallet) in the browser

Aren't "secure...wallet" and "in the browser" mutually exclusive?

Even though the server doesn't store the user's private keys, in practice the user is effectively trusting the server with their private keys.  For the good and simple reason that, if your browser downloads and runs JS that has access to both your private keys and a network connection to the server that you downloaded it from, what's stopping that server from including evil code in the JS to steal your private keys?

With the existing wallet, you can compile it yourself and (in theory) every last line of  code is public and auditable.  We (or at least I) eventually want to have reproducible builds, so anyone would be able to verify the hash of a binary distribution built with specific toolchain and library versions.

I don't see how the JS version is auditable in that way unless you self-host the JS -- but I assume that the whole point of this exercise is to create a wallet that doesn't require users to install any software.
Title: Re: what is useful of Bitshares-js?
Post by: bytemaster on January 27, 2015, 09:43:26 pm

run Bitshares secure functions (like the wallet) in the browser

Aren't "secure...wallet" and "in the browser" mutually exclusive?

Even though the server doesn't store the user's private keys, in practice the user is effectively trusting the server with their private keys.  For the good and simple reason that, if your browser downloads and runs JS that has access to both your private keys and a network connection to the server that you downloaded it from, what's stopping that server from including evil code in the JS to steal your private keys?

With the existing wallet, you can compile it yourself and (in theory) every last line of  code is public and auditable.  We (or at least I) eventually want to have reproducible builds, so anyone would be able to verify the hash of a binary distribution built with specific toolchain and library versions.

I don't see how the JS version is auditable in that way unless you self-host the JS -- but I assume that the whole point of this exercise is to create a wallet that doesn't require users to install any software.

Chrome Extensions are much easier to install and more integrated.   In most cases you can trust the wallet provider and keeping your private keys safe is part of their business model. 
Title: Re: what is useful of Bitshares-js?
Post by: jamesc on January 28, 2015, 11:25:45 pm
An extension provides a third party version of the code that, as far as I know, we can not modify.  Chrome made it easy to deploy any working website into their browser from the store.  I will be research this.
Title: Re: what is useful of Bitshares-js?
Post by: BTSdac on January 30, 2015, 03:05:10 am
when does it release?
Title: Re: what is useful of Bitshares-js?
Post by: lzr1900 on January 30, 2015, 03:06:39 am
when does it release?
+5% +5% +5% +5%
Title: Re: what is useful of Bitshares-js?
Post by: theoretical on February 04, 2015, 03:15:41 pm
Yeah, I think using BitSharesJS for a browser extension is much more reasonable than using it for a website.

The problem is that if you're asking people to download and install a browser extension, you might as well ask them to download and install a native application.  A browser extension doesn't have the "it just works"-ness of a website.
Title: Re: what is useful of Bitshares-js?
Post by: joele on February 04, 2015, 03:27:58 pm
Should be both Web and browser extension wallet, just like blockchain.info and KryptoKit
Title: Re: what is useful of Bitshares-js?
Post by: EkremH on February 13, 2015, 02:41:28 pm
It looks for me as as useful resource. I surf over the source code, but I wanna ask if this is the full implementation of bitshares client or any part of it? And how can I execute this (like bitshares rpc client for example), because in there is not to much info in github page? What I wanna do is to build an transaction and broadcast it.

Thanks in advance!
Title: Re: what is useful of Bitshares-js?
Post by: xeroc on February 13, 2015, 04:08:35 pm
It looks for me as as useful resource. I surf over the source code, but I wanna ask if this is the full implementation of bitshares client or any part of it? And how can I execute this (like bitshares rpc client for example), because in there is not to much info in github page? What I wanna do is to build an transaction and broadcast it.

Thanks in advance!
It can construct and sign transactions .. its not a full node and does not verify the blockchain .. think of it as a lightweight client such as mycelium for btc