localStorage-based simple multicurrency key storage. This part of swap.io is responsible for storage of keys and signing messages. This includes blockchain-aware generation and signing algorithms but all the cryptography inside this repo is offline. To interact with the actual blockchain you need connections to networks.
The keys layer is isolated from the rest of repository for additional security.
Main repo interacts with this via cross-frame window.postMessage() routines
The routines are wrapped in the following methods:
Creates a new profile - basically a pair of ECDSA keys. This profile is saved encrypted in local storage on the domain (keys.swap.io) and can further be referenced to sign txs.
This method pops an iframe on your website with dialog to create a new profile.
Creates one or more blockchain addresses.
Signs a transaction for an address.
Signs a message by an address.
Returns public key for a specific address.
- Pops up a dialog on your website with private key for specific address.
- Create profile (bip39 - based).
- Create wallet (bip 32 - pair of derived subkeys).
- Sign transaction
- Sign message
- Get list of wallets
Pops up a dialog on your website with private key for specific address.
Pops up a dialog to backup a profile.
npm run install
npm run serve
npm run build
npm run test:unit
npm run test:e2e
npm run lint