testutil

package
v0.52.0-beta.2 Latest Latest
Warning

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

Go to latest
Published: Oct 9, 2024 License: Apache-2.0 Imports: 6 Imported by: 9

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type CodecOptions

type CodecOptions struct {
	AccAddressPrefix string
	ValAddressPrefix string
	AddressCodec     coreaddress.Codec
	ValidatorCodec   coreaddress.Codec
}

CodecOptions are options for creating a test codec. If set, provided address codecs will be prioritized when building the InterfaceRegistry and ProtoCodec. If not set, new address bech32 codecs will be created using the provided prefixes.

func NewCodecOptionsWithCodecs

func NewCodecOptionsWithCodecs(addressCodec, validatorCodec coreaddress.Codec) CodecOptions

NewCodecOptionsWithCodecs returns CodecOptions with provided address codecs.

func NewCodecOptionsWithPrefixes

func NewCodecOptionsWithPrefixes(addressPrefix, validatorPrefix string) CodecOptions

NewCodecOptionsWithPrefixes returns CodecOptions with provided prefixes.

func (CodecOptions) GetAddressCodec

func (o CodecOptions) GetAddressCodec() coreaddress.Codec

GetAddressCodec returns the address codec. If not address codec was provided it'll create a new one based on the bech32 prefix.

func (CodecOptions) GetValidatorCodec

func (o CodecOptions) GetValidatorCodec() coreaddress.Codec

GetValidatorCodec returns the validator address codec. If not validator codec was provided it'll create a new one based on the bech32 prefix.

func (CodecOptions) NewCodec

func (o CodecOptions) NewCodec() *codec.ProtoCodec

NewCodec returns a new codec with the given options.

func (CodecOptions) NewInterfaceRegistry

func (o CodecOptions) NewInterfaceRegistry() codectypes.InterfaceRegistry

NewInterfaceRegistry returns a new InterfaceRegistry with the given options.

Jump to

Keyboard shortcuts

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