Documentation
¶
Index ¶
- Constants
- Variables
- func Abs[T int | int64](a T) T
- func Completion(bytes []byte, number int) []byte
- func CompressPubKey(pks []byte) (string, error)
- func ConvertAndEncode(hrp string, data []byte) (string, error)
- func CosmosPrivateKeyToTMPrivateKey(privateKey cryptotypes.PrivKey) crypto.PrivKey
- func Entropy(b []byte) float64
- func GetMedianInt64(vals []int64) int64
- func GetMedianUint(vals []cosmos.Uint) cosmos.Uint
- func GetSafeShare(part, total, allocation cosmos.Uint) cosmos.Uint
- func GetUncappedShare(part, total, allocation cosmos.Uint) (share cosmos.Uint)
- func HasHexPrefix(s string) bool
- func IsValidXRPAddress(address string) bool
- func JSON(v interface{}) string
- func Max[T int | uint | int64 | uint64](a, b T) T
- func Min[T int | uint | int64 | uint64](a, b T) T
- func RandHexString(n int) string
- func RoundSignificantFigures(number uint64, significantDigits int64) uint64
- func SafeSub(input1, input2 cosmos.Uint) cosmos.Uint
- func Sign(buf []byte) ([]byte, []byte, error)
- func SignBase64(buf []byte) (string, string, error)
- func TrimHexPrefix(s string) string
- func WeightedMean(vals, weights []cosmos.Uint) (cosmos.Uint, error)
- type Account
- type Address
- func (addr Address) AccAddress() (cosmos.AccAddress, error)
- func (addr Address) Equals(addr2 Address) bool
- func (addr Address) GetChain() Chain
- func (addr Address) GetNetwork(chain Chain) ChainNetwork
- func (addr Address) IsChain(chain Chain) bool
- func (addr Address) IsEmpty() bool
- func (addr Address) IsNoop() bool
- func (addr Address) IsValidBCHAddress() bool
- func (addr Address) MappedAccAddress() (cosmos.AccAddress, error)
- func (addr Address) String() string
- type Asset
- func (*Asset) Descriptor() ([]byte, []int)
- func (a Asset) Equals(a2 Asset) bool
- func (a Asset) GetChain() Chain
- func (a Asset) GetDerivedAsset() Asset
- func (a Asset) GetLayer1Asset() Asset
- func (a Asset) GetSecuredAsset() Asset
- func (a Asset) GetSyntheticAsset() Asset
- func (a Asset) GetTradeAsset() Asset
- func (a Asset) IsDerivedAsset() bool
- func (a Asset) IsEmpty() bool
- func (a Asset) IsGasAsset() bool
- func (a Asset) IsNative() bool
- func (a Asset) IsRune() bool
- func (a Asset) IsSecuredAsset() bool
- func (a Asset) IsSyntheticAsset() bool
- func (a Asset) IsTCY() bool
- func (a Asset) IsTradeAsset() bool
- func (a Asset) IsVaultAsset() bool
- func (m *Asset) Marshal() (dAtA []byte, err error)
- func (a Asset) MarshalJSON() ([]byte, error)
- func (a Asset) MarshalJSONPB(*jsonpb.Marshaler) ([]byte, error)
- func (m *Asset) MarshalTo(dAtA []byte) (int, error)
- func (m *Asset) MarshalToSizedBuffer(dAtA []byte) (int, error)
- func (a Asset) MimirString() string
- func (a Asset) Native() string
- func (*Asset) ProtoMessage()
- func (m *Asset) Reset()
- func (a Asset) ShortCode() string
- func (m *Asset) Size() (n int)
- func (a Asset) String() string
- func (m *Asset) Unmarshal(dAtA []byte) error
- func (a *Asset) UnmarshalJSON(data []byte) error
- func (a *Asset) UnmarshalJSONPB(unmarshal *jsonpb.Unmarshaler, content []byte) error
- func (a Asset) Valid() error
- func (m *Asset) XXX_DiscardUnknown()
- func (m *Asset) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)
- func (m *Asset) XXX_Merge(src proto.Message)
- func (m *Asset) XXX_Size() int
- func (m *Asset) XXX_Unmarshal(b []byte) error
- type AttestErrataTx
- func (*AttestErrataTx) Descriptor() ([]byte, []int)
- func (a *AttestErrataTx) GetAttestation() *Attestation
- func (a *AttestErrataTx) GetSignablePayload() ([]byte, error)
- func (m *AttestErrataTx) Marshal() (dAtA []byte, err error)
- func (m *AttestErrataTx) MarshalTo(dAtA []byte) (int, error)
- func (m *AttestErrataTx) MarshalToSizedBuffer(dAtA []byte) (int, error)
- func (*AttestErrataTx) ProtoMessage()
- func (m *AttestErrataTx) Reset()
- func (m *AttestErrataTx) Size() (n int)
- func (this *AttestErrataTx) String() string
- func (m *AttestErrataTx) Unmarshal(dAtA []byte) error
- func (m *AttestErrataTx) XXX_DiscardUnknown()
- func (m *AttestErrataTx) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)
- func (m *AttestErrataTx) XXX_Merge(src proto.Message)
- func (m *AttestErrataTx) XXX_Size() int
- func (m *AttestErrataTx) XXX_Unmarshal(b []byte) error
- type AttestNetworkFee
- func (*AttestNetworkFee) Descriptor() ([]byte, []int)
- func (a *AttestNetworkFee) GetAttestation() *Attestation
- func (a *AttestNetworkFee) GetSignablePayload() ([]byte, error)
- func (m *AttestNetworkFee) Marshal() (dAtA []byte, err error)
- func (m *AttestNetworkFee) MarshalTo(dAtA []byte) (int, error)
- func (m *AttestNetworkFee) MarshalToSizedBuffer(dAtA []byte) (int, error)
- func (*AttestNetworkFee) ProtoMessage()
- func (m *AttestNetworkFee) Reset()
- func (m *AttestNetworkFee) Size() (n int)
- func (this *AttestNetworkFee) String() string
- func (m *AttestNetworkFee) Unmarshal(dAtA []byte) error
- func (m *AttestNetworkFee) XXX_DiscardUnknown()
- func (m *AttestNetworkFee) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)
- func (m *AttestNetworkFee) XXX_Merge(src proto.Message)
- func (m *AttestNetworkFee) XXX_Size() int
- func (m *AttestNetworkFee) XXX_Unmarshal(b []byte) error
- type AttestSolvency
- func (*AttestSolvency) Descriptor() ([]byte, []int)
- func (a *AttestSolvency) GetAttestation() *Attestation
- func (a *AttestSolvency) GetSignablePayload() ([]byte, error)
- func (m *AttestSolvency) Marshal() (dAtA []byte, err error)
- func (m *AttestSolvency) MarshalTo(dAtA []byte) (int, error)
- func (m *AttestSolvency) MarshalToSizedBuffer(dAtA []byte) (int, error)
- func (*AttestSolvency) ProtoMessage()
- func (m *AttestSolvency) Reset()
- func (m *AttestSolvency) Size() (n int)
- func (this *AttestSolvency) String() string
- func (m *AttestSolvency) Unmarshal(dAtA []byte) error
- func (m *AttestSolvency) XXX_DiscardUnknown()
- func (m *AttestSolvency) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)
- func (m *AttestSolvency) XXX_Merge(src proto.Message)
- func (m *AttestSolvency) XXX_Size() int
- func (m *AttestSolvency) XXX_Unmarshal(b []byte) error
- type AttestTx
- func (*AttestTx) Descriptor() ([]byte, []int)
- func (a *AttestTx) GetAttestation() *Attestation
- func (a *AttestTx) GetSignablePayload() ([]byte, error)
- func (m *AttestTx) Marshal() (dAtA []byte, err error)
- func (m *AttestTx) MarshalTo(dAtA []byte) (int, error)
- func (m *AttestTx) MarshalToSizedBuffer(dAtA []byte) (int, error)
- func (*AttestTx) ProtoMessage()
- func (m *AttestTx) Reset()
- func (m *AttestTx) Size() (n int)
- func (this *AttestTx) String() string
- func (m *AttestTx) Unmarshal(dAtA []byte) error
- func (m *AttestTx) XXX_DiscardUnknown()
- func (m *AttestTx) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)
- func (m *AttestTx) XXX_Merge(src proto.Message)
- func (m *AttestTx) XXX_Size() int
- func (m *AttestTx) XXX_Unmarshal(b []byte) error
- type Attestation
- func (*Attestation) Descriptor() ([]byte, []int)
- func (a *Attestation) Equals(att *Attestation) bool
- func (m *Attestation) Marshal() (dAtA []byte, err error)
- func (m *Attestation) MarshalTo(dAtA []byte) (int, error)
- func (m *Attestation) MarshalToSizedBuffer(dAtA []byte) (int, error)
- func (*Attestation) ProtoMessage()
- func (m *Attestation) Reset()
- func (m *Attestation) Size() (n int)
- func (this *Attestation) String() string
- func (m *Attestation) Unmarshal(dAtA []byte) error
- func (m *Attestation) XXX_DiscardUnknown()
- func (m *Attestation) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)
- func (m *Attestation) XXX_Merge(src proto.Message)
- func (m *Attestation) XXX_Size() int
- func (m *Attestation) XXX_Unmarshal(b []byte) error
- type AttestationBatch
- func (*AttestationBatch) Descriptor() ([]byte, []int)
- func (m *AttestationBatch) Marshal() (dAtA []byte, err error)
- func (m *AttestationBatch) MarshalTo(dAtA []byte) (int, error)
- func (m *AttestationBatch) MarshalToSizedBuffer(dAtA []byte) (int, error)
- func (*AttestationBatch) ProtoMessage()
- func (m *AttestationBatch) Reset()
- func (m *AttestationBatch) Size() (n int)
- func (this *AttestationBatch) String() string
- func (m *AttestationBatch) Unmarshal(dAtA []byte) error
- func (m *AttestationBatch) XXX_DiscardUnknown()
- func (m *AttestationBatch) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)
- func (m *AttestationBatch) XXX_Merge(src proto.Message)
- func (m *AttestationBatch) XXX_Size() int
- func (m *AttestationBatch) XXX_Unmarshal(b []byte) error
- type Chain
- func (c Chain) AddressPrefix(cn ChainNetwork) string
- func (c Chain) ApproximateBlockMilliseconds() int64
- func (c Chain) ChainID() (*big.Int, error)
- func (c Chain) DecodeAddress(address string) ([]byte, error)
- func (c Chain) DefaultCoinbase() float64
- func (c Chain) DustThreshold() cosmos.Uint
- func (c Chain) Equals(c2 Chain) bool
- func (c Chain) GetGasAsset() Asset
- func (c Chain) GetSigningAlgo() SigningAlgo
- func (c Chain) InboundNotes() string
- func (c Chain) IsBSCChain() bool
- func (c Chain) IsEVM() bool
- func (c Chain) IsEmpty() bool
- func (c Chain) IsMAPChain() bool
- func (c Chain) IsUTXO() bool
- func (c Chain) IsValidAddress(addr Address) bool
- func (c Chain) MaxMemoLength() int
- func (c Chain) NativeToken() (string, bool)
- func (c Chain) String() string
- func (c Chain) Valid() error
- type ChainNetwork
- type ChainPoolInfo
- type Chains
- type Coin
- func (*Coin) Descriptor() ([]byte, []int)
- func (c Coin) Equals(cc Coin) bool
- func (c Coin) IsEmpty() bool
- func (c Coin) IsNative() bool
- func (c Coin) IsRune() bool
- func (c Coin) IsTCY() 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 (c Coin) Native() (cosmos.Coin, error)
- func (*Coin) ProtoMessage()
- func (m *Coin) Reset()
- func (m *Coin) Size() (n int)
- func (c Coin) String() string
- func (m *Coin) Unmarshal(dAtA []byte) error
- func (c Coin) Valid() error
- func (c Coin) WithDecimals(decimal int64) Coin
- func (m *Coin) XXX_DiscardUnknown()
- func (m *Coin) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)
- func (m *Coin) XXX_Merge(src proto.Message)
- func (m *Coin) XXX_Size() int
- func (m *Coin) XXX_Unmarshal(b []byte) error
- type Coins
- func (oldCoins Coins) Add(addCoins ...Coin) Coins
- func (cs Coins) Contains(c Coin) bool
- func (cs Coins) Copy() Coins
- func (cs Coins) Distinct() Coins
- func (cs Coins) EqualsEx(cs2 Coins) bool
- func (cs Coins) GetCoin(asset Asset) Coin
- func (cs Coins) HasSynthetic() bool
- func (cs Coins) IsEmpty() bool
- func (cs Coins) Native() (cosmos.Coins, error)
- func (cs Coins) NoneEmpty() Coins
- func (oldCoins Coins) SafeSub(subCoins ...Coin) Coins
- func (cs Coins) String() string
- func (cs Coins) Valid() error
- type ErrataTx
- func (*ErrataTx) Descriptor() ([]byte, []int)
- func (e *ErrataTx) Equals(other *ErrataTx) bool
- func (e *ErrataTx) GetSignablePayload() ([]byte, error)
- func (m *ErrataTx) Marshal() (dAtA []byte, err error)
- func (m *ErrataTx) MarshalTo(dAtA []byte) (int, error)
- func (m *ErrataTx) MarshalToSizedBuffer(dAtA []byte) (int, error)
- func (*ErrataTx) ProtoMessage()
- func (m *ErrataTx) Reset()
- func (m *ErrataTx) Size() (n int)
- func (this *ErrataTx) String() string
- func (m *ErrataTx) Unmarshal(dAtA []byte) error
- func (m *ErrataTx) XXX_DiscardUnknown()
- func (m *ErrataTx) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)
- func (m *ErrataTx) XXX_Merge(src proto.Message)
- func (m *ErrataTx) XXX_Size() int
- func (m *ErrataTx) XXX_Unmarshal(b []byte) error
- type Fee
- func (*Fee) Descriptor() ([]byte, []int)
- func (m *Fee) Marshal() (dAtA []byte, err error)
- func (m *Fee) MarshalTo(dAtA []byte) (int, error)
- func (m *Fee) MarshalToSizedBuffer(dAtA []byte) (int, error)
- func (*Fee) ProtoMessage()
- func (m *Fee) Reset()
- func (m *Fee) Size() (n int)
- func (f Fee) String() string
- func (m *Fee) Unmarshal(dAtA []byte) error
- func (m *Fee) XXX_DiscardUnknown()
- func (m *Fee) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)
- func (m *Fee) XXX_Merge(src proto.Message)
- func (m *Fee) XXX_Size() int
- func (m *Fee) XXX_Unmarshal(b []byte) error
- type Gas
- type Invariant
- type InvariantRoute
- type NetworkFee
- func (*NetworkFee) Descriptor() ([]byte, []int)
- func (nf *NetworkFee) Equals(other *NetworkFee) bool
- func (nf *NetworkFee) GetSignablePayload() ([]byte, error)
- func (m *NetworkFee) Marshal() (dAtA []byte, err error)
- func (m *NetworkFee) MarshalTo(dAtA []byte) (int, error)
- func (m *NetworkFee) MarshalToSizedBuffer(dAtA []byte) (int, error)
- func (*NetworkFee) ProtoMessage()
- func (m *NetworkFee) Reset()
- func (m *NetworkFee) Size() (n int)
- func (this *NetworkFee) String() string
- func (m *NetworkFee) Unmarshal(dAtA []byte) error
- func (m *NetworkFee) Valid() error
- func (m *NetworkFee) XXX_DiscardUnknown()
- func (m *NetworkFee) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)
- func (m *NetworkFee) XXX_Merge(src proto.Message)
- func (m *NetworkFee) XXX_Size() int
- func (m *NetworkFee) XXX_Unmarshal(b []byte) error
- type ObservedTx
- func (*ObservedTx) Descriptor() ([]byte, []int)
- func (m ObservedTx) Equals(tx2 ObservedTx) bool
- func (m *ObservedTx) GetOutHashes() TxIDs
- func (o *ObservedTx) GetSignablePayload() ([]byte, error)
- func (m *ObservedTx) GetSigners() []cosmos.AccAddress
- func (m *ObservedTx) HasSigned(signer cosmos.AccAddress) bool
- func (m *ObservedTx) IsDone(numOuts int) bool
- func (m *ObservedTx) IsEmpty() bool
- func (m *ObservedTx) IsFinal() bool
- func (m *ObservedTx) Marshal() (dAtA []byte, err error)
- func (m *ObservedTx) MarshalTo(dAtA []byte) (int, error)
- func (m *ObservedTx) MarshalToSizedBuffer(dAtA []byte) (int, error)
- func (*ObservedTx) ProtoMessage()
- func (m *ObservedTx) Reset()
- func (m *ObservedTx) SetDone(hash TxID, numOuts int)
- func (m *ObservedTx) Sign(signer cosmos.AccAddress) bool
- func (m *ObservedTx) Size() (n int)
- func (m *ObservedTx) String() string
- func (m *ObservedTx) Unmarshal(dAtA []byte) error
- func (m *ObservedTx) Valid() error
- func (m *ObservedTx) XXX_DiscardUnknown()
- func (m *ObservedTx) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)
- func (m *ObservedTx) XXX_Merge(src proto.Message)
- func (m *ObservedTx) XXX_Size() int
- func (m *ObservedTx) XXX_Unmarshal(b []byte) error
- type ObservedTxs
- type ProtoUint
- func (*ProtoUint) Descriptor() ([]byte, []int)
- func (m *ProtoUint) Marshal() (dAtA []byte, err error)
- func (m *ProtoUint) MarshalTo(dAtA []byte) (int, error)
- func (m *ProtoUint) MarshalToSizedBuffer(dAtA []byte) (int, error)
- func (*ProtoUint) ProtoMessage()
- func (m *ProtoUint) Reset()
- func (m *ProtoUint) Size() (n int)
- func (this *ProtoUint) String() string
- func (m *ProtoUint) Unmarshal(dAtA []byte) error
- func (m *ProtoUint) XXX_DiscardUnknown()
- func (m *ProtoUint) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)
- func (m *ProtoUint) XXX_Merge(src proto.Message)
- func (m *ProtoUint) XXX_Size() int
- func (m *ProtoUint) XXX_Unmarshal(b []byte) error
- type PubKey
- func (p PubKey) EVMPubkeyToAddress() (Address, error)
- func (p PubKey) Equals(pubKey1 PubKey) bool
- func (p PubKey) GetAddress(chain Chain) (Address, error)
- func (p PubKey) GetThorAddress() (cosmos.AccAddress, error)
- func (p PubKey) IsEmpty() bool
- func (p PubKey) MarshalJSON() ([]byte, error)
- func (p PubKey) Secp256K1() (*btcec.PublicKey, error)
- func (p PubKey) String() string
- func (p *PubKey) UnmarshalJSON(data []byte) error
- type PubKeySet
- func (p PubKeySet) Contains(pk PubKey) bool
- func (*PubKeySet) Descriptor() ([]byte, []int)
- func (p PubKeySet) Equals(pks1 PubKeySet) bool
- func (p PubKeySet) GetAddress(chain Chain) (Address, error)
- func (p PubKeySet) IsEmpty() bool
- func (m *PubKeySet) Marshal() (dAtA []byte, err error)
- func (m *PubKeySet) MarshalTo(dAtA []byte) (int, error)
- func (m *PubKeySet) MarshalToSizedBuffer(dAtA []byte) (int, error)
- func (*PubKeySet) ProtoMessage()
- func (m *PubKeySet) Reset()
- func (m *PubKeySet) Size() (n int)
- func (p PubKeySet) String() string
- func (m *PubKeySet) Unmarshal(dAtA []byte) error
- func (m *PubKeySet) XXX_DiscardUnknown()
- func (m *PubKeySet) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)
- func (m *PubKeySet) XXX_Merge(src proto.Message)
- func (m *PubKeySet) XXX_Size() int
- func (m *PubKeySet) XXX_Unmarshal(b []byte) error
- type PubKeys
- type QuorumErrataTx
- func (*QuorumErrataTx) Descriptor() ([]byte, []int)
- func (qe *QuorumErrataTx) Equals(other *QuorumErrataTx) bool
- func (qe *QuorumErrataTx) GetAttestations() []*Attestation
- func (m *QuorumErrataTx) Marshal() (dAtA []byte, err error)
- func (m *QuorumErrataTx) MarshalTo(dAtA []byte) (int, error)
- func (m *QuorumErrataTx) MarshalToSizedBuffer(dAtA []byte) (int, error)
- func (*QuorumErrataTx) ProtoMessage()
- func (qe *QuorumErrataTx) RemoveAttestations(atts []*Attestation) bool
- func (m *QuorumErrataTx) Reset()
- func (qe *QuorumErrataTx) SetAttestations(atts []*Attestation) *QuorumErrataTx
- func (m *QuorumErrataTx) Size() (n int)
- func (this *QuorumErrataTx) String() string
- func (m *QuorumErrataTx) Unmarshal(dAtA []byte) error
- func (m *QuorumErrataTx) XXX_DiscardUnknown()
- func (m *QuorumErrataTx) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)
- func (m *QuorumErrataTx) XXX_Merge(src proto.Message)
- func (m *QuorumErrataTx) XXX_Size() int
- func (m *QuorumErrataTx) XXX_Unmarshal(b []byte) error
- type QuorumNetworkFee
- func (*QuorumNetworkFee) Descriptor() ([]byte, []int)
- func (qnf *QuorumNetworkFee) Equals(other *QuorumNetworkFee) bool
- func (qnf *QuorumNetworkFee) GetAttestations() []*Attestation
- func (m *QuorumNetworkFee) Marshal() (dAtA []byte, err error)
- func (m *QuorumNetworkFee) MarshalTo(dAtA []byte) (int, error)
- func (m *QuorumNetworkFee) MarshalToSizedBuffer(dAtA []byte) (int, error)
- func (*QuorumNetworkFee) ProtoMessage()
- func (qnf *QuorumNetworkFee) RemoveAttestations(atts []*Attestation) bool
- func (m *QuorumNetworkFee) Reset()
- func (qnf *QuorumNetworkFee) SetAttestations(atts []*Attestation) *QuorumNetworkFee
- func (m *QuorumNetworkFee) Size() (n int)
- func (this *QuorumNetworkFee) String() string
- func (m *QuorumNetworkFee) Unmarshal(dAtA []byte) error
- func (m *QuorumNetworkFee) XXX_DiscardUnknown()
- func (m *QuorumNetworkFee) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)
- func (m *QuorumNetworkFee) XXX_Merge(src proto.Message)
- func (m *QuorumNetworkFee) XXX_Size() int
- func (m *QuorumNetworkFee) XXX_Unmarshal(b []byte) error
- type QuorumSolvency
- func (*QuorumSolvency) Descriptor() ([]byte, []int)
- func (qs *QuorumSolvency) Equals(other *QuorumSolvency) bool
- func (qs *QuorumSolvency) GetAttestations() []*Attestation
- func (m *QuorumSolvency) Marshal() (dAtA []byte, err error)
- func (m *QuorumSolvency) MarshalTo(dAtA []byte) (int, error)
- func (m *QuorumSolvency) MarshalToSizedBuffer(dAtA []byte) (int, error)
- func (*QuorumSolvency) ProtoMessage()
- func (qs *QuorumSolvency) RemoveAttestations(atts []*Attestation) bool
- func (m *QuorumSolvency) Reset()
- func (qs *QuorumSolvency) SetAttestations(atts []*Attestation) *QuorumSolvency
- func (m *QuorumSolvency) Size() (n int)
- func (this *QuorumSolvency) String() string
- func (m *QuorumSolvency) Unmarshal(dAtA []byte) error
- func (m *QuorumSolvency) XXX_DiscardUnknown()
- func (m *QuorumSolvency) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)
- func (m *QuorumSolvency) XXX_Merge(src proto.Message)
- func (m *QuorumSolvency) XXX_Size() int
- func (m *QuorumSolvency) XXX_Unmarshal(b []byte) error
- type QuorumState
- func (*QuorumState) Descriptor() ([]byte, []int)
- func (m *QuorumState) Marshal() (dAtA []byte, err error)
- func (m *QuorumState) MarshalTo(dAtA []byte) (int, error)
- func (m *QuorumState) MarshalToSizedBuffer(dAtA []byte) (int, error)
- func (*QuorumState) ProtoMessage()
- func (m *QuorumState) Reset()
- func (m *QuorumState) Size() (n int)
- func (this *QuorumState) String() string
- func (m *QuorumState) Unmarshal(dAtA []byte) error
- func (m *QuorumState) XXX_DiscardUnknown()
- func (m *QuorumState) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)
- func (m *QuorumState) XXX_Merge(src proto.Message)
- func (m *QuorumState) XXX_Size() int
- func (m *QuorumState) XXX_Unmarshal(b []byte) error
- type QuorumTx
- func (*QuorumTx) Descriptor() ([]byte, []int)
- func (qtx *QuorumTx) Equals(other *QuorumTx) bool
- func (qtx *QuorumTx) GetAttestations() []*Attestation
- func (m *QuorumTx) Marshal() (dAtA []byte, err error)
- func (m *QuorumTx) MarshalTo(dAtA []byte) (int, error)
- func (m *QuorumTx) MarshalToSizedBuffer(dAtA []byte) (int, error)
- func (*QuorumTx) ProtoMessage()
- func (qtx *QuorumTx) RemoveAttestations(atts []*Attestation) bool
- func (m *QuorumTx) Reset()
- func (qtx *QuorumTx) SetAttestations(atts []*Attestation) *QuorumTx
- func (m *QuorumTx) Size() (n int)
- func (this *QuorumTx) String() string
- func (m *QuorumTx) Unmarshal(dAtA []byte) error
- func (m *QuorumTx) XXX_DiscardUnknown()
- func (m *QuorumTx) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)
- func (m *QuorumTx) XXX_Merge(src proto.Message)
- func (m *QuorumTx) XXX_Size() int
- func (m *QuorumTx) XXX_Unmarshal(b []byte) error
- type SigningAlgo
- type Solvency
- func (*Solvency) Descriptor() ([]byte, []int)
- func (s *Solvency) Equals(other *Solvency) bool
- func (s *Solvency) GetSignablePayload() ([]byte, error)
- func (s *Solvency) Hash() (TxID, error)
- func (m *Solvency) Marshal() (dAtA []byte, err error)
- func (m *Solvency) MarshalTo(dAtA []byte) (int, error)
- func (m *Solvency) MarshalToSizedBuffer(dAtA []byte) (int, error)
- func (*Solvency) ProtoMessage()
- func (m *Solvency) Reset()
- func (m *Solvency) Size() (n int)
- func (this *Solvency) String() string
- func (m *Solvency) Unmarshal(dAtA []byte) error
- func (m *Solvency) XXX_DiscardUnknown()
- func (m *Solvency) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)
- func (m *Solvency) XXX_Merge(src proto.Message)
- func (m *Solvency) XXX_Size() int
- func (m *Solvency) XXX_Unmarshal(b []byte) error
- type Status
- type Symbol
- type Ticker
- type Tickers
- type Tx
- func (*Tx) Descriptor() ([]byte, []int)
- func (tx Tx) EqualsEx(tx2 Tx) bool
- func (tx Tx) Hash(blockHeight int64) string
- func (tx Tx) IsEmpty() bool
- func (m *Tx) Marshal() (dAtA []byte, err error)
- func (m *Tx) MarshalTo(dAtA []byte) (int, error)
- func (m *Tx) MarshalToSizedBuffer(dAtA []byte) (int, error)
- func (*Tx) ProtoMessage()
- func (m *Tx) Reset()
- func (m *Tx) Size() (n int)
- func (tx Tx) String() string
- func (tx Tx) ToAttributes() []cosmos.Attribute
- func (m *Tx) Unmarshal(dAtA []byte) error
- func (tx Tx) Valid() error
- func (m *Tx) XXX_DiscardUnknown()
- func (m *Tx) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)
- func (m *Tx) XXX_Merge(src proto.Message)
- func (m *Tx) XXX_Size() int
- func (m *Tx) XXX_Unmarshal(b []byte) error
- type TxID
- type TxIDs
- type Txs
Constants ¶
const ( NoAddress = Address("") NoopAddress = Address("noop") EVMNullAddress = Address("0x0000000000000000000000000000000000000000") GaiaZeroAddress = Address("cosmos100000000000000000000000000000000708mjz") )
const ( EmptyChain = Chain("") BSCChain = Chain("Bsc") ETHChain = Chain("Eth") BTCChain = Chain("Btc") LTCChain = Chain("Ltc") BCHChain = Chain("Bch") DOGEChain = Chain("Doge") THORChain = Chain("Thor") GAIAChain = Chain("Gaia") AVAXChain = Chain("Avax") BASEChain = Chain("Base") XRPChain = Chain("Xrp") MAPChain = Chain("Map") ARBChain = Chain("Arb") TRONChain = Chain("Tron") SOLChain = Chain("Sol") SigningAlgoSecp256k1 = SigningAlgo("secp256k1") SigningAlgoEd25519 = SigningAlgo("ed25519") )
const CurrentChainNetwork = MainNet // todo switch network
const One = 100000000
One is useful type so THORNode doesn't need to manage 8 zeroes all the time
const THORChainDecimals = 8
THORChainDecimals indicate the number of decimal points used in THORChain
Variables ¶
var ( // EmptyAsset empty asset, not valid EmptyAsset = Asset{Chain: EmptyChain, Symbol: "", Ticker: "", Synth: false} // ATOMAsset ATOM ATOMAsset = Asset{Chain: GAIAChain, Symbol: "ATOM", Ticker: "ATOM", Synth: false} // BNBBEP20Asset BNB BNBBEP20Asset = Asset{Chain: BSCChain, Symbol: "BNB", Ticker: "BNB", Synth: false} // BTCAsset BTC BTCAsset = Asset{Chain: BTCChain, Symbol: "BTC", Ticker: "BTC", Synth: false} // LTCAsset BTC LTCAsset = Asset{Chain: LTCChain, Symbol: "LTC", Ticker: "LTC", Synth: false} // BCHAsset BCH BCHAsset = Asset{Chain: BCHChain, Symbol: "BCH", Ticker: "BCH", Synth: false} // DOGEAsset DOGE DOGEAsset = Asset{Chain: DOGEChain, Symbol: "DOGE", Ticker: "DOGE", Synth: false} // ETHAsset ETH ETHAsset = Asset{Chain: ETHChain, Symbol: "ETH", Ticker: "ETH", Synth: false} // BaseAsset ETH BaseETHAsset = Asset{Chain: BASEChain, Symbol: "ETH", Ticker: "ETH", Synth: false} // AVAXAsset AVAX AVAXAsset = Asset{Chain: AVAXChain, Symbol: "AVAX", Ticker: "AVAX", Synth: false} // XRPAsset XRP XRPAsset = Asset{Chain: XRPChain, Symbol: "XRP", Ticker: "XRP", Synth: false} // RuneNative RUNE on thorchain RuneNative = Asset{Chain: THORChain, Symbol: "RUNE", Ticker: "RUNE", Synth: false} TCY = Asset{Chain: THORChain, Symbol: "TCY", Ticker: "TCY", Synth: false} TOR = Asset{Chain: THORChain, Symbol: "TOR", Ticker: "TOR", Synth: false} THORBTC = Asset{Chain: THORChain, Symbol: "BTC", Ticker: "BTC", Synth: false} // MAPAsset MAPO MAPAsset = Asset{Chain: MAPChain, Symbol: "MAPO", Ticker: "MAPO", Synth: false} )
var ( ErrInvalidLengthCommon = fmt.Errorf("proto: negative length found during unmarshaling") ErrIntOverflowCommon = fmt.Errorf("proto: integer overflow") ErrUnexpectedEndOfGroupCommon = fmt.Errorf("proto: unexpected end of group") )
var ( EmptyPubKey PubKey EmptyPubKeySet PubKeySet )
var AllChains = [...]Chain{ BSCChain, ETHChain, BTCChain, LTCChain, BCHChain, DOGEChain, GAIAChain, AVAXChain, BASEChain, XRPChain, MAPChain, ARBChain, }
var BlankTxID = TxID("0000000000000000000000000000000000000000000000000000000000000000")
BlankTxID represent blank
var LatestVersion semver.Version = semver.MustParse("999.0.0")
var NoCoin = Coin{ Asset: EmptyAsset, Amount: cosmos.ZeroUint(), }
NoCoin is empty Coin
var Status_name = map[int32]string{
0: "incomplete",
1: "done",
2: "reverted",
}
var Status_value = map[string]int32{
"incomplete": 0,
"done": 1,
"reverted": 2,
}
var UnsupportedChain = errors.New("unsupported chain")
Functions ¶
func Completion ¶
func CompressPubKey ¶
func ConvertAndEncode ¶
ConvertAndEncode converts from a base64 encoded byte string to hex or base32 encoded byte string and then to bech32
func CosmosPrivateKeyToTMPrivateKey ¶
func CosmosPrivateKeyToTMPrivateKey(privateKey cryptotypes.PrivKey) crypto.PrivKey
CosmosPrivateKeyToTMPrivateKey convert cosmos implementation of private key to tendermint private key
func GetMedianInt64 ¶
func GetSafeShare ¶
GetSafeShare does the same as GetUncappedShare , but GetSafeShare will guarantee the result will not more than total. The first two arguments should always have the same units (cancelling out to represent a unitless ratio applied to the allocation).
func GetUncappedShare ¶
GetUncappedShare this method will panic if any of the input parameter can't be convert to cosmos.Dec which shouldn't happen. The first two arguments should always have the same units (cancelling out to represent a unitless ratio applied to the allocation).
func HasHexPrefix ¶
func IsValidXRPAddress ¶
func RandHexString ¶
RandHexString generates random hex string used for test purpose
func RoundSignificantFigures ¶
RoundSignificantFigures rounds an unsigned 64-bit integer to the specified number of significant digits. It takes the number and significant digits as arguments.
func SafeSub ¶
SafeSub subtract input2 from input1, given cosmos.Uint can't be negative , otherwise it will panic thus in this method,when input2 is larger than input 1, it will just return cosmos.ZeroUint
func TrimHexPrefix ¶
Types ¶
type Address ¶
type Address string
func ConvertToNewBCHAddressFormat ¶
ConvertToNewBCHAddressFormat convert the given BCH to new address format
func NewAddress ¶
NewAddress create a new Address. Supports ETH/bech2/BTC/LTC/BCH/DOGE/XRP.
func (Address) AccAddress ¶
func (addr Address) AccAddress() (cosmos.AccAddress, error)
func (Address) GetChain ¶
Note that this will always return ETHChain for an AVAXChain address, so perhaps only use it when determining a network (e.g. mainnet/testnet).
func (Address) GetNetwork ¶
func (addr Address) GetNetwork(chain Chain) ChainNetwork
func (Address) IsChain ¶
Note that this can have false positives, such as being unable to distinguish between ETH and AVAX.
func (Address) IsValidBCHAddress ¶
IsValidBCHAddress determinate whether the address is a valid new BCH address format
func (Address) MappedAccAddress ¶
func (addr Address) MappedAccAddress() (cosmos.AccAddress, error)
type Asset ¶
type Asset struct {
Chain Chain `protobuf:"bytes,1,opt,name=chain,proto3,casttype=Chain" json:"chain,omitempty"`
Symbol Symbol `protobuf:"bytes,2,opt,name=symbol,proto3,casttype=Symbol" json:"symbol,omitempty"`
Ticker Ticker `protobuf:"bytes,3,opt,name=ticker,proto3,casttype=Ticker" json:"ticker,omitempty"`
Synth bool `protobuf:"varint,4,opt,name=synth,proto3" json:"synth,omitempty"`
Trade bool `protobuf:"varint,5,opt,name=trade,proto3" json:"trade,omitempty"`
Secured bool `protobuf:"varint,6,opt,name=secured,proto3" json:"secured,omitempty"`
}
func NewAssetWithShortCodes ¶
func RuneAsset ¶
func RuneAsset() Asset
RuneAsset return RUNE Asset depends on different environment
func (*Asset) Descriptor ¶
func (Asset) GetSyntheticAsset ¶
Get synthetic asset of asset
func (Asset) IsDerivedAsset ¶
Check if asset is a derived asset
func (Asset) IsGasAsset ¶
IsGasAsset check whether asset is base asset used to pay for gas
func (Asset) IsNative ¶
IsNative is a helper function, returns true when the asset is a native asset to MAPChain (ie rune, a synth, etc)
func (Asset) IsSecuredAsset ¶
func (Asset) IsSyntheticAsset ¶
Check if asset is a pegged asset
func (Asset) IsTradeAsset ¶
func (Asset) IsVaultAsset ¶
func (Asset) MarshalJSON ¶
MarshalJSON implement Marshaler interface
func (Asset) MarshalJSONPB ¶
MarshalJSONPB implement jsonpb.Marshaler
func (Asset) MimirString ¶
Replace pool name "." with a "-" for Mimir key checking.
func (*Asset) ProtoMessage ¶
func (*Asset) ProtoMessage()
func (*Asset) UnmarshalJSON ¶
UnmarshalJSON implement Unmarshaler interface
func (*Asset) UnmarshalJSONPB ¶
func (a *Asset) UnmarshalJSONPB(unmarshal *jsonpb.Unmarshaler, content []byte) error
UnmarshalJSONPB implement jsonpb.Unmarshaler
func (*Asset) XXX_DiscardUnknown ¶
func (m *Asset) XXX_DiscardUnknown()
func (*Asset) XXX_Marshal ¶
func (*Asset) XXX_Unmarshal ¶
type AttestErrataTx ¶
type AttestErrataTx struct {
ErrataTx *ErrataTx `protobuf:"bytes,1,opt,name=errata_tx,json=errataTx,proto3" json:"errata_tx,omitempty"`
Attestation *Attestation `protobuf:"bytes,2,opt,name=attestation,proto3" json:"attestation,omitempty"`
}
func (*AttestErrataTx) Descriptor ¶
func (*AttestErrataTx) Descriptor() ([]byte, []int)
func (*AttestErrataTx) GetAttestation ¶
func (a *AttestErrataTx) GetAttestation() *Attestation
Implement AttestMessage for AttestErrataTx
func (*AttestErrataTx) GetSignablePayload ¶
func (a *AttestErrataTx) GetSignablePayload() ([]byte, error)
func (*AttestErrataTx) Marshal ¶
func (m *AttestErrataTx) Marshal() (dAtA []byte, err error)
func (*AttestErrataTx) MarshalToSizedBuffer ¶
func (m *AttestErrataTx) MarshalToSizedBuffer(dAtA []byte) (int, error)
func (*AttestErrataTx) ProtoMessage ¶
func (*AttestErrataTx) ProtoMessage()
func (*AttestErrataTx) Reset ¶
func (m *AttestErrataTx) Reset()
func (*AttestErrataTx) Size ¶
func (m *AttestErrataTx) Size() (n int)
func (*AttestErrataTx) String ¶
func (this *AttestErrataTx) String() string
func (*AttestErrataTx) Unmarshal ¶
func (m *AttestErrataTx) Unmarshal(dAtA []byte) error
func (*AttestErrataTx) XXX_DiscardUnknown ¶
func (m *AttestErrataTx) XXX_DiscardUnknown()
func (*AttestErrataTx) XXX_Marshal ¶
func (m *AttestErrataTx) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)
func (*AttestErrataTx) XXX_Merge ¶
func (m *AttestErrataTx) XXX_Merge(src proto.Message)
func (*AttestErrataTx) XXX_Size ¶
func (m *AttestErrataTx) XXX_Size() int
func (*AttestErrataTx) XXX_Unmarshal ¶
func (m *AttestErrataTx) XXX_Unmarshal(b []byte) error
type AttestNetworkFee ¶
type AttestNetworkFee struct {
NetworkFee *NetworkFee `protobuf:"bytes,1,opt,name=network_fee,json=networkFee,proto3" json:"network_fee,omitempty"`
Attestation *Attestation `protobuf:"bytes,2,opt,name=attestation,proto3" json:"attestation,omitempty"`
}
func (*AttestNetworkFee) Descriptor ¶
func (*AttestNetworkFee) Descriptor() ([]byte, []int)
func (*AttestNetworkFee) GetAttestation ¶
func (a *AttestNetworkFee) GetAttestation() *Attestation
Implement AttestMessage for AttestNetworkFee
func (*AttestNetworkFee) GetSignablePayload ¶
func (a *AttestNetworkFee) GetSignablePayload() ([]byte, error)
func (*AttestNetworkFee) Marshal ¶
func (m *AttestNetworkFee) Marshal() (dAtA []byte, err error)
func (*AttestNetworkFee) MarshalToSizedBuffer ¶
func (m *AttestNetworkFee) MarshalToSizedBuffer(dAtA []byte) (int, error)
func (*AttestNetworkFee) ProtoMessage ¶
func (*AttestNetworkFee) ProtoMessage()
func (*AttestNetworkFee) Reset ¶
func (m *AttestNetworkFee) Reset()
func (*AttestNetworkFee) Size ¶
func (m *AttestNetworkFee) Size() (n int)
func (*AttestNetworkFee) String ¶
func (this *AttestNetworkFee) String() string
func (*AttestNetworkFee) Unmarshal ¶
func (m *AttestNetworkFee) Unmarshal(dAtA []byte) error
func (*AttestNetworkFee) XXX_DiscardUnknown ¶
func (m *AttestNetworkFee) XXX_DiscardUnknown()
func (*AttestNetworkFee) XXX_Marshal ¶
func (m *AttestNetworkFee) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)
func (*AttestNetworkFee) XXX_Merge ¶
func (m *AttestNetworkFee) XXX_Merge(src proto.Message)
func (*AttestNetworkFee) XXX_Size ¶
func (m *AttestNetworkFee) XXX_Size() int
func (*AttestNetworkFee) XXX_Unmarshal ¶
func (m *AttestNetworkFee) XXX_Unmarshal(b []byte) error
type AttestSolvency ¶
type AttestSolvency struct {
Solvency *Solvency `protobuf:"bytes,1,opt,name=solvency,proto3" json:"solvency,omitempty"`
Attestation *Attestation `protobuf:"bytes,2,opt,name=attestation,proto3" json:"attestation,omitempty"`
}
func (*AttestSolvency) Descriptor ¶
func (*AttestSolvency) Descriptor() ([]byte, []int)
func (*AttestSolvency) GetAttestation ¶
func (a *AttestSolvency) GetAttestation() *Attestation
Implement AttestMessage for AttestSolvency
func (*AttestSolvency) GetSignablePayload ¶
func (a *AttestSolvency) GetSignablePayload() ([]byte, error)
func (*AttestSolvency) Marshal ¶
func (m *AttestSolvency) Marshal() (dAtA []byte, err error)
func (*AttestSolvency) MarshalToSizedBuffer ¶
func (m *AttestSolvency) MarshalToSizedBuffer(dAtA []byte) (int, error)
func (*AttestSolvency) ProtoMessage ¶
func (*AttestSolvency) ProtoMessage()
func (*AttestSolvency) Reset ¶
func (m *AttestSolvency) Reset()
func (*AttestSolvency) Size ¶
func (m *AttestSolvency) Size() (n int)
func (*AttestSolvency) String ¶
func (this *AttestSolvency) String() string
func (*AttestSolvency) Unmarshal ¶
func (m *AttestSolvency) Unmarshal(dAtA []byte) error
func (*AttestSolvency) XXX_DiscardUnknown ¶
func (m *AttestSolvency) XXX_DiscardUnknown()
func (*AttestSolvency) XXX_Marshal ¶
func (m *AttestSolvency) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)
func (*AttestSolvency) XXX_Merge ¶
func (m *AttestSolvency) XXX_Merge(src proto.Message)
func (*AttestSolvency) XXX_Size ¶
func (m *AttestSolvency) XXX_Size() int
func (*AttestSolvency) XXX_Unmarshal ¶
func (m *AttestSolvency) XXX_Unmarshal(b []byte) error
type AttestTx ¶
type AttestTx struct {
ObsTx ObservedTx `protobuf:"bytes,1,opt,name=obsTx,proto3" json:"obsTx"`
Attestation *Attestation `protobuf:"bytes,2,opt,name=attestation,proto3" json:"attestation,omitempty"`
Inbound bool `protobuf:"varint,3,opt,name=inbound,proto3" json:"inbound,omitempty"`
AllowFutureObservation bool `` /* 130-byte string literal not displayed */
}
func (*AttestTx) Descriptor ¶
func (*AttestTx) GetAttestation ¶
func (a *AttestTx) GetAttestation() *Attestation
Implement AttestMessage for AttestTx
func (*AttestTx) GetSignablePayload ¶
func (*AttestTx) MarshalToSizedBuffer ¶
func (*AttestTx) ProtoMessage ¶
func (*AttestTx) ProtoMessage()
func (*AttestTx) XXX_DiscardUnknown ¶
func (m *AttestTx) XXX_DiscardUnknown()
func (*AttestTx) XXX_Marshal ¶
func (*AttestTx) XXX_Unmarshal ¶
type Attestation ¶
type Attestation struct {
PubKey []byte `protobuf:"bytes,1,opt,name=PubKey,proto3" json:"PubKey,omitempty"`
Signature []byte `protobuf:"bytes,2,opt,name=Signature,proto3" json:"Signature,omitempty"`
}
func (*Attestation) Descriptor ¶
func (*Attestation) Descriptor() ([]byte, []int)
func (*Attestation) Equals ¶
func (a *Attestation) Equals(att *Attestation) bool
Equals compares two Attestation and returns true iff they are equal
func (*Attestation) Marshal ¶
func (m *Attestation) Marshal() (dAtA []byte, err error)
func (*Attestation) MarshalToSizedBuffer ¶
func (m *Attestation) MarshalToSizedBuffer(dAtA []byte) (int, error)
func (*Attestation) ProtoMessage ¶
func (*Attestation) ProtoMessage()
func (*Attestation) Reset ¶
func (m *Attestation) Reset()
func (*Attestation) Size ¶
func (m *Attestation) Size() (n int)
func (*Attestation) String ¶
func (this *Attestation) String() string
func (*Attestation) Unmarshal ¶
func (m *Attestation) Unmarshal(dAtA []byte) error
func (*Attestation) XXX_DiscardUnknown ¶
func (m *Attestation) XXX_DiscardUnknown()
func (*Attestation) XXX_Marshal ¶
func (m *Attestation) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)
func (*Attestation) XXX_Merge ¶
func (m *Attestation) XXX_Merge(src proto.Message)
func (*Attestation) XXX_Size ¶
func (m *Attestation) XXX_Size() int
func (*Attestation) XXX_Unmarshal ¶
func (m *Attestation) XXX_Unmarshal(b []byte) error
type AttestationBatch ¶
type AttestationBatch struct {
AttestTxs []*AttestTx `protobuf:"bytes,1,rep,name=attest_txs,json=attestTxs,proto3" json:"attest_txs,omitempty"`
AttestNetworkFees []*AttestNetworkFee `protobuf:"bytes,2,rep,name=attest_network_fees,json=attestNetworkFees,proto3" json:"attest_network_fees,omitempty"`
AttestSolvencies []*AttestSolvency `protobuf:"bytes,3,rep,name=attest_solvencies,json=attestSolvencies,proto3" json:"attest_solvencies,omitempty"`
AttestErrataTxs []*AttestErrataTx `protobuf:"bytes,4,rep,name=attest_errata_txs,json=attestErrataTxs,proto3" json:"attest_errata_txs,omitempty"`
}
func (*AttestationBatch) Descriptor ¶
func (*AttestationBatch) Descriptor() ([]byte, []int)
func (*AttestationBatch) Marshal ¶
func (m *AttestationBatch) Marshal() (dAtA []byte, err error)
func (*AttestationBatch) MarshalToSizedBuffer ¶
func (m *AttestationBatch) MarshalToSizedBuffer(dAtA []byte) (int, error)
func (*AttestationBatch) ProtoMessage ¶
func (*AttestationBatch) ProtoMessage()
func (*AttestationBatch) Reset ¶
func (m *AttestationBatch) Reset()
func (*AttestationBatch) Size ¶
func (m *AttestationBatch) Size() (n int)
func (*AttestationBatch) String ¶
func (this *AttestationBatch) String() string
func (*AttestationBatch) Unmarshal ¶
func (m *AttestationBatch) Unmarshal(dAtA []byte) error
func (*AttestationBatch) XXX_DiscardUnknown ¶
func (m *AttestationBatch) XXX_DiscardUnknown()
func (*AttestationBatch) XXX_Marshal ¶
func (m *AttestationBatch) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)
func (*AttestationBatch) XXX_Merge ¶
func (m *AttestationBatch) XXX_Merge(src proto.Message)
func (*AttestationBatch) XXX_Size ¶
func (m *AttestationBatch) XXX_Size() int
func (*AttestationBatch) XXX_Unmarshal ¶
func (m *AttestationBatch) XXX_Unmarshal(b []byte) error
type Chain ¶
type Chain string
func GetEVMChains ¶
func GetEVMChains() []Chain
GetEVMChains returns all "EVM" chains connected to THORChain "EVM" is defined, in thornode's context, as a chain that: - uses 0x as an address prefix - has a "Router" Smart Contract
func GetUTXOChains ¶
func GetUTXOChains() []Chain
GetUTXOChains returns all "UTXO" chains connected to THORChain.
func (Chain) AddressPrefix ¶
func (c Chain) AddressPrefix(cn ChainNetwork) string
AddressPrefix return the address prefix used by the given network (mocknet/mainnet)
func (Chain) ApproximateBlockMilliseconds ¶
func (Chain) DefaultCoinbase ¶
DefaultCoinbase returns the default coinbase address for each chain, returns 0 if no coinbase emission is used. This is used used at the time of writing as a fallback value in Bifrost, and for inbound confirmation count estimates in the quote APIs.
func (Chain) DustThreshold ¶
DustThreshold returns the min dust threshold for each chain The min dust threshold defines the lower end of the withdraw range of memoless savers txs The native coin value provided in a memoless tx defines a basis points amount of Withdraw or Add to a savers position as follows: Withdraw range: (dust_threshold + 1) -> (dust_threshold + 10_000) Add range: dust_threshold -> Inf NOTE: these should all be in 8 decimal places
func (Chain) GetSigningAlgo ¶
func (c Chain) GetSigningAlgo() SigningAlgo
GetSigningAlgo get the signing algorithm for the given chain
func (Chain) InboundNotes ¶
func (Chain) IsBSCChain ¶
func (Chain) IsEVM ¶
IsEVM returns true if given chain is an EVM chain. See working definition of an "EVM" chain in the `GetEVMChains` function description
func (Chain) IsMAPChain ¶
func (Chain) IsValidAddress ¶
IsValidAddress make sure the address is correct for the chain And this also make sure mocknet doesn't use mainnet address vice versa
func (Chain) MaxMemoLength ¶
MaxMemoLength returns the max memo length for each chain.
func (Chain) NativeToken ¶
type ChainNetwork ¶
type ChainNetwork uint8
ChainNetwork is to indicate which chain environment THORNode are working with
const ( // MainNet network for mainnet MainNet ChainNetwork = iota + 1 // TestNet network for mocknet TestNet )
func (ChainNetwork) SoftEquals ¶
func (net ChainNetwork) SoftEquals(net2 ChainNetwork) bool
Soft Equals check is mainnet == mainet, or mocknet == mocknet
type ChainPoolInfo ¶
type ChainPoolInfo struct {
Chain Chain `json:"chain"`
PubKey PubKey `json:"pub_key"`
PoolAddress Address `json:"pool_address"`
}
ChainPoolInfo represent the pool address specific for a chain
var EmptyChainPoolInfo ChainPoolInfo
EmptyChainPoolInfo everything is empty
func NewChainPoolInfo ¶
func NewChainPoolInfo(chain Chain, pubKey PubKey) (ChainPoolInfo, error)
NewChainPoolInfo create a new instance of ChainPoolInfo
func (ChainPoolInfo) IsEmpty ¶
func (cpi ChainPoolInfo) IsEmpty() bool
IsEmpty whether the struct is empty
type Chains ¶
type Chains []Chain
Chains represent a slice of Chain
type Coin ¶
type Coin struct {
Asset Asset `protobuf:"bytes,1,opt,name=asset,proto3,customtype=Asset" json:"asset"`
Amount cosmossdk_io_math.Uint `protobuf:"bytes,2,opt,name=amount,proto3,customtype=cosmossdk.io/math.Uint" json:"amount"`
Decimals int64 `protobuf:"varint,3,opt,name=decimals,proto3" json:"decimals,omitempty"`
}
func (*Coin) Descriptor ¶
func (*Coin) ProtoMessage ¶
func (*Coin) ProtoMessage()
func (Coin) WithDecimals ¶
WithDecimals update coin with a decimal
func (*Coin) XXX_DiscardUnknown ¶
func (m *Coin) XXX_DiscardUnknown()
func (*Coin) XXX_Unmarshal ¶
type Coins ¶
type Coins []Coin
Coins represent a slice of Coin
func (Coins) EqualsEx ¶
EqualsEx Check if two lists of coins are equal to each other. This method will make a copy of cs1 & cs2 , thus the original coins order will not be changed
func (Coins) GetCoin ¶
GetCoin gets a specific coin by asset. Assumes there is only one of this coin in the list.
func (Coins) HasSynthetic ¶
HasSynthetic check whether the coins contains synth coin
type ErrataTx ¶
type ErrataTx struct {
Id TxID `protobuf:"bytes,1,opt,name=id,proto3,casttype=TxID" json:"id,omitempty"`
Chain Chain `protobuf:"bytes,2,opt,name=chain,proto3,casttype=Chain" json:"chain,omitempty"`
}
func (*ErrataTx) Descriptor ¶
func (*ErrataTx) GetSignablePayload ¶
GetSignablePayload returns the data that is signed for verification
func (*ErrataTx) MarshalToSizedBuffer ¶
func (*ErrataTx) ProtoMessage ¶
func (*ErrataTx) ProtoMessage()
func (*ErrataTx) XXX_DiscardUnknown ¶
func (m *ErrataTx) XXX_DiscardUnknown()
func (*ErrataTx) XXX_Marshal ¶
func (*ErrataTx) XXX_Unmarshal ¶
type Fee ¶
type Fee struct {
Coins Coins `protobuf:"bytes,1,rep,name=coins,proto3,castrepeated=Coins" json:"coins"`
PoolDeduct cosmossdk_io_math.Uint `protobuf:"bytes,2,opt,name=pool_deduct,json=poolDeduct,proto3,customtype=cosmossdk.io/math.Uint" json:"pool_deduct"`
}
func (*Fee) Descriptor ¶
func (*Fee) ProtoMessage ¶
func (*Fee) ProtoMessage()
func (*Fee) XXX_DiscardUnknown ¶
func (m *Fee) XXX_DiscardUnknown()
func (*Fee) XXX_Unmarshal ¶
type Gas ¶
type Gas Coins
Gas coins
func MakeEVMGas ¶
func (Gas) Adds_deprecated ¶
Add combines two gas objects into one, adding amounts where needed or appending new coins. **WARNING**: dangerous, returns self-reference and also self-modifies
func (Gas) Equals ¶
Equals Check if two lists of coins are equal to each other. Order does not matter
type Invariant ¶
An Invariant is a function which tests a particular invariant. The invariant returns a descriptive message about what happened and a boolean indicating whether the invariant has been broken.
type InvariantRoute ¶
invariant route
func NewInvariantRoute ¶
func NewInvariantRoute(route string, invariant Invariant) InvariantRoute
NewInvariantRoute - create an InvariantRoute object
type NetworkFee ¶
type NetworkFee struct {
Height int64 `protobuf:"varint,1,opt,name=height,proto3" json:"height,omitempty"`
Chain Chain `protobuf:"bytes,2,opt,name=chain,proto3,casttype=Chain" json:"chain,omitempty"`
TransactionSize uint64 `protobuf:"varint,3,opt,name=transaction_size,json=transactionSize,proto3" json:"transaction_size,omitempty"`
TransactionRate uint64 `protobuf:"varint,4,opt,name=transaction_rate,json=transactionRate,proto3" json:"transaction_rate,omitempty"`
}
func (*NetworkFee) Descriptor ¶
func (*NetworkFee) Descriptor() ([]byte, []int)
func (*NetworkFee) Equals ¶
func (nf *NetworkFee) Equals(other *NetworkFee) bool
func (*NetworkFee) GetSignablePayload ¶
func (nf *NetworkFee) GetSignablePayload() ([]byte, error)
GetSignablePayload returns the data that is signed for verification
func (*NetworkFee) Marshal ¶
func (m *NetworkFee) Marshal() (dAtA []byte, err error)
func (*NetworkFee) MarshalToSizedBuffer ¶
func (m *NetworkFee) MarshalToSizedBuffer(dAtA []byte) (int, error)
func (*NetworkFee) ProtoMessage ¶
func (*NetworkFee) ProtoMessage()
func (*NetworkFee) Reset ¶
func (m *NetworkFee) Reset()
func (*NetworkFee) Size ¶
func (m *NetworkFee) Size() (n int)
func (*NetworkFee) String ¶
func (this *NetworkFee) String() string
func (*NetworkFee) Unmarshal ¶
func (m *NetworkFee) Unmarshal(dAtA []byte) error
func (*NetworkFee) Valid ¶
func (m *NetworkFee) Valid() error
Valid - check whether NetworkFee struct represent valid information
func (*NetworkFee) XXX_DiscardUnknown ¶
func (m *NetworkFee) XXX_DiscardUnknown()
func (*NetworkFee) XXX_Marshal ¶
func (m *NetworkFee) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)
func (*NetworkFee) XXX_Merge ¶
func (m *NetworkFee) XXX_Merge(src proto.Message)
func (*NetworkFee) XXX_Size ¶
func (m *NetworkFee) XXX_Size() int
func (*NetworkFee) XXX_Unmarshal ¶
func (m *NetworkFee) XXX_Unmarshal(b []byte) error
type ObservedTx ¶
type ObservedTx struct {
Tx Tx `protobuf:"bytes,1,opt,name=tx,proto3" json:"tx"`
Status Status `protobuf:"varint,2,opt,name=status,proto3,enum=common.Status" json:"status,omitempty"`
OutHashes []string `protobuf:"bytes,3,rep,name=out_hashes,json=outHashes,proto3" json:"out_hashes,omitempty"`
BlockHeight int64 `protobuf:"varint,4,opt,name=block_height,json=blockHeight,proto3" json:"block_height,omitempty"`
Signers []string `protobuf:"bytes,5,rep,name=signers,proto3" json:"signers,omitempty"`
ObservedPubKey PubKey `protobuf:"bytes,6,opt,name=observed_pub_key,json=observedPubKey,proto3,casttype=PubKey" json:"observed_pub_key,omitempty"`
KeysignMs int64 `protobuf:"varint,7,opt,name=keysign_ms,json=keysignMs,proto3" json:"keysign_ms,omitempty"`
FinaliseHeight int64 `protobuf:"varint,8,opt,name=finalise_height,json=finaliseHeight,proto3" json:"finalise_height,omitempty"`
Aggregator string `protobuf:"bytes,9,opt,name=aggregator,proto3" json:"aggregator,omitempty"`
AggregatorTarget string `protobuf:"bytes,10,opt,name=aggregator_target,json=aggregatorTarget,proto3" json:"aggregator_target,omitempty"`
AggregatorTargetLimit *cosmossdk_io_math.Uint `` /* 161-byte string literal not displayed */
}
func NewObservedTx ¶
func NewObservedTx(tx Tx, height int64, pk PubKey, finalisedHeight int64) ObservedTx
NewObservedTx create a new instance of ObservedTx
func (*ObservedTx) Descriptor ¶
func (*ObservedTx) Descriptor() ([]byte, []int)
func (ObservedTx) Equals ¶
func (m ObservedTx) Equals(tx2 ObservedTx) bool
Equals compare two ObservedTx
func (*ObservedTx) GetOutHashes ¶
func (m *ObservedTx) GetOutHashes() TxIDs
func (*ObservedTx) GetSignablePayload ¶
func (o *ObservedTx) GetSignablePayload() ([]byte, error)
GetSignablePayload returns the data that is signed for verification
func (*ObservedTx) GetSigners ¶
func (m *ObservedTx) GetSigners() []cosmos.AccAddress
GetSigners return all the node address that had sign the tx
func (*ObservedTx) HasSigned ¶
func (m *ObservedTx) HasSigned(signer cosmos.AccAddress) bool
HasSigned - check if given address has signed
func (*ObservedTx) IsDone ¶
func (m *ObservedTx) IsDone(numOuts int) bool
IsDone will only return true when the number of out hashes is larger or equals the input number
func (*ObservedTx) IsEmpty ¶
func (m *ObservedTx) IsEmpty() bool
IsEmpty check whether the Tx is empty
func (*ObservedTx) IsFinal ¶
func (m *ObservedTx) IsFinal() bool
IsFinal indicates whether ObserveTx is final.
func (*ObservedTx) Marshal ¶
func (m *ObservedTx) Marshal() (dAtA []byte, err error)
func (*ObservedTx) MarshalToSizedBuffer ¶
func (m *ObservedTx) MarshalToSizedBuffer(dAtA []byte) (int, error)
func (*ObservedTx) ProtoMessage ¶
func (*ObservedTx) ProtoMessage()
func (*ObservedTx) Reset ¶
func (m *ObservedTx) Reset()
func (*ObservedTx) SetDone ¶
func (m *ObservedTx) SetDone(hash TxID, numOuts int)
SetDone check the ObservedTx status, update it's status to done if the outbound tx had been processed
func (*ObservedTx) Sign ¶
func (m *ObservedTx) Sign(signer cosmos.AccAddress) bool
Sign add the given node account to signers list if the given signer is already in the list, it will return false, otherwise true
func (*ObservedTx) Size ¶
func (m *ObservedTx) Size() (n int)
func (*ObservedTx) Unmarshal ¶
func (m *ObservedTx) Unmarshal(dAtA []byte) error
func (*ObservedTx) Valid ¶
func (m *ObservedTx) Valid() error
Valid check whether the observed tx represent valid information
func (*ObservedTx) XXX_DiscardUnknown ¶
func (m *ObservedTx) XXX_DiscardUnknown()
func (*ObservedTx) XXX_Marshal ¶
func (m *ObservedTx) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)
func (*ObservedTx) XXX_Merge ¶
func (m *ObservedTx) XXX_Merge(src proto.Message)
func (*ObservedTx) XXX_Size ¶
func (m *ObservedTx) XXX_Size() int
func (*ObservedTx) XXX_Unmarshal ¶
func (m *ObservedTx) XXX_Unmarshal(b []byte) error
type ObservedTxs ¶
type ObservedTxs []ObservedTx
ObservedTxs a list of ObservedTx
func (ObservedTxs) Contains ¶
func (txs ObservedTxs) Contains(tx ObservedTx) bool
type ProtoUint ¶
type ProtoUint struct {
Value cosmossdk_io_math.Uint `protobuf:"bytes,1,opt,name=value,proto3,customtype=cosmossdk.io/math.Uint" json:"value"`
}
func (*ProtoUint) Descriptor ¶
func (*ProtoUint) MarshalToSizedBuffer ¶
func (*ProtoUint) ProtoMessage ¶
func (*ProtoUint) ProtoMessage()
func (*ProtoUint) XXX_DiscardUnknown ¶
func (m *ProtoUint) XXX_DiscardUnknown()
func (*ProtoUint) XXX_Marshal ¶
func (*ProtoUint) XXX_Unmarshal ¶
type PubKey ¶
type PubKey string
PubKey used in thorchain, it should be bech32 encoded string thus it will be something like tthorpub1addwnpepqt7qug8vk9r3saw8n4r803ydj2g3dqwx0mvq5akhnze86fc536xcycgtrnv tthorpub1addwnpepqdqvd4r84lq9m54m5kk9sf4k6kdgavvch723pcgadulxd6ey9u70k6zq8qe
func NewPubKeyByEth ¶
NewPubKeyByEth create a new instance of PubKey key is bech32 encoded string
func (PubKey) EVMPubkeyToAddress ¶
EVMPubkeyToAddress converts a pubkey of an EVM chain to the corresponding address
func (PubKey) GetAddress ¶
GetAddress will return an address for the given chain
func (PubKey) GetThorAddress ¶
func (p PubKey) GetThorAddress() (cosmos.AccAddress, error)
func (PubKey) MarshalJSON ¶
MarshalJSON to Marshals to JSON using Bech32
func (*PubKey) UnmarshalJSON ¶
UnmarshalJSON to Unmarshal from JSON assuming Bech32 encoding
type PubKeySet ¶
type PubKeySet struct {
Secp256k1 PubKey `protobuf:"bytes,1,opt,name=secp256k1,proto3,casttype=PubKey" json:"secp256k1,omitempty"`
Ed25519 PubKey `protobuf:"bytes,2,opt,name=ed25519,proto3,casttype=PubKey" json:"ed25519,omitempty"`
}
PubKeySet contains two pub keys , secp256k1 and ed25519
func NewPubKeySet ¶
NewPubKeySet create a new instance of PubKeySet , which contains two keys
func (*PubKeySet) Descriptor ¶
func (PubKeySet) GetAddress ¶
GetAddress
func (*PubKeySet) MarshalToSizedBuffer ¶
func (*PubKeySet) ProtoMessage ¶
func (*PubKeySet) ProtoMessage()
func (*PubKeySet) XXX_DiscardUnknown ¶
func (m *PubKeySet) XXX_DiscardUnknown()
func (*PubKeySet) XXX_Marshal ¶
func (*PubKeySet) XXX_Unmarshal ¶
type PubKeys ¶
type PubKeys []PubKey
PubKey used in thorchain, it should be bech32 encoded string thus it will be something like tthorpub1addwnpepqt7qug8vk9r3saw8n4r803ydj2g3dqwx0mvq5akhnze86fc536xcycgtrnv tthorpub1addwnpepqdqvd4r84lq9m54m5kk9sf4k6kdgavvch723pcgadulxd6ey9u70k6zq8qe
type QuorumErrataTx ¶
type QuorumErrataTx struct {
ErrataTx *ErrataTx `protobuf:"bytes,1,opt,name=errata_tx,json=errataTx,proto3" json:"errata_tx,omitempty"`
Attestations []*Attestation `protobuf:"bytes,2,rep,name=attestations,proto3" json:"attestations,omitempty"`
}
func (*QuorumErrataTx) Descriptor ¶
func (*QuorumErrataTx) Descriptor() ([]byte, []int)
func (*QuorumErrataTx) Equals ¶
func (qe *QuorumErrataTx) Equals(other *QuorumErrataTx) bool
func (*QuorumErrataTx) GetAttestations ¶
func (qe *QuorumErrataTx) GetAttestations() []*Attestation
func (*QuorumErrataTx) Marshal ¶
func (m *QuorumErrataTx) Marshal() (dAtA []byte, err error)
func (*QuorumErrataTx) MarshalToSizedBuffer ¶
func (m *QuorumErrataTx) MarshalToSizedBuffer(dAtA []byte) (int, error)
func (*QuorumErrataTx) ProtoMessage ¶
func (*QuorumErrataTx) ProtoMessage()
func (*QuorumErrataTx) RemoveAttestations ¶
func (qe *QuorumErrataTx) RemoveAttestations(atts []*Attestation) bool
func (*QuorumErrataTx) Reset ¶
func (m *QuorumErrataTx) Reset()
func (*QuorumErrataTx) SetAttestations ¶
func (qe *QuorumErrataTx) SetAttestations(atts []*Attestation) *QuorumErrataTx
func (*QuorumErrataTx) Size ¶
func (m *QuorumErrataTx) Size() (n int)
func (*QuorumErrataTx) String ¶
func (this *QuorumErrataTx) String() string
func (*QuorumErrataTx) Unmarshal ¶
func (m *QuorumErrataTx) Unmarshal(dAtA []byte) error
func (*QuorumErrataTx) XXX_DiscardUnknown ¶
func (m *QuorumErrataTx) XXX_DiscardUnknown()
func (*QuorumErrataTx) XXX_Marshal ¶
func (m *QuorumErrataTx) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)
func (*QuorumErrataTx) XXX_Merge ¶
func (m *QuorumErrataTx) XXX_Merge(src proto.Message)
func (*QuorumErrataTx) XXX_Size ¶
func (m *QuorumErrataTx) XXX_Size() int
func (*QuorumErrataTx) XXX_Unmarshal ¶
func (m *QuorumErrataTx) XXX_Unmarshal(b []byte) error
type QuorumNetworkFee ¶
type QuorumNetworkFee struct {
NetworkFee *NetworkFee `protobuf:"bytes,1,opt,name=network_fee,json=networkFee,proto3" json:"network_fee,omitempty"`
Attestations []*Attestation `protobuf:"bytes,2,rep,name=attestations,proto3" json:"attestations,omitempty"`
}
func (*QuorumNetworkFee) Descriptor ¶
func (*QuorumNetworkFee) Descriptor() ([]byte, []int)
func (*QuorumNetworkFee) Equals ¶
func (qnf *QuorumNetworkFee) Equals(other *QuorumNetworkFee) bool
func (*QuorumNetworkFee) GetAttestations ¶
func (qnf *QuorumNetworkFee) GetAttestations() []*Attestation
func (*QuorumNetworkFee) Marshal ¶
func (m *QuorumNetworkFee) Marshal() (dAtA []byte, err error)
func (*QuorumNetworkFee) MarshalToSizedBuffer ¶
func (m *QuorumNetworkFee) MarshalToSizedBuffer(dAtA []byte) (int, error)
func (*QuorumNetworkFee) ProtoMessage ¶
func (*QuorumNetworkFee) ProtoMessage()
func (*QuorumNetworkFee) RemoveAttestations ¶
func (qnf *QuorumNetworkFee) RemoveAttestations(atts []*Attestation) bool
RemoveAttestations removes matching attestations from a quorum network fee, and returns true if there are no more attestations.
func (*QuorumNetworkFee) Reset ¶
func (m *QuorumNetworkFee) Reset()
func (*QuorumNetworkFee) SetAttestations ¶
func (qnf *QuorumNetworkFee) SetAttestations(atts []*Attestation) *QuorumNetworkFee
func (*QuorumNetworkFee) Size ¶
func (m *QuorumNetworkFee) Size() (n int)
func (*QuorumNetworkFee) String ¶
func (this *QuorumNetworkFee) String() string
func (*QuorumNetworkFee) Unmarshal ¶
func (m *QuorumNetworkFee) Unmarshal(dAtA []byte) error
func (*QuorumNetworkFee) XXX_DiscardUnknown ¶
func (m *QuorumNetworkFee) XXX_DiscardUnknown()
func (*QuorumNetworkFee) XXX_Marshal ¶
func (m *QuorumNetworkFee) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)
func (*QuorumNetworkFee) XXX_Merge ¶
func (m *QuorumNetworkFee) XXX_Merge(src proto.Message)
func (*QuorumNetworkFee) XXX_Size ¶
func (m *QuorumNetworkFee) XXX_Size() int
func (*QuorumNetworkFee) XXX_Unmarshal ¶
func (m *QuorumNetworkFee) XXX_Unmarshal(b []byte) error
type QuorumSolvency ¶
type QuorumSolvency struct {
Solvency *Solvency `protobuf:"bytes,1,opt,name=solvency,proto3" json:"solvency,omitempty"`
Attestations []*Attestation `protobuf:"bytes,2,rep,name=attestations,proto3" json:"attestations,omitempty"`
}
func (*QuorumSolvency) Descriptor ¶
func (*QuorumSolvency) Descriptor() ([]byte, []int)
func (*QuorumSolvency) Equals ¶
func (qs *QuorumSolvency) Equals(other *QuorumSolvency) bool
func (*QuorumSolvency) GetAttestations ¶
func (qs *QuorumSolvency) GetAttestations() []*Attestation
func (*QuorumSolvency) Marshal ¶
func (m *QuorumSolvency) Marshal() (dAtA []byte, err error)
func (*QuorumSolvency) MarshalToSizedBuffer ¶
func (m *QuorumSolvency) MarshalToSizedBuffer(dAtA []byte) (int, error)
func (*QuorumSolvency) ProtoMessage ¶
func (*QuorumSolvency) ProtoMessage()
func (*QuorumSolvency) RemoveAttestations ¶
func (qs *QuorumSolvency) RemoveAttestations(atts []*Attestation) bool
func (*QuorumSolvency) Reset ¶
func (m *QuorumSolvency) Reset()
func (*QuorumSolvency) SetAttestations ¶
func (qs *QuorumSolvency) SetAttestations(atts []*Attestation) *QuorumSolvency
func (*QuorumSolvency) Size ¶
func (m *QuorumSolvency) Size() (n int)
func (*QuorumSolvency) String ¶
func (this *QuorumSolvency) String() string
func (*QuorumSolvency) Unmarshal ¶
func (m *QuorumSolvency) Unmarshal(dAtA []byte) error
func (*QuorumSolvency) XXX_DiscardUnknown ¶
func (m *QuorumSolvency) XXX_DiscardUnknown()
func (*QuorumSolvency) XXX_Marshal ¶
func (m *QuorumSolvency) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)
func (*QuorumSolvency) XXX_Merge ¶
func (m *QuorumSolvency) XXX_Merge(src proto.Message)
func (*QuorumSolvency) XXX_Size ¶
func (m *QuorumSolvency) XXX_Size() int
func (*QuorumSolvency) XXX_Unmarshal ¶
func (m *QuorumSolvency) XXX_Unmarshal(b []byte) error
type QuorumState ¶
type QuorumState struct {
QuoTxs []*QuorumTx `protobuf:"bytes,1,rep,name=quoTxs,proto3" json:"quoTxs,omitempty"`
QuoNetworkFees []*QuorumNetworkFee `protobuf:"bytes,2,rep,name=quoNetworkFees,proto3" json:"quoNetworkFees,omitempty"`
QuoSolvencies []*QuorumSolvency `protobuf:"bytes,3,rep,name=quoSolvencies,proto3" json:"quoSolvencies,omitempty"`
QuoErrataTxs []*QuorumErrataTx `protobuf:"bytes,4,rep,name=quoErrataTxs,proto3" json:"quoErrataTxs,omitempty"`
}
func (*QuorumState) Descriptor ¶
func (*QuorumState) Descriptor() ([]byte, []int)
func (*QuorumState) Marshal ¶
func (m *QuorumState) Marshal() (dAtA []byte, err error)
func (*QuorumState) MarshalToSizedBuffer ¶
func (m *QuorumState) MarshalToSizedBuffer(dAtA []byte) (int, error)
func (*QuorumState) ProtoMessage ¶
func (*QuorumState) ProtoMessage()
func (*QuorumState) Reset ¶
func (m *QuorumState) Reset()
func (*QuorumState) Size ¶
func (m *QuorumState) Size() (n int)
func (*QuorumState) String ¶
func (this *QuorumState) String() string
func (*QuorumState) Unmarshal ¶
func (m *QuorumState) Unmarshal(dAtA []byte) error
func (*QuorumState) XXX_DiscardUnknown ¶
func (m *QuorumState) XXX_DiscardUnknown()
func (*QuorumState) XXX_Marshal ¶
func (m *QuorumState) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)
func (*QuorumState) XXX_Merge ¶
func (m *QuorumState) XXX_Merge(src proto.Message)
func (*QuorumState) XXX_Size ¶
func (m *QuorumState) XXX_Size() int
func (*QuorumState) XXX_Unmarshal ¶
func (m *QuorumState) XXX_Unmarshal(b []byte) error
type QuorumTx ¶
type QuorumTx struct {
ObsTx ObservedTx `protobuf:"bytes,1,opt,name=obsTx,proto3" json:"obsTx"`
Attestations []*Attestation `protobuf:"bytes,2,rep,name=attestations,proto3" json:"attestations,omitempty"`
Inbound bool `protobuf:"varint,3,opt,name=inbound,proto3" json:"inbound,omitempty"`
AllowFutureObservation bool `` /* 130-byte string literal not displayed */
}
func (*QuorumTx) Descriptor ¶
func (*QuorumTx) GetAttestations ¶
func (qtx *QuorumTx) GetAttestations() []*Attestation
func (*QuorumTx) MarshalToSizedBuffer ¶
func (*QuorumTx) ProtoMessage ¶
func (*QuorumTx) ProtoMessage()
func (*QuorumTx) RemoveAttestations ¶
func (qtx *QuorumTx) RemoveAttestations(atts []*Attestation) bool
RemoveAttestations removes matching attestations from a quorum tx, and returns true if there are no more attestations.
func (*QuorumTx) SetAttestations ¶
func (qtx *QuorumTx) SetAttestations(atts []*Attestation) *QuorumTx
func (*QuorumTx) XXX_DiscardUnknown ¶
func (m *QuorumTx) XXX_DiscardUnknown()
func (*QuorumTx) XXX_Marshal ¶
func (*QuorumTx) XXX_Unmarshal ¶
type SigningAlgo ¶
type SigningAlgo string
type Solvency ¶
type Solvency struct {
Id TxID `protobuf:"bytes,1,opt,name=id,proto3,casttype=TxID" json:"id,omitempty"`
Chain Chain `protobuf:"bytes,2,opt,name=chain,proto3,casttype=Chain" json:"chain,omitempty"`
PubKey PubKey `protobuf:"bytes,3,opt,name=pub_key,json=pubKey,proto3,casttype=PubKey" json:"pub_key,omitempty"`
Coins Coins `protobuf:"bytes,4,rep,name=coins,proto3,castrepeated=Coins" json:"coins"`
Height int64 `protobuf:"varint,5,opt,name=height,proto3" json:"height,omitempty"`
}
func (*Solvency) Descriptor ¶
func (*Solvency) GetSignablePayload ¶
GetSignablePayload returns the data that is signed for verification
func (*Solvency) MarshalToSizedBuffer ¶
func (*Solvency) ProtoMessage ¶
func (*Solvency) ProtoMessage()
func (*Solvency) XXX_DiscardUnknown ¶
func (m *Solvency) XXX_DiscardUnknown()
func (*Solvency) XXX_Marshal ¶
func (*Solvency) XXX_Unmarshal ¶
type Status ¶
type Status int32
func (Status) EnumDescriptor ¶
func (Status) MarshalJSON ¶
MarshalJSON marshal Status to JSON in string form
func (*Status) UnmarshalJSON ¶
UnmarshalJSON convert string form back to Status
type Symbol ¶
type Symbol string
Symbol represent an asset
func (Symbol) IsMiniToken ¶
IsMiniToken is to determine whether it is a mini token on binance chain
type Ticker ¶
type Ticker string
Ticker The trading 'symbol' or shortened name (typically in capital letters) that refer to a coin on a trading platform. For example: ETH
func NewTicker ¶
NewTicker parse the given string as ticker, return error if it is not legitimate ticker
type Tx ¶
type Tx struct {
ID TxID `protobuf:"bytes,1,opt,name=id,proto3,casttype=TxID" json:"id,omitempty"`
Chain Chain `protobuf:"bytes,2,opt,name=chain,proto3,casttype=Chain" json:"chain,omitempty"`
FromAddress Address `protobuf:"bytes,3,opt,name=from_address,json=fromAddress,proto3,casttype=Address" json:"from_address,omitempty"`
ToAddress Address `protobuf:"bytes,4,opt,name=to_address,json=toAddress,proto3,casttype=Address" json:"to_address,omitempty"`
Coins Coins `protobuf:"bytes,5,rep,name=coins,proto3,castrepeated=Coins" json:"coins"`
Gas Gas `protobuf:"bytes,6,rep,name=gas,proto3,castrepeated=Gas" json:"gas"`
Memo string `protobuf:"bytes,7,opt,name=memo,proto3" json:"memo,omitempty"`
}
func GetRagnarokTx ¶
GetRagnarokTx return a tx used for ragnarok
func (*Tx) Descriptor ¶
func (Tx) EqualsEx ¶
EqualsEx compare two Tx to see whether they represent the same Tx This method will not change the original tx & tx2
func (Tx) Hash ¶
Hash calculates an internal hash based on chain, from address, coins, to address and block height.
func (*Tx) ProtoMessage ¶
func (*Tx) ProtoMessage()
func (Tx) ToAttributes ¶
ToAttributes push all the tx fields into a slice of cosmos Attribute(key value pairs)
func (Tx) Valid ¶
Valid do some data sanity check , if the tx contains invalid information it will return an none nil error
func (*Tx) XXX_DiscardUnknown ¶
func (m *Tx) XXX_DiscardUnknown()
func (*Tx) XXX_Unmarshal ¶
Source Files
¶
- account.go
- address.go
- address_mainnet.go
- asset.go
- chain.go
- chain_network.go
- chain_network_mainnet.go
- coin.go
- common.go
- common.pb.go
- decode.go
- entropy.go
- errors.go
- fee.go
- gas.go
- invariant.go
- math.go
- pubkey.go
- random_string.go
- sign.go
- significant_figures.go
- symbol.go
- ticker.go
- tx.go
- type_chain_pool_addr.go
- type_convert.go
- type_observed_tx.go
- utils.go