func NewAddressProva(pkHash []byte, keyIDs []btcec.KeyID, net *chaincfg.Params) (*AddressProva, error) {
	return newAddressProva(pkHash, keyIDs, net.ProvaAddrID)
}
NewAddressProva returns a new AddressProva.  pkHash mustbe 20
bytes.
package provautil
import (
	"encoding/binary"
	"encoding/hex"
	"errors"
	"github.com/bitgo/prova/btcec"
	"github.com/bitgo/prova/chaincfg"
	"github.com/bitgo/prova/provautil/base58"
	"github.com/btcsuite/golangcrypto/ripemd160"
)
var (
	ErrChecksumMismatch = errors.New("checksum mismatch")
	ErrUnknownAddressType = errors.New("unknown address type")
	ErrAddressCollision = errors.New("address collision")
)
func encodeProvaAddress(keyIDs []btcec.KeyID, hash160 []byte, netID byte) string {
	data := make([]byte, len(keyIDs)*btcec.KeyIDSize+ripemd160.Size)
	copy(data[0:], hash160)
	offset := ripemd160.Size
	for _, keyID := range keyIDs {
		binary.LittleEndian.PutUint32(data[offset:], uint32(keyID))
		offset += btcec.KeyIDSize
	}
	return base58.CheckEncode(data, netID)
}
type Address interface {
	String() string
	EncodeAddress() string
	ScriptAddress() []byte
	ScriptKeyIDs() []btcec.KeyID
	IsForNet(*chaincfg.Params) bool
}
func DecodeAddress(addr string, defaultNet *chaincfg.Params) (Address, error) {
	decoded, netID, err := base58.CheckDecode(addr)
	if err != nil {
		if err == base58.ErrChecksum {
			return nil, ErrChecksumMismatch
		}
		return nil, errors.New("decoded address is of unknown format")
	}
	if chaincfg.IsProvaAddrID(netID) {
		decodedLen := len(decoded)
		mininumKeyIdsCount := 2
		maximumKeyIdsCount := 19
		if decodedLen < ripemd160.Size+(mininumKeyIdsCount*btcec.KeyIDSize) {
			return nil, errors.New("decoded address is of unknown size")
		}
		if decodedLen > ripemd160.Size+(maximumKeyIdsCount*btcec.KeyIDSize) {
			return nil, errors.New("decoded address exceeds maximum size")
		}
		if (decodedLen-ripemd160.Size)%btcec.KeyIDSize != 0 {
			return nil, errors.New("decoded address has invalid size")
		}
		return newAddressProvaFromBytes(decoded, netID)
	}
	return nil, errors.New("decoded address is of unknown size")
}
type AddressProva struct {
	keyIDs []btcec.KeyID
	hash   [ripemd160.Size]byte
	netID  byte
}