Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/aunyks/kelso-js
Cryptographic signatures made easy, with some polymorphism. More coming soon.
https://github.com/aunyks/kelso-js
Last synced: about 1 month ago
JSON representation
Cryptographic signatures made easy, with some polymorphism. More coming soon.
- Host: GitHub
- URL: https://github.com/aunyks/kelso-js
- Owner: aunyks
- License: gpl-3.0
- Created: 2021-10-02T17:20:19.000Z (over 3 years ago)
- Default Branch: master
- Last Pushed: 2021-10-02T17:27:53.000Z (over 3 years ago)
- Last Synced: 2024-10-31T17:36:48.460Z (2 months ago)
- Language: JavaScript
- Size: 44.9 KB
- Stars: 1
- Watchers: 2
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# Kelso.js
Cryptographic signatures made easy, with some polymorphism. More coming soon.
## Installation
```
npm install --save kelso
```## Usage
```javascript
const { EthereumEntity } = require('kelso')// Alice can sign *and* verify
const alice = new EthereumEntity('', 'mnemonic')
// Bob can only verify (unless he loads a private key later)
const bob = new EthereumEntity()// Have Alice sign a message
const signatureString = await alice.signMessageString('hi')
// Have Bob verify it
const [isValidSignature, recoveredAddress] = await bob.verifySignatureString(
'hi',
signatureString
)// Bob makes sure that alice actually signed it
if (isValidSignature && recoveredAddress === alice.getAddress()) {
console.log('Alice signed a message for Bob!')
}
```**Be mindful of the license.**
### LICENSE
Kelso.js
Copyright (C) 2021 Gerald NashThis program is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, either version 3 of the License, or (at your option) any later version.
This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details.
You should have received a copy of the GNU General Public License along with this program. If not, see .