Versions in this module Expand all Collapse all v1 v1.3.1 Aug 17, 2021 v1.3.0 Aug 5, 2021 Changes in this version + const AddrLen + const DecimalPrecisionBits + const DexFeeType + const FeeForAll + const FeeForProposer + const FeeFree + const OperateFeeType + const Precision + const SideBuy + const SideSell + const TransferFeeType + var AddressMissingError = errors.New("Address is required ") + var EndTimeLessThanStartTimeError = errors.New("end time should great than start time") + var EndTimeOutOfRangeError = errors.New("end time out of range ") + var Fixed8Decimals = int(math.Pow10(precision)) + var Fixed8One = NewFixed8(1) + var Fixed8Zero = NewFixed8(0) + var IntervalMissingError = errors.New("interval is required ") + var LimitOutOfRangeError = errors.New("limit out of range ") + var Network = ProdNetwork + var OffsetOutOfRangeError = errors.New("offset out of range ") + var OrderIdMissingError = errors.New("order id is required ") + var OrderSide = struct{ ... } + var OrderStatus = struct{ ... } + var OrderType = struct{ ... } + var PrefixForReceiveSequenceKey = []byte + var PrefixForSendSequenceKey = []byte + var SideChainStorePrefixByIdKey = []byte + var StartTimeOutOfRangeError = errors.New("start time out of range ") + var SymbolMissingError = errors.New("Symbol is required ") + var TimeInForce = struct{ ... } + var TradeSideMisMatchError = errors.New("Trade side is invalid ") + func Bech32ifyConsPub(pub crypto.PubKey) (string, error) + func GetFromBech32(bech32str, prefix string) ([]byte, error) + func GetReceiveSequenceKey(destIbcChainID IbcChainID, channelID IbcChannelID) []byte + func MustBech32ifyConsPub(pub crypto.PubKey) string + func RegisterWire(cdc *amino.Codec) + type AccAddress []byte + func AccAddressFromBech32(address string) (addr AccAddress, err error) + func AccAddressFromHex(address string) (addr AccAddress, err error) + func (bz *AccAddress) Unmarshal(data []byte) error + func (bz *AccAddress) UnmarshalJSON(data []byte) error + func (bz AccAddress) Bytes() []byte + func (bz AccAddress) Marshal() ([]byte, error) + func (bz AccAddress) MarshalJSON() ([]byte, error) + func (bz AccAddress) String() string + type Account interface + Clone func() Account + GetAccountNumber func() int64 + GetAddress func() AccAddress + GetCoins func() Coins + GetFlags func() uint64 + GetPubKey func() crypto.PubKey + GetSequence func() int64 + SetAccountNumber func(int64) error + SetAddress func(address AccAddress) error + SetCoins func(Coins) error + SetFlags func(flags uint64) + SetPubKey func(crypto.PubKey) error + SetSequence func(int64) error + type AppAccount struct + Flags uint64 + FrozenCoins Coins + LockedCoins Coins + Name string + func (acc *AppAccount) Clone() Account + func (acc *AppAccount) GetFlags() uint64 + func (acc *AppAccount) SetFlags(flags uint64) + func (acc *AppAccount) SetFrozenCoins(frozen Coins) + func (acc *AppAccount) SetLockedCoins(frozen Coins) + func (acc *AppAccount) SetName(name string) + func (acc AppAccount) GetFrozenCoins() Coins + func (acc AppAccount) GetLockedCoins() Coins + func (acc AppAccount) GetName() string + type AtomicSwap struct + ClosedTime int64 + CrossChain bool + ExpectedIncome string + ExpireHeight int64 + From AccAddress + InAmount Coins + Index int64 + OutAmount Coins + RandomNumber SwapBytes + RandomNumberHash SwapBytes + RecipientOtherChain string + Status SwapStatus + Timestamp int64 + To AccAddress + type BalanceAccount struct + Address string + Balances []TokenBalance + Flags uint64 + Number int64 + PublicKey []uint8 + Sequence int64 + type BaseAccount struct + AccountNumber int64 + Address AccAddress + Coins Coins + PubKey crypto.PubKey + Sequence int64 + func (acc *BaseAccount) Clone() BaseAccount + func (acc *BaseAccount) GetAccountNumber() int64 + func (acc *BaseAccount) GetCoins() Coins + func (acc *BaseAccount) GetSequence() int64 + func (acc *BaseAccount) SetAccountNumber(accNumber int64) error + func (acc *BaseAccount) SetAddress(addr AccAddress) error + func (acc *BaseAccount) SetCoins(coins Coins) error + func (acc *BaseAccount) SetPubKey(pubKey crypto.PubKey) error + func (acc *BaseAccount) SetSequence(seq int64) error + func (acc BaseAccount) GetAddress() AccAddress + func (acc BaseAccount) GetPubKey() crypto.PubKey + type BaseParams struct + SideChainId string + func NewBaseParams(sideChainId string) BaseParams + type BondStatus byte + const Bonded + const Unbonded + const Unbonding + type ChainNetwork uint8 + const GangesNetwork + const ProdNetwork + const TestNetwork + const TmpTestNetwork + func (this ChainNetwork) Bech32Prefixes() string + func (this ChainNetwork) Bech32ValidatorAddrPrefix() string + type CloseOrders struct + Order []Order + Total int + type ClosedOrdersQuery struct + End *int64 + Limit *uint32 + Offset *uint32 + SenderAddress string + Side string + Start *int64 + Symbol string + Total int + func NewClosedOrdersQuery(senderAddress string, withTotal bool) *ClosedOrdersQuery + func (param *ClosedOrdersQuery) Check() error + func (param *ClosedOrdersQuery) WithEnd(end int64) *ClosedOrdersQuery + func (param *ClosedOrdersQuery) WithLimit(limit uint32) *ClosedOrdersQuery + func (param *ClosedOrdersQuery) WithOffset(offset uint32) *ClosedOrdersQuery + func (param *ClosedOrdersQuery) WithSide(side string) *ClosedOrdersQuery + func (param *ClosedOrdersQuery) WithStart(start int64) *ClosedOrdersQuery + func (param *ClosedOrdersQuery) WithSymbol(baseAssetSymbol, quoteAssetSymbol string) *ClosedOrdersQuery + type Coin struct + Amount int64 + Denom string + func (coin Coin) IsNotNegative() bool + func (coin Coin) IsPositive() bool + func (coin Coin) IsZero() bool + func (coin Coin) Plus(coinB Coin) Coin + func (coin Coin) SameDenomAs(other Coin) bool + func (coin Coin) String() string + type Coins []Coin + func (coins Coins) AmountOf(denom string) int64 + func (coins Coins) IsEqual(coinsB Coins) bool + func (coins Coins) IsNotNegative() bool + func (coins Coins) IsPositive() bool + func (coins Coins) IsValid() bool + func (coins Coins) IsZero() bool + func (coins Coins) Len() int + func (coins Coins) Less(i, j int) bool + func (coins Coins) Plus(coinsB Coins) Coins + func (coins Coins) Sort() Coins + func (coins Coins) String() string + func (coins Coins) Swap(i, j int) + type Commission struct + MaxChangeRate Dec + MaxRate Dec + Rate Dec + UpdateTime time.Time + func NewCommission(rate, maxRate, maxChangeRate Dec) Commission + func (c Commission) String() string + func (c Commission) Validate() error + func (c Commission) ValidateNewRate(newRate Dec, blockTime time.Time) error + type CommissionMsg struct + MaxChangeRate Dec + MaxRate Dec + Rate Dec + type ConsAddress []byte + func ConsAddressFromBech32(address string) (addr ConsAddress, err error) + func ConsAddressFromHex(address string) (addr ConsAddress, err error) + func GetConsAddress(pubkey crypto.PubKey) ConsAddress + func (ca *ConsAddress) Unmarshal(data []byte) error + func (ca *ConsAddress) UnmarshalJSON(data []byte) error + func (ca ConsAddress) Bytes() []byte + func (ca ConsAddress) Empty() bool + func (ca ConsAddress) Equals(ca2 ConsAddress) bool + func (ca ConsAddress) Format(s fmt.State, verb rune) + func (ca ConsAddress) Marshal() ([]byte, error) + func (ca ConsAddress) MarshalJSON() ([]byte, error) + func (ca ConsAddress) String() string + type Dec struct + func NewDecFromStr(str string) (d Dec, err error) + func NewDecWithPrec(i, prec int64) Dec + func OneDec() Dec + func ZeroDec() Dec + func (d *Dec) UnmarshalAmino(v int64) (err error) + func (d *Dec) UnmarshalJSON(bz []byte) error + func (d *Dec) UnmarshalText(text []byte) error + func (d Dec) Abs() Dec + func (d Dec) Equal(d2 Dec) bool + func (d Dec) GT(d2 Dec) bool + func (d Dec) GTE(d2 Dec) bool + func (d Dec) IsNil() bool + func (d Dec) IsZero() bool + func (d Dec) LT(d2 Dec) bool + func (d Dec) LTE(d2 Dec) bool + func (d Dec) MarshalAmino() (int64, error) + func (d Dec) MarshalJSON() ([]byte, error) + func (d Dec) MarshalText() ([]byte, error) + func (d Dec) Neg() Dec + func (d Dec) String() string + func (d Dec) Sub(d2 Dec) Dec + type Delegation struct + DelegatorAddr AccAddress + Shares Dec + ValidatorAddr ValAddress + type DelegationResponse struct + Balance Coin + type DelegationValue struct + Height int64 + Shares Dec + type DepthQuery struct + Limit *uint32 + Symbol string + func NewDepthQuery(baseAssetSymbol, quoteAssetSymbol string) *DepthQuery + func (param *DepthQuery) Check() error + func (param *DepthQuery) WithLimit(limit uint32) *DepthQuery + type Description struct + Details string + Identity string + Moniker string + Website string + type DexFeeField struct + FeeName string + FeeValue int64 + type DexFeeParam struct + DexFeeFields []DexFeeField + func (p *DexFeeParam) Check() error + func (p *DexFeeParam) GetParamType() string + type Double float64 + func (n *Double) MarshalJSON() ([]byte, error) + func (n *Double) UnmarshalJSON(data []byte) error + type FeeDistributeType int8 + type FeeParam interface + Check func() error + GetParamType func() string + type Fixed8 int64 + func Fixed8DecodeString(s string) (Fixed8, error) + func NewFixed8(val int64) Fixed8 + func (f *Fixed8) MarshalJSON() ([]byte, error) + func (f *Fixed8) UnmarshalJSON(data []byte) error + func (f Fixed8) String() string + func (f Fixed8) ToInt64() int64 + func (f Fixed8) Value() int64 + type FixedFeeParams struct + Fee int64 + FeeFor FeeDistributeType + MsgType string + func (p *FixedFeeParams) Check() error + func (p *FixedFeeParams) GetParamType() string + type FlagOption uint64 + const TransferMemoCheckerFlag + type IbcChainID uint16 + type IbcChannelID uint8 + type Int struct + func NewInt(n int64) Int + func NewIntFromBigInt(i *big.Int) Int + func (i *Int) UnmarshalAmino(text string) error + func (i *Int) UnmarshalJSON(bz []byte) error + func (i Int) GT(i2 Int) bool + func (i Int) MarshalAmino() (string, error) + func (i Int) MarshalJSON() ([]byte, error) + type Kline struct + Close float64 + CloseTime int64 + High float64 + Low float64 + NumberOfTrades int32 + Open float64 + OpenTime int64 + QuoteAssetVolume float64 + Volume float64 + type KlineQuery struct + EndTime *int64 + Interval string + Limit *uint32 + StartTime *int64 + Symbol string + func NewKlineQuery(baseAssetSymbol, quoteAssetSymbol, interval string) *KlineQuery + func (param *KlineQuery) Check() error + func (param *KlineQuery) WithEndTime(end int64) *KlineQuery + func (param *KlineQuery) WithLimit(limit uint32) *KlineQuery + func (param *KlineQuery) WithStartTime(start int64) *KlineQuery + type MarketDepth struct + Asks [][]string + Bids [][]string + Height int64 + PendingMatch bool + type MarketsQuery struct + Limit *uint32 + Offset *uint32 + func NewMarketsQuery() *MarketsQuery + func (param *MarketsQuery) Check() error + func (param *MarketsQuery) WithLimit(limit uint32) *MarketsQuery + func (param *MarketsQuery) WithOffset(offset uint32) *MarketsQuery + type MiniToken struct + ContractAddress string + ContractDecimals int8 + Mintable bool + Name string + OrigSymbol string + Owner AccAddress + Symbol string + TokenType int8 + TokenURI string + TotalSupply Fixed8 + type NamedAccount interface + GetFrozenCoins func() Coins + GetLockedCoins func() Coins + GetName func() string + SetFrozenCoins func(Coins) + SetLockedCoins func(Coins) + SetName func(string) + type NodeInfo struct + Channels common.HexBytes + ID string + ListenAddr string + Moniker string + Network string + Other NodeInfoOther + Version string + type NodeInfoOther struct + AminoVersion string + ConsensusVersion string + P2PVersion string + RPCAddress string + RPCVersion string + TxIndex string + type OpenOrder struct + CreatedHeight int64 + CreatedTimestamp int64 + CumQty Fixed8 + Id string + LastUpdatedHeight int64 + LastUpdatedTimestamp int64 + Price Fixed8 + Quantity Fixed8 + Symbol string + type OpenOrders struct + Order []Order + Total int + type OpenOrdersQuery struct + Limit *uint32 + Offset *uint32 + SenderAddress string + Symbol string + Total int + func NewOpenOrdersQuery(senderAddress string, withTotal bool) *OpenOrdersQuery + func (param *OpenOrdersQuery) Check() error + func (param *OpenOrdersQuery) WithLimit(limit uint32) *OpenOrdersQuery + func (param *OpenOrdersQuery) WithOffset(offset uint32) *OpenOrdersQuery + func (param *OpenOrdersQuery) WithSymbol(symbol string) *OpenOrdersQuery + type Order struct + CumulateQuantity string + Fee string + ID string + LastExecutedPrice string + LastExecutedQuantity string + OrderCreateTime string + Owner string + Price string + Quantity string + Side int + Status string + Symbol string + TimeInForce int + TradeId string + TransactionHash string + TransactionTime string + Type int + type OrderBook struct + Height int64 + Levels []OrderBookLevel + PendingMatch bool + type OrderBookLevel struct + BuyPrice Fixed8 + BuyQty Fixed8 + SellPrice Fixed8 + SellQty Fixed8 + type Pool struct + BondedTokens Dec + LooseTokens Dec + type Proposal interface + GetDescription func() string + GetProposalID func() int64 + GetProposalType func() ProposalKind + GetStatus func() ProposalStatus + GetSubmitTime func() time.Time + GetTallyResult func() TallyResult + GetTitle func() string + GetTotalDeposit func() Coins + GetVotingPeriod func() time.Duration + GetVotingStartTime func() time.Time + SetDescription func(string) + SetProposalID func(int64) + SetProposalType func(ProposalKind) + SetStatus func(ProposalStatus) + SetSubmitTime func(time.Time) + SetTallyResult func(TallyResult) + SetTitle func(string) + SetTotalDeposit func(Coins) + SetVotingPeriod func(time.Duration) + SetVotingStartTime func(time.Time) + type ProposalKind byte + const ProposalTypeCSCParamsChange + const ProposalTypeCreateValidator + const ProposalTypeDelistTradingPair + const ProposalTypeFeeChange + const ProposalTypeListTradingPair + const ProposalTypeManageChanPermission + const ProposalTypeNil + const ProposalTypeParameterChange + const ProposalTypeRemoveValidator + const ProposalTypeSCParamsChange + const ProposalTypeSoftwareUpgrade + const ProposalTypeText + func ProposalTypeFromString(str string) (ProposalKind, error) + func (pt *ProposalKind) Unmarshal(data []byte) error + func (pt *ProposalKind) UnmarshalJSON(data []byte) error + func (pt ProposalKind) Marshal() ([]byte, error) + func (pt ProposalKind) MarshalJSON() ([]byte, error) + func (pt ProposalKind) String() string + type ProposalStatus byte + const StatusDepositPeriod + const StatusExecuted + const StatusNil + const StatusPassed + const StatusRejected + const StatusVotingPeriod + func ProposalStatusFromString(str string) (ProposalStatus, error) + func (status *ProposalStatus) Unmarshal(data []byte) error + func (status *ProposalStatus) UnmarshalJSON(data []byte) error + func (status ProposalStatus) Format(s fmt.State, verb rune) + func (status ProposalStatus) Marshal() ([]byte, error) + func (status ProposalStatus) MarshalJSON() ([]byte, error) + func (status ProposalStatus) String() string + type QueryBondsParams struct + DelegatorAddr AccAddress + ValidatorAddr ValAddress + type QueryDelegatorParams struct + DelegatorAddr AccAddress + type QueryProposalParams struct + ProposalID int64 + type QueryProposalsParams struct + NumLatestProposals int64 + ProposalStatus ProposalStatus + type QuerySwapByCreatorParams struct + Creator AccAddress + Limit int64 + Offset int64 + type QuerySwapByID struct + SwapID SwapBytes + type QuerySwapByRecipientParams struct + Limit int64 + Offset int64 + Recipient AccAddress + type QueryTimeLockParams struct + Account AccAddress + Id int64 + type QueryTimeLocksParams struct + Account AccAddress + type QueryTopValidatorsParams struct + Top int + type QueryValidatorParams struct + ValidatorAddr ValAddress + type Redelegation struct + Balance Coin + CreationHeight int64 + DelegatorAddr AccAddress + InitialBalance Coin + MinTime time.Time + SharesDst Dec + SharesSrc Dec + ValidatorDstAddr ValAddress + ValidatorSrcAddr ValAddress + func UnmarshalRED(cdc *amino.Codec, key, value []byte) (red Redelegation, err error) + type ResultStatus struct + NodeInfo NodeInfo + SyncInfo SyncInfo + ValidatorInfo ValidatorInfo + type SwapBytes []byte + func (bz *SwapBytes) Unmarshal(data []byte) error + func (bz *SwapBytes) UnmarshalJSON(data []byte) error + func (bz SwapBytes) Marshal() ([]byte, error) + func (bz SwapBytes) MarshalJSON() ([]byte, error) + type SwapStatus byte + const Completed + const Expired + const NULL + const Open + func NewSwapStatusFromString(str string) SwapStatus + func (status *SwapStatus) UnmarshalJSON(data []byte) error + func (status SwapStatus) MarshalJSON() ([]byte, error) + func (status SwapStatus) String() string + type SyncInfo struct + CatchingUp bool + LatestAppHash common.HexBytes + LatestBlockHash common.HexBytes + LatestBlockHeight int64 + LatestBlockTime time.Time + type TallyResult struct + Abstain Dec + No Dec + NoWithVeto Dec + Total Dec + Yes Dec + type TextProposal struct + Description string + ProposalID int64 + ProposalType ProposalKind + Status ProposalStatus + SubmitTime time.Time + TallyResult TallyResult + Title string + TotalDeposit Coins + VotingPeriod time.Duration + VotingStartTime time.Time + func (tp *TextProposal) SetDescription(description string) + func (tp *TextProposal) SetProposalID(proposalID int64) + func (tp *TextProposal) SetProposalType(proposalType ProposalKind) + func (tp *TextProposal) SetStatus(status ProposalStatus) + func (tp *TextProposal) SetSubmitTime(submitTime time.Time) + func (tp *TextProposal) SetTallyResult(tallyResult TallyResult) + func (tp *TextProposal) SetTitle(title string) + func (tp *TextProposal) SetTotalDeposit(totalDeposit Coins) + func (tp *TextProposal) SetVotingPeriod(votingPeriod time.Duration) + func (tp *TextProposal) SetVotingStartTime(votingStartTime time.Time) + func (tp TextProposal) GetDescription() string + func (tp TextProposal) GetProposalID() int64 + func (tp TextProposal) GetProposalType() ProposalKind + func (tp TextProposal) GetStatus() ProposalStatus + func (tp TextProposal) GetSubmitTime() time.Time + func (tp TextProposal) GetTallyResult() TallyResult + func (tp TextProposal) GetTitle() string + func (tp TextProposal) GetTotalDeposit() Coins + func (tp TextProposal) GetVotingPeriod() time.Duration + func (tp TextProposal) GetVotingStartTime() time.Time + type Ticker24h struct + AskPrice string + AskQuantity string + BidPrice string + BidQuantity string + CloseTime int64 + Count int64 + FirstID string + HighPrice string + LastID string + LastPrice string + LastQuantity string + LowPrice string + OpenPrice string + OpenTime int64 + PrevClosePrice string + PriceChange string + PriceChangePercent string + QuoteVolume string + Symbol string + Volume string + WeightedAvgPrice string + type Ticker24hQuery struct + Symbol string + func NewTicker24hQuery() *Ticker24hQuery + func (param *Ticker24hQuery) WithSymbol(baseAssetSymbol, quoteAssetSymbol string) *Ticker24hQuery + type Time struct + ApTime string + BlockTime string + type TimeLockRecord struct + Amount Coins + Description string + Id int64 + LockTime time.Time + type Token struct + ContractAddress string + ContractDecimals int8 + Mintable bool + Name string + OrigSymbol string + Owner AccAddress + Symbol string + TotalSupply Fixed8 + type TokenBalance struct + Free Fixed8 + Frozen Fixed8 + Locked Fixed8 + Symbol string + type TokensQuery struct + Limit *uint32 + Offset *uint32 + func NewTokensQuery() *TokensQuery + func (param *TokensQuery) Check() error + func (param *TokensQuery) WithLimit(limit uint32) *TokensQuery + func (param *TokensQuery) WithOffset(offset uint32) *TokensQuery + type Trade struct + BaseAsset string + BlockHeight int64 + BuyFee string + BuySingleFee string + BuyerId string + BuyerOrderID string + Price string + Quantity string + QuoteAsset string + SellFee string + SellerId string + SellerOrderID string + Symbol string + TickType string + Time int64 + TradeID string + type Trades struct + Total int + Trade []Trade + type TradesQuery struct + End *int64 + Limit *uint32 + Offset *uint32 + SenderAddress *string + Side *string + Start *int64 + Symbol string + Total int + func NewTradesQuery(withTotal bool) *TradesQuery + func (param *TradesQuery) Check() error + func (param *TradesQuery) WithAddress(addr string) *TradesQuery + func (param *TradesQuery) WithEnd(end int64) *TradesQuery + func (param *TradesQuery) WithLimit(limit uint32) *TradesQuery + func (param *TradesQuery) WithOffset(offset uint32) *TradesQuery + func (param *TradesQuery) WithSide(side string) *TradesQuery + func (param *TradesQuery) WithStart(start int64) *TradesQuery + func (param *TradesQuery) WithSymbol(baseAssetSymbol, quoteAssetSymbol string) *TradesQuery + type TradingPair struct + BaseAssetSymbol string + ListPrice Fixed8 + LotSize Fixed8 + QuoteAssetSymbol string + TickSize Fixed8 + type TransferFeeParam struct + LowerLimitAsMulti int64 + MultiTransferFee int64 + func (p *TransferFeeParam) Check() error + func (p *TransferFeeParam) GetParamType() string + type UnbondingDelegation struct + Balance Coin + CreationHeight int64 + DelegatorAddr AccAddress + InitialBalance Coin + MinTime time.Time + ValidatorAddr ValAddress + type ValAddress []byte + func ValAddressFromBech32(address string) (addr ValAddress, err error) + func (va *ValAddress) UnmarshalJSON(data []byte) error + func (va ValAddress) Bytes() []byte + func (va ValAddress) MarshalJSON() ([]byte, error) + func (va ValAddress) String() string + type Validator struct + BondHeight int64 + BondIntraTxCounter int16 + Commission Commission + ConsPubKey string + DelegatorShares Dec + Description Description + DistributionAddr AccAddress + FeeAddr AccAddress + Jailed bool + OperatorAddr ValAddress + SideChainId string + SideConsAddr []byte + SideFeeAddr []byte + Status BondStatus + Tokens Dec + UnbondingHeight int64 + UnbondingMinTime time.Time + type ValidatorInfo struct + Address common.HexBytes + PubKey []uint8 + VotingPower int64 v1.2.9 Aug 5, 2021 v1.2.8 Aug 5, 2021 v1.2.7 Aug 5, 2021