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 = "AXC" NativeTokenDotBSuffixed = "AXC" + 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 ( // axc prefix address: axc1wxeplyw7x8aahy93w96yhwm7xcq3ke4f8ge93u // taxc prefix address: taxc1wxeplyw7x8aahy93w96yhwm7xcq3ke4ffasp3d AtomicSwapCoinsAccAddr = types.AccAddress(crypto.AddressHash([]byte("AximchainAtomicSwapCoins"))) )
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("AximchainTimeLockCoins")))
)
Functions ¶
func CalculateRandomHash ¶
func CalculateSwapID ¶
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 ¶
func GetClaimId(chainId sdk.IbcChainID, channelId sdk.IbcChannelID, sequence int64) string
func Has0xPrefix ¶
has0xPrefix validates str begins with '0x' or '0X'.
func HexAddress ¶
func IToTimeInForce ¶ added in v0.1.3
IToTimeInForce conversion
func IsValidOrderType ¶ added in v0.1.3
IsValidOrderType validates that an order type is valid and supported by the matching engine
func IsValidSide ¶ added in v0.1.3
IsValidSide validates that a side is valid and supported by the matching engine
func IsValidTimeInForce ¶ added in v0.1.3
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 ¶ added in v0.1.3
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 ¶ added in v0.1.3
TifStringToTifCode converts a string like "GTC" to its internal tif code
func ValidateMiniTokenSymbol ¶ added in v0.1.3
func ValidateSymbol ¶ added in v0.1.3
ValidateSymbol utility
Types ¶
type ApproveBindSynPackage ¶
type BindMsg ¶
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 ¶
func NewBindMsg(from sdk.AccAddress, symbol string, amount int64, contractAddress SmartChainAddress, contractDecimals int8, expireTime int64) BindMsg
func (BindMsg) GetInvolvedAddresses ¶ added in v0.1.3
func (msg BindMsg) GetInvolvedAddresses() []sdk.AccAddress
func (BindMsg) GetSignBytes ¶ added in v0.1.3
func (BindMsg) GetSigners ¶ added in v0.1.3
func (msg BindMsg) GetSigners() []sdk.AccAddress
func (BindMsg) ValidateBasic ¶ added in v0.1.3
type BindStatus ¶ added in v0.1.3
type BindStatus int8
type BindSynPackage ¶
type CSCParamChange ¶
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 v0.1.3
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 ¶ added in v0.1.3
func (msg CancelOrderMsg) GetInvolvedAddresses() []types.AccAddress
GetInvolvedAddresses as part of Msg interface
func (CancelOrderMsg) GetSignBytes ¶ added in v0.1.3
func (msg CancelOrderMsg) GetSignBytes() []byte
GetSignBytes - Get the bytes for the message signer to sign on
func (CancelOrderMsg) GetSigners ¶ added in v0.1.3
func (msg CancelOrderMsg) GetSigners() []types.AccAddress
GetSigners is part of Msg interface
func (CancelOrderMsg) Route ¶ added in v0.1.3
func (msg CancelOrderMsg) Route() string
Route is part of Msg interface
func (CancelOrderMsg) String ¶ added in v0.1.3
func (msg CancelOrderMsg) String() string
String is part of Msg interface
func (CancelOrderMsg) Type ¶ added in v0.1.3
func (msg CancelOrderMsg) Type() string
Type is part of Msg interface
func (CancelOrderMsg) ValidateBasic ¶ added in v0.1.3
func (msg CancelOrderMsg) ValidateBasic() error
ValidateBasic is used to quickly disqualify obviously invalid messages quickly
type Claim ¶
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 ¶
type ClaimHTLTMsg struct { From types.AccAddress `json:"from"` SwapID types.SwapBytes `json:"swap_id"` RandomNumber types.SwapBytes `json:"random_number"` }
func NewClaimHTLTMsg ¶
func NewClaimHTLTMsg(from types.AccAddress, swapID, randomNumber []byte) ClaimHTLTMsg
func (ClaimHTLTMsg) GetInvolvedAddresses ¶ added in v0.1.3
func (msg ClaimHTLTMsg) GetInvolvedAddresses() []types.AccAddress
func (ClaimHTLTMsg) GetSignBytes ¶ added in v0.1.3
func (msg ClaimHTLTMsg) GetSignBytes() []byte
func (ClaimHTLTMsg) GetSigners ¶ added in v0.1.3
func (msg ClaimHTLTMsg) GetSigners() []types.AccAddress
func (ClaimHTLTMsg) Route ¶ added in v0.1.3
func (msg ClaimHTLTMsg) Route() string
func (ClaimHTLTMsg) String ¶ added in v0.1.3
func (msg ClaimHTLTMsg) String() string
func (ClaimHTLTMsg) Type ¶ added in v0.1.3
func (msg ClaimHTLTMsg) Type() string
func (ClaimHTLTMsg) ValidateBasic ¶ added in v0.1.3
func (msg ClaimHTLTMsg) ValidateBasic() error
type ClaimMsg ¶
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 ¶
func NewClaimMsg(ChainId sdk.IbcChainID, sequence uint64, payload []byte, validatorAddr sdk.AccAddress) ClaimMsg
func (ClaimMsg) GetInvolvedAddresses ¶ added in v0.1.3
func (msg ClaimMsg) GetInvolvedAddresses() []sdk.AccAddress
func (ClaimMsg) GetSignBytes ¶ added in v0.1.3
GetSignBytes - Get the bytes for the message signer to sign on
func (ClaimMsg) GetSigners ¶ added in v0.1.3
func (msg ClaimMsg) GetSigners() []sdk.AccAddress
func (ClaimMsg) ValidateBasic ¶ added in v0.1.3
ValidateBasic is used to quickly disqualify obviously invalid messages quickly
type CommonAckPackage ¶
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 ¶ added in v0.1.3
func (msg CreateOrderMsg) GetInvolvedAddresses() []types.AccAddress
GetInvolvedAddresses as part of the Msg interface
func (CreateOrderMsg) GetSignBytes ¶ added in v0.1.3
func (msg CreateOrderMsg) GetSignBytes() []byte
GetSignBytes - Get the bytes for the message signer to sign on
func (CreateOrderMsg) GetSigners ¶ added in v0.1.3
func (msg CreateOrderMsg) GetSigners() []types.AccAddress
GetSigners is part of Msg interface
func (CreateOrderMsg) Route ¶ added in v0.1.3
func (msg CreateOrderMsg) Route() string
Route is part of Msg interface
func (CreateOrderMsg) String ¶ added in v0.1.3
func (msg CreateOrderMsg) String() string
String is part of Msg interface
func (CreateOrderMsg) Type ¶ added in v0.1.3
func (msg CreateOrderMsg) Type() string
Type is part of Msg interface
func (CreateOrderMsg) ValidateBasic ¶ added in v0.1.3
func (msg CreateOrderMsg) ValidateBasic() error
ValidateBasic is used to quickly disqualify obviously invalid messages quickly
type CreateSideChainValidatorMsg ¶
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 ¶
func NewCreateSideChainValidatorMsg(valAddr types.ValAddress, delegation types.Coin, description Description, commission types.CommissionMsg, sideChainId string, sideConsAddr []byte, sideFeeAddr []byte) CreateSideChainValidatorMsg
func NewMsgCreateSideChainValidatorOnBehalfOf ¶
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 v0.1.3
func (msg CreateSideChainValidatorMsg) GetInvolvedAddresses() []types.AccAddress
func (CreateSideChainValidatorMsg) GetSignBytes ¶ added in v0.1.3
func (msg CreateSideChainValidatorMsg) GetSignBytes() []byte
func (CreateSideChainValidatorMsg) GetSigners ¶ added in v0.1.3
func (msg CreateSideChainValidatorMsg) GetSigners() []types.AccAddress
func (CreateSideChainValidatorMsg) Route ¶ added in v0.1.3
func (msg CreateSideChainValidatorMsg) Route() string
func (CreateSideChainValidatorMsg) Type ¶ added in v0.1.3
func (msg CreateSideChainValidatorMsg) Type() string
func (CreateSideChainValidatorMsg) ValidateBasic ¶ added in v0.1.3
func (msg CreateSideChainValidatorMsg) ValidateBasic() error
type CrossChainPackage ¶
type CrossChainPackage struct { PackageType CrossChainPackageType RelayFee big.Int Content interface{} }
func ParseClaimPayload ¶
func ParseClaimPayload(payload []byte) ([]CrossChainPackage, error)
type CrossChainPackageType ¶
type CrossChainPackageType uint8
const ( SynCrossChainPackageType CrossChainPackageType = 0x00 AckCrossChainPackageType CrossChainPackageType = 0x01 FailAckCrossChainPackageType CrossChainPackageType = 0x02 )
func DecodePackageHeader ¶
func DecodePackageHeader(packageHeader []byte) (packageType CrossChainPackageType, relayFee big.Int, err error)
type CrossParamChange ¶
type DBProphecy ¶
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 v0.1.3
func (dbProphecy DBProphecy) DeserializeFromDB() (Prophecy, error)
DeserializeFromDB deserializes a DBProphecy into a prophecy
type DepositHTLTMsg ¶
type DepositHTLTMsg struct { From types.AccAddress `json:"from"` Amount types.Coins `json:"amount"` SwapID types.SwapBytes `json:"swap_id"` }
func NewDepositHTLTMsg ¶
func NewDepositHTLTMsg(from types.AccAddress, swapID []byte, amount types.Coins) DepositHTLTMsg
func (DepositHTLTMsg) GetInvolvedAddresses ¶ added in v0.1.3
func (msg DepositHTLTMsg) GetInvolvedAddresses() []types.AccAddress
func (DepositHTLTMsg) GetSignBytes ¶ added in v0.1.3
func (msg DepositHTLTMsg) GetSignBytes() []byte
func (DepositHTLTMsg) GetSigners ¶ added in v0.1.3
func (msg DepositHTLTMsg) GetSigners() []types.AccAddress
func (DepositHTLTMsg) Route ¶ added in v0.1.3
func (msg DepositHTLTMsg) Route() string
func (DepositHTLTMsg) String ¶ added in v0.1.3
func (msg DepositHTLTMsg) String() string
func (DepositHTLTMsg) Type ¶ added in v0.1.3
func (msg DepositHTLTMsg) Type() string
func (DepositHTLTMsg) ValidateBasic ¶ added in v0.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 ¶ added in v0.1.3
func (msg DepositMsg) Get(key interface{}) (value interface{})
Implements Msg.
func (DepositMsg) GetInvolvedAddresses ¶ added in v0.1.3
func (msg DepositMsg) GetInvolvedAddresses() []types.AccAddress
func (DepositMsg) GetSignBytes ¶ added in v0.1.3
func (msg DepositMsg) GetSignBytes() []byte
Implements Msg.
func (DepositMsg) GetSigners ¶ added in v0.1.3
func (msg DepositMsg) GetSigners() []types.AccAddress
Implements Msg.
func (DepositMsg) Route ¶ added in v0.1.3
func (msg DepositMsg) Route() string
Implements Msg. nolint
func (DepositMsg) String ¶ added in v0.1.3
func (msg DepositMsg) String() string
func (DepositMsg) Type ¶ added in v0.1.3
func (msg DepositMsg) Type() string
func (DepositMsg) ValidateBasic ¶ added in v0.1.3
func (msg DepositMsg) ValidateBasic() error
Implements Msg.
type Description ¶
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 v0.1.3
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 ¶ added in v0.1.3
func (msg DexListMsg) GetInvolvedAddresses() []types.AccAddress
GetInvolvedAddresses part of Msg interface
func (DexListMsg) GetSignBytes ¶ added in v0.1.3
func (msg DexListMsg) GetSignBytes() []byte
GetSignBytes part of Msg interface
func (DexListMsg) GetSigners ¶ added in v0.1.3
func (msg DexListMsg) GetSigners() []types.AccAddress
GetSigners part of Msg interface
func (DexListMsg) Route ¶ added in v0.1.3
func (msg DexListMsg) Route() string
Route part of Msg interface
func (DexListMsg) String ¶ added in v0.1.3
func (msg DexListMsg) String() string
String part of Msg interface
func (DexListMsg) Type ¶ added in v0.1.3
func (msg DexListMsg) Type() string
Type part of Msg interface
func (DexListMsg) ValidateBasic ¶ added in v0.1.3
func (msg DexListMsg) ValidateBasic() error
ValidateBasic part of Msg interface
type EditSideChainValidatorMsg ¶
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 ¶
func NewEditSideChainValidatorMsg(sideChainId string, validatorAddr types.ValAddress, description Description, commissionRate *types.Dec, sideFeeAddr []byte) EditSideChainValidatorMsg
func (EditSideChainValidatorMsg) GetInvolvedAddresses ¶ added in v0.1.3
func (msg EditSideChainValidatorMsg) GetInvolvedAddresses() []types.AccAddress
func (EditSideChainValidatorMsg) GetSignBytes ¶ added in v0.1.3
func (msg EditSideChainValidatorMsg) GetSignBytes() []byte
func (EditSideChainValidatorMsg) GetSigners ¶ added in v0.1.3
func (msg EditSideChainValidatorMsg) GetSigners() []types.AccAddress
func (EditSideChainValidatorMsg) Route ¶ added in v0.1.3
func (msg EditSideChainValidatorMsg) Route() string
func (EditSideChainValidatorMsg) Type ¶ added in v0.1.3
func (msg EditSideChainValidatorMsg) Type() string
func (EditSideChainValidatorMsg) ValidateBasic ¶ added in v0.1.3
func (msg EditSideChainValidatorMsg) ValidateBasic() error
type HTLTMsg ¶
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 ¶
func (HTLTMsg) GetInvolvedAddresses ¶ added in v0.1.3
func (msg HTLTMsg) GetInvolvedAddresses() []types.AccAddress
func (HTLTMsg) GetSignBytes ¶ added in v0.1.3
func (HTLTMsg) GetSigners ¶ added in v0.1.3
func (msg HTLTMsg) GetSigners() []types.AccAddress
func (HTLTMsg) ValidateBasic ¶ added in v0.1.3
type IbcParams ¶
type IbcParams struct {
RelayerFee int64 `json:"relayer_fee"`
}
func (*IbcParams) GetParamAttribute ¶ added in v0.1.3
func (*IbcParams) UpdateCheck ¶ added in v0.1.3
type IbcValidator ¶
type IbcValidatorSetPackage ¶
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) GetSignBytes ¶ added in v0.1.3
Return bytes to sign for Input
func (Input) ValidateBasic ¶ added in v0.1.3
ValidateBasic - validate transaction input
type ListMiniMsg ¶
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 ¶
func NewListMiniMsg(from types.AccAddress, baseAssetSymbol string, quoteAssetSymbol string, initPrice int64) ListMiniMsg
NewListMiniMsg for instance creation
func (ListMiniMsg) GetInvolvedAddresses ¶ added in v0.1.3
func (msg ListMiniMsg) GetInvolvedAddresses() []types.AccAddress
GetInvolvedAddresses part of Msg interface
func (ListMiniMsg) GetSignBytes ¶ added in v0.1.3
func (msg ListMiniMsg) GetSignBytes() []byte
GetSignBytes part of Msg interface
func (ListMiniMsg) GetSigners ¶ added in v0.1.3
func (msg ListMiniMsg) GetSigners() []types.AccAddress
GetSigners part of Msg interface
func (ListMiniMsg) Route ¶ added in v0.1.3
func (msg ListMiniMsg) Route() string
Route part of Msg interface
func (ListMiniMsg) String ¶ added in v0.1.3
func (msg ListMiniMsg) String() string
String part of Msg interface
func (ListMiniMsg) Type ¶ added in v0.1.3
func (msg ListMiniMsg) Type() string
Type part of Msg interface
func (ListMiniMsg) ValidateBasic ¶ added in v0.1.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 ¶
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 ¶
func NewMiniTokenIssueMsg(from types.AccAddress, name, symbol string, supply int64, mintable bool, tokenURI string) MiniTokenIssueMsg
NewMiniTokenIssueMsg for instance creation
func (MiniTokenIssueMsg) GetInvolvedAddresses ¶ added in v0.1.3
func (msg MiniTokenIssueMsg) GetInvolvedAddresses() []types.AccAddress
GetInvolvedAddresses part of Msg interface
func (MiniTokenIssueMsg) GetSignBytes ¶ added in v0.1.3
func (msg MiniTokenIssueMsg) GetSignBytes() []byte
GetSignBytes part of Msg interface
func (MiniTokenIssueMsg) GetSigners ¶ added in v0.1.3
func (msg MiniTokenIssueMsg) GetSigners() []types.AccAddress
GetSigners part of Msg interface
func (MiniTokenIssueMsg) Route ¶ added in v0.1.3
func (msg MiniTokenIssueMsg) Route() string
Route part of Msg interface
func (MiniTokenIssueMsg) String ¶ added in v0.1.3
func (msg MiniTokenIssueMsg) String() string
String part of Msg interface
func (MiniTokenIssueMsg) Type ¶ added in v0.1.3
func (msg MiniTokenIssueMsg) Type() string
Type part of Msg interface
func (MiniTokenIssueMsg) ValidateBasic ¶ added in v0.1.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 ¶ added in v0.1.3
func (msg MintMsg) GetInvolvedAddresses() []types.AccAddress
func (MintMsg) GetSignBytes ¶ added in v0.1.3
func (MintMsg) GetSigners ¶ added in v0.1.3
func (msg MintMsg) GetSigners() []types.AccAddress
func (MintMsg) ValidateBasic ¶ added in v0.1.3
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 v0.1.3
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 v0.1.3
func (msg MsgCreateValidator) GetInvolvedAddresses() []types.AccAddress
func (MsgCreateValidator) GetSignBytes ¶ added in v0.1.3
func (msg MsgCreateValidator) GetSignBytes() []byte
get the bytes for the message signer to sign on
func (MsgCreateValidator) GetSigners ¶ added in v0.1.3
func (msg MsgCreateValidator) GetSigners() []types.AccAddress
Return address(es) that must sign over msg.GetSignBytes()
func (MsgCreateValidator) Route ¶ added in v0.1.3
func (msg MsgCreateValidator) Route() string
func (MsgCreateValidator) Type ¶ added in v0.1.3
func (msg MsgCreateValidator) Type() string
func (MsgCreateValidator) ValidateBasic ¶ added in v0.1.3
func (msg MsgCreateValidator) ValidateBasic() error
quick validity check
type MsgCreateValidatorProposal ¶ added in v0.1.3
type MsgCreateValidatorProposal struct { MsgCreateValidator ProposalId int64 `json:"proposal_id"` }
type MsgRemoveValidator ¶
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 ¶
func NewMsgRemoveValidator(launcherAddr types.AccAddress, valAddr types.ValAddress, valConsAddr types.ConsAddress, proposalId int64) MsgRemoveValidator
func (MsgRemoveValidator) GetInvolvedAddresses ¶ added in v0.1.3
func (msg MsgRemoveValidator) GetInvolvedAddresses() []types.AccAddress
func (MsgRemoveValidator) GetSignBytes ¶ added in v0.1.3
func (msg MsgRemoveValidator) GetSignBytes() []byte
get the bytes for the message signer to sign on
func (MsgRemoveValidator) GetSigners ¶ added in v0.1.3
func (msg MsgRemoveValidator) GetSigners() []types.AccAddress
func (MsgRemoveValidator) Route ¶ added in v0.1.3
func (msg MsgRemoveValidator) Route() string
nolint
func (MsgRemoveValidator) Type ¶ added in v0.1.3
func (msg MsgRemoveValidator) Type() string
func (MsgRemoveValidator) ValidateBasic ¶ added in v0.1.3
func (msg MsgRemoveValidator) ValidateBasic() error
quick validity check
type MsgSideChainUnjail ¶
type MsgSideChainUnjail struct { ValidatorAddr types.ValAddress `json:"address"` SideChainId string `json:"side_chain_id"` }
func NewMsgSideChainUnjail ¶
func NewMsgSideChainUnjail(validatorAddr types.ValAddress, sideChainId string) MsgSideChainUnjail
func (MsgSideChainUnjail) GetInvolvedAddresses ¶ added in v0.1.3
func (msg MsgSideChainUnjail) GetInvolvedAddresses() []types.AccAddress
func (MsgSideChainUnjail) GetSignBytes ¶ added in v0.1.3
func (msg MsgSideChainUnjail) GetSignBytes() []byte
func (MsgSideChainUnjail) GetSigners ¶ added in v0.1.3
func (msg MsgSideChainUnjail) GetSigners() []types.AccAddress
func (MsgSideChainUnjail) Route ¶ added in v0.1.3
func (msg MsgSideChainUnjail) Route() string
func (MsgSideChainUnjail) Type ¶ added in v0.1.3
func (msg MsgSideChainUnjail) Type() string
func (MsgSideChainUnjail) ValidateBasic ¶ added in v0.1.3
func (msg MsgSideChainUnjail) ValidateBasic() error
type OracleParams ¶
type OracleParams struct {
ConsensusNeeded types.Dec `json:"ConsensusNeeded"` // Minimum deposit for a proposal to enter voting period.
}
func (*OracleParams) GetParamAttribute ¶ added in v0.1.3
func (p *OracleParams) GetParamAttribute() (string, bool)
func (*OracleParams) UpdateCheck ¶ added in v0.1.3
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 ¶ added in v0.1.3
Return bytes to sign for Output
func (Output) ValidateBasic ¶ added in v0.1.3
ValidateBasic - validate transaction output
type Prophecy ¶
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 v0.1.3
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 ¶ added in v0.1.3
func ProposalTypeFromString(str string) (ProposalKind, error)
String to proposalType byte. Returns ff if invalid.
func (ProposalKind) Format ¶ added in v0.1.3
func (pt ProposalKind) Format(s fmt.State, verb rune)
For Printf / Sprintf, returns bech32 when using %s nolint: errcheck
func (ProposalKind) Marshal ¶ added in v0.1.3
func (pt ProposalKind) Marshal() ([]byte, error)
Marshal needed for protobuf compatibility
func (ProposalKind) MarshalJSON ¶ added in v0.1.3
func (pt ProposalKind) MarshalJSON() ([]byte, error)
Marshals to JSON using string
func (ProposalKind) String ¶ added in v0.1.3
func (pt ProposalKind) String() string
Turns VoteOption byte to String
func (*ProposalKind) Unmarshal ¶ added in v0.1.3
func (pt *ProposalKind) Unmarshal(data []byte) error
Unmarshal needed for protobuf compatibility
func (*ProposalKind) UnmarshalJSON ¶ added in v0.1.3
func (pt *ProposalKind) UnmarshalJSON(data []byte) error
Unmarshals from JSON assuming Bech32 encoding
type RefundHTLTMsg ¶
type RefundHTLTMsg struct { From types.AccAddress `json:"from"` SwapID types.SwapBytes `json:"swap_id"` }
func NewRefundHTLTMsg ¶
func NewRefundHTLTMsg(from types.AccAddress, swapID []byte) RefundHTLTMsg
func (RefundHTLTMsg) GetInvolvedAddresses ¶ added in v0.1.3
func (msg RefundHTLTMsg) GetInvolvedAddresses() []types.AccAddress
func (RefundHTLTMsg) GetSignBytes ¶ added in v0.1.3
func (msg RefundHTLTMsg) GetSignBytes() []byte
func (RefundHTLTMsg) GetSigners ¶ added in v0.1.3
func (msg RefundHTLTMsg) GetSigners() []types.AccAddress
func (RefundHTLTMsg) Route ¶ added in v0.1.3
func (msg RefundHTLTMsg) Route() string
func (RefundHTLTMsg) String ¶ added in v0.1.3
func (msg RefundHTLTMsg) String() string
func (RefundHTLTMsg) Type ¶ added in v0.1.3
func (msg RefundHTLTMsg) Type() string
func (RefundHTLTMsg) ValidateBasic ¶ added in v0.1.3
func (msg RefundHTLTMsg) ValidateBasic() error
type SCChangeParams ¶
type SCChangeParams struct { SCParams []SCParam `json:"sc_params"` Description string `json:"description"` }
func (*SCChangeParams) Check ¶ added in v0.1.3
func (s *SCChangeParams) Check() error
type SCParam ¶
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 ¶ added in v0.1.3
func (msg SendMsg) GetInvolvedAddresses() []types.AccAddress
func (SendMsg) GetSignBytes ¶ added in v0.1.3
Implements Msg.
func (SendMsg) GetSigners ¶ added in v0.1.3
func (msg SendMsg) GetSigners() []types.AccAddress
Implements Msg.
func (SendMsg) ValidateBasic ¶ added in v0.1.3
Implements Msg.
type SetAccountFlagsMsg ¶
type SetAccountFlagsMsg struct { From types.AccAddress `json:"from"` Flags uint64 `json:"flags"` }
func NewSetAccountFlagsMsg ¶
func NewSetAccountFlagsMsg(from types.AccAddress, flags uint64) SetAccountFlagsMsg
func (SetAccountFlagsMsg) GetInvolvedAddresses ¶ added in v0.1.3
func (msg SetAccountFlagsMsg) GetInvolvedAddresses() []types.AccAddress
func (SetAccountFlagsMsg) GetSignBytes ¶ added in v0.1.3
func (msg SetAccountFlagsMsg) GetSignBytes() []byte
func (SetAccountFlagsMsg) GetSigners ¶ added in v0.1.3
func (msg SetAccountFlagsMsg) GetSigners() []types.AccAddress
func (SetAccountFlagsMsg) Route ¶ added in v0.1.3
func (msg SetAccountFlagsMsg) Route() string
func (SetAccountFlagsMsg) String ¶ added in v0.1.3
func (msg SetAccountFlagsMsg) String() string
func (SetAccountFlagsMsg) Type ¶ added in v0.1.3
func (msg SetAccountFlagsMsg) Type() string
func (SetAccountFlagsMsg) ValidateBasic ¶ added in v0.1.3
func (msg SetAccountFlagsMsg) ValidateBasic() error
type SetURIMsg ¶
type SetURIMsg struct { From types.AccAddress `json:"from"` Symbol string `json:"symbol"` TokenURI string `json:"token_uri"` }
SetURIMsg def
func NewSetUriMsg ¶
func NewSetUriMsg(from types.AccAddress, symbol string, tokenURI string) SetURIMsg
NewSetUriMsg for instance creation
func (SetURIMsg) GetInvolvedAddresses ¶ added in v0.1.3
func (msg SetURIMsg) GetInvolvedAddresses() []types.AccAddress
GetInvolvedAddresses part of Msg interface
func (SetURIMsg) GetSignBytes ¶ added in v0.1.3
GetSignBytes part of Msg interface
func (SetURIMsg) GetSigners ¶ added in v0.1.3
func (msg SetURIMsg) GetSigners() []types.AccAddress
GetSigners part of Msg interface
func (SetURIMsg) ValidateBasic ¶ added in v0.1.3
ValidateBasic does a simple validation check that doesn't require access to any other information.
type SideChainDelegateMsg ¶
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 ¶
func NewSideChainDelegateMsg(sideChainId string, delAddr types.AccAddress, valAddr types.ValAddress, delegation types.Coin) SideChainDelegateMsg
func (SideChainDelegateMsg) GetInvolvedAddresses ¶ added in v0.1.3
func (msg SideChainDelegateMsg) GetInvolvedAddresses() []types.AccAddress
func (SideChainDelegateMsg) GetSignBytes ¶ added in v0.1.3
func (msg SideChainDelegateMsg) GetSignBytes() []byte
func (SideChainDelegateMsg) GetSigners ¶ added in v0.1.3
func (msg SideChainDelegateMsg) GetSigners() []types.AccAddress
func (SideChainDelegateMsg) Route ¶ added in v0.1.3
func (msg SideChainDelegateMsg) Route() string
func (SideChainDelegateMsg) Type ¶ added in v0.1.3
func (msg SideChainDelegateMsg) Type() string
func (SideChainDelegateMsg) ValidateBasic ¶ added in v0.1.3
func (msg SideChainDelegateMsg) ValidateBasic() error
type SideChainDepositMsg ¶
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 ¶
func NewSideChainDepositMsg(depositer types.AccAddress, proposalID int64, amount types.Coins, sideChainId string) SideChainDepositMsg
func (SideChainDepositMsg) GetInvolvedAddresses ¶ added in v0.1.3
func (msg SideChainDepositMsg) GetInvolvedAddresses() []types.AccAddress
Implements Msg. Identical to MsgDeposit, keep here for code readability.
func (SideChainDepositMsg) GetSignBytes ¶ added in v0.1.3
func (msg SideChainDepositMsg) GetSignBytes() []byte
Implements Msg.
func (SideChainDepositMsg) GetSigners ¶ added in v0.1.3
func (msg SideChainDepositMsg) GetSigners() []types.AccAddress
Implements Msg. Identical to MsgDeposit, keep here for code readability.
func (SideChainDepositMsg) Route ¶ added in v0.1.3
func (msg SideChainDepositMsg) Route() string
nolint
func (SideChainDepositMsg) String ¶ added in v0.1.3
func (msg SideChainDepositMsg) String() string
func (SideChainDepositMsg) Type ¶ added in v0.1.3
func (msg SideChainDepositMsg) Type() string
func (SideChainDepositMsg) ValidateBasic ¶ added in v0.1.3
func (msg SideChainDepositMsg) ValidateBasic() error
Implements Msg.
type SideChainRedelegateMsg ¶
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 ¶
func NewSideChainRedelegateMsg(sideChainId string, delegatorAddr types.AccAddress, valSrcAddr types.ValAddress, valDstAddr types.ValAddress, amount types.Coin) SideChainRedelegateMsg
func (SideChainRedelegateMsg) GetInvolvedAddresses ¶ added in v0.1.3
func (msg SideChainRedelegateMsg) GetInvolvedAddresses() []types.AccAddress
func (SideChainRedelegateMsg) GetSignBytes ¶ added in v0.1.3
func (msg SideChainRedelegateMsg) GetSignBytes() []byte
func (SideChainRedelegateMsg) GetSigners ¶ added in v0.1.3
func (msg SideChainRedelegateMsg) GetSigners() []types.AccAddress
func (SideChainRedelegateMsg) Route ¶ added in v0.1.3
func (msg SideChainRedelegateMsg) Route() string
func (SideChainRedelegateMsg) Type ¶ added in v0.1.3
func (msg SideChainRedelegateMsg) Type() string
func (SideChainRedelegateMsg) ValidateBasic ¶ added in v0.1.3
func (msg SideChainRedelegateMsg) ValidateBasic() error
type SideChainSubmitProposalMsg ¶
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 ¶
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 v0.1.3
func (msg SideChainSubmitProposalMsg) GetInvolvedAddresses() []types.AccAddress
Implements Msg. Identical to MsgSubmitProposal, keep here for code readability.
func (SideChainSubmitProposalMsg) GetSignBytes ¶ added in v0.1.3
func (msg SideChainSubmitProposalMsg) GetSignBytes() []byte
Implements Msg.
func (SideChainSubmitProposalMsg) GetSigners ¶ added in v0.1.3
func (msg SideChainSubmitProposalMsg) GetSigners() []types.AccAddress
Implements Msg. Identical to MsgSubmitProposal, keep here for code readability.
func (SideChainSubmitProposalMsg) Route ¶ added in v0.1.3
func (msg SideChainSubmitProposalMsg) Route() string
nolint
func (SideChainSubmitProposalMsg) String ¶ added in v0.1.3
func (msg SideChainSubmitProposalMsg) String() string
func (SideChainSubmitProposalMsg) Type ¶ added in v0.1.3
func (msg SideChainSubmitProposalMsg) Type() string
func (SideChainSubmitProposalMsg) ValidateBasic ¶ added in v0.1.3
func (msg SideChainSubmitProposalMsg) ValidateBasic() error
Implements Msg.
type SideChainUndelegateMsg ¶
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 ¶
func NewSideChainUndelegateMsg(sideChainId string, delegatorAddr types.AccAddress, valAddr types.ValAddress, amount types.Coin) SideChainUndelegateMsg
func (SideChainUndelegateMsg) GetInvolvedAddresses ¶ added in v0.1.3
func (msg SideChainUndelegateMsg) GetInvolvedAddresses() []types.AccAddress
func (SideChainUndelegateMsg) GetSignBytes ¶ added in v0.1.3
func (msg SideChainUndelegateMsg) GetSignBytes() []byte
func (SideChainUndelegateMsg) GetSigners ¶ added in v0.1.3
func (msg SideChainUndelegateMsg) GetSigners() []types.AccAddress
func (SideChainUndelegateMsg) Route ¶ added in v0.1.3
func (msg SideChainUndelegateMsg) Route() string
func (SideChainUndelegateMsg) Type ¶ added in v0.1.3
func (msg SideChainUndelegateMsg) Type() string
func (SideChainUndelegateMsg) ValidateBasic ¶ added in v0.1.3
func (msg SideChainUndelegateMsg) ValidateBasic() error
type SideChainVoteMsg ¶
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 ¶
func NewSideChainVoteMsg(voter types.AccAddress, proposalID int64, option VoteOption, sideChainId string) SideChainVoteMsg
func (SideChainVoteMsg) GetInvolvedAddresses ¶ added in v0.1.3
func (msg SideChainVoteMsg) GetInvolvedAddresses() []types.AccAddress
Implements Msg. Identical to MsgVote, keep here for code readability.
func (SideChainVoteMsg) GetSignBytes ¶ added in v0.1.3
func (msg SideChainVoteMsg) GetSignBytes() []byte
Implements Msg.
func (SideChainVoteMsg) GetSigners ¶ added in v0.1.3
func (msg SideChainVoteMsg) GetSigners() []types.AccAddress
Implements Msg. Identical to MsgVote, keep here for code readability.
func (SideChainVoteMsg) Route ¶ added in v0.1.3
func (msg SideChainVoteMsg) Route() string
func (SideChainVoteMsg) String ¶ added in v0.1.3
func (msg SideChainVoteMsg) String() string
func (SideChainVoteMsg) Type ¶ added in v0.1.3
func (msg SideChainVoteMsg) Type() string
func (SideChainVoteMsg) ValidateBasic ¶ added in v0.1.3
func (msg SideChainVoteMsg) ValidateBasic() error
Implements Msg.
type SlashParams ¶
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 v0.1.3
func (p *SlashParams) GetParamAttribute() (string, bool)
func (*SlashParams) UpdateCheck ¶ added in v0.1.3
func (p *SlashParams) UpdateCheck() error
type SmartChainAddress ¶
type SmartChainAddress [20]byte
SmartChainAddress defines a standard smart chain address
func NewSmartChainAddress ¶
func NewSmartChainAddress(addr string) SmartChainAddress
NewSmartChainAddress is a constructor function for SmartChainAddress
func (SmartChainAddress) IsEmpty ¶ added in v0.1.3
func (addr SmartChainAddress) IsEmpty() bool
func (SmartChainAddress) MarshalJSON ¶ added in v0.1.3
func (addr SmartChainAddress) MarshalJSON() ([]byte, error)
MarshalJSON marshals the ethereum address to JSON
func (*SmartChainAddress) SetBytes ¶ added in v0.1.3
func (addr *SmartChainAddress) SetBytes(b []byte)
func (SmartChainAddress) String ¶ added in v0.1.3
func (addr SmartChainAddress) String() string
Route should return the name of the module
func (*SmartChainAddress) UnmarshalJSON ¶ added in v0.1.3
func (addr *SmartChainAddress) UnmarshalJSON(input []byte) error
UnmarshalJSON unmarshals an smart chain address
type StakeParams ¶
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 v0.1.3
func (p *StakeParams) GetParamAttribute() (string, bool)
func (*StakeParams) UpdateCheck ¶ added in v0.1.3
func (p *StakeParams) UpdateCheck() error
type Status ¶
type Status struct { Text StatusText `json:"text"` FinalClaim string `json:"final_claim"` }
type StatusText ¶ added in v0.1.3
type StatusText int
const ( PendingStatusText StatusText = iota SuccessStatusText FailedStatusText )
func (StatusText) MarshalJSON ¶ added in v0.1.3
func (text StatusText) MarshalJSON() ([]byte, error)
func (StatusText) String ¶ added in v0.1.3
func (text StatusText) String() string
func (*StatusText) UnmarshalJSON ¶ added in v0.1.3
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 ¶ added in v0.1.3
func (msg SubmitProposalMsg) Get(key interface{}) (value interface{})
Implements Msg.
func (SubmitProposalMsg) GetInvolvedAddresses ¶ added in v0.1.3
func (msg SubmitProposalMsg) GetInvolvedAddresses() []types.AccAddress
func (SubmitProposalMsg) GetSignBytes ¶ added in v0.1.3
func (msg SubmitProposalMsg) GetSignBytes() []byte
Implements Msg.
func (SubmitProposalMsg) GetSigners ¶ added in v0.1.3
func (msg SubmitProposalMsg) GetSigners() []types.AccAddress
Implements Msg.
func (SubmitProposalMsg) String ¶ added in v0.1.3
func (msg SubmitProposalMsg) String() string
func (SubmitProposalMsg) Type ¶ added in v0.1.3
func (msg SubmitProposalMsg) Type() string
func (SubmitProposalMsg) ValidateBasic ¶ added in v0.1.3
func (msg SubmitProposalMsg) ValidateBasic() error
Implements Msg.
type TimeLockMsg ¶
type TimeLockMsg struct { From types.AccAddress `json:"from"` Description string `json:"description"` Amount types.Coins `json:"amount"` LockTime int64 `json:"lock_time"` }
func NewTimeLockMsg ¶
func NewTimeLockMsg(from types.AccAddress, description string, amount types.Coins, lockTime int64) TimeLockMsg
func (TimeLockMsg) GetInvolvedAddresses ¶ added in v0.1.3
func (msg TimeLockMsg) GetInvolvedAddresses() []types.AccAddress
func (TimeLockMsg) GetSignBytes ¶ added in v0.1.3
func (msg TimeLockMsg) GetSignBytes() []byte
func (TimeLockMsg) GetSigners ¶ added in v0.1.3
func (msg TimeLockMsg) GetSigners() []types.AccAddress
func (TimeLockMsg) Route ¶ added in v0.1.3
func (msg TimeLockMsg) Route() string
func (TimeLockMsg) String ¶ added in v0.1.3
func (msg TimeLockMsg) String() string
func (TimeLockMsg) Type ¶ added in v0.1.3
func (msg TimeLockMsg) Type() string
func (TimeLockMsg) ValidateBasic ¶ added in v0.1.3
func (msg TimeLockMsg) ValidateBasic() error
type TimeRelockMsg ¶
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 ¶
func NewTimeRelockMsg(from types.AccAddress, id int64, description string, amount types.Coins, lockTime int64) TimeRelockMsg
func (TimeRelockMsg) GetInvolvedAddresses ¶ added in v0.1.3
func (msg TimeRelockMsg) GetInvolvedAddresses() []types.AccAddress
func (TimeRelockMsg) GetSignBytes ¶ added in v0.1.3
func (msg TimeRelockMsg) GetSignBytes() []byte
func (TimeRelockMsg) GetSigners ¶ added in v0.1.3
func (msg TimeRelockMsg) GetSigners() []types.AccAddress
func (TimeRelockMsg) Route ¶ added in v0.1.3
func (msg TimeRelockMsg) Route() string
func (TimeRelockMsg) String ¶ added in v0.1.3
func (msg TimeRelockMsg) String() string
func (TimeRelockMsg) Type ¶ added in v0.1.3
func (msg TimeRelockMsg) Type() string
func (TimeRelockMsg) ValidateBasic ¶ added in v0.1.3
func (msg TimeRelockMsg) ValidateBasic() error
type TimeUnlockMsg ¶
type TimeUnlockMsg struct { From types.AccAddress `json:"from"` Id int64 `json:"time_lock_id"` }
func NewTimeUnlockMsg ¶
func NewTimeUnlockMsg(from types.AccAddress, id int64) TimeUnlockMsg
func (TimeUnlockMsg) GetInvolvedAddresses ¶ added in v0.1.3
func (msg TimeUnlockMsg) GetInvolvedAddresses() []types.AccAddress
func (TimeUnlockMsg) GetSignBytes ¶ added in v0.1.3
func (msg TimeUnlockMsg) GetSignBytes() []byte
func (TimeUnlockMsg) GetSigners ¶ added in v0.1.3
func (msg TimeUnlockMsg) GetSigners() []types.AccAddress
func (TimeUnlockMsg) Route ¶ added in v0.1.3
func (msg TimeUnlockMsg) Route() string
func (TimeUnlockMsg) String ¶ added in v0.1.3
func (msg TimeUnlockMsg) String() string
func (TimeUnlockMsg) Type ¶ added in v0.1.3
func (msg TimeUnlockMsg) Type() string
func (TimeUnlockMsg) ValidateBasic ¶ added in v0.1.3
func (msg TimeUnlockMsg) ValidateBasic() error
type TinyTokenIssueMsg ¶
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 ¶
func NewTinyTokenIssueMsg(from types.AccAddress, name, symbol string, supply int64, mintable bool, tokenURI string) TinyTokenIssueMsg
NewTinyTokenIssueMsg for instance creation
func (TinyTokenIssueMsg) GetInvolvedAddresses ¶ added in v0.1.3
func (msg TinyTokenIssueMsg) GetInvolvedAddresses() []types.AccAddress
GetInvolvedAddresses part of Msg interface
func (TinyTokenIssueMsg) GetSignBytes ¶ added in v0.1.3
func (msg TinyTokenIssueMsg) GetSignBytes() []byte
GetSignBytes part of Msg interface
func (TinyTokenIssueMsg) GetSigners ¶ added in v0.1.3
func (msg TinyTokenIssueMsg) GetSigners() []types.AccAddress
GetSigners part of Msg interface
func (TinyTokenIssueMsg) Route ¶ added in v0.1.3
func (msg TinyTokenIssueMsg) Route() string
Route part of Msg interface
func (TinyTokenIssueMsg) String ¶ added in v0.1.3
func (msg TinyTokenIssueMsg) String() string
String part of Msg interface
func (TinyTokenIssueMsg) Type ¶ added in v0.1.3
func (msg TinyTokenIssueMsg) Type() string
Type part of Msg interface
func (TinyTokenIssueMsg) ValidateBasic ¶ added in v0.1.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 ¶ added in v0.1.3
func (msg TokenBurnMsg) GetInvolvedAddresses() []types.AccAddress
GetInvolvedAddresses is part of Msg interface
func (TokenBurnMsg) GetSignBytes ¶ added in v0.1.3
func (msg TokenBurnMsg) GetSignBytes() []byte
func (TokenBurnMsg) GetSigners ¶ added in v0.1.3
func (msg TokenBurnMsg) GetSigners() []types.AccAddress
GetSigners is part of Msg interface
func (TokenBurnMsg) Route ¶ added in v0.1.3
func (msg TokenBurnMsg) Route() string
Route is part of Msg interface
func (TokenBurnMsg) String ¶ added in v0.1.3
func (msg TokenBurnMsg) String() string
String is part of Msg interface
func (TokenBurnMsg) Type ¶ added in v0.1.3
func (msg TokenBurnMsg) Type() string
Type is part of Msg interface
func (TokenBurnMsg) ValidateBasic ¶ added in v0.1.3
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 ¶ added in v0.1.3
func (msg TokenFreezeMsg) GetInvolvedAddresses() []types.AccAddress
GetInvolvedAddresses is part of Msg interface
func (TokenFreezeMsg) GetSignBytes ¶ added in v0.1.3
func (msg TokenFreezeMsg) GetSignBytes() []byte
func (TokenFreezeMsg) GetSigners ¶ added in v0.1.3
func (msg TokenFreezeMsg) GetSigners() []types.AccAddress
func (TokenFreezeMsg) Route ¶ added in v0.1.3
func (msg TokenFreezeMsg) Route() string
Route is part of Msg interface
func (TokenFreezeMsg) String ¶ added in v0.1.3
func (msg TokenFreezeMsg) String() string
String is part of Msg interface
func (TokenFreezeMsg) Type ¶ added in v0.1.3
func (msg TokenFreezeMsg) Type() string
Type is part of Msg interface
func (TokenFreezeMsg) ValidateBasic ¶ added in v0.1.3
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 ¶ added in v0.1.3
func (msg TokenIssueMsg) GetInvolvedAddresses() []types.AccAddress
GetInvolvedAddresses part of Msg interface
func (TokenIssueMsg) GetSignBytes ¶ added in v0.1.3
func (msg TokenIssueMsg) GetSignBytes() []byte
GetSignBytes part of Msg interface
func (TokenIssueMsg) GetSigners ¶ added in v0.1.3
func (msg TokenIssueMsg) GetSigners() []types.AccAddress
GetSigners part of Msg interface
func (TokenIssueMsg) Route ¶ added in v0.1.3
func (msg TokenIssueMsg) Route() string
Route part of Msg interface
func (TokenIssueMsg) String ¶ added in v0.1.3
func (msg TokenIssueMsg) String() string
String part of Msg interface
func (TokenIssueMsg) Type ¶ added in v0.1.3
func (msg TokenIssueMsg) Type() string
Type part of Msg interface
func (TokenIssueMsg) ValidateBasic ¶ added in v0.1.3
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 ¶ added in v0.1.3
func (msg TokenUnfreezeMsg) GetInvolvedAddresses() []types.AccAddress
GetInvolvedAddresses is part of Msg interface
func (TokenUnfreezeMsg) GetSignBytes ¶ added in v0.1.3
func (msg TokenUnfreezeMsg) GetSignBytes() []byte
func (TokenUnfreezeMsg) GetSigners ¶ added in v0.1.3
func (msg TokenUnfreezeMsg) GetSigners() []types.AccAddress
func (TokenUnfreezeMsg) Route ¶ added in v0.1.3
func (msg TokenUnfreezeMsg) Route() string
Route is part of Msg interface
func (TokenUnfreezeMsg) String ¶ added in v0.1.3
func (msg TokenUnfreezeMsg) String() string
String is part of Msg interface
func (TokenUnfreezeMsg) Type ¶ added in v0.1.3
func (msg TokenUnfreezeMsg) Type() string
Type is part of Msg interface
func (TokenUnfreezeMsg) ValidateBasic ¶ added in v0.1.3
func (msg TokenUnfreezeMsg) ValidateBasic() error
type TransferInSynPackage ¶
type TransferOutMsg ¶
type TransferOutMsg struct { From sdk.AccAddress `json:"from"` To SmartChainAddress `json:"to"` Amount sdk.Coin `json:"amount"` ExpireTime int64 `json:"expire_time"` }
func NewTransferOutMsg ¶
func NewTransferOutMsg(from sdk.AccAddress, to SmartChainAddress, amount sdk.Coin, expireTime int64) TransferOutMsg
func (TransferOutMsg) GetInvolvedAddresses ¶ added in v0.1.3
func (msg TransferOutMsg) GetInvolvedAddresses() []sdk.AccAddress
func (TransferOutMsg) GetSignBytes ¶ added in v0.1.3
func (msg TransferOutMsg) GetSignBytes() []byte
func (TransferOutMsg) GetSigners ¶ added in v0.1.3
func (msg TransferOutMsg) GetSigners() []sdk.AccAddress
func (TransferOutMsg) Route ¶ added in v0.1.3
func (msg TransferOutMsg) Route() string
func (TransferOutMsg) String ¶ added in v0.1.3
func (msg TransferOutMsg) String() string
func (TransferOutMsg) Type ¶ added in v0.1.3
func (msg TransferOutMsg) Type() string
func (TransferOutMsg) ValidateBasic ¶ added in v0.1.3
func (msg TransferOutMsg) ValidateBasic() error
type TransferOutSynPackage ¶
type UnbindMsg ¶
type UnbindMsg struct { From sdk.AccAddress `json:"from"` Symbol string `json:"symbol"` }
func NewUnbindMsg ¶
func NewUnbindMsg(from sdk.AccAddress, symbol string) UnbindMsg
func (UnbindMsg) GetInvolvedAddresses ¶ added in v0.1.3
func (msg UnbindMsg) GetInvolvedAddresses() []sdk.AccAddress
func (UnbindMsg) GetSignBytes ¶ added in v0.1.3
func (UnbindMsg) GetSigners ¶ added in v0.1.3
func (msg UnbindMsg) GetSigners() []sdk.AccAddress
func (UnbindMsg) ValidateBasic ¶ added in v0.1.3
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) Get ¶ added in v0.1.3
func (msg VoteMsg) Get(key interface{}) (value interface{})
Implements Msg.
func (VoteMsg) GetInvolvedAddresses ¶ added in v0.1.3
func (msg VoteMsg) GetInvolvedAddresses() []types.AccAddress
func (VoteMsg) GetSignBytes ¶ added in v0.1.3
Implements Msg.
func (VoteMsg) GetSigners ¶ added in v0.1.3
func (msg VoteMsg) GetSigners() []types.AccAddress
Implements Msg.
func (VoteMsg) ValidateBasic ¶ added in v0.1.3
Implements Msg.
type VoteOption ¶
type VoteOption byte
const ( OptionEmpty VoteOption = 0x00 OptionYes VoteOption = 0x01 OptionAbstain VoteOption = 0x02 OptionNo VoteOption = 0x03 OptionNoWithVeto VoteOption = 0x04 )
nolint
func VoteOptionFromString ¶ added in v0.1.3
func VoteOptionFromString(str string) (VoteOption, error)
String to proposalType byte. Returns ff if invalid.
func (VoteOption) Format ¶ added in v0.1.3
func (vo VoteOption) Format(s fmt.State, verb rune)
For Printf / Sprintf, returns bech32 when using %s nolint: errcheck
func (VoteOption) Marshal ¶ added in v0.1.3
func (vo VoteOption) Marshal() ([]byte, error)
Marshal needed for protobuf compatibility
func (VoteOption) MarshalJSON ¶ added in v0.1.3
func (vo VoteOption) MarshalJSON() ([]byte, error)
Marshals to JSON using string
func (VoteOption) String ¶ added in v0.1.3
func (vo VoteOption) String() string
Turns VoteOption byte to String
func (*VoteOption) Unmarshal ¶ added in v0.1.3
func (vo *VoteOption) Unmarshal(data []byte) error
Unmarshal needed for protobuf compatibility
func (*VoteOption) UnmarshalJSON ¶ added in v0.1.3
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