types

package
v1.56.0 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Feb 10, 2025 License: Apache-2.0 Imports: 12 Imported by: 19

Documentation

Index

Constants

View Source
const (
	// InjectiveBech32Prefix defines the Bech32 prefix used for EthAccounts on the Injective Chain
	InjectiveBech32Prefix = "inj"

	// Bech32PrefixAccAddr defines the Bech32 prefix of an account's address
	Bech32PrefixAccAddr = InjectiveBech32Prefix
	// Bech32PrefixAccPub defines the Bech32 prefix of an account's public key
	Bech32PrefixAccPub = InjectiveBech32Prefix + sdk.PrefixPublic
	// Bech32PrefixValAddr defines the Bech32 prefix of a validator's operator address
	Bech32PrefixValAddr = InjectiveBech32Prefix + sdk.PrefixValidator + sdk.PrefixOperator
	// Bech32PrefixValPub defines the Bech32 prefix of a validator's operator public key
	Bech32PrefixValPub = InjectiveBech32Prefix + sdk.PrefixValidator + sdk.PrefixOperator + sdk.PrefixPublic
	// Bech32PrefixConsAddr defines the Bech32 prefix of a consensus node address
	Bech32PrefixConsAddr = InjectiveBech32Prefix + sdk.PrefixValidator + sdk.PrefixConsensus
	// Bech32PrefixConsPub defines the Bech32 prefix of a consensus node public key
	Bech32PrefixConsPub = InjectiveBech32Prefix + sdk.PrefixValidator + sdk.PrefixConsensus + sdk.PrefixPublic

	// Bip44CoinType satisfies EIP84. See https://github.com/ethereum/EIPs/issues/84 for more info.
	Bip44CoinType = 60
)

Variables

View Source
var (
	ErrInvalidLengthAccount        = fmt.Errorf("proto: negative length found during unmarshaling")
	ErrIntOverflowAccount          = fmt.Errorf("proto: integer overflow")
	ErrUnexpectedEndOfGroupAccount = fmt.Errorf("proto: unexpected end of group")
)
View Source
var (
	ErrInvalidLengthTxExt        = fmt.Errorf("proto: negative length found during unmarshaling")
	ErrIntOverflowTxExt          = fmt.Errorf("proto: integer overflow")
	ErrUnexpectedEndOfGroupTxExt = fmt.Errorf("proto: unexpected end of group")
)
View Source
var (
	ErrInvalidLengthTxResponse        = fmt.Errorf("proto: negative length found during unmarshaling")
	ErrIntOverflowTxResponse          = fmt.Errorf("proto: integer overflow")
	ErrUnexpectedEndOfGroupTxResponse = fmt.Errorf("proto: unexpected end of group")
)
View Source
var (
	// BIP44HDPath is the BIP44 HD path used on Ethereum.
	BIP44HDPath = ethaccounts.DefaultBaseDerivationPath.String()
)

Functions

func HasDuplicate added in v1.56.0

func HasDuplicate[T comparable](elements []T) bool

func HasDuplicateCoins added in v1.56.0

func HasDuplicateCoins(slice []sdk.Coin) bool

func RegisterInterfaces

func RegisterInterfaces(registry codectypes.InterfaceRegistry)

RegisterInterfaces registers the tendermint concrete client-related implementations and interfaces.

func SetBech32Prefixes

func SetBech32Prefixes(config *sdk.Config)

SetBech32Prefixes sets the global prefixes to be used when serializing addresses and public keys to Bech32 strings.

func SetBip44CoinType

func SetBip44CoinType(config *sdk.Config)

SetBip44CoinType sets the global coin type to be used in hierarchical deterministic wallets.

Types

type EthAccount

type EthAccount struct {
	*types.BaseAccount ``     /* 136-byte string literal not displayed */
	CodeHash           []byte `protobuf:"bytes,2,opt,name=code_hash,json=codeHash,proto3" json:"code_hash,omitempty" yaml:"code_hash"`
}

EthAccount implements the authtypes.AccountI interface and embeds an authtypes.BaseAccount type. It is compatible with the auth AccountKeeper.

func (*EthAccount) Descriptor

func (*EthAccount) Descriptor() ([]byte, []int)

func (*EthAccount) Marshal

func (m *EthAccount) Marshal() (dAtA []byte, err error)

func (*EthAccount) MarshalTo

func (m *EthAccount) MarshalTo(dAtA []byte) (int, error)

func (*EthAccount) MarshalToSizedBuffer

func (m *EthAccount) MarshalToSizedBuffer(dAtA []byte) (int, error)

func (*EthAccount) ProtoMessage

func (*EthAccount) ProtoMessage()

func (*EthAccount) Reset

func (m *EthAccount) Reset()

func (*EthAccount) Size

func (m *EthAccount) Size() (n int)

func (*EthAccount) Unmarshal

func (m *EthAccount) Unmarshal(dAtA []byte) error

func (*EthAccount) XXX_DiscardUnknown

func (m *EthAccount) XXX_DiscardUnknown()

func (*EthAccount) XXX_Marshal

func (m *EthAccount) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)

func (*EthAccount) XXX_Merge

func (m *EthAccount) XXX_Merge(src proto.Message)

func (*EthAccount) XXX_Size

func (m *EthAccount) XXX_Size() int

func (*EthAccount) XXX_Unmarshal

func (m *EthAccount) XXX_Unmarshal(b []byte) error

type ExtensionOptionsWeb3Tx

type ExtensionOptionsWeb3Tx struct {
	// typedDataChainID used only in EIP712 Domain and should match
	// Ethereum network ID in a Web3 provider (e.g. Metamask).
	TypedDataChainID uint64 `protobuf:"varint,1,opt,name=typedDataChainID,proto3" json:"typedDataChainID,omitempty"`
	// feePayer is an account address for the fee payer. It will be validated
	// during EIP712 signature checking.
	FeePayer string `protobuf:"bytes,2,opt,name=feePayer,proto3" json:"feePayer,omitempty"`
	// feePayerSig is a signature data from the fee paying account,
	// allows to perform fee delegation when using EIP712 Domain.
	FeePayerSig []byte `protobuf:"bytes,3,opt,name=feePayerSig,proto3" json:"feePayerSig,omitempty"`
}

func (*ExtensionOptionsWeb3Tx) Descriptor

func (*ExtensionOptionsWeb3Tx) Descriptor() ([]byte, []int)

func (*ExtensionOptionsWeb3Tx) Marshal

func (m *ExtensionOptionsWeb3Tx) Marshal() (dAtA []byte, err error)

func (*ExtensionOptionsWeb3Tx) MarshalTo

func (m *ExtensionOptionsWeb3Tx) MarshalTo(dAtA []byte) (int, error)

func (*ExtensionOptionsWeb3Tx) MarshalToSizedBuffer

func (m *ExtensionOptionsWeb3Tx) MarshalToSizedBuffer(dAtA []byte) (int, error)

func (*ExtensionOptionsWeb3Tx) ProtoMessage

func (*ExtensionOptionsWeb3Tx) ProtoMessage()

func (*ExtensionOptionsWeb3Tx) Reset

func (m *ExtensionOptionsWeb3Tx) Reset()

func (*ExtensionOptionsWeb3Tx) Size

func (m *ExtensionOptionsWeb3Tx) Size() (n int)

func (*ExtensionOptionsWeb3Tx) String

func (m *ExtensionOptionsWeb3Tx) String() string

func (*ExtensionOptionsWeb3Tx) Unmarshal

func (m *ExtensionOptionsWeb3Tx) Unmarshal(dAtA []byte) error

func (*ExtensionOptionsWeb3Tx) XXX_DiscardUnknown

func (m *ExtensionOptionsWeb3Tx) XXX_DiscardUnknown()

func (*ExtensionOptionsWeb3Tx) XXX_Marshal

func (m *ExtensionOptionsWeb3Tx) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)

func (*ExtensionOptionsWeb3Tx) XXX_Merge

func (m *ExtensionOptionsWeb3Tx) XXX_Merge(src proto.Message)

func (*ExtensionOptionsWeb3Tx) XXX_Size

func (m *ExtensionOptionsWeb3Tx) XXX_Size() int

func (*ExtensionOptionsWeb3Tx) XXX_Unmarshal

func (m *ExtensionOptionsWeb3Tx) XXX_Unmarshal(b []byte) error

type TxResponseData added in v1.38.0

type TxResponseData struct {
	Messages []*TxResponseGenericMessage `protobuf:"bytes,1,rep,name=messages,proto3" json:"messages,omitempty"`
}

improvised message to unpack length prefixed messages in tx response data

func (*TxResponseData) Descriptor added in v1.38.0

func (*TxResponseData) Descriptor() ([]byte, []int)

func (*TxResponseData) GetMessages added in v1.38.0

func (m *TxResponseData) GetMessages() []*TxResponseGenericMessage

func (*TxResponseData) Marshal added in v1.38.0

func (m *TxResponseData) Marshal() (dAtA []byte, err error)

func (*TxResponseData) MarshalTo added in v1.38.0

func (m *TxResponseData) MarshalTo(dAtA []byte) (int, error)

func (*TxResponseData) MarshalToSizedBuffer added in v1.38.0

func (m *TxResponseData) MarshalToSizedBuffer(dAtA []byte) (int, error)

func (*TxResponseData) ProtoMessage added in v1.38.0

func (*TxResponseData) ProtoMessage()

func (*TxResponseData) Reset added in v1.38.0

func (m *TxResponseData) Reset()

func (*TxResponseData) Size added in v1.38.0

func (m *TxResponseData) Size() (n int)

func (*TxResponseData) String added in v1.38.0

func (m *TxResponseData) String() string

func (*TxResponseData) Unmarshal added in v1.38.0

func (m *TxResponseData) Unmarshal(dAtA []byte) error

func (*TxResponseData) XXX_DiscardUnknown added in v1.38.0

func (m *TxResponseData) XXX_DiscardUnknown()

func (*TxResponseData) XXX_Marshal added in v1.38.0

func (m *TxResponseData) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)

func (*TxResponseData) XXX_Merge added in v1.38.0

func (m *TxResponseData) XXX_Merge(src proto.Message)

func (*TxResponseData) XXX_Size added in v1.38.0

func (m *TxResponseData) XXX_Size() int

func (*TxResponseData) XXX_Unmarshal added in v1.38.0

func (m *TxResponseData) XXX_Unmarshal(b []byte) error

type TxResponseGenericMessage added in v1.38.0

type TxResponseGenericMessage struct {
	Header string `protobuf:"bytes,1,opt,name=header,proto3" json:"header,omitempty"`
	Data   []byte `protobuf:"bytes,2,opt,name=data,proto3" json:"data,omitempty"`
}

base header ak message type, we can cast the bytes into corresponding message response type

func (*TxResponseGenericMessage) Descriptor added in v1.38.0

func (*TxResponseGenericMessage) Descriptor() ([]byte, []int)

func (*TxResponseGenericMessage) GetData added in v1.38.0

func (m *TxResponseGenericMessage) GetData() []byte

func (*TxResponseGenericMessage) GetHeader added in v1.38.0

func (m *TxResponseGenericMessage) GetHeader() string

func (*TxResponseGenericMessage) Marshal added in v1.38.0

func (m *TxResponseGenericMessage) Marshal() (dAtA []byte, err error)

func (*TxResponseGenericMessage) MarshalTo added in v1.38.0

func (m *TxResponseGenericMessage) MarshalTo(dAtA []byte) (int, error)

func (*TxResponseGenericMessage) MarshalToSizedBuffer added in v1.38.0

func (m *TxResponseGenericMessage) MarshalToSizedBuffer(dAtA []byte) (int, error)

func (*TxResponseGenericMessage) ProtoMessage added in v1.38.0

func (*TxResponseGenericMessage) ProtoMessage()

func (*TxResponseGenericMessage) Reset added in v1.38.0

func (m *TxResponseGenericMessage) Reset()

func (*TxResponseGenericMessage) Size added in v1.38.0

func (m *TxResponseGenericMessage) Size() (n int)

func (*TxResponseGenericMessage) String added in v1.38.0

func (m *TxResponseGenericMessage) String() string

func (*TxResponseGenericMessage) Unmarshal added in v1.38.0

func (m *TxResponseGenericMessage) Unmarshal(dAtA []byte) error

func (*TxResponseGenericMessage) XXX_DiscardUnknown added in v1.38.0

func (m *TxResponseGenericMessage) XXX_DiscardUnknown()

func (*TxResponseGenericMessage) XXX_Marshal added in v1.38.0

func (m *TxResponseGenericMessage) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)

func (*TxResponseGenericMessage) XXX_Merge added in v1.38.0

func (m *TxResponseGenericMessage) XXX_Merge(src proto.Message)

func (*TxResponseGenericMessage) XXX_Size added in v1.38.0

func (m *TxResponseGenericMessage) XXX_Size() int

func (*TxResponseGenericMessage) XXX_Unmarshal added in v1.38.0

func (m *TxResponseGenericMessage) XXX_Unmarshal(b []byte) error

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL