-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat!: EdDSA key export [SIGNER-97] (#15)
* feat: EdDSA key export [SIGNER-97] * chore: add test for EdDSA export * chore: bump version v5.0.0 * chore: update readme & clarify * chore: printf/println newlines * chore: remove useless printer * chore: update PULL_REQUEST_TEMPLATE * chore: render Ethereum address in ERC-55 format * chore(go.mod): remove toolchain line * fix: left pad big.Int Bytes() to 32 bytes * chore: add code copyright headers * chore: small edit CLI help text * chore: add tests for leftPadTo32Bytes * chore: small edit CLI help text * chore: refactor basic file structure * chore: split big files * chore: rename files.go -> ui_validate.go * chore: reorg more files * chore: more fs restructuring
- Loading branch information
1 parent
6bcd400
commit b0d2ba4
Showing
20 changed files
with
911 additions
and
566 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,13 @@ | ||
// Copyright (C) 2021 io finnet group, inc. | ||
// SPDX-License-Identifier: AGPL-3.0-or-later | ||
// Full license text available in LICENSE file in repository root. | ||
|
||
package config | ||
|
||
type AppConfig struct { | ||
Filenames []string | ||
NonceOverride int | ||
QuorumOverride int | ||
ExportKSFile string | ||
PasswordForKS string | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,43 @@ | ||
// Copyright (C) 2021 io finnet group, inc. | ||
// SPDX-License-Identifier: AGPL-3.0-or-later | ||
// Full license text available in LICENSE file in repository root. | ||
|
||
package ui | ||
|
||
import ( | ||
"fmt" | ||
) | ||
|
||
const ( | ||
WORDS = 24 | ||
) | ||
|
||
var ( | ||
// ANSI escape seqs for colours in the terminal | ||
AnsiCodes = map[string]string{ | ||
"bold": "\033[1m", | ||
"invertOn": "\033[7m", | ||
"darkRedBG": "\033[41m", | ||
"darkGreenBG": "\033[42m", | ||
"reset": "\033[0m", | ||
} | ||
) | ||
|
||
func Banner() string { | ||
b := "\n" | ||
b += fmt.Sprintf("%s%s %s\n", AnsiCodes["invertOn"], AnsiCodes["bold"], AnsiCodes["reset"]) | ||
b += fmt.Sprintf("%s%s io.finnet Key Recovery Tool %s\n", AnsiCodes["invertOn"], AnsiCodes["bold"], AnsiCodes["reset"]) | ||
b += fmt.Sprintf("%s%s v5.0.0 %s\n", AnsiCodes["invertOn"], AnsiCodes["bold"], AnsiCodes["reset"]) | ||
b += fmt.Sprintf("%s%s %s\n", AnsiCodes["invertOn"], AnsiCodes["bold"], AnsiCodes["reset"]) | ||
b += "\n" | ||
return b | ||
} | ||
|
||
func ErrorBox(err error) string { | ||
b := "\n" | ||
b += fmt.Sprintf("%s%s %s\n", AnsiCodes["darkRedBG"], AnsiCodes["bold"], AnsiCodes["reset"]) | ||
b += fmt.Sprintf("%s%s Error %s %s.\n", AnsiCodes["darkRedBG"], AnsiCodes["bold"], AnsiCodes["reset"], err) | ||
b += fmt.Sprintf("%s%s %s\n", AnsiCodes["darkRedBG"], AnsiCodes["bold"], AnsiCodes["reset"]) | ||
b += "\n" | ||
return b | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,4 +1,4 @@ | ||
package main | ||
package wif | ||
|
||
import ( | ||
"crypto/sha256" | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.