https://github.com/dravenk/account
https://github.com/dravenk/account
Last synced: 2 months ago
JSON representation
- Host: GitHub
- URL: https://github.com/dravenk/account
- Owner: dravenk
- License: apache-2.0
- Created: 2024-01-28T08:42:58.000Z (over 1 year ago)
- Default Branch: main
- Last Pushed: 2024-01-28T09:07:42.000Z (over 1 year ago)
- Last Synced: 2025-02-24T01:44:49.351Z (2 months ago)
- Language: Rust
- Size: 13.7 KB
- Stars: 0
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE-APACHE
Awesome Lists containing this project
README
Account
---
Provides a simple tool library for managing web3 accounts.
It provides a set of APIs for account management, including account creation, account import, account export, account deletion, account balance query, account transfer, etc.### Usage
```rust
use account::account::Account;fn main() {
// create account
let password = None;
let account = Account::new(password);// using a child path to sign and verify
let child_path = "m/44'/0'/0'/0/0'";
// sign and verify
let example_msg = b"Hello, world!";
let sign_message = account.sign(child_path, example_msg);
account.verify(child_path, example_msg, &sign_message.unwrap());
}
```