Documentation ¶
Overview ¶
*
Copyright Cosmos-SDK Authors Copyright 2016 All in Bits, Inc Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0 Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License.
*
Copyright Cosmos-SDK Authors Copyright 2016 All in Bits, Inc Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0 Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License.
*
Copyright Cosmos-SDK Authors Copyright 2016 All in Bits, Inc Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0 Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License.
*
Copyright Cosmos-SDK Authors Copyright 2016 All in Bits, Inc Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0 Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License.
*
Copyright Cosmos-SDK Authors Copyright 2016 All in Bits, Inc Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0 Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License.
*
Copyright Cosmos-SDK Authors Copyright 2016 All in Bits, Inc Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0 Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License.
*
Copyright Cosmos-SDK Authors Copyright 2016 All in Bits, Inc Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0 Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License.
*
Copyright Cosmos-SDK Authors Copyright 2016 All in Bits, Inc Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0 Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License.
*
Copyright Cosmos-SDK Authors Copyright 2016 All in Bits, Inc Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0 Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License.
*
Copyright Cosmos-SDK Authors Copyright 2016 All in Bits, Inc Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0 Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License.
*
Copyright Cosmos-SDK Authors Copyright 2016 All in Bits, Inc Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0 Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License.
*
Copyright Cosmos-SDK Authors Copyright 2016 All in Bits, Inc Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0 Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License.
*
Copyright Cosmos-SDK Authors Copyright 2016 All in Bits, Inc Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0 Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License.
*
Copyright Cosmos-SDK Authors Copyright 2016 All in Bits, Inc Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0 Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License.
Index ¶
- Constants
- Variables
- func DecEq(t *testing.T, exp, got Dec) (*testing.T, bool, string, string, string)
- func DecsEqual(d1s, d2s []Dec) bool
- func DurationFromProto(p *Duration) (time.Duration, error)
- func EncodeVarintTx(dAtA []byte, offset int, v uint64) int
- func IntEq(t *testing.T, exp, got Int) (*testing.T, bool, string, string, string)
- func MustSortJSON(toSortJSON []byte) []byte
- func RegistryMessageConverter(t string, fn ConverterFunc)
- func SizeOfStdDuration(d time.Duration) int
- func SkipTx(dAtA []byte) (n int, err error)
- func SortJSON(toSortJSON []byte) ([]byte, error)
- func SortableDecBytes(dec Dec) []byte
- func SovTx(x uint64) (n int)
- func StdDurationMarshal(d time.Duration) ([]byte, error)
- func StdDurationMarshalTo(d time.Duration, data []byte) (int, error)
- func StdDurationUnmarshal(d *time.Duration, data []byte) error
- func ValidSortableDec(dec Dec) bool
- func ValidateDenom(denom string) error
- type Any
- type Coin
- func (coin Coin) Add(coinB Coin) Coin
- func (coin Coin) AddAmount(amount Int) Coin
- func (coin Coin) IsEqual(other Coin) bool
- func (coin Coin) IsGTE(other Coin) bool
- func (coin Coin) IsLT(other Coin) bool
- func (coin Coin) IsNegative() bool
- func (coin Coin) IsNil() bool
- func (coin Coin) IsPositive() bool
- func (coin Coin) IsValid() bool
- func (coin Coin) IsZero() bool
- func (m *Coin) Marshal() (dAtA []byte, err error)
- func (m *Coin) MarshalTo(dAtA []byte) (int, error)
- func (m *Coin) MarshalToSizedBuffer(dAtA []byte) (int, error)
- func (m *Coin) Size() (n int)
- func (coin Coin) String() string
- func (coin Coin) Sub(coinB Coin) Coin
- func (coin Coin) SubAmount(amount Int) Coin
- func (m *Coin) Unmarshal(dAtA []byte) error
- func (coin Coin) Validate() error
- type Coins
- func (coins Coins) Add(coinsB ...Coin) Coins
- func (coins Coins) AmountOf(denom string) Int
- func (coins Coins) AmountOfNoDenomValidation(denom string) Int
- func (coins Coins) DenomsSubsetOf(coinsB Coins) bool
- func (coins Coins) Empty() bool
- func (coins Coins) GetDenomByIndex(i int) string
- func (coins Coins) IsAllGT(coinsB Coins) bool
- func (coins Coins) IsAllGTE(coinsB Coins) bool
- func (coins Coins) IsAllLT(coinsB Coins) bool
- func (coins Coins) IsAllLTE(coinsB Coins) bool
- func (coins Coins) IsAllPositive() bool
- func (coins Coins) IsAnyGT(coinsB Coins) bool
- func (coins Coins) IsAnyGTE(coinsB Coins) bool
- func (coins Coins) IsAnyNegative() bool
- func (coins Coins) IsAnyNil() bool
- func (coins Coins) IsEqual(coinsB Coins) 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) MarshalJSON() ([]byte, error)
- func (coins Coins) SafeSub(coinsB Coins) (Coins, bool)
- func (coins Coins) Sort() Coins
- func (coins Coins) String() string
- func (coins Coins) Sub(coinsB Coins) Coins
- func (coins Coins) Swap(i, j int)
- func (coins Coins) Validate() error
- type CompactBitArray
- type ConverterFunc
- type Dec
- func MaxDec(d1, d2 Dec) Dec
- func MinDec(d1, d2 Dec) Dec
- func MustNewDecFromStr(s string) Dec
- func NewDec(i int64) Dec
- func NewDecFromBigInt(i *big.Int) Dec
- func NewDecFromBigIntWithPrec(i *big.Int, prec int64) Dec
- func NewDecFromInt(i Int) Dec
- func NewDecFromIntWithPrec(i Int, prec int64) Dec
- func NewDecFromStr(str string) (Dec, error)
- func NewDecWithPrec(i, prec int64) Dec
- func OneDec() Dec
- func SmallestDec() Dec
- func ZeroDec() Dec
- func (d Dec) Abs() Dec
- func (d Dec) Add(d2 Dec) Dec
- func (d Dec) ApproxRoot(root uint64) (guess Dec, err error)
- func (d Dec) ApproxSqrt() (Dec, error)
- func (d Dec) BigInt() *big.Int
- func (d Dec) Ceil() Dec
- func (d Dec) Equal(d2 Dec) bool
- func (d Dec) Float64() (float64, error)
- func (d Dec) Format(s fmt.State, verb rune)
- func (d Dec) GT(d2 Dec) bool
- func (d Dec) GTE(d2 Dec) bool
- func (d Dec) IsInteger() bool
- func (d Dec) IsNegative() bool
- func (d Dec) IsNil() bool
- func (d Dec) IsPositive() bool
- func (d Dec) IsZero() bool
- func (d Dec) LT(d2 Dec) bool
- func (d Dec) LTE(d2 Dec) bool
- func (d Dec) Marshal() ([]byte, error)
- func (d Dec) MarshalAmino() ([]byte, error)
- func (d Dec) MarshalJSON() ([]byte, error)
- func (d *Dec) MarshalTo(data []byte) (n int, err error)
- func (d Dec) MarshalYAML() (interface{}, error)
- func (d Dec) Mul(d2 Dec) Dec
- func (d Dec) MulInt(i Int) Dec
- func (d Dec) MulInt64(i int64) Dec
- func (d Dec) MulTruncate(d2 Dec) Dec
- func (d Dec) MustFloat64() float64
- func (d Dec) Neg() Dec
- func (d Dec) Power(power uint64) Dec
- func (d Dec) Quo(d2 Dec) Dec
- func (d Dec) QuoInt(i Int) Dec
- func (d Dec) QuoInt64(i int64) Dec
- func (d Dec) QuoRoundUp(d2 Dec) Dec
- func (d Dec) QuoTruncate(d2 Dec) Dec
- func (d Dec) RoundInt() Int
- func (d Dec) RoundInt64() int64
- func (d *Dec) Size() int
- func (d Dec) String() string
- func (d Dec) Sub(d2 Dec) Dec
- func (d Dec) TruncateDec() Dec
- func (d Dec) TruncateInt() Int
- func (d Dec) TruncateInt64() int64
- func (d *Dec) Unmarshal(data []byte) error
- func (d *Dec) UnmarshalAmino(bz []byte) error
- func (d *Dec) UnmarshalJSON(bz []byte) error
- type DecCoin
- type Duration
- type Input
- type Int
- func (i Int) Abs() Int
- func (i Int) Add(i2 Int) (res Int)
- func (i Int) AddRaw(i2 int64) Int
- func (i Int) BigInt() *big.Int
- func (i Int) Equal(i2 Int) bool
- func (i Int) GT(i2 Int) bool
- func (i Int) GTE(i2 Int) bool
- func (i Int) Int64() int64
- func (i Int) IsInt64() bool
- func (i Int) IsNegative() bool
- func (i Int) IsNil() bool
- func (i Int) IsPositive() bool
- func (i Int) IsUint64() bool
- func (i Int) IsZero() bool
- func (i Int) LT(i2 Int) bool
- func (i Int) LTE(i2 Int) bool
- func (i Int) Marshal() ([]byte, error)
- func (i Int) MarshalAmino() ([]byte, error)
- func (i Int) MarshalJSON() ([]byte, error)
- func (i *Int) MarshalTo(data []byte) (n int, err error)
- func (i Int) MarshalYAML() (interface{}, error)
- func (i Int) Mod(i2 Int) Int
- func (i Int) ModRaw(i2 int64) Int
- func (i Int) Mul(i2 Int) (res Int)
- func (i Int) MulRaw(i2 int64) Int
- func (i Int) Neg() (res Int)
- func (i Int) Quo(i2 Int) (res Int)
- func (i Int) QuoRaw(i2 int64) Int
- func (i Int) Sign() int
- func (i *Int) Size() int
- func (i Int) String() string
- func (i Int) Sub(i2 Int) (res Int)
- func (i Int) SubRaw(i2 int64) Int
- func (i Int) Uint64() uint64
- func (i *Int) Unmarshal(data []byte) error
- func (i *Int) UnmarshalAmino(bz []byte) error
- func (i *Int) UnmarshalJSON(bz []byte) error
- type Message
- type MsgMultiSend
- type MsgSend
- type MultiSignature
- type Output
- type PackError
- type PrivKey
- func (m *PrivKey) GetKey() []byte
- func (m *PrivKey) Marshal() (dAtA []byte, err error)
- func (m *PrivKey) MarshalTo(dAtA []byte) (int, error)
- func (m *PrivKey) MarshalToSizedBuffer(dAtA []byte) (int, error)
- func (m *PrivKey) MessageName() string
- func (m *PrivKey) Size() (n int)
- func (m *PrivKey) Unmarshal(dAtA []byte) error
- type PubKey
- func (m *PubKey) GetKey() []byte
- func (m *PubKey) Marshal() (dAtA []byte, err error)
- func (m *PubKey) MarshalTo(dAtA []byte) (int, error)
- func (m *PubKey) MarshalToSizedBuffer(dAtA []byte) (int, error)
- func (m *PubKey) MessageName() string
- func (m *PubKey) Size() (n int)
- func (m *PubKey) Unmarshal(dAtA []byte) error
- type SignMode
- type SignatureDescriptor
- func (m *SignatureDescriptor) Marshal() (dAtA []byte, err error)
- func (m *SignatureDescriptor) MarshalTo(dAtA []byte) (int, error)
- func (m *SignatureDescriptor) MarshalToSizedBuffer(dAtA []byte) (int, error)
- func (m *SignatureDescriptor) Size() (n int)
- func (m *SignatureDescriptor) Unmarshal(dAtA []byte) error
- type SignatureDescriptor_Data
- func (m *SignatureDescriptor_Data) Marshal() (dAtA []byte, err error)
- func (m *SignatureDescriptor_Data) MarshalTo(dAtA []byte) (int, error)
- func (m *SignatureDescriptor_Data) MarshalToSizedBuffer(dAtA []byte) (int, error)
- func (m *SignatureDescriptor_Data) Size() (n int)
- func (m *SignatureDescriptor_Data) Unmarshal(dAtA []byte) error
- type SignatureDescriptor_Data_Multi
- func (m *SignatureDescriptor_Data_Multi) Marshal() (dAtA []byte, err error)
- func (m *SignatureDescriptor_Data_Multi) MarshalTo(dAtA []byte) (int, error)
- func (m *SignatureDescriptor_Data_Multi) MarshalToSizedBuffer(dAtA []byte) (int, error)
- func (m *SignatureDescriptor_Data_Multi) Size() (n int)
- func (m *SignatureDescriptor_Data_Multi) Unmarshal(dAtA []byte) error
- type SignatureDescriptor_Data_Multi_
- type SignatureDescriptor_Data_Single
- func (m *SignatureDescriptor_Data_Single) Marshal() (dAtA []byte, err error)
- func (m *SignatureDescriptor_Data_Single) MarshalTo(dAtA []byte) (int, error)
- func (m *SignatureDescriptor_Data_Single) MarshalToSizedBuffer(dAtA []byte) (int, error)
- func (m *SignatureDescriptor_Data_Single) Size() (n int)
- func (m *SignatureDescriptor_Data_Single) Unmarshal(dAtA []byte) error
- type SignatureDescriptor_Data_Single_
- type SignatureDescriptors
- func (m *SignatureDescriptors) Marshal() (dAtA []byte, err error)
- func (m *SignatureDescriptors) MarshalTo(dAtA []byte) (int, error)
- func (m *SignatureDescriptors) MarshalToSizedBuffer(dAtA []byte) (int, error)
- func (m *SignatureDescriptors) Size() (n int)
- func (m *SignatureDescriptors) Unmarshal(dAtA []byte) error
- type StdAny
- type StdFee
- type StdSignDoc
- type StdSignature
- type StdTx
Constants ¶
const ( // number of decimal places Precision = 18 // bytes required to represent the above precision // Ceiling[Log2[999 999 999 999 999 999]] DecimalPrecisionBits = 60 )
Variables ¶
var ( ErrInvalidLengthAny = fmt.Errorf("proto: negative length found during unmarshaling") ErrIntOverflowAny = fmt.Errorf("proto: integer overflow") ErrUnexpectedEndOfGroupAny = fmt.Errorf("proto: unexpected end of group") )
var ( ErrInvalidLengthBank = fmt.Errorf("proto: negative length found during unmarshaling") ErrIntOverflowBank = fmt.Errorf("proto: integer overflow") ErrUnexpectedEndOfGroupBank = fmt.Errorf("proto: unexpected end of group") )
var ( ErrInvalidLengthCoin = fmt.Errorf("proto: negative length found during unmarshaling") ErrIntOverflowCoin = fmt.Errorf("proto: integer overflow") ErrUnexpectedEndOfGroupCoin = fmt.Errorf("proto: unexpected end of group") )
var ( ErrEmptyDecimalStr = errors.New("decimal string cannot be empty") ErrInvalidDecimalLength = errors.New("invalid decimal length") ErrInvalidDecimalStr = errors.New("invalid decimal string") )
Decimal errors
var ( ErrInvalidLengthDuration = fmt.Errorf("proto: negative length found during unmarshaling") ErrIntOverflowDuration = fmt.Errorf("proto: integer overflow") ErrUnexpectedEndOfGroupDuration = fmt.Errorf("proto: unexpected end of group") )
var ( ErrInvalidLengthKeys = fmt.Errorf("proto: negative length found during unmarshaling") ErrIntOverflowKeys = fmt.Errorf("proto: integer overflow") ErrUnexpectedEndOfGroupKeys = fmt.Errorf("proto: unexpected end of group") )
var ( ErrInvalidLengthMultisig = fmt.Errorf("proto: negative length found during unmarshaling") ErrIntOverflowMultisig = fmt.Errorf("proto: integer overflow") ErrUnexpectedEndOfGroupMultisig = fmt.Errorf("proto: unexpected end of group") )
var ( ErrInvalidLengthSigning = fmt.Errorf("proto: negative length found during unmarshaling") ErrIntOverflowSigning = fmt.Errorf("proto: integer overflow") ErrUnexpectedEndOfGroupSigning = fmt.Errorf("proto: unexpected end of group") )
var ( ErrInvalidLengthTx = fmt.Errorf("proto: negative length found during unmarshaling") ErrIntOverflowTx = fmt.Errorf("proto: integer overflow") ErrUnexpectedEndOfGroupTx = fmt.Errorf("proto: unexpected end of group") )
var MaxSortableDec = OneDec().Quo(SmallestDec())
MaxSortableDec is the largest Dec that can be passed into SortableDecBytes() Its negative form is the least Dec that can be passed in.
var SignMode_name = map[int32]string{
0: "SIGN_MODE_UNSPECIFIED",
1: "SIGN_MODE_DIRECT",
2: "SIGN_MODE_TEXTUAL",
127: "SIGN_MODE_LEGACY_AMINO_JSON",
}
var SignMode_value = map[string]int32{
"SIGN_MODE_UNSPECIFIED": 0,
"SIGN_MODE_DIRECT": 1,
"SIGN_MODE_TEXTUAL": 2,
"SIGN_MODE_LEGACY_AMINO_JSON": 127,
}
Functions ¶
func MustSortJSON ¶
MustSortJSON is like SortJSON but panic if an error occurs, e.g., if the passed JSON isn't valid.
func RegistryMessageConverter ¶
func RegistryMessageConverter(t string, fn ConverterFunc)
func SizeOfStdDuration ¶
func SortJSON ¶
SortedJSON 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 SortableDecBytes ¶
SortableDecBytes returns a byte slice representation of a Dec that can be sorted. Left and right pads with 0s so there are 18 digits to left and right of the decimal point. For this reason, there is a maximum and minimum value for this, enforced by ValidSortableDec.
func ValidSortableDec ¶
ValidSortableDec ensures that a Dec is within the sortable bounds, a Dec can't have a precision of less than 10^-18. Max sortable decimal was set to the reciprocal of SmallestDec.
func ValidateDenom ¶
ValidateDenom is the default validation function for Coin.Denom.
Types ¶
type Any ¶
type Any struct { // nolint TypeUrl string `protobuf:"bytes,1,opt,name=type_url,json=typeUrl,proto3" json:"type_url,omitempty"` // Must be a valid serialized protocol buffer of the above specified type. Value []byte `protobuf:"bytes,2,opt,name=value,proto3" json:"value,omitempty"` // nolint XXX_unrecognized []byte `json:"-"` }
func NewAnyWithValue ¶
NewAnyWithValue constructs a new Any packed with the value provided or returns an error if that value couldn't be packed. This also caches the packed value so that it can be retrieved from GetCachedValue without unmarshaling
func NewAnyWithValueAndName ¶
type Coin ¶
type Coin struct { Denom string `protobuf:"bytes,1,opt,name=denom,proto3" json:"denom,omitempty"` Amount Int `protobuf:"bytes,2,opt,name=amount,proto3,customtype=Int" json:"amount"` }
Coin defines a token with a denomination and an amount.
NOTE: The amount field is an Int which implements the custom method signatures required by gogoproto.
func NewCoin ¶
NewCoin returns a new coin with a denomination and amount. It will panic if the amount is negative or if the denomination is invalid.
func NewInt64Coin ¶
NewInt64Coin returns a new coin with a denomination and amount. It will panic if the amount is negative.
func (Coin) Add ¶
Add adds amounts of two coins with same denom. If the coins differ in denom then it panics.
func (Coin) IsGTE ¶
IsGTE returns true if they are the same type and the receiver is an equal or greater value
func (Coin) IsNegative ¶
IsNegative returns true if the coin amount is negative and false otherwise.
TODO: Remove once unsigned integers are used.
func (Coin) IsPositive ¶
IsPositive returns true if coin amount is positive.
TODO: Remove once unsigned integers are used.
func (Coin) IsValid ¶
IsValid returns true if the Coin has a non-negative amount and the denom is valid.
func (Coin) Sub ¶
Sub subtracts amounts of two coins with same denom. If the coins differ in denom then it panics.
type Coins ¶
type Coins []Coin
Coins is a set of Coin, one per currency
func NewCoins ¶
NewCoins constructs a new coin set. The provided coins will be sanitized by removing zero coins and sorting the coin set. A panic will occur if the coin set is not valid.
func (Coins) Add ¶
Add adds two sets of coins.
e.g. {2A} + {A, 2B} = {3A, 2B} {2A} + {0B} = {2A}
NOTE: Add operates under the invariant that coins are sorted by denominations.
CONTRACT: Add will never return Coins where one Coin has a non-positive amount. In otherwords, IsValid will always return true. The function panics if `coins` or `coinsB` are not sorted (ascending).
func (Coins) AmountOfNoDenomValidation ¶
AmountOfNoDenomValidation returns the amount of a denom from coins without validating the denomination.
func (Coins) DenomsSubsetOf ¶
DenomsSubsetOf returns true if receiver's denom set is subset of coinsB's denoms.
func (Coins) GetDenomByIndex ¶
GetDenomByIndex returns the Denom of the certain coin to make the findDup generic
func (Coins) IsAllGT ¶
IsAllGT returns true if for every denom in coinsB, the denom is present at a greater amount in coins.
func (Coins) IsAllGTE ¶
IsAllGTE returns false if for any denom in coinsB, the denom is present at a smaller amount in coins; else returns true.
func (Coins) IsAllLT ¶
IsAllLT returns True iff for every denom in coins, the denom is present at a smaller amount in coinsB.
func (Coins) IsAllLTE ¶
IsAllLTE returns true iff for every denom in coins, the denom is present at a smaller or equal amount in coinsB.
func (Coins) IsAllPositive ¶
IsAllPositive returns true if there is at least one coin and all currencies have a positive value.
func (Coins) IsAnyGT ¶
IsAnyGT returns true iff for any denom in coins, the denom is present at a greater amount in coinsB.
e.g. {2A, 3B}.IsAnyGT{A} = true {2A, 3B}.IsAnyGT{5C} = false {}.IsAnyGT{5C} = false {2A, 3B}.IsAnyGT{} = false
func (Coins) IsAnyGTE ¶
IsAnyGTE returns true iff coins contains at least one denom that is present at a greater or equal amount in coinsB; it returns false otherwise.
NOTE: IsAnyGTE operates under the invariant that both coin sets are sorted by denominations and there exists no zero coins.
func (Coins) IsAnyNegative ¶
IsAnyNegative returns true if there is at least one coin whose amount is negative; returns false otherwise. It returns false if the coin set is empty too.
TODO: Remove once unsigned integers are used.
func (Coins) IsAnyNil ¶
IsAnyNil returns true if there is at least one coin whose amount is nil; returns false otherwise. It returns false if the coin set is empty too.
func (Coins) IsValid ¶
IsValid calls Validate and returns true when the Coins are sorted, have positive amount, with a valid and unique denomination (i.e no duplicates).
func (Coins) MarshalJSON ¶
MarshalJSON implements a custom JSON marshaller for the Coins type to allow nil Coins to be encoded as an empty array.
func (Coins) SafeSub ¶
SafeSub performs the same arithmetic as Sub but returns a boolean if any negative coin amount was returned. The function panics if `coins` or `coinsB` are not sorted (ascending).
type CompactBitArray ¶
type CompactBitArray struct { ExtraBitsStored uint32 `protobuf:"varint,1,opt,name=extra_bits_stored,json=extraBitsStored,proto3" json:"extra_bits_stored,omitempty"` Elems []byte `protobuf:"bytes,2,opt,name=elems,proto3" json:"elems,omitempty"` }
CompactBitArray is an implementation of a space efficient bit array. This is used to ensure that the encoded data takes up a minimal amount of space after proto encoding. This is not thread safe, and is not intended for concurrent usage.
func (*CompactBitArray) Marshal ¶
func (m *CompactBitArray) Marshal() (dAtA []byte, err error)
func (*CompactBitArray) MarshalToSizedBuffer ¶
func (m *CompactBitArray) MarshalToSizedBuffer(dAtA []byte) (int, error)
func (*CompactBitArray) Size ¶
func (m *CompactBitArray) Size() (n int)
func (*CompactBitArray) Unmarshal ¶
func (m *CompactBitArray) Unmarshal(dAtA []byte) error
type ConverterFunc ¶
func GetMessageConverter ¶
func GetMessageConverter(t string) ConverterFunc
type Dec ¶
type Dec struct {
// contains filtered or unexported fields
}
NOTE: never use new(Dec) or else we will panic unmarshalling into the nil embedded big.Int
func NewDecFromBigInt ¶
create a new Dec from big integer assuming whole numbers CONTRACT: prec <= Precision
func NewDecFromBigIntWithPrec ¶
create a new Dec from big integer assuming whole numbers CONTRACT: prec <= Precision
func NewDecFromInt ¶
create a new Dec from big integer assuming whole numbers CONTRACT: prec <= Precision
func NewDecFromIntWithPrec ¶
create a new Dec from big integer with decimal place at prec CONTRACT: prec <= Precision
func NewDecFromStr ¶
create a decimal from an input decimal string. valid must come in the form:
(-) whole integers (.) decimal integers
examples of acceptable input include:
-123.456 456.7890 345 -456789
NOTE - An error will return if more decimal places are provided in the string than the constant Precision.
CONTRACT - This function does not mutate the input str.
func NewDecWithPrec ¶
create a new Dec from integer with decimal place at prec CONTRACT: prec <= Precision
func SmallestDec ¶
func SmallestDec() Dec
func (Dec) ApproxRoot ¶
ApproxRoot returns an approximate estimation of a Dec's positive real nth root using Newton's method (where n is positive). The algorithm starts with some guess and computes the sequence of improved guesses until an answer converges to an approximate answer. It returns `|d|.ApproxRoot() * -1` if input is negative. A maximum number of 100 iterations is used a backup boundary condition for cases where the answer never converges enough to satisfy the main condition.
func (Dec) ApproxSqrt ¶
ApproxSqrt is a wrapper around ApproxRoot for the common special case of finding the square root of a number. It returns -(sqrt(abs(d)) if input is negative.
func (Dec) Ceil ¶
Ceil returns the smallest interger value (as a decimal) that is greater than or equal to the given decimal.
func (Dec) Float64 ¶
Float64 returns the float64 representation of a Dec. Will return the error if the conversion failed.
func (Dec) IsNegative ¶
func (Dec) IsPositive ¶
func (Dec) MarshalAmino ¶
Override Amino binary serialization by proxying to protobuf.
func (Dec) MarshalJSON ¶
MarshalJSON marshals the decimal
func (Dec) MarshalYAML ¶
MarshalYAML returns the YAML representation.
func (Dec) MustFloat64 ¶
MustFloat64 returns the float64 representation of a Dec. Would panic if the conversion failed.
func (Dec) RoundInt64 ¶
RoundInt64 rounds the decimal using bankers rounding
func (Dec) TruncateDec ¶
TruncateDec truncates the decimals from the number and returns a Dec
func (Dec) TruncateInt ¶
TruncateInt truncates the decimals from the number and returns an Int
func (Dec) TruncateInt64 ¶
TruncateInt64 truncates the decimals from the number and returns an int64
func (*Dec) UnmarshalAmino ¶
func (*Dec) UnmarshalJSON ¶
UnmarshalJSON defines custom decoding scheme
type DecCoin ¶
type DecCoin struct { Denom string `protobuf:"bytes,1,opt,name=denom,proto3" json:"denom,omitempty"` Amount Dec `protobuf:"bytes,2,opt,name=amount,proto3,customtype=Dec" json:"amount"` }
DecCoin defines a token with a denomination and a decimal amount.
NOTE: The amount field is an Dec which implements the custom method signatures required by gogoproto.
func (*DecCoin) MarshalToSizedBuffer ¶
type Duration ¶
type Duration struct { // Signed seconds of the span of time. Must be from -315,576,000,000 // to +315,576,000,000 inclusive. Note: these bounds are computed from: // 60 sec/min * 60 min/hr * 24 hr/day * 365.25 days/year * 10000 years Seconds int64 `protobuf:"varint,1,opt,name=seconds,proto3" json:"seconds,omitempty"` // Signed fractions of a second at nanosecond resolution of the span // of time. Durations less than one second are represented with a 0 // `seconds` field and a positive or negative `nanos` field. For durations // of one second or more, a non-zero value for the `nanos` field must be // of the same sign as the `seconds` field. Must be from -999,999,999 // to +999,999,999 inclusive. Nanos int32 `protobuf:"varint,2,opt,name=nanos,proto3" json:"nanos,omitempty"` XXX_NoUnkeyedLiteral struct{} `json:"-"` XXX_unrecognized []byte `json:"-"` XXX_sizecache int32 `json:"-"` }
func DurationProto ¶
DurationProto converts a time.Duration to a Duration.
func (*Duration) MarshalToSizedBuffer ¶
type Input ¶
type Input struct { Address string `protobuf:"bytes,1,opt,name=address,proto3" json:"address,omitempty"` Coins Coins `protobuf:"bytes,2,rep,name=coins,proto3,castrepeated=github.com/cosmos/cosmos-sdk/types.Coins" json:"coins"` }
Input models transaction input.
type Int ¶
type Int struct {
// contains filtered or unexported fields
}
Int wraps big.Int with a 257 bit range bound Checks overflow, underflow and division by zero Exists in range from -(2^256 - 1) to 2^256 - 1
func NewIntFromBigInt ¶
NewIntFromBigInt constructs Int from big.Int
func NewIntFromString ¶
NewIntFromString constructs Int from string
func NewIntFromUint64 ¶
NewIntFromUint64 constructs an Int from a uint64.
func NewIntWithDecimal ¶
NewIntWithDecimal constructs Int with decimal Result value is n*10^dec
func (Int) MarshalAmino ¶
Override Amino binary serialization by proxying to protobuf.
func (Int) MarshalJSON ¶
MarshalJSON defines custom encoding scheme
func (Int) MarshalYAML ¶
MarshalYAML returns the YAML representation.
func (*Int) UnmarshalAmino ¶
func (*Int) UnmarshalJSON ¶
UnmarshalJSON defines custom decoding scheme
type MsgMultiSend ¶
type MsgMultiSend struct { Inputs []Input `protobuf:"bytes,1,rep,name=inputs,proto3" json:"inputs"` Outputs []Output `protobuf:"bytes,2,rep,name=outputs,proto3" json:"outputs"` }
MsgMultiSend represents an arbitrary multi-in, multi-out send message.
func (*MsgMultiSend) Marshal ¶
func (m *MsgMultiSend) Marshal() (dAtA []byte, err error)
func (*MsgMultiSend) MarshalToSizedBuffer ¶
func (m *MsgMultiSend) MarshalToSizedBuffer(dAtA []byte) (int, error)
func (*MsgMultiSend) MessageName ¶
func (m *MsgMultiSend) MessageName() string
func (*MsgMultiSend) Size ¶
func (m *MsgMultiSend) Size() (n int)
func (*MsgMultiSend) Unmarshal ¶
func (m *MsgMultiSend) Unmarshal(dAtA []byte) error
type MsgSend ¶
type MsgSend struct { FromAddress string `protobuf:"bytes,1,opt,name=from_address,json=fromAddress,proto3" json:"from_address,omitempty" yaml:"from_address"` ToAddress string `protobuf:"bytes,2,opt,name=to_address,json=toAddress,proto3" json:"to_address,omitempty" yaml:"to_address"` Amount Coins `protobuf:"bytes,3,rep,name=amount,proto3,castrepeated=github.com/cosmos/cosmos-sdk/types.Coins" json:"amount"` }
MsgSend represents a message to send coins from one account to another.
func (*MsgSend) MarshalToSizedBuffer ¶
func (*MsgSend) MessageName ¶
type MultiSignature ¶
type MultiSignature struct { Signatures [][]byte `protobuf:"bytes,1,rep,name=signatures,proto3" json:"signatures,omitempty"` XXX_unrecognized []byte `json:"-"` }
MultiSignature wraps the signatures from a multisig.LegacyAminoPubKey. See cosmos.tx.v1betata1.ModeInfo.Multi for how to specify which signers signed and with which modes.
func (*MultiSignature) Marshal ¶
func (m *MultiSignature) Marshal() (dAtA []byte, err error)
func (*MultiSignature) MarshalToSizedBuffer ¶
func (m *MultiSignature) MarshalToSizedBuffer(dAtA []byte) (int, error)
func (*MultiSignature) Size ¶
func (m *MultiSignature) Size() (n int)
func (*MultiSignature) Unmarshal ¶
func (m *MultiSignature) Unmarshal(dAtA []byte) error
type Output ¶
type Output struct { Address string `protobuf:"bytes,1,opt,name=address,proto3" json:"address,omitempty"` Coins Coins `protobuf:"bytes,2,rep,name=coins,proto3,castrepeated=github.com/cosmos/cosmos-sdk/types.Coins" json:"coins"` }
Output models transaction outputs.
func (*Output) MarshalToSizedBuffer ¶
type PackError ¶
type PackError struct {
// contains filtered or unexported fields
}
func NewPackError ¶
type PrivKey ¶
type PrivKey struct {
Key []byte `protobuf:"bytes,1,opt,name=key,proto3" json:"key,omitempty"`
}
PrivKey defines a secp256k1 private key.
func (*PrivKey) MarshalToSizedBuffer ¶
func (*PrivKey) MessageName ¶
type PubKey ¶
type PubKey struct {
Key []byte `protobuf:"bytes,1,opt,name=key,proto3" json:"key,omitempty"`
}
PubKey defines a secp256k1 public key Key is the compressed form of the pubkey. The first byte depends is a 0x02 byte if the y-coordinate is the lexicographically largest of the two associated with the x-coordinate. Otherwise the first byte is a 0x03. This prefix is followed with the x-coordinate.
func (*PubKey) MarshalToSizedBuffer ¶
func (*PubKey) MessageName ¶
type SignMode ¶
type SignMode int32
SignMode represents a signing mode with its own security guarantees.
const ( // SIGN_MODE_UNSPECIFIED specifies an unknown signing mode and will be // rejected SignMode_SIGN_MODE_UNSPECIFIED SignMode = 0 // SIGN_MODE_DIRECT specifies a signing mode which uses SignDoc and is // verified with raw bytes from Tx SignMode_SIGN_MODE_DIRECT SignMode = 1 // SIGN_MODE_TEXTUAL is a future signing mode that will verify some // human-readable textual representation on top of the binary representation // from SIGN_MODE_DIRECT SignMode_SIGN_MODE_TEXTUAL SignMode = 2 // SIGN_MODE_LEGACY_AMINO_JSON is a backwards compatibility mode which uses // Amino JSON and will be removed in the future SignMode_SIGN_MODE_LEGACY_AMINO_JSON SignMode = 127 )
type SignatureDescriptor ¶
type SignatureDescriptor struct { // public_key is the public key of the signer PublicKey *Any `protobuf:"bytes,1,opt,name=public_key,json=publicKey,proto3" json:"public_key,omitempty"` Data *SignatureDescriptor_Data `protobuf:"bytes,2,opt,name=data,proto3" json:"data,omitempty"` // sequence is the sequence of the account, which describes the // number of committed transactions signed by a given address. It is used to prevent // replay attacks. Sequence uint64 `protobuf:"varint,3,opt,name=sequence,proto3" json:"sequence,omitempty"` }
SignatureDescriptor is a convenience type which represents the full data for a signature including the public key of the signer, signing modes and the signature itself. It is primarily used for coordinating signatures between clients.
func (*SignatureDescriptor) Marshal ¶
func (m *SignatureDescriptor) Marshal() (dAtA []byte, err error)
func (*SignatureDescriptor) MarshalTo ¶
func (m *SignatureDescriptor) MarshalTo(dAtA []byte) (int, error)
func (*SignatureDescriptor) MarshalToSizedBuffer ¶
func (m *SignatureDescriptor) MarshalToSizedBuffer(dAtA []byte) (int, error)
func (*SignatureDescriptor) Size ¶
func (m *SignatureDescriptor) Size() (n int)
func (*SignatureDescriptor) Unmarshal ¶
func (m *SignatureDescriptor) Unmarshal(dAtA []byte) error
type SignatureDescriptor_Data ¶
type SignatureDescriptor_Data struct { // sum is the oneof that specifies whether this represents single or multi-signature data // // Types that are valid to be assigned to Sum: // *SignatureDescriptor_Data_Single_ // *SignatureDescriptor_Data_Multi_ Sum isSignatureDescriptor_Data_Sum `protobuf_oneof:"sum"` }
Data represents signature data
func (*SignatureDescriptor_Data) Marshal ¶
func (m *SignatureDescriptor_Data) Marshal() (dAtA []byte, err error)
func (*SignatureDescriptor_Data) MarshalTo ¶
func (m *SignatureDescriptor_Data) MarshalTo(dAtA []byte) (int, error)
func (*SignatureDescriptor_Data) MarshalToSizedBuffer ¶
func (m *SignatureDescriptor_Data) MarshalToSizedBuffer(dAtA []byte) (int, error)
func (*SignatureDescriptor_Data) Size ¶
func (m *SignatureDescriptor_Data) Size() (n int)
func (*SignatureDescriptor_Data) Unmarshal ¶
func (m *SignatureDescriptor_Data) Unmarshal(dAtA []byte) error
type SignatureDescriptor_Data_Multi ¶
type SignatureDescriptor_Data_Multi struct { // bitarray specifies which keys within the multisig are signing Bitarray *CompactBitArray `protobuf:"bytes,1,opt,name=bitarray,proto3" json:"bitarray,omitempty"` // signatures is the signatures of the multi-signature Signatures []*SignatureDescriptor_Data `protobuf:"bytes,2,rep,name=signatures,proto3" json:"signatures,omitempty"` }
Multi is the signature data for a multisig public key
func (*SignatureDescriptor_Data_Multi) Marshal ¶
func (m *SignatureDescriptor_Data_Multi) Marshal() (dAtA []byte, err error)
func (*SignatureDescriptor_Data_Multi) MarshalTo ¶
func (m *SignatureDescriptor_Data_Multi) MarshalTo(dAtA []byte) (int, error)
func (*SignatureDescriptor_Data_Multi) MarshalToSizedBuffer ¶
func (m *SignatureDescriptor_Data_Multi) MarshalToSizedBuffer(dAtA []byte) (int, error)
func (*SignatureDescriptor_Data_Multi) Size ¶
func (m *SignatureDescriptor_Data_Multi) Size() (n int)
func (*SignatureDescriptor_Data_Multi) Unmarshal ¶
func (m *SignatureDescriptor_Data_Multi) Unmarshal(dAtA []byte) error
type SignatureDescriptor_Data_Multi_ ¶
type SignatureDescriptor_Data_Multi_ struct {
Multi *SignatureDescriptor_Data_Multi `protobuf:"bytes,2,opt,name=multi,proto3,oneof" json:"multi,omitempty"`
}
func (*SignatureDescriptor_Data_Multi_) MarshalTo ¶
func (m *SignatureDescriptor_Data_Multi_) MarshalTo(dAtA []byte) (int, error)
func (*SignatureDescriptor_Data_Multi_) MarshalToSizedBuffer ¶
func (m *SignatureDescriptor_Data_Multi_) MarshalToSizedBuffer(dAtA []byte) (int, error)
func (*SignatureDescriptor_Data_Multi_) Size ¶
func (m *SignatureDescriptor_Data_Multi_) Size() (n int)
type SignatureDescriptor_Data_Single ¶
type SignatureDescriptor_Data_Single struct { // mode is the signing mode of the single signer Mode SignMode `protobuf:"varint,1,opt,name=mode,proto3,enum=cosmos.tx.signing.v1beta1.SignMode" json:"mode,omitempty"` // signature is the raw signature bytes Signature []byte `protobuf:"bytes,2,opt,name=signature,proto3" json:"signature,omitempty"` }
Single is the signature data for a single signer
func (*SignatureDescriptor_Data_Single) Marshal ¶
func (m *SignatureDescriptor_Data_Single) Marshal() (dAtA []byte, err error)
func (*SignatureDescriptor_Data_Single) MarshalTo ¶
func (m *SignatureDescriptor_Data_Single) MarshalTo(dAtA []byte) (int, error)
func (*SignatureDescriptor_Data_Single) MarshalToSizedBuffer ¶
func (m *SignatureDescriptor_Data_Single) MarshalToSizedBuffer(dAtA []byte) (int, error)
func (*SignatureDescriptor_Data_Single) Size ¶
func (m *SignatureDescriptor_Data_Single) Size() (n int)
func (*SignatureDescriptor_Data_Single) Unmarshal ¶
func (m *SignatureDescriptor_Data_Single) Unmarshal(dAtA []byte) error
type SignatureDescriptor_Data_Single_ ¶
type SignatureDescriptor_Data_Single_ struct {
Single *SignatureDescriptor_Data_Single `protobuf:"bytes,1,opt,name=single,proto3,oneof" json:"single,omitempty"`
}
func (*SignatureDescriptor_Data_Single_) MarshalTo ¶
func (m *SignatureDescriptor_Data_Single_) MarshalTo(dAtA []byte) (int, error)
func (*SignatureDescriptor_Data_Single_) MarshalToSizedBuffer ¶
func (m *SignatureDescriptor_Data_Single_) MarshalToSizedBuffer(dAtA []byte) (int, error)
func (*SignatureDescriptor_Data_Single_) Size ¶
func (m *SignatureDescriptor_Data_Single_) Size() (n int)
type SignatureDescriptors ¶
type SignatureDescriptors struct { // signatures are the signature descriptors Signatures []*SignatureDescriptor `protobuf:"bytes,1,rep,name=signatures,proto3" json:"signatures,omitempty"` }
SignatureDescriptors wraps multiple SignatureDescriptor's.
func (*SignatureDescriptors) Marshal ¶
func (m *SignatureDescriptors) Marshal() (dAtA []byte, err error)
func (*SignatureDescriptors) MarshalTo ¶
func (m *SignatureDescriptors) MarshalTo(dAtA []byte) (int, error)
func (*SignatureDescriptors) MarshalToSizedBuffer ¶
func (m *SignatureDescriptors) MarshalToSizedBuffer(dAtA []byte) (int, error)
func (*SignatureDescriptors) Size ¶
func (m *SignatureDescriptors) Size() (n int)
func (*SignatureDescriptors) Unmarshal ¶
func (m *SignatureDescriptors) Unmarshal(dAtA []byte) error
type StdAny ¶
type StdAny struct { T string `json:"type" yaml:"type"` V interface{} `json:"value" yaml:"value"` }
type StdFee ¶
type StdFee struct { Amount Coins `json:"amount" yaml:"amount"` Gas string `json:"gas" yaml:"gas"` Payer string `json:"payer,omitempty" yaml:"payer"` Granter string `json:"granter,omitempty" yaml:"granter"` }
StdFee includes the amount of coins paid in fees and the maximum gas to be used by the transaction. The ratio yields an effective "gasprice", which must be above some miminum to be accepted into the mempool.
type StdSignDoc ¶
type StdSignDoc struct { AccountNumber string `json:"account_number" yaml:"account_number"` Sequence string `json:"sequence" yaml:"sequence"` ChainID string `json:"chain_id" yaml:"chain_id"` Fee StdFee `json:"fee" yaml:"fee"` Msgs []StdAny `json:"msgs" yaml:"msgs"` Memo string `json:"memo" yaml:"memo"` TimeoutHeight string `json:"timeout_height,omitempty" yaml:"timeout_height"` }
StdSignDoc is replay-prevention structure. It includes the result of msg.GetSignBytes(), as well as the ChainID (prevent cross chain replay) and the Sequence numbers for each signature (prevent inchain replay and enforce tx ordering per account). Convert StdSignDoc to bytes using Amino/JSON, sign it, fill in StdTx, serialize StdTx with Amino/JSON, and then broadcast the transaction bytes
type StdSignature ¶
type StdSignature struct { Signature string `json:"signature" yaml:"signature"` AccountNumber uint64 `json:"account_number" yaml:"account_number"` Sequence uint64 `json:"sequence" yaml:"sequence"` PubKey StdAny `json:"pub_key" yaml:"pub_key"` }
StdSignature represents a sig
type StdTx ¶
type StdTx struct { Msgs []StdAny `json:"msg" yaml:"msg"` Fee StdFee `json:"fee" yaml:"fee"` Signatures []StdSignature `json:"signatures" yaml:"signatures"` Memo string `json:"memo" yaml:"memo"` TimeoutHeight uint64 `json:"timeout_height" yaml:"timeout_height"` }
StdTx is the legacy transaction format for wrapping a Msg with Fee and Signatures. It only works with Amino, please prefer the new protobuf Tx in types/tx. NOTE: the first signature is the fee payer (Signatures must not be nil).