Documentation ¶
Index ¶
- func IsValidAddress(address []byte) bool
- type AddressState
- func (a *AddressState) AddBalance(balance uint64)
- func (a *AddressState) AddSlavePKSAccessType(slavePK []byte, accessType uint32)
- func (a *AddressState) Address() []byte
- func (a *AddressState) AppendTransactionHash(hash []byte)
- func (a *AddressState) Balance() uint64
- func (a *AddressState) DecreaseNonce()
- func (a *AddressState) GetSlavePermission(slavePK []byte) (uint32, bool)
- func (a *AddressState) GetTokenBalance(tokenTxHash []byte) uint64
- func (a *AddressState) GetUnusedOTSIndex(startFrom uint64) (uint64, bool)
- func (a *AddressState) Height() uint64
- func (a *AddressState) IncreaseNonce()
- func (a *AddressState) IsTokenExists(tokenTxHash []byte) bool
- func (a *AddressState) LatticePKList() []*generated.LatticePK
- func (a *AddressState) Nonce() uint64
- func (a *AddressState) OTSKeyReuse(otsKeyIndex uint64) bool
- func (a *AddressState) OtsBitfield() [][]byte
- func (a *AddressState) OtsCounter() uint64
- func (a *AddressState) PBData() *generated.AddressState
- func (a *AddressState) RemoveSlavePKSAccessType(slavePK []byte)
- func (a *AddressState) RemoveTransactionHash(hash []byte)
- func (a *AddressState) Serialize() ([]byte, error)
- func (a *AddressState) SetBalance(balance uint64)
- func (a *AddressState) SetOTSKey(otsKeyIndex uint64)
- func (a *AddressState) SlavePKSAccessType() map[string]uint32
- func (a *AddressState) SubtractBalance(balance uint64)
- func (a *AddressState) TransactionHashes() [][]byte
- func (a *AddressState) UpdateTokenBalance(tokenTxHash []byte, balance uint64, subtract bool)
- type AddressStateInterface
- type IsUnusedOTSIndex
- type NextUnusedOTS
- type PlainAddressState
- type PlainBalance
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func IsValidAddress ¶
Types ¶
type AddressState ¶
type AddressState struct {
// contains filtered or unexported fields
}
func CreateAddressState ¶
func DeSerializeAddressState ¶
func DeSerializeAddressState(data []byte) (*AddressState, error)
func GetDefaultAddressState ¶
func GetDefaultAddressState(address []byte) *AddressState
func (*AddressState) AddBalance ¶
func (a *AddressState) AddBalance(balance uint64)
func (*AddressState) AddSlavePKSAccessType ¶
func (a *AddressState) AddSlavePKSAccessType(slavePK []byte, accessType uint32)
func (*AddressState) Address ¶
func (a *AddressState) Address() []byte
func (*AddressState) AppendTransactionHash ¶
func (a *AddressState) AppendTransactionHash(hash []byte)
func (*AddressState) Balance ¶
func (a *AddressState) Balance() uint64
func (*AddressState) DecreaseNonce ¶
func (a *AddressState) DecreaseNonce()
func (*AddressState) GetSlavePermission ¶
func (a *AddressState) GetSlavePermission(slavePK []byte) (uint32, bool)
func (*AddressState) GetTokenBalance ¶
func (a *AddressState) GetTokenBalance(tokenTxHash []byte) uint64
func (*AddressState) GetUnusedOTSIndex ¶
func (a *AddressState) GetUnusedOTSIndex(startFrom uint64) (uint64, bool)
func (*AddressState) Height ¶
func (a *AddressState) Height() uint64
func (*AddressState) IncreaseNonce ¶
func (a *AddressState) IncreaseNonce()
func (*AddressState) IsTokenExists ¶
func (a *AddressState) IsTokenExists(tokenTxHash []byte) bool
func (*AddressState) LatticePKList ¶
func (a *AddressState) LatticePKList() []*generated.LatticePK
func (*AddressState) Nonce ¶
func (a *AddressState) Nonce() uint64
func (*AddressState) OTSKeyReuse ¶
func (a *AddressState) OTSKeyReuse(otsKeyIndex uint64) bool
func (*AddressState) OtsBitfield ¶
func (a *AddressState) OtsBitfield() [][]byte
func (*AddressState) OtsCounter ¶
func (a *AddressState) OtsCounter() uint64
func (*AddressState) PBData ¶
func (a *AddressState) PBData() *generated.AddressState
func (*AddressState) RemoveSlavePKSAccessType ¶
func (a *AddressState) RemoveSlavePKSAccessType(slavePK []byte)
func (*AddressState) RemoveTransactionHash ¶
func (a *AddressState) RemoveTransactionHash(hash []byte)
func (*AddressState) Serialize ¶
func (a *AddressState) Serialize() ([]byte, error)
func (*AddressState) SetBalance ¶
func (a *AddressState) SetBalance(balance uint64)
func (*AddressState) SetOTSKey ¶
func (a *AddressState) SetOTSKey(otsKeyIndex uint64)
func (*AddressState) SlavePKSAccessType ¶
func (a *AddressState) SlavePKSAccessType() map[string]uint32
func (*AddressState) SubtractBalance ¶
func (a *AddressState) SubtractBalance(balance uint64)
func (*AddressState) TransactionHashes ¶
func (a *AddressState) TransactionHashes() [][]byte
func (*AddressState) UpdateTokenBalance ¶
func (a *AddressState) UpdateTokenBalance(tokenTxHash []byte, balance uint64, subtract bool)
type AddressStateInterface ¶
type AddressStateInterface interface { PBData() *generated.AddressState Address() []byte Nonce() uint64 Balance() uint64 SetBalance(balance uint64) AddBalance(balance uint64) SubtractBalance(balance uint64) OTSBitfield() [][]byte OTSCounter() uint64 TransactionHashes() [][]byte LatticePKList() []*generated.LatticePK SlavePKSAccessType() map[string]uint32 UpdateTokenBalance(tokenTxHash []byte, balance uint64, subtract bool) GetTokenBalance(tokenTxHash []byte) uint64 IsTokenExists(tokenTxHash []byte) bool AddSlavePKSAccessType(slavePK []byte, accessType uint32) RemoveSlavePKSAccessType(slavePK []byte) IncreaseNonce() DecreaseNonce() GetSlavePermission(slavePK []byte) (uint16, bool) GetDefault(address []byte) *AddressState OTSKeyReuse(otsKeyIndex uint64) bool SetOTSKey(otsKeyIndex uint64) IsValidAddress(address []byte) bool Serialize() string }
type IsUnusedOTSIndex ¶
type IsUnusedOTSIndex struct {
IsUnusedOTSIndex bool `json:"isUnusedOtsIndex" bson:"isUnusedOtsIndex"`
}
type NextUnusedOTS ¶
type PlainAddressState ¶
type PlainAddressState struct { Address string `json:"address" bson:"address"` Balance uint64 `json:"balance" bson:"balance"` Nonce uint64 `json:"nonce" bson:"nonce"` OtsBitfield []string `json:"otsBitField" bson:"otsBitField"` TransactionHashes []string `json:"transactionHashes" bson:"transactionHashes"` OtsCounter uint64 `json:"otsCounter" bson:"otsCounter"` }
func (*PlainAddressState) AddressStateFromPBData ¶
func (a *PlainAddressState) AddressStateFromPBData(a2 *generated.AddressState)
type PlainBalance ¶
type PlainBalance struct {
Balance string `json:"balance" bson:"balance"`
}
Click to show internal directories.
Click to hide internal directories.