Skip to content

Commit 54a408e

Browse files
committed
Doc improvements
1 parent da958db commit 54a408e

File tree

3 files changed

+15
-15
lines changed

3 files changed

+15
-15
lines changed

README.md

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -3,9 +3,9 @@
33
![Travis](https://img.shields.io/travis/cleargraphinc/solidity-sigutils.svg)
44
![npm](https://img.shields.io/npm/v/solidity-sigutils.svg)
55

6-
A solidity library for (multi)signatures.
6+
A solidity library for verifying message multi-signatures.
77

8-
These utilities make it simple to interact with Ethereum signed messages based on [EIP 191](https://github.com/ethereum/EIPs/issues/191). Useful for multi-sig self-sovereign identity contracts implementing [ERC 1077](https://github.com/ethereum/EIPs/pull/1077). They are a building block for Cleargraph's open and decentralized identity system, and can be used for many other purposes in decentralized applications.
8+
These utilities make it simple to interact with Ethereum signed messages based on [EIP 191](https://github.com/ethereum/EIPs/issues/191). They are especially useful for multi-sig self-sovereign identity contracts based on [ERC 1077](https://github.com/ethereum/EIPs/pull/1077). They are a building block for Cleargraph's open and decentralized identity system, and can be used for many other purposes in decentralized applications.
99

1010
You can sign a transaction/message using your private key by calling [web3.personal.sign()](https://web3js.readthedocs.io/en/1.0/web3-eth-personal.html) using MetaMask, Toshi, or another compatible web3 runtime. All signatures are 65 bytes long with the format `{bytes32 r}{bytes32 s}{uint8 v}`. Multiple signatures are stored densely (no padding) by concatenating them.
1111

@@ -33,29 +33,29 @@ contract MyContract {
3333
// Generate the message hash according to EIP 191
3434
bytes32 hash = SignatureUtils.toEthPersonalSignedMessageHash(_personalMessage);
3535
36-
// Returns a list of signatures extracted from _signatures
36+
// Returns the array of addresses which signed hash using their private key
3737
return SignatureUtils.recoverAddresses(hash, _signatures);
3838
// or use SignatureUtils.recoverAddress(hash, _signatures, 0) for only one signature
3939
}
4040
4141
}
4242
```
4343

44-
## Working with Signed Messages
44+
## Working with Ethereum Signed Messages
4545

46-
Signed messages are becoming an increasingly important part of decentralized applications, especially for identity management. Imagine a user wishes to perform a transaction on the Ethereum chain, but does not posses Ethereum and therefore cannot pay for gas costs. One emerging solution is to use signed messages, a proxy contract, and a gas relay. Here's how it goes:
46+
Signed messages are becoming an increasingly important part of decentralized applications, especially for identity management. Imagine a user wishes to perform a transaction on the Ethereum chain, but does not posses ether and therefore cannot pay for gas costs. One emerging solution is to use signed messages, a proxy contract, and a gas relay service. Here's how it goes:
4747

4848
1. A user wishes to perform a transaction and signs a message with the transaction details using their private key.
4949
2. The user sends the transaction details and signature to a relay service off-chain.
5050
3. The relay verifies the message and executes it on the proxy contract, paying for gas costs.
5151
4. The proxy contract verifies the transaction details and signature, reverting if invalid.
5252
5. The proxy contract performs the transaction.
5353

54-
Because of signed messages based on the security of Ethereum's `ecrecover(...)`, a user does not need to trust a gas relay with their private key to perform actions on their behalf. Many relay implementations require that a signature be signed with a private key on an address whitelist. Additionally, self-sovereign identity contracts may require multiple signatures for the same message to be valid.
54+
Because signed messages inherit the security of Ethereum's `ecrecover()`, a user does not need to trust a gas relay with their private key to perform actions on their behalf. Many relay implementations require that a signature be signed with a private key on an address whitelist. Additionally, self-sovereign identity contracts may require multiple signatures for the same message to be valid.
5555

5656
## Development
5757

58-
To install dependencies and start the local development server:
58+
PRs welcome. To install dependencies and start the local development server:
5959

6060
$ yarn install
6161
$ yarn run migrate

README.template.md

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -3,9 +3,9 @@
33
![Travis](https://img.shields.io/travis/cleargraphinc/solidity-sigutils.svg)
44
![npm](https://img.shields.io/npm/v/solidity-sigutils.svg)
55

6-
A solidity library for (multi)signatures.
6+
A solidity library for verifying message multi-signatures.
77

8-
These utilities make it simple to interact with Ethereum signed messages based on [EIP 191](https://github.com/ethereum/EIPs/issues/191). Useful for multi-sig self-sovereign identity contracts implementing [ERC 1077](https://github.com/ethereum/EIPs/pull/1077). They are a building block for Cleargraph's open and decentralized identity system, and can be used for many other purposes in decentralized applications.
8+
These utilities make it simple to interact with Ethereum signed messages based on [EIP 191](https://github.com/ethereum/EIPs/issues/191). They are especially useful for multi-sig self-sovereign identity contracts based on [ERC 1077](https://github.com/ethereum/EIPs/pull/1077). They are a building block for Cleargraph's open and decentralized identity system, and can be used for many other purposes in decentralized applications.
99

1010
You can sign a transaction/message using your private key by calling [web3.personal.sign()](https://web3js.readthedocs.io/en/1.0/web3-eth-personal.html) using MetaMask, Toshi, or another compatible web3 runtime. All signatures are 65 bytes long with the format `{bytes32 r}{bytes32 s}{uint8 v}`. Multiple signatures are stored densely (no padding) by concatenating them.
1111

@@ -33,29 +33,29 @@ contract MyContract {
3333
// Generate the message hash according to EIP 191
3434
bytes32 hash = SignatureUtils.toEthPersonalSignedMessageHash(_personalMessage);
3535
36-
// Returns a list of signatures extracted from _signatures
36+
// Returns the array of addresses which signed hash using their private key
3737
return SignatureUtils.recoverAddresses(hash, _signatures);
3838
// or use SignatureUtils.recoverAddress(hash, _signatures, 0) for only one signature
3939
}
4040
4141
}
4242
```
4343

44-
## Working with Signed Messages
44+
## Working with Ethereum Signed Messages
4545

46-
Signed messages are becoming an increasingly important part of decentralized applications, especially for identity management. Imagine a user wishes to perform a transaction on the Ethereum chain, but does not posses Ethereum and therefore cannot pay for gas costs. One emerging solution is to use signed messages, a proxy contract, and a gas relay. Here's how it goes:
46+
Signed messages are becoming an increasingly important part of decentralized applications, especially for identity management. Imagine a user wishes to perform a transaction on the Ethereum chain, but does not posses ether and therefore cannot pay for gas costs. One emerging solution is to use signed messages, a proxy contract, and a gas relay service. Here's how it goes:
4747

4848
1. A user wishes to perform a transaction and signs a message with the transaction details using their private key.
4949
2. The user sends the transaction details and signature to a relay service off-chain.
5050
3. The relay verifies the message and executes it on the proxy contract, paying for gas costs.
5151
4. The proxy contract verifies the transaction details and signature, reverting if invalid.
5252
5. The proxy contract performs the transaction.
5353

54-
Because of signed messages based on the security of Ethereum's `ecrecover(...)`, a user does not need to trust a gas relay with their private key to perform actions on their behalf. Many relay implementations require that a signature be signed with a private key on an address whitelist. Additionally, self-sovereign identity contracts may require multiple signatures for the same message to be valid.
54+
Because signed messages inherit the security of Ethereum's `ecrecover()`, a user does not need to trust a gas relay with their private key to perform actions on their behalf. Many relay implementations require that a signature be signed with a private key on an address whitelist. Additionally, self-sovereign identity contracts may require multiple signatures for the same message to be valid.
5555

5656
## Development
5757

58-
To install dependencies and start the local development server:
58+
PRs welcome. To install dependencies and start the local development server:
5959

6060
$ yarn install
6161
$ yarn run migrate

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
{
22
"name": "solidity-sigutils",
33
"version": "1.0.0",
4-
"description": "Solidity library for (multi)signatures",
4+
"description": "A solidity library for verifying message multi-signatures",
55
"main": "index.js",
66
"repository": "[email protected]:cleargraphinc/solidity-signatureutils.git",
77
"author": "[email protected]",

0 commit comments

Comments
 (0)