Documentation ¶
Index ¶
Constants ¶
View Source
const ( // Define sizes for each component of RawAddress VerSize = 4 // Size in bytes for the version field (uint32) TimestampSize = 8 // Size in bytes for the timestamp field (int64) ChainCodeLength = 32 // Example length of the chain code in bytes PubKeyLength = 64 // Example length of the public key in bytes, adjust based on your key format PrivKeyLength = 64 // Example length of the private key in bytes, adjust based on your key format SeedLength = 32 // Length of the seed in bytes // ExpectedTotalLength Calculate the expected total length of RawAddress when serialized ExpectedTotalLength = VerSize + TimestampSize + ChainCodeLength + PubKeyLength + PrivKeyLength + SeedLength )
Variables ¶
View Source
var BytePrefix []byte = []byte("0x100010001000")
View Source
var WitnessPrefix []byte = []byte("0x1101")
View Source
var ZkpPrefix []byte = []byte("0xab1d")
Functions ¶
func HashKeyAddress ¶
func HashKeyAddress(r *RawAddress) []byte
Types ¶
type Address ¶
type Address struct { cryptography.Decapsulatable // contains filtered or unexported fields }
type RawAddress ¶
type RawAddress struct { cryptography.Encapsulatable // contains filtered or unexported fields }
func (*RawAddress) Marshal ¶
func (r *RawAddress) Marshal(key []byte, dst []byte)
func (*RawAddress) ToBytes ¶
func (r *RawAddress) ToBytes() []byte
Click to show internal directories.
Click to hide internal directories.