Documentation ¶
Index ¶
- func AccountIndexKey() []byte
- func AccountKey(id string) []byte
- func ExecQuery(state *State, resource string, object string) abci.ResponseQuery
- func ExecTx(state *State, pgz *bctypes.Plugins, tx types.Tx, isCheckTx bool, ...) abci.Result
- func GetAccount(store basecoin.KVStore, id string) *types.Account
- func GetAccountIndex(store basecoin.KVStore) *types.AccountIndex
- func GetLegalEntity(store basecoin.KVStore, id string) *types.LegalEntity
- func GetOrMakeAccountIndex(state types.AccountIndexGetter) *types.AccountIndex
- func GetUser(store basecoin.KVStore, addr []byte) *types.User
- func LegalEntityKey(id string) []byte
- func SetAccount(store basecoin.KVStore, id string, acc *types.Account)
- func SetAccountInIndex(state *State, account types.Account) abci.Result
- func SetLegalEntity(store basecoin.KVStore, id string, ent *types.LegalEntity)
- func SetLegalEntityInIndex(state *State, legalEntity *types.LegalEntity) abci.Result
- func SetUser(store basecoin.KVStore, addr []byte, usr *types.User)
- func UserKey(addr []byte) []byte
- type State
- func (s *State) CacheSync()
- func (s *State) CacheWrap() *State
- func (s *State) Get(key []byte) (value []byte)
- func (s *State) GetAccount(id string) *types.Account
- func (s *State) GetAccountIndex() *types.AccountIndex
- func (s *State) GetChainID() string
- func (s *State) GetLegalEntity(id string) *types.LegalEntity
- func (s *State) GetLegalEntityIndex() *types.LegalEntityIndex
- func (s *State) GetUser(addr []byte) *types.User
- func (s *State) Set(key []byte, value []byte)
- func (s *State) SetAccount(id string, acc *types.Account)
- func (s *State) SetAccountIndex(index *types.AccountIndex)
- func (s *State) SetChainID(chainID string)
- func (s *State) SetLegalEntity(id string, l *types.LegalEntity)
- func (s *State) SetLegalEntityIndex(LegalEntityIndex *types.LegalEntityIndex)
- func (s *State) SetUser(addr []byte, acc *types.User)
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func AccountIndexKey ¶
func AccountIndexKey() []byte
AccountIndexKey generates a data store's unique key for an AccountIndex
func AccountKey ¶
AccountKey generates a data store's unique key for an Account
func ExecQuery ¶
func ExecQuery(state *State, resource string, object string) abci.ResponseQuery
ExecQuery handles queries.
func ExecTx ¶
func ExecTx(state *State, pgz *bctypes.Plugins, tx types.Tx, isCheckTx bool, evc events.Fireable) abci.Result
ExecTx actually executes a Tx
func GetAccount ¶
GetAccount retrieves an Account from the given store
func GetAccountIndex ¶
func GetAccountIndex(store basecoin.KVStore) *types.AccountIndex
GetAccountIndex retrieves a AccountIndex from the given store
func GetLegalEntity ¶
func GetLegalEntity(store basecoin.KVStore, id string) *types.LegalEntity
GetLegalEntity retrieves a LegalEntity from the given store
func GetOrMakeAccountIndex ¶
func GetOrMakeAccountIndex(state types.AccountIndexGetter) *types.AccountIndex
Returns existing AccountIndex from store or creates new empty one
func LegalEntityKey ¶
LegalEntityKey generates a data store's unique key for a LegalEntity
func SetAccount ¶
SetAccount stores an Account to the given store
func SetAccountInIndex ¶
Sets Account in AccountIndex in store
func SetLegalEntity ¶
func SetLegalEntity(store basecoin.KVStore, id string, ent *types.LegalEntity)
SetLegalEntity stores a LegalEntity to the given store
func SetLegalEntityInIndex ¶
func SetLegalEntityInIndex(state *State, legalEntity *types.LegalEntity) abci.Result
Sets LegalEntity in LegalEntityIndex in store
Types ¶
type State ¶
type State struct {
// contains filtered or unexported fields
}
State defines the attributes of the system's state
func (*State) GetAccount ¶
GetAccount retrieves the Account by address
func (*State) GetAccountIndex ¶
func (s *State) GetAccountIndex() *types.AccountIndex
GetAccountIndex gets the accounts index
func (*State) GetChainID ¶
GetChainID retrieves the State's chain ID
func (*State) GetLegalEntity ¶
func (s *State) GetLegalEntity(id string) *types.LegalEntity
GetLegalEntity retrieves the LegalEntity by address
func (*State) GetLegalEntityIndex ¶
func (s *State) GetLegalEntityIndex() *types.LegalEntityIndex
Gets existing LegalEntityIndex from store or nil if nonexistent. Can panic if store's data is corrupt.
func (*State) SetAccount ¶
SetAccount sets an Account
func (*State) SetAccountIndex ¶
func (s *State) SetAccountIndex(index *types.AccountIndex)
SetAccountIndex sets the accounts index
func (*State) SetChainID ¶
SetChainID sets the State's chain ID
func (*State) SetLegalEntity ¶
func (s *State) SetLegalEntity(id string, l *types.LegalEntity)
SetLegalEntity sets a LegalEntity
func (*State) SetLegalEntityIndex ¶
func (s *State) SetLegalEntityIndex(LegalEntityIndex *types.LegalEntityIndex)
Sets LegalEntityIndex in store