github.com/lino-network/lino@v0.6.11/x/account/model/account.go (about)

     1  package model
     2  
     3  import (
     4  	sdk "github.com/cosmos/cosmos-sdk/types"
     5  	"github.com/tendermint/tendermint/crypto"
     6  	ttypes "github.com/tendermint/tendermint/types"
     7  
     8  	"github.com/lino-network/lino/types"
     9  )
    10  
    11  // AccountInfo - user information
    12  type AccountInfo struct {
    13  	Username       types.AccountKey `json:"username"`
    14  	CreatedAt      int64            `json:"created_at"`
    15  	SigningKey     crypto.PubKey    `json:"signing_key"`
    16  	TransactionKey crypto.PubKey    `json:"transaction_key"`
    17  	Address        sdk.AccAddress   `json:"address"`
    18  }
    19  
    20  // AccountBank - user balance
    21  type AccountBank struct {
    22  	Saving          types.Coin       `json:"saving"`
    23  	FrozenMoneyList []FrozenMoney    `json:"frozen_money_list"`
    24  	PubKey          crypto.PubKey    `json:"public_key"`
    25  	Sequence        uint64           `json:"sequence"`
    26  	Username        types.AccountKey `json:"username"`
    27  }
    28  
    29  // Pool - the pool for modules
    30  type Pool struct {
    31  	Name    types.PoolName `json:"name"`
    32  	Balance types.Coin     `json:"balance"`
    33  }
    34  
    35  // Supply - stats of lino supply.
    36  type Supply struct {
    37  	LastYearTotal     types.Coin `json:"last_year_total"`
    38  	Total             types.Coin `json:"total"`
    39  	ChainStartTime    int64      `json:"chain_start_time"`
    40  	LastInflationTime int64      `json:"last_inflation_time"`
    41  }
    42  
    43  // FrozenMoney - frozen money
    44  type FrozenMoney struct {
    45  	Amount   types.Coin `json:"amount"`
    46  	StartAt  int64      `json:"start_at"`
    47  	Times    int64      `json:"times"`
    48  	Interval int64      `json:"interval"`
    49  }
    50  
    51  // AccountMeta - stores optional fields.
    52  type AccountMeta struct {
    53  	JSONMeta string `json:"json_meta"`
    54  }
    55  
    56  type TxAndSequenceNumber struct {
    57  	Username string       `json:"username"`
    58  	Sequence uint64       `json:"sequence"`
    59  	Tx       *Transaction `json:"tx"`
    60  }
    61  
    62  type Transaction struct {
    63  	Hash   string    `json:"hash"`
    64  	Height int64     `json:"height"`
    65  	Tx     ttypes.Tx `json:"tx"`
    66  	Code   uint32    `json:"code"`
    67  	Log    string    `json:"log"`
    68  }