mirror of
https://github.com/muun/recovery.git
synced 2025-11-10 22:10:14 -05:00
Release v2.2.0
This commit is contained in:
4
vendor/github.com/muun/libwallet/emergencykit/descriptors.go
generated
vendored
4
vendor/github.com/muun/libwallet/emergencykit/descriptors.go
generated
vendored
@@ -17,6 +17,8 @@ var descriptorFormats = []string{
|
||||
"sh(wsh(multi(2, %s/1'/1'/1/*, %s/1'/1'/1/*)))", // V3 external
|
||||
"wsh(multi(2, %s/1'/1'/0/*, %s/1'/1'/0/*))", // V4 change
|
||||
"wsh(multi(2, %s/1'/1'/1/*, %s/1'/1'/1/*))", // V4 external
|
||||
"tr(musig(%s/1'/1'/0/*, %s/1'/1'/0/*))", // V5 change
|
||||
"tr(musig(%s/1'/1'/1/*, %s/1'/1'/1/*))", // V5 external
|
||||
}
|
||||
|
||||
// GetDescriptors returns an array of raw output descriptors.
|
||||
@@ -48,6 +50,8 @@ func GetDescriptorsHTML(data *DescriptorsData) string {
|
||||
html = strings.ReplaceAll(html, "wsh(", renderScriptType("wsh")+"(")
|
||||
html = strings.ReplaceAll(html, "sh(", renderScriptType("sh")+"(")
|
||||
html = strings.ReplaceAll(html, "multi(", renderScriptType("multi")+"(")
|
||||
html = strings.ReplaceAll(html, "tr(", renderScriptType("tr")+"(")
|
||||
html = strings.ReplaceAll(html, "musig(", renderScriptType("musig")+"(")
|
||||
|
||||
// Replace fingerprint expressions:
|
||||
html = strings.ReplaceAll(html, data.FirstFingerprint, renderFingerprint(data.FirstFingerprint))
|
||||
|
||||
3
vendor/github.com/muun/libwallet/emergencykit/emergencykit.go
generated
vendored
3
vendor/github.com/muun/libwallet/emergencykit/emergencykit.go
generated
vendored
@@ -15,6 +15,7 @@ type Input struct {
|
||||
FirstFingerprint string
|
||||
SecondEncryptedKey string
|
||||
SecondFingerprint string
|
||||
Version int
|
||||
}
|
||||
|
||||
// Output with the html as string and the verification code
|
||||
@@ -108,7 +109,7 @@ func generateDeterministicCode(params *Input) string {
|
||||
// to be recreated each time the kit is rendered (making this deterministic approach useless).
|
||||
|
||||
// Create a deterministic serialization of the input:
|
||||
inputMaterial := params.SecondEncryptedKey
|
||||
inputMaterial := params.SecondEncryptedKey + strconv.Itoa(params.Version)
|
||||
|
||||
// Compute a cryptographically secure hash of the material (critical, these are keys):
|
||||
inputHash := sha256.Sum256([]byte(inputMaterial))
|
||||
|
||||
Reference in New Issue
Block a user