Skip to content

Commit ca27c44

Browse files
feat: update to hyperbit
1 parent 6ba23f7 commit ca27c44

File tree

5 files changed

+20
-14
lines changed

5 files changed

+20
-14
lines changed

LICENSE

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
MIT License
22

3-
Copyright (c) 2022 Hypereon
3+
Copyright (c) 2022 Hyperbit
44

55
Permission is hereby granted, free of charge, to any person obtaining a copy
66
of this software and associated documentation files (the "Software"), to deal

README.md

Lines changed: 9 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -1,21 +1,21 @@
1-
![Hypereon Message Banner](https://github.com/hypereon-dev/message/raw/master/media/repo-banner.png)
1+
![Hyperbit Message Banner](https://github.com/hyperbit-dev/message/raw/master/media/repo-banner.png)
22

3-
# Hypereon - Message
3+
# Hyperbit - Message
44

55
JavaScript functions for signing and verifying messages.
66

77
## Installation
88

99
```bash
10-
npm install @hypereon/message
10+
npm install @hyperbitjs/message
1111
```
1212

1313
## Usage
1414

1515
### Sign a message
1616

1717
```javascript
18-
import { sign } from '@hypereon/message';
18+
import { sign } from '@hyperbitjs/message';
1919

2020
const privateKey = 'L4rK1yDtCWekvXuE6oXD9jCYfFNV2cWRpVuPLBcCU2z8TrisoyY1';
2121
const message = 'This is an example of a signed message.';
@@ -27,7 +27,7 @@ const signature = sign({ message, privateKey });
2727
### Verify a message
2828

2929
```javascript
30-
import { verify } from '@hypereon/message';
30+
import { verify } from '@hyperbitjs/message';
3131

3232
const address = '<public_address_of_private_key_wif>';
3333
const message = 'This is an example of a signed message.';
@@ -36,11 +36,11 @@ const signature = '<generated_signature_from_sign>';
3636
const isValid = verify({ address, message, signature });
3737
```
3838

39-
Message signing defaults to Bitcoin '\u0018Bitcoin Signed Message:\n'. See [@hypereon/chains](https://github.com/hypereon-dev/chains) for message prefix options provided by different blockchains.
39+
Message signing defaults to Bitcoin '\u0018Bitcoin Signed Message:\n'. See [@hyperbitjs/chains](https://github.com/hyperbit-dev/chains) for message prefix options provided by different blockchains.
4040

4141
```javascript
42-
import { sign, verify } from '@hypereon/message';
43-
import { ltc } from '@hypereon/chains';
42+
import { sign, verify } from '@hyperbitjs/message';
43+
import { btc } from '@hyperbitjs/chains';
4444

4545
const { messagePrefix } = ltc.main;
4646

@@ -60,7 +60,7 @@ const isVerified = verify({
6060

6161
## Contributing
6262

63-
If you're interested in contributing, please read the [contributing docs](https://github.com/hypereon-dev/message/blob/master/CONTRIBUTING.md) before submitting a pull request.
63+
If you're interested in contributing, please read the [contributing docs](https://github.com/hyperbit-dev/message/blob/master/CONTRIBUTING.md) before submitting a pull request.
6464

6565
## Authors
6666

media/repo-banner.png

-1.54 KB
Loading

package.json

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
{
2-
"version": "0.0.1",
2+
"version": "0.1.0",
33
"license": "MIT",
44
"main": "dist/index.js",
55
"typings": "dist/index.d.ts",
@@ -31,12 +31,12 @@
3131
"singleQuote": true,
3232
"trailingComma": "es5"
3333
},
34-
"name": "@hypereon/message",
34+
"name": "@hyperbitjs/message",
3535
"repository": {
3636
"type": "git",
37-
"url": "https://github.com/hypereon-dev/message.git"
37+
"url": "https://github.com/hyperbit-dev/message.git"
3838
},
39-
"author": "Hypereon",
39+
"author": "Hyperbit",
4040
"module": "dist/message.esm.js",
4141
"size-limit": [
4242
{

src/index.ts

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,12 @@ import bitcoinMessage from 'bitcoinjs-message';
22
import CoinKey from 'coinkey';
33
import { Sign, Verify } from './types';
44

5+
/**
6+
* TODO:
7+
* Fix version usage. See chains versions.public/private and https://github.com/cryptocoinjs/coinkey/blob/master/lib/coinkey.js#L9
8+
* Update to pull in network of blockchain
9+
*/
10+
511
/**
612
* Sign for proof of ownership of wallet address.
713
* @param param

0 commit comments

Comments
 (0)