eth-lightwallet | Lightweight JS Wallet for Node and the browser | Blockchain library
kandi X-RAY | eth-lightwallet Summary
kandi X-RAY | eth-lightwallet Summary
LightWallet is a HD wallet that can store your private keys encrypted in the browser to allow you to run Ethereum dapps even if you're not running a local Ethereum node. It uses BIP32 and BIP39 to generate an HD tree of addresses from a randomly generated 12-word seed. LightWallet is primarily intended to be a signing provider for the Hooked Web3 provider through the keystore module. This allows you to have full control over your private keys while still connecting to a remote node to relay signed transactions. Moreover, the txutils functions can be used to construct transactions when offline, for use in e.g. air-gapped coldwallet implementations. The default BIP32 HD derivation path has been m/0'/0'/0'/i, but any HD path can be chosen.
Support
Quality
Security
License
Reuse
Top functions reviewed by kandi - BETA
- Creates a new BigNumber .
- Scrypt .
- Calculates the t3 matrix
- Compute SHA - 1 hash .
- Private function used by JSDoc
- Creates a base binary alphabet .
- Creates a new BigNumber .
- Math . Round down
- The HABH function .
- Shorthand for a combination .
eth-lightwallet Key Features
eth-lightwallet Examples and Code Snippets
Community Discussions
Trending Discussions on eth-lightwallet
QUESTION
I'm trying to use node modules in my react-native app, and I'm taking the ReactNativify approach here.
I'm all set up now, and I got the crypto package to load in fine. However when I added in eth-lightwallet things have been getting weird.
Every since I added that package in, npm hasn't been installing dependancies of anything. Meaning I've had to add them in manually. And everytime I install a dependency somehow related to eth-lightwallet, that module is uninstalled. Although tedious and annoying, I'm hoping it can shed light onto my current problem.
Right now I'm running into a Can't find variable: Buffer
which is being thrown in a util folder in the standard library. I've taken a look at the code and it's accessing Buffer from a global namespace. Thing is, I'm importing Buffer into the global namespace. Here's a look at my global.js
ANSWER
Answered 2018-Mar-31 at 19:57Coming back to this to leave a solution in case anyone is stuck on this. The solution was to essentially try to shim in different packages in different times to change the load order.
We tried going back to a different version when TYPED_ARRAY_SUPPORT was being treated differently and Buffer was more dependent on it. While on the older version we tried a lot of different things and eventually gave up and backtracked by updating buffer to the most recent version and finally everything worked.
What I mean to say is we're not sure how we fixed it, but it was by randomly changing the load order until we got lucky. Not a good answer, I'm aware, but the best I can provide for this issue.
Here's what our global.js looked like at the end
QUESTION
I was using Expo
and I separated expo eject
for module use.
And I tried pod install
in iOS file. it was work.
Pod installation complete! There are 51 dependencies from the Pod file and 63 total pods installed.
But An error occurred when the Xcode
was opened and the build and run
button was pressed.
package.json:
...ANSWER
Answered 2019-May-08 at 09:04I made a podsec
myself and solved it.
This is not in the official document and requires a fundamental solution from the module developer.
This solution creates a lot of Warning
. There's nothing wrong with the code.
- Remove
react-native-secure-randombytes
path from Header Search Path - Unlink
react-native-secure-randombytes
module - react-native unlink react-native-secure-randombytes - Added react-native-secure-randombytes.podspec from this link
Added next code into pod file:
pod 'react-native-secure-randombytes', :path => '../node_modules/react-native-secure-randombytes'
- do `pod install'
QUESTION
I am trying to make my application more performant with React.lazy. As the Ethereum lightwallet is a huge file, I would like to put it into a separate bundle. The currently working import is the following:
...ANSWER
Answered 2018-Nov-28 at 18:50I suggest following the example here:
https://reacttraining.com/react-router/web/guides/code-splitting
react-loadable
is an npm package that makes code-splitting (a.k.a lazy loading) quite easy and also provides you the ability to render a loading component until the lazy load has finished.
The only gotcha is that if you're using Babel
to transpile your code bundles, you'll have to add support for the Dynamic Import syntax, webpack
already has this by default, but Babel
doesn't.
The Babel Plugin:
@babel/plugin-syntax-dynamic-import
will make this possible by adding support for the syntax.
I recommend react-loadable
over React.lazy
as it makes displaying a loading component while the lazy-load happens VERY easy, and provides you hooks to display an error component and retry the import in the case that it fails.
Read more about react-loadable
here:
https://github.com/jamiebuilds/react-loadable
Your code would look something like this:
QUESTION
First, I created a project: react-native init project
, and
when I try to import * as lightwallet from 'eth-lightwallet'
in my react-native project, I get an error see this image
Found a solution at github, but this did not solve the problem for me.
My package.json:
...ANSWER
Answered 2018-Aug-06 at 18:23The problem is that the eth-lightwallet
depends on node core modules that isn't supported by React Native out of the box. The current workaround involves using
rn-nodeify in order to provide shims for React Native to use instead. See this issue for react native and see this open issue from eth-lightwallet.
QUESTION
I am interested in how eth-lightwallet stores user passwords to generate keys if they are for example pre deterministic where you don't need to store them somewhere or if they are encrypted and stored in some kind of location
...ANSWER
Answered 2017-Dec-06 at 18:26When you create an eth-lightwallet
you have an instance that you can use. the library doesn't handle longterm storage of wallets. you have to use a storage library storj.js or serialize the wallet and make users download it as a JSON-file and upload it later.
Community Discussions, Code Snippets contain sources that include Stack Exchange Network
Vulnerabilities
No vulnerabilities reported
Install eth-lightwallet
password: (mandatory) A string used to encrypt the vault when serialized.
seedPhrase: (mandatory) A twelve-word mnemonic used to generate all accounts.
salt: (optional) The user may supply the salt used to encrypt & decrypt the vault, otherwise a random salt will be generated.
hdPathString (mandatory): The user must provide a BIP39 compliant HD Path String. Previously the default has been m/0'/0'/0', another popular one is the BIP44 path string m/44'/60'/0'/0.
keystore: An instance of the keystore with which to sign the TX with.
pwDerivedKey: the users password derived key (Uint8Array)
rawTx: Hex-string defining an RLP-encoded raw transaction.
signingAddress: hex-string defining the address to send the transaction from.
hdPathString: (Optional) A path at which to create the encryption keys.
keystore: An instance of the keystore with which to sign the TX with.
pwDerivedKey: the users password derived key (Uint8Array)
rawMsg: Message to be signed
signingAddress: hex-string defining the address corresponding to the signing private key.
hdPathString: (Optional) A path at which to create the encryption keys.
keystore: An instance of the keystore with which to sign the TX with.
pwDerivedKey: the users password derived key (Uint8Array)
msgHash: SHA3 hash to be signed
signingAddress: hex-string defining the address corresponding to the signing private key.
hdPathString: (Optional) A path at which to create the encryption keys.
signature: Signature object as returned from signMsg or ``signMsgHash`.
fromAddress: Address to send the transaction from
txObject.gasLimit: Gas limit
txObject.gasPrice: Gas price
txObject.value: Endowment (optional)
txObject.nonce: Nonce of fromAddress
txObject.data: Compiled code of the contract
obj.tx: RLP encoded transaction (hex string)
obj.addr: Address of the created contract
abi: Json-formatted ABI as returned from the solc compiler
functionName: string with the function name
args: Array with the arguments to the function
txObject.to: Address of the contract
txObject.gasLimit: Gas limit
txObject.gasPrice: Gas price
txObject.value: Value to send
txObject.nonce: Nonce of sending address
txObject.to: Address to send to
txObject.gasLimit: Gas limit
txObject.gasPrice: Gas price
txObject.value: Value to send
txObject.nonce: Nonce of sending address
Support
Reuse Trending Solutions
Find, review, and download reusable Libraries, Code Snippets, Cloud APIs from over 650 million Knowledge Items
Find more librariesStay Updated
Subscribe to our newsletter for trending solutions and developer bootcamps
Share this Page