Skip to content

Commit

Permalink
修改描述
Browse files Browse the repository at this point in the history
Signed-off-by: 邓小明 <[email protected]>
  • Loading branch information
hhun authored and gitee-org committed Mar 11, 2023
1 parent 38f4937 commit 5370040
Show file tree
Hide file tree
Showing 4 changed files with 5 additions and 4 deletions.
2 changes: 1 addition & 1 deletion README.en.md
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
# Signing account for web3 recover signed data
# Recover signing account for Web3 signed messages

[中文](README.md) | **English**

Expand Down
3 changes: 2 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
# Web3还原已签名数据的签名帐户
# 还原Web3签名消息的签名帐户

**中文** | [English](README.en.md)

Expand All @@ -17,6 +17,7 @@ web3.eth.sign(msg, from, function (err, result) {
```

## PHP恢复签名地址

``` php
use hhun\Web3Recover\Web3Recover;

Expand Down
2 changes: 1 addition & 1 deletion composer.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "hhun/web3-recover",
"description": "Web3还原已签名数据的签名帐户",
"description": "还原Web3签名消息的签名帐户",
"keywords": ["web3", "recover"],
"license": "MIT",
"authors": [{
Expand Down
2 changes: 1 addition & 1 deletion src/Web3Recover.php
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,7 @@ public static function fromText($msg, $signed, string $type = 'EIP20'): string
$personal_prefix_msg = "\x19Ethereum Signed Message:\n" . strlen($msg) . $msg;
break;
case 'EIP712':
$personal_prefix_msg = hex2bin(substr(Web3Recover::keccak256('string Messageuint32 A number'), 2) . substr(Web3Recover::keccak256('Hi, Alice!' . pack('N', 1337)), 2));
$personal_prefix_msg = hex2bin(substr(self::keccak256('string Messageuint32 A number'), 2) . substr(self::keccak256('Hi, Alice!' . pack('N', 1337)), 2));
break;
default:
return '';
Expand Down

0 comments on commit 5370040

Please sign in to comment.