Comments (4)
It seems in my case the key was already Hex-encoded 32-byte, and simply ommitted the "0x" characters at the beginning. In that case, it could be helpful to the user to automatically prepend the "0x" under the condition that it's 64 characters long and only uses characters 0-9 a-f. But this could be dangerous if there is a possibility that a key is not hex-encoded and just so happens to be in the right format to look like it is. I don't know much about etherium private keys, so I don't know if this "dangerous" scenario would happen or not.
from send-tokens.
So this leads to the question of whether we need to worry about non-32-byte keys. Do etherium private keys that are, for example, 64 bytes instead of 32 bytes exist?
from send-tokens.
Yeah, it's usually not a good idea to be too permissive in crypto as you really want the user to be very conscious of what they're doing.
If I may make a suggestion, and if you haven't done so already, you might consider displaying an "ethereum blockie" image for address fields as a visual check.
Private keys are always 32 bytes. Anything more or less shouldn't work.
from send-tokens.
Okay, that makes sense. Yes, I'll try to add in blockies. I'll try out
https://github.com/ethereum/blockies
unless you have one to recommend
from send-tokens.
Related Issues (12)
- How to use send-tokens from another nodejs script HOT 6
- branch wrap HOT 1
- branch key HOT 1
- TypeError: inst._eth.resolveAddress is not a function HOT 1
- Resolved HOT 2
- Gas not working
- Sending NFT Using MerkleJerk HOT 1
- can we change default unit to 1 token? HOT 11
- Cannot read property 'toLowerCase' of undefined HOT 4
- question about repeat transactions HOT 2
- branch priv HOT 1
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
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.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from send-tokens.