Skip to content

Commit

Permalink
Added DecodeNoLimitGeneric to bech32.go
Browse files Browse the repository at this point in the history
  • Loading branch information
MarcoEzekiel committed May 9, 2024
1 parent 6b197d3 commit a0d6d77
Showing 1 changed file with 9 additions and 0 deletions.
9 changes: 9 additions & 0 deletions btcutil/bech32/bech32.go
Original file line number Diff line number Diff line change
Expand Up @@ -266,6 +266,15 @@ func DecodeNoLimit(bech string) (string, []byte, error) {
return hrp, data, err
}

// DecodeGeneric is identical to the existing DecodeNoLimit method, but will also
// return the bech32 version that matches the decoded checksum.
//
// Note that the returned data is 5-bit (base32) encoded and the human-readable
// part will be lowercase.
func DecodeNoLimitGeneric(bech string) (string, []byte, Version, error) {
return decodeNoLimit(bech)
}

// Decode decodes a bech32 encoded string, returning the human-readable part and
// the data part excluding the checksum.
//
Expand Down

0 comments on commit a0d6d77

Please sign in to comment.