cli: allow to convert wallet from NEO2 to NEO3 format

This command may be helpful to have during transition.
This commit is contained in:
Evgenii Stratonikov 2020-06-16 14:08:47 +03:00
parent 901181a392
commit b3b1137030
2 changed files with 64 additions and 1 deletions

View file

@ -7,9 +7,16 @@ import (
"github.com/nspcc-dev/neo-go/pkg/util"
)
const (
// NEO2Prefix is the first byte of address for NEO2.
NEO2Prefix byte = 0x17
// NEO3Prefix is the first byte of address for NEO3.
NEO3Prefix byte = 0x35
)
// Prefix is the byte used to prepend to addresses when encoding them, it can
// be changed and defaults to 23 (0x17), the standard NEO prefix.
var Prefix = byte(0x17)
var Prefix = NEO2Prefix
// Uint160ToString returns the "NEO address" from the given Uint160.
func Uint160ToString(u util.Uint160) string {