Documentation
¶
Index ¶
- func Base58Decode(input []byte) []byte
- func Base58Encode(input []byte) []byte
- func Deserialize(data []byte, anything interface{}) interface{}
- func HashPubKey(pubKey []byte) []byte
- func HashPublicKey(publicKey []byte) []byte
- func IntToHex(num int64) []byte
- func RequireNil(anything interface{})
- func ReverseBytes(data []byte) []byte
- func Serialize(anything interface{}) []byte
- type DatabaseObject
- func (databaseObject *DatabaseObject) Get(key []byte) []byte
- func (databaseObject *DatabaseObject) GetLastBlockData() []byte
- func (databaseObject *DatabaseObject) GetLastHash() []byte
- func (databaseObject *DatabaseObject) Set(key []byte, blob []byte)
- func (databaseObject *DatabaseObject) SetLastHash(hash []byte)
- type MerkleNode
- type MerkleTree
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func Base58Decode ¶
func Base58Encode ¶
func Deserialize ¶
func Deserialize(data []byte, anything interface{}) interface{}
func HashPubKey ¶
func HashPublicKey ¶
func RequireNil ¶
func RequireNil(anything interface{})
func ReverseBytes ¶
Types ¶
type DatabaseObject ¶
func CreateNewDatabaseObject ¶
func CreateNewDatabaseObject(dbFile string, bucket string) DatabaseObject
func (*DatabaseObject) Get ¶
func (databaseObject *DatabaseObject) Get(key []byte) []byte
func (*DatabaseObject) GetLastBlockData ¶
func (databaseObject *DatabaseObject) GetLastBlockData() []byte
func (*DatabaseObject) GetLastHash ¶
func (databaseObject *DatabaseObject) GetLastHash() []byte
func (*DatabaseObject) Set ¶
func (databaseObject *DatabaseObject) Set(key []byte, blob []byte)
func (*DatabaseObject) SetLastHash ¶
func (databaseObject *DatabaseObject) SetLastHash(hash []byte)
type MerkleNode ¶
type MerkleNode struct {
Left *MerkleNode
Right *MerkleNode
Data []byte
}
MerkleNode represent a Merkle tree node
func NewMerkleNode ¶
func NewMerkleNode(left, right *MerkleNode, data []byte) *MerkleNode
NewMerkleNode creates a new Merkle tree node
type MerkleTree ¶
type MerkleTree struct {
RootNode *MerkleNode
}
MerkleTree represent a Merkle tree
func NewMerkleTree ¶
func NewMerkleTree(data [][]byte) *MerkleTree
NewMerkleTree creates a new Merkle tree from a sequence of data
Click to show internal directories.
Click to hide internal directories.