Documentation
¶
Index ¶
- Constants
- Variables
- func AppendBytes32(data ...[]byte) []byte
- func GetAccountProof(dividendAccounts []DividendAccount, userAddr string) ([]byte, uint64, error)
- func GetAccountRootHash(dividendAccounts []DividendAccount) ([]byte, error)
- func GetAccountTree(dividendAccounts []DividendAccount) (*merkletree.MerkleTree, error)
- func VerifyAccountProof(dividendAccounts []DividendAccount, userAddr, proofToVerify string) (bool, error)
- type DividendAccount
- func (da DividendAccount) CalculateHash() ([]byte, error)
- func (*DividendAccount) Descriptor() ([]byte, []int)
- func (this *DividendAccount) Equal(that interface{}) bool
- func (da DividendAccount) Equals(other merkletree.Content) (bool, error)
- func (m *DividendAccount) GetFeeAmount() string
- func (m *DividendAccount) GetUser() string
- func (m *DividendAccount) Marshal() (dAtA []byte, err error)
- func (m *DividendAccount) MarshalTo(dAtA []byte) (int, error)
- func (m *DividendAccount) MarshalToSizedBuffer(dAtA []byte) (int, error)
- func (*DividendAccount) ProtoMessage()
- func (m *DividendAccount) Reset()
- func (m *DividendAccount) Size() (n int)
- func (m *DividendAccount) String() string
- func (m *DividendAccount) Unmarshal(dAtA []byte) error
- func (m *DividendAccount) XXX_DiscardUnknown()
- func (m *DividendAccount) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)
- func (m *DividendAccount) XXX_Merge(src proto.Message)
- func (m *DividendAccount) XXX_Size() int
- func (m *DividendAccount) XXX_Unmarshal(b []byte) error
Constants ¶
View Source
const ( AttributeKeyTxHash = "txhash" AttributeKeyTxLogIndex = "tx-log-index" AttributeKeySideTxResult = "side-tx-result" )
View Source
const (
// DefaultLogIndexUnit is the default tx hash + log index unit (used to calculate sequence ID)
DefaultLogIndexUnit = 100000
)
Variables ¶
Functions ¶
func AppendBytes32 ¶
func GetAccountProof ¶
func GetAccountProof(dividendAccounts []DividendAccount, userAddr string) ([]byte, uint64, error)
GetAccountProof returns proof of dividend Account
func GetAccountRootHash ¶
func GetAccountRootHash(dividendAccounts []DividendAccount) ([]byte, error)
GetAccountRootHash returns rootHash of Validator Account State Tree
func GetAccountTree ¶
func GetAccountTree(dividendAccounts []DividendAccount) (*merkletree.MerkleTree, error)
GetAccountTree returns rootHash of Validator Account State Tree
func VerifyAccountProof ¶
func VerifyAccountProof(dividendAccounts []DividendAccount, userAddr, proofToVerify string) (bool, error)
VerifyAccountProof returns proof of dividend Account
Types ¶
type DividendAccount ¶
type DividendAccount struct { User string `protobuf:"bytes,1,opt,name=user,proto3" json:"user,omitempty"` FeeAmount string `protobuf:"bytes,2,opt,name=fee_amount,json=feeAmount,proto3" json:"fee_amount,omitempty"` }
DividendAccount contains the burned fees
func SortDividendAccountByAddress ¶
func SortDividendAccountByAddress(dividendAccounts []DividendAccount) ([]DividendAccount, error)
SortDividendAccountByAddress sorts DividendAccounts by address
func (DividendAccount) CalculateHash ¶
func (da DividendAccount) CalculateHash() ([]byte, error)
CalculateHash hashes the values of a DividendAccount
func (*DividendAccount) Descriptor ¶
func (*DividendAccount) Descriptor() ([]byte, []int)
func (*DividendAccount) Equal ¶
func (this *DividendAccount) Equal(that interface{}) bool
func (DividendAccount) Equals ¶
func (da DividendAccount) Equals(other merkletree.Content) (bool, error)
func (*DividendAccount) GetFeeAmount ¶
func (m *DividendAccount) GetFeeAmount() string
func (*DividendAccount) GetUser ¶
func (m *DividendAccount) GetUser() string
func (*DividendAccount) Marshal ¶
func (m *DividendAccount) Marshal() (dAtA []byte, err error)
func (*DividendAccount) MarshalToSizedBuffer ¶
func (m *DividendAccount) MarshalToSizedBuffer(dAtA []byte) (int, error)
func (*DividendAccount) ProtoMessage ¶
func (*DividendAccount) ProtoMessage()
func (*DividendAccount) Reset ¶
func (m *DividendAccount) Reset()
func (*DividendAccount) Size ¶
func (m *DividendAccount) Size() (n int)
func (*DividendAccount) String ¶
func (m *DividendAccount) String() string
func (*DividendAccount) Unmarshal ¶
func (m *DividendAccount) Unmarshal(dAtA []byte) error
func (*DividendAccount) XXX_DiscardUnknown ¶
func (m *DividendAccount) XXX_DiscardUnknown()
func (*DividendAccount) XXX_Marshal ¶
func (m *DividendAccount) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)
func (*DividendAccount) XXX_Merge ¶
func (m *DividendAccount) XXX_Merge(src proto.Message)
func (*DividendAccount) XXX_Size ¶
func (m *DividendAccount) XXX_Size() int
func (*DividendAccount) XXX_Unmarshal ¶
func (m *DividendAccount) XXX_Unmarshal(b []byte) error
Click to show internal directories.
Click to hide internal directories.