https://github.com/leapwallet/wallet-sdk-test
https://github.com/leapwallet/wallet-sdk-test
Last synced: 3 months ago
JSON representation
- Host: GitHub
- URL: https://github.com/leapwallet/wallet-sdk-test
- Owner: leapwallet
- Created: 2023-02-02T09:08:52.000Z (over 2 years ago)
- Default Branch: main
- Last Pushed: 2023-02-02T09:15:37.000Z (over 2 years ago)
- Last Synced: 2024-12-27T17:30:31.515Z (5 months ago)
- Language: JavaScript
- Size: 50.8 KB
- Stars: 1
- Watchers: 3
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# wallet-sdk-test
## Example usage
Add the wallet sdk script in your html file
```html```
```js
// generate a 12 word mnemonic seed
const mnemonic = window.getMnemonic()
// generate the signing key from mnemonic
const signingKey = window.getHDKey(mnemonic)const message = "Hello world!"
const hash = window.messageHash("message")
// sign a message using the signing key
const signature = window.sign(signingKey, hash)```