Documentation
¶
Index ¶
- Constants
- Variables
- func CalculateRandomHash(randomNumber []byte, timestamp int64) []byte
- func CalculateSwapID(randomNumberHash []byte, sender types.AccAddress, senderOtherChain string) []byte
- func GenerateOrderID(sequence int64, from types.AccAddress) string
- func GetClaimId(chainId sdk.IbcChainID, channelId sdk.IbcChannelID, sequence int64) string
- func Has0xPrefix(input string) bool
- func HexAddress(a []byte) string
- func HexDecode(input string) ([]byte, error)
- func HexEncode(b []byte) string
- func IToOrderType(tpe int8) string
- func IToSide(side int8) string
- func IToTimeInForce(tif int8) string
- func IsValidOrderType(ot int8) bool
- func IsValidSide(side int8) bool
- func IsValidTimeInForce(tif int8) bool
- func MustSortJSON(toSortJSON []byte) []byte
- func RegisterCodec(cdc *amino.Codec)
- func SideStringToSideCode(side string) (int8, error)
- func SortJSON(toSortJSON []byte) ([]byte, error)
- func TifStringToTifCode(tif string) (int8, error)
- func ValidateMiniTokenSymbol(symbol string) error
- func ValidateSymbol(symbol string) error
- type ApproveBindSynPackage
- type BindMsg
- type BindStatus
- type BindSynPackage
- type CSCParamChange
- type CancelOrderMsg
- func (msg CancelOrderMsg) GetInvolvedAddresses() []types.AccAddress
- func (msg CancelOrderMsg) GetSignBytes() []byte
- func (msg CancelOrderMsg) GetSigners() []types.AccAddress
- func (msg CancelOrderMsg) Route() string
- func (msg CancelOrderMsg) String() string
- func (msg CancelOrderMsg) Type() string
- func (msg CancelOrderMsg) ValidateBasic() error
- type Claim
- type ClaimHTLTMsg
- func (msg ClaimHTLTMsg) GetInvolvedAddresses() []types.AccAddress
- func (msg ClaimHTLTMsg) GetSignBytes() []byte
- func (msg ClaimHTLTMsg) GetSigners() []types.AccAddress
- func (msg ClaimHTLTMsg) Route() string
- func (msg ClaimHTLTMsg) String() string
- func (msg ClaimHTLTMsg) Type() string
- func (msg ClaimHTLTMsg) ValidateBasic() error
- type ClaimMsg
- type CommonAckPackage
- type CreateOrderMsg
- func (msg CreateOrderMsg) GetInvolvedAddresses() []types.AccAddress
- func (msg CreateOrderMsg) GetSignBytes() []byte
- func (msg CreateOrderMsg) GetSigners() []types.AccAddress
- func (msg CreateOrderMsg) Route() string
- func (msg CreateOrderMsg) String() string
- func (msg CreateOrderMsg) Type() string
- func (msg CreateOrderMsg) ValidateBasic() error
- type CreateSideChainValidatorMsg
- func (msg CreateSideChainValidatorMsg) GetInvolvedAddresses() []types.AccAddress
- func (msg CreateSideChainValidatorMsg) GetSignBytes() []byte
- func (msg CreateSideChainValidatorMsg) GetSigners() []types.AccAddress
- func (msg CreateSideChainValidatorMsg) Route() string
- func (msg CreateSideChainValidatorMsg) Type() string
- func (msg CreateSideChainValidatorMsg) ValidateBasic() error
- type CrossChainPackage
- type CrossChainPackageType
- type CrossParamChange
- type DBProphecy
- type DepositHTLTMsg
- func (msg DepositHTLTMsg) GetInvolvedAddresses() []types.AccAddress
- func (msg DepositHTLTMsg) GetSignBytes() []byte
- func (msg DepositHTLTMsg) GetSigners() []types.AccAddress
- func (msg DepositHTLTMsg) Route() string
- func (msg DepositHTLTMsg) String() string
- func (msg DepositHTLTMsg) Type() string
- func (msg DepositHTLTMsg) ValidateBasic() error
- type DepositMsg
- func (msg DepositMsg) Get(key interface{}) (value interface{})
- func (msg DepositMsg) GetInvolvedAddresses() []types.AccAddress
- func (msg DepositMsg) GetSignBytes() []byte
- func (msg DepositMsg) GetSigners() []types.AccAddress
- func (msg DepositMsg) Route() string
- func (msg DepositMsg) String() string
- func (msg DepositMsg) Type() string
- func (msg DepositMsg) ValidateBasic() error
- type Description
- type DexListMsg
- func (msg DexListMsg) GetInvolvedAddresses() []types.AccAddress
- func (msg DexListMsg) GetSignBytes() []byte
- func (msg DexListMsg) GetSigners() []types.AccAddress
- func (msg DexListMsg) Route() string
- func (msg DexListMsg) String() string
- func (msg DexListMsg) Type() string
- func (msg DexListMsg) ValidateBasic() error
- type EditSideChainValidatorMsg
- func (msg EditSideChainValidatorMsg) GetInvolvedAddresses() []types.AccAddress
- func (msg EditSideChainValidatorMsg) GetSignBytes() []byte
- func (msg EditSideChainValidatorMsg) GetSigners() []types.AccAddress
- func (msg EditSideChainValidatorMsg) Route() string
- func (msg EditSideChainValidatorMsg) Type() string
- func (msg EditSideChainValidatorMsg) ValidateBasic() error
- type HTLTMsg
- type IbcParams
- type IbcValidator
- type IbcValidatorSetPackage
- type Input
- type ListMiniMsg
- func (msg ListMiniMsg) GetInvolvedAddresses() []types.AccAddress
- func (msg ListMiniMsg) GetSignBytes() []byte
- func (msg ListMiniMsg) GetSigners() []types.AccAddress
- func (msg ListMiniMsg) Route() string
- func (msg ListMiniMsg) String() string
- func (msg ListMiniMsg) Type() string
- func (msg ListMiniMsg) ValidateBasic() error
- type ListTradingPairParams
- type MiniTokenIssueMsg
- func (msg MiniTokenIssueMsg) GetInvolvedAddresses() []types.AccAddress
- func (msg MiniTokenIssueMsg) GetSignBytes() []byte
- func (msg MiniTokenIssueMsg) GetSigners() []types.AccAddress
- func (msg MiniTokenIssueMsg) Route() string
- func (msg MiniTokenIssueMsg) String() string
- func (msg MiniTokenIssueMsg) Type() string
- func (msg MiniTokenIssueMsg) ValidateBasic() error
- type MintMsg
- type Msg
- type MsgCreateValidator
- func (msg MsgCreateValidator) GetInvolvedAddresses() []types.AccAddress
- func (msg MsgCreateValidator) GetSignBytes() []byte
- func (msg MsgCreateValidator) GetSigners() []types.AccAddress
- func (msg MsgCreateValidator) Route() string
- func (msg MsgCreateValidator) Type() string
- func (msg MsgCreateValidator) ValidateBasic() error
- type MsgCreateValidatorProposal
- type MsgRemoveValidator
- func (msg MsgRemoveValidator) GetInvolvedAddresses() []types.AccAddress
- func (msg MsgRemoveValidator) GetSignBytes() []byte
- func (msg MsgRemoveValidator) GetSigners() []types.AccAddress
- func (msg MsgRemoveValidator) Route() string
- func (msg MsgRemoveValidator) Type() string
- func (msg MsgRemoveValidator) ValidateBasic() error
- type MsgSideChainUnjail
- func (msg MsgSideChainUnjail) GetInvolvedAddresses() []types.AccAddress
- func (msg MsgSideChainUnjail) GetSignBytes() []byte
- func (msg MsgSideChainUnjail) GetSigners() []types.AccAddress
- func (msg MsgSideChainUnjail) Route() string
- func (msg MsgSideChainUnjail) Type() string
- func (msg MsgSideChainUnjail) ValidateBasic() error
- type OracleParams
- type Output
- type Package
- type Packages
- type Prophecy
- type ProposalKind
- func (pt ProposalKind) Format(s fmt.State, verb rune)
- func (pt ProposalKind) Marshal() ([]byte, error)
- func (pt ProposalKind) MarshalJSON() ([]byte, error)
- func (pt ProposalKind) String() string
- func (pt *ProposalKind) Unmarshal(data []byte) error
- func (pt *ProposalKind) UnmarshalJSON(data []byte) error
- type RefundHTLTMsg
- func (msg RefundHTLTMsg) GetInvolvedAddresses() []types.AccAddress
- func (msg RefundHTLTMsg) GetSignBytes() []byte
- func (msg RefundHTLTMsg) GetSigners() []types.AccAddress
- func (msg RefundHTLTMsg) Route() string
- func (msg RefundHTLTMsg) String() string
- func (msg RefundHTLTMsg) Type() string
- func (msg RefundHTLTMsg) ValidateBasic() error
- type SCChangeParams
- type SCParam
- type SendMsg
- type SetAccountFlagsMsg
- func (msg SetAccountFlagsMsg) GetInvolvedAddresses() []types.AccAddress
- func (msg SetAccountFlagsMsg) GetSignBytes() []byte
- func (msg SetAccountFlagsMsg) GetSigners() []types.AccAddress
- func (msg SetAccountFlagsMsg) Route() string
- func (msg SetAccountFlagsMsg) String() string
- func (msg SetAccountFlagsMsg) Type() string
- func (msg SetAccountFlagsMsg) ValidateBasic() error
- type SetURIMsg
- func (msg SetURIMsg) GetInvolvedAddresses() []types.AccAddress
- func (msg SetURIMsg) GetSignBytes() []byte
- func (msg SetURIMsg) GetSigners() []types.AccAddress
- func (msg SetURIMsg) Route() string
- func (msg SetURIMsg) String() string
- func (msg SetURIMsg) Type() string
- func (msg SetURIMsg) ValidateBasic() error
- type SideChainDelegateMsg
- func (msg SideChainDelegateMsg) GetInvolvedAddresses() []types.AccAddress
- func (msg SideChainDelegateMsg) GetSignBytes() []byte
- func (msg SideChainDelegateMsg) GetSigners() []types.AccAddress
- func (msg SideChainDelegateMsg) Route() string
- func (msg SideChainDelegateMsg) Type() string
- func (msg SideChainDelegateMsg) ValidateBasic() error
- type SideChainDepositMsg
- func (msg SideChainDepositMsg) GetInvolvedAddresses() []types.AccAddress
- func (msg SideChainDepositMsg) GetSignBytes() []byte
- func (msg SideChainDepositMsg) GetSigners() []types.AccAddress
- func (msg SideChainDepositMsg) Route() string
- func (msg SideChainDepositMsg) String() string
- func (msg SideChainDepositMsg) Type() string
- func (msg SideChainDepositMsg) ValidateBasic() error
- type SideChainRedelegateMsg
- func (msg SideChainRedelegateMsg) GetInvolvedAddresses() []types.AccAddress
- func (msg SideChainRedelegateMsg) GetSignBytes() []byte
- func (msg SideChainRedelegateMsg) GetSigners() []types.AccAddress
- func (msg SideChainRedelegateMsg) Route() string
- func (msg SideChainRedelegateMsg) Type() string
- func (msg SideChainRedelegateMsg) ValidateBasic() error
- type SideChainSubmitProposalMsg
- func (msg SideChainSubmitProposalMsg) GetInvolvedAddresses() []types.AccAddress
- func (msg SideChainSubmitProposalMsg) GetSignBytes() []byte
- func (msg SideChainSubmitProposalMsg) GetSigners() []types.AccAddress
- func (msg SideChainSubmitProposalMsg) Route() string
- func (msg SideChainSubmitProposalMsg) String() string
- func (msg SideChainSubmitProposalMsg) Type() string
- func (msg SideChainSubmitProposalMsg) ValidateBasic() error
- type SideChainUndelegateMsg
- func (msg SideChainUndelegateMsg) GetInvolvedAddresses() []types.AccAddress
- func (msg SideChainUndelegateMsg) GetSignBytes() []byte
- func (msg SideChainUndelegateMsg) GetSigners() []types.AccAddress
- func (msg SideChainUndelegateMsg) Route() string
- func (msg SideChainUndelegateMsg) Type() string
- func (msg SideChainUndelegateMsg) ValidateBasic() error
- type SideChainVoteMsg
- func (msg SideChainVoteMsg) GetInvolvedAddresses() []types.AccAddress
- func (msg SideChainVoteMsg) GetSignBytes() []byte
- func (msg SideChainVoteMsg) GetSigners() []types.AccAddress
- func (msg SideChainVoteMsg) Route() string
- func (msg SideChainVoteMsg) String() string
- func (msg SideChainVoteMsg) Type() string
- func (msg SideChainVoteMsg) ValidateBasic() error
- type SideDowntimeSlashPackage
- type SlashParams
- type SmartChainAddress
- type StakeParams
- type Status
- type StatusText
- type SubmitProposalMsg
- func (msg SubmitProposalMsg) Get(key interface{}) (value interface{})
- func (msg SubmitProposalMsg) GetInvolvedAddresses() []types.AccAddress
- func (msg SubmitProposalMsg) GetSignBytes() []byte
- func (msg SubmitProposalMsg) GetSigners() []types.AccAddress
- func (msg SubmitProposalMsg) Route() string
- func (msg SubmitProposalMsg) String() string
- func (msg SubmitProposalMsg) Type() string
- func (msg SubmitProposalMsg) ValidateBasic() error
- type TimeLockMsg
- func (msg TimeLockMsg) GetInvolvedAddresses() []types.AccAddress
- func (msg TimeLockMsg) GetSignBytes() []byte
- func (msg TimeLockMsg) GetSigners() []types.AccAddress
- func (msg TimeLockMsg) Route() string
- func (msg TimeLockMsg) String() string
- func (msg TimeLockMsg) Type() string
- func (msg TimeLockMsg) ValidateBasic() error
- type TimeRelockMsg
- func (msg TimeRelockMsg) GetInvolvedAddresses() []types.AccAddress
- func (msg TimeRelockMsg) GetSignBytes() []byte
- func (msg TimeRelockMsg) GetSigners() []types.AccAddress
- func (msg TimeRelockMsg) Route() string
- func (msg TimeRelockMsg) String() string
- func (msg TimeRelockMsg) Type() string
- func (msg TimeRelockMsg) ValidateBasic() error
- type TimeUnlockMsg
- func (msg TimeUnlockMsg) GetInvolvedAddresses() []types.AccAddress
- func (msg TimeUnlockMsg) GetSignBytes() []byte
- func (msg TimeUnlockMsg) GetSigners() []types.AccAddress
- func (msg TimeUnlockMsg) Route() string
- func (msg TimeUnlockMsg) String() string
- func (msg TimeUnlockMsg) Type() string
- func (msg TimeUnlockMsg) ValidateBasic() error
- type TinyTokenIssueMsg
- func (msg TinyTokenIssueMsg) GetInvolvedAddresses() []types.AccAddress
- func (msg TinyTokenIssueMsg) GetSignBytes() []byte
- func (msg TinyTokenIssueMsg) GetSigners() []types.AccAddress
- func (msg TinyTokenIssueMsg) Route() string
- func (msg TinyTokenIssueMsg) String() string
- func (msg TinyTokenIssueMsg) Type() string
- func (msg TinyTokenIssueMsg) ValidateBasic() error
- type TokenBurnMsg
- func (msg TokenBurnMsg) GetInvolvedAddresses() []types.AccAddress
- func (msg TokenBurnMsg) GetSignBytes() []byte
- func (msg TokenBurnMsg) GetSigners() []types.AccAddress
- func (msg TokenBurnMsg) Route() string
- func (msg TokenBurnMsg) String() string
- func (msg TokenBurnMsg) Type() string
- func (msg TokenBurnMsg) ValidateBasic() error
- type TokenFreezeMsg
- func (msg TokenFreezeMsg) GetInvolvedAddresses() []types.AccAddress
- func (msg TokenFreezeMsg) GetSignBytes() []byte
- func (msg TokenFreezeMsg) GetSigners() []types.AccAddress
- func (msg TokenFreezeMsg) Route() string
- func (msg TokenFreezeMsg) String() string
- func (msg TokenFreezeMsg) Type() string
- func (msg TokenFreezeMsg) ValidateBasic() error
- type TokenIssueMsg
- func (msg TokenIssueMsg) GetInvolvedAddresses() []types.AccAddress
- func (msg TokenIssueMsg) GetSignBytes() []byte
- func (msg TokenIssueMsg) GetSigners() []types.AccAddress
- func (msg TokenIssueMsg) Route() string
- func (msg TokenIssueMsg) String() string
- func (msg TokenIssueMsg) Type() string
- func (msg TokenIssueMsg) ValidateBasic() error
- type TokenUnfreezeMsg
- func (msg TokenUnfreezeMsg) GetInvolvedAddresses() []types.AccAddress
- func (msg TokenUnfreezeMsg) GetSignBytes() []byte
- func (msg TokenUnfreezeMsg) GetSigners() []types.AccAddress
- func (msg TokenUnfreezeMsg) Route() string
- func (msg TokenUnfreezeMsg) String() string
- func (msg TokenUnfreezeMsg) Type() string
- func (msg TokenUnfreezeMsg) ValidateBasic() error
- type Transfer
- type TransferInSynPackage
- type TransferOutMsg
- func (msg TransferOutMsg) GetInvolvedAddresses() []sdk.AccAddress
- func (msg TransferOutMsg) GetSignBytes() []byte
- func (msg TransferOutMsg) GetSigners() []sdk.AccAddress
- func (msg TransferOutMsg) Route() string
- func (msg TransferOutMsg) String() string
- func (msg TransferOutMsg) Type() string
- func (msg TransferOutMsg) ValidateBasic() error
- type TransferOutRefundPackage
- type TransferOutSynPackage
- type UnbindMsg
- func (msg UnbindMsg) GetInvolvedAddresses() []sdk.AccAddress
- func (msg UnbindMsg) GetSignBytes() []byte
- func (msg UnbindMsg) GetSigners() []sdk.AccAddress
- func (msg UnbindMsg) Route() string
- func (msg UnbindMsg) String() string
- func (msg UnbindMsg) Type() string
- func (msg UnbindMsg) ValidateBasic() error
- type VoteMsg
- func (msg VoteMsg) Get(key interface{}) (value interface{})
- func (msg VoteMsg) GetInvolvedAddresses() []types.AccAddress
- func (msg VoteMsg) GetSignBytes() []byte
- func (msg VoteMsg) GetSigners() []types.AccAddress
- func (msg VoteMsg) Route() string
- func (msg VoteMsg) String() string
- func (msg VoteMsg) Type() string
- func (msg VoteMsg) ValidateBasic() error
- type VoteOption
Constants ¶
const ( AtomicSwapRoute = "atomicSwap" HTLT = "HTLT" DepositHTLT = "depositHTLT" ClaimHTLT = "claimHTLT" RefundHTLT = "refundHTLT" Int64Size = 8 RandomNumberHashLength = 32 RandomNumberLength = 32 MaxOtherChainAddrLength = 64 SwapIDLength = 32 MaxExpectedIncomeLength = 64 MinimumHeightSpan = 360 MaximumHeightSpan = 518400 )
const ( RouteBridge = "bridge" BindMsgType = "crossBind" UnbindMsgType = "crossUnbind" TransferOutMsgType = "crossTransferOut" )
const ( MsgRoute = "gov" MaxTitleLength = 128 MaxDescriptionLength int = 2048 MaxVotingPeriod = 2 * 7 * 24 * 60 * 60 * time.Second // 2 weeks )
name to idetify transaction types
const ( MiniRoute = "miniTokensIssue" IssueMiniMsgType = "miniIssueMsg" )
const ( RouteOracle = "oracle" ClaimMsgType = "oracleClaim" OracleChannelId sdk.IbcChannelID = 0x00 )
const ( CrossChainFeeLength = 32 PackageTypeLength = 1 PackageHeaderLength = CrossChainFeeLength + PackageTypeLength )
const ( RouteNewOrder = "orderNew" RouteCancelOrder = "orderCancel" )
Order routes
const ( AccountFlagsRoute = "accountFlags" SetAccountFlagsMsgType = "setAccountFlags" )
const ( MsgTypeSideSubmitProposal = "side_submit_proposal" MsgTypeSideDeposit = "side_deposit" MsgTypeSideVote = "side_vote" // side chain params change ProposalTypeSCParamsChange ProposalKind = 0x81 // cross side chain param change ProposalTypeCSCParamsChange ProposalKind = 0x82 MaxSideChainIdLength = 20 )
const ( TypeMsgSideChainUnjail = "side_chain_unjail" SideChainSlashMsgRoute = "slashing" )
const ( TypeCreateSideChainValidator = "side_create_validator" TypeEditSideChainValidator = "side_edit_validator" TypeSideChainDelegate = "side_delegate" TypeSideChainRedelegate = "side_redelegate" TypeSideChainUndelegate = "side_undelegate" SideChainStakeMsgRoute = "stake" SideChainAddrLen = 20 MinDelegationAmount = 1e8 )
const ( MaxTimeLockDescriptionLength = 128 MinLockTime = 60 * time.Second InitialRecordId = 1 )
const ( DotBSuffix = ".B" NativeToken = "BNB" NativeTokenDotBSuffixed = "BNB" + DotBSuffix Decimals int8 = 8 MaxTotalSupply int64 = 9000000000000000000 // 90 billions with 8 decimal digits TokenSymbolMaxLen = 8 TokenSymbolMinLen = 3 TokenSymbolTxHashSuffixLen = 3 MiniTokenSymbolMaxLen = 8 MiniTokenSymbolMinLen = 3 MiniTokenSymbolSuffixLen = 4 MiniTokenSymbolMSuffix = "M" MiniTokenSymbolTxHashSuffixLen = 3 MaxMiniTokenNameLength = 32 MaxTokenURILength = 2048 )
constants
const (
IssueTinyMsgType = "tinyIssueMsg"
)
const (
MaxSymbolLength = 32
)
Variables ¶
var ( // bnb prefix address: bnb1wxeplyw7x8aahy93w96yhwm7xcq3ke4f8ge93u // tbnb prefix address: tbnb1wxeplyw7x8aahy93w96yhwm7xcq3ke4ffasp3d AtomicSwapCoinsAccAddr = types.AccAddress(crypto.AddressHash([]byte("BinanceChainAtomicSwapCoins"))) )
var MsgCdc = amino.NewCodec()
var OrderSide = struct { BUY int8 SELL int8 }{1, 2}
OrderSide /TimeInForce /OrderType are const, following FIX protocol convention Used as Enum
var OrderType = struct { LIMIT int8 MARKET int8 }{orderLimit, orderMarket}
OrderType is an enum of order type options supported by the matching engine
var StatusTextToString = [...]string{"pending", "success", "failed"}
var StringToStatusText = map[string]StatusText{ "pending": PendingStatusText, "success": SuccessStatusText, "failed": FailedStatusText, }
var TimeInForce = struct { GTC int8 IOC int8 }{tifGTC, tifIOC}
TimeInForce is an enum of TIF (Time in Force) options supported by the matching engine
var (
TimeLockCoinsAccAddr = types.AccAddress(crypto.AddressHash([]byte("BinanceChainTimeLockCoins")))
)
Functions ¶
func CalculateRandomHash ¶ added in v1.1.3
func CalculateSwapID ¶ added in v1.1.3
func CalculateSwapID(randomNumberHash []byte, sender types.AccAddress, senderOtherChain string) []byte
func GenerateOrderID ¶
func GenerateOrderID(sequence int64, from types.AccAddress) string
GenerateOrderID generates an order ID
func GetClaimId ¶ added in v1.2.4
func GetClaimId(chainId sdk.IbcChainID, channelId sdk.IbcChannelID, sequence int64) string
func Has0xPrefix ¶ added in v1.2.4
has0xPrefix validates str begins with '0x' or '0X'.
func HexAddress ¶ added in v1.2.4
func IsValidOrderType ¶
IsValidOrderType validates that an order type is valid and supported by the matching engine
func IsValidSide ¶
IsValidSide validates that a side is valid and supported by the matching engine
func IsValidTimeInForce ¶
IsValidTimeInForce validates that a tif code is correct
func MustSortJSON ¶
MustSortJSON is like SortJSON but panic if an error occurs, e.g., if the passed JSON isn't valid.
func RegisterCodec ¶
func RegisterCodec(cdc *amino.Codec)
func SideStringToSideCode ¶
SideStringToSideCode converts a string like "BUY" to its internal side code
func SortJSON ¶
SortJSON takes any JSON and returns it sorted by keys. Also, all white-spaces are removed. This method can be used to canonicalize JSON to be returned by GetSignBytes, e.g. for the ledger integration. If the passed JSON isn't valid it will return an error.
func TifStringToTifCode ¶
TifStringToTifCode converts a string like "GTC" to its internal tif code
func ValidateMiniTokenSymbol ¶ added in v1.2.3
Types ¶
type ApproveBindSynPackage ¶ added in v1.2.4
type BindMsg ¶ added in v1.2.4
type BindMsg struct { From sdk.AccAddress `json:"from"` Symbol string `json:"symbol"` Amount int64 `json:"amount"` ContractAddress SmartChainAddress `json:"contract_address"` ContractDecimals int8 `json:"contract_decimals"` ExpireTime int64 `json:"expire_time"` }
func NewBindMsg ¶ added in v1.2.4
func NewBindMsg(from sdk.AccAddress, symbol string, amount int64, contractAddress SmartChainAddress, contractDecimals int8, expireTime int64) BindMsg
func (BindMsg) GetInvolvedAddresses ¶ added in v1.2.4
func (msg BindMsg) GetInvolvedAddresses() []sdk.AccAddress
func (BindMsg) GetSignBytes ¶ added in v1.2.4
func (BindMsg) GetSigners ¶ added in v1.2.4
func (msg BindMsg) GetSigners() []sdk.AccAddress
func (BindMsg) ValidateBasic ¶ added in v1.2.4
type BindStatus ¶ added in v1.2.4
type BindStatus int8
type BindSynPackage ¶ added in v1.2.4
type CSCParamChange ¶ added in v1.2.4
type CSCParamChange struct { Key string `json:"key"` // the name of the parameter Value string `json:"value"` Target string `json:"target"` // Since byte slice is not friendly to show in proposal description, omit it. ValueBytes []byte `json:"-"` // the value of the parameter TargetBytes []byte `json:"-"` // the address of the target contract }
func (*CSCParamChange) Check ¶ added in v1.2.4
func (c *CSCParamChange) Check() error
type CancelOrderMsg ¶
type CancelOrderMsg struct { Sender types.AccAddress `json:"sender"` Symbol string `json:"symbol"` RefID string `json:"refid"` }
CancelOrderMsg represents a message to cancel an open order
func NewCancelOrderMsg ¶
func NewCancelOrderMsg(sender types.AccAddress, symbol, refID string) CancelOrderMsg
NewCancelOrderMsg constructs a new CancelOrderMsg
func (CancelOrderMsg) GetInvolvedAddresses ¶
func (msg CancelOrderMsg) GetInvolvedAddresses() []types.AccAddress
GetInvolvedAddresses as part of Msg interface
func (CancelOrderMsg) GetSignBytes ¶
func (msg CancelOrderMsg) GetSignBytes() []byte
GetSignBytes - Get the bytes for the message signer to sign on
func (CancelOrderMsg) GetSigners ¶
func (msg CancelOrderMsg) GetSigners() []types.AccAddress
GetSigners is part of Msg interface
func (CancelOrderMsg) Route ¶
func (msg CancelOrderMsg) Route() string
Route is part of Msg interface
func (CancelOrderMsg) String ¶
func (msg CancelOrderMsg) String() string
String is part of Msg interface
func (CancelOrderMsg) ValidateBasic ¶
func (msg CancelOrderMsg) ValidateBasic() error
ValidateBasic is used to quickly disqualify obviously invalid messages quickly
type Claim ¶ added in v1.2.4
type Claim struct { ID string `json:"id"` ValidatorAddress sdk.ValAddress `json:"validator_address"` Content string `json:"content"` }
Claim contains an arbitrary claim with arbitrary content made by a given validator
type ClaimHTLTMsg ¶ added in v1.1.3
type ClaimHTLTMsg struct { From types.AccAddress `json:"from"` SwapID types.SwapBytes `json:"swap_id"` RandomNumber types.SwapBytes `json:"random_number"` }
func NewClaimHTLTMsg ¶ added in v1.1.3
func NewClaimHTLTMsg(from types.AccAddress, swapID, randomNumber []byte) ClaimHTLTMsg
func (ClaimHTLTMsg) GetInvolvedAddresses ¶ added in v1.1.3
func (msg ClaimHTLTMsg) GetInvolvedAddresses() []types.AccAddress
func (ClaimHTLTMsg) GetSignBytes ¶ added in v1.1.3
func (msg ClaimHTLTMsg) GetSignBytes() []byte
func (ClaimHTLTMsg) GetSigners ¶ added in v1.1.3
func (msg ClaimHTLTMsg) GetSigners() []types.AccAddress
func (ClaimHTLTMsg) Route ¶ added in v1.1.3
func (msg ClaimHTLTMsg) Route() string
func (ClaimHTLTMsg) String ¶ added in v1.1.3
func (msg ClaimHTLTMsg) String() string
func (ClaimHTLTMsg) Type ¶ added in v1.1.3
func (msg ClaimHTLTMsg) Type() string
func (ClaimHTLTMsg) ValidateBasic ¶ added in v1.1.3
func (msg ClaimHTLTMsg) ValidateBasic() error
type ClaimMsg ¶ added in v1.2.4
type ClaimMsg struct { ChainId sdk.IbcChainID `json:"chain_id"` Sequence uint64 `json:"sequence"` Payload []byte `json:"payload"` ValidatorAddress sdk.AccAddress `json:"validator_address"` }
func NewClaimMsg ¶ added in v1.2.4
func NewClaimMsg(ChainId sdk.IbcChainID, sequence uint64, payload []byte, validatorAddr sdk.AccAddress) ClaimMsg
func (ClaimMsg) GetInvolvedAddresses ¶ added in v1.2.4
func (msg ClaimMsg) GetInvolvedAddresses() []sdk.AccAddress
func (ClaimMsg) GetSignBytes ¶ added in v1.2.4
GetSignBytes - Get the bytes for the message signer to sign on
func (ClaimMsg) GetSigners ¶ added in v1.2.4
func (msg ClaimMsg) GetSigners() []sdk.AccAddress
func (ClaimMsg) ValidateBasic ¶ added in v1.2.4
ValidateBasic is used to quickly disqualify obviously invalid messages quickly
type CommonAckPackage ¶ added in v1.2.4
type CommonAckPackage struct {
Code uint32
}
type CreateOrderMsg ¶
type CreateOrderMsg struct { Sender types.AccAddress `json:"sender"` ID string `json:"id"` Symbol string `json:"symbol"` OrderType int8 `json:"ordertype"` Side int8 `json:"side"` Price int64 `json:"price"` Quantity int64 `json:"quantity"` TimeInForce int8 `json:"timeinforce"` }
CreateOrderMsg def
func NewCreateOrderMsg ¶
func NewCreateOrderMsg(sender types.AccAddress, id string, side int8, symbol string, price int64, qty int64) CreateOrderMsg
NewCreateOrderMsg constructs a new CreateOrderMsg
func (CreateOrderMsg) GetInvolvedAddresses ¶
func (msg CreateOrderMsg) GetInvolvedAddresses() []types.AccAddress
GetInvolvedAddresses as part of the Msg interface
func (CreateOrderMsg) GetSignBytes ¶
func (msg CreateOrderMsg) GetSignBytes() []byte
GetSignBytes - Get the bytes for the message signer to sign on
func (CreateOrderMsg) GetSigners ¶
func (msg CreateOrderMsg) GetSigners() []types.AccAddress
GetSigners is part of Msg interface
func (CreateOrderMsg) Route ¶
func (msg CreateOrderMsg) Route() string
Route is part of Msg interface
func (CreateOrderMsg) String ¶
func (msg CreateOrderMsg) String() string
String is part of Msg interface
func (CreateOrderMsg) ValidateBasic ¶
func (msg CreateOrderMsg) ValidateBasic() error
ValidateBasic is used to quickly disqualify obviously invalid messages quickly
type CreateSideChainValidatorMsg ¶ added in v1.2.4
type CreateSideChainValidatorMsg struct { Description Description `json:"description"` Commission types.CommissionMsg `json:"commission"` DelegatorAddr types.AccAddress `json:"delegator_address"` ValidatorAddr types.ValAddress `json:"validator_address"` Delegation types.Coin `json:"delegation"` SideChainId string `json:"side_chain_id"` SideConsAddr []byte `json:"side_cons_addr"` SideFeeAddr []byte `json:"side_fee_addr"` }
func NewCreateSideChainValidatorMsg ¶ added in v1.2.4
func NewCreateSideChainValidatorMsg(valAddr types.ValAddress, delegation types.Coin, description Description, commission types.CommissionMsg, sideChainId string, sideConsAddr []byte, sideFeeAddr []byte) CreateSideChainValidatorMsg
func NewMsgCreateSideChainValidatorOnBehalfOf ¶ added in v1.2.4
func NewMsgCreateSideChainValidatorOnBehalfOf(delegatorAddr types.AccAddress, valAddr types.ValAddress, delegation types.Coin, description Description, commission types.CommissionMsg, sideChainId string, sideConsAddr []byte, sideFeeAddr []byte) CreateSideChainValidatorMsg
func (CreateSideChainValidatorMsg) GetInvolvedAddresses ¶ added in v1.2.4
func (msg CreateSideChainValidatorMsg) GetInvolvedAddresses() []types.AccAddress
func (CreateSideChainValidatorMsg) GetSignBytes ¶ added in v1.2.4
func (msg CreateSideChainValidatorMsg) GetSignBytes() []byte
func (CreateSideChainValidatorMsg) GetSigners ¶ added in v1.2.4
func (msg CreateSideChainValidatorMsg) GetSigners() []types.AccAddress
func (CreateSideChainValidatorMsg) Route ¶ added in v1.2.4
func (msg CreateSideChainValidatorMsg) Route() string
func (CreateSideChainValidatorMsg) Type ¶ added in v1.2.4
func (msg CreateSideChainValidatorMsg) Type() string
func (CreateSideChainValidatorMsg) ValidateBasic ¶ added in v1.2.4
func (msg CreateSideChainValidatorMsg) ValidateBasic() error
type CrossChainPackage ¶ added in v1.2.4
type CrossChainPackage struct { PackageType CrossChainPackageType RelayFee big.Int Content interface{} }
func ParseClaimPayload ¶ added in v1.2.4
func ParseClaimPayload(payload []byte) ([]CrossChainPackage, error)
type CrossChainPackageType ¶ added in v1.2.4
type CrossChainPackageType uint8
const ( SynCrossChainPackageType CrossChainPackageType = 0x00 AckCrossChainPackageType CrossChainPackageType = 0x01 FailAckCrossChainPackageType CrossChainPackageType = 0x02 )
func DecodePackageHeader ¶ added in v1.2.4
func DecodePackageHeader(packageHeader []byte) (packageType CrossChainPackageType, relayFee big.Int, err error)
type CrossParamChange ¶ added in v1.2.4
type DBProphecy ¶ added in v1.2.4
type DBProphecy struct { ID string `json:"id"` Status Status `json:"status"` ValidatorClaims []byte `json:"validator_claims"` }
DBProphecy is what the prophecy becomes when being saved to the database.
Tendermint/Amino does not support maps so we must serialize those variables into bytes.
func (DBProphecy) DeserializeFromDB ¶ added in v1.2.4
func (dbProphecy DBProphecy) DeserializeFromDB() (Prophecy, error)
DeserializeFromDB deserializes a DBProphecy into a prophecy
type DepositHTLTMsg ¶ added in v1.1.3
type DepositHTLTMsg struct { From types.AccAddress `json:"from"` Amount types.Coins `json:"amount"` SwapID types.SwapBytes `json:"swap_id"` }
func NewDepositHTLTMsg ¶ added in v1.1.3
func NewDepositHTLTMsg(from types.AccAddress, swapID []byte, amount types.Coins) DepositHTLTMsg
func (DepositHTLTMsg) GetInvolvedAddresses ¶ added in v1.1.3
func (msg DepositHTLTMsg) GetInvolvedAddresses() []types.AccAddress
func (DepositHTLTMsg) GetSignBytes ¶ added in v1.1.3
func (msg DepositHTLTMsg) GetSignBytes() []byte
func (DepositHTLTMsg) GetSigners ¶ added in v1.1.3
func (msg DepositHTLTMsg) GetSigners() []types.AccAddress
func (DepositHTLTMsg) Route ¶ added in v1.1.3
func (msg DepositHTLTMsg) Route() string
func (DepositHTLTMsg) String ¶ added in v1.1.3
func (msg DepositHTLTMsg) String() string
func (DepositHTLTMsg) Type ¶ added in v1.1.3
func (msg DepositHTLTMsg) Type() string
func (DepositHTLTMsg) ValidateBasic ¶ added in v1.1.3
func (msg DepositHTLTMsg) ValidateBasic() error
type DepositMsg ¶
type DepositMsg struct { ProposalID int64 `json:"proposal_id"` // ID of the proposal Depositer types.AccAddress `json:"depositer"` // Address of the depositer Amount types.Coins `json:"amount"` // Coins to add to the proposal's deposit }
----------------------------------------------------------- DepositMsg
func NewDepositMsg ¶
func NewDepositMsg(depositer types.AccAddress, proposalID int64, amount types.Coins) DepositMsg
func (DepositMsg) Get ¶
func (msg DepositMsg) Get(key interface{}) (value interface{})
Implements Msg.
func (DepositMsg) GetInvolvedAddresses ¶
func (msg DepositMsg) GetInvolvedAddresses() []types.AccAddress
func (DepositMsg) GetSigners ¶
func (msg DepositMsg) GetSigners() []types.AccAddress
Implements Msg.
func (DepositMsg) String ¶
func (msg DepositMsg) String() string
func (DepositMsg) Type ¶
func (msg DepositMsg) Type() string
type Description ¶ added in v1.0.5
type Description struct { Moniker string `json:"moniker"` // name Identity string `json:"identity"` // optional identity signature (ex. UPort or Keybase) Website string `json:"website"` // optional website link Details string `json:"details"` // optional details }
Description - description fields for a validator
func (Description) EnsureLength ¶ added in v1.0.5
func (d Description) EnsureLength() (Description, error)
EnsureLength ensures the length of a validator's description.
type DexListMsg ¶
type DexListMsg struct { From types.AccAddress `json:"from"` ProposalId int64 `json:"proposal_id"` BaseAssetSymbol string `json:"base_asset_symbol"` QuoteAssetSymbol string `json:"quote_asset_symbol"` InitPrice int64 `json:"init_price"` }
DexListMsg def
func NewDexListMsg ¶
func NewDexListMsg(from types.AccAddress, proposalId int64, baseAssetSymbol string, quoteAssetSymbol string, initPrice int64) DexListMsg
NewDexListMsg for instance creation
func (DexListMsg) GetInvolvedAddresses ¶
func (msg DexListMsg) GetInvolvedAddresses() []types.AccAddress
GetInvolvedAddresses part of Msg interface
func (DexListMsg) GetSignBytes ¶
func (msg DexListMsg) GetSignBytes() []byte
GetSignBytes part of Msg interface
func (DexListMsg) GetSigners ¶
func (msg DexListMsg) GetSigners() []types.AccAddress
GetSigners part of Msg interface
func (DexListMsg) ValidateBasic ¶
func (msg DexListMsg) ValidateBasic() error
ValidateBasic part of Msg interface
type EditSideChainValidatorMsg ¶ added in v1.2.4
type EditSideChainValidatorMsg struct { Description Description `json:"description"` ValidatorAddr types.ValAddress `json:"address"` CommissionRate *types.Dec `json:"commission_rate"` SideChainId string `json:"side_chain_id"` SideFeeAddr []byte `json:"side_fee_addr"` }
func NewEditSideChainValidatorMsg ¶ added in v1.2.4
func NewEditSideChainValidatorMsg(sideChainId string, validatorAddr types.ValAddress, description Description, commissionRate *types.Dec, sideFeeAddr []byte) EditSideChainValidatorMsg
func (EditSideChainValidatorMsg) GetInvolvedAddresses ¶ added in v1.2.4
func (msg EditSideChainValidatorMsg) GetInvolvedAddresses() []types.AccAddress
func (EditSideChainValidatorMsg) GetSignBytes ¶ added in v1.2.4
func (msg EditSideChainValidatorMsg) GetSignBytes() []byte
func (EditSideChainValidatorMsg) GetSigners ¶ added in v1.2.4
func (msg EditSideChainValidatorMsg) GetSigners() []types.AccAddress
func (EditSideChainValidatorMsg) Route ¶ added in v1.2.4
func (msg EditSideChainValidatorMsg) Route() string
func (EditSideChainValidatorMsg) Type ¶ added in v1.2.4
func (msg EditSideChainValidatorMsg) Type() string
func (EditSideChainValidatorMsg) ValidateBasic ¶ added in v1.2.4
func (msg EditSideChainValidatorMsg) ValidateBasic() error
type HTLTMsg ¶ added in v1.1.3
type HTLTMsg struct { From types.AccAddress `json:"from"` To types.AccAddress `json:"to"` RecipientOtherChain string `json:"recipient_other_chain"` SenderOtherChain string `json:"sender_other_chain"` RandomNumberHash types.SwapBytes `json:"random_number_hash"` Timestamp int64 `json:"timestamp"` Amount types.Coins `json:"amount"` ExpectedIncome string `json:"expected_income"` HeightSpan int64 `json:"height_span"` CrossChain bool `json:"cross_chain"` }
func NewHTLTMsg ¶ added in v1.1.3
func (HTLTMsg) GetInvolvedAddresses ¶ added in v1.1.3
func (msg HTLTMsg) GetInvolvedAddresses() []types.AccAddress
func (HTLTMsg) GetSignBytes ¶ added in v1.1.3
func (HTLTMsg) GetSigners ¶ added in v1.1.3
func (msg HTLTMsg) GetSigners() []types.AccAddress
func (HTLTMsg) ValidateBasic ¶ added in v1.1.3
type IbcParams ¶ added in v1.2.4
type IbcParams struct {
RelayerFee int64 `json:"relayer_fee"`
}
func (*IbcParams) GetParamAttribute ¶ added in v1.2.4
func (*IbcParams) UpdateCheck ¶ added in v1.2.4
type IbcValidator ¶ added in v1.2.4
type IbcValidatorSetPackage ¶ added in v1.2.4
type IbcValidatorSetPackage struct { Type uint8 ValidatorSet []IbcValidator }
type Input ¶
type Input struct { Address types.AccAddress `json:"address"` Coins types.Coins `json:"coins"` }
Transaction Input
func NewInput ¶
func NewInput(addr types.AccAddress, coins types.Coins) Input
NewInput - create a transaction input, used with SendMsg
func (Input) ValidateBasic ¶
ValidateBasic - validate transaction input
type ListMiniMsg ¶ added in v1.2.3
type ListMiniMsg struct { From types.AccAddress `json:"from"` BaseAssetSymbol string `json:"base_asset_symbol"` QuoteAssetSymbol string `json:"quote_asset_symbol"` InitPrice int64 `json:"init_price"` }
ListMiniMsg def
func NewListMiniMsg ¶ added in v1.2.3
func NewListMiniMsg(from types.AccAddress, baseAssetSymbol string, quoteAssetSymbol string, initPrice int64) ListMiniMsg
NewListMiniMsg for instance creation
func (ListMiniMsg) GetInvolvedAddresses ¶ added in v1.2.3
func (msg ListMiniMsg) GetInvolvedAddresses() []types.AccAddress
GetInvolvedAddresses part of Msg interface
func (ListMiniMsg) GetSignBytes ¶ added in v1.2.3
func (msg ListMiniMsg) GetSignBytes() []byte
GetSignBytes part of Msg interface
func (ListMiniMsg) GetSigners ¶ added in v1.2.3
func (msg ListMiniMsg) GetSigners() []types.AccAddress
GetSigners part of Msg interface
func (ListMiniMsg) Route ¶ added in v1.2.3
func (msg ListMiniMsg) Route() string
Route part of Msg interface
func (ListMiniMsg) String ¶ added in v1.2.3
func (msg ListMiniMsg) String() string
String part of Msg interface
func (ListMiniMsg) Type ¶ added in v1.2.3
func (msg ListMiniMsg) Type() string
Type part of Msg interface
func (ListMiniMsg) ValidateBasic ¶ added in v1.2.3
func (msg ListMiniMsg) ValidateBasic() error
ValidateBasic part of Msg interface
type ListTradingPairParams ¶
type ListTradingPairParams struct { BaseAssetSymbol string `json:"base_asset_symbol"` // base asset symbol QuoteAssetSymbol string `json:"quote_asset_symbol"` // quote asset symbol InitPrice int64 `json:"init_price"` // init price Description string `json:"description"` // description ExpireTime time.Time `json:"expire_time"` // expire time }
-----------------------------------------------------------
type MiniTokenIssueMsg ¶ added in v1.2.3
type MiniTokenIssueMsg struct { From types.AccAddress `json:"from"` Name string `json:"name"` Symbol string `json:"symbol"` TotalSupply int64 `json:"total_supply"` Mintable bool `json:"mintable"` TokenURI string `json:"token_uri"` }
MiniTokenIssueMsg def
func NewMiniTokenIssueMsg ¶ added in v1.2.3
func NewMiniTokenIssueMsg(from types.AccAddress, name, symbol string, supply int64, mintable bool, tokenURI string) MiniTokenIssueMsg
NewMiniTokenIssueMsg for instance creation
func (MiniTokenIssueMsg) GetInvolvedAddresses ¶ added in v1.2.3
func (msg MiniTokenIssueMsg) GetInvolvedAddresses() []types.AccAddress
GetInvolvedAddresses part of Msg interface
func (MiniTokenIssueMsg) GetSignBytes ¶ added in v1.2.3
func (msg MiniTokenIssueMsg) GetSignBytes() []byte
GetSignBytes part of Msg interface
func (MiniTokenIssueMsg) GetSigners ¶ added in v1.2.3
func (msg MiniTokenIssueMsg) GetSigners() []types.AccAddress
GetSigners part of Msg interface
func (MiniTokenIssueMsg) Route ¶ added in v1.2.3
func (msg MiniTokenIssueMsg) Route() string
Route part of Msg interface
func (MiniTokenIssueMsg) String ¶ added in v1.2.3
func (msg MiniTokenIssueMsg) String() string
String part of Msg interface
func (MiniTokenIssueMsg) Type ¶ added in v1.2.3
func (msg MiniTokenIssueMsg) Type() string
Type part of Msg interface
func (MiniTokenIssueMsg) ValidateBasic ¶ added in v1.2.3
func (msg MiniTokenIssueMsg) ValidateBasic() error
ValidateBasic does a simple validation check that doesn't require access to any other information.
type MintMsg ¶
type MintMsg struct { From types.AccAddress `json:"from"` Symbol string `json:"symbol"` Amount int64 `json:"amount"` }
func NewMintMsg ¶
func NewMintMsg(from types.AccAddress, symbol string, amount int64) MintMsg
func (MintMsg) GetInvolvedAddresses ¶
func (msg MintMsg) GetInvolvedAddresses() []types.AccAddress
func (MintMsg) GetSignBytes ¶
func (MintMsg) GetSigners ¶
func (msg MintMsg) GetSigners() []types.AccAddress
func (MintMsg) ValidateBasic ¶
type Msg ¶
type Msg interface { // Return the message type. // Must be alphanumeric or empty. Route() string // Returns a human-readable string for the message, intended for utilization // within tags Type() string // ValidateBasic does a simple validation check that // doesn't require access to any other information. ValidateBasic() error // Get the canonical byte representation of the Msg. GetSignBytes() []byte // Signers returns the addrs of signers that must sign. // CONTRACT: All signatures must be present to be valid. // CONTRACT: Returns addrs in some deterministic order. GetSigners() []types.AccAddress // Get involved addresses of this msg so that we can publish account balance change GetInvolvedAddresses() []types.AccAddress }
Msg - Transactions messages must fulfill the Msg
type MsgCreateValidator ¶ added in v1.0.5
type MsgCreateValidator struct { Description Description Commission types.CommissionMsg DelegatorAddr types.AccAddress `json:"delegator_address"` ValidatorAddr types.ValAddress `json:"validator_address"` PubKey crypto.PubKey `json:"pubkey"` Delegation types.Coin `json:"delegation"` }
MsgCreateValidator - struct for bonding transactions
func (MsgCreateValidator) GetInvolvedAddresses ¶ added in v1.0.5
func (msg MsgCreateValidator) GetInvolvedAddresses() []types.AccAddress
func (MsgCreateValidator) GetSignBytes ¶ added in v1.0.5
func (msg MsgCreateValidator) GetSignBytes() []byte
get the bytes for the message signer to sign on
func (MsgCreateValidator) GetSigners ¶ added in v1.0.5
func (msg MsgCreateValidator) GetSigners() []types.AccAddress
Return address(es) that must sign over msg.GetSignBytes()
func (MsgCreateValidator) Route ¶ added in v1.0.5
func (msg MsgCreateValidator) Route() string
func (MsgCreateValidator) Type ¶ added in v1.0.5
func (msg MsgCreateValidator) Type() string
func (MsgCreateValidator) ValidateBasic ¶ added in v1.0.5
func (msg MsgCreateValidator) ValidateBasic() error
quick validity check
type MsgCreateValidatorProposal ¶ added in v1.0.5
type MsgCreateValidatorProposal struct { MsgCreateValidator ProposalId int64 `json:"proposal_id"` }
type MsgRemoveValidator ¶ added in v1.0.5
type MsgRemoveValidator struct { LauncherAddr types.AccAddress `json:"launcher_addr"` ValAddr types.ValAddress `json:"val_addr"` ValConsAddr types.ConsAddress `json:"val_cons_addr"` ProposalId int64 `json:"proposal_id"` }
func NewMsgRemoveValidator ¶ added in v1.0.5
func NewMsgRemoveValidator(launcherAddr types.AccAddress, valAddr types.ValAddress, valConsAddr types.ConsAddress, proposalId int64) MsgRemoveValidator
func (MsgRemoveValidator) GetInvolvedAddresses ¶ added in v1.0.5
func (msg MsgRemoveValidator) GetInvolvedAddresses() []types.AccAddress
func (MsgRemoveValidator) GetSignBytes ¶ added in v1.0.5
func (msg MsgRemoveValidator) GetSignBytes() []byte
get the bytes for the message signer to sign on
func (MsgRemoveValidator) GetSigners ¶ added in v1.0.5
func (msg MsgRemoveValidator) GetSigners() []types.AccAddress
func (MsgRemoveValidator) Route ¶ added in v1.0.5
func (msg MsgRemoveValidator) Route() string
nolint
func (MsgRemoveValidator) Type ¶ added in v1.0.5
func (msg MsgRemoveValidator) Type() string
func (MsgRemoveValidator) ValidateBasic ¶ added in v1.0.5
func (msg MsgRemoveValidator) ValidateBasic() error
quick validity check
type MsgSideChainUnjail ¶ added in v1.2.4
type MsgSideChainUnjail struct { ValidatorAddr types.ValAddress `json:"address"` SideChainId string `json:"side_chain_id"` }
func NewMsgSideChainUnjail ¶ added in v1.2.4
func NewMsgSideChainUnjail(validatorAddr types.ValAddress, sideChainId string) MsgSideChainUnjail
func (MsgSideChainUnjail) GetInvolvedAddresses ¶ added in v1.2.4
func (msg MsgSideChainUnjail) GetInvolvedAddresses() []types.AccAddress
func (MsgSideChainUnjail) GetSignBytes ¶ added in v1.2.4
func (msg MsgSideChainUnjail) GetSignBytes() []byte
func (MsgSideChainUnjail) GetSigners ¶ added in v1.2.4
func (msg MsgSideChainUnjail) GetSigners() []types.AccAddress
func (MsgSideChainUnjail) Route ¶ added in v1.2.4
func (msg MsgSideChainUnjail) Route() string
func (MsgSideChainUnjail) Type ¶ added in v1.2.4
func (msg MsgSideChainUnjail) Type() string
func (MsgSideChainUnjail) ValidateBasic ¶ added in v1.2.4
func (msg MsgSideChainUnjail) ValidateBasic() error
type OracleParams ¶ added in v1.2.4
type OracleParams struct {
ConsensusNeeded types.Dec `json:"ConsensusNeeded"` // Minimum deposit for a proposal to enter voting period.
}
func (*OracleParams) GetParamAttribute ¶ added in v1.2.4
func (p *OracleParams) GetParamAttribute() (string, bool)
func (*OracleParams) UpdateCheck ¶ added in v1.2.4
func (p *OracleParams) UpdateCheck() error
type Output ¶
type Output struct { Address types.AccAddress `json:"address"` Coins types.Coins `json:"coins"` }
Transaction Output
func NewOutput ¶
func NewOutput(addr types.AccAddress, coins types.Coins) Output
NewOutput - create a transaction output, used with SendMsg
func (Output) GetSignBytes ¶
Return bytes to sign for Output
func (Output) ValidateBasic ¶
ValidateBasic - validate transaction output
type Package ¶ added in v1.2.4
type Package struct { ChannelId sdk.IbcChannelID Sequence uint64 Payload []byte }
type Prophecy ¶ added in v1.2.4
type Prophecy struct { ID string `json:"id"` Status Status `json:"status"` //This is a mapping from a claim to the list of validators that made that claim. ClaimValidators map[string][]types.ValAddress `json:"claim_validators"` //This is a mapping from a validator bech32 address to their claim ValidatorClaims map[string]string `json:"validator_claims"` }
func (Prophecy) SerializeForDB ¶ added in v1.2.4
func (prophecy Prophecy) SerializeForDB() (DBProphecy, error)
SerializeForDB serializes a prophecy into a DBProphecy
type ProposalKind ¶
type ProposalKind byte
Type that represents Proposal Type as a byte
const ( ProposalTypeNil ProposalKind = 0x00 ProposalTypeText ProposalKind = 0x01 ProposalTypeParameterChange ProposalKind = 0x02 ProposalTypeSoftwareUpgrade ProposalKind = 0x03 ProposalTypeListTradingPair ProposalKind = 0x04 // ProposalTypeFeeChange belongs to ProposalTypeParameterChange. We use this to make it easily to distinguish。 ProposalTypeFeeChange ProposalKind = 0x05 )
nolint
func ProposalTypeFromString ¶
func ProposalTypeFromString(str string) (ProposalKind, error)
String to proposalType byte. Returns ff if invalid.
func (ProposalKind) Format ¶
func (pt ProposalKind) Format(s fmt.State, verb rune)
For Printf / Sprintf, returns bech32 when using %s nolint: errcheck
func (ProposalKind) Marshal ¶
func (pt ProposalKind) Marshal() ([]byte, error)
Marshal needed for protobuf compatibility
func (ProposalKind) MarshalJSON ¶
func (pt ProposalKind) MarshalJSON() ([]byte, error)
Marshals to JSON using string
func (*ProposalKind) Unmarshal ¶
func (pt *ProposalKind) Unmarshal(data []byte) error
Unmarshal needed for protobuf compatibility
func (*ProposalKind) UnmarshalJSON ¶
func (pt *ProposalKind) UnmarshalJSON(data []byte) error
Unmarshals from JSON assuming Bech32 encoding
type RefundHTLTMsg ¶ added in v1.1.3
type RefundHTLTMsg struct { From types.AccAddress `json:"from"` SwapID types.SwapBytes `json:"swap_id"` }
func NewRefundHTLTMsg ¶ added in v1.1.3
func NewRefundHTLTMsg(from types.AccAddress, swapID []byte) RefundHTLTMsg
func (RefundHTLTMsg) GetInvolvedAddresses ¶ added in v1.1.3
func (msg RefundHTLTMsg) GetInvolvedAddresses() []types.AccAddress
func (RefundHTLTMsg) GetSignBytes ¶ added in v1.1.3
func (msg RefundHTLTMsg) GetSignBytes() []byte
func (RefundHTLTMsg) GetSigners ¶ added in v1.1.3
func (msg RefundHTLTMsg) GetSigners() []types.AccAddress
func (RefundHTLTMsg) Route ¶ added in v1.1.3
func (msg RefundHTLTMsg) Route() string
func (RefundHTLTMsg) String ¶ added in v1.1.3
func (msg RefundHTLTMsg) String() string
func (RefundHTLTMsg) Type ¶ added in v1.1.3
func (msg RefundHTLTMsg) Type() string
func (RefundHTLTMsg) ValidateBasic ¶ added in v1.1.3
func (msg RefundHTLTMsg) ValidateBasic() error
type SCChangeParams ¶ added in v1.2.4
type SCChangeParams struct { SCParams []SCParam `json:"sc_params"` Description string `json:"description"` }
func (*SCChangeParams) Check ¶ added in v1.2.4
func (s *SCChangeParams) Check() error
type SCParam ¶ added in v1.2.4
type SCParam interface { UpdateCheck() error // native means weather the parameter stored in native store context or side chain store context //GetParamAttribute() (string, bool) GetParamAttribute() (string, bool) }
--------- Definition side chain prams change ------------------- //
type SendMsg ¶
SendMsg - high level transaction of the coin module
func CreateSendMsg ¶
func NewMsgSend ¶
NewMsgSend - construct arbitrary multi-in, multi-out send msg.
func (SendMsg) GetInvolvedAddresses ¶
func (msg SendMsg) GetInvolvedAddresses() []types.AccAddress
type SetAccountFlagsMsg ¶ added in v1.0.8
type SetAccountFlagsMsg struct { From types.AccAddress `json:"from"` Flags uint64 `json:"flags"` }
func NewSetAccountFlagsMsg ¶ added in v1.0.8
func NewSetAccountFlagsMsg(from types.AccAddress, flags uint64) SetAccountFlagsMsg
func (SetAccountFlagsMsg) GetInvolvedAddresses ¶ added in v1.0.8
func (msg SetAccountFlagsMsg) GetInvolvedAddresses() []types.AccAddress
func (SetAccountFlagsMsg) GetSignBytes ¶ added in v1.0.8
func (msg SetAccountFlagsMsg) GetSignBytes() []byte
func (SetAccountFlagsMsg) GetSigners ¶ added in v1.0.8
func (msg SetAccountFlagsMsg) GetSigners() []types.AccAddress
func (SetAccountFlagsMsg) Route ¶ added in v1.0.8
func (msg SetAccountFlagsMsg) Route() string
func (SetAccountFlagsMsg) String ¶ added in v1.0.8
func (msg SetAccountFlagsMsg) String() string
func (SetAccountFlagsMsg) Type ¶ added in v1.0.8
func (msg SetAccountFlagsMsg) Type() string
func (SetAccountFlagsMsg) ValidateBasic ¶ added in v1.0.8
func (msg SetAccountFlagsMsg) ValidateBasic() error
type SetURIMsg ¶ added in v1.2.3
type SetURIMsg struct { From types.AccAddress `json:"from"` Symbol string `json:"symbol"` TokenURI string `json:"token_uri"` }
SetURIMsg def
func NewSetUriMsg ¶ added in v1.2.3
func NewSetUriMsg(from types.AccAddress, symbol string, tokenURI string) SetURIMsg
NewSetUriMsg for instance creation
func (SetURIMsg) GetInvolvedAddresses ¶ added in v1.2.3
func (msg SetURIMsg) GetInvolvedAddresses() []types.AccAddress
GetInvolvedAddresses part of Msg interface
func (SetURIMsg) GetSignBytes ¶ added in v1.2.3
GetSignBytes part of Msg interface
func (SetURIMsg) GetSigners ¶ added in v1.2.3
func (msg SetURIMsg) GetSigners() []types.AccAddress
GetSigners part of Msg interface
func (SetURIMsg) ValidateBasic ¶ added in v1.2.3
ValidateBasic does a simple validation check that doesn't require access to any other information.
type SideChainDelegateMsg ¶ added in v1.2.4
type SideChainDelegateMsg struct { DelegatorAddr types.AccAddress `json:"delegator_addr"` ValidatorAddr types.ValAddress `json:"validator_addr"` Delegation types.Coin `json:"delegation"` SideChainId string `json:"side_chain_id"` }
func NewSideChainDelegateMsg ¶ added in v1.2.4
func NewSideChainDelegateMsg(sideChainId string, delAddr types.AccAddress, valAddr types.ValAddress, delegation types.Coin) SideChainDelegateMsg
func (SideChainDelegateMsg) GetInvolvedAddresses ¶ added in v1.2.4
func (msg SideChainDelegateMsg) GetInvolvedAddresses() []types.AccAddress
func (SideChainDelegateMsg) GetSignBytes ¶ added in v1.2.4
func (msg SideChainDelegateMsg) GetSignBytes() []byte
func (SideChainDelegateMsg) GetSigners ¶ added in v1.2.4
func (msg SideChainDelegateMsg) GetSigners() []types.AccAddress
func (SideChainDelegateMsg) Route ¶ added in v1.2.4
func (msg SideChainDelegateMsg) Route() string
func (SideChainDelegateMsg) Type ¶ added in v1.2.4
func (msg SideChainDelegateMsg) Type() string
func (SideChainDelegateMsg) ValidateBasic ¶ added in v1.2.4
func (msg SideChainDelegateMsg) ValidateBasic() error
type SideChainDepositMsg ¶ added in v1.2.4
type SideChainDepositMsg struct { ProposalID int64 `json:"proposal_id"` // ID of the proposal Depositer types.AccAddress `json:"depositer"` // Address of the depositer Amount types.Coins `json:"amount"` // Coins to add to the proposal's deposit SideChainId string `json:"side_chain_id"` }
----------------------------------------------------------- SideChainDepositMsg
func NewSideChainDepositMsg ¶ added in v1.2.4
func NewSideChainDepositMsg(depositer types.AccAddress, proposalID int64, amount types.Coins, sideChainId string) SideChainDepositMsg
func (SideChainDepositMsg) GetInvolvedAddresses ¶ added in v1.2.4
func (msg SideChainDepositMsg) GetInvolvedAddresses() []types.AccAddress
Implements Msg. Identical to MsgDeposit, keep here for code readability.
func (SideChainDepositMsg) GetSignBytes ¶ added in v1.2.4
func (msg SideChainDepositMsg) GetSignBytes() []byte
Implements Msg.
func (SideChainDepositMsg) GetSigners ¶ added in v1.2.4
func (msg SideChainDepositMsg) GetSigners() []types.AccAddress
Implements Msg. Identical to MsgDeposit, keep here for code readability.
func (SideChainDepositMsg) Route ¶ added in v1.2.4
func (msg SideChainDepositMsg) Route() string
nolint
func (SideChainDepositMsg) String ¶ added in v1.2.4
func (msg SideChainDepositMsg) String() string
func (SideChainDepositMsg) Type ¶ added in v1.2.4
func (msg SideChainDepositMsg) Type() string
func (SideChainDepositMsg) ValidateBasic ¶ added in v1.2.4
func (msg SideChainDepositMsg) ValidateBasic() error
Implements Msg.
type SideChainRedelegateMsg ¶ added in v1.2.4
type SideChainRedelegateMsg struct { DelegatorAddr types.AccAddress `json:"delegator_addr"` ValidatorSrcAddr types.ValAddress `json:"validator_src_addr"` ValidatorDstAddr types.ValAddress `json:"validator_dst_addr"` Amount types.Coin `json:"amount"` SideChainId string `json:"side_chain_id"` }
func NewSideChainRedelegateMsg ¶ added in v1.2.4
func NewSideChainRedelegateMsg(sideChainId string, delegatorAddr types.AccAddress, valSrcAddr types.ValAddress, valDstAddr types.ValAddress, amount types.Coin) SideChainRedelegateMsg
func (SideChainRedelegateMsg) GetInvolvedAddresses ¶ added in v1.2.4
func (msg SideChainRedelegateMsg) GetInvolvedAddresses() []types.AccAddress
func (SideChainRedelegateMsg) GetSignBytes ¶ added in v1.2.4
func (msg SideChainRedelegateMsg) GetSignBytes() []byte
func (SideChainRedelegateMsg) GetSigners ¶ added in v1.2.4
func (msg SideChainRedelegateMsg) GetSigners() []types.AccAddress
func (SideChainRedelegateMsg) Route ¶ added in v1.2.4
func (msg SideChainRedelegateMsg) Route() string
func (SideChainRedelegateMsg) Type ¶ added in v1.2.4
func (msg SideChainRedelegateMsg) Type() string
func (SideChainRedelegateMsg) ValidateBasic ¶ added in v1.2.4
func (msg SideChainRedelegateMsg) ValidateBasic() error
type SideChainSubmitProposalMsg ¶ added in v1.2.4
type SideChainSubmitProposalMsg struct { Title string `json:"title"` // Title of the proposal Description string `json:"description"` // Description of the proposal ProposalType ProposalKind `json:"proposal_type"` // Type of proposal. Initial set {PlainTextProposal, SoftwareUpgradeProposal} Proposer types.AccAddress `json:"proposer"` // Address of the proposer InitialDeposit types.Coins `json:"initial_deposit"` // Initial deposit paid by sender. Must be strictly positive. VotingPeriod time.Duration `json:"voting_period"` // Length of the voting period (s) SideChainId string `json:"side_chain_id"` }
----------------------------------------------------------- SideChainSubmitProposalMsg
func NewSideChainSubmitProposalMsg ¶ added in v1.2.4
func NewSideChainSubmitProposalMsg(title string, description string, proposalType ProposalKind, proposer types.AccAddress, initialDeposit types.Coins, votingPeriod time.Duration, sideChainId string) SideChainSubmitProposalMsg
func (SideChainSubmitProposalMsg) GetInvolvedAddresses ¶ added in v1.2.4
func (msg SideChainSubmitProposalMsg) GetInvolvedAddresses() []types.AccAddress
Implements Msg. Identical to MsgSubmitProposal, keep here for code readability.
func (SideChainSubmitProposalMsg) GetSignBytes ¶ added in v1.2.4
func (msg SideChainSubmitProposalMsg) GetSignBytes() []byte
Implements Msg.
func (SideChainSubmitProposalMsg) GetSigners ¶ added in v1.2.4
func (msg SideChainSubmitProposalMsg) GetSigners() []types.AccAddress
Implements Msg. Identical to MsgSubmitProposal, keep here for code readability.
func (SideChainSubmitProposalMsg) Route ¶ added in v1.2.4
func (msg SideChainSubmitProposalMsg) Route() string
nolint
func (SideChainSubmitProposalMsg) String ¶ added in v1.2.4
func (msg SideChainSubmitProposalMsg) String() string
func (SideChainSubmitProposalMsg) Type ¶ added in v1.2.4
func (msg SideChainSubmitProposalMsg) Type() string
func (SideChainSubmitProposalMsg) ValidateBasic ¶ added in v1.2.4
func (msg SideChainSubmitProposalMsg) ValidateBasic() error
Implements Msg.
type SideChainUndelegateMsg ¶ added in v1.2.4
type SideChainUndelegateMsg struct { DelegatorAddr types.AccAddress `json:"delegator_addr"` ValidatorAddr types.ValAddress `json:"validator_addr"` Amount types.Coin `json:"amount"` SideChainId string `json:"side_chain_id"` }
func NewSideChainUndelegateMsg ¶ added in v1.2.4
func NewSideChainUndelegateMsg(sideChainId string, delegatorAddr types.AccAddress, valAddr types.ValAddress, amount types.Coin) SideChainUndelegateMsg
func (SideChainUndelegateMsg) GetInvolvedAddresses ¶ added in v1.2.4
func (msg SideChainUndelegateMsg) GetInvolvedAddresses() []types.AccAddress
func (SideChainUndelegateMsg) GetSignBytes ¶ added in v1.2.4
func (msg SideChainUndelegateMsg) GetSignBytes() []byte
func (SideChainUndelegateMsg) GetSigners ¶ added in v1.2.4
func (msg SideChainUndelegateMsg) GetSigners() []types.AccAddress
func (SideChainUndelegateMsg) Route ¶ added in v1.2.4
func (msg SideChainUndelegateMsg) Route() string
func (SideChainUndelegateMsg) Type ¶ added in v1.2.4
func (msg SideChainUndelegateMsg) Type() string
func (SideChainUndelegateMsg) ValidateBasic ¶ added in v1.2.4
func (msg SideChainUndelegateMsg) ValidateBasic() error
type SideChainVoteMsg ¶ added in v1.2.4
type SideChainVoteMsg struct { ProposalID int64 `json:"proposal_id"` // ID of the proposal Voter types.AccAddress `json:"voter"` // address of the voter Option VoteOption `json:"option"` // option from OptionSet chosen by the voter SideChainId string `json:"side_chain_id"` }
func NewSideChainVoteMsg ¶ added in v1.2.4
func NewSideChainVoteMsg(voter types.AccAddress, proposalID int64, option VoteOption, sideChainId string) SideChainVoteMsg
func (SideChainVoteMsg) GetInvolvedAddresses ¶ added in v1.2.4
func (msg SideChainVoteMsg) GetInvolvedAddresses() []types.AccAddress
Implements Msg. Identical to MsgVote, keep here for code readability.
func (SideChainVoteMsg) GetSignBytes ¶ added in v1.2.4
func (msg SideChainVoteMsg) GetSignBytes() []byte
Implements Msg.
func (SideChainVoteMsg) GetSigners ¶ added in v1.2.4
func (msg SideChainVoteMsg) GetSigners() []types.AccAddress
Implements Msg. Identical to MsgVote, keep here for code readability.
func (SideChainVoteMsg) Route ¶ added in v1.2.4
func (msg SideChainVoteMsg) Route() string
func (SideChainVoteMsg) String ¶ added in v1.2.4
func (msg SideChainVoteMsg) String() string
func (SideChainVoteMsg) Type ¶ added in v1.2.4
func (msg SideChainVoteMsg) Type() string
func (SideChainVoteMsg) ValidateBasic ¶ added in v1.2.4
func (msg SideChainVoteMsg) ValidateBasic() error
Implements Msg.
type SideDowntimeSlashPackage ¶ added in v1.2.4
type SlashParams ¶ added in v1.2.4
type SlashParams struct { MaxEvidenceAge time.Duration `json:"max_evidence_age"` SignedBlocksWindow int64 `json:"signed_blocks_window"` MinSignedPerWindow types.Dec `json:"min_signed_per_window"` DoubleSignUnbondDuration time.Duration `json:"double_sign_unbond_duration"` DowntimeUnbondDuration time.Duration `json:"downtime_unbond_duration"` TooLowDelUnbondDuration time.Duration `json:"too_low_del_unbond_duration"` SlashFractionDoubleSign types.Dec `json:"slash_fraction_double_sign"` SlashFractionDowntime types.Dec `json:"slash_fraction_downtime"` DoubleSignSlashAmount int64 `json:"double_sign_slash_amount"` DowntimeSlashAmount int64 `json:"downtime_slash_amount"` SubmitterReward int64 `json:"submitter_reward"` DowntimeSlashFee int64 `json:"downtime_slash_fee"` }
func (*SlashParams) GetParamAttribute ¶ added in v1.2.4
func (p *SlashParams) GetParamAttribute() (string, bool)
func (*SlashParams) UpdateCheck ¶ added in v1.2.4
func (p *SlashParams) UpdateCheck() error
type SmartChainAddress ¶ added in v1.2.4
type SmartChainAddress [20]byte
SmartChainAddress defines a standard smart chain address
func NewSmartChainAddress ¶ added in v1.2.4
func NewSmartChainAddress(addr string) SmartChainAddress
NewSmartChainAddress is a constructor function for SmartChainAddress
func (SmartChainAddress) IsEmpty ¶ added in v1.2.4
func (addr SmartChainAddress) IsEmpty() bool
func (SmartChainAddress) MarshalJSON ¶ added in v1.2.4
func (addr SmartChainAddress) MarshalJSON() ([]byte, error)
MarshalJSON marshals the ethereum address to JSON
func (*SmartChainAddress) SetBytes ¶ added in v1.2.4
func (addr *SmartChainAddress) SetBytes(b []byte)
func (SmartChainAddress) String ¶ added in v1.2.4
func (addr SmartChainAddress) String() string
Route should return the name of the module
func (*SmartChainAddress) UnmarshalJSON ¶ added in v1.2.4
func (addr *SmartChainAddress) UnmarshalJSON(input []byte) error
UnmarshalJSON unmarshals an smart chain address
type StakeParams ¶ added in v1.2.4
type StakeParams struct { UnbondingTime time.Duration `json:"unbonding_time"` MaxValidators uint16 `json:"max_validators"` // maximum number of validators BondDenom string `json:"bond_denom"` // bondable coin denomination MinSelfDelegation int64 `json:"min_self_delegation"` // the minimal self-delegation amount MinDelegationChange int64 `json:"min_delegation_change"` // the minimal delegation amount changed }
Params defines the high level settings for staking
func (*StakeParams) GetParamAttribute ¶ added in v1.2.4
func (p *StakeParams) GetParamAttribute() (string, bool)
func (*StakeParams) UpdateCheck ¶ added in v1.2.4
func (p *StakeParams) UpdateCheck() error
type Status ¶ added in v1.2.4
type Status struct { Text StatusText `json:"text"` FinalClaim string `json:"final_claim"` }
type StatusText ¶ added in v1.2.4
type StatusText int
const ( PendingStatusText StatusText = iota SuccessStatusText FailedStatusText )
func (StatusText) MarshalJSON ¶ added in v1.2.4
func (text StatusText) MarshalJSON() ([]byte, error)
func (StatusText) String ¶ added in v1.2.4
func (text StatusText) String() string
func (*StatusText) UnmarshalJSON ¶ added in v1.2.4
func (text *StatusText) UnmarshalJSON(b []byte) error
type SubmitProposalMsg ¶
type SubmitProposalMsg struct { Title string `json:"title"` // Title of the proposal Description string `json:"description"` // Description of the proposal ProposalType ProposalKind `json:"proposal_type"` // Type of proposal. Initial set {PlainTextProposal, SoftwareUpgradeProposal} Proposer types.AccAddress `json:"proposer"` // Address of the proposer InitialDeposit types.Coins `json:"initial_deposit"` // Initial deposit paid by sender. Must be strictly positive. VotingPeriod time.Duration `json:"voting_period"` // Length of the voting period (s) }
----------------------------------------------------------- SubmitProposalMsg
func NewMsgSubmitProposal ¶
func NewMsgSubmitProposal(title string, description string, proposalType ProposalKind, proposer types.AccAddress, initialDeposit types.Coins, votingPeriod time.Duration) SubmitProposalMsg
func (SubmitProposalMsg) Get ¶
func (msg SubmitProposalMsg) Get(key interface{}) (value interface{})
Implements Msg.
func (SubmitProposalMsg) GetInvolvedAddresses ¶
func (msg SubmitProposalMsg) GetInvolvedAddresses() []types.AccAddress
func (SubmitProposalMsg) GetSignBytes ¶
func (msg SubmitProposalMsg) GetSignBytes() []byte
Implements Msg.
func (SubmitProposalMsg) GetSigners ¶
func (msg SubmitProposalMsg) GetSigners() []types.AccAddress
Implements Msg.
func (SubmitProposalMsg) String ¶
func (msg SubmitProposalMsg) String() string
func (SubmitProposalMsg) Type ¶
func (msg SubmitProposalMsg) Type() string
func (SubmitProposalMsg) ValidateBasic ¶
func (msg SubmitProposalMsg) ValidateBasic() error
Implements Msg.
type TimeLockMsg ¶ added in v1.0.5
type TimeLockMsg struct { From types.AccAddress `json:"from"` Description string `json:"description"` Amount types.Coins `json:"amount"` LockTime int64 `json:"lock_time"` }
func NewTimeLockMsg ¶ added in v1.0.5
func NewTimeLockMsg(from types.AccAddress, description string, amount types.Coins, lockTime int64) TimeLockMsg
func (TimeLockMsg) GetInvolvedAddresses ¶ added in v1.0.5
func (msg TimeLockMsg) GetInvolvedAddresses() []types.AccAddress
func (TimeLockMsg) GetSignBytes ¶ added in v1.0.5
func (msg TimeLockMsg) GetSignBytes() []byte
func (TimeLockMsg) GetSigners ¶ added in v1.0.5
func (msg TimeLockMsg) GetSigners() []types.AccAddress
func (TimeLockMsg) Route ¶ added in v1.0.5
func (msg TimeLockMsg) Route() string
func (TimeLockMsg) String ¶ added in v1.0.5
func (msg TimeLockMsg) String() string
func (TimeLockMsg) Type ¶ added in v1.0.5
func (msg TimeLockMsg) Type() string
func (TimeLockMsg) ValidateBasic ¶ added in v1.0.5
func (msg TimeLockMsg) ValidateBasic() error
type TimeRelockMsg ¶ added in v1.0.5
type TimeRelockMsg struct { From types.AccAddress `json:"from"` Id int64 `json:"time_lock_id"` Description string `json:"description"` Amount types.Coins `json:"amount"` LockTime int64 `json:"lock_time"` }
func NewTimeRelockMsg ¶ added in v1.0.5
func NewTimeRelockMsg(from types.AccAddress, id int64, description string, amount types.Coins, lockTime int64) TimeRelockMsg
func (TimeRelockMsg) GetInvolvedAddresses ¶ added in v1.0.5
func (msg TimeRelockMsg) GetInvolvedAddresses() []types.AccAddress
func (TimeRelockMsg) GetSignBytes ¶ added in v1.0.5
func (msg TimeRelockMsg) GetSignBytes() []byte
func (TimeRelockMsg) GetSigners ¶ added in v1.0.5
func (msg TimeRelockMsg) GetSigners() []types.AccAddress
func (TimeRelockMsg) Route ¶ added in v1.0.5
func (msg TimeRelockMsg) Route() string
func (TimeRelockMsg) String ¶ added in v1.0.5
func (msg TimeRelockMsg) String() string
func (TimeRelockMsg) Type ¶ added in v1.0.5
func (msg TimeRelockMsg) Type() string
func (TimeRelockMsg) ValidateBasic ¶ added in v1.0.5
func (msg TimeRelockMsg) ValidateBasic() error
type TimeUnlockMsg ¶ added in v1.0.5
type TimeUnlockMsg struct { From types.AccAddress `json:"from"` Id int64 `json:"time_lock_id"` }
func NewTimeUnlockMsg ¶ added in v1.0.5
func NewTimeUnlockMsg(from types.AccAddress, id int64) TimeUnlockMsg
func (TimeUnlockMsg) GetInvolvedAddresses ¶ added in v1.0.5
func (msg TimeUnlockMsg) GetInvolvedAddresses() []types.AccAddress
func (TimeUnlockMsg) GetSignBytes ¶ added in v1.0.5
func (msg TimeUnlockMsg) GetSignBytes() []byte
func (TimeUnlockMsg) GetSigners ¶ added in v1.0.5
func (msg TimeUnlockMsg) GetSigners() []types.AccAddress
func (TimeUnlockMsg) Route ¶ added in v1.0.5
func (msg TimeUnlockMsg) Route() string
func (TimeUnlockMsg) String ¶ added in v1.0.5
func (msg TimeUnlockMsg) String() string
func (TimeUnlockMsg) Type ¶ added in v1.0.5
func (msg TimeUnlockMsg) Type() string
func (TimeUnlockMsg) ValidateBasic ¶ added in v1.0.5
func (msg TimeUnlockMsg) ValidateBasic() error
type TinyTokenIssueMsg ¶ added in v1.2.3
type TinyTokenIssueMsg struct { From types.AccAddress `json:"from"` Name string `json:"name"` Symbol string `json:"symbol"` TotalSupply int64 `json:"total_supply"` Mintable bool `json:"mintable"` TokenURI string `json:"token_uri"` }
TinyTokenIssueMsg def
func NewTinyTokenIssueMsg ¶ added in v1.2.3
func NewTinyTokenIssueMsg(from types.AccAddress, name, symbol string, supply int64, mintable bool, tokenURI string) TinyTokenIssueMsg
NewTinyTokenIssueMsg for instance creation
func (TinyTokenIssueMsg) GetInvolvedAddresses ¶ added in v1.2.3
func (msg TinyTokenIssueMsg) GetInvolvedAddresses() []types.AccAddress
GetInvolvedAddresses part of Msg interface
func (TinyTokenIssueMsg) GetSignBytes ¶ added in v1.2.3
func (msg TinyTokenIssueMsg) GetSignBytes() []byte
GetSignBytes part of Msg interface
func (TinyTokenIssueMsg) GetSigners ¶ added in v1.2.3
func (msg TinyTokenIssueMsg) GetSigners() []types.AccAddress
GetSigners part of Msg interface
func (TinyTokenIssueMsg) Route ¶ added in v1.2.3
func (msg TinyTokenIssueMsg) Route() string
Route part of Msg interface
func (TinyTokenIssueMsg) String ¶ added in v1.2.3
func (msg TinyTokenIssueMsg) String() string
String part of Msg interface
func (TinyTokenIssueMsg) Type ¶ added in v1.2.3
func (msg TinyTokenIssueMsg) Type() string
Type part of Msg interface
func (TinyTokenIssueMsg) ValidateBasic ¶ added in v1.2.3
func (msg TinyTokenIssueMsg) ValidateBasic() error
ValidateBasic does a simple validation check that doesn't require access to any other information.
type TokenBurnMsg ¶
type TokenBurnMsg struct { From types.AccAddress `json:"from"` Symbol string `json:"symbol"` Amount int64 `json:"amount"` }
TokenBurnMsg def
func NewTokenBurnMsg ¶
func NewTokenBurnMsg(from types.AccAddress, symbol string, amount int64) TokenBurnMsg
NewMsg for instance creation
func (TokenBurnMsg) GetInvolvedAddresses ¶
func (msg TokenBurnMsg) GetInvolvedAddresses() []types.AccAddress
GetInvolvedAddresses is part of Msg interface
func (TokenBurnMsg) GetSignBytes ¶
func (msg TokenBurnMsg) GetSignBytes() []byte
func (TokenBurnMsg) GetSigners ¶
func (msg TokenBurnMsg) GetSigners() []types.AccAddress
GetSigners is part of Msg interface
func (TokenBurnMsg) String ¶
func (msg TokenBurnMsg) String() string
String is part of Msg interface
func (TokenBurnMsg) ValidateBasic ¶
func (msg TokenBurnMsg) ValidateBasic() error
ValidateBasic does a simple validation check that doesn't require access to any other information.
type TokenFreezeMsg ¶
type TokenFreezeMsg struct { From types.AccAddress `json:"from"` Symbol string `json:"symbol"` Amount int64 `json:"amount"` }
TokenFreezeMsg def
func NewFreezeMsg ¶
func NewFreezeMsg(from types.AccAddress, symbol string, amount int64) TokenFreezeMsg
NewFreezeMsg for instance creation
func (TokenFreezeMsg) GetInvolvedAddresses ¶
func (msg TokenFreezeMsg) GetInvolvedAddresses() []types.AccAddress
GetInvolvedAddresses is part of Msg interface
func (TokenFreezeMsg) GetSignBytes ¶
func (msg TokenFreezeMsg) GetSignBytes() []byte
func (TokenFreezeMsg) GetSigners ¶
func (msg TokenFreezeMsg) GetSigners() []types.AccAddress
func (TokenFreezeMsg) Route ¶
func (msg TokenFreezeMsg) Route() string
Route is part of Msg interface
func (TokenFreezeMsg) String ¶
func (msg TokenFreezeMsg) String() string
String is part of Msg interface
func (TokenFreezeMsg) ValidateBasic ¶
func (msg TokenFreezeMsg) ValidateBasic() error
type TokenIssueMsg ¶
type TokenIssueMsg struct { From types.AccAddress `json:"from"` Name string `json:"name"` Symbol string `json:"symbol"` TotalSupply int64 `json:"total_supply"` Mintable bool `json:"mintable"` }
TokenIssueMsg def
func NewTokenIssueMsg ¶
func NewTokenIssueMsg(from types.AccAddress, name, symbol string, supply int64, mintable bool) TokenIssueMsg
NewTokenIssueMsg for instance creation
func (TokenIssueMsg) GetInvolvedAddresses ¶
func (msg TokenIssueMsg) GetInvolvedAddresses() []types.AccAddress
GetInvolvedAddresses part of Msg interface
func (TokenIssueMsg) GetSignBytes ¶
func (msg TokenIssueMsg) GetSignBytes() []byte
GetSignBytes part of Msg interface
func (TokenIssueMsg) GetSigners ¶
func (msg TokenIssueMsg) GetSigners() []types.AccAddress
GetSigners part of Msg interface
func (TokenIssueMsg) ValidateBasic ¶
func (msg TokenIssueMsg) ValidateBasic() error
ValidateBasic does a simple validation check that doesn't require access to any other information.
type TokenUnfreezeMsg ¶
type TokenUnfreezeMsg struct { From types.AccAddress `json:"from"` Symbol string `json:"symbol"` Amount int64 `json:"amount"` }
TokenUnfreezeMsg def
func NewUnfreezeMsg ¶
func NewUnfreezeMsg(from types.AccAddress, symbol string, amount int64) TokenUnfreezeMsg
NewUnfreezeMsg for instance creation
func (TokenUnfreezeMsg) GetInvolvedAddresses ¶
func (msg TokenUnfreezeMsg) GetInvolvedAddresses() []types.AccAddress
GetInvolvedAddresses is part of Msg interface
func (TokenUnfreezeMsg) GetSignBytes ¶
func (msg TokenUnfreezeMsg) GetSignBytes() []byte
func (TokenUnfreezeMsg) GetSigners ¶
func (msg TokenUnfreezeMsg) GetSigners() []types.AccAddress
func (TokenUnfreezeMsg) Route ¶
func (msg TokenUnfreezeMsg) Route() string
Route is part of Msg interface
func (TokenUnfreezeMsg) String ¶
func (msg TokenUnfreezeMsg) String() string
String is part of Msg interface
func (TokenUnfreezeMsg) Type ¶
func (msg TokenUnfreezeMsg) Type() string
Type is part of Msg interface
func (TokenUnfreezeMsg) ValidateBasic ¶
func (msg TokenUnfreezeMsg) ValidateBasic() error
type TransferInSynPackage ¶ added in v1.2.4
type TransferOutMsg ¶ added in v1.2.4
type TransferOutMsg struct { From sdk.AccAddress `json:"from"` To SmartChainAddress `json:"to"` Amount sdk.Coin `json:"amount"` ExpireTime int64 `json:"expire_time"` }
func NewTransferOutMsg ¶ added in v1.2.4
func NewTransferOutMsg(from sdk.AccAddress, to SmartChainAddress, amount sdk.Coin, expireTime int64) TransferOutMsg
func (TransferOutMsg) GetInvolvedAddresses ¶ added in v1.2.4
func (msg TransferOutMsg) GetInvolvedAddresses() []sdk.AccAddress
func (TransferOutMsg) GetSignBytes ¶ added in v1.2.4
func (msg TransferOutMsg) GetSignBytes() []byte
func (TransferOutMsg) GetSigners ¶ added in v1.2.4
func (msg TransferOutMsg) GetSigners() []sdk.AccAddress
func (TransferOutMsg) Route ¶ added in v1.2.4
func (msg TransferOutMsg) Route() string
func (TransferOutMsg) String ¶ added in v1.2.4
func (msg TransferOutMsg) String() string
func (TransferOutMsg) Type ¶ added in v1.2.4
func (msg TransferOutMsg) Type() string
func (TransferOutMsg) ValidateBasic ¶ added in v1.2.4
func (msg TransferOutMsg) ValidateBasic() error
type TransferOutRefundPackage ¶ added in v1.2.4
type TransferOutSynPackage ¶ added in v1.2.4
type UnbindMsg ¶ added in v1.2.4
type UnbindMsg struct { From sdk.AccAddress `json:"from"` Symbol string `json:"symbol"` }
func NewUnbindMsg ¶ added in v1.2.4
func NewUnbindMsg(from sdk.AccAddress, symbol string) UnbindMsg
func (UnbindMsg) GetInvolvedAddresses ¶ added in v1.2.4
func (msg UnbindMsg) GetInvolvedAddresses() []sdk.AccAddress
func (UnbindMsg) GetSignBytes ¶ added in v1.2.4
func (UnbindMsg) GetSigners ¶ added in v1.2.4
func (msg UnbindMsg) GetSigners() []sdk.AccAddress
func (UnbindMsg) ValidateBasic ¶ added in v1.2.4
type VoteMsg ¶
type VoteMsg struct { ProposalID int64 `json:"proposal_id"` // ID of the proposal Voter types.AccAddress `json:"voter"` // address of the voter Option VoteOption `json:"option"` // option from OptionSet chosen by the voter }
----------------------------------------------------------- VoteMsg
func NewMsgVote ¶
func NewMsgVote(voter types.AccAddress, proposalID int64, option VoteOption) VoteMsg
func (VoteMsg) GetInvolvedAddresses ¶
func (msg VoteMsg) GetInvolvedAddresses() []types.AccAddress
type VoteOption ¶
type VoteOption byte
const ( OptionEmpty VoteOption = 0x00 OptionYes VoteOption = 0x01 OptionAbstain VoteOption = 0x02 OptionNo VoteOption = 0x03 OptionNoWithVeto VoteOption = 0x04 )
nolint
func VoteOptionFromString ¶
func VoteOptionFromString(str string) (VoteOption, error)
String to proposalType byte. Returns ff if invalid.
func (VoteOption) Format ¶
func (vo VoteOption) Format(s fmt.State, verb rune)
For Printf / Sprintf, returns bech32 when using %s nolint: errcheck
func (VoteOption) Marshal ¶
func (vo VoteOption) Marshal() ([]byte, error)
Marshal needed for protobuf compatibility
func (VoteOption) MarshalJSON ¶
func (vo VoteOption) MarshalJSON() ([]byte, error)
Marshals to JSON using string
func (*VoteOption) Unmarshal ¶
func (vo *VoteOption) Unmarshal(data []byte) error
Unmarshal needed for protobuf compatibility
func (*VoteOption) UnmarshalJSON ¶
func (vo *VoteOption) UnmarshalJSON(data []byte) error
Unmarshals from JSON assuming Bech32 encoding
Source Files
¶
- msg-HTLT.go
- msg-bridge.go
- msg-burn.go
- msg-dexList.go
- msg-dexListMini.go
- msg-freeze.go
- msg-gov.go
- msg-issue.go
- msg-issueMini.go
- msg-issueTiny.go
- msg-mint.go
- msg-oracle.go
- msg-order.go
- msg-send.go
- msg-setUri.go
- msg-setaccount.go
- msg-side-gov.go
- msg-sidechain-slash.go
- msg-sidechain-stake.go
- msg-timelock.go
- msg-validator.go
- msg.go
- utils.go
- wire.go