Read this in other languages: English, 简体中文
Ether-clef is easier than clef of official to use, it uses mysql db to save all accounts.
It's worth noting that ether-clef will not be safer than official clef, so which one to choose depends on your application scenario.
go get github.com/pefish/ether-clef/cmd/ether-clef
- Init database
create database clef;
CREATE TABLE `address` (
`id` int(11) unsigned NOT NULL AUTO_INCREMENT,
`address` varchar(100) NOT NULL,
`priv` varchar(255) NOT NULL,
`is_ban` tinyint(4) NOT NULL DEFAULT '0',
`created_at` datetime NOT NULL DEFAULT CURRENT_TIMESTAMP,
`updated_at` datetime NOT NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP,
PRIMARY KEY (`id`),
UNIQUE KEY `address` (`address`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8 ROW_FORMAT=DYNAMIC;
CREATE TABLE `method` (
`id` int(11) unsigned NOT NULL AUTO_INCREMENT,
`method_id` varchar(100) NOT NULL,
`method_str` varchar(255) NOT NULL,
`is_ban` tinyint(4) NOT NULL DEFAULT '0',
`created_at` datetime NOT NULL DEFAULT CURRENT_TIMESTAMP COMMENT '创建时间',
`updated_at` datetime NOT NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP COMMENT '更新时间',
PRIMARY KEY (`id`),
UNIQUE KEY `method_id` (`method_id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8 ROW_FORMAT=DYNAMIC COMMENT='所有允许签名的方法';
Execute the above sql statement, then use gene-address
subcommand generate address which should be filled in table address
.
- Start app
ether-clef --db.host=0.0.0.0 --db.database=clef --db.username=root --db.password=* --password=test --log-level=info --chainid=100
ether-clef gene-address --mnemonic=haha --password=test --path=m/0/0
ether-clef --help
- Fork it
- Download your fork to your PC
- Create your feature branch (
git checkout -b my-new-feature
) - Make changes and add them (
git add .
) - Commit your changes (
git commit -m 'Add some feature'
) - Push to the branch (
git push origin my-new-feature
) - Create new pull request
If you discover a security vulnerability, please send an e-mail to pefish@qq.com. All security vulnerabilities will be promptly addressed.
This project is licensed under the Apache License.