-
Notifications
You must be signed in to change notification settings - Fork 3
Wallet interface #134
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: main
Are you sure you want to change the base?
Wallet interface #134
Changes from 2 commits
1020f28
2c9c78c
bcc503a
610a5e6
d65d3de
e02dc68
b2ad177
0659823
13540e8
ae830e8
ae29d9f
dbda488
3731128
353d1f0
a48eac4
806441e
db65476
4997ead
8137b73
41abf45
fea2619
d94e931
602f9d0
8b8c9b0
b700dbd
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
This file was deleted.
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,13 @@ | ||
| import 'dart:io'; | ||
|
|
||
| void main(List<String> args) { | ||
| print("Welcome to Walletkit-Dart"); | ||
|
|
||
|
||
| while (true) { | ||
| final input = stdin.readLineSync(); | ||
|
|
||
| if (input == 'exit') { | ||
| break; | ||
| } | ||
| } | ||
|
||
| } | ||
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,35 @@ | ||
| import 'dart:typed_data'; | ||
| import 'package:pointycastle/export.dart'; | ||
|
|
||
| /// | ||
| /// Ripmed160 Hash of Sha256 Hash | ||
| /// | ||
| Uint8List ripmed160Sha256Hash(Uint8List buffer) { | ||
| final ripmed160 = RIPEMD160Digest(); | ||
| final sha256 = SHA256Digest(); | ||
| return ripmed160.process(sha256.process(buffer)); | ||
| } | ||
|
|
||
| /// | ||
| /// Sha256 Hash of Sha256 Hash | ||
| /// | ||
| Uint8List sha256Sha256Hash(Uint8List buffer) { | ||
| final sha256 = SHA256Digest(); | ||
| return sha256.process(sha256.process(buffer)); | ||
| } | ||
|
|
||
| /// | ||
| /// Sha256 Hash | ||
| /// | ||
| Uint8List sha256Hash(Uint8List buffer) { | ||
| final sha256 = SHA256Digest(); | ||
| return sha256.process(buffer); | ||
| } | ||
|
|
||
| /// | ||
| /// HMAC Sha256 | ||
| /// | ||
| Uint8List hmacSHA512(Uint8List key, Uint8List data) { | ||
| final hmac = HMac(SHA512Digest(), 128)..init(KeyParameter(key)); | ||
| return hmac.process(data); | ||
| } |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Add necessary wallet-related imports and error handling.
As this is a wallet interface implementation, the file should import the necessary wallet-related modules and implement proper error handling for I/O operations.
Consider adding:
📝 Committable suggestion