Documentation
¶
Index ¶
- Constants
- func Address(verificationScript []byte) string
- func DecodeScriptHash(s string) ([]byte, error)
- func FetchPublicKeys(vs []byte) []*ecdsa.PublicKey
- func IsAddress(s string) error
- func KeysToAddress(pubs ...*ecdsa.PublicKey) string
- func ReverseBytes(data []byte) []byte
- func ReversedScriptHashToAddress(sc string) (addr string, err error)
- func VerificationScript(pubs ...*ecdsa.PublicKey) []byte
- type WalletAddress
Constants ¶
View Source
const ( // AddressLength contains size of address, // 0x17 byte (address version) + 20 bytes of ScriptHash + 4 bytes of checksum. AddressLength = 25 // ScriptHashLength contains size of ScriptHash. ScriptHashLength = 20 // ErrEmptyAddress is raised when empty Address is passed. ErrEmptyAddress = internal.Error("empty address") // ErrAddressLength is raised when passed address has wrong size. ErrAddressLength = internal.Error("wrong address length") )
Variables ¶
This section is empty.
Functions ¶
func DecodeScriptHash ¶
DecodeScriptHash parses script hash into slice of bytes.
func FetchPublicKeys ¶
FetchPublicKeys tries to parse public keys from verification script.
func KeysToAddress ¶
KeysToAddress return NEO address composed from public keys.
func ReverseBytes ¶
ReverseBytes returns reversed []byte of given.
func ReversedScriptHashToAddress ¶
ReversedScriptHashToAddress parses script hash and returns valid NEO address.
func VerificationScript ¶
VerificationScript returns VerificationScript composed from public keys.
Types ¶
Click to show internal directories.
Click to hide internal directories.