Documentation ¶
Index ¶
- Constants
- Variables
- func AccountKey(i uint64) []byte
- func GetTransferForDeadlineKeyPrefix(at time.Time) []byte
- func RegisterCodec(cdc *codec.Codec)
- func TransferForDeadlineKey(at time.Time, i uint64) []byte
- func TransferKey(i uint64) []byte
- type Account
- type Accounts
- type GenesisState
- type MsgApprove
- type MsgCreate
- type MsgDeposit
- type MsgSend
- type QueryAccountParams
- type QueryAccountsParams
- type QueryTransferParams
- type QueryTransfersParams
- type Transfer
- type Transfers
Constants ¶
View Source
const ( EventTypeCreate = "create" EventTypeSend = "send" EventTypeDeposit = "deposit" EventTypeApprove = "approve" )
View Source
const ( AttributeKeyIdentity = "identity" AttributeKeyConsents = "consents" AttributeKeyFrom = "from" AttributeKeyTo = "to" AttributeKeyCoins = "coins" AttributeKeyDeadline = "deadline" AttributeKeyHolder = "holder" )
View Source
const ( ModuleName = "joint" QuerierRoute = ModuleName RouterKey = ModuleName StoreKey = ModuleName )
View Source
const ( QueryAccount = "account" QueryAccounts = "accounts" QueryTransfer = "transfer" QueryTransfers = "transfers" )
Variables ¶
View Source
var ( ErrorMarshal = errors.Register(ModuleName, 101, "failed to marshal") ErrorUnmarshal = errors.Register(ModuleName, 102, "failed to unmarshal") ErrorUnknownMessage = errors.Register(ModuleName, 103, "unknown message") ErrorUnknownQuery = errors.Register(ModuleName, 104, "unknown query") ErrorNegativeCoins = errors.Register(ModuleName, 105, "negative coins") ErrorAccountDoesNotExist = errors.Register(ModuleName, 106, "address does not exist") ErrorTransferDoesNotExist = errors.Register(ModuleName, 107, "transfer does not exist") ErrorDeadlineExceeded = errors.Register(ModuleName, 108, "deadline exceeded") ErrorTransferFulfilled = errors.Register(ModuleName, 109, "transfer fulfilled") ErrorDuplicateSigner = errors.Register(ModuleName, 110, "duplicate signer") ErrorHolderDoesNotExist = errors.Register(ModuleName, 111, "holder does not exist") )
View Source
var ( AccountsCountKey = []byte{0x00} AccountKeyPrefix = []byte{0x01} TransfersCountKey = []byte{0x10} TransferKeyPrefix = []byte{0x11} TransferForDeadlineKeyPrefix = []byte{0x12} )
View Source
var ( EventModuleName = sdk.NewEvent( sdk.EventTypeMessage, sdk.NewAttribute(sdk.AttributeKeyModule, ModuleName), ) )
View Source
var (
ModuleCdc *codec.Codec
)
Functions ¶
func AccountKey ¶
func RegisterCodec ¶
func TransferKey ¶
Types ¶
type Account ¶
type GenesisState ¶
type GenesisState struct { Accounts Accounts `json:"accounts"` Transfers Transfers `json:"transfers"` }
func DefaultGenesisState ¶
func DefaultGenesisState() GenesisState
func NewGenesisState ¶
func NewGenesisState(accounts Accounts, transfers Transfers) GenesisState
type MsgApprove ¶
type MsgApprove struct { Signer sdk.AccAddress `json:"signer"` Identity uint64 `json:"identity"` }
func NewMsgApprove ¶
func NewMsgApprove(signer sdk.AccAddress, identity uint64) MsgApprove
func (MsgApprove) GetSignBytes ¶
func (m MsgApprove) GetSignBytes() []byte
func (MsgApprove) GetSigners ¶
func (m MsgApprove) GetSigners() []sdk.AccAddress
func (MsgApprove) Route ¶
func (m MsgApprove) Route() string
func (MsgApprove) Type ¶
func (m MsgApprove) Type() string
func (MsgApprove) ValidateBasic ¶
func (m MsgApprove) ValidateBasic() error
type MsgCreate ¶
type MsgCreate struct { Signer sdk.AccAddress `json:"signer"` Consents int `json:"consents"` Holders []sdk.AccAddress `json:"holders"` }
func NewMsgCreate ¶
func NewMsgCreate(signer sdk.AccAddress, consents int, holders []sdk.AccAddress) MsgCreate
func (MsgCreate) GetSignBytes ¶
func (MsgCreate) GetSigners ¶
func (m MsgCreate) GetSigners() []sdk.AccAddress
func (MsgCreate) ValidateBasic ¶
type MsgDeposit ¶
type MsgDeposit struct { Signer sdk.AccAddress `json:"signer"` Identity uint64 `json:"identity"` Coins sdk.Coins `json:"coins"` }
func NewMsgDeposit ¶
func NewMsgDeposit(signer sdk.AccAddress, identity uint64, coins sdk.Coins) MsgDeposit
func (MsgDeposit) GetSignBytes ¶
func (m MsgDeposit) GetSignBytes() []byte
func (MsgDeposit) GetSigners ¶
func (m MsgDeposit) GetSigners() []sdk.AccAddress
func (MsgDeposit) Route ¶
func (m MsgDeposit) Route() string
func (MsgDeposit) Type ¶
func (m MsgDeposit) Type() string
func (MsgDeposit) ValidateBasic ¶
func (m MsgDeposit) ValidateBasic() error
type MsgSend ¶
type MsgSend struct { Signer sdk.AccAddress `json:"signer"` From uint64 `json:"from"` To sdk.AccAddress `json:"to"` Coins sdk.Coins `json:"coins"` Deadline time.Time `json:"deadline"` }
func NewMsgSend ¶
func NewMsgSend(signer sdk.AccAddress, from uint64, to sdk.AccAddress, coins sdk.Coins, deadline time.Time) MsgSend
func (MsgSend) GetSignBytes ¶
func (MsgSend) GetSigners ¶
func (m MsgSend) GetSigners() []sdk.AccAddress
func (MsgSend) ValidateBasic ¶
type QueryAccountParams ¶
type QueryAccountParams struct {
Identity uint64 `json:"identity"`
}
func NewQueryAccountParams ¶
func NewQueryAccountParams(identity uint64) QueryAccountParams
type QueryAccountsParams ¶
func NewQueryAccountsParams ¶
func NewQueryAccountsParams(page, limit int) QueryAccountsParams
type QueryTransferParams ¶
type QueryTransferParams struct {
Identity uint64 `json:"identity"`
}
func NewQueryTransferParams ¶
func NewQueryTransferParams(identity uint64) QueryTransferParams
type QueryTransfersParams ¶
func NewQueryTransfersParams ¶
func NewQueryTransfersParams(page, limit int) QueryTransfersParams
Click to show internal directories.
Click to hide internal directories.